mirror of
				https://github.com/espressif/esp-idf.git
				synced 2025-11-03 22:08:28 +00:00 
			
		
		
		
	Merge branch 'feature/pcnt_replace_periph_func_with_new_ll' into 'master'
feat(pcnt): replace periph_module func with new ll func Closes IDF-8225 See merge request espressif/esp-idf!25935
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