File tree Expand file tree Collapse file tree 1 file changed +1
-20
lines changed Expand file tree Collapse file tree 1 file changed +1
-20
lines changed Original file line number Diff line number Diff line change @@ -354,7 +354,7 @@ macro_rules! adc_pins {
354
354
}
355
355
356
356
adc_pins ! (
357
- // 0, Vref, smpr1, smp0; // Missing smp0 in PAC
357
+ 0 , Vref , smpr1, smp0;
358
358
1 , gpio:: PC0 <Analog >, smpr1, smp1;
359
359
2 , gpio:: PC1 <Analog >, smpr1, smp2;
360
360
3 , gpio:: PC2 <Analog >, smpr1, smp3;
@@ -374,22 +374,3 @@ adc_pins!(
374
374
17 , Temperature , smpr2, smp17;
375
375
18 , Vbat , smpr2, smp18;
376
376
) ;
377
-
378
- // SMP0 is missing in PAC, manual impl for now
379
- impl EmbeddedHalChannel < ADC > for Vref {
380
- type ID = u8 ;
381
-
382
- fn channel ( ) -> Self :: ID {
383
- 0
384
- }
385
- }
386
-
387
- impl Channel for Vref {
388
- fn set_sample_time ( & mut self , adc : & ADC1 , sample_time : SampleTime ) {
389
- adc. smpr1 . modify ( |r, w| {
390
- // This is sound, as all `SampleTime` values are valid
391
- // for this field, and the SMP0 field is at the lowest 3 bits.
392
- unsafe { w. bits ( ( r. bits ( ) & !0x7 ) | sample_time as u32 ) }
393
- } )
394
- }
395
- }
You can’t perform that action at this time.
0 commit comments