Skip to content

Commit 7598b05

Browse files
Enable not checking against 0 or 1.
1 parent 1573405 commit 7598b05

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

targets/TARGET_ONSEMI/TARGET_NCS36510/gpio_irq_api.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,10 +207,10 @@ void gpio_irq_set(gpio_irq_t *obj, gpio_irq_event event, uint32_t enable)
207207
break;
208208
}
209209
/* Enable the IRQ based on enable parameter */
210-
if (enable == 1) {
210+
if (enable) {
211211

212212
obj->GPIOMEMBASE->IRQ_ENABLE_SET = obj->pinMask;
213-
} else if (enable == 0) {
213+
} else {
214214

215215
obj->GPIOMEMBASE->IRQ_ENABLE_CLEAR = obj->pinMask;
216216
}

0 commit comments

Comments
 (0)