Skip to content

Commit e138a62

Browse files
committed
Write ADC configuration instead of modifying it
This change guards against some unexpected leftover configuration from earlier interferring with the desired operation of the ADC.
1 parent 79cfc92 commit e138a62

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/adc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ impl<State> Adc<State> {
264264
where
265265
Chan: Channel<Adc<Ready>, ID=u8>,
266266
{
267-
self.rb.cfgr1.modify(|_, w| {
267+
self.rb.cfgr1.write(|w| {
268268
w
269269
.res().bits(self.precision as u8)
270270
.cont().bit(cont)

0 commit comments

Comments
 (0)