Replies: 2 comments
-
Interesting idea. Definitely makes BBOS more of a "swiss army knife" bench tool for breadboarding that could be used out of the box for prototyping without having to write or modify code. Could be quite useful for a wider user base too. Your 'driver' command could also list the available drivers that have been compiled in, since we were discussing making everything more modular/optional. I briefly considered implementing something like your 'pinouts' command that would print out an ASCII image of the board being used with pin map labels, I'm sure you have noticed my love of ASCII art... |
Beta Was this translation helpful? Give feedback.
-
You know this |
Beta Was this translation helpful? Give feedback.
-
I think BBOS should have an internal model (hardware-specific) of available GPIOs and other functions (SPI, I2C) available behind them via pinmux stuff. Currently the pins are hardcoded to one function or other, so e.g. there's no way to tell BBOS at compile time (via project.cmap) or runtime that you connected your BME280 on I2C1 instead of I2C0.
I think the pinmix configuration that is compiled in should only be the default at bootup, but switchable at runtime, like this: (this is fake, no code yet)
The
pinouts
command is a generic command that lives incli/
, with a hardware-specific backend underhardware/
that has the list of available pins and mappings of what they can mux to, as well as available peripherals. That means it can also trivially report on what's available: (this is from working code)Once in place, this will trivially allow things like this: (fake again)
Opinions?
Beta Was this translation helpful? Give feedback.
All reactions