ad7172: Fix RefSource From implementation
Fixes #210.
This commit was merged in pull request #212.
This commit is contained in:
@@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user