File tree Expand file tree Collapse file tree 2 files changed +34
-16
lines changed
boards/arm/cc3220sf_launchxl Expand file tree Collapse file tree 2 files changed +34
-16
lines changed Original file line number Diff line number Diff line change 6
6
#ifndef __INC_BOARD_H
7
7
#define __INC_BOARD_H
8
8
9
- /* Push button switch 2 */
10
- #define SW2_GPIO_PIN 6 /* GPIO22/Pin15 */
11
- #define SW2_GPIO_NAME "GPIO_A2"
12
-
13
- /* Push button switch 3 */
14
- #define SW3_GPIO_PIN 5 /* GPIO13/Pin4 */
15
- #define SW3_GPIO_NAME "GPIO_A1"
16
-
17
- /* Push button switch 0: Map to SW2 so zephyr button example works */
18
- #define SW0_GPIO_PIN SW2_GPIO_PIN
19
- #define SW0_GPIO_NAME SW2_GPIO_NAME
20
-
21
- /* Onboard GREEN LED */
22
- #define LED0_GPIO_PIN 3 /*GPIO11/Pin2 */
23
- #define LED0_GPIO_PORT "GPIO_A1"
24
-
25
9
#endif /* __INC_BOARD_H */
Original file line number Diff line number Diff line change 10
10
uart-0 = &uart0;
11
11
uart-1 = &uart1;
12
12
i2c-0 = &i2c0;
13
+ led0 = &led0;
14
+ /* sw0/1 alias defined for compatibility with samples */
15
+ sw0 = &sw2;
16
+ sw1 = &sw3;
13
17
};
14
18
15
19
chosen {
16
20
zephyr,sram = &sram0;
17
21
zephyr,flash = &flash1;
18
22
zephyr,console = &uart0;
19
23
};
24
+
25
+ leds {
26
+ compatible = "gpio-leds";
27
+ led0: led_0 {
28
+ gpios = <&gpioa1 3 0>;
29
+ label = "Green LED";
30
+ };
31
+ led1: led_1 {
32
+ gpios = <&gpioa1 2 0>;
33
+ label = "Yellow LED";
34
+ };
35
+ led2: led_2 {
36
+ gpios = <&gpioa1 1 0>;
37
+ label = "Red LED";
38
+ };
39
+ };
40
+
41
+ buttons {
42
+ /* Push button 2 */
43
+ compatible = "gpio-keys";
44
+ sw2: button_0 {
45
+ gpios = <&gpioa2 6 GPIO_INT_ACTIVE_LOW>;
46
+ label = "Push button switch 2";
47
+ };
48
+ /* Push button 3 */
49
+ sw3: button_1 {
50
+ gpios = <&gpioa1 5 GPIO_INT_ACTIVE_LOW>;
51
+ label = "Push button switch 3";
52
+ };
53
+ };
20
54
};
21
55
22
56
&uart0 {
You can’t perform that action at this time.
0 commit comments