gmag11 / QuickESPNow

Wrapper for easy use of ESP-NOW on ESP32 and ESP8266
MIT License
82 stars 19 forks source link

esp_yield() not found for esp8266 build #12

Open gpbenton opened 2 months ago

gpbenton commented 2 months ago

I am trying to compile this on platformio, but I get this error for a wemos_d1_mini board

Compiling .pio/build/base/FrameworkArduino/base64.cpp.o
.pio/libdeps/base/QuickEspNow/src/QuickEspNow_esp8266.cpp: In member function 'virtual comms_send_error_t QuickEspNow::send(const uint8_t*, const uint8_t*, size_t)':
.pio/libdeps/base/QuickEspNow/src/QuickEspNow_esp8266.cpp:150:17: error: 'esp_yield' was not declared in this scope
  150 |                 esp_yield ();
      |                 ^~~~~~~~~

I found some discussion on line about esp_yield(), yield() and delay(0), so I replaced esp_yield() with yield() in my copy of the library, and it has been working so far, but I am not sure if that is really the correct solution.