unsigned long GPIODirModeGet (unsigned long ulPort, unsigned char ucPin) void GPIODirModeSet (unsigned long ulPort, unsigned char ucPins, unsigned long ulPinIO) unsigned long GPIOIntTypeGet (unsigned long ulPort, unsigned char ucPin) void GPIOIntTypeSet (unsigned long ulPort, unsigned char ucPins, unsigned long ulIntType) void GPIOPadConfigGet (unsigned long ulPort, unsigned char ucPin, unsigned pulStrength, unsigned long pulPinType) void GPIOPadConfigSet (unsigned long ulPort, unsigned char ucPins, unsigned long Strength, unsigned long ulPinType) void GPIOPinIntClear (unsigned long ulPort, unsigned char ucPins) void GPIOPinIntDisable (unsigned long ulPort, unsigned char ucPins) void GPIOPinIntEnable (unsigned long ulPort, unsigned char ucPins) long GPIOPinIntStatus (unsigned long ulPort, tBoolean bMasked) long GPIOPinRead (unsigned long ulPort, unsigned char ucPins) void GPIOPinTypeADC (unsigned long ulPort, unsigned char ucPins) void GPIOPinTypeCAN (unsigned long ulPort, unsigned char ucPins) void GPIOPinTypeComparator (unsigned long ulPort, unsigned char ucPins) void GPIOPinTypeGPIOInput (unsigned long ulPort, unsigned char ucPins) void GPIOPinTypeGPIOOutput (unsigned long ulPort, unsigned char ucPins) void GPIOPinTypeGPIOOutputOD (unsigned long ulPort, unsigned char ucPins) void GPIOPinTypeI2C (unsigned long ulPort, unsigned char ucPins) void GPIOPinTypePWM (unsigned long ulPort, unsigned char ucPins) void GPIOPinTypeQEI (unsigned long ulPort, unsigned char ucPins) void GPIOPinTypeSSI (unsigned long ulPort, unsigned char ucPins)
void GPIOPinTypeTimer (unsigned long ulPort, unsigned char ucPins) void GPIOPinTypeUART (unsigned long ulPort, unsigned char ucPins) void GPIOPinTypeUSBDigital (unsigned long ulPort, unsigned char ucPins) void GPIOPinWrite (unsigned long ulPort, unsigned char ucPins, unsigned char ucVal) void GPIOPortIntRegister (unsigned long ulPort, void (pfnIntHandler)(void)) void GPIOPortIntUnregister (unsigned long ulPort)
上面的所有GPIO模块驱动函数可以分成三类:
1. GPIO管脚配置函数
2. GPIO中断处理函数
3. GPIO管脚值访问函数
管脚配置函数:GPIODirModeSet() 、GPIOPadConfigSet (),配置回读函数 GPIODirModeGet() 、GPIOPadConfigGet ().
此外还有一些常用的配置外设管脚功能的函数如下:
are GPIOPinTypeCAN(), GPIOPinTypeComparator(), GPIOPinTypeGPIOInput(), GPIOPinTypeGPIOOutput(), GPIOPinTypeGPIOOutputOD(), GPIOPinTypeI2C(), GPIOPinTypePWM(), GPIOPinTypeQEI(), GPIOPinTypeSSI(), GPIOPinTypeTimer(), and GPIOPin- TypeUART(). GPIO中断函数:
GPIOIntTypeSet(), GPIOIntTypeGet(), GPIOPinIntEnable(), GPIOPinIntDisable(), GPIOPinIntStatus(), GPIOPinIntClear(), GPIOPortIntRegister(), and GPIOPortIntUnregister().
GPIO读写函数
GPIOPinRead() and GPIOPinWrite(). |