My goal was to create an easy to use device driver for the PCA9539 16-bit GPIO expander IC. However, I also wanted to make it generic so that could be used with other future gpio expander driver implementations.
I created a simple interface that each device driver class (i.e. PCA9539) shall implement. I also created a generic Gpio class used to interface with the device driver(s).
I chose to do it this way to to make it easy to use in the main routine. I am not a software engineer by trade, so any advice would be much appreciated. Any thoughts, comments, ideas to improve?