Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e8e19ed234 |
||
|
|
3eb8d3bea3 | ||
|
|
f4068dbfb0 |
||
|
|
08405df150 |
||
|
|
3c751f217a | ||
|
|
9f1a7380ab |
||
|
|
7dca4e8bda |
||
|
|
0aae222ab6 |
||
|
|
475cbd24cf | ||
|
|
81a3249e2c | ||
|
|
0550830909 |
||
|
|
8f86f9794e | ||
|
|
e7d861aea7 | ||
|
|
02cf2b56fd |
||
|
|
5d26dcefa0 | ||
|
|
c7ed9038d7 |
||
|
|
7a69c714b4 | ||
|
|
074c49ee1c | ||
|
|
466e0856f5 |
||
|
|
60cf3c22f7 | ||
|
|
05355bc49d |
||
|
|
74ac4120db | ||
|
|
9a77ad69e6 | ||
|
|
187119ed7f | ||
|
|
fecfc0f7da |
||
|
|
36fd2437b0 |
||
|
|
bbd6e8ab34 |
||
|
|
24bc4aef03 | ||
|
|
532fb2f960 | ||
|
|
6f93a86e6e |
||
|
|
0a4c1caf20 |
||
|
|
883465d9fb |
||
|
|
115bf771a8 |
||
|
|
a4b112b1ef |
||
|
|
d1b0397d2f | ||
|
|
46231df62d |
||
|
|
b6310b5a15 |
||
|
|
d34cade5ab |
||
|
|
cf58a8733d |
||
|
|
3320e98ccf |
||
|
|
319da7bfdb |
||
|
|
4a4e4aa083 |
||
|
|
74b0f054c1 |
||
|
|
6eee1940e8 | ||
|
|
626cf94653 | ||
|
|
494a691f4c | ||
|
|
f8d677af88 |
||
|
|
461a1afe57 | ||
|
|
d4fb67fd5b | ||
|
|
3cd8dd6b25 | ||
|
|
a4d10e9f64 |
||
|
|
286947b6fa |
||
|
|
f12902eb16 |
||
|
|
0351b598f9 | ||
|
|
c113250c4e | ||
|
|
633479ced5 |
||
|
|
a91de72246 |
||
|
|
50edd425f7 | ||
|
|
514175848e | ||
|
|
7caef16edd | ||
|
|
ff8db0449e | ||
|
|
7772f47f04 | ||
|
|
ab61d9cb51 | ||
|
|
649bbdeaba | ||
|
|
eda39f4356 |
||
|
|
c3ba5de928 | ||
|
|
592ee1b57f | ||
|
|
db9b295aa7 |
||
|
|
3934a7f3c8 |
||
|
|
ed2de21603 |
||
|
|
04978d490a |
||
|
|
7186a63172 |
||
|
|
ff1900190c |
||
|
|
2818085d3f |
||
|
|
d17671cd23 |
||
|
|
8f22831f01 |
||
|
|
6c96bb5a5a |
||
|
|
177ff71d0c |
||
|
|
c1b428bb4e |
||
|
|
0828fc4b6f |
||
|
|
1e8de37aa0 |
||
|
|
9cd3080e22 |
||
|
|
ceefde5ec8 |
||
|
|
3a29cdbd7d |
||
|
|
2d5cb23503 |
||
|
|
6aa85699a5 |
||
|
|
330d195f9a |
||
|
|
4b1b83f42f |
||
|
|
f749dedb0d | ||
|
|
e01313e7d0 | ||
|
|
4bd5c033c3 |
||
|
|
5830b1b5e3 | ||
|
|
bcc546aa3f |
||
|
|
19527e8399 |
||
|
|
d8ce8cd204 |
||
|
|
248d7c1d6d |
||
|
|
9455c6adec |
||
|
|
6619ea4441 |
2
.github/workflows/ci_build_major_branch.yml
vendored
|
|
@ -87,7 +87,7 @@ jobs:
|
|||
fetch-depth: 0
|
||||
|
||||
- name: Download firmwares
|
||||
uses: actions/download-artifact@v6
|
||||
uses: actions/download-artifact@v5
|
||||
with:
|
||||
pattern: firmware-*
|
||||
path: .
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ jobs:
|
|||
echo "targets=$(jq -c 'keys' targets.json)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Upload targets json
|
||||
uses: actions/upload-artifact@v5
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: targets-${{ inputs.keymap }}
|
||||
path: targets.json
|
||||
|
|
@ -92,7 +92,7 @@ jobs:
|
|||
uses: actions/checkout@v5
|
||||
|
||||
- name: Get target definitions
|
||||
uses: actions/download-artifact@v6
|
||||
uses: actions/download-artifact@v5
|
||||
with:
|
||||
name: targets-${{ inputs.keymap }}
|
||||
path: .
|
||||
|
|
@ -112,7 +112,7 @@ jobs:
|
|||
qmk mass-compile -t -j $NCPUS -e DUMP_CI_METADATA=yes $(jq -r '.["${{ matrix.target }}"].targets' targets.json) || touch .failed
|
||||
|
||||
- name: Upload binaries
|
||||
uses: actions/upload-artifact@v5
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: firmware-${{ inputs.keymap }}-${{ matrix.target }}
|
||||
if-no-files-found: ignore
|
||||
|
|
@ -139,14 +139,14 @@ jobs:
|
|||
uses: actions/checkout@v5
|
||||
|
||||
- name: Download firmwares
|
||||
uses: actions/download-artifact@v6
|
||||
uses: actions/download-artifact@v5
|
||||
with:
|
||||
pattern: firmware-${{ inputs.keymap }}-*
|
||||
path: .
|
||||
merge-multiple: true
|
||||
|
||||
- name: Upload all firmwares
|
||||
uses: actions/upload-artifact@v5
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: firmware-${{ inputs.keymap }}
|
||||
if-no-files-found: ignore
|
||||
|
|
|
|||
2
.github/workflows/docs.yml
vendored
|
|
@ -56,7 +56,7 @@ jobs:
|
|||
|
||||
- name: Deploy
|
||||
if: ${{ github.event_name == 'push' && github.repository == 'qmk/qmk_firmware' }}
|
||||
uses: JamesIves/github-pages-deploy-action@v4.7.4
|
||||
uses: JamesIves/github-pages-deploy-action@v4.7.3
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
branch: gh-pages
|
||||
|
|
|
|||
5
.gitignore
vendored
|
|
@ -95,11 +95,6 @@ tags
|
|||
*.mpeg
|
||||
*.ttf
|
||||
*.otf
|
||||
# Un-ignore limited image file formats in docs
|
||||
!docs/public/**.gif
|
||||
!docs/public/**.jpg
|
||||
!docs/public/**.jpeg
|
||||
!docs/public/**.png
|
||||
|
||||
# Things Travis sees
|
||||
/.vs
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"license": "GPL-2.0-or-later",
|
||||
"devDependencies": {
|
||||
"vite": "^5.4.21",
|
||||
"vite": "^5.4.20",
|
||||
"vitepress": "^1.1.0",
|
||||
"vitepress-plugin-tabs": "^0.5.0",
|
||||
"vue": "^3.4.24"
|
||||
|
|
|
|||
|
|
@ -766,10 +766,10 @@ tabbable@^6.2.0:
|
|||
resolved "https://registry.yarnpkg.com/tabbable/-/tabbable-6.2.0.tgz#732fb62bc0175cfcec257330be187dcfba1f3b97"
|
||||
integrity sha512-Cat63mxsVJlzYvN51JmVXIgNoUokrIaT2zLclCXjRd8boZ0004U4KCs/sToJ75C6sdlByWxpYnb5Boif1VSFew==
|
||||
|
||||
vite@^5.2.9, vite@^5.4.21:
|
||||
version "5.4.21"
|
||||
resolved "https://registry.yarnpkg.com/vite/-/vite-5.4.21.tgz#84a4f7c5d860b071676d39ba513c0d598fdc7027"
|
||||
integrity sha512-o5a9xKjbtuhY6Bi5S3+HvbRERmouabWbyUcpXXUA1u+GNUKoROi9byOJ8M0nHbHYHkYICiMlqxkg1KkYmm25Sw==
|
||||
vite@^5.2.9, vite@^5.4.20:
|
||||
version "5.4.20"
|
||||
resolved "https://registry.yarnpkg.com/vite/-/vite-5.4.20.tgz#3267a5e03f21212f44edfd72758138e8fcecd76a"
|
||||
integrity sha512-j3lYzGC3P+B5Yfy/pfKNgVEg4+UtcIJcVRt2cDjIOmhLourAqPqf8P7acgxeiSgUB7E3p2P8/3gNIgDLpwzs4g==
|
||||
dependencies:
|
||||
esbuild "^0.21.3"
|
||||
postcss "^8.4.43"
|
||||
|
|
|
|||
0
data/constants/keycodes/keycodes_0.0.8.hjson
Normal file
37
data/constants/keycodes/keycodes_0.0.8_lighting.hjson
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
"keycodes": {
|
||||
"0x7819": {
|
||||
"group": "led_matrix",
|
||||
"key": "QK_LED_MATRIX_FLAG_NEXT",
|
||||
"label": "LED Matrix Flag Next",
|
||||
"aliases": [
|
||||
"LM_FLGN"
|
||||
]
|
||||
},
|
||||
"0x781A": {
|
||||
"group": "led_matrix",
|
||||
"key": "QK_LED_MATRIX_FLAG_PREVIOUS",
|
||||
"label": "LED Matrix Flag Previous",
|
||||
"aliases": [
|
||||
"LM_FLGP"
|
||||
]
|
||||
},
|
||||
|
||||
"0x784D": {
|
||||
"group": "rgb_matrix",
|
||||
"key": "QK_RGB_MATRIX_FLAG_NEXT",
|
||||
"label": "RGB Matrix Flag Next",
|
||||
"aliases": [
|
||||
"RM_FLGN"
|
||||
]
|
||||
},
|
||||
"0x784E": {
|
||||
"group": "rgb_matrix",
|
||||
"key": "QK_RGB_MATRIX_FLAG_PREVIOUS",
|
||||
"label": "RGB Matrix Flag Previous",
|
||||
"aliases": [
|
||||
"RM_FLGP"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -98,6 +98,7 @@
|
|||
|
||||
// LED Matrix
|
||||
"LED_MATRIX_CENTER": {"info_key": "led_matrix.center_point", "value_type": "array.int"},
|
||||
"LED_MATRIX_FLAG_STEPS": {"info_key": "led_matrix.flag_steps", "value_type": "array.int"},
|
||||
"LED_MATRIX_KEYRELEASES": {"info_key": "led_matrix.react_on_keyup", "value_type": "flag"},
|
||||
"LED_MATRIX_LED_FLUSH_LIMIT": {"info_key": "led_matrix.led_flush_limit", "value_type": "int"},
|
||||
"LED_MATRIX_LED_PROCESS_LIMIT": {"info_key": "led_matrix.led_process_limit", "value_type": "int", "to_json": false},
|
||||
|
|
@ -111,6 +112,7 @@
|
|||
"LED_MATRIX_DEFAULT_ON": {"info_key": "led_matrix.default.on", "value_type": "bool"},
|
||||
"LED_MATRIX_DEFAULT_VAL": {"info_key": "led_matrix.default.val", "value_type": "int"},
|
||||
"LED_MATRIX_DEFAULT_SPD": {"info_key": "led_matrix.default.speed", "value_type": "int"},
|
||||
"LED_MATRIX_DEFAULT_FLAGS": {"info_key": "led_matrix.default.flags", "value_type": "int"},
|
||||
|
||||
// Locking Switch
|
||||
"LOCKING_SUPPORT_ENABLE": {"info_key": "qmk.locking.enabled", "value_type": "flag"},
|
||||
|
|
@ -147,6 +149,7 @@
|
|||
|
||||
// RGB Matrix
|
||||
"RGB_MATRIX_CENTER": {"info_key": "rgb_matrix.center_point", "value_type": "array.int"},
|
||||
"RGB_MATRIX_FLAG_STEPS": {"info_key": "rgb_matrix.flag_steps", "value_type": "array.int"},
|
||||
"RGB_MATRIX_HUE_STEP": {"info_key": "rgb_matrix.hue_steps", "value_type": "int"},
|
||||
"RGB_MATRIX_KEYRELEASES": {"info_key": "rgb_matrix.react_on_keyup", "value_type": "flag"},
|
||||
"RGB_MATRIX_LED_FLUSH_LIMIT": {"info_key": "rgb_matrix.led_flush_limit", "value_type": "int"},
|
||||
|
|
@ -164,6 +167,7 @@
|
|||
"RGB_MATRIX_DEFAULT_SAT": {"info_key": "rgb_matrix.default.sat", "value_type": "int"},
|
||||
"RGB_MATRIX_DEFAULT_VAL": {"info_key": "rgb_matrix.default.val", "value_type": "int"},
|
||||
"RGB_MATRIX_DEFAULT_SPD": {"info_key": "rgb_matrix.default.speed", "value_type": "int"},
|
||||
"RGB_MATRIX_DEFAULT_FLAGS": {"info_key": "rgb_matrix.default.flags", "value_type": "int"},
|
||||
|
||||
// RGBLight
|
||||
"RGBLED_SPLIT": {"info_key": "rgblight.split_count", "value_type": "array.int"},
|
||||
|
|
|
|||
|
|
@ -23,7 +23,8 @@
|
|||
"animation": "solid",
|
||||
"on": true,
|
||||
"val": 255,
|
||||
"speed": 128
|
||||
"speed": 128,
|
||||
"flags": 255
|
||||
},
|
||||
"led_flush_limit": 16,
|
||||
"max_brightness": 255,
|
||||
|
|
@ -53,7 +54,8 @@
|
|||
"hue": 0,
|
||||
"sat": 255,
|
||||
"val": 255,
|
||||
"speed": 128
|
||||
"speed": 128,
|
||||
"flags": 255
|
||||
},
|
||||
"hue_steps": 8,
|
||||
"led_flush_limit": 16,
|
||||
|
|
|
|||
|
|
@ -1620,8 +1620,11 @@
|
|||
"0_sixty": {
|
||||
"target": "0_sixty/base"
|
||||
},
|
||||
"0xcb/splaytoraid": {
|
||||
"target": "0xcb/splaytoraid/rp2040_ce"
|
||||
"0xcb/splaytoraid/32u4": {
|
||||
"target": "0xcb/splaytoraid"
|
||||
},
|
||||
"0xcb/splaytoraid/rp2040_ce": {
|
||||
"target": "0xcb/splaytoraid"
|
||||
},
|
||||
"1upkeyboards/pi40": {
|
||||
"target": "1upkeyboards/pi40/mit_v1_0"
|
||||
|
|
@ -1632,12 +1635,24 @@
|
|||
"1upkeyboards/sweet16": {
|
||||
"target": "1upkeyboards/sweet16/v1"
|
||||
},
|
||||
"1upkeyboards/sweet16v2/kb2040": {
|
||||
"target": "1upkeyboards/sweet16v2"
|
||||
},
|
||||
"1upkeyboards/sweet16v2/pro_micro": {
|
||||
"target": "1upkeyboards/sweet16v2"
|
||||
},
|
||||
"25keys/aleth42": {
|
||||
"target": "25keys/aleth42/rev1"
|
||||
},
|
||||
"25keys/zinc": {
|
||||
"target": "25keys/zinc/rev1"
|
||||
},
|
||||
"40percentclub/gherkin/kb2040": {
|
||||
"target": "40percentclub/gherkin"
|
||||
},
|
||||
"40percentclub/gherkin/pro_micro": {
|
||||
"target": "40percentclub/gherkin"
|
||||
},
|
||||
"40percentclub/i75": {
|
||||
"target": "40percentclub/i75/promicro"
|
||||
},
|
||||
|
|
@ -1735,7 +1750,7 @@
|
|||
"target": "durgod/dgk6x/galaxy"
|
||||
},
|
||||
"durgod/venus": {
|
||||
"target": "durgod/dgk6x/venus"
|
||||
"target": "durgod/dgk6x/venus_ansi"
|
||||
},
|
||||
"dztech/tofu/ii": {
|
||||
"target": "dztech/tofu/ii/v1"
|
||||
|
|
|
|||
|
|
@ -543,7 +543,8 @@
|
|||
"on": {"type": "boolean"},
|
||||
"animation": {"type": "string"},
|
||||
"val": {"$ref": "./definitions.jsonschema#/unsigned_int_8"},
|
||||
"speed": {"$ref": "./definitions.jsonschema#/unsigned_int_8"}
|
||||
"speed": {"$ref": "./definitions.jsonschema#/unsigned_int_8"},
|
||||
"flags": {"$ref": "./definitions.jsonschema#/unsigned_int_8"}
|
||||
}
|
||||
},
|
||||
"driver": {
|
||||
|
|
@ -571,6 +572,11 @@
|
|||
"maxItems": 2,
|
||||
"items": {"$ref": "./definitions.jsonschema#/unsigned_int_8"}
|
||||
},
|
||||
"flag_steps": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"items": {"$ref": "./definitions.jsonschema#/unsigned_int_8"}
|
||||
},
|
||||
"max_brightness": {"$ref": "./definitions.jsonschema#/unsigned_int_8"},
|
||||
"timeout": {"$ref": "./definitions.jsonschema#/unsigned_int"},
|
||||
"val_steps": {"$ref": "./definitions.jsonschema#/unsigned_int"},
|
||||
|
|
@ -626,7 +632,8 @@
|
|||
"hue": {"$ref": "./definitions.jsonschema#/unsigned_int_8"},
|
||||
"sat": {"$ref": "./definitions.jsonschema#/unsigned_int_8"},
|
||||
"val": {"$ref": "./definitions.jsonschema#/unsigned_int_8"},
|
||||
"speed": {"$ref": "./definitions.jsonschema#/unsigned_int_8"}
|
||||
"speed": {"$ref": "./definitions.jsonschema#/unsigned_int_8"},
|
||||
"flags": {"$ref": "./definitions.jsonschema#/unsigned_int_8"}
|
||||
}
|
||||
},
|
||||
"driver": {
|
||||
|
|
@ -656,6 +663,11 @@
|
|||
"maxItems": 2,
|
||||
"items": {"$ref": "./definitions.jsonschema#/unsigned_int_8"}
|
||||
},
|
||||
"flag_steps": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"items": {"$ref": "./definitions.jsonschema#/unsigned_int_8"}
|
||||
},
|
||||
"max_brightness": {"$ref": "./definitions.jsonschema#/unsigned_int_8"},
|
||||
"timeout": {"$ref": "./definitions.jsonschema#/unsigned_int"},
|
||||
"hue_steps": {"$ref": "./definitions.jsonschema#/unsigned_int"},
|
||||
|
|
|
|||
|
|
@ -35,6 +35,17 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"dip_switches": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": ["on", "off"],
|
||||
"properties": {
|
||||
"on": {"type": "string"},
|
||||
"off": {"type": "string"}
|
||||
}
|
||||
}
|
||||
},
|
||||
"macros": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
|
|||
3
docs/ChangeLog/20251130/PR25515.md
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# Refactor debounce algorithm with static allocation [#25515](https://github.com/qmk/qmk_firmware/pull/25515)
|
||||
|
||||
Removed dynamic memory allocation (malloc, free) from all debounce implementations for improved efficiency on embedded systems and to avoid runtime allocation overhead. Refactored state arrays to use direct indexing, simplifying code and eliminating pointer arithmetic. Standardized usage of MATRIX_ROWS_PER_HAND throughout the codebase to ensure consistent support for split keyboards.
|
||||
|
|
@ -22,7 +22,7 @@ If Zadig lists one or more devices with the `HidUsb` driver, your keyboard is pr
|
|||
|
||||
If the arrow appears green, select the driver, and click **Install Driver**. See the [list of known bootloaders](#list-of-known-bootloaders) for the correct driver to install.
|
||||
|
||||

|
||||

|
||||
|
||||
Finally, unplug and replug the keyboard to make sure the new driver has been loaded. If you are using the QMK Toolbox to flash, exit and restart it too, as it can sometimes fail to recognize the driver change.
|
||||
|
||||
|
|
@ -30,15 +30,15 @@ Finally, unplug and replug the keyboard to make sure the new driver has been loa
|
|||
|
||||
If you find that you can no longer type with the keyboard, you may have accidentally replaced the driver for the keyboard itself instead of for the bootloader. This can happen when the keyboard is not in the bootloader mode. You can easily confirm this in Zadig - a healthy keyboard has the `HidUsb` driver installed on all of its interfaces:
|
||||
|
||||

|
||||

|
||||
|
||||
Open the Device Manager, select **View → Devices by container**, and look for an entry with your keyboard's name.
|
||||
|
||||

|
||||

|
||||
|
||||
Right-click each entry and hit **Uninstall device**. Make sure to tick **Delete the driver software for this device** first if it appears.
|
||||
|
||||

|
||||

|
||||
|
||||
Click **Action → Scan for hardware changes**. At this point, you should be able to type again. Double check in Zadig that the keyboard device(s) are using the `HidUsb` driver. If so, you're all done, and your board should be functional again! Otherwise, repeat this process until Zadig reports the correct driver.
|
||||
|
||||
|
|
@ -54,11 +54,11 @@ Open the Device Manager, select **View → Devices by container**, and look for
|
|||
|
||||
Find the `Inf name` value in the Details tab of the device properties. This should generally be something like `oemXX.inf`:
|
||||
|
||||

|
||||

|
||||
|
||||
Then, open a new Command Prompt window as an Administrator (type in `cmd` into the Start menu and press Ctrl+Shift+Enter). Run `pnputil /enum-drivers` to verify the `Inf name` matches the `Published Name` field of one of the entries:
|
||||
|
||||

|
||||

|
||||
|
||||
Run `pnputil /delete-driver oemXX.inf /uninstall`. This will delete the driver and remove it from any devices using it. Note that this will not uninstall the device itself.
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ As its name implies Direct Pin works by connecting one switch per pin. The other
|
|||
|
||||
Here is a schematic showing how we connect a single button to pin A3 on a ProMicro:
|
||||
|
||||

|
||||

|
||||
|
||||
Once you have wired your switches you can assign keycodes to each pin and build a firmware by selecting the MCU you are using from the Keyboard dropdown. Use this link to show only Easy Maker Direct Pin:
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ Keycodes are actually defined in [quantum/keycode.h](https://github.com/qmk/qmk_
|
|||
There are 3 standard keyboard layouts in use around the world- ANSI, ISO, and JIS. North America primarily uses ANSI, Europe and Africa primarily use ISO, and Japan uses JIS. Regions not mentioned typically use either ANSI or ISO. The keycodes corresponding to these layouts are shown here:
|
||||
|
||||
<!-- Source for this image: https://www.keyboard-layout-editor.com/#/gists/bf431647d1001cff5eff20ae55621e9a -->
|
||||

|
||||

|
||||
|
||||
## How Can I Make Custom Names For Complex Keycodes?
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ The feature maintains a small buffer of recent key presses. On each key press, i
|
|||
|
||||
The tricky part is how to efficiently check the buffer for typos. We don’t want to spend too much memory or time on storing or searching the typos. A good solution is to represent the typos with a trie data structure. A trie is a tree data structure where each node is a letter, and words are formed by following a path to one of the leaves.
|
||||
|
||||

|
||||

|
||||
|
||||
Since we search whether the buffer ends in a typo, we store the trie writing in reverse. The trie is queried starting from the last letter, then second to last letter, and so on, until either a letter doesn’t match or we reach a leaf, meaning a typo was found.
|
||||
|
||||
|
|
@ -279,7 +279,7 @@ All autocorrection data is stored in a single flat array autocorrect_data. Each
|
|||
* 01 ⇒ branching node: a trie node with multiple children.
|
||||
* 10 ⇒ leaf node: a leaf, corresponding to a typo and storing its correction.
|
||||
|
||||

|
||||

|
||||
|
||||
**Branching node**. Each branch is encoded with one byte for the keycode (KC_A–KC_Z) followed by a link to the child node. Links between nodes are 16-bit byte offsets relative to the beginning of the array, serialized in little endian order.
|
||||
|
||||
|
|
|
|||
|
|
@ -227,7 +227,7 @@ In this typical example, the backlight LEDs are all connected in parallel toward
|
|||
A pulldown resistor is also placed between the gate pin and ground to keep it at a defined state when it is not otherwise being driven by the MCU.
|
||||
The values of these resistors are not critical - see [this Electronics StackExchange question](https://electronics.stackexchange.com/q/68748) for more information.
|
||||
|
||||

|
||||

|
||||
|
||||
## API {#api}
|
||||
|
||||
|
|
|
|||
|
|
@ -35,12 +35,12 @@ layer.
|
|||
|
||||
Consider a keymap with the following base layer.
|
||||
|
||||

|
||||

|
||||
|
||||
The highlighted key is a momentary layer switch `MO(NAV)`. Holding it accesses a
|
||||
navigation layer.
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
Holding the NAV key is fine for brief use, but awkward to continue holding when
|
||||
|
|
|
|||
|
|
@ -88,6 +88,8 @@ As mentioned earlier, the center of the keyboard by default is expected to be `{
|
|||
|`QK_LED_MATRIX_BRIGHTNESS_DOWN`|`LM_BRID`|Decrease the brightness level |
|
||||
|`QK_LED_MATRIX_SPEED_UP` |`LM_SPDU`|Increase the animation speed |
|
||||
|`QK_LED_MATRIX_SPEED_DOWN` |`LM_SPDD`|Decrease the animation speed |
|
||||
|`QK_LED_MATRIX_FLAG_NEXT` |`LM_FLGN`|Cycle through flags |
|
||||
|`QK_LED_MATRIX_FLAG_PREVIOUS` |`LM_FLGP`|Cycle through flags in reverse |
|
||||
|
||||
## LED Matrix Effects {#led-matrix-effects}
|
||||
|
||||
|
|
@ -253,6 +255,7 @@ const char* effect_name = led_matrix_get_mode_name(led_matrix_get_mode());
|
|||
#define LED_MATRIX_DEFAULT_FLAGS LED_FLAG_ALL // Sets the default LED flags, if none has been set
|
||||
#define LED_MATRIX_SPLIT { X, Y } // (Optional) For split keyboards, the number of LEDs connected on each half. X = left, Y = Right.
|
||||
// If reactive effects are enabled, you also will want to enable SPLIT_TRANSPORT_MIRROR
|
||||
#define LED_MATRIX_FLAG_STEPS { LED_FLAG_ALL, LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER, LED_FLAG_NONE } // Sets the flags which can be cycled through.
|
||||
```
|
||||
|
||||
## EEPROM storage {#eeprom-storage}
|
||||
|
|
@ -505,6 +508,62 @@ The current effect speed, from 0 to 255.
|
|||
|
||||
---
|
||||
|
||||
### `void led_matrix_set_flags(led_flags_t flags)` {#api-led-matrix-set-flags}
|
||||
|
||||
Set the global effect flags.
|
||||
|
||||
#### Arguments {#api-led-matrix-set-flags-arguments}
|
||||
|
||||
- `led_flags_t flags`
|
||||
The [flags](#flags) value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void led_matrix_set_flags_noeeprom(led_flags_t flags)` {#api-led-matrix-set-flags-noeeprom}
|
||||
|
||||
Set the global effect flags. New state is not written to EEPROM.
|
||||
|
||||
#### Arguments {#api-led-matrix-set-flags-noeeprom-arguments}
|
||||
|
||||
- `led_flags_t flags`
|
||||
The [flags](#flags) value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void led_matrix_flags_step(void)` {#api-led-matrix-flags-step}
|
||||
|
||||
Move to the next flag combination.
|
||||
|
||||
---
|
||||
|
||||
### `void led_matrix_flags_step_noeeprom(void)` {#api-led-matrix-flags-step-noeeprom}
|
||||
|
||||
Move to the next flag combination. New state is not written to EEPROM.
|
||||
|
||||
---
|
||||
|
||||
### `void led_matrix_flags_step_reverse(void)` {#api-led-matrix-flags-step-reverse}
|
||||
|
||||
Move to the previous flag combination.
|
||||
|
||||
---
|
||||
|
||||
### `void led_matrix_flags_step_reverse_noeeprom(void)` {#api-led-matrix-flags-step-reverse-noeeprom}
|
||||
|
||||
Move to the previous flag combination. New state is not written to EEPROM.
|
||||
|
||||
---
|
||||
|
||||
### `uint8_t led_matrix_get_flags(void)` {#api-led-matrix-get-flags}
|
||||
|
||||
Get the current global effect flags.
|
||||
|
||||
#### Return Value {#api-led-matrix-get-flags-return}
|
||||
|
||||
The current effect [flags](#flags).
|
||||
|
||||
---
|
||||
|
||||
### `void led_matrix_reload_from_eeprom(void)` {#api-led-matrix-reload-from-eeprom}
|
||||
|
||||
Reload the effect configuration (enabled, mode and brightness) from EEPROM.
|
||||
|
|
|
|||
|
|
@ -96,6 +96,8 @@ As mentioned earlier, the center of the keyboard by default is expected to be `{
|
|||
|`QK_RGB_MATRIX_VALUE_DOWN` |`RM_VALD`|Decrease the brightness level |
|
||||
|`QK_RGB_MATRIX_SPEED_UP` |`RM_SPDU`|Increase the animation speed |
|
||||
|`QK_RGB_MATRIX_SPEED_DOWN` |`RM_SPDD`|Decrease the animation speed |
|
||||
|`QK_RGB_MATRIX_FLAG_NEXT` |`RM_FLGN`|Cycle through flags |
|
||||
|`QK_RGB_MATRIX_FLAG_PREVIOUS` |`RM_FLGP`|Cycle through flags in reverse |
|
||||
|
||||
## RGB Matrix Effects {#rgb-matrix-effects}
|
||||
|
||||
|
|
@ -409,6 +411,7 @@ const char* effect_name = rgb_matrix_get_mode_name(rgb_matrix_get_mode());
|
|||
#define RGB_MATRIX_SPLIT { X, Y } // (Optional) For split keyboards, the number of LEDs connected on each half. X = left, Y = Right.
|
||||
// If reactive effects are enabled, you also will want to enable SPLIT_TRANSPORT_MIRROR
|
||||
#define RGB_TRIGGER_ON_KEYDOWN // Triggers RGB keypress events on key down. This makes RGB control feel more responsive. This may cause RGB to not function properly on some boards
|
||||
#define RGB_MATRIX_FLAG_STEPS { LED_FLAG_ALL, LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER, LED_FLAG_UNDERGLOW, LED_FLAG_NONE } // Sets the flags which can be cycled through.
|
||||
```
|
||||
|
||||
## EEPROM storage {#eeprom-storage}
|
||||
|
|
@ -852,6 +855,62 @@ The current effect speed, from 0 to 255.
|
|||
|
||||
---
|
||||
|
||||
### `void rgb_matrix_set_flags(led_flags_t flags)` {#api-rgb-matrix-set-flags}
|
||||
|
||||
Set the global effect flags.
|
||||
|
||||
#### Arguments {#api-rgb-matrix-set-flags-arguments}
|
||||
|
||||
- `led_flags_t flags`
|
||||
The [flags](#flags) value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void rgb_matrix_set_flags_noeeprom(led_flags_t flags)` {#api-rgb-matrix-set-flags-noeeprom}
|
||||
|
||||
Set the global effect flags. New state is not written to EEPROM.
|
||||
|
||||
#### Arguments {#api-rgb-matrix-set-flags-noeeprom-arguments}
|
||||
|
||||
- `led_flags_t flags`
|
||||
The [flags](#flags) value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void rgb_matrix_flags_step(void)` {#api-rgb-matrix-flags-step}
|
||||
|
||||
Move to the next flag combination.
|
||||
|
||||
---
|
||||
|
||||
### `void rgb_matrix_flags_step_noeeprom(void)` {#api-rgb-matrix-flags-step-noeeprom}
|
||||
|
||||
Move to the next flag combination. New state is not written to EEPROM.
|
||||
|
||||
---
|
||||
|
||||
### `void rgb_matrix_flags_step_reverse(void)` {#api-rgb-matrix-flags-step-reverse}
|
||||
|
||||
Move to the previous flag combination.
|
||||
|
||||
---
|
||||
|
||||
### `void rgb_matrix_flags_step_reverse_noeeprom(void)` {#api-rgb-matrix-flags-step-reverse-noeeprom}
|
||||
|
||||
Move to the previous flag combination. New state is not written to EEPROM.
|
||||
|
||||
---
|
||||
|
||||
### `uint8_t rgb_matrix_get_flags(void)` {#api-rgb-matrix-get-flags}
|
||||
|
||||
Get the current global effect flags.
|
||||
|
||||
#### Return Value {#api-rgb-matrix-get-flags-return}
|
||||
|
||||
The current effect [flags](#flags).
|
||||
|
||||
---
|
||||
|
||||
### `void rgb_matrix_sethsv(uint8_t h, uint8_t s, uint8_t v)` {#api-rgb-matrix-sethsv}
|
||||
|
||||
Set the global effect hue, saturation, and value (brightness).
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ Changing the **Hue** cycles around the circle.<br>
|
|||
Changing the **Saturation** moves between the inner and outer sections of the wheel, affecting the intensity of the color.<br>
|
||||
Changing the **Value** sets the overall brightness.<br>
|
||||
|
||||

|
||||

|
||||
|
||||
## Keycodes
|
||||
|
||||
|
|
|
|||
|
|
@ -91,11 +91,11 @@ SPLIT_TRANSPORT = custom
|
|||
|
||||
Configuring your layout in a split keyboard works slightly differently to a non-split keyboard. Take for example the following layout. The top left numbers refer to the matrix row and column, and the bottom right are the order of the keys in the layout:
|
||||
|
||||

|
||||

|
||||
|
||||
Since the matrix scanning procedure operates on entire rows, it first populates the left half's rows, then the right half's. Thus, the matrix as QMK views it has double the rows instead of double the columns:
|
||||
|
||||

|
||||

|
||||
|
||||
### Setting Handedness
|
||||
|
||||
|
|
@ -497,7 +497,7 @@ Once you have done that, you will want to solder the diode from the 5V pad to th
|
|||
|
||||
You may need to use the 5V pad from the regulator block above as the pads were too small and placed too closely together to place the Schottky diode properly.
|
||||
|
||||

|
||||

|
||||
|
||||
## Additional Resources
|
||||
|
||||
|
|
|
|||
|
|
@ -8,15 +8,15 @@ This guide assumes you're somewhat comfortable with running things at the comman
|
|||
|
||||
Start on the [QMK GitHub page](https://github.com/qmk/qmk_firmware), and you'll see a button in the upper right that says "Fork":
|
||||
|
||||

|
||||

|
||||
|
||||
If you're a part of an organization, you'll need to choose which account to fork it to. In most circumstances, you'll want to fork it to your personal account. Once your fork is completed (sometimes this takes a little while), click the "Clone or Download" button:
|
||||
|
||||

|
||||

|
||||
|
||||
And be sure to select "HTTPS", and select the link and copy it:
|
||||
|
||||

|
||||

|
||||
|
||||
From here, enter `git clone --recurse-submodules ` into the command line, and then paste your link:
|
||||
|
||||
|
|
@ -57,10 +57,10 @@ To https://github.com/whoeveryouare/qmk_firmware.git
|
|||
|
||||
Your changes now exist on your fork on GitHub - if you go back there (`https://github.com/<whoeveryouare>/qmk_firmware`), you can create a "New Pull Request" by clicking this button:
|
||||
|
||||

|
||||

|
||||
|
||||
Here you'll be able to see exactly what you've committed - if it all looks good, you can finalize it by clicking "Create Pull Request":
|
||||
|
||||

|
||||

|
||||
|
||||
After submitting, we may talk to you about your changes, ask that you make changes, and eventually accept it! Thanks for contributing to QMK :)
|
||||
|
|
|
|||
|
|
@ -36,12 +36,12 @@ What you want to achieve is one leg from each switch being attached to the corre
|
|||
|
||||
It is fairly simple to plan for an ortholinear keyboard (like a Planck).
|
||||
|
||||

|
||||

|
||||
Image from [RoastPotatoes' "How to hand wire a Planck"](https://blog.roastpotatoes.co/guide/2015/11/04/how-to-handwire-a-planck/)
|
||||
|
||||
But the larger and more complicated your keyboard, the more complex the matrix. [Keyboard Firmware Builder](https://kbfirmware.com/) can help you plan your matrix layout (shown here with a basic fullsize ISO keyboard imported from [Keyboard Layout Editor](https://www.keyboard-layout-editor.com).
|
||||
|
||||

|
||||

|
||||
|
||||
Bear in mind that the number of rows plus the number of columns can not exceed the number of I/O pins on your controller. So the fullsize matrix shown above would be possible on a Proton C or Teensy++, but not on a regular Teensy or Pro Micro.
|
||||
|
||||
|
|
@ -51,14 +51,14 @@ Bear in mind that the number of rows plus the number of columns can not exceed t
|
|||
| :------------ |:-------------:| ------:| ------ |
|
||||
| Pro Micro* | ATmega32u4 | 20 | [link](https://learn.sparkfun.com/tutorials/pro-micro--fio-v3-hookup-guide/hardware-overview-pro-micro#Teensy++_2.0) |
|
||||
| Teensy 2.0 | ATmega32u4 | 25 | [link](https://www.pjrc.com/teensy/pinout.html) |
|
||||
| [QMK Proton C](https://qmk.fm/proton-c/) | STM32F303xC | 36 | [link 1](https://qmk.fm/proton-c-pinout.jpg), [2](https://deskthority.net/wiki/QMK_Proton_C) |
|
||||
| [QMK Proton C](https://qmk.fm/proton-c/) | STM32F303xC | 36 | [link 1](https://i.imgur.com/RhtrAlc.png), [2](https://deskthority.net/wiki/QMK_Proton_C) |
|
||||
| Teensy++ 2.0 | AT90USB1286 | 46 | [link](https://www.pjrc.com/teensy/pinout.html#Teensy_2.0) |
|
||||
|
||||
*Elite C is essentially the same as a Pro Micro with a USB-C instead of Micro-USB
|
||||
|
||||
There are also a number of boards designed specifically for handwiring that mount directly to a small number of switches and offer pinouts for the rest. Though these are generally more expensive and may be more difficult to get hold of.
|
||||
|
||||
<img src="/QiA3ta6.jpg" alt="Postage board mini mounted in place" width="500"/>
|
||||
<img src="https://i.imgur.com/QiA3ta6.jpg" alt="Postage board mini mounted in place" width="500"/>
|
||||
|
||||
| Board | Controller | # I/O |
|
||||
| :------------ |:-------------:| ------:|
|
||||
|
|
@ -74,13 +74,13 @@ Established materials and techniques include:
|
|||
|
||||
| Technique | Examples | Pros | Cons | Image
|
||||
| :-----------| :------- | :------ | :--- | :---
|
||||
| Lengths of wire with stripped segments | [Sasha Solomon's Dactyl](https://medium.com/@sachee/building-my-first-keyboard-and-you-can-too-512c0f8a4c5f) and [Cribbit's modern hand wire](https://geekhack.org/index.php?topic=87689.0) | Neat and tidy | Some effort in stripping the wire | 
|
||||
| Short lengths of wire | [u/xicolinguada's ortho build](https://www.reddit.com/r/MechanicalKeyboards/comments/c39k4f/my_first_hand_wired_keyboard_its_not_perfect_but/) | Easier to strip the wire | More difficult to place | 
|
||||
| Magnet/Enamelled wire | [fknraiden's custom board](https://geekhack.org/index.php?topic=74223.0) | Can be directly soldered onto (insulation burns off with heat) | Appearance? | 
|
||||
| Bending the legs of the diodes for the rows | [Matt3o's Brownfox](https://deskthority.net/viewtopic.php?f=7&t=6050) | Fewer solder joints required | Uninsulated | 
|
||||
| Using rigid wiring (e.g. brass tube) | [u/d_stilgar's invisible hardline](https://www.reddit.com/r/MechanicalKeyboards/comments/8aw5j2/invisible_hardline_keyboard_progress_update_april/) and [u/jonasfasler's first attempt](https://www.reddit.com/r/MechanicalKeyboards/comments/de1jyv/my_first_attempt_at_handwiring_a_keyboard/) | Very pretty | More difficult. No physical insulation | 
|
||||
| Bare wire with insulation added after (e.g. kapton tape) | [Matt3o's 65% on his website](https://matt3o.com/hand-wiring-a-custom-keyboard/) | Easier (no wire stripping required) | Not as attractive | 
|
||||
| Copper tape | [ManuForm Dactyl](https://github.com/tshort/dactyl-keyboard) | Very easy | Only really works when your plate/case aligns with the bottom of your switches | 
|
||||
| Lengths of wire with stripped segments | [Sasha Solomon's Dactyl](https://medium.com/@sachee/building-my-first-keyboard-and-you-can-too-512c0f8a4c5f) and [Cribbit's modern hand wire](https://geekhack.org/index.php?topic=87689.0) | Neat and tidy | Some effort in stripping the wire | 
|
||||
| Short lengths of wire | [u/xicolinguada's ortho build](https://www.reddit.com/r/MechanicalKeyboards/comments/c39k4f/my_first_hand_wired_keyboard_its_not_perfect_but/) | Easier to strip the wire | More difficult to place | 
|
||||
| Magnet/Enamelled wire | [fknraiden's custom board](https://geekhack.org/index.php?topic=74223.0) | Can be directly soldered onto (insulation burns off with heat) | Appearance? | 
|
||||
| Bending the legs of the diodes for the rows | [Matt3o's Brownfox](https://deskthority.net/viewtopic.php?f=7&t=6050) | Fewer solder joints required | Uninsulated | 
|
||||
| Using rigid wiring (e.g. brass tube) | [u/d_stilgar's invisible hardline](https://www.reddit.com/r/MechanicalKeyboards/comments/8aw5j2/invisible_hardline_keyboard_progress_update_april/) and [u/jonasfasler's first attempt](https://www.reddit.com/r/MechanicalKeyboards/comments/de1jyv/my_first_attempt_at_handwiring_a_keyboard/) | Very pretty | More difficult. No physical insulation | 
|
||||
| Bare wire with insulation added after (e.g. kapton tape) | [Matt3o's 65% on his website](https://matt3o.com/hand-wiring-a-custom-keyboard/) | Easier (no wire stripping required) | Not as attractive | 
|
||||
| Copper tape | [ManuForm Dactyl](https://github.com/tshort/dactyl-keyboard) | Very easy | Only really works when your plate/case aligns with the bottom of your switches | 
|
||||
|
||||
|
||||
Note that these methods can be combined. Prepare your lengths of wire before moving on to soldering.
|
||||
|
|
@ -97,11 +97,11 @@ There are a lot of soldering guides and tips available elsewhere but here are so
|
|||
|
||||
To ensure a strong solder joint you want a good amount of contact between the solder and the two pieces of metal you are connecting. A good way of doing this (though not required) is looping around pins or twisting wires together before applying solder.
|
||||
|
||||
<img src="/eHJjmnU.jpg" alt="Looped around rod" width="400"/>
|
||||
<img src="https://i.imgur.com/eHJjmnU.jpg" alt="Looped around rod" width="200"/> <img src="https://i.imgur.com/8nbxmmr.jpg?1" alt="Looped diode leg" width="200"/>
|
||||
|
||||
If your diodes are on a packaging strip and need a bend in them (either the start of a loop or for connecting to its neighbour) this can easily done by bending it over something straight like the edge of a box, table, or ruler. This also helps keep track of the direction of the diode as all the bends will be on the same side.
|
||||
|
||||
<img src="/oITudbX.jpg" alt="Bent diode legs" width="400"/>
|
||||
<img src="https://i.imgur.com/oITudbX.jpg" alt="Bent diode legs" width="200"/>
|
||||
|
||||
If your iron has temperature control, set it to 315ºC (600ºF).
|
||||
|
||||
|
|
@ -164,7 +164,7 @@ Cut wires to the length of the distance from the a point on each column/row to t
|
|||
|
||||
Ribbon cable can be used to keep this extra tidy. You may also want to consider routing the wires beneath the existing columns/rows.
|
||||
|
||||
<img src="/z2QlKfB.jpg" alt="Ribbon Cable" width="600"/>
|
||||
<img src="https://i.imgur.com/z2QlKfB.jpg" alt="Ribbon Cable" width="350"/>
|
||||
|
||||
As you solder the wires to the controller make a note of which row/column is going to which pin on the controller as we'll use this data to setup the matrix when we create the firmware.
|
||||
|
||||
|
|
|
|||
|
|
@ -220,14 +220,18 @@ This bootloader is primarily for keyboards originally designed for the PS2AVRGB
|
|||
|
||||
USBaspLoader is a bootloader based on V-USB that emulates a hardware USBasp device. It runs on ATmega32A and ATmega328P MCUs.
|
||||
|
||||
Precompiled `.hex` files are generally not available, but you can compile it yourself by setting up the QMK environment and following Coseyfannitutti's guide for the appropriate MCU:
|
||||
Precompiled `.hex` files are generally not available, but you can compile it yourself by setting up the QMK environment and cloning the appropriate branch of Coseyfannitutti's USBaspLoader fork:
|
||||
|
||||
|MCU |Low |High |Extended|USB ID |
|
||||
|-------------------------------------------------------------------------------------|------|------|--------|-----------|
|
||||
|[ATmega32A](https://github.com/coseyfannitutti/discipline/tree/master/doc/bootloader)|`0x1F`|`0xC0`|*n/a* |`16C0:05DC`|
|
||||
|[ATmega328P](https://github.com/coseyfannitutti/discipad/tree/master/doc/bootloader) |`0xD7`|`0xD0`|`0x04` |`16C0:05DC`|
|
||||
|MCU |Low |High |Extended|USB ID |
|
||||
|-----------------------------------------------------------------------------|------|------|--------|-----------|
|
||||
|[ATmega32A](https://github.com/coseyfannitutti/USBaspLoader/tree/atmega32a) |`0x1F`|`0xC0`|*n/a* |`16C0:05DC`|
|
||||
|[ATmega328P](https://github.com/coseyfannitutti/USBaspLoader/tree/atmega328p)|`0xD7`|`0xD0`|`0x04` |`16C0:05DC`|
|
||||
|
||||
Note that some boards may have their own specialized build of this bootloader in a separate repository. This will usually be linked to in the board's readme.
|
||||
From there, simply `cd` to the `firmware/` directory and run `make`, which should produce a file called `main.hex`.
|
||||
|
||||
:::tip
|
||||
Some boards may have their own specialized build of this bootloader in a separate repository. This will usually be linked to in the board's readme.
|
||||
:::
|
||||
|
||||
## Flashing the Bootloader
|
||||
|
||||
|
|
|
|||
|
|
@ -433,6 +433,8 @@ See also: [LED Matrix](features/led_matrix)
|
|||
|`QK_LED_MATRIX_BRIGHTNESS_DOWN`|`LM_BRID`|Decrease the brightness level |
|
||||
|`QK_LED_MATRIX_SPEED_UP` |`LM_SPDU`|Increase the animation speed |
|
||||
|`QK_LED_MATRIX_SPEED_DOWN` |`LM_SPDD`|Decrease the animation speed |
|
||||
|`QK_LED_MATRIX_FLAG_NEXT` |`LM_FLGN`|Cycle through flags |
|
||||
|`QK_LED_MATRIX_FLAG_PREVIOUS` |`LM_FLGP`|Cycle through flags in reverse |
|
||||
|
||||
## Magic Keycodes {#magic-keycodes}
|
||||
|
||||
|
|
@ -783,6 +785,8 @@ See also: [RGB Matrix](features/rgb_matrix)
|
|||
|`QK_RGB_MATRIX_VALUE_DOWN` |`RM_VALD`|Decrease the brightness level |
|
||||
|`QK_RGB_MATRIX_SPEED_UP` |`RM_SPDU`|Increase the animation speed |
|
||||
|`QK_RGB_MATRIX_SPEED_DOWN` |`RM_SPDD`|Decrease the animation speed |
|
||||
|`QK_RGB_MATRIX_FLAG_NEXT` |`RM_FLGN`|Cycle through flags |
|
||||
|`QK_RGB_MATRIX_FLAG_PREVIOUS` |`RM_FLGP`|Cycle through flags in reverse |
|
||||
|
||||
## US ANSI Shifted Symbols {#us-ansi-shifted-symbols}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# QMK Configurator
|
||||
|
||||
[](https://config.qmk.fm/)
|
||||
[](https://config.qmk.fm/)
|
||||
|
||||
The [QMK Configurator](https://config.qmk.fm) is an online graphical user interface that generates QMK Firmware `.hex` or `.bin` files.
|
||||
|
||||
|
|
|
|||
|
|
@ -32,11 +32,11 @@ Building locally has a much shorter turnaround time than waiting for GitHub Acti
|
|||
|
||||
A basic skeleton External Userspace repository can be found [here](https://github.com/qmk/qmk_userspace). If you wish to keep your keymaps on GitHub (strongly recommended!), you can fork the repository and use it as a base:
|
||||
|
||||

|
||||

|
||||
|
||||
Going ahead with your fork will copy it to your account, at which point you can clone it to your local machine and begin adding your keymaps:
|
||||
|
||||

|
||||

|
||||
|
||||
```sh
|
||||
cd $HOME
|
||||
|
|
@ -99,8 +99,8 @@ All firmware builds you've added to the External Userspace build targets will be
|
|||
|
||||
GitHub Actions can be used to automatically build your keymaps whenever you push changes to your External Userspace repository. If you have set up your list of build targets, this is as simple as enabling workflows in the GitHub repository settings:
|
||||
|
||||

|
||||

|
||||
|
||||
Any push will result in compilation of all configured builds, and once completed a new release containing the newly-minted firmware files will be created on GitHub, which you can subsequently download and flash to your keyboard:
|
||||
|
||||

|
||||

|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ Once both plugins are installed, restart Eclipse as prompted.
|
|||
* Select the _AVR-GCC Toolchain_;
|
||||
* Keep the rest as-is and click <kbd>Finish</kbd>
|
||||
|
||||

|
||||

|
||||
|
||||
3. The project will now be loaded and indexed. Its files can be browsed easily through the _Project Explorer_ on the left.
|
||||
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ You'll need to perform some modifications to the file above in order to target y
|
|||
* `"armToolchainPath"`: _[Optional]_ The path to the ARM toolchain installation location on Windows -- under normal circumstances Linux/macOS will auto-detect this correctly and will not need to be specified.
|
||||
|
||||
::: warning
|
||||
Windows builds of QMK Firmware are generally compiled using QMK MSYS, and the path to gdb's location (`C:\\QMK_MSYS\\mingw64\\bin`) needs to be specified under `armToolchainPath` for it to be detected. You may also need to change the GDB path to point at `C:\\QMK_MSYS\\mingw64\\bin\\gdb-multiarch.exe` in the VSCode Cortex-Debug user settings: 
|
||||
Windows builds of QMK Firmware are generally compiled using QMK MSYS, and the path to gdb's location (`C:\\QMK_MSYS\\mingw64\\bin`) needs to be specified under `armToolchainPath` for it to be detected. You may also need to change the GDB path to point at `C:\\QMK_MSYS\\mingw64\\bin\\gdb-multiarch.exe` in the VSCode Cortex-Debug user settings: 
|
||||
:::
|
||||
|
||||
The following modifications must be made to the keyboard's `rules.mk` file to enable debug information and disable optimisations -- this will ensure breakpoints and variable viewing works correctly:
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ The WeAct Blackpill is a popular choice for handwired boards, as it offers a pow
|
|||
* [WeAct GitHub for F4x1 Blackpill](https://github.com/WeActStudio/WeActStudio.MiniSTM32F4x1)
|
||||
* Unfortunately, due to supply issues official WeAct F411 based blackpills may not be available.
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
## Pin Usage Limitations
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
The Proton C is an Arm STM32F303xC based drop-in replacement for the Pro Micro.
|
||||
|
||||
<img src="https://qmk.fm/proton-c.jpg" alt="Proton C" width="800"/>
|
||||
<img src="https://i.imgur.com/GdsN1Rdh.jpg" alt="Proton C" />
|
||||
|
||||
#### Features
|
||||
|
||||
|
|
|
|||
|
|
@ -17,8 +17,8 @@ The following table shows the current driver status for peripherals on RP2040 MC
|
|||
|
||||
## GPIO
|
||||
|
||||
<img alt="Raspberry Pi Pico pinout" src="/nLaiYDE.jpg" width="48%"/>
|
||||
<img alt="Sparkfun RP2040 Pro Micro pinout" src="/1TPAhrs.jpg" width="48%"/>
|
||||
<img alt="Raspberry Pi Pico pinout" src="https://i.imgur.com/nLaiYDE.jpg" width="48%"/>
|
||||
<img alt="Sparkfun RP2040 Pro Micro pinout" src="https://i.imgur.com/1TPAhrs.jpg" width="48%"/>
|
||||
|
||||
::: warning
|
||||
The GPIO pins of the RP2040 are not 5V tolerant!
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 95 KiB |
|
Before Width: | Height: | Size: 115 KiB |
|
Before Width: | Height: | Size: 7.6 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 4 KiB |
|
Before Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 92 KiB |
|
Before Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 282 KiB |
|
Before Width: | Height: | Size: 8.8 KiB |
|
Before Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 64 KiB |
|
Before Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 9.6 KiB |
|
Before Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 160 KiB |
|
Before Width: | Height: | Size: 163 KiB |
|
Before Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 80 KiB |
|
Before Width: | Height: | Size: 281 KiB |
|
Before Width: | Height: | Size: 9.4 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 120 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 76 KiB |
|
Before Width: | Height: | Size: 197 KiB |
|
Before Width: | Height: | Size: 217 KiB |
|
Before Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 434 KiB |
|
Before Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 255 KiB |
|
Before Width: | Height: | Size: 34 KiB |
|
|
@ -534,6 +534,8 @@ QUANTUM_PAINTER_DRIVERS += surface
|
|||
Creating a surface in firmware can then be done with the following APIs:
|
||||
|
||||
```c
|
||||
// 24bpp RGB888 surface:
|
||||
painter_device_t qp_make_rgb888_surface(uint16_t panel_width, uint16_t panel_height, void *buffer);
|
||||
// 16bpp RGB565 surface:
|
||||
painter_device_t qp_make_rgb565_surface(uint16_t panel_width, uint16_t panel_height, void *buffer);
|
||||
// 1bpp monochrome surface:
|
||||
|
|
|
|||
|
|
@ -189,25 +189,15 @@ Currently, the Configurator does not support key rotation or non-rectangular key
|
|||
|
||||
For ISO Enter keys, QMK custom is to display it as a rectangular key, 1.25u wide and 2u high, aligned so its right edge is aligned with the right edge of the alphanumeric key block.
|
||||
|
||||

|
||||

|
||||
*A 60% keyboard in standard ISO layout, as rendered by QMK Configurator.*
|
||||
|
||||
#### Vertically-offset keys
|
||||
|
||||
For vertically-offset keys, place them in KLE as if they were not offset, then edit the Y-values as needed in the converted JSON file
|
||||
|
||||

|
||||

|
||||
*An 1800-layout keyboard as rendered in Keyboard Layout Editor, without the vertical offset applied to the arrow keys.*
|
||||
|
||||
```diff
|
||||
-{"label": "\u2191", "x", 14.25, "y": 5},
|
||||
+{"label": "\u2191", "x", 14.25, "y": 5.25},
|
||||
...
|
||||
-{"label": "\u2190", "x", 13.25, "y": 6},
|
||||
-{"label": "\u2193", "x", 14.25, "y": 6},
|
||||
-{"label": "\u2192", "x", 15.25, "y": 6},
|
||||
+{"label": "\u2190", "x", 13.25, "y": 6.25},
|
||||
+{"label": "\u2193", "x", 14.25, "y": 6.25},
|
||||
+{"label": "\u2192", "x", 15.25, "y": 6.25},
|
||||
```
|
||||
*A diff showing the changes needed to vertically-offset the arrow keys in our keyboard's JSON file.*
|
||||

|
||||
*A Unix diff file, showing the changes needed to vertically-offset the arrow keys in our keyboard's JSON file.*
|
||||
|
|
|
|||
|
|
@ -415,6 +415,9 @@ Configures the [LED Matrix](features/led_matrix) feature.
|
|||
* `center_point` <Badge type="info">Array: Number</Badge>
|
||||
* The centroid (geometric center) of the LEDs. Used for certain effects.
|
||||
* Default: `[112, 32]`
|
||||
* `flag_steps` <Badge type="info">Array: Number</Badge>
|
||||
* A list of flag bitfields that can be cycled through.
|
||||
* Default: `[255, 5, 0]`
|
||||
* `default`
|
||||
* `animation` <Badge type="info">String</Badge>
|
||||
* The default effect. Must be one of `led_matrix.animations`
|
||||
|
|
@ -428,6 +431,9 @@ Configures the [LED Matrix](features/led_matrix) feature.
|
|||
* `speed` <Badge type="info">Number</Badge>
|
||||
* The default animation speed.
|
||||
* Default: `128`
|
||||
* `flags` <Badge type="info">Number</Badge>
|
||||
* The default LED flags.
|
||||
* Default: `255`
|
||||
* `driver` <Badge type="info">String</Badge> <Badge>Required</Badge>
|
||||
* The driver to use. Must be one of `custom`, `is31fl3218`, `is31fl3731`, `is31fl3733`, `is31fl3736`, `is31fl3737`, `is31fl3741`, `is31fl3742a`, `is31fl3743a`, `is31fl3745`, `is31fl3746a`, `snled27351`.
|
||||
* `layout` <Badge type="info">Array: Object</Badge> <Badge>Required</Badge>
|
||||
|
|
@ -660,6 +666,9 @@ Configures the [RGB Matrix](features/rgb_matrix) feature.
|
|||
* `center_point` <Badge type="info">Array: Number</Badge>
|
||||
* The centroid (geometric center) of the LEDs. Used for certain effects.
|
||||
* Default: `[112, 32]`
|
||||
* `flag_steps` <Badge type="info">Array: Number</Badge>
|
||||
* A list of flag bitfields that can be cycled through.
|
||||
* Default: `[255, 5, 2, 0]`
|
||||
* `default`
|
||||
* `animation` <Badge type="info">String</Badge>
|
||||
* The default effect. Must be one of `rgb_matrix.animations`
|
||||
|
|
@ -679,6 +688,9 @@ Configures the [RGB Matrix](features/rgb_matrix) feature.
|
|||
* `speed` <Badge type="info">Number</Badge>
|
||||
* The default animation speed.
|
||||
* Default: `128`
|
||||
* `flags` <Badge type="info">Number</Badge>
|
||||
* The default LED flags.
|
||||
* Default: `255`
|
||||
* `driver` <Badge type="info">String</Badge> <Badge>Required</Badge>
|
||||
* The driver to use. Must be one of `aw20216s`, `custom`, `is31fl3218`, `is31fl3236`, `is31fl3729`, `is31fl3731`, `is31fl3733`, `is31fl3736`, `is31fl3737`, `is31fl3741`, `is31fl3742a`, `is31fl3743a`, `is31fl3745`, `is31fl3746a`, `snled27351`, `ws2812`.
|
||||
* `hue_steps` <Badge type="info">Number</Badge>
|
||||
|
|
|
|||
110
docs/tap_hold.md
|
|
@ -1,15 +1,15 @@
|
|||
# Tap-Hold Configuration Options
|
||||
|
||||
While Tap-Hold options are fantastic, they are not without their issues. We have tried to configure them with reasonable defaults, but that may still cause issues for some people.
|
||||
While Tap-Hold options are fantastic, they are not without their issues. We have tried to configure them with reasonable defaults, but that may still cause issues for some people.
|
||||
|
||||
These options let you modify the behavior of the tap-hold keys.
|
||||
These options let you modify the behavior of the Tap-Hold keys.
|
||||
|
||||
## Tapping Term
|
||||
|
||||
The crux of all of the following features is the tapping term setting. This determines what is a tap and what is a hold. The exact timing for this to feel natural can vary from keyboard to keyboard, from switch to switch, and from key to key.
|
||||
The crux of all of the following features is the tapping term setting. This determines what is a tap and what is a hold. The exact timing for this to feel natural can vary from keyboard to keyboard, from switch to switch, and from key to key.
|
||||
|
||||
::: tip
|
||||
`DYNAMIC_TAPPING_TERM_ENABLE` enables three special keys that can help you quickly find a comfortable tapping term for you. See [Dynamic Tapping Term](#dynamic-tapping-term) for more details.
|
||||
`DYNAMIC_TAPPING_TERM_ENABLE` enables three special keys that can help you quickly find a comfortable tapping term for you. See "Dynamic Tapping Term" for more details.
|
||||
:::
|
||||
|
||||
You can set the global time for this by adding the following setting to your `config.h`:
|
||||
|
|
@ -18,14 +18,14 @@ You can set the global time for this by adding the following setting to your `co
|
|||
#define TAPPING_TERM 200
|
||||
```
|
||||
|
||||
This setting is defined in milliseconds and defaults to 200ms. This is a good average for the majority of people.
|
||||
This setting is defined in milliseconds and defaults to 200ms. This is a good average for the majority of people.
|
||||
|
||||
For more granular control of this feature, you can add the following to your `config.h`:
|
||||
```c
|
||||
#define TAPPING_TERM_PER_KEY
|
||||
```
|
||||
|
||||
You can then add the following function to your `keymap.c` to customise the tapping term for each key:
|
||||
You can then add the following function to your keymap:
|
||||
|
||||
```c
|
||||
uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) {
|
||||
|
|
@ -40,41 +40,9 @@ uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) {
|
|||
}
|
||||
```
|
||||
|
||||
### Example
|
||||
|
||||
You can compare keycodes to `QK_MOD_TAP`/`QK_MOD_TAP_MAX` and `QK_LAYER_TAP`/`QK_LAYER_TAP_MAX` to filter out Mod-Tap/Layer-Tap keys, rather than checking such keys manually in a switch-case. For instance, this example sets all Mod-Tap keys to have a higher tapping term, while leaving all other tap-hold keys unchanged:
|
||||
|
||||
```c
|
||||
uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QK_MOD_TAP ... QK_MOD_TAP_MAX:
|
||||
return TAPPING_TERM + 100;
|
||||
default:
|
||||
return TAPPING_TERM;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
You can also use functions like `QK_MOD_TAP_GET_MODS`, `QK_LAYER_MOD_GET_MODS`, and `QK_ONE_SHOT_MOD_GET_MODS` to filter Mod-Tap/Layer-Mod/One Shot keys by their mods.
|
||||
|
||||
For instance, this example sets a higher tapping term for `AltGr` Mod-Taps and lower tapping terms for `Shift` Mod-Taps:
|
||||
|
||||
```c
|
||||
uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) {
|
||||
uint8_t mod = mod_config(QK_MOD_TAP_GET_MODS(keycode));
|
||||
if (mod & MOD_LSFT != 0 || mod & MOD_RSFT != 0) {
|
||||
return 100;
|
||||
}
|
||||
if (mod & MOD_RALT != 0) {
|
||||
return TAPPING_TERM + 50;
|
||||
}
|
||||
return TAPPING_TERM;
|
||||
}
|
||||
```
|
||||
|
||||
### Dynamic Tapping Term {#dynamic-tapping-term}
|
||||
|
||||
`DYNAMIC_TAPPING_TERM_ENABLE` is a feature you can enable in `rules.mk` that lets you use three special keys in your keymap to configure the tapping term on the fly:
|
||||
`DYNAMIC_TAPPING_TERM_ENABLE` is a feature you can enable in `rules.mk` that lets you use three special keys in your keymap to configure the tapping term on the fly.
|
||||
|
||||
| Key | Aliases | Description |
|
||||
|-------------------------------|---------|-------------------------------------------------------------------------------------------|
|
||||
|
|
@ -84,13 +52,13 @@ uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) {
|
|||
|
||||
Set the tapping term as usual with `#define TAPPING_TERM <value>` in `config.h` and add `DYNAMIC_TAPPING_TERM_ENABLE = yes` in `rules.mk`. Then, place the above three keys somewhere in your keymap and flash the new firmware onto your board.
|
||||
|
||||
Now, you can try using your dual-role keys such as Layer-Taps and Mod-Taps and use `DT_DOWN` and `DT_UP` to adjust the tapping term immediately. If you find that you frequently trigger the modifier of your Mod-Tap(s) by accident, for example, that's a sign that your tapping term may be too low, so tap `DT_UP` a few times to increase the tapping term until that no longer happens. Conversely, if you get superfluous characters when you actually intended to momentarily activate a layer, tap `DT_DOWN` to lower the tapping term. Do note that these keys affect the *global* tapping term, you cannot change the tapping term of a specific key on the fly.
|
||||
Now, you can try using your dual-role keys, such as layer-taps and mod-taps, and use `DT_DOWN` and `DT_UP` to adjust the tapping term immediately. If you find that you frequently trigger the modifier of your mod-tap(s) by accident, for example, that's a sign that your tapping term may be too low so tap `DT_UP` a few times to increase the tapping term until that no longer happens. On the flip side, if you get superfluous characters when you actually intended to momentarily activate a layer, tap `DT_DOWN` to lower the tapping term. Do note that these keys affect the *global* tapping term, you cannot change the tapping term of a specific key on the fly.
|
||||
|
||||
Once you're satisfied with the current tapping term value, you can tap the `DT_PRNT` key to see your new tapping term, and you can replace the tapping term in `config.h` with this new value.
|
||||
Once you're satisfied with the current tapping term value, open `config.h` and replace whatever value you first wrote for the tapping term by the output of the `DT_PRNT` key.
|
||||
|
||||
It's important to update `TAPPING_TERM` with the new value because the adjustments made using `DT_UP` and `DT_DOWN` are *not* persistent.
|
||||
It's important to update `TAPPING_TERM` with the new value because the adjustments made using `DT_UP` and `DT_DOWN` are not persistent.
|
||||
|
||||
The value by which the tapping term increases or decreases when you tap `DT_UP` and `DT_DOWN` can be configured in `config.h` with `#define DYNAMIC_TAPPING_TERM_INCREMENT <new value>`. Note that the tapping term is *not* modified when *holding* down the tap term keys, so if you need to, for example, decrease the current tapping term by 50ms, you cannot just press down and hold `DT_DOWN`; you will have to tap it 10 times in a row with the default increment of 5ms.
|
||||
The value by which the tapping term increases or decreases when you tap `DT_UP` and `DT_DOWN` can be configured in `config.h` with `#define DYNAMIC_TAPPING_TERM_INCREMENT <new value>`. Note that the tapping term is *not* modified when holding down the tap term keys so if you need to, for example, decrease the current tapping term by 50ms, you cannot just press down and hold `DT_DOWN`; you will have to tap it 10 times in a row with the default increment of 5ms.
|
||||
|
||||
If you need more flexibility, nothing prevents you from defining your own custom keys to dynamically change the tapping term.
|
||||
|
||||
|
|
@ -129,7 +97,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||
};
|
||||
```
|
||||
|
||||
In order for this feature to be effective, if you use per-key tapping terms, then you need to make a few changes to the syntax of the `get_tapping_term` function. All you need to do is replace every occurrence of `TAPPING_TERM` in the `get_tapping_term` function by lowercase `g_tapping_term`. If you don't do this, you will still see the value typed by `DT_PRNT` go up and down as you configure the tapping term on the fly, but you won't feel those changes as they don't get applied. If you can go as low as 10ms and still easily trigger the tap function of a dual-role key, that's a sign that you forgot to make the necessary changes to your `get_tapping_term` function.
|
||||
In order for this feature to be effective if you use per-key tapping terms, you need to make a few changes to the syntax of the `get_tapping_term` function. All you need to do is replace every occurrence of `TAPPING_TERM` in the `get_tapping_term` function by lowercase `g_tapping_term`. If you don't do that, you will still see the value typed by `DT_PRNT` go up and down as you configure the tapping term on the fly but you won't feel those changes as they don't get applied. If you can go as low as 10ms and still easily trigger the tap function of a dual-role key, that's a sign that you forgot to make the necessary changes to your `get_tapping_term` function.
|
||||
|
||||
For instance, here's how the example `get_tapping_term` shown earlier should look after the transformation:
|
||||
|
||||
|
|
@ -146,23 +114,23 @@ uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) {
|
|||
}
|
||||
```
|
||||
|
||||
The reason is that `TAPPING_TERM` is a macro that expands to a constant integer and thus cannot be changed at runtime, whereas `g_tapping_term` is a variable whose value can be changed at runtime. If you want, you can temporarily enable `DYNAMIC_TAPPING_TERM_ENABLE` to find a suitable tapping term value and then disable that feature and revert back to using the classic syntax for per-key tapping term settings. In case you need to access the tapping term from elsewhere in your code, you can use the `GET_TAPPING_TERM(keycode, record)` macro. This macro will expand to whatever is the appropriate access pattern given the current configuration.
|
||||
The reason is that `TAPPING_TERM` is a macro that expands to a constant integer and thus cannot be changed at runtime whereas `g_tapping_term` is a variable whose value can be changed at runtime. If you want, you can temporarily enable `DYNAMIC_TAPPING_TERM_ENABLE` to find a suitable tapping term value and then disable that feature and revert back to using the classic syntax for per-key tapping term settings. In case you need to access the tapping term from elsewhere in your code, you can use the `GET_TAPPING_TERM(keycode, record)` macro. This macro will expand to whatever is the appropriate access pattern given the current configuration.
|
||||
|
||||
## Tap-Or-Hold Decision Modes
|
||||
|
||||
The code which decides between the tap and hold actions of dual-role keys supports three different modes, in increasing order of preference for the hold action:
|
||||
|
||||
1. The default mode selects the hold action only if the dual-role key is held down longer than the tapping term. In this mode, pressing other keys while the dual-role key is held down does not influence the tap-or-hold decision. In other words, this mode ignores interrupts.
|
||||
1. The default mode selects the hold action only if the dual-role key is held down longer than the tapping term. In this mode pressing other keys while the dual-role key is held down does not influence the tap-or-hold decision. In other words, this mode ignores interrupts.
|
||||
|
||||
2. The "permissive hold" mode, in addition to the default behavior, immediately selects the hold action when another key is tapped (pressed and then released) while the dual-role key is held down, even if this happens earlier than the tapping term. If another key is just pressed, but then the dual-role key is released before that other key (and earlier than the tapping term), this mode will still select the tap action. That is, this mode converts "nested" sequences, but not "rolls".
|
||||
2. The “permissive hold” mode, in addition to the default behavior, immediately selects the hold action when another key is tapped (pressed and then released) while the dual-role key is held down, even if this happens earlier than the tapping term. If another key is just pressed, but then the dual-role key is released before that other key (and earlier than the tapping term), this mode will still select the tap action.
|
||||
|
||||
3. The "hold on other key press" mode, in addition to the default behavior, immediately selects the hold action when another key is pressed while the dual-role key is held down, even if this happens earlier than the tapping term.
|
||||
3. The “hold on other key press” mode, in addition to the default behavior, immediately selects the hold action when another key is pressed while the dual-role key is held down, even if this happens earlier than the tapping term.
|
||||
|
||||
Note that until the tap-or-hold decision completes (which happens when either the dual-role key is released, or the tapping term has expired, or the extra condition for the selected decision mode is satisfied), key events are delayed and not transmitted to the host immediately. The default mode gives the most delay (if the dual-role key is held down, this mode always waits for the whole tapping term), and the other modes may give less delay when other keys are pressed, because the hold action may be selected earlier.
|
||||
|
||||
### Comparison {#comparison}
|
||||
|
||||
To better illustrate the tap-or-hold decision modes, let us compare the expected output of each decision mode in a handful of tapping scenarios involving a Mod-Tap key (`LSFT_T(KC_A)`) and a regular key (`KC_B`) with the `TAPPING_TERM` set to 200ms.
|
||||
To better illustrate the tap-or-hold decision modes, let us compare the expected output of each decision mode in a handful of tapping scenarios involving a mod-tap key (`LSFT_T(KC_A)`) and a regular key (`KC_B`) with the `TAPPING_TERM` set to 200ms.
|
||||
|
||||
Note: "`kc` held" in the "Physical key event" column means that the key wasn't physically released yet at this point in time.
|
||||
|
||||
|
|
@ -260,7 +228,7 @@ The above sequence will not send `KC_RGHT` but `KC_A` `KC_L` instead, since `LT(
|
|||
|
||||
---
|
||||
|
||||
Example sequence 3 (Mod-Tap):
|
||||
Example sequence 3 (Mod Tap):
|
||||
|
||||
```
|
||||
TAPPING_TERM
|
||||
|
|
@ -278,17 +246,17 @@ followed by any key event that happened after the initial press of `SFT_T(KC_A)`
|
|||
|
||||
### Permissive Hold
|
||||
|
||||
The "permissive hold" mode can be enabled for all dual-role keys by adding the corresponding option to `config.h`:
|
||||
The “permissive hold” mode can be enabled for all dual-role keys by adding the corresponding option to `config.h`:
|
||||
|
||||
```c
|
||||
#define PERMISSIVE_HOLD
|
||||
```
|
||||
|
||||
This makes tap and hold keys (like Layer-Tap) work better for fast typists, or for high `TAPPING_TERM` settings.
|
||||
This makes tap and hold keys (like Layer Tap) work better for fast typists, or for high `TAPPING_TERM` settings.
|
||||
|
||||
If you press a dual-role key, tap another key (press and release) and then release the dual-role key, all within the tapping term, by default the dual-role key will perform its tap action. If the `PERMISSIVE_HOLD` option is enabled, the dual-role key will perform its hold action instead.
|
||||
If you press a dual-role key, tap another key (press and release) and then release the dual-role key, all within the tapping term, by default the dual-role key will perform its tap action. If the `PERMISSIVE_HOLD` option is enabled, the dual-role key will perform its hold action instead.
|
||||
|
||||
An example of a sequence that is affected by the "permissive hold" mode:
|
||||
An example of a sequence that is affected by the “permissive hold” mode:
|
||||
|
||||
- `LT(2, KC_A)` Down
|
||||
- `KC_L` Down (the `L` key is also mapped to `KC_RGHT` on layer 2)
|
||||
|
|
@ -307,9 +275,9 @@ An example of a sequence that is affected by the "permissive hold" mode:
|
|||
+---------------------------|--------+
|
||||
```
|
||||
|
||||
Normally, if you do all this within the `TAPPING_TERM` (default: 200ms), this will be registered as `al` by the firmware and host system. With the `PERMISSIVE_HOLD` option enabled, the Layer-Tap key is considered as a layer switch if another key is tapped, and the above sequence would be registered as `KC_RGHT` (the mapping of `L` on layer 2). We could describe this sequence as a "nested tap" (the modified key's key down and key up events are "nested" between the dual-role key's key down and key up events).
|
||||
Normally, if you do all this within the `TAPPING_TERM` (default: 200ms), this will be registered as `al` by the firmware and host system. With the `PERMISSIVE_HOLD` option enabled, the Layer Tap key is considered as a layer switch if another key is tapped, and the above sequence would be registered as `KC_RGHT` (the mapping of `L` on layer 2). We could describe this sequence as a “nested tap” (the modified key's key down and key up events are “nested” between the dual-role key's key down and key up events).
|
||||
|
||||
However, this slightly different sequence will not be affected by the "permissive hold" mode:
|
||||
However, this slightly different sequence will not be affected by the “permissive hold” mode:
|
||||
|
||||
- `LT(2, KC_A)` Down
|
||||
- `KC_L` Down (the `L` key is also mapped to `KC_RGHT` on layer 2)
|
||||
|
|
@ -328,10 +296,10 @@ However, this slightly different sequence will not be affected by the "permissiv
|
|||
+---------------------------|--------+
|
||||
```
|
||||
|
||||
In the sequence above the dual-role key is released before the other key is released, and if that happens within the tapping term, the "permissive hold" mode will still choose the tap action for the dual-role key, and the sequence will be registered as `al` by the host. We could describe this as a "rolling press" (the two keys' key down and key up events behave as if you were rolling a ball across the two keys, first pressing each key down in sequence and then releasing them in the same order).
|
||||
In the sequence above the dual-role key is released before the other key is released, and if that happens within the tapping term, the “permissive hold” mode will still choose the tap action for the dual-role key, and the sequence will be registered as `al` by the host. We could describe this as a “rolling press” (the two keys' key down and key up events behave as if you were rolling a ball across the two keys, first pressing each key down in sequence and then releasing them in the same order).
|
||||
|
||||
::: tip
|
||||
The `PERMISSIVE_HOLD` option is not noticeable if you also enable `HOLD_ON_OTHER_KEY_PRESS` because the latter option considers both the "nested tap" and "rolling press" sequences like shown above as a hold action, not the tap action. `HOLD_ON_OTHER_KEY_PRESS` makes the tap-or-hold decision earlier in the chain of key events, thus taking a precedence over `PERMISSIVE_HOLD`.
|
||||
The `PERMISSIVE_HOLD` option is not noticeable if you also enable `HOLD_ON_OTHER_KEY_PRESS` because the latter option considers both the “nested tap” and “rolling press” sequences like shown above as a hold action, not the tap action. `HOLD_ON_OTHER_KEY_PRESS` makes the Tap-Or-Hold decision earlier in the chain of key events, thus taking a precedence over `PERMISSIVE_HOLD`.
|
||||
:::
|
||||
|
||||
For more granular control of this feature, you can add the following to your `config.h`:
|
||||
|
|
@ -355,21 +323,19 @@ bool get_permissive_hold(uint16_t keycode, keyrecord_t *record) {
|
|||
}
|
||||
```
|
||||
|
||||
As in the earlier example, you can filter Mod-Tap/Layer-Mod/One Shot keys by their mods rather than checking such keys manually in a switch-case. (Also applicable to the other following `PER_KEY` functions.)
|
||||
|
||||
### Hold On Other Key Press
|
||||
|
||||
The "hold on other key press" mode can be enabled for all dual-role keys by adding the corresponding option to `config.h`:
|
||||
The “hold on other key press” mode can be enabled for all dual-role keys by adding the corresponding option to `config.h`:
|
||||
|
||||
```c
|
||||
#define HOLD_ON_OTHER_KEY_PRESS
|
||||
```
|
||||
|
||||
This mode makes tap and hold keys (like Layer-Tap) work better for fast typists, or for high `TAPPING_TERM` settings. Compared to the "permissive hold" mode, this mode selects the hold action in more cases.
|
||||
This mode makes tap and hold keys (like Layer Tap) work better for fast typists, or for high `TAPPING_TERM` settings. Compared to the “permissive hold” mode, this mode selects the hold action in more cases.
|
||||
|
||||
If you press a dual-role key, press another key, and then release the dual-role key, all within the tapping term, by default the dual-role key will perform its tap action. If the `HOLD_ON_OTHER_KEY_PRESS` option is enabled, the dual-role key will perform its hold action instead.
|
||||
If you press a dual-role key, press another key, and then release the dual-role key, all within the tapping term, by default the dual-role key will perform its tap action. If the `HOLD_ON_OTHER_KEY_PRESS` option is enabled, the dual-role key will perform its hold action instead.
|
||||
|
||||
An example of a sequence that is affected by the "hold on other key press" mode, but not by the "permissive hold" mode:
|
||||
An example of a sequence that is affected by the “hold on other key press” mode, but not by the “permissive hold” mode:
|
||||
|
||||
- `LT(2, KC_A)` Down
|
||||
- `KC_L` Down (the `L` key is also mapped to `KC_RGHT` on layer 2)
|
||||
|
|
@ -388,7 +354,7 @@ An example of a sequence that is affected by the "hold on other key press" mode,
|
|||
+---------------------------|--------+
|
||||
```
|
||||
|
||||
Normally, if you do all this within the `TAPPING_TERM` (default: 200ms), this will be registered as `al` by the firmware and host system. With the `HOLD_ON_OTHER_KEY_PRESS` option enabled, the Layer-Tap key is considered as a layer switch if another key is pressed, and the above sequence would be registered as `KC_RGHT` (the mapping of `L` on layer 2).
|
||||
Normally, if you do all this within the `TAPPING_TERM` (default: 200ms), this will be registered as `al` by the firmware and host system. With the `HOLD_ON_OTHER_KEY_PRESS` option enabled, the Layer Tap key is considered as a layer switch if another key is pressed, and the above sequence would be registered as `KC_RGHT` (the mapping of `L` on layer 2).
|
||||
|
||||
For more granular control of this feature, you can add the following to your `config.h`:
|
||||
|
||||
|
|
@ -428,9 +394,9 @@ Example:
|
|||
- `SFT_T(KC_A)` Down
|
||||
- (wait until tapping term expires...)
|
||||
|
||||
With default settings, `a` will be sent on the first release, then `a` will be sent on the second press, allowing the computer to trigger its auto repeat function until the key is released.
|
||||
With default settings, `a` will be sent on the first release, then `a` will be sent on the second press allowing the computer to trigger its auto repeat function until the key is released.
|
||||
|
||||
With `QUICK_TAP_TERM` configured, the timing between `SFT_T(KC_A)` up and `SFT_T(KC_A)` down must be within `QUICK_TAP_TERM` to trigger auto-repeat. Otherwise, the second press will be sent as a Shift. If `QUICK_TAP_TERM` is set to `0`, the second press will always be sent as a Shift, effectively disabling auto-repeat.
|
||||
With `QUICK_TAP_TERM` configured, the timing between `SFT_T(KC_A)` up and `SFT_T(KC_A)` down must be within `QUICK_TAP_TERM` to trigger auto repeat. Otherwise the second press will be sent as a Shift. If `QUICK_TAP_TERM` is set to `0`, the second press will always be sent as a Shift, effectively disabling auto-repeat.
|
||||
|
||||
::: warning
|
||||
`QUICK_TAP_TERM` timing will also impact anything that uses tapping toggles (Such as the `TT` layer keycode, and the One Shot Tap Toggle).
|
||||
|
|
@ -748,10 +714,10 @@ bool get_retro_tapping(uint16_t keycode, keyrecord_t *record) {
|
|||
}
|
||||
```
|
||||
|
||||
If the programs you use bind an action to taps of modifier keys (e.g. tapping left GUI to bring up the applications menu or tapping left Alt to focus the menu bar), you may find that using retro-tapping falsely triggers those actions. To counteract this, you can define a `DUMMY_MOD_NEUTRALIZER_KEYCODE` in `config.h` that will get sent in between the register and unregister events of a held Mod-Tap key. That way, the programs on your computer will no longer interpret the mod suppression induced by retro-tapping as a lone tap of a modifier key and will thus not falsely trigger the undesired action.
|
||||
If the programs you use bind an action to taps of modifier keys (e.g. tapping left GUI to bring up the applications menu or tapping left Alt to focus the menu bar), you may find that using retro-tapping falsely triggers those actions. To counteract this, you can define a `DUMMY_MOD_NEUTRALIZER_KEYCODE` in `config.h` that will get sent in between the register and unregister events of a held mod-tap key. That way, the programs on your computer will no longer interpret the mod suppression induced by retro-tapping as a lone tap of a modifier key and will thus not falsely trigger the undesired action.
|
||||
|
||||
Naturally, for this technique to be effective, you must choose a `DUMMY_MOD_NEUTRALIZER_KEYCODE` for which no keyboard shortcuts are bound to. Recommended values are: `KC_RIGHT_CTRL` or `KC_F18`.
|
||||
Please note that `DUMMY_MOD_NEUTRALIZER_KEYCODE` must be a basic, unmodified, HID keycode, so values like `KC_NO`, `KC_TRANSPARENT`, or `KC_PIPE` (aka `S(KC_BACKSLASH)`) are not permitted.
|
||||
Please note that `DUMMY_MOD_NEUTRALIZER_KEYCODE` must be a basic, unmodified, HID keycode so values like `KC_NO`, `KC_TRANSPARENT` or `KC_PIPE` aka `S(KC_BACKSLASH)` are not permitted.
|
||||
|
||||
By default, only left Alt and left GUI are neutralized. If you want to change the list of applicable modifier masks, use the following in your `config.h`:
|
||||
|
||||
|
|
@ -777,14 +743,14 @@ Do not use `MOD_xxx` constants like `MOD_LSFT` or `MOD_RALT`, since they're 5-bi
|
|||
|
||||
### Retro Shift
|
||||
|
||||
[Auto Shift](features/auto_shift) has its own version of `retro tapping` called `retro shift`. It is extremely similar to `retro tapping`, but holding the key past `AUTO_SHIFT_TIMEOUT` results in the value it sends being shifted. Other configurations also affect it differently; see [here](features/auto_shift#retro-shift) for more information.
|
||||
[Auto Shift,](features/auto_shift) has its own version of `retro tapping` called `retro shift`. It is extremely similar to `retro tapping`, but holding the key past `AUTO_SHIFT_TIMEOUT` results in the value it sends being shifted. Other configurations also affect it differently; see [here](features/auto_shift#retro-shift) for more information.
|
||||
|
||||
## Why do we include the key record for the per key functions?
|
||||
|
||||
One thing that you may notice is that we include the key record for all of the "per key" functions, and may be wondering why we do that.
|
||||
|
||||
Well, it's simple really: customization. But specifically, it depends on how your keyboard is wired up. For instance, if each row is actually using a row in the keyboard's matrix, then it may be simpler to use `if (record->event.key.row == 3)` instead of checking a whole bunch of keycodes, which is especially good for those people using the tap-hold keys on the home row (see about *home row mods* [here](https://precondition.github.io/home-row-mods)). So, you could fine-tune those to not interfere with your normal typing.
|
||||
Well, it's simple really: customization. But specifically, it depends on how your keyboard is wired up. For instance, if each row is actually using a row in the keyboard's matrix, then it may be simpler to use `if (record->event.key.row == 3)` instead of checking a whole bunch of keycodes. Which is especially good for those people using the Tap Hold type keys on the home row. So you could fine-tune those to not interfere with your normal typing.
|
||||
|
||||
## Why are there no `*_kb` or `*_user` functions?!
|
||||
|
||||
Unlike many of the other functions here, there isn't a need (or even reason) to have a quantum- or keyboard-level function. Only user-level functions are useful here, so there is no need to mark them as such.
|
||||
Unlike many of the other functions here, there isn't a need (or even reason) to have a quantum or keyboard-level function. Only user-level functions are useful here, so no need to mark them as such.
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ Matrix Scanning runs many times per second. The exact rate varies but typically
|
|||
|
||||
Once we know the state of every switch on our keyboard we have to map that to a keycode. In QMK this is done by making use of C macros to allow us to separate the definition of the physical layout from the definition of keycodes.
|
||||
|
||||
At the keyboard level, QMK will generate a macro (typically named `LAYOUT()`) from our configuration file `info.json`, which then maps our keyboard's matrix to physical keys. Sometimes the matrix does not have a switch in every location, and QMK will use this macro to pre-populate those with KC_NO, making the keymap definition easier to work with. Here's an example `LAYOUT()` macro for a numpad:
|
||||
At the keyboard level we define a C macro (typically named `LAYOUT()`) which maps our keyboard's matrix to physical keys. Sometimes the matrix does not have a switch in every location, and we can use this macro to pre-populate those with KC_NO, making the keymap definition easier to work with. Here's an example `LAYOUT()` macro for a numpad:
|
||||
|
||||
```c
|
||||
#define LAYOUT( \
|
||||
|
|
@ -71,7 +71,7 @@ At the keyboard level, QMK will generate a macro (typically named `LAYOUT()`) fr
|
|||
|
||||
Notice how the second block of our `LAYOUT()` macro matches the Matrix Scanning array above? This macro is what will map the matrix scanning array to keycodes. However, if you look at a 17 key numpad you'll notice that it has 3 places where the matrix could have a switch but doesn't, due to larger keys. We have populated those spaces with `KC_NO` so that our keymap definition doesn't have to.
|
||||
|
||||
This macro can handle unusual matrix layouts, for example the [Alice](https://github.com/qmk/qmk_firmware/blob/325da02e57fe7374e77b82cb00360ba45167e25c/keyboards/sneakbox/aliceclone/aliceclone.h#L24). Explaining that is outside the scope of this document.
|
||||
You can also use this macro to handle unusual matrix layouts, for example the [Alice](https://github.com/qmk/qmk_firmware/blob/325da02e57fe7374e77b82cb00360ba45167e25c/keyboards/sneakbox/aliceclone/aliceclone.h#L24). Explaining that is outside the scope of this document.
|
||||
|
||||
##### Keycode Assignment
|
||||
|
||||
|
|
|
|||
|
|
@ -1,16 +1,256 @@
|
|||
// Copyright 2025 QMK
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later WITH BSD-2-Clause
|
||||
|
||||
#include "progmem.h"
|
||||
|
||||
// Helidox 8x6 font with QMK Firmware Logo
|
||||
// Online editor: http://teripom.x0.com/
|
||||
|
||||
/**
|
||||
* QMK 6x8 Font for LCD and OLED displays
|
||||
*
|
||||
* Derived from the first half of the Adafruit GFX Library font:
|
||||
* https://github.com/adafruit/Adafruit-GFX-Library
|
||||
*
|
||||
* The first 128 characters match that of code page 437, the character set used by the original IBM PC, which includes all printable ASCII characters.
|
||||
* Each byte represents a column of 8 pixels, with the least significant bit being the top of the glyph.
|
||||
*
|
||||
* A large 21x3 character QMK Firmware logo is encoded from 0x80-0x94, 0xA0-0xB4, and 0xC0-0xD4.
|
||||
* 2x2 character OS logos for Apple, Windows, Linux and Android are encoded from 0x95-0x9C and 0xB5-0xBC.
|
||||
*/
|
||||
static const unsigned char font[] PROGMEM = {
|
||||
0x07, 0x08, 0x7F, 0x08, 0x07, 0x00, 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00, 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00, 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00, 0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00, 0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00, 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00, 0x00, 0x18, 0x3C, 0x18, 0x00, 0x00, 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, 0x00, 0x18, 0x24, 0x18, 0x00, 0x00, 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00, 0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00, 0x26, 0x29, 0x79, 0x29, 0x26, 0x00, 0x40, 0x7F, 0x05, 0x05, 0x07, 0x00, 0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00, 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00, 0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00, 0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00, 0x14, 0x22, 0x7F, 0x22, 0x14, 0x00, 0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00, 0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, 0x00, 0x66, 0x89, 0x95, 0x6A, 0x00, 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, 0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00, 0x08, 0x04, 0x7E, 0x04, 0x08, 0x00,
|
||||
0x10, 0x20, 0x7E, 0x20, 0x10, 0x00, 0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00, 0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00, 0x1E, 0x10, 0x10, 0x10, 0x10, 0x00, 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00, 0x30, 0x38, 0x3E, 0x38, 0x30, 0x00, 0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, 0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00, 0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00, 0x23, 0x13, 0x08, 0x64, 0x62, 0x00, 0x36, 0x49, 0x56, 0x20, 0x50, 0x00, 0x00, 0x08, 0x07, 0x03, 0x00, 0x00, 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, 0x00, 0x41, 0x22, 0x1C, 0x00, 0x00, 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00, 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, 0x00, 0x80, 0x70, 0x30, 0x00, 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x20, 0x10, 0x08, 0x04, 0x02, 0x00, 0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, 0x00, 0x42, 0x7F, 0x40, 0x00, 0x00,
|
||||
0x72, 0x49, 0x49, 0x49, 0x46, 0x00, 0x21, 0x41, 0x49, 0x4D, 0x33, 0x00, 0x18, 0x14, 0x12, 0x7F, 0x10, 0x00, 0x27, 0x45, 0x45, 0x45, 0x39, 0x00, 0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00, 0x41, 0x21, 0x11, 0x09, 0x07, 0x00, 0x36, 0x49, 0x49, 0x49, 0x36, 0x00, 0x46, 0x49, 0x49, 0x29, 0x1E, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x40, 0x34, 0x00, 0x00, 0x00, 0x00, 0x08, 0x14, 0x22, 0x41, 0x00, 0x14, 0x14, 0x14, 0x14, 0x14, 0x00, 0x00, 0x41, 0x22, 0x14, 0x08, 0x00, 0x02, 0x01, 0x59, 0x09, 0x06, 0x00, 0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00, 0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00, 0x7F, 0x49, 0x49, 0x49, 0x36, 0x00, 0x3E, 0x41, 0x41, 0x41, 0x22, 0x00, 0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00, 0x7F, 0x49, 0x49, 0x49, 0x41, 0x00, 0x7F, 0x09, 0x09, 0x09, 0x01, 0x00, 0x3E, 0x41, 0x41, 0x51, 0x73, 0x00, 0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, 0x00, 0x41, 0x7F, 0x41, 0x00, 0x00, 0x20, 0x40, 0x41, 0x3F, 0x01, 0x00,
|
||||
0x7F, 0x08, 0x14, 0x22, 0x41, 0x00, 0x7F, 0x40, 0x40, 0x40, 0x40, 0x00, 0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00, 0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00, 0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00, 0x7F, 0x09, 0x09, 0x09, 0x06, 0x00, 0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00, 0x7F, 0x09, 0x19, 0x29, 0x46, 0x00, 0x26, 0x49, 0x49, 0x49, 0x32, 0x00, 0x03, 0x01, 0x7F, 0x01, 0x03, 0x00, 0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00, 0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00, 0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00, 0x63, 0x14, 0x08, 0x14, 0x63, 0x00, 0x03, 0x04, 0x78, 0x04, 0x03, 0x00, 0x61, 0x59, 0x49, 0x4D, 0x43, 0x00, 0x00, 0x7F, 0x41, 0x41, 0x41, 0x00, 0x02, 0x04, 0x08, 0x10, 0x20, 0x00, 0x00, 0x41, 0x41, 0x41, 0x7F, 0x00, 0x04, 0x02, 0x01, 0x02, 0x04, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x03, 0x07, 0x08, 0x00, 0x00, 0x20, 0x54, 0x54, 0x78, 0x40, 0x00, 0x7F, 0x28, 0x44, 0x44, 0x38, 0x00, 0x38, 0x44, 0x44, 0x44, 0x28, 0x00,
|
||||
0x38, 0x44, 0x44, 0x28, 0x7F, 0x00, 0x38, 0x54, 0x54, 0x54, 0x18, 0x00, 0x00, 0x08, 0x7E, 0x09, 0x02, 0x00, 0x18, 0xA4, 0xA4, 0x9C, 0x78, 0x00, 0x7F, 0x08, 0x04, 0x04, 0x78, 0x00, 0x00, 0x44, 0x7D, 0x40, 0x00, 0x00, 0x20, 0x40, 0x40, 0x3D, 0x00, 0x00, 0x7F, 0x10, 0x28, 0x44, 0x00, 0x00, 0x00, 0x41, 0x7F, 0x40, 0x00, 0x00, 0x7C, 0x04, 0x78, 0x04, 0x78, 0x00, 0x7C, 0x08, 0x04, 0x04, 0x78, 0x00, 0x38, 0x44, 0x44, 0x44, 0x38, 0x00, 0xFC, 0x18, 0x24, 0x24, 0x18, 0x00, 0x18, 0x24, 0x24, 0x18, 0xFC, 0x00, 0x7C, 0x08, 0x04, 0x04, 0x08, 0x00, 0x48, 0x54, 0x54, 0x54, 0x24, 0x00, 0x04, 0x04, 0x3F, 0x44, 0x24, 0x00, 0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00, 0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00, 0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00, 0x44, 0x28, 0x10, 0x28, 0x44, 0x00, 0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00, 0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, 0x00, 0x08, 0x36, 0x41, 0x00, 0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00,
|
||||
0x00, 0x41, 0x36, 0x08, 0x00, 0x00, 0x02, 0x01, 0x02, 0x04, 0x02, 0x00, 0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0xF0, 0xF8, 0xF8, 0xFF, 0x38, 0xFF, 0xF8, 0xF8, 0x3F, 0xF8, 0xF8, 0xFF, 0x38, 0xFF, 0xF8, 0xF8, 0xF0, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xC0, 0xC0, 0x80, 0x00, 0x00, 0xC0, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xC0, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0x80, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xF0, 0xF8, 0xFC, 0x3E,
|
||||
0x1E, 0x06, 0x01, 0x00, 0x00, 0x00, 0x7F, 0x41, 0x41, 0x41, 0x7F, 0x00, 0x7F, 0x41, 0x41, 0x41, 0x7F, 0x00, 0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B, 0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00, 0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE, 0xDE, 0xD7, 0xDC, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x49, 0x49, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0xDF, 0xBF, 0xBF, 0x00, 0xBF, 0xBF, 0xDF, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0x49, 0x49, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x3F, 0x60, 0x60, 0xE0, 0xBF, 0x1F, 0x00, 0x7F, 0x7F, 0x07, 0x1E, 0x38, 0x1E, 0x07, 0x7F, 0x7F, 0x00, 0x7F, 0x7F, 0x0E, 0x1F, 0x3B, 0x71, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x7F, 0x0C, 0x0C, 0x0C, 0x00, 0x7E, 0x7E, 0x00, 0x7F, 0x7E, 0x03, 0x03, 0x00, 0x7F, 0x7E, 0x03, 0x03, 0x7E, 0x7E, 0x03, 0x03, 0x7F, 0x7E, 0x00, 0x0F,
|
||||
0x3E, 0x70, 0x3C, 0x06, 0x3C, 0x70, 0x3E, 0x0F, 0x00, 0x32, 0x7B, 0x49, 0x49, 0x3F, 0x7E, 0x00, 0x7F, 0x7E, 0x03, 0x03, 0x00, 0x1E, 0x3F, 0x69, 0x69, 0x6F, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0F, 0x1F, 0x3F, 0x3C, 0x78, 0x70, 0x60, 0x00, 0x00, 0x00, 0x7F, 0x41, 0x41, 0x41, 0x7F, 0x00, 0x7F, 0x41, 0x41, 0x41, 0x7F, 0x00, 0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20, 0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00, 0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F, 0x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x07, 0x0F, 0x0F, 0x7F, 0x0F, 0x7F, 0x0F, 0x0F, 0x7E, 0x0F, 0x0F, 0x7F, 0x0F, 0x7F, 0x0F, 0x0F, 0x07, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x07, 0x08, 0x7F, 0x08, 0x07, 0x00, // 0x00 NUL / Ψ
|
||||
0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00, // 0x01 SOH / ☺︎
|
||||
0xC1, 0x94, 0xB0, 0x94, 0xC1, 0x00, // 0x02 STX / ☻
|
||||
0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00, // 0x03 ETX / ♥︎
|
||||
0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00, // 0x04 EOT / ♦︎
|
||||
0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00, // 0x05 ENQ / ♣︎
|
||||
0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00, // 0x06 ACK / ♠︎
|
||||
0x00, 0x18, 0x3C, 0x18, 0x00, 0x00, // 0x07 BEL / •
|
||||
0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, // 0x08 BS / ◘
|
||||
0x00, 0x18, 0x24, 0x18, 0x00, 0x00, // 0x09 HT / ○
|
||||
0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00, // 0x0A LF / ◙
|
||||
0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00, // 0x0B VT / ♂︎
|
||||
0x26, 0x29, 0x79, 0x29, 0x26, 0x00, // 0x0C FF / ♀︎
|
||||
0x40, 0x7F, 0x05, 0x05, 0x07, 0x00, // 0x0D CR / ♪
|
||||
0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00, // 0x0E SO / ♫
|
||||
0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00, // 0x0F SI / ☼
|
||||
|
||||
0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00, // 0x10 DLE / ►
|
||||
0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00, // 0x11 DC1 / ◄
|
||||
0x14, 0x22, 0x7F, 0x22, 0x14, 0x00, // 0x12 DC2 / ↕︎
|
||||
0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00, // 0x13 DC3 / ‼︎
|
||||
0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, // 0x14 DC4 / ¶
|
||||
0x00, 0x66, 0x89, 0x95, 0x6A, 0x00, // 0x15 NAK / §
|
||||
0x60, 0x60, 0x60, 0x60, 0x60, 0x00, // 0x16 SYN / ▬
|
||||
0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00, // 0x17 ETB / ↨
|
||||
0x08, 0x04, 0x7E, 0x04, 0x08, 0x00, // 0x18 CAN / ↑
|
||||
0x10, 0x20, 0x7E, 0x20, 0x10, 0x00, // 0x19 EM / ↓
|
||||
0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00, // 0x1A SUB / →
|
||||
0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00, // 0x1B ESC / ←
|
||||
0x1E, 0x10, 0x10, 0x10, 0x10, 0x00, // 0x1C FS / ∟
|
||||
0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00, // 0x1D GS / ↔︎
|
||||
0x30, 0x38, 0x3E, 0x38, 0x30, 0x00, // 0x1E RS / ▲
|
||||
0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, // 0x1F US / ▼
|
||||
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x20 Space
|
||||
0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, // 0x21 !
|
||||
0x00, 0x07, 0x00, 0x07, 0x00, 0x00, // 0x22 "
|
||||
0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00, // 0x23 #
|
||||
0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00, // 0x24 $
|
||||
0x23, 0x13, 0x08, 0x64, 0x62, 0x00, // 0x25 %
|
||||
0x36, 0x49, 0x56, 0x20, 0x50, 0x00, // 0x26 &
|
||||
0x00, 0x08, 0x07, 0x03, 0x00, 0x00, // 0x27 '
|
||||
0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, // 0x28 (
|
||||
0x00, 0x41, 0x22, 0x1C, 0x00, 0x00, // 0x29 )
|
||||
0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00, // 0x2A *
|
||||
0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, // 0x2B +
|
||||
0x00, 0x80, 0x70, 0x30, 0x00, 0x00, // 0x2C ,
|
||||
0x08, 0x08, 0x08, 0x08, 0x08, 0x00, // 0x2D -
|
||||
0x00, 0x00, 0x60, 0x60, 0x00, 0x00, // 0x2E .
|
||||
0x20, 0x10, 0x08, 0x04, 0x02, 0x00, // 0x2F /
|
||||
|
||||
0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, // 0x30 0
|
||||
0x00, 0x42, 0x7F, 0x40, 0x00, 0x00, // 0x31 1
|
||||
0x72, 0x49, 0x49, 0x49, 0x46, 0x00, // 0x32 2
|
||||
0x21, 0x41, 0x49, 0x4D, 0x33, 0x00, // 0x33 3
|
||||
0x18, 0x14, 0x12, 0x7F, 0x10, 0x00, // 0x34 4
|
||||
0x27, 0x45, 0x45, 0x45, 0x39, 0x00, // 0x35 5
|
||||
0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00, // 0x36 6
|
||||
0x41, 0x21, 0x11, 0x09, 0x07, 0x00, // 0x37 7
|
||||
0x36, 0x49, 0x49, 0x49, 0x36, 0x00, // 0x38 8
|
||||
0x46, 0x49, 0x49, 0x29, 0x1E, 0x00, // 0x39 9
|
||||
0x00, 0x00, 0x14, 0x00, 0x00, 0x00, // 0x3A :
|
||||
0x00, 0x40, 0x34, 0x00, 0x00, 0x00, // 0x3B ;
|
||||
0x00, 0x08, 0x14, 0x22, 0x41, 0x00, // 0x3C <
|
||||
0x14, 0x14, 0x14, 0x14, 0x14, 0x00, // 0x3D =
|
||||
0x00, 0x41, 0x22, 0x14, 0x08, 0x00, // 0x3E >
|
||||
0x02, 0x01, 0x59, 0x09, 0x06, 0x00, // 0x3F ?
|
||||
|
||||
0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00, // 0x40 @
|
||||
0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00, // 0x41 A
|
||||
0x7F, 0x49, 0x49, 0x49, 0x36, 0x00, // 0x42 B
|
||||
0x3E, 0x41, 0x41, 0x41, 0x22, 0x00, // 0x43 C
|
||||
0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00, // 0x44 D
|
||||
0x7F, 0x49, 0x49, 0x49, 0x41, 0x00, // 0x45 E
|
||||
0x7F, 0x09, 0x09, 0x09, 0x01, 0x00, // 0x46 F
|
||||
0x3E, 0x41, 0x41, 0x51, 0x73, 0x00, // 0x47 G
|
||||
0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, // 0x48 H
|
||||
0x00, 0x41, 0x7F, 0x41, 0x00, 0x00, // 0x49 I
|
||||
0x20, 0x40, 0x41, 0x3F, 0x01, 0x00, // 0x4A J
|
||||
0x7F, 0x08, 0x14, 0x22, 0x41, 0x00, // 0x4B K
|
||||
0x7F, 0x40, 0x40, 0x40, 0x40, 0x00, // 0x4C L
|
||||
0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00, // 0x4D M
|
||||
0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00, // 0x4E N
|
||||
0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00, // 0x4F O
|
||||
|
||||
0x7F, 0x09, 0x09, 0x09, 0x06, 0x00, // 0x50 P
|
||||
0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00, // 0x51 Q
|
||||
0x7F, 0x09, 0x19, 0x29, 0x46, 0x00, // 0x52 R
|
||||
0x26, 0x49, 0x49, 0x49, 0x32, 0x00, // 0x53 S
|
||||
0x03, 0x01, 0x7F, 0x01, 0x03, 0x00, // 0x54 T
|
||||
0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00, // 0x55 U
|
||||
0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00, // 0x56 V
|
||||
0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00, // 0x57 W
|
||||
0x63, 0x14, 0x08, 0x14, 0x63, 0x00, // 0x58 X
|
||||
0x03, 0x04, 0x78, 0x04, 0x03, 0x00, // 0x59 Y
|
||||
0x61, 0x59, 0x49, 0x4D, 0x43, 0x00, // 0x5A Z
|
||||
0x00, 0x7F, 0x41, 0x41, 0x41, 0x00, // 0x5B [
|
||||
0x02, 0x04, 0x08, 0x10, 0x20, 0x00, // 0x5C Backslash
|
||||
0x00, 0x41, 0x41, 0x41, 0x7F, 0x00, // 0x5D ]
|
||||
0x04, 0x02, 0x01, 0x02, 0x04, 0x00, // 0x5E ^
|
||||
0x40, 0x40, 0x40, 0x40, 0x40, 0x00, // 0x5F _
|
||||
|
||||
0x00, 0x03, 0x07, 0x08, 0x00, 0x00, // 0x60 `
|
||||
0x20, 0x54, 0x54, 0x78, 0x40, 0x00, // 0x61 a
|
||||
0x7F, 0x28, 0x44, 0x44, 0x38, 0x00, // 0x62 b
|
||||
0x38, 0x44, 0x44, 0x44, 0x28, 0x00, // 0x63 c
|
||||
0x38, 0x44, 0x44, 0x28, 0x7F, 0x00, // 0x64 d
|
||||
0x38, 0x54, 0x54, 0x54, 0x18, 0x00, // 0x65 e
|
||||
0x00, 0x08, 0x7E, 0x09, 0x02, 0x00, // 0x66 f
|
||||
0x18, 0xA4, 0xA4, 0x9C, 0x78, 0x00, // 0x67 g
|
||||
0x7F, 0x08, 0x04, 0x04, 0x78, 0x00, // 0x68 h
|
||||
0x00, 0x44, 0x7D, 0x40, 0x00, 0x00, // 0x69 i
|
||||
0x20, 0x40, 0x40, 0x3D, 0x00, 0x00, // 0x6A j
|
||||
0x7F, 0x10, 0x28, 0x44, 0x00, 0x00, // 0x6B k
|
||||
0x00, 0x41, 0x7F, 0x40, 0x00, 0x00, // 0x6C l
|
||||
0x7C, 0x04, 0x78, 0x04, 0x78, 0x00, // 0x6D m
|
||||
0x7C, 0x08, 0x04, 0x04, 0x78, 0x00, // 0x6E n
|
||||
0x38, 0x44, 0x44, 0x44, 0x38, 0x00, // 0x6F o
|
||||
|
||||
0xFC, 0x18, 0x24, 0x24, 0x18, 0x00, // 0x70 p
|
||||
0x18, 0x24, 0x24, 0x18, 0xFC, 0x00, // 0x71 q
|
||||
0x7C, 0x08, 0x04, 0x04, 0x08, 0x00, // 0x72 r
|
||||
0x48, 0x54, 0x54, 0x54, 0x24, 0x00, // 0x73 s
|
||||
0x04, 0x04, 0x3F, 0x44, 0x24, 0x00, // 0x74 t
|
||||
0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00, // 0x75 u
|
||||
0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00, // 0x76 v
|
||||
0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00, // 0x77 w
|
||||
0x44, 0x28, 0x10, 0x28, 0x44, 0x00, // 0x78 x
|
||||
0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00, // 0x79 y
|
||||
0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, // 0x7A z
|
||||
0x00, 0x08, 0x36, 0x41, 0x00, 0x00, // 0x7B {
|
||||
0x00, 0x00, 0x77, 0x00, 0x00, 0x00, // 0x7C |
|
||||
0x00, 0x41, 0x36, 0x08, 0x00, 0x00, // 0x7D }
|
||||
0x02, 0x01, 0x02, 0x04, 0x02, 0x00, // 0x7E ~
|
||||
0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00, // 0x7F DEL / ⌂
|
||||
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x80 QMK Logo Top 1
|
||||
0x00, 0x00, 0x80, 0x80, 0xE0, 0xF0, // 0x81 QMK Logo Top 2
|
||||
0xF0, 0xFC, 0x70, 0xFC, 0xF0, 0x7C, // 0x82 QMK Logo Top 3
|
||||
0xF0, 0xFC, 0x70, 0xFC, 0xF0, 0xF0, // 0x83 QMK Logo Top 4
|
||||
0xE0, 0x80, 0x80, 0x00, 0x00, 0x00, // 0x84 QMK Logo Top 5
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x85 QMK Logo Top 6
|
||||
0x80, 0x80, 0x80, 0x00, 0x00, 0x00, // 0x86 QMK Logo Top 7
|
||||
0x80, 0x80, 0x00, 0x00, 0x00, 0x00, // 0x87 QMK Logo Top 8
|
||||
0x00, 0x80, 0x80, 0x00, 0x80, 0x80, // 0x88 QMK Logo Top 9
|
||||
0x00, 0x00, 0x00, 0x80, 0x80, 0x00, // 0x89 QMK Logo Top 10
|
||||
0x00, 0x00, 0x00, 0x00, 0x80, 0x80, // 0x8A QMK Logo Top 11
|
||||
0x80, 0x80, 0x80, 0x00, 0x80, 0x80, // 0x8B QMK Logo Top 12
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x8C QMK Logo Top 13
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x8D QMK Logo Top 14
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x8E QMK Logo Top 15
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x8F QMK Logo Top 16
|
||||
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x90 QMK Logo Top 17
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x91 QMK Logo Top 18
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x92 QMK Logo Top 19
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x93 QMK Logo Top 20
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x94 QMK Logo Top 21
|
||||
0x00, 0xC0, 0xF0, 0xF8, 0xFC, 0x3E, // 0x95 Apple Logo TL
|
||||
0x1E, 0x06, 0x01, 0x00, 0x00, 0x00, // 0x96 Apple Logo TR
|
||||
0x7F, 0x41, 0x41, 0x41, 0x7F, 0x00, // 0x97 Windows Logo TL
|
||||
0x7F, 0x41, 0x41, 0x41, 0x7F, 0x00, // 0x98 Windows Logo TR
|
||||
0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B, // 0x99 Linux Logo TL
|
||||
0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00, // 0x9A Linux Logo TR
|
||||
0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE, // 0x9B Android Logo TL
|
||||
0xDE, 0xD7, 0xDC, 0x00, 0xC0, 0x00, // 0x9C Android Logo TR
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x9D
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x9E
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x9F
|
||||
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xA0 QMK Logo Middle 1
|
||||
0x00, 0x00, 0xAA, 0xAA, 0xFF, 0xFF, // 0xA1 QMK Logo Middle 2
|
||||
0xFF, 0xFF, 0xE0, 0xDF, 0xDF, 0x00, // 0xA2 QMK Logo Middle 3
|
||||
0xDF, 0xDF, 0xE0, 0xFF, 0xFF, 0xFF, // 0xA3 QMK Logo Middle 4
|
||||
0xFF, 0xAA, 0xAA, 0x00, 0x00, 0x00, // 0xA4 QMK Logo Middle 5
|
||||
0x00, 0x00, 0x00, 0x00, 0x3E, 0x7F, // 0xA5 QMK Logo Middle 6
|
||||
0xC1, 0xC1, 0xC1, 0x7F, 0x3E, 0x00, // 0xA6 QMK Logo Middle 7
|
||||
0xFF, 0xFF, 0x0F, 0x3C, 0x78, 0x3C, // 0xA7 QMK Logo Middle 8
|
||||
0x0F, 0xFF, 0xFF, 0x00, 0xFF, 0xFF, // 0xA8 QMK Logo Middle 9
|
||||
0x1C, 0x3E, 0x77, 0xE3, 0xC1, 0x00, // 0xA9 QMK Logo Middle 10
|
||||
0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, // 0xAA QMK Logo Middle 11
|
||||
0x19, 0x19, 0x19, 0x00, 0xFD, 0xFD, // 0xAB QMK Logo Middle 12
|
||||
0x00, 0xFE, 0xFC, 0x06, 0x06, 0x00, // 0xAC QMK Logo Middle 13
|
||||
0xFE, 0xFC, 0x06, 0x06, 0xFC, 0xFC, // 0xAD QMK Logo Middle 14
|
||||
0x06, 0x06, 0xFE, 0xFC, 0x00, 0x1E, // 0xAE QMK Logo Middle 15
|
||||
0x7C, 0xE0, 0x78, 0x0C, 0x78, 0xE0, // 0xAF QMK Logo Middle 16
|
||||
|
||||
0x7C, 0x1E, 0x00, 0x64, 0xF6, 0x92, // 0xB0 QMK Logo Middle 17
|
||||
0x92, 0x7E, 0xFC, 0x00, 0xFE, 0xFC, // 0xB1 QMK Logo Middle 18
|
||||
0x06, 0x06, 0x00, 0x3C, 0x7E, 0xD2, // 0xB2 QMK Logo Middle 19
|
||||
0xD2, 0xDE, 0x4C, 0x00, 0x00, 0x00, // 0xB3 QMK Logo Middle 20
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xB4 QMK Logo Middle 21
|
||||
0x00, 0x03, 0x0F, 0x1F, 0x3F, 0x3C, // 0xB5 Apple Logo BL
|
||||
0x78, 0x70, 0x60, 0x00, 0x00, 0x00, // 0xB6 Apple Logo BR
|
||||
0x7F, 0x41, 0x41, 0x41, 0x7F, 0x00, // 0xB7 Windows Logo BL
|
||||
0x7F, 0x41, 0x41, 0x41, 0x7F, 0x00, // 0xB8 Windows Logo BR
|
||||
0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20, // 0xB9 Linux Logo BL
|
||||
0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00, // 0xBA Linux Logo BR
|
||||
0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F, // 0xBB Android Logo BL
|
||||
0x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00, // 0xBC Android Logo BR
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xBD
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xBE
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xBF
|
||||
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xC0 QMK Logo Bottom 1
|
||||
0x00, 0x00, 0x00, 0x00, 0x03, 0x07, // 0xC1 QMK Logo Bottom 2
|
||||
0x07, 0x1F, 0x07, 0x1F, 0x07, 0x1F, // 0xC2 QMK Logo Bottom 3
|
||||
0x07, 0x1F, 0x07, 0x1F, 0x07, 0x07, // 0xC3 QMK Logo Bottom 4
|
||||
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xC4 QMK Logo Bottom 5
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xC5 QMK Logo Bottom 6
|
||||
0x00, 0x00, 0x01, 0x03, 0x02, 0x00, // 0xC6 QMK Logo Bottom 7
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xC7 QMK Logo Bottom 8
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xC8 QMK Logo Bottom 9
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xC9 QMK Logo Bottom 10
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xCA QMK Logo Bottom 11
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xCB QMK Logo Bottom 12
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xCC QMK Logo Bottom 13
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xCD QMK Logo Bottom 14
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xCE QMK Logo Bottom 15
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xCF QMK Logo Bottom 16
|
||||
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xD0 QMK Logo Bottom 17
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xD1 QMK Logo Bottom 18
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xD2 QMK Logo Bottom 19
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xD3 QMK Logo Bottom 10
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xD4 QMK Logo Bottom 21
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xD5
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xD6
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xD7
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xD8
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xD9
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xDA
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xDB
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xDC
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xDD
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xDE
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00 // 0xDF
|
||||
};
|
||||
|
|
|
|||
|
|
@ -15,9 +15,8 @@ static bool dummy_comms_start(painter_device_t device) {
|
|||
return true;
|
||||
}
|
||||
|
||||
static bool dummy_comms_stop(painter_device_t device) {
|
||||
static void dummy_comms_stop(painter_device_t device) {
|
||||
// No-op.
|
||||
return true;
|
||||
}
|
||||
|
||||
uint32_t dummy_comms_send(painter_device_t device, const void *data, uint32_t byte_count) {
|
||||
|
|
|
|||
|
|
@ -35,9 +35,7 @@ uint32_t qp_comms_i2c_send_data(painter_device_t device, const void *data, uint3
|
|||
return qp_comms_i2c_send_raw(device, data, byte_count);
|
||||
}
|
||||
|
||||
bool qp_comms_i2c_stop(painter_device_t device) {
|
||||
return true;
|
||||
}
|
||||
void qp_comms_i2c_stop(painter_device_t device) {}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Command+Data I2C support
|
||||
|
|
@ -45,9 +43,9 @@ bool qp_comms_i2c_stop(painter_device_t device) {
|
|||
static const uint8_t cmd_byte = 0x00;
|
||||
static const uint8_t data_byte = 0x40;
|
||||
|
||||
bool qp_comms_i2c_cmddata_send_command(painter_device_t device, uint8_t cmd) {
|
||||
void qp_comms_i2c_cmddata_send_command(painter_device_t device, uint8_t cmd) {
|
||||
uint8_t buf[2] = {cmd_byte, cmd};
|
||||
return qp_comms_i2c_send_raw(device, &buf, 2);
|
||||
qp_comms_i2c_send_raw(device, &buf, 2);
|
||||
}
|
||||
|
||||
uint32_t qp_comms_i2c_cmddata_send_data(painter_device_t device, const void *data, uint32_t byte_count) {
|
||||
|
|
@ -60,7 +58,7 @@ uint32_t qp_comms_i2c_cmddata_send_data(painter_device_t device, const void *dat
|
|||
return byte_count;
|
||||
}
|
||||
|
||||
bool qp_comms_i2c_bulk_command_sequence(painter_device_t device, const uint8_t *sequence, size_t sequence_len) {
|
||||
void qp_comms_i2c_bulk_command_sequence(painter_device_t device, const uint8_t *sequence, size_t sequence_len) {
|
||||
uint8_t buf[32];
|
||||
for (size_t i = 0; i < sequence_len;) {
|
||||
uint8_t command = sequence[i];
|
||||
|
|
@ -69,17 +67,12 @@ bool qp_comms_i2c_bulk_command_sequence(painter_device_t device, const uint8_t *
|
|||
buf[0] = cmd_byte;
|
||||
buf[1] = command;
|
||||
memcpy(&buf[2], &sequence[i + 3], num_bytes);
|
||||
if (!qp_comms_i2c_send_raw(device, buf, num_bytes + 2)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
qp_comms_i2c_send_raw(device, buf, num_bytes + 2);
|
||||
if (delay > 0) {
|
||||
wait_ms(delay);
|
||||
}
|
||||
i += (3 + num_bytes);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
const painter_comms_with_command_vtable_t i2c_comms_cmddata_vtable = {
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ typedef struct qp_comms_i2c_config_t {
|
|||
bool qp_comms_i2c_init(painter_device_t device);
|
||||
bool qp_comms_i2c_start(painter_device_t device);
|
||||
uint32_t qp_comms_i2c_send_data(painter_device_t device, const void* data, uint32_t byte_count);
|
||||
bool qp_comms_i2c_stop(painter_device_t device);
|
||||
void qp_comms_i2c_stop(painter_device_t device);
|
||||
|
||||
extern const painter_comms_with_command_vtable_t i2c_comms_cmddata_vtable;
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ uint32_t qp_comms_spi_send_data(painter_device_t device, const void *data, uint3
|
|||
const uint32_t max_msg_length = 1024;
|
||||
|
||||
while (bytes_remaining > 0) {
|
||||
uint32_t bytes_this_loop = QP_MIN(bytes_remaining, max_msg_length);
|
||||
uint32_t bytes_this_loop = MIN(bytes_remaining, max_msg_length);
|
||||
spi_transmit(p, bytes_this_loop);
|
||||
p += bytes_this_loop;
|
||||
bytes_remaining -= bytes_this_loop;
|
||||
|
|
@ -45,12 +45,11 @@ uint32_t qp_comms_spi_send_data(painter_device_t device, const void *data, uint3
|
|||
return byte_count - bytes_remaining;
|
||||
}
|
||||
|
||||
bool qp_comms_spi_stop(painter_device_t device) {
|
||||
void qp_comms_spi_stop(painter_device_t device) {
|
||||
painter_driver_t * driver = (painter_driver_t *)device;
|
||||
qp_comms_spi_config_t *comms_config = (qp_comms_spi_config_t *)driver->comms_config;
|
||||
spi_stop();
|
||||
gpio_write_pin_high(comms_config->chip_select_pin);
|
||||
return true;
|
||||
}
|
||||
|
||||
const painter_comms_vtable_t spi_comms_vtable = {
|
||||
|
|
@ -98,15 +97,14 @@ uint32_t qp_comms_spi_dc_reset_send_data(painter_device_t device, const void *da
|
|||
return qp_comms_spi_send_data(device, data, byte_count);
|
||||
}
|
||||
|
||||
bool qp_comms_spi_dc_reset_send_command(painter_device_t device, uint8_t cmd) {
|
||||
void qp_comms_spi_dc_reset_send_command(painter_device_t device, uint8_t cmd) {
|
||||
painter_driver_t * driver = (painter_driver_t *)device;
|
||||
qp_comms_spi_dc_reset_config_t *comms_config = (qp_comms_spi_dc_reset_config_t *)driver->comms_config;
|
||||
gpio_write_pin_low(comms_config->dc_pin);
|
||||
spi_write(cmd);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool qp_comms_spi_dc_reset_bulk_command_sequence(painter_device_t device, const uint8_t *sequence, size_t sequence_len) {
|
||||
void qp_comms_spi_dc_reset_bulk_command_sequence(painter_device_t device, const uint8_t *sequence, size_t sequence_len) {
|
||||
painter_driver_t * driver = (painter_driver_t *)device;
|
||||
qp_comms_spi_dc_reset_config_t *comms_config = (qp_comms_spi_dc_reset_config_t *)driver->comms_config;
|
||||
for (size_t i = 0; i < sequence_len;) {
|
||||
|
|
@ -128,8 +126,6 @@ bool qp_comms_spi_dc_reset_bulk_command_sequence(painter_device_t device, const
|
|||
}
|
||||
i += (3 + num_bytes);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
const painter_comms_with_command_vtable_t spi_comms_with_dc_vtable = {
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ typedef struct qp_comms_spi_config_t {
|
|||
bool qp_comms_spi_init(painter_device_t device);
|
||||
bool qp_comms_spi_start(painter_device_t device);
|
||||
uint32_t qp_comms_spi_send_data(painter_device_t device, const void* data, uint32_t byte_count);
|
||||
bool qp_comms_spi_stop(painter_device_t device);
|
||||
void qp_comms_spi_stop(painter_device_t device);
|
||||
|
||||
extern const painter_comms_vtable_t spi_comms_vtable;
|
||||
|
||||
|
|
@ -39,9 +39,9 @@ typedef struct qp_comms_spi_dc_reset_config_t {
|
|||
} qp_comms_spi_dc_reset_config_t;
|
||||
|
||||
bool qp_comms_spi_dc_reset_init(painter_device_t device);
|
||||
bool qp_comms_spi_dc_reset_send_command(painter_device_t device, uint8_t cmd);
|
||||
void qp_comms_spi_dc_reset_send_command(painter_device_t device, uint8_t cmd);
|
||||
uint32_t qp_comms_spi_dc_reset_send_data(painter_device_t device, const void* data, uint32_t byte_count);
|
||||
bool qp_comms_spi_dc_reset_bulk_command_sequence(painter_device_t device, const uint8_t* sequence, size_t sequence_len);
|
||||
void qp_comms_spi_dc_reset_bulk_command_sequence(painter_device_t device, const uint8_t* sequence, size_t sequence_len);
|
||||
|
||||
extern const painter_comms_with_command_vtable_t spi_comms_with_dc_vtable;
|
||||
|
||||
|
|
|
|||
|
|
@ -32,9 +32,7 @@ __attribute__((weak)) bool qp_gc9107_init(painter_device_t device, painter_rotat
|
|||
};
|
||||
|
||||
// clang-format on
|
||||
if (!qp_comms_bulk_command_sequence(device, gc9107_init_sequence, sizeof(gc9107_init_sequence))) {
|
||||
return false;
|
||||
}
|
||||
qp_comms_bulk_command_sequence(device, gc9107_init_sequence, sizeof(gc9107_init_sequence));
|
||||
|
||||
// Configure the rotation (i.e. the ordering and direction of memory writes in GRAM)
|
||||
const uint8_t madctl[] = {
|
||||
|
|
@ -43,7 +41,9 @@ __attribute__((weak)) bool qp_gc9107_init(painter_device_t device, painter_rotat
|
|||
[QP_ROTATION_180] = GC9XXX_MADCTL_BGR | GC9XXX_MADCTL_MX | GC9XXX_MADCTL_MY,
|
||||
[QP_ROTATION_270] = GC9XXX_MADCTL_BGR | GC9XXX_MADCTL_MV | GC9XXX_MADCTL_MY,
|
||||
};
|
||||
return qp_comms_command_databyte(device, GC9XXX_SET_MEM_ACS_CTL, madctl[rotation]);
|
||||
qp_comms_command_databyte(device, GC9XXX_SET_MEM_ACS_CTL, madctl[rotation]);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -45,9 +45,7 @@ __attribute__((weak)) bool qp_gc9a01_init(painter_device_t device, painter_rotat
|
|||
};
|
||||
// clang-format on
|
||||
|
||||
if (!qp_comms_bulk_command_sequence(device, gc9a01_init_sequence, sizeof(gc9a01_init_sequence))) {
|
||||
return false;
|
||||
}
|
||||
qp_comms_bulk_command_sequence(device, gc9a01_init_sequence, sizeof(gc9a01_init_sequence));
|
||||
|
||||
// Configure the rotation (i.e. the ordering and direction of memory writes in GRAM)
|
||||
const uint8_t madctl[] = {
|
||||
|
|
@ -56,7 +54,9 @@ __attribute__((weak)) bool qp_gc9a01_init(painter_device_t device, painter_rotat
|
|||
[QP_ROTATION_180] = GC9XXX_MADCTL_BGR | GC9XXX_MADCTL_MX | GC9XXX_MADCTL_MY,
|
||||
[QP_ROTATION_270] = GC9XXX_MADCTL_BGR | GC9XXX_MADCTL_MV | GC9XXX_MADCTL_MY,
|
||||
};
|
||||
return qp_comms_command_databyte(device, GC9XXX_SET_MEM_ACS_CTL, madctl[rotation]);
|
||||
qp_comms_command_databyte(device, GC9XXX_SET_MEM_ACS_CTL, madctl[rotation]);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -50,6 +50,16 @@ painter_device_t qp_make_rgb565_surface(uint16_t panel_width, uint16_t panel_hei
|
|||
*/
|
||||
painter_device_t qp_make_mono1bpp_surface(uint16_t panel_width, uint16_t panel_height, void *buffer);
|
||||
|
||||
/**
|
||||
* Factory method for an RGB888 surface (aka framebuffer).
|
||||
*
|
||||
* @param panel_width[in] the width of the display panel
|
||||
* @param panel_height[in] the height of the display panel
|
||||
* @param buffer[in] pointer to a preallocated uint8_t buffer of size `SURFACE_REQUIRED_BUFFER_BYTE_SIZE(panel_width, panel_height, 16)`
|
||||
* @return the device handle used with all drawing routines in Quantum Painter
|
||||
*/
|
||||
painter_device_t qp_make_rgb888_surface(uint16_t panel_width, uint16_t panel_height, void *buffer);
|
||||
|
||||
/**
|
||||
* Helper method to draw the contents of the framebuffer to the target device.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ typedef struct surface_painter_device_t {
|
|||
void * buffer;
|
||||
uint8_t * u8buffer;
|
||||
uint16_t *u16buffer;
|
||||
rgb_t * rgbbuffer;
|
||||
};
|
||||
|
||||
// Manually manage the viewport for streaming pixel data to the display
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ static bool qp_surface_pixdata_rgb565(painter_device_t device, const void *pixel
|
|||
// Pixel colour conversion
|
||||
static bool qp_surface_palette_convert_rgb565_swapped(painter_device_t device, int16_t palette_size, qp_pixel_t *palette) {
|
||||
for (int16_t i = 0; i < palette_size; ++i) {
|
||||
rgb_t rgb = hsv_to_rgb_nocie((hsv_t){palette[i].hsv888.h, palette[i].hsv888.s, palette[i].hsv888.v});
|
||||
rgb_t rgb = hsv_to_rgb_nocie(palette[i].hsv888);
|
||||
uint16_t rgb565 = (((uint16_t)rgb.r) >> 3) << 11 | (((uint16_t)rgb.g) >> 2) << 5 | (((uint16_t)rgb.b) >> 3);
|
||||
palette[i].rgb565 = __builtin_bswap16(rgb565);
|
||||
}
|
||||
|
|
|
|||
143
drivers/painter/generic/qp_surface_rgb888.c
Normal file
|
|
@ -0,0 +1,143 @@
|
|||
// Copyright 2022 Nick Brassel (@tzarc)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#ifdef QUANTUM_PAINTER_SURFACE_ENABLE
|
||||
|
||||
# include "color.h"
|
||||
# include "qp_draw.h"
|
||||
# include "qp_surface_internal.h"
|
||||
# include "qp_comms_dummy.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Surface driver impl: rgb888
|
||||
|
||||
static inline void setpixel_rgb888(surface_painter_device_t *surface, uint16_t x, uint16_t y, rgb_t rgb888) {
|
||||
uint16_t w = surface->base.panel_width;
|
||||
uint16_t h = surface->base.panel_height;
|
||||
|
||||
// Drop out if it's off-screen
|
||||
if (x >= w || y >= h) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Skip messing with the dirty info if the original value already matches
|
||||
if (memcmp(&surface->rgbbuffer[y * w + x], &rgb888, sizeof(rgb_t)) != 0) {
|
||||
// Update the dirty region
|
||||
qp_surface_update_dirty(&surface->dirty, x, y);
|
||||
|
||||
// Update the pixel data in the buffer
|
||||
surface->rgbbuffer[y * w + x] = rgb888;
|
||||
}
|
||||
}
|
||||
|
||||
static inline void append_pixel_rgb888(surface_painter_device_t *surface, rgb_t rgb888) {
|
||||
setpixel_rgb888(surface, surface->viewport.pixdata_x, surface->viewport.pixdata_y, rgb888);
|
||||
qp_surface_increment_pixdata_location(&surface->viewport);
|
||||
}
|
||||
|
||||
static inline void stream_pixdata_rgb888(surface_painter_device_t *surface, const rgb_t *data, uint32_t native_pixel_count) {
|
||||
for (uint32_t pixel_counter = 0; pixel_counter < native_pixel_count; ++pixel_counter) {
|
||||
append_pixel_rgb888(surface, data[pixel_counter]);
|
||||
}
|
||||
}
|
||||
|
||||
// Stream pixel data to the current write position in GRAM
|
||||
static bool qp_surface_pixdata_rgb888(painter_device_t device, const void *pixel_data, uint32_t native_pixel_count) {
|
||||
painter_driver_t * driver = (painter_driver_t *)device;
|
||||
surface_painter_device_t *surface = (surface_painter_device_t *)driver;
|
||||
stream_pixdata_rgb888(surface, (const rgb_t *)pixel_data, native_pixel_count);
|
||||
return true;
|
||||
}
|
||||
|
||||
// Pixel colour conversion
|
||||
static bool qp_surface_palette_convert_rgb888(painter_device_t device, int16_t palette_size, qp_pixel_t *palette) {
|
||||
for (int16_t i = 0; i < palette_size; ++i) {
|
||||
palette[i].rgb888 = hsv_to_rgb_nocie(palette[i].hsv888);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// Append pixels to the target location, keyed by the pixel index
|
||||
static bool qp_surface_append_pixels_rgb888(painter_device_t device, uint8_t *target_buffer, qp_pixel_t *palette, uint32_t pixel_offset, uint32_t pixel_count, uint8_t *palette_indices) {
|
||||
rgb_t *buf = (rgb_t *)target_buffer;
|
||||
for (uint32_t i = 0; i < pixel_count; ++i) {
|
||||
buf[pixel_offset + i] = palette[palette_indices[i]].rgb888;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool rgb888_target_pixdata_transfer(painter_driver_t *surface_driver, painter_driver_t *target_driver, uint16_t x, uint16_t y, bool entire_surface) {
|
||||
surface_painter_device_t *surface_handle = (surface_painter_device_t *)surface_driver;
|
||||
|
||||
uint16_t l = entire_surface ? 0 : surface_handle->dirty.l;
|
||||
uint16_t t = entire_surface ? 0 : surface_handle->dirty.t;
|
||||
uint16_t r = entire_surface ? (surface_handle->base.panel_width - 1) : surface_handle->dirty.r;
|
||||
uint16_t b = entire_surface ? (surface_handle->base.panel_height - 1) : surface_handle->dirty.b;
|
||||
|
||||
// Set the target drawing area
|
||||
bool ok = qp_viewport((painter_device_t)target_driver, x + l, y + t, x + r, y + b);
|
||||
if (!ok) {
|
||||
qp_dprintf("rgb888_target_pixdata_transfer: fail (could not set target viewport)\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
// Housekeeping of the amount of pixels to transfer
|
||||
uint32_t total_pixel_count = (8 * QUANTUM_PAINTER_PIXDATA_BUFFER_SIZE) / surface_driver->native_bits_per_pixel;
|
||||
uint32_t pixel_counter = 0;
|
||||
rgb_t * target_buffer = (rgb_t *)qp_internal_global_pixdata_buffer;
|
||||
|
||||
// Fill the global pixdata area so that we can start transferring to the panel
|
||||
for (uint16_t y = t; y <= b; ++y) {
|
||||
for (uint16_t x = l; x <= r; ++x) {
|
||||
// Update the target buffer
|
||||
target_buffer[pixel_counter++] = surface_handle->rgbbuffer[y * surface_handle->base.panel_width + x];
|
||||
|
||||
// If we've accumulated enough data, send it
|
||||
if (pixel_counter == total_pixel_count) {
|
||||
ok = qp_pixdata((painter_device_t)target_driver, qp_internal_global_pixdata_buffer, pixel_counter);
|
||||
if (!ok) {
|
||||
qp_dprintf("rgb888_target_pixdata_transfer: fail (could not stream pixdata to target)\n");
|
||||
return false;
|
||||
}
|
||||
// Reset the counter
|
||||
pixel_counter = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If there's any leftover data, send it
|
||||
if (pixel_counter > 0) {
|
||||
ok = qp_pixdata((painter_device_t)target_driver, qp_internal_global_pixdata_buffer, pixel_counter);
|
||||
if (!ok) {
|
||||
qp_dprintf("rgb888_target_pixdata_transfer: fail (could not stream pixdata to target)\n");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool qp_surface_append_pixdata_rgb888(painter_device_t device, uint8_t *target_buffer, uint32_t pixdata_offset, uint8_t pixdata_byte) {
|
||||
target_buffer[pixdata_offset] = pixdata_byte;
|
||||
return true;
|
||||
}
|
||||
|
||||
const surface_painter_driver_vtable_t rgb888_surface_driver_vtable = {
|
||||
.base =
|
||||
{
|
||||
.init = qp_surface_init,
|
||||
.power = qp_surface_power,
|
||||
.clear = qp_surface_clear,
|
||||
.flush = qp_surface_flush,
|
||||
.pixdata = qp_surface_pixdata_rgb888,
|
||||
.viewport = qp_surface_viewport,
|
||||
.palette_convert = qp_surface_palette_convert_rgb888,
|
||||
.append_pixels = qp_surface_append_pixels_rgb888,
|
||||
.append_pixdata = qp_surface_append_pixdata_rgb888,
|
||||
},
|
||||
.target_pixdata_transfer = rgb888_target_pixdata_transfer,
|
||||
};
|
||||
|
||||
SURFACE_FACTORY_FUNCTION_IMPL(qp_make_rgb888_surface, rgb888_surface_driver_vtable, 24);
|
||||
|
||||
#endif // QUANTUM_PAINTER_SURFACE_ENABLE
|
||||
|
|
@ -41,9 +41,7 @@ __attribute__((weak)) bool qp_ili9163_init(painter_device_t device, painter_rota
|
|||
ILI9XXX_CMD_DISPLAY_ON, 20, 0
|
||||
};
|
||||
// clang-format on
|
||||
if (!qp_comms_bulk_command_sequence(device, ili9163_init_sequence, sizeof(ili9163_init_sequence))) {
|
||||
return false;
|
||||
}
|
||||
qp_comms_bulk_command_sequence(device, ili9163_init_sequence, sizeof(ili9163_init_sequence));
|
||||
|
||||
// Configure the rotation (i.e. the ordering and direction of memory writes in GRAM)
|
||||
const uint8_t madctl[] = {
|
||||
|
|
@ -52,7 +50,9 @@ __attribute__((weak)) bool qp_ili9163_init(painter_device_t device, painter_rota
|
|||
[QP_ROTATION_180] = ILI9XXX_MADCTL_BGR | ILI9XXX_MADCTL_MX | ILI9XXX_MADCTL_MY,
|
||||
[QP_ROTATION_270] = ILI9XXX_MADCTL_BGR | ILI9XXX_MADCTL_MV | ILI9XXX_MADCTL_MY,
|
||||
};
|
||||
return qp_comms_command_databyte(device, ILI9XXX_SET_MEM_ACS_CTL, madctl[rotation]);
|
||||
qp_comms_command_databyte(device, ILI9XXX_SET_MEM_ACS_CTL, madctl[rotation]);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -48,9 +48,7 @@ __attribute__((weak)) bool qp_ili9341_init(painter_device_t device, painter_rota
|
|||
ILI9XXX_CMD_DISPLAY_ON, 20, 0
|
||||
};
|
||||
// clang-format on
|
||||
if (!qp_comms_bulk_command_sequence(device, ili9341_init_sequence, sizeof(ili9341_init_sequence))) {
|
||||
return false;
|
||||
}
|
||||
qp_comms_bulk_command_sequence(device, ili9341_init_sequence, sizeof(ili9341_init_sequence));
|
||||
|
||||
// Configure the rotation (i.e. the ordering and direction of memory writes in GRAM)
|
||||
const uint8_t madctl[] = {
|
||||
|
|
@ -59,7 +57,9 @@ __attribute__((weak)) bool qp_ili9341_init(painter_device_t device, painter_rota
|
|||
[QP_ROTATION_180] = ILI9XXX_MADCTL_BGR | ILI9XXX_MADCTL_MX | ILI9XXX_MADCTL_MY,
|
||||
[QP_ROTATION_270] = ILI9XXX_MADCTL_BGR | ILI9XXX_MADCTL_MV | ILI9XXX_MADCTL_MY,
|
||||
};
|
||||
return qp_comms_command_databyte(device, ILI9XXX_SET_MEM_ACS_CTL, madctl[rotation]);
|
||||
qp_comms_command_databyte(device, ILI9XXX_SET_MEM_ACS_CTL, madctl[rotation]);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
|||