Hello everyone,
I have a OMAP3530-based board with WinCE6/BSP ARM_A8_01_01. My application needs to use some GPIO pins as IRQs. Would you please give me some tips or sample code on how the application can work with interrupts?
Thanks,
Luan
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello everyone,
I have a OMAP3530-based board with WinCE6/BSP ARM_A8_01_01. My application needs to use some GPIO pins as IRQs. Would you please give me some tips or sample code on how the application can work with interrupts?
Thanks,
Luan
Luan,
I am not quite understand what exactly you want to know.
Is your application a user-mode module, and needs to be notified from a particular GPIO interrupt handling routine?
Or you just want to know how a GPIO line is initialized to use as an interrupt source?
Thanks,
Tao
Hi Tao,
Thanks for the clarification. I am not familiar with WinCe so my question is not clear.
Yes, my application is a user-mode module and needs to be notified from a particular GPIO interrupt handling routine, probably from a driver. How can I issue the notification from the driver and receive it from the application. How can I install the interrupt handling routine in the driver?
Thanks,
Luan
Hi Luan,
One way of implementing GPIO Interrupt to application is...
Create a Event which will be signalled whenever GPIO Interrupt Occurs (This event will be Registered using InterruptInitialize API)
Create another event which is common between application and the driver. This event has to be signalled by the driver whenever GPIO Interrupt occurs
Some part of code might be
In Kernel Driver
CreateEvent(GPIOEvt)
GetSyIntr()
InterruptInitialize()
CreateThread (For creating a Interrupt Thread GPIOThrd)
In Your kernel Driver create a named event (UserNotifyGPIOEvt).
In application also create the event with the same name
GPIOThrd in the kernel driver
WaitForSIngleObject (GPIOEvt)
SetEvent (UserNotifyGPIOEvt)
Thank You & Regards,
GSr