implement Reset for Bluetooth Hardware error on Arduino ARM using NVIC_SystemReset()

This commit is contained in:
Matthias Ringwald 2015-06-22 23:17:46 +02:00
parent 8115a8da04
commit 9db7bce220

View File

@ -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);
}