#ifndef AVR_SPI_MASTER_ABSTRACTION_H_ #define AVR_SPI_MASTER_ABSTRACTION_H_ #include /* Transmit nr_bytes to the slave. */ int8_t spi_master_xmit(const void *buf, uint16_t nr_bytes); /* Fetch bytes from the slave. Max=size */ int8_t spi_master_fetch(void *buf, uint16_t size); /* Initialize the SPI master. */ void spi_master_init(void); /*** Callback functions. Define these in the highlevel code. ***/ /* The last transfer (xmit or fetch) is complete. * Note that size may be larger than the buffer for RX! This notifies * a data truncation. */ extern void spi_master_xfer_complete(uint16_t size); #endif /* AVR_SPI_MASTER_ABSTRACTION_H_ */