Skip to content

Commit e2a18d0

Browse files
committed
variants: Add native_posix variant support
Add support for native_posix in limited capacity Signed-off-by: Dhruva Gole <goledhruva@gmail.com>
1 parent 10f4816 commit e2a18d0

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/ {
2+
zephyr,user {
3+
digital-pin-gpios = <&gpio0 0 0>;
4+
serial = <&uart0>;
5+
i2cs = <&i2c0>;
6+
};
7+
};
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
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/device.h>
12+

variants/variants.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
#ifdef CONFIG_BOARD_CC3220SF_LAUNCHXL
2424
#include "cc3220sf_launchxl_pinmap.h"
2525
#endif // CONFIG_BOARD_CC3220SF_LAUNCHXL
26+
#ifdef CONFIG_BOARD_NATIVE_POSIX
27+
#include "native_posix_pinmap.h"
28+
#endif // CONFIG_BOARD_NATIVE_POSIX
2629

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

0 commit comments

Comments
 (0)