/**************************************************************************** * * Prototype: interrupt void INTERRUPT_InterruptManager (void) * * Input: none * Output: none * Description: Main interrupt service routine. Calls module interrupt handlers. * Usage: INTERRUPT_InterruptManager(); * ***************************************************************************/ void interrupt INTERRUPT_InterruptManager (void) { // interrupt handler if(INTCONbits.IOCIE == 1 && INTCONbits.IOCIF == 1) { PIN_MANAGER_IOC(); } else if(INTCONbits.TMR0IE == 1 && INTCONbits.TMR0IF == 1) { TMR0_ISR(); } else if(PIE1bits.TMR1IE == 1 && PIR1bits.TMR1IF == 1) { TMR1_ISR(); } // else if(PIE1bits.SSPIE == 1 && PIR1bits.SSPIF == 1) // { // I2C_ISR(); // } else if(PIE2bits.BCLIE == 1 && PIR2bits.BCLIF == 1) { I2C_BusCollisionISR(); } else { //Unhandled Interrupt putstring0("unhandled interrupt"); } }
void interrupt INTERRUPT_InterruptManager (void) { // interrupt handler if(INTCONbits.TMR0IE == 1 && INTCONbits.TMR0IF == 1) { TMR0_ISR(); } else if(PIE2bits.BCL1IE == 1 && PIR2bits.BCL1IF == 1) { I2C1_BusCollisionISR(); } else if(PIE1bits.SSP1IE == 1 && PIR1bits.SSP1IF == 1) { I2C1_ISR(); } else if(PIE1bits.TX1IE == 1 && PIR1bits.TX1IF == 1) { EUSART1_Transmit_ISR(); } else if(PIE1bits.RC1IE == 1 && PIR1bits.RC1IF == 1) { EUSART1_Receive_ISR(); } else { //Unhandled Interrupt } }
void interrupt low_priority INTERRUPT_InterruptManagerLow(void) { // interrupt handler if (PIE1bits.TXIE == 1 && PIR1bits.TXIF == 1) { EUSART_Transmit_ISR(); } if (PIE1bits.RCIE == 1 && PIR1bits.RCIF == 1) { EUSART_Receive_ISR(); } if (INTCONbits.TMR0IE == 1 && INTCONbits.TMR0IF == 1) { TMR0_ISR(); } }
void interrupt INTERRUPT_InterruptManager(void) { // interrupt handler if (PIE1bits.TMR2IE == 1 && PIR1bits.TMR2IF == 1) { TMR2_ISR(); } else if (PIE1bits.SSPIE == 1 && PIR1bits.SSPIF == 1) { I2C_ISR(); } else if (INTCONbits.TMR0IE == 1 && INTCONbits.TMR0IF == 1) { TMR0_ISR(); } else { //Unhandled Interrupt } }
//ISR void interrupt ISR(void)// interrupt 0 // ISR (Interrupt Service Routines) { IOC_ISR(); TMR0_ISR(); TMR1_ISR(); // TMR2_ISR(); INT_ISR(); UART_ISR(); I2C_ISR(); }
void interrupt INTERRUPT_InterruptManager (void) { // interrupt handler if(INTCONbits.TMR0IE == 1 && INTCONbits.TMR0IF == 1) { TMR0_ISR(); } else if(PIE1bits.SSPIE == 1 && PIR1bits.SSPIF == 1) { I2C_ISR(); } else if(PIE1bits.RCIE == 1 && PIR1bits.RCIF == 1) { EUSART_Receive_ISR(); } else if(PIE1bits.TXIE == 1 && PIR1bits.TXIF == 1) { EUSART_Transmit_ISR(); } else { //Unhandled Interrupt } }