All the base digital io / comm bus setup should happen in the constructor. After everything has been setup, then the init function for each module should be called which actually setups and initialized the devices attached to each module. This allows multiple devices on the same spi bus (for example) without doing any weird stuff with the CS line in main.
- Pull device config into new function
- Add function into the generic module
- Call the init function on all the modules in the list before we start the main loop
All the base digital io / comm bus setup should happen in the constructor. After everything has been setup, then the init function for each module should be called which actually setups and initialized the devices attached to each module. This allows multiple devices on the same spi bus (for example) without doing any weird stuff with the CS line in main.