Skip to content

Commit 575f9c2

Browse files
committed
Fix NRF51, NRF52 gpio_irq_init() function
Acording to the description in `gpio_irq_hal_api.h` file `gpio_irq_init()` should return 0 on success. Currently, it returns 1 causing the FPGA test to fail.
1 parent 236c336 commit 575f9c2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF51/gpio_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ int gpio_irq_init(gpio_irq_t *obj, PinName pin, gpio_irq_handler handler, uint32
216216
m_channel_ids[pin] = id;
217217

218218
gpio_apply_config(pin);
219-
return 1;
219+
return 0;
220220
}
221221

222222

targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/gpio_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ int gpio_irq_init(gpio_irq_t *obj, PinName pin, gpio_irq_handler handler, uint32
217217
m_channel_ids[pin] = id;
218218

219219
gpio_apply_config(pin);
220-
return 1;
220+
return 0;
221221
}
222222

223223

0 commit comments

Comments
 (0)