File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
targets/TARGET_Silicon_Labs/TARGET_EFM32 Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -61,15 +61,11 @@ static void handle_interrupt_in(uint8_t pin)
61
61
return ;
62
62
}
63
63
64
- //we are storing two ports in each uint8, so we must aquire the one we want.
65
- // If pin is odd, the port is encoded in the 4 most significant bits. If pin is even, the port is encoded in the 4 least significant bits
66
- uint8_t isRise = GPIO_PinInGet ((pin & 0x1 ) ? channel_ports [(pin >>1 ) & 0x7 ] >> 4 & 0xF : channel_ports [(pin >>1 ) & 0x7 ] & 0xF , pin );
67
-
68
64
// Get trigger event
69
65
gpio_irq_event event = IRQ_NONE ;
70
- if (( GPIO -> EXTIFALL & (1 << pin )) && ! isRise ) {
66
+ if (GPIO -> EXTIFALL & (1 << pin )) {
71
67
event = IRQ_FALL ;
72
- } else if (( GPIO -> EXTIRISE & (1 << pin )) && isRise ) {
68
+ } else if (GPIO -> EXTIRISE & (1 << pin )) {
73
69
event = IRQ_RISE ;
74
70
}
75
71
GPIO_IntClear (pin );
You can’t perform that action at this time.
0 commit comments