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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? smc.c

?? ATMEL 89c51sndc mp3外接硬盤源碼
?? C
?? 第 1 頁 / 共 5 頁
字號:
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      Usb_clear_RXOUT_PP();*/
//    }
  
    smc_calculate_ecc();
    ecc[0] = ecc1;
    ecc[1] = ecc2;
    ecc[2] = ecc3;
  

//    smc_download_buffer();    /* Write 256 bytes from the buffer */
//    ptr = gl_buffer;          /* Restart for the last 256 bytes */
  
//    for (j = 4 ; j != 0; j--)                 /* Load 256b = 4 * 64    */
//    {
      while (!Usb_rx_complete());             /* wait end of reception */
      smc_usb_to_buff_64(0);                  /* Download usb datas to gl_buffer b0 b63*/
      Usb_clear_RXOUT_PP();
      while (!Usb_rx_complete());             /* wait end of reception */
      smc_usb_to_buff_64(64);                 /* Download usb datas to gl_buffer b64 b127*/
      Usb_clear_RXOUT_PP();
      while (!Usb_rx_complete());             /* wait end of reception */
      smc_usb_to_buff_64(128);                /* Download usb datas to gl_buffer b128 b191*/
      Usb_clear_RXOUT_PP();
      while (!Usb_rx_complete());             /* wait end of reception */
      smc_usb_to_buff_64(192);                /* Download usb datas to gl_buffer b192 b255*/
      Usb_clear_RXOUT_PP();

/*      while (!Usb_rx_complete());             /* wait end of reception */
/*      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      (*ptr++) = Usb_read_byte();
      Usb_clear_RXOUT_PP();*/
//    }
  
    smc_calculate_ecc();
    ecc[3] = ecc1;
    ecc[4] = ecc2;
    ecc[5] = ecc3;
  
    /* Write 256 bytes from the buffer */
//    smc_download_buffer();
  #endif
  
    smc_update_spare_data();        /* Update spare data */
    Smc_send_command (SMC_PAGE_PROGRAM_CMD);
    gl_ptr_mem++;                   /* increase gl_ptr_mem : next page */
    smc_busy = TRUE;                /* set flag busy */
    Smc_wait_busy();
    nb_sector--;
  }
  while (nb_sector != 0);
  return OK;
}


#if 0
/*
Transfer result
LP14,12,10,... & LP15,13,11,... -> LP15,14,13,... & LP7,6,5,..
*/
void trans_result (Byte reg2,Byte reg3)
{
  Byte a; /* Working for reg2,reg3 */
  Byte b; /* Working for ecc1,ecc2 */
  Byte i; /* For counting */

  a = BIT7; b = BIT7; /* 80h=10000000b */
  ecc1 = ecc2 = 0; /* Clear ecc1,ecc2 */

  for(i = 0; i < 4; ++i) 
  {
    if ( (reg3 & a) != 0 ) ecc1 |= b; /* LP15,13,11,9 -> ecc1 */
    b = b >> 1; /* Right shift */
    if ( (reg2 & a) != 0 ) ecc1 |= b; /* LP14,12,10,8 -> ecc1 */
    b = b >> 1; /* Right shift */
    a = a >> 1; /* Right shift */
  }
  b = BIT7; /* 80h=10000000b */

  for (i = 0; i < 4; ++i) 
  {
    if ( (reg3 & a) != 0) ecc2 |= b; /* LP7,5,3,1 -> ecc2 */
    b = b >> 1; /* Right shift */
    if ( (reg2 & a) != 0) ecc2 |= b; /* LP6,4,2,0 -> ecc2 */
    b = b >> 1; /* Right shift */
    a = a >> 1; /* Right shift */
  }
}

#endif


/*F**************************************************************************
* NAME: smc_calculate_ecc
*----------------------------------------------------------------------------
* PARAMS:
*
* return:
*----------------------------------------------------------------------------
* PURPOSE:
*   This function calculate ecc value
*----------------------------------------------------------------------------
* EXAMPLE:
*----------------------------------------------------------------------------
* NOTE:
*----------------------------------------------------------------------------
* REQUIREMENTS:
*****************************************************************************/ 
void smc_calculate_ecc(void)
{
  Uint16 i; /* For counting */
  Byte   a; /* Working for table, reg2 and reg3 */
  Byte   b; /* Working for ecc1,ecc2 */
  Byte   reg1; /* D-all,CP5,CP4,CP3,... */
  Byte   reg2; /* LP14,LP12,L10,... */
  Byte   reg3; /* LP15,LP13,L11,... */

  reg1 = reg2 = reg3 = 0; /* Clear parameter */

  for(i = 0; i < 256; ++i) 
  {
    a = smc_ecc_table[gl_buffer[i]]; /* Get CP0-CP5 code from table */
    reg1 ^= (a & MASK_CPS); /* XOR with a */
    if ((a & BIT6)!=0) 
    { /* If D_all(all bit XOR) = 1 */
      reg3 ^= (Byte)i; /* XOR with counter */
      reg2 ^= ~((Byte)i); /* XOR with inv. of counter */
    }
  }
  /* Trans LP14,12,10,... & LP15,13,11,... -> LP15,14,13,... & LP7,6,5,.. */


  a = BIT7; b = BIT7; /* 80h=10000000b */
  ecc1 = ecc2 = 0; /* Clear ecc1,ecc2 */

  /* 1 */
  if ( (reg3 & a) != 0 ) ecc1 |= b; /* LP15,13,11,9 -> ecc1 */
  b = b >> 1; /* Right shift */
  if ( (reg2 & a) != 0 ) ecc1 |= b; /* LP14,12,10,8 -> ecc1 */
  b = b >> 1; /* Right shift */
  a = a >> 1; /* Right shift */

  /* 2 */
  if ( (reg3 & a) != 0 ) ecc1 |= b; /* LP15,13,11,9 -> ecc1 */
  b = b >> 1; /* Right shift */
  if ( (reg2 & a) != 0 ) ecc1 |= b; /* LP14,12,10,8 -> ecc1 */
  b = b >> 1; /* Right shift */
  a = a >> 1; /* Right shift */

  /* 3 */
  if ( (reg3 & a) != 0 ) ecc1 |= b; /* LP15,13,11,9 -> ecc1 */
  b = b >> 1; /* Right shift */
  if ( (reg2 & a) != 0 ) ecc1 |= b; /* LP14,12,10,8 -> ecc1 */
  b = b >> 1; /* Right shift */
  a = a >> 1; /* Right shift */

  /* 4 */
  if ( (reg3 & a) != 0 ) ecc1 |= b; /* LP15,13,11,9 -> ecc1 */
  b = b >> 1; /* Right shift */
  if ( (reg2 & a) != 0 ) ecc1 |= b; /* LP14,12,10,8 -> ecc1 */
  b = b >> 1; /* Right shift */
  a = a >> 1; /* Right shift */

  b = BIT7; /* 80h=10000000b */

  /* 1 */
  if ( (reg3 & a) != 0) ecc2 |= b; /* LP7,5,3,1 -> ecc2 */
  b = b >> 1; /* Right shift */
  if ( (reg2 & a) != 0) ecc2 |= b; /* LP6,4,2,0 -> ecc2 */
  b = b >> 1; /* Right shift */
  a = a >> 1; /* Right shift */

  /* 2 */
  if ( (reg3 & a) != 0) ecc2 |= b; /* LP7,5,3,1 -> ecc2 */
  b = b >> 1; /* Right shift */
  if ( (reg2 & a) != 0) ecc2 |= b; /* LP6,4,2,0 -> ecc2 */
  b = b >> 1; /* Right shift */
  a = a >> 1; /* Right shift */

  /* 3 */
  if ( (reg3 & a) != 0) ecc2 |= b; /* LP7,5,3,1 -> ecc2 */
  b = b >> 1; /* Right shift */
  if ( (reg2 & a) != 0) ecc2 |= b; /* LP6,4,2,0 -> ecc2 */
  b = b >> 1; /* Right shift */
  a = a >> 1; /* Right shift */

  /* 4 */
  if ( (reg3 & a) != 0) ecc2 |= b; /* LP7,5,3,1 -> ecc2 */
  b = b >> 1; /* Right shift */
  if ( (reg2 & a) != 0) ecc2 |= b; /* LP6,4,2,0 -> ecc2 */
  b = b >> 1; /* Right shift */
  a = a >> 1; /* Right shift */

  ecc1 = ~(ecc1); 
  ecc2 = ~(ecc2); /* Inv. ecc2 & ecc3 */
  ecc3 = ((~reg1)<<2)|BIT1BIT0; /* Make TEL format */
}


/*F**************************************************************************
* NAME: smc_format
*----------------------------------------------------------------------------
* PARAMS:
*
* return:
*   Address of the format parameter structure in code
*----------------------------------------------------------------------------
* PURPOSE: 
*   This function is called by the fat_format function and returns a pointer
*   to a table containing the format parameters after erasing the SMC.
*----------------------------------------------------------------------------
* EXAMPLE:
*----------------------------------------------------------------------------
* NOTE:
*----------------------------------------------------------------------------
* REQUIREMENTS:
*****************************************************************************/
s_format code * smc_format (void)
{

code  s_format  smc_tab_format[]=
  {
   /* nb_cylinder, nb_head,  nb_sector, nb_hidden, nb_sector_per_cluster */
    { (Uint16)500, (Byte)4,  (Byte)16,  (Byte)57,  (Byte)32 }, /* 16MB */
    { (Uint16)500, (Byte)8,  (Byte)16,  (Byte)51,  (Byte)32 }, /* 32MB */
    { (Uint16)500, (Byte)8,  (Byte)32,  (Byte)39,  (Byte)32 }, /* 64MB */
    { (Uint16)500, (Byte)16, (Byte)32,  (Byte)63,  (Byte)32 }, /* 128MB */
  };

  /* Erase all block */
  smc_erase_all_block();

  /* -- SMC Type Selection -- */
  if (smc_device_type == SMC_SIZE_128MB) return &smc_tab_format[SMC_128MB];
  if (smc_device_type == SMC_SIZE_64MB)  return &smc_tab_format[SMC_64MB];
  if (smc_device_type == SMC_SIZE_32MB)  return &smc_tab_format[SMC_32MB];
  if (smc_device_type == SMC_SIZE_16MB)  return &smc_tab_format[SMC_16MB];
}



/*F**************************************************************************
* NAME: smc_check_presence
*----------------------------------------------------------------------------
* PARAMS:
*
* return:
* return:
*   OK: card present
*   KO: card not present
*----------------------------------------------------------------------------
* PURPOSE: 
*   Return a status on card presence or not
*----------------------------------------------------------------------------
* EXAMPLE:
*----------------------------------------------------------------------------
* NOTE:
*----------------------------------------------------------------------------
* REQUIREMENTS:
********************

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲免费av高清| 97精品视频在线观看自产线路二| 国产一区999| 色老汉一区二区三区| 精品久久久久久久久久久久久久久| 国产精品久久久久久久久免费樱桃 | 欧美群妇大交群中文字幕| 久久久久国产精品麻豆| 日本视频一区二区| 在线观看欧美精品| 国产精品国产自产拍在线| 国产一区视频在线看| 欧美日韩成人一区| 一片黄亚洲嫩模| 99精品久久只有精品| 国产拍欧美日韩视频二区| 久久国产免费看| 日韩片之四级片| 亚洲成人你懂的| 欧美日韩成人综合| 亚洲综合在线视频| 91美女视频网站| 日韩码欧中文字| 色综合天天综合网天天看片| 国产日产欧产精品推荐色| 国内外成人在线| 337p日本欧洲亚洲大胆精品| 麻豆久久久久久| 久久综合九色综合欧美98| 精品无码三级在线观看视频| 日韩女同互慰一区二区| 亚洲成精国产精品女| 欧美伊人久久久久久久久影院| 亚洲精品免费在线播放| 色老汉av一区二区三区| 亚洲影视在线观看| 精品视频一区三区九区| 亚洲国产综合色| 欧美日韩一区二区在线观看| 亚洲 欧美综合在线网络| 欧美巨大另类极品videosbest | 国产午夜精品久久久久久久| 精品一区二区三区香蕉蜜桃| 2023国产精品自拍| 国产福利91精品| 国产精品少妇自拍| av电影在线观看完整版一区二区| 国产精品久久久久精k8| 欧洲一区二区三区免费视频| 午夜在线成人av| 久久亚洲捆绑美女| 成人h版在线观看| 亚洲黄一区二区三区| 欧美男生操女生| 久草中文综合在线| 欧美国产日产图区| 欧美综合亚洲图片综合区| 午夜影院久久久| 久久久久97国产精华液好用吗 | 国产呦精品一区二区三区网站| 久久久久99精品一区| 日本精品裸体写真集在线观看| 日韩精品欧美成人高清一区二区| 精品乱码亚洲一区二区不卡| av一区二区三区四区| 婷婷夜色潮精品综合在线| 337p日本欧洲亚洲大胆精品| 色网综合在线观看| 久久av中文字幕片| 一区二区成人在线| 国产三级精品三级在线专区| 欧美午夜理伦三级在线观看| 狠狠色综合播放一区二区| 综合av第一页| 久久影院午夜片一区| 欧美视频一二三区| 成人动漫中文字幕| 蜜臀av一区二区在线免费观看| 亚洲日本护士毛茸茸| 久久这里只精品最新地址| 欧美性生活影院| av中文一区二区三区| 蜜臀a∨国产成人精品| 亚洲精品成人在线| 国产精品日韩精品欧美在线| 日韩一区二区三区精品视频| 色域天天综合网| 风间由美一区二区av101| 美女视频网站久久| 亚洲一区二区美女| 自拍偷在线精品自拍偷无码专区| 26uuu久久天堂性欧美| 欧美一区二区国产| 欧美伦理电影网| 欧美在线你懂的| 99精品视频在线播放观看| 黄页视频在线91| 日本不卡视频在线观看| 伊人夜夜躁av伊人久久| 国产丝袜美腿一区二区三区| 日韩欧美中文一区| 欧美日韩精品三区| 在线观看视频91| 日本韩国欧美在线| 99精品国产99久久久久久白柏| 国产精品一区二区三区99| 久久国产夜色精品鲁鲁99| 五月天欧美精品| 香蕉久久一区二区不卡无毒影院| 夜夜嗨av一区二区三区网页| 成人欧美一区二区三区小说| 国产精品毛片久久久久久| 国产精品私人影院| 一区在线播放视频| 国产精品免费视频网站| 国产精品国产a| 中文字幕中文字幕在线一区 | 欧美综合一区二区| 欧美影院午夜播放| 欧美三片在线视频观看| 欧美日韩国产欧美日美国产精品| 欧美性生活久久| 91精品免费在线| 26uuu久久天堂性欧美| 国产视频一区二区在线| 国产精品青草综合久久久久99| 国产精品毛片久久久久久| 18涩涩午夜精品.www| 亚洲最大成人网4388xx| 日韩精品一区第一页| 久久精品国产色蜜蜜麻豆| 国产精品亚洲成人| 99这里都是精品| 欧美色网一区二区| 欧美tk丨vk视频| 国产精品美女久久久久aⅴ| 一区二区在线看| 免费av成人在线| 成人在线视频首页| 日本韩国欧美一区二区三区| 欧美精品v国产精品v日韩精品| 日韩一级免费观看| 日本一区二区成人| 香蕉加勒比综合久久| 激情图区综合网| 日本电影亚洲天堂一区| 欧美一区二区在线观看| 国产午夜精品理论片a级大结局| 亚洲欧美日韩国产手机在线| 蜜臀av一区二区在线观看| 成人黄色免费短视频| 欧美理论在线播放| 久久精品视频网| 亚洲福利一二三区| 国产精品资源站在线| 欧美性猛交xxxx乱大交退制版| 日韩精品一区二区三区在线| 亚洲视频在线观看三级| 麻豆成人91精品二区三区| 99久久夜色精品国产网站| 欧美一级国产精品| 亚洲视频免费在线| 狠狠色丁香久久婷婷综合_中 | 777亚洲妇女| 中文字幕五月欧美| 久久99久久99精品免视看婷婷 | 国产精品18久久久| 欧美精品视频www在线观看| 国产精品亲子乱子伦xxxx裸| 天堂蜜桃91精品| 成人国产精品免费网站| 精品粉嫩超白一线天av| 午夜国产不卡在线观看视频| 欧美亚洲另类激情小说| 久久精品视频在线看| 捆绑变态av一区二区三区| 欧美亚洲日本国产| 亚洲欧美日韩一区二区| 成人听书哪个软件好| 精品国产成人系列| 三级亚洲高清视频| 不卡电影免费在线播放一区| 日韩欧美中文一区二区| 五月婷婷激情综合| 欧美性猛交xxxxxxxx| 亚洲欧美在线视频观看| 成人午夜私人影院| 国产欧美一区二区在线| 久久99国产精品成人| 日韩欧美国产精品一区| 性欧美大战久久久久久久久| 91高清在线观看| 一区二区在线电影| 欧洲av一区二区嗯嗯嗯啊| 玉足女爽爽91| 91麻豆国产福利在线观看| 亚洲欧洲日韩综合一区二区| 成人免费毛片aaaaa**| 中文av一区特黄| 99久久精品免费看|