stm32/adc: Allow mboot to use basic ADC functions.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George
2021-04-28 16:12:07 +10:00
parent ef2896bdea
commit fd01b6c779
4 changed files with 17 additions and 2 deletions

View File

@@ -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)