www.pudn.com > SDdriver.rar > sdhal.h
/****************************************************************************** ** Descriptions: sd 卡驱动软件包: 硬件抽象层 ---- SPI操作函数头文件 ******************************************************************************/ #ifndef __sdhal_h #define __sdhal_h void SPI_INIT(void); /* 初始化访问SD卡的硬件初始化 initialize the hardware that access sd card */ void SD_HardWareInit(void); /* 设置SPI的时钟小于400kHZ set the clock of SPI less than 400kHZ */ void SPI_Clk400k(void); /* 设置SPI的clock到最大值 set the clock of SPI to maximum */ void SPI_ClkToMax(void); /* 通过SPI接口发送一个字节 send a byte by SPI interface */ void SPI_SendByte(uint8 byte); /* 从SPI接口接收一个字节 receive a byte from SPI interface */ uint8 SPI_RecByte(void); /* 片选SPI从机 select the SPI slave */ void SPI_CS_Assert(void); /* 不片选SPI从机 not select the SPI slave */ void SPI_CS_Deassert(void); #endif