mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-02 22:51:14 +00:00
feat(temperature_sensor): Add new support for temperature sensor ETM on ESP32C6/H2
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "soc/soc.h"
|
||||
#include "soc/soc_caps.h"
|
||||
#include "soc/interrupts.h"
|
||||
#include "soc/soc_etm_source.h"
|
||||
#include "hal/temperature_sensor_types.h"
|
||||
#include "hal/assert.h"
|
||||
#include "hal/misc.h"
|
||||
@@ -40,6 +41,17 @@ extern "C" {
|
||||
|
||||
#define TEMPERATURE_SENSOR_LL_INTR_MASK TSENS_COCPU_TSENS_WAKE_INT_ST
|
||||
|
||||
#define TEMPERATURE_SENSOR_LL_ETM_EVENT_TABLE(event) \
|
||||
(uint32_t [TEMPERATURE_SENSOR_EVENT_MAX]){ \
|
||||
[TEMPERATURE_SENSOR_EVENT_OVER_LIMIT] = TMPSNSR_EVT_OVER_LIMIT, \
|
||||
}[event]
|
||||
|
||||
#define TEMPERATURE_SENSOR_LL_ETM_TASK_TABLE(task) \
|
||||
(uint32_t [TEMPERATURE_SENSOR_TASK_MAX]){ \
|
||||
[TEMPERATURE_SENSOR_TASK_START] = TMPSNSR_TASK_START_SAMPLE, \
|
||||
[TEMPERATURE_SENSOR_TASK_STOP] = TMPSNSR_TASK_STOP_SAMPLE, \
|
||||
}[task]
|
||||
|
||||
typedef enum {
|
||||
TEMPERATURE_SENSOR_LL_WAKE_ABSOLUTE = 0,
|
||||
TEMPERATURE_SENSOR_LL_WAKE_DELTA = 1,
|
||||
|
Reference in New Issue
Block a user