HAL.H
资源名称:51-SD.rar [点击查看]
上传用户:jcsy2001
上传日期:2013-11-29
资源大小:201k
文件大小:1k
源码类别:
嵌入式/单片机编程
开发平台:
C/C++
- ///////////////////////////hal.h//////////////////////////
- #include "AT89X52.H"
- #include <intrins.h>
- sbit MCU_LED1=P1^0;
- sbit MCU_LED2=P1^1;
- sbit MCU_LED3=P1^2;
- sbit MCU_LED4=P1^3;
- sbit SWM1=P1^4;
- sbit SWM2=P1^5;
- sbit SWM3=P1^6;
- sbit SWM4=P1^7;
- sbit SD_CS=P3^2; //SD/MMC接口定义 qinyg@163.net
- sbit SD_DI=P3^3;
- sbit SD_CLK=P3^4;
- sbit SD_DO=P3^5;
- unsigned char SdInit(void);
- unsigned char SdReadBlock(unsigned char *Block, unsigned long address);
- unsigned char SdWriteBlock(unsigned char *Block, unsigned long address);
- void DelayMs(unsigned char nFactor);
- unsigned long SwapINT32(unsigned long dData);
- void ComSendByte(unsigned char c);
- unsigned int LSwapINT16(unsigned short dData1,unsigned short dData2);
- unsigned long LSwapINT32(unsigned long dData1,unsigned long dData2,unsigned long dData3,unsigned long dData4);
- unsigned long SwapINT32(unsigned long dData);