Northeastern-Electric-Racing / Embedded-Base

A collection of drivers, middleware, and development tools for use across systems
2 stars 1 forks source link

[Driver] - Make sht30 driver platform agnostic #160

Open dyldonahue opened 1 month ago

dyldonahue commented 1 month ago

Current Features

this driver depends on stm32 HAL

Desired Additional Features

We want these to work with all potential hardware. This involves replacing HAL specific code with generalized code that utilized function pointers to use HAL functionality. The way in which we want to handle this is outlined in this doc under the "Driver Generalization" header.

Also a part of this ticket, find all references to this driver in Shepherd and Cerberus, and fix them to accommodate the new driver structure. A good way to check this is to update your embedded-base submodule to reflect the changes made to this driver, and then try building shepherd and cerberus. If they relied on this device, they will likely fail to build unless you make the appropriate changes

Screenshots (as needed)

No response

dyldonahue commented 1 month ago

mcpa23... driver already does the function pointer part of this correctly, and Caio's PR should have this largely correct as well pending full review, so take a look at those for examples