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

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

?? f411_vr_sstflash.c

?? 用c8051f410和FLASH(SPI接口)實(shí)現(xiàn)的數(shù)字錄音機(jī)。
?? C
?? 第 1 頁 / 共 2 頁
字號:
   NSSMD0 = 0;                         // enable the flash

   // send the read instruction
   SPI0DAT = READ;                     // load the XMIT register
   while (TXBMT != 1)                  // wait until the command is moved into
   {                                   // the XMIT buffer
   }
   SPI0DAT = temp_addr.UByte[1];       // load the high byte of the address
   while (TXBMT != 1)                  // wait until the data is moved into
   {                                   // the XMIT buffer
   }
   SPI0DAT = temp_addr.UByte[2];       // load the middle byte of the address
   while (TXBMT != 1)                  // wait until the data is moved into
   {                                   // the XMIT buffer
   }
   SPI0DAT = temp_addr.UByte[3];       // load the low byte of the address
   while (TXBMT != 1)                  // wait until the data is moved into
   {                                   // the XMIT buffer
   }
   SPI0DAT = 0xFF;                     // load junk data in order to receive
                                       // data from the flash
   while (TXBMT != 1)                  // wait until the junk data is moved
   {                                   // into the XMIT buffer
   }
   SPIF = 0;
   while (SPIF != 1)                   // wait until the read data is received
   {
   }
   SPIF = 0;

   NSSMD0 = 1;                         // disable the flash

   return SPI0DAT;
}

//-----------------------------------------------------------------------------
// Erase_MEM
//-----------------------------------------------------------------------------
//
// Return Value : None
// Parameters   : None
//
// Erase all data from the SST flash memory.
//
void Erase_MEM (void)
{
   unsigned char mem_status = 0x01;

   NSSMD0 = 0;                         // enable the flash

   // send the write enable command
   SPI0DAT = WREN;                     // load the XMIT register
   while (TXBMT != 1)                  // wait until the command is moved into
   {                                   // the XMIT buffer
   }
   SPIF = 0;
   while (SPIF != 1)                   // wait until the command reaches the
   {                                   // flash
   }
   SPIF = 0;

   NSSMD0 = 1;                         // allow the WREN to execute

   NSSMD0 = 0;                         // enable the flash

   // send the chip erase instruction
   SPI0DAT = CERASE;                   // load the XMIT register
   while (TXBMT != 1)                  // wait until the command is moved into
   {                                   // the XMIT buffer
   }
   SPIF = 0;
   while (SPIF != 1)                   // wait until the command reaches the
   {                                   // flash
   }
   SPIF = 0;

   NSSMD0 = 1;                         // allow the erase to execute

   // poll on the busy bit in the flash until the erase operation is complete
   NSSMD0 = 0;                         // enable the flash
   SPI0DAT = RDSR;                     // send the read status register command
   while (TXBMT != 1)                  // wait until the SPI can accept more
   {                                   // data
   }
   while (mem_status == 0x01)
   {
      SPI0DAT = 0xFF;                  // send junk in order to receive data
      while (TXBMT != 1)               // wait until the junk data is moved
      {                                // into the XMIT buffer
      }
      SPIF = 0;
      while (SPIF != 1)                // wait until the read data is received
      {
      }
      SPIF = 0;
      mem_status = SPI0DAT & 0x01;     // check the BUSY bit
   }

   NSSMD0 = 1;                         // disable the flash
}

//-----------------------------------------------------------------------------
// Read_MEM_Init
//-----------------------------------------------------------------------------
//
// Return Value :
//   1)  char data_byte - the data byte read from memory
//                      range is positive range of character: 0 to 255
// Parameters   :
//   1)  long address - address in the 512 kB external SST Flash
//                      range is postive values up to 2^19: 0 to 524287,
//                           or, 0 to 0x7FFFF
//
// Read one byte of data from a 24-bit address in the SST Flash Memory using
// the SPI.  This function is called by Recording_Search in F411_VR.c
// and is a duplicate of Read_MEM to avoid a warning by the compiler.
//
unsigned char Read_MEM_Init (unsigned long address)
{
   ADDRESS temp_addr;
   temp_addr.ULong = address;

   NSSMD0 = 0;                         // enable the flash

   // send the read instruction
   SPI0DAT = READ;                     // load the XMIT register
   while (TXBMT != 1)                  // wait until the command is moved into
   {                                   // the XMIT buffer
   }
   SPI0DAT = temp_addr.UByte[1];       // load the high byte of the address
   while (TXBMT != 1)                  // wait until the data is moved into
   {                                   // the XMIT buffer
   }
   SPI0DAT = temp_addr.UByte[2];       // load the middle byte of the address
   while (TXBMT != 1)                  // wait until the data is moved into
   {                                   // the XMIT buffer
   }
   SPI0DAT = temp_addr.UByte[3];       // load the low byte of the address
   while (TXBMT != 1)                  // wait until the data is moved into
   {                                   // the XMIT buffer
   }
   SPI0DAT = 0xFF;                     // load junk data in order to receive
                                       // data from the flash
   while (TXBMT != 1)                  // wait until the junk data is moved
   {                                   // into the XMIT buffer
   }
   SPIF = 0;
   while (SPIF != 1)                   // wait until the read data is received
   {
   }
   SPIF = 0;

   NSSMD0 = 1;                         // disable the flash

   return SPI0DAT;
}

//-----------------------------------------------------------------------------
// ReadID_MEM
//-----------------------------------------------------------------------------
//
// Return Value :
//   1)  char data_byte - the device ID read from memory at address 0x000001
//                      (this address is specified in the SST Flash datasheet)
//                      range is positive range of character: 0 to 255
// Parameters   : None
//
// Read the part ID from the flash memory (used for debugging).
//
/*
char ReadID_MEM (void)
{
   NSSMD0 = 0;                         // enable the flash

   SPI0DAT = READID;                   // send the read ID instruction
   while (TXBMT != 1)                  // wait until the SPI can accept more
   {                                   // data
   }
   SPI0DAT = 0x00;                     // send the device ID address
   while (TXBMT != 1)                  // wait until the SPI can accept more
   {                                   // data
   }
   SPI0DAT = 0x00;                     // send the device ID address
   while (TXBMT != 1)                  // wait until the SPI can accept more
   {                                   // data
   }
   SPI0DAT = 0x01;                     // send the device ID address
   while (TXBMT != 1)                  // wait until the SPI can accept more
   {                                   // data
   }
   SPI0DAT = 0xA5;                     // send dummy data for shift register
   while (TXBMT != 1)                  // wait until the SPI can accept more
   {                                   // data
   }
   SPIF = 0;
   while (SPIF != 1)                   // wait until the read data is received
   {
   }
   SPIF = 0;

   NSSMD0 = 1;                         // disable the flash

   return SPI0DAT;
}
*/
//-----------------------------------------------------------------------------
// End Of File
//-----------------------------------------------------------------------------

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲18影院在线观看| 一区二区视频免费在线观看| 国产精品亚洲第一| 国产精品久久综合| 在线观看视频欧美| 奇米色777欧美一区二区| 精品国产乱子伦一区| 成人免费视频网站在线观看| 亚洲精品国产高清久久伦理二区| 欧美系列一区二区| 精品在线亚洲视频| 亚洲免费观看高清完整版在线| 欧美高清你懂得| 国产成人aaa| 婷婷开心激情综合| 国产拍欧美日韩视频二区| 欧洲精品一区二区三区在线观看| 美女www一区二区| 717成人午夜免费福利电影| 午夜久久福利影院| 国产三级精品在线| 欧美日韩免费电影| 国产ts人妖一区二区| 亚洲成人自拍偷拍| 中文字幕成人网| 69成人精品免费视频| 97se亚洲国产综合自在线| 美女尤物国产一区| 亚洲另类色综合网站| 久久综合av免费| 欧美日韩情趣电影| 99精品在线观看视频| 精品亚洲成a人在线观看| 一区二区三区欧美日| 久久精品亚洲精品国产欧美kt∨| 欧美视频一区二区| av动漫一区二区| 国产在线一区观看| 石原莉奈一区二区三区在线观看| 国产蜜臀97一区二区三区| 欧美一区二区视频网站| 91成人免费网站| 久久精品99久久久| 五月婷婷久久丁香| 亚洲欧美成人一区二区三区| 日韩欧美综合一区| 91精彩视频在线观看| 国产激情视频一区二区在线观看| 日本亚洲三级在线| 亚洲一区二区三区中文字幕在线| 国产精品一二三四五| 奇米精品一区二区三区四区| 亚洲一区影音先锋| 亚洲精品免费看| 亚洲免费观看高清完整版在线观看| 国产校园另类小说区| 精品三级在线看| 91精品国产综合久久久蜜臀图片| 欧美色国产精品| 欧美午夜宅男影院| 在线看日本不卡| 在线视频一区二区三| 一本到三区不卡视频| 99麻豆久久久国产精品免费优播| 国产a区久久久| 丁香六月久久综合狠狠色| 国产乱一区二区| 国产呦萝稀缺另类资源| 国产一区二区伦理片| 国产乱码一区二区三区| 国产裸体歌舞团一区二区| 国产一区二区三区免费在线观看| 国产一区二区三区精品欧美日韩一区二区三区 | 一区二区在线看| 亚洲女同一区二区| 亚洲在线一区二区三区| 亚洲一区在线观看网站| 偷窥国产亚洲免费视频| 日本亚洲电影天堂| 久久99久久久久| 国产精品资源在线| 成人av电影在线观看| 色综合久久综合网97色综合 | 93久久精品日日躁夜夜躁欧美| eeuss影院一区二区三区| 国产成人亚洲综合a∨婷婷| 播五月开心婷婷综合| 一本色道久久综合亚洲91| www.亚洲免费av| a亚洲天堂av| 91久久精品日日躁夜夜躁欧美| 欧美少妇bbb| 日韩亚洲欧美在线| 欧美国产日韩a欧美在线观看| 中文字幕在线观看一区| 亚洲一区二区视频| 精品一区二区免费看| 成人免费毛片片v| 在线观看区一区二| 精品欧美一区二区三区精品久久| 国产精品69久久久久水密桃| 成人av电影观看| 欧美视频一区二区| 精品国产凹凸成av人网站| 亚洲一卡二卡三卡四卡| 激情综合色播激情啊| 国产一区999| 国产精品美女视频| 日韩精品亚洲一区| 激情综合网最新| 成人av网站在线观看| 欧美日韩在线不卡| 日韩精品一区二区在线| 亚洲免费资源在线播放| 另类小说欧美激情| 色综合一个色综合亚洲| 欧美tk—视频vk| 一区二区三区四区国产精品| 精品亚洲欧美一区| 欧洲日韩一区二区三区| 日本一区免费视频| 青青青伊人色综合久久| 99re热这里只有精品视频| 日韩三级.com| 亚洲小说春色综合另类电影| 国产精品一区二区久久不卡| 欧美老年两性高潮| 中文字幕在线不卡| 国产综合久久久久影院| 欧美日韩一级二级| 成人免费在线播放视频| 国产在线视视频有精品| 91.com视频| 午夜伊人狠狠久久| 色综合久久综合| 亚洲国产成人在线| 韩国精品在线观看| 91电影在线观看| 中文字幕乱码久久午夜不卡 | 久久婷婷国产综合精品青草 | 欧美性三三影院| 国产精品久久福利| 国产精品一区免费在线观看| 欧美一级高清片| 亚洲国产美国国产综合一区二区| 成人高清av在线| 久久精品日韩一区二区三区| 日本美女视频一区二区| 精品视频色一区| 亚洲一级电影视频| 成人开心网精品视频| 欧美一区二区三区四区视频| 亚洲一区在线观看网站| 色菇凉天天综合网| 亚洲激情在线激情| 91国产免费看| 亚洲无线码一区二区三区| 在线看国产日韩| 亚洲香肠在线观看| 在线免费观看一区| 免费在线欧美视频| 精品福利二区三区| 精品午夜一区二区三区在线观看| 亚洲综合自拍偷拍| caoporn国产一区二区| 中文字幕一区二区三区不卡| 9i在线看片成人免费| 中文字幕一区二区三区色视频 | 欧美激情一区二区三区四区 | 99re6这里只有精品视频在线观看| 国产精品久久久久7777按摩| av亚洲精华国产精华精华| 国产精品久久国产精麻豆99网站| eeuss鲁片一区二区三区在线看| 中文字幕在线不卡国产视频| 91视频国产资源| 玉米视频成人免费看| 欧美日韩国产免费一区二区| 日韩不卡在线观看日韩不卡视频| 欧美日韩久久一区二区| 日韩国产精品大片| 日韩美女视频一区二区在线观看| 九九国产精品视频| 国产日韩精品视频一区| av不卡免费电影| 亚洲va欧美va天堂v国产综合| 在线播放欧美女士性生活| 麻豆极品一区二区三区| 国产精品国产三级国产三级人妇 | 99精品国产99久久久久久白柏| 欧美顶级少妇做爰| 国产精品一二三四区| 亚洲一区二区三区四区五区中文 | 久久精品国产一区二区三区免费看 | 欧美精品日韩精品| 国产成人免费在线视频| 亚欧色一区w666天堂| 国产精品99久久久久久似苏梦涵| 一区二区三区在线视频免费 | 麻豆一区二区三区|