forked from zmkfirmware/zmk
-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Actually add the
zmk-usb-logging
snippet.
* D'oh.
- Loading branch information
1 parent
7be955f
commit 261e1df
Showing
4 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
.. _snippet-cdc-acm-console: | ||
|
||
CDC-ACM Console Snippet (cdc-acm-console) | ||
######################################### | ||
|
||
.. code-block:: console | ||
west build -S cdc-acm-console [...] | ||
Overview | ||
******** | ||
|
||
This snippet redirects serial console output to a CDC ACM UART. The USB device | ||
which should be used is configured using :ref:`devicetree`. | ||
|
||
Requirements | ||
************ | ||
|
||
Hardware support for: | ||
|
||
- :kconfig:option:`CONFIG_USB_DEVICE_STACK` | ||
- :kconfig:option:`CONFIG_SERIAL` | ||
- :kconfig:option:`CONFIG_CONSOLE` | ||
- :kconfig:option:`CONFIG_UART_CONSOLE` | ||
- :kconfig:option:`CONFIG_UART_LINE_CTRL` | ||
|
||
A devicetree node with node label ``zephyr_udc0`` that points to an enabled USB | ||
device node with driver support. This should look roughly like this in | ||
:ref:`your devicetree <get-devicetree-outputs>`: | ||
|
||
.. code-block:: DTS | ||
zephyr_udc0: usbd@deadbeef { | ||
compatible = "vnd,usb-device"; | ||
/* ... */ | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
name: zmk-usb-logging | ||
append: | ||
EXTRA_CONF_FILE: zmk-usb-logging.conf | ||
EXTRA_DTC_OVERLAY_FILE: zmk-usb-logging.overlay |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
CONFIG_ZMK_USB_LOGGING=y | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* | ||
* Copyright (c) 2024 The ZMK Contributors | ||
* | ||
* SPDX-License-Identifier: MIT | ||
*/ | ||
|
||
/ { | ||
chosen { | ||
zephyr,console = &snippet_zmk_usb_logging_uart; | ||
zephyr,shell-uart = &snippet_zmk_usb_logging_uart; | ||
}; | ||
}; | ||
|
||
&zephyr_udc0 { | ||
snippet_zmk_usb_logging_uart: snippet_zmk_usb_logging_uart { | ||
compatible = "zephyr,cdc-acm-uart"; | ||
}; | ||
}; |