Re:Rust on Espressif chips – 2023 Roadmap
by justeleblanc on Friday February 24, 2023 @11:46AM
(#34926531)
All the defines for pin names are fully uppercase. Is it really such a hindrance not to be able to call your variable LED_BUILTIN or CLKPS1?
Re:Rust on Espressif chips – 2023 Roadmap
by Denvercoder9 on Friday February 24, 2023 @11:51AM
(#34926595)
Not all pins have names that are so specific, and it's a common convention to uppercase e.g. enumerators.
In my experience, escaping the Arduino system isn't so simple. The Arduino framework pulls a lot of stuff into the global namespace when you include even just one of their headers, some of which is incompatible with standard C++. For example they `#define` all pin names, some of which can be common terms like `led`, `button`, `mosi` or `clk`. Any of those you then can't use a variable name. It's even worse because the pin names differ between boards, and there's no master list of defined terms.