7 #ifndef __MSP430WARE_GPIO_H__ 8 #define __MSP430WARE_GPIO_H__ 10 #include "inc/hw_memmap.h" 12 #if defined(__MSP430_HAS_PORT1__) || defined(__MSP430_HAS_PORT2__) 36 #define GPIO_PORT_P1 1 37 #define GPIO_PORT_P2 2 38 #define GPIO_PORT_P3 3 39 #define GPIO_PORT_P4 4 40 #define GPIO_PORT_P5 5 41 #define GPIO_PORT_P6 6 42 #define GPIO_PORT_P7 7 43 #define GPIO_PORT_P8 8 44 #define GPIO_PORT_P9 9 45 #define GPIO_PORT_P10 10 46 #define GPIO_PORT_P11 11 47 #define GPIO_PORT_PA 1 48 #define GPIO_PORT_PB 3 49 #define GPIO_PORT_PC 5 50 #define GPIO_PORT_PD 7 51 #define GPIO_PORT_PE 9 52 #define GPIO_PORT_PF 11 53 #define GPIO_PORT_PJ 13 67 #define GPIO_PIN0 (0x0001) 68 #define GPIO_PIN1 (0x0002) 69 #define GPIO_PIN2 (0x0004) 70 #define GPIO_PIN3 (0x0008) 71 #define GPIO_PIN4 (0x0010) 72 #define GPIO_PIN5 (0x0020) 73 #define GPIO_PIN6 (0x0040) 74 #define GPIO_PIN7 (0x0080) 75 #define GPIO_PIN8 (0x0100) 76 #define GPIO_PIN9 (0x0200) 77 #define GPIO_PIN10 (0x0400) 78 #define GPIO_PIN11 (0x0800) 79 #define GPIO_PIN12 (0x1000) 80 #define GPIO_PIN13 (0x2000) 81 #define GPIO_PIN14 (0x4000) 82 #define GPIO_PIN15 (0x8000) 83 #define GPIO_PIN_ALL8 (0xFF) 84 #define GPIO_PIN_ALL16 (0xFFFF) 93 #define GPIO_PRIMARY_MODULE_FUNCTION (0x01) 94 #define GPIO_SECONDARY_MODULE_FUNCTION (0x02) 95 #define GPIO_TERNARY_MODULE_FUNCTION (0x03) 103 #define GPIO_HIGH_TO_LOW_TRANSITION (0x01) 104 #define GPIO_LOW_TO_HIGH_TRANSITION (0x00) 112 #define GPIO_INPUT_PIN_HIGH (0x01) 113 #define GPIO_INPUT_PIN_LOW (0x00) 174 uint16_t selectedPins);
230 uint16_t selectedPins);
295 uint16_t selectedPins,
361 uint16_t selectedPins,
417 uint16_t selectedPins);
472 uint16_t selectedPins);
527 uint16_t selectedPins);
583 uint16_t selectedPins);
639 uint16_t selectedPins);
695 uint16_t selectedPins);
769 uint16_t selectedPins);
825 uint16_t selectedPins);
888 uint16_t selectedPins,
901 #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:334
void GPIO_toggleOutputOnPin(uint8_t selectedPort, uint16_t selectedPins)
This function toggles the output on the selected Pin.
Definition: gpio.c:256
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:152
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:378
void GPIO_clearInterrupt(uint8_t selectedPort, uint16_t selectedPins)
This function clears the interrupt flag on the selected pin.
Definition: gpio.c:360
void GPIO_disableInterrupt(uint8_t selectedPort, uint16_t selectedPins)
This function disables the port interrupt on the selected pin.
Definition: gpio.c:316
void GPIO_setOutputHighOnPin(uint8_t selectedPort, uint16_t selectedPins)
This function sets output HIGH on the selected Pin.
Definition: gpio.c:219
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:186
void GPIO_enableInterrupt(uint8_t selectedPort, uint16_t selectedPins)
This function enables the port interrupt on the selected pin.
Definition: gpio.c:298
void GPIO_setAsInputPin(uint8_t selectedPort, uint16_t selectedPins)
This function configures the selected Pin as input pin.
Definition: gpio.c:132
uint8_t GPIO_getInputPinValue(uint8_t selectedPort, uint16_t selectedPins)
This function gets the input value on the selected pin.
Definition: gpio.c:274
void GPIO_setAsOutputPin(uint8_t selectedPort, uint16_t selectedPins)
This function configures the selected Pin as output pin.
Definition: gpio.c:110
void GPIO_setOutputLowOnPin(uint8_t selectedPort, uint16_t selectedPins)
This function sets output LOW on the selected Pin.
Definition: gpio.c:238