@@ -369,13 +369,25 @@ mod pins {
369369
370370 pub type RefClk = PA1 < Input > ;
371371 pub type Crs = PA7 < Input > ;
372+
373+ #[ cfg( pins = "nucleo" ) ]
372374 pub type TxEn = PG11 < Input > ;
375+ #[ cfg( pins = "nucleo" ) ]
373376 pub type TxD0 = PG13 < Input > ;
377+
378+ #[ cfg( not( pins = "nucleo" ) ) ]
379+ pub type TxEn = PB11 < Input > ;
380+ #[ cfg( not( pins = "nucleo" ) ) ]
381+ pub type TxD0 = PB12 < Input > ;
382+
374383 pub type TxD1 = PB13 < Input > ;
375384 pub type RxD0 = PC4 < Input > ;
376385 pub type RxD1 = PC5 < Input > ;
377386
387+ #[ cfg( not( pps = "alternate" ) ) ]
378388 pub type Pps = PB5 < Output < PushPull > > ;
389+ #[ cfg( pps = "alternate" ) ]
390+ pub type Pps = PG5 < Output < PushPull > > ;
379391
380392 pub type Mdio = PA2 < Alternate < 11 > > ;
381393 pub type Mdc = PC1 < Alternate < 11 > > ;
@@ -388,6 +400,7 @@ mod pins {
388400 Mdc ,
389401 Pps ,
390402 ) {
403+ #[ allow( unused_variables) ]
391404 let Gpio {
392405 gpioa,
393406 gpiob,
@@ -399,15 +412,23 @@ mod pins {
399412 let crs = gpioa. pa7 . into_input ( ) ;
400413 let rx_d0 = gpioc. pc4 . into_input ( ) ;
401414 let rx_d1 = gpioc. pc5 . into_input ( ) ;
402- let tx_en = gpiog. pg11 . into_input ( ) ;
403- let tx_d0 = gpiog. pg13 . into_input ( ) ;
404415 let tx_d1 = gpiob. pb13 . into_input ( ) ;
405416
417+ #[ cfg( not( pins = "nucleo" ) ) ]
418+ let ( tx_en, tx_d0) = { ( gpiob. pb11 . into_input ( ) , gpiob. pb12 . into_input ( ) ) } ;
419+
420+ #[ cfg( pins = "nucleo" ) ]
421+ let ( tx_en, tx_d0) = { ( gpiog. pg11 . into_input ( ) , gpiog. pg13 . into_input ( ) ) } ;
422+
406423 let mdio = gpioa. pa2 . into_alternate ( ) ;
407424 let mdc = gpioc. pc1 . into_alternate ( ) ;
408425
426+ #[ cfg( not( pps = "alternate" ) ) ]
409427 let pps = gpiob. pb5 . into_push_pull_output ( ) ;
410428
429+ #[ cfg( pps = "alternate" ) ]
430+ let pps = gpiog. pg5 . into_push_pull_output ( ) ;
431+
411432 let pins = EthPins {
412433 ref_clk,
413434 crs,
0 commit comments