mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-17 07:09:37 +00:00
systimer: assign counter and alarm in esp_hw_support
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
|
||||
*/
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "esp_heap_caps.h"
|
||||
#include "esp_timer.h"
|
||||
#include "soc/soc_etm_source.h"
|
||||
#include "hal/systimer_ll.h"
|
||||
#include "esp_private/systimer.h"
|
||||
#include "esp_private/etm_interface.h"
|
||||
|
||||
#define ETM_MEM_ALLOC_CAPS MALLOC_CAP_DEFAULT
|
||||
@@ -31,7 +31,7 @@ esp_err_t esp_timer_new_etm_alarm_event(esp_etm_event_handle_t *out_event)
|
||||
ESP_GOTO_ON_FALSE(event, ESP_ERR_NO_MEM, err, TAG, "no memory for ETM event");
|
||||
|
||||
// fill the ETM event object
|
||||
uint32_t event_id = SYSTIMER_EVT_CNT_CMP0 + SYSTIMER_LL_ALARM_CLOCK;
|
||||
uint32_t event_id = SYSTIMER_EVT_CNT_CMP0 + SYSTIMER_ALARM_ESPTIMER;
|
||||
event->event_id = event_id;
|
||||
event->trig_periph = ETM_TRIG_PERIPH_SYSTIMER;
|
||||
event->del = esp_timer_etm_event_del;
|
||||
|
Reference in New Issue
Block a user