aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/ChangeLog/20210529/PR12172.md13
-rw-r--r--docs/adc_driver.md154
-rw-r--r--docs/feature_auto_shift.md27
-rw-r--r--docs/feature_leader_key.md13
-rw-r--r--docs/feature_led_matrix.md2
-rw-r--r--docs/feature_rgb_matrix.md2
-rw-r--r--docs/feature_rgblight.md1
-rw-r--r--docs/feature_wpm.md67
-rw-r--r--docs/flashing.md26
-rw-r--r--docs/ja/feature_led_matrix.md2
-rw-r--r--docs/keycodes.md3
-rw-r--r--docs/one_shot_keys.md3
-rw-r--r--docs/ws2812_driver.md22
13 files changed, 244 insertions, 91 deletions
diff --git a/docs/ChangeLog/20210529/PR12172.md b/docs/ChangeLog/20210529/PR12172.md
new file mode 100644
index 000000000..0c355c151
--- /dev/null
+++ b/docs/ChangeLog/20210529/PR12172.md
@@ -0,0 +1,13 @@
1## Bootmagic Deprecation and Refactor ([#12172](https://github.com/qmk/qmk_firmware/pull/12172))
2
3QMK has decided to deprecate the full Bootmagic feature and leave Bootmagic Lite as the only remaining option.
4
5This pull request changes the behavior of `BOOTMAGIC_ENABLE` such that specifying `BOOTMAGIC_ENABLE = yes` enables Bootmagic Lite instead of full Bootmagic.
6
7### Tentative Deprecation Schedule
8
9This is the current planned roadmap for the behavior of `BOOTMAGIC_ENABLE`:
10
11- From 2021-05-29, setting `BOOTMAGIC_ENABLE = yes` will enable Bootmagic Lite instead of full Bootmagic.
12- From 2021-08-28, `BOOTMAGIC_ENABLE` must be either `yes`, `lite`, or `no` – setting `BOOTMAGIC_ENABLE = full` will cause compilation to fail.
13- From 2021-11-27, `BOOTMAGIC_ENABLE` must be either `yes` or `no` – setting `BOOTMAGIC_ENABLE = lite` will cause compilation to fail.
diff --git a/docs/adc_driver.md b/docs/adc_driver.md
index 6e3d51386..69fff4b3c 100644
--- a/docs/adc_driver.md
+++ b/docs/adc_driver.md
@@ -47,73 +47,79 @@ Note that some of these pins are doubled-up on ADCs with the same channel. This
47 47
48Also note that the F0 and F3 use different numbering schemes. The F0 has a single ADC and the channels are 0-indexed, whereas the F3 has 4 ADCs and the channels are 1-indexed. This is because the F0 uses the `ADCv1` implementation of the ADC, whereas the F3 uses the `ADCv3` implementation. 48Also note that the F0 and F3 use different numbering schemes. The F0 has a single ADC and the channels are 0-indexed, whereas the F3 has 4 ADCs and the channels are 1-indexed. This is because the F0 uses the `ADCv1` implementation of the ADC, whereas the F3 uses the `ADCv3` implementation.
49 49
50|ADC|Channel|STM32F0xx|STM32F3xx| 50|ADC|Channel|STM32F0xx|STM32F1xx|STM32F3xx|STM32F4xx|
51|---|-------|---------|---------| 51|---|-------|---------|---------|---------|---------|
52|1 |0 |`A0` | | 52|1 |0 |`A0` |`A0` | |`A0` |
53|1 |1 |`A1` |`A0` | 53|1 |1 |`A1` |`A1` |`A0` |`A1` |
54|1 |2 |`A2` |`A1` | 54|1 |2 |`A2` |`A2` |`A1` |`A2` |
55|1 |3 |`A3` |`A2` | 55|1 |3 |`A3` |`A3` |`A2` |`A3` |
56|1 |4 |`A4` |`A3` | 56|1 |4 |`A4` |`A4` |`A3` |`A4` |
57|1 |5 |`A5` |`F4` | 57|1 |5 |`A5` |`A5` |`F4` |`A5` |
58|1 |6 |`A6` |`C0` | 58|1 |6 |`A6` |`A6` |`C0` |`A6` |
59|1 |7 |`A7` |`C1` | 59|1 |7 |`A7` |`A7` |`C1` |`A7` |
60|1 |8 |`B0` |`C2` | 60|1 |8 |`B0` |`B0` |`C2` |`B0` |
61|1 |9 |`B1` |`C3` | 61|1 |9 |`B1` |`B1` |`C3` |`B1` |
62|1 |10 |`C0` |`F2` | 62|1 |10 |`C0` |`C0` |`F2` |`C0` |
63|1 |11 |`C1` | | 63|1 |11 |`C1` |`C1` | |`C1` |
64|1 |12 |`C2` | | 64|1 |12 |`C2` |`C2` | |`C2` |
65|1 |13 |`C3` | | 65|1 |13 |`C3` |`C3` | |`C3` |
66|1 |14 |`C4` | | 66|1 |14 |`C4` |`C4` | |`C4` |
67|1 |15 |`C5` | | 67|1 |15 |`C5` |`C5` | |`C5` |
68|1 |16 | | | 68|1 |16 | | | | |
69|2 |1 | |`A4` | 69|2 |0 | |`A0`¹ | |`A0`² |
70|2 |2 | |`A5` | 70|2 |1 | |`A1`¹ |`A4` |`A1`² |
71|2 |3 | |`A6` | 71|2 |2 | |`A2`¹ |`A5` |`A2`² |
72|2 |4 | |`A7` | 72|2 |3 | |`A3`¹ |`A6` |`A3`² |
73|2 |5 | |`C4` | 73|2 |4 | |`A4`¹ |`A7` |`A4`² |
74|2 |6 | |`C0` | 74|2 |5 | |`A5`¹ |`C4` |`A5`² |
75|2 |7 | |`C1` | 75|2 |6 | |`A6`¹ |`C0` |`A6`² |
76|2 |8 | |`C2` | 76|2 |7 | |`A7`¹ |`C1` |`A7`² |
77|2 |9 | |`C3` | 77|2 |8 | |`B0`¹ |`C2` |`B0`² |
78|2 |10 | |`F2` | 78|2 |9 | |`B1`¹ |`C3` |`B1`² |
79|2 |11 | |`C5` | 79|2 |10 | |`C0`¹ |`F2` |`C0`² |
80|2 |12 | |`B2` | 80|2 |11 | |`C1`¹ |`C5` |`C1`² |
81|2 |13 | | | 81|2 |12 | |`C2`¹ |`B2` |`C2`² |
82|2 |14 | | | 82|2 |13 | |`C3`¹ | |`C3`² |
83|2 |15 | | | 83|2 |14 | |`C4`¹ | |`C4`² |
84|2 |16 | | | 84|2 |15 | |`C5`¹ | |`C5`² |
85|3 |1 | |`B1` | 85|2 |16 | | | | |
86|3 |2 | |`E9` | 86|3 |0 | |`A0`¹ | |`A0`² |
87|3 |3 | |`E13` | 87|3 |1 | |`A1`¹ |`B1` |`A1`² |
88|3 |4 | | | 88|3 |2 | |`A2`¹ |`E9` |`A2`² |
89|3 |5 | | | 89|3 |3 | |`A3`¹ |`E13` |`A3`² |
90|3 |6 | |`E8` | 90|3 |4 | |`F6`¹ | |`F6`² |
91|3 |7 | |`D10` | 91|3 |5 | |`F7`¹ |`B13` |`F7`² |
92|3 |8 | |`D11` | 92|3 |6 | |`F8`¹ |`E8` |`F8`² |
93|3 |9 | |`D12` | 93|3 |7 | |`F9`¹ |`D10` |`F9`² |
94|3 |10 | |`D13` | 94|3 |8 | |`F10`¹ |`D11` |`F10`² |
95|3 |11 | |`D14` | 95|3 |9 | | |`D12` |`F3`² |
96|3 |12 | |`B0` | 96|3 |10 | |`C0`¹ |`D13` |`C0`² |
97|3 |13 | |`E7` | 97|3 |11 | |`C1`¹ |`D14` |`C1`² |
98|3 |14 | |`E10` | 98|3 |12 | |`C2`¹ |`B0` |`C2`² |
99|3 |15 | |`E11` | 99|3 |13 | |`C3`¹ |`E7` |`C3`² |
100|3 |16 | |`E12` | 100|3 |14 | | |`E10` |`F4`² |
101|4 |1 | |`E14` | 101|3 |15 | | |`E11` |`F5`² |
102|4 |2 | |`B12` | 102|3 |16 | | |`E12` | |
103|4 |3 | |`B13` | 103|4 |1 | | |`E14` | |
104|4 |4 | |`B14` | 104|4 |2 | | |`E15` | |
105|4 |5 | |`B15` | 105|4 |3 | | |`B12` | |
106|4 |6 | |`E8` | 106|4 |4 | | |`B14` | |
107|4 |7 | |`D10` | 107|4 |5 | | |`B15` | |
108|4 |8 | |`D11` | 108|4 |6 | | |`E8` | |
109|4 |9 | |`D12` | 109|4 |7 | | |`D10` | |
110|4 |10 | |`D13` | 110|4 |8 | | |`D11` | |
111|4 |11 | |`D14` | 111|4 |9 | | |`D12` | |
112|4 |12 | |`D8` | 112|4 |10 | | |`D13` | |
113|4 |13 | |`D9` | 113|4 |11 | | |`D14` | |
114|4 |14 | | | 114|4 |12 | | |`D8` | |
115|4 |15 | | | 115|4 |13 | | |`D9` | |
116|4 |16 | | | 116|4 |14 | | | | |
117|4 |15 | | | | |
118|4 |16 | | | | |
119
120<sup>¹ As of ChibiOS 20.3.4, the ADC driver for STM32F1xx devices supports only ADC1, therefore any configurations involving ADC2 or ADC3 cannot actually be used. In particular, pins `F6`…`F10`, which are present at least on some STM32F103x[C-G] devices, cannot be used as ADC inputs because of this driver limitation.</sup>
121
122<sup>² Not all STM32F4xx devices have ADC2 and/or ADC3, therefore some configurations shown in this table may be unavailable; in particular, pins `F4`…`F10` cannot be used as ADC inputs on devices which do not have ADC3. Check the device datasheet to confirm which pin functions are supported.</sup>
117 123
118## Functions 124## Functions
119 125
@@ -141,10 +147,10 @@ Also note that the F0 and F3 use different numbering schemes. The F0 has a singl
141 147
142The ARM implementation of the ADC has a few additional options that you can override in your own keyboards and keymaps to change how it operates. Please consult the corresponding `hal_adc_lld.h` in ChibiOS for your specific microcontroller for further documentation on your available options. 148The ARM implementation of the ADC has a few additional options that you can override in your own keyboards and keymaps to change how it operates. Please consult the corresponding `hal_adc_lld.h` in ChibiOS for your specific microcontroller for further documentation on your available options.
143 149
144|`#define` |Type |Default |Description | 150|`#define` |Type |Default |Description |
145|---------------------|------|---------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| 151|---------------------|------|----------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
146|`ADC_CIRCULAR_BUFFER`|`bool`|`false` |If `true`, then the implementation will use a circular buffer. | 152|`ADC_CIRCULAR_BUFFER`|`bool`|`false` |If `true`, then the implementation will use a circular buffer. |
147|`ADC_NUM_CHANNELS` |`int` |`1` |Sets the number of channels that will be scanned as part of an ADC operation. The current implementation only supports `1`. | 153|`ADC_NUM_CHANNELS` |`int` |`1` |Sets the number of channels that will be scanned as part of an ADC operation. The current implementation only supports `1`. |
148|`ADC_BUFFER_DEPTH` |`int` |`2` |Sets the depth of each result. Since we are only getting a 12-bit result by default, we set this to 2 bytes so we can contain our one value. This could be set to 1 if you opt for an 8-bit or lower result.| 154|`ADC_BUFFER_DEPTH` |`int` |`2` |Sets the depth of each result. Since we are only getting a 10-bit result by default, we set this to 2 bytes so we can contain our one value. This could be set to 1 if you opt for an 8-bit or lower result.|
149|`ADC_SAMPLING_RATE` |`int` |`ADC_SMPR_SMP_1P5` |Sets the sampling rate of the ADC. By default, it is set to the fastest setting. | 155|`ADC_SAMPLING_RATE` |`int` |`ADC_SMPR_SMP_1P5` |Sets the sampling rate of the ADC. By default, it is set to the fastest setting. |
150|`ADC_RESOLUTION` |`int` |`ADC_CFGR1_RES_12BIT`|The resolution of your result. We choose 12 bit by default, but you can opt for 12, 10, 8, or 6 bit. | 156|`ADC_RESOLUTION` |`int` |`ADC_CFGR1_RES_10BIT` or `ADC_CFGR_RES_10BITS`|The resolution of your result. We choose 10 bit by default, but you can opt for 12, 10, 8, or 6 bit. Different MCUs use slightly different names for the resolution constants. |
diff --git a/docs/feature_auto_shift.md b/docs/feature_auto_shift.md
index 8e04d9dd3..ec7eeaaa0 100644
--- a/docs/feature_auto_shift.md
+++ b/docs/feature_auto_shift.md
@@ -109,6 +109,33 @@ Do not Auto Shift numeric keys, zero through nine.
109 109
110Do not Auto Shift alpha characters, which include A through Z. 110Do not Auto Shift alpha characters, which include A through Z.
111 111
112### Auto Shift Per Key
113
114This is a function that allows you to determine which keys shold be autoshifted, much like the tap-hold keys.
115
116The default function looks like this:
117
118```c
119bool get_auto_shifted_key(uint16_t keycode, keyrecord_t *record) {
120 switch (keycode) {
121# ifndef NO_AUTO_SHIFT_ALPHA
122 case KC_A ... KC_Z:
123# endif
124# ifndef NO_AUTO_SHIFT_NUMERIC
125 case KC_1 ... KC_0:
126# endif
127# ifndef NO_AUTO_SHIFT_SPECIAL
128 case KC_TAB:
129 case KC_MINUS ... KC_SLASH:
130 case KC_NONUS_BSLASH:
131# endif
132 return true;
133 }
134 return false;
135}
136```
137This functionality is enabled by default, and does not need a define.
138
112### AUTO_SHIFT_REPEAT (simple define) 139### AUTO_SHIFT_REPEAT (simple define)
113 140
114Enables keyrepeat. 141Enables keyrepeat.
diff --git a/docs/feature_leader_key.md b/docs/feature_leader_key.md
index 41ff8f1a4..f10bca758 100644
--- a/docs/feature_leader_key.md
+++ b/docs/feature_leader_key.md
@@ -72,6 +72,19 @@ SEQ_THREE_KEYS(KC_C, KC_C, KC_C) {
72} 72}
73``` 73```
74 74
75## Infinite Leader key timeout
76
77Sometimes your leader key is not on a comfortable places as the rest of keys on your sequence. Imagine that your leader key is one of your outer top right keys, you may need to reposition your hand just to reach your leader key.
78This can make typing the entire sequence on time hard even if you are able to type most of the sequence fast. For example, if your sequence is `Leader + asd` typing `asd` fast is very easy once you have your hands in your home row. However starting the sequence in time after moving your hand out of the home row to reach the leader key and back is not.
79To remove the stress this situation produces to your hands you can enable an infinite timeout just for the leader key. This mean that, after you hit the leader key you will have an infinite amount of time to start the rest of the sequence, allowing you to proper position your hands on the best position to type the rest of the sequence comfortably.
80This infinite timeout only affects the leader key, so in our previous example of `Leader + asd` you will have an infinite amount of time between `Leader` and `a`, but once you start the sequence the timeout you have configured (global or per key) will work normally.
81This way you can configure a very short `LEADER_TIMEOUT` but still have plenty of time to position your hands.
82
83In order to enable this, place this in your `config.h`:
84```c
85#define LEADER_NO_TIMEOUT
86```
87
75## Strict Key Processing 88## Strict Key Processing
76 89
77By default, the Leader Key feature will filter the keycode out of [`Mod-Tap`](mod_tap.md) and [`Layer Tap`](feature_layers.md#switching-and-toggling-layers) functions when checking for the Leader sequences. That means if you're using `LT(3, KC_A)`, it will pick this up as `KC_A` for the sequence, rather than `LT(3, KC_A)`, giving a more expected behavior for newer users. 90By default, the Leader Key feature will filter the keycode out of [`Mod-Tap`](mod_tap.md) and [`Layer Tap`](feature_layers.md#switching-and-toggling-layers) functions when checking for the Leader sequences. That means if you're using `LT(3, KC_A)`, it will pick this up as `KC_A` for the sequence, rather than `LT(3, KC_A)`, giving a more expected behavior for newer users.
diff --git a/docs/feature_led_matrix.md b/docs/feature_led_matrix.md
index f4a661634..ac2be2e77 100644
--- a/docs/feature_led_matrix.md
+++ b/docs/feature_led_matrix.md
@@ -79,7 +79,7 @@ Custom layer effects can be done by defining this in your `<keyboard>.c`:
79 79
80```c 80```c
81void led_matrix_indicators_kb(void) { 81void led_matrix_indicators_kb(void) {
82 led_matrix_set_index_value(index, value); 82 led_matrix_set_value(index, value);
83} 83}
84``` 84```
85 85
diff --git a/docs/feature_rgb_matrix.md b/docs/feature_rgb_matrix.md
index e996caddd..046b1f17f 100644
--- a/docs/feature_rgb_matrix.md
+++ b/docs/feature_rgb_matrix.md
@@ -447,6 +447,8 @@ These are defined in [`rgblight_list.h`](https://github.com/qmk/qmk_firmware/blo
447#define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS // Sets the default brightness value, if none has been set 447#define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS // Sets the default brightness value, if none has been set
448#define RGB_MATRIX_STARTUP_SPD 127 // Sets the default animation speed, if none has been set 448#define RGB_MATRIX_STARTUP_SPD 127 // Sets the default animation speed, if none has been set
449#define RGB_MATRIX_DISABLE_KEYCODES // disables control of rgb matrix by keycodes (must use code functions to control the feature) 449#define RGB_MATRIX_DISABLE_KEYCODES // disables control of rgb matrix by keycodes (must use code functions to control the feature)
450#define RGB_MATRIX_SPLIT { X, Y } // (Optional) For split keyboards, the number of LEDs connected on each half. X = left, Y = Right.
451 // If RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is enabled, you also will want to enable SPLIT_TRANSPORT_MIRROR
450``` 452```
451 453
452## EEPROM storage :id=eeprom-storage 454## EEPROM storage :id=eeprom-storage
diff --git a/docs/feature_rgblight.md b/docs/feature_rgblight.md
index d2612a6d1..8e8d6b81c 100644
--- a/docs/feature_rgblight.md
+++ b/docs/feature_rgblight.md
@@ -74,6 +74,7 @@ Changing the **Value** sets the overall brightness.<br>
74|`RGB_MODE_XMAS` |`RGB_M_X` |Christmas animation mode | 74|`RGB_MODE_XMAS` |`RGB_M_X` |Christmas animation mode |
75|`RGB_MODE_GRADIENT`|`RGB_M_G` |Static gradient animation mode | 75|`RGB_MODE_GRADIENT`|`RGB_M_G` |Static gradient animation mode |
76|`RGB_MODE_RGBTEST` |`RGB_M_T` |Red, Green, Blue test animation mode | 76|`RGB_MODE_RGBTEST` |`RGB_M_T` |Red, Green, Blue test animation mode |
77|`RGB_MODE_TWINKLE` |`RGB_M_TW`|Twinkle animation mode |
77 78
78!> By default, if you have both the RGB Light and the [RGB Matrix](feature_rgb_matrix.md) feature enabled, these keycodes will work for both features, at the same time. You can disable the keycode functionality by defining the `*_DISABLE_KEYCODES` option for the specific feature. 79!> By default, if you have both the RGB Light and the [RGB Matrix](feature_rgb_matrix.md) feature enabled, these keycodes will work for both features, at the same time. You can disable the keycode functionality by defining the `*_DISABLE_KEYCODES` option for the specific feature.
79 80
diff --git a/docs/feature_wpm.md b/docs/feature_wpm.md
index 12dd08057..c8ec3a7f3 100644
--- a/docs/feature_wpm.md
+++ b/docs/feature_wpm.md
@@ -1,25 +1,62 @@
1# Word Per Minute (WPM) Calculcation 1# Word Per Minute (WPM) Calculcation
2 2
3The WPM feature uses time between keystrokes to compute a rolling average words 3The WPM feature uses time between keystrokes to compute a rolling average words per minute rate and makes this available for various uses.
4per minute rate and makes this available for various uses.
5 4
6Enable the WPM system by adding this to your `rules.mk`: 5Enable the WPM system by adding this to your `rules.mk`:
7 6
8 WPM_ENABLE = yes 7 WPM_ENABLE = yes
9 8
10For split keyboards using soft serial, the computed WPM 9For split keyboards using soft serial, the computed WPM score will be available on the master AND slave half.
11score will be available on the master AND slave half.
12 10
13## Public Functions 11## Configuration
14
15`uint8_t get_current_wpm(void);`
16This function returns the current WPM as an unsigned integer.
17 12
13|Define |Default | Description |
14|-----------------------------|--------------|------------------------------------------------------------------------------------------|
15|`WPM_SMOOTHING` |`0.0487` | Sets the smoothing to about 40 keystrokes |
16|`WPM_ESTIMATED_WORD_SIZE` |`5` | This is the value used when estimating average word size (for regression and normal use) |
17|`WPM_ALLOW_COUNT_REGRESSOIN` |_Not defined_ | If defined allows the WPM to be decreased when hitting Delete or Backspace |
18## Public Functions
18 19
19## Customized keys for WPM calc 20|Function |Description |
20 21|--------------------------|--------------------------------------------------|
21By default, the WPM score only includes letters, numbers, space and some 22|`get_current_wpm(void)` | Returns the current WPM as a value between 0-255 |
22punctuation. If you want to change the set of characters considered as part of 23|`set_current_wpm(x)` | Sets the current WPM to `x` (between 0-255) |
23the WPM calculation, you can implement `wpm_keycode_user(uint16_t keycode)` 24
24and return true for any characters you would like included in the calculation, 25## Callbacks
25or false to not count that particular keycode. 26
27By default, the WPM score only includes letters, numbers, space and some punctuation. If you want to change the set of characters considered as part of the WPM calculation, you can implement your own `bool wpm_keycode_user(uint16_t keycode)` and return true for any characters you would like included in the calculation, or false to not count that particular keycode.
28
29For instance, the default is:
30
31```c
32bool wpm_keycode_user(uint16_t keycode) {
33 if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX) || (keycode >= QK_MODS && keycode <= QK_MODS_MAX)) {
34 keycode = keycode & 0xFF;
35 } else if (keycode > 0xFF) {
36 keycode = 0;
37 }
38 if ((keycode >= KC_A && keycode <= KC_0) || (keycode >= KC_TAB && keycode <= KC_SLASH)) {
39 return true;
40 }
41
42 return false;
43}
44```
45
46Additionally, if `WPM_ALLOW_COUNT_REGRESSION` is defined, there is the `uint8_t wpm_regress_count(uint16_t keycode)` function that allows you to decrease the WPM. This is useful if you want to be able to penalize certain keycodes (or even combinations).
47
48__attribute__((weak)) uint8_t wpm_regress_count(uint16_t keycode) {
49 bool weak_modded = (keycode >= QK_LCTL && keycode < QK_LSFT) || (keycode >= QK_RCTL && keycode < QK_RSFT);
50
51 if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX) || (keycode >= QK_MODS && keycode <= QK_MODS_MAX)) {
52 keycode = keycode & 0xFF;
53 } else if (keycode > 0xFF) {
54 keycode = 0;
55 }
56 if (((get_mods() | get_oneshot_mods()) & MOD_MASK_CTRL} || weak_modded) && (keycode == KC_DEL || keycode == KC_BSPC)) {
57 return WPM_ESTIMATED_WORD_SIZE;
58 }
59 if (keycode == KC_DEL || keycode == KC_BSPC) {
60 return 1;
61 }
62}
diff --git a/docs/flashing.md b/docs/flashing.md
index 7804a6bad..83c97444e 100644
--- a/docs/flashing.md
+++ b/docs/flashing.md
@@ -249,3 +249,29 @@ Flashing sequence:
2492. Wait for the OS to detect the device 2492. Wait for the OS to detect the device
2503. Flash a .bin file 2503. Flash a .bin file
2514. Reset the device into application mode (may be done automatically) 2514. Reset the device into application mode (may be done automatically)
252
253## tinyuf2
254
255Keyboards may opt into supporting the tinyuf2 bootloader. This is currently only supported on the F411 blackpill.
256
257The `rules.mk` setting for this bootloader is `tinyuf2`, and can be specified at the keymap or user level.
258
259To ensure compatibility with the tinyuf2 bootloader, make sure this block is present in your `rules.mk`:
260
261```make
262# Bootloader selection
263BOOTLOADER = tinyuf2
264```
265
266Compatible flashers:
267
268* Any application able to copy a file from one place to another, such as _macOS Finder_ or _Windows Explorer_.
269
270Flashing sequence:
271
2721. Enter the bootloader using any of the following methods:
273 * Tap the `RESET` keycode
274 * Double-tap the `nRST` button on the PCB.
2752. Wait for the OS to detect the device
2763. Copy the .uf2 file to the new USB disk
2774. Wait for the keyboard to become available
diff --git a/docs/ja/feature_led_matrix.md b/docs/ja/feature_led_matrix.md
index b73487ca6..62e22859f 100644
--- a/docs/ja/feature_led_matrix.md
+++ b/docs/ja/feature_led_matrix.md
@@ -76,7 +76,7 @@ I2C IS31FL3731 RGB コントローラを使ったアドレス指定可能な LED
76カスタムレイヤー効果は `<keyboard>.c` 内で以下を定義することで行うことができます: 76カスタムレイヤー効果は `<keyboard>.c` 内で以下を定義することで行うことができます:
77 77
78 void led_matrix_indicators_kb(void) { 78 void led_matrix_indicators_kb(void) {
79 led_matrix_set_index_value(index, value); 79 led_matrix_set_value(index, value);
80 } 80 }
81 81
82同様の関数がキーマップ内で `led_matrix_indicators_user` として動作します。 82同様の関数がキーマップ内で `led_matrix_indicators_user` として動作します。
diff --git a/docs/keycodes.md b/docs/keycodes.md
index 9acf8b683..f3c519b13 100644
--- a/docs/keycodes.md
+++ b/docs/keycodes.md
@@ -516,6 +516,9 @@ See also: [One Shot Keys](one_shot_keys.md)
516|------------|----------------------------------| 516|------------|----------------------------------|
517|`OSM(mod)` |Hold `mod` for one keypress | 517|`OSM(mod)` |Hold `mod` for one keypress |
518|`OSL(layer)`|Switch to `layer` for one keypress| 518|`OSL(layer)`|Switch to `layer` for one keypress|
519|`OS_ON` |Turns One Shot keys on |
520|`OS_OFF` |Turns One Shot keys off |
521|`OS_TOGG` |Toggles One Shot keys status |
519 522
520## Space Cadet :id=space-cadet 523## Space Cadet :id=space-cadet
521 524
diff --git a/docs/one_shot_keys.md b/docs/one_shot_keys.md
index 9a082d7d6..9fc548629 100644
--- a/docs/one_shot_keys.md
+++ b/docs/one_shot_keys.md
@@ -17,6 +17,9 @@ You can control the behavior of one shot keys by defining these in `config.h`:
17 17
18* `OSM(mod)` - Momentarily hold down *mod*. You must use the `MOD_*` keycodes as shown in [Mod Tap](mod_tap.md), not the `KC_*` codes. 18* `OSM(mod)` - Momentarily hold down *mod*. You must use the `MOD_*` keycodes as shown in [Mod Tap](mod_tap.md), not the `KC_*` codes.
19* `OSL(layer)` - momentary switch to *layer*. 19* `OSL(layer)` - momentary switch to *layer*.
20* `OS_ON` - Turns on One Shot keys.
21* `OS_OFF` - Turns off One Shot keys. OSM act as regular mod keys, OSL act like `MO`.
22* `ON_TOGG` - Toggles the one shot key status.
20 23
21Sometimes, you want to activate a one-shot key as part of a macro or tap dance routine. 24Sometimes, you want to activate a one-shot key as part of a macro or tap dance routine.
22 25
diff --git a/docs/ws2812_driver.md b/docs/ws2812_driver.md
index cca6827ec..e69400364 100644
--- a/docs/ws2812_driver.md
+++ b/docs/ws2812_driver.md
@@ -77,6 +77,25 @@ Configure the hardware via your config.h:
77 77
78You must also turn on the SPI feature in your halconf.h and mcuconf.h 78You must also turn on the SPI feature in your halconf.h and mcuconf.h
79 79
80#### Circular Buffer Mode
81Some boards may flicker while in the normal buffer mode. To fix this issue, circular buffer mode may be used to rectify the issue.
82
83By default, the circular buffer mode is disabled.
84
85To enable this alternative buffer mode, place this into your `config.h` file:
86```c
87#define WS2812_SPI_USE_CIRCULAR_BUFFER
88```
89
90#### Setting baudrate with divisor
91To adjust the baudrate at which the SPI peripheral is configured, users will need to derive the target baudrate from the clock tree provided by STM32CubeMX.
92
93Only divisors of 2, 4, 8, 16, 32, 64, 128 and 256 are supported by hardware.
94
95|Define |Default|Description |
96|--------------------|-------|-------------------------------------|
97|`WS2812_SPI_DIVISOR`|`16` |SPI source clock peripheral divisor |
98
80#### Testing Notes 99#### Testing Notes
81 100
82While not an exhaustive list, the following table provides the scenarios that have been partially validated: 101While not an exhaustive list, the following table provides the scenarios that have been partially validated:
@@ -102,11 +121,14 @@ Configure the hardware via your config.h:
102#define WS2812_PWM_DRIVER PWMD2 // default: PWMD2 121#define WS2812_PWM_DRIVER PWMD2 // default: PWMD2
103#define WS2812_PWM_CHANNEL 2 // default: 2 122#define WS2812_PWM_CHANNEL 2 // default: 2
104#define WS2812_PWM_PAL_MODE 2 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 2 123#define WS2812_PWM_PAL_MODE 2 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 2
124//#define WS2812_PWM_COMPLEMENTARY_OUTPUT // Define for a complementary timer output (TIMx_CHyN); omit for a normal timer output (TIMx_CHy).
105#define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. 125#define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU.
106#define WS2812_DMA_CHANNEL 2 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. 126#define WS2812_DMA_CHANNEL 2 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU.
107#define WS2812_DMAMUX_ID STM32_DMAMUX1_TIM2_UP // DMAMUX configuration for TIMx_UP -- only required if your MCU has a DMAMUX peripheral, see the respective reference manual for the appropriate values for your MCU. 127#define WS2812_DMAMUX_ID STM32_DMAMUX1_TIM2_UP // DMAMUX configuration for TIMx_UP -- only required if your MCU has a DMAMUX peripheral, see the respective reference manual for the appropriate values for your MCU.
108``` 128```
109 129
130Note that using a complementary timer output (TIMx_CHyN) is possible only for advanced-control timers (TIM1, TIM8, TIM20 on STM32), and the `STM32_PWM_USE_ADVANCED` option in mcuconf.h must be set to `TRUE`. Complementary outputs of general-purpose timers are not supported due to ChibiOS limitations.
131
110You must also turn on the PWM feature in your halconf.h and mcuconf.h 132You must also turn on the PWM feature in your halconf.h and mcuconf.h
111 133
112#### Testing Notes 134#### Testing Notes