board_common_esp32.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2018 Gunar Schorcht
3  * SPDX-License-Identifier: LGPL-2.1-only
4  */
5 
6 #pragma once
7 
33 #ifndef ESP32_XTAL_FREQ
34 #define ESP32_XTAL_FREQ (40)
35 #endif
36 
37 #if !DOXYGEN
38 
43 #if CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ <= 80
44 # define CONFIG_ZTIMER_USEC_ADJUST_SET (880/CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ)
45 # define CONFIG_ZTIMER_USEC_ADJUST_SLEEP ((CONFIG_ZTIMER_USEC_ADJUST_SET >> 2) * 5)
46 #else
47 # define CONFIG_ZTIMER_USEC_ADJUST_SET (960/CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ)
48 # define CONFIG_ZTIMER_USEC_ADJUST_SLEEP (CONFIG_ZTIMER_USEC_ADJUST_SET + 1)
49 #endif
52 #endif /* !DOXYGEN */
53 
54 #ifdef __cplusplus
55 extern "C" {
56 #endif
57 
58 #ifdef __cplusplus
59 } /* end extern "C" */
60 #endif
61