File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ macro_rules! gpio_async {
1515 use crate :: gpio:: * ;
1616 use crate :: gpio:: gpio0:: * ;
1717 use e310x:: $GPIOX;
18+ use e310x:: interrupt:: ExternalInterrupt ;
1819 use embedded_hal:: digital:: { Error , ErrorKind , ErrorType , InputPin } ;
1920 use embedded_hal_async:: digital:: Wait ;
2021
@@ -38,8 +39,9 @@ macro_rules! gpio_async {
3839 }
3940
4041 /// Interrupt handler for GPIO pins.
42+ #[ inline]
4143 fn on_irq( pin_n: usize ) {
42- let gpio_block = unsafe { Gpio0 :: steal( ) } ;
44+ let gpio_block = unsafe { $GPIOX :: steal( ) } ;
4345 let pin_mask = 1 << pin_n;
4446
4547 // Disable the interrupt for the pin
@@ -231,7 +233,7 @@ macro_rules! gpio_async {
231233 }
232234
233235 /// Pin Interrupt Handler
234- #[ riscv_rt:: external_interrupt( e310x :: interrupt :: ExternalInterrupt :: $handle) ]
236+ #[ riscv_rt:: external_interrupt( ExternalInterrupt :: $handle) ]
235237 fn $pxi( ) {
236238 on_irq( $i) ;
237239 }
You can’t perform that action at this time.
0 commit comments