This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP432E401Y: Passing argument to ISR

Part Number: MSP432E401Y


Hi, I was wondering how I can pass an argument to my UART ISR

I would like to access the object coordinator but I cant seem to unless I construct the object outside of my main loop

extern "C" void UART0_IRQHandler(void)
{
uint32_t ui32StatusA;
uint32_t ui32Status;

//
// Get the interrrupt status.
//
ui32StatusA = UARTIntStatus(UART0_BASE, true);
ui32Status = UARTIntStatus(UART0_BASE, true);

if((ui32StatusA & UART_INT_RX) == UART_INT_RX){
char byte = UARTCharGetNonBlocking(UART0_BASE);
coordinator.modemManager.buffer.push(byte);
UARTIntClear(UART0_BASE, UART_INT_RX);
}
else if((ui32Status & UART_INT_TX) == UART_INT_TX){
coordinator.modemManager.sendNextByte();
UARTIntClear(UART0_BASE, UART_INT_TX);

}

}