__interrupt void ADC10_ISR_HOOK(void)
{
    /* USER CODE START (section: ADC10_ISR_HOOK) */
    ADC_ISR();
    __bis_SR_register_on_exit(LPM3_bits);
    /* USER CODE END (section: ADC10_ISR_HOOK) */
}
Esempio n. 2
0
void interrupt INTERRUPT_InterruptManager(void) 
{
    if (PIE1bits.ADIE && PIR1bits.ADIF) 
    {
        ADC_ISR();
    } 
    else if (PIE1bits.TMR1IE && PIR1bits.TMR1IF) 
    {
        TMR1_ISR();
    }     
    else if (PIE3bits.TMR4IE && PIR3bits.TMR4IF) 
    {
        TMR4_ISR();
    } 
    else 
    {        
    }
}
Esempio n. 3
0
void interrupt INTERRUPT_InterruptManager (void)
{
   // interrupt handler
    if(PIE1bits.RC1IE == 1 && PIR1bits.RC1IF == 1)
    {
        EUSART1_Receive_ISR();
    }
    else if(PIE1bits.TX1IE == 1 && PIR1bits.TX1IF == 1)
    {
        EUSART1_Transmit_ISR();
    }
    else if(PIE1bits.ADIE == 1 && PIR1bits.ADIF == 1)
    {
        ADC_ISR();
    }
    else
    {
        //Unhandled Interrupt
    }
}
Esempio n. 4
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
    }
}
Esempio n. 5
0
/* ===================================================================*/
void ADC_DR_OnPortEvent(LDD_TUserData *UserDataPtr)
{
  /* Write your code here ... */
	ADC_ISR();
}
Esempio n. 6
0
bool adc_get_eoc_sequence_flag(uint32_t adc)
{
	return ADC_ISR(adc) & ADC_ISR_EOSEQ;
}
Esempio n. 7
0
void adc_clear_overrun_flag(uint32_t adc)
{
	ADC_ISR(adc) = ADC_ISR_OVR;
}
Esempio n. 8
0
bool adc_get_overrun_flag(uint32_t adc)
{
	return ADC_ISR(adc) & ADC_ISR_OVR;
}
Esempio n. 9
0
void adc_clear_watchdog_flag(uint32_t adc)
{
	ADC_ISR(adc) = ADC_ISR_AWD;
}
Esempio n. 10
0
bool adc_get_watchdog_flag(uint32_t adc)
{
	return ADC_ISR(adc) & ADC_ISR_AWD;
}
Esempio n. 11
0
bool adc_eoc(uint32_t adc)
{
	return ((ADC_ISR(adc) & ADC_ISR_EOC) != 0);
}
Esempio n. 12
0
bool adc_eoc_injected(uint32_t adc)
{
	return ((ADC_ISR(adc) & ADC_ISR_JEOC) != 0);
}
Esempio n. 13
0
bool adc_awd(uint32_t adc)
{
	return (ADC_ISR(adc) & ADC_ISR_AWD1) &&
	       (ADC_ISR(adc) & ADC_ISR_AWD2) &&
	       (ADC_ISR(adc) & ADC_ISR_AWD3);
}
Esempio n. 14
0
void adc_eoc_after_group(uint32_t adc)
{
	ADC_ISR(adc) &= ~ADC_ISR_EOS;
}
Esempio n. 15
0
void adc_eoc_after_each(uint32_t adc)
{
	ADC_ISR(adc) |= ADC_ISR_EOS;
}
Esempio n. 16
0
void adc_clear_overrun_flag(uint32_t adc)
{
/* need to write zero to clear this */
	ADC_ISR(adc) &= ~ADC_ISR_OVR;
}