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 is fixed to XTAL (40MHz), and has a fixed fractional divider (2.5).
11  *        So the resolution of the systimer is 40MHz/2.5 = 16MHz.
12  */
13 
systimer_ticks_to_us(uint64_t ticks)14 uint64_t systimer_ticks_to_us(uint64_t ticks)
15 {
16     return ticks / 16;
17 }
18 
systimer_us_to_ticks(uint64_t us)19 uint64_t systimer_us_to_ticks(uint64_t us)
20 {
21     return us * 16;
22 }
23