From 9439c6f1caffd938673018f3af7460b33a12528e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sun, 20 Mar 2016 16:39:30 +0100 Subject: Another work progress --- include/spi.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'include/spi.h') diff --git a/include/spi.h b/include/spi.h index 8d51eb9..bdfce25 100644 --- a/include/spi.h +++ b/include/spi.h @@ -9,6 +9,11 @@ #define _IOE_SPI_H_ #ifdef CONFIG_SPI +/*! \brief Modes definition for spi_init + * + * This enum is used by spi_init to define if SPI should be initialized as master + * or slave. + */ enum spiMode { SPI_MODE_MASTER, SPI_MODE_SLAVE @@ -17,6 +22,10 @@ enum spiMode { volatile extern int8_t _spi_busy; volatile extern Mutex spi_mutex; +/*! \brief Initializes SPI interface. + * + * \param mode Specify mode of SPI interface + */ static inline void spi_init(enum spiMode mode) { _spi_busy = 0; if (mode == SPI_MODE_MASTER) { @@ -59,7 +68,6 @@ static inline void spi_expose(uint8_t data) { SPDR = data; } -// Null terminated array extern void (*spi_receive)(uint8_t data); #endif /* CONFIG_SPI */ -- cgit v1.2.3