CC13xx Driver Library
[gpio] General Purpose I/O

Functions

static void GPIODirModeSet (uint32_t ui32Pins, uint32_t ui32Dir)
 Sets the direction of the specified pin(s). More...
 
static uint32_t GPIODirModeGet (uint32_t ui32Pin)
 Gets the direction of a pin. More...
 
static void GPIOPinWrite (uint32_t ui32Pins, uint32_t ui32Val)
 Write to pin(s). More...
 
static uint32_t GPIOPinRead (uint32_t ui32Pins)
 Read the value of specific pin(s). More...
 
static void GPIOPinClear (uint32_t ui32Pins)
 Clear specific pin(s). More...
 
static void GPIOPinToggle (uint32_t ui32Pins)
 Toggle specific pin(s). More...
 
static uint32_t GPIOEventGet (uint32_t ui32Pin)
 Get the event status of a specific pin. More...
 
static void GPIOEventClear (uint32_t ui32Pins)
 Clear an IO event on a pin. More...
 

Detailed Description

Function Documentation

static uint32_t GPIODirModeGet ( uint32_t  ui32Pin)
inlinestatic

Gets the direction of a pin.

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.

Parameters
ui32Pinis the pin number.
Returns
Returns one of the enumerated data types:

Definition at line 196 of file gpio.h.

static void GPIODirModeSet ( uint32_t  ui32Pins,
uint32_t  ui32Dir 
)
inlinestatic

Sets the direction of the specified pin(s).

This function will set the specified pin(s) on the GPIO port as either an input or output under software control.

Parameters
ui32Pinsis the bit-packed representation of the pin(s) The parameter must be a bitwise OR'ed combination of the following:
ui32Diris the direction of the pin(s):
Returns
None

Definition at line 151 of file gpio.h.

Referenced by IOCPinTypeGpioInput(), and IOCPinTypeGpioOutput().

static void GPIOEventClear ( uint32_t  ui32Pins)
inlinestatic

Clear an IO event on a pin.

Parameters
ui32Pinsspecifies the pins to clear the events on. The parameter must be a bitwise OR'ed combination of the following:
Returns
None

Definition at line 380 of file gpio.h.

Referenced by IOCIntClear().

static uint32_t GPIOEventGet ( uint32_t  ui32Pin)
inlinestatic

Get the event status of a specific pin.

Parameters
ui32Pinis the pins to toggle. The parameter must be one of:
Returns
Returns the current event status on a specific GPIO

Definition at line 353 of file gpio.h.

Referenced by IOCIntStatus().

static void GPIOPinClear ( uint32_t  ui32Pins)
inlinestatic

Clear specific pin(s).

Parameters
ui32Pinsare the pins to clear The parameter must be a bitwise OR'ed combination of the following:
Returns
None

Definition at line 299 of file gpio.h.

static uint32_t GPIOPinRead ( uint32_t  ui32Pins)
inlinestatic

Read the value of specific pin(s).

Note
The value of the GPIO can always be read even if GPIO is configured as output. However, input enable must be set in the IOC module.
Parameters
ui32Pinsis the bit-packed representation of the pin(s) to read. The parameter must be a bitwise OR'ed combination of the following:
Returns
Returns the value of the specified pin(s).

Definition at line 272 of file gpio.h.

static void GPIOPinToggle ( uint32_t  ui32Pins)
inlinestatic

Toggle specific pin(s).

Parameters
ui32Pinsis the pins to toggle. The parameter must be a bitwise OR'ed combination of the following:
Returns
None

Definition at line 326 of file gpio.h.

static void GPIOPinWrite ( uint32_t  ui32Pins,
uint32_t  ui32Val 
)
inlinestatic

Write to pin(s).

All the specified pins will be set to the same value, either '0' or '1'.

Parameters
ui32Pinsis the bit-packed representation of the GPIO(s) to set. The parameter must be a bitwise OR'ed combination of the following:
ui32Valis the value to write on the specified GPIO(s):
  • 0 : Set the GPIO(s) to 0 (low).
  • 1 : Set the GPIO(s) to 1 (high).
Returns
None

Definition at line 232 of file gpio.h.

Macro Definition Documentation

#define GPIO_DIR_MODE_IN   0x00000000

Definition at line 122 of file gpio.h.

Referenced by GPIODirModeGet(), GPIODirModeSet(), and IOCPinTypeGpioInput().

#define GPIO_DIR_MODE_OUT   0x00000001

Definition at line 123 of file gpio.h.

Referenced by GPIODirModeGet(), GPIODirModeSet(), and IOCPinTypeGpioOutput().

#define GPIO_PIN_0   0x00000001

Definition at line 81 of file gpio.h.

Referenced by GPIODirModeGet(), and GPIOPinRead().

#define GPIO_PIN_1   0x00000002

Definition at line 82 of file gpio.h.

#define GPIO_PIN_10   0x00000400

Definition at line 91 of file gpio.h.

#define GPIO_PIN_11   0x00000800

Definition at line 92 of file gpio.h.

#define GPIO_PIN_12   0x00001000

Definition at line 93 of file gpio.h.

#define GPIO_PIN_13   0x00002000

Definition at line 94 of file gpio.h.

#define GPIO_PIN_14   0x00004000

Definition at line 95 of file gpio.h.

#define GPIO_PIN_15   0x00008000

Definition at line 96 of file gpio.h.

#define GPIO_PIN_16   0x00010000

Definition at line 97 of file gpio.h.

#define GPIO_PIN_17   0x00020000

Definition at line 98 of file gpio.h.

#define GPIO_PIN_18   0x00040000

Definition at line 99 of file gpio.h.

#define GPIO_PIN_19   0x00080000

Definition at line 100 of file gpio.h.

#define GPIO_PIN_2   0x00000004

Definition at line 83 of file gpio.h.

#define GPIO_PIN_20   0x00100000

Definition at line 101 of file gpio.h.

#define GPIO_PIN_21   0x00200000

Definition at line 102 of file gpio.h.

#define GPIO_PIN_22   0x00400000

Definition at line 103 of file gpio.h.

#define GPIO_PIN_23   0x00800000

Definition at line 104 of file gpio.h.

#define GPIO_PIN_24   0x01000000

Definition at line 105 of file gpio.h.

#define GPIO_PIN_25   0x02000000

Definition at line 106 of file gpio.h.

#define GPIO_PIN_26   0x04000000

Definition at line 107 of file gpio.h.

#define GPIO_PIN_27   0x08000000

Definition at line 108 of file gpio.h.

#define GPIO_PIN_28   0x10000000

Definition at line 109 of file gpio.h.

#define GPIO_PIN_29   0x20000000

Definition at line 110 of file gpio.h.

#define GPIO_PIN_3   0x00000008

Definition at line 84 of file gpio.h.

#define GPIO_PIN_30   0x40000000

Definition at line 111 of file gpio.h.

#define GPIO_PIN_31   0x80000000

Definition at line 112 of file gpio.h.

Referenced by GPIODirModeGet(), and GPIOPinRead().

#define GPIO_PIN_4   0x00000010

Definition at line 85 of file gpio.h.

#define GPIO_PIN_5   0x00000020

Definition at line 86 of file gpio.h.

#define GPIO_PIN_6   0x00000040

Definition at line 87 of file gpio.h.

#define GPIO_PIN_7   0x00000080

Definition at line 88 of file gpio.h.

#define GPIO_PIN_8   0x00000100

Definition at line 89 of file gpio.h.

#define GPIO_PIN_9   0x00000200

Definition at line 90 of file gpio.h.

#define GPIO_PIN_MASK   0xFFFFFFFF
#define GPIO_PIN_UNUSED   0x00000000

Definition at line 113 of file gpio.h.

#define NUM_GPIO_PINS   32

Definition at line 74 of file gpio.h.