From 09f5f7266ba51648a3a58f069609d928da6ac0a1 Mon Sep 17 00:00:00 2001 From: me-no-dev Date: Sat, 11 Feb 2017 00:25:15 +0200 Subject: [PATCH] move yield to function fixes: https://github.com/espressif/arduino-esp32/issues/193 --- cores/esp32/esp32-hal-misc.c | 5 +++++ cores/esp32/esp32-hal.h | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/cores/esp32/esp32-hal-misc.c b/cores/esp32/esp32-hal-misc.c index 0d72e752..92e82f42 100644 --- a/cores/esp32/esp32-hal-misc.c +++ b/cores/esp32/esp32-hal-misc.c @@ -62,6 +62,11 @@ void arduino_phy_init() } #endif +void yield() +{ + vPortYield(); +} + uint32_t IRAM_ATTR micros() { uint32_t ccount; diff --git a/cores/esp32/esp32-hal.h b/cores/esp32/esp32-hal.h index c0072ca9..4547907b 100644 --- a/cores/esp32/esp32-hal.h +++ b/cores/esp32/esp32-hal.h @@ -39,8 +39,8 @@ extern "C" { #endif //forward declaration from freertos/portmacro.h -void vPortYield( void ); -#define yield() vPortYield() +void vPortYield(void); +void yield(void); #define optimistic_yield(u) #define ESP_REG(addr) *((volatile uint32_t *)(addr))