MSPM0G1X0X_G3X0X TI-Driver Library  2.01.00.03
Data Structures | Macros | Typedefs | Functions
GPIO.h File Reference

Detailed Description

General Purpose I/O driver interface.


#include <stdint.h>
#include <ti/drivers/gpio/GPIOMSPM0.h>
Include dependency graph for GPIO.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  GPIO_Config
 GPIO driver configuration structure. More...
 

Macros

#define GPIO_PIN_TO_MASK(pin)   (1 << (pin))
 Convert the pin index to mask.
 
#define GPIO_STATUS_SUCCESS   (0)
 Successful status code returned by GPI_setConfig(). More...
 
#define GPIO_STATUS_ERROR   (-1)
 Generic error status code returned by GPI_setConfig(). More...
 
#define GPIO_INVALID_INDEX   0xFF
 Dummy value for "this pin is not assigned to a GPIO". More...
 
GPIO_PinConfig output pin configuration macros.
#define GPIO_CFG_OUTPUT
 
#define GPIO_CFG_OUT_STD
 
#define GPIO_CFG_OUT_OD_NOPULL
 
#define GPIO_CFG_OUT_OD_PU
 
#define GPIO_CFG_OUT_OD_PD
 
#define GPIO_CFG_OUT_STR_LOW
 
#define GPIO_CFG_OUT_STR_MED
 
#define GPIO_CFG_OUT_STR_HIGH
 
#define GPIO_CFG_OUT_HIGH
 
#define GPIO_CFG_OUT_LOW
 
GPIO_PinConfig input pin configuration macros
#define GPIO_CFG_INPUT
 
#define GPIO_CFG_IN_NOPULL
 
#define GPIO_CFG_IN_PU
 
#define GPIO_CFG_IN_PD
 
GPIO_PinConfig pin inversion configuration macros.
#define GPIO_CFG_INVERT_OFF
 
#define GPIO_CFG_INVERT_ON
 
GPIO_PinConfig pin hysteresis configuration macros.
#define GPIO_CFG_HYSTERESIS_OFF
 
#define GPIO_CFG_HYSTERESIS_ON
 
GPIO_PinConfig pin Hi-Z configuration macros.
#define GPIO_CFG_HIZ_OFF
 
#define GPIO_CFG_HIZ_ON
 
GPIO_PinConfig interrupt configuration macros.
#define GPIO_CFG_IN_INT_NONE
 
#define GPIO_CFG_IN_INT_RISING
 
#define GPIO_CFG_IN_INT_FALLING
 
#define GPIO_CFG_IN_INT_BOTH_EDGES
 
#define GPIO_CFG_IN_INT_LOW
 
#define GPIO_CFG_IN_INT_HIGH
 
GPIO_PinConfig wakeup configuration macros.
#define GPIO_CFG_WAKEUP_DISABLE
 
#define GPIO_CFG_WAKEUP_ON_0
 
#define GPIO_CFG_WAKEUP_ON_1
 
Special GPIO_PinConfig configuration macros.
#define GPIO_DO_NOT_CONFIG
 Use this GPIO_PinConfig definition to inform GPIO_init() NOT to configure the corresponding pin. More...
 
GPIO_Mux configuration macros

For additional muxing options, see the directions in the device-specific GPIO driver.

#define GPIO_MUX_GPIO
 

Typedefs

typedef uint32_t GPIO_PinConfig
 GPIO pin configuration settings. More...
 
typedef void(* GPIO_CallbackFxn) (uint_least8_t index)
 GPIO callback function type. More...
 

Functions

void GPIO_clearInt (uint_least8_t index)
 Clear a GPIO pin interrupt flag. More...
 
void GPIO_disableInt (uint_least8_t index)
 Disable a GPIO pin interrupt. More...
 
void GPIO_enableInt (uint_least8_t index)
 Enable a GPIO pin interrupt. More...
 
void GPIO_init ()
 Initializes the GPIO module. More...
 
uint_fast8_t GPIO_read (uint_least8_t index)
 Reads the value of a GPIO pin. More...
 
void GPIO_toggle (uint_least8_t index)
 Toggles the current state of a GPIO. More...
 
void GPIO_write (uint_least8_t index, unsigned int value)
 Writes the value to a GPIO pin. More...
 
void GPIO_setCallback (uint_least8_t index, GPIO_CallbackFxn callback)
 Bind a callback function to a GPIO pin interrupt. More...
 
GPIO_CallbackFxn GPIO_getCallback (uint_least8_t index)
 Gets the callback associated with a GPIO pin. More...
 
int_fast16_t GPIO_setConfig (uint_least8_t index, GPIO_PinConfig pinConfig)
 Configure the gpio pin. More...
 
void GPIO_setInterruptConfig (uint_least8_t index, GPIO_PinConfig config)
 Configure the gpio pin. More...
 
void GPIO_getConfig (uint_least8_t index, GPIO_PinConfig *pinConfig)
 Get the current configuration for a gpio pin. More...
 
void GPIO_resetConfig (uint_least8_t index)
 Resets the configuration for a gpio pin to the default value. More...
 
uint32_t GPIO_getMux (uint_least8_t index)
 Get the current mux for a gpio pin. More...
 
int_fast16_t GPIO_setConfigAndMux (uint_least8_t index, GPIO_PinConfig pinConfig, uint32_t mux)
 Configure the gpio pin's config and mux in a single write. More...
 
void GPIO_setUserArg (uint_least8_t index, void *arg)
 Set the user argument for a gpio pin. More...
 
void * GPIO_getUserArg (uint_least8_t index)
 Get the user argument for a gpio pin. More...
 
© Copyright 1995-2024, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale