You are reading a single comment by @Wilberforce and its replies. Click here to read the full conversation.
  • @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?

    And I don't follow why the OR is used?

    Thanks

About

Avatar for Wilberforce @Wilberforce started