summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorWilliam Chang <william@factual.com>2019-07-13 10:18:33 -0700
committerWilliam Chang <william@factual.com>2019-07-13 10:18:33 -0700
commit71493b2f9bbd5f3d18373c518fa14ccafcbf48fc (patch)
tree3bb3e5e496621535611e087720aa5c4d7a533e5e /docs
parent86ad4988fe7ff64916127509d84f44c56fa097aa (diff)
parentda1f05fbc19477c05c0c01bb07fabfaf1ece9d54 (diff)
Merge branch 'master' of https://github.com/qmk/qmk_firmware
Diffstat (limited to 'docs')
-rw-r--r--docs/_summary.md7
-rw-r--r--docs/config_options.md12
-rw-r--r--docs/custom_quantum_functions.md2
-rw-r--r--docs/faq_build.md4
-rw-r--r--docs/feature_advanced_keycodes.md16
-rw-r--r--docs/feature_audio.md3
-rw-r--r--docs/feature_backlight.md25
-rw-r--r--docs/feature_bootmagic.md2
-rw-r--r--docs/feature_combo.md3
-rw-r--r--docs/feature_encoders.md2
-rw-r--r--docs/feature_oled_driver.md49
-rw-r--r--docs/feature_rgb_matrix.md50
-rw-r--r--docs/feature_rgblight.md134
-rw-r--r--docs/feature_space_cadet.md11
-rw-r--r--docs/feature_unicode.md68
-rw-r--r--docs/feature_userspace.md2
-rw-r--r--docs/features.md7
-rw-r--r--docs/getting_started_build_tools.md6
-rw-r--r--docs/getting_started_introduction.md8
-rw-r--r--docs/how_keyboards_work.md4
-rw-r--r--docs/i2c_driver.md29
-rw-r--r--docs/index.html8
-rw-r--r--docs/keycodes.md42
-rw-r--r--docs/newbs_flashing.md4
-rw-r--r--docs/quantum_keycodes.md7
-rw-r--r--docs/reference_configurator_support.md2
-rw-r--r--docs/zh-cn/_summary.md66
-rw-r--r--docs/zh-cn/contributing.md205
-rw-r--r--docs/zh-cn/custom_quantum_functions.md490
-rw-r--r--docs/zh-cn/faq.md6
-rw-r--r--docs/zh-cn/faq_build.md150
-rw-r--r--docs/zh-cn/faq_debug.md233
-rw-r--r--docs/zh-cn/faq_general.md19
-rw-r--r--docs/zh-cn/faq_keymap.md212
-rw-r--r--docs/zh-cn/getting_started_getting_help.md15
-rw-r--r--docs/zh-cn/getting_started_github.md59
-rw-r--r--docs/zh-cn/newbs.md23
-rw-r--r--docs/zh-cn/reference_glossary.md170
38 files changed, 1958 insertions, 197 deletions
diff --git a/docs/_summary.md b/docs/_summary.md
index 043943f1d8..8a40ccd7f2 100644
--- a/docs/_summary.md
+++ b/docs/_summary.md
@@ -52,18 +52,21 @@
* [Backlight](feature_backlight.md)
* [Bluetooth](feature_bluetooth.md)
* [Bootmagic](feature_bootmagic.md)
- * [Combos](feature_combo)
+ * [Combos](feature_combo.md)
* [Command](feature_command.md)
+ * [Debounce API](feature_debounce_type.md)
* [Dynamic Macros](feature_dynamic_macros.md)
* [Encoders](feature_encoders.md)
* [Grave Escape](feature_grave_esc.md)
+ * [Haptic Feedback](feature_haptic_feedback.md)
+ * [HD44780 LCD Controller](feature_hd44780.md)
* [Key Lock](feature_key_lock.md)
* [Layouts](feature_layouts.md)
* [Leader Key](feature_leader_key.md)
* [LED Matrix](feature_led_matrix.md)
* [Macros](feature_macros.md)
* [Mouse Keys](feature_mouse_keys.md)
- * [OLED Driver](feature_oled_driver)
+ * [OLED Driver](feature_oled_driver.md)
* [One Shot Keys](feature_advanced_keycodes.md#one-shot-keys)
* [Pointing Device](feature_pointing_device.md)
* [PS/2 Mouse](feature_ps2_mouse.md)
diff --git a/docs/config_options.md b/docs/config_options.md
index 3ef00394db..eb0a441ccc 100644
--- a/docs/config_options.md
+++ b/docs/config_options.md
@@ -76,14 +76,14 @@ This is a C header file that is one of the first things included, and will persi
* `#define B7_AUDIO`
* enables audio on pin B7 (duophony is enables if one of B[5-7]\_AUDIO is enabled along with one of C[4-6]\_AUDIO)
* `#define BACKLIGHT_PIN B7`
- * pin of the backlight - B5, B6, B7 use PWM, others use softPWM
+ * pin of the backlight - `B5`, `B6`, `B7` and `C6` (and `D4` on ATmega32A) use hardware PWM, others use software implementation
* `#define BACKLIGHT_LEVELS 3`
* number of levels your backlight will have (maximum 15 excluding off)
* `#define BACKLIGHT_BREATHING`
- * enables backlight breathing (only works with backlight pins B5, B6 and B7)
+ * enables backlight breathing
* `#define BREATHING_PERIOD 6`
* the length of one backlight "breath" in seconds
-* `#define DEBOUNCING_DELAY 5`
+* `#define DEBOUNCE 5`
* the delay when reading the value of the pin (5 is default)
* `#define LOCKING_SUPPORT_ENABLE`
* mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap
@@ -93,8 +93,8 @@ This is a C header file that is one of the first things included, and will persi
* key combination that allows the use of magic commands (useful for debugging)
* `#define USB_MAX_POWER_CONSUMPTION`
* sets the maximum power (in mA) over USB for the device (default: 500)
-* `#define SCL_CLOCK 100000L`
- * sets the SCL_CLOCK speed for split keyboards. The default is `100000L` but some boards can be set to `400000L`.
+* `#define F_SCL 100000L`
+ * sets the I2C clock rate speed for keyboards using I2C. The default is `400000L`, except for keyboards using `split_common`, where the default is `100000L`.
## Features That Can Be Disabled
@@ -171,6 +171,8 @@ If you define these options you will enable the associated feature, which may in
* how long for the Combo keys to be detected. Defaults to `TAPPING_TERM` if not defined.
* `#define TAP_CODE_DELAY 100`
* Sets the delay between `register_code` and `unregister_code`, if you're having issues with it registering properly (common on VUSB boards). The value is in milliseconds.
+* `#define TAP_HOLD_CAPS_DELAY 200`
+ * Sets the delay for Tap Hold keys (`LT`, `MT`) when using `KC_CAPSLOCK` keycode, as this has some special handling on MacOS. The value is in milliseconds, and defaults to 200ms if not defined.
## RGB Light Configuration
diff --git a/docs/custom_quantum_functions.md b/docs/custom_quantum_functions.md
index 6287b95309..7be82c650f 100644
--- a/docs/custom_quantum_functions.md
+++ b/docs/custom_quantum_functions.md
@@ -267,7 +267,7 @@ You should use this function if you need custom matrix scanning code. It can als
If the board supports it, it can be "idled", by stopping a number of functions. A good example of this is RGB lights or backlights. This can save on power consumption, or may be better behavior for your keyboard.
-This is controlled by two functions: `suspend_power_down_*` and `suspend_wakeup_init_*`, which are called when the system is board is idled and when it wakes up, respectively.
+This is controlled by two functions: `suspend_power_down_*` and `suspend_wakeup_init_*`, which are called when the system board is idled and when it wakes up, respectively.
### Example suspend_power_down_user() and suspend_wakeup_init_user() Implementation
diff --git a/docs/faq_build.md b/docs/faq_build.md
index 0c1bedd715..23d6a67021 100644
--- a/docs/faq_build.md
+++ b/docs/faq_build.md
@@ -140,8 +140,8 @@ For now, you need to rollback avr-gcc to 7 in brew.
```
brew uninstall --force avr-gcc
-brew install avr-gcc@7
-brew link --force avr-gcc@7
+brew install avr-gcc@8
+brew link --force avr-gcc@8
```
### I just flashed my keyboard and it does nothing/keypresses don't register - it's also ARM (rev6 planck, clueboard 60, hs60v2, etc...) (Feb 2019)
diff --git a/docs/feature_advanced_keycodes.md b/docs/feature_advanced_keycodes.md
index a6ddf458cc..f748ccd70c 100644
--- a/docs/feature_advanced_keycodes.md
+++ b/docs/feature_advanced_keycodes.md
@@ -256,10 +256,10 @@ If you press a Mod Tap key, tap another key (press and release) and then release
For Instance:
-- `SHFT_T(KC_A)` Down
+- `SFT_T(KC_A)` Down
- `KC_X` Down
- `KC_X` Up
-- `SHFT_T(KC_A)` Up
+- `SFT_T(KC_A)` Up
Normally, if you do all this within the `TAPPING_TERM` (default: 200ms) this will be registered as `ax` by the firmware and host system. With permissive hold enabled, this modifies how this is handled by considering the Mod Tap keys as a Mod if another key is tapped, and would registered as `X` (`SHIFT`+`x`).
@@ -279,9 +279,9 @@ Setting `Ignore Mod Tap Interrupt` requires holding both keys for the `TAPPING_
For Instance:
-- `SHFT_T(KC_A)` Down
+- `SFT_T(KC_A)` Down
- `KC_X` Down
-- `SHFT_T(KC_A)` Up
+- `SFT_T(KC_A)` Up
- `KC_X` Up
Normally, this would send `X` (`SHIFT`+`x`). With `Ignore Mod Tap Interrupt` enabled, holding both keys are required for the `TAPPING_TERM` to register the hold action. A quick tap will output `ax` in this case, while a hold on both will still output `X` (`SHIFT`+`x`).
@@ -303,11 +303,11 @@ When the user holds a key after tap, this repeats the tapped key rather to hold
Example:
-- SHFT_T(KC_A) Down
-- SHFT_T(KC_A) Up
-- SHFT_T(KC_A) Down
+- SFT_T(KC_A) Down
+- SFT_T(KC_A) Up
+- SFT_T(KC_A) Down
- wait more than tapping term...
-- SHFT_T(KC_A) Up
+- SFT_T(KC_A) Up
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.
diff --git a/docs/feature_audio.md b/docs/feature_audio.md
index e1dd4c5a85..7511598bcf 100644
--- a/docs/feature_audio.md
+++ b/docs/feature_audio.md
@@ -175,8 +175,9 @@ You can configure the default, min and max frequencies, the stepping and built i
| `AUDIO_CLICKY_FREQ_DEFAULT` | 440.0f | Sets the default/starting audio frequency for the clicky sounds. |
| `AUDIO_CLICKY_FREQ_MIN` | 65.0f | Sets the lowest frequency (under 60f are a bit buggy). |
| `AUDIO_CLICKY_FREQ_MAX` | 1500.0f | Sets the the highest frequency. Too high may result in coworkers attacking you. |
-| `AUDIO_CLICKY_FREQ_FACTOR` | 1.18921f| Sets the stepping of UP/DOWN key codes. |
+| `AUDIO_CLICKY_FREQ_FACTOR` | 1.18921f| Sets the stepping of UP/DOWN key codes. This is a multiplicative factor. The default steps the frequency up/down by a musical minor third. |
| `AUDIO_CLICKY_FREQ_RANDOMNESS` | 0.05f | Sets a factor of randomness for the clicks, Setting this to `0f` will make each click identical, and `1.0f` will make this sound much like the 90's computer screen scrolling/typing effect. |
+| `AUDIO_CLICKY_DELAY_DURATION` | 1 | An integer note duration where 1 is 1/16th of the tempo, or a sixty-fourth note (see `quantum/audio/musical_notes.h` for implementation details). The main clicky effect will be delayed by this duration. Adjusting this to values around 6-12 will help compensate for loud switches. |
diff --git a/docs/feature_backlight.md b/docs/feature_backlight.md
index 048d75390d..b06db89e4d 100644
--- a/docs/feature_backlight.md
+++ b/docs/feature_backlight.md
@@ -34,13 +34,14 @@ Hardware PWM is only supported on certain pins of the MCU, so if the backlightin
Hardware PWM is supported according to the following table:
-| Backlight Pin | Hardware timer |
-|---------------|----------------|
-|`B5` | Timer 1 |
-|`B6` | Timer 1 |
-|`B7` | Timer 1 |
-|`C6` | Timer 3 |
-| other | Software PWM |
+| Backlight Pin | Hardware timer |
+|---------------|-------------------------|
+|`B5` | Timer 1 |
+|`B6` | Timer 1 |
+|`B7` | Timer 1 |
+|`C6` | Timer 3 |
+|`D4` | Timer 1 (ATmega32A only)|
+| other | Software PWM |
The [audio feature](feature_audio.md) also uses hardware timers. Please refer to the following table to know what hardware timer the software PWM will use depending on the audio configuration:
@@ -63,11 +64,17 @@ To change the behaviour of the backlighting, `#define` these in your `config.h`:
|Define |Default |Description |
|---------------------|-------------|-------------------------------------------------------------------------------------------------------------|
|`BACKLIGHT_PIN` |`B7` |The pin that controls the LEDs. Unless you are designing your own keyboard, you shouldn't need to change this|
-|`BACKLIGHT_PINS` |*Not defined*|experimental: see below for more information|
+|`BACKLIGHT_PINS` |*Not defined*|experimental: see below for more information |
|`BACKLIGHT_LEVELS` |`3` |The number of brightness levels (maximum 15 excluding off) |
|`BACKLIGHT_CAPS_LOCK`|*Not defined*|Enable Caps Lock indicator using backlight (for keyboards without dedicated LED) |
-|`BACKLIGHT_BREATHING`|*Not defined*|Enable backlight breathing, if supported |
+|`BACKLIGHT_BREATHING`|*Not defined*|Enable backlight breathing, if supported |
|`BREATHING_PERIOD` |`6` |The length of one backlight "breath" in seconds |
+|`BACKLIGHT_ON_STATE` |`0` |The state of the backlight pin when the backlight is "on" - `1` for high, `0` for low |
+
+## Backlight On State
+
+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, *low*.
+Sometimes, however, a P-channel MOSFET, or a PNP transistor is used. In this case you must `#define BACKLIGHT_ON_STATE 1`, so that when the transistor is on, the pin is driven *high* instead.
## Multiple backlight pins
diff --git a/docs/feature_bootmagic.md b/docs/feature_bootmagic.md
index 39e4e47f4e..225189ccb7 100644
--- a/docs/feature_bootmagic.md
+++ b/docs/feature_bootmagic.md
@@ -140,7 +140,7 @@ To replace the function, all you need to do is add something like this to your c
```c
void bootmagic_lite(void) {
matrix_scan();
- wait_ms(DEBOUNCING_DELAY * 2);
+ wait_ms(DEBOUNCE * 2);
matrix_scan();
if (matrix_get_row(BOOTMAGIC_LITE_ROW) & (1 << BOOTMAGIC_LITE_COLUMN)) {
diff --git a/docs/feature_combo.md b/docs/feature_combo.md
index 680adce2dc..4cb1bcda08 100644
--- a/docs/feature_combo.md
+++ b/docs/feature_combo.md
@@ -29,6 +29,7 @@ enum combos {
AB_ESC,
JK_TAB
};
+
const uint16_t PROGMEM ab_combo[] = {KC_A, KC_B, COMBO_END};
const uint16_t PROGMEM jk_combo[] = {KC_J, KC_K, COMBO_END};
@@ -44,7 +45,7 @@ For a more complicated implementation, you can use the `process_combo_event` fun
enum combo_events {
ZC_COPY,
XV_PASTE
- };
+};
const uint16_t PROGMEM copy_combo[] = {KC_Z, KC_C, COMBO_END};
const uint16_t PROGMEM paste_combo[] = {KC_X, KC_V, COMBO_END};
diff --git a/docs/feature_encoders.md b/docs/feature_encoders.md
index dd12c91ce3..9ac97a9a16 100644
--- a/docs/feature_encoders.md
+++ b/docs/feature_encoders.md
@@ -38,7 +38,7 @@ or `keymap.c`:
} else {
tap_code(KC_PGUP);
}
- } else if (index == 1) { /* Second encoder
+ } else if (index == 1) { /* Second encoder */
if (clockwise) {
tap_code(KC_UP);
} else {
diff --git a/docs/feature_oled_driver.md b/docs/feature_oled_driver.md
index fcc19515a9..503e438288 100644
--- a/docs/feature_oled_driver.md
+++ b/docs/feature_oled_driver.md
@@ -2,9 +2,19 @@
## OLED Supported Hardware
-128x32 OLED modules using SSD1306 driver IC over I2C. Supported on AVR based keyboards. Possible but untested hardware includes ARM based keyboards and other sized OLED modules using SSD1306 over I2C, such as 128x64.
+OLED modules using SSD1306 or SH1106 driver ICs, communicating over I2C.
+Tested combinations:
-!> Warning: This OLED Driver currently uses the new i2c_master driver from split common code. If your split keyboard uses i2c to communication between sides this driver could cause an address conflict (serial is fine). Please contact your keyboard vendor and ask them to migrate to the latest split common code to fix this.
+| IC driver | Size | Keyboard Platform | Notes |
+|-----------|--------|-------------------|--------------------------|
+| SSD1306 | 128x32 | AVR | Primary support |
+| SSD1306 | 128x64 | AVR | Verified working |
+| SSD1306 | 128x32 | ARM | |
+| SH1106 | 128x64 | AVR | No rotation or scrolling |
+
+Hardware configurations using ARM-based microcontrollers or different sizes of OLED modules may be compatible, but are untested.
+
+!> Warning: This OLED Driver currently uses the new i2c_master driver from split common code. If your split keyboard uses I2C to communicate between sides, this driver could cause an address conflict (serial is fine). Please contact your keyboard vendor and ask them to migrate to the latest split common code to fix this. In addition, the display timeout system to reduce OLED burn-in also uses split common to detect keypresses, so you will need to implement custom timeout logic for non-split common keyboards.
## Usage
@@ -86,17 +96,17 @@ void oled_task_user(void) {
## Basic Configuration
-|Define |Default |Description |
-|-----------------------|---------------|------------------------------------------------|
-|`OLED_DISPLAY_ADDRESS` |`0x3C` |The i2c address of the OLED Display |
-|`OLED_FONT_H` |`"glcdfont.c"` |The font code file to use for custom fonts |
-|`OLED_FONT_START` |`0` |The starting characer index for custom fonts |
-|`OLED_FONT_END` |`224` |The ending characer index for custom fonts |
-|`OLED_FONT_WIDTH` |`6` |The font width |
-|`OLED_FONT_HEIGHT` |`8` |The font height (untested) |
-|`OLED_DISABLE_TIMEOUT` |*Not defined* |Disables the built in OLED timeout feature. Useful when implementing custom timeout rules.|
-
-
+| Define | Default | Description |
+|------------------------|-------------------|----------------------------------------------------------------------------------------------------------------------------|
+| `OLED_DISPLAY_ADDRESS` | `0x3C` | The i2c address of the OLED Display |
+| `OLED_FONT_H` | `"glcdfont.c"` | The font code file to use for custom fonts |
+| `OLED_FONT_START` | `0` | The starting characer index for custom fonts |
+| `OLED_FONT_END` | `224` | The ending characer index for custom fonts |
+| `OLED_FONT_WIDTH` | `6` | The font width |
+| `OLED_FONT_HEIGHT` | `8` | The font height (untested) |
+| `OLED_DISABLE_TIMEOUT` | *Not defined* | Disables the built in OLED timeout feature. Useful when implementing custom timeout rules. |
+| `OLED_IC` | `OLED_IC_SSD1306` | Set to `OLED_IC_SH1106` if you're using the SH1106 OLED controller. |
+| `OLED_COLUMN_OFFSET` | `0` | (SH1106 only.) Shift output to the right this many pixels.<br />Useful for 128x64 displays centered on a 132x64 SH1106 IC. |
## 128x64 & Custom sized OLED Displays
@@ -108,16 +118,19 @@ void oled_task_user(void) {
|`OLED_DISPLAY_CUSTOM` |*Not defined* |Changes the display defines for use with custom displays.<br />Requires user to implement the below defines. |
|`OLED_DISPLAY_WIDTH` |`128` |The width of the OLED display. |
|`OLED_DISPLAY_HEIGHT` |`32` |The height of the OLED display. |
-|`OLED_MATRIX_SIZE` |`512` |The local buffer size to allocate.<br />`(OLED_DISPLAY_HEIGHT / 8 * OLED_DISPLAY_WIDTH)`|
-|`OLED_BLOCK_TYPE` |`uint16_t` |The unsigned integer type to use for dirty rendering.|
-|`OLED_BLOCK_COUNT` |`16` |The number of blocks the display is divided into for dirty rendering.<br />`(sizeof(OLED_BLOCK_TYPE) * 8)`|
-|`OLED_BLOCK_SIZE` |`32` |The size of each block for dirty rendering<br />`(OLED_MATRIX_SIZE / OLED_BLOCK_COUNT)`|
+|`OLED_MATRIX_SIZE` |`512` |The local buffer size to allocate.<br />`(OLED_DISPLAY_HEIGHT / 8 * OLED_DISPLAY_WIDTH)`. |
+|`OLED_BLOCK_TYPE` |`uint16_t` |The unsigned integer type to use for dirty rendering. |
+|`OLED_BLOCK_COUNT` |`16` |The number of blocks the display is divided into for dirty rendering.<br />`(sizeof(OLED_BLOCK_TYPE) * 8)`. |
+|`OLED_BLOCK_SIZE` |`32` |The size of each block for dirty rendering<br />`(OLED_MATRIX_SIZE / OLED_BLOCK_COUNT)`. |
+|`OLED_COM_PINS` |`COM_PINS_SEQ` |How the SSD1306 chip maps it's memory to display.<br />Options are `COM_PINS_SEQ`, `COM_PINS_ALT`, `COM_PINS_SEQ_LR`, & `COM_PINS_ALT_LR`. |
|`OLED_SOURCE_MAP` |`{ 0, ... N }` |Precalculated source array to use for mapping source buffer to target OLED memory in 90 degree rendering. |
|`OLED_TARGET_MAP` |`{ 24, ... N }`|Precalculated target array to use for mapping source buffer to target OLED memory in 90 degree rendering. |
### 90 Degree Rotation - Technical Mumbo Jumbo
+!> Rotation is unsupported on the SH1106.
+
```C
// OLED Rotation enum values are flags
typedef enum {
@@ -249,6 +262,8 @@ uint8_t oled_max_chars(void);
uint8_t oled_max_lines(void);
```
+!> Scrolling and rotation are unsupported on the SH1106.
+
## SSD1306.h driver conversion guide
|Old API |Recommended New API |
diff --git a/docs/feature_rgb_matrix.md b/docs/feature_rgb_matrix.md
index 1e43414676..916fcdce03 100644
--- a/docs/feature_rgb_matrix.md
+++ b/docs/feature_rgb_matrix.md
@@ -30,9 +30,11 @@ Configure the hardware via your `config.h`:
#define DRIVER_COUNT 2
#define DRIVER_1_LED_TOTAL 25
#define DRIVER_2_LED_TOTAL 24
-#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL
+#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
```
+!> Note the parentheses, this is so when `DRIVER_LED_TOTAL` is used in code and expanded, the values are added together before any additional math is applied to them. As an example, `rand() % (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)` will give very different results than `rand() % DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL`.
+
Currently only 2 drivers are supported, but it would be trivial to support all 4 combinations.
Define these arrays listing all the LEDs in your `<keyboard>.c`:
@@ -40,11 +42,11 @@ Define these arrays listing all the LEDs in your `<keyboard>.c`:
```C
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
/* Refer to IS31 manual for these locations
- * driver
- * | R location
- * | | G location
- * | | | B location
- * | | | | */
+ * driver
+ * | R location
+ * | | G location
+ * | | | B location
+ * | | | | */
{0, C1_3, C2_3, C3_3},
....
}
@@ -91,11 +93,11 @@ Define these arrays listing all the LEDs in your `<keyboard>.c`:
```C
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
/* Refer to IS31 manual for these locations
- * driver
- * | R location
- * | | G location
- * | | | B location
- * | | | | */
+ * driver
+ * | R location
+ * | | G location
+ * | | | B location
+ * | | | | */
{0, B_1, A_1, C_1},
....
}
@@ -142,14 +144,16 @@ const led_config_t g_led_config = { {
} };
```
-The first part, `// Key Matrix to LED Index`, tells the system what key this LED represents by using the key's electrical matrix row & col. The second part, `// LED Index to Physical Position` represents the LED's physical position on the keyboard. The first value, `x`, is between 0-224 (inclusive), and the second value, `y`, is between 0-64 (inclusive). This range is due to effect that calculate the center or halves for their animations. The easiest way to calculate these positions is imagine your keyboard is a grid, and the top left of the keyboard represents x, y coordinate 0, 0 and the bottom right of your keyboard represents 224, 64. Using this as a basis, you can use the following formula to calculate the physical position:
+The first part, `// Key Matrix to LED Index`, tells the system what key this LED represents by using the key's electrical matrix row & col. The second part, `// LED Index to Physical Position` represents the LED's physical `{ x, y }` position on the keyboard. The default expected range of values for `{ x, y }` is the inclusive range `{ 0..224, 0..64 }`. This default expected range is due to effects that calculate the center of the keyboard for their animations. The easiest way to calculate these positions is imagine your keyboard is a grid, and the top left of the keyboard represents `{ x, y }` coordinate `{ 0, 0 }` and the bottom right of your keyboard represents `{ 224, 64 }`. Using this as a basis, you can use the following formula to calculate the physical position:
```C
x = 224 / (NUMBER_OF_COLS - 1) * COL_POSITION
y = 64 / (NUMBER_OF_ROWS - 1) * ROW_POSITION
```
-Where NUMBER_OF_COLS, NUMBER_OF_ROWS, COL_POSITION, & ROW_POSITION are all based on the physical layout of your keyboard, not the electrical layout.
+Where NUMBER_OF_COLS, NUMBER_OF_ROWS, COL_POSITION, & ROW_POSITION are all based on the physical layout of your keyboard, not the electrical layout.
+
+As mentioned earlier, the center of the keyboard by default is expected to be `{ 112, 32 }`, but this can be changed if you want to more accurately calculate the LED's physical `{ x, y }` positions. Keyboard designers can implement `#define RGB_MATRIX_CENTER { 112, 32 }` in their config.h file with the new center point of the keyboard, or where they want it to be allowing more possibilities for the `{ x, y }` values. Do note that the maximum value for x or y is 255, and the recommended maximum is 224 as this gives animations runoff room before they reset.
`// LED Index to Flag` is a bitmask, whether or not a certain LEDs is of a certain type. It is recommended that LEDs are set to only 1 type.
@@ -192,10 +196,20 @@ enum rgb_matrix_effects {
RGB_MATRIX_ALPHAS_MODS, // Static dual hue, speed is hue for secondary hue
RGB_MATRIX_GRADIENT_UP_DOWN, // Static gradient top to bottom, speed controls how much gradient changes
RGB_MATRIX_BREATHING, // Single hue brightness cycling animation
+ RGB_MATRIX_BAND_SAT, // Single hue band fading saturation scrolling left to right
+ RGB_MATRIX_BAND_VAL, // Single hue band fading brightness scrolling left to right
+ RGB_MATRIX_BAND_PINWHEEL_SAT, // Single hue 3 blade spinning pinwheel fades saturation
+ RGB_MATRIX_BAND_PINWHEEL_VAL, // Single hue 3 blade spinning pinwheel fades brightness
+ RGB_MATRIX_BAND_SPIRAL_SAT, // Single hue spinning spiral fades saturation
+ RGB_MATRIX_BAND_SPIRAL_VAL, // Single hue spinning spiral fades brightness
RGB_MATRIX_CYCLE_ALL, // Full keyboard solid hue cycling through full gradient
RGB_MATRIX_CYCLE_LEFT_RIGHT, // Full gradient scrolling left to right
RGB_MATRIX_CYCLE_UP_DOWN, // Full gradient scrolling top to bottom
+ RGB_MATRIX_CYCLE_OUT_IN, // Full gradient scrolling out to in
+ RGB_MATRIX_CYCLE_OUT_IN_DUAL, // Full dual gradients scrolling out to in
RGB_MATRIX_RAINBOW_MOVING_CHEVRON, // Full gradent Chevron shapped scrolling left to right
+ RGB_MATRIX_CYCLE_PINWHEEL, // Full gradient spinning pinwheel around center of keyboard
+ RGB_MATRIX_CYCLE_SPIRAL, // Full gradient spinning spiral around center of keyboard
RGB_MATRIX_DUAL_BEACON, // Full gradient spinning around center of keyboard
RGB_MATRIX_RAINBOW_BEACON, // Full tighter gradient spinning around center of keyboard
RGB_MATRIX_RAINBOW_PINWHEELS, // Full dual gradients spinning two halfs of keyboard
@@ -231,11 +245,21 @@ You can disable a single effect by defining `DISABLE_[EFFECT_NAME]` in your `con
|`#define DISABLE_RGB_MATRIX_ALPHAS_MODS` |Disables `RGB_MATRIX_ALPHAS_MODS` |
|`#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN` |Disables `RGB_MATRIX_GRADIENT_UP_DOWN` |
|`#define DISABLE_RGB_MATRIX_BREATHING` |Disables `RGB_MATRIX_BREATHING` |
+|`#define DISABLE_RGB_MATRIX_BAND_SAT` |Disables `RGB_MATRIX_BAND_SAT` |
+|`#define DISABLE_RGB_MATRIX_BAND_VAL` |Disables `RGB_MATRIX_BAND_VAL` |
+|`#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT` |Disables `RGB_MATRIX_BAND_PINWHEEL_SAT` |
+|`#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL` |Disables `RGB_MATRIX_BAND_PINWHEEL_VAL` |
+|`#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT` |Disables `RGB_MATRIX_BAND_SPIRAL_SAT` |
+|`#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL` |Disables `RGB_MATRIX_BAND_SPIRAL_VAL` |
|`#define DISABLE_RGB_MATRIX_CYCLE_ALL` |Disables `RGB_MATRIX_CYCLE_ALL` |
|`#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT` |Disables `RGB_MATRIX_CYCLE_LEFT_RIGHT` |
|`#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN` |Disables `RGB_MATRIX_CYCLE_UP_DOWN` |
+|`#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN` |Disables `RGB_MATRIX_CYCLE_OUT_IN` |
+|`#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL` |Disables `RGB_MATRIX_CYCLE_OUT_IN_DUAL` |
|`#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON` |Disables `RGB_MATRIX_RAINBOW_MOVING_CHEVRON` |
|`#define DISABLE_RGB_MATRIX_DUAL_BEACON` |Disables `RGB_MATRIX_DUAL_BEACON` |
+|`#define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL` |Disables `RGB_MATRIX_CYCLE_PINWHEEL` |
+|`#define DISABLE_RGB_MATRIX_CYCLE_SPIRAL` |Disables `RGB_MATRIX_CYCLE_SPIRAL` |
|`#define DISABLE_RGB_MATRIX_RAINBOW_BEACON` |Disables `RGB_MATRIX_RAINBOW_BEACON` |
|`#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS` |Disables `RGB_MATRIX_RAINBOW_PINWHEELS` |
|`#define DISABLE_RGB_MATRIX_RAINDROPS` |Disables `RGB_MATRIX_RAINDROPS` |
diff --git a/docs/feature_rgblight.md b/docs/feature_rgblight.md
index 1e0ce91473..be4ddfa729 100644
--- a/docs/feature_rgblight.md
+++ b/docs/feature_rgblight.md
@@ -129,7 +129,7 @@ The following options are used to tweak the various animations:
|`RGBLIGHT_EFFECT_KNIGHT_LED_NUM` |`RGBLED_NUM` |The number of LEDs to have the "Knight" animation travel |
|`RGBLIGHT_EFFECT_KNIGHT_LENGTH` |`3` |The number of LEDs to light up for the "Knight" animation |
|`RGBLIGHT_EFFECT_KNIGHT_OFFSET` |`0` |The number of LEDs to start the "Knight" animation from the start of the strip by |
-|`RGBLIGHT_RAINBOW_SWIRL_RANGE` |`360` |Range adjustment for the rainbow swirl effect to get different swirls |
+|`RGBLIGHT_RAINBOW_SWIRL_RANGE` |`255` |Range adjustment for the rainbow swirl effect to get different swirls |
|`RGBLIGHT_EFFECT_SNAKE_LENGTH` |`4` |The number of LEDs to light up for the "Snake" animation |
### Example Usage to Reduce Memory Footprint
@@ -176,44 +176,100 @@ const uint8_t RGBLED_GRADIENT_RANGES[] PROGMEM = {255, 170, 127, 85, 64};
If you need to change your RGB lighting in code, for example in a macro to change the color whenever you switch layers, QMK provides a set of functions to assist you. See [`rgblight.h