/* ** =================================================================== ** Event : SW3_OnInterrupt (module Events) ** ** Component : SW3 [ExtInt] ** Description : ** This event is called when an active signal edge/level has ** occurred. ** Parameters : None ** Returns : Nothing ** =================================================================== */ void SW3_OnInterrupt(void) { #ifdef PL_HAS_KBI if (PORT_PDD_GetPinInterruptFlag(PORTA_BASE_PTR, ExtIntLdd3_PIN_INDEX)) { PORT_PDD_ClearPinInterruptFlag(PORTA_BASE_PTR, ExtIntLdd3_PIN_INDEX); KEY_OnInterrupt(KEY_BTN3); } #endif }
/* ** =================================================================== ** Method : ExtIntLdd5_Interrupt (component ExtInt_LDD) ** ** Description : ** The method services the interrupt of the selected peripheral(s) ** and eventually invokes event(s) of the component. ** This method is internal. It is used by Processor Expert only. ** =================================================================== */ void ExtIntLdd5_Interrupt(void) { /* {Default RTOS Adapter} ISR parameter is passed through the global variable */ ExtIntLdd5_TDeviceDataPtr DeviceDataPrv = INT_PORTE__DEFAULT_RTOS_ISRPARAM; /* Check the pin interrupt flag of the shared interrupt */ if (PORT_PDD_GetPinInterruptFlag(PORTE_BASE_PTR, ExtIntLdd5_PIN_INDEX)) { /* Clear the interrupt flag */ PORT_PDD_ClearPinInterruptFlag(PORTE_BASE_PTR, ExtIntLdd5_PIN_INDEX); /* Call OnInterrupt event */ ExtIntLdd5_OnInterrupt(DeviceDataPrv->UserData); } }
/* ** =================================================================== ** Event : SW3_OnInterrupt (module Events) ** ** Component : SW3 [ExtInt] ** Description : ** This event is called when an active signal edge/level has ** occurred. ** Parameters : None ** Returns : Nothing ** =================================================================== */ void SW3_OnInterrupt(void) { #if PL_HAS_KBI #if 1 /* Problem with Processor Expert and sharing PTA4/NMI interrupt: code below is missing in ExtIntLdd3_OnInterrupt() */ /* Check the pin interrupt flag of the shared interrupt */ if (PORT_PDD_GetPinInterruptFlag(PORTA_BASE_PTR, ExtIntLdd4_PIN_INDEX)) { /* Clear the interrupt flag */ PORT_PDD_ClearPinInterruptFlag(PORTA_BASE_PTR, ExtIntLdd4_PIN_INDEX); /* call user event */ KEY_OnInterrupt(KEY_BTN3); } #else if (KEY3_Get()) { KEY_OnInterrupt(KEY_BTN3); } #endif #endif }
/* ** =================================================================== ** Method : ExtIntLdd7_Interrupt (component ExtInt_LDD) ** ** Description : ** The method services the interrupt of the selected peripheral(s) ** and eventually invokes event(s) of the component. ** This method is internal. It is used by Processor Expert only. ** =================================================================== */ void ExtIntLdd7_Interrupt(void) { /* {Default RTOS Adapter} ISR parameter is passed through the global variable */ ExtIntLdd7_TDeviceDataPtr DeviceDataPrv = INT_PORTD__DEFAULT_RTOS_ISRPARAM; /* Check if device is disabled */ if( !DeviceDataPrv->UserEnabled ){ return; } /* Check the pin interrupt flag of the shared interrupt */ if (PORT_PDD_GetPinInterruptFlag(ExtIntLdd7_PORTCONTROL_BASE_ADDRESS, ExtIntLdd7_PIN_INDEX)) { /* Clear the interrupt flag */ PORT_PDD_ClearPinInterruptFlag(ExtIntLdd7_PORTCONTROL_BASE_ADDRESS, ExtIntLdd7_PIN_INDEX); /* Call OnInterrupt event */ ExtIntLdd7_OnInterrupt(DeviceDataPrv->UserData); } }
void testa4() { if (PORT_PDD_GetPinInterruptFlag(PORTD_BASE_PTR, 3) ) { COLUNA_PutVal(0b110); if (GPIO_PDD_GetPortDataInput(LINHA_DEVICE) & GPIO_PIN(3)) { COLUNA_PutVal(0b101); if (GPIO_PDD_GetPortDataInput (LINHA_DEVICE) & GPIO_PIN(3)) { COLUNA_PutVal(0b011); if (GPIO_PDD_GetPortDataInput(LINHA_DEVICE) & GPIO_PIN(3)) { keypad_valor = '!'; } else { keypad_valor = '*'; } } else { keypad_valor = '0'; } } else { keypad_valor = '#'; } COLUNA_PutVal(0b000); PORT_PDD_ClearPinInterruptFlag(PORTD_BASE_PTR, 3); } }