HardwareTeams.com - The #1 job board and blog for electrical and computer engineers

Standard Driver Project #

I’ve been thinking about this idea for a couple years: what if there was a open source repo of drivers for all peripheral ICs in existence (big goal, I know).

And what if these drivers were all written in a standard way (crazy!).

And what if you knew exactly how to setup an IC using this hypothetical standard driver by just reading directly from the IC’s datasheet.

First Draft of the Standard Driver Requirements #

The work-in-progress-draft of the standard is available at the HardwareTeams github.

There is still a lot to figure out! If you are interested in the project please get started by sharing your ideas in the issues.

Example #

What the hell am I talking about? Lets say I’ve just designed a circuit with the NAU8822. I’m using this this as an example because I have designed a circuit with the NAU8822 and it was not a very cool experience.

The standard driver project would seek to make datasheet information directly translatable to real code. The user would follow these steps:

  1. download the driver from the repo
  2. fill in function(s) in the driver with device specific code for communications (i2c,spi, etc)
  3. read the datasheet and simply write code exactly as defined in the datasheet through a combination of well defined functions and macros
    • nau8822_spi_write(Power_Management_1, DCBUFEN(1) | AUX1MXEN(1) | REFIMP(3) )
    • where DBUFEN, AUX1MXEN, REFIMP are macros that set the bits in the correct location

Theres a lot to flesh out, and maybe there are better way to accomplish some of this, but this is just a rough draft to kick off the project!

HardwareTeams.com Copyright © 2024
comments powered by Disqus