diff options
-rw-r--r-- | libmaple/spi.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libmaple/spi.h b/libmaple/spi.h index 37ca6ef..1aabfcc 100644 --- a/libmaple/spi.h +++ b/libmaple/spi.h @@ -237,7 +237,7 @@ void spi_gpio_cfg(uint8 as_master, * idle state of the clock line, and clock phase (CPHA), which * determines which clock edge triggers data capture. */ -typedef enum { +typedef enum spi_mode { SPI_MODE_0, /**< Clock line idles low (0), data capture on first clock transition. */ SPI_MODE_1, /**< Clock line idles low (0), data capture on second @@ -252,7 +252,7 @@ typedef enum { * @brief SPI baud rate configuration, as a divisor of f_PCLK, the * PCLK clock frequency. */ -typedef enum { +typedef enum spi_baud_rate { SPI_BAUD_PCLK_DIV_2 = SPI_CR1_BR_PCLK_DIV_2, /**< f_PCLK/2 */ SPI_BAUD_PCLK_DIV_4 = SPI_CR1_BR_PCLK_DIV_4, /**< f_PCLK/4 */ SPI_BAUD_PCLK_DIV_8 = SPI_CR1_BR_PCLK_DIV_8, /**< f_PCLK/8 */ @@ -268,7 +268,7 @@ typedef enum { * @see spi_master_enable() * @see spi_slave_enable() */ -typedef enum { +typedef enum spi_cfg_flag { SPI_BIDIMODE = SPI_CR1_BIDIMODE, /**< Bidirectional mode enable */ SPI_BIDIOE = SPI_CR1_BIDIOE, /**< Output enable in bidirectional mode */ @@ -328,7 +328,7 @@ static inline void spi_peripheral_disable_all(void) { } /** Available SPI interrupts */ -typedef enum { +typedef enum spi_interrupt { SPI_TXE_INTERRUPT = SPI_CR2_TXEIE, /**< TX buffer empty interrupt */ SPI_RXNE_INTERRUPT = SPI_CR2_RXNEIE, /**< RX buffer not empty interrupt */ SPI_ERR_INTERRUPT = SPI_CR2_ERRIE /**< |