mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-14 10:21:49 +00:00
implement Reset for Bluetooth Hardware error on Arduino ARM using NVIC_SystemReset()
This commit is contained in:
parent
8115a8da04
commit
9db7bce220
@ -9,6 +9,10 @@
|
||||
#include <avr/wdt.h>
|
||||
#endif
|
||||
|
||||
#if __arm__
|
||||
#include <Reset.h> // also provides NVIC_SystemReset
|
||||
#endif
|
||||
|
||||
#include "BTstack.h"
|
||||
|
||||
#include "btstack_memory.h"
|
||||
@ -684,6 +688,10 @@ void bluetooth_hardware_error(){
|
||||
wdt_enable(WDTO_15MS);
|
||||
// wait for watchdog to trigger
|
||||
#endif
|
||||
|
||||
#ifdef __arm__
|
||||
NVIC_SystemReset();
|
||||
#endif
|
||||
while(1);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user