60 #define GPIO_PIN_0 0x00000001 // GPIO pin 0 61 #define GPIO_PIN_1 0x00000002 // GPIO pin 1 62 #define GPIO_PIN_2 0x00000004 // GPIO pin 2 63 #define GPIO_PIN_3 0x00000008 // GPIO pin 3 64 #define GPIO_PIN_4 0x00000010 // GPIO pin 4 65 #define GPIO_PIN_5 0x00000020 // GPIO pin 5 66 #define GPIO_PIN_6 0x00000040 // GPIO pin 6 67 #define GPIO_PIN_7 0x00000080 // GPIO pin 7 75 #define GPIO_DIR_MODE_IN 0x00000000 // Pin is a GPIO input 76 #define GPIO_DIR_MODE_OUT 0x00000001 // Pin is a GPIO output 84 #define GPIO_FALLING_EDGE 0x00000000 // Interrupt on falling edge 85 #define GPIO_RISING_EDGE 0x00000004 // Interrupt on rising edge 86 #define GPIO_BOTH_EDGES 0x00000001 // Interrupt on both edges 87 #define GPIO_LOW_LEVEL 0x00000002 // Interrupt on low level 88 #define GPIO_HIGH_LEVEL 0x00000006 // Interrupt on high level 96 #define GPIO_INT_DMA 0x00000100 97 #define GPIO_INT_PIN_0 0x00000001 98 #define GPIO_INT_PIN_1 0x00000002 99 #define GPIO_INT_PIN_2 0x00000004 100 #define GPIO_INT_PIN_3 0x00000008 101 #define GPIO_INT_PIN_4 0x00000010 102 #define GPIO_INT_PIN_5 0x00000020 103 #define GPIO_INT_PIN_6 0x00000040 104 #define GPIO_INT_PIN_7 0x00000080 111 extern void GPIODirModeSet(
unsigned long ulPort,
unsigned char ucPins,
112 unsigned long ulPinIO);
113 extern unsigned long GPIODirModeGet(
unsigned long ulPort,
unsigned char ucPin);
114 extern void GPIOIntTypeSet(
unsigned long ulPort,
unsigned char ucPins,
115 unsigned long ulIntType);
118 extern unsigned long GPIOIntTypeGet(
unsigned long ulPort,
unsigned char ucPin);
119 extern void GPIOIntEnable(
unsigned long ulPort,
unsigned long ulIntFlags);
120 extern void GPIOIntDisable(
unsigned long ulPort,
unsigned long ulIntFlags);
121 extern long GPIOIntStatus(
unsigned long ulPort, tBoolean bMasked);
122 extern void GPIOIntClear(
unsigned long ulPort,
unsigned long ulIntFlags);
124 void (*pfnIntHandler)(
void));
126 extern long GPIOPinRead(
unsigned long ulPort,
unsigned char ucPins);
127 extern void GPIOPinWrite(
unsigned long ulPort,
unsigned char ucPins,
128 unsigned char ucVal);