Skip to content

Commit

Permalink
Merge branch 'qmk:master' into zq-linux
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaqian12 authored Jun 22, 2022
2 parents bac332d + 701db27 commit 8d6efc6
Show file tree
Hide file tree
Showing 705 changed files with 22,592 additions and 3,843 deletions.
58 changes: 0 additions & 58 deletions .github/stale.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ jobs:
with:
fetch-depth: 0

- name: Install dependencies
run: pip3 install -r requirements-dev.txt

- uses: trilom/[email protected]
id: file_changes
with:
Expand Down
64 changes: 64 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: 'Close stale issues and PRs'
on:
schedule:
- cron: '30 1 * * *'
workflow_dispatch:

permissions:
issues: write
pull-requests: write

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v5
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

remove-stale-when-updated: true
exempt-draft-pr: true
ascending: true
operations-per-run: 150

stale-issue-label: stale
days-before-issue-stale: 90
days-before-issue-close: 30
exempt-issue-labels: bug,in progress,on hold,discussion,to do

stale-issue-message: >
This issue has been automatically marked as stale because it has not had activity in the
last 90 days. It will be closed in the next 30 days unless it is tagged properly or other activity
occurs.
For maintainers: Please label with `bug`, `in progress`, `on hold`, `discussion` or `to do` to prevent
the issue from being re-flagged.
close-issue-message: >
This issue has been automatically closed because it has not had activity in the last 30 days.
If this issue is still valid, re-open the issue and let us know.
// [stale-action-closed]
stale-pr-label: stale
days-before-pr-stale: 45
days-before-pr-close: 30
exempt-pr-labels: bug,awaiting review,breaking_change,in progress,on hold

stale-pr-message: >
Thank you for your contribution!
This pull request has been automatically marked as stale because it has not had
activity in the last 45 days. It will be closed in 30 days if no further activity occurs.
Please feel free to give a status update now, or re-open when it's ready.
For maintainers: Please label with `bug`, `awaiting review`, `breaking_change`, `in progress`, or `on hold`
to prevent the issue from being re-flagged.
close-pr-message: >
Thank you for your contribution!
This pull request has been automatically closed because it has not had activity in the last 30 days.
Please feel free to give a status update now, ping for review, or re-open when it's ready.
// [stale-action-closed]
2 changes: 1 addition & 1 deletion .github/workflows/unit_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
test:
runs-on: ubuntu-latest

container: qmkfm/base_container
container: qmkfm/qmk_cli

steps:
- uses: actions/checkout@v2
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,12 @@ CMakeLists.txt
.vscode/temp.sql
tags

# Ignore image files
# Ignore image/font files
*.gif
*.jpg
*.png
*.ttf
*.otf

# Things Travis sees
/.vs
Expand Down
10 changes: 9 additions & 1 deletion data/mappings/info_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
# to_json: Default `true`. Set to `false` to exclude this mapping from info.json
# to_c: Default `true`. Set to `false` to exclude this mapping from config.h
# warn_duplicate: Default `true`. Set to `false` to turn off warning when a value exists in both places
# deprecated: Default `false`. Set to `true` to turn on warning when a value exists
# invalid: Default `false`. Set to `true` to generate errors when a value exists
"AUDIO_VOICES": {"info_key": "audio.voices", "value_type": "bool"},
"BACKLIGHT_BREATHING": {"info_key": "backlight.breathing", "value_type": "bool"},
"BREATHING_PERIOD": {"info_key": "backlight.breathing_period", "value_type": "int"},
Expand All @@ -19,7 +21,6 @@
"DEVICE_VER": {"info_key": "usb.device_ver", "value_type": "hex"},
# TODO: Replace ^^^ with vvv
#"DEVICE_VER": {"info_key": "usb.device_version", "value_type": "bcd_version"},
"DESCRIPTION": {"info_key": "keyboard_folder", "value_type": "str", "to_json": false},
"DIODE_DIRECTION": {"info_key": "diode_direction"},
"DOUBLE_TAP_SHIFT_TURNS_ON_CAPS_WORD": {"info_key": "caps_word.double_tap_shift_turns_on", "value_type": "bool"},
"FORCE_NKRO": {"info_key": "usb.force_nkro", "value_type": "bool"},
Expand Down Expand Up @@ -102,4 +103,11 @@
"USB_MAX_POWER_CONSUMPTION": {"info_key": "usb.max_power", "value_type": "int"},
"USB_POLLING_INTERVAL_MS": {"info_key": "usb.polling_interval", "value_type": "int"},
"USB_SUSPEND_WAKEUP_DELAY": {"info_key": "usb.suspend_wakeup_delay", "value_type": "int"},

# Items we want flagged in lint
"NO_ACTION_MACRO": {"info_key": "_invalid.no_action_macro", "invalid": true},
"NO_ACTION_FUNCTION": {"info_key": "_invalid.no_action_function", "invalid": true},
"DESCRIPTION": {"info_key": "_invalid.usb_description", "invalid": true},
"DEBOUNCING_DELAY": {"info_key": "_invalid.debouncing_delay", "invalid": true},
"PREVENT_STUCK_MODIFIERS": {"info_key": "_invalid.prevent_stuck_mods", "invalid": true},
}
9 changes: 8 additions & 1 deletion data/mappings/info_rules.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
# to_json: Default `true`. Set to `false` to exclude this mapping from info.json
# to_c: Default `true`. Set to `false` to exclude this mapping from rules.mk
# warn_duplicate: Default `true`. Set to `false` to turn off warning when a value exists in both places
# deprecated: Default `false`. Set to `true` to turn on warning when a value exists
# invalid: Default `false`. Set to `true` to generate errors when a value exists
"BOARD": {"info_key": "board"},
"BOOTLOADER": {"info_key": "bootloader", "warn_duplicate": false},
"BLUETOOTH": {"info_key": "bluetooth.driver"},
Expand All @@ -24,5 +26,10 @@
"SECURE_ENABLE": {"info_key": "secure.enabled", "value_type": "bool"},
"SPLIT_KEYBOARD": {"info_key": "split.enabled", "value_type": "bool"},
"SPLIT_TRANSPORT": {"info_key": "split.transport.protocol", "to_c": false},
"WAIT_FOR_USB": {"info_key": "usb.wait_for", "value_type": "bool"}
"WAIT_FOR_USB": {"info_key": "usb.wait_for", "value_type": "bool"},

# Items we want flagged in lint
"CTPC": {"info_key": "_deprecated.ctpc", "deprecated": true},
"CONVERT_TO_PROTON_C": {"info_key": "_deprecated.ctpc", "deprecated": true},
"VIAL_ENABLE": {"info_key": "_invalid.vial", "invalid": true},
}
5 changes: 4 additions & 1 deletion data/schemas/keyboard.jsonschema
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,10 @@
"type": "object",
"additionalProperties": false,
"properties": {
"label": {"type": "string"},
"label": {
"type": "string",
"pattern": "^[^\\n]*$"
},
"matrix": {
"type": "array",
"minItems": 2,
Expand Down
2 changes: 2 additions & 0 deletions docs/compatible_microcontrollers.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

QMK runs on any USB-capable AVR or ARM microcontroller with enough flash space - generally 32kB+ for AVR, and 64kB+ for ARM. With significant disabling of features, QMK may *just* squeeze into 16kB AVR MCUs.

Features within QMK may or may not be compatible with every microcontroller.

## Atmel AVR

The following use [LUFA](https://www.fourwalledcubicle.com/LUFA.php) as the USB stack:
Expand Down
2 changes: 1 addition & 1 deletion docs/feature_advanced_keycodes.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ In practice, this means that you can check whether a given modifier is active wi

To check that *only* a specific set of mods is active at a time, AND the modifier state and your desired mod mask as explained above and compare the result to the mod mask itself: `get_mods() & <mod mask> == <mod mask>`.

For example, let's say you want to trigger a piece of custom code if one-shot left control and one-shot left shift are on but every other one-shot mods are off. To do so, you can compose the desired mod mask by combining the mod bits for left control and shift with `(MOD_BIT(KC_LCTL) | MOD_BIT(KC_LSFT))` and then plug it in: `get_oneshot_mods & (MOD_BIT(KC_LCTL) | MOD_BIT(KC_LSFT)) == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_LSFT))`. Using `MOD_MASK_CS` instead for the mod bitmask would have forced you to press four modifier keys (both versions of control and shift) to fulfill the condition.
For example, let's say you want to trigger a piece of custom code if one-shot left control and one-shot left shift are on but every other one-shot mods are off. To do so, you can compose the desired mod mask by combining the mod bits for left control and shift with `(MOD_BIT(KC_LCTL) | MOD_BIT(KC_LSFT))` and then plug it in: `get_oneshot_mods() & (MOD_BIT(KC_LCTL) | MOD_BIT(KC_LSFT)) == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_LSFT))`. Using `MOD_MASK_CS` instead for the mod bitmask would have forced you to press four modifier keys (both versions of control and shift) to fulfill the condition.

The full list of mod masks is as follows:

Expand Down
4 changes: 4 additions & 0 deletions docs/feature_midi.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ MIDI_ENABLE = yes

There are two MIDI systems in QMK: basic and advanced. With basic MIDI you will only be able to send Note On and Note Off messages using the note keycodes, meaning that keycodes like `MI_OCTU` and `MI_OCTD` will not work. Advanced MIDI allows you to do things like octave shifts, channel changes, velocity changes, modulation, and more.

### Caveats

MIDI requires 2 USB endpoints and as such may not work on some hardware such as V-USB controllers.

### Basic MIDI

To enable basic MIDI, add the following to your `config.h`:
Expand Down
2 changes: 2 additions & 0 deletions docs/feature_split_keyboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ For this, we will mostly be talking about the generic implementation used by the

!> ARM split supports most QMK subsystems when using the 'serial' and 'serial_usart' drivers. I2C slave is currently unsupported.

!> Both sides must use the same MCU family, for eg two Pro Micro-compatible controllers or two Blackpills. Currently, mixing AVR and ARM is not possible as ARM vs AVR uses different method for serial communication, and are not compatible. Moreover Blackpill's uses 3.3v logic, and atmega32u4 uses 5v logic.

## Compatibility Overview

| Transport | AVR | ARM |
Expand Down
2 changes: 1 addition & 1 deletion docs/flashing.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ Flashing sequence:
### `make` Targets

* `:dfu-util`: Waits until an STM32 bootloader device is available, and then flashes the firmware.
* `:dfu-util-split-left` and `:dfu-util-split-right`: Flashes the firmware as with `:avrdude`, but also sets the handedness setting in EEPROM. This is ideal for Proton-C-based split keyboards.
* `:dfu-util-split-left` and `:dfu-util-split-right`: Flashes the firmware as with `:dfu-util`, but also sets the handedness setting in EEPROM. This is ideal for Proton-C-based split keyboards.
* `:st-link-cli`: Allows you to flash the firmware via the ST-Link CLI utility, rather than dfu-util. Requires an ST-Link dongle.
* `:st-flash`: Allows you to flash the firmware via the `st-flash` utility from [STLink Tools](https://github.com/stlink-org/stlink), rather than dfu-util. Requires an ST-Link dongle.

Expand Down
2 changes: 1 addition & 1 deletion docs/how_keyboards_work.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ USB for a given key.

## 3. What the Event Input/Kernel Does

The *scancode* is mapped to a *keycode* dependent on the keyboard [60-keyboard.hwdb at Master](https://github.com/systemd/systemd/blob/master/hwdb.d/60-keyboard.hwdb). Without this mapping, the operating system will not receive a valid keycode and will be unable to do anything useful with that key press.
The *scancode* is mapped to a *keycode* dependent on the keyboard [60-keyboard.hwdb at Main](https://github.com/systemd/systemd/blob/main/hwdb.d/60-keyboard.hwdb). Without this mapping, the operating system will not receive a valid keycode and will be unable to do anything useful with that key press.

## 4. What the Operating System Does

Expand Down
2 changes: 0 additions & 2 deletions docs/other_vscode.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,8 @@ There are a number of extensions that you may want to install:
* [Git Extension Pack](https://marketplace.visualstudio.com/items?itemName=donjayamanne.git-extension-pack) -
This installs a bunch of Git related tools that may make using Git with QMK Firmware easier.
* [EditorConfig for VS Code](https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig) - _[Optional]_ - Helps to keep the code to the QMK Coding Conventions.
* [Bracket Pair Colorizer 2](https://marketplace.visualstudio.com/items?itemName=CoenraadS.bracket-pair-colorizer-2) - _[Optional]_ - This color codes the brackets in your code, to make it easier to reference nested code.
* [GitHub Markdown Preview](https://marketplace.visualstudio.com/items?itemName=bierner.github-markdown-preview) - _[Optional]_ - Makes the markdown preview in VS Code more like GitHub's.
* [VS Live Share Extension Pack](https://marketplace.visualstudio.com/items?itemName=MS-vsliveshare.vsliveshare-pack) - _[Optional]_ - This extension allows somebody else to access your workspace (or you to access somebody else's workspace) and help out. This is great if you're having issues and need some help from somebody.
* [VIM Keymap](https://marketplace.visualstudio.com/items?itemName=GiuseppeCesarano.vim-keymap) - _[Optional]_ - For those that prefer VIM style keybindings. There are other options for this, too.

Restart once you've installed any extensions

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

Direct pins are when you connect one side of the switch to GND and the other side to a GPIO pin on your MCU. No diode is required, but there is a 1:1 mapping between switches and pins.

When specifying direct pins you need to arrange them in nested arrays. The outer array consists of rows, while the inner array is a text string corresponding to a pin. You can use `null` to indicate an empty spot in the matrix.
When specifying direct pins you need to arrange them in nested arrays. The outer array consists of rows, while the inner array uses text strings to identify the pins used in each row. You can use `null` to indicate an empty spot in the matrix.

Example:

Expand Down
2 changes: 1 addition & 1 deletion docs/zh-cn/flashing.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ BOOTLOADER = stm32-dfu
### `make` 构建目标

* `:dfu-util`: 每5秒检测一次直到发现可用的STM32 bootloader设备,然后进行固件刷写。
* `:dfu-util-split-left``:dfu-util-split-right`: 同 `:avrdude` 一样会刷写固件,但额外地会设置手性设置到EEPROM中,对于基于Proton-C的分体式键盘这是理想的方法。
* `:dfu-util-split-left``:dfu-util-split-right`: 同 `:dfu-util` 一样会刷写固件,但额外地会设置手性设置到EEPROM中,对于基于Proton-C的分体式键盘这是理想的方法。
* `:st-link-cli`: 通过ST-Link CLI工具集而非dfu-util进行刷写,需要有ST-Link电子狗。
* `:st-flash`: 通过[STLink工具](https://github.com/stlink-org/stlink)内的 `st-flash` 工具而非dfu-util进行刷写,需要有ST-Link电子狗。

Expand Down
2 changes: 1 addition & 1 deletion drivers/led/aw20216.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ bool g_pwm_buffer_update_required[DRIVER_COUNT] = {false};
bool AW20216_write(pin_t cs_pin, uint8_t page, uint8_t reg, uint8_t* data, uint8_t len) {
static uint8_t s_spi_transfer_buffer[2] = {0};

if (!spi_start(cs_pin, false, 0, AW_SPI_DIVISOR)) {
if (!spi_start(cs_pin, false, 3, AW_SPI_DIVISOR)) {
spi_stop();
return false;
}
Expand Down
4 changes: 2 additions & 2 deletions keyboards/40percentclub/nano/keymaps/drashna/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
// clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = LAYOUT(
KC_VOLU, KC_MPLY, KC_MPRV, RESET,
KC_VOLD, KC_MUTE, KC_MNXT, RESET
KC_VOLU, KC_MPLY, KC_MPRV, QK_BOOT,
KC_VOLD, KC_MUTE, KC_MNXT, QK_BOOT
),

};
Expand Down
Loading

0 comments on commit 8d6efc6

Please sign in to comment.