Driver Implemention
Driver Implemention
When implementing drivers/specifications (ACPI/ATA/Serial UART etc), would it be best to create a single driver for each version of the specification or create one driver that supports common code and then has seperate portions for all the extras?
I really hate to bring up my own topic again, and i apologise if it was simply read and thought too stupid to respond to. Yet, as it is pertenent to this very moment in my development it would be useful to know, before i go developing a single driver for every version of eery specification, if writing a signle driver to cover them all is easy without having to have lots of specialied ares of code in each driver.
I would judge it on a per-driver basis, preferring the code to be tailored toward the newest version. I would group revisions that didn't change much and make a split when the interface changed substantially or when the code doesn't end up being portable (or has a design flaw).
In general, group them unless there's a fairly clear reason why the code bases should be separate.
I vouch for designing stuff up front and keeping code bases shared as far as is reasonably possible to do so. When you then do figure out a flaw, you only need to fix it once, instead of in all the code bases. You also strongly reduce the chance that you forget some change.
In general, group them unless there's a fairly clear reason why the code bases should be separate.
I vouch for designing stuff up front and keeping code bases shared as far as is reasonably possible to do so. When you then do figure out a flaw, you only need to fix it once, instead of in all the code bases. You also strongly reduce the chance that you forget some change.