Compare commits

..

60 Commits

Author SHA1 Message Date
5e18e4ab48 update docs link 2017-06-05 16:25:59 -04:00
aaa67f6930 Merge pull request #1357 from shieldsd/gherkin
Initial commit for gherkin keyboard support. Compiles but untested.
2017-06-02 10:23:54 -04:00
7cbd16c902 Initial commit for gherkin keyboard support. Compiles but untested. 2017-06-02 14:45:42 +01:00
eefec19ad9 Update Keycodes.md 2017-06-02 09:44:08 -04:00
af931368ce Merge pull request #1356 from fabienheureux/patch-1
Broken Keymap docs link
2017-06-02 09:21:15 -04:00
47c209fa02 Update Keycodes.md 2017-06-02 09:21:01 -04:00
19816a4998 Broken Keymap docs link 2017-06-02 10:51:12 +02:00
9069edd934 Merge pull request #1347 from nooges/nyquist
Add Nyquist keyboard support
2017-06-01 12:58:33 -04:00
d548693c8b Merge pull request #1294 from shieldsd/master
Prevent the recording of looping dynamic macros.
2017-06-01 12:18:36 -04:00
606e13a47e Prevent the recording of looping dynamic macros.
If a macro play key is inadvertently recorded in a dynamic macro
a loop is created and the macro will not terminate when played.

This should be prevented.
2017-06-01 16:29:58 +01:00
ec3e684123 Merge pull request #1350 from originerd/add-originerd-planck-keymap
Add originerd planck keymap
2017-06-01 11:19:40 -04:00
05e6dd6527 Merge pull request #1351 from Alfrheim/fixing_dvorak_layout
replacing one R for a T
2017-06-01 11:19:20 -04:00
cf77c42c72 Merge pull request #1353 from 333fred/333fred-layout
ergodox/333fred layout
2017-06-01 11:18:56 -04:00
cc52856bac Merge pull request #1354 from shieldsd/tweaks
Tweak reported power consumption to work with iOS
2017-06-01 11:18:28 -04:00
aae727d9ec Update keymap layout comments 2017-06-01 11:15:21 -04:00
db0ac3bcb3 Tweak reported power consumption to work with iOS 2017-06-01 09:18:33 +01:00
db82b17d6e Remove OLED code and set I2C rate back to 100kHz 2017-06-01 01:26:06 -04:00
dded79a412 Update licensing on visualizer.c 2017-05-31 18:07:02 -07:00
cfaf34daec Updated readme 2017-05-31 17:57:38 -07:00
aa1b1c5756 Added several new macros 2017-05-31 17:42:50 -07:00
f35c82ccb2 Fixed numpad 0 layout 2017-05-31 10:27:39 -07:00
974a77a07c replacing one R for a T 2017-05-31 15:19:37 +02:00
c33c2bbade Add originerd planck keymap 2017-05-31 22:00:44 +09:00
4eba71841e Use code blocks for keyboard layouts 2017-05-30 23:56:28 -07:00
95ae256482 Completed iteration 1 of my layout 2017-05-30 23:52:20 -07:00
57cfb5f1ae Merge pull request #1348 from Dbroqua/master
Added DK60 keyboard
2017-05-30 23:12:11 -04:00
949540d601 Added initial keymap files 2017-05-30 18:01:09 -07:00
c5d3faace5 Merge remote-tracking branch 'origin/feature/DK60' 2017-05-30 23:10:14 +02:00
a381eb01f5 - Updated copyright 2017-05-30 23:09:39 +02:00
7a433a7f3d Update copyright info 2017-05-30 16:52:02 -04:00
fbec02c148 Remove Let’s Split plate files 2017-05-30 16:42:04 -04:00
061bb4a0b8 Merge remote-tracking branch 'origin/feature/DK60' 2017-05-30 22:17:20 +02:00
05f5243426 - Updated readme 2017-05-30 22:17:03 +02:00
55d6750254 Merge remote-tracking branch 'origin/feature/DK60' 2017-05-30 22:15:07 +02:00
e280f7aad7 - Added Capslock/Esc led 2017-05-30 22:13:34 +02:00
328bde1624 Merge pull request #1323 from nikchi/master
Variable tapping terms
2017-05-30 15:38:22 -04:00
3c4022c41b hmm? 2017-05-30 14:19:57 -04:00
2c9f846608 Merge pull request #2 from qmk/master
pull in new qmk changes
2017-05-30 14:17:48 -04:00
be204f9cdd Update readme 2017-05-30 13:29:30 -04:00
cb791cf6cd Merge branch 'master' of https://github.com/qmk/qmk_firmware 2017-05-30 12:49:38 -04:00
9ecfc23292 make qmk bot do the hard work 2017-05-30 12:49:26 -04:00
4549b0417e Merge pull request #1342 from priyadi/adafruit-mouse-buttons
Adafruit Feather BLE / BLE Friend mouse buttons support
2017-05-30 12:10:45 -04:00
3a1a7d6472 Merge branch 'master' of https://github.com/qmk/qmk_firmware 2017-05-30 11:46:34 -04:00
7eccbfe737 exclude PRs 2017-05-30 11:46:25 -04:00
f06f883589 - Some changes on DK60 2017-05-30 16:59:56 +02:00
5393bc6f4e switched to uint8 and 16 2017-05-29 21:25:50 -04:00
4a8da0cb45 Modify pinout and layouts for Nyquist 2017-05-29 16:20:06 -04:00
aeade1b197 Fork Let’s Split files 2017-05-29 16:04:46 -04:00
732a115b32 Merge pull request #1344 from qmk/jackhumbert-patch-1
Re-enable mouse buttons from #1327
2017-05-29 15:17:38 -04:00
b6c60333e4 Re-enable mouse buttons 2017-05-29 13:21:38 -04:00
f0fc2db4e2 Adafruit Feather BLE / BLE Friend mouse buttons support 2017-05-29 18:17:21 +07:00
66e9cf9718 clarified tap 2017-05-26 15:59:34 -04:00
1bff72c009 - 2017-05-26 00:19:12 -04:00
d462409762 tenative readme for variable timing tap 2017-05-26 00:18:59 -04:00
b3144112d3 removed need to set customtapping term 0. defaults to 0 already 2017-05-25 16:38:06 -04:00
7c8b166cce changed -1 to 0 can't have negative unsigned ints 🤔 2017-05-25 16:29:57 -04:00
aeb3a34636 moved specific tap term to its own function
included custom_tapping_term in action struct
2017-05-25 16:26:30 -04:00
e695b5a33b Added per case tapping term, updated FF-nikchi keymap. 2017-05-25 00:41:00 -04:00
17a378715e Tapping Term and Memes TD for FF 2017-05-24 23:43:02 -04:00
230c70e285 - Initial commit for branch DK60 2017-05-07 22:56:27 +02:00
70 changed files with 4208 additions and 46 deletions

View File

@ -11,8 +11,6 @@ env:
- secure: vBTSL34BDPxDilKUuTXqU4CJ26Pv5hogD2nghatkxSQkI1/jbdnLj/DQdPUrMJFDIY6TK3AltsBx72MaMsLQ1JO/Ou24IeHINHXzUC1FlS9yQa48cpxnhX5kzXNyGs3oa0qaFbvnr7RgYRWtmD52n4bIZuSuW+xpBv05x2OCizdT2ZonH33nATaHGFasxROm4qYZ241VfzcUv766V6RVHgL4x9V08warugs+RENVkfzxxwhk3NmkrISabze0gSVJLHBPHxroZC6EUcf/ocobcuDrCwFqtEt90i7pNIAFUE7gZsN2uE75LmpzAWin21G7lLPcPL2k4FJVd8an1HiP2WmscJU6U89fOfMb2viObnKcCzebozBCmKGtHEuXZo9FcReOx49AnQSpmESJGs+q2dL/FApkTjQiyT4J6O5dJpoww0/r57Wx0cmmqjETKBb5rSgXM51Etk3wO09mvcPHsEwrT7qH8r9XWdyCDoEn7FCLX3/LYnf/D4SmZ633YPl5gv3v9XEwxR5+04akjgnvWDSNIaDbWBdxHNb7l4pMc+WR1bwCyMyA7KXj0RrftEGOrm9ZRLe6BkbT4cycA+j77nbPOMcyZChliV9pPQos+4TOJoTzcK2L8yWVoY409aDNVuAjdP6Yum0R2maBGl/etLmIMpJC35C5/lZ+dUNjJAM=
before_install:
- wget http://www.atmel.com/images/avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz
- openssl aes-256-cbc -K $encrypted_b0ee987fd0fc_key -iv $encrypted_b0ee987fd0fc_iv -in secrets.tar.enc -out secrets.tar -d
- tar xvf secrets.tar
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"

View File

@ -1,6 +1,6 @@
# Overview
When defining a [keymap](https://github.com/qmk/qmk_firmware/blob/master/doc/keymap.md) each key needs a valid key definition.
When defining a [keymap](Keymap.md) each key needs a valid key definition.
This page documents the symbols that correspond to keycodes that are available to you in QMK.

3
keyboards/dk60/Makefile Normal file
View File

@ -0,0 +1,3 @@
ifndef MAKEFILE_INCLUDED
include ../../Makefile
endif

55
keyboards/dk60/config.h Normal file
View File

@ -0,0 +1,55 @@
/*
Copyright 2017 Damien Broqua <contact@darkou.fr>
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/>.
*/
#ifndef CONFIG_H
#define CONFIG_H
#include "config_common.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x6060
#define DEVICE_VER 0x0003
#define MANUFACTURER DARKOU
#define PRODUCT DK60
#define DESCRIPTION QMK keyboard firmware for DK60 support
/* key matrix size */
#define MATRIX_ROWS 5
#define MATRIX_COLS 13
// ROWS: Top to bottom, COLS: Left to right
#define MATRIX_ROW_PINS { B6, B4, D7, D6, D4 }
#define MATRIX_COL_PINS { B0, B3, B2, B1, D3, D5, B5, B7, C6, C7, D0, D1, D2 }
#define UNUSED_PINS
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
/* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
/* key combination for command */
#define IS_COMMAND() ( \
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
)
#endif

34
keyboards/dk60/dk60.c Normal file
View File

@ -0,0 +1,34 @@
#include "dk60.h"
void dk60_blink_all_leds(void)
{
dk60_led_all_off();
dk60_led_all_on();
_delay_ms(500);
dk60_led_all_off();
}
void matrix_init_kb(void) {
led_init_ports();
dk60_blink_all_leds();
matrix_init_user();
}
void led_init_ports(void) {
// * Set our LED pins as output
DDRE |= (1<<6);
DDRF |= (1<<0);
}
void led_set_kb(uint8_t usb_led) {
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
// Turn capslock on
dk60_caps_led_on();
} else {
// Turn capslock off
dk60_caps_led_off();
}
led_set_user(usb_led);
}

41
keyboards/dk60/dk60.h Normal file
View File

@ -0,0 +1,41 @@
#ifndef DK60_H
#define DK60_H
#include "quantum.h"
#include <util/delay.h>
inline void dk60_caps_led_on(void) { PORTE |= (1<<6); }
inline void dk60_esc_led_on(void) { PORTF |= (1<<0); }
inline void dk60_caps_led_off(void) { PORTE &= ~(1<<6); }
inline void dk60_esc_led_off(void) { PORTF &= ~(1<<0); }
inline void dk60_led_all_on(void)
{
dk60_caps_led_on();
dk60_esc_led_on();
}
inline void dk60_led_all_off(void)
{
dk60_caps_led_off();
dk60_esc_led_off();
}
#define ___ KC_NO
#define KEYMAP( \
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K4B, K4A, \
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K4C, \
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \
K41, K42, K45, K48, K49 \
) { \
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C }, \
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C }, \
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C }, \
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C }, \
{ ___, K41, K42, ___, ___, K45, ___, ___, K48, K49, K4A, K4B, K4C } \
}
#endif

View File

@ -0,0 +1,80 @@
#include "dk60.h"
#include "action_layer.h"
enum planck_layers {
_QWERTY,
_FN,
_DVORAK,
_LOWER,
_RAISE,
_PLOVER,
_ADJUST
};
enum planck_keycodes {
QWERTY = SAFE_RANGE,
FN
};
// Fillers to make layering more clear
#define ______ KC_TRNS
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Qwerty gui/alt/space/alt/gui
* ,-----------------------------------------------------------------------------------------.
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` |
* |-----------------------------------------------------------------------------------------+
* | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bksp |
* |-----------------------------------------------------------------------------------------+
* | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | Enter |
* |-----------------------------------------------------------------------------------------+
* | Shift | Z | X | C | V | B | N | M | , | . | / | RShift | FN |
* |-----------------------------------------------------------------------------------------+
* |LGUI | LAlt | Space | RAlt |RGUI |
* `-----------------------------------------------------------------'
*/
[_QWERTY] = KEYMAP( /* Basic QWERTY */
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_BSLS, 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_BSPC, \
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, FN, \
KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI \
),
/* FN Layer
* ,-----------------------------------------------------------------------------------------.
* | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Ins | Del |
* |-----------------------------------------------------------------------------------------+
* | CAPS | | | | | | | | Psc | Slck| Paus| Up | | |
* |-----------------------------------------------------------------------------------------+
* | | Vol-| Vol+| Mute| | | * | / | Home| PgUp| Left|Right| |
* |-----------------------------------------------------------------------------------------+
* | | Prev| Play| Next| | | + | - | End |PgDn| Down| | |
* |-----------------------------------------------------------------------------------------+
* | | | | Stop | |
* `-----------------------------------------------------------------'
*/
[_FN] = KEYMAP( /* Layer 1 */
______, 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_INS, KC_DEL, \
KC_CAPS, ______, ______, ______, ______, ______, ______, ______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, ______, ______, \
______, KC_VOLD,KC_VOLU,KC_MUTE,______, ______, KC_PAST,KC_PSLS,KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, ______, \
______, KC_MPRV,KC_MPLY,KC_MNXT,______, ______, KC_PPLS,KC_PMNS,KC_END, KC_PGDN, KC_DOWN, ______, ______, \
______, ______, ______, KC_MSTP, ______ \
)
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case FN:
if (record->event.pressed) {
layer_on(_FN);
dk60_esc_led_on();
} else {
layer_off(_FN);
dk60_esc_led_off();
}
return false;
break;
}
return true;
}

8
keyboards/dk60/readme.md Normal file
View File

@ -0,0 +1,8 @@
DK60 keyboard firmware
======================
Another 60% keyboard with different HHKB layout
More information here: https://github.com/Dbroqua/DK60
Open Hardware project!

21
keyboards/dk60/rules.mk Normal file
View File

@ -0,0 +1,21 @@
MCU = atmega32u4
F_CPU = 16000000
ARCH = AVR8
F_USB = $(F_CPU)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
OPT_DEFS += -DBOOTLOADER_SIZE=4096
BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE ?= no # Mouse keys(+4700)
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
# CONSOLE_ENABLE ?= yes # Console for debug(+400)
# COMMAND_ENABLE ?= yes # Commands for debug and configuration
KEYBOARD_LOCK_ENABLE ?= yes # Allow locking of keyboard via magic key
NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
RGBLIGHT_ENABLE ?= no # Enable keyboard underlight functionality (+4870)
BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality (+1150)
MIDI_ENABLE ?= no # MIDI controls
AUDIO_ENABLE ?= no
UNICODE_ENABLE ?= yes # Unicode
BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
SLEEP_LED_ENABLE ?= yes

View File

@ -0,0 +1,12 @@
SUBPROJECT_DEFAULT = infinity
LCD_BACKLIGHT_ENABLE = yes
LCD_ENABLE = yes
LED_ENABLE = yes
BACKLIGHT_ENABLE = yes
NKRO_ENABLE = yes
TAP_DANCE_ENABLE = yes
ifndef QUANTUM_DIR
include ../../../../Makefile
endif

View File

@ -0,0 +1,122 @@
## Layout
### Keymap 0: Basic layer
```
,--------------------------------------------------. ,--------------------------------------------------.
| ` | 1 | 2 | 3 | 4 | 5 | = | | L1 | 6 | 7 | 8 | 9 | 0 | - |
|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
| TAB | Q | W | E | R | T | L2 | | L2 | Y | U | I | O | P | \ |
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
| Esc | A | S | D |LT 3,F| G |------| |------| H | J | K | L |; / : | ' |
|--------+------+------+------+------+------| L1 | |TT(3) |------+------+------+------+------+--------|
| LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift |
`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|LCTRL | F4 | F5 | LGUI | LALT | | Left | Down | Up | Right| RGUI |
`----------------------------------' `----------------------------------'
,-------------. ,-------------.
| Home | End | | Alt |Ctrl/Esc|
,------|------|------| |------+--------+------.
| | | PgUp | | PgDn | | |
| Bcksp|OSL(2)|------| |------| Ent |Space |
| | | Del | |OSL(2)| | |
`--------------------' `----------------------'
```
* Double-click `;` to get a `:`
* Press-and-hold `f` to go to the movement layer
### Keymap 1: Code Layer
```
,--------------------------------------------------. ,--------------------------------------------------.
| | | | | | | | | | | | | | | |
|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
| | | | | | | F10 | | F11 | | | | | | |
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
| | | | | | |------| |------| | | | | | |
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
| | | | | | | | | | | | | | | |
`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
| | | | | | | | | | | |
`----------------------------------' `----------------------------------'
,-------------. ,---------------.
|Format| | | Test | DTest |
,------|------|------| |------+--------+------.
| | |Refact| | | | |
| | |------| |------| | |
| | | | | | | |
`--------------------' `----------------------'
```
* Format - Visual Studio Format. Sends `CTRL + K, CTRL + D`
* Refact - Visual Studio Refactor. Sends `CTRL + R, R`
* Test - Visual Studio Run Test. Sends `CTRL + R, T`
* DTest - Visual Studio Debug Test. Sends `CTRL + R, CTRL + T`
### Keymap 2: Symbol Layer
```
,---------------------------------------------------. ,--------------------------------------------------.
|Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
|---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
| | ! | @ | ( | ) | | | | | | Up | 7 | 8 | 9 | * | F12 |
|---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
| | # | $ | { | } | ` |------| |------| Down | 4 | 5 | 6 | + | |
|---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
| | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | |
`---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
| EPRM | | | | | | 0 | 0 | . | = | |
`-----------------------------------' `----------------------------------'
,-------------. ,-------------.
| | Caps | | | |
,------|------|------| |------+------+------.
| | |APscr | | | | |
| | |------| |------| | |
| | | PScr | | | | |
`--------------------' `--------------------'
```
* APscr - Take a printscreen of the current app. Sends `Alt + Print Screen`
### Keymap 3: Media and Mouse Keys
```
,--------------------------------------------------. ,--------------------------------------------------.
| | | | | | | | | | | | | | | |
|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
| | | | MsUp | | | | | | | | | | | |
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
| | |MsLeft|MsDown|MsRght| |------| |------| | | | | | |
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
| | | | | | | | | | | | | | | |
`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
| | | | Lclk | Rclk | | | | | | |
`----------------------------------' `----------------------------------'
,-------------. ,-------------.
| | | | Vol+ | |
,------|------|------| |------+------+------.
| | | | | Vol- | | |
| | |------| |------| PL/PS| Next |
| | | | | Back | | |
`--------------------' `--------------------'
```
### Keymap 4: Movement
```
,--------------------------------------------------. ,--------------------------------------------------.
| | | | | | | | | | | | | | | |
|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
| | | | | | | | | | | | | | | |
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
| |DLeft |DRight|LShift| | |------| |------| Left | Down | Up | Right| | |
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
| |KOpen |KType | | | | | | | | | | | | |
`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
| | | | | | | | | | | |
`----------------------------------' `----------------------------------'
,-------------. ,-------------.
| | | | | |
,------|------|------| |------+------+------.
| | | | | | | |
| | CTRL |------| |------| | |
| | | | | | | |
`--------------------' `--------------------'
```
* DLeft - Move to the left Desktop. Sends `Ctrl + Win + Left Arrow`
* DRight - Move to the right Desktop. Sends `Ctrl + Win + Right Arrow`
* KOpen - Opens KeePass. Sends `Ctrl + Alt + k`
* KType - Autotypes KeePass password. Sends `Ctrl + Alt + a`

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,33 @@
/*
Note: this is a modified copy of ../default/visualizer.c, originally licensed GPL.
*/
#include "simple_visualizer.h"
// This function should be implemented by the keymap visualizer
// Don't change anything else than state->target_lcd_color and state->layer_text as that's the only thing
// that the simple_visualizer assumes that you are updating
// Also make sure that the buffer passed to state->layer_text remains valid until the previous animation is
// stopped. This can be done by either double buffering it or by using constant strings
static void get_visualizer_layer_and_color(visualizer_state_t* state) {
uint8_t saturation = 60;
if (state->status.leds & (1u << USB_LED_CAPS_LOCK)) {
saturation = 255;
}
if (state->status.layer & 0x10) {
state->target_lcd_color = LCD_COLOR(140, 100, 60);
state->layer_text = "Movement";
} else if (state->status.layer & 0x8) {
state->target_lcd_color = LCD_COLOR(0, saturation, 0xFF);
state->layer_text = "Media";
} else if (state->status.layer & 0x4) {
state->target_lcd_color = LCD_COLOR(168, saturation, 0xFF);
state->layer_text = "Symbol";
} else if (state->status.layer & 0x2) {
state->target_lcd_color = LCD_COLOR(216, 90, 0xFF);
state->layer_text = "Code";
} else {
state->target_lcd_color = LCD_COLOR(84, saturation, 0xFF);
state->layer_text = "Default";
}
}

View File

@ -3,8 +3,8 @@
#include "../../config.h"
#define TAPPING_TERM 300
#define LEADER_TIMEOUT 400
#define TAPPING_TERM 200
#define LEADER_TIMEOUT 800
#define DISABLE_SPACE_CADET_ROLLOVER
@ -21,4 +21,3 @@
// place overrides here
#endif

View File

@ -6,6 +6,7 @@
#include "quantum.h"
#define _______ KC_TRNS
#define EMOJIBLOCK 5
//declarations for tap dancing emojis
@ -13,6 +14,7 @@ void register_hex32(uint32_t hex);
void cycleEmojis(qk_tap_dance_state_t *state, void *user_data);
void cycleAnimals(qk_tap_dance_state_t *state, void *user_data);
void cycleHands(qk_tap_dance_state_t *state, void *user_data);
void cycleMemes(qk_tap_dance_state_t *state, void *user_data);
void tap(uint16_t keycode){
register_code(keycode);
@ -24,7 +26,8 @@ enum taps{
TD_CTCPS = 0,
EMOJIS,
ANIMAL,
HAND
HAND,
MEMES
};
enum unicode_name { // split every five emojis
@ -62,22 +65,16 @@ enum my_macros {
RIGHTDESK,
CLOSEDESK
};
enum quick {
DISFACE = 0,
TFLIP,
TPUT,
SHRUG,
FACE,
RANDIG
};
// Tap Dance Definitions
qk_tap_dance_action_t tap_dance_actions[] = {
// Tap once for CTRL, twice for Caps Lock
[TD_CTCPS] = ACTION_TAP_DANCE_DOUBLE(KC_LCTL, KC_CAPS),
[EMOJIS] = ACTION_TAP_DANCE_FN_ADVANCED(cycleEmojis, NULL, NULL),
[ANIMAL] = ACTION_TAP_DANCE_FN_ADVANCED(cycleAnimals, NULL, NULL),
[HAND] = ACTION_TAP_DANCE_FN_ADVANCED(cycleHands, NULL, NULL)
[EMOJIS] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(cycleEmojis, NULL, NULL, 800),
[ANIMAL] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(cycleAnimals, NULL, NULL, 800),
[HAND] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(cycleHands, NULL, NULL, 800),
[MEMES] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(cycleMemes, NULL, NULL, 800)
// Other declarations would go here, separated by commas, if you have them
};
@ -143,7 +140,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
TD(TD_CTCPS),KC_LGUI,KC_LALT, KC_SPC, KC_LEAD,KC_RGUI, KC_APP,MO(1) , KC_LEFT,KC_DOWN,KC_RGHT, KC_P0,KC_PDOT),
[1] = 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_PSCR,KC_SLCK,KC_PAUS, \
TD(EMOJIS),TD(ANIMAL),TD(HAND),X(SMRK),X(WEARY),X(UNAMU), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL,KC_BSPC, KC_MPRV,KC_MPLY,KC_MNXT, KC_NLCK,KC_PSLS,KC_PAST,KC_PMNS, \
TD(EMOJIS),TD(ANIMAL),TD(HAND),TD(MEMES),X(WEARY),X(UNAMU), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL,KC_BSPC, KC_MPRV,KC_MPLY,KC_MNXT, KC_NLCK,KC_PSLS,KC_PAST,KC_PMNS, \
KC_TAB, KC_Q, M(0), KC_E, KC_R,X(EGGPL),X(WATER), KC_U, KC_I, KC_O, KC_P, KC_UP ,KC_RBRC,KC_BSLS, KC_MUTE,KC_VOLD,KC_VOLU, KC_P7, KC_P8, KC_P9,KC_PPLS, \
KC_LCTL, M(1), M(3), M(2), KC_F, X(LIT), X(SNEK), KC_J, KC_K, KC_L,KC_LEFT,KC_RGHT, KC_ENT, KC_P4, KC_P5, KC_P6, \
KC_LSFT,KC_NUBS, KC_Z, KC_X, KC_C, X(HUNDR), X(BBB), X(POO), KC_M,KC_COMM, KC_DOT,KC_DOWN, KC_RSFT, KC_MS_U, KC_P1, KC_P2, KC_P3,KC_PENT, \
@ -170,6 +167,11 @@ void matrix_scan_user(void) {
tap(KC_C);
unregister_code(KC_LCTL);
}
SEQ_THREE_KEYS(KC_L,KC_I,KC_T) { // 🔥🔥
unicode_input_start();
register_hex32(pgm_read_dword(&unicode_map[LIT]));
unicode_input_finish();
}
}
}
@ -186,7 +188,7 @@ void cycleEmojis(qk_tap_dance_state_t *state, void *user_data) {
register_hex32(pgm_read_dword(&unicode_map[state->count]));
unicode_input_finish();
}
else if(state->count <= 5) {
else if(state->count <= EMOJIBLOCK) {
tap(KC_BSPC);
unicode_input_start();
register_hex32(pgm_read_dword(&unicode_map[state->count]));
@ -200,7 +202,7 @@ void cycleAnimals(qk_tap_dance_state_t *state, void *user_data) {
register_hex32(pgm_read_dword(&unicode_map[state->count+5]));
unicode_input_finish();
}
else if(state->count <= 5) {
else if(state->count <= EMOJIBLOCK) {
tap(KC_BSPC);
unicode_input_start();
register_hex32(pgm_read_dword(&unicode_map[state->count+5]));
@ -214,7 +216,7 @@ void cycleHands(qk_tap_dance_state_t *state, void *user_data) {
register_hex32(pgm_read_dword(&unicode_map[state->count+10]));
unicode_input_finish();
}
else if(state->count <= 5) {
else if(state->count <= EMOJIBLOCK) {
tap(KC_BSPC);
unicode_input_start();
register_hex32(pgm_read_dword(&unicode_map[state->count+10]));
@ -222,3 +224,18 @@ void cycleHands(qk_tap_dance_state_t *state, void *user_data) {
}
};
void cycleMemes(qk_tap_dance_state_t *state, void *user_data) {
if(state->count == 1) {
unicode_input_start();
register_hex32(pgm_read_dword(&unicode_map[state->count+15]));
unicode_input_finish();
}
else if(state->count <= EMOJIBLOCK) {
tap(KC_BSPC);
unicode_input_start();
register_hex32(pgm_read_dword(&unicode_map[state->count+15]));
unicode_input_finish();
}
};

View File

@ -0,0 +1,9 @@
# Tap Dancing to different beats.
Tap Dance is constrained normally by `TAPPING_TERM` defined in your keyboard's config.h This proves to be challenging to work with when sometimes you just need more time to tap out your dance, or even a different "beat".
- `ACTION_TAP_DANCE_FN_ADVANCED_TIME(user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_dance_reset, tap_specific_tapping_term)` : This works the same as `ACTION_TAP_DANCE_FN_ADVANCED` just with the extra `tap_specific_tapping_term` arguement at the end. This way you can set a specific tap dance to have a longer or shorter tap in between your taps, giving you more, or less, time in between each tap.
`tap_specific_tapping_term` should be the same type and range of values that one would put into the `TAPPING_TERM` definition in the config.h file.

View File

@ -0,0 +1,3 @@
ifndef MAKEFILE_INCLUDED
include ../../Makefile
endif

View File

@ -0,0 +1,12 @@
About
------
First pass at adding support for the gherkin keyboard. Compiles but completely
untested. Intended to kick-start development.
* [Gherkin project on 40% Keyboards](http://www.40percent.club/2016/11/gherkin.html)
* [The original TMK firmware](https://github.com/di0ib/tmk_keyboard/tree/master/keyboard/gherkin)
Credit to JadedC for the initial work.

View File

@ -0,0 +1,58 @@
#ifndef CONFIG_H
#define CONFIG_H
#include "config_common.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x6060
#define DEVICE_VER 0x0001
#define MANUFACTURER qmkbuilder
#define PRODUCT keyboard
#define DESCRIPTION Keyboard
/* key matrix size */
#define MATRIX_ROWS 5
#define MATRIX_COLS 6
/* key matrix pins */
#define MATRIX_ROW_PINS { F7, B1, B3, B2, B6 }
#define MATRIX_COL_PINS { B4, E6, D7, C6, D4, D0 }
#define UNUSED_PINS
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
/* number of backlight levels */
#define BACKLIGHT_PIN B5
#ifdef BACKLIGHT_PIN
#define BACKLIGHT_LEVELS 3
#endif
/* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
/* key combination for command */
#define IS_COMMAND() ( \
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
)
/* prevent stuck modifiers */
#define PREVENT_STUCK_MODIFIERS
#ifdef RGB_DI_PIN
#define RGBLIGHT_ANIMATIONS
#define RGBLED_NUM 0
#define RGBLIGHT_HUE_STEP 8
#define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8
#endif
#endif

View File

@ -0,0 +1 @@
#include "gherkin.h"

View File

@ -0,0 +1,18 @@
#ifndef GHERKIN_H
#define GHERKIN_H
#include "quantum.h"
#define KEYMAP( \
K00, K01, K02, K03, K04, K05, K10, K11, K12, K13 , \
K14, K15, K20, K21, K22, K23, K24, K25, K30, K31 , \
K32, K33, K34, K35, K40, K41, K42, K43, K44, K45 \
) { \
{ K00, K01, K02, K03, K04, K05 }, \
{ K10, K11, K12, K13, K14, K15 }, \
{ K20, K21, K22, K23, K24, K25 }, \
{ K30, K31, K32, K33, K34, K35 }, \
{ K40, K41, K42, K43, K44, K45 } \
}
#endif

View File

@ -0,0 +1,171 @@
#include "gherkin.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KEYMAP(
LT(1, KC_Q), KC_W, KC_E, KC_R, KC_T, KC_Y,
KC_U, KC_I, KC_O, KC_P, KC_A, KC_S,
KC_D, KC_F, KC_G, KC_H, KC_J, KC_K,
KC_L, KC_ESC, KC_Z, KC_X, KC_C, KC_V,
KC_BSPC, KC_SPC, KC_B, KC_N, KC_M, KC_ENT),
KEYMAP(
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, BL_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, BL_DEC),
KEYMAP(
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),
KEYMAP(
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),
KEYMAP(
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),
KEYMAP(
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),
KEYMAP(
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),
KEYMAP(
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),
KEYMAP(
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),
KEYMAP(
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),
KEYMAP(
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),
KEYMAP(
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),
KEYMAP(
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),
KEYMAP(
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),
KEYMAP(
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),
KEYMAP(
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)
};
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
keyevent_t event = record->event;
(void)event;
switch (id) {
}
return MACRO_NONE;
}
void matrix_init_user(void) {
}
void matrix_scan_user(void) {
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
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)) {
} else {
}
if (usb_led & (1 << USB_LED_KANA)) {
} else {
}
}

View File

@ -0,0 +1,56 @@
# MCU name
MCU = atmega32u4
# 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.
#
# This will be an integer division of F_USB below, as it is sourced by
# F_USB after it has run through any CPU prescalers. Note that this value
# does not *change* the processor frequency - it should merely be updated to
# reflect the processor speed set externally so that the code can use accurate
# software delays.
F_CPU = 16000000
#
# LUFA specific
#
# Target architecture (see library "Board Types" documentation).
ARCH = AVR8
# Input clock frequency.
# This will define a symbol, F_USB, in all source code files equal to the
# input clock frequency (before any prescaling is performed) in Hz. This value may
# differ from F_CPU if prescaling is used on the latter, and is required as the
# raw input clock is fed directly to the PLL sections of the AVR for high speed
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
# at the end, this will be done automatically to create a 32-bit value in your
# source code.
#
# 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(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
# Boot Section Size in *bytes*
OPT_DEFS += -DBOOTLOADER_SIZE=4096
# Build Options
# comment out to disable the options.
#
BOOTMAGIC_ENABLE ?= yes # 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 ?= no # Commands for debug and configuration
SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
NKRO_ENABLE ?= yes # USB 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
AUDIO_ENABLE ?= no
RGBLIGHT_ENABLE ?= no

View File

@ -67,7 +67,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,MINS,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
X0 , A , O , E , U , I , D , H , R , N , S ,SLSH,
X0 , A , O , E , U , I , D , H , T , N , S ,SLSH,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
LSFT,SCLN, Q , J , K , X , B , M , W , V , Z , X4 ,
//|----+----+----+----+----+----| |----+----+----+----+----+----|

View File

@ -0,0 +1,5 @@
SUBPROJECT_DEFAULT = rev1
ifndef MAKEFILE_INCLUDED
include ../../Makefile
endif

View File

@ -0,0 +1,27 @@
/*
Copyright 2017 Danny Nguyen <danny@hexwire.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/>.
*/
#ifndef CONFIG_H
#define CONFIG_H
#include "config_common.h"
#ifdef SUBPROJECT_rev1
#include "rev1/config.h"
#endif
#endif // CONFIG_H

162
keyboards/nyquist/i2c.c Normal file
View File

@ -0,0 +1,162 @@
#include <util/twi.h>
#include <avr/io.h>
#include <stdlib.h>
#include <avr/interrupt.h>
#include <util/twi.h>
#include <stdbool.h>
#include "i2c.h"
#ifdef USE_I2C
// Limits the amount of we wait for any one i2c transaction.
// Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is
// 9 bits, a single transaction will take around 90μs to complete.
//
// (F_CPU/SCL_CLOCK) => # of μC cycles to transfer a bit
// poll loop takes at least 8 clock cycles to execute
#define I2C_LOOP_TIMEOUT (9+1)*(F_CPU/SCL_CLOCK)/8
#define BUFFER_POS_INC() (slave_buffer_pos = (slave_buffer_pos+1)%SLAVE_BUFFER_SIZE)
volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE];
static volatile uint8_t slave_buffer_pos;
static volatile bool slave_has_register_set = false;
// Wait for an i2c operation to finish
inline static
void i2c_delay(void) {
uint16_t lim = 0;
while(!(TWCR & (1<<TWINT)) && lim < I2C_LOOP_TIMEOUT)
lim++;
// easier way, but will wait slightly longer
// _delay_us(100);
}
// Setup twi to run at 100kHz
void i2c_master_init(void) {
// no prescaler
TWSR = 0;
// Set TWI clock frequency to SCL_CLOCK. Need TWBR>10.
// Check datasheets for more info.
TWBR = ((F_CPU/SCL_CLOCK)-16)/2;
}
// Start a transaction with the given i2c slave address. The direction of the
// transfer is set with I2C_READ and I2C_WRITE.
// returns: 0 => success
// 1 => error
uint8_t i2c_master_start(uint8_t address) {
TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTA);
i2c_delay();
// check that we started successfully
if ( (TW_STATUS != TW_START) && (TW_STATUS != TW_REP_START))
return 1;
TWDR = address;
TWCR = (1<<TWINT) | (1<<TWEN);
i2c_delay();
if ( (TW_STATUS != TW_MT_SLA_ACK) && (TW_STATUS != TW_MR_SLA_ACK) )
return 1; // slave did not acknowledge
else
return 0; // success
}
// Finish the i2c transaction.
void i2c_master_stop(void) {
TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTO);
uint16_t lim = 0;
while(!(TWCR & (1<<TWSTO)) && lim < I2C_LOOP_TIMEOUT)
lim++;
}
// Write one byte to the i2c slave.
// returns 0 => slave ACK
// 1 => slave NACK
uint8_t i2c_master_write(uint8_t data) {
TWDR = data;
TWCR = (1<<TWINT) | (1<<TWEN);
i2c_delay();
// check if the slave acknowledged us
return (TW_STATUS == TW_MT_DATA_ACK) ? 0 : 1;
}
// Read one byte from the i2c slave. If ack=1 the slave is acknowledged,
// if ack=0 the acknowledge bit is not set.
// returns: byte read from i2c device
uint8_t i2c_master_read(int ack) {
TWCR = (1<<TWINT) | (1<<TWEN) | (ack<<TWEA);
i2c_delay();
return TWDR;
}
void i2c_reset_state(void) {
TWCR = 0;
}
void i2c_slave_init(uint8_t address) {
TWAR = address << 0; // slave i2c address
// TWEN - twi enable
// TWEA - enable address acknowledgement
// TWINT - twi interrupt flag
// TWIE - enable the twi interrupt
TWCR = (1<<TWIE) | (1<<TWEA) | (1<<TWINT) | (1<<TWEN);
}
ISR(TWI_vect);
ISR(TWI_vect) {
uint8_t ack = 1;
switch(TW_STATUS) {
case TW_SR_SLA_ACK:
// this device has been addressed as a slave receiver
slave_has_register_set = false;
break;
case TW_SR_DATA_ACK:
// this device has received data as a slave receiver
// The first byte that we receive in this transaction sets the location
// of the read/write location of the slaves memory that it exposes over
// i2c. After that, bytes will be written at slave_buffer_pos, incrementing
// slave_buffer_pos after each write.
if(!slave_has_register_set) {
slave_buffer_pos = TWDR;
// don't acknowledge the master if this memory loctaion is out of bounds
if ( slave_buffer_pos >= SLAVE_BUFFER_SIZE ) {
ack = 0;
slave_buffer_pos = 0;
}
slave_has_register_set = true;
} else {
i2c_slave_buffer[slave_buffer_pos] = TWDR;
BUFFER_POS_INC();
}
break;
case TW_ST_SLA_ACK:
case TW_ST_DATA_ACK:
// master has addressed this device as a slave transmitter and is
// requesting data.
TWDR = i2c_slave_buffer[slave_buffer_pos];
BUFFER_POS_INC();
break;
case TW_BUS_ERROR: // something went wrong, reset twi state
TWCR = 0;
default:
break;
}
// Reset everything, so we are ready for the next TWI interrupt
TWCR |= (1<<TWIE) | (1<<TWINT) | (ack<<TWEA) | (1<<TWEN);
}
#endif

49
keyboards/nyquist/i2c.h Normal file
View File

@ -0,0 +1,49 @@
#ifndef I2C_H
#define I2C_H
#include <stdint.h>
#ifndef F_CPU
#define F_CPU 16000000UL
#endif
#define I2C_READ 1
#define I2C_WRITE 0
#define I2C_ACK 1
#define I2C_NACK 0
#define SLAVE_BUFFER_SIZE 0x10
// i2c SCL clock frequency
#define SCL_CLOCK 100000L
extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE];
void i2c_master_init(void);
uint8_t i2c_master_start(uint8_t address);
void i2c_master_stop(void);
uint8_t i2c_master_write(uint8_t data);
uint8_t i2c_master_read(int);
void i2c_reset_state(void);
void i2c_slave_init(uint8_t address);
static inline unsigned char i2c_start_read(unsigned char addr) {
return i2c_master_start((addr << 1) | I2C_READ);
}
static inline unsigned char i2c_start_write(unsigned char addr) {
return i2c_master_start((addr << 1) | I2C_WRITE);
}
// from SSD1306 scrips
extern unsigned char i2c_rep_start(unsigned char addr);
extern void i2c_start_wait(unsigned char addr);
extern unsigned char i2c_readAck(void);
extern unsigned char i2c_readNak(void);
extern unsigned char i2c_read(unsigned char ack);
#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak();
#endif

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

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