docs: Add syntax highlighting to more code blocks

Added language tags to more code blocks in the documentation to enable
syntax highlighting.
This commit is contained in:
Joel Spadin
2023-10-06 22:05:49 -05:00
committed by Cem Aksoylar
parent 4a339093ce
commit 65667b863a
50 changed files with 215 additions and 221 deletions

View File

@@ -26,7 +26,7 @@ Existing user config repositories using Github Actions to build will pull down Z
1. Replace the contents of your `.github/workflows/build.yml` with:
```
```yaml
on: [push, pull_request, workflow_dispatch]
jobs:
@@ -36,7 +36,7 @@ Existing user config repositories using Github Actions to build will pull down Z
1. If it doesn't exist already, add a new file to your repository named `build.yaml`:
```
```yaml
# This file generates the GitHub Actions matrix
# For simple board + shield combinations, add them
# to the top level board and shield arrays, for more
@@ -63,12 +63,12 @@ If you have a custom GitHub Actions workflow you need to maintain for some reaso
- Change `zmkfirmware/zmk-build-arm:2.5` to `zmkfirmware/zmk-build-arm:stable` wherever it is found
- Locate and delete the lines for the DTS output step, which is no longer needed:
```
- name: ${{ steps.variables.outputs.display-name }} DTS File
if: ${{ always() }}
run: |
if [ -f "build/zephyr/${{ matrix.board }}.pre.tmp" ]; then cat -n build/zephyr/${{ matrix.board }}.pre.tmp; fi
if [ -f "build/zephyr/zephyr.dts" ]; then cat -n build/zephyr/zephyr.dts; fi
```yaml
- name: ${{ steps.variables.outputs.display-name }} DTS File
if: ${{ always() }}
run: |
if [ -f "build/zephyr/${{ matrix.board }}.pre.tmp" ]; then cat -n build/zephyr/${{ matrix.board }}.pre.tmp; fi
if [ -f "build/zephyr/zephyr.dts" ]; then cat -n build/zephyr/zephyr.dts; fi
```
### VS Code & Docker (Dev Container)
@@ -107,7 +107,7 @@ A few testers have reported inconsistent issues with bluetooth connections on Wi
Zephyr 3.2 introduced [a new Kconfig setting](https://github.com/zephyrproject-rtos/zephyr/pull/48929) that can be used to work around a bug in Windows related to battery reporting. Check out our [bluetooth config](/docs/config/bluetooth) for the full details. The key new configuration that can be set if using Windows is:
```
```ini
CONFIG_BT_GATT_ENFORCE_SUBSCRIPTION=n
```
@@ -133,7 +133,7 @@ The main area this affects existing shields is those with board specific overrid
Previously in ZMK, we relied on per-driver devicetree source properties to set the alternate pin functions for things like SPI or I2C. For example, here is the I2C bus setup as it was previously on the `nice_nano` board:
```
```dts
&i2c0 {
compatible = "nordic,nrf-twi";
sda-pin = <17>;
@@ -143,7 +143,7 @@ Previously in ZMK, we relied on per-driver devicetree source properties to set t
With the move to the `pinctrl` system, this setup now look like:
```
```dts
&i2c0 {
compatible = "nordic,nrf-twi";
pinctrl-0 = <&i2c0_default>;
@@ -154,7 +154,7 @@ With the move to the `pinctrl` system, this setup now look like:
which references the `pinctrl` configuration:
```
```dts
&pinctrl {
i2c0_default: i2c0_default {
group1 {
@@ -185,7 +185,7 @@ The approach is the following when updating a _board_:
1. Add a new file with the naming convention `<board>-pinctrl.dtsi` to your board directory.
1. In the new file, add your `pinctrl` entries that set up different pin control configurations for whatever peripherals/buses are needed. Here's the nice!nano file as an example:
```
```dts
/*
* Copyright (c) 2022 The ZMK Contributors
* SPDX-License-Identifier: MIT
@@ -230,7 +230,7 @@ The approach is the following when updating a _board_:
1. From the main `<board>.dts` file, add an `#include "<board>-pinctrl.dtsi"` to have the C-preprocessor combine the files.
1. Update the various peripheral nodes to use the new `pinctrl` configurations. For example, the following old configuration:
```
```dts
&i2c0 {
compatible = "nordic,nrf-twi";
sda-pin = <15>;
@@ -240,7 +240,7 @@ The approach is the following when updating a _board_:
would be changed to:
```
```dts
&i2c0 {
compatible = "nordic,nrf-twi";
pinctrl-0 = <&i2c0_default>;