@@ -450,6 +450,7 @@ macro_rules! gpio {
450
450
}
451
451
}
452
452
453
+ #[ cfg( any( feature = "stm32f042" , feature = "stm32f030" , ) ) ]
453
454
gpio ! ( GPIOA , gpioa, iopaen, PA , [
454
455
PA0 : ( pa0, 0 , Input <Floating >) ,
455
456
PA1 : ( pa1, 1 , Input <Floating >) ,
@@ -469,6 +470,7 @@ gpio!(GPIOA, gpioa, iopaen, PA, [
469
470
PA15 : ( pa15, 15 , Input <Floating >) ,
470
471
] ) ;
471
472
473
+ #[ cfg( any( feature = "stm32f042" , feature = "stm32f030" ) ) ]
472
474
gpio ! ( GPIOB , gpiob, iopben, PB , [
473
475
PB0 : ( pb0, 0 , Input <Floating >) ,
474
476
PB1 : ( pb1, 1 , Input <Floating >) ,
@@ -488,14 +490,53 @@ gpio!(GPIOB, gpiob, iopben, PB, [
488
490
PB15 : ( pb15, 15 , Input <Floating >) ,
489
491
] ) ;
490
492
493
+ #[ cfg( feature = "stm32f042" ) ]
491
494
gpio ! ( GPIOC , gpioc, iopcen, PC , [
492
495
PC13 : ( pc13, 13 , Input <Floating >) ,
493
496
PC14 : ( pc14, 14 , Input <Floating >) ,
494
497
PC15 : ( pc15, 15 , Input <Floating >) ,
495
498
] ) ;
496
499
500
+ #[ cfg( feature = "stm32f030" ) ]
501
+ gpio ! ( GPIOC , gpioc, iopcen, PC , [
502
+ PC0 : ( pb0, 0 , Input <Floating >) ,
503
+ PC1 : ( pb1, 1 , Input <Floating >) ,
504
+ PC2 : ( pb2, 2 , Input <Floating >) ,
505
+ PC3 : ( pb3, 3 , Input <Floating >) ,
506
+ PC4 : ( pb4, 4 , Input <Floating >) ,
507
+ PC5 : ( pb5, 5 , Input <Floating >) ,
508
+ PC6 : ( pb6, 6 , Input <Floating >) ,
509
+ PC7 : ( pb7, 7 , Input <Floating >) ,
510
+ PC8 : ( pb8, 8 , Input <Floating >) ,
511
+ PC9 : ( pb9, 9 , Input <Floating >) ,
512
+ PC10 : ( pb10, 10 , Input <Floating >) ,
513
+ PC11 : ( pb11, 11 , Input <Floating >) ,
514
+ PC12 : ( pb12, 12 , Input <Floating >) ,
515
+ PC13 : ( pb13, 13 , Input <Floating >) ,
516
+ PC14 : ( pb14, 14 , Input <Floating >) ,
517
+ PC15 : ( pb15, 15 , Input <Floating >) ,
518
+ ] ) ;
519
+
520
+ // TODO Check if the bit is implemented yet
521
+ // In the device crate the iopden bit is missing, so it won't compile
522
+ // #[cfg(feature = "stm32f030")]
523
+ // gpio!(GPIOD, gpiod, iopden, PD, [
524
+ // PD2: (pd2, 2, Input<Floating>),
525
+ // ]);
526
+
527
+ #[ cfg( feature = "stm32f042" ) ]
497
528
gpio ! ( GPIOF , gpiof, iopfen, PF , [
498
529
PF0 : ( pf0, 0 , Input <Floating >) ,
499
530
PF1 : ( pf1, 1 , Input <Floating >) ,
500
531
PF11 : ( pf11, 11 , Input <Floating >) ,
501
532
] ) ;
533
+
534
+ #[ cfg( feature = "stm32f030" ) ]
535
+ gpio ! ( GPIOF , gpiof, iopfen, PF , [
536
+ PF0 : ( pf0, 0 , Input <Floating >) ,
537
+ PF1 : ( pf1, 1 , Input <Floating >) ,
538
+ PF4 : ( pf4, 4 , Input <Floating >) ,
539
+ PF5 : ( pf5, 5 , Input <Floating >) ,
540
+ PF6 : ( pf6, 5 , Input <Floating >) ,
541
+ PF7 : ( pf7, 5 , Input <Floating >) ,
542
+ ] ) ;
0 commit comments