-
Notifications
You must be signed in to change notification settings - Fork 1
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
SNS - ADC Mux #41
base: main
Are you sure you want to change the base?
SNS - ADC Mux #41
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, would be good to have a function for just reading a single channel of the mux. To do so it'd be best to have the channel addresses as an enum, so that'll require modification to the read_data
function too.
Edit: actually, it would be really good if we had something like AdcMuxChannel
which implemented the HypedAdc
trait from PR #41. That would mean we don't need to care whether an ADC sensor is plugged into the ADC on the ST board or into the mux, the sensor can just use anything that implements HypedAdc
. It would need to take in a shared I2C instance (using Mutex
like in the I2C mux PR #14), the mux address and the channel address.
Co-authored-by: David Beechey <david@dtbeechey.dev>
Co-authored-by: David Beechey <david@dtbeechey.dev> Co-authored-by: platinumxy <83834735+platinumxy@users.noreply.github.com>
Co-authored-by: David Beechey <david@dtbeechey.dev>
Co-authored-by: David Beechey <david@dtbeechey.dev>
Co-authored-by: Michael Belyaev <michael7belyaev@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few changes needed + update the comments accordingly
Co-authored-by: David Beechey <david@dtbeechey.dev>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you might need to make some changes in this depending what happens with #49
No description provided.