[Docs] Clean up some code block languages (#14434)

master
Ryan 2021-09-14 22:16:24 +10:00 committed by GitHub
parent 0ca4a56a04
commit b56282756b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
25 changed files with 61 additions and 61 deletions

View File

@ -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: 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: //halconf.h:
#define HAL_USE_DAC TRUE #define HAL_USE_DAC TRUE
#define HAL_USE_GPT TRUE #define HAL_USE_GPT TRUE
#include_next <halconf.h> #include_next <halconf.h>
``` ```
``` c ```c
// mcuconf.h: // mcuconf.h:
#include_next <mcuconf.h> #include_next <mcuconf.h>
#undef STM32_DAC_USE_DAC1_CH1 #undef STM32_DAC_USE_DAC1_CH1
@ -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: Additionally, in the board config, you'll want to make changes to enable the DACs, GPT for Timer 6:
``` c ```c
//halconf.h: //halconf.h:
#define HAL_USE_DAC TRUE #define HAL_USE_DAC TRUE
#define HAL_USE_GPT TRUE #define HAL_USE_GPT TRUE
#include_next <halconf.h> #include_next <halconf.h>
``` ```
``` c ```c
// mcuconf.h: // mcuconf.h:
#include_next <mcuconf.h> #include_next <mcuconf.h>
#undef STM32_DAC_USE_DAC1_CH1 #undef STM32_DAC_USE_DAC1_CH1
@ -153,7 +153,7 @@ 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. 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: A configuration example for the STM32F103C8 would be:
``` c ```c
//halconf.h: //halconf.h:
#define HAL_USE_PWM TRUE #define HAL_USE_PWM TRUE
#define HAL_USE_PAL TRUE #define HAL_USE_PAL TRUE
@ -161,7 +161,7 @@ A configuration example for the STM32F103C8 would be:
#include_next <halconf.h> #include_next <halconf.h>
``` ```
``` c ```c
// mcuconf.h: // mcuconf.h:
#include_next <mcuconf.h> #include_next <mcuconf.h>
#undef STM32_PWM_USE_TIM1 #undef STM32_PWM_USE_TIM1
@ -177,7 +177,7 @@ If we now target pin A8, looking through the data-sheet of the STM32F103C8, for
- TIM1_CH4 = PA11 - TIM1_CH4 = PA11
with all this information, the configuration would contain these lines: with all this information, the configuration would contain these lines:
``` c ```c
//config.h: //config.h:
#define AUDIO_PIN A8 #define AUDIO_PIN A8
#define AUDIO_PWM_DRIVER PWMD1 #define AUDIO_PWM_DRIVER PWMD1

View File

@ -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. This will allow you to see all available subcommands.
**Note:** You will have to install additional requirements: **Note:** You will have to install additional requirements:
```bash ```
python3 -m pip install -r requirements-dev.txt python3 -m pip install -r requirements-dev.txt
``` ```

View File

@ -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: 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) f14629ed1cd7c7ec9089604d64f29a99981558e8 Remove/migrate action_get_macro()s from default keymaps (#5625)
``` ```
@ -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`: 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) user ~/qmk_firmware (master)
$ git log -1 --pretty=oneline master -- keyboards/hineybush/h87a/keymaps/default/keymap.c $ git log -1 --pretty=oneline master -- keyboards/hineybush/h87a/keymaps/default/keymap.c
ef8878fba5d3786e3f9c66436da63a560cd36ac9 Hineybush h87a lock indicators (#8237) ef8878fba5d3786e3f9c66436da63a560cd36ac9 Hineybush h87a lock indicators (#8237)

View File

@ -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`. 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: Add a new file to your keyboard directory:
```text ```
keyboards/<keyboard>/matrix.c keyboards/<keyboard>/matrix.c
``` ```

View File

@ -62,7 +62,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
``` ```
Example output Example output
```text ```
Waiting for device:....... Waiting for device:.......
Listening: Listening:
KL: kc: 169, col: 0, row: 0, pressed: 1 KL: kc: 169, col: 0, row: 0, pressed: 1
@ -82,7 +82,7 @@ When testing performance issues, it can be useful to know the frequency at which
``` ```
Example output Example output
```text ```
> matrix scan frequency: 315 > matrix scan frequency: 315
> matrix scan frequency: 313 > matrix scan frequency: 313
> matrix scan frequency: 316 > matrix scan frequency: 316

View File

@ -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: 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 BACKLIGHT_ENABLE = yes
``` ```
@ -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: To select which driver to use, configure your `rules.mk` with the following:
```makefile ```make
BACKLIGHT_DRIVER = software BACKLIGHT_DRIVER = software
``` ```
@ -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: The `pwm` driver is configured by default, however the equivalent setting within `rules.mk` would be:
```makefile ```make
BACKLIGHT_DRIVER = pwm BACKLIGHT_DRIVER = pwm
``` ```
@ -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: 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 BACKLIGHT_DRIVER = pwm
``` ```
@ -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`: 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 BACKLIGHT_DRIVER = software
``` ```
@ -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`: 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 BACKLIGHT_DRIVER = custom
``` ```

View File

@ -30,7 +30,7 @@ The currently supported Bluetooth chipsets do not support [N-Key Rollover (NKRO)
Add the following to your `rules.mk`: Add the following to your `rules.mk`:
```makefile ```make
BLUETOOTH_ENABLE = yes BLUETOOTH_ENABLE = yes
BLUETOOTH_DRIVER = AdafruitBLE # or RN42 BLUETOOTH_DRIVER = AdafruitBLE # or RN42
``` ```

View File

@ -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: To enable the digitizer interface, add the following line to your rules.mk:
```makefile ```make
DIGITIZER_ENABLE = yes DIGITIZER_ENABLE = yes
``` ```

View File

@ -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`: To use analog input you must first enable it in `rules.mk`:
```makefile ```make
JOYSTICK_ENABLE = yes JOYSTICK_ENABLE = yes
JOYSTICK_DRIVER = analog # or 'digital' JOYSTICK_DRIVER = analog # or 'digital'
``` ```

View File

@ -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: 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 # 60_ansi
LAYOUT_60_ansi LAYOUT_60_ansi

View File

@ -4,7 +4,7 @@
First, enable MIDI by adding the following to your `rules.mk`: First, enable MIDI by adding the following to your `rules.mk`:
```makefile ```make
MIDI_ENABLE = yes MIDI_ENABLE = yes
``` ```

View File

@ -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: To enable Pointing Device, uncomment the following line in your rules.mk:
```makefile ```make
POINTING_DEVICE_ENABLE = yes POINTING_DEVICE_ENABLE = yes
``` ```

View File

@ -30,7 +30,7 @@ Note: This is not recommended, you may encounter jerky movement or unsent inputs
In rules.mk: In rules.mk:
```makefile ```make
PS2_MOUSE_ENABLE = yes PS2_MOUSE_ENABLE = yes
PS2_USE_BUSYWAIT = yes PS2_USE_BUSYWAIT = yes
``` ```
@ -56,7 +56,7 @@ The following example uses D2 for clock and D5 for data. You can use any INT or
In rules.mk: In rules.mk:
```makefile ```make
PS2_MOUSE_ENABLE = yes PS2_MOUSE_ENABLE = yes
PS2_USE_INT = yes PS2_USE_INT = yes
``` ```
@ -118,7 +118,7 @@ To use USART on the ATMega32u4, you have to use PD5 for clock and PD2 for data.
In rules.mk: In rules.mk:
```makefile ```make
PS2_MOUSE_ENABLE = yes PS2_MOUSE_ENABLE = yes
PS2_USE_USART = yes PS2_USE_USART = yes
``` ```

View File

@ -15,7 +15,7 @@ RAW_ENABLE = yes
In your `keymap.c` include `"raw_hid.h"` and implement the following: In your `keymap.c` include `"raw_hid.h"` and implement the following:
```C ```c
void raw_hid_receive(uint8_t *data, uint8_t length) { void raw_hid_receive(uint8_t *data, uint8_t length) {
// Your code goes here. data is the packet received from host. // Your code goes here. data is the packet received from host.
} }
@ -23,7 +23,7 @@ void raw_hid_receive(uint8_t *data, uint8_t length) {
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. 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) { void raw_hid_receive(uint8_t *data, uint8_t length) {
raw_hid_send(data, length); raw_hid_send(data, length);
} }

View File

@ -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`: 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_ENABLE = yes
RGB_MATRIX_DRIVER = IS31FL3731 RGB_MATRIX_DRIVER = IS31FL3731
``` ```
@ -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`: 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_ENABLE = yes
RGB_MATRIX_DRIVER = IS31FL3733 RGB_MATRIX_DRIVER = IS31FL3733
``` ```
@ -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`: 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_ENABLE = yes
RGB_MATRIX_DRIVER = IS31FL3737 RGB_MATRIX_DRIVER = IS31FL3737
``` ```
@ -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`: 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_ENABLE = yes
RGB_MATRIX_DRIVER = WS2812 RGB_MATRIX_DRIVER = WS2812
``` ```
@ -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`: 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_ENABLE = yes
RGB_MATRIX_DRIVER = APA102 RGB_MATRIX_DRIVER = APA102
``` ```
@ -246,7 +246,7 @@ Configure the hardware via your `config.h`:
### AW20216 :id=aw20216 ### 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`: 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_ENABLE = yes
RGB_MATRIX_DRIVER = AW20216 RGB_MATRIX_DRIVER = AW20216
``` ```

View File

@ -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. 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 STENO_ENABLE = yes
MOUSEKEY_ENABLE = no MOUSEKEY_ENABLE = no
``` ```

View File

@ -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: 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] = { 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, 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}}, {{11, 1}, {10, 1}, {9, 1}, {8, 1}, {7, 1}, {6, 1}, {5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}},

View File

@ -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: 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) ifeq ($(strip $(FLASH_BOOTLOADER)), yes)
OPT_DEFS += -DFLASH_BOOTLOADER OPT_DEFS += -DFLASH_BOOTLOADER
endif endif

View File

@ -44,7 +44,7 @@ For native Windows flashing, the `bootloadHID.exe` can be used outside of the MS
### Linux Manual Installation ### Linux Manual Installation
1. Install libusb development dependency: 1. Install libusb development dependency:
```bash ```
# This depends on OS - for Debian the following works # This depends on OS - for Debian the following works
sudo apt-get install libusb-dev sudo apt-get install libusb-dev
``` ```

View File

@ -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): Acquire a local copy of the QMK's repository (including submodules):
```bash ```
git clone --recurse-submodules https://github.com/qmk/qmk_firmware.git git clone --recurse-submodules https://github.com/qmk/qmk_firmware.git
cd qmk_firmware cd qmk_firmware
``` ```
Run the following command to build a keymap: Run the following command to build a keymap:
```bash ```
util/docker_build.sh <keyboard>:<keymap> util/docker_build.sh <keyboard>:<keymap>
# For example: util/docker_build.sh planck/rev6:default # For example: util/docker_build.sh planck/rev6:default
``` ```
@ -27,14 +27,14 @@ 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: 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 util/docker_build.sh keyboard:keymap:target
# For example: util/docker_build.sh planck/rev6:default:flash # 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: 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 util/docker_build.sh
# Reads parameters as input (leave blank for all keyboards/keymaps) # Reads parameters as input (leave blank for all keyboards/keymaps)
``` ```
@ -42,7 +42,7 @@ util/docker_build.sh
You can manually set which container runtime you want to use by setting the `RUNTIME` environment variable to it's name or path. 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. By default docker or podman are automatically detected and docker is preferred over podman.
```bash ```
RUNTIME="podman" util/docker_build.sh keyboard:keymap:target RUNTIME="podman" util/docker_build.sh keyboard:keymap:target
``` ```

View File

@ -31,26 +31,26 @@ The development environment is configured to run the QMK Docker image, `qmkfm/qm
### Why am I seeing issues under Virtualbox? ### Why am I seeing issues under Virtualbox?
Certain versions of Virtualbox 5 appear to have an incompatibility with the Virtualbox extensions installed in the boxes in this Vagrantfile. If you encounter any issues with the /vagrant mount not succeeding, please upgrade your version of Virtualbox to at least 5.0.12. **Alternately, you can try running the following command:** Certain versions of Virtualbox 5 appear to have an incompatibility with the Virtualbox extensions installed in the boxes in this Vagrantfile. If you encounter any issues with the /vagrant mount not succeeding, please upgrade your version of Virtualbox to at least 5.0.12. **Alternately, you can try running the following command:**
```console ```
vagrant plugin install vagrant-vbguest vagrant plugin install vagrant-vbguest
``` ```
### How do I remove an existing environment? ### How do I remove an existing environment?
Finished with your environment? From anywhere inside the folder where you checked out this project, Execute: Finished with your environment? From anywhere inside the folder where you checked out this project, Execute:
```console ```
vagrant destroy vagrant destroy
``` ```
### What if I want to use Docker directly? ### What if I want to use Docker directly?
Want to benefit from the Vagrant workflow without a virtual machine? The Vagrantfile is configured to bypass running a virtual machine, and run the container directly. Execute the following when bringing up the environment to force the use of Docker: Want to benefit from the Vagrant workflow without a virtual machine? The Vagrantfile is configured to bypass running a virtual machine, and run the container directly. Execute the following when bringing up the environment to force the use of Docker:
```console ```
vagrant up --provider=docker vagrant up --provider=docker
``` ```
### How do I access the virtual machine instead of the Docker container? ### How do I access the virtual machine instead of the Docker container?
Execute the following to bypass the `vagrant` user booting directly to the official qmk builder image: Execute the following to bypass the `vagrant` user booting directly to the official qmk builder image:
```console ```
vagrant ssh -c 'sudo -i' vagrant ssh -c 'sudo -i'
``` ```

View File

@ -156,12 +156,12 @@ Many of the settings written in the `rules.mk` file are interpreted by `common_f
The `post_rules.mk` file can interpret `features` of a keyboard-level before `common_features.mk`. For example, when your designed keyboard has the option to implement backlighting or underglow using rgblight.c, writing the following in the `post_rules.mk` makes it easier for the user to configure the `rules.mk`. The `post_rules.mk` file can interpret `features` of a keyboard-level before `common_features.mk`. For example, when your designed keyboard has the option to implement backlighting or underglow using rgblight.c, writing the following in the `post_rules.mk` makes it easier for the user to configure the `rules.mk`.
* `keyboards/top_folder/keymaps/a_keymap/rules.mk` * `keyboards/top_folder/keymaps/a_keymap/rules.mk`
```makefile ```make
# Please set the following according to the selection of the hardware implementation option. # Please set the following according to the selection of the hardware implementation option.
RGBLED_OPTION_TYPE = backlight ## none, backlight or underglow RGBLED_OPTION_TYPE = backlight ## none, backlight or underglow
``` ```
* `keyboards/top_folder/post_rules.mk` * `keyboards/top_folder/post_rules.mk`
```makefile ```make
ifeq ($(filter $(strip $(RGBLED_OPTION_TYPE))x, nonex backlightx underglowx x),) ifeq ($(filter $(strip $(RGBLED_OPTION_TYPE))x, nonex backlightx underglowx x),)
$(error unknown RGBLED_OPTION_TYPE value "$(RGBLED_OPTION_TYPE)") $(error unknown RGBLED_OPTION_TYPE value "$(RGBLED_OPTION_TYPE)")
endif endif

View File

@ -9,7 +9,7 @@ firmware directly.
Whenever you type on 1 particular key, here is the chain of actions taking Whenever you type on 1 particular key, here is the chain of actions taking
place: place:
``` text ```
+------+ +-----+ +----------+ +----------+ +----+ +------+ +-----+ +----------+ +----------+ +----+
| User |-------->| Key |------>| Firmware |----->| USB wire |---->| OS | | User |-------->| Key |------>| Firmware |----->| USB wire |---->| OS |
+------+ +-----+ +----------+ +----------+ +----+ +------+ +-----+ +----------+ +----------+ +----+

View File

@ -8,7 +8,7 @@ Suppose you have committed to your `master` branch, and now need to update your
No one wants to lose work if it can be helped. If you want to save the changes you've already made to your `master` branch, the simplest way to do so is to simply create a duplicate of your "dirty" `master` branch: No one wants to lose work if it can be helped. If you want to save the changes you've already made to your `master` branch, the simplest way to do so is to simply create a duplicate of your "dirty" `master` branch:
```sh ```
git branch old_master master git branch old_master master
``` ```
@ -18,7 +18,7 @@ Now you have a branch named `old_master` that is a duplicate of your `master` br
Now it's time to resynchronize your `master` branch. For this step, you'll want to have QMK's repository configured as a remote in Git. To check your configured remotes, run `git remote -v`, which should return something similar to: Now it's time to resynchronize your `master` branch. For this step, you'll want to have QMK's repository configured as a remote in Git. To check your configured remotes, run `git remote -v`, which should return something similar to:
```sh ```
QMKuser ~/qmk_firmware (master) QMKuser ~/qmk_firmware (master)
$ git remote -v $ git remote -v
origin https://github.com/<your_username>/qmk_firmware.git (fetch) origin https://github.com/<your_username>/qmk_firmware.git (fetch)
@ -29,7 +29,7 @@ upstream https://github.com/qmk/qmk_firmware.git (push)
If you only see one fork referenced: If you only see one fork referenced:
```sh ```
QMKuser ~/qmk_firmware (master) QMKuser ~/qmk_firmware (master)
$ git remote -v $ git remote -v
origin https://github.com/qmk/qmk_firmware.git (fetch) origin https://github.com/qmk/qmk_firmware.git (fetch)
@ -38,31 +38,31 @@ origin https://github.com/qmk/qmk_firmware.git (push)
add a new remote with: add a new remote with:
```sh ```
git remote add upstream https://github.com/qmk/qmk_firmware.git git remote add upstream https://github.com/qmk/qmk_firmware.git
``` ```
Then, redirect the `origin` remote to your own fork with: Then, redirect the `origin` remote to your own fork with:
```sh ```
git remote set-url origin https://github.com/<your_username>/qmk_firmware.git git remote set-url origin https://github.com/<your_username>/qmk_firmware.git
``` ```
Now that you have both remotes configured, you need to update the references for the upstream repository, which is QMK's, by running: Now that you have both remotes configured, you need to update the references for the upstream repository, which is QMK's, by running:
```sh ```
git fetch upstream git fetch upstream
``` ```
At this point, resynchronize your branch to QMK's by running: At this point, resynchronize your branch to QMK's by running:
```sh ```
git reset --hard upstream/master git reset --hard upstream/master
``` ```
These steps will update the repository on your computer, but your GitHub fork will still be out of sync. To resynchronize your fork on GitHub, you need to push to your fork, instructing Git to override any remote changes that are not reflected in your local repository. To do this, run: These steps will update the repository on your computer, but your GitHub fork will still be out of sync. To resynchronize your fork on GitHub, you need to push to your fork, instructing Git to override any remote changes that are not reflected in your local repository. To do this, run:
```sh ```
git push --force-with-lease git push --force-with-lease
``` ```

View File

@ -44,7 +44,7 @@ If there are problems with the tests, you can find the executable in the `./buil
To forward any [debug messages](unit_testing.md#debug-api) to `stderr`, the tests can run with `DEBUG=1`. For example To forward any [debug messages](unit_testing.md#debug-api) to `stderr`, the tests can run with `DEBUG=1`. For example
```console ```
make test:all DEBUG=1 make test:all DEBUG=1
``` ```