diff options
author | Damien George <damien@micropython.org> | 2021-04-28 16:12:07 +1000 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2021-04-30 00:42:59 +1000 |
commit | fd01b6c779d39eae1aaa0f038b4ec15d86db44fe (patch) | |
tree | 65517a6dc11c47a6f3a7ceebc39e0b3870b77cc2 /ports/stm32/adc.h | |
parent | ef2896bdeacdfa3f6dc9faaa3f9c0f3d9bef291b (diff) | |
download | micropython-fd01b6c779d39eae1aaa0f038b4ec15d86db44fe.tar.gz micropython-fd01b6c779d39eae1aaa0f038b4ec15d86db44fe.zip |
stm32/adc: Allow mboot to use basic ADC functions.
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'ports/stm32/adc.h')
-rw-r--r-- | ports/stm32/adc.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ports/stm32/adc.h b/ports/stm32/adc.h index 6f2e61e099..64864b1967 100644 --- a/ports/stm32/adc.h +++ b/ports/stm32/adc.h @@ -26,8 +26,13 @@ #ifndef MICROPY_INCLUDED_STM32_ADC_H #define MICROPY_INCLUDED_STM32_ADC_H +#if !BUILDING_MBOOT extern const mp_obj_type_t pyb_adc_type; extern const mp_obj_type_t pyb_adc_all_type; +#endif + +void adc_config(ADC_TypeDef *adc, uint32_t bits); +uint32_t adc_config_and_read_u16(ADC_TypeDef *adc, uint32_t channel, uint32_t sample_time); #if defined(ADC_CHANNEL_VBAT) |