move yield to function

fixes: https://github.com/espressif/arduino-esp32/issues/193
This commit is contained in:
me-no-dev 2017-02-11 00:25:15 +02:00
parent 8ab3231e31
commit 09f5f7266b
2 changed files with 7 additions and 2 deletions

View File

@ -62,6 +62,11 @@ void arduino_phy_init()
} }
#endif #endif
void yield()
{
vPortYield();
}
uint32_t IRAM_ATTR micros() uint32_t IRAM_ATTR micros()
{ {
uint32_t ccount; uint32_t ccount;

View File

@ -39,8 +39,8 @@ extern "C" {
#endif #endif
//forward declaration from freertos/portmacro.h //forward declaration from freertos/portmacro.h
void vPortYield( void ); void vPortYield(void);
#define yield() vPortYield() void yield(void);
#define optimistic_yield(u) #define optimistic_yield(u)
#define ESP_REG(addr) *((volatile uint32_t *)(addr)) #define ESP_REG(addr) *((volatile uint32_t *)(addr))