Skip to content

software reset #579

Answered by phoddie
mauroForlimpopoli asked this question in Q&A
Feb 24, 2021 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

There is a restart function available as part of some examples. There is not, however, a standalone restart function. We should do that, and the Host Provider Instance in our work with Ecma TC53 is probably a good place for it.

Meanwhile, it is easy to add yourself. The details are explained step-by-step in our book, IoT Development for ESP32 and ESP8266 with JavaScript, in the "Adding Native Code" chapter. Restart is very much like the random integer example on pages 521-523..

I'll just give a quick summary here. You need to add one file to your project folder. Name it restart.c. It just contains a native function to invoke the restart function in the ESP-IDF:

#include "xs.h"

void xs_re…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mauroForlimpopoli
Comment options

Answer selected by phoddie
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants