Skip to content

Commit

Permalink
Fix accidential off by one
Browse files Browse the repository at this point in the history
  • Loading branch information
Yatekii committed Sep 27, 2020
1 parent e856a46 commit 73fc3a0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions nrf-hal-common/src/saadc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,7 @@ impl<'a> Channel<'a> {
Variant::Val(Resolution::_12BIT) => 4096,
Variant::Val(Resolution::_14BIT) => 16384,
_ => unreachable!(),
} / mode
- 1;
} / mode;

let gain = match self.saadc.ch[self.channel].config.read().gain().variant() {
Gain::GAIN1_6 => (1, 6),
Expand Down

0 comments on commit 73fc3a0

Please sign in to comment.