/* * SPI communication stuf */ void InitSPI(void); extern void adc_read(unsigned char channel); int spi_read(long int addres); extern void spi_write(unsigned char addres, unsigned char data); extern void spi_RDSR(unsigned char addres, unsigned char data); extern void spi_write_status(unsigned char addres, unsigned char data); extern void spi_WREN(void); extern void spi_WRDI(void);