diff options
| author | Marti Bolivar <mbolivar@leaflabs.com> | 2011-05-19 16:06:45 -0400 |
|---|---|---|
| committer | Marti Bolivar <mbolivar@leaflabs.com> | 2011-05-19 18:45:45 -0400 |
| commit | 1f8aa6d15de888e2b82337aaccafa9eaec476973 (patch) | |
| tree | 60047cf14d1f521a7de3b4c9d6d54ae3c21db6fb | |
| parent | 7a2d8eaf2b470e32f043fc6900d7db820aad85a8 (diff) | |
spi.h: Naming anonymous enums.
Named spi_mode, spi_baud_rate, spi_cfg_flag, spi_interrupt.
| -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 /**< |
