#ifndef AVR_SPI_SLAVE_ABSTRACTION_H_ #define AVR_SPI_SLAVE_ABSTRACTION_H_ #include /* Queue a buffer for transmission to the master. */ int8_t spi_slave_xmit(const void *buf, uint16_t nr_bytes); /* Queue a buffer for receiving data from the master. */ int8_t spi_slave_fetch(void *buf, uint16_t size); /* Initialize the SPI slave. */ void spi_slave_init(void); /*** Callback functions. Define these in the highlevel code. ***/ /* The last transfer (TX or RX) is complete. * Note that size may be larger than the buffer for RX! This notifies * a data truncation. */ extern void spi_slave_xfer_complete(uint16_t size); #endif /* AVR_SPI_SLAVE_ABSTRACTION_H_ */