I am trying to implement the PSP GPIO driver on my OMAP-L138 application using DSPBIOS. I am getting confused with the documentation and example code. Please explain the following:
1. The header file in gpioSample_main.c says :
This example demonstrates the use of GPIO driver/module. The sample does this by taking input on GPIO pin GPIO0_4(configured as input pin), via an MMCSD card inserted in the MMCSD slot.
You then define the following:
#define GPIO_BANK_0 0x00
#define GPIO_BANK_4 4u
#define GPIO4_0_PIN 65u
and then set the parameters in main
Void main (Void)
{
Gpio_Params gpioParams = Gpio_PARAMS;
/* update the gpio parameters to our needs */
gpioParams.instNum = 0;
gpioParams.BankParams[GPIO_BANK_4].inUse = Gpio_InUse_No;
gpioParams.BankParams[GPIO_BANK_4].hwiNum = 8u;
gpioParams.BankParams[GPIO_BANK_4].PinConfInfo[0].inUse = Gpio_InUse_No;
which appear to be using bank 4, pin zero, not bank zero pin 4 as the header says.
2. What does GPIO4_0_PIN define? It appears to be the EVT number for GPIO bank 4 (EVT 65, OMAP-L138 data sheet, page 104, table 6-8). What does this have to do with a pin number since EVTs are for the entire bank?
3. Where can I find the documentation for the definition of the "Gpio_PinCmdArg". It does not appear in the PSP User Guide, and the only "definition" given in the doxygen document is :
.....what does "value" represent?
Thx,
MikeH