diff options
Diffstat (limited to 'include/spi.h')
-rw-r--r-- | include/spi.h | 10 |
1 files changed, 9 insertions, 1 deletions
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 */ |