lp_timer: add hal-layer codes for esp32c6

This commit is contained in:
Li Shuai
2023-01-12 18:04:51 +08:00
committed by wuzhenghui
parent 1eb08db0df
commit c0ddaa5920
10 changed files with 224 additions and 4 deletions

View File

@@ -0,0 +1,32 @@
/*
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
#include "soc/soc_caps.h"
/**
* @brief The structure of the counter value in lower power timer
*/
typedef struct {
union {
struct {
uint32_t lo: SOC_LP_TIMER_BIT_WIDTH_LO; /*!< Low part of counter value */
uint32_t hi: SOC_LP_TIMER_BIT_WIDTH_HI; /*!< High part of counter value */
uint32_t reserved: 16;
};
uint64_t val; /*!< counter value */
};
} lp_timer_counter_value_t;
#ifdef __cplusplus
}
#endif