aboutsummaryrefslogtreecommitdiffstats
path: root/libmaple
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@leaflabs.com>2012-04-10 16:13:00 -0400
committerMarti Bolivar <mbolivar@leaflabs.com>2012-04-11 16:56:57 -0400
commitf49487116d9ddf7b2da64674d91b14ed34db8289 (patch)
tree4e0a162c19a2190f063cdbeea8eb33048d95ddd7 /libmaple
parent301fe2c02ef0ca779d11dcedc2a081436360fbe3 (diff)
downloadlibrambutan-f49487116d9ddf7b2da64674d91b14ed34db8289.tar.gz
librambutan-f49487116d9ddf7b2da64674d91b14ed34db8289.zip
libmaple/stm32f1/spi.c: cosmetics.
Fix whitespace, move some definitions around. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
Diffstat (limited to 'libmaple')
-rw-r--r--libmaple/stm32f1/spi.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/libmaple/stm32f1/spi.c b/libmaple/stm32f1/spi.c
index b860918..45ff354 100644
--- a/libmaple/stm32f1/spi.c
+++ b/libmaple/stm32f1/spi.c
@@ -39,27 +39,28 @@
*/
static spi_dev spi1 = {
- .regs = SPI1_BASE,
- .clk_id = RCC_SPI1,
- .irq_num = NVIC_SPI1,
+ .regs = SPI1_BASE,
+ .clk_id = RCC_SPI1,
+ .irq_num = NVIC_SPI1,
};
-/** SPI device 1 */
-spi_dev *SPI1 = &spi1;
-
static spi_dev spi2 = {
- .regs = SPI2_BASE,
- .clk_id = RCC_SPI2,
- .irq_num = NVIC_SPI2,
+ .regs = SPI2_BASE,
+ .clk_id = RCC_SPI2,
+ .irq_num = NVIC_SPI2,
};
-/** SPI device 2 */
-spi_dev *SPI2 = &spi2;
-
#if defined(STM32_HIGH_DENSITY) || defined(STM32_XL_DENSITY)
static spi_dev spi3 = {
- .regs = SPI3_BASE,
- .clk_id = RCC_SPI3,
- .irq_num = NVIC_SPI3,
+ .regs = SPI3_BASE,
+ .clk_id = RCC_SPI3,
+ .irq_num = NVIC_SPI3,
};
+#endif
+
+/** SPI device 1 */
+spi_dev *SPI1 = &spi1;
+/** SPI device 2 */
+spi_dev *SPI2 = &spi2;
+#if defined(STM32_HIGH_DENSITY) || defined(STM32_XL_DENSITY)
/** SPI device 3 */
spi_dev *SPI3 = &spi3;
#endif