Skip to content

Commit

Permalink
fixed gpio.c
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrea Cucci authored Nov 28, 2017
1 parent c36a4c1 commit 5075bd1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion driver/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ void gpio_intr_handler() {
uint32_t gpio_status = GPIO_REG_READ(GPIO_STATUS_ADDRESS);
os_printf("interrupt@%dus: mask=0x%02x, status=0x%02x\n",system_get_time(),gpio_mask,gpio_status);
for (i=0 ; i<16 ; i++)
if ( (0x1<<i) & gpio_status & gpio_intr_callbacks[i]!= NULL )
if ( (0x1<<i) & gpio_status && gpio_intr_callbacks[i]!= NULL )
(*gpio_intr_callbacks[i])();
GPIO_REG_WRITE(GPIO_STATUS_W1TC_ADDRESS, gpio_status ); //clear interrupt status
}
Expand Down

0 comments on commit 5075bd1

Please sign in to comment.