void Pen_flag() { R_INTC_ControlExtInterrupt( PDL_INTC_IRQ5,PDL_INTC_DISABLE | PDL_INTC_CLEAR_IR_FLAG); R_INTC_CreateExtInterrupt(PDL_INTC_IRQ5,PDL_INTC_LOW ,Pen_flag,1); MainDispaly(); }
void GsmRing() { char err; R_INTC_CreateExtInterrupt(PDL_INTC_NMI,PDL_INTC_RISING|PDL_INTC_LVD_ENABLE,GsmRing,1); Gsm.EvtExpected=EvtGsm; GsmCheckMsg(); }
/****************************************************************************** * Outline : InitialiseSwitchInterrupts * Description : Configures the IRQ pins connected to switches SW1-SW3 to detect * switch presses, and invoke an ISR. * Argument : none * Return value : none ******************************************************************************/ void InitialiseSwitchInterrupts(void) { /* Declare error flag */ bool err = true; /* Reset the switch flag */ gSwitchFlag = 0x00; /* Reset the switch standby ready flag */ gSwitchStandbyReady = true; /* Configure SW1 interrupt */ err &= R_INTC_CreateExtInterrupt ( PDL_INTC_IRQ8, PDL_INTC_FALLING, SW1_InterruptCB, 7 ); /* Configure SW2 interrupt */ err &= R_INTC_CreateExtInterrupt ( PDL_INTC_IRQ9, PDL_INTC_FALLING, SW2_InterruptCB, 7 ); /* Configure SW3 interrupt */ err &= R_INTC_CreateExtInterrupt ( PDL_INTC_IRQ10, PDL_INTC_FALLING, SW3_InterruptCB, 7 ); /* Halt in while loop when RPDL errors detected */ while (!err); }
void Switch_Init(void) { bool err = true; // Select the IRQ pins to be used for interrupts err &= R_INTC_SetExtInterrupt ( PDL_INTC_IRQ1_PORT_3_1|PDL_INTC_IRQ3_PORT_3_3|\ PDL_INTC_IRQ4_PORT_3_4 ); // Configure IRQ1 interrupt (connected to SW1) err &= R_INTC_CreateExtInterrupt ( PDL_INTC_IRQ1, PDL_INTC_FALLING, SW1_InterruptCB, 7 ); // Configure IRQ3 interrupt (connected to SW2) err &= R_INTC_CreateExtInterrupt ( PDL_INTC_IRQ3, PDL_INTC_FALLING, SW2_InterruptCB, 7 ); // Configure IRQ4 interrupt (connected to SW3) err &= R_INTC_CreateExtInterrupt ( PDL_INTC_IRQ4, PDL_INTC_FALLING, SW3_InterruptCB, 7 ); while(!err) ; }
void Init_SmartNavi() { HardwareSetup(); R_TMR_CreateOneShot(PDL_TMR_UNIT0,PDL_TMR_OUTPUT_OFF,1,tick_flag,4); R_INTC_CreateExtInterrupt(PDL_INTC_IRQ5,PDL_INTC_LOW ,Pen_flag,1); // sendtoRTC(); Init_ADS7843(); #ifdef GpsOn getPos(); #endif tone(1); font_index(); font_index1(); LcdInit(); LcdClear(); Gsm_State(); //initialize variable Init_Sim900(); }
void GsmRing() { R_INTC_CreateExtInterrupt(PDL_INTC_NMI,PDL_INTC_RISING|PDL_INTC_LVD_ENABLE,GsmRing,1); GsmCheckMsg(); }