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.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.h')
-rw-r--r-- | adc/adc.h | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/adc/adc.h b/adc/adc.h deleted file mode 100644 index 01a2293..0000000 --- a/adc/adc.h +++ /dev/null @@ -1,41 +0,0 @@ -#ifndef ADC_H -#define ADC_H - -#include <stdint.h> - -struct ADC_t { - volatile uint32_t SR; - volatile uint32_t CR1; - volatile uint32_t CR2; - volatile uint32_t SMPR1; - volatile uint32_t SMPR2; - volatile uint32_t JOFR1; - volatile uint32_t JOFR2; - volatile uint32_t JOFR3; - volatile uint32_t JOFR4; - volatile uint32_t HTR; - volatile uint32_t LTR; - volatile uint32_t SQR1; - volatile uint32_t SQR2; - volatile uint32_t SQR3; - volatile uint32_t JSQR; - volatile uint32_t JDR1; - volatile uint32_t JDR2; - volatile uint32_t JDR3; - volatile uint32_t JDR4; - volatile uint32_t DR; -}; - -#if defined(STM32F1) -static ADC_t& ADC1 = *(ADC_t*)0x40012400; -static ADC_t& ADC2 = *(ADC_t*)0x40012800; -static ADC_t& ADC3 = *(ADC_t*)0x40013c00; -#elif defined(STM32F4) - -#elif defined(STM32F7) -static ADC_t& ADC1 = *(ADC_t*)0x40012000; -static ADC_t& ADC2 = *(ADC_t*)0x40012100; -static ADC_t& ADC3 = *(ADC_t*)0x40012200; -#endif - -#endif |