@Gordon
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]; }
If the hardware is getting read - is there any point in using the g_pinState[pin] array?
g_pinState[pin]
And I don't follow why the OR is used?
Thanks
@Wilberforce 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.
@Gordon
If the hardware is getting read - is there any point in using the
g_pinState[pin]
array?And I don't follow why the OR is used?
Thanks