1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-25 06:22:11 +03:00

Automatically call yield() in WiFiClient::available if called more than once

This commit is contained in:
Ivan Grokhotkov
2015-01-07 01:57:41 +03:00
parent 4942ceef37
commit 8e7a20c08d
3 changed files with 21 additions and 2 deletions

View File

@ -49,6 +49,13 @@ extern void (*__init_array_end)(void);
static cont_t g_cont;
static os_event_t g_loop_queue[LOOP_QUEUE_SIZE];
static uint32_t g_micros_at_task_start;
extern "C" uint32_t esp_micros_at_task_start()
{
return g_micros_at_task_start;
}
extern "C" void abort()
{
while(1){}
@ -86,6 +93,7 @@ static void loop_wrapper()
static void loop_task(os_event_t *events)
{
g_micros_at_task_start = system_get_time();
cont_run(&g_cont, &loop_wrapper);
if (cont_check(&g_cont) != 0)
{