@@ -73,9 +73,9 @@ pub enum Speed {
73
73
74
74
#[ derive( Debug , PartialEq ) ]
75
75
pub enum Edge {
76
- RISING ,
77
- FALLING ,
78
- RISING_FALLING ,
76
+ Rising ,
77
+ Falling ,
78
+ RisingFalling ,
79
79
}
80
80
81
81
/// External Interrupt Pin
@@ -232,15 +232,15 @@ macro_rules! gpio {
232
232
/// Generate interrupt on rising edge, falling edge or both
233
233
fn trigger_on_edge( & mut self , exti: & mut EXTI , edge: Edge ) {
234
234
match edge {
235
- Edge :: RISING => {
235
+ Edge :: Rising => {
236
236
exti. rtsr. modify( |r, w| unsafe { w. bits( r. bits( ) | ( 1 << self . i) ) } ) ;
237
237
exti. ftsr. modify( |r, w| unsafe { w. bits( r. bits( ) & !( 1 << self . i) ) } ) ;
238
238
} ,
239
- Edge :: FALLING => {
239
+ Edge :: Falling => {
240
240
exti. ftsr. modify( |r, w| unsafe { w. bits( r. bits( ) | ( 1 << self . i) ) } ) ;
241
241
exti. rtsr. modify( |r, w| unsafe { w. bits( r. bits( ) & !( 1 << self . i) ) } ) ;
242
242
} ,
243
- Edge :: RISING_FALLING => {
243
+ Edge :: RisingFalling => {
244
244
exti. rtsr. modify( |r, w| unsafe { w. bits( r. bits( ) | ( 1 << self . i) ) } ) ;
245
245
exti. ftsr. modify( |r, w| unsafe { w. bits( r. bits( ) | ( 1 << self . i) ) } ) ;
246
246
}
@@ -641,15 +641,15 @@ macro_rules! gpio {
641
641
/// Generate interrupt on rising edge, falling edge or both
642
642
fn trigger_on_edge( & mut self , exti: & mut EXTI , edge: Edge ) {
643
643
match edge {
644
- Edge :: RISING => {
644
+ Edge :: Rising => {
645
645
exti. rtsr. modify( |r, w| unsafe { w. bits( r. bits( ) | ( 1 << $i) ) } ) ;
646
646
exti. ftsr. modify( |r, w| unsafe { w. bits( r. bits( ) & !( 1 << $i) ) } ) ;
647
647
} ,
648
- Edge :: FALLING => {
648
+ Edge :: Falling => {
649
649
exti. ftsr. modify( |r, w| unsafe { w. bits( r. bits( ) | ( 1 << $i) ) } ) ;
650
650
exti. rtsr. modify( |r, w| unsafe { w. bits( r. bits( ) & !( 1 << $i) ) } ) ;
651
651
} ,
652
- Edge :: RISING_FALLING => {
652
+ Edge :: RisingFalling => {
653
653
exti. rtsr. modify( |r, w| unsafe { w. bits( r. bits( ) | ( 1 << $i) ) } ) ;
654
654
exti. ftsr. modify( |r, w| unsafe { w. bits( r. bits( ) | ( 1 << $i) ) } ) ;
655
655
}
0 commit comments