You might want to add:
JshPinState jshPinGetState(Pin pin) { if (GPIO_REG_READ(GPIO_OUT_W1TS_ADDRESS, 1<<pin)) return g_pinState[pin]|JSHPINSTATE_PIN_IS_ON; return g_pinState[pin]; }
I think that'll do it - just depends if that register can be read or not.
Basically jshPinGetState needs to be able to tell if the pin is meant to be on.
jshPinGetState
It makes stuff like digitalWrite(LED1,1);save() work - which wouldn't have on ESP8266 before
digitalWrite(LED1,1);save()
@Gordon started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
You might want to add:
I think that'll do it - just depends if that register can be read or not.
Basically
jshPinGetState
needs to be able to tell if the pin is meant to be on.It makes stuff like
digitalWrite(LED1,1);save()
work - which wouldn't have on ESP8266 before