void CommonHandler(registers_t regs) { // Because I use the interrupt handler for the same as the // IRQ handler, we have to handle it here in C. if (!regs.is_irq) ISRHandler(regs); else IRQHandler(regs); }
void CommonHandler(registers_t regs) { // printf("Received interrupt: 0x%X (%d)\n", regs.int_no, regs.int_no); // Because I use the interrupt handler for the same as the // IRQ handler, we have to handle it here in C. if (!regs.is_irq) ISRHandler(regs); else IRQHandler(regs); }
void EUSCIB3_IRQHandler(void) { // Send a STOP if we're done in request mode // This is done here as triggering the interrupt takes too long if ( MAP_I2C_getInterruptStatus(EUSCI_B3_BASE, EUSCI_B_I2C_RECEIVE_INTERRUPT0) && (EUSCIB3_rxBufferIndex == EUSCIB3_rxBufferSize - 1) && EUSCIB3_rxBufferIndex != 0) { MAP_I2C_masterReceiveMultiByteStop(EUSCI_B3_BASE); } IRQParam param; param.module = EUSCI_B3_BASE; param.rxBuffer = EUSCIB3_rxBuffer; param.rxBufferIndex = &EUSCIB3_rxBufferIndex; param.rxBufferSize = &EUSCIB3_rxBufferSize; param.txBuffer = EUSCIB3_txBuffer; param.txBufferIndex = &EUSCIB3_txBufferIndex; param.txBufferSize = &EUSCIB3_txBufferSize; IRQHandler(param); }