diff options
author | Karl Palsson <karlp@etactica.com> | 2021-09-15 19:45:46 +0200 |
---|---|---|
committer | Vegard Storheil Eriksen <zyp@jvnv.net> | 2021-09-16 20:29:55 +0200 |
commit | c7666a7cd83d590a067d8cbbe4a7e4eb93d155d6 (patch) | |
tree | 1451fe9954a68aaf07ab3e340585cd3f177c9559 /adc | |
parent | b6d44408b702ca6b6ac91835aa4a262f9c3acf02 (diff) |
adc: stm32wb: add old style
ADC has not been converted to new style, so leveraging legacy f3 code
for now.
Signed-off-by: Karl Palsson <karlp@etactica.com>
Diffstat (limited to 'adc')
-rw-r--r-- | adc/adc_f3.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/adc/adc_f3.h b/adc/adc_f3.h index bc75711..1f9f98e 100644 --- a/adc/adc_f3.h +++ b/adc/adc_f3.h @@ -8,7 +8,7 @@ struct ADC_t { volatile uint32_t IER; volatile uint32_t CR; volatile uint32_t CFGR; - uint32_t _reserved; + volatile uint32_t CFGR2; volatile uint32_t SMPR1; volatile uint32_t SMPR2; uint32_t _reserved1; @@ -41,11 +41,20 @@ struct ADC_t { 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; +#elif defined(STM32WB) +static ADC_t& ADC1 = *(ADC_t*)0x50040000; +static ADC_COMMON_t& ADC_COMMON = *(ADC_COMMON_t*)0x50040300; #endif #endif |