7 #ifndef __MSP430WARE_GPIO_H__
8 #define __MSP430WARE_GPIO_H__
10 #include "inc/hw_memmap.h"
12 #if defined(__MSP430_HAS_PORT1_R__) || defined(__MSP430_HAS_PORT2_R__) ||\
13 defined(__MSP430_HAS_PORTA_R__)
39 #define GPIO_PORT_P1 1
40 #define GPIO_PORT_P2 2
41 #define GPIO_PORT_P3 3
42 #define GPIO_PORT_P4 4
43 #define GPIO_PORT_P5 5
44 #define GPIO_PORT_P6 6
45 #define GPIO_PORT_P7 7
46 #define GPIO_PORT_P8 8
47 #define GPIO_PORT_P9 9
48 #define GPIO_PORT_P10 10
49 #define GPIO_PORT_P11 11
50 #define GPIO_PORT_PA 1
51 #define GPIO_PORT_PB 3
52 #define GPIO_PORT_PC 5
53 #define GPIO_PORT_PD 7
54 #define GPIO_PORT_PE 9
55 #define GPIO_PORT_PF 11
56 #define GPIO_PORT_PJ 13
72 #define GPIO_PIN0 (0x0001)
73 #define GPIO_PIN1 (0x0002)
74 #define GPIO_PIN2 (0x0004)
75 #define GPIO_PIN3 (0x0008)
76 #define GPIO_PIN4 (0x0010)
77 #define GPIO_PIN5 (0x0020)
78 #define GPIO_PIN6 (0x0040)
79 #define GPIO_PIN7 (0x0080)
80 #define GPIO_PIN8 (0x0100)
81 #define GPIO_PIN9 (0x0200)
82 #define GPIO_PIN10 (0x0400)
83 #define GPIO_PIN11 (0x0800)
84 #define GPIO_PIN12 (0x1000)
85 #define GPIO_PIN13 (0x2000)
86 #define GPIO_PIN14 (0x4000)
87 #define GPIO_PIN15 (0x8000)
96 #define GPIO_PRIMARY_MODULE_FUNCTION (0x01)
97 #define GPIO_SECONDARY_MODULE_FUNCTION (0x02)
98 #define GPIO_TERNARY_MODULE_FUNCTION (0x03)
106 #define GPIO_HIGH_TO_LOW_TRANSITION (0x01)
107 #define GPIO_LOW_TO_HIGH_TRANSITION (0x00)
115 #define GPIO_INPUT_PIN_HIGH (0x01)
116 #define GPIO_INPUT_PIN_LOW (0x00)
175 uint16_t selectedPins);
229 uint16_t selectedPins);
292 uint16_t selectedPins,
356 uint16_t selectedPins,
410 uint16_t selectedPins);
463 uint16_t selectedPins);
516 uint16_t selectedPins);
571 uint16_t selectedPins);
626 uint16_t selectedPins);
680 uint16_t selectedPins);
734 uint16_t selectedPins);
788 uint16_t selectedPins);
858 uint16_t selectedPins);
912 uint16_t selectedPins);
973 uint16_t selectedPins,
986 #endif // __MSP430WARE_GPIO_H__
uint16_t GPIO_getInterruptStatus(uint8_t selectedPort, uint16_t selectedPins)
This function gets the interrupt status of the selected pin.
Definition: gpio.c:423
void GPIO_toggleOutputOnPin(uint8_t selectedPort, uint16_t selectedPins)
This function toggles the output on the selected Pin.
Definition: gpio.c:290
void GPIO_setAsPeripheralModuleFunctionOutputPin(uint8_t selectedPort, uint16_t selectedPins, uint8_t mode)
This function configures the peripheral module function in the output direction for the selected pin...
Definition: gpio.c:162
void GPIO_selectInterruptEdge(uint8_t selectedPort, uint16_t selectedPins, uint8_t edgeSelect)
This function selects on what edge the port interrupt flag should be set for a transition.
Definition: gpio.c:460
void GPIO_setAsInputPinWithPullUpResistor(uint8_t selectedPort, uint16_t selectedPins)
This function sets the selected Pin in input Mode with Pull Up resistor.
Definition: gpio.c:336
void GPIO_setAsInputPinWithPullDownResistor(uint8_t selectedPort, uint16_t selectedPins)
This function sets the selected Pin in input Mode with Pull Down resistor.
Definition: gpio.c:308
void GPIO_clearInterrupt(uint8_t selectedPort, uint16_t selectedPins)
This function clears the interrupt flag on the selected pin.
Definition: gpio.c:442
void GPIO_disableInterrupt(uint8_t selectedPort, uint16_t selectedPins)
This function disables the port interrupt on the selected pin.
Definition: gpio.c:405
void GPIO_setOutputHighOnPin(uint8_t selectedPort, uint16_t selectedPins)
This function sets output HIGH on the selected Pin.
Definition: gpio.c:253
void GPIO_setAsPeripheralModuleFunctionInputPin(uint8_t selectedPort, uint16_t selectedPins, uint8_t mode)
This function configures the peripheral module function in the input direction for the selected pin...
Definition: gpio.c:208
void GPIO_enableInterrupt(uint8_t selectedPort, uint16_t selectedPins)
This function enables the port interrupt on the selected pin.
Definition: gpio.c:387
void GPIO_setAsInputPin(uint8_t selectedPort, uint16_t selectedPins)
This function configures the selected Pin as input pin.
Definition: gpio.c:137
uint8_t GPIO_getInputPinValue(uint8_t selectedPort, uint16_t selectedPins)
This function gets the input value on the selected pin.
Definition: gpio.c:363
void GPIO_setAsOutputPin(uint8_t selectedPort, uint16_t selectedPins)
This function configures the selected Pin as output pin.
Definition: gpio.c:111
void GPIO_setOutputLowOnPin(uint8_t selectedPort, uint16_t selectedPins)
This function sets output LOW on the selected Pin.
Definition: gpio.c:272