Skip to content

Commit

Permalink
[Docs] Clean up some code block languages (qmk#14434)
Browse files Browse the repository at this point in the history
  • Loading branch information
fauxpark authored Sep 14, 2021
1 parent b317981 commit bf818a4
Show file tree
Hide file tree
Showing 25 changed files with 61 additions and 61 deletions.
14 changes: 7 additions & 7 deletions docs/audio_driver.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@ This driver needs one Timer per enabled/used DAC channel, to trigger conversion;

Additionally, in the board config, you'll want to make changes to enable the DACs, GPT for Timers 6, 7 and 8:

``` c
```c
//halconf.h:
#define HAL_USE_DAC TRUE
#define HAL_USE_GPT TRUE
#include_next <halconf.h>
```

``` c
```c
// mcuconf.h:
#include_next <mcuconf.h>
#undef STM32_DAC_USE_DAC1_CH1
Expand Down Expand Up @@ -93,14 +93,14 @@ only needs one timer (GPTD6, Tim6) to trigger the DAC unit to do a conversion; t
Additionally, in the board config, you'll want to make changes to enable the DACs, GPT for Timer 6:
``` c
```c
//halconf.h:
#define HAL_USE_DAC TRUE
#define HAL_USE_GPT TRUE
#include_next <halconf.h>
```

``` c
```c
// mcuconf.h:
#include_next <mcuconf.h>
#undef STM32_DAC_USE_DAC1_CH1
Expand Down Expand Up @@ -153,15 +153,15 @@ This driver uses the ChibiOS-PWM system to produce a square-wave on specific out
The hardware directly toggles the pin via its alternate function. See your MCU's data-sheet for which pin can be driven by what timer - looking for TIMx_CHy and the corresponding alternate function.

A configuration example for the STM32F103C8 would be:
``` c
```c
//halconf.h:
#define HAL_USE_PWM TRUE
#define HAL_USE_PAL TRUE
#define HAL_USE_GPT TRUE
#include_next <halconf.h>
```

``` c
```c
// mcuconf.h:
#include_next <mcuconf.h>
#undef STM32_PWM_USE_TIM1
Expand All @@ -177,7 +177,7 @@ If we now target pin A8, looking through the data-sheet of the STM32F103C8, for
- TIM1_CH4 = PA11

with all this information, the configuration would contain these lines:
``` c
```c
//config.h:
#define AUDIO_PIN A8
#define AUDIO_PWM_DRIVER PWMD1
Expand Down
2 changes: 1 addition & 1 deletion docs/cli_development.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ If you intend to maintain keyboards and/or contribute to QMK, you can enable the

This will allow you to see all available subcommands.
**Note:** You will have to install additional requirements:
```bash
```
python3 -m pip install -r requirements-dev.txt
```

Expand Down
4 changes: 2 additions & 2 deletions docs/configurator_default_keymaps.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Keymaps in this directory require four key-value pairs:

Additionally, most keymaps contain a `commit` key. This key is not consumed by the API that back-stops QMK Configurator, but is used by Configurator's maintainers to tell which version of a keymap was used to create the JSON keymap in this repository. The value is the SHA of the last commit to modify a board's default `keymap.c` in the `qmk_firmware` repository. The SHA is found by checking out [the `master` branch of the `qmk/qmk_firmware` repository](https://github.com/qmk/qmk_firmware/tree/master/) and running `git log -1 --pretty=oneline -- keyboards/<keyboard>/keymaps/default/keymap.c` (use `keymap.json` if the keyboard in question has this file instead), which should return something similar to:

```shell
```
f14629ed1cd7c7ec9089604d64f29a99981558e8 Remove/migrate action_get_macro()s from default keymaps (#5625)
```

Expand All @@ -31,7 +31,7 @@ In this example, `f14629ed1cd7c7ec9089604d64f29a99981558e8` is the value that sh

If one wished to add a default keymap for the H87a by Hineybush, one would run the `git log` command above against the H87a's default keymap in `qmk_firmware`:

```shell
```
user ~/qmk_firmware (master)
$ git log -1 --pretty=oneline master -- keyboards/hineybush/h87a/keymaps/default/keymap.c
ef8878fba5d3786e3f9c66436da63a560cd36ac9 Hineybush h87a lock indicators (#8237)
Expand Down
2 changes: 1 addition & 1 deletion docs/custom_matrix.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The reasons to use this feature include:
Implementing custom matrix usually involves compilation of an additional source file. It is recommended that for consistency, this file is called `matrix.c`.

Add a new file to your keyboard directory:
```text
```
keyboards/<keyboard>/matrix.c
```

Expand Down
4 changes: 2 additions & 2 deletions docs/faq_debug.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
```
Example output
```text
```
Waiting for device:.......
Listening:
KL: kc: 169, col: 0, row: 0, pressed: 1
Expand All @@ -82,7 +82,7 @@ When testing performance issues, it can be useful to know the frequency at which
```

Example output
```text
```
> matrix scan frequency: 315
> matrix scan frequency: 313
> matrix scan frequency: 316
Expand Down
12 changes: 6 additions & 6 deletions docs/feature_backlight.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The MCU can only supply so much current to its GPIO pins. Instead of powering th

Most keyboards have backlighting enabled by default if they support it, but if it is not working for you, check that your `rules.mk` includes the following:

```makefile
```make
BACKLIGHT_ENABLE = yes
```

Expand Down Expand Up @@ -54,7 +54,7 @@ If backlight breathing is enabled (see below), the following functions are also

To select which driver to use, configure your `rules.mk` with the following:

```makefile
```make
BACKLIGHT_DRIVER = software
```

Expand Down Expand Up @@ -87,7 +87,7 @@ This functionality is configured at the keyboard level with the `BACKLIGHT_ON_ST

The `pwm` driver is configured by default, however the equivalent setting within `rules.mk` would be:

```makefile
```make
BACKLIGHT_DRIVER = pwm
```

Expand Down Expand Up @@ -143,7 +143,7 @@ The breathing effect is the same as in the hardware PWM implementation.

While still in its early stages, ARM backlight support aims to eventually have feature parity with AVR. The `pwm` driver is configured by default, however the equivalent setting within `rules.mk` would be:

```makefile
```make
BACKLIGHT_DRIVER = pwm
```

Expand All @@ -167,7 +167,7 @@ Currently only hardware PWM is supported, not timer assisted, and does not provi

In this mode, PWM is "emulated" while running other keyboard tasks. It offers maximum hardware compatibility without extra platform configuration. The tradeoff is the backlight might jitter when the keyboard is busy. To enable, add this to your `rules.mk`:

```makefile
```make
BACKLIGHT_DRIVER = software
```

Expand All @@ -188,7 +188,7 @@ To activate multiple backlight pins, add something like this to your `config.h`,
If none of the above drivers apply to your board (for example, you are using a separate IC to control the backlight), you can implement a custom backlight driver using this simple API provided by QMK. To enable, add this to your `rules.mk`:
```makefile
```make
BACKLIGHT_DRIVER = custom
```

Expand Down
2 changes: 1 addition & 1 deletion docs/feature_bluetooth.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The currently supported Bluetooth chipsets do not support [N-Key Rollover (NKRO)

Add the following to your `rules.mk`:

```makefile
```make
BLUETOOTH_ENABLE = yes
BLUETOOTH_DRIVER = AdafruitBLE # or RN42
```
Expand Down
2 changes: 1 addition & 1 deletion docs/feature_digitizer.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The digitizer HID interface allows setting the mouse cursor position at absolute

To enable the digitizer interface, add the following line to your rules.mk:

```makefile
```make
DIGITIZER_ENABLE = yes
```

Expand Down
2 changes: 1 addition & 1 deletion docs/feature_joystick.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ or send gamepad reports based on values computed by the keyboard.

To use analog input you must first enable it in `rules.mk`:

```makefile
```make
JOYSTICK_ENABLE = yes
JOYSTICK_DRIVER = analog # or 'digital'
```
Expand Down
2 changes: 1 addition & 1 deletion docs/feature_layouts.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The `layouts/default/` and `layouts/community/` are two examples of layout "repo

Each layout folder is named (`[a-z0-9_]`) after the physical aspects of the layout, in the most generic way possible, and contains a `readme.md` with the layout to be defined by the keyboard:

```md
```markdown
# 60_ansi

LAYOUT_60_ansi
Expand Down
2 changes: 1 addition & 1 deletion docs/feature_midi.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

First, enable MIDI by adding the following to your `rules.mk`:

```makefile
```make
MIDI_ENABLE = yes
```

Expand Down
2 changes: 1 addition & 1 deletion docs/feature_pointing_device.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Pointing Device is a generic name for a feature intended to be generic: moving t

To enable Pointing Device, uncomment the following line in your rules.mk:

```makefile
```make
POINTING_DEVICE_ENABLE = yes
```

Expand Down
6 changes: 3 additions & 3 deletions docs/feature_ps2_mouse.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Note: This is not recommended, you may encounter jerky movement or unsent inputs

In rules.mk:

```makefile
```make
PS2_MOUSE_ENABLE = yes
PS2_USE_BUSYWAIT = yes
```
Expand All @@ -56,7 +56,7 @@ The following example uses D2 for clock and D5 for data. You can use any INT or

In rules.mk:

```makefile
```make
PS2_MOUSE_ENABLE = yes
PS2_USE_INT = yes
```
Expand Down Expand Up @@ -118,7 +118,7 @@ To use USART on the ATMega32u4, you have to use PD5 for clock and PD2 for data.

In rules.mk:

```makefile
```make
PS2_MOUSE_ENABLE = yes
PS2_USE_USART = yes
```
Expand Down
4 changes: 2 additions & 2 deletions docs/feature_rawhid.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ RAW_ENABLE = yes

In your `keymap.c` include `"raw_hid.h"` and implement the following:

```C
```c
void raw_hid_receive(uint8_t *data, uint8_t length) {
// Your code goes here. data is the packet received from host.
}
```
The `"raw_hid.h"` header also declares `void raw_hid_send(uint8_t *data, uint8_t length);` which allows sending packets from keyboard to host. As an example, it can also be used for debugging when building your host application by returning all data back to the host.
```C
```c
void raw_hid_receive(uint8_t *data, uint8_t length) {
raw_hid_send(data, length);
}
Expand Down
12 changes: 6 additions & 6 deletions docs/feature_rgb_matrix.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ If you want to use single color LED's you should use the [LED Matrix Subsystem](

There is basic support for addressable RGB matrix lighting with the I2C IS31FL3731 RGB controller. To enable it, add this to your `rules.mk`:

```makefile
```make
RGB_MATRIX_ENABLE = yes
RGB_MATRIX_DRIVER = IS31FL3731
```
Expand Down Expand Up @@ -71,7 +71,7 @@ Where `Cx_y` is the location of the LED in the matrix defined by [the datasheet]

There is basic support for addressable RGB matrix lighting with the I2C IS31FL3733 RGB controller. To enable it, add this to your `rules.mk`:

```makefile
```make
RGB_MATRIX_ENABLE = yes
RGB_MATRIX_DRIVER = IS31FL3733
```
Expand Down Expand Up @@ -141,7 +141,7 @@ Where `X_Y` is the location of the LED in the matrix defined by [the datasheet](

There is basic support for addressable RGB matrix lighting with the I2C IS31FL3737 RGB controller. To enable it, add this to your `rules.mk`:

```makefile
```make
RGB_MATRIX_ENABLE = yes
RGB_MATRIX_DRIVER = IS31FL3737
```
Expand Down Expand Up @@ -206,7 +206,7 @@ Where `X_Y` is the location of the LED in the matrix defined by [the datasheet](

There is basic support for addressable RGB matrix lighting with a WS2811/WS2812{a,b,c} addressable LED strand. To enable it, add this to your `rules.mk`:

```makefile
```make
RGB_MATRIX_ENABLE = yes
RGB_MATRIX_DRIVER = WS2812
```
Expand All @@ -226,7 +226,7 @@ Configure the hardware via your `config.h`:
There is basic support for APA102 based addressable LED strands. To enable it, add this to your `rules.mk`:
```makefile
```make
RGB_MATRIX_ENABLE = yes
RGB_MATRIX_DRIVER = APA102
```
Expand All @@ -246,7 +246,7 @@ Configure the hardware via your `config.h`:
### AW20216 :id=aw20216
There is basic support for addressable RGB matrix lighting with the SPI AW20216 RGB controller. To enable it, add this to your `rules.mk`:
```makefile
```make
RGB_MATRIX_ENABLE = yes
RGB_MATRIX_DRIVER = AW20216
```
Expand Down
2 changes: 1 addition & 1 deletion docs/feature_stenography.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ GeminiPR encodes 42 keys into a 6-byte packet. While TX Bolt contains everything

Firstly, enable steno in your keymap's Makefile. You may also need disable mousekeys, extra keys, or another USB endpoint to prevent conflicts. The builtin USB stack for some processors only supports a certain number of USB endpoints and the virtual serial port needed for steno fills 3 of them.

```makefile
```make
STENO_ENABLE = yes
MOUSEKEY_ENABLE = no
```
Expand Down
2 changes: 1 addition & 1 deletion docs/feature_swap_hands.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The swap-hands action allows support for one-handed typing without requiring a s

The configuration table is a simple 2-dimensional array to map from column/row to new column/row. Example `hand_swap_config` for Planck:

```C
```c
const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
{{11, 0}, {10, 0}, {9, 0}, {8, 0}, {7, 0}, {6, 0}, {5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}},
{{11, 1}, {10, 1}, {9, 1}, {8, 1}, {7, 1}, {6, 1}, {5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}},
Expand Down
2 changes: 1 addition & 1 deletion docs/feature_userspace.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
For boards that may not have a shift button (such as on a macro pad), we need a way to always include the bootloader option. To do that, add the following to the `rules.mk` in your userspace folder:
```make
```make
ifeq ($(strip $(FLASH_BOOTLOADER)), yes)
OPT_DEFS += -DFLASH_BOOTLOADER
endif
Expand Down
2 changes: 1 addition & 1 deletion docs/flashing_bootloadhid.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ For native Windows flashing, the `bootloadHID.exe` can be used outside of the MS

### Linux Manual Installation
1. Install libusb development dependency:
```bash
```
# This depends on OS - for Debian the following works
sudo apt-get install libusb-dev
```
Expand Down
10 changes: 5 additions & 5 deletions docs/getting_started_docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ The main prerequisite is a working `docker` or `podman` install.

Acquire a local copy of the QMK's repository (including submodules):

```bash
```
git clone --recurse-submodules https://github.com/qmk/qmk_firmware.git
cd qmk_firmware
```

Run the following command to build a keymap:
```bash
```
util/docker_build.sh <keyboard>:<keymap>
# For example: util/docker_build.sh planck/rev6:default
```
Expand All @@ -27,22 +27,22 @@ This will compile the desired keyboard/keymap and leave the resulting `.hex` or

There is also support for building _and_ flashing the keyboard straight from Docker by specifying the `target` as well:

```bash
```
util/docker_build.sh keyboard:keymap:target
# For example: util/docker_build.sh planck/rev6:default:flash
```

You can also start the script without any parameters, in which case it will ask you to input the build parameters one by one, which you may find easier to use:

```bash
```
util/docker_build.sh
# Reads parameters as input (leave blank for all keyboards/keymaps)
```

You can manually set which container runtime you want to use by setting the `RUNTIME` environment variable to it's name or path.
By default docker or podman are automatically detected and docker is preferred over podman.

```bash
```
RUNTIME="podman" util/docker_build.sh keyboard:keymap:target
```

Expand Down
Loading

0 comments on commit bf818a4

Please sign in to comment.