Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* 'master' of https://github.com/qmk/qmk_firmware: (53 commits)
  Add ATmega32U2 to mcu_selection.mk (qmk#6561)
  Reword a note about the MANUFACTURER and PRODUCT defines in hardware_avr.md (qmk#6558)
  Userspace kuchosauronad0 (qmk#6541)
  Illustrate the emoji layer (qmk#6555)
  Remove backslashes from template keymap (qmk#6548)
  [Keymap] add niu_mini custom keymaps (qmk#6552)
  [Keymap] add "ridingqwerty" user and keymap for atreus keyboard (qmk#6533)
  Add support for different encoder pinout for right half of split keyboard (qmk#6521)
  Fix Clueboard hotswap gen1 not compiling when LED Matrix is disabled (qmk#6427)
  Add an alternative method for keyboard discovery to speed up build (qmk#6073)
  Refactor of lets_split_eh to enable RGB split animations (qmk#6411)
  Remove duplicate test keyboards (qmk#6539)
  [Keymap] Fix include following Wilba refactor (qmk#6538)
  [Keymap] Cosmetic fix for default Wasdat keymaps (qmk#6531)
  [Keymap] Xd75 bulbizarre keymap (qmk#6525)
  [Keymap] Update gherkin to use gpio (qmk#6520)
  [Keyboard] Align xd84 and xd96 with moon (qmk#6465)
  Enable PWM Support for Planck EZ Indicator Lights  (qmk#6473)
  [Keyboard] Add: Initial steamvan firmware code (qmk#6501)
  [Keymap] Adding my userspace and keymaps (qmk#6496)
  ...
  • Loading branch information
Shinichi-Ohki committed Aug 18, 2019
2 parents ce8d771 + 92f9b6c commit d293fa6
Show file tree
Hide file tree
Showing 278 changed files with 7,240 additions and 3,991 deletions.
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ endif
override SILENT := false

ifndef SUB_IS_SILENT
QMK_VERSION := $(shell git describe --abbrev=0 --tags 2>/dev/null)
ifndef SKIP_GIT
QMK_VERSION := $(shell git describe --abbrev=0 --tags 2>/dev/null)
endif

ifneq ($(QMK_VERSION),)
$(info QMK Firmware $(QMK_VERSION))
endif
Expand Down Expand Up @@ -94,6 +97,7 @@ $(eval $(call NEXT_PATH_ELEMENT))
# endif

define GET_KEYBOARDS
ifndef ALT_GET_KEYBOARDS
All_RULES_MK := $$(patsubst $(ROOT_DIR)/keyboards/%/rules.mk,%,$$(wildcard $(ROOT_DIR)/keyboards/*/rules.mk))
All_RULES_MK += $$(patsubst $(ROOT_DIR)/keyboards/%/rules.mk,%,$$(wildcard $(ROOT_DIR)/keyboards/*/*/rules.mk))
All_RULES_MK += $$(patsubst $(ROOT_DIR)/keyboards/%/rules.mk,%,$$(wildcard $(ROOT_DIR)/keyboards/*/*/*/rules.mk))
Expand All @@ -105,6 +109,9 @@ define GET_KEYBOARDS
KEYMAPS_MK += $$(patsubst $(ROOT_DIR)/keyboards/%/rules.mk,%,$$(wildcard $(ROOT_DIR)/keyboards/*/*/*/*/keymaps/*/rules.mk))

KEYBOARDS := $$(sort $$(filter-out $$(KEYMAPS_MK), $$(All_RULES_MK)))
else
KEYBOARDS := $(shell find keyboards/ -type f -iname "rules.mk" | grep -v keymaps | sed 's!keyboards/\(.*\)/rules.mk!\1!' | sort | uniq)
endif
endef

$(eval $(call GET_KEYBOARDS))
Expand Down
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, text=True, capture_output=True)
result = subprocess.run(command, universal_newlines=True, capture_output=True)

if result.returncode == 0:
os.environ['QMK_VERSION'] = 'QMK ' + result.stdout.strip()
Expand Down
2 changes: 1 addition & 1 deletion docs/config_options.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ 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` and `C6` (and `D4` on ATmega32A) use hardware PWM, others use software implementation
* pin of the backlight
* `#define BACKLIGHT_LEVELS 3`
* number of levels your backlight will have (maximum 15 excluding off)
* `#define BACKLIGHT_BREATHING`
Expand Down
47 changes: 23 additions & 24 deletions docs/feature_backlight.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,32 +30,31 @@ You should then be able to use the keycodes below to change the backlight level.

This feature is distinct from both the [RGB underglow](feature_rgblight.md) and [RGB matrix](feature_rgb_matrix.md) features as it usually allows for only a single colour per switch, though you can obviously use multiple different coloured LEDs on a keyboard.

Hardware PWM is only supported on certain pins of the MCU, so if the backlighting is not connected to one of them, a software PWM implementation triggered by hardware timer interrupts will be used.

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

| Audio Pin(s) | Audio Timer | Software PWM Timer |
|--------------|-------------|--------------------|
| `C4` | Timer 3 | Timer 1 |
| `C5` | Timer 3 | Timer 1 |
| `C6` | Timer 3 | Timer 1 |
| `B5` | Timer 1 | Timer 3 |
| `B6` | Timer 1 | Timer 3 |
| `B7` | Timer 1 | Timer 3 |
| `Bx` & `Cx` | Timer 1 & 3 | None |

When all timers are in use for [audio](feature_audio.md), the backlight software PWM will not use a hardware timer, but instead will be triggered during the matrix scan. In this case the backlight doesn't support breathing and might show lighting artifacts (for instance flickering), because the PWM computation might not be called with enough timing precision.
|Backlight Pin|AT90USB64/128|ATmega16/32U4|ATmega16/32U2|ATmega32A|
|-------------|-------------|-------------|-------------|---------|
|`B5` |Timer 1 |Timer 1 | | |
|`B6` |Timer 1 |Timer 1 | | |
|`B7` |Timer 1 |Timer 1 |Timer 1 | |
|`C4` |Timer 3 | | | |
|`C5` |Timer 3 | |Timer 1 | |
|`C6` |Timer 3 |Timer 3 |Timer 1 | |
|`D4` | | | |Timer 1 |
|`D5` | | | |Timer 1 |

All other pins will use software PWM. If the [Audio](feature_audio.md) feature is disabled or only using one timer, the backlight PWM can be triggered by a hardware timer:

|Audio Pin|Audio Timer|Software PWM Timer|
|---------|-----------|------------------|
|`C4` |Timer 3 |Timer 1 |
|`C5` |Timer 3 |Timer 1 |
|`C6` |Timer 3 |Timer 1 |
|`B5` |Timer 1 |Timer 3 |
|`B6` |Timer 1 |Timer 3 |
|`B7` |Timer 1 |Timer 3 |

When both timers are in use for Audio, the backlight PWM will not use a hardware timer, but will instead be triggered during the matrix scan. In this case, breathing is not supported, and the backlight might flicker, because the PWM computation may not be called with enough timing precision.

## Configuration

Expand Down
2 changes: 1 addition & 1 deletion docs/feature_combo.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

The Combo feature is a chording type solution for adding custom actions. It lets you hit multiple keys at once and produce a different effect. For instance, hitting `A` and `S` within the tapping term would hit `ESC` instead, or have it perform even more complex tasks.

To enable this feature, yu need to add `COMBO_ENABLE = yes` to your `rules.mk`.
To enable this feature, you need to add `COMBO_ENABLE = yes` to your `rules.mk`.

Additionally, in your `config.h`, you'll need to specify the number of combos that you'll be using, by adding `#define COMBO_COUNT 1` (replacing 1 with the number that you're using).
<!-- At this time, this is necessary -->
Expand Down
9 changes: 9 additions & 0 deletions docs/feature_encoders.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@ Additionally, the resolution can be specified in the same file (the default & su

#define ENCODER_RESOLUTION 4

## Split Keyboards

If you are using different pinouts for the encoders on each half of a split keyboard, you can define the pinout for the right half like this:

```c
#define ENCODERS_PAD_A_RIGHT { encoder1a, encoder2a }
#define ENCODERS_PAD_B_RIGHT { encoder1b, encoder2b }
```
## Callbacks
The callback functions can be inserted into your `<keyboard>.c`:
Expand Down
7 changes: 7 additions & 0 deletions docs/feature_split_keyboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,13 @@ This allows you to specify a different set of pins for the matrix on the right s
This allows you to specify a different set of direct pins for the right side.
```c
#define ENCODERS_PAD_A_RIGHT { encoder1a, encoder2a }
#define ENCODERS_PAD_B_RIGHT { encoder1b, encoder2b }
```

This allows you to specify a different set of encoder pins for the right side.

```c
#define RGBLIGHT_SPLIT
```
Expand Down
2 changes: 1 addition & 1 deletion docs/getting_started_make_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ This allows the keyboard to tell the host OS that up to 248 keys are held down a

`BACKLIGHT_ENABLE`

This enables your backlight on Timer1 and ports B5, B6, or B7 (for now). You can specify your port by putting this in your `config.h`:
This enables the in-switch LED backlighting. You can specify the backlight pin by putting this in your `config.h`:

#define BACKLIGHT_PIN B7

Expand Down
6 changes: 2 additions & 4 deletions docs/hardware_avr.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Do change the `MANUFACTURER`, `PRODUCT`, and `DESCRIPTION` lines to accurately r
#define DESCRIPTION A custom keyboard
```

?> Note: On Windows and macOS the `MANUFACTURER`, `PRODUCT`, and `DESCRIPTION` fields will be displayed in the list of USB devices. ?> On Linux these values will not be visible in lsusb by default, since Linux takes the information from the list maintained by [USB ID Repository](http://www.linux-usb.org/usb-ids.html) by default. lsusb will show the information reported by the device when executed with -v option. It is also present in kernel logs after plugging in the device.
?> Windows and macOS will display the `MANUFACTURER` and `PRODUCT` in the list of USB devices. `lsusb` on Linux instead takes these from the list maintained by the [USB ID Repository](http://www.linux-usb.org/usb-ids.html) by default. `lsusb -v` will show the values reported by the device, and they are also present in kernel logs after plugging it in.

### Keyboard Matrix Configuration

Expand Down Expand Up @@ -125,7 +125,7 @@ To configure a keyboard where each switch is connected to a separate pin and gro

### Backlight Configuration

By default QMK supports backlighting on pins `B5`, `B6`, and `B7`. If you are using one of those you can simply enable it here. For more details see the [Backlight Documentation](feature_backlight.md).
QMK supports backlighting on most GPIO pins. A select few of these can be driven by the MCU in hardware. For more details see the [Backlight Documentation](feature_backlight.md).

```c
#define BACKLIGHT_PIN B7
Expand All @@ -134,8 +134,6 @@ By default QMK supports backlighting on pins `B5`, `B6`, and `B7`. If you are us
#define BREATHING_PERIOD 6
```
?> You can use backlighting on any pin you like, but you will have to do more work to support that. See the [Backlight Documentation](feature_backlight.md) for more details.
### Other Configuration Options
There are a lot of features that can be configured or tuned in `config.h`. You should see the [Config Options](config_options.md) page for more details.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ For the `DIODE_DIRECTION`, most hand-wiring guides will instruct you to wire the

To configure a keyboard where each switch is connected to a separate pin and ground instead of sharing row and column pins, use `DIRECT_PINS`. The mapping defines the pins of each switch in rows and columns, from left to right. Must conform to the sizes within `MATRIX_ROWS` and `MATRIX_COLS`, use `NO_PIN` to fill in blank spaces. Overrides the behaviour of `DIODE_DIRECTION`, `MATRIX_ROW_PINS` and `MATRIX_COL_PINS`.

`BACKLIGHT_PIN` is the pin that your PWM-controlled backlight (if one exists) is hooked-up to. Currently only B5, B6, and B7 are supported.
`BACKLIGHT_PIN` is the pin that your PWM-controlled backlight (if one exists) is hooked-up to.

`BACKLIGHT_BREATHING` is a fancier backlight feature that adds breathing/pulsing/fading effects to the backlight. It uses the same timer as the normal backlight. These breathing effects must be called by code in your keymap.

Expand Down
44 changes: 11 additions & 33 deletions keyboards/40percentclub/gherkin/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,46 +18,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {

};

void matrix_init_user(void) {
}

void matrix_scan_user(void) {
}
void keyboard_pre_init_user(void) {
// Call the keyboard pre init code.

bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
// Set our LED pins as output
setPinOutput(D5);
setPinOutput(B0);
}

void led_set_user(uint8_t usb_led) {

if (usb_led & (1 << USB_LED_NUM_LOCK)) {
DDRD |= (1 << 5); PORTD &= ~(1 << 5);
} else {
DDRD &= ~(1 << 5); PORTD &= ~(1 << 5);
}

if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
DDRB |= (1 << 0); PORTB &= ~(1 << 0);
} else {
DDRB &= ~(1 << 0); PORTB &= ~(1 << 0);
}

if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {

} else {

}

if (usb_led & (1 << USB_LED_COMPOSE)) {

if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
writePinLow(D5);
} else {

writePinHigh(D5);
}

if (usb_led & (1 << USB_LED_KANA)) {

if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
writePinLow(B0);
} else {

writePinHigh(B0);
}

}
60 changes: 0 additions & 60 deletions keyboards/alice/readme.md

This file was deleted.

13 changes: 13 additions & 0 deletions keyboards/atreus/keymaps/ridingqwerty/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#pragma once

#undef MATRIX_ROWS
#define MATRIX_ROWS 8

#undef MATRIX_COLS
#define MATRIX_COLS 6

#undef MATRIX_ROW_PINS
#define MATRIX_ROW_PINS { A6, A7, A8, A15, B11, B12, A14, A13 }

#undef MATRIX_COL_PINS
#define MATRIX_COL_PINS { B5, B4, B3, B2, B1, B0 }
Loading

0 comments on commit d293fa6

Please sign in to comment.