Define a gpio for input (or output) only ?

Posted on
  • Is it possible to restrict a GPIO in board.py to support input (or output) only ?
    Some of ESP32 GPIO's support only one direction.
    Optional we could check this in jshardware.c.

  • I'm afraid not - throwing exceptions from within jshPinSetState could be a bit awkward as well. It might be better just to ignore it :S

    You can at least define 'notes' next to the pins in BOARD.py so that the Pin diagram mentions that there's an issue (check the Pico for an example)

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Define a gpio for input (or output) only ?

Posted by Avatar for JumJum @JumJum

Actions