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)
Don't worry about formatting, just type in the text and we'll take care of making sense of it. We will auto-convert links, and if you put asterisks around words we will make them bold.
For a full reference visit the Markdown syntax.
© Espruino, powered by microcosm.
Report a problem