diff --git a/app/snippets/studio-rpc-usb-uart/snippet.yml b/app/snippets/studio-rpc-usb-uart/snippet.yml new file mode 100644 index 000000000000..471e72fdc7e8 --- /dev/null +++ b/app/snippets/studio-rpc-usb-uart/snippet.yml @@ -0,0 +1,4 @@ +name: studio-rpc-usb-uart +append: + EXTRA_DTC_OVERLAY_FILE: studio-rpc-usb-uart.overlay + EXTRA_CONF_FILE: studio-rpc-usb-uart.conf diff --git a/app/snippets/studio-rpc-usb-uart/studio-rpc-usb-uart.conf b/app/snippets/studio-rpc-usb-uart/studio-rpc-usb-uart.conf new file mode 100644 index 000000000000..c850a5c941d6 --- /dev/null +++ b/app/snippets/studio-rpc-usb-uart/studio-rpc-usb-uart.conf @@ -0,0 +1,6 @@ +CONFIG_ZMK_USB=y +CONFIG_USB_DEVICE_STACK=y +CONFIG_USB_CDC_ACM=y +CONFIG_SERIAL=y +CONFIG_UART_INTERRUPT_DRIVEN=y +CONFIG_UART_LINE_CTRL=y diff --git a/app/snippets/studio-rpc-usb-uart/studio-rpc-usb-uart.overlay b/app/snippets/studio-rpc-usb-uart/studio-rpc-usb-uart.overlay new file mode 100644 index 000000000000..39da27944afe --- /dev/null +++ b/app/snippets/studio-rpc-usb-uart/studio-rpc-usb-uart.overlay @@ -0,0 +1,13 @@ + +/ { + chosen { + zmk,studio-rpc-uart = &snippet_studio_rpc_usb_uart; + }; +}; + +&zephyr_udc0 { + snippet_studio_rpc_usb_uart: snippet_studio_rpc_usb_uart { + compatible = "zephyr,cdc-acm-uart"; + }; +}; +