mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-27 02:16:51 +00:00
feat(etm): add core driver support for esp32-p4
esp_etm core driver support: - channel allocator - gpio etm sub driver - gptimer etm sub driver
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -12,20 +12,34 @@
|
||||
#include "hal/assert.h"
|
||||
#include "hal/misc.h"
|
||||
#include "soc/soc_etm_struct.h"
|
||||
#include "soc/pcr_struct.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enable the clock for ETM module
|
||||
* @brief Enable the clock for ETM register
|
||||
*
|
||||
* @param hw ETM register base address
|
||||
* @param group_id Group ID
|
||||
* @param enable true to enable, false to disable
|
||||
*/
|
||||
static inline void etm_ll_enable_clock(soc_etm_dev_t *hw, bool enable)
|
||||
static inline void etm_ll_enable_bus_clock(int group_id, bool enable)
|
||||
{
|
||||
hw->clk_en.clk_en = enable;
|
||||
(void)group_id;
|
||||
PCR.etm_conf.etm_clk_en = enable;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Reset the ETM register
|
||||
*
|
||||
* @param group_id Group ID
|
||||
*/
|
||||
static inline void etm_ll_reset_register(int group_id)
|
||||
{
|
||||
(void)group_id;
|
||||
PCR.etm_conf.etm_rst_en = 1;
|
||||
PCR.etm_conf.etm_rst_en = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user