Hi Everyone,
I need to Trigger my GPIO Interrupts through a Software call . How do I do this?
My Code Below:
void PortJIntHandler(void) { uint32_t delay=0; GPIOIntClear(GPIO_PORTJ_BASE, GPIO_INT_PIN_0); GPIOPinWrite(GPIO_PORTN_BASE, GPIO_PIN_1, (GPIOPinRead(GPIO_PORTN_BASE, GPIO_PIN_1) ^ GPIO_PIN_1)); for(delay=0;delay<10000;delay++); //some delay } void interrupt_initialise(void) { /* Configure the switch on the left of the launchpad, SW1 to a input with internal pull-up. */ GPIOPinTypeGPIOInput(GPIO_PORTJ_BASE, GPIO_PIN_0); GPIOPadConfigSet(GPIO_PORTJ_BASE ,GPIO_PIN_0,GPIO_STRENGTH_2MA,GPIO_PIN_TYPE_STD_WPU); GPIOIntDisable(GPIO_PORTJ_BASE, GPIO_INT_PIN_0); GPIOIntTypeSet(GPIO_PORTJ_BASE,GPIO_PIN_0,GPIO_FALLING_EDGE); GPIOIntRegister(GPIO_PORTJ_BASE,PortJIntHandler); for(g_ui32delay=0;g_ui32delay<10000;g_ui32delay++); //some delay GPIOIntEnable(GPIO_PORTJ_BASE, GPIO_INT_PIN_0); for(g_ui32delay=0;g_ui32delay<25000;g_ui32delay++); //some delay } int main(void) { PinoutSet(); ROM_IntMasterEnable(); interrupt_initialise(); while(1) { SysCtlDelay(16000000); IntTrigger(INT_GPIOJ | GPIO_INT_PIN_0); //I Need to call the Interrupt here!!! } }
Thanks for the Help in advance...
Regards,
Girish.