Tiva Driver Lib
Functions
Gpio_api

Functions

void GPIODirModeSet (uint32_t ui32Port, uint8_t ui8Pins, uint32_t ui32PinIO)
 
uint32_t GPIODirModeGet (uint32_t ui32Port, uint8_t ui8Pin)
 
void GPIOIntTypeSet (uint32_t ui32Port, uint8_t ui8Pins, uint32_t ui32IntType)
 
uint32_t GPIOIntTypeGet (uint32_t ui32Port, uint8_t ui8Pin)
 
void GPIOPadConfigSet (uint32_t ui32Port, uint8_t ui8Pins, uint32_t ui32Strength, uint32_t ui32PinType)
 
void GPIOPadConfigGet (uint32_t ui32Port, uint8_t ui8Pin, uint32_t *pui32Strength, uint32_t *pui32PinType)
 
void GPIOIntEnable (uint32_t ui32Port, uint32_t ui32IntFlags)
 
void GPIOIntDisable (uint32_t ui32Port, uint32_t ui32IntFlags)
 
uint32_t GPIOIntStatus (uint32_t ui32Port, bool bMasked)
 
void GPIOIntClear (uint32_t ui32Port, uint32_t ui32IntFlags)
 
void GPIOIntRegister (uint32_t ui32Port, void(*pfnIntHandler)(void))
 
void GPIOIntUnregister (uint32_t ui32Port)
 
int32_t GPIOPinRead (uint32_t ui32Port, uint8_t ui8Pins)
 
void GPIOPinWrite (uint32_t ui32Port, uint8_t ui8Pins, uint8_t ui8Val)
 
void GPIOPinTypeADC (uint32_t ui32Port, uint8_t ui8Pins)
 
void GPIOPinTypeCAN (uint32_t ui32Port, uint8_t ui8Pins)
 
void GPIOPinTypeComparator (uint32_t ui32Port, uint8_t ui8Pins)
 
void GPIOPinTypeEPI (uint32_t ui32Port, uint8_t ui8Pins)
 
void GPIOPinTypeEthernetLED (uint32_t ui32Port, uint8_t ui8Pins)
 
void GPIOPinTypeEthernetMII (uint32_t ui32Port, uint8_t ui8Pins)
 
void GPIOPinTypeFan (uint32_t ui32Port, uint8_t ui8Pins)
 
void GPIOPinTypeGPIOInput (uint32_t ui32Port, uint8_t ui8Pins)
 
void GPIOPinTypeGPIOOutput (uint32_t ui32Port, uint8_t ui8Pins)
 
void GPIOPinTypeGPIOOutputOD (uint32_t ui32Port, uint8_t ui8Pins)
 
void GPIOPinTypeI2C (uint32_t ui32Port, uint8_t ui8Pins)
 
void GPIOPinTypeI2CSCL (uint32_t ui32Port, uint8_t ui8Pins)
 
void GPIOPinTypeLPC (uint32_t ui32Port, uint8_t ui8Pins)
 
void GPIOPinTypePECIRx (uint32_t ui32Port, uint8_t ui8Pins)
 
void GPIOPinTypePECITx (uint32_t ui32Port, uint8_t ui8Pins)
 
void GPIOPinTypePWM (uint32_t ui32Port, uint8_t ui8Pins)
 
void GPIOPinTypeQEI (uint32_t ui32Port, uint8_t ui8Pins)
 
void GPIOPinTypeSSI (uint32_t ui32Port, uint8_t ui8Pins)
 
void GPIOPinTypeTimer (uint32_t ui32Port, uint8_t ui8Pins)
 
void GPIOPinTypeUART (uint32_t ui32Port, uint8_t ui8Pins)
 
void GPIOPinTypeUSBAnalog (uint32_t ui32Port, uint8_t ui8Pins)
 
void GPIOPinTypeUSBDigital (uint32_t ui32Port, uint8_t ui8Pins)
 
void GPIOPinConfigure (uint32_t ui32PinConfig)
 
void GPIODMATriggerEnable (uint32_t ui32Port, uint8_t ui8Pins)
 
void GPIODMATriggerDisable (uint32_t ui32Port, uint8_t ui8Pins)
 
void GPIOADCTriggerEnable (uint32_t ui32Port, uint8_t ui8Pins)
 
void GPIOADCTriggerDisable (uint32_t ui32Port, uint8_t ui8Pins)
 

Detailed Description

Function Documentation

void GPIOADCTriggerDisable ( uint32_t  ui32Port,
uint8_t  ui8Pins 
)

Disable a GPIO pin as a trigger to start an ADC capture.

Parameters
ui32Portis the base address of the GPIO port.
ui8Pinsis the bit-packed representation of the pin(s).

This function disables a GPIO pin to be used as a trigger to start an ADC sequence. This function can be used to disable this feature if it was enabled via a call to GPIOADCTriggerEnable().

Note
This function is not available on all devices, consult the data sheet to ensure that the device you are using supports GPIO ADC Control.
Returns
None.
void GPIOADCTriggerEnable ( uint32_t  ui32Port,
uint8_t  ui8Pins 
)

Enables a GPIO pin as a trigger to start an ADC capture.

Parameters
ui32Portis the base address of the GPIO port.
ui8Pinsis the bit-packed representation of the pin(s).

This function enables a GPIO pin to be used as a trigger to start an ADC sequence. Any GPIO pin can be configured to be an external trigger for an ADC sequence. The GPIO pin still generates interrupts if the interrupt is enabled for the selected pin. To enable the use of a GPIO pin to trigger the ADC module, the ADCSequenceConfigure() function must be called with the ADC_TRIGGER_EXTERNAL parameter.

Note
This function is not available on all devices, consult the data sheet to ensure that the device you are using supports GPIO ADC Control.
Returns
None.
uint32_t GPIODirModeGet ( uint32_t  ui32Port,
uint8_t  ui8Pin 
)

Gets the direction and mode of a pin.

Parameters
ui32Portis the base address of the GPIO port.
ui8Pinis the pin number.

This function gets the direction and control mode for a specified pin on the selected GPIO port. The pin can be configured as either an input or output under software control, or it can be under hardware control. The type of control and direction are returned as an enumerated data type.

Returns
Returns one of the enumerated data types described for GPIODirModeSet().
void GPIODirModeSet ( uint32_t  ui32Port,
uint8_t  ui8Pins,
uint32_t  ui32PinIO 
)

Sets the direction and mode of the specified pin(s).

Parameters
ui32Portis the base address of the GPIO port
ui8Pinsis the bit-packed representation of the pin(s).
ui32PinIOis the pin direction and/or mode.

This function configures the specified pin(s) on the selected GPIO port as either input or output under software control, or it configures the pin to be under hardware control.

The parameter ui32PinIO is an enumerated data type that can be one of the following values:

  • GPIO_DIR_MODE_IN
  • GPIO_DIR_MODE_OUT
  • GPIO_DIR_MODE_HW

where GPIO_DIR_MODE_IN specifies that the pin is programmed as a software controlled input, GPIO_DIR_MODE_OUT specifies that the pin is programmed as a software controlled output, and GPIO_DIR_MODE_HW specifies that the pin is placed under hardware control.

The pin(s) are specified using a bit-packed byte, where each bit that is set identifies the pin to be accessed, and where bit 0 of the byte represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on.

Note
GPIOPadConfigSet() must also be used to configure the corresponding pad(s) in order for them to propagate the signal to/from the GPIO.
Returns
None.
void GPIODMATriggerDisable ( uint32_t  ui32Port,
uint8_t  ui8Pins 
)

Disables a GPIO pin as a trigger to start a DMA transaction.

Parameters
ui32Portis the base address of the GPIO port.
ui8Pinsis the bit-packed representation of the pin(s).

This function disables a GPIO pin from being used as a trigger to start a uDMA transaction. This function can be used to disable this feature if it was enabled via a call to GPIODMATriggerEnable().

Note
This function is not available on all devices, consult the data sheet to ensure that the device you are using supports GPIO DMA Control.
Returns
None.
void GPIODMATriggerEnable ( uint32_t  ui32Port,
uint8_t  ui8Pins 
)

Enables a GPIO pin as a trigger to start a DMA transaction.

Parameters
ui32Portis the base address of the GPIO port.
ui8Pinsis the bit-packed representation of the pin(s).

This function enables a GPIO pin to be used as a trigger to start a uDMA transaction. Any GPIO pin can be configured to be an external trigger for the uDMA. The GPIO pin still generates interrupts if the interrupt is enabled for the selected pin.

Note
This function is not available on all devices, consult the data sheet to ensure that the device you are using supports GPIO DMA Control.
Returns
None.
void GPIOIntClear ( uint32_t  ui32Port,
uint32_t  ui32IntFlags 
)

Clears the specified interrupt sources.

Parameters
ui32Portis the base address of the GPIO port.
ui32IntFlagsis the bit mask of the interrupt sources to disable.

Clears the interrupt for the specified interrupt source(s).

The ui32IntFlags parameter is the logical OR of the GPIO_INT_* values.

Note
Because there is a write buffer in the Cortex-M processor, it may take several clock cycles before the interrupt source is actually cleared. Therefore, it is recommended that the interrupt source be cleared early in the interrupt handler (as opposed to the very last action) to avoid returning from the interrupt handler before the interrupt source is actually cleared. Failure to do so may result in the interrupt handler being immediately reentered (because the interrupt controller still sees the interrupt source asserted).
Returns
None.
void GPIOIntDisable ( uint32_t  ui32Port,
uint32_t  ui32IntFlags 
)

Disables the specified GPIO interrupts.

Parameters
ui32Portis the base address of the GPIO port.
ui32IntFlagsis the bit mask of the interrupt sources to disable.

This function disables the indicated GPIO interrupt sources. Only the sources that are enabled can be reflected to the processor interrupt; disabled sources have no effect on the processor.

The ui32IntFlags parameter is the logical OR of any of the following:

  • GPIO_INT_PIN_0 - interrupt due to activity on Pin 0.
  • GPIO_INT_PIN_1 - interrupt due to activity on Pin 1.
  • GPIO_INT_PIN_2 - interrupt due to activity on Pin 2.
  • GPIO_INT_PIN_3 - interrupt due to activity on Pin 3.
  • GPIO_INT_PIN_4 - interrupt due to activity on Pin 4.
  • GPIO_INT_PIN_5 - interrupt due to activity on Pin 5.
  • GPIO_INT_PIN_6 - interrupt due to activity on Pin 6.
  • GPIO_INT_PIN_7 - interrupt due to activity on Pin 7.
Returns
None.
void GPIOIntEnable ( uint32_t  ui32Port,
uint32_t  ui32IntFlags 
)

Enables the specified GPIO interrupts.

Parameters
ui32Portis the base address of the GPIO port.
ui32IntFlagsis the bit mask of the interrupt sources to enable.

This function enables the indicated GPIO interrupt sources. Only the sources that are enabled can be reflected to the processor interrupt; disabled sources have no effect on the processor.

The ui32IntFlags parameter is the logical OR of any of the following:

  • GPIO_INT_PIN_0 - interrupt due to activity on Pin 0.
  • GPIO_INT_PIN_1 - interrupt due to activity on Pin 1.
  • GPIO_INT_PIN_2 - interrupt due to activity on Pin 2.
  • GPIO_INT_PIN_3 - interrupt due to activity on Pin 3.
  • GPIO_INT_PIN_4 - interrupt due to activity on Pin 4.
  • GPIO_INT_PIN_5 - interrupt due to activity on Pin 5.
  • GPIO_INT_PIN_6 - interrupt due to activity on Pin 6.
  • GPIO_INT_PIN_7 - interrupt due to activity on Pin 7.
Returns
None.
void GPIOIntRegister ( uint32_t  ui32Port,
void(*)(void)  pfnIntHandler 
)

Registers an interrupt handler for a GPIO port.

Parameters
ui32Portis the base address of the GPIO port.
pfnIntHandleris a pointer to the GPIO port interrupt handling function.

This function ensures that the interrupt handler specified by pfnIntHandler is called when an interrupt is detected from the selected GPIO port. This function also enables the corresponding GPIO interrupt in the interrupt controller; individual pin interrupts and interrupt sources must be enabled with GPIOIntEnable().

See also
IntRegister() for important information about registering interrupt handlers.
Returns
None.
uint32_t GPIOIntStatus ( uint32_t  ui32Port,
bool  bMasked 
)

Gets interrupt status for the specified GPIO port.

Parameters
ui32Portis the base address of the GPIO port.
bMaskedspecifies whether masked or raw interrupt status is returned.

If bMasked is set as true, then the masked interrupt status is returned; otherwise, the raw interrupt status is returned.

Returns
Returns the current interrupt status for the specified GPIO module. The value returned is the logical OR of the GPIO_INT_* values that are currently active.
uint32_t GPIOIntTypeGet ( uint32_t  ui32Port,
uint8_t  ui8Pin 
)

Gets the interrupt type for a pin.

Parameters
ui32Portis the base address of the GPIO port.
ui8Pinis the pin number.

This function gets the interrupt type for a specified pin on the selected GPIO port. The pin can be configured as a falling-edge, rising-edge, or both-edges detected interrupt, or it can be configured as a low-level or high-level detected interrupt. The type of interrupt detection mechanism is returned and can include the GPIO_DISCRETE_INT flag.

Returns
Returns one of the flags described for GPIOIntTypeSet().
void GPIOIntTypeSet ( uint32_t  ui32Port,
uint8_t  ui8Pins,
uint32_t  ui32IntType 
)

Sets the interrupt type for the specified pin(s).

Parameters
ui32Portis the base address of the GPIO port.
ui8Pinsis the bit-packed representation of the pin(s).
ui32IntTypespecifies the type of interrupt trigger mechanism.

This function sets up the various interrupt trigger mechanisms for the specified pin(s) on the selected GPIO port.

One of the following flags can be used to define the ui32IntType parameter:

  • GPIO_FALLING_EDGE sets detection to edge and trigger to falling
  • GPIO_RISING_EDGE sets detection to edge and trigger to rising
  • GPIO_BOTH_EDGES sets detection to both edges
  • GPIO_LOW_LEVEL sets detection to low level
  • GPIO_HIGH_LEVEL sets detection to high level

In addition to the above flags, the following flag can be OR'd in to the ui32IntType parameter:

  • GPIO_DISCRETE_INT sets discrete interrupts for each pin on a GPIO port.

The GPIO_DISCRETE_INT is not available on all devices or all GPIO ports, consult the data sheet to ensure that the device and the GPIO port supports discrete interrupts.

The pin(s) are specified using a bit-packed byte, where each bit that is set identifies the pin to be accessed, and where bit 0 of the byte represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on.

Note
In order to avoid any spurious interrupts, the user must ensure that the GPIO inputs remain stable for the duration of this function.
Returns
None.
void GPIOIntUnregister ( uint32_t  ui32Port)

Removes an interrupt handler for a GPIO port.

Parameters
ui32Portis the base address of the GPIO port.

This function unregisters the interrupt handler for the specified GPIO port. This function also disables the corresponding GPIO port interrupt in the interrupt controller; individual GPIO interrupts and interrupt sources must be disabled with GPIOIntDisable().

See also
IntRegister() for important information about registering interrupt handlers.
Returns
None.
void GPIOPadConfigGet ( uint32_t  ui32Port,
uint8_t  ui8Pin,
uint32_t *  pui32Strength,
uint32_t *  pui32PinType 
)

Gets the pad configuration for a pin.

Parameters
ui32Portis the base address of the GPIO port.
ui8Pinis the pin number.
pui32Strengthis a pointer to storage for the output drive strength.
pui32PinTypeis a pointer to storage for the output drive type.

This function gets the pad configuration for a specified pin on the selected GPIO port. The values returned in pui32Strength and pui32PinType correspond to the values used in GPIOPadConfigSet(). This function also works for pin(s) configured as input pin(s); however, the only meaningful data returned is whether the pin is terminated with a pull-up or down resistor.

Returns
None
void GPIOPadConfigSet ( uint32_t  ui32Port,
uint8_t  ui8Pins,
uint32_t  ui32Strength,
uint32_t  ui32PinType 
)

Sets the pad configuration for the specified pin(s).

Parameters
ui32Portis the base address of the GPIO port.
ui8Pinsis the bit-packed representation of the pin(s).
ui32Strengthspecifies the output drive strength.
ui32PinTypespecifies the pin type.

This function sets the drive strength and type for the specified pin(s) on the selected GPIO port. For pin(s) configured as input ports, the pad is configured as requested, but the only real effect on the input is the configuration of the pull-up or pull-down termination.

The parameter ui32Strength can be one of the following values:

  • GPIO_STRENGTH_2MA
  • GPIO_STRENGTH_4MA
  • GPIO_STRENGTH_8MA
  • GPIO_STRENGTH_8MA_SC

where GPIO_STRENGTH_xMA specifies either 2, 4, or 8 mA output drive strength, and GPIO_OUT_STRENGTH_8MA_SC specifies 8 mA output drive with slew control.

The parameter ui32PinType can be one of the following values:

  • GPIO_PIN_TYPE_STD
  • GPIO_PIN_TYPE_STD_WPU
  • GPIO_PIN_TYPE_STD_WPD
  • GPIO_PIN_TYPE_OD
  • GPIO_PIN_TYPE_ANALOG

where GPIO_PIN_TYPE_STD* specifies a push-pull pin, GPIO_PIN_TYPE_OD* specifies an open-drain pin, *_WPU specifies a weak pull-up, *_WPD specifies a weak pull-down, and GPIO_PIN_TYPE_ANALOG specifies an analog input.

The pin(s) are specified using a bit-packed byte, where each bit that is set identifies the pin to be accessed, and where bit 0 of the byte represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on.

Returns
None.
void GPIOPinConfigure ( uint32_t  ui32PinConfig)

Configures the alternate function of a GPIO pin.

Parameters
ui32PinConfigis the pin configuration value, specified as only one of the GPIO_P??_??? values.

This function configures the pin mux that selects the peripheral function associated with a particular GPIO pin. Only one peripheral function at a time can be associated with a GPIO pin, and each peripheral function should only be associated with a single GPIO pin at a time (despite the fact that many of them can be associated with more than one GPIO pin). To fully configure a pin, a GPIOPinType*() function should also be called.

The available mappings are supplied on a per-device basis in pin_map.h. The PART_IS_<partno> define enables the appropriate set of defines for the device that is being used.

Note
If the same signal is assigned to two different GPIO port pins, the signal is assigned to the port with the lowest letter and the assignment to the higher letter port is ignored.
Returns
None.
int32_t GPIOPinRead ( uint32_t  ui32Port,
uint8_t  ui8Pins 
)

Reads the values present of the specified pin(s).

Parameters
ui32Portis the base address of the GPIO port.
ui8Pinsis the bit-packed representation of the pin(s).

The values at the specified pin(s) are read, as specified by ui8Pins. Values are returned for both input and output pin(s), and the value for pin(s) that are not specified by ui8Pins are set to 0.

The pin(s) are specified using a bit-packed byte, where each bit that is set identifies the pin to be accessed, and where bit 0 of the byte represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on.

Returns
Returns a bit-packed byte providing the state of the specified pin, where bit 0 of the byte represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. Any bit that is not specified by ui8Pins is returned as a 0. Bits 31:8 should be ignored.
void GPIOPinTypeADC ( uint32_t  ui32Port,
uint8_t  ui8Pins 
)

Configures pin(s) for use as analog-to-digital converter inputs.

Parameters
ui32Portis the base address of the GPIO port.
ui8Pinsis the bit-packed representation of the pin(s).

The analog-to-digital converter input pins must be properly configured for the analog-to-digital peripheral to function correctly. This function provides the proper configuration for those pin(s).

The pin(s) are specified using a bit-packed byte, where each bit that is set identifies the pin to be accessed, and where bit 0 of the byte represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on.

Note
This function cannot be used to turn any pin into an ADC input; it only configures an ADC input pin for proper operation.
Returns
None.
void GPIOPinTypeCAN ( uint32_t  ui32Port,
uint8_t  ui8Pins 
)

Configures pin(s) for use as a CAN device.

Parameters
ui32Portis the base address of the GPIO port.
ui8Pinsis the bit-packed representation of the pin(s).

The CAN pins must be properly configured for the CAN peripherals to function correctly. This function provides a typical configuration for those pin(s); other configurations may work as well depending upon the board setup (for example, using the on-chip pull-ups).

The pin(s) are specified using a bit-packed byte, where each bit that is set identifies the pin to be accessed, and where bit 0 of the byte represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on.

Note
This function cannot be used to turn any pin into a CAN pin; it only configures a CAN pin for proper operation. Devices with flexible pin muxing also require a GPIOPinConfigure() function call.
Returns
None.
void GPIOPinTypeComparator ( uint32_t  ui32Port,
uint8_t  ui8Pins 
)

Configures pin(s) for use as an analog comparator input.

Parameters
ui32Portis the base address of the GPIO port.
ui8Pinsis the bit-packed representation of the pin(s).

The analog comparator input pins must be properly configured for the analog comparator to function correctly. This function provides the proper configuration for those pin(s).

The pin(s) are specified using a bit-packed byte, where each bit that is set identifies the pin to be accessed, and where bit 0 of the byte represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on.

Note
This function cannot be used to turn any pin into an analog comparator input; it only configures an analog comparator pin for proper operation. Devices with flexible pin muxing also require a GPIOPinConfigure() function call.
Returns
None.
void GPIOPinTypeEPI ( uint32_t  ui32Port,
uint8_t  ui8Pins 
)

Configures pin(s) for use by the external peripheral interface.

Parameters
ui32Portis the base address of the GPIO port.
ui8Pinsis the bit-packed representation of the pin(s).

The external peripheral interface pins must be properly configured for the external peripheral interface to function correctly. This function provides a typical configuration for those pin(s); other configurations may work as well depending upon the board setup (for example, using the on-chip pull-ups).

The pin(s) are specified using a bit-packed byte, where each bit that is set identifies the pin to be accessed, and where bit 0 of the byte represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on.

Note
This function cannot be used to turn any pin into an external peripheral interface pin; it only configures an external peripheral interface pin for proper operation. Devices with flexible pin muxing also require a GPIOPinConfigure() function call.
Returns
None.
void GPIOPinTypeEthernetLED ( uint32_t  ui32Port,
uint8_t  ui8Pins 
)

Configures pin(s) for use by the Ethernet peripheral as LED signals.

Parameters
ui32Portis the base address of the GPIO port.
ui8Pinsis the bit-packed representation of the pin(s).

The Ethernet peripheral provides two signals that can be used to drive an LED (for example, for link status/activity). This function provides a typical configuration for the pins.

The pin(s) are specified using a bit-packed byte, where each bit that is set identifies the pin to be accessed, and where bit 0 of the byte represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on.

Note
This function cannot be used to turn any pin into an Ethernet LED pin; it only configures an Ethernet LED pin for proper operation. Devices with flexible pin muxing also require a GPIOPinConfigure() function call.
Returns
None.
void GPIOPinTypeEthernetMII ( uint32_t  ui32Port,
uint8_t  ui8Pins 
)

Configures pin(s) for use by the Ethernet peripheral as MII signals.

Parameters
ui32Portis the base address of the GPIO port.
ui8Pinsis the bit-packed representation of the pin(s).

The Ethernet peripheral on some parts provides a set of MII signals that are used to connect to an external PHY. This function provides a typical configuration for the pins.

The pin(s) are specified using a bit-packed byte, where each bit that is set identifies the pin to be accessed, and where bit 0 of the byte represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on.

Note
This function cannot be used to turn any pin into an Ethernet MII pin; it only configures an Ethernet MII pin for proper operation. Devices with flexible pin muxing also require a GPIOPinConfigure() function call.
Returns
None.
void GPIOPinTypeFan ( uint32_t  ui32Port,
uint8_t  ui8Pins 
)

Configures pin(s) for use by the fan module.

Parameters
ui32Portis the base address of the GPIO port.
ui8Pinsis the bit-packed representation of the pin(s).

The fan pins must be properly configured for the fan controller to function correctly. This function provides a typical configuration for those pin(s); other configurations may work as well depending upon the board setup (for example, using the on-chip pull-ups).

The pin(s) are specified using a bit-packed byte, where each bit that is set identifies the pin to be accessed, and where bit 0 of the byte represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on.

Note
This function cannot be used to turn any pin into a fan pin; it only configures a fan pin for proper operation. Devices with flexible pin muxing also require a GPIOPinConfigure() function call.
Returns
None.
void GPIOPinTypeGPIOInput ( uint32_t  ui32Port,
uint8_t  ui8Pins 
)

Configures pin(s) for use as GPIO inputs.

Parameters
ui32Portis the base address of the GPIO port.
ui8Pinsis the bit-packed representation of the pin(s).

The GPIO pins must be properly configured in order to function correctly as GPIO inputs. This function provides the proper configuration for those pin(s).

The pin(s) are specified using a bit-packed byte, where each bit that is set identifies the pin to be accessed, and where bit 0 of the byte represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on.

Returns
None.
void GPIOPinTypeGPIOOutput ( uint32_t  ui32Port,
uint8_t  ui8Pins 
)

Configures pin(s) for use as GPIO outputs.

Parameters
ui32Portis the base address of the GPIO port.
ui8Pinsis the bit-packed representation of the pin(s).

The GPIO pins must be properly configured in order to function correctly as GPIO outputs. This function provides the proper configuration for those pin(s).

The pin(s) are specified using a bit-packed byte, where each bit that is set identifies the pin to be accessed, and where bit 0 of the byte represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on.

Returns
None.
void GPIOPinTypeGPIOOutputOD ( uint32_t  ui32Port,
uint8_t  ui8Pins 
)

Configures pin(s) for use as GPIO open drain outputs.

Parameters
ui32Portis the base address of the GPIO port.
ui8Pinsis the bit-packed representation of the pin(s).

The GPIO pins must be properly configured in order to function correctly as GPIO outputs. This function provides the proper configuration for those pin(s).

The pin(s) are specified using a bit-packed byte, where each bit that is set identifies the pin to be accessed, and where bit 0 of the byte represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on.

Returns
None.
void GPIOPinTypeI2C ( uint32_t  ui32Port,
uint8_t  ui8Pins 
)

Configures pin(s) for use by the I2C peripheral.

Parameters
ui32Portis the base address of the GPIO port.
ui8Pinsis the bit-packed representation of the pin(s).

The I2C pins must be properly configured for the I2C peripheral to function correctly. This function provides the proper configuration for those pin(s).

The pin(s) are specified using a bit-packed byte, where each bit that is set identifies the pin to be accessed, and where bit 0 of the byte represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on.

Note
This function cannot be used to turn any pin into an I2C pin; it only configures an I2C pin for proper operation. Devices with flexible pin muxing also require a GPIOPinConfigure() function call.
Returns
None.
void GPIOPinTypeI2CSCL ( uint32_t  ui32Port,
uint8_t  ui8Pins 
)

Configures pin(s) for use as SCL by the I2C peripheral.

Parameters
ui32Portis the base address of the GPIO port.
ui8Pinsis the bit-packed representation of the pin(s).

The I2C pins must be properly configured for the I2C peripheral to function correctly. This function provides the proper configuration for the SCL pin(s).

The pin(s) are specified using a bit-packed byte, where each bit that is set identifies the pin to be accessed, and where bit 0 of the byte represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on.

Note
This function should only be used for Blizzard-class devices. It cannot be used to turn any pin into an I2C SCL pin; it only configures an I2C SCL pin for proper operation. Devices with flexible pin muxing also require a GPIOPinConfigure() function call.
Returns
None.
void GPIOPinTypeLPC ( uint32_t  ui32Port,
uint8_t  ui8Pins 
)

Configures pin(s) for use by the LPC module.

Parameters
ui32Portis the base address of the GPIO port.
ui8Pinsis the bit-packed representation of the pin(s).

The LPC pins must be properly configured for the LPC module to function correctly. This function provides a typical configuration for those pin(s); other configurations may work as well depending upon the board setup (for example, using the on-chip pull-ups).

The pin(s) are specified using a bit-packed byte, where each bit that is set identifies the pin to be accessed, and where bit 0 of the byte represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on.

Note
This function cannot be used to turn any pin into an LPC pin; it only configures an LPC pin for proper operation. Devices with flexible pin muxing also require a GPIOPinConfigure() function call.
Returns
None.
void GPIOPinTypePECIRx ( uint32_t  ui32Port,
uint8_t  ui8Pins 
)

Configures a pin for receive use by the PECI module.

Parameters
ui32Portis the base address of the GPIO port.
ui8Pinsis the bit-packed representation of the pin(s).

The PECI receive pin must be properly configured for the PECI module to function correctly. This function provides a typical configuration for that pin.

The pin is specified using a bit-packed byte, where each bit that is set identifies the pin to be accessed, and where bit 0 of the byte represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on.

Note
This function cannot be used to turn any pin into a PECI receive pin; it only configures a PECI receive pin for proper operation. Devices with flexible pin muxing also require a GPIOPinConfigure() function call.
Returns
None.
void GPIOPinTypePECITx ( uint32_t  ui32Port,
uint8_t  ui8Pins 
)

Configures a pin for transmit use by the PECI module.

Parameters
ui32Portis the base address of the GPIO port.
ui8Pinsis the bit-packed representation of the pin(s).

The PECI transmit pin must be properly configured for the PECI module to function correctly. This function provides a typical configuration for that pin.

The pin is specified using a bit-packed byte, where each bit that is set identifies the pin to be accessed, and where bit 0 of the byte represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on.

Note
This function cannot be used to turn any pin into a PECI transmit pin; it only configures a PECI transmit pin for proper operation. Devices with flexible pin muxing also require a GPIOPinConfigure() function call.
Returns
None.
void GPIOPinTypePWM ( uint32_t  ui32Port,
uint8_t  ui8Pins 
)

Configures pin(s) for use by the PWM peripheral.

Parameters
ui32Portis the base address of the GPIO port.
ui8Pinsis the bit-packed representation of the pin(s).

The PWM pins must be properly configured for the PWM peripheral to function correctly. This function provides a typical configuration for those pin(s); other configurations may work as well depending upon the board setup (for example, using the on-chip pull-ups).

The pin(s) are specified using a bit-packed byte, where each bit that is set identifies the pin to be accessed, and where bit 0 of the byte represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on.

Note
This function cannot be used to turn any pin into a PWM pin; it only configures a PWM pin for proper operation. Devices wtih flexible pin muxing also require a GPIOPinConfigure() function call.
Returns
None.
void GPIOPinTypeQEI ( uint32_t  ui32Port,
uint8_t  ui8Pins 
)

Configures pin(s) for use by the QEI peripheral.

Parameters
ui32Portis the base address of the GPIO port.
ui8Pinsis the bit-packed representation of the pin(s).

The QEI pins must be properly configured for the QEI peripheral to function correctly. This function provides a typical configuration for those pin(s); other configurations may work as well depending upon the board setup (for example, not using the on-chip pull-ups).

The pin(s) are specified using a bit-packed byte, where each bit that is set identifies the pin to be accessed, and where bit 0 of the byte represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on.

Note
This function cannot be used to turn any pin into a QEI pin; it only configures a QEI pin for proper operation. Devices with flexible pin muxing also require a GPIOPinConfigure() function call.
Returns
None.
void GPIOPinTypeSSI ( uint32_t  ui32Port,
uint8_t  ui8Pins 
)

Configures pin(s) for use by the SSI peripheral.

Parameters
ui32Portis the base address of the GPIO port.
ui8Pinsis the bit-packed representation of the pin(s).

The SSI pins must be properly configured for the SSI peripheral to function correctly. This function provides a typical configuration for those pin(s); other configurations may work as well depending upon the board setup (for example, using the on-chip pull-ups).

The pin(s) are specified using a bit-packed byte, where each bit that is set identifies the pin to be accessed, and where bit 0 of the byte represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on.

Note
This function cannot be used to turn any pin into a SSI pin; it only configures a SSI pin for proper operation. Devices with flexible pin muxing also require a GPIOPinConfigure() function call.
Returns
None.
void GPIOPinTypeTimer ( uint32_t  ui32Port,
uint8_t  ui8Pins 
)

Configures pin(s) for use by the Timer peripheral.

Parameters
ui32Portis the base address of the GPIO port.
ui8Pinsis the bit-packed representation of the pin(s).

The CCP pins must be properly configured for the timer peripheral to function correctly. This function provides a typical configuration for those pin(s); other configurations may work as well depending upon the board setup (for example, using the on-chip pull-ups).

The pin(s) are specified using a bit-packed byte, where each bit that is set identifies the pin to be accessed, and where bit 0 of the byte represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on.

Note
This function cannot be used to turn any pin into a timer pin; it only configures a timer pin for proper operation. Devices with flexible pin muxing also require a GPIOPinConfigure() function call.
Returns
None.
void GPIOPinTypeUART ( uint32_t  ui32Port,
uint8_t  ui8Pins 
)

Configures pin(s) for use by the UART peripheral.

Parameters
ui32Portis the base address of the GPIO port.
ui8Pinsis the bit-packed representation of the pin(s).

The UART pins must be properly configured for the UART peripheral to function correctly. This function provides a typical configuration for those pin(s); other configurations may work as well depending upon the board setup (for example, using the on-chip pull-ups).

The pin(s) are specified using a bit-packed byte, where each bit that is set identifies the pin to be accessed, and where bit 0 of the byte represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on.

Note
This function cannot be used to turn any pin into a UART pin; it only configures a UART pin for proper operation. Devices with flexible pin muxing also require a GPIOPinConfigure() function call.
Returns
None.
void GPIOPinTypeUSBAnalog ( uint32_t  ui32Port,
uint8_t  ui8Pins 
)

Configures pin(s) for use by the USB peripheral.

Parameters
ui32Portis the base address of the GPIO port.
ui8Pinsis the bit-packed representation of the pin(s).

Some USB analog pins must be properly configured for the USB peripheral to function correctly. This function provides the proper configuration for any USB pin(s). This can also be used to configure the EPEN and PFAULT pins so that they are no longer used by the USB controller.

The pin(s) are specified using a bit-packed byte, where each bit that is set identifies the pin to be accessed, and where bit 0 of the byte represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on.

Note
This function cannot be used to turn any pin into a USB pin; it only configures a USB pin for proper operation. Devices with flexible pin muxing also require a GPIOPinConfigure() function call.
Returns
None.
void GPIOPinTypeUSBDigital ( uint32_t  ui32Port,
uint8_t  ui8Pins 
)

Configures pin(s) for use by the USB peripheral.

Parameters
ui32Portis the base address of the GPIO port.
ui8Pinsis the bit-packed representation of the pin(s).

Some USB digital pins must be properly configured for the USB peripheral to function correctly. This function provides a typical configuration for the digital USB pin(s); other configurations may work as well depending upon the board setup (for example, using the on-chip pull-ups).

This function should only be used with EPEN and PFAULT pins as all other USB pins are analog in nature or are not used in devices without OTG functionality.

The pin(s) are specified using a bit-packed byte, where each bit that is set identifies the pin to be accessed, and where bit 0 of the byte represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on.

Note
This function cannot be used to turn any pin into a USB pin; it only configures a USB pin for proper operation. Devices with flexible pin muxing also require a GPIOPinConfigure() function call.
Returns
None.
void GPIOPinWrite ( uint32_t  ui32Port,
uint8_t  ui8Pins,
uint8_t  ui8Val 
)

Writes a value to the specified pin(s).

Parameters
ui32Portis the base address of the GPIO port.
ui8Pinsis the bit-packed representation of the pin(s).
ui8Valis the value to write to the pin(s).

Writes the corresponding bit values to the output pin(s) specified by ui8Pins. Writing to a pin configured as an input pin has no effect.

The pin(s) are specified using a bit-packed byte, where each bit that is set identifies the pin to be accessed, and where bit 0 of the byte represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on.

Returns
None.