mirror of https://github.com/ARMmbed/mbed-os.git
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
parent
7ea2016953
commit
fe61d8c4f7
|
@ -67,17 +67,15 @@ static gpio_irq_event irq_event;
|
||||||
static void handle_interrupt_in(void) {
|
static void handle_interrupt_in(void) {
|
||||||
int i;
|
int i;
|
||||||
uint16_t irqs;
|
uint16_t irqs;
|
||||||
int irq_num;
|
|
||||||
|
|
||||||
irqs = INTCIRQRR;
|
irqs = INTCIRQRR;
|
||||||
for(i = 0; i< 8; i++) {
|
for(i = 0; i< 8; i++) {
|
||||||
if (channel_ids[i] && (irqs & (1 << i))) {
|
if (channel_ids[i] && (irqs & (1 << i))) {
|
||||||
irq_handler(channel_ids[i], irq_event);
|
irq_handler(channel_ids[i], irq_event);
|
||||||
INTCIRQRR &= ~(1 << i);
|
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) {
|
int gpio_irq_init(gpio_irq_t *obj, PinName pin, gpio_irq_handler handler, uint32_t id) {
|
||||||
|
|
Loading…
Reference in New Issue