Moved logging, deleted hardware-int index

This commit is contained in:
Nicolas Munnich 2024-08-31 07:37:53 +02:00
parent e12d4f7137
commit df8feb8494
7 changed files with 9 additions and 24 deletions

View file

@ -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.
<DocCardList />

View file

@ -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) - `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`) - `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) - `zmk/behavior.h`: ZMK Behavior Information (e.g. parameters, position and timestamp of events)
- `return` values: - `return` values:
- `ZMK_BEHAVIOR_OPAQUE`: Used to terminate `on_<behavior_name>_binding_pressed` and `on_<behavior_name>_binding_released` functions that accept `(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event)` as parameters - `ZMK_BEHAVIOR_OPAQUE`: Used to terminate `on_<behavior_name>_binding_pressed` and `on_<behavior_name>_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 :::info
- See [Tests](local-toolchain/tests.md) for more information on how to create virtual test sets. - 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).
::: :::

View file

@ -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. 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. If you already have the Ardunio IDE installed you can also use its built-in Serial Monitor.

View file

@ -103,5 +103,5 @@ Please note there are five available Bluetooth profiles by default. If you need
::: :::
:::note :::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”.
::: :::

View file

@ -23,7 +23,7 @@ export const Uf2Tabs = (props) => (
); );
:::tip :::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 ## Split Keyboard Halves Unable to Pair

View file

@ -119,10 +119,6 @@ module.exports = {
{ {
type: "category", type: "category",
label: "Hardware Integration", label: "Hardware Integration",
link: {
type: "doc",
id: "development/hardware-integration/index",
},
collapsed: true, collapsed: true,
items: [ items: [
"development/hardware-integration/new-shield", "development/hardware-integration/new-shield",
@ -158,13 +154,13 @@ module.exports = {
], ],
}, },
"development/local-toolchain/build-flash", "development/local-toolchain/build-flash",
"development/local-toolchain/usb-logging",
"development/local-toolchain/pre-commit", "development/local-toolchain/pre-commit",
"development/local-toolchain/ide-integration", "development/local-toolchain/ide-integration",
"development/local-toolchain/tests", "development/local-toolchain/tests",
"development/local-toolchain/posix-board", "development/local-toolchain/posix-board",
], ],
}, },
"development/usb-logging",
"development/studio-rpc-protocol", "development/studio-rpc-protocol",
"development/new-behavior", "development/new-behavior",
], ],

View file

@ -9,11 +9,12 @@
/docs/development/setup /docs/development/local-toolchain/setup 301 /docs/development/setup /docs/development/local-toolchain/setup 301
/docs/development/boards-shields-keymaps /docs/development/hardware-integration/boards-shields-keymaps 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/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/new-shield /docs/development/hardware-integration/new-shield 301
/docs/development/build-flash /docs/development/local-toolchain/build-flash 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/ide-integration /docs/development/local-toolchain/ide-integration 301
/docs/development/posix-board /docs/development/local-toolchain/posix-board 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/pre-commit /docs/development/local-toolchain/pre-commit 301
/docs/development/tests /docs/development/local-toolchain/tests 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 /docs/development/guides/new-behavior /docs/development/new-behavior 301