diff options
Diffstat (limited to 'keyboards/handwired/dactyl')
-rw-r--r-- | keyboards/handwired/dactyl/config.h | 65 | ||||
-rw-r--r-- | keyboards/handwired/dactyl/dactyl.c | 14 | ||||
-rw-r--r-- | keyboards/handwired/dactyl/dactyl.h | 54 | ||||
-rw-r--r-- | keyboards/handwired/dactyl/info.json | 10 | ||||
-rw-r--r-- | keyboards/handwired/dactyl/keymaps/default/keymap.c | 150 | ||||
-rw-r--r-- | keyboards/handwired/dactyl/keymaps/default/readme.md | 10 | ||||
-rw-r--r-- | keyboards/handwired/dactyl/keymaps/default/rules.mk | 1 | ||||
-rw-r--r-- | keyboards/handwired/dactyl/keymaps/dvorak/keymap.c | 150 | ||||
-rw-r--r-- | keyboards/handwired/dactyl/keymaps/dvorak/readme.md | 9 | ||||
-rw-r--r-- | keyboards/handwired/dactyl/keymaps/dvorak/rules.mk | 1 | ||||
-rw-r--r-- | keyboards/handwired/dactyl/keymaps/erincalling/keymap.c | 160 | ||||
-rw-r--r-- | keyboards/handwired/dactyl/keymaps/erincalling/readme.md | 6 | ||||
-rw-r--r-- | keyboards/handwired/dactyl/matrix.c | 494 | ||||
-rw-r--r-- | keyboards/handwired/dactyl/readme.md | 39 | ||||
-rw-r--r-- | keyboards/handwired/dactyl/rules.mk | 24 |
15 files changed, 0 insertions, 1187 deletions
diff --git a/keyboards/handwired/dactyl/config.h b/keyboards/handwired/dactyl/config.h deleted file mode 100644 index 29a008f0c6..0000000000 --- a/keyboards/handwired/dactyl/config.h +++ /dev/null @@ -1,65 +0,0 @@ -/* -Copyright 2012 Jun Wako <wakojun@gmail.com> -Copyright 2013 Oleg Kostyuk <cub.uanic@gmail.com> -Copyright 2017 Erin Call <hello@erincall.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 - -#include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x1308 -#define DEVICE_VER 0x0001 -#define MANUFACTURER Adereth -#define PRODUCT Dactyl - -#define DIODE_DIRECTION ROW2COL -#define MATRIX_ROWS 6 -#define MATRIX_COLS 12 -#define COL_EXPANDED { true, true, true, true, true, true, false, false, false, false, false, false} -#define MATRIX_ONBOARD_ROW_PINS { F0, F1, F4, F5, F6, F7 } -#define MATRIX_ONBOARD_COL_PINS { 0, 0, 0, 0, 0, 0, B1, B2, B3, D2, D3, C6 } -#define EXPANDER_COL_REGISTER GPIOA -#define EXPANDER_ROW_REGISTER GPIOB -#define MATRIX_EXPANDER_COL_PINS {0, 1, 2, 3, 4, 5} -#define MATRIX_EXPANDER_ROW_PINS {0, 1, 2, 3, 4, 5} - -#define MOUSEKEY_INTERVAL 20 -#define MOUSEKEY_DELAY 0 -#define MOUSEKEY_TIME_TO_MAX 60 -#define MOUSEKEY_MAX_SPEED 7 -#define MOUSEKEY_WHEEL_DELAY 0 - -#define TAPPING_TOGGLE 1 - -#define TAPPING_TERM 200 -#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.) - -/* key combination for command */ -#define IS_COMMAND() ( \ - get_mods() == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) || \ - get_mods() == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \ -) - -/* fix space cadet rollover issue */ -#define DISABLE_SPACE_CADET_ROLLOVER - -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCE 15 - -#define USB_MAX_POWER_CONSUMPTION 500 diff --git a/keyboards/handwired/dactyl/dactyl.c b/keyboards/handwired/dactyl/dactyl.c deleted file mode 100644 index be815777bd..0000000000 --- a/keyboards/handwired/dactyl/dactyl.c +++ /dev/null @@ -1,14 +0,0 @@ -#include "dactyl.h" - -#ifdef SWAP_HANDS_ENABLE -__attribute__ ((weak)) -// swap-hands action needs a matrix to define the swap -const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { - {{0,11}, {0,10}, {0,9}, {0,8}, {0,7}, {0,6}, {0,5}, {0,4}, {0,3}, {0,2}, {0,1}, {0,0}}, - {{1,11}, {1,11}, {1,9}, {1,8}, {1,7}, {1,6}, {1,5}, {1,4}, {1,3}, {1,2}, {1,1}, {1,0}}, - {{2,11}, {2,12}, {2,9}, {2,8}, {2,7}, {2,6}, {2,5}, {2,4}, {2,3}, {2,2}, {2,1}, {2,0}}, - {{3,11}, {3,13}, {3,9}, {3,8}, {3,7}, {3,6}, {3,5}, {3,4}, {3,3}, {3,2}, {3,1}, {3,0}}, - {{4,11}, {4,14}, {4,9}, {4,8}, {4,7}, {4,6}, {4,5}, {4,4}, {4,3}, {4,2}, {4,1}, {4,0}}, - {{5,11}, {5,15}, {5,9}, {5,8}, {5,7}, {5,6}, {5,5}, {5,4}, {5,3}, {5,2}, {5,1}, {5,0}}, -}; -#endif diff --git a/keyboards/handwired/dactyl/dactyl.h b/keyboards/handwired/dactyl/dactyl.h deleted file mode 100644 index b901b67673..0000000000 --- a/keyboards/handwired/dactyl/dactyl.h +++ /dev/null @@ -1,54 +0,0 @@ -#pragma once - -#include "quantum.h" -#include <stdint.h> -#include <stdbool.h> -#include "i2c_master.h" -#include <util/delay.h> - -#define I2C_ADDR (0b0100000 << 1) -#define I2C_TIMEOUT 100 -#define IODIRA 0x00 // i/o direction register -#define IODIRB 0x01 -#define GPPUA 0x0C // GPIO pull-up resistor register -#define GPPUB 0x0D -#define GPIOA 0x12 // general purpose i/o port register (write modifies OLAT) -#define GPIOB 0x13 -#define OLATA 0x14 // output latch register -#define OLATB 0x15 - -extern uint8_t expander_status; -extern uint8_t expander_input_pin_mask; -extern bool i2c_initialized; - -void init_dactyl(void); -void init_expander(void); - -#define XXX KC_NO - -#define LAYOUT_dactyl( \ - 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, \ - k55, k50, \ - k54, \ - k53, k52, k51, \ -\ - k06, k07, k08, k09, k0A, k0B, \ - k16, k17, k18, k19, k1A, k1B, \ - k26, k27, k28, k29, k2A, k2B, \ - k36, k37, k38, k39, k3A, k3B, \ - k47, k48, k49, k4A, k4B, \ - k5B, k56, \ - k57, \ - k5A, k59, k58 \ -) { \ - { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B }, \ - { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B }, \ - { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B }, \ - { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B }, \ - { k40, k41, k42, k43, k44, XXX, XXX, k47, k48, k49, k4A, k4B }, \ - { k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B } \ -} diff --git a/keyboards/handwired/dactyl/info.json b/keyboards/handwired/dactyl/info.json deleted file mode 100644 index d48ceeb9ad..0000000000 --- a/keyboards/handwired/dactyl/info.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "keyboard_name": "Dactyl", - "url": "", - "maintainer": "qmk", - "layouts": { - "LAYOUT_dactyl": { - "layout": [{"label":"k00", "x":0, "y":0}, {"label":"k01", "x":1, "y":0}, {"label":"k02", "x":2, "y":0}, {"label":"k03", "x":3, "y":0}, {"label":"k04", "x":4, "y":0}, {"label":"k05", "x":5, "y":0}, {"label":"k10", "x":0, "y":1}, {"label":"k11", "x":1, "y":1}, {"label":"k12", "x":2, "y":1}, {"label":"k13", "x":3, "y":1}, {"label":"k14", "x":4, "y":1}, {"label":"k15", "x":5, "y":1}, {"label":"k20", "x":0, "y":2}, {"label":"k21", "x":1, "y":2}, {"label":"k22", "x":2, "y":2}, {"label":"k23", "x":3, "y":2}, {"label":"k24", "x":4, "y":2}, {"label":"k25", "x":5, "y":2}, {"label":"k30", "x":0, "y":3}, {"label":"k31", "x":1, "y":3}, {"label":"k32", "x":2, "y":3}, {"label":"k33", "x":3, "y":3}, {"label":"k34", "x":4, "y":3}, {"label":"k35", "x":5, "y":3}, {"label":"k40", "x":0, "y":4}, {"label":"k41", "x":1, "y":4}, {"label":"k42", "x":2, "y":4}, {"label":"k43", "x":3, "y":4}, {"label":"k44", "x":4, "y":4}, {"label":"k55", "x":6, "y":5}, {"label":"k50", "x":7, "y":5}, {"label":"k54", "x":7, "y":6}, {"label":"k53", "x":5, "y":6, "h":2}, {"label":"k52", "x":6, "y":6, "h":2}, {"label":"k51", "x":7, "y":7}, {"label":"k06", "x":11, "y":0}, {"label":"k07", "x":12, "y":0}, {"label":"k08", "x":13, "y":0}, {"label":"k09", "x":14, "y":0}, {"label":"k0A", "x":15, "y":0}, {"label":"k0B", "x":16, "y":0}, {"label":"k16", "x":11, "y":1}, {"label":"k17", "x":12, "y":1}, {"label":"k18", "x":13, "y":1}, {"label":"k19", "x":14, "y":1}, {"label":"k1A", "x":15, "y":1}, {"label":"k1B", "x":16, "y":1}, {"label":"k26", "x":11, "y":2}, {"label":"k27", "x":12, "y":2}, {"label":"k28", "x":13, "y":2}, {"label":"k29", "x":14, "y":2}, {"label":"k2A", "x":15, "y":2}, {"label":"k2B", "x":16, "y":2}, {"label":"k36", "x":11, "y":3}, {"label":"k37", "x":12, "y":3}, {"label":"k38", "x":13, "y":3}, {"label":"k39", "x":14, "y":3}, {"label":"k3A", "x":15, "y":3}, {"label":"k3B", "x":16, "y":3}, {"label":"k47", "x":12, "y":4}, {"label":"k48", "x":13, "y":4}, {"label":"k49", "x":14, "y":4}, {"label":"k4A", "x":15, "y":4}, {"label":"k4B", "x":16, "y":4}, {"label":"k5B", "x":9, "y":5}, {"label":"k56", "x":10, "y":5}, {"label":"k57", "x":9, "y":6}, {"label":"k5A", "x":9, "y":7}, {"label":"k59", "x":10, "y":6, "h":2}, {"label":"k58", "x":11, "y":6, "h":2}] - } - } -} diff --git a/keyboards/handwired/dactyl/keymaps/default/keymap.c b/keyboards/handwired/dactyl/keymaps/default/keymap.c deleted file mode 100644 index 3e013b19a9..0000000000 --- a/keyboards/handwired/dactyl/keymaps/default/keymap.c +++ /dev/null @@ -1,150 +0,0 @@ -#include QMK_KEYBOARD_H -#include "version.h" - -#define BASE 0 // default layer -#define SYMB 1 // symbols -#define MDIA 2 // media keys - -enum custom_keycodes { - PLACEHOLDER = SAFE_RANGE, // ensure these codes start after the highest keycode defined in Quantum - VRSN, -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Keymap 0: Basic layer - * - * ,-----------------------------------------. ,-----------------------------------------. - * | = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Del | Q | W | E | R | T | | Y | U | I | O | P | \ | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | BkSp | A | S | D | F | G | | H | J | K | L |; / L2|'/Cmd | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * |LShift|Z/Ctrl| X | C | V | B | | N | M | , | . |//Ctrl|RShift| - * |------+------+------+------+------+------' `------+------+------+------+------+------| - * |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | App | LGui | | Alt | ^/Esc| - * ,------|------|------| |------+------+------. - * | | | Home | | PgUp | | | - * | Space|Backsp|------| |------| Tab |Enter | - * | |ace | End | | PgDn | | | - * `--------------------' `--------------------' - */ -[BASE] = LAYOUT_dactyl( // layer 0 : default - // left hand - KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, - KC_DEL, KC_Q, KC_W, KC_E, KC_R, KC_T, - KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, - KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, - LT(SYMB,KC_GRV), KC_QUOT, LALT(KC_LSFT), KC_LEFT, KC_RGHT, - ALT_T(KC_APP), KC_LGUI, - KC_HOME, - KC_SPC, KC_BSPC, KC_END, - // right hand - KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, - KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, - KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN), GUI_T(KC_QUOT), - KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLSH), KC_RSFT, - KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, TT(SYMB), - KC_RALT, CTL_T(KC_ESC), - KC_PGUP, - KC_PGDN, KC_TAB, KC_ENT - ), -/* Keymap 1: Symbol Layer - * - * ,-----------------------------------------. ,-----------------------------------------. - * |Versn | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | ! | @ | { | } | | | | Up | 7 | 8 | 9 | * | F12 | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | # | $ | ( | ) | ` | | Down | 4 | 5 | 6 | + | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | % | ^ | [ | ] | ~ | | & | 1 | 2 | 3 | \ | | - * |------+------+------+------+------+------' `------+------+------+------+------+------| - * |RESET | | | | | | | . | 0 | = | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+------+------. - * | | | | | | | | - * | | |------| |------| | | - * | | | | | | | | - * `--------------------' `--------------------' - */ -// SYMBOLS -[SYMB] = LAYOUT_dactyl( - // left hand - VRSN, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, - KC_TRNS, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, - KC_TRNS, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, - KC_TRNS, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, - RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, - KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, - // right hand - KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, - KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS, - KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS, - KC_TRNS, KC_DOT, KC_0, KC_EQL, KC_TRNS, - KC_TRNS, KC_TRNS, - KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS -), -/* Keymap 2: Media and mouse keys - * ,-----------------------------------------. ,-----------------------------------------. - * | | | | | | | | | | | | | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | MsUp | | | | | | | | | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | |MsLeft|MsDown|MsRght| | | | | | | | Play | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | | | | | Prev | Next | | | - * |------+------+------+------+------+------' `------+------+------+------+------+------| - * | | | | Lclk | Rclk | | VolUp| VolDn| Mute | | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+------+------. - * | | | | | | |Brwser| - * | | |------| |------| |Back | - * | | | | | | | | - * `--------------------' `--------------------' - * - */ -// MEDIA AND MOUSE -[MDIA] = LAYOUT_dactyl( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, - KC_TRNS, KC_TRNS, - KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, - // right hand - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, - KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, - KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, - KC_TRNS, - KC_TRNS, KC_TRNS, KC_WBAK -), -}; - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case VRSN: - if (record->event.pressed) { - SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); - } - return false; - break; - } - return true; -} diff --git a/keyboards/handwired/dactyl/keymaps/default/readme.md b/keyboards/handwired/dactyl/keymaps/default/readme.md deleted file mode 100644 index e393e396e3..0000000000 --- a/keyboards/handwired/dactyl/keymaps/default/readme.md +++ /dev/null @@ -1,10 +0,0 @@ -# Dactyl Default Configuration - -## Changelog - -* Nov 2017: - * Copied and adapted from the Ergodox EZ equivalent - * Notable differences: - - Don't try to have the columns that don't exist, naturally - - Removed RGB keys, since there are no RGB LEDs in the Dactyl (as designed, at least) - diff --git a/keyboards/handwired/dactyl/keymaps/default/rules.mk b/keyboards/handwired/dactyl/keymaps/default/rules.mk deleted file mode 100644 index ae24ba373c..0000000000 --- a/keyboards/handwired/dactyl/keymaps/default/rules.mk +++ /dev/null @@ -1 +0,0 @@ -MOUSEKEY_ENABLE = yes diff --git a/keyboards/handwired/dactyl/keymaps/dvorak/keymap.c b/keyboards/handwired/dactyl/keymaps/dvorak/keymap.c deleted file mode 100644 index 40ef3b019c..0000000000 --- a/keyboards/handwired/dactyl/keymaps/dvorak/keymap.c +++ /dev/null @@ -1,150 +0,0 @@ -#include QMK_KEYBOARD_H -#include "version.h" - -#define BASE 0 // default layer -#define SYMB 1 // symbols -#define MDIA 2 // media keys - -enum custom_keycodes { - PLACEHOLDER = SAFE_RANGE, // ensure these codes start after the highest keycode defined in Quantum - VRSN, -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Keymap 0: Basic layer - * - * ,-----------------------------------------. ,-----------------------------------------. - * | = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Del | '" | , | . | P | Y | | F | G | C | R | L | \ | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | BkSp | A | O | E | U | I | | D | H | T | N | S/L2 |//Cmd | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * |LShift|;/Ctrl| Q | J | K | X | | B | M | W | V |Z/Ctrl|RShift| - * |------+------+------+------+------+------' `------+------+------+------+------+------| - * |Grv/L1| = |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | App | LGui | | Alt | ^/Esc| - * ,------|------|------| |------+------+------. - * | | | Home | | PgUp | | | - * | Space|Backsp|------| |------| Tab |Enter | - * | |ace | End | | PgDn | | | - * `--------------------' `--------------------' - */ -[BASE] = LAYOUT_dactyl( // layer 0 : default - // left hand - KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, - KC_DEL, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, - KC_BSPC, KC_A, KC_O, KC_E, KC_U, KC_I, - KC_LSFT, CTL_T(KC_SCLN), KC_Q, KC_J, KC_K, KC_X, - LT(SYMB,KC_GRV), KC_EQL, LALT(KC_LSFT), KC_LEFT, KC_RGHT, - ALT_T(KC_APP), KC_LGUI, - KC_HOME, - KC_SPC, KC_BSPC, KC_END, - // right hand - KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, - KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSLS, - KC_D, KC_H, KC_T, KC_N, LT(MDIA, KC_S), GUI_T(KC_SLSH), - KC_B, KC_M, KC_W, KC_V, CTL_T(KC_Z), KC_RSFT, - KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, TT(SYMB), - KC_RALT, CTL_T(KC_ESC), - KC_PGUP, - KC_PGDN, KC_TAB, KC_ENT - ), -/* Keymap 1: Symbol Layer - * - * ,-----------------------------------------. ,-----------------------------------------. - * |Versn | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | ! | @ | { | } | | | | Up | 7 | 8 | 9 | * | F12 | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | # | $ | ( | ) | ` | | Down | 4 | 5 | 6 | + | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | % | ^ | [ | ] | ~ | | & | 1 | 2 | 3 | \ | | - * |------+------+------+------+------+------' `------+------+------+------+------+------| - * |RESET | | | | | | | . | 0 | = | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+------+------. - * | | | | | | | | - * | | |------| |------| | | - * | | | | | | | | - * `--------------------' `--------------------' - */ -// SYMBOLS -[SYMB] = LAYOUT_dactyl( - // left hand - VRSN, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, - KC_TRNS, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, - KC_TRNS, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, - KC_TRNS, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, - RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, - KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, - // right hand - KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, - KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS, - KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS, - KC_TRNS, KC_DOT, KC_0, KC_EQL, KC_TRNS, - KC_TRNS, KC_TRNS, - KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS -), -/* Keymap 2: Media and mouse keys - * ,-----------------------------------------. ,-----------------------------------------. - * | | | | | | | | | | | | | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | MsUp | | | | | | | | | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | |MsLeft|MsDown|MsRght| | | | | | | | Play | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | | | | | Prev | Next | | | - * |------+------+------+------+------+------' `------+------+------+------+------+------| - * | | | | Lclk | Rclk | | VolUp| VolDn| Mute | | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+------+------. - * | | | | | | |Brwser| - * | | |------| |------| |Back | - * | | | | | | | | - * `--------------------' `--------------------' - * - */ -// MEDIA AND MOUSE -[MDIA] = LAYOUT_dactyl( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, - KC_TRNS, KC_TRNS, - KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, - // right hand - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, - KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, - KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, - KC_TRNS, - KC_TRNS, KC_TRNS, KC_WBAK -), -}; - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case VRSN: - if (record->event.pressed) { - SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); - } - return false; - break; - } - return true; -} diff --git a/keyboards/handwired/dactyl/keymaps/dvorak/readme.md b/keyboards/handwired/dactyl/keymaps/dvorak/readme.md deleted file mode 100644 index 42ec3cd4f6..0000000000 --- a/keyboards/handwired/dactyl/keymaps/dvorak/readme.md +++ /dev/null @@ -1,9 +0,0 @@ -# Dactyl Dvorak keymap - -Modifiers and layers 1+ are the same as in the default layout. -Only the layer-0 dvorak-relevant keys are different. - -## Changelog - -* Nov 2017: - * Copied and adapted from the default keymap. diff --git a/keyboards/handwired/dactyl/keymaps/dvorak/rules.mk b/keyboards/handwired/dactyl/keymaps/dvorak/rules.mk deleted file mode 100644 index ae24ba373c..0000000000 --- a/keyboards/handwired/dactyl/keymaps/dvorak/rules.mk +++ /dev/null @@ -1 +0,0 @@ -MOUSEKEY_ENABLE = yes diff --git a/keyboards/handwired/dactyl/keymaps/erincalling/keymap.c b/keyboards/handwired/dactyl/keymaps/erincalling/keymap.c deleted file mode 100644 index e439af3e54..0000000000 --- a/keyboards/handwired/dactyl/keymaps/erincalling/keymap.c +++ /dev/null @@ -1,160 +0,0 @@ -#include QMK_KEYBOARD_H -#include "version.h" - -#define BASE 0 // default layer -#define CONT 1 // control layer -#define QWER 2 // qwerty layer - -enum custom_keycodes { - PLACEHOLDER = SAFE_RANGE, // ensure these codes start after the highest keycode defined in Quantum - COLON_EQ, -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Keymap 0: Basic layer - * - * ,-----------------------------------------. ,-----------------------------------------. - * | Esc | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | \ | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Tab | '" | , | . | P | Y | | F | G | C | R | L | / | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | := | A | O | E | U | I | | D | H | T | N | S | - | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * |LShift| ; | Q | J | K | X | | B | M | W | V | Z |RShift| - * |------+------+------+------+------+------' `------+------+------+------+------+------| - * | Home | ` | = | Left | Right| | Up | Down | [ | ] | End | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | LCtl | LAlt | | RCtl | Ralt | - * ,------|------|------| |------+------+------. - * | | | L1 | | L1 | | | - * | Back |Delete|------| |------|Enter |Space | - * |Space | | LGui | | RGui | | | - * `--------------------' `--------------------' - */ -[BASE] = LAYOUT_dactyl( // layer 0 : default - // left hand - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, - KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, - COLON_EQ, KC_A, KC_O, KC_E, KC_U, KC_I, - KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, - KC_HOME, KC_GRV, KC_EQL, KC_LEFT, KC_RGHT, - KC_LCTRL, KC_LALT, - MO(CONT), - KC_BSPC, KC_DEL, KC_LGUI, - // right hand - KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, - KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, - KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, - KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, - KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, KC_END, - KC_RALT, KC_RCTL, - MO(CONT), - KC_RGUI, KC_ENT, KC_SPACE - ), -/* Keymap 1: Control layer (media keys, Fkeys, numpad) - * - * ,-----------------------------------------. ,-----------------------------------------. - * | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | RESET| - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | Mute | VolD | VolU | | | | 7 | 8 | 9 | + | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | Prev |PPause| Next | | | | 4 | 5 | 6 | = | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | | | | 1 | 2 | 3 | , | | - * |------+------+------+------+------+------' `------+------+------+------+------+------| - * |PageUp| | | | | | 0 | 0 | . | |PageDn| - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+------+------. - * | | | | | | | | - * | | |------| |------| | | - * | | | | | | | | - * `--------------------' `--------------------' - */ -// SYMBOLS -[CONT] = LAYOUT_dactyl( - // left hand - KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, - KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, - TG(QWER), KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_PGUP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, - KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, - // right hand - KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, RESET, - KC_TRNS, KC_7, KC_8, KC_9, KC_KP_PLUS, KC_TRNS, - KC_TRNS, KC_4, KC_5, KC_6, KC_EQL, KC_TRNS, - KC_TRNS, KC_1, KC_2, KC_3, KC_COMM, KC_TRNS, - KC_0, KC_0, KC_DOT, KC_TRNS, KC_PGDN, - KC_TRNS, KC_TRNS, - KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS -), -/* Keymap 2: QWERTY overlay - * ,-----------------------------------------. ,-----------------------------------------. - * | | | | | | | | | | | | | [ | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | Q | W | E | R | T | | Y | U | I | O | P | ] | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | A | S | D | F | G | | H | J | K | L | ; | '" | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | Z | X | C | V | B | | N | M | , | . | / | | - * |------+------+------+------+------+------' `------+------+------+------+------+------| - * | | | | | | | | | - | \ | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+------+------. - * | | | | | | | | - * | | |------| |------| | | - * | | | | | | | | - * `--------------------' `--------------------' - * - */ -// QWERTY -[QWER] = LAYOUT_dactyl( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_Q, KC_W, KC_E, KC_R, KC_T, - KC_TRNS, KC_A, KC_S, KC_D, KC_F, KC_G, - KC_TRNS, KC_Z, KC_X, KC_C, KC_V, KC_B, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, - KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, - // right hand - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, - KC_Y, KC_U, KC_I, KC_O, KC_P, KC_RBRC, - KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, - KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_TRNS, - KC_TRNS, KC_TRNS, KC_MINS, KC_BSLS, KC_TRNS, - KC_TRNS, KC_TRNS, - KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS -), -}; - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - if (record->event.pressed) { - switch(keycode) { - case COLON_EQ: - SEND_STRING(":="); - return false; - break; - } - } - - return true; -} - -// Runs just one time when the keyboard initializes. -void matrix_init_user(void) { - -}; - - -// Runs constantly in the background, in a loop. -void matrix_scan_user(void) {}; diff --git a/keyboards/handwired/dactyl/keymaps/erincalling/readme.md b/keyboards/handwired/dactyl/keymaps/erincalling/readme.md deleted file mode 100644 index 7528ed07eb..0000000000 --- a/keyboards/handwired/dactyl/keymaps/erincalling/readme.md +++ /dev/null @@ -1,6 +0,0 @@ -# Erincalling Dactyl keymap - -## Changelog - -* Nov 2017: - * Ported and adapted from the ergodox-firmware layout I'd been using diff --git a/keyboards/handwired/dactyl/matrix.c b/keyboards/handwired/dactyl/matrix.c deleted file mode 100644 index 5869b43c1b..0000000000 --- a/keyboards/handwired/dactyl/matrix.c +++ /dev/null @@ -1,494 +0,0 @@ -/* -Copyright 2013 Oleg Kostyuk <cub.uanic@gmail.com> -Copyright 2017 Erin Call <hello@erincall.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/>. -*/ -#include <stdint.h> -#include <stdbool.h> -#include <avr/io.h> -#include "wait.h" -#include "action_layer.h" -#include "print.h" -#include "debug.h" -#include "util.h" -#include "matrix.h" -#include "dactyl.h" -#include "i2c_master.h" -#include "timer.h" - - -/* Set 0 if debouncing isn't needed */ - -#ifndef DEBOUNCE -# define DEBOUNCE 5 -#endif - -#if (DEBOUNCE > 0) - static uint16_t debouncing_time; - static bool debouncing = false; -#endif - -#ifdef MATRIX_MASKED - extern const matrix_row_t matrix_mask[]; -#endif - -#if (DIODE_DIRECTION == ROW2COL) || (DIODE_DIRECTION == COL2ROW) -static const uint8_t onboard_row_pins[MATRIX_ROWS] = MATRIX_ONBOARD_ROW_PINS; -static const uint8_t onboard_col_pins[MATRIX_COLS] = MATRIX_ONBOARD_COL_PINS; -static const bool col_expanded[MATRIX_COLS] = COL_EXPANDED; -#endif - -/* matrix state(1:on, 0:off) */ -static matrix_row_t matrix[MATRIX_ROWS]; - -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -#if (DIODE_DIRECTION == COL2ROW) - static const uint8_t expander_col_pins[MATRIX_COLS] = MATRIX_EXPANDER_COL_PINS; - static void init_cols(void); - static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row); - static void unselect_rows(void); - static void select_row(uint8_t row); - static void unselect_row(uint8_t row); -#elif (DIODE_DIRECTION == ROW2COL) - static const uint8_t expander_row_pins[MATRIX_ROWS] = MATRIX_EXPANDER_ROW_PINS; - static void init_rows(void); - static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col); - static void unselect_cols(void); - static void select_col(uint8_t col); - static void unselect_col(uint8_t col); -#endif - -static uint8_t expander_reset_loop; -uint8_t expander_status; -uint8_t expander_input_pin_mask; -bool i2c_initialized = false; - -#define ROW_SHIFTER ((matrix_row_t)1) - -__attribute__ ((weak)) -void matrix_init_user(void) {} - -__attribute__ ((weak)) -void matrix_scan_user(void) {} - -__attribute__ ((weak)) -void matrix_init_kb(void) { - matrix_init_user(); -} - -__attribute__ ((weak)) -void matrix_scan_kb(void) { - matrix_scan_user(); -} - -inline -uint8_t matrix_rows(void) -{ - return MATRIX_ROWS; -} - -inline -uint8_t matrix_cols(void) -{ - return MATRIX_COLS; -} - -void matrix_init(void) -{ - init_expander(); - -#if (DIODE_DIRECTION == COL2ROW) - unselect_rows(); - init_cols(); -#elif (DIODE_DIRECTION == ROW2COL) - unselect_cols(); - init_rows(); -#endif - - // initialize matrix state: all keys off - for (uint8_t i=0; i < MATRIX_ROWS; i++) { - matrix[i] = 0; - matrix_debouncing[i] = 0; - } - - matrix_init_quantum(); -} - -void init_expander(void) { - if (! i2c_initialized) { - i2c_init(); - wait_ms(1000); - } - - if (! expander_input_pin_mask) { -#if (DIODE_DIRECTION == COL2ROW) - for (int col = 0; col < MATRIX_COLS; col++) { - if (col_expanded[col]) { - expander_input_pin_mask |= (1 << expander_col_pins[col]); - } - } -#elif (DIODE_DIRECTION == ROW2COL) - for (int row = 0; row < MATRIX_ROWS; row++) { - expander_input_pin_mask |= (1 << expander_row_pins[row]); - } -#endif - } - - /* - Pin direction and pull-up depends on both the diode direction - and on whether the column register is GPIOA or GPIOB - +-------+---------------+---------------+ - | | ROW2COL | COL2ROW | - +-------+---------------+---------------+ - | GPIOA | input, output | output, input | - +-------+---------------+---------------+ - | GPIOB | output, input | input, output | - +-------+---------------+---------------+ - */ - -#if (EXPANDER_COL_REGISTER == GPIOA) -# if (DIODE_DIRECTION == COL2ROW) - uint8_t direction[2] = { - expander_input_pin_mask, - 0, - }; -# elif (DIODE_DIRECTION == ROW2COL) - uint8_t direction[2] = { - 0, - expander_input_pin_mask, - }; -# endif -#elif (EXPANDER_COL_REGISTER == GPIOB) -# if (DIODE_DIRECTION == COL2ROW) - uint8_t direction[2] = { - 0, - expander_input_pin_mask, - }; -# elif (DIODE_DIRECTION == ROW2COL) - uint8_t direction[2] = { - expander_input_pin_mask, - 0, - }; -# endif -#endif - - // set pull-up - // - unused : off : 0 - // - input : on : 1 - // - driving : off : 0 -#if (EXPANDER_COL_REGISTER == GPIOA) -# if (DIODE_DIRECTION == COL2ROW) - uint8_t pullup[2] = { - expander_input_pin_mask, - 0, - }; -# elif (DIODE_DIRECTION == ROW2COL) - uint8_t pullup[2] = { - 0, - expander_input_pin_mask, - }; -# endif -#elif (EXPANDER_COL_REGISTER == GPIOB) -# if (DIODE_DIRECTION == COL2ROW) - uint8_t pullup[2] = { - 0, - expander_input_pin_mask, - }; -# elif (DIODE_DIRECTION == ROW2COL) - uint8_t pullup[2] = { - expander_input_pin_mask, - 0, - }; -# endif -#endif - - - expander_status = i2c_writeReg(I2C_ADDR, IODIRA, direction, 2, I2C_TIMEOUT); - if (expander_status) return; - - expander_status = i2c_writeReg(I2C_ADDR, GPPUA, pullup, 2, I2C_TIMEOUT); -} - -uint8_t matrix_scan(void) -{ - if (expander_status) { // if there was an error - if (++expander_reset_loop == 0) { - // since expander_reset_loop is 8 bit - we'll try to reset once in 255 matrix scans - // this will be approx bit more frequent than once per second - print("trying to reset expander\n"); - init_expander(); - if (expander_status) { - print("left side not responding\n"); - } else { - print("left side attached\n"); - } - } - } - -#if (DIODE_DIRECTION == COL2ROW) - for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { -# if (DEBOUNCE > 0) - bool matrix_changed = read_cols_on_row(matrix_debouncing, current_row); - - if (matrix_changed) { - debouncing = true; - debouncing_time = timer_read(); - } -# else - read_cols_on_row(matrix, current_row); -# endif - } - -#elif (DIODE_DIRECTION == ROW2COL) - for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { -# if (DEBOUNCE > 0) - bool matrix_changed = read_rows_on_col(matrix_debouncing, current_col); - - if (matrix_changed) { - debouncing = true; - debouncing_time = timer_read(); - } -# else - read_rows_on_col(matrix, current_col); -# endif - - } -#endif - -# if (DEBOUNCE > 0) - if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCE)) { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debouncing[i]; - } - debouncing = false; - } -# endif - - matrix_scan_quantum(); - return 1; -} - -inline -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & (ROW_SHIFTER << col)); -} - -inline -matrix_row_t matrix_get_row(uint8_t row) -{ -#ifdef MATRIX_MASKED - return matrix[row] & matrix_mask[row]; -#else - return matrix[row]; -#endif -} - -void matrix_print(void) -{ - print("\nr/c 0123456789ABCDEF\n"); - for (uint8_t row = 0; row < MATRIX_ROWS; row++) { - print_hex8(row); print(": "); - print_bin_reverse16(matrix_get_row(row)); - print("\n"); - } -} - -#if (DIODE_DIRECTION == COL2ROW) - -static void init_cols(void) { - for (uint8_t x = 0; x < MATRIX_COLS; x++) { - if (! col_expanded[x]) { - uint8_t pin = onboard_col_pins[x]; - _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI - } - } -} - -static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) { - // Store last value of row prior to reading - matrix_row_t last_row_value = current_matrix[current_row]; - - // Clear data in matrix row - current_matrix[current_row] = 0; - - // Select row and wait for row selection to stabilize - select_row(current_row); - wait_us(30); - - // Read columns from expander, unless it's in an error state - if (! expander_status) { - uint8_t state = 0; - expander_status = i2c_readReg(I2C_ADDR, EXPANDER_COL_REGISTER, &state, 1, I2C_TIMEOUT); - if (! expander_status) { - current_matrix[current_row] |= (~state) & expander_input_pin_mask; - } - } - - // Read columns from onboard pins - for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { - if (! col_expanded[col_index]) { - uint8_t pin = onboard_col_pins[col_index]; - uint8_t pin_state = (_SFR_IO8(pin >> 4) & _BV(pin & 0xF)); - current_matrix[current_row] |= pin_state ? 0 : (ROW_SHIFTER << col_index); - } - } - - unselect_row(current_row); - - return (last_row_value != current_matrix[current_row]); -} - -static void select_row(uint8_t row) { - // select on expander, unless it's in an error state - if (! expander_status) { - // set active row low : 0 - // set other rows hi-Z : 1 - uint8_t port = 0xFF & ~(1<<row); - expander_status = i2c_writeReg(I2C_ADDR, EXPANDER_ROW_REGISTER, &port, 1, I2C_TIMEOUT); - } - - // select on teensy - uint8_t pin = onboard_row_pins[row]; - _SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT - _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW -} - -static void unselect_row(uint8_t row) -{ - // No need to explicitly unselect expander pins--their I/O state is - // set simultaneously, with a single bitmask sent to i2c_write. When - // select_row selects a single pin, it implicitly unselects all the - // other ones. - - // unselect on teensy - uint8_t pin = onboard_row_pins[row]; - _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // OUT - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // LOW -} - -static void unselect_rows(void) { - for (uint8_t x = 0; x < MATRIX_ROWS; x++) { - unselect_row(x); - } -} - -#elif (DIODE_DIRECTION == ROW2COL) - -static void init_rows(void) -{ - for (uint8_t x = 0; x < MATRIX_ROWS; x++) { - uint8_t pin = onboard_row_pins[x]; - _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI - } -} - -static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) -{ - bool matrix_changed = false; - - uint8_t column_state = 0; - - //select col and wait for selection to stabilize - select_col(current_col); - wait_us(30); - - if (current_col < 6) { - // read rows from expander - if (expander_status) { - // it's already in an error state; nothing we can do - return false; - } - - expander_status = i2c_readReg(I2C_ADDR, EXPANDER_ROW_REGISTER, &column_state, 1, I2C_TIMEOUT); - - column_state = ~column_state; - } else { - for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { - if ((_SFR_IO8(onboard_row_pins[current_row] >> 4) & _BV(onboard_row_pins[current_row] & 0xF)) == 0) { - column_state |= (1 << current_row); - } - } - } - - for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { - // Store last value of row prior to reading - matrix_row_t last_row_value = current_matrix[current_row]; - - if (column_state & (1 << current_row)) { - // key closed; set state bit in matrix - current_matrix[current_row] |= (ROW_SHIFTER << current_col); - } else { - // key open; clear state bit in matrix - current_matrix[current_row] &= ~(ROW_SHIFTER << current_col); - } - - // Determine whether the matrix changed state - if ((last_row_value != current_matrix[current_row]) && !(matrix_changed)) - { - matrix_changed = true; - } - } - - unselect_col(current_col); - - return matrix_changed; -} - -static void select_col(uint8_t col) -{ - if (col_expanded[col]) { - // select on expander - if (expander_status) { // if there was an error - // do nothing - } else { - // set active col low : 0 - // set other cols hi-Z : 1 - uint8_t port = 0xFF & ~(1<<col); - expander_status = i2c_writeReg(I2C_ADDR, EXPANDER_COL_REGISTER, &port, 1, I2C_TIMEOUT); - } - } else { - // select on teensy - uint8_t pin = onboard_col_pins[col]; - _SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT - _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW - } -} - -static void unselect_col(uint8_t col) -{ - if (col_expanded[col]) { - // No need to explicitly unselect expander pins--their I/O state is - // set simultaneously, with a single bitmask sent to i2c_write. When - // select_col selects a single pin, it implicitly unselects all the - // other ones. - } else { - // unselect on teensy - uint8_t pin = onboard_col_pins[col]; - _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI - } -} - -static void unselect_cols(void) -{ - for(uint8_t x = 0; x < MATRIX_COLS; x++) { - unselect_col(x); - } -} -#endif diff --git a/keyboards/handwired/dactyl/readme.md b/keyboards/handwired/dactyl/readme.md deleted file mode 100644 index 698ef29e01..0000000000 --- a/keyboards/handwired/dactyl/readme.md +++ /dev/null @@ -1,39 +0,0 @@ -# Dactyl - -See https://github.com/adereth/dactyl-keyboard - -The Dactyl uses the [Teensy Loader](https://www.pjrc.com/teensy/loader.html). - -Linux users need to modify udev rules as described on the [Teensy -Linux page]. Some distributions provide a binary, maybe called -`teensy-loader-cli`. - -[Teensy Linux page]: https://www.pjrc.com/teensy/loader_linux.html - -To flash the firmware: - - - Build the firmware with `make handwired/dactyl:<keymapname>`, for example `make handwired/dactyl:default` - - This will result in a hex file called `handwired_dactyl_<keymapname>.hex`, e.g. - `handwired_dactyl_default.hex` - - - Start the teensy loader. - - - Load the .hex file into it. - - - Put the Teensy in firmware-loading mode: - * If your current layout has a RESET key, press it. - * If you lack a RESET key, press the reset button on the Teensy board itself. - - - Click the button in the Teensy app to download the firmware. - -To flash with ´teensy-loader-cli´: - - - Build the firmware as above - - - Run `<path/to/>teensy_loader_cli -mmcu=atmega32u4 -w handwired_dactyl_<keymapname>.hex` - - - If you like, you can do both at once: `make handwired/dactyl:<keymapname>:teensy` - - - Put the Teensy in firmware-loading mode: - * If your current layout has a RESET key, press it. - * If you lack a RESET key, press the reset button on the Teensy board itself. diff --git a/keyboards/handwired/dactyl/rules.mk b/keyboards/handwired/dactyl/rules.mk deleted file mode 100644 index fdc8b2e5ef..0000000000 --- a/keyboards/handwired/dactyl/rules.mk +++ /dev/null @@ -1,24 +0,0 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -BOOTLOADER = halfkay - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite -POINTING_DEVICE_ENABLE = no -MOUSEKEY_ENABLE = no # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -CUSTOM_MATRIX = yes # Custom matrix file for the Dactyl -NKRO_ENABLE = yes # Enable N-Key Rollover -UNICODE_ENABLE = yes # Unicode -SWAP_HANDS_ENABLE = yes # Allow swapping hands of keyboard -RGBLIGHT_ENABLE = no - -# project specific files -QUANTUM_LIB_SRC += i2c_master.c -SRC += matrix.c |