feat(adc): support ADC continuous mode on ESP32P4

This commit is contained in:
gaoxu
2024-06-03 16:50:39 +08:00
parent db6e53fd44
commit 795f3fe377
28 changed files with 553 additions and 218 deletions
+2 -2
View File
@@ -940,8 +940,8 @@ static inline void adc_ll_enable_bus_clock(bool enable)
*/
static inline void adc_ll_reset_register(void)
{
DPORT_SET_PERI_REG_MASK(DPORT_PERIP_RST_EN_REG, DPORT_APB_SARADC_RST);
DPORT_CLEAR_PERI_REG_MASK(DPORT_PERIP_RST_EN_REG, DPORT_APB_SARADC_RST);
SET_PERI_REG_MASK(DPORT_PERIP_RST_EN_REG, DPORT_APB_SARADC_RST);
CLEAR_PERI_REG_MASK(DPORT_PERIP_RST_EN_REG, DPORT_APB_SARADC_RST);
}
// SYSTEM.perip_rst_en0 is a shared register, so this function must be used in an atomic way
#define adc_ll_reset_register(...) (void)__DECLARE_RCC_ATOMIC_ENV; adc_ll_reset_register(__VA_ARGS__)