freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

深入理解sd卡基礎(chǔ)原理以及內(nèi)部結(jié)構(gòu)的總結(jié)-文庫吧

2025-07-20 17:45 本頁面


【正文】 define SD_READ_CID 0x40 + 10define SD_STOP_TRANSMISSION 0x40 + 12define SD_SEND_STATUS 0x40 + 13define SD_SET_BLOCKLEN 0x40 + 16define SD_READ_BLOCK 0x40 + 17define SD_READ_MULTI_BLOCK 0x40 + 18define SD_WRITE_BLOCK 0x40 + 24define SD_WRITE_MULTI_BLOCK 0x40 + 25//片選關(guān)(MMC/SDCard Invalid)define SD_Disable() SD_SS_H//片選開 (MMC/SDCard Active)define SD_Enable() SD_SS_L//****************************************************************************************///ICCAVR application builder : 03520 8:39:11// Target : M128// Crystal: include include include 39。39。void uart0_init(void)。void putchar(unsigned char content)。void putstr(unsigned char *s)。void SD_Port_Init(void)。unsigned char SD_Init(void)。unsigned char SD_write_sector(unsigned long addr,unsigned char *Buffer)。unsigned char SD_read_sector(unsigned long addr,unsigned char *Buffer)。unsigned char SPI_TransferByte(unsigned char byte)。unsigned char Write_Command_SD(unsigned char cmd,unsigned long address)。unsigned long SD_find(void)。//**************************************************************************//串口調(diào)試程序//**************************************************************************void uart0_init(void){UCSR0B = 0x00。 //disable while setting baud rateUCSR0A = 0x00。UCSR0C = 0x06。 // 00000110 UART0設(shè)置為異步模式、無奇偶校驗、1位停止位、8位數(shù)據(jù)位UBRR0L = 0x17。 //set baud rate loUBRR0H = 0x00。 //set baud rate hi 設(shè)置UART0口通信速率9600UCSR0B = 0x18。 }void putchar(unsigned char content){ while(!(UCSR0A amp。 (1 UDRE0)))。 /* 判斷上次發(fā)送有沒有完成 */ UDR0 = content。 /* 發(fā)送數(shù)據(jù) */ }void putstr(unsigned char *s){ while(*s) { putchar(*s)。 s++。 }}//****************************************************************************//端口初始化void SD_Port_Init(void)//****************************************************************************{ SD_PORT |= (1 SD_DDR |= (1 SD_DDR amp。= ~(1}//****************************************************************************//初始化 MMC/SD 卡為SPI模式unsigned char SD_Init(void)//****************************************************************************{ unsigned char retry,temp。 unsigned char i。 SPCR=0x53。 //設(shè)定SPI為128分頻,慢速進(jìn)行初始化 SPSR=0x00。 for (i=0。i0x0f。i++) { SPI_TransferByte(0xff)。 //延遲74個以上的時鐘 } SD_Enable()。 //開片選 SPI_TransferByte(SD_RESET)。 //發(fā)送復(fù)位命令 SPI_TransferByte(0x00)。 SPI_TransferByte(0x00)。 SPI_TransferByte(0x00)。 SPI_TransferByte(0x00)。 SPI_TransferByte(0x95)。 SPI_TransferByte(0xff)。 SPI_TransferByte(0xff)。 retry=0。 do{ temp=Write_Command_SD(SD_INIT,0
點擊復(fù)制文檔內(nèi)容
環(huán)評公示相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1