diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-02-06 10:40:34 +0200 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-03-11 09:17:57 +0700 |
commit | 54fc247f9b6589291de809065f713930ffdd1618 (patch) | |
tree | bdd078283460db289039f79754dbe6a2b6766374 | |
parent | 97375f4576ee0637d4a3452a411900f224beeb44 (diff) | |
download | micropython-54fc247f9b6589291de809065f713930ffdd1618.tar.gz micropython-54fc247f9b6589291de809065f713930ffdd1618.zip |
esp8266/ets_alt_task: Update for vendor SDK 1.5.0.
SDK 1.5.0 has a task with priority 3: ets_task(401001f4, 3, 3fff9808, 4).
Recognizing SDK version requires the latets esp-open-sdk build.
-rw-r--r-- | esp8266/ets_alt_task.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/esp8266/ets_alt_task.c b/esp8266/ets_alt_task.c index d408175ddc..20e32c2eb6 100644 --- a/esp8266/ets_alt_task.c +++ b/esp8266/ets_alt_task.c @@ -2,6 +2,7 @@ #include "osapi.h" #include "os_type.h" #include "ets_sys.h" +#include <esp_sdk_ver.h> #include "etshal.h" #include "user_interface.h" @@ -22,7 +23,11 @@ struct task_entry { static void (*idle_cb)(void *); static void *idle_arg; -#define FIRST_PRIO 0x14 +#if ESP_SDK_VERSION >= 010500 +# define FIRST_PRIO 3 +#else +# define FIRST_PRIO 0x14 +#endif #define LAST_PRIO 0x20 #define PRIO2ID(prio) ((prio) - FIRST_PRIO) |