diff options
author | Karl Palsson <karlp@tweak.net.au> | 2022-05-04 00:41:45 +0200 |
---|---|---|
committer | Vegard Storheil Eriksen <zyp@jvnv.net> | 2022-07-27 23:03:11 +0200 |
commit | b5cd432df8f336c90d530b5d55fda7f2c25472c2 (patch) | |
tree | 8f1cbda9f677e6e97676649de7c6e9e00e201ab7 /adc/adc_f3.h | |
parent | c40eb0b2d6966760899d1d0c2743770ea130ff09 (diff) |
adc: convert to new style
Converted the old STM32 headers to new style and copied offsets to
platform data.
Signed-off-by: Karl Palsson <karlp@tweak.net.au>
Diffstat (limited to 'adc/adc_f3.h')
-rw-r--r-- | adc/adc_f3.h | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/adc/adc_f3.h b/adc/adc_f3.h deleted file mode 100644 index a225ebf..0000000 --- a/adc/adc_f3.h +++ /dev/null @@ -1,62 +0,0 @@ -#ifndef ADC_F3_H -#define ADC_F3_H - -#include <stdint.h> - -struct ADC_t { - volatile uint32_t ISR; - volatile uint32_t IER; - volatile uint32_t CR; - volatile uint32_t CFGR; - volatile uint32_t CFGR2; - volatile uint32_t SMPR1; - volatile uint32_t SMPR2; - uint32_t _reserved1; - volatile uint32_t TR1; - volatile uint32_t TR2; - volatile uint32_t TR3; - uint32_t _reserved2; - volatile uint32_t SQR1; - volatile uint32_t SQR2; - volatile uint32_t SQR3; - volatile uint32_t SQR4; - volatile uint32_t DR; - uint32_t _reserved3[2]; - volatile uint32_t JSQR; - uint32_t _reserved4[4]; - volatile uint32_t OFR1; - volatile uint32_t OFR2; - volatile uint32_t OFR3; - volatile uint32_t OFR4; - uint32_t _reserved5[4]; - volatile uint32_t JDR1; - volatile uint32_t JDR2; - volatile uint32_t JDR3; - volatile uint32_t JDR4; - uint32_t _reserved6[4]; - volatile uint32_t AWD2CR; - volatile uint32_t AWD3CR; - uint32_t _reserved7[2]; - volatile uint32_t DIFSEL; - volatile uint32_t CALFACT; -}; - -struct ADC_COMMON_t { - volatile uint32_t CSR; - uint32_t _reserved1; - volatile uint32_t CCR; -}; - -#if defined(STM32F3) -static ADC_t& ADC1 = *(ADC_t*)0x50000000; -static ADC_t& ADC2 = *(ADC_t*)0x50000100; -static ADC_t& ADC3 = *(ADC_t*)0x50000400; -static ADC_t& ADC4 = *(ADC_t*)0x50000500; -static ADC_COMMON_t& ADC_COMMON1 = *(ADC_COMMON_t*)0x50000300; -static ADC_COMMON_t& ADC_COMMON3 = *(ADC_COMMON_t*)0x50000700; -#elif defined(STM32WB) -static ADC_t& ADC1 = *(ADC_t*)0x50040000; -static ADC_COMMON_t& ADC_COMMON1 = *(ADC_COMMON_t*)0x50040300; -#endif - -#endif |