mirror of
https://github.com/micropython/micropython.git
synced 2026-01-06 12:10:13 +01:00
esp8266: Provide a dedicated variable to disable ets_loop_iter.
So ets_loop_iter is now only disabled when using machine.disable_irq.
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
#include <stdio.h>
|
||||
#include "xtirq.h"
|
||||
#include "osapi.h"
|
||||
#include "os_type.h"
|
||||
#include "ets_sys.h"
|
||||
#include <esp_sdk_ver.h>
|
||||
#include "etshal.h"
|
||||
#include "user_interface.h"
|
||||
#include "ets_alt_task.h"
|
||||
|
||||
// Use standard ets_task or alternative impl
|
||||
#define USE_ETS_TASK 0
|
||||
@@ -108,8 +108,10 @@ bool ets_post(uint8 prio, os_signal_t sig, os_param_t param) {
|
||||
#endif
|
||||
}
|
||||
|
||||
int ets_loop_iter_disable = 0;
|
||||
|
||||
bool ets_loop_iter(void) {
|
||||
if (query_irq() != 0) {
|
||||
if (ets_loop_iter_disable) {
|
||||
return false;
|
||||
}
|
||||
//static unsigned cnt;
|
||||
|
||||
Reference in New Issue
Block a user