7 #ifndef __MSP430WARE_GPIO_H__
8 #define __MSP430WARE_GPIO_H__
12 #ifdef __MSP430_HAS_PORT1_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
73 #define GPIO_PIN0 (0x0001)
74 #define GPIO_PIN1 (0x0002)
75 #define GPIO_PIN2 (0x0004)
76 #define GPIO_PIN3 (0x0008)
77 #define GPIO_PIN4 (0x0010)
78 #define GPIO_PIN5 (0x0020)
79 #define GPIO_PIN6 (0x0040)
80 #define GPIO_PIN7 (0x0080)
81 #define GPIO_PIN8 (0x0100)
82 #define GPIO_PIN9 (0x0200)
83 #define GPIO_PIN10 (0x0400)
84 #define GPIO_PIN11 (0x0800)
85 #define GPIO_PIN12 (0x1000)
86 #define GPIO_PIN13 (0x2000)
87 #define GPIO_PIN14 (0x4000)
88 #define GPIO_PIN15 (0x8000)
89 #define GPIO_PIN_ALL8 (0xFF)
90 #define GPIO_PIN_ALL16 (0xFFFF)
98 #define GPIO_HIGH_TO_LOW_TRANSITION (0x01)
99 #define GPIO_LOW_TO_HIGH_TRANSITION (0x00)
107 #define GPIO_INPUT_PIN_HIGH (0x01)
108 #define GPIO_INPUT_PIN_LOW (0x00)
116 #define GPIO_REDUCED_OUTPUT_DRIVE_STRENGTH 0x00
117 #define GPIO_FULL_OUTPUT_DRIVE_STRENGTH 0x01
177 extern void GPIO_setAsOutputPin(uint8_t selectedPort,
178 uint16_t selectedPins);
233 extern void GPIO_setAsInputPin(uint8_t selectedPort,
234 uint16_t selectedPins);
292 extern void GPIO_setAsPeripheralModuleFunctionOutputPin(uint8_t selectedPort,
293 uint16_t selectedPins);
351 extern void GPIO_setAsPeripheralModuleFunctionInputPin(uint8_t selectedPort,
352 uint16_t selectedPins);
407 uint16_t selectedPins);
462 uint16_t selectedPins);
516 extern void GPIO_toggleOutputOnPin(uint8_t selectedPort,
517 uint16_t selectedPins);
573 extern void GPIO_setAsInputPinWithPullDownResistor(uint8_t selectedPort,
574 uint16_t selectedPins);
630 extern void GPIO_setAsInputPinWithPullUpResistor(uint8_t selectedPort,
631 uint16_t selectedPins);
686 extern uint8_t GPIO_getInputPinValue(uint8_t selectedPort,
687 uint16_t selectedPins);
742 extern void GPIO_enableInterrupt(uint8_t selectedPort,
743 uint16_t selectedPins);
798 extern void GPIO_disableInterrupt(uint8_t selectedPort,
799 uint16_t selectedPins);
872 extern uint16_t GPIO_getInterruptStatus(uint8_t selectedPort,
873 uint16_t selectedPins);
928 extern void GPIO_clearInterrupt(uint8_t selectedPort,
929 uint16_t selectedPins);
991 extern void GPIO_selectInterruptEdge(uint8_t selectedPort,
992 uint16_t selectedPins,
1053 extern void GPIO_setDriveStrength(uint8_t selectedPort,
1054 uint16_t selectedPins,
1055 uint8_t driveStrength);
GPIO_setOutputHighOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
GPIO_setOutputLowOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)