We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 78781c6 + fa2d156 commit ac7a807Copy full SHA for ac7a807
ports/espressif/common-hal/microcontroller/Processor.c
@@ -60,7 +60,13 @@ float common_hal_mcu_processor_get_voltage(void) {
60
}
61
62
uint32_t common_hal_mcu_processor_get_frequency(void) {
63
- return 0;
+ #ifdef CONFIG_IDF_TARGET_ESP32C3
64
+ return CONFIG_ESP32C3_DEFAULT_CPU_FREQ_MHZ * 1000000;
65
+ #elif defined(CONFIG_IDF_TARGET_ESP32S2)
66
+ return CONFIG_ESP32S2_DEFAULT_CPU_FREQ_MHZ * 1000000;
67
+ #elif defined(CONFIG_IDF_TARGET_ESP32S3)
68
+ return CONFIG_ESP32S3_DEFAULT_CPU_FREQ_MHZ * 1000000;
69
+ #endif
70
71
72
STATIC uint8_t swap_nibbles(uint8_t v) {
0 commit comments