void interrupt INTERRUPT_InterruptManager (void)
{
   // interrupt handler
//    if(PIE3bits.TX2IE == 1 && PIR3bits.TX2IF == 1)
//    {
//        EUSART2_Transmit_ISR();
//    }
    if(PIE3bits.RC2IE == 1 && PIR3bits.RC2IF == 1)
    {
        EUSART2_Receive_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
    }
}
Ejemplo n.º 2
0
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
    }
}
Ejemplo n.º 3
0
void interrupt INTERRUPT_InterruptManager(void) {
    // interrupt handler
    if (PIE1bits.SSP1IE == 1 && PIR1bits.SSP1IF == 1) {
        I2C1_ISR();
    } else if (PIE2bits.BCL1IE == 1 && PIR2bits.BCL1IF == 1) {
        I2C1_BusCollisionISR();
    } else if (PIE1bits.RC1IE == 1 && PIR1bits.RC1IF == 1) {
        EUSART1_Receive_ISR();
    } else if (PIE1bits.TX1IE == 1 && PIR1bits.TX1IF == 1) {
        EUSART1_Transmit_ISR();
    } else if (PIE1bits.CCP1IE == 1 && PIR1bits.CCP1IF == 1) {
        ECCP1_CaptureISR();
    } else if (PIE2bits.CCP2IE == 1 && PIR2bits.CCP2IF == 1) {
        ECCP2_CaptureISR();
    } else if (PIE1bits.TMR2IE == 1 && PIR1bits.TMR2IF == 1) {
        TMR2_ISR();
    } else if (PIE1bits.ADIE == 1 && PIR1bits.ADIF == 1) {
        ADC_ISR();
    } else {
        //Unhandled Interrupt
    }
}