Hello, I am using s32k142 with freertos (ARM CM4), and i have configured an interrupt on one of the pins (falling edge), and i want to pass an argument for the ISR like this:
intc_register_handler(PORTC_IRQn, (isr_t)port_c_isr, &board);
instead of this:
intc_register_handler(PORTC_IRQn, (isr_t)port_c_isr, NULL);
But the problem is that in the definition of intc_register_handler
the parameter is not handled:
void intc_register_handler(unsigned long irq, const isr_t handler, /*@unused@*/ void *priv)
{
int sirq = (int)irq;
/*@-noeffect@*/
(void)priv;
/*@=noeffect@*/
__VECTOR_RAM[sirq + 16] = (uint32_t)handler;
}
When i saw in other projects that we have which are using MPC57xx, it is done this way:
void intc_register_handler(unsigned long irq, const isr_t handler, void *priv)
{
__VECTOR_RAM[irq] = (uint32_t)handler;
__VECTOR_PRIVATE[irq] = priv;
}
and __VECTOR_PRIVATE
is defined in the FreeRtos port like this:
/* __VECTOR_PRIVATE for interrupt management
* used by vPortISRHandler
*/
void *__VECTOR_PRIVATE[NUMBER_OF_INT_VECTORS];
Is there some similar way to do it for CM4 ?
Thank you