EDF - OnePIC MCU  v1.1.0
source/8bit/OnePIC_8bit_isr.c
Go to the documentation of this file.
00001 
00008 #include "OnePIC_isr.h"
00009 #include "OnePIC_int.h"
00010 #include "OnePIC_timer.h"
00011 #include "OnePIC_i2c.h"
00012 #include "mTouchCVD.h"
00013 #include <htc.h>
00014 
00015 #ifndef WIRELESS_DEMO
00016 
00020 #include "OnePIC_led.h"
00021 #include "OnePIC_mtouch.h"
00022 extern uint8_t _pbState;
00023 void interrupt ISR(void) {
00024 
00025     //mTouch Interrupt
00026     if (EDF_INT_SourceFlagGet(INT_TMR_2) && EDF_INT_SourceEnableGet(INT_TMR_2)) {
00027         mTouch_Scan();
00028         EDF_mTouchPoll();
00029         EDF_TMR_CounterSet(TMR_2, 50);
00030         EDF_INT_SourceFlagClear(INT_TMR_2);
00031     }
00032 
00033     //I2C interrupt
00034     if (EDF_INT_SourceFlagGet(INT_SSP)) {
00035         ISR_i2c();
00036         EDF_INT_SourceFlagClear(INT_SSP);
00037     }
00038 }
00039 #endif
00040