kopia lustrzana https://github.com/micropython/micropython
esp32: Deinitialize Bluetooth on soft reset.
This fixes a crash, caused by NimBLE continuing to call the Python BLE interrupt handler after soft reboot.pull/5743/head
rodzic
41a9f1dec8
commit
bd746a4630
|
@ -58,6 +58,10 @@
|
||||||
#include "modnetwork.h"
|
#include "modnetwork.h"
|
||||||
#include "mpthreadport.h"
|
#include "mpthreadport.h"
|
||||||
|
|
||||||
|
#if MICROPY_BLUETOOTH_NIMBLE
|
||||||
|
#include "extmod/modbluetooth.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
// MicroPython runs as a task under FreeRTOS
|
// MicroPython runs as a task under FreeRTOS
|
||||||
#define MP_TASK_PRIORITY (ESP_TASK_PRIO_MIN + 1)
|
#define MP_TASK_PRIORITY (ESP_TASK_PRIO_MIN + 1)
|
||||||
#define MP_TASK_STACK_SIZE (16 * 1024)
|
#define MP_TASK_STACK_SIZE (16 * 1024)
|
||||||
|
@ -136,6 +140,10 @@ soft_reset:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if MICROPY_BLUETOOTH_NIMBLE
|
||||||
|
mp_bluetooth_deinit();
|
||||||
|
#endif
|
||||||
|
|
||||||
machine_timer_deinit_all();
|
machine_timer_deinit_all();
|
||||||
|
|
||||||
#if MICROPY_PY_THREAD
|
#if MICROPY_PY_THREAD
|
||||||
|
|
Ładowanie…
Reference in New Issue