Compare commits

..

9 Commits

Author SHA1 Message Date
405dea01be Add some defaults for ATmega32A to mcu_selection.mk (#6253)
* Add some defaults for ATmega32A to mcu_selection.mk

* Remove boilerplate from templates

* Relax INTERRUPT_CONTROL_ENDPOINT and PROGRAM_CMD

* Apply suggestions from code review

Co-Authored-By: Drashna Jaelre <drashna@live.com>
2019-08-08 14:09:54 -07:00
2f6c068e0d Extend allowed range of tappable keycodes to include modifiers (#5809)
* Extend allowed range of tappable keycodes to include modifiers

* Get rid of the magic numbers altogether

* Remove some more magic numbers

* Extract LM() functionality from ACT_LAYER_TAP

* Use ACTION() macro everywhere
2019-08-08 13:58:05 -07:00
2a534e87ac Rename QK_TMK(_MAX) to QK_BASIC (#6509) 2019-08-08 13:32:30 -07:00
x1
f3e73965f0 [Keymap] Add kudox japanese keymap (#6508)
* Add a JIS keymap for kudox.

* Remove unnecessary codes.
2019-08-08 13:30:21 -07:00
b4c03070de [Keymap] Fix rgb matrix effects on dshields keymaps. (#6505) 2019-08-08 13:21:54 -07:00
4d72aa428f Improve backlight PWM pin support (#6202)
* Improve backlight PWM pin support

* I accidentally an equals sign

* Another typo

* Order by pin number

* Throw an error if backlight pin is C4 or C5 on 16/32U4

* Use else for clarity

* Minor alignment adjustments
2019-08-08 13:12:12 -07:00
57540af102 Change "yu" to "you" in combo docs (#6510) 2019-08-08 18:10:16 +01:00
2c0c25d014 Move Alice to TGR Directory (#6502)
* git mv alice into the tgr directory

* update readme with new build instructions
2019-08-07 19:02:27 -07:00
8479dd65d4 [Keyboard] Southpole: add Configurator layout data (#6498) 2019-08-07 19:00:45 -07:00
34 changed files with 444 additions and 257 deletions

View File

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

View File

@ -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 |
|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 |
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:
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(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 |
|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 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.
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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,60 +0,0 @@
# TGR Alice
![TGR Alice](https://i.imgur.com/cJohEqS.jpg)
An ergonomic 60% keyboard.
Keyboard Maintainer: [Felipe Coury](https://github.com/fcoury)
Hardware Supported: TGR Alice
Hardware Availability: Group buy finished
Make example for this keyboard (after setting up your build environment):
make alice:default
See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information.
ps2avrGB keyboard firmware
==========================
This keyboard uses the port of the QMK firmware for boards that are based on the
ps2avrGB firmware.
Note that this is a complete replacement for the firmware, so you won't be
using Bootmapper Client to change any keyboard settings, since not all the
USB report options are supported.
## Installing
First, install the requirements. These commands are for OSX, but all you
need is the AVR toolchain and `bootloadHID` for flashing:
```
$ brew cask install crosspack-avr
$ brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb
$ pip install pyusb
```
Then, with the keyboard plugged in, simply run this command from the
`qmk_firmware` directory:
```
$ make alice
$ bootloadHID -r alice_default.hex
```
## Setting the board to bootloader mode
Hold the ESC key (the one before the 1! key, in case you remaped it).
## Troubleshooting
From my experience, it's really hard to brick these boards. But these
tricks have been useful when it got stuck in a weird scenario.
1. Try plugging the board in while holding the bootloader key. This will force
it to boot only the bootloader without loading the firmware. Once this is
done, just reflash the board with the original firmware.
2. Sometimes USB hubs can act weird, so try connecting the board directly
to your computer or plugging/unplugging the USB hub.

View File

@ -32,7 +32,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_ALES ,KC_QUOT ,KC_MINS ,KC_EQL ,KC_ENT ,KC_LGUI ,KC_SPC , KC_RGENT,KC_DEL ,SYM_L ,KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT
//└────────┴────────┴────────┴────────┴────────┴────────┴────────┘ └────────┴────────┴────────┴────────┴────────┴────────┴────────┘
),
//KC_EQL
[_SYMB] = LAYOUT(
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
KC_GRV ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,_______ ,

View File

@ -0,0 +1,17 @@
/* Copyright 2019 Kumao Kobo <kumaokobo@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once

View File

@ -0,0 +1,47 @@
#include QMK_KEYBOARD_H
// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
// Layer names don't all need to be of the same length, obviously, and you can also skip them
// entirely and just use numbers.
#define _QWERTY 0
#define _SYMB 1
// Shortcut to make keymap more readable
#define SYM_L MO(_SYMB)
#define KC_ALES LALT_T(KC_ESC)
#define KC_L1SYM LT(_SYMB, KC_LANG1)
#define KC_L2SYM LT(_SYMB, KC_LANG2)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = LAYOUT(
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
KC_GRV ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_BSPC ,
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_L2SYM, KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_AT ,KC_BSLS ,
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┘ └────────┼────────┼────────┼────────┼────────┼────────┼────────┤
KC_LCTL ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G , KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,KC_ENT ,
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B , KC_SLSH ,KC_N ,KC_M ,KC_MINS ,KC_UP ,SYM_L ,
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┴────────┼────────┼────────┼────────┤
KC_ALES ,KC_LGUI ,KC_LALT ,KC_ENT ,KC_LANG2,KC_SPC ,KC_SPC , KC_COMM ,KC_DOT ,KC_L1SYM,KC_LEFT ,KC_DOWN ,KC_RGHT ,KC_COLN
//└────────┴────────┴────────┴────────┴────────┴────────┴────────┘ └────────┴────────┴────────┴────────┴────────┴────────┴────────┘
),
[_SYMB] = LAYOUT(
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
KC_ESC ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , XXXXXXX ,KC_CIRC ,KC_JYEN ,KC_TILD ,KC_PIPE ,KC_DEL ,
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
_______ ,KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,_______ , KC_LT ,KC_GT ,KC_LBRC ,KC_RBRC ,KC_LCBR ,KC_RCBR ,XXXXXXX ,
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┘ └────────┼────────┼────────┼────────┼────────┼────────┼────────┤
_______ ,KC_F11 ,KC_F12 ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX ,KC_PLUS ,KC_ASTR ,KC_SCLN ,KC_COLN ,_______ ,
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
_______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , _______ ,XXXXXXX ,XXXXXXX ,_______ ,KC_VOLU ,_______ ,
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┴────────┼────────┼────────┼────────┤
_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,_______ ,KC_MUTE ,KC_VOLD ,_______,_______
//└────────┴────────┴────────┴────────┴────────┴────────┴────────┘ └────────┴────────┴────────┴────────┴────────┴────────┴────────┘
)
};

View File

@ -0,0 +1 @@
# The JIS keymap for Kudox Keyboard

View File

View File

@ -41,7 +41,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_ALES ,KC_QUOT ,KC_MINS ,KC_EQL ,KC_ENNUM,KC_LGUI ,KC_SPC , KC_RGENT,KC_DEL ,SYM_L ,KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT
//└────────┴────────┴────────┴────────┴────────┴────────┴────────┘ └────────┴────────┴────────┴────────┴────────┴────────┴────────┘
),
//KC_EQL
[_SYMB] = LAYOUT(
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
KC_GRV ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,_______ ,

View File

@ -1,6 +1,6 @@
#pragma once
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define RGB_DIGITAL_RAIN_DROPS 18
#define USB_MAX_POWER_CONSUMPTION 100
#define ONESHOT_TAP_TOGGLE 2

View File

@ -44,6 +44,12 @@ uint32_t layer_state_set_user(uint32_t state) {
return state;
}
/*
void matrix_init_user(void) {
eeconfig_init();
};
*/
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (!process_record_dynamic_macro(keycode, record)) {
return false;

View File

@ -1,6 +1,6 @@
#pragma once
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define RGB_DIGITAL_RAIN_DROPS 24
#define USB_MAX_POWER_CONSUMPTION 100
#define ONESHOT_TAP_TOGGLE 2

View File

@ -43,6 +43,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
/*
void matrix_init_user(void) {
eeconfig_init();
};
*/
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (!process_record_dynamic_macro(keycode, record)) {
return false;

View File

@ -0,0 +1,98 @@
{
"keyboard_name": "southpole",
"url": "",
"maintainer": "qmk",
"width": 20.5,
"height": 5,
"layouts": {
"LAYOUT": {
"key_count": 84,
"layout": [
{"label":"Num Lock", "x":0, "y":0},
{"label":"/", "x":1, "y":0},
{"label":"*", "x":2, "y":0},
{"label":"-", "x":3, "y":0},
{"label":"Esc", "x":4.5, "y":0},
{"label":"1", "x":5.5, "y":0},
{"label":"2", "x":6.5, "y":0},
{"label":"3", "x":7.5, "y":0},
{"label":"4", "x":8.5, "y":0},
{"label":"5", "x":9.5, "y":0},
{"label":"6", "x":10.5, "y":0},
{"label":"7", "x":11.5, "y":0},
{"label":"8", "x":12.5, "y":0},
{"label":"9", "x":13.5, "y":0},
{"label":"0", "x":14.5, "y":0},
{"label":"-", "x":15.5, "y":0},
{"label":"=", "x":16.5, "y":0},
{"label":"\\", "x":17.5, "y":0},
{"label":"Delete", "x":18.5, "y":0},
{"label":"Insert", "x":19.5, "y":0},
{"label":"7", "x":0, "y":1},
{"label":"8", "x":1, "y":1},
{"label":"9", "x":2, "y":1},
{"label":"+", "x":3, "y":1, "h":2},
{"label":"Tab", "x":4.5, "y":1, "w":1.5},
{"label":"Q", "x":6, "y":1},
{"label":"W", "x":7, "y":1},
{"label":"E", "x":8, "y":1},
{"label":"R", "x":9, "y":1},
{"label":"T", "x":10, "y":1},
{"label":"Y", "x":11, "y":1},
{"label":"U", "x":12, "y":1},
{"label":"I", "x":13, "y":1},
{"label":"O", "x":14, "y":1},
{"label":"P", "x":15, "y":1},
{"label":"[", "x":16, "y":1},
{"label":"]", "x":17, "y":1},
{"label":"Backspace", "x":18, "y":1, "w":1.5},
{"label":"Vol +", "x":19.5, "y":1},
{"label":"4", "x":0, "y":2},
{"label":"5", "x":1, "y":2},
{"label":"6", "x":2, "y":2},
{"label":"Enter", "x":3, "y":3, "h":2},
{"label":"Caps Lock", "x":4.5, "y":2, "w":1.75},
{"label":"A", "x":6.25, "y":2},
{"label":"S", "x":7.25, "y":2},
{"label":"D", "x":8.25, "y":2},
{"label":"F", "x":9.25, "y":2},
{"label":"G", "x":10.25, "y":2},
{"label":"H", "x":11.25, "y":2},
{"label":"J", "x":12.25, "y":2},
{"label":"K", "x":13.25, "y":2},
{"label":"L", "x":14.25, "y":2},
{"label":";", "x":15.25, "y":2},
{"label":"'", "x":16.25, "y":2},
{"label":"Enter", "x":17.25, "y":2, "w":2.25},
{"label":"Vol -", "x":19.5, "y":2},
{"label":"1", "x":0, "y":3},
{"label":"2", "x":1, "y":3},
{"label":"3", "x":2, "y":3},
{"label":"Shift", "x":4.5, "y":3, "w":2.25},
{"label":"Z", "x":6.75, "y":3},
{"label":"X", "x":7.75, "y":3},
{"label":"C", "x":8.75, "y":3},
{"label":"V", "x":9.75, "y":3},
{"label":"B", "x":10.75, "y":3},
{"label":"N", "x":11.75, "y":3},
{"label":"M", "x":12.75, "y":3},
{"label":",", "x":13.75, "y":3},
{"label":".", "x":14.75, "y":3},
{"label":"/", "x":15.75, "y":3},
{"label":"Shift", "x":16.75, "y":3, "w":1.75},
{"label":"Up", "x":18.5, "y":3},
{"label":"Mute", "x":19.5, "y":3},
{"label":"0", "x":0, "y":4, "w":2},
{"label":".", "x":2, "y":4},
{"label":"Ctrl", "x":4.5, "y":4, "w":1.25},
{"label":"GUI", "x":5.75, "y":4, "w":1.25},
{"label":"Alt", "x":7, "y":4, "w":1.25},
{"label":"Space", "x":8.25, "y":4, "w":7},
{"label":"Fn", "x":15.25, "y":4, "w":1.5},
{"label":"Left", "x":17.5, "y":4},
{"label":"Down", "x":18.5, "y":4},
{"label":"Right", "x":19.5, "y":4}
]
}
}
}

View File

@ -0,0 +1,48 @@
# Alice
![TGR Alice](https://i.imgur.com/cJohEqS.jpg)
An ergonomic 60% keyboard.
Keyboard Maintainer: [Felipe Coury](https://github.com/fcoury)
Hardware Supported: TGR Alice
Hardware Availability: Group buy finished
Make example for this keyboard (after setting up your build environment):
make tgr/alice:default
Flashing
ps2avr(GB) boards use an atmega32a microcontroller and a different bootloader. It is not flashable using the regular QMK methods.
**Reset Key:** Hold down the key located at `K00`, commonly programmed as `Esc` while plugging in the keyboard.
Windows:
1. Download [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash).
2. Place your keyboard into reset.
3. Press the `Find Device` button and ensure that your keyboard is found.
4. Press the `Open .hex File` button and locate the `.hex` file you created.
5. Press the `Flash Device` button and wait for the process to complete.
macOS:
1. Install homebrew by typing the following:
```
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
```
2. Install `crosspack-avr`.
```
brew cask install crosspack-avr
```
3. Install the following packages:
```
brew install python3
pip3 install pyusb
brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb
```
4. Place your keyboard into reset.
5. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file.
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).

View File

@ -1,4 +1,3 @@
ifneq ($(findstring STM32F303, $(MCU)),)
## chip/board settings
# - the next two should match the directories in
@ -54,7 +53,7 @@ ifneq (,$(filter $(MCU),atmega32u4 at90usb1286))
# LUFA specific
#
# Target architecture (see library "Board Types" documentation).
ARCH ?= AVR8
ARCH = AVR8
# Input clock frequency.
# This will define a symbol, F_USB, in all source code files equal to the
@ -68,4 +67,27 @@ ifneq (,$(filter $(MCU),atmega32u4 at90usb1286))
# If no clock division is performed on the input clock inside the AVR (via the
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
F_USB ?= $(F_CPU)
# Interrupt driven control endpoint task
ifeq (,$(filter $(NO_INTERRUPT_CONTROL_ENDPOINT),yes))
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
endif
endif
ifneq (,$(filter $(MCU),atmega32a))
PROTOCOL = VUSB
# Processor frequency.
# This will define a symbol, F_CPU, in all source code files equal to the
# processor frequency in Hz. You can then use this symbol in your source code to
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
# automatically to create a 32-bit value in your source code.
F_CPU ?= 12000000
# unsupported features for now
NO_UART ?= yes
NO_SUSPEND_POWER_DOWN ?= yes
# Programming options
PROGRAM_CMD ?= ./util/atmega32a_program.py $(TARGET).hex
endif

View File

@ -1034,104 +1034,147 @@ void matrix_scan_quantum() {
}
#if defined(BACKLIGHT_ENABLE) && (defined(BACKLIGHT_PIN) || defined(BACKLIGHT_PINS))
// The logic is a bit complex, we support 3 setups:
// 1. hardware PWM when backlight is wired to a PWM pin
// depending on this pin, we use a different output compare unit
// 2. software PWM with hardware timers, but the used timer depends
// on the audio setup (audio wins other backlight)
// 3. full software PWM
// This logic is a bit complex, we support 3 setups:
//
// 1. Hardware PWM when backlight is wired to a PWM pin.
// Depending on this pin, we use a different output compare unit.
// 2. Software PWM with hardware timers, but the used timer
// depends on the Audio setup (Audio wins over Backlight).
// 3. Full software PWM, driven by the matrix scan, if both timers are used by Audio.
#if BACKLIGHT_PIN == B7
# define HARDWARE_PWM
# define TCCRxA TCCR1A
# define TCCRxB TCCR1B
# define COMxx1 COM1C1
# define OCRxx OCR1C
# define TIMERx_OVF_vect TIMER1_OVF_vect
# define TOIEx TOIE1
# define ICRx ICR1
# define TIMSKx TIMSK1
#elif BACKLIGHT_PIN == B6
# define HARDWARE_PWM
# define TCCRxA TCCR1A
# define TCCRxB TCCR1B
# define COMxx1 COM1B1
# define OCRxx OCR1B
# define TIMERx_OVF_vect TIMER1_OVF_vect
# define TOIEx TOIE1
# define ICRx ICR1
# define TIMSKx TIMSK1
#elif BACKLIGHT_PIN == B5
# define HARDWARE_PWM
# define TCCRxA TCCR1A
# define TCCRxB TCCR1B
# define COMxx1 COM1A1
# define OCRxx OCR1A
# define TIMERx_OVF_vect TIMER1_OVF_vect
# define TOIEx TOIE1
# define ICRx ICR1
# define TIMSKx TIMSK1
#elif BACKLIGHT_PIN == C6
# define HARDWARE_PWM
# define TCCRxA TCCR3A
# define TCCRxB TCCR3B
# define COMxx1 COM3A1
# define OCRxx OCR3A
# define TIMERx_OVF_vect TIMER3_OVF_vect
# define TOIEx TOIE3
# define ICRx ICR3
# define TIMSKx TIMSK3
#elif defined(__AVR_ATmega32A__) && BACKLIGHT_PIN == D4
# define TCCRxA TCCR1A
# define TCCRxB TCCR1B
# define COMxx1 COM1B1
# define OCRxx OCR1B
# define TIMERx_OVF_vect TIMER1_OVF_vect
# define TOIEx TOIE1
# define ICRx ICR1
# define TIMSKx TIMSK1
#if (defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) \
|| defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__) \
|| defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__)) \
&& (BACKLIGHT_PIN == B5 || BACKLIGHT_PIN == B6 || BACKLIGHT_PIN == B7)
#define HARDWARE_PWM
#define ICRx ICR1
#define TCCRxA TCCR1A
#define TCCRxB TCCR1B
#define TIMERx_OVF_vect TIMER1_OVF_vect
#define TIMSKx TIMSK1
#define TOIEx TOIE1
#if BACKLIGHT_PIN == B5
#define COMxx1 COM1A1
#define OCRxx OCR1A
#elif BACKLIGHT_PIN == B6
#define COMxx1 COM1B1
#define OCRxx OCR1B
#elif BACKLIGHT_PIN == B7
#define COMxx1 COM1C1
#define OCRxx OCR1C
#endif
#elif (defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) \
|| defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__) \
|| defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__)) \
&& (BACKLIGHT_PIN == C4 || BACKLIGHT_PIN == C5 || BACKLIGHT_PIN == C6)
#define HARDWARE_PWM
#define ICRx ICR3
#define TCCRxA TCCR3A
#define TCCRxB TCCR3B
#define TIMERx_OVF_vect TIMER3_OVF_vect
#define TIMSKx TIMSK3
#define TOIEx TOIE3
#if BACKLIGHT_PIN == C4
#if (defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__))
#error This MCU has no C4 pin!
#else
#define COMxx1 COM3C1
#define OCRxx OCR3C
#endif
#elif BACKLIGHT_PIN == C5
#if (defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__))
#error This MCU has no C5 pin!
#else
#define COMxx1 COM3B1
#define OCRxx OCR3B
#endif
#elif BACKLIGHT_PIN == C6
#define COMxx1 COM3A1
#define OCRxx OCR3A
#endif
#elif (defined(__AVR_ATmega16U2__) || defined(__AVR_ATmega32U2__)) \
&& (BACKLIGHT_PIN == B7 || BACKLIGHT_PIN == C5 || BACKLIGHT_PIN == C6)
#define HARDWARE_PWM
#define ICRx ICR1
#define TCCRxA TCCR1A
#define TCCRxB TCCR1B
#define TIMERx_OVF_vect TIMER1_OVF_vect
#define TIMSKx TIMSK1
#define TOIEx TOIE1
#if BACKLIGHT_PIN == B7
#define COMxx1 COM1C1
#define OCRxx OCR1C
#elif BACKLIGHT_PIN == C5
#define COMxx1 COM1B1
#define OCRxx OCR1B
#elif BACKLIGHT_PIN == C6
#define COMxx1 COM1A1
#define OCRxx OCR1A
#endif
#elif defined(__AVR_ATmega32A__) \
&& (BACKLIGHT_PIN == D4 || BACKLIGHT_PIN == D5)
#define HARDWARE_PWM
#define ICRx ICR1
#define TCCRxA TCCR1A
#define TCCRxB TCCR1B
#define TIMERx_OVF_vect TIMER1_OVF_vect
#define TIMSKx TIMSK
#define TOIEx TOIE1
#if BACKLIGHT_PIN == D4
#define COMxx1 COM1B1
#define OCRxx OCR1B
#elif BACKLIGHT_PIN == D5
#define COMxx1 COM1A1
#define OCRxx OCR1A
#endif
#else
# if !defined(BACKLIGHT_CUSTOM_DRIVER)
# if !defined(B5_AUDIO) && !defined(B6_AUDIO) && !defined(B7_AUDIO)
// timer 1 is not used by audio , backlight can use it
#pragma message "Using hardware timer 1 with software PWM"
# define HARDWARE_PWM
# define BACKLIGHT_PWM_TIMER
# define TCCRxA TCCR1A
# define TCCRxB TCCR1B
# define OCRxx OCR1A
# define TIMERx_COMPA_vect TIMER1_COMPA_vect
# define TIMERx_OVF_vect TIMER1_OVF_vect
# define OCIExA OCIE1A
# define TOIEx TOIE1
# define ICRx ICR1
# if defined(__AVR_ATmega32A__) // This MCU has only one TIMSK register
# define TIMSKx TIMSK
# else
# define TIMSKx TIMSK1
# endif
# elif !defined(C6_AUDIO) && !defined(C5_AUDIO) && !defined(C4_AUDIO)
#pragma message "Using hardware timer 3 with software PWM"
// timer 3 is not used by audio, backlight can use it
# define HARDWARE_PWM
# define BACKLIGHT_PWM_TIMER
# define TCCRxA TCCR3A
# define TCCRxB TCCR3B
# define OCRxx OCR3A
# define TIMERx_COMPA_vect TIMER3_COMPA_vect
# define TIMERx_OVF_vect TIMER3_OVF_vect
# define OCIExA OCIE3A
# define TOIEx TOIE3
# define ICRx ICR1
# define TIMSKx TIMSK3
# else
#pragma message "Audio in use - using pure software PWM"
#define NO_HARDWARE_PWM
# endif
# else
#pragma message "Custom driver defined - using pure software PWM"
#define NO_HARDWARE_PWM
# endif
#if !defined(BACKLIGHT_CUSTOM_DRIVER)
#if !defined(B5_AUDIO) && !defined(B6_AUDIO) && !defined(B7_AUDIO)
// Timer 1 is not in use by Audio feature, Backlight can use it
#pragma message "Using hardware timer 1 with software PWM"
#define HARDWARE_PWM
#define BACKLIGHT_PWM_TIMER
#define ICRx ICR1
#define TCCRxA TCCR1A
#define TCCRxB TCCR1B
#define TIMERx_COMPA_vect TIMER1_COMPA_vect
#define TIMERx_OVF_vect TIMER1_OVF_vect
#if defined(__AVR_ATmega32A__) // This MCU has only one TIMSK register
#define TIMSKx TIMSK
#else
#define TIMSKx TIMSK1
#endif
#define TOIEx TOIE1
#define OCIExA OCIE1A
#define OCRxx OCR1A
#elif !defined(C6_AUDIO) && !defined(C5_AUDIO) && !defined(C4_AUDIO)
#pragma message "Using hardware timer 3 with software PWM"
// Timer 3 is not in use by Audio feature, Backlight can use it
#define HARDWARE_PWM
#define BACKLIGHT_PWM_TIMER
#define ICRx ICR1
#define TCCRxA TCCR3A
#define TCCRxB TCCR3B
#define TIMERx_COMPA_vect TIMER3_COMPA_vect
#define TIMERx_OVF_vect TIMER3_OVF_vect
#define TIMSKx TIMSK3
#define TOIEx TOIE3
#define OCIExA OCIE3A
#define OCRxx OCR3A
#else
#pragma message "Audio in use - using pure software PWM"
#define NO_HARDWARE_PWM
#endif
#else
#pragma message "Custom driver defined - using pure software PWM"
#define NO_HARDWARE_PWM
#endif
#endif
#ifndef BACKLIGHT_ON_STATE
@ -1300,7 +1343,7 @@ static uint16_t cie_lightness(uint16_t v) {
// range for val is [0..TIMER_TOP]. PWM pin is high while the timer count is below val.
static inline void set_pwm(uint16_t val) {
OCRxx = val;
OCRxx = val;
}
#ifndef BACKLIGHT_CUSTOM_DRIVER

View File

@ -31,9 +31,9 @@
#define XXXXXXX KC_NO
enum quantum_keycodes {
// Ranges used in shortucuts - not to be used directly
QK_TMK = 0x0000,
QK_TMK_MAX = 0x00FF,
// Ranges used in shortcuts - not to be used directly
QK_BASIC = 0x0000,
QK_BASIC_MAX = 0x00FF,
QK_MODS = 0x0100,
QK_LCTL = 0x0100,
QK_LSFT = 0x0200,

Some files were not shown because too many files have changed in this diff Show More