I am writing drivers for different devices to work with my embedded system. Already for each deviceCurrently I write Driver Manuallyany new driver manually but now I want to make this automatic and infor the future if any devices added to my system I wantwould like to make it work just by settingautomate this using a settings file.
for achieving to this purpose I had find outfigure I have 2 options:
1- writing a generic code that parse setting file and do a appropriate behavior
2- writing a code generator that parse setting file and generate code from that with appropriate behavior
write a single universal driver that reads the setting file and behaves accordingly;
write a code generator that reads the setting file and generates code from that with appropriate behavior.
I want to know whichWhich one of themthese is athe better option for me and iswhy? Are there any otherbetter options still?