From 8a115123eee5b9e294ff86ec4e41e6112dc47774 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sat, 14 Mar 2015 11:36:26 +0100 Subject: SPI USI implementation !NOT TESTED! SPI on USI implemented. But not tested yet. --- spi_usi.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 spi_usi.h (limited to 'spi_usi.h') diff --git a/spi_usi.h b/spi_usi.h new file mode 100644 index 0000000..2e603ac --- /dev/null +++ b/spi_usi.h @@ -0,0 +1,25 @@ +#include +#include +#include +#include + +#include "mcu/mcu.h" + +#ifndef _IOE_SPI_USI_H_ +#define _IOE_SPI_USI_H_ + +inline void ioe_spi_usi_init(void); +#ifdef IOE_SPI_USI_MASTER +inline int8_t ioe_spi_usi_transfer(int8_t data); +#else +inline void ioe_spi_usi_expose(int8_t data); +inline void ioe_spi_usi_expect(void); +inline int ioe_spi_usi_ready(void); +inline void ioe_spi_usi_join(void); + +// Following function must be user defined +inline void ioe_spi_usi_retrieve(int8_t data); +#endif /* IOE_SPI_USI_MASTER */ + + +#endif /* _IOE_SPI_USI_H_ */ -- cgit v1.2.3