Defines | Functions
gpio.h File Reference

Go to the source code of this file.

Defines

#define __MSP430_HAS_PORT1_R__
#define __MSP430_HAS_PORT2_R__
#define __MSP430_HAS_PORTA_R__
#define GPIO_PORT_P1   0x00
#define GPIO_PORT_P2   0x01
#define GPIO_PORT_P3   0x00
#define GPIO_PORT_P4   0x01
#define GPIO_PORT_P5   0x00
#define GPIO_PORT_P6   0x01
#define GPIO_PORT_P7   0x00
#define GPIO_PORT_P8   0x01
#define GPIO_PORT_P9   0x00
#define GPIO_PORT_P10   0x01
#define GPIO_PORT_P11   0x00
#define GPIO_PORT_PA   0x02
#define GPIO_PORT_PB   0x02
#define GPIO_PORT_PC   0x02
#define GPIO_PORT_PD   0x02
#define GPIO_PORT_PE   0x02
#define GPIO_PORT_PF   0x02
#define GPIO_PORT_PJ   0x02
#define GPIO_PIN0   0x01
#define GPIO_PIN1   0x02
#define GPIO_PIN2   0x04
#define GPIO_PIN3   0x08
#define GPIO_PIN4   0x10
#define GPIO_PIN5   0x20
#define GPIO_PIN6   0x40
#define GPIO_PIN7   0x80
#define GPIO_PIN8   0x100
#define GPIO_PIN9   0x200
#define GPIO_PIN10   0x400
#define GPIO_PIN11   0x800
#define GPIO_PIN12   0x1000
#define GPIO_PIN13   0x2000
#define GPIO_PIN14   0x4000
#define GPIO_PIN15   0x8000
#define GPIO_INPUT_PIN_HIGH   0x01
#define GPIO_INPUT_PIN_LOW   0x00
#define GPIO_HIGH_TO_LOW_TRANSITION   0x01
#define GPIO_LOW_TO_HIGH_TRANSITION   0x00
#define GPIO_FULL_OUTPUT_DRIVE_STRENGTH   0x01
#define GPIO_REDUCED_OUTPUT_DRIVE_STRENGTH   0x00

Functions

void GPIO_setAsOutputPin (unsigned int baseAddress, unsigned char selectedPort, unsigned int selectedPin)
void GPIO_setAsInputPin (unsigned int baseAddress, unsigned char selectedPort, unsigned int selectedPin)
void GPIO_setOutputHighOnPin (unsigned int baseAddress, unsigned char selectedPort, unsigned int selectedPin)
void GPIO_setOutputLowOnPin (unsigned int baseAddress, unsigned char selectedPort, unsigned int selectedPin)
void GPIO_toggleOutputOnPin (unsigned int baseAddress, unsigned char selectedPort, unsigned int selectedPin)
void GPIO_setAsInputPinWithPullDownresistor (unsigned int baseAddress, unsigned char selectedPort, unsigned int selectedPin)
void GPIO_setAsInputPinWithPullUpresistor (unsigned int baseAddress, unsigned char selectedPort, unsigned int selectedPin)
void GPIO_enableInterrupt (unsigned int baseAddress, unsigned char selectedPort, unsigned int selectedPins)
void GPIO_disableInterrupt (unsigned int baseAddress, unsigned char selectedPort, unsigned int selectedPins)
void GPIO_disbleInterrupt (unsigned int baseAddress, unsigned char selectedPort, unsigned int selectedPins)
void GPIO_clearInterruptFlag (unsigned int baseAddress, unsigned char selectedPort, unsigned int selectedPins)
unsigned int GPIO_getInterruptStatus (unsigned int baseAddress, unsigned char selectedPort, unsigned int selectedPins)
void GPIO_interruptEdgeSelect (unsigned int baseAddress, unsigned char selectedPort, unsigned int selectedPins, unsigned char edgeSelect)
unsigned short GPIO_getInputPinValue (unsigned int baseAddress, unsigned char selectedPort, unsigned int selectedPin)
void GPIO_setDriveStrength (unsigned int baseAddress, unsigned char selectedPort, unsigned int selectedPins, unsigned char driveStrength)
void GPIO_setAsPeripheralModuleFunctionOutputPin (unsigned int baseAddress, unsigned char selectedPort, unsigned int selectedPin)
void GPIO_setAsPeripheralModuleFunctionInputPin (unsigned int baseAddress, unsigned char selectedPort, unsigned int selectedPin)

Define Documentation

#define __MSP430_HAS_PORT1_R__
#define __MSP430_HAS_PORT2_R__
#define __MSP430_HAS_PORTA_R__
#define GPIO_PORT_P1   0x00
#define GPIO_PORT_P2   0x01
#define GPIO_PORT_P3   0x00
#define GPIO_PORT_P4   0x01
#define GPIO_PORT_P5   0x00
#define GPIO_PORT_P6   0x01
#define GPIO_PORT_P7   0x00
#define GPIO_PORT_P8   0x01
#define GPIO_PORT_P9   0x00
#define GPIO_PORT_P10   0x01
#define GPIO_PORT_P11   0x00
#define GPIO_PORT_PA   0x02
#define GPIO_PORT_PB   0x02
#define GPIO_PORT_PC   0x02
#define GPIO_PORT_PD   0x02
#define GPIO_PORT_PE   0x02
#define GPIO_PORT_PF   0x02
#define GPIO_PORT_PJ   0x02
#define GPIO_PIN0   0x01
#define GPIO_PIN1   0x02
#define GPIO_PIN2   0x04
#define GPIO_PIN3   0x08
#define GPIO_PIN4   0x10
#define GPIO_PIN5   0x20
#define GPIO_PIN6   0x40
#define GPIO_PIN7   0x80
#define GPIO_PIN8   0x100
#define GPIO_PIN9   0x200
#define GPIO_PIN10   0x400
#define GPIO_PIN11   0x800
#define GPIO_PIN12   0x1000
#define GPIO_PIN13   0x2000
#define GPIO_PIN14   0x4000
#define GPIO_PIN15   0x8000
#define GPIO_INPUT_PIN_HIGH   0x01

Referenced by GPIO_getInputPinValue().

#define GPIO_INPUT_PIN_LOW   0x00

Referenced by GPIO_getInputPinValue().

#define GPIO_HIGH_TO_LOW_TRANSITION   0x01
#define GPIO_LOW_TO_HIGH_TRANSITION   0x00
#define GPIO_FULL_OUTPUT_DRIVE_STRENGTH   0x01

Referenced by GPIO_setDriveStrength().

#define GPIO_REDUCED_OUTPUT_DRIVE_STRENGTH   0x00

Referenced by GPIO_setDriveStrength().


Function Documentation

void GPIO_setAsOutputPin ( unsigned int  baseAddress,
unsigned char  selectedPort,
unsigned int  selectedPins 
)

This function configures the selected Pin as output pin

Parameters:
baseAddressis the base address of the GPIO Port Register
selectedPortis the selected port. Valid values are GPIO_PORT_P1, GPIO_PORT_P2, GPIO_PORT_P3, GPIO_PORT_P4, GPIO_PORT_P5, GPIO_PORT_P6, GPIO_PORT_P7, GPIO_PORT_P8, GPIO_PORT_P9, GPIO_PORT_P10, GPIO_PORT_P11, GPIO_PORT_PA, GPIO_PORT_PB, GPIO_PORT_PC, GPIO_PORT_PD, GPIO_PORT_PE, GPIO_PORT_PF, GPIO_PORT_PJ
selectedPinsis the specified pin in the selected port. Valid values are GPIO_PIN0, GPIO_PIN1, GPIO_PIN2, GPIO_PIN3, GPIO_PIN4, GPIO_PIN5, GPIO_PIN6, GPIO_PIN7, GPIO_PIN8, GPIO_PIN9, GPIO_PIN10, GPIO_PIN11, GPIO_PIN12, GPIO_PIN13, GPIO_PIN14, GPIO_PIN15 Modified registers are PxSEL and PxDIR.
Returns:
None

References ASSERT, GPIO_PIN0, GPIO_PIN1, GPIO_PIN10, GPIO_PIN11, GPIO_PIN12, GPIO_PIN13, GPIO_PIN14, GPIO_PIN15, GPIO_PIN2, GPIO_PIN3, GPIO_PIN4, GPIO_PIN5, GPIO_PIN6, GPIO_PIN7, GPIO_PIN8, GPIO_PIN9, GPIO_PORT_P1, GPIO_PORT_P10, GPIO_PORT_P11, GPIO_PORT_P2, GPIO_PORT_P3, GPIO_PORT_P4, GPIO_PORT_P5, GPIO_PORT_P6, GPIO_PORT_P7, GPIO_PORT_P8, GPIO_PORT_P9, GPIO_PORT_PA, GPIO_PORT_PB, GPIO_PORT_PC, GPIO_PORT_PD, GPIO_PORT_PE, GPIO_PORT_PF, GPIO_PORT_PJ, HWREG, and HWREGB.

void GPIO_setAsInputPin ( unsigned int  baseAddress,
unsigned char  selectedPort,
unsigned int  selectedPins 
)

This function configures the selected Pin as input pin

Parameters:
baseAddressis the base address of the GPIO Port Register
selectedPortis the selected port. Valid values are GPIO_PORT_P1, GPIO_PORT_P2, GPIO_PORT_P3, GPIO_PORT_P4, GPIO_PORT_P5, GPIO_PORT_P6, GPIO_PORT_P7, GPIO_PORT_P8, GPIO_PORT_P9, GPIO_PORT_P10, GPIO_PORT_P11, GPIO_PORT_PA, GPIO_PORT_PB, GPIO_PORT_PC, GPIO_PORT_PD, GPIO_PORT_PE, GPIO_PORT_PF, GPIO_PORT_PJ
selectedPinsis the specified pin in the selected port. Valid values are GPIO_PIN0, GPIO_PIN1, GPIO_PIN2, GPIO_PIN3, GPIO_PIN4, GPIO_PIN5, GPIO_PIN6, GPIO_PIN7, GPIO_PIN8, GPIO_PIN9, GPIO_PIN10, GPIO_PIN11, GPIO_PIN12, GPIO_PIN13, GPIO_PIN14, GPIO_PIN15 Modified registers are PxSEL, PxREN and PxDIR.
Returns:
None

References ASSERT, GPIO_PIN0, GPIO_PIN1, GPIO_PIN10, GPIO_PIN11, GPIO_PIN12, GPIO_PIN13, GPIO_PIN14, GPIO_PIN15, GPIO_PIN2, GPIO_PIN3, GPIO_PIN4, GPIO_PIN5, GPIO_PIN6, GPIO_PIN7, GPIO_PIN8, GPIO_PIN9, GPIO_PORT_P1, GPIO_PORT_P10, GPIO_PORT_P11, GPIO_PORT_P2, GPIO_PORT_P3, GPIO_PORT_P4, GPIO_PORT_P5, GPIO_PORT_P6, GPIO_PORT_P7, GPIO_PORT_P8, GPIO_PORT_P9, GPIO_PORT_PA, GPIO_PORT_PB, GPIO_PORT_PC, GPIO_PORT_PD, GPIO_PORT_PE, GPIO_PORT_PF, GPIO_PORT_PJ, HWREG, and HWREGB.

void GPIO_setOutputHighOnPin ( unsigned int  baseAddress,
unsigned char  selectedPort,
unsigned int  selectedPins 
)

This function sets output HIGH on the selected Pin

Parameters:
baseAddressis the base address of the GPIO Port Register
selectedPortis the selected port. Valid values are GPIO_PORT_P1, GPIO_PORT_P2, GPIO_PORT_P3, GPIO_PORT_P4,GPIO_PORT_P5, GPIO_PORT_P6, GPIO_PORT_P7,GPIO_PORT_P8, GPIO_PORT_P9, GPIO_PORT_P10, GPIO_PORT_P11, GPIO_PORT_PA, GPIO_PORT_PB, GPIO_PORT_PC, GPIO_PORT_PD, GPIO_PORT_PE, GPIO_PORT_PF, GPIO_PORT_PJ
selectedPinsis the specified pin in the selected port. Valid values are GPIO_PIN0, GPIO_PIN1, GPIO_PIN2, GPIO_PIN3, GPIO_PIN4, GPIO_PIN5, GPIO_PIN6, GPIO_PIN7,GPIO_PIN8,GPIO_PIN9,GPIO_PIN10, GPIO_PIN11,GPIO_PIN12,GPIO_PIN13,GPIO_PIN14, GPIO_PIN15 Modified registers are PxOUT.
Returns:
None

References ASSERT, GPIO_PIN0, GPIO_PIN1, GPIO_PIN10, GPIO_PIN11, GPIO_PIN12, GPIO_PIN13, GPIO_PIN14, GPIO_PIN15, GPIO_PIN2, GPIO_PIN3, GPIO_PIN4, GPIO_PIN5, GPIO_PIN6, GPIO_PIN7, GPIO_PIN8, GPIO_PIN9, GPIO_PORT_P1, GPIO_PORT_P10, GPIO_PORT_P11, GPIO_PORT_P2, GPIO_PORT_P3, GPIO_PORT_P4, GPIO_PORT_P5, GPIO_PORT_P6, GPIO_PORT_P7, GPIO_PORT_P8, GPIO_PORT_P9, GPIO_PORT_PA, GPIO_PORT_PB, GPIO_PORT_PC, GPIO_PORT_PD, GPIO_PORT_PE, GPIO_PORT_PF, GPIO_PORT_PJ, HWREG, and HWREGB.

void GPIO_setOutputLowOnPin ( unsigned int  baseAddress,
unsigned char  selectedPort,
unsigned int  selectedPins 
)

This function sets output LOW on the selected Pin

Parameters:
baseAddressis the base address of the GPIO Port Register
selectedPortis the selected port. Valid values are GPIO_PORT_P1, GPIO_PORT_P2, GPIO_PORT_P3, GPIO_PORT_P4,GPIO_PORT_P5, GPIO_PORT_P6, GPIO_PORT_P7,GPIO_PORT_P8, GPIO_PORT_P9, GPIO_PORT_P10, GPIO_PORT_P11, GPIO_PORT_PA, GPIO_PORT_PB, GPIO_PORT_PC, GPIO_PORT_PD, GPIO_PORT_PE, GPIO_PORT_PF, GPIO_PORT_PJ
selectedPinsis the specified pin in the selected port. Valid values are GPIO_PIN0, GPIO_PIN1, GPIO_PIN2, GPIO_PIN3, GPIO_PIN4, GPIO_PIN5, GPIO_PIN6, GPIO_PIN7,GPIO_PIN8,GPIO_PIN9,GPIO_PIN10, GPIO_PIN11,GPIO_PIN12,GPIO_PIN13,GPIO_PIN14, GPIO_PIN15 Modified registers are PxOUT.
Returns:
None

References ASSERT, GPIO_PIN0, GPIO_PIN1, GPIO_PIN10, GPIO_PIN11, GPIO_PIN12, GPIO_PIN13, GPIO_PIN14, GPIO_PIN15, GPIO_PIN2, GPIO_PIN3, GPIO_PIN4, GPIO_PIN5, GPIO_PIN6, GPIO_PIN7, GPIO_PIN8, GPIO_PIN9, GPIO_PORT_P1, GPIO_PORT_P10, GPIO_PORT_P11, GPIO_PORT_P2, GPIO_PORT_P3, GPIO_PORT_P4, GPIO_PORT_P5, GPIO_PORT_P6, GPIO_PORT_P7, GPIO_PORT_P8, GPIO_PORT_P9, GPIO_PORT_PA, GPIO_PORT_PB, GPIO_PORT_PC, GPIO_PORT_PD, GPIO_PORT_PE, GPIO_PORT_PF, GPIO_PORT_PJ, HWREG, and HWREGB.

void GPIO_toggleOutputOnPin ( unsigned int  baseAddress,
unsigned char  selectedPort,
unsigned int  selectedPins 
)

This function toggles the output on the selected Pin

Parameters:
baseAddressis the base address of the GPIO Port Register
selectedPortis the selected port. Valid values are GPIO_PORT_P1, GPIO_PORT_P2, GPIO_PORT_P3, GPIO_PORT_P4,GPIO_PORT_P5, GPIO_PORT_P6, GPIO_PORT_P7,GPIO_PORT_P8, GPIO_PORT_P9, GPIO_PORT_P10, GPIO_PORT_P11, GPIO_PORT_PA, GPIO_PORT_PB, GPIO_PORT_PC, GPIO_PORT_PD, GPIO_PORT_PE, GPIO_PORT_PF, GPIO_PORT_PJ
selectedPinsis the specified pin in the selected port. Valid values are GPIO_PIN0, GPIO_PIN1, GPIO_PIN2, GPIO_PIN3, GPIO_PIN4, GPIO_PIN5, GPIO_PIN6, GPIO_PIN7,GPIO_PIN8,GPIO_PIN9,GPIO_PIN10, GPIO_PIN11,GPIO_PIN12,GPIO_PIN13,GPIO_PIN14, GPIO_PIN15 Modified registers are PxOUT.
Returns:
None

References ASSERT, GPIO_PIN0, GPIO_PIN1, GPIO_PIN10, GPIO_PIN11, GPIO_PIN12, GPIO_PIN13, GPIO_PIN14, GPIO_PIN15, GPIO_PIN2, GPIO_PIN3, GPIO_PIN4, GPIO_PIN5, GPIO_PIN6, GPIO_PIN7, GPIO_PIN8, GPIO_PIN9, GPIO_PORT_P1, GPIO_PORT_P10, GPIO_PORT_P11, GPIO_PORT_P2, GPIO_PORT_P3, GPIO_PORT_P4, GPIO_PORT_P5, GPIO_PORT_P6, GPIO_PORT_P7, GPIO_PORT_P8, GPIO_PORT_P9, GPIO_PORT_PA, GPIO_PORT_PB, GPIO_PORT_PC, GPIO_PORT_PD, GPIO_PORT_PE, GPIO_PORT_PF, GPIO_PORT_PJ, HWREG, and HWREGB.

void GPIO_setAsInputPinWithPullDownresistor ( unsigned int  baseAddress,
unsigned char  selectedPort,
unsigned int  selectedPins 
)

This function sets the selected Pin in input Mode wuth Pull Down resistor

Parameters:
baseAddressis the base address of the GPIO Port Register
selectedPortis the selected port. Valid values are GPIO_PORT_P1, GPIO_PORT_P2, GPIO_PORT_P3, GPIO_PORT_P4,GPIO_PORT_P5, GPIO_PORT_P6, GPIO_PORT_P7,GPIO_PORT_P8, GPIO_PORT_P9, GPIO_PORT_P10, GPIO_PORT_P11, GPIO_PORT_PA, GPIO_PORT_PB, GPIO_PORT_PC, GPIO_PORT_PD, GPIO_PORT_PE, GPIO_PORT_PF, GPIO_PORT_PJ
selectedPinsis the specified pin in the selected port. Valid values are GPIO_PIN0, GPIO_PIN1, GPIO_PIN2, GPIO_PIN3, GPIO_PIN4, GPIO_PIN5, GPIO_PIN6, GPIO_PIN7,GPIO_PIN8,GPIO_PIN9,GPIO_PIN10, GPIO_PIN11,GPIO_PIN12,GPIO_PIN13,GPIO_PIN14, GPIO_PIN15 Modified registers are PxREN, PxOUT and PxDIR.
Returns:
None

References ASSERT, GPIO_PIN0, GPIO_PIN1, GPIO_PIN10, GPIO_PIN11, GPIO_PIN12, GPIO_PIN13, GPIO_PIN14, GPIO_PIN15, GPIO_PIN2, GPIO_PIN3, GPIO_PIN4, GPIO_PIN5, GPIO_PIN6, GPIO_PIN7, GPIO_PIN8, GPIO_PIN9, GPIO_PORT_P1, GPIO_PORT_P10, GPIO_PORT_P11, GPIO_PORT_P2, GPIO_PORT_P3, GPIO_PORT_P4, GPIO_PORT_P5, GPIO_PORT_P6, GPIO_PORT_P7, GPIO_PORT_P8, GPIO_PORT_P9, GPIO_PORT_PA, GPIO_PORT_PB, GPIO_PORT_PC, GPIO_PORT_PD, GPIO_PORT_PE, GPIO_PORT_PF, GPIO_PORT_PJ, HWREG, and HWREGB.

void GPIO_setAsInputPinWithPullUpresistor ( unsigned int  baseAddress,
unsigned char  selectedPort,
unsigned int  selectedPins 
)

This function sets the selected Pin in input Mode wuth Pull Up resistor

Parameters:
baseAddressis the base address of the GPIO Port Register
selectedPortis the selected port. Valid values are GPIO_PORT_P1, GPIO_PORT_P2, GPIO_PORT_P3, GPIO_PORT_P4,GPIO_PORT_P5, GPIO_PORT_P6, GPIO_PORT_P7,GPIO_PORT_P8, GPIO_PORT_P9, GPIO_PORT_P10, GPIO_PORT_P11, GPIO_PORT_PA, GPIO_PORT_PB, GPIO_PORT_PC, GPIO_PORT_PD, GPIO_PORT_PE, GPIO_PORT_PF, GPIO_PORT_PJ
selectedPinsis the specified pin in the selected port. Valid values are GPIO_PIN0, GPIO_PIN1, GPIO_PIN2, GPIO_PIN3, GPIO_PIN4, GPIO_PIN5, GPIO_PIN6, GPIO_PIN7,GPIO_PIN8,GPIO_PIN9,GPIO_PIN10, GPIO_PIN11,GPIO_PIN12,GPIO_PIN13,GPIO_PIN14, GPIO_PIN15 Modified registers are PxREN, PxOUT and PxDIR.
Returns:
None

References ASSERT, GPIO_PIN0, GPIO_PIN1, GPIO_PIN10, GPIO_PIN11, GPIO_PIN12, GPIO_PIN13, GPIO_PIN14, GPIO_PIN15, GPIO_PIN2, GPIO_PIN3, GPIO_PIN4, GPIO_PIN5, GPIO_PIN6, GPIO_PIN7, GPIO_PIN8, GPIO_PIN9, GPIO_PORT_P1, GPIO_PORT_P10, GPIO_PORT_P11, GPIO_PORT_P2, GPIO_PORT_P3, GPIO_PORT_P4, GPIO_PORT_P5, GPIO_PORT_P6, GPIO_PORT_P7, GPIO_PORT_P8, GPIO_PORT_P9, GPIO_PORT_PA, GPIO_PORT_PB, GPIO_PORT_PC, GPIO_PORT_PD, GPIO_PORT_PE, GPIO_PORT_PF, GPIO_PORT_PJ, HWREG, and HWREGB.

void GPIO_enableInterrupt ( unsigned int  baseAddress,
unsigned char  selectedPort,
unsigned int  selectedPins 
)

This function enables the port interrupt on the selected pin. Note that only Port 1,2, A have this capability

Parameters:
baseAddressis the base address of the GPIO Port Register
selectedPortis the selected port. Valid values are GPIO_PORT_P1, GPIO_PORT_P2, GPIO_PORT_PA
selectedPinsis the specified pin in the selected port. Valid values are GPIO_PIN0, GPIO_PIN1, GPIO_PIN2, GPIO_PIN3, GPIO_PIN4, GPIO_PIN5, GPIO_PIN6, GPIO_PIN7,GPIO_PIN8,GPIO_PIN9,GPIO_PIN10, GPIO_PIN11,GPIO_PIN12,GPIO_PIN13,GPIO_PIN14, GPIO_PIN15 Modified registers are PxIE.
Returns:
None

References ASSERT, GPIO_PIN0, GPIO_PIN1, GPIO_PIN10, GPIO_PIN11, GPIO_PIN12, GPIO_PIN13, GPIO_PIN14, GPIO_PIN15, GPIO_PIN2, GPIO_PIN3, GPIO_PIN4, GPIO_PIN5, GPIO_PIN6, GPIO_PIN7, GPIO_PIN8, GPIO_PIN9, GPIO_PORT_P1, GPIO_PORT_P2, GPIO_PORT_PA, HWREG, and HWREGB.

void GPIO_disableInterrupt ( unsigned int  baseAddress,
unsigned char  selectedPort,
unsigned int  selectedPins 
)

This function disables the port interrupt on the selected pin. Note that only Port 1,2, A have this capability

Parameters:
baseAddressis the base address of the GPIO Port Register
selectedPortis the selected port. Valid values are GPIO_PORT_P1, GPIO_PORT_P2, GPIO_PORT_PA
selectedPinsis the specified pin in the selected port. Valid values are GPIO_PIN0, GPIO_PIN1, GPIO_PIN2, GPIO_PIN3, GPIO_PIN4, GPIO_PIN5, GPIO_PIN6, GPIO_PIN7,GPIO_PIN8,GPIO_PIN9,GPIO_PIN10, GPIO_PIN11,GPIO_PIN12,GPIO_PIN13,GPIO_PIN14, GPIO_PIN15 Modified registers are PxIE.
Returns:
None

References ASSERT, GPIO_PIN0, GPIO_PIN1, GPIO_PIN10, GPIO_PIN11, GPIO_PIN12, GPIO_PIN13, GPIO_PIN14, GPIO_PIN15, GPIO_PIN2, GPIO_PIN3, GPIO_PIN4, GPIO_PIN5, GPIO_PIN6, GPIO_PIN7, GPIO_PIN8, GPIO_PIN9, GPIO_PORT_P1, GPIO_PORT_P2, GPIO_PORT_PA, HWREG, and HWREGB.

Referenced by GPIO_disbleInterrupt().

void GPIO_disbleInterrupt ( unsigned int  baseAddress,
unsigned char  selectedPort,
unsigned int  selectedPins 
)

DEPRECATED - Spelling Error Fixed This function disables the port interrupt on the selected pin. Note that only Port 1,2, A have this capability

Parameters:
baseAddressis the base address of the GPIO Port Register
selectedPortis the selected port. Valid values are GPIO_PORT_P1, GPIO_PORT_P2, GPIO_PORT_PA
selectedPinsis the specified pin in the selected port. Valid values are GPIO_PIN0, GPIO_PIN1, GPIO_PIN2, GPIO_PIN3, GPIO_PIN4, GPIO_PIN5, GPIO_PIN6, GPIO_PIN7,GPIO_PIN8,GPIO_PIN9,GPIO_PIN10, GPIO_PIN11,GPIO_PIN12,GPIO_PIN13,GPIO_PIN14, GPIO_PIN15 Modified registers are PxIE.
Returns:
None

References GPIO_disableInterrupt().

void GPIO_clearInterruptFlag ( unsigned int  baseAddress,
unsigned char  selectedPort,
unsigned int  selectedPins 
)

This function clears the interrupt flag on the selected pin. Note that only Port 1,2, A have this capability

Parameters:
baseAddressis the base address of the GPIO Port Register
selectedPortis the selected port. Valid values are GPIO_PORT_P1, GPIO_PORT_P2, GPIO_PORT_PA
selectedPinsis the specified pin in the selected port. Valid values are GPIO_PIN0, GPIO_PIN1, GPIO_PIN2, GPIO_PIN3, GPIO_PIN4, GPIO_PIN5, GPIO_PIN6, GPIO_PIN7,GPIO_PIN8,GPIO_PIN9,GPIO_PIN10, GPIO_PIN11,GPIO_PIN12,GPIO_PIN13,GPIO_PIN14, GPIO_PIN15 Modified registers are PxIFG.
Returns:
None

References ASSERT, GPIO_PIN0, GPIO_PIN1, GPIO_PIN10, GPIO_PIN11, GPIO_PIN12, GPIO_PIN13, GPIO_PIN14, GPIO_PIN15, GPIO_PIN2, GPIO_PIN3, GPIO_PIN4, GPIO_PIN5, GPIO_PIN6, GPIO_PIN7, GPIO_PIN8, GPIO_PIN9, GPIO_PORT_P1, GPIO_PORT_P2, GPIO_PORT_PA, HWREG, and HWREGB.

unsigned int GPIO_getInterruptStatus ( unsigned int  baseAddress,
unsigned char  selectedPort,
unsigned int  selectedPins 
)

This function gets the interrupt status of the selected pin. Note that only Port 1,2, A have this capability

Parameters:
baseAddressis the base address of the GPIO Port Register
selectedPortis the selected port. Valid values are GPIO_PORT_P1, GPIO_PORT_P2, GPIO_PORT_PA
selectedPinsis the specified pin in the selected port. Valid values are GPIO_PIN0, GPIO_PIN1, GPIO_PIN2, GPIO_PIN3, GPIO_PIN4, GPIO_PIN5, GPIO_PIN6, GPIO_PIN7,GPIO_PIN8,GPIO_PIN9,GPIO_PIN10, GPIO_PIN11,GPIO_PIN12,GPIO_PIN13,GPIO_PIN14, GPIO_PIN15 Modified registers are PxIFG.
Returns:
Masked state of the interupt

References ASSERT, GPIO_PIN0, GPIO_PIN1, GPIO_PIN10, GPIO_PIN11, GPIO_PIN12, GPIO_PIN13, GPIO_PIN14, GPIO_PIN15, GPIO_PIN2, GPIO_PIN3, GPIO_PIN4, GPIO_PIN5, GPIO_PIN6, GPIO_PIN7, GPIO_PIN8, GPIO_PIN9, GPIO_PORT_P1, GPIO_PORT_P2, GPIO_PORT_PA, HWREG, and HWREGB.

void GPIO_interruptEdgeSelect ( unsigned int  baseAddress,
unsigned char  selectedPort,
unsigned int  selectedPins,
unsigned char  edgeSelect 
)

This function selects on what edge the port interrupt flag should be set for a transition Note that only Port 1,2, A have this capability

Parameters:
baseAddressis the base address of the GPIO Port Register
selectedPortis the selected port. Valid values are GPIO_PORT_P1, GPIO_PORT_P2, GPIO_PORT_PA, GPIO_PORT_PB
selectedPinsis the specified pin in the selected port. Valid values are GPIO_PIN0, GPIO_PIN1, GPIO_PIN2, GPIO_PIN3, GPIO_PIN4, GPIO_PIN5, GPIO_PIN6, GPIO_PIN7
edgeSelectspecifies what tranistion sets the interrupt flag Valid values are GPIO_HIGH_TO_LOW_TRANSITION, GPIO_LOW_TO_HIGH_TRANSITION Modified registers are PxIES.
Returns:
None

References ASSERT, GPIO_HIGH_TO_LOW_TRANSITION, GPIO_LOW_TO_HIGH_TRANSITION, GPIO_PIN0, GPIO_PIN1, GPIO_PIN2, GPIO_PIN3, GPIO_PIN4, GPIO_PIN5, GPIO_PIN6, GPIO_PIN7, GPIO_PORT_P1, GPIO_PORT_P2, and HWREGB.

unsigned short GPIO_getInputPinValue ( unsigned int  baseAddress,
unsigned char  selectedPort,
unsigned int  selectedPins 
)

This function gets the input value on the selected pin

Parameters:
baseAddressis the base address of the GPIO Port Register
selectedPortis the selected port. Valid values are GPIO_PORT_P1, GPIO_PORT_P2, GPIO_PORT_P3, GPIO_PORT_P4,GPIO_PORT_P5, GPIO_PORT_P6, GPIO_PORT_P7,GPIO_PORT_P8, GPIO_PORT_P9, GPIO_PORT_P10, GPIO_PORT_P11, GPIO_PORT_PA, GPIO_PORT_PB, GPIO_PORT_PC, GPIO_PORT_PD, GPIO_PORT_PE, GPIO_PORT_PF, GPIO_PORT_PJ
selectedPinsis the specified pin in the selected port. Valid values are GPIO_PIN0, GPIO_PIN1, GPIO_PIN2, GPIO_PIN3, GPIO_PIN4, GPIO_PIN5, GPIO_PIN6, GPIO_PIN7,GPIO_PIN8,GPIO_PIN9,GPIO_PIN10, GPIO_PIN11,GPIO_PIN12,GPIO_PIN13,GPIO_PIN14, GPIO_PIN15 Modified registers are PxIN.
Returns:
Input value on Pin - GPIO_INPUT_PIN_HIGH, GPIO_INPUT_PIN_LOW

References ASSERT, GPIO_INPUT_PIN_HIGH, GPIO_INPUT_PIN_LOW, GPIO_PIN0, GPIO_PIN1, GPIO_PIN10, GPIO_PIN11, GPIO_PIN12, GPIO_PIN13, GPIO_PIN14, GPIO_PIN15, GPIO_PIN2, GPIO_PIN3, GPIO_PIN4, GPIO_PIN5, GPIO_PIN6, GPIO_PIN7, GPIO_PIN8, GPIO_PIN9, GPIO_PORT_P1, GPIO_PORT_P10, GPIO_PORT_P11, GPIO_PORT_P2, GPIO_PORT_P3, GPIO_PORT_P4, GPIO_PORT_P5, GPIO_PORT_P6, GPIO_PORT_P7, GPIO_PORT_P8, GPIO_PORT_P9, GPIO_PORT_PA, GPIO_PORT_PB, GPIO_PORT_PC, GPIO_PORT_PD, GPIO_PORT_PE, GPIO_PORT_PF, GPIO_PORT_PJ, HWREG, and HWREGB.

void GPIO_setDriveStrength ( unsigned int  baseAddress,
unsigned char  selectedPort,
unsigned int  selectedPins,
unsigned char  driveStrength 
)

This function sets the drive strength for the selected port pin.

Parameters:
baseAddressis the base address of the GPIO Port Register
selectedPortis the selected port. Valid values are GPIO_PORT_P1, GPIO_PORT_P2, GPIO_PORT_P3, GPIO_PORT_P4, GPIO_PORT_P5, GPIO_PORT_P6, GPIO_PORT_P7, GPIO_PORT_P8, GPIO_PORT_P9, GPIO_PORT_P10, GPIO_PORT_P11, GPIO_PORT_PA, GPIO_PORT_PB, GPIO_PORT_PC, GPIO_PORT_PD, GPIO_PORT_PE, GPIO_PORT_PF, GPIO_PORT_PJ
selectedPinsis the specified pin in the selected port. Valid values are GPIO_PIN0, GPIO_PIN1, GPIO_PIN2, GPIO_PIN3, GPIO_PIN4, GPIO_PIN5, GPIO_PIN6, GPIO_PIN7, GPIO_PIN8, GPIO_PIN9, GPIO_PIN10, GPIO_PIN11, GPIO_PIN12, GPIO_PIN13, GPIO_PIN14, GPIO_PIN15
driveStrengthspecifies what tranistion sets the interrupt flag Valid values are GPIO_REDUCED_OUTPUT_DRIVE_STRENGTH, GPIO_FULL_OUTPUT_DRIVE_STRENGTH Modified registers are PxIES.
Returns:
None

References ASSERT, GPIO_FULL_OUTPUT_DRIVE_STRENGTH, GPIO_PIN0, GPIO_PIN1, GPIO_PIN10, GPIO_PIN11, GPIO_PIN12, GPIO_PIN13, GPIO_PIN14, GPIO_PIN15, GPIO_PIN2, GPIO_PIN3, GPIO_PIN4, GPIO_PIN5, GPIO_PIN6, GPIO_PIN7, GPIO_PIN8, GPIO_PIN9, GPIO_PORT_P1, GPIO_PORT_P10, GPIO_PORT_P11, GPIO_PORT_P2, GPIO_PORT_P3, GPIO_PORT_P4, GPIO_PORT_P5, GPIO_PORT_P6, GPIO_PORT_P7, GPIO_PORT_P8, GPIO_PORT_P9, GPIO_PORT_PA, GPIO_PORT_PB, GPIO_PORT_PC, GPIO_PORT_PD, GPIO_PORT_PE, GPIO_PORT_PF, GPIO_PORT_PJ, GPIO_REDUCED_OUTPUT_DRIVE_STRENGTH, and HWREGB.

void GPIO_setAsPeripheralModuleFunctionOutputPin ( unsigned int  baseAddress,
unsigned char  selectedPort,
unsigned int  selectedPins 
)

This function configures the peripheral module function in output direction for the selected pin.

Parameters:
baseAddressis the base address of the GPIO Port Register
selectedPortis the selected port. Valid values are GPIO_PORT_P1, GPIO_PORT_P2, GPIO_PORT_P3, GPIO_PORT_P4,GPIO_PORT_P5, GPIO_PORT_P6, GPIO_PORT_P7,GPIO_PORT_P8, GPIO_PORT_P9, GPIO_PORT_P10, GPIO_PORT_P11, GPIO_PORT_PA, GPIO_PORT_PB, GPIO_PORT_PC, GPIO_PORT_PD, GPIO_PORT_PE, GPIO_PORT_PF, GPIO_PORT_PJ
selectedPinsis the specified pin in the selected port. Valid values are GPIO_PIN0, GPIO_PIN1, GPIO_PIN2, GPIO_PIN3, GPIO_PIN4, GPIO_PIN5, GPIO_PIN6, GPIO_PIN7,GPIO_PIN8,GPIO_PIN9,GPIO_PIN10, GPIO_PIN11,GPIO_PIN12,GPIO_PIN13,GPIO_PIN14, GPIO_PIN15 Modified registers are PxSEL and PxDIR.
Returns:
None

References ASSERT, GPIO_PIN0, GPIO_PIN1, GPIO_PIN10, GPIO_PIN11, GPIO_PIN12, GPIO_PIN13, GPIO_PIN14, GPIO_PIN15, GPIO_PIN2, GPIO_PIN3, GPIO_PIN4, GPIO_PIN5, GPIO_PIN6, GPIO_PIN7, GPIO_PIN8, GPIO_PIN9, GPIO_PORT_P1, GPIO_PORT_P10, GPIO_PORT_P11, GPIO_PORT_P2, GPIO_PORT_P3, GPIO_PORT_P4, GPIO_PORT_P5, GPIO_PORT_P6, GPIO_PORT_P7, GPIO_PORT_P8, GPIO_PORT_P9, GPIO_PORT_PA, GPIO_PORT_PB, GPIO_PORT_PC, GPIO_PORT_PD, GPIO_PORT_PE, GPIO_PORT_PF, GPIO_PORT_PJ, HWREG, and HWREGB.

void GPIO_setAsPeripheralModuleFunctionInputPin ( unsigned int  baseAddress,
unsigned char  selectedPort,
unsigned int  selectedPins 
)

This function configures the peripheral module function in input direction for the selected pin.

Parameters:
baseAddressis the base address of the GPIO Port Register
selectedPortis the selected port. Valid values are GPIO_PORT_P1, GPIO_PORT_P2, GPIO_PORT_P3, GPIO_PORT_P4,GPIO_PORT_P5, GPIO_PORT_P6, GPIO_PORT_P7,GPIO_PORT_P8, GPIO_PORT_P9, GPIO_PORT_P10, GPIO_PORT_P11, GPIO_PORT_PA, GPIO_PORT_PB, GPIO_PORT_PC, GPIO_PORT_PD, GPIO_PORT_PE, GPIO_PORT_PF, GPIO_PORT_PJ
selectedPinsis the specified pin in the selected port. Valid values are GPIO_PIN0, GPIO_PIN1, GPIO_PIN2, GPIO_PIN3, GPIO_PIN4, GPIO_PIN5, GPIO_PIN6, GPIO_PIN7,GPIO_PIN8,GPIO_PIN9,GPIO_PIN10, GPIO_PIN11,GPIO_PIN12,GPIO_PIN13,GPIO_PIN14, GPIO_PIN15 Modified registers are PxSEL and PxDIR.
Returns:
None

References ASSERT, GPIO_PIN0, GPIO_PIN1, GPIO_PIN10, GPIO_PIN11, GPIO_PIN12, GPIO_PIN13, GPIO_PIN14, GPIO_PIN15, GPIO_PIN2, GPIO_PIN3, GPIO_PIN4, GPIO_PIN5, GPIO_PIN6, GPIO_PIN7, GPIO_PIN8, GPIO_PIN9, GPIO_PORT_P1, GPIO_PORT_P10, GPIO_PORT_P11, GPIO_PORT_P2, GPIO_PORT_P3, GPIO_PORT_P4, GPIO_PORT_P5, GPIO_PORT_P6, GPIO_PORT_P7, GPIO_PORT_P8, GPIO_PORT_P9, GPIO_PORT_PA, GPIO_PORT_PB, GPIO_PORT_PC, GPIO_PORT_PD, GPIO_PORT_PE, GPIO_PORT_PF, GPIO_PORT_PJ, HWREG, and HWREGB.


Copyright 2012, Texas Instruments Incorporated