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 | e1f9cb9d9294fa75f1711c8c4de2fdd60e8b1f79 (patch) | |
tree | 19dc33bdd27d67b7f93565085007efe9490e6170 /libmaple | |
parent | 78c69485dc01a00e676174c51903d90db8d0e0a3 (diff) | |
download | librambutan-e1f9cb9d9294fa75f1711c8c4de2fdd60e8b1f79.tar.gz librambutan-e1f9cb9d9294fa75f1711c8c4de2fdd60e8b1f79.zip |
spi.h: Naming anonymous enums.
Named spi_mode, spi_baud_rate, spi_cfg_flag, spi_interrupt.
Diffstat (limited to 'libmaple')
-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 /**< |