Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions locale/circuitpython.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2411,6 +2411,7 @@ msgstr ""
msgid "Update failed"
msgstr ""

#: ports/zephyr-cp/common-hal/audiobusio/I2SOut.c
#: ports/zephyr-cp/common-hal/busio/I2C.c
#: ports/zephyr-cp/common-hal/busio/SPI.c
#: ports/zephyr-cp/common-hal/busio/UART.c
Expand Down
2 changes: 1 addition & 1 deletion ports/zephyr-cp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ run-sim:
echo "Populating build-native_native_sim/flash.bin from ./CIRCUITPY"; \
mcopy -s -i build-native_native_sim/flash.bin CIRCUITPY/* ::; \
fi
build-native_native_sim/firmware.exe --flash=build-native_native_sim/flash.bin --flash_rm -wait_uart -rt
build-native_native_sim/firmware.exe --flash=build-native_native_sim/flash.bin --flash_rm -wait_uart -rt --i2s_capture=build-native_native_sim/i2s_capture.wav

menuconfig:
west build $(WEST_SHIELD_ARGS) --sysbuild -d $(BUILD) -t menuconfig -- $(WEST_CMAKE_ARGS)
Expand Down
19 changes: 2 additions & 17 deletions ports/zephyr-cp/background.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,7 @@
#include "py/runtime.h"
#include "supervisor/port.h"

#if CIRCUITPY_DISPLAYIO
#include "shared-module/displayio/__init__.h"
#endif

#if CIRCUITPY_AUDIOBUSIO
#include "common-hal/audiobusio/I2SOut.h"
#endif

#if CIRCUITPY_AUDIOPWMIO
#include "common-hal/audiopwmio/PWMAudioOut.h"
#endif
#include <zephyr/kernel.h>

void port_start_background_tick(void) {
}
Expand All @@ -28,12 +18,7 @@ void port_finish_background_tick(void) {
}

void port_background_tick(void) {
#if CIRCUITPY_AUDIOPWMIO
audiopwmout_background();
#endif
#if CIRCUITPY_AUDIOBUSIO
i2s_background();
#endif
// No, ticks. We use Zephyr threads instead.
}

void port_background_task(void) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ keypad = false
keypad_demux = false
locale = false
lvfontio = true # Zephyr board has busio
math = false
math = true
max3421e = false
mcp4822 = false
mdns = false
Expand Down
1 change: 1 addition & 0 deletions ports/zephyr-cp/boards/frdm_mcxn947_mcxn947_cpu0.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CONFIG_DMA_TCD_QUEUE_SIZE=4
12 changes: 12 additions & 0 deletions ports/zephyr-cp/boards/frdm_rw612_rw612_cpu0.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
&w25q512jvfiq {
partitions {
/delete-node/ storage_partition;
circuitpy_partition: partition@620000 {
label = "circuitpy";
reg = <0x00620000 (DT_SIZE_M(58) - DT_SIZE_K(128))>;
};
}

};

#include "../app.overlay"
1 change: 1 addition & 0 deletions ports/zephyr-cp/boards/mimxrt1170_evk_mimxrt1176_cm7.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CONFIG_DMA_TCD_QUEUE_SIZE=4
4 changes: 4 additions & 0 deletions ports/zephyr-cp/boards/mimxrt1170_evk_mimxrt1176_cm7.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,8 @@
};
};

&sai1 {
mclk-output;
};

#include "../app.overlay"
18 changes: 9 additions & 9 deletions ports/zephyr-cp/boards/native/native_sim/autogen_board_info.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ alarm = false
analogbufio = false
analogio = false
atexit = false
audiobusio = false
audiocore = false
audiodelays = false
audiofilters = false
audiofreeverb = false
audiobusio = true # Zephyr board has audiobusio
audiocore = true # Zephyr board has audiobusio
audiodelays = true # Zephyr board has audiobusio
audiofilters = true # Zephyr board has audiobusio
audiofreeverb = true # Zephyr board has audiobusio
audioio = false
audiomixer = false
audiomp3 = false
audiomixer = true # Zephyr board has audiobusio
audiomp3 = true # Zephyr board has audiobusio
audiopwmio = false
audiospeed = false
aurora_epaper = false
Expand Down Expand Up @@ -63,7 +63,7 @@ keypad = false
keypad_demux = false
locale = false
lvfontio = true # Zephyr board has busio
math = false
math = true
max3421e = false
mcp4822 = false
mdns = false
Expand Down Expand Up @@ -97,7 +97,7 @@ ssl = false
storage = true # Zephyr board has flash
struct = true
supervisor = true
synthio = false
synthio = true # Zephyr board has audiobusio
terminalio = true # Zephyr board has busio
tilepalettemapper = true # Zephyr board has busio
time = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ keypad = false
keypad_demux = false
locale = false
lvfontio = true # Zephyr board has busio
math = false
math = true
max3421e = false
mcp4822 = false
mdns = false
Expand Down
3 changes: 3 additions & 0 deletions ports/zephyr-cp/boards/native_sim.conf
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ CONFIG_EEPROM=y
CONFIG_EEPROM_AT24=y
CONFIG_EEPROM_AT2X_EMUL=y

# I2S SDL emulation for audio testing
CONFIG_I2S_SDL=y

CONFIG_NETWORKING=y
CONFIG_NET_IPV4=y
CONFIG_NET_TCP=y
Expand Down
18 changes: 9 additions & 9 deletions ports/zephyr-cp/boards/nordic/nrf5340dk/autogen_board_info.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ alarm = false
analogbufio = false
analogio = false
atexit = false
audiobusio = false
audiocore = false
audiodelays = false
audiofilters = false
audiofreeverb = false
audiobusio = true # Zephyr board has audiobusio
audiocore = true # Zephyr board has audiobusio
audiodelays = true # Zephyr board has audiobusio
audiofilters = true # Zephyr board has audiobusio
audiofreeverb = true # Zephyr board has audiobusio
audioio = false
audiomixer = false
audiomp3 = false
audiomixer = true # Zephyr board has audiobusio
audiomp3 = true # Zephyr board has audiobusio
audiopwmio = false
audiospeed = false
aurora_epaper = false
Expand Down Expand Up @@ -63,7 +63,7 @@ keypad = false
keypad_demux = false
locale = false
lvfontio = true # Zephyr board has busio
math = false
math = true
max3421e = false
mcp4822 = false
mdns = false
Expand Down Expand Up @@ -97,7 +97,7 @@ ssl = false
storage = true # Zephyr board has flash
struct = true
supervisor = true
synthio = false
synthio = true # Zephyr board has audiobusio
terminalio = true # Zephyr board has busio
tilepalettemapper = true # Zephyr board has busio
time = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ keypad = false
keypad_demux = false
locale = false
lvfontio = true # Zephyr board has busio
math = false
math = true
max3421e = false
mcp4822 = false
mdns = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ keypad = false
keypad_demux = false
locale = false
lvfontio = true # Zephyr board has busio
math = false
math = true
max3421e = false
mcp4822 = false
mdns = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ keypad = false
keypad_demux = false
locale = false
lvfontio = true # Zephyr board has busio
math = false
math = true
max3421e = false
mcp4822 = false
mdns = false
Expand Down
24 changes: 24 additions & 0 deletions ports/zephyr-cp/boards/nrf5340dk_nrf5340_cpuapp.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
&pinctrl {
i2s0_default_alt: i2s0_default_alt {
group1 {
psels = <NRF_PSEL(I2S_MCK, 0, 12)>,
<NRF_PSEL(I2S_SCK_M, 1, 15)>,
<NRF_PSEL(I2S_LRCK_M, 1, 12)>,
<NRF_PSEL(I2S_SDOUT, 1, 13)>,
<NRF_PSEL(I2S_SDIN, 1, 14)>;
};
};
};

&clock {
hfclkaudio-frequency = <11289600>;
};

i2s_rxtx: &i2s0 {
status = "okay";
pinctrl-0 = <&i2s0_default_alt>;
pinctrl-names = "default";
clock-source = "ACLK";
};

#include "../app.overlay"
18 changes: 9 additions & 9 deletions ports/zephyr-cp/boards/nxp/frdm_mcxn947/autogen_board_info.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ alarm = false
analogbufio = false
analogio = false
atexit = false
audiobusio = false
audiocore = false
audiodelays = false
audiofilters = false
audiofreeverb = false
audiobusio = true # Zephyr board has audiobusio
audiocore = true # Zephyr board has audiobusio
audiodelays = true # Zephyr board has audiobusio
audiofilters = true # Zephyr board has audiobusio
audiofreeverb = true # Zephyr board has audiobusio
audioio = false
audiomixer = false
audiomp3 = false
audiomixer = true # Zephyr board has audiobusio
audiomp3 = true # Zephyr board has audiobusio
audiopwmio = false
audiospeed = false
aurora_epaper = false
Expand Down Expand Up @@ -63,7 +63,7 @@ keypad = false
keypad_demux = false
locale = false
lvfontio = true # Zephyr board has busio
math = false
math = true
max3421e = false
mcp4822 = false
mdns = false
Expand Down Expand Up @@ -97,7 +97,7 @@ ssl = false
storage = true # Zephyr board has flash
struct = true
supervisor = true
synthio = false
synthio = true # Zephyr board has audiobusio
terminalio = true # Zephyr board has busio
tilepalettemapper = true # Zephyr board has busio
time = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ keypad = false
keypad_demux = false
locale = false
lvfontio = true # Zephyr board has busio
math = false
math = true
max3421e = false
mcp4822 = false
mdns = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ alarm = false
analogbufio = false
analogio = false
atexit = false
audiobusio = false
audiocore = false
audiodelays = false
audiofilters = false
audiofreeverb = false
audiobusio = true # Zephyr board has audiobusio
audiocore = true # Zephyr board has audiobusio
audiodelays = true # Zephyr board has audiobusio
audiofilters = true # Zephyr board has audiobusio
audiofreeverb = true # Zephyr board has audiobusio
audioio = false
audiomixer = false
audiomp3 = false
audiomixer = true # Zephyr board has audiobusio
audiomp3 = true # Zephyr board has audiobusio
audiopwmio = false
audiospeed = false
aurora_epaper = false
Expand Down Expand Up @@ -63,7 +63,7 @@ keypad = false
keypad_demux = false
locale = false
lvfontio = true # Zephyr board has busio
math = false
math = true
max3421e = false
mcp4822 = false
mdns = false
Expand Down Expand Up @@ -97,7 +97,7 @@ ssl = false
storage = false
struct = true
supervisor = true
synthio = false
synthio = true # Zephyr board has audiobusio
terminalio = true # Zephyr board has busio
tilepalettemapper = true # Zephyr board has busio
time = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ keypad = false
keypad_demux = false
locale = false
lvfontio = true # Zephyr board has busio
math = false
math = true
max3421e = false
mcp4822 = false
mdns = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ keypad = false
keypad_demux = false
locale = false
lvfontio = true # Zephyr board has busio
math = false
math = true
max3421e = false
mcp4822 = false
mdns = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ keypad = false
keypad_demux = false
locale = false
lvfontio = true # Zephyr board has busio
math = false
math = true
max3421e = false
mcp4822 = false
mdns = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ keypad = false
keypad_demux = false
locale = false
lvfontio = true # Zephyr board has busio
math = false
math = true
max3421e = false
mcp4822 = false
mdns = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ keypad = false
keypad_demux = false
locale = false
lvfontio = true # Zephyr board has busio
math = false
math = true
max3421e = false
mcp4822 = false
mdns = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ keypad = false
keypad_demux = false
locale = false
lvfontio = true # Zephyr board has busio
math = false
math = true
max3421e = false
mcp4822 = false
mdns = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ keypad = false
keypad_demux = false
locale = false
lvfontio = true # Zephyr board has busio
math = false
math = true
max3421e = false
mcp4822 = false
mdns = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ keypad = false
keypad_demux = false
locale = false
lvfontio = true # Zephyr board has busio
math = false
math = true
max3421e = false
mcp4822 = false
mdns = false
Expand Down
Loading
Loading