1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

kinetis: Add support for combined GPIO PORTC,D IRQs

Used in KL43 and others
This commit is contained in:
Joakim Nohlgård 2018-04-24 18:48:52 +02:00 committed by Benjamin Valentin
parent 945bf114b8
commit 9ea0ceca9c
4 changed files with 13 additions and 1 deletions

View File

@ -134,6 +134,7 @@ void isr_portc(void); /**< Port C pin detect interrupt handler */
void isr_portd(void); /**< Port D pin detect interrupt handler */
void isr_porte(void); /**< Port E pin detect interrupt handler */
void isr_portb_portc(void); /**< Port B, C combined pin detect interrupt handler */
void isr_portc_portd(void); /**< Port C, D combined pin detect interrupt handler */
void isr_radio_0(void); /**< Radio transceiver INT0 interrupt handler */
void isr_radio_1(void); /**< Radio transceiver INT1 interrupt handler */
void isr_rng(void); /**< RNG interrupt handler */

View File

@ -180,6 +180,7 @@ WEAK_DEFAULT void isr_portc(void);
WEAK_DEFAULT void isr_portd(void);
WEAK_DEFAULT void isr_porte(void);
WEAK_DEFAULT void isr_portb_portc(void);
WEAK_DEFAULT void isr_portc_portd(void);
WEAK_DEFAULT void isr_radio_0(void);
WEAK_DEFAULT void isr_radio_1(void);
WEAK_DEFAULT void isr_rng(void);

View File

@ -412,4 +412,12 @@ void isr_portb_portc(void)
cortexm_isr_end();
}
#endif
#if defined(PORTC_BASE) && defined(PORTD_BASE)
/* Combined ISR used in certain KL devices */
void isr_portc_portd(void)
{
irq_handler(PORTC, 2);
irq_handler(PORTD, 3);
}
#endif
#endif /* MODULE_PERIPH_GPIO_IRQ */

View File

@ -319,8 +319,10 @@ ISR_VECTOR(1) const isr_t vector_cpu[CPU_IRQ_NUMOF] = {
[PORTA_IRQn ] = isr_porta, /* Port A interrupt */
#endif
#ifdef KINETIS_CORE_Z
#if defined(PORTB) && defined(PORTC)
#if defined(PORTB) && defined(PORTC) && !defined(PORTD)
[PORTB_PORTC_IRQn] = isr_portb_portc, /* Port B, C combined interrupt */
#elif defined(PORTC) && defined(PORTD)
[PORTC_PORTD_IRQn] = isr_portc_portd, /* Port C, D combined interrupt */
#endif
#else
#ifdef PORTB