Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* 'master' of https://github.com/qmk/qmk_firmware: (37 commits)
  Update Hungarian keymap and add sendstring LUT (qmk#8220)
  Remove "ugly hack in usb_main.c" comments (qmk#8296)
  Update encoder functions for Iris VIA keymap (qmk#8295)
  Reduce PROGMEM usage for sendstring LUT (qmk#8109)
  [Docs] Update ISP Flashing guide (qmk#8149)
  Rewrite the Bathroom Epiphanies Frosty Flake matrix and LED handling (qmk#8243)
  Add onekey keymap for testing reset to bootloader. (qmk#8288)
  Get the direction right on the S75 encoder (qmk#8287)
  Prune out pure software pwm && custom driver && remove wrapping BACKLIGHT_PIN (qmk#8041)
  Make a fix to savage65 and tmov2 for via (qmk#8286)
  format code according to conventions [skip ci]
  Short term fix for conflicting types for 'tfp_printf' (qmk#8157)
  Fix recent clang-format breaking quantum.c (qmk#8282)
  format code according to conventions [skip ci]
  Remove duplicate BRTG case (qmk#8277)
  Clean up includes for glcdfont headers (qmk#7745)
  Fix the Breaking Changes doc again
  [Docs] translated 'feature_tap_dance.md' to japanese. (qmk#8137)
  PWM DMA based RGB Underglow for STM32 (qmk#7928)
  Add VIA support to Prime_M. Clean up all files (qmk#8247)
  ...
  • Loading branch information
Shinichi-Ohki committed Mar 3, 2020
2 parents 034c505 + 53ac4d2 commit 3bd02bc
Show file tree
Hide file tree
Showing 482 changed files with 30,253 additions and 10,365 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,6 @@ id_rsa_*

# python things
__pycache__

# prerequisites for updating ChibiOS
/util/fmpp*
4 changes: 3 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
[submodule "lib/chibios"]
path = lib/chibios
url = https://github.com/qmk/ChibiOS
branch = master
[submodule "lib/chibios-contrib"]
path = lib/chibios-contrib
url = https://github.com/qmk/ChibiOS-Contrib
branch = k-type-fix
branch = master
[submodule "lib/ugfx"]
path = lib/ugfx
url = https://github.com/qmk/uGFX
branch = master
[submodule "lib/googletest"]
path = lib/googletest
url = https://github.com/google/googletest
Expand Down
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
// Configure glob patterns for excluding files and folders.
"files.exclude": {
"**/.build": true,
"**/*.hex": true
"**/*.hex": true,
"**/*.bin": true
},
"files.associations": {
"*.h": "c",
Expand Down
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -623,13 +623,19 @@ endif
# Generate the version.h file
ifndef SKIP_GIT
GIT_VERSION := $(shell git describe --abbrev=6 --dirty --always --tags 2>/dev/null || date +"%Y-%m-%d-%H:%M:%S")
CHIBIOS_VERSION := $(shell cd lib/chibios && git describe --abbrev=6 --dirty --always --tags 2>/dev/null || date +"%Y-%m-%d-%H:%M:%S")
CHIBIOS_CONTRIB_VERSION := $(shell cd lib/chibios-contrib && git describe --abbrev=6 --dirty --always --tags 2>/dev/null || date +"%Y-%m-%d-%H:%M:%S")
else
GIT_VERSION := NA
CHIBIOS_VERSION := NA
CHIBIOS_CONTRIB_VERSION := NA
endif
ifndef SKIP_VERSION
BUILD_DATE := $(shell date +"%Y-%m-%d-%H:%M:%S")
$(shell echo '#define QMK_VERSION "$(GIT_VERSION)"' > $(ROOT_DIR)/quantum/version.h)
$(shell echo '#define QMK_BUILDDATE "$(BUILD_DATE)"' >> $(ROOT_DIR)/quantum/version.h)
$(shell echo '#define CHIBIOS_VERSION "$(CHIBIOS_VERSION)"' >> $(ROOT_DIR)/quantum/version.h)
$(shell echo '#define CHIBIOS_CONTRIB_VERSION "$(CHIBIOS_CONTRIB_VERSION)"' >> $(ROOT_DIR)/quantum/version.h)
else
BUILD_DATE := NA
endif
Expand Down
1 change: 1 addition & 0 deletions common_features.mk
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ VALID_BACKLIGHT_TYPES := pwm software custom
BACKLIGHT_ENABLE ?= no
BACKLIGHT_DRIVER ?= pwm
ifeq ($(strip $(BACKLIGHT_ENABLE)), yes)
SRC += $(QUANTUM_DIR)/process_keycode/process_backlight.c
ifeq ($(filter $(BACKLIGHT_DRIVER),$(VALID_BACKLIGHT_TYPES)),)
$(error BACKLIGHT_DRIVER="$(BACKLIGHT_DRIVER)" is not a valid backlight type)
endif
Expand Down
75 changes: 75 additions & 0 deletions docs/ChangeLog/20200229.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# QMK Breaking Change - 2020 Feb 29 Changelog

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.


## Update ChibiOS/ChibiOS-Contrib/uGFX submodules

* General Notes
* A `make git-submodule` may be required after pulling the latest QMK firmware code to update affected submodules to the upgraded revisions
* Enabling link-time-optimization (`LINK_TIME_OPTIMIZATION_ENABLE = yes`) should work on a lot more boards
* Upgrade to ChibiOS ver19.1.3
* 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.
* Includes improved MCU support and bugfixes
* ChibiOS revision is now included in Command output
* Timers should now be more accurate
* Upgrade to newer ChibiOS-Contrib
* Also includes improved MCU support and bugfixes
* ChibiOS-Contrib revision is now included in Command output
* Upgrade to newer uGFX
* Required in order to support updated ChibiOS


## Fix ChibiOS timer overflow for 16-bit SysTick devices

* On 16-bit SysTick devices, the timer subsystem in QMK was incorrectly dealing with overflow.
* When running at a 100000 SysTick frequency (possible on 16-bit devices, but uncommon), this overflow would occur after 0.65 seconds.
* Timers are now correctly handling this overflow case and timing should now be correct on ChibiOS/ARM.


## Update LUFA submodule

* Updates the LUFA submodule to include updates from upstream (abcminiuser/lufa)
* Includes some cleanup for QMK DFU generation


## Encoder flip

* Flips the encoder direction so that `clockwise == true` is for actually turning the knob clockwise
* Adds `ENCODER_DIRECTION_FLIP` define, so that reversing the expected dirction is simple for users.
* Cleans up documentation page for encoders


## Adding support for `BACKLIGHT_ON_STATE` for hardware PWM backlight

* Previously, the define only affected software PWM, and hardware PWM always assumed an N-channel MOSFET.
* The hardware PWM backlight setup has been updated to respect this option.
* 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.


## Migrating `ACTION_LAYER_TAP_KEY()` entries in `fn_actions` to `LT()` keycodes

* `fn_actions` is deprecated, and its functionality has been superseded by direct keycodes and `process_record_user()`
* The end result of removing this obsolete feature should result in a decent reduction in firmware size and code complexity
* 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


## Moving backlight keycode handling to `process_keycode/`

* This refactors the backlight keycode logic to be clearer and more modular.
* All backlight-related keycodes are now actioned in a single file.
* 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.


## Refactor Planck keymaps to use Layout Macros

* Refactor Planck keymaps to use layout macros instead of raw matrix assignments
* Makes keymaps revision-agnostic
* Should reduce noise and errors in Travis CI logs


## GON NerD codebase refactor

* Splits the codebase for GON NerD 60 and NerdD TKL PCBs into two separate directories.
* If your keymap is for a NerD 60 PCB, your `make` command is now `make gon/nerd60:<keymap>`.
* If your keymap is for a NerD TKL PCB, your `make` command is now `make gon/nerdtkl:<keymap>`.
15 changes: 8 additions & 7 deletions docs/breaking_changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,21 @@ The breaking change period is when we will merge PR's that change QMK in dangero

## What has been included in past Breaking Changes?

* [2020 Feb 29](ChangeLog/20200229.md)
* [2019 Aug 30](ChangeLog/20190830.md)

## When is the next Breaking Change?

The next Breaking Change is scheduled for February 29, 2020.
The next Breaking Change is scheduled for May 30, 2020.

### Important Dates

* [x] 2019 Sep 21 - `future` is created. It will be rebased weekly.
* [x] 2020 Feb 1 - `future` closed to new PR's.
* [x] 2020 Feb 1 - Call for testers.
* [ ] 2020 Feb 26 - `master` is locked, no PR's merged.
* [ ] 2020 Feb 28 - Merge `future` to `master`.
* [ ] 2020 Feb 29 - `master` is unlocked. PR's can be merged again.
* [x] 2020 Feb 29 - `future` is created. It will be rebased weekly.
* [ ] 2020 May 2 - `future` closed to new PR's.
* [ ] 2020 May 2 - Call for testers.
* [ ] 2020 May 28 - `master` is locked, no PR's merged.
* [ ] 2020 May 30 - Merge `future` to `master`.
* [ ] 2020 May 30 - `master` is unlocked. PR's can be merged again.

## What changes will be included?

Expand Down
2 changes: 2 additions & 0 deletions docs/config_options.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ If you define these options you will enable the associated feature, which may in
* `#define PERMISSIVE_HOLD`
* makes tap and hold keys trigger the hold if another key is pressed before releasing, even if it hasn't hit the `TAPPING_TERM`
* See [Permissive Hold](feature_advanced_keycodes.md#permissive-hold) for details
* `#define PERMISSIVE_HOLD_PER_KEY`
* enabled handling for per key `PERMISSIVE_HOLD` settings
* `#define IGNORE_MOD_TAP_INTERRUPT`
* makes it possible to do rolling combos (zx) with keys that convert to other keys on hold, by enforcing the `TAPPING_TERM` for both keys.
* See [Mod tap interrupt](feature_advanced_keycodes.md#ignore-mod-tap-interrupt) for details
Expand Down
19 changes: 19 additions & 0 deletions docs/feature_advanced_keycodes.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,25 @@ Normally, if you do all this within the `TAPPING_TERM` (default: 200ms) this wil

?> If you have `Ignore Mod Tap Interrupt` enabled, as well, this will modify how both work. The regular key has the modifier added if the first key is released first or if both keys are held longer than the `TAPPING_TERM`.

For more granular control of this feature, you can add the following to your `config.h`:

```c
#define PERMISSIVE_HOLD_PER_KEY
```

You can then add the following function to your keymap:

```c
bool get_permissive_hold(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case SFT_T(KC_A):
return true;
default:
return false;
}
}
```
## Ignore Mod Tap Interrupt
To enable this setting, add this to your `config.h`:
Expand Down
20 changes: 16 additions & 4 deletions docs/feature_backlight.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,22 @@ When both timers are in use for Audio, the backlight PWM will not use a hardware

To change the behavior 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 |
|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_LEVELS` |`3` |The number of brightness levels (maximum 31 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 |
|`BREATHING_PERIOD` |`6` |The length of one backlight "breath" in seconds |
|`BACKLIGHT_ON_STATE` |`1` |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, *high*.
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.

This functionality is configured at the keyboard level with the `BACKLIGHT_ON_STATE` define.

### Multiple backlight pins

Expand Down
52 changes: 34 additions & 18 deletions docs/feature_encoders.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,35 @@

Basic encoders are supported by adding this to your `rules.mk`:

ENCODER_ENABLE = yes
```make
ENCODER_ENABLE = yes
```

and this to your `config.h`:

#define ENCODERS_PAD_A { B12 }
#define ENCODERS_PAD_B { B13 }
```c
#define ENCODERS_PAD_A { B12 }
#define ENCODERS_PAD_B { B13 }
```
Each PAD_A/B variable defines an array so multiple encoders can be defined, e.g.:
#define ENCODERS_PAD_A { encoder1a, encoder2a }
#define ENCODERS_PAD_B { encoder1b, encoder2b }
```c
#define ENCODERS_PAD_A { encoder1a, encoder2a }
#define ENCODERS_PAD_B { encoder1b, encoder2b }
```

If your encoder's clockwise directions are incorrect, you can swap the A & B pad definitions. They can also be flipped with a define:
If your encoder's clockwise directions are incorrect, you can swap the A & B pad definitions.
```c
#define ENCODER_DIRECTION_FLIP
```
Additionally, the resolution can be specified in the same file (the default & suggested is 4):
#define ENCODER_RESOLUTION 4
```c
#define ENCODER_RESOLUTION 4
```
## Split Keyboards
Expand All @@ -33,27 +45,31 @@ If you are using different pinouts for the encoders on each half of a split keyb
The callback functions can be inserted into your `<keyboard>.c`:
void encoder_update_kb(uint8_t index, bool clockwise) {
encoder_update_user(index, clockwise);
}
```c
void encoder_update_kb(uint8_t index, bool clockwise) {
encoder_update_user(index, clockwise);
}
```
or `keymap.c`:
void encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
```c
void encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_PGDN);
tap_code(KC_PGDN);
} else {
tap_code(KC_PGUP);
tap_code(KC_PGUP);
}
} else if (index == 1) { /* Second encoder */
} else if (index == 1) { /* Second encoder */
if (clockwise) {
tap_code(KC_UP);
tap_code(KC_DOWN);
} else {
tap_code(KC_DOWN);
tap_code(KC_UP);
}
}
}
}
```
## Hardware
Expand Down
20 changes: 15 additions & 5 deletions docs/feature_macros.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,16 @@ Would tap `KC_HOME` - note how the prefix is now `X_`, and not `KC_`. You can al

Which would send "VE" followed by a `KC_HOME` tap, and "LO" (spelling "LOVE" if on a newline).

Delays can be also added to the string:

* `SS_DELAY(msecs)` will delay for the specified number of milliseconds.

For example:

SEND_STRING("VE" SS_DELAY(1000) SS_TAP(X_HOME) "LO");

Which would send "VE" followed by a 1-second delay, then a `KC_HOME` tap, and "LO" (spelling "LOVE" if on a newline, but delayed in the middle).

There's also a couple of mod shortcuts you can use:

* `SS_LCTL(string)`
Expand Down Expand Up @@ -200,11 +210,11 @@ This will clear all mods currently pressed.
This will clear all keys besides the mods currently pressed.
## Advanced Example:
## Advanced Example:
### Super ALT↯TAB
This macro will register `KC_LALT` and tap `KC_TAB`, then wait for 1000ms. If the key is tapped again, it will send another `KC_TAB`; if there is no tap, `KC_LALT` will be unregistered, thus allowing you to cycle through windows.
This macro will register `KC_LALT` and tap `KC_TAB`, then wait for 1000ms. If the key is tapped again, it will send another `KC_TAB`; if there is no tap, `KC_LALT` will be unregistered, thus allowing you to cycle through windows.
```c
bool is_alt_tab_active = false; # ADD this near the begining of keymap.c
Expand All @@ -221,7 +231,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (!is_alt_tab_active) {
is_alt_tab_active = true;
register_code(KC_LALT);
}
}
alt_tab_timer = timer_read();
register_code(KC_TAB);
} else {
Expand All @@ -232,7 +242,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
void matrix_scan_user(void) { # The very important timer.
void matrix_scan_user(void) { # The very important timer.
if (is_alt_tab_active) {
if (timer_elapsed(alt_tab_timer) > 1000) {
unregister_code(KC_LALT);
Expand Down Expand Up @@ -321,7 +331,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
```


## Advanced Example:
## Advanced Example:

### Single-Key Copy/Paste

Expand Down
Loading

0 comments on commit 3bd02bc

Please sign in to comment.