@@ -234,7 +234,7 @@ impl<const P: char> PUPDR<P> {
234
234
}
235
235
236
236
macro_rules! gpio {
237
- ( $GPIOX: ident, $gpiox: ident, $PXx: ident, $port_id: literal, $extigpionr: expr, [
237
+ ( $GPIOX: ident, $gpiox: ident, $PXx: ident, $port_id: literal, $extigpionr: expr, $ ( { $pwrenable : expr } , ) ? [
238
238
$( $PXi: ident: ( $pxi: ident, $i: expr, $MODE: ty, $HL: ident, $exticri: ident) , ) +
239
239
] ) => {
240
240
/// GPIO
@@ -274,6 +274,7 @@ macro_rules! gpio {
274
274
fn split( self , ahb: & mut AHB2 ) -> Parts {
275
275
<$GPIOX>:: enable( ahb) ;
276
276
<$GPIOX>:: reset( ahb) ;
277
+ $( $pwrenable) ?
277
278
278
279
Parts {
279
280
afrh: Afr :: new( ) ,
@@ -753,7 +754,9 @@ gpio!(GPIOF, gpiof, PFx, 'F', 5, [
753
754
feature = "stm32l4r9" ,
754
755
feature = "stm32l4s9" ,
755
756
) ) ]
756
- gpio ! ( GPIOG , gpiog, PGx , 'G' , 6 , [
757
+ gpio ! ( GPIOG , gpiog, PGx , 'G' , 6 ,
758
+ { unsafe { ( * crate :: pac:: PWR :: ptr( ) ) . cr2. modify( |_, w| w. iosv( ) . set_bit( ) ) ; } } ,
759
+ [
757
760
PG0 : ( pg0, 0 , Analog , L8 , exticr1) ,
758
761
PG1 : ( pg1, 1 , Analog , L8 , exticr1) ,
759
762
PG2 : ( pg2, 2 , Analog , L8 , exticr1) ,
0 commit comments