mirror of
				https://github.com/espressif/esp-idf.git
				synced 2025-11-04 06:11:06 +00:00 
			
		
		
		
	refactor(gdma): add reset and clock control in LL driver
This commit is contained in:
		@@ -12,6 +12,7 @@
 | 
			
		||||
#include "soc/gdma_struct.h"
 | 
			
		||||
#include "soc/gdma_reg.h"
 | 
			
		||||
#include "soc/soc_etm_source.h"
 | 
			
		||||
#include "soc/pcr_struct.h"
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
extern "C" {
 | 
			
		||||
@@ -91,6 +92,26 @@ extern "C" {
 | 
			
		||||
                                         }}}[group][chan][task]
 | 
			
		||||
 | 
			
		||||
///////////////////////////////////// Common /////////////////////////////////////////
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @brief Enable the bus clock for the DMA module
 | 
			
		||||
 */
 | 
			
		||||
static inline void gdma_ll_enable_bus_clock(int group_id, bool enable)
 | 
			
		||||
{
 | 
			
		||||
    (void)group_id;
 | 
			
		||||
    PCR.gdma_conf.gdma_clk_en = enable;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @brief Reset the DMA module
 | 
			
		||||
 */
 | 
			
		||||
static inline void gdma_ll_reset_register(int group_id)
 | 
			
		||||
{
 | 
			
		||||
    (void)group_id;
 | 
			
		||||
    PCR.gdma_conf.gdma_rst_en = 1;
 | 
			
		||||
    PCR.gdma_conf.gdma_rst_en = 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @brief Force enable register clock
 | 
			
		||||
 */
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user