ad7172: Fix RefSource From implementation #212

Merged
atse merged 1 commits from atse/thermostat:push-lrwrvkkmomwq into master 2025-10-09 10:21:07 +08:00

View File

@@ -121,9 +121,9 @@ pub enum RefSource {
impl From<u8> for RefSource {
fn from(x: u8) -> Self {
match x {
0 => RefSource::External,
1 => RefSource::Internal,
2 => RefSource::Avdd1MinusAvss,
0b00 => RefSource::External,
0b10 => RefSource::Internal,
0b11 => RefSource::Avdd1MinusAvss,
_ => RefSource::Invalid,
}
}