diff options
author | Vegard Storheil Eriksen <zyp@jvnv.net> | 2012-08-07 16:54:36 +0200 |
---|---|---|
committer | Vegard Storheil Eriksen <zyp@jvnv.net> | 2012-08-07 16:54:36 +0200 |
commit | 09e89c867c8dc14adee298176a0a4c72d8f32245 (patch) | |
tree | 8d125de0b4a1c9d608ddae6ff927fc3624663bd0 /hal/spi.h | |
parent | 2fc77d271db27ecb140191c2dfafdba835962ffb (diff) |
Split out reusable parts into the laks project.
Diffstat (limited to 'hal/spi.h')
-rw-r--r-- | hal/spi.h | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/hal/spi.h b/hal/spi.h deleted file mode 100644 index 9f9cf63..0000000 --- a/hal/spi.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef SPI_H -#define SPI_H - -struct SPI_reg_t { - volatile uint32_t CR1; - volatile uint32_t CR2; - volatile uint32_t SR; - volatile uint32_t DR; - volatile uint32_t CRCPR; - volatile uint32_t RXCRCR; - volatile uint32_t TXCRCR; - volatile uint32_t I2SCFGR; - volatile uint32_t I2SPR; -}; - -class SPI_t { - public: - SPI_reg_t& reg; - - SPI_t(uint32_t reg_addr) : reg(*(SPI_reg_t*)reg_addr) {} -}; - -#if defined(STM32F1) - -#elif defined(STM32F4) -static SPI_t SPI1(0x40013000); -static SPI_t SPI2(0x40003800); -static SPI_t SPI3(0x40003c00); -#endif - -#endif |