File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -361,6 +361,15 @@ fn config_channel_task_pin<P: GpioteOutputPin>(
361
361
TaskOutPolarity :: Clear => w. polarity ( ) . hi_to_lo ( ) ,
362
362
TaskOutPolarity :: Toggle => w. polarity ( ) . toggle ( ) ,
363
363
} ;
364
+
365
+ #[ cfg( any( feature = "52833" , feature = "52840" ) ) ]
366
+ {
367
+ match pin. port ( ) {
368
+ Port :: Port0 => w. port ( ) . clear_bit ( ) ,
369
+ Port :: Port1 => w. port ( ) . set_bit ( ) ,
370
+ } ;
371
+ }
372
+
364
373
unsafe { w. psel ( ) . bits ( pin. pin ( ) ) }
365
374
} ) ;
366
375
}
@@ -421,16 +430,23 @@ impl GpioteInputPin for Pin<Input<Floating>> {
421
430
/// Trait to represent task output pin.
422
431
pub trait GpioteOutputPin {
423
432
fn pin ( & self ) -> u8 ;
433
+ fn port ( & self ) -> Port ;
424
434
}
425
435
426
436
impl GpioteOutputPin for Pin < Output < OpenDrain > > {
427
437
fn pin ( & self ) -> u8 {
428
438
self . pin ( )
429
439
}
440
+ fn port ( & self ) -> Port {
441
+ self . port ( )
442
+ }
430
443
}
431
444
432
445
impl GpioteOutputPin for Pin < Output < PushPull > > {
433
446
fn pin ( & self ) -> u8 {
434
447
self . pin ( )
435
448
}
449
+ fn port ( & self ) -> Port {
450
+ self . port ( )
451
+ }
436
452
}
You can’t perform that action at this time.
0 commit comments