diff options
author | James Young <xxiinophobia@yahoo.com> | 2020-02-29 12:00:00 -0800 |
---|---|---|
committer | James Young <xxiinophobia@yahoo.com> | 2020-02-29 11:59:30 -0800 |
commit | 26eef35f07698d23aafae90e1c230b52e100a334 (patch) | |
tree | eb8e43fc58ca55788e6e89430af0db55ea79e324 /docs | |
parent | 85041ff05bf0e5f4ff4535caf6e638491a5614c8 (diff) | |
download | qmk_firmware-26eef35f07698d23aafae90e1c230b52e100a334.tar.gz qmk_firmware-26eef35f07698d23aafae90e1c230b52e100a334.zip |
2020 February 29 Breaking Changes Update (#8064)
Diffstat (limited to 'docs')
-rw-r--r-- | docs/ChangeLog/20200229.md | 75 | ||||
-rw-r--r-- | docs/feature_backlight.md | 20 | ||||
-rw-r--r-- | docs/feature_encoders.md | 52 |
3 files changed, 125 insertions, 22 deletions
diff --git a/docs/ChangeLog/20200229.md b/docs/ChangeLog/20200229.md new file mode 100644 index 000000000..398fe01c0 --- /dev/null +++ b/docs/ChangeLog/20200229.md | |||
@@ -0,0 +1,75 @@ | |||
1 | # QMK Breaking Change - 2020 Feb 29 Changelog | ||
2 | |||
3 | Four times a year QMK runs a process for merging Breaking Changes. A Breaking Change is any change which modifies how QMK behaves in a way that is incompatible or potentially dangerous. We limit these changes to 4 times per year so that users can have confidence that updating their QMK tree will not break their keymaps. | ||
4 | |||
5 | |||
6 | ## Update ChibiOS/ChibiOS-Contrib/uGFX submodules | ||
7 | |||
8 | * General Notes | ||
9 | * A `make git-submodule` may be required after pulling the latest QMK firmware code to update affected submodules to the upgraded revisions | ||
10 | * Enabling link-time-optimization (`LINK_TIME_OPTIMIZATION_ENABLE = yes`) should work on a lot more boards | ||
11 | * Upgrade to ChibiOS ver19.1.3 | ||
12 | * This will allow QMK to update to upstream ChibiOS a lot easier -- the old version was ~2 years out of date. Automated update scripts have been made available to simplify future upgrades. | ||
13 | * Includes improved MCU support and bugfixes | ||
14 | * ChibiOS revision is now included in Command output | ||
15 | * Timers should now be more accurate | ||
16 | * Upgrade to newer ChibiOS-Contrib | ||
17 | * Also includes improved MCU support and bugfixes | ||
18 | * ChibiOS-Contrib revision is now included in Command output | ||
19 | * Upgrade to newer uGFX | ||
20 | * Required in order to support updated ChibiOS | ||
21 | |||
22 | |||
23 | ## Fix ChibiOS timer overflow for 16-bit SysTick devices | ||
24 | |||
25 | * On 16-bit SysTick devices, the timer subsystem in QMK was incorrectly dealing with overflow. | ||
26 | * When running at a 100000 SysTick frequency (possible on 16-bit devices, but uncommon), this overflow would occur after 0.65 seconds. | ||
27 | * Timers are now correctly handling this overflow case and timing should now be correct on ChibiOS/ARM. | ||
28 | |||
29 | |||
30 | ## Update LUFA submodule | ||
31 | |||
32 | * Updates the LUFA submodule to include updates from upstream (abcminiuser/lufa) | ||
33 | * Includes some cleanup for QMK DFU generation | ||
34 | |||
35 | |||
36 | ## Encoder flip | ||
37 | |||
38 | * Flips the encoder direction so that `clockwise == true` is for actually turning the knob clockwise | ||
39 | * Adds `ENCODER_DIRECTION_FLIP` define, so that reversing the expected dirction is simple for users. | ||
40 | * Cleans up documentation page for encoders | ||
41 | |||
42 | |||
43 | ## Adding support for `BACKLIGHT_ON_STATE` for hardware PWM backlight | ||
44 | |||
45 | * Previously, the define only affected software PWM, and hardware PWM always assumed an N-channel MOSFET. | ||
46 | * The hardware PWM backlight setup has been updated to respect this option. | ||
47 | * The default "on" state has been changed to `1` - **this impacts all keyboards using software PWM backlight that do not define it explicitly**. If your keyboard's backlight is acting strange, it may have a P-channel MOSFET, and will need to have `#define BACKLIGHT_ON_STATE 0` added to the keyboard-level `config.h`. Please see the PR for more detailed information. | ||
48 | |||
49 | |||
50 | ## Migrating `ACTION_LAYER_TAP_KEY()` entries in `fn_actions` to `LT()` keycodes | ||
51 | |||
52 | * `fn_actions` is deprecated, and its functionality has been superseded by direct keycodes and `process_record_user()` | ||
53 | * The end result of removing this obsolete feature should result in a decent reduction in firmware size and code complexity | ||
54 | * All keymaps affected are recommended to switch away from `fn_actions` in favour of the [custom keycode](https://docs.qmk.fm/#/custom_quantum_functions) and [macro](https://docs.qmk.fm/#/feature_macros) features | ||
55 | |||
56 | |||
57 | ## Moving backlight keycode handling to `process_keycode/` | ||
58 | |||
59 | * This refactors the backlight keycode logic to be clearer and more modular. | ||
60 | * All backlight-related keycodes are now actioned in a single file. | ||
61 | * The `ACTION_BACKLIGHT_*` macros have also been deleted. If you are still using these in a `fn_actions[]` block, please switch to using the backlight keycodes or functions directly. | ||
62 | |||
63 | |||
64 | ## Refactor Planck keymaps to use Layout Macros | ||
65 | |||
66 | * Refactor Planck keymaps to use layout macros instead of raw matrix assignments | ||
67 | * Makes keymaps revision-agnostic | ||
68 | * Should reduce noise and errors in Travis CI logs | ||
69 | |||
70 | |||
71 | ## GON NerD codebase refactor | ||
72 | |||
73 | * Splits the codebase for GON NerD 60 and NerdD TKL PCBs into two separate directories. | ||
74 | * If your keymap is for a NerD 60 PCB, your `make` command is now `make gon/nerd60:<keymap>`. | ||
75 | * If your keymap is for a NerD TKL PCB, your `make` command is now `make gon/nerdtkl:<keymap>`. | ||
diff --git a/docs/feature_backlight.md b/docs/feature_backlight.md index e74aab1e3..7c68d74e1 100644 --- a/docs/feature_backlight.md +++ b/docs/feature_backlight.md | |||
@@ -119,10 +119,22 @@ When both timers are in use for Audio, the backlight PWM will not use a hardware | |||
119 | 119 | ||
120 | To change the behavior of the backlighting, `#define` these in your `config.h`: | 120 | To change the behavior of the backlighting, `#define` these in your `config.h`: |
121 | 121 | ||
122 | |Define |Default |Description | | 122 | |Define |Default |Description | |
123 | |---------------------|-------------|--------------------------------------------------------------------------------------------------------------| | 123 | |---------------------|-------------|-------------------------------------------------------------------------------------------------------------| |
124 | |`BACKLIGHT_PIN` |`B7` |The pin that controls the LEDs. Unless you are designing your own keyboard, you shouldn't need to change this | | 124 | |`BACKLIGHT_PIN` |`B7` |The pin that controls the LEDs. Unless you are designing your own keyboard, you shouldn't need to change this| |
125 | |`BACKLIGHT_PINS` |*Not defined*|experimental: see below for more information | | 125 | |`BACKLIGHT_PINS` |*Not defined*|experimental: see below for more information | |
126 | |`BACKLIGHT_LEVELS` |`3` |The number of brightness levels (maximum 31 excluding off) | | ||
127 | |`BACKLIGHT_CAPS_LOCK`|*Not defined*|Enable Caps Lock indicator using backlight (for keyboards without dedicated LED) | | ||
128 | |`BACKLIGHT_BREATHING`|*Not defined*|Enable backlight breathing, if supported | | ||
129 | |`BREATHING_PERIOD` |`6` |The length of one backlight "breath" in seconds | | ||
130 | |`BACKLIGHT_ON_STATE` |`1` |The state of the backlight pin when the backlight is "on" - `1` for high, `0` for low | | ||
131 | |||
132 | ### Backlight On State | ||
133 | |||
134 | Most backlight circuits are driven by an N-channel MOSFET or NPN transistor. This means that to turn the transistor *on* and light the LEDs, you must drive the backlight pin, connected to the gate or base, *high*. | ||
135 | Sometimes, however, a P-channel MOSFET, or a PNP transistor is used. In this case, when the transistor is on, the pin is driven *low* instead. | ||
136 | |||
137 | This functionality is configured at the keyboard level with the `BACKLIGHT_ON_STATE` define. | ||
126 | 138 | ||
127 | ### Multiple backlight pins | 139 | ### Multiple backlight pins |
128 | 140 | ||
diff --git a/docs/feature_encoders.md b/docs/feature_encoders.md index cbf72914e..4a0ae60c3 100644 --- a/docs/feature_encoders.md +++ b/docs/feature_encoders.md | |||
@@ -2,23 +2,35 @@ | |||
2 | 2 | ||
3 | Basic encoders are supported by adding this to your `rules.mk`: | 3 | Basic encoders are supported by adding this to your `rules.mk`: |
4 | 4 | ||
5 | ENCODER_ENABLE = yes | 5 | ```make |
6 | ENCODER_ENABLE = yes | ||
7 | ``` | ||
6 | 8 | ||
7 | and this to your `config.h`: | 9 | and this to your `config.h`: |
8 | 10 | ||
9 | #define ENCODERS_PAD_A { B12 } | 11 | ```c |
10 | #define ENCODERS_PAD_B { B13 } | 12 | #define ENCODERS_PAD_A { B12 } |
13 | #define ENCODERS_PAD_B { B13 } | ||
14 | ``` | ||
11 | 15 | ||
12 | Each PAD_A/B variable defines an array so multiple encoders can be defined, e.g.: | 16 | Each PAD_A/B variable defines an array so multiple encoders can be defined, e.g.: |
13 | 17 | ||
14 | #define ENCODERS_PAD_A { encoder1a, encoder2a } | 18 | ```c |
15 | #define ENCODERS_PAD_B { encoder1b, encoder2b } | 19 | #define ENCODERS_PAD_A { encoder1a, encoder2a } |
20 | #define ENCODERS_PAD_B { encoder1b, encoder2b } | ||
21 | ``` | ||
22 | |||
23 | If your encoder's clockwise directions are incorrect, you can swap the A & B pad definitions. They can also be flipped with a define: | ||
16 | 24 | ||
17 | If your encoder's clockwise directions are incorrect, you can swap the A & B pad definitions. | 25 | ```c |
26 | #define ENCODER_DIRECTION_FLIP | ||
27 | ``` | ||
18 | 28 | ||
19 | Additionally, the resolution can be specified in the same file (the default & suggested is 4): | 29 | Additionally, the resolution can be specified in the same file (the default & suggested is 4): |
20 | 30 | ||
21 | #define ENCODER_RESOLUTION 4 | 31 | ```c |
32 | #define ENCODER_RESOLUTION 4 | ||
33 | ``` | ||
22 | 34 | ||
23 | ## Split Keyboards | 35 | ## Split Keyboards |
24 | 36 | ||
@@ -33,27 +45,31 @@ If you are using different pinouts for the encoders on each half of a split keyb | |||
33 | 45 | ||
34 | The callback functions can be inserted into your `<keyboard>.c`: | 46 | The callback functions can be inserted into your `<keyboard>.c`: |
35 | 47 | ||
36 | void encoder_update_kb(uint8_t index, bool clockwise) { | 48 | ```c |
37 | encoder_update_user(index, clockwise); | 49 | void encoder_update_kb(uint8_t index, bool clockwise) { |
38 | } | 50 | encoder_update_user(index, clockwise); |
51 | } | ||
52 | ``` | ||
39 | 53 | ||
40 | or `keymap.c`: | 54 | or `keymap.c`: |
41 | 55 | ||
42 | void encoder_update_user(uint8_t index, bool clockwise) { | 56 | ```c |
43 | if (index == 0) { /* First encoder */ | 57 | void encoder_update_user(uint8_t index, bool clockwise) { |
58 | if (index == 0) { /* First encoder */ | ||
44 | if (clockwise) { | 59 | if (clockwise) { |
45 | tap_code(KC_PGDN); | 60 | tap_code(KC_PGDN); |
46 | } else { | 61 | } else { |
47 | tap_code(KC_PGUP); | 62 | tap_code(KC_PGUP); |
48 | } | 63 | } |
49 | } else if (index == 1) { /* Second encoder */ | 64 | } else if (index == 1) { /* Second encoder */ |
50 | if (clockwise) { | 65 | if (clockwise) { |
51 | tap_code(KC_UP); | 66 | tap_code(KC_DOWN); |
52 | } else { | 67 | } else { |
53 | tap_code(KC_DOWN); | 68 | tap_code(KC_UP); |
54 | } | 69 | } |
55 | } | ||
56 | } | 70 | } |
71 | } | ||
72 | ``` | ||
57 | 73 | ||
58 | ## Hardware | 74 | ## Hardware |
59 | 75 | ||