Macros | Functions
gpio.h File Reference
#include <msp.h>
#include <stdint.h>

Go to the source code of this file.

Macros

#define GPIO_PORT_P1   1
 
#define GPIO_PORT_P2   2
 
#define GPIO_PORT_P3   3
 
#define GPIO_PORT_P4   4
 
#define GPIO_PORT_P5   5
 
#define GPIO_PORT_P6   6
 
#define GPIO_PORT_P7   7
 
#define GPIO_PORT_P8   8
 
#define GPIO_PORT_P9   9
 
#define GPIO_PORT_P10   10
 
#define GPIO_PORT_PA   1
 
#define GPIO_PORT_PB   3
 
#define GPIO_PORT_PC   5
 
#define GPIO_PORT_PD   7
 
#define GPIO_PORT_PE   9
 
#define GPIO_PORT_PJ   11
 
#define GPIO_PIN0   (0x0001)
 
#define GPIO_PIN1   (0x0002)
 
#define GPIO_PIN2   (0x0004)
 
#define GPIO_PIN3   (0x0008)
 
#define GPIO_PIN4   (0x0010)
 
#define GPIO_PIN5   (0x0020)
 
#define GPIO_PIN6   (0x0040)
 
#define GPIO_PIN7   (0x0080)
 
#define GPIO_PIN8   (0x0100)
 
#define GPIO_PIN9   (0x0200)
 
#define GPIO_PIN10   (0x0400)
 
#define GPIO_PIN11   (0x0800)
 
#define GPIO_PIN12   (0x1000)
 
#define GPIO_PIN13   (0x2000)
 
#define GPIO_PIN14   (0x4000)
 
#define GPIO_PIN15   (0x8000)
 
#define PIN_ALL8   (0xFF)
 
#define PIN_ALL16   (0xFFFF)
 
#define GPIO_PRIMARY_MODULE_FUNCTION   (0x01)
 
#define GPIO_SECONDARY_MODULE_FUNCTION   (0x02)
 
#define GPIO_TERTIARY_MODULE_FUNCTION   (0x03)
 
#define GPIO_HIGH_TO_LOW_TRANSITION   (0x01)
 
#define GPIO_LOW_TO_HIGH_TRANSITION   (0x00)
 
#define GPIO_INPUT_PIN_HIGH   (0x01)
 
#define GPIO_INPUT_PIN_LOW   (0x00)
 
#define GPIO_selectInterruptEdge   GPIO_interruptEdgeSelect
 
#define GPIO_clearInterrupt   GPIO_clearInterruptFlag
 

Functions

void GPIO_setAsOutputPin (uint_fast8_t selectedPort, uint_fast16_t selectedPins)
 This function configures the selected Pin as output pin. More...
 
void GPIO_setAsInputPin (uint_fast8_t selectedPort, uint_fast16_t selectedPins)
 This function configures the selected Pin as input pin. More...
 
void GPIO_setAsPeripheralModuleFunctionOutputPin (uint_fast8_t selectedPort, uint_fast16_t selectedPins, uint_fast8_t mode)
 This function configures the peripheral module function in the output direction for the selected pin for either primary, secondary or ternary module function modes. More...
 
void GPIO_setAsPeripheralModuleFunctionInputPin (uint_fast8_t selectedPort, uint_fast16_t selectedPins, uint_fast8_t mode)
 This function configures the peripheral module function in the input direction for the selected pin for either primary, secondary or ternary module function modes. More...
 
void GPIO_setOutputHighOnPin (uint_fast8_t selectedPort, uint_fast16_t selectedPins)
 This function sets output HIGH on the selected Pin. More...
 
void GPIO_setOutputLowOnPin (uint_fast8_t selectedPort, uint_fast16_t selectedPins)
 This function sets output LOW on the selected Pin. More...
 
void GPIO_toggleOutputOnPin (uint_fast8_t selectedPort, uint_fast16_t selectedPins)
 This function toggles the output on the selected Pin. More...
 
void GPIO_setAsInputPinWithPullDownResistor (uint_fast8_t selectedPort, uint_fast16_t selectedPins)
 This function sets the selected Pin in input Mode with Pull Down resistor. More...
 
void GPIO_setAsInputPinWithPullUpResistor (uint_fast8_t selectedPort, uint_fast16_t selectedPins)
 This function sets the selected Pin in input Mode with Pull Up resistor. More...
 
uint8_t GPIO_getInputPinValue (uint_fast8_t selectedPort, uint_fast16_t selectedPins)
 This function gets the input value on the selected pin. More...
 
void GPIO_enableInterrupt (uint_fast8_t selectedPort, uint_fast16_t selectedPins)
 This function enables the port interrupt on the selected pin. More...
 
void GPIO_disableInterrupt (uint_fast8_t selectedPort, uint_fast16_t selectedPins)
 This function disables the port interrupt on the selected pin. More...
 
uint_fast16_t GPIO_getInterruptStatus (uint_fast8_t selectedPort, uint_fast16_t selectedPins)
 This function gets the interrupt status of the selected pin. More...
 
void GPIO_clearInterruptFlag (uint_fast8_t selectedPort, uint_fast16_t selectedPins)
 This function clears the interrupt flag on the selected pin. More...
 
void GPIO_interruptEdgeSelect (uint_fast8_t selectedPort, uint_fast16_t selectedPins, uint_fast8_t edgeSelect)
 This function selects on what edge the port interrupt flag should be set for a transition. More...
 
uint_fast16_t GPIO_getEnabledInterruptStatus (uint_fast8_t selectedPort)
 This function gets the interrupt status of the provided PIN and masks it with the interrupts that are actually enabled. This is useful for inside ISRs where the status of only the enabled interrupts needs to be checked. More...
 
void GPIO_registerInterrupt (uint_fast8_t selectedPort, void(*intHandler)(void))
 
void GPIO_unregisterInterrupt (uint_fast8_t selectedPort)
 
void GPIO_setDriveStrengthHigh (uint_fast8_t selectedPort, uint_fast8_t selectedPins)
 
void GPIO_setDriveStrengthLow (uint_fast8_t selectedPort, uint_fast8_t selectedPins)
 

Copyright 2016, Texas Instruments Incorporated