Skip to content

Commit

Permalink
broken anchors
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick-Munnich committed Sep 7, 2024
1 parent 84f7264 commit 84b7c30
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 24 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
### KScan sideband behavior

The kscan sideband behavior driver will be used to trigger the [soft off behavior](../../keymaps/behaviors/soft-off.md) "out of band" from the normal keymap processing. To do so, it will decorate/wrap an underlying kscan driver.
The kscan sideband behavior driver will be used to trigger the [soft off behavior](../../../keymaps/behaviors/soft-off.md) "out of band" from the normal keymap processing. To do so, it will decorate/wrap an underlying kscan driver.

With a simple direct pin setup, the [direct kscan](../../config/kscan.md) driver can be used with a [GPIO key](#gpio-key), to make a small "side matrix":
With a simple direct pin setup, the [direct kscan](../../../config/kscan.md) driver can be used with a [GPIO key](#gpio-key), to make a small "side matrix":

```dts
/ {
Expand Down Expand Up @@ -34,4 +34,4 @@ With that in place, the kscan sideband behavior will wrap the new driver:
};
```

As the kscan used only has a single key, both column and row are set to 0. The properties of the `kscan-sideband-behaviors` node can be found in the [appropriate configuration section](../../config/kscan.md#kscan-sideband-behavior-driver).
As the kscan used only has a single key, both column and row are set to 0. The properties of the `kscan-sideband-behaviors` node can be found in the [appropriate configuration section](../../../config/kscan.md#kscan-sideband-behavior-driver).
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
### KScan sideband behavior

The kscan sideband behavior driver will be used to trigger the [soft off behavior](../../keymaps/behaviors/soft-off.md) "out of band" from the normal keymap processing. To do so, it will decorate/wrap an underlying kscan driver.
The kscan sideband behavior driver will be used to trigger the [soft off behavior](../../../keymaps/behaviors/soft-off.md) "out of band" from the normal keymap processing. To do so, it will decorate/wrap an underlying kscan driver.

For the matrix-integrated approach you will supplement the existing kscan matrix by adding the additional pin as another entry in
the `row-gpios`/`col-gpios` for whichever pins are used to read the matrix state. This approach requires a matrix transform to be present. As an example, consider the following existing kscan matrix:
Expand Down Expand Up @@ -63,4 +63,4 @@ With that in place, you would decorate the kscan driver:
};
```

Critically, the `column` and `row` values would correspond to the location of the added entry. The properties of the `kscan-sideband-behaviors` node can be found in the [appropriate configuration section](../../config/kscan.md#kscan-sideband-behavior-driver).
Critically, the `column` and `row` values would correspond to the location of the added entry. The properties of the `kscan-sideband-behaviors` node can be found in the [appropriate configuration section](../../../config/kscan.md#kscan-sideband-behavior-driver).
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
### KScan sideband behavior

With a simple direct pin setup, the [direct kscan](../../config/kscan.md) driver can be used with a [GPIO key](#gpio-key), to make a small "side matrix":
With a simple direct pin setup, the [direct kscan](../../../config/kscan.md) driver can be used with a [GPIO key](#gpio-key), to make a small "side matrix":

```dts
/ {
Expand All @@ -25,4 +25,4 @@ The kscan sideband behavior needs to wrap the new driver to enable it:
};
```

The properties of the `kscan-sideband-behaviors` node can be found in the [appropriate configuration section](../../config/kscan.md#kscan-sideband-behavior-driver).
The properties of the `kscan-sideband-behaviors` node can be found in the [appropriate configuration section](../../../config/kscan.md#kscan-sideband-behavior-driver).
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
### Soft off behavior instance

Behind the scenes, a hardware dedicated GPIO pin utilizes the [soft off behavior](../../keymaps/behaviors/soft-off.md) to trigger entering the soft-off state. To use said behavior outside of a keymap, add an instance of the behavior to your `.overlay`/`.dts` file:
Behind the scenes, a hardware dedicated GPIO pin utilizes the [soft off behavior](../../../keymaps/behaviors/soft-off.md) to trigger entering the soft-off state. To use said behavior outside of a keymap, add an instance of the behavior to your `.overlay`/`.dts` file:

```dts
/ {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ We need to add another device which will be enabled only when the keyboard is go
};
```

The properties for the `gpio-key-wakeup-trigger` node can be found in the [appropriate configuration section](../../config/power.md#gpio-key-wakeup-trigger).
The properties for the `gpio-key-wakeup-trigger` node can be found in the [appropriate configuration section](../../../config/power.md#gpio-key-wakeup-trigger).
12 changes: 0 additions & 12 deletions docs/docs/development/hardware-integration/index.md

This file was deleted.

6 changes: 3 additions & 3 deletions docs/docs/development/hardware-integration/soft-off-setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import SidebandDirect from "./includes/_sideband-direct.md";
import SidebandMatrix from "./includes/_sideband-matrix.md";
import SidebandWakeupDirect from "./includes/_sideband-wakeup-direct.md";

Advanced methods of adding [soft off](../features/low-power-states.md#soft-off) to a keyboard are detailed below. The first two tabs describe methods involving hardware changes, while the last describes the firmware changes necessary to define a single specific key switch for waking up.
Advanced methods of adding [soft off](../../features/low-power-states.md#soft-off) to a keyboard are detailed below. The first two tabs describe methods involving hardware changes, while the last describes the firmware changes necessary to define a single specific key switch for waking up.

<Tabs groupId="advanced-methods" defaultValue="direct">
<TabItem value="direct" label="Direct Pin"></TabItem>
Expand Down Expand Up @@ -67,7 +67,7 @@ Several items work together to make both triggering soft off properly, and setti

### Soft off behavior

For this approach, you will need to make sure that the [soft off behavior](../keymaps/behaviors/soft-off.md) is present in your keymap, to trigger soft off.
For this approach, you will need to make sure that the [soft off behavior](../../keymaps/behaviors/soft-off.md) is present in your keymap, to trigger soft off.

</TabItem>
</Tabs>
Expand Down Expand Up @@ -150,7 +150,7 @@ Finally, we will list the `wakeup_scan` device in an additional configuration se
Here are the properties for the node:

- The `compatible` property for the node must be `zmk,soft-off-wakeup-sources`.
- The `wakeup-sources` property is a [phandle array](../config/index.md#devicetree-property-types) pointing to all the devices that should be enabled during the shutdown process to be sure they can later wake the keyboard.
- The `wakeup-sources` property is a [phandle array](../../config/index.md#devicetree-property-types) pointing to all the devices that should be enabled during the shutdown process to be sure they can later wake the keyboard.

:::tip
If you add your kscan to the `wakeup-sources` array, then your keyboard will wake upon pressing any key in your kscan. Essentially, this causes `&soft_off` to behave as one would expect `&sleep` to behave. If you choose to do so, then you can omit everything aside from the `soft_off_wakers` node.
Expand Down

0 comments on commit 84b7c30

Please sign in to comment.