From df8feb8494b2d5be20f0ac564c1428810072dfb4 Mon Sep 17 00:00:00 2001 From: Nicolas Munnich Date: Sat, 31 Aug 2024 07:37:53 +0200 Subject: [PATCH] Moved logging, deleted hardware-int index --- docs/docs/development/hardware-integration/index.md | 12 ------------ docs/docs/development/new-behavior.mdx | 4 ++-- .../{local-toolchain => }/usb-logging.mdx | 4 ++-- docs/docs/keymaps/behaviors/bluetooth.md | 2 +- docs/docs/troubleshooting/connection-issues.mdx | 2 +- docs/sidebars.js | 6 +----- docs/static/_redirects | 3 ++- 7 files changed, 9 insertions(+), 24 deletions(-) delete mode 100644 docs/docs/development/hardware-integration/index.md rename docs/docs/development/{local-toolchain => }/usb-logging.mdx (97%) diff --git a/docs/docs/development/hardware-integration/index.md b/docs/docs/development/hardware-integration/index.md deleted file mode 100644 index dd828224..00000000 --- a/docs/docs/development/hardware-integration/index.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: Hardware Integration -sidebar_label: Hardware Integration ---- - -import DocCardList from "@theme/DocCardList"; - -ZMK, being built on [Zephyr™](https://zephyrproject.org/), is very modular and flexible. This allows users to combine features, flags, and properties to "construct" features in ZMK, without the need to modify the underlying source code. - -However, this very same flexibility can be difficult to utilise, thanks to the resulting complexity. This section features guides and informative pages on how to integrate configure, and modify hardware with ZMK; **without** needing to refer to [Zephyr™ documentation](https://docs.zephyrproject.org/3.5.0/index.html) for a majority of cases. - - diff --git a/docs/docs/development/new-behavior.mdx b/docs/docs/development/new-behavior.mdx index 78b08b5f..3d50b821 100644 --- a/docs/docs/development/new-behavior.mdx +++ b/docs/docs/development/new-behavior.mdx @@ -196,7 +196,7 @@ The dependencies required for any ZMK behavior are: - `device.h`: [Zephyr Device APIs](https://docs.zephyrproject.org/apidoc/latest/group__device__model.html) - `drivers/behavior.h`: ZMK Behavior Functions (e.g. [`locality`](#api-structure), `behavior_keymap_binding_pressed`, `behavior_keymap_binding_released`, `behavior_sensor_keymap_binding_triggered`) -- `logging/log.h`: [Zephyr Logging APIs](https://docs.zephyrproject.org/3.5.0/services/logging/index.html) (for more information on USB Logging in ZMK, see [USB Logging](local-toolchain/usb-logging.mdx)). +- `logging/log.h`: [Zephyr Logging APIs](https://docs.zephyrproject.org/3.5.0/services/logging/index.html) (for more information on USB Logging in ZMK, see [USB Logging](usb-logging.mdx)). - `zmk/behavior.h`: ZMK Behavior Information (e.g. parameters, position and timestamp of events) - `return` values: - `ZMK_BEHAVIOR_OPAQUE`: Used to terminate `on__binding_pressed` and `on__binding_released` functions that accept `(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event)` as parameters @@ -437,7 +437,7 @@ Zephyr currently does not support logging over Bluetooth, so any use of the seri :::info - See [Tests](local-toolchain/tests.md) for more information on how to create virtual test sets. -- For hardware-based testing, see [USB Logging](local-toolchain/usb-logging.mdx). +- For hardware-based testing, see [USB Logging](usb-logging.mdx). ::: diff --git a/docs/docs/development/local-toolchain/usb-logging.mdx b/docs/docs/development/usb-logging.mdx similarity index 97% rename from docs/docs/development/local-toolchain/usb-logging.mdx rename to docs/docs/development/usb-logging.mdx index 2ae27ce5..b7c3d233 100644 --- a/docs/docs/development/local-toolchain/usb-logging.mdx +++ b/docs/docs/development/usb-logging.mdx @@ -69,9 +69,9 @@ sudo tio /dev/ttyACM0 On Windows, you can use [PuTTY](https://www.putty.org/). Once installed, use Device Manager to figure out which COM port your controller is communicating on (listed under 'Ports (COM & LPT)') and specify that as the 'Serial line' in PuTTY. -![Controller COM port](../../assets/usb-logging/com.jpg) +![Controller COM port](../assets/usb-logging/com.jpg) -![PuTTY settings](../../assets/usb-logging/putty.jpg) +![PuTTY settings](../assets/usb-logging/putty.jpg) If you already have the Ardunio IDE installed you can also use its built-in Serial Monitor. diff --git a/docs/docs/keymaps/behaviors/bluetooth.md b/docs/docs/keymaps/behaviors/bluetooth.md index 960e238b..93d08428 100644 --- a/docs/docs/keymaps/behaviors/bluetooth.md +++ b/docs/docs/keymaps/behaviors/bluetooth.md @@ -103,5 +103,5 @@ Please note there are five available Bluetooth profiles by default. If you need ::: :::note -If you clear bond of a paired profile, make sure you do the same thing on the peer device as well (typically achieved by _removing_ or _forgetting_ the bluetooth connection). Otherwise the peer will try to connect to your keyboard whenever it discovers it. But while the MAC address of both devices could remain the same, the security key no longer match: the peer device still possess the old key negotiated in the previous pairing procedure, but our keyboard firmware has deleted that key. So the connection will fail. If you [enabled USB logging](../../development/local-toolchain/usb-logging.mdx), you might see a lot of failed connection attempts due to the reason of “Security failed”. +If you clear bond of a paired profile, make sure you do the same thing on the peer device as well (typically achieved by _removing_ or _forgetting_ the bluetooth connection). Otherwise the peer will try to connect to your keyboard whenever it discovers it. But while the MAC address of both devices could remain the same, the security key no longer match: the peer device still possess the old key negotiated in the previous pairing procedure, but our keyboard firmware has deleted that key. So the connection will fail. If you [enabled USB logging](../../development/usb-logging.mdx), you might see a lot of failed connection attempts due to the reason of “Security failed”. ::: diff --git a/docs/docs/troubleshooting/connection-issues.mdx b/docs/docs/troubleshooting/connection-issues.mdx index d09f510f..a57a3d20 100644 --- a/docs/docs/troubleshooting/connection-issues.mdx +++ b/docs/docs/troubleshooting/connection-issues.mdx @@ -23,7 +23,7 @@ export const Uf2Tabs = (props) => ( ); :::tip -[USB logging](../development/local-toolchain/usb-logging.mdx) can be very helpful for diagnosing issues with ZMK. However, when connected to USB your ZMK device will output to USB by default. To troubleshoot wireless connection issues using logging, you will need to [change the preferred output endpoint](../keymaps/behaviors/outputs.md). +[USB logging](../development/usb-logging.mdx) can be very helpful for diagnosing issues with ZMK. However, when connected to USB your ZMK device will output to USB by default. To troubleshoot wireless connection issues using logging, you will need to [change the preferred output endpoint](../keymaps/behaviors/outputs.md). ::: ## Split Keyboard Halves Unable to Pair diff --git a/docs/sidebars.js b/docs/sidebars.js index d6e03dcc..da619e5e 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -119,10 +119,6 @@ module.exports = { { type: "category", label: "Hardware Integration", - link: { - type: "doc", - id: "development/hardware-integration/index", - }, collapsed: true, items: [ "development/hardware-integration/new-shield", @@ -158,13 +154,13 @@ module.exports = { ], }, "development/local-toolchain/build-flash", - "development/local-toolchain/usb-logging", "development/local-toolchain/pre-commit", "development/local-toolchain/ide-integration", "development/local-toolchain/tests", "development/local-toolchain/posix-board", ], }, + "development/usb-logging", "development/studio-rpc-protocol", "development/new-behavior", ], diff --git a/docs/static/_redirects b/docs/static/_redirects index 866cb4ab..f5e8da26 100644 --- a/docs/static/_redirects +++ b/docs/static/_redirects @@ -9,11 +9,12 @@ /docs/development/setup /docs/development/local-toolchain/setup 301 /docs/development/boards-shields-keymaps /docs/development/hardware-integration/boards-shields-keymaps 301 /docs/development/hardware-metadata-files /docs/development/hardware-integration/hardware-metadata-files 301 +/docs/development/clean-room /docs/development/contributing/clean-room 301 +/docs/development/documentation /docs/development/contributing/documentation 301 /docs/development/new-shield /docs/development/hardware-integration/new-shield 301 /docs/development/build-flash /docs/development/local-toolchain/build-flash 301 /docs/development/ide-integration /docs/development/local-toolchain/ide-integration 301 /docs/development/posix-board /docs/development/local-toolchain/posix-board 301 /docs/development/pre-commit /docs/development/local-toolchain/pre-commit 301 /docs/development/tests /docs/development/local-toolchain/tests 301 -/docs/development/usb-logging /docs/development/local-toolchain/usb-logging 301 /docs/development/guides/new-behavior /docs/development/new-behavior 301 \ No newline at end of file