文件名称:PIC单片机SPI程序请大家下载
文件大小:1KB
文件格式:C
更新时间:2013-02-09 05:10:28
SPI
SPI程序请大家需要的话下载void SPI_Init(void); // Configure MAXQ2000 and MAX3420E IO pins for SPI BYTE Reset_MAX(void); // Reset the MAX3420E void wreg(BYTE r,BYTE v); // Write a MAX3420E register byte void wregAS(BYTE r,BYTE v); // Same as 'wreg' but also set the ACKSTAT bit in the SPI command byte BYTE rreg(BYTE r); // Read a MAX3420E register byte BYTE rregAS(BYTE r); // Same as 'rreg' but also set the ACKSTAT bit void readbytes(BYTE reg, BYTE N, BYTE *p); // Read N MAX3420E FIFO bytes into the array p void writebytes(BYTE reg, BYTE N, BYTE *p); // Write N MAX3420E FIFO bytes into the array p BYTE MAX_Int_Pending(void); // Poll the MAX3420E INT pin (set for active low level) void std_request(void);