1 /*
2  * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #include "esp_private/systimer.h"
8 
9 /**
10  * @brief systimer's clock source can be switch between XTAL (40MHz) and APB (80MHz).
11  *        But the resolution of the systimer is configured to fix to 80MHz.
12  */
13 
systimer_ticks_to_us(uint64_t ticks)14 uint64_t systimer_ticks_to_us(uint64_t ticks)
15 {
16     return ticks / 80;
17 }
18 
systimer_us_to_ticks(uint64_t us)19 uint64_t systimer_us_to_ticks(uint64_t us)
20 {
21     return us * 80;
22 }
23