Skip to content

Commit

Permalink
feat(studio): Add studio-rpc-usb-uart snippet.
Browse files Browse the repository at this point in the history
 * Add an easy snippet for enabling USB UART added
   to the `zephyr_udc0` standard node.
  • Loading branch information
petejohanson committed Jun 28, 2024
1 parent 8e038eb commit b18c1a3
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/snippets/studio-rpc-usb-uart/snippet.yml
Original file line number Diff line number Diff line change
@@ -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
6 changes: 6 additions & 0 deletions app/snippets/studio-rpc-usb-uart/studio-rpc-usb-uart.conf
Original file line number Diff line number Diff line change
@@ -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
13 changes: 13 additions & 0 deletions app/snippets/studio-rpc-usb-uart/studio-rpc-usb-uart.overlay
Original file line number Diff line number Diff line change
@@ -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";
};
};

0 comments on commit b18c1a3

Please sign in to comment.