Hi, For our development environment, we are using AM/DM37x EVM (OMAP3530 evm based) and Windows Embedded Compact 7 as OS. Also, BSP_WINCE_ARM_A8_02_30_00_Source version used for driver or OS customization.
I wanted to used one GPIO as interrupt (IRQ line) for the device which attached with the EVM over spi interface. I want to find a dedicated gpio line for this purpose. I read the AM/DM37x TRM, and analysed the source files to find one.
First up all, I took touchscreePdd.cpp example for understanding of configuring the gpio as an interrupt. Here, gpio pin 175 is used as interrupt for TS_nPEN_IRQ. But in the structure, it's assigned a value 'zero' for corresponding gpio.
0, //nPenGPIO and
// Get the IRQ for the GPIO
s_TouchDevice.nPenIRQ = GPIOGetSystemIrq(s_TouchDevice.hGPIO, s_TouchDevice.nPenGPIO);
// IRQ for GPIOs mapping
#define IRQ_GPIO_0 128
DWORD BSPGetGpioIrq(DWORD id)
{
return id + IRQ_GPIO_0;
}
Finally, the irq for gpio is returned as 128. Can I know why this #define IRQ_GPIO_0 128 is assigned. What is the reason for this...I couldn't quite understand this logic.
Best Regards,
Karthick