40#ifndef __DRIVERLIB_GPIO_H__
41#define __DRIVERLIB_GPIO_H__
60#define GPIO_PIN_0 0x00000001
61#define GPIO_PIN_1 0x00000002
62#define GPIO_PIN_2 0x00000004
63#define GPIO_PIN_3 0x00000008
64#define GPIO_PIN_4 0x00000010
65#define GPIO_PIN_5 0x00000020
66#define GPIO_PIN_6 0x00000040
67#define GPIO_PIN_7 0x00000080
75#define GPIO_DIR_MODE_IN 0x00000000
76#define GPIO_DIR_MODE_OUT 0x00000001
77#define GPIO_DIR_MODE_HW 0x00000002
85#define GPIO_FALLING_EDGE 0x00000000
86#define GPIO_RISING_EDGE 0x00000004
87#define GPIO_BOTH_EDGES 0x00000001
88#define GPIO_LOW_LEVEL 0x00000002
89#define GPIO_HIGH_LEVEL 0x00000006
90#define GPIO_DISCRETE_INT 0x00010000
98#define GPIO_STRENGTH_2MA 0x00000001
99#define GPIO_STRENGTH_4MA 0x00000002
100#define GPIO_STRENGTH_6MA 0x00000065
101#define GPIO_STRENGTH_8MA 0x00000066
102#define GPIO_STRENGTH_8MA_SC 0x0000006E
103#define GPIO_STRENGTH_10MA 0x00000075
104#define GPIO_STRENGTH_12MA 0x00000077
112#define GPIO_PIN_TYPE_STD 0x00000008
113#define GPIO_PIN_TYPE_STD_WPU 0x0000000A
114#define GPIO_PIN_TYPE_STD_WPD 0x0000000C
115#define GPIO_PIN_TYPE_OD 0x00000009
116#define GPIO_PIN_TYPE_ANALOG 0x00000000
117#define GPIO_PIN_TYPE_WAKE_HIGH 0x00000208
118#define GPIO_PIN_TYPE_WAKE_LOW 0x00000108
126#define GPIO_INT_PIN_0 0x00000001
127#define GPIO_INT_PIN_1 0x00000002
128#define GPIO_INT_PIN_2 0x00000004
129#define GPIO_INT_PIN_3 0x00000008
130#define GPIO_INT_PIN_4 0x00000010
131#define GPIO_INT_PIN_5 0x00000020
132#define GPIO_INT_PIN_6 0x00000040
133#define GPIO_INT_PIN_7 0x00000080
134#define GPIO_INT_DMA 0x00000100
141extern void GPIODirModeSet(uint32_t ui32Port, uint8_t ui8Pins,
143extern uint32_t GPIODirModeGet(uint32_t ui32Port, uint8_t ui8Pin);
144extern void GPIOIntTypeSet(uint32_t ui32Port, uint8_t ui8Pins,
145 uint32_t ui32IntType);
146extern uint32_t GPIOIntTypeGet(uint32_t ui32Port, uint8_t ui8Pin);
147extern void GPIOPadConfigSet(uint32_t ui32Port, uint8_t ui8Pins,
148 uint32_t ui32Strength, uint32_t ui32PadType);
149extern void GPIOPadConfigGet(uint32_t ui32Port, uint8_t ui8Pin,
150 uint32_t *pui32Strength, uint32_t *pui32PadType);
151extern void GPIOIntEnable(uint32_t ui32Port, uint32_t ui32IntFlags);
152extern void GPIOIntDisable(uint32_t ui32Port, uint32_t ui32IntFlags);
153extern uint32_t GPIOIntStatus(uint32_t ui32Port,
bool bMasked);
154extern void GPIOIntClear(uint32_t ui32Port, uint32_t ui32IntFlags);
155extern void GPIOIntRegister(uint32_t ui32Port,
void (*pfnIntHandler)(
void));
156extern void GPIOIntUnregister(uint32_t ui32Port);
157extern void GPIOIntRegisterPin(uint32_t ui32Port, uint32_t ui32Pin,
158 void (*pfnIntHandler)(
void));
159extern void GPIOIntUnregisterPin(uint32_t ui32Port, uint32_t ui32Pin);
160extern int32_t GPIOPinRead(uint32_t ui32Port, uint8_t ui8Pins);
161extern void GPIOPinWrite(uint32_t ui32Port, uint8_t ui8Pins, uint8_t ui8Val);
162extern void GPIOPinConfigure(uint32_t ui32PinConfig);
163extern void GPIOPinTypeADC(uint32_t ui32Port, uint8_t ui8Pins);
164extern void GPIOPinTypeCAN(uint32_t ui32Port, uint8_t ui8Pins);
165extern void GPIOPinTypeComparator(uint32_t ui32Port, uint8_t ui8Pins);
166extern void GPIOPinTypeComparatorOutput(uint32_t ui32Port, uint8_t ui8Pins);
167extern void GPIOPinTypeDIVSCLK(uint32_t ui32Port, uint8_t ui8Pins);
168extern void GPIOPinTypeEPI(uint32_t ui32Port, uint8_t ui8Pins);
169extern void GPIOPinTypeEthernetLED(uint32_t ui32Port, uint8_t ui8Pins);
170extern void GPIOPinTypeEthernetMII(uint32_t ui32Port, uint8_t ui8Pins);
171extern void GPIOPinTypeGPIOInput(uint32_t ui32Port, uint8_t ui8Pins);
172extern void GPIOPinTypeGPIOOutput(uint32_t ui32Port, uint8_t ui8Pins);
173extern void GPIOPinTypeGPIOOutputOD(uint32_t ui32Port, uint8_t ui8Pins);
174extern void GPIOPinTypeHibernateRTCCLK(uint32_t ui32Port, uint8_t ui8Pins);
175extern void GPIOPinTypeI2C(uint32_t ui32Port, uint8_t ui8Pins);
176extern void GPIOPinTypeI2CSCL(uint32_t ui32Port, uint8_t ui8Pins);
177extern void GPIOPinTypeLCD(uint32_t ui32Port, uint8_t ui8Pins);
178extern void GPIOPinTypeOneWire(uint32_t ui32Port, uint8_t ui8Pins);
179extern void GPIOPinTypePWM(uint32_t ui32Port, uint8_t ui8Pins);
180extern void GPIOPinTypeQEI(uint32_t ui32Port, uint8_t ui8Pins);
181extern void GPIOPinTypeSSI(uint32_t ui32Port, uint8_t ui8Pins);
182extern void GPIOPinTypeTimer(uint32_t ui32Port, uint8_t ui8Pins);
183extern void GPIOPinTypeTrace(uint32_t ui32Port, uint8_t ui8Pins);
184extern void GPIOPinTypeUART(uint32_t ui32Port, uint8_t ui8Pins);
185extern void GPIOPinTypeUSBAnalog(uint32_t ui32Port, uint8_t ui8Pins);
186extern void GPIOPinTypeUSBDigital(uint32_t ui32Port, uint8_t ui8Pins);
187extern void GPIOPinTypeWakeHigh(uint32_t ui32Port, uint8_t ui8Pins);
188extern void GPIOPinTypeWakeLow(uint32_t ui32Port, uint8_t ui8Pins);
189extern uint32_t GPIOPinWakeStatus(uint32_t ui32Port);
190extern void GPIODMATriggerEnable(uint32_t ui32Port, uint8_t ui8Pins);
191extern void GPIODMATriggerDisable(uint32_t ui32Port, uint8_t ui8Pins);
192extern void GPIOADCTriggerEnable(uint32_t ui32Port, uint8_t ui8Pins);
193extern void GPIOADCTriggerDisable(uint32_t ui32Port, uint8_t ui8Pins);
194extern void GPIOUnlockPin(uint32_t ui32Port, uint8_t ui8Pins);