Skip to content

Commit a1a779e

Browse files
committed
ports:unix:variants: add asi2800 and asi2900 variants
1 parent ab7a739 commit a1a779e

6 files changed

Lines changed: 110 additions & 0 deletions

File tree

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
include("$(PORT_DIR)/variants/manifest.py")
2+
3+
include("$(MPY_DIR)/extmod/asyncio")
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*
2+
* This file is part of the MicroPython project, http://micropython.org/
3+
*
4+
* The MIT License (MIT)
5+
*
6+
* Copyright (c) 2019 Damien P. George
7+
*
8+
* Permission is hereby granted, free of charge, to any person obtaining a copy
9+
* of this software and associated documentation files (the "Software"), to deal
10+
* in the Software without restriction, including without limitation the rights
11+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12+
* copies of the Software, and to permit persons to whom the Software is
13+
* furnished to do so, subject to the following conditions:
14+
*
15+
* The above copyright notice and this permission notice shall be included in
16+
* all copies or substantial portions of the Software.
17+
*
18+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24+
* THE SOFTWARE.
25+
*/
26+
27+
// Set base feature level.
28+
#define MICROPY_CONFIG_ROM_LEVEL (MICROPY_CONFIG_ROM_LEVEL_EVERYTHING)
29+
30+
// Enable extra Unix features.
31+
#include "../mpconfigvariant_common.h"
32+
33+
#define MICROPY_PY_OS_DUPTERM (3)
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# ASI2800 variant.
2+
3+
FROZEN_MANIFEST ?= $(VARIANT_DIR)/manifest.py
4+
5+
MICROPY_STANDALONE = 1
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
include("$(PORT_DIR)/variants/manifest.py")
2+
3+
include("$(MPY_DIR)/extmod/asyncio")
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*
2+
* This file is part of the MicroPython project, http://micropython.org/
3+
*
4+
* The MIT License (MIT)
5+
*
6+
* Copyright (c) 2019 Damien P. George
7+
*
8+
* Permission is hereby granted, free of charge, to any person obtaining a copy
9+
* of this software and associated documentation files (the "Software"), to deal
10+
* in the Software without restriction, including without limitation the rights
11+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12+
* copies of the Software, and to permit persons to whom the Software is
13+
* furnished to do so, subject to the following conditions:
14+
*
15+
* The above copyright notice and this permission notice shall be included in
16+
* all copies or substantial portions of the Software.
17+
*
18+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24+
* THE SOFTWARE.
25+
*/
26+
27+
// Set base feature level.
28+
#define MICROPY_CONFIG_ROM_LEVEL (MICROPY_CONFIG_ROM_LEVEL_EVERYTHING)
29+
30+
// Enable extra Unix features.
31+
#include "../mpconfigvariant_common.h"
32+
33+
#define MICROPY_PY_OS_DUPTERM (3)
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# ASI2900 variant.
2+
3+
FROZEN_MANIFEST ?= $(VARIANT_DIR)/manifest.py
4+
5+
MICROPY_STANDALONE = 1
6+
7+
# Add ASI module
8+
ASI2900_ROOT = ../../../..
9+
HWIO = $(realpath ${ASI2900_ROOT}/audio_protocols/dante/hwio)
10+
ASI2900_LIBS = $(ASI2900_ROOT)/subrepos
11+
CFLAGS += -I$(ASI2900_ROOT)/audio_protocols/dante -DMICROPY_PY_ASI_HWIO=1
12+
SRC_C += asi_hwio_mod.c
13+
14+
# Add hwio implementation
15+
EDAPI_ROOT = $(ASI2900_LIBS)/audinate-embedded-dapi_aarch64-gnueabihf_linux
16+
CFLAGS += -I$(ASI2900_LIBS) -I$(ASI2900_ROOT) -I$(EDAPI_ROOT)/include -DASI2900
17+
CFLAGS += -Wno-ignored-qualifiers
18+
SRC_C += $(HWIO)/hwioc_auddep.c \
19+
$(HWIO)/hwioc_conmon.c \
20+
$(HWIO)/hwio_conmon.c \
21+
$(HWIO)/meter_ballistics.c \
22+
$(HWIO)/dapi_simple_timer.c \
23+
$(HWIO)/asi_iyo_conmon_fns.c
24+
25+
LDFLAGS += -L$(EDAPI_ROOT)/lib -ledapi -ldns_sd -lstdc++
26+
27+
ifeq ($(MICROPY_PY_UBUS),1)
28+
LIBUBUS_LDFLAGS := "-lubus"
29+
30+
CFLAGS += $(LIBUBUS_CFLAGS_MOD) -DMICROPY_PY_UBUS=1
31+
LDFLAGS += $(LIBUBUS_LDFLAGS)
32+
SRC_C += modubus.c
33+
endif

0 commit comments

Comments
 (0)