@ -11,7 +11,7 @@ void panic(int statusCode);
* Resets the micro:bit.
* @param statusCode the appropriate status code. Status codes must be in the range 0-255.
*/
void reset(int statusCode);
void microbit_reset();
#endif
@ -19,6 +19,16 @@ void panic(int statusCode)
uBit.panic(statusCode);
}
/**
* Perform a hard reset of the micro:bit.
void
microbit_reset()
{
NVIC_SystemReset();
* Callback when a BLE GATT disconnect occurs.
@ -139,7 +149,7 @@ void MicroBit::init()
void MicroBit::reset()
reset();
microbit_reset();
@ -7,18 +7,11 @@ Serial pc(USBTX, USBRX);
MicroBit uBit;
InterruptIn resetButton(MICROBIT_PIN_BUTTON_RESET);
reset()
int main()
// Bring up soft reset button.
resetButton.mode(PullUp);
resetButton.fall(reset);
resetButton.fall(microbit_reset);
#if CONFIG_ENABLED(MICROBIT_DBG)
pc.baud(115200);