00001 00016 #ifndef _SPI_LIB_H_ 00017 #define _SPI_LIB_H_ 00018 00019 /*_____ I N C L U D E - F I L E S ____________________________________________*/ 00020 #include "lib_mcu/spi/spi_drv.h" 00021 00022 /*_____ C O N F I G U R A T I O N _________________________________________*/ 00023 00024 /*_____ D E F I N I T I O N S ______________________________________________*/ 00025 00026 00027 //#ifndef SPI_CONFIG 00028 //#error You must enter SPI_CONFIG in config.h 00029 //#define SPI_CONFIG 00030 //#endif 00031 00035 typedef enum {SPI_MASTER, SPI_SLAVE} spi_cf_t; 00036 00037 /*_____ D E C L A R A T I O N ______________________________________________*/ 00038 00039 /*_____ M A C R O S ________________________________________________________*/ 00040 00041 /*_____ P R O T O T Y P E S ____________________________________________________________*/ 00042 00059 bit spi_init (spi_cf_t config); 00060 00069 char spi_putchar (char uc_wr_byte); 00070 00077 bit spi_test_hit (void); 00078 00085 char spi_getchar (void); 00086 00087 //*************************************************************************** 00088 // @fn SPI_Transmit_Master 00098 //*************************************************************************** 00099 void SPI_Transmit_Master(char cData); 00100 00101 #endif /* _SPI_LIB_H_ */