Remix.run Logo
estimator7292 2 days ago

Adafruit's libraries are some of the worst code I've ever seen. And I recreationally dive into the low level esp-IDF code (I do not recommend if you value your sanity).

I found one just yesterday where the main entry point returns a byte value. It returns 'false' on error, and '0' on success. It may also sometimes return a non-zero error code. You can see why this design would be problematic.

elcritch 2 days ago | parent [-]

Yet they generally work.

In my experience all of the low level code on uC’s is just short of horrible. That’s ST, NXP, etc, are just full of terrible kludges. Then again some of the Linux kernel drivers can be rough too.

The only vendor I’ve heard has good code and documentation is Raspberry Pi Foundation on their silicon.