Solar panel
Loading...
Searching...
No Matches
interrupt_manager.c
Go to the documentation of this file.
1
26/*
27 (c) 2018 Microchip Technology Inc. and its subsidiaries.
28
29 Subject to your compliance with these terms, you may use Microchip software and any
30 derivatives exclusively with Microchip products. It is your responsibility to comply with third party
31 license terms applicable to your use of third party software (including open source software) that
32 may accompany Microchip software.
33
34 THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
35 EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
36 IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
37 FOR A PARTICULAR PURPOSE.
38
39 IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
40 INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
41 WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
42 HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
43 THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
44 CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
45 OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
46 SOFTWARE.
47*/
48
49#include "interrupt_manager.h"
50#include "mcc.h"
51
53{
54 // Disable Interrupt Priority Vectors (16CXXX Compatibility Mode)
55 RCONbits.IPEN = 0;
56}
57
58void __interrupt() INTERRUPT_InterruptManager (void)
59{
60 // interrupt handler
61 if(INTCONbits.TMR0IE == 1 && INTCONbits.TMR0IF == 1)
62 {
63 TMR0_ISR();
64 }
65 else if(INTCONbits.PEIE == 1)
66 {
67 if(PIE1bits.RC1IE == 1 && PIR1bits.RC1IF == 1)
68 {
70 }
71 else
72 {
73 //Unhandled Interrupt
74 }
75 }
76 else
77 {
78 //Unhandled Interrupt
79 }
80}
void(* EUSART1_RxDefaultInterruptHandler)(void)
Definition: eusart1.c:73
void INTERRUPT_Initialize(void)
void __interrupt() INTERRUPT_InterruptManager(void)
void TMR0_ISR(void)
Definition: tmr0.c:136