00001
00009 #ifndef __spi_h
00010 #define __spi_h
00011
00012 #include "pic_utils.h"
00013 #include "config.h"
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00037 void spi_write(uns8 data);
00038
00045 void spi_write_lsb(uns8 data);
00046
00052 void spi_setup();
00053
00061 void spi_write_sure(uns8 data);
00062
00067 void spi_pulse_0();
00072 void spi_pulse_1();
00073
00074
00075 #ifndef spi_clk_port
00076 #error "spi_clk_port not defined in config.h"
00077 #endif
00078 #ifndef spi_data_port
00079 #error "spi_data_port not defined in config.h"
00080 #endif
00081 #ifndef spi_clk_pin
00082 #error "spi_clk_pin not defined in config.h"
00083 #endif
00084 #ifndef spi_data_pin
00085 #error "spi_data_pin not defined in config.h"
00086 #endif
00087
00088
00089
00090 #endif