From 05351ce8b354952354b6aa3426088b266a9d23e9 Mon Sep 17 00:00:00 2001 From: Rozakiin Date: Sun, 6 Aug 2017 22:23:40 +0100 Subject: Add files via upload --- keyboards/uk78/Makefile | 3 + keyboards/uk78/config.h | 76 ++++++++++++++++++++ keyboards/uk78/keymaps/default/keymap.c | 119 ++++++++++++++++++++++++++++++++ keyboards/uk78/readme.md | 16 +++++ keyboards/uk78/rules.mk | 56 +++++++++++++++ keyboards/uk78/uk78.c | 1 + keyboards/uk78/uk78.h | 20 ++++++ 7 files changed, 291 insertions(+) create mode 100644 keyboards/uk78/Makefile create mode 100644 keyboards/uk78/config.h create mode 100644 keyboards/uk78/keymaps/default/keymap.c create mode 100644 keyboards/uk78/readme.md create mode 100644 keyboards/uk78/rules.mk create mode 100644 keyboards/uk78/uk78.c create mode 100644 keyboards/uk78/uk78.h (limited to 'keyboards') diff --git a/keyboards/uk78/Makefile b/keyboards/uk78/Makefile new file mode 100644 index 000000000..57b2ef62e --- /dev/null +++ b/keyboards/uk78/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../Makefile +endif diff --git a/keyboards/uk78/config.h b/keyboards/uk78/config.h new file mode 100644 index 000000000..081f6b407 --- /dev/null +++ b/keyboards/uk78/config.h @@ -0,0 +1,76 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x554B /* Ascii */ +#define PRODUCT_ID 0x004E +#define DEVICE_VER 0x0002 +#define MANUFACTURER UK Keyboards +#define PRODUCT UK78 +#define DESCRIPTION QMK keyboard firmware for UK78 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 19 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { F3, F2, F1, F0, A0 } +#define MATRIX_COL_PINS { A2, A1, F5, F4, E6, E7, E5, E4, B7, D0, D1, D2, D3, D4, D5, D6, D7, B5, E0 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ +#define BACKLIGHT_PIN B6 +#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 + +/* ws2812b options */ +#define RGB_DI_PIN F6 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 20 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif + +#endif \ No newline at end of file diff --git a/keyboards/uk78/keymaps/default/keymap.c b/keyboards/uk78/keymaps/default/keymap.c new file mode 100644 index 000000000..759b4120a --- /dev/null +++ b/keyboards/uk78/keymaps/default/keymap.c @@ -0,0 +1,119 @@ +#include "uk78.h" + +// Helpful defines +#define _______ KC_TRNS + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _BL 0 +#define _FL1 1 +#define _FL2 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* _BL: Base Layer(Default) - For ISO enter use ANSI \ + * ,-------------------------------------------------------------------------------. + * |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| /|BSpc| Del| P/| P*| P-| + * |-------------------------------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | P7| P8| P9| P=| + * |-------------------------------------------------------------------------------| + * |CAPS | A| S| D| F| G| H| J| K| L| ;| '| #| Ent| P4| P5| P6| P+| + * |-------------------------------------------------------------------------------| + * |Shift| \| Z| X| C| V| B| N| M| ,| .| /|Shift | Up| P1| P2| P3|SLck| + * |-------------------------------------------------------------------------------| + * |Ctrl|Win |Alt | Space |Alt|Mo(1)|Ctrl|Lef|Dow| Rig| P0| P.|PEnt| + * `-------------------------------------------------------------------------------' + */ + [_BL] = KEYMAP( + 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_BSPC, KC_DEL, KC_PSLS, KC_PAST, KC_PMNS, + 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_P7, KC_P8, KC_P9, KC_PEQL, + 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_NUHS, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_SLCK, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT), + /* _FL1: Function Layer 1 - For ISO enter use ANSI \ + * ,-------------------------------------------------------------------------------. + * | `|F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|PScr|Ins|NLck| | | | + * |-------------------------------------------------------------------------------| + * | | | | |RST| | | | | | | | | | | | | | + * |-------------------------------------------------------------------------------| + * | | | | | | |Hu+|Va+|Sa+| | | | | | | | | | + * |-------------------------------------------------------------------------------| + * | | | | | |RGB|Hu-|Va-|Sa-|Bl-|Bl+| |Mute|Vol+| | | | | + * |-------------------------------------------------------------------------------| + * | | | | BL_Toggle | | | | |Vol-| | | | | + * `-------------------------------------------------------------------------------' + */ + [_FL1] = KEYMAP( + KC_GRV, 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_INS, KC_NLCK, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_SAI, RGB_VAI, KC_TRNS, KC_TRNS, 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_TOG, RGB_HUD, RGB_SAD, RGB_VAD, BL_DEC, BL_INC, KC_TRNS, KC_MUTE, KC_MUTE, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, BL_TOGG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + /* _FL2: Function Layer 2 - For ISO enter use ANSI \ + * ,-------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | | | | | | + * |-------------------------------------------------------------------------------| + * | | | | | | | | | | | | | | | | | | | + * |-------------------------------------------------------------------------------| + * | | | | | | | | | | | | | | | | | | | + * |-------------------------------------------------------------------------------| + * | | | | | | | | | | | | | | | | | | | + * |-------------------------------------------------------------------------------| + * | | | | | | | | | | | | | | + * `-------------------------------------------------------------------------------' + */ + [_FL2] = 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + +}; + + +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)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + DDRA |= (1 << 3); PORTA |= (1 << 3); + } else { + DDRA &= ~(1 << 3); PORTA &= ~(1 << 3); + } + + 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 { + + } + +} \ No newline at end of file diff --git a/keyboards/uk78/readme.md b/keyboards/uk78/readme.md new file mode 100644 index 000000000..ac163e5e0 --- /dev/null +++ b/keyboards/uk78/readme.md @@ -0,0 +1,16 @@ +# UK78 + +![UK78](http://i.imgur.com/42pg6RS.png) + +A fully customizable 60%+numpad keyboard. + +* Keyboard Maintainer: [Rozakiin](https://github.com/rozakiin) +* Hardware Supported: UK78 PCB + * rev2 +* Hardware Availability: [ukkeyboards.](https://clueboard.co/) + +Make example for this keyboard (after setting up your build environment): + + make uk78-default + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/uk78/rules.mk b/keyboards/uk78/rules.mk new file mode 100644 index 000000000..4e8d14812 --- /dev/null +++ b/keyboards/uk78/rules.mk @@ -0,0 +1,56 @@ +# MCU name +MCU = at90usb1286 + +# 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=8192 + + +# 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 ?= yes \ No newline at end of file diff --git a/keyboards/uk78/uk78.c b/keyboards/uk78/uk78.c new file mode 100644 index 000000000..3611427d0 --- /dev/null +++ b/keyboards/uk78/uk78.c @@ -0,0 +1 @@ +#include "uk78.h" diff --git a/keyboards/uk78/uk78.h b/keyboards/uk78/uk78.h new file mode 100644 index 000000000..6cc5eee47 --- /dev/null +++ b/keyboards/uk78/uk78.h @@ -0,0 +1,20 @@ +#ifndef UK78_H +#define UK78_H + +#include "quantum.h" + +#define KEYMAP( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, K018, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, K116, K117, K118, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, K216, K217, K218, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, K317, K318, \ + K400, K401, K402, K406, K410, K411, K412, K413, K414, K415, K416, K417, K418 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, K018 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO, K114, K115, K116, K117, K118 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214, K215, K216, K217, K218 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, K317, K318 }, \ + { K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, K412, K413, K414, K415, K416, K417, K418 } \ +} + +#endif \ No newline at end of file -- cgit v1.2.3-24-g4f1b From 5fbd25db6232744ea7213f40710a63c3211b9c8c Mon Sep 17 00:00:00 2001 From: Rozakiin Date: Sun, 6 Aug 2017 22:25:33 +0100 Subject: Update readme.md --- keyboards/uk78/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards') diff --git a/keyboards/uk78/readme.md b/keyboards/uk78/readme.md index ac163e5e0..22cbcabc4 100644 --- a/keyboards/uk78/readme.md +++ b/keyboards/uk78/readme.md @@ -7,7 +7,7 @@ A fully customizable 60%+numpad keyboard. * Keyboard Maintainer: [Rozakiin](https://github.com/rozakiin) * Hardware Supported: UK78 PCB * rev2 -* Hardware Availability: [ukkeyboards.](https://clueboard.co/) +* Hardware Availability: [ukkeyboards.](http://ukkeyboards.bigcartel.com/) Make example for this keyboard (after setting up your build environment): -- cgit v1.2.3-24-g4f1b From 396f97068beba45a84ac01e47128b40d2e24d9e5 Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Fri, 4 Aug 2017 14:55:42 -0400 Subject: Add RGB commands to default Nyquist keymap --- keyboards/nyquist/keymaps/default/Makefile | 2 ++ keyboards/nyquist/keymaps/default/config.h | 7 +++++++ keyboards/nyquist/keymaps/default/keymap.c | 4 ++-- 3 files changed, 11 insertions(+), 2 deletions(-) (limited to 'keyboards') diff --git a/keyboards/nyquist/keymaps/default/Makefile b/keyboards/nyquist/keymaps/default/Makefile index 457a3d01d..1e5761278 100644 --- a/keyboards/nyquist/keymaps/default/Makefile +++ b/keyboards/nyquist/keymaps/default/Makefile @@ -1,3 +1,5 @@ +RGBLIGHT_ENABLE = yes + ifndef QUANTUM_DIR include ../../../../Makefile endif diff --git a/keyboards/nyquist/keymaps/default/config.h b/keyboards/nyquist/keymaps/default/config.h index 624d284ca..072d4a7ce 100644 --- a/keyboards/nyquist/keymaps/default/config.h +++ b/keyboards/nyquist/keymaps/default/config.h @@ -31,4 +31,11 @@ along with this program. If not, see . // #define _MASTER_RIGHT // #define EE_HANDS +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 12 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + #endif \ No newline at end of file diff --git a/keyboards/nyquist/keymaps/default/keymap.c b/keyboards/nyquist/keymaps/default/keymap.c index dcb68a6e0..97fee4e1e 100644 --- a/keyboards/nyquist/keymaps/default/keymap.c +++ b/keyboards/nyquist/keymaps/default/keymap.c @@ -139,7 +139,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | Reset| | | | | | | | | | Del | + * | | Reset|RGB Tg|RGB Md|Hue Up|Hue Dn|Sat Up|Sat Dn|Val Up|Val Dn| | Del | * |------+------+------+------+------+-------------+------+------+------+------+------| * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | * |------+------+------+------+------+------|------+------+------+------+------+------| @@ -150,7 +150,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_ADJUST] = KEYMAP( \ 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_DEL, \ + _______, RESET , RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, KC_DEL, \ _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ -- cgit v1.2.3-24-g4f1b From b20a87e3cc7079e1ab92692d9c89126547551528 Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Fri, 4 Aug 2017 14:58:52 -0400 Subject: Add .eep files for setting hands --- keyboards/nyquist/eeprom-lefthand.eep | 2 ++ keyboards/nyquist/eeprom-righthand.eep | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 keyboards/nyquist/eeprom-lefthand.eep create mode 100644 keyboards/nyquist/eeprom-righthand.eep (limited to 'keyboards') diff --git a/keyboards/nyquist/eeprom-lefthand.eep b/keyboards/nyquist/eeprom-lefthand.eep new file mode 100644 index 000000000..b9666a74c --- /dev/null +++ b/keyboards/nyquist/eeprom-lefthand.eep @@ -0,0 +1,2 @@ +:0B0000000000000000000000000001F4 +:00000001FF diff --git a/keyboards/nyquist/eeprom-righthand.eep b/keyboards/nyquist/eeprom-righthand.eep new file mode 100644 index 000000000..94cc5be7f --- /dev/null +++ b/keyboards/nyquist/eeprom-righthand.eep @@ -0,0 +1,2 @@ +:0B0000000000000000000000000000F5 +:00000001FF -- cgit v1.2.3-24-g4f1b From 7b5f02aa6a6d5c4fe4bff0d32c2dbb0abf20e51c Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Fri, 4 Aug 2017 15:32:45 -0400 Subject: Port updated debouncing algorithm from Let's Split to Nyquist --- keyboards/nyquist/matrix.c | 242 +++++++++++++++++++++++++++++++++-------- keyboards/nyquist/split_util.c | 2 + 2 files changed, 197 insertions(+), 47 deletions(-) (limited to 'keyboards') diff --git a/keyboards/nyquist/matrix.c b/keyboards/nyquist/matrix.c index dcb94c67c..21eef9456 100644 --- a/keyboards/nyquist/matrix.c +++ b/keyboards/nyquist/matrix.c @@ -21,9 +21,7 @@ along with this program. If not, see . #include #include #include -#include -#include -#include +#include "wait.h" #include "print.h" #include "debug.h" #include "util.h" @@ -31,6 +29,7 @@ along with this program. If not, see . #include "split_util.h" #include "pro_micro.h" #include "config.h" +#include "timer.h" #ifdef USE_I2C # include "i2c.h" @@ -38,14 +37,29 @@ along with this program. If not, see . # include "serial.h" #endif -#ifndef DEBOUNCE -# define DEBOUNCE 5 +#ifndef DEBOUNCING_DELAY +# define DEBOUNCING_DELAY 5 #endif +#if (DEBOUNCING_DELAY > 0) + static uint16_t debouncing_time; + static bool debouncing = false; +#endif + +#if (MATRIX_COLS <= 8) +# define print_matrix_header() print("\nr/c 01234567\n") +# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop(matrix[i]) +# define ROW_SHIFTER ((uint8_t)1) +#else +# error "Currently only supports 8 COLS" +#endif +static matrix_row_t matrix_debouncing[MATRIX_ROWS]; + #define ERROR_DISCONNECT_COUNT 5 -static uint8_t debouncing = DEBOUNCE; -static const int ROWS_PER_HAND = MATRIX_ROWS/2; +#define ROWS_PER_HAND (MATRIX_ROWS/2) + static uint8_t error_count = 0; static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; @@ -55,11 +69,19 @@ static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; static matrix_row_t matrix[MATRIX_ROWS]; static matrix_row_t matrix_debouncing[MATRIX_ROWS]; -static matrix_row_t read_cols(void); -static void init_cols(void); -static void unselect_rows(void); -static void select_row(uint8_t row); - +#if (DIODE_DIRECTION == COL2ROW) + 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 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 unselect_col(uint8_t col); + static void select_col(uint8_t col); +#endif __attribute__ ((weak)) void matrix_init_quantum(void) { matrix_init_kb(); @@ -118,33 +140,54 @@ void matrix_init(void) } matrix_init_quantum(); + } uint8_t _matrix_scan(void) { - // Right hand is stored after the left in the matirx so, we need to offset it int offset = isLeftHand ? 0 : (ROWS_PER_HAND); +#if (DIODE_DIRECTION == COL2ROW) + // Set row, read cols + for (uint8_t current_row = 0; current_row < ROWS_PER_HAND; current_row++) { +# if (DEBOUNCING_DELAY > 0) + bool matrix_changed = read_cols_on_row(matrix_debouncing+offset, current_row); + + if (matrix_changed) { + debouncing = true; + debouncing_time = timer_read(); + PORTD ^= (1 << 2); + } + +# else + read_cols_on_row(matrix+offset, current_row); +# endif + + } + +#elif (DIODE_DIRECTION == ROW2COL) + // Set col, read rows + for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { +# if (DEBOUNCING_DELAY > 0) + bool matrix_changed = read_rows_on_col(matrix_debouncing+offset, current_col); + if (matrix_changed) { + debouncing = true; + debouncing_time = timer_read(); + } +# else + read_rows_on_col(matrix+offset, current_col); +# endif - for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { - select_row(i); - _delay_us(30); // without this wait read unstable value. - matrix_row_t cols = read_cols(); - if (matrix_debouncing[i+offset] != cols) { - matrix_debouncing[i+offset] = cols; - debouncing = DEBOUNCE; - } - unselect_rows(); } +#endif - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { +# if (DEBOUNCING_DELAY > 0) + if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) { for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { matrix[i+offset] = matrix_debouncing[i+offset]; } + debouncing = false; } - } +# endif return 1; } @@ -200,9 +243,7 @@ int serial_transaction(void) { uint8_t matrix_scan(void) { - int ret = _matrix_scan(); - - + uint8_t ret = _matrix_scan(); #ifdef USE_I2C if( i2c_transaction() ) { @@ -233,11 +274,10 @@ uint8_t matrix_scan(void) void matrix_slave_scan(void) { _matrix_scan(); - int offset = (isLeftHand) ? 0 : (MATRIX_ROWS / 2); + int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; #ifdef USE_I2C for (int i = 0; i < ROWS_PER_HAND; ++i) { - /* i2c_slave_buffer[i] = matrix[offset+i]; */ i2c_slave_buffer[i] = matrix[offset+i]; } #else // USE_SERIAL @@ -284,33 +324,141 @@ uint8_t matrix_key_count(void) return count; } -static void init_cols(void) +#if (DIODE_DIRECTION == COL2ROW) + +static void init_cols(void) { - for(int x = 0; x < MATRIX_COLS; x++) { - _SFR_IO8((col_pins[x] >> 4) + 1) &= ~_BV(col_pins[x] & 0xF); - _SFR_IO8((col_pins[x] >> 4) + 2) |= _BV(col_pins[x] & 0xF); + for(uint8_t x = 0; x < MATRIX_COLS; x++) { + uint8_t pin = col_pins[x]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI } } -static matrix_row_t read_cols(void) +static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) { - matrix_row_t result = 0; - for(int x = 0; x < MATRIX_COLS; x++) { - result |= (_SFR_IO8(col_pins[x] >> 4) & _BV(col_pins[x] & 0xF)) ? 0 : (1 << x); + // 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 selecton to stabilize + select_row(current_row); + wait_us(30); + + // For each col... + for(uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { + + // Select the col pin to read (active low) + uint8_t pin = col_pins[col_index]; + uint8_t pin_state = (_SFR_IO8(pin >> 4) & _BV(pin & 0xF)); + + // Populate the matrix row with the state of the col pin + current_matrix[current_row] |= pin_state ? 0 : (ROW_SHIFTER << col_index); } - return result; + + // Unselect row + unselect_row(current_row); + + return (last_row_value != current_matrix[current_row]); +} + +static void select_row(uint8_t row) +{ + uint8_t pin = 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) +{ + uint8_t pin = row_pins[row]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI } static void unselect_rows(void) { - for(int x = 0; x < ROWS_PER_HAND; x++) { - _SFR_IO8((row_pins[x] >> 4) + 1) &= ~_BV(row_pins[x] & 0xF); - _SFR_IO8((row_pins[x] >> 4) + 2) |= _BV(row_pins[x] & 0xF); + for(uint8_t x = 0; x < ROWS_PER_HAND; x++) { + uint8_t pin = row_pins[x]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI } } -static void select_row(uint8_t row) +#elif (DIODE_DIRECTION == ROW2COL) + +static void init_rows(void) +{ + for(uint8_t x = 0; x < ROWS_PER_HAND; x++) { + uint8_t pin = 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; + + // Select col and wait for col selecton to stabilize + select_col(current_col); + wait_us(30); + + // For each row... + for(uint8_t row_index = 0; row_index < ROWS_PER_HAND; row_index++) + { + + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[row_index]; + + // Check row pin state + if ((_SFR_IO8(row_pins[row_index] >> 4) & _BV(row_pins[row_index] & 0xF)) == 0) + { + // Pin LO, set col bit + current_matrix[row_index] |= (ROW_SHIFTER << current_col); + } + else + { + // Pin HI, clear col bit + current_matrix[row_index] &= ~(ROW_SHIFTER << current_col); + } + + // Determine if the matrix changed state + if ((last_row_value != current_matrix[row_index]) && !(matrix_changed)) + { + matrix_changed = true; + } + } + + // Unselect col + unselect_col(current_col); + + return matrix_changed; +} + +static void select_col(uint8_t col) +{ + uint8_t pin = 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) +{ + uint8_t pin = 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) { - _SFR_IO8((row_pins[row] >> 4) + 1) |= _BV(row_pins[row] & 0xF); - _SFR_IO8((row_pins[row] >> 4) + 2) &= ~_BV(row_pins[row] & 0xF); + for(uint8_t x = 0; x < MATRIX_COLS; x++) { + uint8_t pin = col_pins[x]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI + } } + +#endif diff --git a/keyboards/nyquist/split_util.c b/keyboards/nyquist/split_util.c index 39639c3b4..346cbc908 100644 --- a/keyboards/nyquist/split_util.c +++ b/keyboards/nyquist/split_util.c @@ -8,6 +8,7 @@ #include "matrix.h" #include "keyboard.h" #include "config.h" +#include "timer.h" #ifdef USE_I2C # include "i2c.h" @@ -42,6 +43,7 @@ static void keyboard_master_setup(void) { } static void keyboard_slave_setup(void) { + timer_init(); #ifdef USE_I2C i2c_slave_init(SLAVE_I2C_ADDRESS); #else -- cgit v1.2.3-24-g4f1b From 1fc9eabd08136554e4f27f3d21cf5e002441abfe Mon Sep 17 00:00:00 2001 From: Gareth Pye Date: Sat, 5 Aug 2017 20:55:06 +1000 Subject: Fixed a layout comment to match layout array --- keyboards/satan/keymaps/poker/keymap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'keyboards') diff --git a/keyboards/satan/keymaps/poker/keymap.c b/keyboards/satan/keymaps/poker/keymap.c index 9da7d29b7..b7e6fac21 100644 --- a/keyboards/satan/keymaps/poker/keymap.c +++ b/keyboards/satan/keymaps/poker/keymap.c @@ -36,7 +36,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------. * | ~ | F1|F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12| DEL | * |-----------------------------------------------------------| - * | | Up| | | | |Cal| |Ins| |PrSc|Sclk|Paus| | + * | | |Up| | | |Cal| |Ins| |PrSc|Sclk|Paus| | * |-----------------------------------------------------------| * | |Left|Down|Rig| | | | | | |Home|PgUp| | * |-----------------------------------------------------------| @@ -51,7 +51,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_TRNS, \ KC_TRNS, KC_TRNS, KC_APP, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_END, KC_PGDN, KC_TRNS, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - + /* Keymap _RL: Function Layer * ,-----------------------------------------------------------. * | | | | | | | | | | | | | | RESET| @@ -63,7 +63,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | F1|F2 | F3|F4 | F5| F6| F7| F8| | | | * |-----------------------------------------------------------| * | | | | | | | | | - * `-----------------------------------------------------------' + * `-----------------------------------------------------------' */ [_RL] = KEYMAP_ANSI( #ifdef RGBLIGHT_ENABLE -- cgit v1.2.3-24-g4f1b From 087fbe0628652ed6ac81a03748b9bac747edcacc Mon Sep 17 00:00:00 2001 From: Nic Aitch Date: Sun, 6 Aug 2017 20:13:29 -0500 Subject: Port main keyboard parts --- keyboards/bananasplit/Makefile | 3 ++ keyboards/bananasplit/README.md | 3 ++ keyboards/bananasplit/bananasplit.c | 28 +++++++++++ keyboards/bananasplit/bananasplit.h | 92 +++++++++++++++++++++++++++++++++++++ keyboards/bananasplit/config.h | 81 ++++++++++++++++++++++++++++++++ keyboards/bananasplit/rules.mk | 65 ++++++++++++++++++++++++++ 6 files changed, 272 insertions(+) create mode 100644 keyboards/bananasplit/Makefile create mode 100644 keyboards/bananasplit/README.md create mode 100644 keyboards/bananasplit/bananasplit.c create mode 100644 keyboards/bananasplit/bananasplit.h create mode 100644 keyboards/bananasplit/config.h create mode 100644 keyboards/bananasplit/rules.mk (limited to 'keyboards') diff --git a/keyboards/bananasplit/Makefile b/keyboards/bananasplit/Makefile new file mode 100644 index 000000000..57b2ef62e --- /dev/null +++ b/keyboards/bananasplit/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../Makefile +endif diff --git a/keyboards/bananasplit/README.md b/keyboards/bananasplit/README.md new file mode 100644 index 000000000..667a02f29 --- /dev/null +++ b/keyboards/bananasplit/README.md @@ -0,0 +1,3 @@ +# BananaSplit60 + +Ported from evangs/tmk_keyboard diff --git a/keyboards/bananasplit/bananasplit.c b/keyboards/bananasplit/bananasplit.c new file mode 100644 index 000000000..1aa8fb174 --- /dev/null +++ b/keyboards/bananasplit/bananasplit.c @@ -0,0 +1,28 @@ +#include "bananasplit.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} diff --git a/keyboards/bananasplit/bananasplit.h b/keyboards/bananasplit/bananasplit.h new file mode 100644 index 000000000..082d04aed --- /dev/null +++ b/keyboards/bananasplit/bananasplit.h @@ -0,0 +1,92 @@ +/* +Copyright 2012,2013 Jun Wako + +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 . +*/ +#ifndef BANANASPLIT_H +#define BANANASPLIT_H + +#include "quantum.h" + +#define KEYMAP( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ + K40, K41, K42, K44, K45, K46, K48, K49, K4A, K4B, K4C \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, KC_NO }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ + { K40, K41, K42, KC_NO, K44, K45, K46, KC_NO, K48, K49, K4A, K4B, K4C } \ +} + +#define KEYMAP_HHKBANANA( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ + K40, K41, K42, K44, K45, K46, K48, K49, K4A, K4B, K4C \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, KC_NO }, \ + { K40, K41, K42, KC_NO, K44, K45, K46, KC_NO, K48, K49, K4A, K4B, K4C } \ +} + +#define KEYMAP_ANSI( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ + K40, K41, K42, K45, K48, K49, K4B, K4C \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, KC_NO }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, KC_NO }, \ + { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, K48, K49, KC_NO, K4B, K4C } \ +} + +#define KEYMAP_ISO( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + 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, \ + K40, K41, K42, K45, K48, K49, K4B, K4C \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, KC_NO }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, KC_NO }, \ + { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, K48, K49, KC_NO, K4B, K4C } \ +} + +#define KEYMAP_ALL( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D,\ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D,\ + K40, K41, K42, K44, K45, K46, K48, K49, K4A, K4B, K4C \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ + { K40, K41, K42, KC_NO, K44, K45, K46, KC_NO, K48, K49, K4A, K4B, K4C } \ +} + +#endif diff --git a/keyboards/bananasplit/config.h b/keyboards/bananasplit/config.h new file mode 100644 index 000000000..bf8d9377c --- /dev/null +++ b/keyboards/bananasplit/config.h @@ -0,0 +1,81 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEAE +#define PRODUCT_ID 0x8870 +#define DEVICE_VER 0x0001 +#define MANUFACTURER TheVan Keyboards +#define PRODUCT BananaSplit 60 +#define DESCRIPTION keyboard firmware for BananaSplit 60 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +#define MATRIX_ROW_PINS { B0, B2, B4, B5, B6 } +#define MATRIX_COL_PINS { F5, B1, F0, F1, F4, B3, D7, D6, D4, D5, D3, D2, D1, D0 } +#define UNUSED_PINS + +#define DIODE_DIRECTION ROW2COL + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +#define BACKLIGHT_LEVELS 1 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 +#define TAPPING_TERM 175 + +/* 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)) \ +) + + + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif diff --git a/keyboards/bananasplit/rules.mk b/keyboards/bananasplit/rules.mk new file mode 100644 index 000000000..04579d4ce --- /dev/null +++ b/keyboards/bananasplit/rules.mk @@ -0,0 +1,65 @@ +# MCU name +#MCU = at90usb1287 +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* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +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 = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA +BACKLIGHT_ENABLE = yes + + +# Optimize size but this may cause error "relocation truncated to fit" +#EXTRALDFLAGS = -Wl,--relax -- cgit v1.2.3-24-g4f1b From 4a5c9485613c29cbea64ba0c998c3285a3b29ab5 Mon Sep 17 00:00:00 2001 From: Nic Aitch Date: Sun, 6 Aug 2017 20:14:16 -0500 Subject: Port true_banana as default --- keyboards/bananasplit/keymaps/default/keymap.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 keyboards/bananasplit/keymaps/default/keymap.c (limited to 'keyboards') diff --git a/keyboards/bananasplit/keymaps/default/keymap.c b/keyboards/bananasplit/keymaps/default/keymap.c new file mode 100644 index 000000000..f07278df9 --- /dev/null +++ b/keyboards/bananasplit/keymaps/default/keymap.c @@ -0,0 +1,25 @@ +#include "bananasplit.h" + +#define DEFAULT_LAYER 0 +#define LAYER_1 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [DEFAULT_LAYER] = KEYMAP( + 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_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_CAPS, 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, RSFT_T(KC_SLSH), KC_UP, _______, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_ENT, MO(LAYER_1), KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT + ), + + [LAYER_1] = KEYMAP( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), +}; + +const uint16_t PROGMEM fn_actions[] = { +}; -- cgit v1.2.3-24-g4f1b From ba59b2d97ef99291e1c825b283bd40711edc4c79 Mon Sep 17 00:00:00 2001 From: Nic Aitch Date: Sun, 6 Aug 2017 20:14:27 -0500 Subject: Port hhkbanana --- keyboards/bananasplit/keymaps/hhkbanana/keymap.c | 25 ++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 keyboards/bananasplit/keymaps/hhkbanana/keymap.c (limited to 'keyboards') diff --git a/keyboards/bananasplit/keymaps/hhkbanana/keymap.c b/keyboards/bananasplit/keymaps/hhkbanana/keymap.c new file mode 100644 index 000000000..b6c1d268b --- /dev/null +++ b/keyboards/bananasplit/keymaps/hhkbanana/keymap.c @@ -0,0 +1,25 @@ +#include "bananasplit.h" + +#define DEFAULT_LAYER 0 +#define LAYER_1 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [DEFAULT_LAYER] = KEYMAP_HHKBANANA( \ + 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_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_CAPS, 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_PSCR, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_ENT, MO(LAYER_1), KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT \ + ), + + [LAYER_1] = KEYMAP_HHKBANANA( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), +}; + +const uint16_t PROGMEM fn_actions[] = { +}; -- cgit v1.2.3-24-g4f1b From c93975ac94f0f95eafdaebc752e7789dfb70d7be Mon Sep 17 00:00:00 2001 From: Nic Aitch Date: Sun, 6 Aug 2017 20:16:20 -0500 Subject: Add "hhkb with arrows" macro --- keyboards/bananasplit/bananasplit.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'keyboards') diff --git a/keyboards/bananasplit/bananasplit.h b/keyboards/bananasplit/bananasplit.h index 082d04aed..5be3d881a 100644 --- a/keyboards/bananasplit/bananasplit.h +++ b/keyboards/bananasplit/bananasplit.h @@ -89,4 +89,19 @@ along with this program. If not, see . { K40, K41, K42, KC_NO, K44, K45, K46, KC_NO, K48, K49, K4A, K4B, K4C } \ } +#define KEYMAP_HHKB_ARROW( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D,\ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D,\ + K40, K41, K42, K44, K45, K46, K48, K49, K4A, K4B, K4C \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ + { K40, K41, K42, KC_NO, K44, K45, K46, KC_NO, K48, K49, K4A, K4B, K4C } \ +} + + #endif -- cgit v1.2.3-24-g4f1b From fb0d4e96e89c1219480f3f79a6e18be484089ea9 Mon Sep 17 00:00:00 2001 From: Nic Aitch Date: Sun, 6 Aug 2017 20:16:30 -0500 Subject: Add nic keymap --- keyboards/bananasplit/keymaps/nic/keymap.c | 43 ++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 keyboards/bananasplit/keymaps/nic/keymap.c (limited to 'keyboards') diff --git a/keyboards/bananasplit/keymaps/nic/keymap.c b/keyboards/bananasplit/keymaps/nic/keymap.c new file mode 100644 index 000000000..58d7d02bd --- /dev/null +++ b/keyboards/bananasplit/keymaps/nic/keymap.c @@ -0,0 +1,43 @@ +#include "bananasplit.h" + +#define DEFAULT_LAYER 0 +#define THUMB_LAYER 1 +#define NORMAN_LAYER 2 +#define MOD_LAYER 3 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [DEFAULT_LAYER] = KEYMAP_HHKB_ARROW( \ + KC_GRV, 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_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, \ + CTL_T(KC_ESC), 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_DEL, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RSFT_T(KC_SLSH), KC_UP, TG(NORMAN_LAYER), \ + KC_HYPR, KC_LALT, KC_LGUI, KC_SPC, MO(THUMB_LAYER), KC_SPC, KC_LGUI, KC_LALT, KC_LEFT, KC_DOWN, KC_RIGHT \ + ), + + [THUMB_LAYER] = KEYMAP_HHKB_ARROW( \ + MO(MOD_LAYER), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + + [NORMAN_LAYER] = KEYMAP_HHKB_ARROW( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, KC_D, KC_F, KC_K, KC_J, KC_U, KC_R, KC_L, KC_SCLN, _______, _______, _______, \ + _______, _______, _______, KC_E, KC_T, _______, KC_Y, KC_N, KC_I, KC_O, KC_H, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, KC_P, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + + [MOD_LAYER] = KEYMAP_HHKB_ARROW( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), +}; + +const uint16_t PROGMEM fn_actions[] = { +}; -- cgit v1.2.3-24-g4f1b From b529d5923fc304fc0a5d7cdbb6f3497afc812f48 Mon Sep 17 00:00:00 2001 From: Nic Aitch Date: Sun, 6 Aug 2017 20:22:27 -0500 Subject: Update readme --- keyboards/bananasplit/README.md | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'keyboards') diff --git a/keyboards/bananasplit/README.md b/keyboards/bananasplit/README.md index 667a02f29..b059a0834 100644 --- a/keyboards/bananasplit/README.md +++ b/keyboards/bananasplit/README.md @@ -1,3 +1,29 @@ -# BananaSplit60 +# BananaSplit60 keyboard firmware Ported from evangs/tmk_keyboard + +## Quantum MK Firmware + +For the full Quantum feature list, see [the parent readme](/). + +## Building + +Download or clone the whole firmware and navigate to the keyboards/bananasplit folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file. + +Depending on which keymap you would like to use, you will have to compile slightly differently. + +### Default + +To build with the default keymap, simply run `make default`. + +### Other Keymaps + +Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a folder with the name of your keymap in the keymaps folder, and see keymap documentation (you can find in top readme.md) and existant keymap files. + +To build the firmware binary hex file with a keymap just do `make` with a keymap like this: + +``` +$ make [default|jack|] +``` + +Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. -- cgit v1.2.3-24-g4f1b From 7f3921bcb3ab1b2cb992b38920120ae448793d02 Mon Sep 17 00:00:00 2001 From: Nic Aitch Date: Sun, 6 Aug 2017 20:55:03 -0500 Subject: Update nic keymap --- keyboards/bananasplit/keymaps/nic/keymap.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'keyboards') diff --git a/keyboards/bananasplit/keymaps/nic/keymap.c b/keyboards/bananasplit/keymaps/nic/keymap.c index 58d7d02bd..d8a5d0b17 100644 --- a/keyboards/bananasplit/keymaps/nic/keymap.c +++ b/keyboards/bananasplit/keymaps/nic/keymap.c @@ -5,19 +5,21 @@ #define NORMAN_LAYER 2 #define MOD_LAYER 3 +#define HYPER_TAB ALL_T(KC_TAB) + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [DEFAULT_LAYER] = KEYMAP_HHKB_ARROW( \ KC_GRV, 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_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, \ + HYPER_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, \ CTL_T(KC_ESC), 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_DEL, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RSFT_T(KC_SLSH), KC_UP, TG(NORMAN_LAYER), \ - KC_HYPR, KC_LALT, KC_LGUI, KC_SPC, MO(THUMB_LAYER), KC_SPC, KC_LGUI, KC_LALT, KC_LEFT, KC_DOWN, KC_RIGHT \ + KC_CAPS, KC_LALT, KC_LGUI, KC_SPC, MO(THUMB_LAYER), KC_SPC, KC_LGUI, KC_LALT, KC_LEFT, KC_DOWN, KC_RIGHT \ ), [THUMB_LAYER] = KEYMAP_HHKB_ARROW( \ - MO(MOD_LAYER), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + MO(MOD_LAYER), 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_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), -- cgit v1.2.3-24-g4f1b From 597ff7aee9a04b4f4f41d6d1f5b2e1223e0e83b8 Mon Sep 17 00:00:00 2001 From: That-Canadian Date: Mon, 7 Aug 2017 07:59:29 -0400 Subject: Line endings issue for uk78? --- keyboards/uk78/config.h | 30 ++-- keyboards/uk78/keymaps/default/keymap.c | 236 ++++++++++++++++---------------- keyboards/uk78/readme.md | 32 ++--- 3 files changed, 149 insertions(+), 149 deletions(-) (limited to 'keyboards') diff --git a/keyboards/uk78/config.h b/keyboards/uk78/config.h index 081f6b407..859fbf90f 100644 --- a/keyboards/uk78/config.h +++ b/keyboards/uk78/config.h @@ -1,18 +1,18 @@ -/* -Copyright 2012 Jun Wako - -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 . +/* +Copyright 2012 Jun Wako + +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 . */ #ifndef CONFIG_H diff --git a/keyboards/uk78/keymaps/default/keymap.c b/keyboards/uk78/keymaps/default/keymap.c index 759b4120a..b01beae18 100644 --- a/keyboards/uk78/keymaps/default/keymap.c +++ b/keyboards/uk78/keymaps/default/keymap.c @@ -1,119 +1,119 @@ -#include "uk78.h" - -// Helpful defines -#define _______ KC_TRNS - -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. -#define _BL 0 -#define _FL1 1 -#define _FL2 2 - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* _BL: Base Layer(Default) - For ISO enter use ANSI \ - * ,-------------------------------------------------------------------------------. - * |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| /|BSpc| Del| P/| P*| P-| - * |-------------------------------------------------------------------------------| - * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | P7| P8| P9| P=| - * |-------------------------------------------------------------------------------| - * |CAPS | A| S| D| F| G| H| J| K| L| ;| '| #| Ent| P4| P5| P6| P+| - * |-------------------------------------------------------------------------------| - * |Shift| \| Z| X| C| V| B| N| M| ,| .| /|Shift | Up| P1| P2| P3|SLck| - * |-------------------------------------------------------------------------------| - * |Ctrl|Win |Alt | Space |Alt|Mo(1)|Ctrl|Lef|Dow| Rig| P0| P.|PEnt| - * `-------------------------------------------------------------------------------' - */ - [_BL] = KEYMAP( - 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_BSPC, KC_DEL, KC_PSLS, KC_PAST, KC_PMNS, - 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_P7, KC_P8, KC_P9, KC_PEQL, - 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_NUHS, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, - KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_SLCK, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT), - /* _FL1: Function Layer 1 - For ISO enter use ANSI \ - * ,-------------------------------------------------------------------------------. - * | `|F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|PScr|Ins|NLck| | | | - * |-------------------------------------------------------------------------------| - * | | | | |RST| | | | | | | | | | | | | | - * |-------------------------------------------------------------------------------| - * | | | | | | |Hu+|Va+|Sa+| | | | | | | | | | - * |-------------------------------------------------------------------------------| - * | | | | | |RGB|Hu-|Va-|Sa-|Bl-|Bl+| |Mute|Vol+| | | | | - * |-------------------------------------------------------------------------------| - * | | | | BL_Toggle | | | | |Vol-| | | | | - * `-------------------------------------------------------------------------------' - */ - [_FL1] = KEYMAP( - KC_GRV, 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_INS, KC_NLCK, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_SAI, RGB_VAI, KC_TRNS, KC_TRNS, 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_TOG, RGB_HUD, RGB_SAD, RGB_VAD, BL_DEC, BL_INC, KC_TRNS, KC_MUTE, KC_MUTE, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, BL_TOGG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - /* _FL2: Function Layer 2 - For ISO enter use ANSI \ - * ,-------------------------------------------------------------------------------. - * | | | | | | | | | | | | | | | | | | | | - * |-------------------------------------------------------------------------------| - * | | | | | | | | | | | | | | | | | | | - * |-------------------------------------------------------------------------------| - * | | | | | | | | | | | | | | | | | | | - * |-------------------------------------------------------------------------------| - * | | | | | | | | | | | | | | | | | | | - * |-------------------------------------------------------------------------------| - * | | | | | | | | | | | | | | - * `-------------------------------------------------------------------------------' - */ - [_FL2] = 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - - -}; - - -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)) { - - } else { - - } - - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - DDRA |= (1 << 3); PORTA |= (1 << 3); - } else { - DDRA &= ~(1 << 3); PORTA &= ~(1 << 3); - } - - 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 { - - } - +#include "uk78.h" + +// Helpful defines +#define _______ KC_TRNS + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _BL 0 +#define _FL1 1 +#define _FL2 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* _BL: Base Layer(Default) - For ISO enter use ANSI \ + * ,-------------------------------------------------------------------------------. + * |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| /|BSpc| Del| P/| P*| P-| + * |-------------------------------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | P7| P8| P9| P=| + * |-------------------------------------------------------------------------------| + * |CAPS | A| S| D| F| G| H| J| K| L| ;| '| #| Ent| P4| P5| P6| P+| + * |-------------------------------------------------------------------------------| + * |Shift| \| Z| X| C| V| B| N| M| ,| .| /|Shift | Up| P1| P2| P3|SLck| + * |-------------------------------------------------------------------------------| + * |Ctrl|Win |Alt | Space |Alt|Mo(1)|Ctrl|Lef|Dow| Rig| P0| P.|PEnt| + * `-------------------------------------------------------------------------------' + */ + [_BL] = KEYMAP( + 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_BSPC, KC_DEL, KC_PSLS, KC_PAST, KC_PMNS, + 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_P7, KC_P8, KC_P9, KC_PEQL, + 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_NUHS, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_SLCK, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT), + /* _FL1: Function Layer 1 - For ISO enter use ANSI \ + * ,-------------------------------------------------------------------------------. + * | `|F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|PScr|Ins|NLck| | | | + * |-------------------------------------------------------------------------------| + * | | | | |RST| | | | | | | | | | | | | | + * |-------------------------------------------------------------------------------| + * | | | | | | |Hu+|Va+|Sa+| | | | | | | | | | + * |-------------------------------------------------------------------------------| + * | | | | | |RGB|Hu-|Va-|Sa-|Bl-|Bl+| |Mute|Vol+| | | | | + * |-------------------------------------------------------------------------------| + * | | | | BL_Toggle | | | | |Vol-| | | | | + * `-------------------------------------------------------------------------------' + */ + [_FL1] = KEYMAP( + KC_GRV, 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_INS, KC_NLCK, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_SAI, RGB_VAI, KC_TRNS, KC_TRNS, 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_TOG, RGB_HUD, RGB_SAD, RGB_VAD, BL_DEC, BL_INC, KC_TRNS, KC_MUTE, KC_MUTE, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, BL_TOGG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + /* _FL2: Function Layer 2 - For ISO enter use ANSI \ + * ,-------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | | | | | | + * |-------------------------------------------------------------------------------| + * | | | | | | | | | | | | | | | | | | | + * |-------------------------------------------------------------------------------| + * | | | | | | | | | | | | | | | | | | | + * |-------------------------------------------------------------------------------| + * | | | | | | | | | | | | | | | | | | | + * |-------------------------------------------------------------------------------| + * | | | | | | | | | | | | | | + * `-------------------------------------------------------------------------------' + */ + [_FL2] = 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + +}; + + +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)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + DDRA |= (1 << 3); PORTA |= (1 << 3); + } else { + DDRA &= ~(1 << 3); PORTA &= ~(1 << 3); + } + + 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 { + + } + } \ No newline at end of file diff --git a/keyboards/uk78/readme.md b/keyboards/uk78/readme.md index 22cbcabc4..46f293614 100644 --- a/keyboards/uk78/readme.md +++ b/keyboards/uk78/readme.md @@ -1,16 +1,16 @@ -# UK78 - -![UK78](http://i.imgur.com/42pg6RS.png) - -A fully customizable 60%+numpad keyboard. - -* Keyboard Maintainer: [Rozakiin](https://github.com/rozakiin) -* Hardware Supported: UK78 PCB - * rev2 -* Hardware Availability: [ukkeyboards.](http://ukkeyboards.bigcartel.com/) - -Make example for this keyboard (after setting up your build environment): - - make uk78-default - -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +# UK78 + +![UK78](http://i.imgur.com/42pg6RS.png) + +A fully customizable 60%+numpad keyboard. + +* Keyboard Maintainer: [Rozakiin](https://github.com/rozakiin) +* Hardware Supported: UK78 PCB + * rev2 +* Hardware Availability: [ukkeyboards.](http://ukkeyboards.bigcartel.com/) + +Make example for this keyboard (after setting up your build environment): + + make uk78-default + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. -- cgit v1.2.3-24-g4f1b