File tree Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -581,13 +581,22 @@ impl Adc<ADC1> {
581
581
where
582
582
Self : SetChannels < PINS >
583
583
{
584
- self . rb . cr1 . modify ( |_, w| w. scan ( ) . set_bit ( ) ) ;
585
- self . rb . cr2 . modify ( |_, w| w. cont ( ) . clear_bit ( ) ) ;
586
- self . rb . cr1 . modify ( |_, w| w. discen ( ) . clear_bit ( ) ) ;
587
- self . rb . cr2 . modify ( |_, w| w. align ( ) . bit ( self . align . into ( ) ) ) ;
584
+ self . rb . cr2 . modify ( |_, w| w
585
+ . adon ( ) . clear_bit ( )
586
+ . dma ( ) . clear_bit ( )
587
+ . cont ( ) . clear_bit ( )
588
+ . align ( ) . bit ( self . align . into ( ) )
589
+ ) ;
590
+ self . rb . cr1 . modify ( |_, w| w
591
+ . scan ( ) . set_bit ( )
592
+ . discen ( ) . clear_bit ( )
593
+ ) ;
588
594
self . set_samples ( ) ;
589
595
self . set_sequence ( ) ;
590
- self . rb . cr2 . modify ( |_, w| w. dma ( ) . set_bit ( ) ) ;
596
+ self . rb . cr2 . modify ( |_, w| w
597
+ . dma ( ) . set_bit ( )
598
+ . adon ( ) . set_bit ( )
599
+ ) ;
591
600
592
601
let payload = AdcPayload {
593
602
adc : self ,
You can’t perform that action at this time.
0 commit comments