Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/qmk/qmk_firmware
Browse files Browse the repository at this point in the history
* 'master' of https://github.com/qmk/qmk_firmware: (213 commits)
  [Keymap] New keymap for crkbd (qmk#6103)
  [Keyboard] fixes for issue with aanzee qmk port (qmk#6159)
  Add ergodash layout, update the backlight numbers for the rgb backlight to be the actual intended colors.
  [Keyboard] Aeboards Ext65 - New keyboard & Aegis Update (qmk#6127)
  Fix breathing always on for soft PWM (qmk#5983)
  [Keyboard] Added NK65 Picture in Readme as promised (qmk#6163)
  [Keymap] Added Deft layout (qmk#6153)
  [Keyboard] 1up60hse: Add RGBLIGHT_SLEEP To Default Config (qmk#6164)
  [Keymap] Actually swap space and left control in gaming mode (qmk#6162)
  Set default I2C clock speed to 100kHz for split_common (qmk#6161)
  [Keyboard] Planck Layout Macro Refactor, Part II (qmk#6156)
  [Keyboard] Fix incorrect RGBLED_NUM value (qmk#6148)
  [Keymap] Update Jotix keymap (qmk#6154)
  [Keymap] Add new mod tap dances to Hacker Dvorak (qmk#6155)
  [Keyboard] added custom keyboard (qmk#6141)
  [Keymap] Add keymap for keebio/nyquist (qmk#6144)
  [Keymap] Update to personal keymaps (qmk#6142)
  [Keymap] ortho_4x12: bredfield (qmk#6137)
  [Keymap] 40percent/gherkin Midi Layout (qmk#6130)
  Fix backlight breathing on C6 (qmk#6102)
  ...
  • Loading branch information
Shinichi-Ohki committed Jun 22, 2019
2 parents a97a0b1 + 7f23ad7 commit 9d48d69
Show file tree
Hide file tree
Showing 1,454 changed files with 49,276 additions and 4,430 deletions.
2 changes: 1 addition & 1 deletion .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ BinPackParameters: 'true'
ColumnLimit: '1000'
IndentCaseLabels: 'true'
IndentPPDirectives: AfterHash
IndentWidth: '2'
IndentWidth: '4'
MaxEmptyLinesToKeep: '1'
PointerAlignment: Right
SortIncludes: 'false'
Expand Down
24 changes: 7 additions & 17 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,21 @@ env:
global:
- secure: vBTSL34BDPxDilKUuTXqU4CJ26Pv5hogD2nghatkxSQkI1/jbdnLj/DQdPUrMJFDIY6TK3AltsBx72MaMsLQ1JO/Ou24IeHINHXzUC1FlS9yQa48cpxnhX5kzXNyGs3oa0qaFbvnr7RgYRWtmD52n4bIZuSuW+xpBv05x2OCizdT2ZonH33nATaHGFasxROm4qYZ241VfzcUv766V6RVHgL4x9V08warugs+RENVkfzxxwhk3NmkrISabze0gSVJLHBPHxroZC6EUcf/ocobcuDrCwFqtEt90i7pNIAFUE7gZsN2uE75LmpzAWin21G7lLPcPL2k4FJVd8an1HiP2WmscJU6U89fOfMb2viObnKcCzebozBCmKGtHEuXZo9FcReOx49AnQSpmESJGs+q2dL/FApkTjQiyT4J6O5dJpoww0/r57Wx0cmmqjETKBb5rSgXM51Etk3wO09mvcPHsEwrT7qH8r9XWdyCDoEn7FCLX3/LYnf/D4SmZ633YPl5gv3v9XEwxR5+04akjgnvWDSNIaDbWBdxHNb7l4pMc+WR1bwCyMyA7KXj0RrftEGOrm9ZRLe6BkbT4cycA+j77nbPOMcyZChliV9pPQos+4TOJoTzcK2L8yWVoY409aDNVuAjdP6Yum0R2maBGl/etLmIMpJC35C5/lZ+dUNjJAM=
- MAKEFLAGS="-j3 --output-sync"
services:
- docker
before_install:
- wget http://ww1.microchip.com/downloads/en/DeviceDoc/avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz || wget http://qmk.fm/avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz
# Need DFU > .5 for dfu-suffix
- sudo add-apt-repository --yes ppa:tormodvolden/ppa
- sudo apt-get update -qq
- docker build -t qmkfm/qmk_firmware .
install:
- tar -zxf avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz
- export PATH="$PATH:$TRAVIS_BUILD_DIR/avr8-gnu-toolchain-linux_x86_64/bin"
- npm install -g moxygen
- sudo apt-get -y --force-yes install dfu-util
before_script:
- avr-gcc --version
script:
- git rev-parse --short HEAD
- bash util/travis_test.sh
- bash util/travis_build.sh
- bash util/travis_docs.sh
- git rev-parse --short HEAD
- bash util/travis_test.sh
- bash util/travis_build.sh
- bash util/travis_docs.sh
addons:
apt:
packages:
- dfu-programmer
- pandoc
- gcc-arm-none-eabi
- binutils-arm-none-eabi
- libnewlib-arm-none-eabi
- diffutils
- dos2unix
- doxygen
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
dfu-programmer \
dfu-util \
gcc \
gcc-arm-none-eabi \
gcc-avr \
git \
libnewlib-arm-none-eabi \
Expand All @@ -19,11 +18,12 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
zip \
&& rm -rf /var/lib/apt/lists/*

ENV KEYBOARD=ergodox_ez
ENV KEYMAP=default
# upgrade gcc-arm-none-eabi from the default 5.4.1 to 6.3.1 due to ARM runtime issues
RUN wget -q https://developer.arm.com/-/media/Files/downloads/gnu-rm/6-2017q2/gcc-arm-none-eabi-6-2017-q2-update-linux.tar.bz2 -O - | \
tar xj --strip-components=1 -C /

VOLUME /qmk_firmware
WORKDIR /qmk_firmware
COPY . .

CMD make $KEYBOARD:$KEYMAP
CMD make all:default
7 changes: 5 additions & 2 deletions docs/_summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
12 changes: 7 additions & 5 deletions docs/config_options.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion docs/custom_quantum_functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions docs/faq_build.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion docs/feature_audio.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. |



Expand Down
25 changes: 16 additions & 9 deletions docs/feature_backlight.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand All @@ -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

Expand Down
2 changes: 1 addition & 1 deletion docs/feature_bootmagic.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
3 changes: 2 additions & 1 deletion docs/feature_combo.md
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand All @@ -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};
Expand Down
2 changes: 1 addition & 1 deletion docs/feature_encoders.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
47 changes: 31 additions & 16 deletions docs/feature_oled_driver.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,17 @@

## 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:

| 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 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.

Expand Down Expand Up @@ -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

Expand All @@ -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 {
Expand Down Expand Up @@ -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 |
Expand Down
Loading

0 comments on commit 9d48d69

Please sign in to comment.