Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split modules into constructor and init function #81

Open
JNeiger opened this issue Aug 2, 2019 · 0 comments
Open

Split modules into constructor and init function #81

JNeiger opened this issue Aug 2, 2019 · 0 comments

Comments

@JNeiger
Copy link
Contributor

JNeiger commented Aug 2, 2019

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant