1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-04 04:12:23 +01:00

Declare arch_get_cpu_cycle_count for esp8266 as IRAM (#2843)

This commit is contained in:
Mark Dietzer
2021-12-01 01:01:15 -08:00
committed by GitHub
parent 1ec3140759
commit 24a5325db3

View File

@@ -27,7 +27,7 @@ void IRAM_ATTR HOT arch_feed_wdt() {
uint8_t progmem_read_byte(const uint8_t *addr) {
return pgm_read_byte(addr); // NOLINT
}
uint32_t arch_get_cpu_cycle_count() {
uint32_t IRAM_ATTR HOT arch_get_cpu_cycle_count() {
return ESP.getCycleCount(); // NOLINT(readability-static-accessed-through-instance)
}
uint32_t arch_get_cpu_freq_hz() { return F_CPU; }