mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-10 04:43:33 +00:00
feat(brownout): Add brownout detector support on esp32p4
This commit is contained in:
@@ -20,6 +20,8 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define BROWNOUT_DETECTOR_LL_INTERRUPT_MASK (BIT(31))
|
||||
|
||||
/**
|
||||
* @brief power down the flash when a brown out happens.
|
||||
*
|
||||
@@ -123,6 +125,16 @@ static inline void brownout_ll_clear_count(void)
|
||||
LP_ANA_PERI.bod_mode0_cntl.bod_mode0_cnt_clr = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get interrupt status register address
|
||||
*
|
||||
* @return Register address
|
||||
*/
|
||||
static inline volatile void *brownout_ll_intr_get_status_reg(void)
|
||||
{
|
||||
return &LP_ANA_PERI.int_st;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user