Fix a fear of bug that a static value will be indefiniteness.

There was a function that has the potential to be called with indefiniteness argument.
Modify to not call the function with indefiniteness argument.
pull/759/head
Masao Hamanaka 2014-12-04 16:03:50 +09:00
parent 7ea2016953
commit fe61d8c4f7
1 changed files with 1 additions and 3 deletions

View File

@ -67,17 +67,15 @@ static gpio_irq_event irq_event;
static void handle_interrupt_in(void) {
int i;
uint16_t irqs;
int irq_num;
irqs = INTCIRQRR;
for(i = 0; i< 8; i++) {
if (channel_ids[i] && (irqs & (1 << i))) {
irq_handler(channel_ids[i], irq_event);
INTCIRQRR &= ~(1 << i);
irq_num = i;
GIC_EndInterrupt((IRQn_Type)(nIRQn_h + i));
}
}
GIC_EndInterrupt((IRQn_Type)(nIRQn_h + irq_num));
}
int gpio_irq_init(gpio_irq_t *obj, PinName pin, gpio_irq_handler handler, uint32_t id) {