00001
00016 #ifndef _SPI_LIB_H_
00017 #define _SPI_LIB_H_
00018
00019
00020 #include "lib_mcu\spi\spi_drv.h"
00021
00022
00023
00024
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
00038
00039
00040
00041
00042
00058 bit spi_init (spi_cf_t config);
00059
00068 char spi_putchar (char uc_wr_byte);
00069 bit spi_test_hit (void);
00076 char spi_getchar (void);
00083
00084
00085
00086
00087 #endif