mbed library sources
Dependents: frdm_kl05z_gpio_test
Fork of mbed-src by
Diff: targets/hal/TARGET_Freescale/TARGET_KL46Z/gpio_irq_api.c
- Revision:
- 35:371630885ad6
- Parent:
- 31:42176bc3c368
- Child:
- 69:49e45cb70de1
diff -r a3c7023e45de -r 371630885ad6 targets/hal/TARGET_Freescale/TARGET_KL46Z/gpio_irq_api.c --- a/targets/hal/TARGET_Freescale/TARGET_KL46Z/gpio_irq_api.c Fri Oct 11 13:30:08 2013 +0100 +++ b/targets/hal/TARGET_Freescale/TARGET_KL46Z/gpio_irq_api.c Mon Oct 21 11:45:04 2013 +0100 @@ -143,3 +143,19 @@ // Interrupt configuration and clear interrupt port->PCR[obj->pin] = (port->PCR[obj->pin] & ~PORT_PCR_IRQC_MASK) | irq_settings | PORT_PCR_ISF_MASK; } + +void gpio_irq_enable(gpio_irq_t *obj) { + if (obj->port == PortA) { + NVIC_EnableIRQ(PORTA_IRQn); + } else if (obj->port == PortD) { + NVIC_EnableIRQ(PORTD_IRQn); + } +} + +void gpio_irq_disable(gpio_irq_t *obj) { + if (obj->port == PortA) { + NVIC_DisableIRQ(PORTA_IRQn); + } else if (obj->port == PortD) { + NVIC_DisableIRQ(PORTD_IRQn); + } +}