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

正文內(nèi)容

基于單片機的音樂播放器設計(已改無錯字)

2023-02-18 14:30:31 本頁面
  

【正文】 語言程序設計 [M](第二版) 北京:清華大學出版社[17] 佚名 MP3文件格式 [EB] . :2[18] 魏廣寅 VS1003MP3/WMA 音頻解碼器 [S] . 貴陽永青儀電科技開發(fā)部[19] VS1003 MP3/WMA AUDIO CODEC 數(shù)據(jù)手冊 [S] . Version , 20050607致謝時光飛逝,快樂、充實、短暫、難忘的大學生活即將結束,在這三年半的時間內(nèi),自己的能力在各方面都有很大的提高,取得的這些進步和成績,離不開許多人的幫助和關心。籍此向他們表示衷心的感謝。首先感謝我的導師劉大年老師。在他的諄諄教誨和悉心指導下,我的學術水平、理論修養(yǎng)和實踐能力才能獲得很大提高。他嚴謹?shù)闹螌W態(tài)度、對問題深刻的洞察力,也使我獲益良多。感謝劉大年老師在學習、課程設計上對我的指導平易隨和、治學認真嚴謹,和他在一起的時光總是充滿歡笑。感謝測控0901的各位同學,和他們共同學習和工作的日子充滿了歡樂,大家在生活上互相幫助,在學習上互相幫助,給我留下了美好的回憶。感謝我的父母,感謝他們一直以來對我的支持和鼓勵,對我的關心和照顧。最后,衷心地感謝所有在百忙中抽出寶貴時間來參加論文審閱和答辯的老師。謝謝大家!附錄附錄1:原理圖附錄2:VS1003模塊原理圖附錄3:PCB板圖附錄4:實物圖附錄5:程序1,F(xiàn)AT驅動程序:includeDWORD FirstDirClust。 //first directory clusterDWORD FirstDataSector。 // The first sector number of dataWORD BytesPerSector。 // Bytes per sectorWORD FATsectors。 // The amount sector a FAT occupiedWORD SectorsPerClust。 // Sector per clusterDWORD FirstFATSector。 // The first FAT sectorDWORD FirstDirSector。 // The first Dir sectorDWORD RootDirSectors。 // The sector number a Root dir occupied DWORD RootDirCount。 // The count of directory in root dirBYTE FAT32_Enable。BYTE (* FAT_ReadSector)(DWORD,BYTE *)。BYTE (* FAT_WriteSector)(DWORD,BYTE *)。//函數(shù)指針指向sd卡的讀寫函數(shù)//function pointer to the sd card read amp。 write single block//wirte sector are not use in this playerBYTE (* FAT_ReadSector)(DWORD sector, BYTE * buffer)=MMC_SD_ReadSingleBlock。//device readBYTE (* FAT_WriteSector)(DWORD sector, BYTE * buffer)=MMC_SD_WriteSingleBlock。//device writestruct FileInfoStruct FileInfo。//temporarily buffer for file information//FAT初始化,不含SD的初始化,用之前應先調(diào)用sd的初始化unsigned char FAT_Init()//Initialize of FAT need initialize SD first{ struct bootsector710 *bs = 0。 struct bpb710 *bpb = 0。// struct partsector *ps = 0。 struct partrecord *pr = 0。 BYTE buffer[512]。 DWORD hidsec=0。 DWORD Capacity。 Capacity = MMC_SD_ReadCapacity()。// if(Capacity0xff)return 1。 if(FAT_ReadSector(0,buffer))return 2。 bs = (struct bootsector710 *)buffer。 pr = (struct partrecord *)((struct partsector *)buffer)psPart。//first partition hidsec = prprStartLBA。//the hidden sectors if(hidsec = Capacity/512) { hidsec = 0。 } else { if(FAT_ReadSector(prprStartLBA,buffer))return 3。//read the bpb sector bs = (struct bootsector710 *)buffer。 if(bsbsJump[0]!=0xE9 amp。amp。 bsbsJump[0]!=0xEB) { hidsec = 0。 if(FAT_ReadSector(0,buffer))return 4。//read the bpb sector bs = (struct bootsector710 *)buffer。 } } if(bsbsJump[0]!=0xE9 amp。amp。 bsbsJump[0]!=0xEB)//對付沒有bootsect的sd卡 //dead with the card which has no bootsect { return 5。 } bpb = (struct bpb710 *)bsbsBPB。 if(bpbbpbFATsecs)//detemine thd FAT type //do not support FAT12 { FAT32_Enable=0。 //FAT16 FATsectors = bpbbpbFATsecs。//FAT占用的扇區(qū)數(shù) //the sectors number occupied by one fat talbe FirstDirClust = 2。 } else { FAT32_Enable=1。 //FAT32 FATsectors = bpbbpbBigFATsecs。//FAT占用的扇區(qū)數(shù) //the sectors number occupied by one fat talbe FirstDirClust = bpbbpbRootClust。 } BytesPerSector = bpbbpbBytesPerSec。//每扇區(qū)字節(jié)數(shù) SectorsPerClust = (BYTE)bpbbpbSecPerClust。//每簇扇區(qū)數(shù) FirstFATSector = bpbbpbResSectors+hidsec。//第一個FAT表扇區(qū) RootDirCount = bpbbpbRootDirEnts。//根目錄項數(shù) RootDirSectors = (RootDirCount*32)9。//根目錄占用的扇區(qū)數(shù) FirstDirSector = FirstFATSector+bpbbpbFATs*FATsectors。//第一個目錄扇區(qū) FirstDataSector = FirstDirSector+RootDirSectors。//第一個數(shù)據(jù)扇區(qū) return 0。}//讀一個簇中的一個扇區(qū)//read one sector of one cluster, parameter part indicate which sectorunsigned char FAT_LoadPartCluster(unsigned long cluster,unsigned part,BYTE * buffer){ DWORD sector。 sector=FirstDataSector+(DWORD)(cluster2)*(DWORD)SectorsPerClust。//calculate the actual sector number if(FAT_ReadSector(sector+part,buffer))return 1。 else return 0。}//讀下一簇簇號//Return the cluster number of next cluster of file//Suitable for system which has limited RAMunsigned long FAT_NextCluster(unsigned long cluster){ BYTE buffer[512]。 DWORD sector。 DWORD offset。 if(FAT32_Enable)offset = cluster/128。 else offset = cluster/256。 if(cluster2)return 0x0ffffff8。 sector=FirstFATSector+offset。//calculate the actual sector if(FAT_ReadSector(sector,buffer))return 0x0ffffff8。//read fat table / return 0xfff8 when error occured if(FAT32_Enable) { offset=cluster%128。//find the position sector=((unsigned long *)buffer)[offset]。 } else { offset=cluster%256。//find the position sector=((unsigned int *)buffer)[offset]。 } return (unsigned long)sector。//return the cluste number}if FIX_DIRECTORY//在給定目錄下查找文件//Find a item in the directory which specify by the parameter cluster//Return the start cluster numberunsigned int FAT_FindItem(unsigned long cluster, BYTE *name, struct FileInfoStruct *FileInfo){ BYTE *buffer。 DWORD tempclust。 DWORD sector。 unsigned char t。 unsigned int offset。 unsigned char i。 struct direntry *item = 0。 if((cluster==0) amp。amp。 (FAT32_Enable == 0))// root directory { buffer=malloc(512)。//apply memory if(buffer==0)return 1。//if failed for(t=0。tRootDirSectors。t++) { if(FAT_ReadSector(FirstDirSector+t,buffer)){free(buffer)。return 1。} for(offset=0。offset512。offset+=32) { item=(struct direntry *)(amp。buffer[offset])。 if((itemdeName[0] != 0x00) amp。amp。 (itemdeName[0] != 0xe5) amp。amp。 (itemdeAttributes != 0x0f)) { for(i=0。i11。i++) { if(buffer[offset+i]!=name[i])break。 } if(i==11) { //return the parameter of the item FileInfoStartCluster = itemdeStartCluster + (((unsigned long)itemdeHighClust)16)。//don39。t care FileInfoSize = itemdeFileSize。 FileInfoAttr = itemdeAttributes。 FileInfoSector = FirstDirSector+t。 FileInfoOffset = offset。 free(buffer)。
點擊復制文檔內(nèi)容
醫(yī)療健康相關推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1