mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-29 13:45:45 +00:00
feat(pcnt): replace periph_module func with new ll func
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
#include <stdbool.h>
|
||||
#include "soc/pcnt_struct.h"
|
||||
#include "hal/pcnt_types.h"
|
||||
#include "soc/pcr_struct.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -435,6 +436,27 @@ static inline volatile void *pcnt_ll_get_intr_status_reg(pcnt_dev_t *hw)
|
||||
return &hw->int_st.val;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Enable or disable the bus clock for the PCNT module
|
||||
*
|
||||
* @param set_bit True to set bit, false to clear bit
|
||||
*/
|
||||
static inline void pcnt_ll_enable_bus_clock(int group_id, bool enable)
|
||||
{
|
||||
(void)group_id;
|
||||
PCR.pcnt_conf.pcnt_clk_en = enable;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Reset the PCNT module
|
||||
*/
|
||||
static inline void pcnt_ll_reset_register(int group_id)
|
||||
{
|
||||
(void)group_id;
|
||||
PCR.pcnt_conf.pcnt_rst_en = 1;
|
||||
PCR.pcnt_conf.pcnt_rst_en = 0;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user