Skip to content

Commit 3e002f3

Browse files
committed
variants: Add cc3220sf
Add support for the TI CC3220SF LaunchXL platform in arduino core API for zephyr. Signed-off-by: Dhruva Gole <[email protected]>
1 parent 0bae8e1 commit 3e002f3

File tree

3 files changed

+57
-0
lines changed

3 files changed

+57
-0
lines changed

Diff for: variants/cc3220sf_launchxl/cc3220sf_launchxl.overlay

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/*
2+
* Copyright (c) 2023 Dhruva Gole <[email protected]>
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/ {
8+
zephyr,user {
9+
digital-pin-gpios = <&boosterpack_header 4 0>, /* GPIO_12 */
10+
<&boosterpack_header 5 0>, /* GPIO_06 */
11+
<&boosterpack_header 7 0>, /* GPIO_14 */
12+
<&boosterpack_header 9 0>, /* I2C_SCL | YELLOW_LED */
13+
<&boosterpack_header 10 0>, /* I2C_SDA | GREEN_LED */
14+
<&boosterpack_header 11 0>, /* GPIO_22 */
15+
<&boosterpack_header 12 0>, /* GPIO_01 */
16+
<&boosterpack_header 13 0>, /* GPIO_25 */
17+
<&boosterpack_header 14 0>, /* GPIO_15 */
18+
<&boosterpack_header 15 0>, /* GPIO_16 */
19+
<&boosterpack_header 17 0>, /* GPIO_31 */
20+
<&boosterpack_header 18 0>, /* GPIO_17 */
21+
<&boosterpack_header 19 0>, /* GPIO_28 */
22+
<&boosterpack_header 23 0>, /* GPIO_02 | AIN0 */
23+
<&boosterpack_header 24 0>, /* GPIO_05 | AIN3 */
24+
<&boosterpack_header 25 0>, /* GPIO_03 | AIN1 */
25+
<&boosterpack_header 26 0>, /* GPIO_04 | AIN2 */
26+
<&boosterpack_header 27 0>, /* GPIO_08 */
27+
<&boosterpack_header 28 0>, /* GPIO_30 */
28+
<&boosterpack_header 29 0>, /* GPIO_09 | RED_LED | I2S_DOUT*/
29+
<&boosterpack_header 30 0>, /* GPIO_00 */
30+
<&boosterpack_header 31 0>, /* GPIO_24 */
31+
<&boosterpack_header 32 0>; /* GPIO_23 */
32+
builtin-led-gpios = <&boosterpack_header 10 0>; /* GREEN_LED */
33+
serials = <&boosterpack_serial>;
34+
i2cs = <&boosterpack_i2c>;
35+
};
36+
};
+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/*
2+
* Copyright (c) 2022 Dhruva Gole
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/* All the pins that are 100 + x are gpio1 pins and < 100 are in gpio0 */
8+
#pragma once
9+
#include <zephyr/drivers/gpio.h>
10+
#include <zephyr/kernel.h>
11+
#include <zephyr/drivers/i2c.h>
12+
#include <zephyr/device.h>
13+
14+
#define LED_BUILTIN 4
15+
#define YELLOW_LED 3
16+
#define GREEN_LED 4
17+
#define RED_LED 19
18+

Diff for: variants/variants.h

+3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
#ifdef CONFIG_BOARD_ARDUINO_MKRZERO
1818
#include "arduino_mkrzero_pinmap.h"
1919
#endif // CONFIG_BOARD_ARDUINO_MKRZERO
20+
#ifdef CONFIG_BOARD_CC3220SF_LAUNCHXL
21+
#include "cc3220sf_launchxl_pinmap.h"
22+
#endif // CONFIG_BOARD_CC3220SF_LAUNCHXL
2023

2124
#define DIGITAL_PIN_EXISTS(n, p, i, dev, num) \
2225
(((dev == DT_REG_ADDR(DT_PHANDLE_BY_IDX(n, p, i))) && \

0 commit comments

Comments
 (0)