System calls


This method allows to disable automatic resetting of the device on such events as successful firmware update.

void on_reset_pending() {
    // Enable resetting of the device. The system will reset after this method is called

void setup() {
    // Register the event handler
    System.on(reset_pending, on_reset_pending);
    // Disable resetting of the device


void loop() {

When the system needs to reset the device it first sends the reset_pending event to the application, and, if automatic resetting is disabled, waits until the application has called enableReset() to finally perform the reset. This allows the application to perform any necessary cleanup before resetting the device.