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) 88 #define GPIO_PIN_ALL8 (0xFF) 89 #define GPIO_PIN_ALL16 (0xFFFF) 98 #define GPIO_PRIMARY_MODULE_FUNCTION (0x01) 99 #define GPIO_SECONDARY_MODULE_FUNCTION (0x02) 100 #define GPIO_TERNARY_MODULE_FUNCTION (0x03) 108 #define GPIO_HIGH_TO_LOW_TRANSITION (0x01) 109 #define GPIO_LOW_TO_HIGH_TRANSITION (0x00) 117 #define GPIO_INPUT_PIN_HIGH (0x01) 118 #define GPIO_INPUT_PIN_LOW (0x00) 179 uint16_t selectedPins);
235 uint16_t selectedPins);
300 uint16_t selectedPins,
366 uint16_t selectedPins,
422 uint16_t selectedPins);
477 uint16_t selectedPins);
532 uint16_t selectedPins);
589 uint16_t selectedPins);
646 uint16_t selectedPins);
702 uint16_t selectedPins);
758 uint16_t selectedPins);
814 uint16_t selectedPins);
888 uint16_t selectedPins);
944 uint16_t selectedPins);
1007 uint16_t selectedPins,
1008 uint8_t edgeSelect);
1020 #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:383
void GPIO_toggleOutputOnPin(uint8_t selectedPort, uint16_t selectedPins)
This function toggles the output on the selected Pin.
Definition: gpio.c:258
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:154
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:427
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:300
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:276
void GPIO_clearInterrupt(uint8_t selectedPort, uint16_t selectedPins)
This function clears the interrupt flag on the selected pin.
Definition: gpio.c:409
void GPIO_disableInterrupt(uint8_t selectedPort, uint16_t selectedPins)
This function disables the port interrupt on the selected pin.
Definition: gpio.c:365
void GPIO_setOutputHighOnPin(uint8_t selectedPort, uint16_t selectedPins)
This function sets output HIGH on the selected Pin.
Definition: gpio.c:221
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:188
void GPIO_enableInterrupt(uint8_t selectedPort, uint16_t selectedPins)
This function enables the port interrupt on the selected pin.
Definition: gpio.c:347
void GPIO_setAsInputPin(uint8_t selectedPort, uint16_t selectedPins)
This function configures the selected Pin as input pin.
Definition: gpio.c:133
uint8_t GPIO_getInputPinValue(uint8_t selectedPort, uint16_t selectedPins)
This function gets the input value on the selected pin.
Definition: gpio.c:323
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:240