systimer: assign counter and alarm in esp_hw_support

This commit is contained in:
morris
2023-01-10 15:13:19 +08:00
parent c29dc28176
commit 6c1d98d556
18 changed files with 81 additions and 100 deletions

View File

@@ -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;