Can anyone point me to the details of the following GPIO functions in what they actually do and/or the why's and when's I need them? I see them used in the SDController.cpp program but I am not sure what some of them they are doing, or how I need to use them when using the GPIOInterruptInitialize() routine.
The ceddk.dll contains these of GPIO functions that I am using to manipulate GPIO lines...specifically setting up the GPIO lines to be a interrupt using the GPIOInterruptInitialize() function.
(These are self explaining and appear to be accessible in User mode)
GPIOOpen Retrieve an handle on the GPIO driver
GPIOClose Close the GPIO driver when done using
GPIOSetBit Set the output to high level
GPIOClrBit Set the output to low level
GPIOGetBit Read the level of the input
GPIOSetMode Configure GPIO mode
GPIOGetMode Read GPIO mode
GPIOPullup Enable/disable the pull-up on the GPIO
GPIOPulldown Enable/disable the pull-down on the GPIO
These, on the other hand, look to be kernel mode routines and are the one I need help on understanding what they do and how they tie in with the GPIOInterruptInitialize() routine.
GPIOInterruptInitialize Hook up an interrupt event to the GPIO (I understand this one)
GPIOInterruptMask Mask/unmask the GPIO’s interrupt
GPIOInterruptDisable Disable the interrupt event when no longer needed
GPIOInterruptDone Function to call when done processing a GPIO interrupt
GPIOGetSystemIrq Retrieve the IRQ number corresponding to a GPIO ID
GPIOInterruptWakeUp Register the GPIO as a wake up source for the system
Could someone point out the details of how these function work?
In my application, I need eight(8) GPIO inputs to act as interrupts. Am I going to be able to initialize all 8 lines as being interrupts with the GPIOInterruptInitialize() command, then use the other commands to disable or enable the GPIO lines as I need them?
I essentially will have up to 8 hardware modules attached to my system and each will toggle a specific GPIO line, once it completes the task it was assigned. For example, one module is a analog input module, and when I issue a Convert command to read the analog input, a GPIO line on that module toggles when the conversion is complete.
Thanks.