On the pins stuff, would love some help in defining 'A0' as analog input pin in the board file. I tried and failed. I see that jshReset is indeed not resetting all the pins.
D12-D14 is not used by anything, so I'm not sure what is going on there.
WRT figuring out what the state of a pin is, well, it's not that easy. Right now the code remembers what it sets a pin to and returns that, Should be ok for 90+% of cases. If someone wants to write the code to derive the state from the hardware register bits: be my guest :-)
I do not know what IS_PIN_USED_INTERNALLY is supposed to do. Right now the generated macro is:
It might be good to define D6 through D11 as used internally (for the flash chip), but I'm not sure how to accomplish that. Maybe also D1 and D3 for the uart0 and D2 for uart1 (debug output).
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.
On the pins stuff, would love some help in defining 'A0' as analog input pin in the board file. I tried and failed. I see that jshReset is indeed not resetting all the pins.
D12-D14 is not used by anything, so I'm not sure what is going on there.
WRT figuring out what the state of a pin is, well, it's not that easy. Right now the code remembers what it sets a pin to and returns that, Should be ok for 90+% of cases. If someone wants to write the code to derive the state from the hardware register bits: be my guest :-)
I do not know what
IS_PIN_USED_INTERNALLY
is supposed to do. Right now the generated macro is:It might be good to define D6 through D11 as used internally (for the flash chip), but I'm not sure how to accomplish that. Maybe also D1 and D3 for the uart0 and D2 for uart1 (debug output).