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

正文內(nèi)容

20xx基于單片機制作mp3播放器畢業(yè)論文(參考版)

2025-06-09 17:54本頁面
  

【正文】 //SCSIRead_Capacity命令的返回數(shù)據(jù)code unsigned char B_Read_Capacity[] = { 0x00, 0x00, 0xfe, 0xa0, //Last Logical Block Address for 32MB 0x00, 0x00, 0x02, 0x00 //block length。,//Product Identification 0, 0, 0, 0}。, 39。, 39。, 39。, 39。, 39。, 39。, 39。, 39。, 39。, 39。, 39。, 39。, 39。, 39。, //Vendor Information 39。,39。, 39。, 39。}//////////////////////////////////有關(guān)輸出端點的調(diào)用//////////////////////////////////////////////define Inquiry 0x12define Mode_Sense 0x1Adefine Read10 0x28define Read_Capacity 0x25 define Read_Format_Capacities 0x23 define Test_Unit_Ready 0x00 define Verify 0x2F define Write10 0x2A define Medium_Removal 0x1Edefine SCSI_MSPGCD_TPP 0x1Cdefine SCSI_MSPGCD_RETALL 0x3F//SCSIInquiry命令的返回數(shù)據(jù) code unsigned char B_InquiryData[] = { 0x00, //Direct Access Device 0x80, //RMB 0x00, //ISO/ECMA/ANSI 0x01, //Response Data Format 0x1f, //Additional Length 0x00, //Reserved 0x00, //Reserved 0x00, //Reserved 39。=(~(TXCMP))。 //清除TXCMP UEPINT = 0。 UEPSTAXamp。 while(!(UEPSTAXamp。 //填緩沖區(qū) UEPSTAX|=TXRDY。inLength。 //設置端點號 UEPSTAX|=DIR。void WriteEpBulk(unsigned char EpNum,unsigned char nLength,unsigned char *Data){ unsigned char data i。 //for UFI Command all have 12bit} struct_CBW。 } }/******************************************************************************//** 以下為利用Bulk_Only傳輸協(xié)議的函數(shù)部分 **//******************************************************************************/unsigned char data bulk_CSW[]={0x55,0x53,0x42,0x53, // bytes 4 dCSWSignature 0x00,0x00,0x00,0x00, //bytes 4 dCSWTag 0x00,0x00,0x00,0x00, //bytes 4 dDataResiduce 0x00}。 break。 break。 break。 break。amp。 if (((DT[0] amp。 unsigned char data i。 WriteEp(0,0,0)。 UEPCONX=0x82。 UEPCONX=0x86。 UEPCONX=0x80。 WriteEp(0,0,0)。 USBCONamp。 UEPNUM=0x02。 UEPNUM=0x01。 //取配置描述符}void Set_Configuration(unsigned char wValue) //設置配置{ if(wValue == 0) { UEPNUM=0x00。amp。Device_Descriptor[4])。(nLength==0xff)) //取端點描述符 { WriteEp(0,32,Configuration_Descriptor_All)。 if((DesType==0x02)amp。amp。void Get_Descriptor(unsigned char DesType,unsigned char nLength) //得到描述符{ if(DesType==0x01) //取設備描述符 WriteEp(0,18,Device_Descriptor)。s revision ID 0, //index of manuf. string 0, //index of prod. string 0, //index of ser. string 0x01 //number of configs. }。s vendor ID 0x00, 0x11, //National39。 //設置地址 USBCON|=FADDEN。 //在Status階段過后才能改變設備地址 USBADDR|=EpNum。=(~(TXCMP))。TXCMP)) 。 //寫入FIFO UEPSTAX|=TXRDY。 //選擇端口 UEPSTAX|=DIR。}void WriteEp(unsigned char EpNum,unsigned char nLength,unsigned char *Data) //寫端口數(shù)據(jù){ unsigned char data i=0。=~(RXOUTB0|RXOUTB1|RXSETUP)。 //指端口號 while(iUBYCTLX) //讀數(shù)據(jù)到緩沖//UBYCTX得到數(shù)據(jù)長度 { Data[i++]=UEPDATX。}unsigned char ReadEp(unsigned char EpNum,unsigned char *Data) //讀取端口數(shù)據(jù){ unsigned char data i=0。 USBIEN|=EEOFINT。 UEPRST= 0x00。 UEPCONX=0x82。 UEPCONX=0x86。 UEPCONX=0x80。 //等待PLL工作穩(wěn)定 USBCON|=USBE。i3000。=(~USBE)。 //使能PLL PLLCON|=PLLEN。 PLLCONamp。Rdiv)2。Rdiv)6。 PLLNDIV = 0x04。 } CKCON = 0x1。 i++。while (!TI)。 continue。TI = 0。 SBUF = 10。while (!TI)。) { i += 2。) { if(*(c + i + 1) == 39。 } } if (ct == 39。ct = *(c + i)。while (!TI)。) {i += 2。 } if (*(c + i + 1) == 39。ct = *(c + i)。while (!TI)。TI = 0。SBUF = hex[cx1]。cx1 = cb / 16。x39。%39。\039。 CKCON = 0x0。char cx2。char ct = *c。ct = *(c + j)。j++。) {if AT89C51SND1SBUF=ct。while (ct != 39。char ct = *c。 TR1 = 1。 SCON = 0x50。 //設置串口工作模式 TH1 = 0xa9。}。, 39。, 39。, 39。, 39。, 39。, 39。, 39。, 39。, 39。, 39。, 39。, 39。, 39。, 39。, 39。 //指示LED閃爍 } }**描 述: ATMEL AT89C51SND1 串口通訊include include define AT89C51SND1 1 //如果使用的是AT89C51SND1char hex[16] = {39。 //全部歌曲播放完了,播放器停止 NowPlaying = 0。SONG[11 * NowPlaying])。MP3InitFlag = 0。 //關(guān)閉指示LED }while(1) {if(NumofSong != 0) {if(MP3InitFlag) {PlayInit(amp。 //輸出歌曲總數(shù)信息 if(NumofSong == 0) { printu(There is no MP3 file in USB Disk!\n)。 //打開USB燈亮 NumofSong = GetMP3List()。 EA = 1。 //MP3初始化 KeyBoardInit()。 } } } printu(Entering MP3 Mode...\n)。 if(RI) { RI=0。 UEPINT=0。 if (UEPINT amp。 if (UEPINT amp。 //使能有關(guān)USB的配置 while(sign) { if (UEPINT amp。 //USB寄存器配置函數(shù) EpEnable()。 printu(Entering USB Mode...\n)。 //使能該單片機的X2模式 Flash_Reset()。}void main(){ unsigned char sign。 //Enable KeyBoard Interrupt EA = 1。 default : break。 case 8 : PlayPause()。 case 4 : Previous()。 //被按下時的情況 case 2 : Next()。 //取鍵盤中斷位 switch (i) { //依次處理四個鍵中的某個鍵 case 1 : Func()。 //Enable KeyBoard Interrupt while (i) { i。 //關(guān)中斷 IEN1 amp。void key_interrupt() interrupt 11
點擊復制文檔內(nèi)容
公司管理相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1