MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / fxRestart

Function fxRestart

tools/serial2xsbug/serial2xsbug.c:754–773  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

752}
753
754void fxRestart(txSerialTool self)
755{
756 if (self->traceCommands)
757 fprintf(stderr, "### fxRestart\n");
758
759 if (self->currentMachine) { // send a software restart request for boards with no RTS to toggle
760 char out[32];
761
762 sprintf(out, "\r\n<?xs#%8.8X?>", self->currentMachine->value);
763 fxWriteSerial(self, out, strlen(out));
764
765 out[0] = 0;
766 out[1] = 1; // length
767 out[2] = 1; // restart
768 fxWriteSerial(self, out, 3);
769 }
770
771 fxRestartSerial(self);
772 gRestarting = 1;
773}
774
775void fxSetTime(txSerialTool self, txSerialMachine machine)
776{

Callers 5

fxOpenSerialFunction · 0.85
fxCommandReceivedFunction · 0.85
fxReadSerialBufferFunction · 0.85
fxOpenSerialFunction · 0.85
fxOpenSerialFunction · 0.85

Calls 2

fxWriteSerialFunction · 0.70
fxRestartSerialFunction · 0.70

Tested by

no test coverage detected