Compare commits

..

9 Commits

Author SHA1 Message Date
Jack Humbert
db7767c387 merge 2017-10-27 10:40:49 -04:00
Jack Humbert
8f9ba77f72 add port shortcuts 2017-10-27 00:30:22 -04:00
Ethan Madden
8c56d51219 making qmk a bit more agnostic
if any of this ever works...
2017-10-26 21:24:55 -07:00
Ethan Madden
724fdd414a travis was upset because a board didn't have a default keymap 2017-10-26 21:24:55 -07:00
Ethan Madden
f6291fb927 added bfake support as a subproject
also moved existing bmini stuff to a subproject

fixed columns

minor keymap update

making this a subproject

remove old stuff

got subproject stuff figured out
2017-10-26 21:24:55 -07:00
Ethan Madden
ba132db308 making qmk a bit more agnostic
if any of this ever works...
2017-10-26 15:16:27 -07:00
Ethan Madden
34b0029b1e Merge branch 'master' of https://github.com/qmk/qmk_firmware into ps2avrgb 2017-10-26 09:52:35 -07:00
Ethan Madden
2d9a383e0b travis was upset because a board didn't have a default keymap 2017-10-23 11:16:38 -07:00
Ethan Madden
8a3f0ec83f added bfake support as a subproject
also moved existing bmini stuff to a subproject

fixed columns

minor keymap update

making this a subproject

remove old stuff

got subproject stuff figured out
2017-10-20 14:49:22 -07:00
18 changed files with 166 additions and 374 deletions

View File

@@ -3,7 +3,6 @@
* [Install Build Tools](getting_started_build_tools.md) * [Install Build Tools](getting_started_build_tools.md)
* Alternative: [Vagrant Guide](getting_started_vagrant_guide.md) * Alternative: [Vagrant Guide](getting_started_vagrant_guide.md)
* [Build/Compile instructions](getting_started_make_guide.md) * [Build/Compile instructions](getting_started_make_guide.md)
* [Flashing instructions](flashing.md)
* [Contributing to QMK](contributing.md) * [Contributing to QMK](contributing.md)
* [How to Use Github](getting_started_github.md) * [How to Use Github](getting_started_github.md)
@@ -22,7 +21,6 @@
* [Features](features.md) * [Features](features.md)
* [Advanced Keycodes](feature_advanced_keycodes.md) * [Advanced Keycodes](feature_advanced_keycodes.md)
* [Audio](feature_audio.md) * [Audio](feature_audio.md)
* [Auto Shift](feature_auto_shift.md)
* [Backlight](feature_backlight.md) * [Backlight](feature_backlight.md)
* [Bootmagic](feature_bootmagic.md) * [Bootmagic](feature_bootmagic.md)
* [Dynamic Macros](feature_dynamic_macros.md) * [Dynamic Macros](feature_dynamic_macros.md)
@@ -33,7 +31,6 @@
* [Mouse keys](feature_mouse_keys.md) * [Mouse keys](feature_mouse_keys.md)
* [Pointing Device](feature_pointing_device.md) * [Pointing Device](feature_pointing_device.md)
* [PS2 Mouse](feature_ps2_mouse.md) * [PS2 Mouse](feature_ps2_mouse.md)
* [RGB Lighting](feature_rgblight.md)
* [Space Cadet](feature_space_cadet.md) * [Space Cadet](feature_space_cadet.md)
* [Stenography](feature_stenography.md) * [Stenography](feature_stenography.md)
* [Tap Dance](feature_tap_dance.md) * [Tap Dance](feature_tap_dance.md)
@@ -54,13 +51,13 @@
* [Basic](keycodes_basic.md) * [Basic](keycodes_basic.md)
* [Bluetooth](feature_bluetooth.md#bluetooth-keycodes) * [Bluetooth](feature_bluetooth.md#bluetooth-keycodes)
* [Bootmagic](feature_bootmagic.md#bootmagic-keycodes) * [Bootmagic](feature_bootmagic.md#bootmagic-keycodes)
* [Layer Switching](feature_advanced_keycodes.md#switching-and-toggling-layers) * [Layer Switching](feature_common_shortcuts.md#switching-and-toggling-layers)
* [Mod+Key](feature_advanced_keycodes.md#modifier-keys) * [Mod+Key](feature_common_shortcuts.md#modifier-keys)
* [Mod Tap](feature_advanced_keycodes.md#mod-tap) * [Mod Tap](feature_common_shortcuts.md#mod-tap)
* [One Shot Keys](feature_advanced_keycodes.md#one-shot-keys) * [One Shot Keys](feature_common_shortcuts.md#one-shot-keys)
* [Quantum](quantum_keycodes.md) * [Quantum](quantum_keycodes.md)
* [RGB Light](feature_rgblight.md#rgblight-keycodes) * [RGB Light](feature_rgblight.md#rgblight-keycodes)
* [Shifted Keys](feature_advanced_keycodes.md#shifted-keycodes) * [Shifted Keys](feature_common_shortcuts.md#shifted-keycodes)
* [Stenography](feature_stenography.md#keycode-reference) * [Stenography](feature_stenography.md#keycode-reference)
* [Thermal Printer](feature_thermal_printer.md#thermal-printer-keycodes) * [Thermal Printer](feature_thermal_printer.md#thermal-printer-keycodes)
* [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md) * [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md)

View File

@@ -136,22 +136,24 @@ completely normal and with no intention of shifted keys.
#### An example run #### An example run
hello world. my name is john doe. i am a computer programmer playing with '''
keyboards right now. hello world. my name is john doe. i am a computer programmer playing with
keyboards right now.
[PRESS KC_ASDN quite a few times] [PRESS KC_ASDN quite a few times]
heLLo woRLd. mY nAMe is JOHn dOE. i AM A compUTeR proGRaMMER PlAYiNG witH heLLo woRLd. mY nAMe is JOHn dOE. i AM A compUTeR proGRaMMER PlAYiNG witH
KEYboArDS RiGHT NOw. KEYboArDS RiGHT NOw.
[PRESS KC_ASUP a few times] [PRESS KC_ASUP a few times]
hello world. my name is john Doe. i am a computer programmer playing with hello world. my name is john Doe. i am a computer programmer playing with
keyboarDs right now. keyboarDs right now.
[PRESS KC_ASRP] [PRESS KC_ASRP]
115 115
'''
The keyboard typed `115` which represents your current `AUTO_SHIFT_TIMEOUT` The keyboard typed `115` which represents your current `AUTO_SHIFT_TIMEOUT`
value. You are now set! Practice on the *D* key a little bit that showed up value. You are now set! Practice on the *D* key a little bit that showed up

View File

@@ -5,22 +5,20 @@ QMK has a staggering number of features for building your keyboard. It can take
* [Advanced Keycodes](feature_advanced_keycodes.md) - Change layers, type shifted keys, and more. Go beyond typing simple characters. * [Advanced Keycodes](feature_advanced_keycodes.md) - Change layers, type shifted keys, and more. Go beyond typing simple characters.
* [Audio](feature_audio.md) - Connect a speaker to your keyboard for audio feedback, midi support, and music mode. * [Audio](feature_audio.md) - Connect a speaker to your keyboard for audio feedback, midi support, and music mode.
* [Auto Shift](feature_auto_shift.md) - Tap for the normal key, hold slightly longer for its shifted state. * [Backlight](feature_backlight.md) - LED lighting support for your keyboard
* [Backlight](feature_backlight.md) - LED lighting support for your keyboard. * [Bootmagic](feature_bootmagic.md) - Adjust the behavior of your keyboard using hotkeys
* [Bootmagic](feature_bootmagic.md) - Adjust the behavior of your keyboard using hotkeys.
* [Dynamic Macros](feature_dynamic_macros.md) - Record and playback macros from the keyboard itself. * [Dynamic Macros](feature_dynamic_macros.md) - Record and playback macros from the keyboard itself.
* [Key Lock](feature_key_lock.md) - Lock a key in the "down" state. * [Key Lock](feature_key_lock.md) - Lock a key in the "down" state.
* [Layouts](feature_layouts.md) - Use one keymap with any keyboard that supports your layout. * [Layouts](feature_layouts.md) - Use one keymap with any keyboard that supports your layout.
* [Leader Key](feature_leader_key.md) - Tap the leader key followed by a sequence to trigger custom behavior. * [Leader Key](feature_leader_key.md) - Tap the leader key followed by a sequence to trigger custom behavior.
* [Macros](feature_macros.md) - Send multiple key presses when pressing only one physical key. * [Macros](feature_macros.md) - Send multiple key presses when pressing only one physical key
* [Mouse keys](feature_mouse_keys.md) - Control your mouse pointer from your keyboard. * [Mouse keys](feature_mouse_keys.md) - Control your mouse pointer from your keyboard
* [Pointing Device](feature_pointing_device.md) - Framework for connecting your custom pointing device to your keyboard. * [Pointing Device](feature_pointing_device.md) - Framework for connecting your custom pointing device to your keyboard.
* [PS2 Mouse](feature_ps2_mouse.md) - Driver for connecting a ps2 mouse directly to your keyboard. * [PS2 Mouse](feature_ps2_mouse.md) - Driver for connecting a ps2 mouse directly to your keyboard.
* [RGB Light](feature_rgblight.md) - RGB lighting for your keyboard.
* [Space Cadet](feature_space_cadet_shift.md) - Use your left/right shift keys to type parenthesis and brackets. * [Space Cadet](feature_space_cadet_shift.md) - Use your left/right shift keys to type parenthesis and brackets.
* [Stenography](feature_stenography.md) - Put your keyboard into Plover mode for stenography use. * [Stenography](feature_stenography.md) - Put your keyboard into Plover mode for stenography use.
* [Tap Dance](feature_tap_dance.md) - Make a single key do as many things as you want. * [Tap Dance](feature_tap_dance.md) - Make a single key do as many things as you want
* [Terminal](feature_terminal.md) - CLI interface to the internals of your keyboard. * [Terminal](feature_terminal.md) - CLI interface to the internals of your keyboard
* [Thermal Printer](feature_thermal_printer.md) - Connect a thermal printer to your keyboard to be able to toggle on a printed log of everything you type. * [Thermal Printer](feature_thermal_printer.md) - Connect a thermal printer to your keyboard to be able to toggle on a printed log of everything you type.
* [Unicode](feature_unicode.md) - Unicode input support. * [Unicode](feature_unicode.md) - Unicode input support.
* [Userspace](feature_userspace.md) - Share code between different keymaps and keyboards. * [Userspace](feature_userspace.md) - Share code between different keymaps and keyboards

View File

@@ -1,74 +0,0 @@
# Flashing Intrustructions
There are quite a few different types of bootloaders that keyboards use, and just about all of the use a different flashing method. Luckily, projects like the [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) aim to be compatible with all the different types without having to think about it much, but this article will describe the different types of bootloaders, and available methods for flashing them.
## DFU
Atmel's DFU bootloader comes on all atmega32u4 chips by default, and is used by many keyboards that have their own ICs on their PCBs (Older OLKB boards, Clueboards). Some keyboards may also use LUFA's DFU bootloader (or QMK's fork) (Newer OLKB boards) that adds in additional features specific to that hardware.
These bootloaders are usually 4096 bytes for the atmega32u4 chip.
Compatible flashers:
* [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (recommended GUI)
* [dfu-programmer](https://github.com/dfu-programmer/dfu-programmer) / `:dfu` in QMK (recommended commandline)
* [Atmel's Flip](http://www.atmel.com/tools/flip.aspx) (not recommended)
Flashing sequence:
1. Press the `RESET` keycode, or tap the RESET button (or short RST to GND).
2. Wait for the OS to detect the device
3. Erase the memory (may be done automatically)
4. Flash a .hex file
5. Reset the device into application mode (may be done automatically)
or:
make <keyboard>:<keymap>:dfu
## Caterina
Arduino boards and their clones use the [Caterina bootloader](https://github.com/arduino/Arduino/tree/master/hardware/arduino/avr/bootloaders/caterina) (any keyboard built with a Pro Micro, or clone), and uses the avr109 protocol to communicate through virtual serial. Bootloaders like [A-Star](https://www.pololu.com/docs/0J61/9) are based on Caterina.
This block of code allows for Caterina compatibility in QMK:
#define CATERINA_BOOTLOADER
These bootloaders are usually 4096 bytes for the atmega32u4 chip.
Compatible flashers:
* [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (recommended GUI)
* [avrdude](http://www.nongnu.org/avrdude/) with avr109 / `:avrdude` (recommended commandline)
* [AVRDUDESS](https://github.com/zkemble/AVRDUDESS)
Flashing sequence:
1. Press the `RESET` keycode, or short RST to GND quickly (you only have 7 seconds to flash once it enters)
2. Wait for the OS to detect the device
4. Flash a .hex file
5. Wait for the device to reset automatically
or
make <keyboard>:<keymap>:avrdude
## Halfkay
Halfkay is a super-slim protocol developed by PJRC that uses HID, and come on all Teensys (namely the 2.0).
This bootloader is 512 bytes.
Compatible flashers:
* [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (recommended GUI)
* [Teensy Loader](https://www.pjrc.com/teensy/loader.html)
* [Teensy Loader Command Line](https://www.pjrc.com/teensy/loader_cli.html) (recommended commandline)
Flashing sequence:
1. Press the `RESET` keycode, or short RST to GND quickly (you only have 7 seconds to flash once it enters)
2. Wait for the OS to detect the device
4. Flash a .hex file
5. Reset the device into application mode (may be done automatically)

View File

@@ -44,7 +44,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KEYMAP( KEYMAP(
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_EURO, TP_REQ, TP_ACC, KC_TRNS, MCO_UE, KC_TRNS, MCO_OE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ KC_TRNS, KC_TRNS, KC_TRNS, KC_EURO, TP_REQ, TP_ACC, KC_TRNS, MCO_UE, KC_TRNS, MCO_OE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\
KC_TRNS, MCO_AE, MCO_SS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_M_P, RGB_M_B, RGB_M_SW,KC_TRNS, KC_GRV, KC_TRNS,\ KC_TRNS, MCO_AE, MCO_SS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_M_P, RGB_M_B, RGB_M_SW,KC_TRNS, KC_TRNS, KC_TRNS,\
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_HUI, RGB_HUD, KC_TRNS, KC_TRNS, KC_TRNS,\ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_HUI, RGB_HUD, KC_TRNS, KC_TRNS, KC_TRNS,\
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
}; };

View File

@@ -49,26 +49,13 @@ $ make ps2avrGB
$ bootloadHID -r ps2avrGB_default.hex $ bootloadHID -r ps2avrGB_default.hex
``` ```
## Setting the board to bootloader mode
If you're lucky, the programming script does this automagically for you. If
however this doesn't work for you, you need to enter the bootloader mode manually
by plugging the keyboard in while holding the bootloader key. If you did this
correctly the LEDs will blink and you'll be able to flash your firmware.
The bootloader key is the top left key of your matrix. For a standard board
from winkeyless.kr this is `L_Ctrl`, but for some custom boards running ps2avrGB
this might be different. For the Pearl it's `Esc`, for a b.fake it is `q`. If
you're unsure you should be able to see the key in the bootmapper client.
## Troubleshooting ## Troubleshooting
From my experience, it's really hard to brick these boards. But these 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. 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 1. Try plugging the board in while pressing `L_Ctrl`. This will force it
it to boot only the bootloader without loading the firmware. Once this is to boot only the bootloader without loading the firmware. Once this is
done, just reflash the board with the original firmware. done, just reflash the board with the original firmware.
2. Sometimes USB hubs can act weird, so try connecting the board directly 2. Sometimes USB hubs can act weird, so try connecting the board directly
to your computer or plugging/unplugging the USB hub. to your computer or plugging/unplugging the USB hub.

View File

@@ -76,8 +76,7 @@ if kb is not None:
print('Found a keyboad in normal mode. Attempting to send it to bootloader mode ...', end='') print('Found a keyboad in normal mode. Attempting to send it to bootloader mode ...', end='')
sendDeviceToBootloaderMode(kb) sendDeviceToBootloaderMode(kb)
print(' done.') print(' done.')
print("Hint: If your keyboard can't be set to bootloader mode automatically, plug it in while pressing the bootloader key to do so manually.") print("Hint: If your keyboard can't be set to bootloader mode automatically, plug it in while pressing left control to do so manually.")
print(" You can find more infos about this here: https://github.com/qmk/qmk_firmware/tree/master/keyboards/ps2avrGB#setting-the-board-to-bootloader-mode")
attempts = 12 # 60 seconds attempts = 12 # 60 seconds
found = False found = False

View File

@@ -1,48 +0,0 @@
#include "tada68.h"
#define _BL 0
#define _FL 1
#define _______ KC_TRNS
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap _BL: (Base Layer) Default Layer
* ,----------------------------------------------------------------.
* |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |~ ` |
* |----------------------------------------------------------------|
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ |Del |
* |----------------------------------------------------------------|
* |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return |PgUp|
* |----------------------------------------------------------------|
* |Shift | Z| X| C| V| B| N| M| ,| .| /| <> | Up|PgDn|
* |----------------------------------------------------------------|
* |Ctrl|Win |Alt | Space |Alt| FN| APP|Lef|Dow|Rig |
* `----------------------------------------------------------------'
*/
[_BL] = KEYMAP_ISO(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,KC_GRV, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC,KC_BSLS,KC_DEL, \
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_BSLS, KC_ENT,KC_PGUP, \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_NONUS_BSLASH,KC_UP,KC_PGDN, \
KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,MO(_FL),KC_APPLICATION, KC_LEFT,KC_DOWN,KC_RGHT),
/* Keymap _FL1: Function Layer 1
* ,----------------------------------------------------------------.
* | | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| RESET|PSCR|
* |----------------------------------------------------------------|
* | | | | | | | | | | | |BL-|BL+|BL | INS|
* |----------------------------------------------------------------|
* | | | | | | | | | | PP|PLA| PN| |HOME|
* |----------------------------------------------------------------|
* | | | | | | | | | V-| MV| V+| | | END|
* |----------------------------------------------------------------|
* | | | | | | | | | | |
* `----------------------------------------------------------------'
*/
[_FL] = KEYMAP_ISO(
_______, KC_F1,KC_F2,KC_F3,KC_F4,KC_F5,KC_F6,KC_F7,KC_F8,KC_F9,KC_F10,KC_F11,KC_F12,RESET,KC_PSCR, \
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, BL_DEC,BL_INC, BL_TOGG,KC_INS, \
_______,_______,_______,_______,_______,_______,_______,_______,_______,KC_MPRV,KC_MPLY,KC_MNXT,_______,_______,KC_HOME, \
_______,_______,_______,_______,_______,_______,_______,_______,KC_VOLD,KC_MUTE,KC_VOLU,_______,_______,KC_END, \
_______,_______,_______, _______, _______,_______,_______,_______,_______, _______),
};

View File

@@ -1,3 +0,0 @@
# ISO(ish) - Basic ISO format layout for TADA68 #
Basic layout with some edits to work better with ISO (nordic) layout. Due to the wide left shift it isn't quite Nordic iso though.

View File

@@ -1,21 +0,0 @@
# Build Options
# change to "no" to disable the options, or define them in the Makefile in
# the appropriate keymap folder that will get included automatically
#
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = no # Console for debug(+400)
COMMAND_ENABLE = yes # Commands for debug and configuration
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
MIDI_ENABLE = no # MIDI controls
AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
ifndef QUANTUM_DIR
include ../../../../Makefile
endif

View File

@@ -37,37 +37,6 @@
{k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, k49, k4a, k4b, k4c, k4d, k4e} \ {k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, k49, k4a, k4b, k4c, k4d, k4e} \
} }
/* TADA68 ISO layout
* ,----------------------------------------------------------------.
* | 00 |01| 02| 03| 04| 05| 06| 07| 08| 09| 0a| 0b| 0c| 0d | 0e |
* |----------------------------------------------------------------|
* | 10 | 11| 12| 13| 14| 15| 16| 17| 18| 19| 1a| 1b| 1c| 1d | 1e |
* |----------------------------------------------------------------|
* | 20 | 21| 22| 23| 24| 25| 26| 27| 28| 29| 2a| 2b| 2c| 2d| 2e |
* |----------------------------------------------------------------|
* | 30 | 32| 33| 34| 35| 36| 37| 38| 39| 3a| 3b| 3c| 3d| 3e |
* |----------------------------------------------------------------|
* | 40 | 41 | 42 | 45 | 49| 4a| 4b| 4c| 4d| 4e |
* `----------------------------------------------------------------'
*/
// The first section contains all of the arguments
// The second converts the arguments into a two-dimensional array
#define KEYMAP_ISO( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, \
k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \
k40, k41, k42, k45, k49, k4a, k4b, k4c, k4d, k4e \
) \
{ \
{k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e}, \
{k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e}, \
{k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e}, \
{k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e}, \
{k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, k49, k4a, k4b, k4c, k4d, k4e} \
}
void matrix_init_user(void); void matrix_init_user(void);
void matrix_scan_user(void); void matrix_scan_user(void);

View File

@@ -11,20 +11,11 @@
// #define CFQ_USE_MOMENTARY_LAYER_KEYS // #define CFQ_USE_MOMENTARY_LAYER_KEYS
// #define CFQ_USE_EXPEREMENTAL_LAYER // #define CFQ_USE_EXPEREMENTAL_LAYER
// keep enabled for now
#define CFQ_USE_DYNAMIC_MACRO
#if !defined(CFQ_USER_KEY1) #if !defined(CFQ_USER_KEY1)
#define CFQ_USER_KEY1 KC_SPC #define CFQ_USER_KEY1 KC_F13
#endif #endif
#if !defined(CFQ_USER_KEY2) #if !defined(CFQ_USER_KEY2)
#define CFQ_USER_KEY2 KC_ENT #define CFQ_USER_KEY2 KC_APP
#endif
#if !defined(CFQ_USER_KEY3)
#define CFQ_USER_KEY3 CFQ_KC_FN3
#endif
#if !defined(CFQ_USER_KEY4)
#define CFQ_USER_KEY4 KC_APP
#endif #endif
#define BASE 0 // default layer #define BASE 0 // default layer
@@ -38,16 +29,9 @@ enum custom_keycodes {
PLACEHOLDER = SAFE_RANGE, // can always be here PLACEHOLDER = SAFE_RANGE, // can always be here
EPRM, EPRM,
VRSN, VRSN,
RGB_SLD, RGB_SLD
#ifdef CFQ_USE_DYNAMIC_MACRO
DYNAMIC_MACRO_RANGE,
#endif
}; };
#ifdef CFQ_USE_DYNAMIC_MACRO
#include "dynamic_macro.h"
#endif
// macros // macros
#ifdef CFQ_USE_EXPEREMENTAL_LAYER #ifdef CFQ_USE_EXPEREMENTAL_LAYER
#define M_SPACES_1 2 #define M_SPACES_1 2
@@ -93,13 +77,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |--------+------+------+------+------+------| [ | | ] |------+------+------+------+------+--------| * |--------+------+------+------+------+------| [ | | ] |------+------+------+------+------+--------|
* | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift | * | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | LCtl |Super | Alt | USR4 |Space | | Left | Down | Up |Right | Del | * | LCtl |Super | Alt | USR2 |Space | | Left | Down | Up |Right | Del |
* `----------------------------------' `----------------------------------' * `----------------------------------' `----------------------------------'
* ,-------------. ,-------------. * ,-------------. ,-------------.
* | Ins | USR3 | | Home | End | * | Ins | ~L3 | | Home | End |
* ,------|------|------| |------+------+------. * ,------|------|------| |------+------+------.
* | | | ~L2 | | PgUp | | | * | | | ~L2 | | PgUp | | |
* | USR1 | USR2 |------| |------|Enter |Space | * |Space | USR1 |------| |------|Enter |Space |
* | | | ~L1 | | PgDn | | | * | | | ~L1 | | PgDn | | |
* `--------------------' `--------------------' * `--------------------' `--------------------'
*/ */
@@ -111,10 +95,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LPRN, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LPRN,
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC,
KC_LCTL, KC_LGUI, KC_LALT, CFQ_USER_KEY4, KC_SPC, KC_LCTL, KC_LGUI, KC_LALT, CFQ_USER_KEY2, KC_SPC,
KC_INS, CFQ_USER_KEY3, KC_INS, CFQ_KC_FN3,
CFQ_KC_FN2, CFQ_KC_FN2,
CFQ_USER_KEY1, CFQ_USER_KEY2, CFQ_KC_FN1, KC_SPC, CFQ_USER_KEY1, CFQ_KC_FN1,
// right hand // right hand
KC_RCBR, KC_CIRC, KC_AMPR, KC_ASTR,KC_MINS, KC_EQL, KC_BSPC, KC_RCBR, KC_CIRC, KC_AMPR, KC_ASTR,KC_MINS, KC_EQL, KC_BSPC,
KC_RPRN, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_RPRN, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
@@ -143,10 +127,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | 0 | | . | + | | * | | | | | | | 0 | | . | + | |
* `----------------------------------' `----------------------------------' * `----------------------------------' `----------------------------------'
* ,-------------. ,---------------. * ,-------------. ,---------------.
* |Start1|Start2| | | | * | | | | | |
* ,------|------|------| |------+--------+------. * ,------|------|------| |------+--------+------.
* | | | Stop | | | | | * | | | | | | | |
* |Play1 |Play2 |------| |------| | | * | | |------| |------| | |
* | | | | | | | | * | | | | | | | |
* `--------------------' `----------------------' * `--------------------' `----------------------'
*/ */
@@ -158,15 +142,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M(M_ARROW_RMINUS), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M(M_ARROW_RMINUS),
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M(M_BRACKET_IN_ANG), M(M_BRACKET_IN_BRC), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M(M_BRACKET_IN_ANG), M(M_BRACKET_IN_BRC),
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
#ifdef CFQ_USE_DYNAMIC_MACRO
DYN_REC_START1, DYN_REC_START2,
DYN_REC_STOP,
DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, KC_TRNS,
#else
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
#endif
// right hand // right hand
M(M_BRACKET_OUT_CBR), KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, M(M_BRACKET_OUT_CBR), KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS,
M(M_BRACKET_OUT_PRN), M(M_ARROW_LEQL), KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_SLASH, KC_F11, M(M_BRACKET_OUT_PRN), M(M_ARROW_LEQL), KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_SLASH, KC_F11,
@@ -223,13 +201,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap 3: My own testing keys! /* Keymap 3: My own testing keys!
* *
* ,--------------------------------------------------. ,--------------------------------------------------. * ,--------------------------------------------------. ,--------------------------------------------------.
* | | | | { | } | | } | | | | | | | | | * | | Spc1 | Spc2 | Spc3 | Spc4 | Spc5 | | | | Spc6 | Spc7 | Spc8 | | | |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | | | ( | ) | | ) | | | Spc7 | Spc8 | | | | | * | | | | | | | | | | | | | | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | | [ | ] | |------| |------| Spc4 | Spc5 | Spc6 | | | | * | | | | | | |------| |------| | | | | | |
* |--------+------+------+------+------+------| ] | | |------+------+------+------+------+--------| * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | | < | > | | | | | Spc1 | Spc2 | Spc3 | | | | * | | | | | | | | | | | | | | | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | | | | | | | | | * | | | | | | | | | | | |
* `----------------------------------' `----------------------------------' * `----------------------------------' `----------------------------------'
@@ -242,23 +220,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `--------------------' `--------------------' * `--------------------' `--------------------'
*/ */
// EXPERIMENT // EXPEREMENT
[EXPR] = LAYOUT_ergodox( [EXPR] = LAYOUT_ergodox(
// left hand // left hand
KC_TRNS, KC_TRNS, KC_TRNS, KC_LCBR, KC_RCBR, KC_TRNS, KC_RCBR, KC_TRNS, M(M_SPACES_1), M(M_SPACES_2), M(M_SPACES_3), M(M_SPACES_4), M(M_SPACES_5), KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_LPRN, KC_RPRN, KC_TRNS, KC_RPRN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, S(KC_COMM), S(KC_DOT), KC_TRNS, KC_RBRC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
// right hand // right hand
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M(M_SPACES_6), M(M_SPACES_7), M(M_SPACES_8), KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, M(M_SPACES_7), M(M_SPACES_8), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, M(M_SPACES_4), M(M_SPACES_5), M(M_SPACES_6), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, M(M_SPACES_1), M(M_SPACES_2), M(M_SPACES_3), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS KC_TRNS, KC_TRNS, KC_TRNS
@@ -336,11 +314,6 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
}; };
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef CFQ_USE_DYNAMIC_MACRO
if (!process_record_dynamic_macro(keycode, record)) {
return false;
}
#endif
switch (keycode) { switch (keycode) {
// dynamically generate these. // dynamically generate these.
case EPRM: case EPRM:

View File

@@ -27,7 +27,7 @@
Some optional behavior is configurable without editing the code Some optional behavior is configurable without editing the code
using `CFQ_` prefixed defines which can be set by passing `EXTRAFLAGS` to make. using `CFQ_` prefixed defines which can be set by passing `EXTRAFLAGS` to make.
- `CFQ_USER_KEY1` (1..4) are used for custom-keys - `CFQ_USER_KEY1`, `CFQ_USER_KEY2` are used for custom-keys
- `CFQ_USE_MOMENTARY_LAYER_KEYS` is used to prevent layer keys from toggling when tapped. - `CFQ_USE_MOMENTARY_LAYER_KEYS` is used to prevent layer keys from toggling when tapped.
- `CFQ_USE_SWAP_RIGHT_SPACE_ENTER` swap Enter and Space on the right hand thumb cluster. - `CFQ_USE_SWAP_RIGHT_SPACE_ENTER` swap Enter and Space on the right hand thumb cluster.
While asymmetric, it makes Enter more easily accessible. While asymmetric, it makes Enter more easily accessible.
@@ -40,10 +40,8 @@ using `CFQ_` prefixed defines which can be set by passing `EXTRAFLAGS` to make.
When undefined: When undefined:
- `USR1` defaults to `KC_SPC`, otherwise use `CFQ_USER_KEY1`. - `USR1` defaults to `F13`, otherwise use `CFQ_USER_KEY1`.
- `USR2` defaults to `KC_ENT`, otherwise use `CFQ_USER_KEY2`. - `USR2` defaults to `APP`, otherwise use `CFQ_USER_KEY2`.
- `USR3` defaults to `KC_FN3`, otherwise use `CFQ_USER_KEY3`.
- `USR4` defaults to `APP`, otherwise use `CFQ_USER_KEY4`.
``` ```
,--------------------------------------------------. ,--------------------------------------------------. ,--------------------------------------------------. ,--------------------------------------------------.
@@ -55,23 +53,21 @@ When undefined:
|--------+------+------+------+------+------| [ | | ] |------+------+------+------+------+--------| |--------+------+------+------+------+------| [ | | ] |------+------+------+------+------+--------|
| LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift | | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift |
`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
| LCtl |Super | Alt | USR4 |Space | | Left | Down | Up |Right | Del | | LCtl |Super | Alt | USR2 |Space | | Left | Down | Up |Right | Del |
`----------------------------------' `----------------------------------' `----------------------------------' `----------------------------------'
,-------------. ,-------------. ,-------------. ,-------------.
| Ins | USR3 | | Home | End | | Ins | ~L3 | | Home | End |
,------|------|------| |------+------+------. ,------|------|------| |------+------+------.
| | | ~L2 | | PgUp | | | | | | ~L2 | | PgUp | | |
| USR1 | USR2 |------| |------|Enter |Space | |Space | USR1 |------| |------|Enter |Space |
| | | ~L1 | | PgDn | | | | | | ~L1 | | PgDn | | |
`--------------------' `--------------------' `--------------------' `--------------------'
``` ```
## Keymap 1: Symbol layer ## Keymap 1: Symbol layer
Notes: Note the double bracket keys on this layer press left to position the cursor between them.
- The double bracket keys on this layer press left to position the cursor between them.
- The left thumb cluster is used for macro record/replay.
``` ```
,--------------------------------------------------. ,--------------------------------------------------. ,--------------------------------------------------. ,--------------------------------------------------.
@@ -86,10 +82,10 @@ Notes:
| | | | | | | 0 | | . | + | | | | | | | | | 0 | | . | + | |
`----------------------------------' `----------------------------------' `----------------------------------' `----------------------------------'
,-------------. ,---------------. ,-------------. ,---------------.
|Start1|Start2| | | | | | | | | |
,------|------|------| |------+--------+------. ,------|------|------| |------+--------+------.
| | | Stop | | | | | | | | | | | | |
|Play1 |Play2 |------| |------| | | | | |------| |------| | |
| | | | | | | | | | | | | | | |
`--------------------' `----------------------' `--------------------' `----------------------'
``` ```
@@ -119,10 +115,6 @@ Notes:
## Changelog ## Changelog
- 2017/10/28
Make more keys user defined on the left thumb cluster.
Add macro record/replay keys.
- 2017/10/4 - 2017/10/4
Move Insert key to the left thumb cluster (away from the modifier keys). Move Insert key to the left thumb cluster (away from the modifier keys).
Replace with `USR2` which defaults to `APP`. Replace with `USR2` which defaults to `APP`.

View File

@@ -17,62 +17,88 @@
#ifndef CONFIG_DEFINITIONS_H #ifndef CONFIG_DEFINITIONS_H
#define CONFIG_DEFINITIONS_H #define CONFIG_DEFINITIONS_H
#include <avr/io.h>
/* diode directions */ /* diode directions */
#define COL2ROW 0 #define COL2ROW 0
#define ROW2COL 1 #define ROW2COL 1
#define CUSTOM_MATRIX 2 /* Disables built-in matrix scanning code */ #define CUSTOM_MATRIX 2 /* Disables built-in matrix scanning code */
/* I/O pins */ /* I/O pins */
#ifndef F0 #define PINDEF(port, pin) (uint8_t)((((uint16_t)&PORT##port) << 4) + PIN##port##pin)
#define B0 0x30
#define B1 0x31 #define PIN(p) (*((volatile uint8_t*)(p >> 4) + 0))
#define B2 0x32 #define PIN_VALUE(p) (PIN(p) & _BV(p & 0xF))
#define B3 0x33
#define B4 0x34 #define DDR(p) (*((volatile uint8_t*)(p >> 4) + 1))
#define B5 0x35 #define DDR_OUTPUT(p) (DDR(p) |= _BV(p & 0xF))
#define B6 0x36 #define DDR_INPUT(p) (DDR(p) &= ~_BV(p & 0xF))
#define B7 0x37
#define C0 0x60 #define PORT(p) (*((volatile uint8_t*)(p >> 4) + 2))
#define C1 0x61 #define PORT_HIGH(p) (PORT(p) |= _BV(p & 0xF))
#define C2 0x62 #define PORT_LOW(p) (PORT(p) &= ~_BV(p & 0xF))
#define C3 0x63
#define C4 0x64 #ifdef PORTA
#define C5 0x65 #define A0 PINDEF(A, 0)
#define C6 0x66 #define A1 PINDEF(A, 1)
#define C7 0x67 #define A2 PINDEF(A, 1)
#define D0 0x90 #define A3 PINDEF(A, 3)
#define D1 0x91 #define A4 PINDEF(A, 4)
#define D2 0x92 #define A5 PINDEF(A, 5)
#define D3 0x93 #define A6 PINDEF(A, 6)
#define D4 0x94 #define A7 PINDEF(A, 7)
#define D5 0x95
#define D6 0x96
#define D7 0x97
#define E0 0xC0
#define E1 0xC1
#define E2 0xC2
#define E3 0xC3
#define E4 0xC4
#define E5 0xC5
#define E6 0xC6
#define E7 0xC7
#define F0 0xF0
#define F1 0xF1
#define F2 0xF2
#define F3 0xF3
#define F4 0xF4
#define F5 0xF5
#define F6 0xF6
#define F7 0xF7
#define A0 0x00
#define A1 0x01
#define A2 0x02
#define A3 0x03
#define A4 0x04
#define A5 0x05
#define A6 0x06
#define A7 0x07
#endif #endif
#ifdef PORTB
#define B0 PINDEF(B, 0)
#define B1 PINDEF(B, 1)
#define B2 PINDEF(B, 2)
#define B3 PINDEF(B, 3)
#define B4 PINDEF(B, 4)
#define B5 PINDEF(B, 5)
#define B6 PINDEF(B, 6)
#define B7 PINDEF(B, 7)
#endif
#ifdef PORTC
#define C0 PINDEF(C, 0)
#define C1 PINDEF(C, 1)
#define C2 PINDEF(C, 2)
#define C3 PINDEF(C, 3)
#define C4 PINDEF(C, 4)
#define C5 PINDEF(C, 5)
#define C6 PINDEF(C, 6)
#define C7 PINDEF(C, 7)
#endif
#ifdef PORTD
#define D0 PINDEF(D, 0)
#define D1 PINDEF(D, 1)
#define D2 PINDEF(D, 2)
#define D3 PINDEF(D, 3)
#define D4 PINDEF(D, 4)
#define D5 PINDEF(D, 5)
#define D6 PINDEF(D, 6)
#define D7 PINDEF(D, 7)
#endif
#ifdef PORTE
#define E0 PINDEF(E, 0)
#define E1 PINDEF(E, 1)
#define E2 PINDEF(E, 2)
#define E3 PINDEF(E, 3)
#define E4 PINDEF(E, 4)
#define E5 PINDEF(E, 5)
#define E6 PINDEF(E, 6)
#define E7 PINDEF(E, 7)
#endif
#ifdef PORTF
#define F0 PINDEF(F, 0)
#define F1 PINDEF(F, 1)
#define F2 PINDEF(F, 2)
#define F3 PINDEF(F, 3)
#define F4 PINDEF(F, 4)
#define F5 PINDEF(F, 5)
#define F6 PINDEF(F, 6)
#define F7 PINDEF(F, 7)
#endif
/* USART configuration */ /* USART configuration */
#ifdef BLUETOOTH_ENABLE #ifdef BLUETOOTH_ENABLE

View File

@@ -271,15 +271,14 @@ uint8_t matrix_key_count(void)
} }
#if (DIODE_DIRECTION == COL2ROW) #if (DIODE_DIRECTION == COL2ROW)
static void init_cols(void) static void init_cols(void)
{ {
for(uint8_t x = 0; x < MATRIX_COLS; x++) { for(uint8_t x = 0; x < MATRIX_COLS; x++) {
uint8_t pin = col_pins[x]; uint8_t pin = col_pins[x];
_SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN DDR_INPUT(pin); // IN
_SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI PORT_HIGH(pin); // HI
} }
} }
@@ -300,7 +299,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
// Select the col pin to read (active low) // Select the col pin to read (active low)
uint8_t pin = col_pins[col_index]; uint8_t pin = col_pins[col_index];
uint8_t pin_state = (_SFR_IO8(pin >> 4) & _BV(pin & 0xF)); uint8_t pin_state = PIN_VALUE(pin);
// Populate the matrix row with the state of the col pin // Populate the matrix row with the state of the col pin
current_matrix[current_row] |= pin_state ? 0 : (ROW_SHIFTER << col_index); current_matrix[current_row] |= pin_state ? 0 : (ROW_SHIFTER << col_index);
@@ -315,23 +314,23 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
static void select_row(uint8_t row) static void select_row(uint8_t row)
{ {
uint8_t pin = row_pins[row]; uint8_t pin = row_pins[row];
_SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT DDR_OUTPUT(pin); // OUT
_SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW PORT_LOW(pin); // LOW
} }
static void unselect_row(uint8_t row) static void unselect_row(uint8_t row)
{ {
uint8_t pin = row_pins[row]; uint8_t pin = row_pins[row];
_SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN DDR_INPUT(pin); // IN
_SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI PORT_HIGH(pin); // HI
} }
static void unselect_rows(void) static void unselect_rows(void)
{ {
for(uint8_t x = 0; x < MATRIX_ROWS; x++) { for(uint8_t x = 0; x < MATRIX_ROWS; x++) {
uint8_t pin = row_pins[x]; uint8_t pin = row_pins[x];
_SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN DDR_INPUT(pin); // IN
_SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI PORT_HIGH(pin); // HI
} }
} }
@@ -341,8 +340,8 @@ static void init_rows(void)
{ {
for(uint8_t x = 0; x < MATRIX_ROWS; x++) { for(uint8_t x = 0; x < MATRIX_ROWS; x++) {
uint8_t pin = row_pins[x]; uint8_t pin = row_pins[x];
_SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN DDR_INPUT(pin); // IN
_SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI PORT_HIGH(pin); // HI
} }
} }
@@ -362,7 +361,7 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
matrix_row_t last_row_value = current_matrix[row_index]; matrix_row_t last_row_value = current_matrix[row_index];
// Check row pin state // Check row pin state
if ((_SFR_IO8(row_pins[row_index] >> 4) & _BV(row_pins[row_index] & 0xF)) == 0) if (PIN_VALUE(row_pins[row_index]) == 0)
{ {
// Pin LO, set col bit // Pin LO, set col bit
current_matrix[row_index] |= (ROW_SHIFTER << current_col); current_matrix[row_index] |= (ROW_SHIFTER << current_col);
@@ -389,23 +388,23 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
static void select_col(uint8_t col) static void select_col(uint8_t col)
{ {
uint8_t pin = col_pins[col]; uint8_t pin = col_pins[col];
_SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT DDR_OUTPUT(pin); // OUT
_SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW PORT_LOW(pin); // LOW
} }
static void unselect_col(uint8_t col) static void unselect_col(uint8_t col)
{ {
uint8_t pin = col_pins[col]; uint8_t pin = col_pins[col];
_SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN DDR_INPUT(pin); // IN
_SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI PORT_HIGH(pin); // HI
} }
static void unselect_cols(void) static void unselect_cols(void)
{ {
for(uint8_t x = 0; x < MATRIX_COLS; x++) { for(uint8_t x = 0; x < MATRIX_COLS; x++) {
uint8_t pin = col_pins[x]; uint8_t pin = col_pins[x];
_SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN DDR_INPUT(pin); // IN
_SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI PORT_HIGH(pin); // HI
} }
} }

View File

@@ -127,11 +127,7 @@ bool process_combo(uint16_t keycode, keyrecord_t *record)
void matrix_scan_combo(void) void matrix_scan_combo(void)
{ {
for (int i = 0; i < COMBO_COUNT; ++i) { for (int i = 0; i < COMBO_COUNT; ++i) {
// Do not treat the (weak) key_combos too strict.
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Warray-bounds"
combo_t *combo = &key_combos[i]; combo_t *combo = &key_combos[i];
#pragma GCC diagnostic pop
if (combo->timer && if (combo->timer &&
combo->timer != COMBO_TIMER_ELAPSED && combo->timer != COMBO_TIMER_ELAPSED &&
timer_elapsed(combo->timer) > COMBO_TERM) { timer_elapsed(combo->timer) > COMBO_TERM) {

View File

@@ -51,7 +51,7 @@ uint64_t key_state[4] = { 0x0, 0x0, 0x0, 0x0 };
bool watching = false; bool watching = false;
// Translate any OSM keycodes back to their unmasked versions. // Translate any OSM keycodes back to their unmasked versions.
static inline uint16_t translate_keycode(uint16_t keycode) { uint16_t inline translate_keycode(uint16_t keycode) {
if (keycode > QK_ONE_SHOT_MOD && keycode <= QK_ONE_SHOT_MOD_MAX) { if (keycode > QK_ONE_SHOT_MOD && keycode <= QK_ONE_SHOT_MOD_MAX) {
return keycode ^ QK_ONE_SHOT_MOD; return keycode ^ QK_ONE_SHOT_MOD;
} else { } else {