亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? fat.c

?? C51程序
?? C
?? 第 1 頁(yè) / 共 5 頁(yè)
字號(hào):
    }
    if (fat_is_fat16 == TRUE)
    {
      i = (cluster * 2) & 0x1FF;
      ((Byte *)&cluster)[1] = fat_buf_sector[i];
      fat_buf_sector[i++] = 0;
      ((Byte *)&cluster)[0] = fat_buf_sector[i];
      fat_buf_sector[i] = 0;
      end = (cluster == 0xFFFF);
    }
    else
    {
      i = (cluster * 3 / 2) & 0x1FF;
      if ((cluster & 0x01) == 0)
      {
        ((Byte *)&cluster)[1] = fat_buf_sector[i];
        fat_buf_sector[i] = 0x00;
        i++;
        if (i == 512)
        {
          fat_update_fat_sector(sector_number);
          sector_number++;
          fat_load_sector(fat_ptr_fats + sector_number);
          i = 0;
        }
        ((Byte *)&cluster)[0] = fat_buf_sector[i] & 0x0F;
        fat_buf_sector[i] &= 0xF0;
      }
      else
      {
        cluster = (fat_buf_sector[i] & 0xF0) >> 4;
        fat_buf_sector[i] &=  0x0F;
        i++;
        if (i == 512)
        {
          fat_update_fat_sector(sector_number);
          sector_number++;
          fat_load_sector(fat_ptr_fats + sector_number);
          i = 0;
        }
        cluster += (fat_buf_sector[i] << 4);
        fat_buf_sector[i] = 0x00;
      }
      end = (cluster == 0xFFF);

    }

  }
  while (!end);
  fat_update_fat_sector(sector_number);
}


/*F**************************************************************************
* NAME: fat_refresh_dir_file_info
*----------------------------------------------------------------------------
* PARAMS:
*    
* return:
*   
*----------------------------------------------------------------------------
* PURPOSE:
*   Reconstruct the file directory list and seek to the file pointed by
*   fat_dir_list_index
*----------------------------------------------------------------------------
* EXAMPLE:
*----------------------------------------------------------------------------
* NOTE:
*   
*----------------------------------------------------------------------------
* REQUIREMENTS:
*   
*****************************************************************************/
void fat_refresh_dir_file_info (Byte id)
{
  /* update fat_dir_current_sect with directory starting value */
  if (dir_is_root)
  {
    fat_dir_current_sect = fat_ptr_rdir;                          
  }
  else
  {
    fat_dir_current_sect = (((Uint32)(dclusters[0].cluster)) * fat_cluster_size)
                           + fat_ptr_data;
  }

  fat_get_dir_file_list(id);                /* Refresh file list */
  fat_seek_entry_record();                  /* Re-fetch the entry <-> fat_dir_list_index */
  fat_get_dir_entry(&fat_cache.current);    /* update current file info */  
}


/*F**************************************************************************
* NAME: fat_fdelete
*----------------------------------------------------------------------------
* PARAMS:
*    
* return:
*   - DEL_RET_OK:           delete done & dir is not empty
*   - DEL_RET_NO_MORE_FILE: dir is empty after delete or not
*   - DEL_RET_ERROR_DIR:    dir can not be deleted
*----------------------------------------------------------------------------
* PURPOSE:
*   Delete a selected file, in the root directory or in a sub-dir
*----------------------------------------------------------------------------
* EXAMPLE:
*----------------------------------------------------------------------------
* NOTE:
*   fat_frefresh may be called after fdelete to rebuilt the dir content list
*----------------------------------------------------------------------------
* REQUIREMENTS:
*   File variables must be updated (fat_dclust_byte_count, entry record, ...)
*****************************************************************************/
Byte fat_fdelete (void)
{
Uint16 i;
Uint32 dir_sector; 

  if (((dir_is_root == TRUE) && (fat_dir_list_last == 0)) ||     
      ((dir_is_root == FALSE) && (fat_dir_list_last == 2)))      /* . and .. directory */
    return DEL_RET_NO_MORE_FILE;            /* directory already empty */

  if (fat_check_ext() != FILE_DIR)
  {
    fat_seek_entry_record();                /* Re-fetch the entry <-> fat_dir_list_index */
    Hard_read_close();

    dir_sector = fat_dir_current_sect;
    fat_root_entry = fat_dir_current_offs / 32; /* fat_dir_current_offs give the offset in byte starting */
    fat_file_size.l = fat_cache.current.size.l; /* at the beginning of directory */

    fat_load_sector(dir_sector);            /* Load directory sector  */
    i = (fat_root_entry % 16) * 32 ;        /* position of entry in the sector */
    while (fat_buf_sector[i + 11] == ATTR_LFN_ENTRY)
    {
      /* mark file as deleted */
      fat_buf_sector[i] = FILE_DELETED;
      i += 32;

      if (!dir_is_root)
        fat_dclust_byte_count += 32;

      if (i == SECTOR_SIZE)
      {
        Hard_write_open(dir_sector);
        for (i = 0; i < SECTOR_SIZE; i++)
          Hard_write_byte(fat_buf_sector[i]);
        Hard_write_close();

        if (!dir_is_root)                   /* sub-directory */
        {
          /* check if we are at the end of a cluster */
          if ((((Byte*)&fat_dclust_byte_count)[1] == 0x00) &&
            ((((Byte*)&fat_dclust_byte_count)[0] & fat_cluster_mask) == 0x00))
          {
            /* extract if necessary the next cluster from the allocation list */
            if (dclusters[fat_dchain_index].number == fat_dchain_nb_clust)
            { /* new fragment */
              fat_dchain_index++;
              fat_dchain_nb_clust = 1;
              dir_sector = (fat_ptr_data + ((Uint32)(dclusters[fat_dchain_index].cluster) * fat_cluster_size));
            }
            else
            {
              fat_dchain_nb_clust++;        /* one more cluster read */
              dir_sector++;                 /* Contiguous cluster    */
            }
          }
          else
          { /* Don't change the cluster */
            dir_sector++;
          }
        }
        else
        { /* Root directory is linear */
          dir_sector++;
        }
        fat_load_sector(dir_sector);
        i = 0;
      }
    }
    fat_buf_sector[i] = FILE_DELETED;
    Hard_write_open(dir_sector);
    for (i = 0; i < SECTOR_SIZE; i++)
      Hard_write_byte(fat_buf_sector[i]);
    Hard_write_close();

    /* FAT update */
    fat_fclust_byte_count = 0;              /* byte 0 of cluster */
    /* reset the allocation list variable */
    fat_fchain_index = 0;
    fat_fchain_nb_clust = 0;                /* start on first contiguous cl */
    /* get file allocation list */
    fat_get_clusters(&fclusters, MAX_FILE_FRAGMENT_NUMBER);
    /* Clear fat cluster */
    fat_clear_fat();
    /* NF correction */
    for (i = 0; i < 256; i++)
      gl_buffer[i] = 0x00;
    fat_dir_list_last--;                    /* one file deleted */

    if (((dir_is_root == TRUE) && (fat_dir_list_last == 0)) ||     
        ((dir_is_root == FALSE) && (fat_dir_list_last == 2)))      /* . and .. directory */
      return DEL_RET_NO_MORE_FILE;          /* directory now empty */

    if (fat_dir_list_index == fat_dir_list_last)
    {
      fat_dir_list_index--;                 /* in case of last file delete */
    }
    return DEL_RET_OK;
  }
  else
  {
    return DEL_RET_ERROR_DIR;
  }
}

/*F**************************************************************************
* NAME: fat_free_space
*----------------------------------------------------------------------------
* PARAMS:
*   
* return:
*   number of free cluster
*----------------------------------------------------------------------------
* PURPOSE:
*   Get free space   
*----------------------------------------------------------------------------
* EXAMPLE:
*----------------------------------------------------------------------------
* NOTE:
*
*----------------------------------------------------------------------------
* REQUIREMENTS:
*****************************************************************************/
fat_st_free_space fat_free_space(void)
{
Uint32 temp;
Uint32 i;
Uint16 cluster;
bdata bit fat12_parity;
xdata fat_st_free_space free_space;

  Hard_read_open(fat_ptr_fats);
  temp = 2;
  if (fat_is_fat16)     /* FAT16 management */
  {
    for (i = 0; i < fat_count_of_clusters; i++)
    {
      ((Byte*)&cluster)[1] = Hard_read_byte();
      ((Byte*)&cluster)[0] = Hard_read_byte();
      if (cluster == 0x0000)
        temp++;
    }
    Hard_read_close();
    free_space.free_cluster = temp;
    free_space.cluster_size = fat_cluster_size; 
    return free_space;
  }
  else
  {
    fat12_parity = 0;
    for (i = 0; i < fat_count_of_clusters; i++)
    {
      if (fat12_parity == 0)
      {
        ((Byte*)&cluster)[1] = Hard_read_byte();
        ((Byte*)&cluster)[0] = Hard_read_byte();
        fat12_parity = 1;
      }
      else
      {
        cluster = (cluster & 0xF000) >> 12;
        cluster += (Hard_read_byte() << 4);
        fat12_parity = 0;
      }
      if (!(cluster & 0x0FFF))
        temp++;
    }
    Hard_read_close();
    free_space.free_cluster = temp;
    free_space.cluster_size = fat_cluster_size; 
    return free_space;
  }
}


/*F**************************************************************************
* NAME: fat_read_cluster12
*----------------------------------------------------------------------------
* PARAMS:
*   init : initialize the parity bit or not
* return:
*   FAT12 cluster value
*----------------------------------------------------------------------------
* PURPOSE:
*   Read in fat12 file system a cluster value   
*----------------------------------------------------------------------------
* EXAMPLE:
*----------------------------------------------------------------------------
* NOTE:
*
*----------------------------------------------------------------------------
* REQUIREMENTS:
*****************************************************************************/
Uint16 fat_read_cluster (bit init)
{
static bit fat12_parity;
static idata Uint16 cluster;

  if (fat_is_fat16)
  {
    ((Byte*)&cluster)[1] = Hard_read_byte();
    ((Byte*)&cluster)[0] = Hard_read_byte();
    return cluster;
  }

  if (init)
  {
    fat12_parity = 0;
    cluster = 0;
  }

  if (fat12_parity == 0)
  {
    ((Byte*)&cluster)[1] = Hard_read_byte();
    ((Byte*)&cluster)[0] = Hard_read_byte();
    fat12_parity = 1;
    return (cluster & 0x0FFF);
  }
  else
  {
    cluster = (cluster & 0xF000) >> 12;
    cluster += (Hard_read_byte() << 4);
    fat12_parity = 0;
    return (cluster);
  }
}


/*F**************************************************************************
* NAME: fat_set_clusters
*----------------------------------------------------------------------------
* PARAMS:
*
* return:
*   - OK: allocation done
*   - KO: allocation cannot be done : no free cluster
*----------------------------------------------------------------------------
* PURPOSE:
*   Prepare a list of the free clusters:
*     chain[n].cluster contains the starting cluster number of a fragment
*     chain[n].number contains the number of contiguous clusters in fragment
*----------------------------------------------------------------------------
* EXAMPLE:
*----------------------------------------------------------------------------
* NOTE:
*   Free cluster list is limited by the nb_frag parameter.
*   If memory is too much fragmented, created file may be limited in size.
*   Last list item always has single cluster
*----------------------------------------------------------------------------
* REQUIREMENTS:
*****************************************************************************/
bit fat_set_clusters (void)
{
bit     cluster_free;
Uint16  cluster;

  cluster = 0;
  cluster_free = FALSE;
  fat_last_clust_index = 0;
  Hard_read_open(fat_ptr_fats);

  /* search the first free cluster in fat */
  fat_read_cluster(1);
  fat_read_cluster(0);
  do                                   

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
韩国一区二区三区| 欧美肥妇bbw| 国产成人av电影在线观看| 九九精品一区二区| 九九精品视频在线看| 国产乱码字幕精品高清av| 国产美女久久久久| 成人永久免费视频| 风流少妇一区二区| 成人av在线网| 欧洲色大大久久| 欧美日韩黄色一区二区| 777色狠狠一区二区三区| 91麻豆精品国产91久久久 | 91精品免费在线观看| 91精品国产综合久久久久久久久久 | 亚洲chinese男男1069| 亚洲一区二区三区四区的| 日韩精品一卡二卡三卡四卡无卡| 蜜桃免费网站一区二区三区| 国产一区二区三区国产| 波多野结衣精品在线| 色综合久久中文综合久久97 | 亚洲精品免费看| 一区二区成人在线观看| 日韩中文字幕av电影| 精品一区二区免费视频| fc2成人免费人成在线观看播放| 一本大道久久a久久综合| 欧美日韩久久一区| 亚洲码国产岛国毛片在线| 亚洲国产精品天堂| 久久福利视频一区二区| 波多野结衣中文字幕一区二区三区| 一本久道久久综合中文字幕| 在线电影院国产精品| 久久综合狠狠综合久久激情| 中文字幕中文字幕中文字幕亚洲无线| 亚洲午夜精品一区二区三区他趣| 另类调教123区| www.日本不卡| 日韩欧美色综合| 亚洲欧洲av在线| 蜜臀精品久久久久久蜜臀| 波多野结衣的一区二区三区| 7777精品伊人久久久大香线蕉完整版| 国产日韩欧美麻豆| 香蕉加勒比综合久久| 大桥未久av一区二区三区中文| 欧美视频在线观看一区二区| 国产日韩av一区二区| 亚洲国产精品久久艾草纯爱| 风间由美性色一区二区三区| 欧美老肥妇做.爰bbww视频| 国产欧美一区二区精品性色超碰 | 国产麻豆视频一区| 99久精品国产| 精品免费视频一区二区| 亚洲综合在线视频| 丰满白嫩尤物一区二区| 555夜色666亚洲国产免| 国产精品超碰97尤物18| 久久国产人妖系列| 欧美亚洲综合另类| 国产精品动漫网站| 国产米奇在线777精品观看| 欧美日韩在线电影| 亚洲欧洲av在线| 国产精品资源在线| 欧美一区二区三区视频在线| 亚洲精品视频在线| 成人综合激情网| 久久日一线二线三线suv| 日韩精品福利网| 91精品办公室少妇高潮对白| 中文字幕第一区| 国产一区二区h| 精品精品国产高清一毛片一天堂| 亚洲永久免费视频| 色综合激情久久| 亚洲欧洲成人自拍| 成人免费视频一区二区| 亚洲精品一区二区三区四区高清| 日韩中文字幕一区二区三区| 日本高清无吗v一区| 国产精品国产三级国产a| 国产成人综合网站| 久久精品亚洲乱码伦伦中文| 久久av中文字幕片| 日韩欧美国产午夜精品| 青青草原综合久久大伊人精品优势| 欧美亚洲一区二区在线观看| 一区二区三区国产豹纹内裤在线| 99久久精品一区| 亚洲免费视频成人| 91九色02白丝porn| 亚洲国产精品久久不卡毛片| 欧美体内she精视频| 亚洲一区二区三区爽爽爽爽爽| 91网站在线播放| 一级做a爱片久久| 欧美在线色视频| 午夜av电影一区| 欧美一级在线免费| 久久精品国产一区二区三| 中文字幕高清不卡| 成人av电影观看| 中文字幕中文字幕一区二区| 99九九99九九九视频精品| 国产精品久久久爽爽爽麻豆色哟哟| 懂色av一区二区夜夜嗨| 最新欧美精品一区二区三区| 97成人超碰视| 亚洲一线二线三线久久久| 欧美日韩mp4| 人禽交欧美网站| 精品国产123| 国产**成人网毛片九色| 中文幕一区二区三区久久蜜桃| 暴力调教一区二区三区| 亚洲免费观看视频| 9191成人精品久久| 国产主播一区二区| 中文子幕无线码一区tr| 日本高清不卡aⅴ免费网站| 五月婷婷综合在线| 欧美mv和日韩mv国产网站| 国产成人av资源| 一区二区三区四区在线免费观看 | 亚洲精品免费播放| 欧美日韩在线观看一区二区 | 国产一区二区三区免费看| 亚洲国产精品传媒在线观看| 在线免费观看日本一区| 视频一区免费在线观看| 国产欧美一区二区精品婷婷| 色婷婷亚洲综合| 精品一区二区三区免费| 亚洲欧洲日本在线| 欧美一级欧美三级| 懂色av中文字幕一区二区三区| 亚洲一区二区三区国产| 久久综合视频网| 91麻豆swag| 老司机免费视频一区二区| 欧美高清在线一区| 欧美精选午夜久久久乱码6080| 国产又黄又大久久| 亚洲丰满少妇videoshd| 国产情人综合久久777777| 欧美午夜精品久久久久久超碰 | 在线亚洲+欧美+日本专区| 青青草97国产精品免费观看| 国产精品狼人久久影院观看方式| 欧美日韩高清一区二区不卡| 粉嫩嫩av羞羞动漫久久久| 视频一区二区欧美| 一区在线观看免费| 精品国产91久久久久久久妲己| 在线免费观看不卡av| 国产成人免费9x9x人网站视频| 亚洲综合图片区| 中文字幕不卡在线观看| 日韩欧美一二区| 欧美视频在线观看一区| 成人av网站免费观看| 麻豆中文一区二区| 亚洲自拍欧美精品| 国产精品久久久久久久久快鸭| 日韩欧美视频一区| 欧美性欧美巨大黑白大战| 粉嫩aⅴ一区二区三区四区五区| 免费看日韩精品| 一区二区久久久久久| 日韩理论片在线| 中文字幕欧美区| 久久久精品日韩欧美| 欧美大白屁股肥臀xxxxxx| 欧美调教femdomvk| 色综合久久中文综合久久97| 国产成人福利片| 国产精品一卡二| 九九国产精品视频| 欧美aⅴ一区二区三区视频| 亚洲电影欧美电影有声小说| 一区二区三区四区五区视频在线观看| 国产免费成人在线视频| 久久久亚洲综合| 欧美精品一区在线观看| 日韩欧美视频在线| 日韩一区二区三区在线视频| 欧美日韩国产精选| 欧美日韩精品欧美日韩精品一| 色综合久久综合| 色综合一区二区| 一本一道久久a久久精品综合蜜臀| 成人av免费网站| 91天堂素人约啪| 91免费国产视频网站| 色综合欧美在线视频区|