Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* 'master' of https://github.com/qmk/qmk_firmware: (68 commits)
  Changed to 1209 PID (qmk#6677)
  [Keyboard] Add Iris Rev 4 (qmk#6660)
  Add 16U2, 16U4 and USB646 to mcu_selection.mk (qmk#6566)
  led fix (qmk#6672)
  Add personal Doro67 multi keymap, fix bug in KBD6X keymap (qmk#6674)
  [Keyboard] Missed a JTAG disable (qmk#6667)
  added ability to change unicode input method (qmk#6666)
  Fix battery level code in adafruit_ble.cpp (qmk#6648)
  [Docs] Update i2c_driver.md (qmk#6665)
  [Keyboard] Doro67 cleanup (qmk#6514)
  [Keyboard] Add Tukey board (qmk#6657)
  [Keymap] Update personal userspace and keymaps (qmk#6654)
  [Keymap] Satan GH60 with command prompt animation, react to keypresses (qmk#6636)
  Add Dip Switch as a core feature (qmk#6140)
  Update submodule check to include LUFA (qmk#6661)
  [keymap] ninjonas userspace and keymaps for hotdox, lily58, & pinky3 (qmk#6649)
  [Keymap] Update keymap for alice and fix for ctrl and os swap (qmk#6642)
  Fix typo in Open Graph description for docs (qmk#6641)
  [Keyboard] add rgb led configuration for xd87 (qmk#6635)
  Add `dfu-programmer` to `pacman -S` (qmk#6619)
  ...
  • Loading branch information
Shinichi-Ohki committed Sep 6, 2019
2 parents eaf0c9b + f8bf1d1 commit ee8fffb
Show file tree
Hide file tree
Showing 2,389 changed files with 40,129 additions and 436,877 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@
[submodule "lib/googletest"]
path = lib/googletest
url = https://github.com/google/googletest
[submodule "lib/lufa"]
path = lib/lufa
url = https://github.com/qmk/lufa
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ addons:
- diffutils
- dos2unix
- doxygen
after_success:
after_script:
bash util/travis_compiled_push.sh
notifications:
webhooks:
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,7 @@ ifndef SKIP_GIT
if [ ! -e lib/chibios ]; then git submodule sync lib/chibios && git submodule update --depth 1 --init lib/chibios; fi
if [ ! -e lib/chibios-contrib ]; then git submodule sync lib/chibios-contrib && git submodule update --depth 1 --init lib/chibios-contrib; fi
if [ ! -e lib/ugfx ]; then git submodule sync lib/ugfx && git submodule update --depth 1 --init lib/ugfx; fi
if [ ! -e lib/lufa ]; then git submodule sync lib/lufa && git submodule update --depth 1 --init lib/lufa; fi
git submodule status --recursive 2>/dev/null | \
while IFS= read -r x; do \
case "$$x" in \
Expand Down
2 changes: 1 addition & 1 deletion bin/qmk
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ else:

# Setup the CLI
import milc
milc.EMOJI_LOGLEVELS['INFO'] = '{fg_blue}ψ{style_reset_all}'
milc.EMOJI_LOGLEVELS['INFO'] = '{fg_blue}Ψ{style_reset_all}'

# If we were invoked as `qmk <cmd>` massage sys.argv into `qmk-<cmd>`.
# This means we can't accept arguments to the qmk script itself.
Expand Down
6 changes: 6 additions & 0 deletions common_features.mk
Original file line number Diff line number Diff line change
Expand Up @@ -358,3 +358,9 @@ ifeq ($(strip $(SPACE_CADET_ENABLE)), yes)
SRC += $(QUANTUM_DIR)/process_keycode/process_space_cadet.c
OPT_DEFS += -DSPACE_CADET_ENABLE
endif


ifeq ($(strip $(DIP_SWITCH_ENABLE)), yes)
SRC += $(QUANTUM_DIR)/dip_switch.c
OPT_DEFS += -DDIP_SWITCH_ENABLE
endif
53 changes: 53 additions & 0 deletions docs/ChangeLog/20190830.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# QMK Breaking Change - 2019 Aug 30

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.

This document marks the inaugural Breaking Change merge. A list of changes follows.

## Core code formatting with clang-format

* All core files (`drivers/`, `quantum/`, `tests/`, and `tmk_core/`) have been formatted with clang-format
* A travis process to reformat PR's on merge has been instituted
* You can use the new CLI command `qmk cformat` to format before submitting your PR if you wish.

## LUFA USB descriptor cleanup

* Some code cleanups related to the USB HID descriptors on AVR keyboards, to make them easier to read and understand
* More information: see https://github.com/qmk/qmk_firmware/pull/4871
* No behaviour changes anticipated and no keymaps modified

## Migrating `ACTION_LAYER_MOMENTARY()` entries in `fn_actions` to `MO()` 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

## Update Atreus to current code conventions

* Duplicate include guards have bypassed the expected header processing behavior
* All keymaps affected are recommended to remove duplication of `<keyboard>/config.h` to `<keyboard>/keymaps/<user>/config.h` and only provide overrides at the keymap level

## Backport changes to keymap language files from ZSA fork

* Fixes an issue in the `keymap_br_abnt2.h` file that includes the wrong source (`keymap_common.h` instead of `keymap.h`)
* Updates the `keymap_swedish.h` file to be specific to swedish, and not just "nordic" in general.
* Any keymaps using this will need to remove `NO_*` and replace it with `SE_*`.

## Update repo to use LUFA as a git submodule

* `/lib/LUFA` removed from the repo
* LUFA set as a submodule, pointing to qmk/lufa
* This should allow more flexibility with LUFA, and allow us to keep the sub-module up to date, a lot more easily. It was ~2 years out of date with no easy path to fix that. This prevents that from being an issue in the future

## Migrating `ACTION_BACKLIGHT_*()` entries in `fn_actions` to `BL_` keycodes

* `fn_actions` is deprecated, and its functionality has been superseded by direct keycodes and `process_record_user()`
* All keymaps using these actions have had the relevant `KC_FN*` keys replaced with the equivalent `BL_*` keys
* If you currently use `KC_FN*` you will need to replace `fn_actions` with the [custom keycode](https://docs.qmk.fm/#/custom_quantum_functions) and [macro](https://docs.qmk.fm/#/feature_macros) features

## Remove `KC_DELT` alias in favor of `KC_DEL`

* `KC_DELT` was a redundant, undocumented alias for `KC_DELETE`
* It has been removed and all its uses replaced with the more common `KC_DEL` alias
* Around 90 keymaps (mostly for ErgoDox boards) have been modified as a result

4 changes: 4 additions & 0 deletions docs/_summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
* [How to Use Github](getting_started_github.md)
* [Getting Help](getting_started_getting_help.md)

* [Breaking Changes](breaking_changes.md)
* [2019 Aug 30](ChangeLog/20190830.md)

* [FAQ](faq.md)
* [General FAQ](faq_general.md)
* [Build/Compile QMK](faq_build.md)
Expand Down Expand Up @@ -60,6 +63,7 @@
* [Combos](feature_combo.md)
* [Command](feature_command.md)
* [Debounce API](feature_debounce_type.md)
* [DIP Switch](feature_dip_switch.md)
* [Dynamic Macros](feature_dynamic_macros.md)
* [Encoders](feature_encoders.md)
* [Grave Escape](feature_grave_esc.md)
Expand Down
108 changes: 108 additions & 0 deletions docs/breaking_changes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
# Breaking Changes

This document describes QMK's Breaking Change process. A Breaking Change is any change which modifies how QMK behaves in a way that in incompatible or potentially dangerous. We limit these changes so that users can have confidence that updating their QMK tree will not break their keymaps.

The breaking change period is when we will merge PR's that change QMK in dangerous or unexpected ways. There is a built-in period of testing so we are confident that any problems caused are rare or unable to be predicted.

## What has been included in past Breaking Changes?

* [2019 Aug 30](ChangeLog/20190830.md)

## When is the next Breaking Change?

The next Breaking Change is scheduled for Nov 29.

### Important Dates

* [ ] 2019 Oct 04 - `future` is created. It will be rebased weekly.
* [ ] 2019 Nov 01 - `future` closed to new PR's.
* [ ] 2019 Nov 01 - Call for testers.
* [ ] 2019 Nov 27 - `master` is locked, no PR's merged.
* [ ] 2019 Nov 29 - Merge `future` to `master`.
* [ ] 2019 Nov 30 - `master` is unlocked. PR's can be merged again.

## What changes will be included?

To see a list of breaking change candidates you can look at the [`breaking_change` label](https://github.com/qmk/qmk_firmware/pulls?q=is%3Aopen+label%3Abreaking_change+is%3Apr). New changes might be added between now and when `future` is closed, and a PR with that label applied is not guaranteed to be merged.

If you want your breaking change to be included in this round you need to create a PR with the `breaking_change` label and have it accepted before `future` closes. After `future` closes no new breaking changes will be accepted.

Criteria for acceptance:

* PR is complete and ready to merge
* PR has a ChangeLog

# Checklists

This section documents various processes we use when running the Breaking Changes process.

## Rebase `future` from `master`

This is run every Friday while `future` is open.

Process:

```
cd qmk_firmware
git checkout master
git pull --ff-only
git checkout future
git rebase master
git push --force
```

## 8 Weeks Before Merge

* `qmk_firmware` git commands
* [ ] `git checkout master`
* [ ] `git pull --ff-only`
* [ ] `git checkout -b future`
* [ ] Edit `readme.md`
* [ ] Add a big notice at the top that this is a testing branch.
* [ ] Include a link to this document
* [ ] `git commit -m 'Branch point for <DATE> Breaking Change'`
* [ ] `git tag breakpoint_<YYYY>_<MM>_<DD>`
* [ ] `git tag <next_version>` # Prevent the breakpoint tag from confusing version incrementing
* [ ] `git push origin future`
* [ ] `git push --tags`
* GitHub Actions
* [ ] Switch all [breaking_change PR's](https://github.com/qmk/qmk_firmware/pulls?utf8=%E2%9C%93&q=is%3Apr+is%3Aopen+label%3Abreaking_change) to `future`
* [ ] Any that have a ChangeLog entry may be merged immediately.

## 4 Weeks Before Merge

* `future` is now closed to new PR's, only fixes for current PR's may be merged
* Post call for testers
* [ ] Discord
* [ ] GitHub PR
* [ ] https://reddit.com/r/olkb

## 1 Week Before Merge

* Announce that master will be closed from <2 Days Before> to <Day of Merge>
* [ ] Discord
* [ ] GitHub PR
* [ ] https://reddit.com/r/olkb

## 2 Days Before Merge

* Announce that master is closed for 2 days
* [ ] Discord
* [ ] GitHub PR
* [ ] https://reddit.com/r/olkb

## Day Of Merge

* `qmk_firmware` git commands
* [ ] `git checkout future`
* [ ] `git pull --ff-only`
* [ ] `git rebase origin/master`
* [ ] Edit `readme.md`
* [ ] Remove the notes about `future`
* [ ] Roll up the ChangeLog into one file.
* [ ] `git commit -m 'Merge point for <DATE> Breaking Change'`
* [ ] `git push origin future`
* Github Actions
* [ ] Create a PR for `future`
* [ ] Make sure travis comes back clean
* [ ] Merge `future` PR
10 changes: 10 additions & 0 deletions docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,13 @@ qmk compile <configuratorExport.json>
```
qmk compile -kb <keyboard_name> -km <keymap_name>
```

## `qmk cformat`

This command formats C code using clang-format. Run it with no arguments to format all core code, or pass filenames on the command line to run it on specific files.

**Usage**:

```
qmk cformat [file1] [file2] [...] [fileN]
```
90 changes: 90 additions & 0 deletions docs/feature_dip_switch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# DIP Switches

DIP switches are supported by adding this to your `rules.mk`:

DIP_SWITCH_ENABLE = yes

and this to your `config.h`:

```c
#define DIP_SWITCH_PINS { B14, A15, A10, B9 }
```
## Callbacks
The callback functions can be inserted into your `<keyboard>.c`:
```c
void dip_switch_update_kb(uint8_t index, bool active) {
dip_switch_update_user(index, active);
}
```


or `keymap.c`:

```c
void dip_switch_update_user(uint8_t index, bool active) {
switch (index) {
case 0:
if(active) { audio_on(); } else { audio_off(); }
break;
case 1:
if(active) { clicky_on(); } else { clicky_off(); }
break;
case 2:
if(active) { music_on(); } else { music_off(); }
break;
case 3:
if (active) {
#ifdef AUDIO_ENABLE
PLAY_SONG(plover_song);
#endif
layer_on(_PLOVER);
} else {
#ifdef AUDIO_ENABLE
PLAY_SONG(plover_gb_song);
#endif
layer_off(_PLOVER);
}
break;
}
}
```
Additionally, we support bit mask functions which allow for more complex handling.
```c
void dip_switch_update_mask_kb(uint32_t state) {
dip_switch_update_mask_user(state);
}
```


or `keymap.c`:

```c
void dip_switch_update_mask_user(uint32_t state) {
if (state & (1UL<<0) && state & (1UL<<1)) {
layer_on(_ADJUST); // C on esc
} else {
layer_off(_ADJUST);
}
if (state & (1UL<<0)) {
layer_on(_TEST_A); // A on ESC
} else {
layer_off(_TEST_A);
}
if (state & (1UL<<1)) {
layer_on(_TEST_B); // B on esc
} else {
layer_off(_TEST_B);
}
}
```
## Hardware
One side of the DIP switch should be wired directly to the pin on the MCU, and the other side to ground. It should not matter which side is connected to which, as it should be functionally the same.
1 change: 1 addition & 0 deletions docs/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ QMK has a staggering number of features for building your keyboard. It can take
* [Combos](feature_combo.md) - Custom actions for multiple key holds.
* [Command](feature_command.md) - Runtime version of bootmagic (Formerly known as "Magic").
* [Debounce API](feature_debounce_type.md) - Customization of debouncing algorithms, and the ability to add more/custom debouncing.
* [DIP Switch](feature_dip_switch.md) - Toggle switches for customizing board function.
* [Dynamic Macros](feature_dynamic_macros.md) - Record and playback macros from the keyboard itself.
* [Encoders](feature_encoders.md) - Rotary encoders!
* [Grave Escape](feature_grave_esc.md) - Lets you use a single key for Esc and Grave.
Expand Down
3 changes: 1 addition & 2 deletions docs/i2c_driver.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The I2C Master drivers used in QMK have a set of common functions to allow porta
|Function |Description |
|------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|`void i2c_init(void);` |Initializes the I2C driver. This function should be called once before any transaction is initiated. |
|`uint8_t i2c_start(uint8_t address);` |Starts an I2C transaction. Address is the 7-bit slave address without the direction bit. |
|`uint8_t i2c_start(uint8_t address, uint16_t timeout);` |Starts an I2C transaction. Address is the 7-bit slave address without the direction bit. |
|`uint8_t i2c_transmit(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout);` |Transmit data over I2C. Address is the 7-bit slave address without the direction. Returns status of transaction. |
|`uint8_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout);` |Receive data over I2C. Address is the 7-bit slave address without the direction. Saves number of bytes specified by `length` in `data` array. Returns status of transaction. |
|`uint8_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout);` |Same as the `i2c_transmit` function but `regaddr` sets where in the slave the data will be written. |
Expand All @@ -34,7 +34,6 @@ The following defines can be used to configure the I2C master driver.
|Variable |Description |Default|
|------------------|---------------------------------------------------|-------|
|`F_SCL` |Clock frequency in Hz |400KHz |
|`Prescaler` |Divides master clock to aid in I2C clock selection |1 |

AVRs usually have set GPIO which turn into I2C pins, therefore no further configuration is required.

Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta property="og:title" content="QMK Firmware Docs">
<meta property="og:type" content="website">
<meta property="og:description" content="The full documenation of the open-source firmware">
<meta property="og:description" content="The full documentation of the open-source firmware">
<meta property="og:image" content="https://i.imgur.com/svjvIrw.jpg">
<meta property="og:url" content="https://docs.qmk.fm">
<meta name="twitter:card" content="summary_large_image">
Expand Down
1 change: 1 addition & 0 deletions docs/zh-cn/_summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
* [热改键](feature_bootmagic.md)
* [组合](feature_combo)
* [命令](feature_command.md)
* [拨动开关](feature_dip_switch.md)
* [动态宏指令](feature_dynamic_macros.md)
* [编码器](feature_encoders.md)
* [重音号Esc复合键](feature_grave_esc.md)
Expand Down
Loading

0 comments on commit ee8fffb

Please sign in to comment.