__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) */ }
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 { } }
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 } }
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 } }
/* ===================================================================*/ void ADC_DR_OnPortEvent(LDD_TUserData *UserDataPtr) { /* Write your code here ... */ ADC_ISR(); }
bool adc_get_eoc_sequence_flag(uint32_t adc) { return ADC_ISR(adc) & ADC_ISR_EOSEQ; }
void adc_clear_overrun_flag(uint32_t adc) { ADC_ISR(adc) = ADC_ISR_OVR; }
bool adc_get_overrun_flag(uint32_t adc) { return ADC_ISR(adc) & ADC_ISR_OVR; }
void adc_clear_watchdog_flag(uint32_t adc) { ADC_ISR(adc) = ADC_ISR_AWD; }
bool adc_get_watchdog_flag(uint32_t adc) { return ADC_ISR(adc) & ADC_ISR_AWD; }
bool adc_eoc(uint32_t adc) { return ((ADC_ISR(adc) & ADC_ISR_EOC) != 0); }
bool adc_eoc_injected(uint32_t adc) { return ((ADC_ISR(adc) & ADC_ISR_JEOC) != 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); }
void adc_eoc_after_group(uint32_t adc) { ADC_ISR(adc) &= ~ADC_ISR_EOS; }
void adc_eoc_after_each(uint32_t adc) { ADC_ISR(adc) |= ADC_ISR_EOS; }
void adc_clear_overrun_flag(uint32_t adc) { /* need to write zero to clear this */ ADC_ISR(adc) &= ~ADC_ISR_OVR; }