Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* 'master' of https://github.com/qmk/qmk_firmware: (42 commits)
  pegasushoof Specify the bootloader to use :flash (qmk#6614)
  Fix Typo in :flash target for missing bootloader (qmk#6615)
  Mars80 Bug: Physical/Electrical Matrix Mismatch (qmk#6612)
  [Keymap] Redox_w Use layer_state_set_user instead of matrix_scan_user (qmk#6608)
  Added OLED Display autoscroll during periods of OLED data inactivity (qmk#6546)
  Refactor `qmk compile-json` to `qmk compile` (qmk#6592)
  RGB Inidcator example for new van pcbs (qmk#6544)
  Add new 60% Tsangan HHKB layout (qmk#6607)
  [Keyboard] Maartenwut Wonderland PCB (qmk#6492)
  Add 2015 revision of Pegasus Hoof to QMK (qmk#6595)
  [Keyboard] New Keyboard: EVE Meteor (qmk#6565)
  updates the coc
  [Keymap] a keymap to "transform" a jj40 info a simil Alpha28, to enjoy its simplicity and power (qmk#6599)
  [Keyboard] Add JNAO keyboard (qmk#6598)
  [Keymap] ISO keymap for TADA68 with programming in mind (qmk#6597)
  [Keymap] Update to userspace kuchosauroand0 (qmk#6596)
  Add 'bootloadHID' flash target (qmk#5587)
  Add Zadig 101 to docs (qmk#6585)
  Add Soft Serial Speed to Diverge3 keyboard config for compatibility (qmk#5076)
  Added 4by3 keyboard (qmk#6547)
  ...
  • Loading branch information
Shinichi-Ohki committed Aug 27, 2019
2 parents d293fa6 + d2ce12d commit eaf0c9b
Show file tree
Hide file tree
Showing 259 changed files with 5,583 additions and 1,382 deletions.
11 changes: 10 additions & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,17 @@ Our users, contributors, and collaborators are expected to treat each other with

* The use of sexualized language or imagery
* Unwelcome advances, sexual or otherwise
* Deliberate intimidation, stalking, or following
* Insults or derogatory comments, or personal or political attacks
* Publishing others’ private information without explicit permission
* Sustained disruption of talks or other events
* Other conduct which could reasonably be considered inappropriate in a professional setting
* Advocating for, or encouraging, any of the above behaviour

If someone is violating this Code of Conduct you may email hello@qmk.fm to bring your concern to the Members. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident.
# Reporting

If someone is violating this Code of Conduct, please email hello@qmk.fm or reach out to one of the Collaborators to bring it to our attention. All complaints will be reviewed and investigated.

QMK will seek to use the least punitive means available to resolve an issue. If the circumstances require asking an offender to leave, we will do that.

Reports will be taken and kept in strict confidence. You will not be required to confront an offender directly.
2 changes: 1 addition & 1 deletion bin/qmk
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ with open('requirements.txt', 'r') as fd:

# Figure out our version
command = ['git', 'describe', '--abbrev=6', '--dirty', '--always', '--tags']
result = subprocess.run(command, universal_newlines=True, capture_output=True)
result = subprocess.run(command, universal_newlines=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)

if result.returncode == 0:
os.environ['QMK_VERSION'] = 'QMK ' + result.stdout.strip()
Expand Down
1 change: 1 addition & 0 deletions docs/_summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* [Build/Compile QMK](faq_build.md)
* [Debugging/Troubleshooting QMK](faq_debug.md)
* [Keymap](faq_keymap.md)
* [Driver Installation with Zadig](driver_installation_zadig.md)

* Detailed Guides
* [Install Build Tools](getting_started_build_tools.md)
Expand Down
17 changes: 12 additions & 5 deletions docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ This page describes how to setup and use the QMK CLI.

The QMK CLI makes building and working with QMK keyboards easier. We have provided a number of commands to help you work with QMK:

* `qmk compile-json`
* `qmk compile`
* `qmk doctor`

# Setup

Expand All @@ -20,12 +21,18 @@ You may want to add this to your `.profile`, `.bash_profile`, `.zsh_profile`, or

# Commands

## `qmk compile-json`
## `qmk compile`

This command allows you to compile JSON files you have downloaded from <https://config.qmk.fm>.
This command allows you to compile firmware from any directory. You can compile JSON exports from <https://config.qmk.fm> or compile keymaps in the repo.

**Usage**:
**Usage for Configurator Exports**:

```
qmk compile-json mine.json
qmk compile <configuratorExport.json>
```

**Usage for Keymaps**:

```
qmk compile -kb <keyboard_name> -km <keymap_name>
```
12 changes: 6 additions & 6 deletions docs/custom_quantum_functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -297,8 +297,8 @@ This runs code every time that the layers get changed. This can be useful for l
This example shows how to set the [RGB Underglow](feature_rgblight.md) lights based on the layer, using the Planck as an example

```c
uint32_t layer_state_set_user(uint32_t state) {
switch (biton32(state)) {
layer_state_t layer_state_set_user(layer_state_t state) {
switch (get_highest_layer(state)) {
case _RAISE:
rgblight_setrgb (0x00, 0x00, 0xFF);
break;
Expand All @@ -320,8 +320,8 @@ uint32_t layer_state_set_user(uint32_t state) {
```
### `layer_state_set_*` Function Documentation
* Keyboard/Revision: `uint32_t layer_state_set_kb(uint32_t state)`
* Keymap: `uint32_t layer_state_set_user(uint32_t state)`
* Keyboard/Revision: `layer_state_t layer_state_set_kb(layer_state_t state)`
* Keymap: `layer_state_t layer_state_set_user(layer_state_t state)`
The `state` is the bitmask of the active layers, as explained in the [Keymap Overview](keymap.md#keymap-layer-status)
Expand Down Expand Up @@ -377,8 +377,8 @@ void keyboard_post_init_user(void) {
The above function will use the EEPROM config immediately after reading it, to set the default layer's RGB color. The "raw" value of it is converted in a usable structure based on the "union" that you created above.
```c
uint32_t layer_state_set_user(uint32_t state) {
switch (biton32(state)) {
layer_state_t layer_state_set_user(layer_state_t state) {
switch (get_highest_layer(state)) {
case _RAISE:
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom_magenta(); rgblight_mode_noeeprom(1); }
break;
Expand Down
42 changes: 42 additions & 0 deletions docs/driver_installation_zadig.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Bootloader Driver Installation with Zadig

QMK presents itself to the host as a regular HID keyboard device, and as such requires no special drivers. However, in order to flash your keyboard on Windows, the bootloader device that appears when you reset the board often *does*.

There are two notable exceptions: the Caterina bootloader, usually seen on Pro Micros, and the Halfkay bootloader shipped with PJRC Teensys, appear as a serial port and a generic HID device respectively, and so do not require a driver.

We recommend the use of the [Zadig](https://zadig.akeo.ie/) utility. If you have set up the development environment with Msys2 or WSL, the `qmk_install.sh` script will have asked if you want it to install the drivers for you.

## Installation

Place your keyboard into the bootloader mode, either by hitting the `RESET` keycode (which may be on a different layer), or by pressing the reset switch usually located on the underside of the board. If your keyboard has neither, try holding Escape, or Space+`B`, as you plug it in (see the [Bootmagic](feature_bootmagic.md) docs for more details).
Some keyboards may have specific instructions for entering the bootloader, for example the [Bootmagic Lite](feature_bootmagic.md#bootmagic-lite) key (Escape) might be on a different key, such as Left Control. Refer to the board's README if you are unsure.

Zadig will automatically detect the bootloader device. You may sometimes need to check **Options -> List All Devices**.
- For keyboards with Atmel AVR MCUs, the bootloader will be named something similar to `ATm32U4DFU`, and have a Vendor ID of `03EB`.
- USBasp bootloaders will appear as `USBasp`, with a VID/PID of `16C0:05DC`.
- AVR keyboards flashed with the QMK-DFU bootloader will be named `<keyboard name> Bootloader` and will also have the VID `03EB`.
- For most ARM keyboards, it will be called `STM32 BOOTLOADER`, and have a VID/PID of `0483:DF11`.

!> If Zadig lists one or more devices with the `HidUsb` driver, your keyboard is probably not in bootloader mode. The arrow will be colored orange and you will be asked to confirm modifying a system driver. **Do not** proceed if this is the case!

If the arrow appears green, select the driver, and click **Install Driver**. The `libusb-win32` driver will usually work for AVR, and `WinUSB` for ARM, but if you still cannot flash the board, try installing a different driver from the list.

![Zadig with a bootloader driver correctly installed](https://i.imgur.com/b8VgXzx.png)

Finally, unplug and replug the keyboard to make sure the new driver has been loaded. If you are using the QMK Toolbox to flash, exit and restart it too, as it can sometimes fail to recognize the driver change.

## Recovering from Installation to Wrong Device

If you find that you can no longer type with the keyboard, you may have installed the driver onto the keyboard itself instead of the bootloader. You can easily confirm this in Zadig - a healthy keyboard has the `HidUsb` driver installed on all of its interfaces:

![A healthy keyboard as seen by Zadig](https://i.imgur.com/Hx0E5kC.png)

Open the Device Manager and look for a device that looks like your keyboard.

![The board with the wrong driver installed, in Device Manager](https://i.imgur.com/L3wvX8f.png)

Right-click it and hit **Uninstall device**. Make sure to tick **Delete the driver software for this device** first.

![The Device Uninstall dialog, with the "delete driver" checkbox ticked](https://i.imgur.com/aEs2RuA.png)

Click **Action -> Scan for hardware changes**. At this point, you should be able to type again. Double check in Zadig that the keyboard device(s) are using the `HidUsb` driver. If so, you're all done, and your board should be functional again!
9 changes: 3 additions & 6 deletions docs/faq_build.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,11 @@ Pro Micro (Atmega32u4), make sure to include `CONFIG_USB_ACM=y`. Other devices m

## Unknown Device for DFU Bootloader

Issues encountered when flashing keyboards on Windows are most often due to having the wrong drivers installed for the bootloader.
Issues encountered when flashing keyboards on Windows are most often due to having the wrong drivers installed for the bootloader, or none at all.

Re-running the installation script for MSYS2 may help (eg run `util/qmk_install.sh` from MSYS2/WSL) or reinstalling the QMK Toolbox may fix the issue. Alternatively, you can download and run the [`qmk_driver_installer`](https://github.com/qmk/qmk_driver_installer) package.

If that doesn't work, then you may need to grab the [Zadig Utility](https://zadig.akeo.ie/). Download this, and run it on the system. Then, you will need to reset your board into bootloader mode. After that, locate the device in question. If the device doesn't show up in the list (or nothing shows up in the list), you may need to enable the `List all devices` option in the `Options` menu.

From here, you will need to know what type of controller the board is using. You may see it listed in the Device Manager as `ATmega32U4` device (which is an AVR board), or an `STM32` device (Which is an ARM board). For AVR boards, use `libusb-win32` for the driver. For ARM boards, use the `WinUSB` driver. Once the correct driver type has been selected, click on the `Replace Driver` button, unplug your board, plug it back in, and reset it again.
Re-running the QMK installation script (`./util/qmk_install.sh` from the `qmk_firmware` directory in MSYS2 or WSL) or reinstalling the QMK Toolbox may fix the issue. Alternatively, you can download and run the [`qmk_driver_installer`](https://github.com/qmk/qmk_driver_installer) package manually.

If that doesn't work, then you may need to download and run Zadig. See [Bootloader Driver Installation with Zadig](driver_installation_zadig.md) for more detailed information.

## WINAVR is Obsolete
It is no longer recommended and may cause some problem.
Expand Down
17 changes: 5 additions & 12 deletions docs/faq_debug.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,22 +184,15 @@ Pressing any key during sleep should wake host.

Arduino Leonardo and micro have **ATMega32U4** and can be used for TMK, though Arduino bootloader may be a problem.

## Enabling JTAG

## Using PF4-7 Pins of USB AVR?
You need to set JTD bit of MCUCR yourself to use PF4-7 as GPIO. Those pins are configured to serve JTAG function by default. MCUs like ATMega*U* or AT90USB* are affected with this.
By default, the JTAG debugging interface is disabled as soon as the keyboard starts up. JTAG-capable MCUs come from the factory with the `JTAGEN` fuse set, and it takes over certain pins of the MCU that the board may be using for the switch matrix, LEDs, etc.

If you are using Teensy this isn't needed. Teensy is shipped with JTAGEN fuse bit unprogrammed to disable the function.
If you would like to keep JTAG enabled, just add the following to your `config.h`:

See this code.
```c
#define NO_JTAG_DISABLE
```
// JTAG disable for PORT F. write JTD bit twice within four cycles.
MCUCR |= (1<<JTD);
MCUCR |= (1<<JTD);
```
https://github.com/tmk/tmk_keyboard/blob/master/keyboard/hbkb/matrix.c#L67

And read **26.5.1 MCU Control Register – MCUCR** of ATMega32U4 datasheet.


## Adding LED Indicators of Lock Keys
You need your own LED indicators for CapsLock, ScrollLock and NumLock? See this post.
Expand Down
2 changes: 2 additions & 0 deletions docs/feature_audio.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ STARTUP_SONG // plays when the keyboard starts up (audio.c)
GOODBYE_SONG // plays when you press the RESET key (quantum.c)
AG_NORM_SONG // plays when you press AG_NORM (quantum.c)
AG_SWAP_SONG // plays when you press AG_SWAP (quantum.c)
CG_NORM_SONG // plays when you press CG_NORM (quantum.c)
CG_SWAP_SONG // plays when you press CG_SWAP (quantum.c)
MUSIC_ON_SONG // plays when music mode is activated (process_music.c)
MUSIC_OFF_SONG // plays when music mode is deactivated (process_music.c)
CHROMATIC_SONG // plays when the chromatic music mode is selected (process_music.c)
Expand Down
11 changes: 9 additions & 2 deletions docs/feature_bootmagic.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,11 @@ Hold down the Bootmagic key (Space by default) and the desired hotkey while plug
|`MAGIC_NO_GUI` | |Disable the GUI keys (useful when gaming) |
|`MAGIC_UNNO_GUI` | |Enable the GUI keys |
|`MAGIC_SWAP_ALT_GUI` |`AG_SWAP`|Swap Alt and GUI on both sides (for macOS)|
|`MAGIC_UNSWAP_ALT_GUI` |`AG_NORM`|Unswap Left Alt and Left GUI |
|`MAGIC_TOGGLE_ALT_GUI` |`AG_TOGG`|Toggle Left Alt and GUI swap |
|`MAGIC_UNSWAP_ALT_GUI` |`AG_NORM`|Unswap Alt and GUI |
|`MAGIC_TOGGLE_ALT_GUI` |`AG_TOGG`|Toggle Alt and GUI swap |
|`MAGIC_SWAP_CTL_GUI` |`CG_SWAP`|Swap Ctrl and GUI on both sides (for macOS)|
|`MAGIC_UNSWAP_CTL_GUI` |`CG_NORM`|Unswap Ctrl and GUI |
|`MAGIC_TOGGLE_CTL_GUI` |`CG_TOGG`|Toggle Ctrl and GUI swap |
|`MAGIC_SWAP_BACKSLASH_BACKSPACE` | |Swap `\` and Backspace |
|`MAGIC_UNSWAP_BACKSLASH_BACKSPACE`| |Unswap `\` and Backspace |
|`MAGIC_SWAP_CONTROL_CAPSLOCK` | |Swap Left Control and Caps Lock |
Expand All @@ -76,6 +79,10 @@ Hold down the Bootmagic key (Space by default) and the desired hotkey while plug
|`MAGIC_UNSWAP_LALT_LGUI` | |Unswap Left Alt and Left GUI |
|`MAGIC_SWAP_RALT_RGUI` | |Swap Right Alt and Right GUI |
|`MAGIC_UNSWAP_RALT_RGUI` | |Unswap Right Alt and Right GUI |
|`MAGIC_SWAP_LCTL_LGUI` | |Swap Left Control and Left GUI |
|`MAGIC_UNSWAP_LCTL_LGUI` | |Unswap Left Control and Left GUI |
|`MAGIC_SWAP_RCTL_RGUI` | |Swap Right Control and Right GUI |
|`MAGIC_UNSWAP_RCTL_RGUI` | |Unswap Right Control and Right GUI |

## Configuration

Expand Down
26 changes: 14 additions & 12 deletions docs/feature_oled_driver.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ This enables the feature and the `OLED_DRIVER_ENABLE` define. Then in your `keym
void oled_task_user(void) {
// Host Keyboard Layer Status
oled_write_P(PSTR("Layer: "), false);
switch (biton32(layer_state)) {
switch (get_highest_layer(layer_state)) {
case _QWERTY:
oled_write_P(PSTR("Default\n"), false);
break;
Expand Down Expand Up @@ -96,17 +96,19 @@ 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. |
| `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. |
| 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_TIMEOUT` | `60000` | Turns off the OLED screen after 60000ms of keyboard inactivity. Helps reduce OLED Burn-in. Set to 0 to disable. |
| `OLED_SCROLL_TIMEOUT` | `0` | Scrolls the OLED screen after 0ms of OLED inactivity. Helps reduce OLED Burn-in. Set to 0 to disable. |
| `OLED_SCROLL_TIMEOUT_RIGHT`| *Not defined* | Scroll timeout direction is right when defined, left when undefined. |
| `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

Expand Down
1 change: 1 addition & 0 deletions docs/feature_rgb_matrix.md
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,7 @@ These are defined in [`rgblight_list.h`](https://github.com/qmk/qmk_firmware/blo
#define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
#define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT // Sets the default mode, if none has been set
```

## EEPROM storage
Expand Down
Loading

0 comments on commit eaf0c9b

Please sign in to comment.