From 20a16d29fe50f30b8309e68790c628832dc4906c Mon Sep 17 00:00:00 2001 From: kakunpc <15257475+kakunpc@users.noreply.github.com> Date: Sun, 29 Sep 2019 03:59:33 +0900 Subject: [PATCH 001/316] [Keyboard] update angel17 (#6831) --- .../angel17/{angel17.c => alpha/alpha.c} | 2 +- .../angel17/{angel17.h => alpha/alpha.h} | 0 keyboards/angel17/{ => alpha}/config.h | 0 keyboards/angel17/alpha/rules.mk | 46 ++++ keyboards/angel17/keymaps/default/keymap.c | 24 +- keyboards/angel17/rev1/config.h | 244 ++++++++++++++++++ keyboards/angel17/rev1/rev1.c | 51 ++++ keyboards/angel17/rev1/rev1.h | 40 +++ keyboards/angel17/rev1/rules.mk | 46 ++++ keyboards/angel17/rules.mk | 2 + 10 files changed, 448 insertions(+), 7 deletions(-) rename keyboards/angel17/{angel17.c => alpha/alpha.c} (98%) rename keyboards/angel17/{angel17.h => alpha/alpha.h} (100%) rename keyboards/angel17/{ => alpha}/config.h (100%) create mode 100644 keyboards/angel17/alpha/rules.mk create mode 100644 keyboards/angel17/rev1/config.h create mode 100644 keyboards/angel17/rev1/rev1.c create mode 100644 keyboards/angel17/rev1/rev1.h create mode 100644 keyboards/angel17/rev1/rules.mk diff --git a/keyboards/angel17/angel17.c b/keyboards/angel17/alpha/alpha.c similarity index 98% rename from keyboards/angel17/angel17.c rename to keyboards/angel17/alpha/alpha.c index 80635a30e14f..3d2d1de77905 100644 --- a/keyboards/angel17/angel17.c +++ b/keyboards/angel17/alpha/alpha.c @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "angel17.h" +#include "alpha.h" // Optional override functions below. // You can leave any or all of these undefined. diff --git a/keyboards/angel17/angel17.h b/keyboards/angel17/alpha/alpha.h similarity index 100% rename from keyboards/angel17/angel17.h rename to keyboards/angel17/alpha/alpha.h diff --git a/keyboards/angel17/config.h b/keyboards/angel17/alpha/config.h similarity index 100% rename from keyboards/angel17/config.h rename to keyboards/angel17/alpha/config.h diff --git a/keyboards/angel17/alpha/rules.mk b/keyboards/angel17/alpha/rules.mk new file mode 100644 index 000000000000..423ebddc5147 --- /dev/null +++ b/keyboards/angel17/alpha/rules.mk @@ -0,0 +1,46 @@ +# MCU name +MCU = atmega32u4 + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = caterina + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +LAYOUTS = numpad_5x4 diff --git a/keyboards/angel17/keymaps/default/keymap.c b/keyboards/angel17/keymaps/default/keymap.c index 509bcf5e2545..8f54b72b4279 100644 --- a/keyboards/angel17/keymaps/default/keymap.c +++ b/keyboards/angel17/keymaps/default/keymap.c @@ -15,13 +15,25 @@ */ #include QMK_KEYBOARD_H +enum layers{ + BASE, + COMMAND, +}; + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_numpad_5x4( /* Base */ - KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, - KC_P7, KC_P8, KC_P9, - KC_P4, KC_P5, KC_P6, KC_PPLS, - KC_P1, KC_P2, KC_P3, - KC_P0, KC_PDOT, KC_PENT + [BASE] = LAYOUT_numpad_5x4( /* Base */ + LT(COMMAND,KC_NLCK), KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, + KC_P0, KC_PDOT, KC_PENT + ), + [COMMAND] = LAYOUT_numpad_5x4( /* Base */ + _______, KC_NO, KC_NO, RGB_RMOD, + KC_NO, KC_NO, KC_NO, + RGB_HUI, RGB_SAI, RGB_VAI, RGB_MOD, + RGB_HUD, RGB_SAD, RGB_VAD, + RGB_TOG, KC_NO, KC_NO ), }; diff --git a/keyboards/angel17/rev1/config.h b/keyboards/angel17/rev1/config.h new file mode 100644 index 000000000000..3e5af362abb2 --- /dev/null +++ b/keyboards/angel17/rev1/config.h @@ -0,0 +1,244 @@ +/* +Copyright 2019 kakunpc + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER kakunpc +#define PRODUCT angel17 +#define DESCRIPTION A custom keyboard + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 5 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D4, C6, D7, E6 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN D3 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 17 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ + /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * 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 + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/angel17/rev1/rev1.c b/keyboards/angel17/rev1/rev1.c new file mode 100644 index 000000000000..f97e6caed426 --- /dev/null +++ b/keyboards/angel17/rev1/rev1.c @@ -0,0 +1,51 @@ +/* Copyright 2019 kakunpc + * + * 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 . + */ +#include "rev1.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* + +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/angel17/rev1/rev1.h b/keyboards/angel17/rev1/rev1.h new file mode 100644 index 000000000000..5b8600a2063e --- /dev/null +++ b/keyboards/angel17/rev1/rev1.h @@ -0,0 +1,40 @@ +/* Copyright 2019 kakunpc + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_numpad_5x4( \ + k00, k01, k02, k03, \ + k10, k11, k12, \ + k20, k21, k22, k13, \ + k30, k31, k32, \ + k40, k41, k33 \ +) \ +{ \ + { k00, k10, k20, k31, k41 }, \ + { k02, k12, k22, k33, KC_NO }, \ + { k01, k11, k21, k32, KC_NO }, \ + { k03, k13, k30, k40, KC_NO }, \ +} diff --git a/keyboards/angel17/rev1/rules.mk b/keyboards/angel17/rev1/rules.mk new file mode 100644 index 000000000000..fe22b3ab86f7 --- /dev/null +++ b/keyboards/angel17/rev1/rules.mk @@ -0,0 +1,46 @@ +# MCU name +MCU = atmega32u4 + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = caterina + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +LAYOUTS = numpad_5x4 diff --git a/keyboards/angel17/rules.mk b/keyboards/angel17/rules.mk index 423ebddc5147..dd54bd525f78 100644 --- a/keyboards/angel17/rules.mk +++ b/keyboards/angel17/rules.mk @@ -44,3 +44,5 @@ FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) LAYOUTS = numpad_5x4 + +DEFAULT_FOLDER = angel17/rev1 From 5d41db6308a3b9a44376a288072db5c0359b46d9 Mon Sep 17 00:00:00 2001 From: Homerow Co <30292003+homerow-co@users.noreply.github.com> Date: Sun, 29 Sep 2019 04:10:02 +0200 Subject: [PATCH 002/316] correct default keymap for wonderland (#6835) tested --- .../wonderland/keymaps/default/keymap.c | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/keyboards/maartenwut/wonderland/keymaps/default/keymap.c b/keyboards/maartenwut/wonderland/keymaps/default/keymap.c index fb876443b38d..ccb022f684f1 100755 --- a/keyboards/maartenwut/wonderland/keymaps/default/keymap.c +++ b/keyboards/maartenwut/wonderland/keymaps/default/keymap.c @@ -7,19 +7,18 @@ enum layers { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BASE] = LAYOUT( - KC_ESC, KC_1, 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_DEL, KC_BSPC, \ - KC_F10, 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, \ - RGB_TOG, 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_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), \ - KC_LCTL, KC_LAPO, KC_BSPC, KC_LGUI, KC_SPC, KC_RAPC, KC_RCTRL \ + KC_ESC, 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_DEL, KC_BSPC, \ + KC_PGUP, 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_PGDN, 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_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), \ + KC_LCTL, KC_LAPO, KC_BSPC, KC_LGUI, KC_SPC, KC_RAPC, KC_RCTRL \ ), [_FUNC] = LAYOUT( - RGB_TOG, VLK_TOG, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, RESET, \ - RGB_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - RGB_RMOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, \ - KC_LSFT, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RIGHT, XXXXXXX, \ - _______, KC_LALT, _______, _______, _______, KC_RALT, _______ \ + RGB_TOG, VLK_TOG, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, RESET, \ + RGB_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ +RGB_RMOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, \ + KC_LSFT, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN,KC_RIGHT, XXXXXXX, \ + _______, KC_LALT, _______, _______, _______, KC_RALT, _______ \ ) }; From 714cf021a420d3b3927fcd2961646d189997ddce Mon Sep 17 00:00:00 2001 From: fougner Date: Mon, 30 Sep 2019 00:33:48 +0200 Subject: [PATCH 003/316] [Keyboard] support tkl_iso community layout (#6778) * support tkl_iso community layout * fix comments from review * fix review comments * LAYOUT is an alias for LAYOUT_all * add keymap default_iso * revert changes to default keymap --- keyboards/bpiphany/unloved_bastard/info.json | 3 ++ .../keymaps/default_iso/config.h | 24 +++++++++++ .../keymaps/default_iso/keymap.c | 42 ++++++++++++++++++ .../keymaps/default_iso/readme.md | 3 ++ keyboards/bpiphany/unloved_bastard/rules.mk | 2 +- .../unloved_bastard/unloved_bastard.h | 43 +++++++++++++------ 6 files changed, 102 insertions(+), 15 deletions(-) create mode 100644 keyboards/bpiphany/unloved_bastard/keymaps/default_iso/config.h create mode 100644 keyboards/bpiphany/unloved_bastard/keymaps/default_iso/keymap.c create mode 100644 keyboards/bpiphany/unloved_bastard/keymaps/default_iso/readme.md diff --git a/keyboards/bpiphany/unloved_bastard/info.json b/keyboards/bpiphany/unloved_bastard/info.json index efa995088b45..b0e3346e070a 100644 --- a/keyboards/bpiphany/unloved_bastard/info.json +++ b/keyboards/bpiphany/unloved_bastard/info.json @@ -9,6 +9,9 @@ "LAYOUT": { "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":2, "y":0}, {"label":"F2", "x":3, "y":0}, {"label":"F3", "x":4, "y":0}, {"label":"F4", "x":5, "y":0}, {"label":"F5", "x":6.5, "y":0}, {"label":"F6", "x":7.5, "y":0}, {"label":"F7", "x":8.5, "y":0}, {"label":"F8", "x":9.5, "y":0}, {"label":"F9", "x":11, "y":0}, {"label":"F10", "x":12, "y":0}, {"label":"F11", "x":13, "y":0}, {"label":"F12", "x":14, "y":0}, {"label":"PrtSc", "x":15.25, "y":0}, {"label":"Scroll Lock", "x":16.25, "y":0}, {"label":"Pause", "x":17.25, "y":0}, {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"label":"Backspace", "x":13, "y":1.5, "w":2}, {"label":"Insert", "x":15.25, "y":1.5}, {"label":"Home", "x":16.25, "y":1.5}, {"label":"PgUp", "x":17.25, "y":1.5}, {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"U", "x":7.5, "y":2.5}, {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, {"label":"|", "x":13.5, "y":2.5, "w":1.5}, {"label":"Delete", "x":15.25, "y":2.5}, {"label":"End", "x":16.25, "y":2.5}, {"label":"PgDn", "x":17.25, "y":2.5}, {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":6.75, "y":3.5}, {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, {"label":":", "x":10.75, "y":3.5}, {"label":"\"", "x":11.75, "y":3.5}, {"label":"Enter", "x":12.75, "y":3.5, "w":2.25}, {"label":"Shift", "x":0, "y":4.5, "w":1.25}, {"label":"|", "x":1.25, "y":4.5}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, {"label":"<", "x":9.25, "y":4.5}, {"label":">", "x":10.25, "y":4.5}, {"label":"?", "x":11.25, "y":4.5}, {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, {"label":"\u2191", "x":16.25, "y":4.5}, {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, {"label":"Win", "x":1.25, "y":5.5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"label":"Alt", "x":10, "y":5.5, "w":1.25}, {"label":"Win", "x":11.25, "y":5.5, "w":1.25}, {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, {"label":"\u2190", "x":15.25, "y":5.5}, {"label":"\u2193", "x":16.25, "y":5.5}, {"label":"\u2192", "x":17.25, "y":5.5}] }, + "LAYOUT_tkl_iso": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":2, "y":0}, {"label":"F2", "x":3, "y":0}, {"label":"F3", "x":4, "y":0}, {"label":"F4", "x":5, "y":0}, {"label":"F5", "x":6.5, "y":0}, {"label":"F6", "x":7.5, "y":0}, {"label":"F7", "x":8.5, "y":0}, {"label":"F8", "x":9.5, "y":0}, {"label":"F9", "x":11, "y":0}, {"label":"F10", "x":12, "y":0}, {"label":"F11", "x":13, "y":0}, {"label":"F12", "x":14, "y":0}, {"label":"PrtSc", "x":15.25, "y":0}, {"label":"Scroll Lock", "x":16.25, "y":0}, {"label":"Pause", "x":17.25, "y":0}, {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"label":"Backspace", "x":13, "y":1.5, "w":2}, {"label":"Insert", "x":15.25, "y":1.5}, {"label":"Home", "x":16.25, "y":1.5}, {"label":"PgUp", "x":17.25, "y":1.5}, {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"U", "x":7.5, "y":2.5}, {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, {"label":"Delete", "x":15.25, "y":2.5}, {"label":"End", "x":16.25, "y":2.5}, {"label":"PgDn", "x":17.25, "y":2.5}, {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":6.75, "y":3.5}, {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, {"label":":", "x":10.75, "y":3.5}, {"label":"\"", "x":11.75, "y":3.5}, {"label":"~", "x":12.75, "y":3.5}, {"label":"Enter", "x":13.75, "y":2.5, "w":1.25, "h":2}, {"label":"Shift", "x":0, "y":4.5, "w":1.25}, {"label":"|", "x":1.25, "y":4.5}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, {"label":"<", "x":9.25, "y":4.5}, {"label":">", "x":10.25, "y":4.5}, {"label":"?", "x":11.25, "y":4.5}, {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, {"label":"\u2191", "x":16.25, "y":4.5}, {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, {"label":"Win", "x":1.25, "y":5.5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"label":"Alt", "x":10, "y":5.5, "w":1.25}, {"label":"Win", "x":11.25, "y":5.5, "w":1.25}, {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, {"label":"\u2190", "x":15.25, "y":5.5}, {"label":"\u2193", "x":16.25, "y":5.5}, {"label":"\u2192", "x":17.25, "y":5.5}] + }, "LAYOUT_tkl_ansi": { "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":2, "y":0}, {"label":"F2", "x":3, "y":0}, {"label":"F3", "x":4, "y":0}, {"label":"F4", "x":5, "y":0}, {"label":"F5", "x":6.5, "y":0}, {"label":"F6", "x":7.5, "y":0}, {"label":"F7", "x":8.5, "y":0}, {"label":"F8", "x":9.5, "y":0}, {"label":"F9", "x":11, "y":0}, {"label":"F10", "x":12, "y":0}, {"label":"F11", "x":13, "y":0}, {"label":"F12", "x":14, "y":0}, {"label":"PrtSc", "x":15.25, "y":0}, {"label":"Scroll Lock", "x":16.25, "y":0}, {"label":"Pause", "x":17.25, "y":0}, {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"label":"Backspace", "x":13, "y":1.5, "w":2}, {"label":"Insert", "x":15.25, "y":1.5}, {"label":"Home", "x":16.25, "y":1.5}, {"label":"PgUp", "x":17.25, "y":1.5}, {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"U", "x":7.5, "y":2.5}, {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, {"label":"|", "x":13.5, "y":2.5, "w":1.5}, {"label":"Delete", "x":15.25, "y":2.5}, {"label":"End", "x":16.25, "y":2.5}, {"label":"PgDn", "x":17.25, "y":2.5}, {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":6.75, "y":3.5}, {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, {"label":":", "x":10.75, "y":3.5}, {"label":"\"", "x":11.75, "y":3.5}, {"label":"Enter", "x":12.75, "y":3.5, "w":2.25}, {"label":"Shift", "x":0, "y":4.5, "w":2.25}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, {"label":"<", "x":9.25, "y":4.5}, {"label":">", "x":10.25, "y":4.5}, {"label":"?", "x":11.25, "y":4.5}, {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, {"label":"\u2191", "x":16.25, "y":4.5}, {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, {"label":"Win", "x":1.25, "y":5.5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"label":"Alt", "x":10, "y":5.5, "w":1.25}, {"label":"Win", "x":11.25, "y":5.5, "w":1.25}, {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, {"label":"\u2190", "x":15.25, "y":5.5}, {"label":"\u2193", "x":16.25, "y":5.5}, {"label":"\u2192", "x":17.25, "y":5.5}] } diff --git a/keyboards/bpiphany/unloved_bastard/keymaps/default_iso/config.h b/keyboards/bpiphany/unloved_bastard/keymaps/default_iso/config.h new file mode 100644 index 000000000000..c55f7f9f7d27 --- /dev/null +++ b/keyboards/bpiphany/unloved_bastard/keymaps/default_iso/config.h @@ -0,0 +1,24 @@ +/* Copyright 2018 Alexander Fougner + * + * 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_USER_H +#define CONFIG_USER_H + +#include "config_common.h" + +// place overrides here + +#endif diff --git a/keyboards/bpiphany/unloved_bastard/keymaps/default_iso/keymap.c b/keyboards/bpiphany/unloved_bastard/keymaps/default_iso/keymap.c new file mode 100644 index 000000000000..b6b78c2c5a72 --- /dev/null +++ b/keyboards/bpiphany/unloved_bastard/keymaps/default_iso/keymap.c @@ -0,0 +1,42 @@ +/* Copyright 2018 Alexander Fougner + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT_tkl_iso(\ + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, \ + 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_BSPC, KC_INS, KC_HOME, KC_PGUP, \ + 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_DEL, KC_END, KC_PGDN, \ + 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_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_UP, \ + KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ) +}; + +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) { + +} diff --git a/keyboards/bpiphany/unloved_bastard/keymaps/default_iso/readme.md b/keyboards/bpiphany/unloved_bastard/keymaps/default_iso/readme.md new file mode 100644 index 000000000000..40fae94480b3 --- /dev/null +++ b/keyboards/bpiphany/unloved_bastard/keymaps/default_iso/readme.md @@ -0,0 +1,3 @@ +# default_iso + +A standard tenkeyless ISO-layout keymap for Unloved Bastard-powered keyboards. diff --git a/keyboards/bpiphany/unloved_bastard/rules.mk b/keyboards/bpiphany/unloved_bastard/rules.mk index e0d75dde8a82..65123020f3c2 100644 --- a/keyboards/bpiphany/unloved_bastard/rules.mk +++ b/keyboards/bpiphany/unloved_bastard/rules.mk @@ -33,4 +33,4 @@ FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches CUSTOM_MATRIX = yes SRC += matrix.c -LAYOUTS = tkl_ansi +LAYOUTS = tkl_ansi tkl_iso diff --git a/keyboards/bpiphany/unloved_bastard/unloved_bastard.h b/keyboards/bpiphany/unloved_bastard/unloved_bastard.h index 9eaf587d7a3e..0223e7233d97 100644 --- a/keyboards/bpiphany/unloved_bastard/unloved_bastard.h +++ b/keyboards/bpiphany/unloved_bastard/unloved_bastard.h @@ -1,4 +1,4 @@ -/* Copyright 2017 REPLACE_WITH_YOUR_NAME +/* Copyright 2018 Alexander Fougner * * 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 @@ -18,7 +18,7 @@ #include "quantum.h" -#define LAYOUT( \ +#define LAYOUT_all( \ KG6, KH4, KI4, KI2, KI6, KP5, KL6, KM2, KM4, KO4, KO5, KO6, KO0, KN5, KN7, KP7, \ KG4, KG5, KH5, KI5, KJ5, KJ4, KK4, KK5, KL5, KM5, KF5, KF4, KL4, KO2, KR4, KC4, KE4, \ KG2, KG7, KH7, KI7, KJ7, KJ2, KK2, KK7, KL7, KM7, KF7, KF2, KL2, KO3, KQ4, KC5, KE5, \ @@ -47,17 +47,32 @@ KB2, KG1, KH1, KI1, KJ1, KJ0, KK0, KK1, KL1, KM1, KF0, KB3, KC6, \ KP4, KN2, KN6, KQ6, KN0, KN3, KM0, KP1, KC0, KQ0, KR0 \ ) \ -{ \ -/* Columns and rows need to be swapped in the below definition */ \ -/* A B C D E F G H I J K L M N O P Q R */ \ -/* 0 */ { KC_NO, KC_NO, KC0, KC_NO, KC_NO, KF0, KC_NO, KC_NO, KC_NO, KJ0, KK0, KC_NO, KM0, KN0, KO0, KC_NO, KQ0, KR0 }, \ -/* 1 */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KG1, KH1, KI1, KJ1, KK1, KL1, KM1, KC_NO, KO1, KP1, KC_NO, KC_NO }, \ -/* 2 */ { KC_NO, KB2, KC_NO, KC_NO, KC_NO, KF2, KG2, KH2, KI2, KJ2, KK2, KL2, KM2, KN2, KO2, KC_NO, KC_NO, KC_NO }, \ -/* 3 */ { KC_NO, KB3, KC_NO, KC_NO, KC_NO, KF3, KG3, KH3, KI3, KJ3, KK3, KL3, KM3, KN3, KO3, KC_NO, KC_NO, KC_NO }, \ -/* 4 */ { KC_NO, KC_NO, KC4, KC_NO, KE4, KF4, KG4, KH4, KI4, KJ4, KK4, KL4, KM4, KC_NO, KO4, KP4, KQ4, KR4 }, \ -/* 5 */ { KC_NO, KC_NO, KC5, KC_NO, KE5, KF5, KG5, KH5, KI5, KJ5, KK5, KL5, KM5, KN5, KO5, KP5, KC_NO, KC_NO }, \ -/* 6 */ { KC_NO, KC_NO, KC6, KC_NO, KC_NO, KF6, KG6, KC_NO, KI6, KJ6, KK6, KL6, KC_NO,KN6, KO6, KC_NO, KQ6, KC_NO }, \ -/* 7 */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KF7, KG7, KH7, KI7, KJ7, KK7, KL7, KM7, KN7, KC_NO, KP7, KC_NO, KC_NO } \ -} +LAYOUT_all( \ + KG6, KH4, KI4, KI2, KI6, KP5, KL6, KM2, KM4, KO4, KO5, KO6, KO0, KN5, KN7, KP7, \ + KG4, KG5, KH5, KI5, KJ5, KJ4, KK4, KK5, KL5, KM5, KF5, KF4, KL4, KO2, KR4, KC4, KE4, \ + KG2, KG7, KH7, KI7, KJ7, KJ2, KK2, KK7, KL7, KM7, KF7, KF2, KL2, KO3, KQ4, KC5, KE5, \ + KH2, KG3, KH3, KI3, KJ3, KJ6, KK6, KK3, KL3, KM3, KF3, KF6, KO1, \ + KB2,KC_NO,KG1, KH1, KI1, KJ1, KJ0, KK0, KK1, KL1, KM1, KF0, KB3, KC6, \ + KP4, KN2, KN6, KQ6, KN0, KN3, KM0, KP1, KC0, KQ0, KR0 \ +) + +#define LAYOUT_tkl_iso( \ + KG6, KH4, KI4, KI2, KI6, KP5, KL6, KM2, KM4, KO4, KO5, KO6, KO0, KN5, KN7, KP7, \ + KG4, KG5, KH5, KI5, KJ5, KJ4, KK4, KK5, KL5, KM5, KF5, KF4, KL4, KO2, KR4, KC4, KE4, \ + KG2, KG7, KH7, KI7, KJ7, KJ2, KK2, KK7, KL7, KM7, KF7, KF2, KL2, KQ4, KC5, KE5, \ + KH2, KG3, KH3, KI3, KJ3, KJ6, KK6, KK3, KL3, KM3, KF3, KF6, KO3, KO1, \ + KB2, KH6, KG1, KH1, KI1, KJ1, KJ0, KK0, KK1, KL1, KM1, KF0, KB3, KC6, \ + KP4, KN2, KN6, KQ6, KN0, KN3, KM0, KP1, KC0, KQ0, KR0 \ +) \ +LAYOUT_all( \ + KG6, KH4, KI4, KI2, KI6, KP5, KL6, KM2, KM4, KO4, KO5, KO6, KO0, KN5, KN7, KP7, \ + KG4, KG5, KH5, KI5, KJ5, KJ4, KK4, KK5, KL5, KM5, KF5, KF4, KL4, KO2, KR4, KC4, KE4, \ + KG2, KG7, KH7, KI7, KJ7, KJ2, KK2, KK7, KL7, KM7, KF7, KF2, KL2, KO3, KQ4, KC5, KE5, \ + KH2, KG3, KH3, KI3, KJ3, KJ6, KK6, KK3, KL3, KM3, KF3, KF6, KO1, \ + KB2, KH6, KG1, KH1, KI1, KJ1, KJ0, KK0, KK1, KL1, KM1, KF0, KB3, KC6, \ + KP4, KN2, KN6, KQ6, KN0, KN3, KM0, KP1, KC0, KQ0, KR0 \ +) + +#define LAYOUT LAYOUT_all #endif From f418efcaf5d681e87bd23b4d28621b87ff61fcb9 Mon Sep 17 00:00:00 2001 From: Homerow Co <30292003+homerow-co@users.noreply.github.com> Date: Mon, 30 Sep 2019 03:49:59 +0200 Subject: [PATCH 004/316] [Keymap] correct keebs keymap for wonderland (#6838) --- .../wonderland/keymaps/keebs/keymap.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/keyboards/maartenwut/wonderland/keymaps/keebs/keymap.c b/keyboards/maartenwut/wonderland/keymaps/keebs/keymap.c index 437370bb731e..ceb98560613b 100755 --- a/keyboards/maartenwut/wonderland/keymaps/keebs/keymap.c +++ b/keyboards/maartenwut/wonderland/keymaps/keebs/keymap.c @@ -6,21 +6,18 @@ enum layers { }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BASE] = LAYOUT( KC_ESC, 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_DEL, KC_BSPC, \ KC_F10, 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, \ - RGB_HUI, 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_F11, 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_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), \ - KC_LCTL, KC_LAPO, KC_LGUI, RGUI(KC_SPC), KC_SPC, KC_RAPC, KC_RCTRL \ + KC_LCTL, KC_LAPO, KC_LGUI, RGUI(KC_SPC), KC_SPC, KC_RAPC, KC_RCTRL \ ), [_FUNC] = LAYOUT( - RGB_TOG, VLK_TOG, KC_F1,KC_F2,KC_F3,KC_F4,KC_F5,KC_F6,KC_F7,KC_F8,KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, RESET, \ -RGB_MODE_FORWARD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ -RGB_MODE_REVERSE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, \ - KC_LSFT, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX,KC_LEFT,KC_DOWN,KC_RIGHT,XXXXXXX, \ - KC_LCTL, KC_LALT, KC_BSPC, KC_LGUI, KC_SPC, KC_RALT, KC_RCTRL \ + RGB_TOG, VLK_TOG, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, RESET, \ + RGB_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ +RGB_RMOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, \ + KC_LSFT, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN,KC_RIGHT, XXXXXXX, \ + _______, KC_LALT, _______, _______, _______, KC_RALT, _______ \ ) }; - - From cffe671a61e8187b39a508556c7a5b5f04835d24 Mon Sep 17 00:00:00 2001 From: Jonas Avellana <14019120+ninjonas@users.noreply.github.com> Date: Mon, 30 Sep 2019 11:50:27 -0600 Subject: [PATCH 005/316] [Keymap] Updating crkbd RGB keymap implementation & ninjonas userspace updates (#6834) * [keymap] Updating crkbd RGB implementation & ninjonas userspace updates * [chore] adding process_record_oled method to process_records.h --- keyboards/crkbd/keymaps/ninjonas/README.md | 2 +- keyboards/crkbd/keymaps/ninjonas/config.h | 64 +++++++++++++++++--- keyboards/crkbd/keymaps/ninjonas/keymap.c | 10 +-- keyboards/crkbd/keymaps/ninjonas/rgb.c | 27 --------- keyboards/crkbd/keymaps/ninjonas/rules.mk | 6 +- keyboards/hotdox/keymaps/ninjonas/README.md | 2 +- keyboards/hotdox/keymaps/ninjonas/keymap.c | 12 ++-- keyboards/lily58/keymaps/ninjonas/README.md | 4 +- keyboards/lily58/keymaps/ninjonas/keymap.c | 8 +-- keyboards/pinky/3/keymaps/ninjonas/README.md | 2 +- keyboards/pinky/3/keymaps/ninjonas/keymap.c | 6 +- users/ninjonas/README.md | 25 +++++--- users/ninjonas/ninjonas.h | 3 - users/ninjonas/oled.c | 14 +++-- users/ninjonas/process_records.c | 10 ++- users/ninjonas/process_records.h | 14 +++-- 16 files changed, 115 insertions(+), 94 deletions(-) delete mode 100644 keyboards/crkbd/keymaps/ninjonas/rgb.c diff --git a/keyboards/crkbd/keymaps/ninjonas/README.md b/keyboards/crkbd/keymaps/ninjonas/README.md index 24889a221d58..4d7434fa7a6f 100644 --- a/keyboards/crkbd/keymaps/ninjonas/README.md +++ b/keyboards/crkbd/keymaps/ninjonas/README.md @@ -51,7 +51,7 @@ More information about the crkbd keyboard can be found [here](https://thomasbaar //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| // , , KC_BRID, Next, VolUp, , PgDn, Left, Down, Right, K_LOCK, //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| - // , , , Prev, VolDn, [, ], , , M_CODE, M_ZOOM, M_PYNV, + // , , , Prev, VolDn, [, ], , , M_CODE, M_XXX1, M_PYNV, //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| // , , , , , //`---------------------' `---------------------' diff --git a/keyboards/crkbd/keymaps/ninjonas/config.h b/keyboards/crkbd/keymaps/ninjonas/config.h index ef7ff6c5568a..5d214466231a 100644 --- a/keyboards/crkbd/keymaps/ninjonas/config.h +++ b/keyboards/crkbd/keymaps/ninjonas/config.h @@ -32,16 +32,60 @@ along with this program. If not, see . #define TAPPING_FORCE_HOLD -#ifdef RGBLIGHT_ENABLE - #undef RGBLED_NUM - #undef RGBLIGHT_ANIMATIONS // https://docs.qmk.fm/#/feature_rgblight?id=effect-and-animation-toggles - #define RGBLIGHT_EFFECT_BREATHING - #define RGBLIGHT_EFFECT_RAINBOW_SWIRL - #define RGBLED_NUM 27 - #define RGBLIGHT_LIMIT_VAL 120 - #define RGBLIGHT_HUE_STEP 10 - #define RGBLIGHT_SAT_STEP 17 - #define RGBLIGHT_VAL_STEP 17 +#ifdef RGB_MATRIX_ENABLE + #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 120 + #define RGB_MATRIX_HUE_STEP 10 + #define RGB_MATRIX_SAT_STEP 10 + #define RGB_MATRIX_VAL_STEP 10 + #define RGB_MATRIX_SPD_STEP 10 + // #define RGB_MATRIX_KEYPRESSES + #define RGB_MATRIX_FRAMEBUFFER_EFFECTS + + // BEGIN: Disable RGB Effects + //#define DISABLE_RGB_MATRIX_SOLID_COLOR + //#define DISABLE_RGB_MATRIX_ALPHAS_MODS + //#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN + #define DISABLE_RGB_MATRIX_BREATHING + #define DISABLE_RGB_MATRIX_BAND_SAT + #define DISABLE_RGB_MATRIX_BAND_VAL + // #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT + #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL + #define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT + #define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL + #define DISABLE_RGB_MATRIX_CYCLE_ALL + #define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT + #define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN + #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN + #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL + #define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON + #define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL + #define DISABLE_RGB_MATRIX_CYCLE_SPIRAL + #define DISABLE_RGB_MATRIX_DUAL_BEACON + #define DISABLE_RGB_MATRIX_RAINBOW_BEACON + #define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS + #define DISABLE_RGB_MATRIX_RAINDROPS + #define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS + + // BEGIN: RGB_MATRIX_FRAMEBUFFER_EFFECTS + #define DISABLE_RGB_MATRIX_TYPING_HEATMAP + // #define DISABLE_RGB_MATRIX_DIGITAL_RAIN + // END: RGB_MATRIX_FRAMEBUFFER_EFFECTS + + // BEGIN: RGB_MATRIX_KEYPRESSES + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS + #define DISABLE_RGB_MATRIX_SPLASH + #define DISABLE_RGB_MATRIX_MULTISPLASH + #define DISABLE_RGB_MATRIX_SOLID_SPLASH + #define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH + // END: RGB_MATRIX_KEYPRESSES + // END: Disable RGB Effects #endif #define OLED_FONT_H "keyboards/crkbd/lib/glcdfont.c" diff --git a/keyboards/crkbd/keymaps/ninjonas/keymap.c b/keyboards/crkbd/keymaps/ninjonas/keymap.c index 6d19345c44e8..21f83cc78e63 100644 --- a/keyboards/crkbd/keymaps/ninjonas/keymap.c +++ b/keyboards/crkbd/keymaps/ninjonas/keymap.c @@ -40,11 +40,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_LOWER] = LAYOUT_wrapper( //,----------------------------------------------------. ,----------------------------------------------------. - XXXXXXX, XXXXXXX, _________MEDIA_1_________, K_CSCN, _______________NAV_1______________, XXXXXXX, K_MDSH, + M_XXX2, M_XXX3, _________MEDIA_1_________, K_CSCN, _______________NAV_1______________, XXXXXXX, K_MDSH, //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| - XXXXXXX, XXXXXXX, _________MEDIA_2_________, XXXXXXX, _______________NAV_2______________, K_LOCK, XXXXXXX, + M_XXX4, M_XXX5, _________MEDIA_2_________, XXXXXXX, _______________NAV_2______________, K_LOCK, XXXXXXX, //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| - _______, M_SHFT, _________MEDIA_3_________, T_LBRC, T_RBRC, _______, XXXXXXX, M_CODE, M_ZOOM, M_PYNV, + KC_LSFT, M_SHFT, _________MEDIA_3_________, T_LBRC, T_RBRC, KC_M, XXXXXXX, M_CODE, M_XXX1, M_PYNV, //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| _______,_______,_______, _______,_______,_______ //`---------------------' `---------------------' @@ -66,9 +66,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //,----------------------------------------------------. ,----------------------------------------------------. M_MAKE, EEP_RST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, XXXXXXX, XXXXXXX, COLEMAK, DVORAK, QWERTY, //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| - M_VRSN, M_MALL, XXXXXXX, RGB_SAI, RGB_HUI, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + M_VRSN, M_MALL, RGB_SPI, RGB_SAI, RGB_HUI, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| - M_FLSH, XXXXXXX, XXXXXXX, RGB_SAD, RGB_HUD, RGB_VAD, RGB_M_P, RGB_M_B,RGB_M_SW, XXXXXXX, XXXXXXX, XXXXXXX, + M_FLSH, XXXXXXX, RGB_SPD, RGB_SAD, RGB_HUD, RGB_VAD, RGB_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| _______,_______,_______, _______,_______,_______ //`---------------------' `---------------------' diff --git a/keyboards/crkbd/keymaps/ninjonas/rgb.c b/keyboards/crkbd/keymaps/ninjonas/rgb.c deleted file mode 100644 index f9ac3a861097..000000000000 --- a/keyboards/crkbd/keymaps/ninjonas/rgb.c +++ /dev/null @@ -1,27 +0,0 @@ -#include QMK_KEYBOARD_H - -extern keymap_config_t keymap_config; - -#ifdef RGBLIGHT_ENABLE -//Following line allows macro to read current RGB settings -extern rgblight_config_t rgblight_config; -#endif - -extern uint8_t is_master; - -int RGB_current_mode; - -// Setting ADJUST layer RGB back to default -void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { - if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) { - layer_on(layer3); - } else { - layer_off(layer3); - } -} - -void keyboard_post_init_user(void) { - #ifdef RGBLIGHT_ENABLE - RGB_current_mode = rgblight_config.mode; - #endif -} \ No newline at end of file diff --git a/keyboards/crkbd/keymaps/ninjonas/rules.mk b/keyboards/crkbd/keymaps/ninjonas/rules.mk index 92e18ed6e2aa..95cc3fed367d 100644 --- a/keyboards/crkbd/keymaps/ninjonas/rules.mk +++ b/keyboards/crkbd/keymaps/ninjonas/rules.mk @@ -1,11 +1,7 @@ -RGBLIGHT_ENABLE = yes +RGB_MATRIX_ENABLE = WS2812 MOUSEKEY_ENABLE = no OLED_DRIVER_ENABLE = yes LINK_TIME_OPTIMIZATION_ENABLE = yes # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -# If you want to change the display of OLED, you need to change here -SRC += ./lib/rgb_state_reader.c \ - rgb.c diff --git a/keyboards/hotdox/keymaps/ninjonas/README.md b/keyboards/hotdox/keymaps/ninjonas/README.md index b289651a8dae..5cbfacf9f5a8 100644 --- a/keyboards/hotdox/keymaps/ninjonas/README.md +++ b/keyboards/hotdox/keymaps/ninjonas/README.md @@ -43,7 +43,7 @@ This keymap is designed based off my typing habits and is subject to change. Inf * |--------+------+------+------+------+------| [ | | ] |------+------+------+------+------+--------| * | LShift | Z | X | C | V | B | | | | N | M | , | . | / | = | * `--------+------+------+------+------+-------------' `--------------+------+------+------+------+--------' - * |M_SHFT| | Alt |  | Ctl | | BkSP | Del |LOWER |M_ZOOM|M_PYNV| + * |M_SHFT| | Alt |  | Ctl | | BkSP | Del |LOWER |M_XXX1|M_PYNV| * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. * | Up | Down | | Left | Right| diff --git a/keyboards/hotdox/keymaps/ninjonas/keymap.c b/keyboards/hotdox/keymaps/ninjonas/keymap.c index 248a4320a147..7a505b4e1be1 100644 --- a/keyboards/hotdox/keymaps/ninjonas/keymap.c +++ b/keyboards/hotdox/keymaps/ninjonas/keymap.c @@ -28,7 +28,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| [ | | ] |------+------+------+------+------+--------| * | LShift | Z | X | C | V | B | | | | N | M | , | . | / | = | * `--------+------+------+------+------+-------------' `--------------+------+------+------+------+--------' - * |M_SHFT| | Alt |  | Ctl | | BkSP | Del |LOWER |M_ZOOM|M_PYNV| + * |M_SHFT| | Alt |  | Ctl | | BkSP | Del |LOWER |M_XXX1|M_PYNV| * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. * | Up | Down | | Left | Right| @@ -56,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_NO, _____________________QWERTY_R1______________________, _____________________QWERTY_R2______________________, T_RBRC, _____________________QWERTY_R3______________________, - ________MOD_RIGHT________, M_ZOOM, M_PYNV, + ________MOD_RIGHT________, M_XXX1, M_PYNV, // RIGHT THUMB KC_LEFT, KC_RGHT, KC_PGUP, @@ -75,7 +75,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| [ | | ] |------+------+------+------+------+--------| * | LShift | ; | Q | J | K | X | | | | B | M | W | V | Z | = | * `--------+------+------+------+------+-------------' `--------------+------+------+------+------+--------' - * |M_SHFT| | Alt |  | Ctl | | BkSP | Del |LOWER |M_ZOOM|M_PYNV| + * |M_SHFT| | Alt |  | Ctl | | BkSP | Del |LOWER |M_XXX1|M_PYNV| * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. * | Up | Down | | Left | Right| @@ -103,7 +103,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_NO, _____________________DVORAK_R1______________________, _____________________DVORAK_R2______________________, T_RBRC, _____________________DVORAK_R3______________________, - ________MOD_RIGHT________, M_ZOOM, M_PYNV, + ________MOD_RIGHT________, M_XXX1, M_PYNV, // RIGHT THUMB KC_LEFT, KC_RGHT, KC_PGUP, @@ -122,7 +122,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| [ | | ] |------+------+------+------+------+--------| * | LShift | Z | X | C | V | B | | | | K | M | , | . | / | = | * `--------+------+------+------+------+-------------' `--------------+------+------+------+------+--------' - * |M_SHFT| | Alt |  | Ctl | | BkSP | Del |LOWER |M_ZOOM|M_PYNV| + * |M_SHFT| | Alt |  | Ctl | | BkSP | Del |LOWER |M_XXX1|M_PYNV| * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. * | Up | Down | | Left | Right| @@ -150,7 +150,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_NO, _____________________COLEMAK_R1_____________________, _____________________COLEMAK_R2_____________________, T_RBRC, _____________________COLEMAK_R3_____________________, - ________MOD_RIGHT________, M_ZOOM, M_PYNV, + ________MOD_RIGHT________, M_XXX1, M_PYNV, // RIGHT THUMB KC_LEFT, KC_RGHT, KC_PGUP, diff --git a/keyboards/lily58/keymaps/ninjonas/README.md b/keyboards/lily58/keymaps/ninjonas/README.md index ef6322db4dde..862252840045 100644 --- a/keyboards/lily58/keymaps/ninjonas/README.md +++ b/keyboards/lily58/keymaps/ninjonas/README.md @@ -3,8 +3,6 @@ ## Keymap This keymap is designed based off my typing habits and is subject to change. Information about custom user macros and tap dances can be found [here](../../../../users/ninjonas). -> Make sure you update QMK's lily58 config.h TAPPING_TERM to 200ms or this won't compile - More information about the Lily58 pro keyboard can be found [here](https://yuchi-kbd.hatenablog.com/entry/2018/12/23/214342) ### QWERTY @@ -71,7 +69,7 @@ More information about the Lily58 pro keyboard can be found [here](https://yuchi * |------+------+------+-------+------+------| |------+------+------+------+-------+------| * | | |KC_BRID| Next |VolUp | |-------. ,-------| PgDn | Left | Down |Right |K_LOCK | | * |------+------+------+-------+------+------| | | |------+------+------+------+-------+------| - * |M_SHFT| | | Prev |VolDn | |-------| |-------| | | | |M_ZOOM |M_PYNV| + * |M_SHFT| | | Prev |VolDn | |-------| |-------| | | | | |M_PYNV| * `------------------------------------------/ / \ \------------------------------------------' * | | | | / / \ \ | |M_CODE| | * | | | |/ / \ \ | | | | diff --git a/keyboards/lily58/keymaps/ninjonas/keymap.c b/keyboards/lily58/keymaps/ninjonas/keymap.c index 5ef607564e84..6c6a41b3b7a6 100644 --- a/keyboards/lily58/keymaps/ninjonas/keymap.c +++ b/keyboards/lily58/keymaps/ninjonas/keymap.c @@ -92,7 +92,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+-------+------+------| |------+------+------+------+-------+------| * | | |KC_BRID| Next |VolUp | |-------. ,-------| PgDn | Left | Down |Right |K_LOCK | | * |------+------+------+-------+------+------| | | |------+------+------+------+-------+------| - * |M_SHFT| | | Prev |VolDn | |-------| |-------| | | | |M_ZOOM |M_PYNV| + * | |M_SHFT| | Prev |VolDn | |-------| |-------| | M | | | |M_PYNV| * `------------------------------------------/ / \ \------------------------------------------' * | | | | / / \ \ | |M_CODE| | * | | | |/ / \ \ | | | | @@ -100,9 +100,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_LOWER] = LAYOUT_wrapper( \ _____________________FUNC_LEFT______________________, _____________________FUNC_RIGHT_____________________, \ - _______, _______, _________MEDIA_1_________, _______, _______________NAV_1______________, _______, K_MDSH, \ - _______, _______, _________MEDIA_2_________, _______, _______________NAV_2______________, K_LOCK, _______, \ - M_SHFT, _______, _________MEDIA_3_________, _______, _______, _______, _______, _______, _______, _______, M_ZOOM, M_PYNV, \ + M_XXX2, M_XXX3, _________MEDIA_1_________, _______, _______________NAV_1______________, _______, K_MDSH, \ + M_XXX4, M_XXX5, _________MEDIA_2_________, _______, _______________NAV_2______________, K_LOCK, _______, \ + _______, M_SHFT, _________MEDIA_3_________, _______, _______, _______, _______, KC_M, _______, _______, M_XXX1, M_PYNV, \ __________________________________, _______, _______, M_CODE, _______ \ ), diff --git a/keyboards/pinky/3/keymaps/ninjonas/README.md b/keyboards/pinky/3/keymaps/ninjonas/README.md index 4546b164c770..d47fdd995bb2 100644 --- a/keyboards/pinky/3/keymaps/ninjonas/README.md +++ b/keyboards/pinky/3/keymaps/ninjonas/README.md @@ -58,7 +58,7 @@ More information about the Pinky3 keyboard can be found [here](https://github.co |---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| | | | | BriDn| Next| VolUp| | | | PgDn| Left| Down| Right| K_LOCK| | |---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| -| M_SHFT| | | | Prev| VolDn| | | | | | | | M_ZOOM| M_PYNV| +| M_SHFT| | | | Prev| VolDn| | | | | | | | | M_PYNV| `---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------' | | | | | | | | M_CODE| | `---------------------------------------' `---------------------------------------' diff --git a/keyboards/pinky/3/keymaps/ninjonas/keymap.c b/keyboards/pinky/3/keymaps/ninjonas/keymap.c index d2cca166576d..b7d9f2fa7563 100644 --- a/keyboards/pinky/3/keymaps/ninjonas/keymap.c +++ b/keyboards/pinky/3/keymaps/ninjonas/keymap.c @@ -61,11 +61,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_LOWER] = LAYOUT_wrapper( //,---------------------------------------------------------------------. ,---------------------------------------------------------------------. - XXXXXXX, XXXXXXX, _________MEDIA_1_________, XXXXXXX, K_CSCN, XXXXXXX, _______________NAV_1______________, XXXXXXX, K_MDSH, + M_XXX2, M_XXX3, _________MEDIA_1_________, XXXXXXX, K_CSCN, XXXXXXX, _______________NAV_1______________, XXXXXXX, K_MDSH, //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| - XXXXXXX, XXXXXXX, _________MEDIA_2_________, XXXXXXX, XXXXXXX, XXXXXXX, _______________NAV_2______________, K_LOCK, XXXXXXX, + M_XXX4, M_XXX5, _________MEDIA_2_________, XXXXXXX, XXXXXXX, XXXXXXX, _______________NAV_2______________, K_LOCK, XXXXXXX, //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| - M_SHFT, XXXXXXX, _________MEDIA_3_________, XXXXXXX, _______, _______, XXXXXXX, _______, XXXXXXX, XXXXXXX, M_ZOOM, M_PYNV, + XXXXXXX, M_SHFT, _________MEDIA_3_________, XXXXXXX, _______, _______, XXXXXXX, KC_M, XXXXXXX, XXXXXXX, M_XXX1, M_PYNV, //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| __________________________________, _______, _______, M_CODE, _______ //`---------------------------------------' `---------------------------------------' diff --git a/users/ninjonas/README.md b/users/ninjonas/README.md index fb14bfe6c26c..32ccdc699f72 100644 --- a/users/ninjonas/README.md +++ b/users/ninjonas/README.md @@ -16,7 +16,7 @@ See: https://docs.qmk.fm/#/feature_userspace - [Lily58](../../keyboards/lily58/keymaps/ninjonas) ## Features -### [Keys](ninjonas.h#L40) +### [Keys](ninjonas.h#L37) |Code | Description | |---|---| |K_LOCK | MacOS shortcut to execute lock command  + ctrl + Q | @@ -25,7 +25,7 @@ See: https://docs.qmk.fm/#/feature_userspace |K_RAPP | MacOS shortcut to switch apps to the right | |K_LAPP | MacOS shortcut to switch apps to the left | -### [Layers](ninjonas.h#L47) +### [Layers](ninjonas.h#L44) |Code | Description | |---|---| |LT_LOW | Tap for ENTER, hold for RAISE | @@ -34,7 +34,7 @@ See: https://docs.qmk.fm/#/feature_userspace |LM_LOW | Dedicated key to momentarily toggle to use LOWER layer | |LM_RAI | Dedicated key to momentarily toggle to use RAISE layer | -### [Layout Blocks](ninjonas.h#L53) +### [Layout Blocks](ninjonas.h#L50) Predefined keyboard layout templates to speed up configuring split keyboards |Code | Description | @@ -59,6 +59,7 @@ Predefined keyboard layout templates to speed up configuring split keyboards |M_VRSN | macro to send QMK version | |M_SHFT | Sends  + alt + shift to a keycode to activate [ShiftIt](/~https://github.com/fikovnik/ShiftIt) | |M_CODE | Opens [Visual Studio Code](https://code.visualstudio.com/) on current directory | +|M_XXX1 to M_XXX5 | Reserved for secret macros see [Secrets](#secrets) | ### [Tap-Dance](tap_dances.h) |Code | Description | @@ -73,21 +74,29 @@ Predefined keyboard layout templates to speed up configuring split keyboards |T_Q | Tap for Q, double tap for  + Q | ### Secrets -There's times where you have macros you don't want to share like emails, passwords 😱, & and private strings. Based off [drashna's secret macros](/~https://github.com/qmk/qmk_firmware/blob/master/users/drashna/readme_secrets.md), it's now possible to do this. All you need to do is create a `secrets.c` file. Below is an example of how this is used. +There's times where you have macros you don't want to share like emails, an address you need but you always forget, passwords 😱, & and private strings. Based off [drashna's secret macros](/~https://github.com/qmk/qmk_firmware/blob/master/users/drashna/readme_secrets.md), it's now possible to do this. All you need to do is create a `secrets.c` file. Below is an example of how this is used. ```c // secrets.c -#include "ninjonas.h" +#include "ninjonas.h" + +static const char * const secret[] = { + "BLANK1", + "BLANK2", + "BLANK3", + "BLANK4", + "BLANK5" +}; bool process_record_secrets(uint16_t keycode, keyrecord_t *record) { switch (keycode) { - // Sends zoom URL - case M_ZOOM: + case M_XXX1...M_XXX5: if (record->event.pressed) { - SEND_STRING("SECRET_STRING_HERE" SS_TAP(X_ENTER)); + send_string(secret[keycode - M_XXX1]); } break; } return true; } + ``` \ No newline at end of file diff --git a/users/ninjonas/ninjonas.h b/users/ninjonas/ninjonas.h index 227534c25945..fdba683702f4 100644 --- a/users/ninjonas/ninjonas.h +++ b/users/ninjonas/ninjonas.h @@ -26,9 +26,6 @@ #include "lufa.h" #include "split_util.h" #endif -#ifdef SSD1306OLED - #include "ssd1306.h" -#endif #define _QWERTY 0 #define _DVORAK 1 diff --git a/users/ninjonas/oled.c b/users/ninjonas/oled.c index 837d497ab304..8a9c9959366f 100644 --- a/users/ninjonas/oled.c +++ b/users/ninjonas/oled.c @@ -7,10 +7,10 @@ static uint16_t oled_timer = 0; extern uint8_t is_master; -bool process_record_oled(uint16_t keycode, keyrecord_t *record) { +bool process_record_oled(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { oled_timer = timer_read(); - } + } return true; } @@ -48,6 +48,7 @@ void render_mod_status(uint8_t modifiers) { void render_status(void){ render_default_layer_state(); + oled_write_P(PSTR("\n"), false); render_layer_state(); render_mod_status(get_mods()|get_oneshot_mods()); } @@ -70,12 +71,13 @@ void oled_task_user(void) { #ifndef SPLIT_KEYBOARD else { oled_on(); } #endif - + if (is_master) { - render_status(); + render_status(); } else { - render_logo(); - oled_scroll_left(); + oled_write_P(PSTR("\n"), false); + render_logo(); + oled_scroll_left(); } } diff --git a/users/ninjonas/process_records.c b/users/ninjonas/process_records.c index e1960aaa3e57..6ec5be597882 100644 --- a/users/ninjonas/process_records.c +++ b/users/ninjonas/process_records.c @@ -12,18 +12,16 @@ bool process_record_oled(uint16_t keycode, keyrecord_t *record) { return true; } #endif bool process_record_user(uint16_t keycode, keyrecord_t *record) { - if (record->event.pressed) { - #ifdef OLED_DRIVER_ENABLE - process_record_oled(keycode, record); - #endif - } + #ifdef OLED_DRIVER_ENABLE + process_record_oled(keycode, record); + #endif switch (keycode) { // Sends pyenv to activate 'jira' environment case M_PYNV: if (record->event.pressed) { - SEND_STRING("pyenv activate jira" SS_TAP(X_ENTER)); + SEND_STRING("pyenv activate jira\n"); } break; diff --git a/users/ninjonas/process_records.h b/users/ninjonas/process_records.h index 37d88d0cad00..07babdd58325 100644 --- a/users/ninjonas/process_records.h +++ b/users/ninjonas/process_records.h @@ -7,7 +7,6 @@ enum custom_keycodes { DVORAK, COLEMAK, // Custom Macros - M_ZOOM, M_PYNV, M_SHFT, M_MAKE, @@ -15,11 +14,16 @@ enum custom_keycodes { M_FLSH, M_VRSN, M_CODE, + // Secret Macros + M_XXX1, + M_XXX2, + M_XXX3, + M_XXX4, + M_XXX5, }; -#ifdef SSD1306OLED -void set_keylog(uint16_t keycode, keyrecord_t *record); -#endif - bool process_record_secrets(uint16_t keycode, keyrecord_t *record); bool process_record_keymap(uint16_t keycode, keyrecord_t *record); +#ifdef OLED_DRIVER_ENABLE +bool process_record_oled(uint16_t keycode, keyrecord_t *record); +#endif From 8c1b8cf3a39773e9b89158f4ff49effcabe729d8 Mon Sep 17 00:00:00 2001 From: Jordan Egstad Date: Mon, 30 Sep 2019 10:55:02 -0700 Subject: [PATCH 006/316] [Keymap] Adds Egstad Preonic Profile (#6837) * setup local build config, created npm build script to speed things up * removed some profiles and gutted readme * began configuring default and lower layout * lower: fixed right arrow and added music toggle * began configuring default and lower layout * changed startup song * updated comment typos * I did that thing where i basically refactored everything :) * Converted 2U key to 1U's * Reorganized and tidied up * Reorganized and tidied up * space now changes layers * updated numbpad * updated readme * removed unwanted files * addressed change requests --- keyboards/preonic/keymaps/egstad/config.h | 91 ++++++++ keyboards/preonic/keymaps/egstad/keymap.c | 229 +++++++++++++++++++++ keyboards/preonic/keymaps/egstad/readme.md | 11 + keyboards/preonic/keymaps/egstad/rules.mk | 3 + 4 files changed, 334 insertions(+) create mode 100644 keyboards/preonic/keymaps/egstad/config.h create mode 100644 keyboards/preonic/keymaps/egstad/keymap.c create mode 100644 keyboards/preonic/keymaps/egstad/readme.md create mode 100644 keyboards/preonic/keymaps/egstad/rules.mk diff --git a/keyboards/preonic/keymaps/egstad/config.h b/keyboards/preonic/keymaps/egstad/config.h new file mode 100644 index 000000000000..e66743f45853 --- /dev/null +++ b/keyboards/preonic/keymaps/egstad/config.h @@ -0,0 +1,91 @@ +#pragma once +#define TAPPING_TERM 200 +#define IGNORE_MOD_TAP_INTERRUPT + + + + + +/* Leader Key + ========================================================================== */ + +// Activates the leader key +// #define LEADER_PER_KEY_TIMING +// resets the timeout after each key is tapped +// #define LEADER_TIMEOUT 240 + + + + + + +/* Autoshifting + ========================================================================== */ + +// This controls how long you have to hold a key before you get the shifted state. +#define AUTO_SHIFT_TIMEOUT 150 + +// Do not Auto Shift special keys -_, =+, [{, ]}, ;:, '", ,<, .>, and /? +// #define NO_AUTO_SHIFT_SPECIAL + +// Do not Auto Shift numeric keys, zero through nine. +#define NO_AUTO_SHIFT_NUMERIC + +// Do not Auto Shift alpha characters, which include A through Z. +// #define NO_AUTO_SHIFT_ALPHA + +// Lower the Auto Shift timeout variable (down) +// KC_ASDN + +// Raise the Auto Shift timeout variable (up) +// KC_ASUP + +// Report your current Auto Shift timeout value +// KC_ASRP + +// Turns on the Auto Shift Function +// KC_ASON + +// Turns off the Auto Shift Function +// KC_ASOFF + +// Toggles the state of the Auto Shift feature +// KC_ASTG + + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(COIN_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +#endif + +#define MUSIC_MASK (keycode != KC_NO) + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ + +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + diff --git a/keyboards/preonic/keymaps/egstad/keymap.c b/keyboards/preonic/keymaps/egstad/keymap.c new file mode 100644 index 000000000000..07eda6614476 --- /dev/null +++ b/keyboards/preonic/keymaps/egstad/keymap.c @@ -0,0 +1,229 @@ +#include QMK_KEYBOARD_H + + + + + + +/* LAYER NAMES + ========================================================================== + 1. To create a layer, define a (readable) name and set layer value + 2. Under "Layer definitions" section, define keymaps + ========================================================================== */ + +enum layer_names { + L_QWERTY, + L_LOWER, + L_RAISE, + L_ADJUST, +}; + + + + +/* TAP DANCE + ========================================================================== + 1. Define TD names here + 2. Register action in tap_dance_actions[] + ========================================================================== */ + +enum { + TD_BRC = 0, + TD_MIN, + TD_GV_ESC, + TD_BS +}; + + + + +/* CUSTOM KEYMAPS + ========================================================================== */ + +// Tap dances +#define TD_ESCP TD(TD_GV_ESC) // Tap for grave, twice for escape +#define TD_MINS TD(TD_MIN) // Tap for minus, twice for equal +#define TD_BRAC TD(TD_BRC) // Tap for open brace, twice for close + +// Layers +#define LT2_TAB LT(L_RAISE, KC_TAB) // Tap for tab, hold for RAISE +#define LT2_ENT LT(L_RAISE, KC_ENT) // Tap for enter, hold for RAISE +#define LT1_BSP LT(L_LOWER, KC_BSPACE) // Tap for backspace, hold for LOWER +#define LT1_SPC LT(L_LOWER, KC_SPC) // Tap for space, hold for LOWER + +// Modifiers +#define LG_ZMIN LGUI(KC_EQUAL) // Command + plus (zoom in) +#define LG_ZMOT LGUI(KC_MINUS) // Command + minus (zoom out) +#define MT_SHFT MT(MOD_RSFT, KC_ENT) // Tap for enter, hold for shift +#define MT_HILF S(A(KC_LEFT)) // Press for shift + alt + left +#define MT_HIRT S(A(KC_RGHT)) // Press for shift + alt + right +#define MT_UNTB S(KC_TAB) // Press for shift + tab + + + + + + +/* Layer definitions + ========================================================================== */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* QWERTY + * ,-----------------------------------------------------------------------------------------------. + * | ` ESC | 1 ! | 2 @ | 3 # | 4 $ | 5 % | 6 ^ | 7 & | 8 * | 9 ( | 0 ) | -_ =+ | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | TB/RS | Q | W | E | R | T | Y | U | I | O | P | [{ }] | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | BS/LW | A | S | D | F | G | H | J | K | L | ; | ' | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | SFT | Z | X | C | V | B | N | M | , | . | / | SF/RN | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | LEADR | | CTL | ALT | CMD | BSP | SP/LW | RN/RS | ← | ↑ | ↓ | → | + * `----------------------------------------------------------------------------------------------- + */ + +[L_QWERTY] = LAYOUT_preonic_grid( +/*01 02 03 04 05 06 07 08 09 10 11 12 */ + TD_ESCP, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, TD_MINS, \ + LT2_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, TD_BRAC, \ + LT1_BSP, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT_SHFT, \ + LG_ZMOT, LG_ZMIN, KC_LCTL, KC_LALT, KC_LGUI, KC_BSPACE, LT1_SPC, LT2_ENT, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT \ +), + + + + + + + /* LOWER + * ,-----------------------------------------------------------------------------------------------. + * | ASHFT | | | | | | | | | | | BSP | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | UNTAB | | | | | | | - | + | * | / | | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | | S+A+← | S+A+→ | | | | | ← | ↑ | ↓ | → | RTN | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | | | | | | | | [ { | ] } | ( | ) | \ | | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | | | | | | | >|| | | << | Vol-U | Vol-D | >> | + * `-----------------------------------------------------------------------------------------------' + */ + +[L_LOWER] = LAYOUT_preonic_grid( +/*01 02 03 04 05 06 07 08 09 10 11 12 */ + KC_ASTG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BSPACE, \ + MT_UNTB, _______, _______, _______, _______, _______, _______, KC_MINUS, KC_PLUS, KC_PAST, KC_PSLS, _______, \ + _______, MT_HILF, MT_HIRT, _______, _______, _______, _______, KC_LEFT, KC_UP, KC_DOWN, KC_RIGHT, KC_ENTER, \ + _______, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, KC_BSLASH, \ + _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MRWD, KC_VOLU, KC_VOLD, KC_MFFD \ +), + + + + + + +/* RAISE + * ,-----------------------------------------------------------------------------------------------. + * | ASHFT | BTSDN | BTSUP | VUP | VDN | | | / | * | ( | ) | | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | | | | | | | | 7 | 8 | 9 | + | | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | | | | | | | | 4 | 5 | 6 | - | | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | CAP | | | | | | | 1 | 2 | 3 | / | | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | | | | | | | | | 0 | . | , | | + * `-----------------------------------------------------------------------------------------------' + */ +[L_RAISE] = LAYOUT_preonic_grid( +/*01 02 03 04 05 06 07 08 09 10 11 12 */ + KC_ASTG, KC_F1, KC_F2, KC_VOLU, KC_VOLD, _______, _______, KC_PSLS, KC_PAST, KC_LPRN, KC_RPRN, _______, \ + _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PLUS, _______, \ + _______, _______, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, KC_MINUS, _______, \ + KC_CAPS, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PSLS, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_COMM, _______ \ +), + + + + + + + +/* Adjust (Raise + Lower together) + * ,-----------------------------------------------------------------------------------------------. + * | F12 | FN2 | FN3 | FN4 | FN5 | FN6 | FN7 | FN8 | FN9 | F10 | F11 | FN1 | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | | | | | | | | | | | | | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | | | | | | | | | | | | | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | TOG SF| | | | | | | | | | | | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | DESGN | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------------------' + */ + +[L_ADJUST] = LAYOUT_preonic_grid( +/*01 02 03 04 05 06 07 08 09 10 11 12 */ + KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_ASTG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +) + +}; + +// this function +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, L_LOWER, L_RAISE, L_ADJUST); +} + + + + + + +/* BLANK + * ,-----------------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | | | | | | | | | | | | | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | | | | | | | | | | | | | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | | | | | | | | | | | | | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------------------' + */ +/* +[L_BLANK] = LAYOUT_preonic_grid( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +), +*/ + + + + + + +/* Tap Dance Definitions + ========================================================================== */ + +qk_tap_dance_action_t tap_dance_actions[] = { + // Tap once for Left Brace, twice for Right Brace + [TD_BRC] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, KC_RBRC), + //Tap once for Minus, twice for Equal + [TD_MIN] = ACTION_TAP_DANCE_DOUBLE(KC_MINUS, KC_EQUAL), + // Tap once for Grave, tap twice for Escape + [TD_GV_ESC] = ACTION_TAP_DANCE_DOUBLE(KC_GRAVE, KC_ESCAPE) +}; diff --git a/keyboards/preonic/keymaps/egstad/readme.md b/keyboards/preonic/keymaps/egstad/readme.md new file mode 100644 index 000000000000..2c8e095a4e72 --- /dev/null +++ b/keyboards/preonic/keymaps/egstad/readme.md @@ -0,0 +1,11 @@ +# Egstad's Layout + +## Build + +- Cd into this directory, run `npm start` +- Cd into root with `npm run qmk`, locate bin file "preonic_rev3_egstad.bin" +- Drop that bin into QMK Toolbox and flash Keeb + +## Learnings + + 1. Combos — Don't fuck with 'em. They made my keys feel sticky and increased typos. Would be great on macropad or something tho! diff --git a/keyboards/preonic/keymaps/egstad/rules.mk b/keyboards/preonic/keymaps/egstad/rules.mk new file mode 100644 index 000000000000..5348bfdf9464 --- /dev/null +++ b/keyboards/preonic/keymaps/egstad/rules.mk @@ -0,0 +1,3 @@ +SRC += muse.c +TAP_DANCE_ENABLE = yes +AUTO_SHIFT_ENABLE = yes From c6c7aec85dcdccf48fc968e18c1dd8a288540b38 Mon Sep 17 00:00:00 2001 From: kakunpc <15257475+kakunpc@users.noreply.github.com> Date: Tue, 1 Oct 2019 02:57:01 +0900 Subject: [PATCH 007/316] [Keymap] update hecomi/kakunpc keymap (#6839) * update hecomi alpha/kakunpc keymap * remove unused define. --- keyboards/hecomi/keymaps/kakunpc/keymap.c | 42 ++++------------------- 1 file changed, 6 insertions(+), 36 deletions(-) diff --git a/keyboards/hecomi/keymaps/kakunpc/keymap.c b/keyboards/hecomi/keymaps/kakunpc/keymap.c index d73bcd03f256..614035de2358 100644 --- a/keyboards/hecomi/keymaps/kakunpc/keymap.c +++ b/keyboards/hecomi/keymaps/kakunpc/keymap.c @@ -16,28 +16,16 @@ */ #include QMK_KEYBOARD_H -// Defines the keycodes used by our macros in process_record_user -enum custom_keycodes { - QMKBEST = SAFE_RANGE, - QMKURL -}; - -//R1:7 + 8 = 15 -//R2:7 + 8 = 15 -//R3:6 + 7 = 13 -//R4:6 + 8 = 14 -//R5:6 + 6 = 12 -//total : 69 keys -// enum layers{ DF, LW, FN }; -#define KC_FN MO(FN) + +#define LT_F13 LT(FN, KC_F13) +#define LT_F14 LT(FN, KC_F14) #define KC_LW MO(LW) -#define KC_SFT(XXX) LSFT(XXX) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [DF]=LAYOUT(\ @@ -45,10 +33,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB ,KC_Q,KC_W,KC_E,KC_R,KC_T,KC_Y, KC_Y,KC_U,KC_I,KC_O,KC_P,KC_LBRC,KC_RBRC,KC_BSLS, KC_LCTRL ,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_B,KC_N,KC_M,KC_COMM,KC_DOT,KC_SLSH,KC_RSFT,KC_DEL, - KC_LGUI,KC_NO,KC_LALT,KC_LW,KC_FN,KC_SPC, KC_SPC,KC_FN,KC_LEFT,KC_UP,KC_DOWN,KC_RIGHT + KC_LGUI,KC_NO,KC_LALT,KC_LW,LT_F13,KC_SPC, KC_SPC,LT_F14,KC_LEFT,KC_UP,KC_DOWN,KC_RIGHT ), [LW]=LAYOUT(\ - KC_NO,KC_NO,RGB_VAD,RGB_VAI,RGB_HUI,RGB_HUD,KC_TRNS, RGB_MOD,RGB_RMOD,KC_TRNS,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, + RGB_TOG,KC_NO,RGB_VAD,RGB_VAI,RGB_HUI,RGB_HUD,KC_TRNS, RGB_MOD,RGB_RMOD,KC_TRNS,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, KC_NO ,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, @@ -64,29 +52,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QMKBEST: - if (record->event.pressed) { - // when keycode QMKBEST is pressed - SEND_STRING("QMK is the best thing ever!"); - } else { - // when keycode QMKBEST is released - } - break; - case QMKURL: - if (record->event.pressed) { - // when keycode QMKURL is pressed - SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); - } else { - // when keycode QMKURL is released - } - break; - } return true; } void keyboard_post_init_user(void) { - rgblight_enable_noeeprom(); + } void matrix_scan_user(void) { From ab3fba2cdf69f61a6cb5525c092e5a2f461c925b Mon Sep 17 00:00:00 2001 From: Simon R Date: Mon, 30 Sep 2019 19:59:34 +0200 Subject: [PATCH 008/316] [Keyboard][Fix] budget96 RGB light-switches (#6840) Adding code to make the RGB switching work. Taken from the singa (singa.c). Signed-off-by: Simon R --- keyboards/donutcables/budget96/budget96.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/keyboards/donutcables/budget96/budget96.c b/keyboards/donutcables/budget96/budget96.c index 7831a91f5234..2fc826f09273 100644 --- a/keyboards/donutcables/budget96/budget96.c +++ b/keyboards/donutcables/budget96/budget96.c @@ -49,6 +49,26 @@ void rgblight_set(void) { } #endif +void matrix_init_kb(void) { +#ifdef RGBLIGHT_ENABLE + if (rgblight_config.enable) { + i2c_init(); + i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); + } +#endif + // call user level keymaps, if any + matrix_init_user(); +} + +void matrix_scan_kb(void) { +#ifdef RGBLIGHT_ENABLE + rgblight_task(); +#endif + matrix_scan_user(); + /* Nothing else for now. */ +} + + void backlight_init_ports(void) { // initialize pins D0, D1, D4 and D6 as output setPinOutput(D0); From edf8552970fab2bd025933e0244ce9acb37f0712 Mon Sep 17 00:00:00 2001 From: Jan Christoph Ebersbach Date: Mon, 30 Sep 2019 21:28:51 +0200 Subject: [PATCH 009/316] [Keyboard] Signum 3 0 enable kinetic speed (#6740) * Enable kinetic speed * Update keymap --- keyboards/signum/3_0/elitec/config.h | 3 +++ keyboards/signum/3_0/elitec/keymaps/default/keymap.c | 8 ++++---- keyboards/signum/3_0/elitec/keymaps/default/layout.py | 11 ++++++----- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/keyboards/signum/3_0/elitec/config.h b/keyboards/signum/3_0/elitec/config.h index 88e45ef450c1..1e045e2e10f3 100644 --- a/keyboards/signum/3_0/elitec/config.h +++ b/keyboards/signum/3_0/elitec/config.h @@ -10,6 +10,9 @@ #define PRODUCT Signum #define DESCRIPTION q.m.k. keyboard firmware for Signum 3.0 +/* mouse settings */ +#define MK_KINETIC_SPEED + /* key matrix size */ #define MATRIX_ROWS 4 #define MATRIX_COLS 12 diff --git a/keyboards/signum/3_0/elitec/keymaps/default/keymap.c b/keyboards/signum/3_0/elitec/keymaps/default/keymap.c index 02690779173b..15cf215305ee 100644 --- a/keyboards/signum/3_0/elitec/keymaps/default/keymap.c +++ b/keyboards/signum/3_0/elitec/keymaps/default/keymap.c @@ -632,14 +632,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ------------------------------------------------- ------------------------------------------------- * |LShift(| z | x | c | v | b | | n | m | , | . | / |RShift)| * ----------------------------------------------------------------------------------------------------------------- - * LCtrl LAlt LGui | TT2 |LT6_SPC|LT4_DEL|LT4_ENT| Space |LT2_BSP| RGui RAlt RCtrl + * LCtrl[ LAlt LGui | TT2 |LT6_SPC|LT4_DEL|LT4_ENT| Space |LT2_BSP| RGui RLAlt RCtrl] * ------------------------------------------------- */ LAYOUT_ortho_4x12( KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, LCTL_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_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, - KC_LCTL, KC_LALT, KC_LGUI, TT(2), LT(6,KC_SPC), LT(4,KC_DEL), LT(4,KC_ENT), KC_SPC, LT(2,KC_BSPC), KC_RGUI, KC_RALT, KC_RCTL + LCTL_T(KC_LBRC), KC_LALT, KC_LGUI, TT(2), LT(6,KC_SPC), LT(4,KC_DEL), LT(4,KC_ENT), KC_SPC, LT(2,KC_BSPC), KC_RGUI, LALT_T(KC_RALT), RCTL_T(KC_RBRC) ), /* @@ -651,14 +651,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ------------------------------------------------- ------------------------------------------------- * |LShift(| z | x | c | v | b | | k | m | , | . | / |RShift)| * ----------------------------------------------------------------------------------------------------------------- - * LCtrl LAlt LGui | TT2 |LT6_SPC|LT4_DEL|LT4_ENT| Space |LT2_BSP| RGui RAlt RCtrl + * LCtrl[ LAlt LGui | TT2 |LT6_SPC|LT4_DEL|LT4_ENT| Space |LT2_BSP| RGui RLAlt RCtrl] * ------------------------------------------------- */ LAYOUT_ortho_4x12( KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, LCTL_T(KC_ESC), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, - KC_LCTL, KC_LALT, KC_LGUI, TT(2), LT(6,KC_SPC), LT(4,KC_DEL), LT(4,KC_ENT), KC_SPC, LT(2,KC_BSPC), KC_RGUI, KC_RALT, KC_RCTL + LCTL_T(KC_LBRC), KC_LALT, KC_LGUI, TT(2), LT(6,KC_SPC), LT(4,KC_DEL), LT(4,KC_ENT), KC_SPC, LT(2,KC_BSPC), KC_RGUI, LALT_T(KC_RALT), RCTL_T(KC_RBRC) ), /* diff --git a/keyboards/signum/3_0/elitec/keymaps/default/layout.py b/keyboards/signum/3_0/elitec/keymaps/default/layout.py index 635a6bb19294..ab9bce422605 100644 --- a/keyboards/signum/3_0/elitec/keymaps/default/layout.py +++ b/keyboards/signum/3_0/elitec/keymaps/default/layout.py @@ -357,9 +357,10 @@ # Command keycodes missing (Execute, Help, ..., Find) # Basic Keycodes missing from Print Screen onwards, included as fallback # random Keycodes - "RGui": "KC_RGUI", "LGui": "KC_LGUI", "LAlt": "KC_LALT", "RAlt": "KC_RALT", "LShift": "KC_LSFT", "LCtrl": "KC_LCTL", "LCtTEsc": "LCTL_T(KC_ESC)", "RCtrl": "KC_RCTL", + "RGui": "KC_RGUI", "LGui": "KC_LGUI", "LAlt": "KC_LALT", "RLAlt": "LALT_T(KC_RALT)", "RAlt": "KC_RALT", "LShift": "KC_LSFT", "LCtrl": "KC_LCTL", "LCtTBsp": "LCTL_T(KC_BSPC)", "LCtTEsc": "LCTL_T(KC_ESC)", "RCtrl": "KC_RCTL", "LShift(": "KC_LSPO", "RShift)": "KC_RSPC", # "LShift(": "LSFT_T(KC_9)", "RShift)": "RSFT_T(RSFT(KC_0))", + "LCtrl[": "LCTL_T(KC_LBRC)", "RCtrl]": "RCTL_T(KC_RBRC)", "L1_ENT": "LT(1, KC_ENT)", "LT2_BSP": "LT(2,KC_BSPC)", "LT4_DEL": "LT(4,KC_DEL)", "LT4_ENT": "LT(4,KC_ENT)", "LT6_SPC": "LT(6,KC_SPC)", "CPg Dn": "LCTL(KC_PGDN)", "CPg Up": "LCTL(KC_PGUP)", "S_Enter": "S(KC_ENT)", "S_Tab": "S(KC_TAB)", "Compose": "KC_ALGR", @@ -431,8 +432,8 @@ qwerty = [ "Tab", "q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "[", "LCtTEsc", "a", "s", "d", "f", "g", "h", "j", "k", "l", ";", "'", - "LShift(", "z", "x", "c", "v", "b", "n", "m", ",", ".", "/", "RShift)", - "LCtrl", "LAlt", "LGui", "TT2", "LT6_SPC", "LT4_DEL", "LT4_ENT", "Space", "LT2_BSP", "RGui", "RAlt", "RCtrl", + "LShift(", "z", "x", "c", "v", "b", "n", "m", ",", ".", "/", "RShift)", + "LCtrl[", "LAlt", "LGui", "TT2", "LT6_SPC", "LT4_DEL", "LT4_ENT", "Space", "LT2_BSP", "RGui", "RLAlt", "RCtrl]", ] # 1 @@ -440,7 +441,7 @@ "Tab", "q", "w", "f", "p", "g", "j", "l", "u", "y", ";", "[", "LCtTEsc", "a", "r", "s", "t", "d", "h", "n", "e", "i", "o", "'", "LShift(", "z", "x", "c", "v", "b", "k", "m", ",", ".", "/", "RShift)", - "LCtrl", "LAlt", "LGui", "TT2", "LT6_SPC", "LT4_DEL", "LT4_ENT", "Space", "LT2_BSP", "RGui", "RAlt", "RCtrl", + "LCtrl[", "LAlt", "LGui", "TT2", "LT6_SPC", "LT4_DEL", "LT4_ENT", "Space", "LT2_BSP", "RGui", "RLAlt", "RCtrl]", ] # 2 @@ -448,7 +449,7 @@ "`", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "]", "", "DF0", "DF1", "XXX", "MO3", "MO3", "4", "4", "5", "6", "-", "=", "", "MO5", "XXX", "XXX", "XXX", "XXX", "1", "1", "2", "3", "\\", "", - "TG2", "", "", "", "", "Del", "", "0", "BSpace", "", "", "", + "TG2", "", "", "", "", "Del", "", "0", "BSpace", "", "", "", ] # 3 From c47fa31a0031a911eb4d97a043fe32792a57eba6 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Tue, 1 Oct 2019 10:45:44 +1000 Subject: [PATCH 010/316] Port drivers.txt changes from the Toolbox (#6786) --- util/drivers.txt | 37 ++----------------------------------- 1 file changed, 2 insertions(+), 35 deletions(-) diff --git a/util/drivers.txt b/util/drivers.txt index 4e5439c39b4e..71d99eaa903a 100644 --- a/util/drivers.txt +++ b/util/drivers.txt @@ -3,45 +3,12 @@ # Use a comma as a separator without spaces # Driver can be one of winusb,libusb,libusbk # Use Windows Powershell and type [guid]::NewGuid() to generate guids +winusb,STM32 Bootloader,0483,DF11,6d98a87f-4ecf-464d-89ed-8c684d857a75 +libusb,USBaspLoader,16C0,05DC,e69affdc-0ef0-427c-aefb-4e593c9d2724 winusb,Kiibohd DFU Bootloader,1C11,B007,aa5a3f86-b81e-4416-89ad-0c1ea1ed63af -winusb,STM32 Bootloader,0483,df11,6d98a87f-4ecf-464d-89ed-8c684d857a75 -libusb,ATxmega16C4,03EB,2FD8,23266ee7-5423-4cc4-993b-034571c43a90 -libusb,ATxmega32C4,03EB,2FD9,d4b62886-2ac8-4534-aa24-eae0a2c3ce43 -libusb,ATxmega64C3,03EB,2FD6,08467ca7-9b5a-41d2-8d8a-4a26d0b5285b -libusb,ATxmega128C3,03EB,2FD7,1ca69799-6d95-46cf-be69-5b3d0eb915e6 -libusb,ATxmega256C3,03EB,2FDA,216ddc8b-6c67-4cc0-b934-482829a483a0 -libusb,ATxmega384C3,03EB,2FDB,0e4e3347-6025-4d49-ba80-2375ea690c28 -libusb,ATxmega64A1U,03EB,2FE8,2553d8fa-7de1-44a6-bdbf-57be8bb37e28 -libusb,ATxmega128A1U,03EB,2FED,6d9fd0ff-755d-4e29-bd29-df0a9a7544b9 -libusb,ATxmega64A4U,03EB,2FDD,bcf5e7c3-44a1-4fd1-971f-9ef9843f6291 -libusb,ATxmega128A4U,03EB,2FDE,3f976bb6-36ca-44cc-a728-844bc1d0d168 -libusb,ATxmega64B3,03EB,2FDF,de280c81-c12a-4ca7-bf34-566151786418 -libusb,ATxmega128B3,03EB,2FE0,2ad1ffeb-eb83-4e78-b34a-d5633771991f -libusb,ATxmega64B1,03EB,2FE1,002874a6-7fc7-413b-9ac4-2b52c5a230bd -libusb,ATxmega128B1,03EB,2FEA,60ea9d08-2ae6-4434-b743-ce6f73537136 -libusb,ATxmega256A3BU,03EB,2FE2,5949bd0a-8bd4-417b-b1c5-7d249836bf0d -libusb,ATxmega16A4U,03EB,2FE3,cc3172b0-e86a-4758-914e-951bca6ca7f5 -libusb,ATxmega32A4U,03EB,2FE4,f44c515f-7d17-4612-a532-ee620afb22b2 -libusb,ATxmega64A4U,03EB,2FE5,c1af4f1c-045f-40c9-893a-3ad4adb2e67d -libusb,ATxmega128A3U,03EB,2FE6,26f275f0-d6b2-46d8-8334-e4de66996c74 -libusb,ATxmega192A3U,03EB,2FE7,b7b50d98-0429-4235-8f08-5466e4f83ed4 -libusb,UC3,03EB,2FDC,972d9af7-d71b-44c7-a895-9340b362f545 -libusb,ATUC3,03EB,2FE9,d5855d0a-f82e-4df5-9c14-2b0b1dcb65bd -libusb,AT32UC3C,03EB,2FEB,1eeb52aa-fd24-47fd-8a76-056446d1a54f -libusb,ATxmega256A3U,03EB,2FEC,198fa8ea-3157-4863-b9a8-a3f6fe027367 -libusb,ATmega8U2,03EB,2FEE,14018055-46f4-4c62-aa03-e8fafeedaf72 libusb,ATmega16U2,03EB,2FEF,007274da-b75f-492e-a288-8fc0aff8339f libusb,ATmega32U2,03EB,2FF0,ddc2c572-cb6e-4f61-a6cc-1a5de941f063 -libusb,AT32UC3A3,03EB,2FF1,8b614283-36c0-46a2-890d-65f61b5b6201 -libusb,ATmega32U6,03EB,2FF2,a207dd90-2814-4418-b5b7-4b708fdf1bfd libusb,ATmega16U4,03EB,2FF3,3180d426-bf93-4578-a693-2efbc337da8e libusb,ATmega32U4,03EB,2FF4,5f9726fd-f9de-487a-9fbd-8b3524a7a56a -libusb,AT32UC3B,03EB,2FF6,ef90068a-277a-44db-805a-9b83a6beb29a -libusb,AT90USB82,03EB,2FF7,062fa2ab-f9d8-4a0d-83c1-df0521cfd0f6 -libusb,AT32UC3A,03EB,2FF8,24080a67-3874-4fb8-8808-fb4cc297c466 libusb,AT90USB64,03EB,2FF9,c6a708ad-e97d-43cd-b04a-3180d737a71b -libusb,AT90USB162,03EB,2FFA,de67bff5-6e39-4e9c-8dfe-de7fce113716 libusb,AT90USB128,03EB,2FFB,fd217df3-59d0-440a-a8f3-4c0c8c84daa3 -libusb,AT89C5130,03EB,2FFD,31b69a56-9ac0-4fab-a3ae-cd7bb7021ec5 -libusb,AT8XC5122,03EB,2FFE,395a6118-8568-41b2-913a-d16912722342 -libusb,AT89C5132,03EB,2FFF,266ca4bc-5e59-4a7b-82dc-6e8732373d40 From c7b28bffc13d405bea2e0c0243437920659232f2 Mon Sep 17 00:00:00 2001 From: Amber Holly Date: Tue, 1 Oct 2019 02:34:12 +0100 Subject: [PATCH 011/316] [Keyboard] Add Wraith keyboard (#6810) * start wraith firmware * completed initial setup * added amber keymap to wraith * fixed LEDs, wrote readme files * reverted bootloader type after troubleshooting * decapitalised files and directory as per qmk standards * Update Wraith keyboard folder - Add timer keymap with documentation - Remove boilerplate in rules.mk, ready for pull request - Update info.json with ISO and ANSI layouts, ready for QMK Configurator * Add Wraith image to readme.md * Fix Wraith keyboard's QMK Configurator support - Update info.json - Add layout macros in wraith.h - Update keymap.c files to use LAYOUT_all - Fix readme formatting --- keyboards/cutie_club/wraith/config.h | 249 ++++++++++++++++++ keyboards/cutie_club/wraith/info.json | 15 ++ .../cutie_club/wraith/keymaps/amber/config.h | 19 ++ .../cutie_club/wraith/keymaps/amber/keymap.c | 59 +++++ .../cutie_club/wraith/keymaps/amber/readme.md | 1 + .../wraith/keymaps/default/config.h | 19 ++ .../wraith/keymaps/default/keymap.c | 59 +++++ .../wraith/keymaps/default/readme.md | 1 + .../cutie_club/wraith/keymaps/timer/config.h | 25 ++ .../cutie_club/wraith/keymaps/timer/keymap.c | 90 +++++++ .../cutie_club/wraith/keymaps/timer/readme.md | 30 +++ keyboards/cutie_club/wraith/readme.md | 15 ++ keyboards/cutie_club/wraith/rules.mk | 30 +++ keyboards/cutie_club/wraith/wraith.c | 43 +++ keyboards/cutie_club/wraith/wraith.h | 84 ++++++ 15 files changed, 739 insertions(+) create mode 100644 keyboards/cutie_club/wraith/config.h create mode 100644 keyboards/cutie_club/wraith/info.json create mode 100644 keyboards/cutie_club/wraith/keymaps/amber/config.h create mode 100644 keyboards/cutie_club/wraith/keymaps/amber/keymap.c create mode 100644 keyboards/cutie_club/wraith/keymaps/amber/readme.md create mode 100644 keyboards/cutie_club/wraith/keymaps/default/config.h create mode 100644 keyboards/cutie_club/wraith/keymaps/default/keymap.c create mode 100644 keyboards/cutie_club/wraith/keymaps/default/readme.md create mode 100644 keyboards/cutie_club/wraith/keymaps/timer/config.h create mode 100644 keyboards/cutie_club/wraith/keymaps/timer/keymap.c create mode 100644 keyboards/cutie_club/wraith/keymaps/timer/readme.md create mode 100644 keyboards/cutie_club/wraith/readme.md create mode 100644 keyboards/cutie_club/wraith/rules.mk create mode 100644 keyboards/cutie_club/wraith/wraith.c create mode 100644 keyboards/cutie_club/wraith/wraith.h diff --git a/keyboards/cutie_club/wraith/config.h b/keyboards/cutie_club/wraith/config.h new file mode 100644 index 000000000000..4908f7d8cdc2 --- /dev/null +++ b/keyboards/cutie_club/wraith/config.h @@ -0,0 +1,249 @@ +/* +Copyright 2019 Amber Holly + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Amber +#define PRODUCT Wraith +#define DESCRIPTION A WKL, 75% keyboard with staggered F-row. + +/* key matrix size */ +#define MATRIX_ROWS 12 +#define MATRIX_COLS 8 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { B6, B5, B4, D7, D6, D4, D5, D3, D2, D1, D0, B7 } +#define MATRIX_COL_PINS { C6, C7, F7, F6, F5, F4, F1, F0 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * 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 + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/cutie_club/wraith/info.json b/keyboards/cutie_club/wraith/info.json new file mode 100644 index 000000000000..c75f925d3fdf --- /dev/null +++ b/keyboards/cutie_club/wraith/info.json @@ -0,0 +1,15 @@ +{ + "keyboard_name": "wraith", + "url": "", + "maintainer": "amberstarlight", + "width": 16, + "height": 6, + "layouts": { + "LAYOUT_ansi": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1.25, "y":0}, {"label":"F2", "x":2.25, "y":0}, {"label":"F3", "x":3.25, "y":0}, {"label":"F4", "x":4.25, "y":0}, {"label":"F5", "x":5.5, "y":0}, {"label":"F6", "x":6.5, "y":0}, {"label":"F7", "x":7.5, "y":0}, {"label":"F8", "x":8.5, "y":0}, {"label":"F9", "x":9.75, "y":0}, {"label":"F10", "x":10.75, "y":0}, {"label":"F11", "x":11.75, "y":0}, {"label":"F12", "x":12.75, "y":0}, {"label":"Prt Sc", "x":14, "y":0}, {"label":"Fn", "x":15, "y":0}, {"label":"~", "x":0, "y":1}, {"label":"!", "x":1, "y":1}, {"label":"@", "x":2, "y":1}, {"label":"#", "x":3, "y":1}, {"label":"$", "x":4, "y":1}, {"label":"%", "x":5, "y":1}, {"label":"^", "x":6, "y":1}, {"label":"&", "x":7, "y":1}, {"label":"*", "x":8, "y":1}, {"label":"(", "x":9, "y":1}, {"label":")", "x":10, "y":1}, {"label":"_", "x":11, "y":1}, {"label":"+", "x":12, "y":1}, {"label":"Backspace", "x":13, "y":1, "w":2}, {"label":"Insert", "x":15, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"{", "x":11.5, "y":2}, {"label":"}", "x":12.5, "y":2}, {"label":"|", "x":13.5, "y":2, "w":1.5}, {"label":"Delete", "x":15, "y":2}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":":", "x":10.75, "y":3}, {"label":"\"", "x":11.75, "y":3}, {"label":"Enter", "x":12.75, "y":3, "w":2.25}, {"label":"Pg Up", "x":15, "y":3}, {"label":"Shift", "x":0, "y":4, "w":2.25}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"N", "x":7.25, "y":4}, {"label":"M", "x":8.25, "y":4}, {"label":"<", "x":9.25, "y":4}, {"label":">", "x":10.25, "y":4}, {"label":"?", "x":11.25, "y":4}, {"label":"Shift", "x":12.25, "y":4, "w":1.75}, {"label":"\u2191", "x":14, "y":4}, {"label":"Pg Dn", "x":15, "y":4}, {"label":"Ctrl", "x":0, "y":5, "w":1.5}, {"label":"Alt", "x":2.25, "y":5, "w":1.5}, {"x":3.75, "y":5, "w":7}, {"label":"Alt", "x":10.75, "y":5, "w":1.5}, {"label":"\u2190", "x":13, "y":5}, {"label":"\u2193", "x":14, "y":5}, {"label":"\u2192", "x":15, "y":5}] + }, + "LAYOUT_iso": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1.25, "y":0}, {"label":"F2", "x":2.25, "y":0}, {"label":"F3", "x":3.25, "y":0}, {"label":"F4", "x":4.25, "y":0}, {"label":"F5", "x":5.5, "y":0}, {"label":"F6", "x":6.5, "y":0}, {"label":"F7", "x":7.5, "y":0}, {"label":"F8", "x":8.5, "y":0}, {"label":"F9", "x":9.75, "y":0}, {"label":"F10", "x":10.75, "y":0}, {"label":"F11", "x":11.75, "y":0}, {"label":"F12", "x":12.75, "y":0}, {"label":"Prt Sc", "x":14, "y":0}, {"label":"Fn", "x":15, "y":0}, {"label":"~", "x":0, "y":1}, {"label":"!", "x":1, "y":1}, {"label":"\"", "x":2, "y":1}, {"label":"\u00a3", "x":3, "y":1}, {"label":"$", "x":4, "y":1}, {"label":"%", "x":5, "y":1}, {"label":"^", "x":6, "y":1}, {"label":"&", "x":7, "y":1}, {"label":"*", "x":8, "y":1}, {"label":"(", "x":9, "y":1}, {"label":")", "x":10, "y":1}, {"label":"_", "x":11, "y":1}, {"label":"+", "x":12, "y":1}, {"label":"Backspace", "x":13, "y":1, "w":2}, {"label":"Insert", "x":15, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"{", "x":11.5, "y":2}, {"label":"}", "x":12.5, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25, "h":2}, {"label":"Delete", "x":15, "y":2}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":":", "x":10.75, "y":3}, {"label":"@", "x":11.75, "y":3}, {"label":"~", "x":12.75, "y":3}, {"label":"Pg Up", "x":15, "y":3}, {"label":"Shift", "x":0, "y":4, "w":1.25}, {"label":"|", "x":1.25, "y":4}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"N", "x":7.25, "y":4}, {"label":"M", "x":8.25, "y":4}, {"label":"<", "x":9.25, "y":4}, {"label":">", "x":10.25, "y":4}, {"label":"?", "x":11.25, "y":4}, {"label":"Shift", "x":12.25, "y":4, "w":1.75}, {"label":"\u2191", "x":14, "y":4}, {"label":"Pg Dn", "x":15, "y":4}, {"label":"Ctrl", "x":0, "y":5, "w":1.5}, {"label":"Alt", "x":2.25, "y":5, "w":1.5}, {"x":3.75, "y":5, "w":7}, {"label":"Alt", "x":10.75, "y":5, "w":1.5}, {"label":"\u2190", "x":13, "y":5}, {"label":"\u2193", "x":14, "y":5}, {"label":"\u2192", "x":15, "y":5}] + } + } +} diff --git a/keyboards/cutie_club/wraith/keymaps/amber/config.h b/keyboards/cutie_club/wraith/keymaps/amber/config.h new file mode 100644 index 000000000000..b825835bb492 --- /dev/null +++ b/keyboards/cutie_club/wraith/keymaps/amber/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 Amber Holly + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/cutie_club/wraith/keymaps/amber/keymap.c b/keyboards/cutie_club/wraith/keymaps/amber/keymap.c new file mode 100644 index 000000000000..f953b5e199b8 --- /dev/null +++ b/keyboards/cutie_club/wraith/keymaps/amber/keymap.c @@ -0,0 +1,59 @@ +/* Copyright 2019 Amber Holly + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_BRK, + 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_BSPC, KC_INS, + 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_DEL, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, MO(1), + 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_UP, KC_RGUI, + KC_CAPS, KC_LALT, KC_SPC, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_all( + RESET, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_TRNS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, KC_MPRV, _______, KC_MNXT + ) +}; + + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + // escape LED on layer 1 + if (IS_LAYER_ON(1)) { + writePinLow(B0); + } else { + writePinHigh(B0); + } +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/cutie_club/wraith/keymaps/amber/readme.md b/keyboards/cutie_club/wraith/keymaps/amber/readme.md new file mode 100644 index 000000000000..013ae7f109d2 --- /dev/null +++ b/keyboards/cutie_club/wraith/keymaps/amber/readme.md @@ -0,0 +1 @@ +# Amber's personal keymap diff --git a/keyboards/cutie_club/wraith/keymaps/default/config.h b/keyboards/cutie_club/wraith/keymaps/default/config.h new file mode 100644 index 000000000000..6f4dc6741c5f --- /dev/null +++ b/keyboards/cutie_club/wraith/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 Amber + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/cutie_club/wraith/keymaps/default/keymap.c b/keyboards/cutie_club/wraith/keymaps/default/keymap.c new file mode 100644 index 000000000000..342a411ef775 --- /dev/null +++ b/keyboards/cutie_club/wraith/keymaps/default/keymap.c @@ -0,0 +1,59 @@ +/* Copyright 2019 Amber Holly + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, MO(1), + 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_BSPC, KC_INS, + 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_DEL, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, KC_PGUP, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_all( + RESET, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, _______, KC_TRNS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ) +}; + + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + // escape LED on layer 1 + if (IS_LAYER_ON(1)) { + writePinLow(B0); + } else { + writePinHigh(B0); + } +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/cutie_club/wraith/keymaps/default/readme.md b/keyboards/cutie_club/wraith/keymaps/default/readme.md new file mode 100644 index 000000000000..cdf6376c2def --- /dev/null +++ b/keyboards/cutie_club/wraith/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for the Wraith diff --git a/keyboards/cutie_club/wraith/keymaps/timer/config.h b/keyboards/cutie_club/wraith/keymaps/timer/config.h new file mode 100644 index 000000000000..f6f1af659d16 --- /dev/null +++ b/keyboards/cutie_club/wraith/keymaps/timer/config.h @@ -0,0 +1,25 @@ +/* Copyright 2019 Amber Holly + * + * 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 . + */ + +#pragma once + +#define LAYER_TIMEOUT 10000 +#define TIMEOUT_WARNING 3000 +#define FLASH_PERIOD 250 +#define SPEED_SCALE 2 +#define TIMEOUT_SCALE 4 +#define LAYER_SWITCH 1 // the layer to switch to +#define GET_FLASH_PERIOD ((layer_time_remaining <= TIMEOUT_WARNING/TIMEOUT_SCALE) ? FLASH_PERIOD/SPEED_SCALE : FLASH_PERIOD) diff --git a/keyboards/cutie_club/wraith/keymaps/timer/keymap.c b/keyboards/cutie_club/wraith/keymaps/timer/keymap.c new file mode 100644 index 000000000000..e57c62103836 --- /dev/null +++ b/keyboards/cutie_club/wraith/keymaps/timer/keymap.c @@ -0,0 +1,90 @@ +/* Copyright 2019 Amber Holly + * + * 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 . + */ +#include QMK_KEYBOARD_H + +int layer_time_remaining; +uint16_t prev_loop_time; + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + TIME_TOGGLE = SAFE_RANGE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_BRK, + 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_BSPC, KC_INS, + 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_DEL, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, TIME_TOGGLE, + 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_UP, KC_RGUI, + KC_CAPS, KC_LALT, KC_SPC, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_all( + RESET, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_TRNS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_MPLY, KC_MPRV, _______, KC_MNXT + ) +}; + + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + layer_time_remaining -= timer_read()-prev_loop_time; //amount of time elapsed since the start of the previous loop + prev_loop_time = timer_read(); //start counting the time to check at the next iteration + + if (layer_time_remaining <= 0) { + // once timer run out + layer_off(LAYER_SWITCH); + } + + // escape LED on layer 1 + if (IS_LAYER_ON(LAYER_SWITCH)) { + if (layer_time_remaining <= TIMEOUT_WARNING) { + if ((int)(layer_time_remaining/GET_FLASH_PERIOD % 2 == 0)) { + // if even led on + writePinLow(B0); + } else { + writePinHigh(B0); + } + } else { + writePinLow(B0); + } + } else { + writePinHigh(B0); + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case TIME_TOGGLE: + // get the time when time toggle pressed + layer_time_remaining = LAYER_TIMEOUT; + // set the layer + layer_on(LAYER_SWITCH); + break; + } + return true; +}; + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/cutie_club/wraith/keymaps/timer/readme.md b/keyboards/cutie_club/wraith/keymaps/timer/readme.md new file mode 100644 index 000000000000..1e812f3aedd2 --- /dev/null +++ b/keyboards/cutie_club/wraith/keymaps/timer/readme.md @@ -0,0 +1,30 @@ +# Timed function layer keymap + +Amber's personal keymap for the Wraith, but with a custom timed function layer keycode. `config.h` contains defines that you can edit to control various aspects of this function. + +## How does it work? +We are reading QMK's software timer in `matrix_scan_user()`. + +Once the `TIME_TOGGLE` key is pressed, `layer_time_remaining` is set equal to `LAYER_TIMEOUT`, the layer defined in `LAYER_SWITCH` becomes active, and the LED on the Escape key (pin B0) will light up. + +Each time the matrix is scanned, the software timer is read, and the value of `layer_time_remaining` is decreased by `prev_loop_time` - the amount of time elapsed since the last matrix scan. + +When there are `TIMEOUT_WARNING`ms left in `LAYER_TIMEOUT`, the LED will begin to flash at intervals of `FLASH_PERIOD`ms. + +When there are `TIMEOUT_WARNING/TIMEOUT_SCALE`ms left, the LED will begin to flash at intervals of `FLASH_PERIOD/SPEED_SCALE`ms. + +When `layer_time_remaining` is equal to or less than 0, the layer defined in `LAYER_SWITCH` is removed from the layer stack. + + +## What are the defaults? +`LAYER_TIMEOUT` controls how long the layer will stay active for. The default is 10 seconds. + +`TIMEOUT_WARNING` controls how long the warning (LED flash) will occur before the layer becomes inactive. The default is 3 seconds. + +`FLASH_PERIOD` controls how long each LED flash interval is in the warning time. The default flash period is 250ms. + +`SPEED_SCALE` controls how many times faster the LED will flash in the second flash period. The default scale is 2, twice as fast. + +`TIMEOUT_SCALE` controls the length of the second flash period, relative to `TIMEOUT_WARNING`. The default scale is 4; for 750ms of the secondary flash period. + +`LAYER_SWITCH` is the layer that will be activated by the key. The default is layer 1. diff --git a/keyboards/cutie_club/wraith/readme.md b/keyboards/cutie_club/wraith/readme.md new file mode 100644 index 000000000000..66d138b00569 --- /dev/null +++ b/keyboards/cutie_club/wraith/readme.md @@ -0,0 +1,15 @@ +# Wraith + +![Wraith](https://i.imgur.com/WbfRCg8.jpg) + +Custom PCB for the Wraith keyboard. + +Keyboard Maintainer: [Amber](/~https://github.com/amberstarlight) +Hardware Supported: Wraith PCB +Hardware Availability: private group buy + +Make example for this keyboard (after setting up your build environment): + + make cutie_club/wraith:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/cutie_club/wraith/rules.mk b/keyboards/cutie_club/wraith/rules.mk new file mode 100644 index 000000000000..1737728fc382 --- /dev/null +++ b/keyboards/cutie_club/wraith/rules.mk @@ -0,0 +1,30 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +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 = yes # Commands for debug and configuration +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 = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/cutie_club/wraith/wraith.c b/keyboards/cutie_club/wraith/wraith.c new file mode 100644 index 000000000000..95265384ee4b --- /dev/null +++ b/keyboards/cutie_club/wraith/wraith.c @@ -0,0 +1,43 @@ +/* Copyright 2019 Amber Holly + * + * 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 . + */ +#include "wraith.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +void matrix_init_kb(void) { + setPinOutput(B3); + setPinOutput(B0); + matrix_init_user(); +} + +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinLow(B3); + } else { + writePinHigh(B3); + } + led_set_user(usb_led); +} diff --git a/keyboards/cutie_club/wraith/wraith.h b/keyboards/cutie_club/wraith/wraith.h new file mode 100644 index 000000000000..156937a1f5c8 --- /dev/null +++ b/keyboards/cutie_club/wraith/wraith.h @@ -0,0 +1,84 @@ +/* Copyright 2019 Amber Holly + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define LAYOUT_all( \ + K00, K10, K01, K11, K02, K12, K03, K13, K04, K14, K05, K15, K06, K16, K07,\ + K20, K30, K21, K31, K22, K32, K23, K33, K24, K34, K25, K35, K26, K36, K27,\ + K40, K50, K41, K51, K42, K52, K43, K53, K44, K54, K45, K55, K46, K47,\ + K60, K70, K61, K71, K62, K72, K63, K73, K64, K74, K65, K75, K66, K76, K67,\ + K80, K90, K81, K91, K82, K92, K83, K93, K84, K94, K85, K95, K86, K96, K87,\ + KA0, KA1, KA3, KB5, KA6, KB6, KA7\ + ) { \ + { K00, K01, K02, K03, K04, K05, K06, K07 }, \ + { K10, K11, K12, K13, K14, K15, K16 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27 }, \ + { K30, K31, K32, K33, K34, K35, K36 }, \ + { K40, K41, K42, K43, K44, K45, K46, K47}, \ + { K50, K51, K52, K53, K54, K55, KC_NO }, \ + { K60, K61, K62, K63, K64, K65, K66, K67 }, \ + { K70, K71, K72, K73, K74, K75, K76 }, \ + { K80, K81, K82, K83, K84, K85, K86, K87 }, \ + { K90, K91, K92, K93, K94, K95, K96 }, \ + { KA0, KA1, KC_NO, KA3, KC_NO, KC_NO, KA6, KA7 }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KB5, KB6 } \ +} + + #define LAYOUT_iso( \ + K00, K10, K01, K11, K02, K12, K03, K13, K04, K14, K05, K15, K06, K16, K07,\ + K20, K30, K21, K31, K22, K32, K23, K33, K24, K34, K25, K35, K26, K36, K27,\ + K40, K50, K41, K51, K42, K52, K43, K53, K44, K54, K45, K55, K46, K47,\ + K60, K70, K61, K71, K62, K72, K63, K73, K64, K74, K65, K75, K66, K76, K67,\ + K80, K90, K81, K91, K82, K92, K83, K93, K84, K94, K85, K95, K86, K96, K87,\ + KA0, KA1, KA3, KB5, KA6, KB6, KA7\ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07 }, \ + { K10, K11, K12, K13, K14, K15, K16 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27 }, \ + { K30, K31, K32, K33, K34, K35, K36 }, \ + { K40, K41, K42, K43, K44, K45, K46, K47}, \ + { K50, K51, K52, K53, K54, K55, KC_NO }, \ + { K60, K61, K62, K63, K64, K65, K66, K67 }, \ + { K70, K71, K72, K73, K74, K75, K76 }, \ + { K80, K81, K82, K83, K84, K85, K86, K87 }, \ + { K90, K91, K92, K93, K94, K95, K96 }, \ + { KA0, KA1, KC_NO, KA3, KC_NO, KC_NO, KA6, KA7 }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KB5, KB6 } \ +} + +#define LAYOUT_ansi( \ + K00, K10, K01, K11, K02, K12, K03, K13, K04, K14, K05, K15, K06, K16, K07,\ + K20, K30, K21, K31, K22, K32, K23, K33, K24, K34, K25, K35, K26, K36, K27,\ + K40, K50, K41, K51, K42, K52, K43, K53, K44, K54, K45, K55, K46, K66, K47,\ + K60, K70, K61, K71, K62, K72, K63, K73, K64, K74, K65, K75, K76, K67,\ + K80, K81, K91, K82, K92, K83, K93, K84, K94, K85, K95, K86, K96, K87,\ + KA0, KA1, KA3, KB5, KA6, KB6, KA7\ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07 }, \ + { K10, K11, K12, K13, K14, K15, K16 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27 }, \ + { K30, K31, K32, K33, K34, K35, K36 }, \ + { K40, K41, K42, K43, K44, K45, K46, K47}, \ + { K50, K51, K52, K53, K54, K55, KC_NO }, \ + { K60, K61, K62, K63, K64, K65, K66, K67 }, \ + { K70, K71, K72, K73, K74, K75, K76 }, \ + { K80, K81, K82, K83, K84, K85, K86, K87 }, \ + { KC_NO, K91, K92, K93, K94, K95, K96 }, \ + { KA0, KA1, KC_NO, KA3, KC_NO, KC_NO, KA6, KA7 }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KB5, KB6 } \ +} From 68072e931a1e67ce2d6f71be5efff559305072d6 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Tue, 1 Oct 2019 13:51:23 -0400 Subject: [PATCH 012/316] Expose zh-cn docs, delete bad zh docs, add docs for adding translations (#6855) * expose zh-cn docs, delete bad zh docs, add docs for adding translations * Update docs/translating.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update docs/translating.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * update for python 3 --- docs/LANGS.md | 4 - docs/_langs.md | 3 + docs/_summary.md | 1 + docs/index.html | 40 ++++++++- docs/translating.md | 29 +++++++ docs/zh-cn/_summary.md | 181 ++++++++++++++++++++--------------------- docs/zh/README.md | 32 -------- docs/zh/_summary.md | 99 ---------------------- 8 files changed, 159 insertions(+), 230 deletions(-) delete mode 100644 docs/LANGS.md create mode 100644 docs/_langs.md create mode 100644 docs/translating.md delete mode 100644 docs/zh/README.md delete mode 100644 docs/zh/_summary.md diff --git a/docs/LANGS.md b/docs/LANGS.md deleted file mode 100644 index 4b48f2d3d891..000000000000 --- a/docs/LANGS.md +++ /dev/null @@ -1,4 +0,0 @@ -# Languages - -* [English](/) -* [Chinese](zh/) diff --git a/docs/_langs.md b/docs/_langs.md new file mode 100644 index 000000000000..382231d5056d --- /dev/null +++ b/docs/_langs.md @@ -0,0 +1,3 @@ +- Translations + - [:uk: English](/) + - [:cn: 中文](/zh-cn/) \ No newline at end of file diff --git a/docs/_summary.md b/docs/_summary.md index 233b2cdaa25b..65bfa11f09c9 100644 --- a/docs/_summary.md +++ b/docs/_summary.md @@ -109,6 +109,7 @@ * [Using Eclipse with QMK](other_eclipse.md) * [Using VSCode with QMK](other_vscode.md) * [Support](support.md) + * [How to add translations](translating.md) * QMK Internals (In Progress) * [Defines](internals_defines.md) diff --git a/docs/index.html b/docs/index.html index d4016e27d3b2..94372944a971 100644 --- a/docs/index.html +++ b/docs/index.html @@ -3,6 +3,7 @@ QMK Firmware + @@ -20,19 +21,50 @@
diff --git a/docs/translating.md b/docs/translating.md new file mode 100644 index 000000000000..6eb268763a02 --- /dev/null +++ b/docs/translating.md @@ -0,0 +1,29 @@ +# How to translate the QMK docs into different languages + +All files in the root folder (`docs/`) should be in English - all other languages should be in subfolders with the ISO 639-1 language codes, followed by `-` and the country code where relevant. [A list of common ones can be found here](https://www.andiamo.co.uk/resources/iso-language-codes/). If this folder doesn't exist, you may create it. Each of the translated files should have the same name as the English version, so things can fall back successfully. + +A `_summary.md` file should exist in this folder with a list of links to each file, with a translated name, and link preceded by the language folder: + + * [QMK简介](zh-cn/getting_started_introduction.md) + +Once you've finished translating a new language, you'll also need to modify the following files: + +* [`docs/_langs.md`](/~https://github.com/qmk/qmk_firmware/blob/master/docs/_langs.md) + Each line should contain a country flag in the format `:us:` followed by the name represented in its own language: + + - [:cn: 中文](/zh-cn/) + +* [`docs/index.html`](/~https://github.com/qmk/qmk_firmware/blob/master/docs/index.html) + Both `placeholder` and `noData` objects should have a dictionary entry for the language folder in a string: + + '/zh-cn/': '没有结果!', + +## Previewing the translations + +Before opening a pull request, you can preview your additions if you have Python 3 installed by running this command in the `docs/` folder: + + python -m http.server 9000 + +and navigating to http://localhost:9000/ - you should be able to select your new language from the "Translations" menu at the top-right. + +Once you're happy with your work, feel free to open a pull request! diff --git a/docs/zh-cn/_summary.md b/docs/zh-cn/_summary.md index 98b1440d9f33..033fecde42be 100644 --- a/docs/zh-cn/_summary.md +++ b/docs/zh-cn/_summary.md @@ -1,107 +1,106 @@ -* [完全菜鸟指南](newbs.md) - * [入门](newbs_getting_started.md) - * [构建你的第一个固件](newbs_building_firmware.md) - * [刷新固件](newbs_flashing.md) - * [测试和调试](newbs_testing_debugging.md) - * [Git最佳实践](newbs_best_practices.md) - * [学习资源](newbs_learn_more_resources.md) +* [完全菜鸟指南](zh-cn/newbs.md) + * [入门](zh-cn/newbs_getting_started.md) + * [构建你的第一个固件](zh-cn/newbs_building_firmware.md) + * [刷新固件](zh-cn/newbs_flashing.md) + * [测试和调试](zh-cn/newbs_testing_debugging.md) + * [Git最佳实践](zh-cn/newbs_best_practices.md) + * [学习资源](zh-cn/newbs_learn_more_resources.md) -* [QMK基础](README.md) - * [QMK简介](getting_started_introduction.md) - * [向QMK贡献](contributing.md) - * [如何使用Github](getting_started_github.md) - * [获得帮助](getting_started_getting_help.md) +* [QMK基础](zh-cn/README.md) + * [QMK简介](zh-cn/getting_started_introduction.md) + * [向QMK贡献](zh-cn/contributing.md) + * [如何使用Github](zh-cn/getting_started_github.md) + * [获得帮助](zh-cn/getting_started_getting_help.md) -* [问题解答](faq.md) - * [一般问题](faq_general.md) - * [构建/编译](faq_build.md) - * [调试/故障排除](faq_debug.md) - * [键盘映射](faq_keymap.md) +* [问题解答](zh-cn/faq.md) + * [一般问题](zh-cn/faq_general.md) + * [构建/编译](zh-cn/faq_build.md) + * [调试/故障排除](zh-cn/faq_debug.md) + * [键盘映射](zh-cn/faq_keymap.md) * 详细指南 - * [安装构建工具](getting_started_build_tools.md) - * [vagrant指南](getting_started_vagrant.md) - * [构建/编译指令](getting_started_make_guide.md) - * [刷新固件](flashing.md) - * [定制功能](custom_quantum_functions.md) - * [映射概述](keymap.md) + * [安装构建工具](zh-cn/getting_started_build_tools.md) + * [vagrant指南](zh-cn/getting_started_vagrant.md) + * [构建/编译指令](zh-cn/getting_started_make_guide.md) + * [刷新固件](zh-cn/flashing.md) + * [定制功能](zh-cn/custom_quantum_functions.md) + * [映射概述](zh-cn/keymap.md) -* [硬件](hardware.md) - * [AVR处理器](hardware_avr.md) - * [驱动](hardware_drivers.md) +* [硬件](zh-cn/hardware.md) + * [AVR处理器](zh-cn/hardware_avr.md) + * [驱动](zh-cn/hardware_drivers.md) * 参考 - * [键盘指南](hardware_keyboard_guidelines.md) - * [配置选项](config_options.md) - * [键码](keycodes.md) - * [记录最佳实践](documentation_best_practices.md) - * [文档模板](documentation_templates.md) - * [术语表](reference_glossary.md) - * [单元测试](unit_testing.md) - * [有用的功能](ref_functions.md) - * [配置器支持](reference_configurator_support.md) - * [info.json 格式](reference_info_json.md) + * [键盘指南](zh-cn/hardware_keyboard_guidelines.md) + * [配置选项](zh-cn/config_options.md) + * [键码](zh-cn/keycodes.md) + * [记录最佳实践](zh-cn/documentation_best_practices.md) + * [文档模板](zh-cn/documentation_templates.md) + * [术语表](zh-cn/reference_glossary.md) + * [单元测试](zh-cn/unit_testing.md) + * [有用的功能](zh-cn/ref_functions.md) + * [配置器支持](zh-cn/reference_configurator_support.md) + * [info.json 格式](zh-cn/reference_info_json.md) -* [特性](features.md) - * [基本键码](keycodes_basic.md) - * [US ANSI控制码](keycodes_us_ansi_shifted.md) - * [量子键码](quantum_keycodes.md) - * [高级键码](feature_advanced_keycodes.md) - * [音频](feature_audio.md) - * [自动shift](feature_auto_shift.md) - * [背光](feature_backlight.md) - * [蓝牙](feature_bluetooth.md) - * [热改键](feature_bootmagic.md) - * [组合](feature_combo) - * [命令](feature_command.md) - * [拨动开关](feature_dip_switch.md) - * [动态宏指令](feature_dynamic_macros.md) - * [编码器](feature_encoders.md) - * [重音号Esc复合键](feature_grave_esc.md) - * [自锁键](feature_key_lock.md) - * [布局](feature_layouts.md) - * [前导键](feature_leader_key.md) - * [LED阵列](feature_led_matrix.md) - * [宏指令](feature_macros.md) - * [鼠标键](feature_mouse_keys.md) - * [一键功能](feature_advanced_keycodes.md#one-shot-keys) - * [指针设备](feature_pointing_device.md) - * [PS/2鼠标](feature_ps2_mouse.md) - * [RGB灯光](feature_rgblight.md) - * [RGB矩阵](feature_rgb_matrix.md) - * [空格候补换挡](feature_space_cadet_shift.md) - * [空格候补换挡回车](feature_space_cadet_shift_enter.md) - * [速录机](feature_stenography.md) - * [换手](feature_swap_hands.md) - * [多击键](feature_tap_dance.md) - * [终端](feature_terminal.md) - * [热敏打印机](feature_thermal_printer.md) - * [Unicode](feature_unicode.md) - * [用户空间](feature_userspace.md) - * [速度键](feature_velocikey.md) +* [特性](zh-cn/features.md) + * [基本键码](zh-cn/keycodes_basic.md) + * [US ANSI控制码](zh-cn/keycodes_us_ansi_shifted.md) + * [量子键码](zh-cn/quantum_keycodes.md) + * [高级键码](zh-cn/feature_advanced_keycodes.md) + * [音频](zh-cn/feature_audio.md) + * [自动shift](zh-cn/feature_auto_shift.md) + * [背光](zh-cn/feature_backlight.md) + * [蓝牙](zh-cn/feature_bluetooth.md) + * [热改键](zh-cn/feature_bootmagic.md) + * [组合](zh-cn/feature_combo) + * [命令](zh-cn/feature_command.md) + * [拨动开关](zh-cn/feature_dip_switch.md) + * [动态宏指令](zh-cn/feature_dynamic_macros.md) + * [编码器](zh-cn/feature_encoders.md) + * [重音号Esc复合键](zh-cn/feature_grave_esc.md) + * [自锁键](zh-cn/feature_key_lock.md) + * [布局](zh-cn/feature_layouts.md) + * [前导键](zh-cn/feature_leader_key.md) + * [LED阵列](zh-cn/feature_led_matrix.md) + * [宏指令](zh-cn/feature_macros.md) + * [鼠标键](zh-cn/feature_mouse_keys.md) + * [一键功能](zh-cn/feature_advanced_keycodes.md#one-shot-keys) + * [指针设备](zh-cn/feature_pointing_device.md) + * [PS/2鼠标](zh-cn/feature_ps2_mouse.md) + * [RGB灯光](zh-cn/feature_rgblight.md) + * [RGB矩阵](zh-cn/feature_rgb_matrix.md) + * [空格候补换挡](zh-cn/feature_space_cadet.md) + * [速录机](zh-cn/feature_stenography.md) + * [换手](zh-cn/feature_swap_hands.md) + * [多击键](zh-cn/feature_tap_dance.md) + * [终端](zh-cn/feature_terminal.md) + * [热敏打印机](zh-cn/feature_thermal_printer.md) + * [Unicode](zh-cn/feature_unicode.md) + * [用户空间](zh-cn/feature_userspace.md) + * [速度键](zh-cn/feature_velocikey.md) * 针对制造者和定制者 - * [手工连线指南](hand_wire.md) - * [ISP刷新指南](isp_flashing_guide.md) - * [ARM调试指南](arm_debugging.md) - * [I2C驱动](i2c_driver.md) - * [GPIO控制器](internals_gpio_control.md) - * [Proton C转换](proton_c_conversion.md) + * [手工连线指南](zh-cn/hand_wire.md) + * [ISP刷新指南](zh-cn/isp_flashing_guide.md) + * [ARM调试指南](zh-cn/arm_debugging.md) + * [I2C驱动](zh-cn/i2c_driver.md) + * [GPIO控制器](zh-cn/internals_gpio_control.md) + * [Proton C转换](zh-cn/proton_c_conversion.md) * 深入了解 - * [键盘如何工作](how_keyboards_work.md) - * [理解QMK](understanding_qmk.md) + * [键盘如何工作](zh-cn/how_keyboards_work.md) + * [理解QMK](zh-cn/understanding_qmk.md) * 其他话题 - * [使用Eclipse开发QMK](other_eclipse.md) - * [使用VSCode开发QMK](other_vscode.md) - * [支持](support.md) + * [使用Eclipse开发QMK](zh-cn/other_eclipse.md) + * [使用VSCode开发QMK](zh-cn/other_vscode.md) + * [支持](zh-cn/support.md) * QMK 内构 (正在编写) - * [定义](internals_defines.md) - * [输入回调寄存器](internals_input_callback_reg.md) - * [Midi设备](internals_midi_device.md) - * [Midi设备设置过程](internals_midi_device_setup_process.md) - * [Midi工具库](internals_midi_util.md) - * [发送函数](internals_send_functions.md) - * [Sysex工具](internals_sysex_tools.md) + * [定义](zh-cn/internals_defines.md) + * [输入回调寄存器](zh-cn/internals_input_callback_reg.md) + * [Midi设备](zh-cn/internals_midi_device.md) + * [Midi设备设置过程](zh-cn/internals_midi_device_setup_process.md) + * [Midi工具库](zh-cn/internals_midi_util.md) + * [发送函数](zh-cn/internals_send_functions.md) + * [Sysex工具](zh-cn/internals_sysex_tools.md) diff --git a/docs/zh/README.md b/docs/zh/README.md deleted file mode 100644 index bb9d1371f1e1..000000000000 --- a/docs/zh/README.md +++ /dev/null @@ -1,32 +0,0 @@ -# QMK鍵盤固件 - -[![當前版本](https://img.shields.io/github/tag/qmk/qmk_firmware.svg)](/~https://github.com/qmk/qmk_firmware/tags) -[![築邦](https://travis-ci.org/qmk/qmk_firmware.svg?branch=master)](https://travis-ci.org/qmk/qmk_firmware) -[![不和諧](https://img.shields.io/discord/440868230475677696.svg)](https://discord.gg/Uq7gcHh) -[![文檔狀態](https://img.shields.io/badge/docs-ready-orange.svg)](https://docs.qmk.fm) -[![GitHub的貢獻者](https://img.shields.io/github/contributors/qmk/qmk_firmware.svg)](/~https://github.com/qmk/qmk_firmware/pulse/monthly) -[![GitHub的叉](https://img.shields.io/github/forks/qmk/qmk_firmware.svg?style=social&label=Fork)](/~https://github.com/qmk/qmk_firmware/) - -## 什麼是QMK固件? - -QMK是一個由社群維護的開源鍵盤韌體,其中包含了QMK Toolbox、qmk.fm和其它文件。QMK韌體是以[tmk\_keyboard](http://github.com/tmk/tmk_keyboard)為基礎,讓一些有用的功能在Atmel AVR控制器實現,使用於[OLKB](https://olkb.com)、[ergodox EZ](http://www.ergodox-ez.com),和[Clueboard](http://clueboard.co/)的產品中。它也被移植到使用ChibiOS的ARM晶片上。你也可以用它來讓你徒手佈線,或是客製的鍵盤PCB發揮功能。 - -## 如何得到QMK - -如果你打算貢獻鍵盤佈局,鍵盤或功能QMK,最容易做的事情是[叉通過Github上爬行](/~https://github.com/qmk/qmk_firmware#fork-destination-box),和克隆你爬在本地進行更改,推動他們,然後打開從你的叉子[拉請求](/~https://github.com/qmk/qmk_firmware/pulls)。 - -否則,您可以直接下載([拉鍊](/~https://github.com/qmk/qmk_firmware/zipball/master) [焦油](/~https://github.com/qmk/qmk_firmware/tarball/master)),或者通過GIT中克隆它(`git@github.com:qmk/qmk_firmware.git`)或HTTP(`/~https://github.com/qmk/qmk_firmware.git`)。 - -## 如何編譯 - -你可以編譯之前,你需要[安裝環境](getting_started_build_tools.md)用於AVR或/和ARM開發。一旦完成,你會使用`make`命令建立一個鍵盤並用以下符號鍵盤佈局 - - make planck/rev4:default - -這將建立`rev4` `planck`的修訂與`default`鍵盤映射。並非所有鍵盤有一個修訂版(也稱為子項目或文件夾),在這種情況下,它可以被省略: - - make preonic:default - -## 如何赶近 - -QMK有很多[特點](features.md)探索和很好的協議[參考文獻](http://docs.qmk.fm)挖通的。大部分功能通過修改[鍵盤映射(keymap.md),並改變[鍵碼](keycodes.md)冤大頭。 diff --git a/docs/zh/_summary.md b/docs/zh/_summary.md deleted file mode 100644 index c16761292969..000000000000 --- a/docs/zh/_summary.md +++ /dev/null @@ -1,99 +0,0 @@ -* [完全指南菜鳥](zh/newbs.md) - * [入門](zh/newbs_getting_started.md) - * [構建第一個固件](zh/newbs_building_firmware.md) - * [刷新固件](zh/newbs_flashing.md) - * [測試和調試](zh/newbs_testing_debugging.md) - * [最佳實踐](zh/newbs_best_practices.md) - * [學習資源](zh/newbs_learn_more_resources.md) - -* [QMK基礎](zh/README.md) - * [QMK簡介](zh/getting_started_introduction.md) - * [特約QMK](zh/contributing.md) - * [如何使用Github上](zh/getting_started_github.md) - * [獲得幫助](zh/getting_started_getting_help.md) - -* [常問問題](zh/faq.md) - * [常問問題](zh/faq_general.md) - * [構建/編譯QMK](zh/faq_build.md) - * [調試/故障排除QMK](zh/faq_debug.md) - * [鍵盤佈局](zh/faq_keymap.md) - -* 詳細指南 - * [安裝編譯工具](zh/getting_started_build_tools.md) - * [流浪漢指南](zh/getting_started_vagrant.md) - * [構建/編譯器指令](zh/getting_started_make_guide.md) - * [刷新固件](zh/flashing.md) - * [定制功能](zh/custom_quantum_functions.md) - * [鍵盤映射概述](zh/keymap.md) - -* [硬件](zh/hardware.md) - * [AVR處理器](zh/hardware_avr.md) - * [司機](zh/hardware_drivers.md) - -* 參考 - * [Keyboard Guidelines](zh/hardware_keyboard_guidelines.md) - * [Config Options](zh/config_options.md) - * [Keycodes](zh/keycodes.md) - * [Documentation Best Practices](zh/documentation_best_practices.md) - * [Documentation Templates](zh/documentation_templates.md) - * [Glossary](zh/reference_glossary.md) - * [Unit Testing](zh/unit_testing.md) - * [Useful Functions](zh/ref_functions.md) - * [Configurator Support](zh/reference_configurator_support.md) - -* [特點](zh/features.md) - * [Basic Keycodes](zh/keycodes_basic.md) - * [Quantum Keycodes](zh/quantum_keycodes.md) - * [Advanced Keycodes](zh/feature_advanced_keycodes.md) - * [Audio](zh/feature_audio.md) - * [Auto Shift](zh/feature_auto_shift.md) - * [Backlight](zh/feature_backlight.md) - * [Bluetooth](zh/feature_bluetooth.md) - * [Bootmagic](zh/feature_bootmagic.md) - * [Combos](zh/feature_combo) - * [Command](zh/feature_command.md) - * [Dynamic Macros](zh/feature_dynamic_macros.md) - * [Encoders](zh/feature_encoders.md) - * [Grave Escape](zh/feature_grave_esc.md) - * [Key Lock](zh/feature_key_lock.md) - * [Layouts](zh/feature_layouts.md) - * [Leader Key](zh/feature_leader_key.md) - * [Macros](zh/feature_macros.md) - * [Mouse Keys](zh/feature_mouse_keys.md) - * [One Shot Keys](zh/feature_advanced_keycodes.md#one-shot-keys) - * [Pointing Device](zh/feature_pointing_device.md) - * [PS/2 Mouse](zh/feature_ps2_mouse.md) - * [RGB Lighting](zh/feature_rgblight.md) - * [RGB Matrix](zh/feature_rgb_matrix.md) - * [Space Cadet Shift](zh/feature_space_cadet_shift.md) - * [Space Cadet Shift Enter](zh/feature_space_cadet_shift_enter.md) - * [Stenography](zh/feature_stenography.md) - * [Swap Hands](zh/feature_swap_hands.md) - * [Tap Dance](zh/feature_tap_dance.md) - * [Terminal](zh/feature_terminal.md) - * [Thermal Printer](zh/feature_thermal_printer.md) - * [Unicode](zh/feature_unicode.md) - * [Userspace](zh/feature_userspace.md) - * [US ANSI Shifted Keys](zh/keycodes_us_ansi_shifted.md) - -* 對於製造商和遊戲模組 - * [Hand Wiring Guide](zh/hand_wire.md) - * [ISP Flashing Guide](zh/isp_flashing_guide.md) - * [ARM Debugging Guide](zh/arm_debugging.md) - * [I2C Driver](zh/i2c_driver.md) - -* 為了更深入的了解 - * [How Keyboards Work](zh/how_keyboards_work.md) - * [Understanding QMK](zh/understanding_qmk.md) - -* 其它主題 - * [Using Eclipse with QMK](zh/eclipse.md) - -* QMK內部(進行中) - * [Defines](zh/internals_defines.md) - * [Input Callback Reg](zh/internals_input_callback_reg.md) - * [Midi Device](zh/internals_midi_device.md) - * [Midi Device Setup Process](zh/internals_midi_device_setup_process.md) - * [Midi Util](zh/internals_midi_util.md) - * [Send Functions](zh/internals_send_functions.md) - * [Sysex Tools](zh/internals_sysex_tools.md) From da5b4ec7332d305dc6a2b07c1ac74aa3088f8bd5 Mon Sep 17 00:00:00 2001 From: Ethan Durrant <5387347+emdarcher@users.noreply.github.com> Date: Tue, 1 Oct 2019 13:50:54 -0600 Subject: [PATCH 013/316] editing fn layer and minimizing the Caps layer (#6850) --- .../40percentclub/mf68/keymaps/emdarcher/keymap.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/keyboards/40percentclub/mf68/keymaps/emdarcher/keymap.c b/keyboards/40percentclub/mf68/keymaps/emdarcher/keymap.c index 7015348e1e21..d35025f11343 100644 --- a/keyboards/40percentclub/mf68/keymaps/emdarcher/keymap.c +++ b/keyboards/40percentclub/mf68/keymaps/emdarcher/keymap.c @@ -18,10 +18,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), /* FN Layer */ [_FN1] = LAYOUT_68_ansi( - 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_BSPC, _______,KC_HOME, - _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK,KC_PAUS,_______, _______,KC_END, + 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_BSPC, KC_VOLU,KC_HOME, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK,KC_PAUS,_______, KC_VOLD,KC_END, X0 ,_______,_______,_______,_______,_______,_______,_______,_______,_______,KC_MRWD,KC_MFFD, _______, - _______ ,_______,KC_MPLY,KC_MSTP,KC_MPRV,KC_MNXT,KC_VOLD,KC_VOLU,KC_MUTE,_______,_______, _______, _______, + _______ ,_______,_______,KC_MSTP,KC_MPRV,KC_MNXT,KC_MPLY,KC_VOLD,KC_VOLU,KC_MUTE,_______, _______, _______, _______ ,_______ ,_______ , _______, _______,_______,_______, _______,_______,_______ ), @@ -30,8 +30,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_BSPC, KC_VOLU,KC_HOME, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, KC_VOLD,KC_END, _______,_______,_______,_______,_______,_______,KC_LEFT,KC_DOWN, KC_UP ,KC_RGHT,_______,_______, _______, - _______ ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, KC_MUTE, - _______ ,_______ ,_______ , _______, _______,_______,_______, KC_MPRV,KC_MPLY,KC_MNXT + _______ ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, + _______ ,_______ ,_______ , _______, _______,_______,_______, _______,_______,_______ ) }; From 0c5b3826d15015ec8aaee0b87a7a485f17158c6b Mon Sep 17 00:00:00 2001 From: worthlessowl <53881082+worthlessowl@users.noreply.github.com> Date: Wed, 2 Oct 2019 11:26:39 +0700 Subject: [PATCH 014/316] [Keyboard] Add Owlet60 Keyboard to qmk_firmware/keyboards/handwired (#6803) * first commit, skeleton code, not sure if working * Owlet 60 working firmware, json not sure * use json from kle to qmk converter * deleted temporary text from owlet60.h * owlet60 working oled and led firmware * moved owlet60 to handwired * updated readme.md * Revert "owlet60 working oled and led firmware" This reverts commit 27f9465aabd62d9ee445b477a02af348160532c1. * Revert "moved owlet60 to handwired" This reverts commit 9b8e8344fc303ddc4dcc3b023d4e9d05b89d5800. * revert changes, moved owlet60 to handwired, updated copyright blurb * fixed readme.md * removed duplicate items * resolve merge artifact * Update keyboards/handwired/owlet60/readme.md Co-Authored-By: fauxpark * check out merge artifacts with qmk master * Update keyboards/handwired/owlet60/matrix.c Co-Authored-By: fauxpark * Update keyboards/handwired/owlet60/matrix.c Co-Authored-By: fauxpark * Update keyboards/handwired/owlet60/matrix.c Co-Authored-By: fauxpark * Update keyboards/handwired/owlet60/matrix.c Co-Authored-By: fauxpark * removed redundant rule on oled_testing/rules.mk, refactored mux switching code on matrix.c --- keyboards/handwired/owlet60/config.h | 250 ++++++++++++++ keyboards/handwired/owlet60/info.json | 13 + .../owlet60/keymaps/default/config.h | 19 ++ .../owlet60/keymaps/default/keymap.c | 74 ++++ .../owlet60/keymaps/default/readme.md | 1 + .../owlet60/keymaps/oled_testing/config.h | 22 ++ .../owlet60/keymaps/oled_testing/customfont.c | 20 ++ .../owlet60/keymaps/oled_testing/keymap.c | 107 ++++++ .../owlet60/keymaps/oled_testing/readme.md | 1 + .../owlet60/keymaps/oled_testing/rules.mk | 1 + keyboards/handwired/owlet60/matrix.c | 315 ++++++++++++++++++ keyboards/handwired/owlet60/owlet60.c | 53 +++ keyboards/handwired/owlet60/owlet60.h | 63 ++++ keyboards/handwired/owlet60/readme.md | 13 + keyboards/handwired/owlet60/rules.mk | 48 +++ 15 files changed, 1000 insertions(+) create mode 100644 keyboards/handwired/owlet60/config.h create mode 100644 keyboards/handwired/owlet60/info.json create mode 100644 keyboards/handwired/owlet60/keymaps/default/config.h create mode 100644 keyboards/handwired/owlet60/keymaps/default/keymap.c create mode 100644 keyboards/handwired/owlet60/keymaps/default/readme.md create mode 100644 keyboards/handwired/owlet60/keymaps/oled_testing/config.h create mode 100644 keyboards/handwired/owlet60/keymaps/oled_testing/customfont.c create mode 100644 keyboards/handwired/owlet60/keymaps/oled_testing/keymap.c create mode 100644 keyboards/handwired/owlet60/keymaps/oled_testing/readme.md create mode 100644 keyboards/handwired/owlet60/keymaps/oled_testing/rules.mk create mode 100644 keyboards/handwired/owlet60/matrix.c create mode 100644 keyboards/handwired/owlet60/owlet60.c create mode 100644 keyboards/handwired/owlet60/owlet60.h create mode 100644 keyboards/handwired/owlet60/readme.md create mode 100644 keyboards/handwired/owlet60/rules.mk diff --git a/keyboards/handwired/owlet60/config.h b/keyboards/handwired/owlet60/config.h new file mode 100644 index 000000000000..29fd0b1e5739 --- /dev/null +++ b/keyboards/handwired/owlet60/config.h @@ -0,0 +1,250 @@ +/* +Copyright 2019 worthlessowl + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0xDA19 +#define DEVICE_VER 0x0001 +#define MANUFACTURER worthlessowl +#define PRODUCT Owlet60 +#define DESCRIPTION TGR Alice inspired 65 or 60 percent keyboard + +/* key matrix size */ +#define MATRIX_ROWS 9 +#define MATRIX_COLS 8 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS {B5, F4, F5, F6, F7, B1, B3, B2, B6} +#define MATRIX_COL_SELECT_PINS {D7, B4, E6} +#define MATRIX_COL_DATA_PIN {C6} +#define MATRIX_COL_PINS {} + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +//#define BACKLIGHT_PIN D3 +//#define BACKLIGHT_BREATHING +//#define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN D0 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 8 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 128 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +/*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 9 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * 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 + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/handwired/owlet60/info.json b/keyboards/handwired/owlet60/info.json new file mode 100644 index 000000000000..ea9437ee7c43 --- /dev/null +++ b/keyboards/handwired/owlet60/info.json @@ -0,0 +1,13 @@ +{"keyboard_name": "Owlet60", + "url": "https://https://qmk.fm/keyboards/", + "maintainer": "qmk", + "width": 19.5, + "height": 5, + "layouts": { + "LAYOUT_owlet60_full_bsp": { + "key_count": 72, + "layout": [{"label":"1", "x":0.5, "y":0}, {"label":"~", "x":2, "y":0}, {"label":"!", "x":3, "y":0}, {"label":"@", "x":4, "y":0}, {"label":"#", "x":5, "y":0}, {"label":"$", "x":6, "y":0}, {"label":"%", "x":7, "y":0}, {"label":"^", "x":8, "y":0}, {"label":"&", "x":9.75, "y":0}, {"label":"*", "x":10.75, "y":0}, {"label":"(", "x":11.75, "y":0}, {"label":")", "x":12.75, "y":0}, {"label":"_", "x":13.75, "y":0}, {"label":"+", "x":14.75, "y":0}, {"label":"Backspace", "x":15.75, "y":0, "w":2}, {"label":"PgUp", "x":17.75, "y":0}, {"label":"2", "x":0.25, "y":1}, {"label":"Tab", "x":1.75, "y":1, "w":1.5}, {"label":"Q", "x":3.25, "y":1}, {"label":"W", "x":4.25, "y":1}, {"label":"E", "x":5.25, "y":1}, {"label":"R", "x":6.25, "y":1}, {"label":"T", "x":7.25, "y":1}, {"label":"Y", "x":9.5, "y":1}, {"label":"U", "x":10.5, "y":1}, {"label":"I", "x":11.5, "y":1}, {"label":"O", "x":12.5, "y":1}, {"label":"P", "x":13.5, "y":1}, {"label":"{", "x":14.5, "y":1}, {"label":"}", "x":15.5, "y":1}, {"label":"|", "x":16.5, "y":1, "w":1.5}, {"label":"PgDn", "x":18, "y":1}, {"label":"3", "x":0, "y":2}, {"label":"Caps Lock", "x":1.5, "y":2, "w":1.75}, {"label":"A", "x":3.25, "y":2}, {"label":"S", "x":4.25, "y":2}, {"label":"D", "x":5.25, "y":2}, {"label":"F", "x":6.25, "y":2}, {"label":"G", "x":7.25, "y":2}, {"label":"H", "x":10, "y":2}, {"label":"J", "x":11, "y":2}, {"label":"K", "x":12, "y":2}, {"label":"L", "x":13, "y":2}, {"label":":", "x":14, "y":2}, {"label":"\"", "x":15, "y":2}, {"label":"Enter", "x":16, "y":2, "w":2.25}, {"label":"Home", "x":18.25, "y":2}, {"label":"Shift", "x":1.25, "y":3, "w":2.25}, {"label":"Z", "x":3.5, "y":3}, {"label":"X", "x":4.5, "y":3}, {"label":"C", "x":5.5, "y":3}, {"label":"V", "x":6.5, "y":3}, {"label":"B", "x":7.5, "y":3}, {"label":"B", "x":9.75, "y":3}, {"label":"N", "x":10.75, "y":3}, {"label":"M", "x":11.75, "y":3}, {"label":"<", "x":12.75, "y":3}, {"label":">", "x":13.75, "y":3}, {"label":"?", "x":14.75, "y":3}, {"label":"Shift", "x":15.75, "y":3, "w":1.75}, {"label":"Up", "x":17.5, "y":3}, {"label":"End", "x":18.5, "y":3}, {"label":"Ctrl", "x":1.25, "y":4, "w":1.5}, {"label":"Alt", "x":4.5, "y":4, "w":1.5}, {"x":6, "y":4, "w":2}, {"label":"Fn", "x":8, "y":4, "w":1.25}, {"x":9.75, "y":4, "w":2.75}, {"label":"Alt", "x":12.5, "y":4, "w":1.5}, {"label":"Left", "x":16.5, "y":4}, {"label":"Down", "x":17.5, "y":4}, {"label":"Right", "x":18.5, "y":4}] + } + } +} + \ No newline at end of file diff --git a/keyboards/handwired/owlet60/keymaps/default/config.h b/keyboards/handwired/owlet60/keymaps/default/config.h new file mode 100644 index 000000000000..f662fe7c93a9 --- /dev/null +++ b/keyboards/handwired/owlet60/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 worthlessowl + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/handwired/owlet60/keymaps/default/keymap.c b/keyboards/handwired/owlet60/keymaps/default/keymap.c new file mode 100644 index 000000000000..c850d1ff77a7 --- /dev/null +++ b/keyboards/handwired/owlet60/keymaps/default/keymap.c @@ -0,0 +1,74 @@ +/* Copyright 2019 worthlessowl + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_owlet60_full_bsp( + KC_1, 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_PGUP, \ + KC_2, 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_PGDOWN, \ + KC_3, 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_HOME, \ + KC_LSFT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, \ + KC_LCTRL, KC_LALT, KC_SPC, MO(1),KC_SPC, KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT \ + ), + + [1] = LAYOUT_owlet60_full_bsp( + KC_NO, 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_TRNS, RGB_TOG, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_MOD, \ + KC_NO, KC_NO,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,KC_NO, KC_NO, RGB_VAI, \ + KC_TRNS,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_N, KC_NO, KC_NO,KC_NO, KC_NO, KC_NO, KC_TRNS, RGB_VAD, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMKBEST: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + SEND_STRING("QMK is the best thing ever!"); + } else { + // when keycode QMKBEST is released + } + break; + case QMKURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/handwired/owlet60/keymaps/default/readme.md b/keyboards/handwired/owlet60/keymaps/default/readme.md new file mode 100644 index 000000000000..1d177ae10298 --- /dev/null +++ b/keyboards/handwired/owlet60/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for owlet60 \ No newline at end of file diff --git a/keyboards/handwired/owlet60/keymaps/oled_testing/config.h b/keyboards/handwired/owlet60/keymaps/oled_testing/config.h new file mode 100644 index 000000000000..884d36b690c4 --- /dev/null +++ b/keyboards/handwired/owlet60/keymaps/oled_testing/config.h @@ -0,0 +1,22 @@ +/* Copyright 2019 worthlessowl + * + * 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 . + */ + +#pragma once + +// place overrides here + + +#define OLED_FONT_H "customfont.c" diff --git a/keyboards/handwired/owlet60/keymaps/oled_testing/customfont.c b/keyboards/handwired/owlet60/keymaps/oled_testing/customfont.c new file mode 100644 index 000000000000..b7ad73bfa25d --- /dev/null +++ b/keyboards/handwired/owlet60/keymaps/oled_testing/customfont.c @@ -0,0 +1,20 @@ +#pragma once + +#ifdef __AVR__ +# include +# include +#elif defined(ESP8266) +# include +#else +# define PROGMEM +#endif + +// Helidox 8x6 font with QMK Firmware Logo +// Online editor: http://teripom.x0.com/ + +static const unsigned char font[] PROGMEM = { +0x00,0x00,0x00,0x00,0x00,0x00,0x3e,0x5b,0x4f,0x5b,0x3e,0x00,0x3e,0x6b,0x4f,0x6b,0x3e,0x00,0x1c,0x3e,0x7c,0x3e,0x1c,0x00,0x18,0x3c,0x7e,0x3c,0x18,0x00,0x1c,0x57,0x7d,0x57,0x1c,0x00,0x1c,0x5e,0x7f,0x5e,0x1c,0x00,0x00,0x18,0x3c,0x18,0x00,0x00,0xff,0xe7,0xc3,0xe7,0xff,0x00,0x00,0x18,0x24,0x18,0x00,0x00,0xff,0xe7,0xdb,0xe7,0xff,0x00,0x30,0x48,0x3a,0x06,0x0e,0x00,0x26,0x29,0x79,0x29,0x26,0x00,0x40,0x7f,0x05,0x05,0x07,0x00,0x40,0x7f,0x05,0x25,0x3f,0x00,0x5a,0x3c,0xe7,0x3c,0x5a,0x00,0x7f,0x3e,0x1c,0x1c,0x08,0x00,0x08,0x1c,0x1c,0x3e,0x7f,0x00,0x14,0x22,0x7f,0x22,0x14,0x00,0x5f,0x5f,0x00,0x5f,0x5f,0x00,0x06,0x09,0x7f,0x01,0x7f,0x00,0x00,0x66,0x89,0x95,0x6a,0x00,0x60,0x60,0x60,0x60,0x60,0x00,0x94,0xa2,0xff,0xa2,0x94,0x00,0x08,0x04,0x7e,0x04,0x08,0x00,0x10,0x20,0x7e,0x20,0x10,0x00,0x08,0x08,0x2a,0x1c,0x08,0x00,0x08,0x1c,0x2a,0x08,0x08,0x00,0x1e,0x10,0x10,0x10,0x10,0x00,0x0c,0x1e,0x0c,0x1e,0x0c,0x00,0x30,0x38,0x3e,0x38,0x30,0x00,0x06,0x0e,0x3e,0x0e,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5f,0x00,0x00,0x00,0x00,0x07,0x00,0x07,0x00,0x00,0x14,0x7f,0x14,0x7f,0x14,0x00,0x24,0x2a,0x7f,0x2a,0x12,0x00,0x23,0x13,0x08,0x64,0x62,0x00,0x36,0x49,0x56,0x20,0x50,0x00,0x00,0x08,0x07,0x03,0x00,0x00,0x00,0x1c,0x22,0x41,0x00,0x00,0x00,0x41,0x22,0x1c,0x00,0x00,0x2a,0x1c,0x7f,0x1c,0x2a,0x00,0x08,0x08,0x3e,0x08,0x08,0x00,0x00,0x80,0x70,0x30,0x00,0x00,0x08,0x08,0x08,0x08,0x08,0x00,0x00,0x00,0x60,0x60,0x00,0x00,0x20,0x10,0x08,0x04,0x02,0x00,0x3e,0x51,0x49,0x45,0x3e,0x00,0x00,0x42,0x7f,0x40,0x00,0x00,0x72,0x49,0x49,0x49,0x46,0x00,0x21,0x41,0x49,0x4d,0x33,0x00,0x18,0x14,0x12,0x7f,0x10,0x00,0x27,0x45,0x45,0x45,0x39,0x00,0x3c,0x4a,0x49,0x49,0x31,0x00,0x41,0x21,0x11,0x09,0x07,0x00,0x36,0x49,0x49,0x49,0x36,0x00,0x46,0x49,0x49,0x29,0x1e,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0x00,0x40,0x34,0x00,0x00,0x00,0x00,0x08,0x14,0x22,0x41,0x00,0x14,0x14,0x14,0x14,0x14,0x00,0x00,0x41,0x22,0x14,0x08,0x00,0x02,0x01,0x59,0x09,0x06,0x00,0x3e,0x41,0x5d,0x59,0x4e,0x00,0x7c,0x12,0x11,0x12,0x7c,0x00,0x7f,0x49,0x49,0x49, +0x36,0x00,0x3e,0x41,0x41,0x41,0x22,0x00,0x7f,0x41,0x41,0x41,0x3e,0x00,0x7f,0x49,0x49,0x49,0x41,0x00,0x7f,0x09,0x09,0x09,0x01,0x00,0x3e,0x41,0x41,0x51,0x73,0x00,0x7f,0x08,0x08,0x08,0x7f,0x00,0x00,0x41,0x7f,0x41,0x00,0x00,0x20,0x40,0x41,0x3f,0x01,0x00,0x7f,0x08,0x14,0x22,0x41,0x00,0x7f,0x40,0x40,0x40,0x40,0x00,0x7f,0x02,0x1c,0x02,0x7f,0x00,0x7f,0x04,0x08,0x10,0x7f,0x00,0x3e,0x41,0x41,0x41,0x3e,0x00,0x7f,0x09,0x09,0x09,0x06,0x00,0x3e,0x41,0x51,0x21,0x5e,0x00,0x7f,0x09,0x19,0x29,0x46,0x00,0x26,0x49,0x49,0x49,0x32,0x00,0x03,0x01,0x7f,0x01,0x03,0x00,0x3f,0x40,0x40,0x40,0x3f,0x00,0x1f,0x20,0x40,0x20,0x1f,0x00,0x3f,0x40,0x38,0x40,0x3f,0x00,0x63,0x14,0x08,0x14,0x63,0x00,0x03,0x04,0x78,0x04,0x03,0x00,0x61,0x59,0x49,0x4d,0x43,0x00,0x00,0x7f,0x41,0x41,0x41,0x00,0x02,0x04,0x08,0x10,0x20,0x00,0x00,0x41,0x41,0x41,0x7f,0x00,0x04,0x02,0x01,0x02,0x04,0x00,0x40,0x40,0x40,0x40,0x40,0x00,0x00,0x03,0x07,0x08,0x00,0x00,0x20,0x54,0x54,0x78,0x40,0x00,0x7f,0x28,0x44,0x44,0x38,0x00,0x38,0x44,0x44,0x44,0x28,0x00,0x38,0x44,0x44,0x28,0x7f,0x00,0x38,0x54,0x54,0x54,0x18,0x00,0x00,0x08,0x7e,0x09,0x02,0x00,0x18,0xa4,0xa4,0x9c,0x78,0x00,0x7f,0x08,0x04,0x04,0x78,0x00,0x00,0x44,0x7d,0x40,0x00,0x00,0x20,0x40,0x40,0x3d,0x00,0x00,0x7f,0x10,0x28,0x44,0x00,0x00,0x00,0x41,0x7f,0x40,0x00,0x00,0x7c,0x04,0x78,0x04,0x78,0x00,0x7c,0x08,0x04,0x04,0x78,0x00,0x38,0x44,0x44,0x44,0x38,0x00,0xfc,0x18,0x24,0x24,0x18,0x00,0x18,0x24,0x24,0x18,0xfc,0x00,0x7c,0x08,0x04,0x04,0x08,0x00,0x48,0x54,0x54,0x54,0x24,0x00,0x04,0x04,0x3f,0x44,0x24,0x00,0x3c,0x40,0x40,0x20,0x7c,0x00,0x1c,0x20,0x40,0x20,0x1c,0x00,0x3c,0x40,0x30,0x40,0x3c,0x00,0x44,0x28,0x10,0x28,0x44,0x00,0x4c,0x90,0x90,0x90,0x7c,0x00,0x44,0x64,0x54,0x4c,0x44,0x00,0x00,0x08,0x36,0x41,0x00,0x00,0x00,0x00,0x77,0x00,0x00,0x00,0x00,0x41,0x36,0x08,0x00,0x00,0x02,0x01,0x02,0x04,0x02,0x00,0x3c,0x26,0x23,0x26,0x3c,0x00,0x00,0x00,0x00,0x80,0xe0,0xe0,0xe0,0xe0,0x60,0x60,0xe0,0xe0,0xc0,0x80,0x00,0x00,0x00,0x04,0x0c,0x1c,0x1c,0x1c,0x18,0x38,0x38,0x78,0x70,0x70,0xf0,0xa0,0xa0,0x08, +0x18,0x18,0x18,0x1c,0x1c,0x1c,0x1c,0x1c,0x18,0x18,0x18,0xf8,0xf8,0xfc,0xf0,0x10,0x10,0x00,0x00,0x80,0xe0,0xf8,0xf0,0x70,0x70,0x70,0x70,0x60,0x60,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xc0,0xc0,0xc0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xf8,0xfc,0xfe,0xde,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xf0,0xf8,0xfc,0x3e,0x1e,0x06,0x01,0x00,0x00,0x00,0x7f,0x41,0x41,0x41,0x7f,0x00,0x7f,0x41,0x41,0x41,0x7f,0x00,0x00,0x80,0xc0,0xe0,0x7e,0x5b,0x4f,0x5b,0xfe,0xc0,0x00,0x00,0xc0,0x00,0xdc,0xd7,0xde,0xde,0xde,0xd7,0xdc,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0x7f,0xff,0xf3,0xe0,0xc0,0xc0,0xc0,0xf3,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x20,0x70,0x78,0x78,0xf8,0xf8,0xdc,0xcc,0x8c,0x84,0x07,0x03,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0x00,0x00,0x00,0xc0,0xfc,0xff,0x1f,0x03,0x01,0x00,0x00,0xc0,0xe0,0xfc,0x7f,0x1f,0x0f,0x03,0x80,0xe0,0xfc,0xff,0x1f,0x03,0x00,0x00,0x00,0x00,0x00,0xe0,0xfc,0xff,0x3f,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x0f,0x0f,0x0f,0x0e,0x1e,0x1e,0x0e,0x0c,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x69,0x69,0x6f,0x26,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x0f,0x1f,0x3f,0x3c,0x78,0x70,0x60,0x00,0x00,0x00,0x7f,0x41,0x41,0x41,0x7f,0x00,0x7f,0x41,0x41,0x41,0x7f,0x00,0x30,0x7b,0x7f,0x78,0x30,0x20,0x20,0x30,0x78,0x7f,0x3b,0x00,0x03,0x00,0x0f,0x7f,0x0f,0x0f,0x0f,0x7f,0x0f,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x03,0x03,0x03,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x38,0x38,0x1c,0x1c,0x0e,0x0e,0x07,0x03,0x03,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x03,0x01,0x00, +0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x00,0x00,0x0e,0x0f,0x07,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x07,0x03,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +}; diff --git a/keyboards/handwired/owlet60/keymaps/oled_testing/keymap.c b/keyboards/handwired/owlet60/keymaps/oled_testing/keymap.c new file mode 100644 index 000000000000..3493a9d6c5c2 --- /dev/null +++ b/keyboards/handwired/owlet60/keymaps/oled_testing/keymap.c @@ -0,0 +1,107 @@ +/* Copyright 2019 worthlessowl + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_owlet60_full_bsp( + KC_1, 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_PGUP, \ + KC_2, 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_PGDOWN, \ + KC_3, 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_HOME, \ + KC_LSFT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, \ + KC_LCTRL, KC_LALT, KC_SPC, MO(1),KC_SPC, KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT \ + ), + + [1] = LAYOUT_owlet60_full_bsp( + KC_NO, 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_TRNS, RGB_TOG, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_MOD, \ + KC_NO, KC_NO,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,KC_NO, KC_NO, RGB_VAI, \ + KC_TRNS,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_N, KC_NO, KC_NO,KC_NO, KC_NO, KC_NO, KC_TRNS, RGB_VAD, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMKBEST: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + SEND_STRING("QMK is the best thing ever!"); + } else { + // when keycode QMKBEST is released + } + break; + case QMKURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} + +#ifdef OLED_DRIVER_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + //return OLED_ROTATION_180; + return OLED_ROTATION_180; +} +void oled_task_user(void) { + // Host Keyboard Layer Status + /*oled_write_P(PSTR("Lyr: "), false); + switch (get_highest_layer(layer_state)) { + case 0: + oled_write_P(PSTR("Alpha\n"), false); + break; + case 1: + oled_write_P(PSTR("FN\n"), false); + break; + default: + // Or use the write_ln shortcut over adding '\n' to the end of your string + oled_write_ln_P(PSTR("Undefined"), false); + } + + uint8_t led_usb_state = host_keyboard_leds(); + oled_write_P(led_usb_state & (1< +Cole Markham + +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 . +*/ + +/* + * scan matrix + */ +#include +#include +#include "owlet60.h" +#include "wait.h" +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "config.h" +#include "timer.h" + +#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) +#elif (MATRIX_COLS <= 16) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop16(matrix[i]) +# define ROW_SHIFTER ((uint16_t)1) +#elif (MATRIX_COLS <= 32) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop32(matrix[i]) +# define ROW_SHIFTER ((uint32_t)1) +#endif + +static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; +static const uint8_t col_select_pins[3] = MATRIX_COL_SELECT_PINS; +static const uint8_t dat_pin = MATRIX_COL_DATA_PIN; + +/* matrix state(1:on, 0:off) */ +static matrix_row_t raw_matrix[MATRIX_ROWS]; //raw values +static matrix_row_t matrix[MATRIX_ROWS]; //raw values + +/* 2d array containing binary representation of its index */ +static const uint8_t num_in_binary[8][3] = { + {0, 0, 0}, + {0, 0, 1}, + {0, 1, 0}, + {0, 1, 1}, + {1, 0, 0}, + {1, 0, 1}, + {1, 1, 0}, + {1, 1, 1}, +}; + +static void select_col_analog(uint8_t col); +static void mux_pin_control(const uint8_t binary[]); +void debounce_init(uint8_t num_rows); +void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed); + + +__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; +} + +inline +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & ((matrix_row_t)1<. + */ +#include "owlet60.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + + +/* +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(); + oled_task_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/handwired/owlet60/owlet60.h b/keyboards/handwired/owlet60/owlet60.h new file mode 100644 index 000000000000..3a21e75d47ea --- /dev/null +++ b/keyboards/handwired/owlet60/owlet60.h @@ -0,0 +1,63 @@ +/* Copyright 2019 worthlessowl + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_owlet60_all( \ + k50, k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, \ + k51, k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, \ + k52, 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, k3e, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48 \ +) { \ + { k07, k11, k13, k15, k50, k19, k1b, k1d}, \ + { k17, k21, k23, k25, k51, k29, k2b, k3d}, \ + { k27, k31, k33, k35, k52, k39, k3b, k47}, \ + { k37, k41, k42, k43, k40, k45, k46, k48}, \ + { k38, k32, k34, k44, k30, k3a, k3c, k3e}, \ + { k28, k22, k24, k36, k20, k2a, k2c, k2d}, \ + { k18, k12, k14, k26, k10, k1a, k1c, k1e}, \ + { k08, k02, k04, k16, k00, k0a, k0c, k0f}, \ + { k09, k03, k05, k06, k01, k0b, k0d, k0e} \ +} + +// swap col 1 with col 5, rearrange col 8 +#define LAYOUT_owlet60_full_bsp( \ + k50, k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0f, \ + k51, k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, \ + k52, 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, k3e, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48 \ +) { \ + { k50, k11, k13, k15, k07, k19, k1b, k1d}, \ + { k51, k21, k23, k25, k17, k29, k2b, k3d}, \ + { k52, k31, k33, k35, k27, k39, k3b, k47}, \ + { k40, k41, k42, k43, k37, k45, k46, k48}, \ + { k30, k32, k34, k44, k38, k3a, k3c, k3e}, \ + { k20, k22, k24, k36, k28, k2a, k2c, k2d}, \ + { k10, k12, k14, k26, k18, k1a, k1c, k1e}, \ + { k00, k02, k04, k16, k08, k0a, k0c, k0f}, \ + { k01, k03, k05, k06, k09, k0b, k0d, KC_NO} \ +} diff --git a/keyboards/handwired/owlet60/readme.md b/keyboards/handwired/owlet60/readme.md new file mode 100644 index 000000000000..05439e7eb4f0 --- /dev/null +++ b/keyboards/handwired/owlet60/readme.md @@ -0,0 +1,13 @@ +# owlet60 + +Owlet60, a TGR Alice inspired 60%-65% keyboard. Powered with a Pro Micro and 4051 mux multiplexed matrix. PCB can be permanently snapped off for a 60% layout. + +Keyboard Maintainer: [worthlessowl](/~https://github.com/worthlessowl) +Hardware Supported: Owlet60 PCB, standard Pro Micro +Hardware Availability: Keyboard is running on a local pre order as of 24 September 2019, limited quantity + +Make example for this keyboard (after setting up your build environment): + + make handwired/owlet60:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/handwired/owlet60/rules.mk b/keyboards/handwired/owlet60/rules.mk new file mode 100644 index 000000000000..6d8bdfd1c632 --- /dev/null +++ b/keyboards/handwired/owlet60/rules.mk @@ -0,0 +1,48 @@ +SRC += matrix.c + +# MCU name +MCU = atmega32u4 + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = caterina + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # 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 +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +CUSTOM_MATRIX = yes +OLED_DRIVER_ENABLE = no \ No newline at end of file From fa8359fa1af7177a4818dd31f37cb5f8fe14f362 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Lindstr=C3=B6m?= Date: Wed, 2 Oct 2019 14:11:39 +0200 Subject: [PATCH 015/316] [Keymap] Add antonlindstrom iris keymap (#6853) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This adds a keymap for the Iris keymap for antonlindstrom. The keymap is based on the swedish keymap and thus contains the åäö characters. --- .../iris/keymaps/antonlindstrom/config.h | 41 ++++++++++++ .../iris/keymaps/antonlindstrom/keymap.c | 66 +++++++++++++++++++ .../iris/keymaps/antonlindstrom/readme.md | 5 ++ .../iris/keymaps/antonlindstrom/rules.mk | 2 + 4 files changed, 114 insertions(+) create mode 100644 keyboards/keebio/iris/keymaps/antonlindstrom/config.h create mode 100644 keyboards/keebio/iris/keymaps/antonlindstrom/keymap.c create mode 100644 keyboards/keebio/iris/keymaps/antonlindstrom/readme.md create mode 100644 keyboards/keebio/iris/keymaps/antonlindstrom/rules.mk diff --git a/keyboards/keebio/iris/keymaps/antonlindstrom/config.h b/keyboards/keebio/iris/keymaps/antonlindstrom/config.h new file mode 100644 index 000000000000..0997e72512cf --- /dev/null +++ b/keyboards/keebio/iris/keymaps/antonlindstrom/config.h @@ -0,0 +1,41 @@ +/* +Copyright 2019 Anton Lindström + +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 . +*/ + +#pragma once + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +// #define MASTER_LEFT +// #define MASTER_RIGHT +#define EE_HANDS + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS + +#ifdef RGBLIGHT_ENABLE +#define RGBLIGHT_SLEEP // Turn off RGB light when host is asleep. +#endif + +#define RGBLED_NUM 12 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 diff --git a/keyboards/keebio/iris/keymaps/antonlindstrom/keymap.c b/keyboards/keebio/iris/keymaps/antonlindstrom/keymap.c new file mode 100644 index 000000000000..fd953bab3d3f --- /dev/null +++ b/keyboards/keebio/iris/keymaps/antonlindstrom/keymap.c @@ -0,0 +1,66 @@ +#include QMK_KEYBOARD_H +#include "keymap_swedish.h" + +#define _QWERTY 0 +#define _LOWER 1 +#define _RAISE 2 + +#define KC_ KC_TRNS + +#define RGB + +#define KC_LOWR MO(_LOWER) +#define KC_RASE MO(_RAISE) +#define KC_RST RESET + +#define KC_AA SE_AA +#define KC_AE SE_AE +#define KC_OE SE_OSLH + +#define KC_LBR SE_LBRC +#define KC_RBR SE_RBRC + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT_kc( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + TAB , Q , W , E , R , T , Y , U , I , O , P , AA , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + LSFT, A , S , D , F , G , H , J , K , L , OE , AE , + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + LCTL, Z , X , C , V , B ,LBR ,RBR , N , M ,COMM,DOT ,SLSH,MINS, + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + LGUI,LOWR,SPC , ENT ,RASE,LALT + // `----+----+----' `----+----+----' + ), + + [_LOWER] = LAYOUT( + //,-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------. + SE_TILD,KC_EXLM,SE_AT ,KC_HASH,SE_DLR ,KC_PERC, SE_CIRC,SE_AMPR,SE_ASTR,SE_SLSH,SE_LPRN,SE_RPRN, + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + SE_ACUT,RGB_TOG,RGB_MOD,RGB_M_B,RGB_M_K,_______, _______,_______,_______,_______,_______,SE_ASTR, + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + _______,_______,SE_LESS,SE_GRTR,SE_PIPE,SE_SLSH, SE_BSLS,SE_LCBR,SE_RCBR,SE_LBRC,SE_RBRC,SE_APOS, + //|-------+-------+-------+-------+-------+-------+-------. ,-------|-------+-------+-------+-------+-------+-------| + _______,KC_NUBS,_______,_______,_______,_______,SE_LCBR, SE_RCBR,_______,_______,_______,_______,_______,_______, + //`-------+-------+-------+--+----+-------+-------+-------/ \-------+-------+-------+-------+-------+-------+-------' + _______,_______,_______, _______,_______,_______ + // `-------+-------+-------' `-------+-------+-------' + ), + + [_RAISE] = LAYOUT( + //,-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------. + KC_F12 ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_F11 , + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + SE_GRV ,_______,_______,_______,_______,_______, _______,KC_PGUP,KC_UP ,KC_PGDN,KC_PSCR,KC_PAUS, + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + _______,_______,_______,_______,_______,_______, KC_HOME,KC_LEFT,KC_DOWN,KC_RGHT,KC_INS ,KC_DEL , + //|-------+-------+-------+-------+-------+-------+-------. ,-------|-------+-------+-------+-------+-------+-------| + _______,_______,_______,_______,_______,_______,KC_VOLU, KC_VOLD,_______,_______,_______,_______,_______,_______, + //`-------+-------+-------+--+----+-------+-------+-------/ \-------+-------+-------+-------+-------+-------+-------' + _______,_______,_______, _______,_______,_______ + // `-------+-------+-------' `-------+-------+-------' + ) +}; diff --git a/keyboards/keebio/iris/keymaps/antonlindstrom/readme.md b/keyboards/keebio/iris/keymaps/antonlindstrom/readme.md new file mode 100644 index 000000000000..ac929068e5e4 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/antonlindstrom/readme.md @@ -0,0 +1,5 @@ +# Iris rev3 + +Layout for Iris rev3 with a layer for programming and one for navigation. The +keymap is based on a swedish one and contains the åäö characters and the +swedish mappings. diff --git a/keyboards/keebio/iris/keymaps/antonlindstrom/rules.mk b/keyboards/keebio/iris/keymaps/antonlindstrom/rules.mk new file mode 100644 index 000000000000..d7463419b4fe --- /dev/null +++ b/keyboards/keebio/iris/keymaps/antonlindstrom/rules.mk @@ -0,0 +1,2 @@ +RGBLIGHT_ENABLE = yes +BACKLIGHT_ENABLE = yes From 482ec79e5997b7ecab5102a0536fa3908ab68d02 Mon Sep 17 00:00:00 2001 From: Richard Baptist Date: Wed, 2 Oct 2019 18:39:43 +0200 Subject: [PATCH 016/316] [Keymap] Add personal CRKBD keymap (#6843) * Add personal keymap * Additional readme note * Fix typo's in readme * Additional layer key info in readme * Update keyboards/crkbd/keymaps/rpbaptist/config.h Co-Authored-By: Drashna Jaelre * Update keyboards/crkbd/keymaps/rpbaptist/rules.mk Co-Authored-By: Drashna Jaelre * Update keyboards/crkbd/keymaps/rpbaptist/keymap.c Co-Authored-By: fauxpark * Remove redundant config * Remove disabling of NO_ACTION_MACRO and NO_ACTION_FUNCTION * Remove layer keycode macros * Use layer_state_t instead of uint32_t Co-Authored-By: Drashna Jaelre * Use get_highest_layer instead of biton32 Co-Authored-By: Drashna Jaelre * OLED_ROTATION_90 instead of 180 Co-Authored-By: Drashna Jaelre * Use get_highest_layer instead of biton32 Co-Authored-By: Drashna Jaelre * Use get_highest_layer instead of biton32 Co-Authored-By: Drashna Jaelre * Revert "OLED_ROTATION_90 instead of 180" This reverts commit f14a4353ab6719c6e4e8974a4d17f8b91940de56. It messed up the logo on slave * Use IS_LED_ON function to check LED status Co-Authored-By: fauxpark --- keyboards/crkbd/keymaps/rpbaptist/config.h | 112 +++++++++ keyboards/crkbd/keymaps/rpbaptist/glcdfont.c | 240 +++++++++++++++++++ keyboards/crkbd/keymaps/rpbaptist/keymap.c | 234 ++++++++++++++++++ keyboards/crkbd/keymaps/rpbaptist/readme.md | 57 +++++ keyboards/crkbd/keymaps/rpbaptist/rules.mk | 34 +++ 5 files changed, 677 insertions(+) create mode 100644 keyboards/crkbd/keymaps/rpbaptist/config.h create mode 100644 keyboards/crkbd/keymaps/rpbaptist/glcdfont.c create mode 100644 keyboards/crkbd/keymaps/rpbaptist/keymap.c create mode 100644 keyboards/crkbd/keymaps/rpbaptist/readme.md create mode 100644 keyboards/crkbd/keymaps/rpbaptist/rules.mk diff --git a/keyboards/crkbd/keymaps/rpbaptist/config.h b/keyboards/crkbd/keymaps/rpbaptist/config.h new file mode 100644 index 000000000000..da47524a89e5 --- /dev/null +++ b/keyboards/crkbd/keymaps/rpbaptist/config.h @@ -0,0 +1,112 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + +//#define USE_MATRIX_I2C + +/* Select hand configuration */ +#define EE_HANDS + +#undef SSD1306OLED + +#define USE_SERIAL_PD2 + +#define FORCE_NKRO + +#define QMK_ESC_OUTPUT F4 // usually COL +#define QMK_ESC_INPUT D4 // usually ROW +#define QMK_LED B0 + +#ifdef RGB_MATRIX_ENABLE + #define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended + #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 + + #define RGB_MATRIX_HUE_STEP 10 + #define RGB_MATRIX_SAT_STEP 15 + #define RGB_MATRIX_VAL_STEP 16 + #define RGB_MATRIX_SPD_STEP 10 + + #define DISABLE_RGB_MATRIX_ALPHAS_MODS + #define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN + #define DISABLE_RGB_MATRIX_BREATHING + #define DISABLE_RGB_MATRIX_BAND_SAT + #define DISABLE_RGB_MATRIX_BAND_VAL + #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT + #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL + #define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT + #define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL + // #define DISABLE_RGB_MATRIX_CYCLE_ALL + #define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT + #define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN + #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN + #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL + #define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON + #define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL + #define DISABLE_RGB_MATRIX_CYCLE_SPIRAL + // #define DISABLE_RGB_MATRIX_DUAL_BEACON + #define DISABLE_RGB_MATRIX_RAINBOW_BEACON + #define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS + #define DISABLE_RGB_MATRIX_RAINDROPS + #define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS + + #define RGB_MATRIX_FRAMEBUFFER_EFFECTS + // #define DISABLE_RGB_MATRIX_TYPING_HEATMAP + #define DISABLE_RGB_MATRIX_DIGITAL_RAIN + + #define RGB_MATRIX_KEYPRESSES // reacts to keypresses + + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS + // #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS + + // #define DISABLE_RGB_MATRIX_SPLASH + #define DISABLE_RGB_MATRIX_MULTISPLASH + #define DISABLE_RGB_MATRIX_SOLID_SPLASH + #define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH + + #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_TYPING_HEATMAP +#endif + +#define TAPPING_TERM 150 +// #define PERMISSIVE_HOLD +#define IGNORE_MOD_TAP_INTERRUPT +// #define RETRO_TAPPING + +#define TAPPING_TOGGLE 2 + +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_INTERVAL 16 +#define MOUSEKEY_MAX_SPEED 6 +#define MOUSEKEY_TIME_TO_MAX 32 +#define MOUSEKEY_WHEEL_MAX_SPEED 4 +#define MOUSEKEY_WHEEL_TIME_TO_MAX 40 + +#define OLED_FONT_H "keyboards/crkbd/keymaps/rpbaptist/glcdfont.c" + +#define NO_ACTION_ONESHOT + +#undef PRODUCT +#define PRODUCT Corne Keyboard diff --git a/keyboards/crkbd/keymaps/rpbaptist/glcdfont.c b/keyboards/crkbd/keymaps/rpbaptist/glcdfont.c new file mode 100644 index 000000000000..044c16d9c16b --- /dev/null +++ b/keyboards/crkbd/keymaps/rpbaptist/glcdfont.c @@ -0,0 +1,240 @@ +#pragma once + +#ifdef __AVR__ + #include + #include +#elif defined(ESP8266) + #include +#else + #define PROGMEM +#endif + +// Helidox 8x6 font with QMK Firmware Logo +// Online editor: http://teripom.x0.com/ + +const unsigned char font[] PROGMEM = { +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00, +0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00, +0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00, +0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00, +0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00, +0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00, +0x00, 0x18, 0x3C, 0x18, 0x00, 0x00, +0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, +0x00, 0x18, 0x24, 0x18, 0x00, 0x00, +0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00, +0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00, +0x26, 0x29, 0x79, 0x29, 0x26, 0x00, +0x40, 0x7F, 0x05, 0x05, 0x07, 0x00, +0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00, +0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00, +0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00, +0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00, +0x14, 0x22, 0x7F, 0x22, 0x14, 0x00, +0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00, +0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, +0x00, 0x66, 0x89, 0x95, 0x6A, 0x00, +0x60, 0x60, 0x60, 0x60, 0x60, 0x00, +0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00, +0x08, 0x04, 0x7E, 0x04, 0x08, 0x00, +0x10, 0x20, 0x7E, 0x20, 0x10, 0x00, +0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00, +0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00, +0x1E, 0x10, 0x10, 0x10, 0x10, 0x00, +0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00, +0x30, 0x38, 0x3E, 0x38, 0x30, 0x00, +0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, +0x00, 0x07, 0x00, 0x07, 0x00, 0x00, +0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00, +0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00, +0x23, 0x13, 0x08, 0x64, 0x62, 0x00, +0x36, 0x49, 0x56, 0x20, 0x50, 0x00, +0x00, 0x08, 0x07, 0x03, 0x00, 0x00, +0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, +0x00, 0x41, 0x22, 0x1C, 0x00, 0x00, +0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00, +0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, +0x00, 0x80, 0x70, 0x30, 0x00, 0x00, +0x08, 0x08, 0x08, 0x08, 0x08, 0x00, +0x00, 0x00, 0x60, 0x60, 0x00, 0x00, +0x20, 0x10, 0x08, 0x04, 0x02, 0x00, +0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, +0x00, 0x42, 0x7F, 0x40, 0x00, 0x00, +0x72, 0x49, 0x49, 0x49, 0x46, 0x00, +0x21, 0x41, 0x49, 0x4D, 0x33, 0x00, +0x18, 0x14, 0x12, 0x7F, 0x10, 0x00, +0x27, 0x45, 0x45, 0x45, 0x39, 0x00, +0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00, +0x41, 0x21, 0x11, 0x09, 0x07, 0x00, +0x36, 0x49, 0x49, 0x49, 0x36, 0x00, +0x46, 0x49, 0x49, 0x29, 0x1E, 0x00, +0x00, 0x00, 0x14, 0x00, 0x00, 0x00, +0x00, 0x40, 0x34, 0x00, 0x00, 0x00, +0x00, 0x08, 0x14, 0x22, 0x41, 0x00, +0x14, 0x14, 0x14, 0x14, 0x14, 0x00, +0x00, 0x41, 0x22, 0x14, 0x08, 0x00, +0x02, 0x01, 0x59, 0x09, 0x06, 0x00, +0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00, +0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00, +0x7F, 0x49, 0x49, 0x49, 0x36, 0x00, +0x3E, 0x41, 0x41, 0x41, 0x22, 0x00, +0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00, +0x7F, 0x49, 0x49, 0x49, 0x41, 0x00, +0x7F, 0x09, 0x09, 0x09, 0x01, 0x00, +0x3E, 0x41, 0x41, 0x51, 0x73, 0x00, +0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, +0x00, 0x41, 0x7F, 0x41, 0x00, 0x00, +0x20, 0x40, 0x41, 0x3F, 0x01, 0x00, +0x7F, 0x08, 0x14, 0x22, 0x41, 0x00, +0x7F, 0x40, 0x40, 0x40, 0x40, 0x00, +0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00, +0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00, +0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00, +0x7F, 0x09, 0x09, 0x09, 0x06, 0x00, +0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00, +0x7F, 0x09, 0x19, 0x29, 0x46, 0x00, +0x26, 0x49, 0x49, 0x49, 0x32, 0x00, +0x03, 0x01, 0x7F, 0x01, 0x03, 0x00, +0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00, +0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00, +0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00, +0x63, 0x14, 0x08, 0x14, 0x63, 0x00, +0x03, 0x04, 0x78, 0x04, 0x03, 0x00, +0x61, 0x59, 0x49, 0x4D, 0x43, 0x00, +0x00, 0x7F, 0x41, 0x41, 0x41, 0x00, +0x02, 0x04, 0x08, 0x10, 0x20, 0x00, +0x00, 0x41, 0x41, 0x41, 0x7F, 0x00, +0x04, 0x02, 0x01, 0x02, 0x04, 0x00, +0x40, 0x40, 0x40, 0x40, 0x40, 0x00, +0x00, 0x03, 0x07, 0x08, 0x00, 0x00, +0x20, 0x54, 0x54, 0x78, 0x40, 0x00, +0x7F, 0x28, 0x44, 0x44, 0x38, 0x00, +0x38, 0x44, 0x44, 0x44, 0x28, 0x00, +0x38, 0x44, 0x44, 0x28, 0x7F, 0x00, +0x38, 0x54, 0x54, 0x54, 0x18, 0x00, +0x00, 0x08, 0x7E, 0x09, 0x02, 0x00, +0x18, 0x24, 0x24, 0x1C, 0x78, 0x00, +0x7F, 0x08, 0x04, 0x04, 0x78, 0x00, +0x00, 0x44, 0x7D, 0x40, 0x00, 0x00, +0x20, 0x40, 0x40, 0x3D, 0x00, 0x00, +0x7F, 0x10, 0x28, 0x44, 0x00, 0x00, +0x00, 0x41, 0x7F, 0x40, 0x00, 0x00, +0x7C, 0x04, 0x78, 0x04, 0x78, 0x00, +0x7C, 0x08, 0x04, 0x04, 0x78, 0x00, +0x38, 0x44, 0x44, 0x44, 0x38, 0x00, +0x7C, 0x18, 0x24, 0x24, 0x18, 0x00, +0x18, 0x24, 0x24, 0x18, 0x7C, 0x00, +0x7C, 0x08, 0x04, 0x04, 0x08, 0x00, +0x48, 0x54, 0x54, 0x54, 0x24, 0x00, +0x04, 0x04, 0x3F, 0x44, 0x24, 0x00, +0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00, +0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00, +0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00, +0x44, 0x28, 0x10, 0x28, 0x44, 0x00, +0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00, +0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, +0x00, 0x08, 0x36, 0x41, 0x00, 0x00, +0x00, 0x00, 0x77, 0x00, 0x00, 0x00, +0x00, 0x41, 0x36, 0x08, 0x00, 0x00, +0x02, 0x01, 0x02, 0x04, 0x02, 0x00, +0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, +0x38, 0x1C, 0x0C, 0x06, 0x03, 0x03, +0x01, 0x01, 0x01, 0x01, 0x01, 0x01, +0x03, 0x03, 0x82, 0x86, 0xCC, 0xF8, +0xF0, 0xF0, 0x38, 0x1C, 0x0C, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0xC0, 0x70, +0xF8, 0x0C, 0x04, 0xC6, 0xA2, 0xB3, +0x9F, 0x87, 0x01, 0x01, 0x1F, 0x66, +0x66, 0x44, 0x4C, 0x58, 0x70, 0xE0, +0x80, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, +0xE0, 0x78, 0x18, 0x8C, 0xC6, 0xE6, +0xE3, 0xE3, 0xC3, 0x83, 0x03, 0x03, +0x73, 0x76, 0x76, 0x0C, 0x18, 0xF8, +0xF0, 0xC0, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xE0, 0xF0, 0xF0, 0xF0, 0xE0, 0xEC, +0xEE, 0xF7, 0xF3, 0x70, 0x20, 0x00, +0x7C, 0x7C, 0x7C, 0x7E, 0x00, 0x7E, +0x7E, 0x7E, 0x7F, 0x7F, 0x7F, 0x00, +0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B, +0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00, +0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE, +0xDE, 0xD7, 0xDC, 0x00, 0xC0, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x80, 0xC0, 0x40, 0x7F, 0xF3, +0x60, 0x20, 0x30, 0x30, 0x38, 0x18, +0x9C, 0xCC, 0x6C, 0x6E, 0x3E, 0x3E, +0x1F, 0x0F, 0x0F, 0x03, 0x03, 0x01, +0xC0, 0xFF, 0x3E, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x7F, 0xC1, 0x00, +0x1D, 0x67, 0xC0, 0x80, 0x01, 0x00, +0x00, 0xF0, 0x0F, 0x00, 0x00, 0x00, +0x0C, 0x1A, 0x32, 0xC2, 0x01, 0xC1, +0xFF, 0x3E, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x7E, 0xFF, +0x80, 0x00, 0x00, 0xC3, 0xC7, 0xC7, +0x8F, 0x0F, 0x07, 0x03, 0x80, 0xC0, +0xC0, 0xC0, 0xC0, 0x80, 0x00, 0x07, +0x0F, 0xFF, 0x7F, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F, +0x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00, +0x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F, +0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00, +0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20, +0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00, +0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F, +0x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x01, 0x00, 0x40, 0x60, 0x31, +0x3B, 0x1E, 0x0C, 0x1E, 0x36, 0x23, +0x61, 0x60, 0x60, 0x60, 0x60, 0x60, +0x60, 0x30, 0x1C, 0x3E, 0x3E, 0x3F, +0x1D, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x01, 0x07, +0x0C, 0x18, 0x10, 0x33, 0x3E, 0x38, +0x6E, 0x67, 0x60, 0x60, 0x60, 0x20, +0x30, 0x18, 0x08, 0x0F, 0x06, 0x03, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x01, +0x03, 0x06, 0x0C, 0x19, 0x31, 0x21, +0x60, 0x60, 0x60, 0x60, 0x61, 0x63, +0x67, 0x67, 0x33, 0x39, 0x18, 0x0E, +0x07, 0x03, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +}; diff --git a/keyboards/crkbd/keymaps/rpbaptist/keymap.c b/keyboards/crkbd/keymaps/rpbaptist/keymap.c new file mode 100644 index 000000000000..932641a9f882 --- /dev/null +++ b/keyboards/crkbd/keymaps/rpbaptist/keymap.c @@ -0,0 +1,234 @@ +#include QMK_KEYBOARD_H + +extern uint8_t is_master; + +enum layer_names { + _COLEMAKDHM, + _GAMING, + _GAMING_EXT, + _NUM, + _FN, + _NAV, + _UTIL +}; + +// Base layers +#define COLEMAK DF(_COLEMAKDHM) +#define GAMING DF(_GAMING) + +// Layer toggle and switch +#define T_NAV TT(_NAV) +#define S_NAV MO(_NAV) + +#define T_NUM TT(_NUM) +#define S_NUM MO(_NUM) + +// Layer keys with functionality on tap +#define FN_TAB LT(_FN, KC_TAB) +#define NAV_0 LT(_NAV, KC_0) +#define EXT_SF LT(_GAMING_EXT, KC_LSHIFT) + +// Tap/mod keys +#define RCTBR RCTL_T(KC_RBRACKET) +#define LCTBR LCTL_T(KC_LBRACKET) + +#define SFSPC LSFT_T(KC_SPACE) +#define SFENT LSFT_T(KC_ENTER) + +// Global tab forward and backward +#define TBFWD LCTL(KC_TAB) +#define TBBCK LCTL(LSFT(KC_TAB)) + +// Custom key for NUM layer +#define CTEQL RCTL_T(KC_EQL) + +// € +#define KC_EUR ALGR(KC_5) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_COLEMAKDHM] = LAYOUT( \ + //,-----------------------------------------------------. ,-----------------------------------------------------. + KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + FN_TAB, KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O, KC_QUOT,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + LCTBR, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, RCTBR,\ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_LALT, T_NUM, SFSPC, SFENT, T_NAV, KC_RGUI \ + //`--------------------------' `--------------------------' + ), + + [_GAMING] = LAYOUT( \ + //,-----------------------------------------------------. ,-----------------------------------------------------. + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_TAB, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LCTL, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RCTL,\ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, EXT_SF, KC_SPC, _______, _______, _______ \ + //`--------------------------' `--------------------------' + ), + + [_GAMING_EXT] = LAYOUT( \ + //,-----------------------------------------------------. ,-----------------------------------------------------. + KC_GRV, KC_1, KC_2, _______, KC_3, KC_4, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_DEL,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LBRC, KC_RBRC, _______, _______, _______, KC_BSLS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_F11, KC_F12, KC_MINS, KC_EQL, _______, _______,\ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, KC_ENT, _______, _______ \ + //`--------------------------' `--------------------------' + ), + + [_FN] = LAYOUT( \ + //,-----------------------------------------------------. ,-----------------------------------------------------. + KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, KC_CAPS, KC_NLCK, XXXXXXX, KC_MINS, KC_PIPE, KC_BSLS, KC_PLUS, XXXXXXX,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, XXXXXXX, KC_PAUS, KC_SLCK, KC_PSCR, KC_INS, XXXXXXX, KC_UNDS, KC_LT, KC_GT, KC_EQL, _______,\ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______ \ + //`--------------------------' `--------------------------' + ), + + [_NUM] = LAYOUT( \ + //,-----------------------------------------------------. ,-----------------------------------------------------. + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_SLSH, KC_4, KC_5, KC_6, KC_MINS, KC_PLUS,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, KC_CIRC, KC_AMPR, KC_EUR, KC_LPRN, KC_RPRN, KC_ASTR, KC_1, KC_2, KC_3, KC_UNDS, CTEQL,\ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, S_NUM, _______, _______, NAV_0, KC_DOT \ + //`--------------------------' `--------------------------' + ), + + [_NAV] = LAYOUT( \ + //,-----------------------------------------------------. ,-----------------------------------------------------. + _______, KC_WH_U, TBBCK, KC_MS_U, TBFWD, KC_BTN2, KC_PGUP, KC_HOME, KC_UP, KC_END, XXXXXXX, KC_DEL,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_TAB, KC_WH_D, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN1, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, XXXXXXX, KC_WH_L, XXXXXXX, KC_WH_R, XXXXXXX, XXXXXXX, KC_ACL0, KC_ACL1, KC_ACL2, XXXXXXX, _______,\ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+-------+---------| + _______, _______, _______, _______, S_NAV, _______ \ + //`--------------------------' `--------------------------' + ), + + [_UTIL] = LAYOUT( \ + //,-----------------------------------------------------. ,-----------------------------------------------------. + RESET, XXXXXXX, KC_MSTP, KC_VOLU, KC_MNXT, XXXXXXX, COLEMAK, GAMING, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + XXXXXXX, XXXXXXX, KC_MPRV, KC_VOLD, KC_MPLY, XXXXXXX, XXXXXXX, RGB_MOD, RGB_SPI, RGB_HUI, RGB_SAI, RGB_VAI,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + XXXXXXX, KC_SLEP, XXXXXXX, KC_MUTE, XXXXXXX, XXXXXXX, RGB_TOG,RGB_RMOD, RGB_SPD, RGB_HUD, RGB_SAD, RGB_VAD,\ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______ \ + //`--------------------------' `--------------------------' + ) +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + switch (get_highest_layer(default_layer_state)) { + case _COLEMAKDHM: + state = update_tri_layer_state(state, _NUM, _NAV, _UTIL); + break; + case _GAMING: + state = update_tri_layer_state(state, _GAMING_EXT, _NAV, _UTIL); + break; + } + return state; +} + +#ifdef OLED_DRIVER_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + if (is_master) { + return OLED_ROTATION_270; + } else { + return OLED_ROTATION_180; + } +} + +void render_crkbd_logo(void) { + static const char PROGMEM crkbd_logo[] = { + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, + 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, + 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, + 0}; + oled_write_P(crkbd_logo, false); +} + +void render_status(void) { + // oled_write_P(PSTR("Layout: "), false); + switch (get_highest_layer(default_layer_state)) { + case _COLEMAKDHM: + oled_write_P(PSTR("CLMK "), false); + break; + case _GAMING: + oled_write_P(PSTR("GAME "), false); + break; + } + + oled_write_P(PSTR("\n"), false); + + switch (get_highest_layer(layer_state)) { + case 0: + oled_write_P(PSTR(" "), false); + break; + case _NUM: + oled_write_P(PSTR("Comm "), false); + break; + case _FN: + oled_write_P(PSTR("Stage"), false); + break; + case _NAV: + oled_write_P(PSTR("Fuel "), false); + break; + case _GAMING_EXT: + oled_write_P(PSTR("Ext "), false); + break; + case _UTIL: + oled_write_P(PSTR("Util "), false); + break; + default: + oled_write_P(PSTR("Unkn "), false); + break; + } + oled_write_P(PSTR("\n"), false); + + uint8_t modifiers = get_mods(); + + oled_write_P( (modifiers & MOD_MASK_CTRL) ? PSTR("PROG ") : PSTR(" "), false); + oled_write_P( (modifiers & MOD_MASK_SHIFT) ? PSTR("PULSE") : PSTR(" "), false); + oled_write_P( (modifiers & MOD_MASK_ALT) ? PSTR("STBY ") : PSTR(" "), false); + oled_write_P( (modifiers & MOD_MASK_GUI) ? PSTR("GYRO ") : PSTR(" "), false); + + oled_write_P(PSTR("\n"), false); + + uint8_t led_usb_state = host_keyboard_leds(); + oled_write_P(PSTR("Mode:\n"), false); + oled_write_P(IS_LED_ON(led_usb_state, USB_LED_NUM_LOCK) ? PSTR(" NUM ") : PSTR(" "), false); + oled_write_P(IS_LED_ON(led_usb_state, USB_LED_CAPS_LOCK) ? PSTR(" CAPS") : PSTR(" "), false); + oled_write_P(IS_LED_ON(led_usb_state, USB_LED_SCROLL_LOCK) ? PSTR(" SCRL") : PSTR(" "), false); +} + +void oled_task_user(void) { + if (is_master) { + render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) + } else { + render_crkbd_logo(); + // oled_scroll_left(); // Turns on scrolling + } +} +#endif + +void suspend_power_down_keymap(void) { + rgb_matrix_set_suspend_state(true); +} + +void suspend_wakeup_init_keymap(void) { + rgb_matrix_set_suspend_state(false); +} diff --git a/keyboards/crkbd/keymaps/rpbaptist/readme.md b/keyboards/crkbd/keymaps/rpbaptist/readme.md new file mode 100644 index 000000000000..cb53e75f2de5 --- /dev/null +++ b/keyboards/crkbd/keymaps/rpbaptist/readme.md @@ -0,0 +1,57 @@ +# Corne keyboard layout + +This is my highly personalized CRKBD layout. I use Colemak DHm as main typing layer. I use this keyboard and layout in my daily programming job and for everything at home, including gaming. + +This keymap is the result of an evolution from Ultimate Hacking Keyboard to Iris, to Corne. It took many iterations and changes and only now I feel this is ready to be merged into the main QMK repository, because I think further changes will be minor. This is my 1.0 release so to speak. + +Many thanks to foostan for the keyboard, all QMK contributors and drashna specifically for his work on this keyboard. + +## Layers + +### COLEMAKDHM + +Main typing layer. I really love having SHIFT available on thumbs. I am a left thumb space bar person, so I put SPACE there and ENTER on right. I use CTRL key combos lot in my text editor and desktop environment. That's why I have two of them. I also found them to be a great position for the square brackets. (`[` and `]`) + +I don't know about you but "lower" and "raise" don't mean that much to me. I named my layers `NUM`, short for numbers and `NAV`, short for navigation. Holding the key will activate the layer for as long as it is held, double tapping it will switch to it. Single tapping it once will switch to main layer again. + +Everything else is pretty standard I'd say. + +### NUM + +Includes a number row, the symbols normally on SHIFT and numbers, as well as a numpad under right side homing keys. + +### NAV + +This is where I access arrow keys, page up, down, home, end and mouse control. I also added general tab forward and backward keys. I use these in my browser, terminal and text editor. + +## FN + +Short for function. This gives access to the function keys, as well as rarely used keys on the left side and often used symbols (for me) on the right side. It is accessed by holding TAB. + +### UTIL + +Short for utility. This is accessed by pressing both `NUM` and `NAV` at the same time. It has a software `RESET` key, media keys, RGB control and switches main layer between Colemak and a gaming layer. + +### GAMING + +Sometimes I switch to type in Discord, Steam, or in game chat, so I think it's more important to keep typing functional than put WASD on where I want movement to be. This means I rebind my keys in all games. It's worth it to me. + +I put movement on FRST (would be ESDF on QWERTY), because it lines up more comfortably with the columnar staggered layout of the Corne. It also gives more easy access to all keys on left half. + +Most notable here is that there are no tap and hold differences anymore on left hand side besides the new layer key. This is a different layer than `NUM`. + +### GAMING_EXT + +This is the gaming extended layer where movement keys remain the same. This means I can keep moving while accessing second layer keys. All other keys are keys on which I can easily rebind something. Besides that it gives me the function keys and an ENTER key which does not change. This is good when a game requires you to hold ENTER. + +## Notes + +I use MT3 Godspeed caps and thought it would be fun to theme the OLED output towards it. The slave side has the icon and two planets. The left side refers to modifiers by matching the novelty mod legends. + +## Building + +I am using DFU and have to flash both halves individually. + +Left half: `make crkbd/rev1:rpbaptist:dfu-split-left` + +Right half: `make crkbd/rev1:rpbaptist:dfu-split-right RGB_MATRIX_SPLIT_RIGHT=yes` diff --git a/keyboards/crkbd/keymaps/rpbaptist/rules.mk b/keyboards/crkbd/keymaps/rpbaptist/rules.mk new file mode 100644 index 000000000000..0eed4f997cc4 --- /dev/null +++ b/keyboards/crkbd/keymaps/rpbaptist/rules.mk @@ -0,0 +1,34 @@ +# This enables Link Time Optimization. This can save a good chunk of space (several KB for me), but the macro and function ... functions cause it to error out. +LINK_TIME_OPTIMIZATION_ENABLE = yes + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work + +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +SWAP_HANDS_ENABLE = no # Enable one-hand typing + +RGB_MATRIX_ENABLE = WS2812 + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +BOOTLOADER = qmk-dfu + +OLED_DRIVER_ENABLE = yes + +# ifneq ($(strip $(OLED_DRIVER_ENABLE)), yes) +# RGB_MATRIX_SPLIT_RIGHT=yes +# endif From de386e5972597e89bda99022d30591ae2f6087b5 Mon Sep 17 00:00:00 2001 From: Erik Doffagne Date: Wed, 2 Oct 2019 22:41:32 +0200 Subject: [PATCH 017/316] Fixed typos in documentation (#6871) * Fixed typos in documentation * Update docs/arm_debugging.md Co-Authored-By: fauxpark * Update docs/arm_debugging.md Co-Authored-By: fauxpark --- docs/arm_debugging.md | 16 ++++++++-------- docs/cli.md | 2 +- docs/hardware_keyboard_guidelines.md | 2 +- docs/newbs_flashing.md | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/arm_debugging.md b/docs/arm_debugging.md index 491dfe8ad70b..448b7a8fcc36 100644 --- a/docs/arm_debugging.md +++ b/docs/arm_debugging.md @@ -6,15 +6,15 @@ This guide is catered towards advance users and assumes you can compile an ARM c ## Installing the software -The main objective here is to get the MCU Eclipse IDE correcly installed on our machine. The necesarry instructions are derived from [this](https://gnu-mcu-eclipse.github.io/install/) install guide. +The main objective here is to get the MCU Eclipse IDE correctly installed on our machine. The necessary instructions are derived from [this](https://gnu-mcu-eclipse.github.io/install/) install guide. ### The xPack Manager -This tool is a software package manager and it is used to help us get the necesarry depencencies. +This tool is a software package manager and it is used to help us get the necessary dependencies. -XPM runs using Node.js so grab that form [here](https://nodejs.org/en/). After installation, open a terminal and type `npm -v`. A reply with the version number means that the instalation was successful. +XPM runs using Node.js so grab that from [here](https://nodejs.org/en/). After installation, open a terminal and type `npm -v`. A reply with the version number means that the installation was successful. -XPM instalation instructions can be found [here](https://www.npmjs.com/package/xpm) and are OS specific. Entering `xpm --version` to your terminal should return the software version. +XPM installation instructions can be found [here](https://www.npmjs.com/package/xpm) and are OS specific. Entering `xpm --version` to your terminal should return the software version. ### The ARM Toolchain @@ -26,10 +26,10 @@ If you are using windows you need to install this! `xpm install --global @gnu-mcu-eclipse/windows-build-tools` -### Programer/Debugger Drivers +### Programmer/Debugger Drivers -Now its the time to install your programer's drivers. This tutorial was made using an ST-Link v2 which you can get from almost anywhere. -If you have an ST-Link the drivers can be found [here](https://www.st.com/en/development-tools/stsw-link009.html) otherwise consult the manufuturer of your tool. +Now it's time to install your programmer's drivers. This tutorial was made using an ST-Link v2 which you can get from almost anywhere. +If you have an ST-Link the drivers can be found [here](https://www.st.com/en/development-tools/stsw-link009.html) otherwise consult the manufacturer of your tool. ### OpenOCD @@ -84,4 +84,4 @@ Reset your keyboard. Press the bug icon and if all goes well you should soon find yourself in the debug perspective. Here the program counter will pause at the beginning of the main function and way for you to press Play. Most of the features of all debuggers work on ARM MCUs but for exact details google is your friend! -Happy debugging! \ No newline at end of file +Happy debugging! diff --git a/docs/cli.md b/docs/cli.md index cb609e2a93ef..fe86cac1fb49 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -44,7 +44,7 @@ qmk setup # This will clone `qmk/qmk_firmware` and optionally set up your build We are looking for people to create and maintain a `qmk` package for more operating systems. If you would like to create a package for your OS please follow these guidelines: * Follow best practices for your OS when they conflict with these guidelines - * Documment why in a comment when you do deviate + * Document why in a comment when you do deviate * Install using a virtualenv * Instruct the user to set the environment variable `QMK_HOME` to have the firmware source checked out somewhere other than `~/qmk_firmware`. diff --git a/docs/hardware_keyboard_guidelines.md b/docs/hardware_keyboard_guidelines.md index c8aec40e072f..5d9968f6d724 100644 --- a/docs/hardware_keyboard_guidelines.md +++ b/docs/hardware_keyboard_guidelines.md @@ -67,7 +67,7 @@ The presence of this file means that the folder is a keyboard target and can be ### `` -This is where you will write custom code for your keyboard. Typically you will write code to initialize and interface with the hardware in your keyboard. If your keyboard consists of only a key matrix with no LEDs, speakers, or other auxillary hardware this file can be blank. +This is where you will write custom code for your keyboard. Typically you will write code to initialize and interface with the hardware in your keyboard. If your keyboard consists of only a key matrix with no LEDs, speakers, or other auxiliary hardware this file can be blank. The following functions are typically defined in this file: diff --git a/docs/newbs_flashing.md b/docs/newbs_flashing.md index 4fb2f91d578b..fa21709763fd 100644 --- a/docs/newbs_flashing.md +++ b/docs/newbs_flashing.md @@ -109,7 +109,7 @@ After it gets to this point, the build script will look for the DFU bootloader e dfu-programmer: no device present. Error: Bootloader not found. Trying again in 5s. -Once it does this, you'll want to reset the controller. It should then show output similiar to this: +Once it does this, you'll want to reset the controller. It should then show output similar to this: ``` *** Attempting to flash, please don't remove device From 99f5d6c56d0e3b28ed208acdeae16cea5d563725 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Thu, 3 Oct 2019 01:46:27 +0200 Subject: [PATCH 018/316] Update personal userspace and keymaps (#6876) * Align bottom row in KBD6X keymap to match LAYOUT macro * Remove TAP_HOLD_CAPS_DELAY override in userspace * Change default USB polling rate to 1000 Hz * Move media controls to nav cluster on Wasdat * Add dz60:konstantin_b keymap --- keyboards/dz60/keymaps/konstantin_b/config.h | 3 ++ keyboards/dz60/keymaps/konstantin_b/keymap.c | 46 +++++++++++++++++++ keyboards/dz60/keymaps/konstantin_b/rules.mk | 13 ++++++ .../kbdfans/kbd6x/keymaps/konstantin/keymap.c | 4 +- .../wasdat/keymaps/konstantin/keymap.c | 16 +++---- users/konstantin/config.h | 7 +-- users/konstantin/konstantin.h | 1 + 7 files changed, 77 insertions(+), 13 deletions(-) create mode 100644 keyboards/dz60/keymaps/konstantin_b/config.h create mode 100644 keyboards/dz60/keymaps/konstantin_b/keymap.c create mode 100644 keyboards/dz60/keymaps/konstantin_b/rules.mk diff --git a/keyboards/dz60/keymaps/konstantin_b/config.h b/keyboards/dz60/keymaps/konstantin_b/config.h new file mode 100644 index 000000000000..4b511eb8484f --- /dev/null +++ b/keyboards/dz60/keymaps/konstantin_b/config.h @@ -0,0 +1,3 @@ +#pragma once + +#define LAYER_FN diff --git a/keyboards/dz60/keymaps/konstantin_b/keymap.c b/keyboards/dz60/keymaps/konstantin_b/keymap.c new file mode 100644 index 000000000000..3718669fa541 --- /dev/null +++ b/keyboards/dz60/keymaps/konstantin_b/keymap.c @@ -0,0 +1,46 @@ +#include QMK_KEYBOARD_H +#include "konstantin.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ \ │ ` │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │Bspc │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │FnCaps│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ + * │ LShift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │RSft /│ ↑ │FnF│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ + * │LCtl│LGui│LAlt│ Space │RAG│RCt│ ← │ ↓ │ → │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ + */ + [L_BASE] = LAYOUT_60_b_ansi( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, + FN_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, RSF_SLS, KC_UP, FN_FNLK, + KC_LCTL, KC_LGUI, KC_LALT, XXXXXXX, KC_SPC, XXXXXXX, RAL_RGU, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* Fn layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │ │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│PSc│Ins│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │ M4 │M2 │M↑ │M1 │M3 │M5 │ │ │ │Stp│Ply│Prv│Nxt│ Del │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │ │M← │M↓ │M→ │MW↑│ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ + * │ │MA0│MA2│MW←│MW→│ │ │App│Vo-│Vo+│ Mute │PgU│ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ + * │ │DtPR│DtNA│ MW↓ │ │ │Hom│PgD│End│ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ + */ + [L_FN] = LAYOUT_60_b_ansi( + _______, 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_BTN4, KC_BTN2, KC_MS_U, KC_BTN1, KC_BTN3, KC_BTN5, _______, _______, _______, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, KC_DEL, + _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_U, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_ACL0, KC_ACL2, KC_WH_L, KC_WH_R, _______, _______, KC_APP, KC_VOLD, KC_VOLU, KC_MUTE, KC_PGUP, _______, + _______, DST_P_R, DST_N_A, XXXXXXX, KC_WH_D, XXXXXXX, _______, _______, KC_HOME, KC_PGDN, KC_END + ), +}; diff --git a/keyboards/dz60/keymaps/konstantin_b/rules.mk b/keyboards/dz60/keymaps/konstantin_b/rules.mk new file mode 100644 index 000000000000..a6e88d49b578 --- /dev/null +++ b/keyboards/dz60/keymaps/konstantin_b/rules.mk @@ -0,0 +1,13 @@ +BACKLIGHT_ENABLE = no +BOOTMAGIC_ENABLE = no +COMMAND_ENABLE = yes +CONSOLE_ENABLE = yes +EXTRAKEY_ENABLE = yes +MOUSEKEY_ENABLE = yes +NKRO_ENABLE = yes +RGBLIGHT_ENABLE = no +SPACE_CADET_ENABLE = no +TAP_DANCE_ENABLE = yes +UNICODEMAP_ENABLE = no + +USER_NAME = konstantin diff --git a/keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c b/keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c index 1ca4dadb1bc6..d002322056e9 100644 --- a/keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c +++ b/keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c @@ -126,7 +126,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, _______, _______, _______, KC_BTN1, KC_MS_U, KC_BTN2, KC_BTN3, KC_DEL, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY, KC_MPRV, KC_MNXT, KC_APP, KC_WH_U, KC_BTN4, KC_BTN5, _______, _______, - XXXXXXX, _______, _______, KC_WH_D, KC_ACL2, _______, XXXXXXX + XXXXXXX, _______, _______, KC_WH_D, KC_ACL2, _______, XXXXXXX ), /* RCtrl layer @@ -147,6 +147,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, TOP, MV_UP, BOTTOM, TAB_PRV, _______, _______, _______, _______, _______, _______, _______, _______, DEL_NXT, _______, MV_LEFT, MV_DOWN, MV_RGHT, TAB_NXT, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_VAD, RGB_VAI, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, - XXXXXXX, DST_P_R, DST_N_A, _______, _______, _______, XXXXXXX + XXXXXXX, DST_P_R, DST_N_A, _______, _______, _______, XXXXXXX ), }; diff --git a/keyboards/maartenwut/wasdat/keymaps/konstantin/keymap.c b/keyboards/maartenwut/wasdat/keymaps/konstantin/keymap.c index 04355749ab3a..481c5fd1fae5 100644 --- a/keyboards/maartenwut/wasdat/keymaps/konstantin/keymap.c +++ b/keyboards/maartenwut/wasdat/keymaps/konstantin/keymap.c @@ -29,26 +29,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Fn layer * ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐┌───┬───┬───┐ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ││ │Num│ │ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ││ │Num│Mut│ * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘└───┴───┴───┘ * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐┌───┬───┬───┐ - * │ │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ Clear ││ │ │ │ + * │ │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ Clear ││Ply│Stp│Vo+│ * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤├───┼───┼───┤ - * │ M4 │M2 │M↑ │M1 │M3 │M5 │ │UCM│ │Stp│Ply│Prv│Nxt│ ││ │ │ │ + * │ M4 │M2 │M↑ │M1 │M3 │M5 │ │UCM│ │ │ │ │ │ ││Prv│Nxt│Vo-│ * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │└───┴───┴───┘ * │ │M← │M↓ │M→ │MW↑│ │ │ │ │ │ │ │ │ │ * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ ┌───┐ - * │ │ │MA0│MA2│MW←│MW→│ │ │App│Vo-│Vo+│Mut│ │ │PgU│ + * │ │ │MA0│MA2│MW←│MW→│ │ │App│ │ │ │ │ │PgU│ * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤┌───┼───┼───┐ * │ │DtPR│DtNA│ MW↓ │ │ │ │ ││Hom│PgD│End│ * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘└───┴───┴───┘ */ [L_FN] = LAYOUT_tkl_iso( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, NUMPAD, _______, - _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, CLEAR, _______, _______, _______, - KC_BTN4, KC_BTN2, KC_MS_U, KC_BTN1, KC_BTN3, KC_BTN5, _______, UC_MOD, _______, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, NUMPAD, KC_MUTE, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, CLEAR, KC_MPLY, KC_MSTP, KC_VOLU, + KC_BTN4, KC_BTN2, KC_MS_U, KC_BTN1, KC_BTN3, KC_BTN5, _______, UC_MOD, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_U, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, KC_ACL0, KC_ACL2, KC_WH_L, KC_WH_R, _______, _______, KC_APP, KC_VOLD, KC_VOLU, KC_MUTE, _______, KC_PGUP, + _______, _______, KC_ACL0, KC_ACL2, KC_WH_L, KC_WH_R, _______, _______, KC_APP, _______, _______, _______, _______, KC_PGUP, _______, DST_P_R, DST_N_A, KC_WH_D, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END ), diff --git a/users/konstantin/config.h b/users/konstantin/config.h index d712e79d3f53..bc1987c357ba 100644 --- a/users/konstantin/config.h +++ b/users/konstantin/config.h @@ -20,10 +20,11 @@ #define RGBLIGHT_EFFECT_SNAKE #define PERMISSIVE_HOLD -#define TAPPING_TERM 200 -#define TAPPING_TOGGLE 2 -#define TAP_HOLD_CAPS_DELAY 50 +#define TAPPING_TERM 200 +#define TAPPING_TOGGLE 2 #define UNICODE_CYCLE_PERSIST false #define UNICODE_SELECTED_MODES UC_WINC, UC_WIN, UC_LNX #define UNICODE_KEY_WINC KC_RGUI + +#define USB_POLLING_INTERVAL_MS 1 diff --git a/users/konstantin/konstantin.h b/users/konstantin/konstantin.h index f42d5feaaa35..da21058312af 100644 --- a/users/konstantin/konstantin.h +++ b/users/konstantin/konstantin.h @@ -46,6 +46,7 @@ #endif #define LCT_CPS LCTL_T(KC_CAPS) +#define RSF_SLS RSFT_T(KC_SLSH) #define IS_LAYER_ON_STATE(state, layer) ( (state) & (1UL << (layer))) #define IS_LAYER_OFF_STATE(state, layer) (~(state) & (1UL << (layer))) From afb93b7f481a46e3980905e635d5a1d45a0ad678 Mon Sep 17 00:00:00 2001 From: Silvio Gulizia Date: Thu, 3 Oct 2019 02:27:01 +0200 Subject: [PATCH 019/316] Fix quantum keymapextra italian (#6779) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * remove IT_PIPE duplicate and add IT_GRAD IT_PIPE was declared 2 times, ones as ° and once as |. I changed the first declaration and called it IT_GRAD. I even fixed the definition because the ° in Italian is obtained with LSFT(IT_AACC) * rename IT_GRAD to IT_DEGR * add missing plus_and_minus * fix missing IT_ACUT definition * change KC_LALT(KC_LSFT to LALT(LSFT * Fix alignment * remove leftover * fix issue generated with chars while pushing * fix typo * fix LCBR and RCBR * fix euro symbol * fix RBRC * change IT_LESS form KC_NUBS to KC_GRAVE * add IT_TILDE and change IT_GRAV to IT_GRAVE * add missing legends for accented vowels * format for readability * revert to commit befor I edit it * initial commit * edited to be easier to compare to _ansi.h * remove keymap_italian_osx_iso.h and rename with edits keymap_italian_osx_ansi.h to keymap_italian_osx.h I found out there were no difference at all * fix missing #endif * rename quantum/keymap_extras/keymap_italian_osx.h to quantum/keymap_extras/keymap_italian_ansi.h Now this file is a clone of the keymap_italian.h that appears to be working only for ISO keyboards. It also contains a few improvements for IT_PIPE (defined two times) and IT_ACUT (missing definition). Additionally it redefines LCBR and RCBR to LSFT(IT_LBRC) and LSFT(IT_RBRC) * rename file * redefines IT_BKSL and IT_PIPE based on KC_BKSL * add new osx_iso and osx_ansi version for italian.h and align BKSL to BSLS, fix double definition of PIPE --- quantum/keymap_extras/keymap_italian.h | 55 ++++----- .../keymap_extras/keymap_italian_osx_ansi.h | 113 ++++++++++++++++++ .../keymap_extras/keymap_italian_osx_iso.h | 113 ++++++++++++++++++ 3 files changed, 254 insertions(+), 27 deletions(-) create mode 100644 quantum/keymap_extras/keymap_italian_osx_ansi.h create mode 100644 quantum/keymap_extras/keymap_italian_osx_iso.h diff --git a/quantum/keymap_extras/keymap_italian.h b/quantum/keymap_extras/keymap_italian.h index 544ae9408690..a8c03b884f9a 100644 --- a/quantum/keymap_extras/keymap_italian.h +++ b/quantum/keymap_extras/keymap_italian.h @@ -78,35 +78,36 @@ #define IT_MINS KC_SLSH // - and _ // shifted characters -#define IT_PIPE LSFT(IT_BKSL) // ° -#define IT_EXLM LSFT(KC_1) // ! -#define IT_DQOT LSFT(KC_2) // " -#define IT_STRL LSFT(KC_3) // £ -#define IT_DLR LSFT(KC_4) // $ -#define IT_PERC LSFT(KC_5) // % -#define IT_AMPR LSFT(KC_6) // & -#define IT_SLSH LSFT(KC_7) // / -#define IT_LPRN LSFT(KC_8) // ( -#define IT_RPRN LSFT(KC_9) // ) -#define IT_EQL LSFT(KC_0) // = -#define IT_QST LSFT(IT_APOS) // ? -#define IT_CRC LSFT(IT_IACC) // ^ -#define IT_ASTR LSFT(IT_PLUS) // * -#define IT_MORE LSFT(IT_LESS) // > -#define IT_COLN LSFT(IT_DOT) // : -#define IT_SCLN LSFT(IT_COMM) // ; -#define IT_UNDS LSFT(IT_MINS) // _ +#define IT_DEGR LSFT(IT_AACC) // ° +#define IT_EXLM LSFT(KC_1) // ! +#define IT_DQOT LSFT(KC_2) // " +#define IT_STRL LSFT(KC_3) // £ +#define IT_DLR LSFT(KC_4) // $ +#define IT_PERC LSFT(KC_5) // % +#define IT_AMPR LSFT(KC_6) // & +#define IT_SLSH LSFT(KC_7) // / +#define IT_LPRN LSFT(KC_8) // ( +#define IT_RPRN LSFT(KC_9) // ) +#define IT_EQL LSFT(KC_0) // = +#define IT_QST LSFT(IT_APOS) // ? +#define IT_CRC LSFT(IT_IACC) // ^ +#define IT_ASTR LSFT(IT_PLUS) // * +#define IT_MORE LSFT(IT_LESS) // > +#define IT_COLN LSFT(IT_DOT) // : +#define IT_SCLN LSFT(IT_COMM) // ; +#define IT_UNDS LSFT(IT_MINS) // _ // Alt Gr-ed characters -#define IT_LCBR ALGR(KC_7) // { -#define IT_LBRC ALGR(IT_EACC) // [ -#define IT_RBRC ALGR(IT_PLUS) // ] -#define IT_RCBR ALGR(KC_0) // } -#define IT_AT ALGR(IT_OACC) // @ -#define IT_EURO ALGR(KC_E) // € -#define IT_PIPE LSFT(IT_BKSL) // | -#define IT_SHRP ALGR(IT_AACC) // # +#define IT_LCBR ALGR(KC_7) // { +#define IT_LBRC ALGR(IT_EACC) // [ +#define IT_RBRC ALGR(IT_PLUS) // ] +#define IT_RCBR ALGR(KC_0) // } +#define IT_AT ALGR(IT_OACC) // @ +#define IT_EURO ALGR(KC_E) // € +#define IT_PIPE LSFT(IT_BSLS) // | +#define IT_SHRP ALGR(IT_AACC) // # -#define IT_X_PLUS X_RBRACKET // # +// Deprecated +#define IT_X_PLUS X_RBRACKET // # #endif diff --git a/quantum/keymap_extras/keymap_italian_osx_ansi.h b/quantum/keymap_extras/keymap_italian_osx_ansi.h new file mode 100644 index 000000000000..2b7160ff33b7 --- /dev/null +++ b/quantum/keymap_extras/keymap_italian_osx_ansi.h @@ -0,0 +1,113 @@ +/* Copyright 2015-2016 Matthias Schmidtt + * + * 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 . + */ + +// This is a clone of quantum/keymap_extra/keymap_italian.h intended to be used with Apple devices + +#ifndef KEYMAP_ITALIAN +#define KEYMAP_ITALIAN + +#include "keymap.h" + +// normal characters +#define IT_A KC_A +#define IT_B KC_B +#define IT_C KC_C +#define IT_D KC_D +#define IT_E KC_E +#define IT_F KC_F +#define IT_G KC_G +#define IT_H KC_H +#define IT_I KC_I +#define IT_J KC_J +#define IT_K KC_K +#define IT_L KC_L +#define IT_M KC_M +#define IT_N KC_N +#define IT_O KC_O +#define IT_P KC_P +#define IT_Q KC_Q +#define IT_R KC_R +#define IT_S KC_S +#define IT_T KC_T +#define IT_U KC_U +#define IT_V KC_V +#define IT_W KC_W +#define IT_X KC_X +#define IT_Y KC_Y +#define IT_Z KC_Z + +#define IT_0 KC_0 +#define IT_1 KC_1 +#define IT_2 KC_2 +#define IT_3 KC_3 +#define IT_4 KC_4 +#define IT_5 KC_5 +#define IT_6 KC_6 +#define IT_7 KC_7 +#define IT_8 KC_8 +#define IT_9 KC_9 + +// punctuation +#define IT_DOT KC_DOT // . and : +#define IT_COMM KC_COMM // , and ; +#define IT_APOS KC_MINS // ' and ? +#define IT_BSLS KC_NUBS // \ and | +#define IT_LESS KC_GRV // < and > +#define IT_MINS KC_SLSH // - and _ + +// accented vowels (regular, with shift, with option, with option and shift) +#define IT_EACC KC_LBRC // è, é, [, { +#define IT_PLUS KC_RBRC // +, *, ], } +#define IT_OACC KC_SCLN // ò, ç, @, Ç +#define IT_AACC KC_QUOT // à, °, #, ∞ +#define IT_UACC KC_BSLS // ù, §, ¶, ◊ +#define IT_IACC KC_EQL // ì, ^, ˆ, ± + +// shifted characters +#define IT_EXLM LSFT(KC_1) // ! +#define IT_DQOT LSFT(KC_2) // " +#define IT_STRL LSFT(KC_3) // £ +#define IT_DLR LSFT(KC_4) // $ +#define IT_PERC LSFT(KC_5) // % +#define IT_AMPR LSFT(KC_6) // & +#define IT_SLSH LSFT(KC_7) // / +#define IT_LPRN LSFT(KC_8) // ( +#define IT_RPRN LSFT(KC_9) // ) +#define IT_EQL LSFT(KC_0) // = +#define IT_DEGR LSFT(IT_AACC) // ° +#define IT_QST LSFT(IT_APOS) // ? +#define IT_CRC LSFT(IT_IACC) // ^ +#define IT_ASTR LSFT(IT_PLUS) // * +#define IT_MORE LSFT(IT_LESS) // > +#define IT_COLN LSFT(IT_DOT) // : +#define IT_SCLN LSFT(IT_COMM) // ; +#define IT_UNDS LSFT(IT_MINS) // _ +#define IT_LCBR LSFT(IT_LBRC) // { +#define IT_RCBR LSFT(IT_RBRC) // } +#define IT_PIPE LSFT(IT_BSLS) // | + +// Alt -ed characters +#define IT_LBRC LALT(IT_EACC) // [ +#define IT_RBRC LALT(IT_PLUS) // ] +#define IT_AT LALT(IT_OACC) // @ +#define IT_EURO LALT(KC_E) // € +#define IT_SHRP LALT(IT_AACC ) // # +#define IT_ACUT LALT(KC_8) // ´ +#define IT_GRAVE LALT(KC_9) // ` +#define IT_TILDE LALT(KC_5) // ~ +#define IT_PLMN LALT(LSFT(IT_IACC)) // ± + +#endif diff --git a/quantum/keymap_extras/keymap_italian_osx_iso.h b/quantum/keymap_extras/keymap_italian_osx_iso.h new file mode 100644 index 000000000000..5c920014a183 --- /dev/null +++ b/quantum/keymap_extras/keymap_italian_osx_iso.h @@ -0,0 +1,113 @@ +/* Copyright 2015-2016 Matthias Schmidtt + * + * 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 . + */ + +// This is a clone of quantum/keymap_extra/keymap_italian.h intended to be used with Apple devices + +#ifndef KEYMAP_ITALIAN +#define KEYMAP_ITALIAN + +#include "keymap.h" + +// normal characters +#define IT_A KC_A +#define IT_B KC_B +#define IT_C KC_C +#define IT_D KC_D +#define IT_E KC_E +#define IT_F KC_F +#define IT_G KC_G +#define IT_H KC_H +#define IT_I KC_I +#define IT_J KC_J +#define IT_K KC_K +#define IT_L KC_L +#define IT_M KC_M +#define IT_N KC_N +#define IT_O KC_O +#define IT_P KC_P +#define IT_Q KC_Q +#define IT_R KC_R +#define IT_S KC_S +#define IT_T KC_T +#define IT_U KC_U +#define IT_V KC_V +#define IT_W KC_W +#define IT_X KC_X +#define IT_Y KC_Y +#define IT_Z KC_Z + +#define IT_0 KC_0 +#define IT_1 KC_1 +#define IT_2 KC_2 +#define IT_3 KC_3 +#define IT_4 KC_4 +#define IT_5 KC_5 +#define IT_6 KC_6 +#define IT_7 KC_7 +#define IT_8 KC_8 +#define IT_9 KC_9 + +// punctuation +#define IT_DOT KC_DOT // . and : +#define IT_COMM KC_COMM // , and ; +#define IT_APOS KC_MINS // ' and ? +#define IT_BSLS KC_GRV // \ and | +#define IT_LESS KC_NUBS// < and > +#define IT_MINS KC_SLSH // - and _ + +// accented vowels (regular, with shift, with option, with option and shift) +#define IT_EACC KC_LBRC // è, é, [, { +#define IT_PLUS KC_RBRC // +, *, ], } +#define IT_OACC KC_SCLN // ò, ç, @, Ç +#define IT_AACC KC_QUOT // à, °, #, ∞ +#define IT_UACC KC_BSLS // ù, §, ¶, ◊ +#define IT_IACC KC_EQL // ì, ^, ˆ, ± + +// shifted characters +#define IT_EXLM LSFT(KC_1) // ! +#define IT_DQOT LSFT(KC_2) // " +#define IT_STRL LSFT(KC_3) // £ +#define IT_DLR LSFT(KC_4) // $ +#define IT_PERC LSFT(KC_5) // % +#define IT_AMPR LSFT(KC_6) // & +#define IT_SLSH LSFT(KC_7) // / +#define IT_LPRN LSFT(KC_8) // ( +#define IT_RPRN LSFT(KC_9) // ) +#define IT_EQL LSFT(KC_0) // = +#define IT_DEGR LSFT(IT_AACC) // ° +#define IT_QST LSFT(IT_APOS) // ? +#define IT_CRC LSFT(IT_IACC) // ^ +#define IT_ASTR LSFT(IT_PLUS) // * +#define IT_MORE LSFT(IT_LESS) // > +#define IT_COLN LSFT(IT_DOT) // : +#define IT_SCLN LSFT(IT_COMM) // ; +#define IT_UNDS LSFT(IT_MINS) // _ +#define IT_LCBR LSFT(IT_LBRC) // { +#define IT_RCBR LSFT(IT_RBRC) // } +#define IT_PIPE LSFT(IT_BSLS) // | + +// Alt -ed characters +#define IT_LBRC LALT(IT_EACC) // [ +#define IT_RBRC LALT(IT_PLUS) // ] +#define IT_AT LALT(IT_OACC) // @ +#define IT_EURO LALT(KC_E) // € +#define IT_SHRP LALT(IT_AACC ) // # +#define IT_ACUT LALT(KC_8) // ´ +#define IT_GRAVE LALT(KC_9) // ` +#define IT_TILDE LALT(KC_5) // ~ +#define IT_PLMN LALT(LSFT(IT_IACC)) // ± + +#endif From 9067dc817aefb7fe43d23a995604555642c6c897 Mon Sep 17 00:00:00 2001 From: Ayman Bagabas Date: Tue, 1 Oct 2019 20:56:16 -0400 Subject: [PATCH 020/316] Fix qmk doctor 'bytes-like object is required' on linux MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes the following issue related to encoding on linux systems. Add `universal_newlines=True` to subprocess. ☒ a bytes-like object is required, not 'str' Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/milc.py", line 564, in __call__ return self.__call__() File "/usr/local/lib/python3.7/site-packages/milc.py", line 569, in __call__ return self._entrypoint(self) File "$HOME/qmk_firmware/lib/python/qmk/cli/doctor.py", line 56, in doctor for line in mm_check.stdout.split('\n'): TypeError: a bytes-like object is required, not 'str' --- lib/python/qmk/cli/doctor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/python/qmk/cli/doctor.py b/lib/python/qmk/cli/doctor.py index 3474422a8915..2b6a03e443ae 100755 --- a/lib/python/qmk/cli/doctor.py +++ b/lib/python/qmk/cli/doctor.py @@ -50,7 +50,7 @@ def doctor(cli): elif OS == "Linux": cli.log.info("Detected {fg_cyan}Linux.") if shutil.which('systemctl'): - mm_check = subprocess.run(['systemctl', 'list-unit-files'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=10) + mm_check = subprocess.run(['systemctl', 'list-unit-files'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=10, universal_newlines=True) if mm_check.returncode == 0: mm = True for line in mm_check.stdout.split('\n'): From 4f01c8623fe48da0c3a4ef98f63af442c1978816 Mon Sep 17 00:00:00 2001 From: Richard Baptist Date: Thu, 3 Oct 2019 21:34:00 +0200 Subject: [PATCH 021/316] Clean up default crkbd keymap (#6887) * Put spacing into CRKBD keymap * Change KC_NO to XXXXXXX This makes it easier to see at a glance that the key does nothing --- keyboards/crkbd/keymaps/default/keymap.c | 75 ++++++++++++------------ 1 file changed, 38 insertions(+), 37 deletions(-) diff --git a/keyboards/crkbd/keymaps/default/keymap.c b/keyboards/crkbd/keymaps/default/keymap.c index 40bf9b658631..02f7689570c5 100644 --- a/keyboards/crkbd/keymaps/default/keymap.c +++ b/keyboards/crkbd/keymaps/default/keymap.c @@ -33,51 +33,52 @@ enum macro_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT( \ - //,-----------------------------------------. ,-----------------------------------------. - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,KC_BSPC,\ - //|------+------+------+------+------+------| |------+------+------+------+------+------| - KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L,KC_SCLN,KC_QUOT,\ - //|------+------+------+------+------+------| |------+------+------+------+------+------| - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M,KC_COMM,KC_DOT,KC_SLSH,KC_RSFT,\ - //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - KC_LGUI, LOWER,KC_SPC, KC_ENT, RAISE,KC_RALT \ - //`--------------------' `--------------------' + //,-----------------------------------------------------. ,-----------------------------------------------------. + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,\ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_LGUI, LOWER, KC_SPC, KC_ENT, RAISE, KC_RALT \ + //`--------------------------' `--------------------------' + ), [_LOWER] = LAYOUT( \ - //,-----------------------------------------. ,-----------------------------------------. - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,KC_BSPC,\ - //|------+------+------+------+------+------| |------+------+------+------+------+------| - KC_LCTL, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT,KC_DOWN,KC_UP, KC_RIGHT,KC_NO,KC_NO,\ - //|------+------+------+------+------+------| |------+------+------+------+------+------| - KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,\ - //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - KC_LGUI, LOWER,KC_SPC, KC_ENT, RAISE,KC_RALT \ - //`--------------------' `--------------------' - ), + //,-----------------------------------------------------. ,-----------------------------------------------------. + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT, XXXXXXX, XXXXXXX,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_LGUI, LOWER, KC_SPC, KC_ENT, RAISE, KC_RALT \ + //`--------------------------' `--------------------------' + ), [_RAISE] = LAYOUT( \ - //,-----------------------------------------. ,-----------------------------------------. - KC_ESC,KC_EXLM,KC_AT,KC_HASH,KC_DLR,KC_PERC, KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,KC_BSPC,\ - //|------+------+------+------+------+------| |------+------+------+------+------+------| - KC_LCTL, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MINS,KC_EQL,KC_LCBR,KC_RCBR,KC_PIPE,KC_GRV,\ - //|------+------+------+------+------+------| |------+------+------+------+------+------| - KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_UNDS,KC_PLUS,KC_LBRC,KC_RBRC,KC_BSLS,KC_TILD,\ - //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - KC_LGUI, LOWER,KC_SPC, KC_ENT, RAISE,KC_RALT \ - //`--------------------' `--------------------' + //,-----------------------------------------------------. ,-----------------------------------------------------. + KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MINS, KC_EQL, KC_LCBR, KC_RCBR, KC_PIPE, KC_GRV,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDS, KC_PLUS, KC_LBRC, KC_RBRC, KC_BSLS, KC_TILD,\ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_LGUI, LOWER, KC_SPC, KC_ENT, RAISE, KC_RALT \ + //`--------------------------' `--------------------------' ), [_ADJUST] = LAYOUT( \ - //,-----------------------------------------. ,-----------------------------------------. - RESET,RGBRST, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,\ - //|------+------+------+------+------+------| |------+------+------+------+------+------| - RGB_TOG,RGB_HUI,RGB_SAI,RGB_VAI,KC_NO,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,\ - //|------+------+------+------+------+------| |------+------+------+------+------+------| - RGB_MOD,RGB_HUD,RGB_SAD,RGB_VAD,KC_NO,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,\ - //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - KC_LGUI, LOWER,KC_SPC, KC_ENT, RAISE,KC_RALT \ - //`--------------------' `--------------------' + //,-----------------------------------------------------. ,-----------------------------------------------------. + RESET, RGBRST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_LGUI, LOWER, KC_SPC, KC_ENT, RAISE, KC_RALT \ + //`--------------------------' `--------------------------' ) }; From 41b9be560d68a69a0c87d90e94700082e1cbbd3a Mon Sep 17 00:00:00 2001 From: fauxpark Date: Fri, 4 Oct 2019 09:24:47 +1000 Subject: [PATCH 022/316] Wrap util.h functions in `extern "C"` (#6762) --- tmk_core/common/util.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tmk_core/common/util.h b/tmk_core/common/util.h index 5706b047d060..68642e7fd3f1 100644 --- a/tmk_core/common/util.h +++ b/tmk_core/common/util.h @@ -27,6 +27,10 @@ along with this program. If not, see . #define STR(s) XSTR(s) #define XSTR(s) #s +#ifdef __cplusplus +extern "C" { +#endif + uint8_t bitpop(uint8_t bits); uint8_t bitpop16(uint16_t bits); uint8_t bitpop32(uint32_t bits); @@ -39,4 +43,8 @@ uint8_t bitrev(uint8_t bits); uint16_t bitrev16(uint16_t bits); uint32_t bitrev32(uint32_t bits); +#ifdef __cplusplus +} +#endif + #endif From f166a22c98c6c2e055cbd81b2a309417b92b4f2a Mon Sep 17 00:00:00 2001 From: Max Rumpf Date: Fri, 4 Oct 2019 20:22:30 +0200 Subject: [PATCH 023/316] [Keyboard] Add image for Pulse 4k (#6869) --- keyboards/maxr1998/pulse4k/readme.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/keyboards/maxr1998/pulse4k/readme.md b/keyboards/maxr1998/pulse4k/readme.md index 3a552188dffc..197e024cf131 100644 --- a/keyboards/maxr1998/pulse4k/readme.md +++ b/keyboards/maxr1998/pulse4k/readme.md @@ -1,6 +1,8 @@ # Pulse 4k A four-key macropad with two rotary encoders, developed by Maxr1998, [fully open-source](/~https://github.com/Maxr1998/Pulse_4k). +

+ Keyboard Maintainer: [Maxr1998](/~https://github.com/Maxr1998) Hardware Availability: DIY from the [open-source design files](/~https://github.com/Maxr1998/Pulse_4k), potential official distribution in the future From 3e6f7bc6bfacda10a731efdda9f669dca8b4a221 Mon Sep 17 00:00:00 2001 From: vuhopkep Date: Sat, 5 Oct 2019 01:55:54 +0700 Subject: [PATCH 024/316] [Keyboard] Add Stella keyboard (#6848) * Add Stella keyboard Tenkeyless keyboard for VGS Community * Update keymap.c * update --- keyboards/stella/config.h | 65 +++++++++++++++++++ keyboards/stella/info.json | 18 ++++++ keyboards/stella/keymaps/default/config.h | 19 ++++++ keyboards/stella/keymaps/default/keymap.c | 44 +++++++++++++ keyboards/stella/keymaps/default/readme.md | 1 + keyboards/stella/readme.md | 15 +++++ keyboards/stella/rules.mk | 37 +++++++++++ keyboards/stella/stella.c | 45 ++++++++++++++ keyboards/stella/stella.h | 72 ++++++++++++++++++++++ 9 files changed, 316 insertions(+) create mode 100644 keyboards/stella/config.h create mode 100644 keyboards/stella/info.json create mode 100644 keyboards/stella/keymaps/default/config.h create mode 100644 keyboards/stella/keymaps/default/keymap.c create mode 100644 keyboards/stella/keymaps/default/readme.md create mode 100644 keyboards/stella/readme.md create mode 100644 keyboards/stella/rules.mk create mode 100644 keyboards/stella/stella.c create mode 100644 keyboards/stella/stella.h diff --git a/keyboards/stella/config.h b/keyboards/stella/config.h new file mode 100644 index 000000000000..18a8c5a22a91 --- /dev/null +++ b/keyboards/stella/config.h @@ -0,0 +1,65 @@ +/* +Copyright 2019 HnahKB + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER HnahKB +#define PRODUCT Stella +#define DESCRIPTION Custom PCB TKL keyboard for vgs community + +/* key matrix size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 10 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D3, B2, B1, B0, E6, F0, D2, D5, F4, F1 } +#define MATRIX_COL_PINS { B4, D7, D6, D4, B5, C7, C6, F5, F6, F7 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ + +#define BACKLIGHT_PIN B6 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 + + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + + +#define RGB_DI_PIN E2 +#define RGBLED_NUM 14 \ No newline at end of file diff --git a/keyboards/stella/info.json b/keyboards/stella/info.json new file mode 100644 index 000000000000..d655563647ca --- /dev/null +++ b/keyboards/stella/info.json @@ -0,0 +1,18 @@ +{ + "keyboard_name": "Stella", + "url": "", + "maintainer": "VGS", + "width": 18.25, + "height": 6.5, + "layouts": { + "LAYOUT_all": { + "layout": [{"label":"Esc", "x":0, "y":0.25}, {"label":"F1", "x":2, "y":0.25}, {"label":"F2", "x":3, "y":0.25}, {"label":"F3", "x":4, "y":0.25}, {"label":"F4", "x":5, "y":0.25}, {"label":"F5", "x":6.5, "y":0.25}, {"label":"F6", "x":7.5, "y":0.25}, {"label":"F7", "x":8.5, "y":0.25}, {"label":"F8", "x":9.5, "y":0.25}, {"label":"F9", "x":11, "y":0.25}, {"label":"F10", "x":12, "y":0.25}, {"label":"F11", "x":13, "y":0.25}, {"label":"F12", "x":14, "y":0.25}, {"label":"PrtSc", "x":15.25, "y":0.25}, {"label":"Scroll Lock", "x":16.25, "y":0.25}, {"label":"Pause", "x":17.25, "y":0.25}, {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"label":"Backspace", "x":13, "y":1.5}, {"label":"Backspace2", "x":14, "y":1.5}, {"label":"Insert", "x":15.25, "y":1.5}, {"label":"Home", "x":16.25, "y":1.5}, {"label":"PgUp", "x":17.25, "y":1.5}, {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"U", "x":7.5, "y":2.5}, {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, {"label":"|", "x":13.5, "y":2.5, "w":1.5}, {"label":"Delete", "x":15.25, "y":2.5}, {"label":"End", "x":16.25, "y":2.5}, {"label":"PgDn", "x":17.25, "y":2.5}, {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":6.75, "y":3.5}, {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, {"label":":", "x":10.75, "y":3.5}, {"label":"\"", "x":11.75, "y":3.5}, {"label":"~", "x":12.75, "y":3.5}, {"label":"Enter", "x":13.75, "y":3.5, "w":1.25}, {"label":"Shift", "x":0, "y":4.5, "w":1.25}, {"label":"|", "x":1.25, "y":4.5}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, {"label":"<", "x":9.25, "y":4.5}, {"label":">", "x":10.25, "y":4.5}, {"label":"?", "x":11.25, "y":4.5}, {"label":"JP Ro", "x":12.25, "y":4.5}, {"label":"Shift", "x":13.25, "y":4.5, "w":1.75}, {"label":"\u2191", "x":16.25, "y":4.5}, {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, {"label":"Win", "x":1.25, "y":5.5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, {"label":"Space", "x":3.75, "y":5.5, "w":6.25}, {"label":"Alt", "x":10, "y":5.5, "w":1.25}, {"label":"Win", "x":11.25, "y":5.5, "w":1.25}, {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, {"label":"\u2190", "x":15.25, "y":5.5}, {"label":"\u2193", "x":16.25, "y":5.5}, {"label":"\u2192", "x":17.25, "y":5.5}] + }, + "LAYOUT_tkl_ansi": { + "layout": [{"label":"Esc", "x":0, "y":0.25}, {"label":"F1", "x":2, "y":0.25}, {"label":"F2", "x":3, "y":0.25}, {"label":"F3", "x":4, "y":0.25}, {"label":"F4", "x":5, "y":0.25}, {"label":"F5", "x":6.5, "y":0.25}, {"label":"F6", "x":7.5, "y":0.25}, {"label":"F7", "x":8.5, "y":0.25}, {"label":"F8", "x":9.5, "y":0.25}, {"label":"F9", "x":11, "y":0.25}, {"label":"F10", "x":12, "y":0.25}, {"label":"F11", "x":13, "y":0.25}, {"label":"F12", "x":14, "y":0.25}, {"label":"PrtSc", "x":15.25, "y":0.25}, {"label":"Scroll Lock", "x":16.25, "y":0.25}, {"label":"Pause", "x":17.25, "y":0.25}, {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"label":"Backspace", "x":13, "y":1.5, "w":2}, {"label":"Insert", "x":15.25, "y":1.5}, {"label":"Home", "x":16.25, "y":1.5}, {"label":"PgUp", "x":17.25, "y":1.5}, {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"U", "x":7.5, "y":2.5}, {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, {"label":"|", "x":13.5, "y":2.5, "w":1.5}, {"label":"Delete", "x":15.25, "y":2.5}, {"label":"End", "x":16.25, "y":2.5}, {"label":"PgDn", "x":17.25, "y":2.5}, {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":6.75, "y":3.5}, {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, {"label":":", "x":10.75, "y":3.5}, {"label":"\"", "x":11.75, "y":3.5}, {"label":"Enter", "x":12.75, "y":3.5, "w":2.25}, {"label":"Shift", "x":0, "y":4.5, "w":2.25}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, {"label":"<", "x":9.25, "y":4.5}, {"label":">", "x":10.25, "y":4.5}, {"label":"?", "x":11.25, "y":4.5}, {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, {"label":"\u2191", "x":16.25, "y":4.5}, {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, {"label":"Win", "x":1.25, "y":5.5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"label":"Alt", "x":10, "y":5.5, "w":1.25}, {"label":"Win", "x":11.25, "y":5.5, "w":1.25}, {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, {"label":"\u2190", "x":15.25, "y":5.5}, {"label":"\u2193", "x":16.25, "y":5.5}, {"label":"\u2192", "x":17.25, "y":5.5}] + }, + "LAYOUT_tkl_iso": { + "layout": [{"label":"Esc", "x":0, "y":0.25}, {"label":"F1", "x":2, "y":0.25}, {"label":"F2", "x":3, "y":0.25}, {"label":"F3", "x":4, "y":0.25}, {"label":"F4", "x":5, "y":0.25}, {"label":"F5", "x":6.5, "y":0.25}, {"label":"F6", "x":7.5, "y":0.25}, {"label":"F7", "x":8.5, "y":0.25}, {"label":"F8", "x":9.5, "y":0.25}, {"label":"F9", "x":11, "y":0.25}, {"label":"F10", "x":12, "y":0.25}, {"label":"F11", "x":13, "y":0.25}, {"label":"F12", "x":14, "y":0.25}, {"label":"PrtSc", "x":15.25, "y":0.25}, {"label":"Scroll Lock", "x":16.25, "y":0.25}, {"label":"Pause", "x":17.25, "y":0.25}, {"label":"\u00ac", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"\"", "x":2, "y":1.5}, {"label":"\u00a3", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"label":"Backspace", "x":13, "y":1.5, "w":2}, {"label":"Insert", "x":15.25, "y":1.5}, {"label":"Home", "x":16.25, "y":1.5}, {"label":"PgUp", "x":17.25, "y":1.5}, {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"U", "x":7.5, "y":2.5}, {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, {"label":"Delete", "x":15.25, "y":2.5}, {"label":"End", "x":16.25, "y":2.5}, {"label":"PgDn", "x":17.25, "y":2.5}, {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":6.75, "y":3.5}, {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, {"label":":", "x":10.75, "y":3.5}, {"label":"@", "x":11.75, "y":3.5}, {"label":"~", "x":12.75, "y":3.5}, {"label":"Enter", "x":13.75, "y":2.5, "w":1.25, "h":2}, {"label":"Shift", "x":0, "y":4.5, "w":1.25}, {"label":"|", "x":1.25, "y":4.5}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, {"label":"<", "x":9.25, "y":4.5}, {"label":">", "x":10.25, "y":4.5}, {"label":"?", "x":11.25, "y":4.5}, {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, {"label":"\u2191", "x":16.25, "y":4.5}, {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, {"label":"Win", "x":1.25, "y":5.5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"label":"AltGr", "x":10, "y":5.5, "w":1.25}, {"label":"Win", "x":11.25, "y":5.5, "w":1.25}, {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, {"label":"\u2190", "x":15.25, "y":5.5}, {"label":"\u2193", "x":16.25, "y":5.5}, {"label":"\u2192", "x":17.25, "y":5.5}] + } + } +} diff --git a/keyboards/stella/keymaps/default/config.h b/keyboards/stella/keymaps/default/config.h new file mode 100644 index 000000000000..348d7c5513b8 --- /dev/null +++ b/keyboards/stella/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 HnahKB + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/stella/keymaps/default/keymap.c b/keyboards/stella/keymaps/default/keymap.c new file mode 100644 index 000000000000..6c869a7f502e --- /dev/null +++ b/keyboards/stella/keymaps/default/keymap.c @@ -0,0 +1,44 @@ +/* Copyright 2019 HnahKB + * + * 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 . + */ +#include QMK_KEYBOARD_H + +enum hnah_layers{ + _QWERTY, + _LOWER +}; + +#define LOWER MO(_LOWER) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_tkl_iso( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS , + 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_BSPC, KC_INS, KC_HOME, KC_PGUP, + 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_DEL, KC_END, KC_PGDN, + 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_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_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_RALT, KC_APP, LOWER, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [_LOWER] = LAYOUT_tkl_iso( + 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; + diff --git a/keyboards/stella/keymaps/default/readme.md b/keyboards/stella/keymaps/default/readme.md new file mode 100644 index 000000000000..3ab96ef60cbc --- /dev/null +++ b/keyboards/stella/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for stella \ No newline at end of file diff --git a/keyboards/stella/readme.md b/keyboards/stella/readme.md new file mode 100644 index 000000000000..c716225af51b --- /dev/null +++ b/keyboards/stella/readme.md @@ -0,0 +1,15 @@ +# stella + +![stella](https://i.imgur.com/jaiG578.jpg) + +A cusom keyboard design for VGS community + +Keyboard Maintainer: [HnahKB](/~https://github.com/vuhopkep) +Hardware Supported: Stella Keyboard +Hardware Availability: [VGS](https://www.facebook.com/groups/vietnamgamingsetup/permalink/2403066473102277) + +Make example for this keyboard (after setting up your build environment): + + make stella:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/stella/rules.mk b/keyboards/stella/rules.mk new file mode 100644 index 000000000000..2618abf4f2f9 --- /dev/null +++ b/keyboards/stella/rules.mk @@ -0,0 +1,37 @@ +# MCU name +MCU = atmega32u4 + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +# Supported layouts +LAYOUTS = tkl_ansi tkl_iso \ No newline at end of file diff --git a/keyboards/stella/stella.c b/keyboards/stella/stella.c new file mode 100644 index 000000000000..4b545042b477 --- /dev/null +++ b/keyboards/stella/stella.c @@ -0,0 +1,45 @@ +/* Copyright 2019 HnahKB + * + * 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 . + */ +#include "stella.h" + + +void matrix_init_kb(void) { + matrix_init_user(); + led_init_ports(); +}; + +void led_init_ports(void) { + setPinOutput(B3); + setPinOutput(B7); +} + +void led_set_kb(uint8_t usb_led) { + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + // Turn Caps Lock LED on + writePinLow(B3); + } else { + // Turn Caps Lock LED off + writePinHigh(B3); + } + if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { + // Turn Scroll Lock LED on + writePinLow(B7); + } else { + // Turn Scroll Lock LED off + writePinHigh(B7); + } + led_set_user(usb_led); +} diff --git a/keyboards/stella/stella.h b/keyboards/stella/stella.h new file mode 100644 index 000000000000..f18e74432f99 --- /dev/null +++ b/keyboards/stella/stella.h @@ -0,0 +1,72 @@ +/* Copyright 2019 HnahKB + * + * 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 . + */ +#pragma once + +#include "quantum.h" + + +#define LAYOUT_all( \ + k00, k01, k02, k03, k04, k06, k07, k08,k09, k60, k61, k62, k63, k64, k65, k66, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k70, k71, k72, k73, k74, k75, k76, k67, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k80, k81, k82, k83, k78, k77, k68, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k90, k91, k92, k84, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k95, k94, k85, k93, k79, \ + k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k69 \ +) { \ + { k00, k01, k02, k03, k04, KC_NO, k06, k07, k08, k09 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39 }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49}, \ + { k50, k51, k52, k53, k54, k55, k56, k57, k58, k59 }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68, k69 }, \ + { k70, k71, k72, k73, k74, k75, k76, k77, k78, k79 }, \ + { k80, k81, k82, k83, k84, k85, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { k90, k91, k92, k93, k94, k95, KC_NO, KC_NO, KC_NO, KC_NO } \ +} + +#define LAYOUT_tkl_ansi( \ + k00, k01, k02, k03, k04, k06, k07, k08,k09, k60, k61, k62, k63, k64, k65, k66, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k70, k71, k72, k73, k75, k76, k67, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k80, k81, k82, k83, k78, k77, k68, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k90, k91, k84, \ + k40, k42, k43, k44, k45, k46, k47, k48, k49, k95, k94, k93, k79, \ + k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k69 \ +) LAYOUT_all( \ + k00, k01, k02, k03, k04, k06, k07, k08,k09, k60, k61, k62, k63, k64, k65, k66, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k70, k71, k72, k73, KC_NO, k75, k76, k67, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k80, k81, k82, k83, k78, k77, k68, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k90, k91, KC_NO, k84, \ + k40, KC_NO, k42, k43, k44, k45, k46, k47, k48, k49, k95, k94, KC_NO, k93, k79, \ + k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k69 \ +) + +#define LAYOUT_tkl_iso( \ + k00, k01, k02, k03, k04, k06, k07, k08,k09, k60, k61, k62, k63, k64, k65, k66, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k70, k71, k72, k73, k75, k76, k67, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k80, k81, k82, k78, k77, k68, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k90, k91, k92, k84, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k95, k94, k93, k79, \ + k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k69 \ +) LAYOUT_all( \ + k00, k01, k02, k03, k04, k06, k07, k08,k09, k60, k61, k62, k63, k64, k65, k66, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k70, k71, k72, k73, KC_NO, k75, k76, k67, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k80, k81, k82, KC_NO, k78, k77, k68, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k90, k91, k92, k84, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k95, k94, KC_NO, k93, k79, \ + k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k69 \ +) + From b0b433f3cf3d20ddcd10a2897646208c785e26c9 Mon Sep 17 00:00:00 2001 From: Dimitri Krassovski Date: Fri, 4 Oct 2019 22:00:14 +0300 Subject: [PATCH 025/316] [Keyboard] Match dactyl-manufom 4x5 layout in doc to actual (#6867) * Match doc layout to actual Raise and Lower were swapped, and there is no "10" button :) * Make mouse button 2 really 2, not a clone of MB1 --- .../handwired/dactyl_manuform/4x5/keymaps/default/keymap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/keymap.c b/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/keymap.c index 2e5cfd7cedd8..4836bb06947e 100644 --- a/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/keymap.c +++ b/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/keymap.c @@ -20,7 +20,7 @@ extern keymap_config_t keymap_config; #define KC_MU KC_MS_UP #define KC_MD KC_MS_DOWN #define KC_MB1 KC_MS_BTN1 -#define KC_MB2 KC_MS_BTN1 +#define KC_MB2 KC_MS_BTN2 #define RAISE MO(_RAISE) #define LOWER MO(_LOWER) @@ -44,7 +44,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * '------+------' '------+------' * | TAB | HOME | | END | DEL | * '------+------' '------+------' - * | Lower| ~ | | GUI | Raise| + * | Raise| ~ | | GUI | Lower| * '------+------' '------+------' */ @@ -92,7 +92,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,----------------------------------, ,----------------------------------, * | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | * |------+------+------+------+------| |-------------+------+------+------| - * | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 10 | + * | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | * |------+------+------+------+------| |------|------+------+------+------| * | ! | @ | # | $ | % | | ^ | & | * | ( | ) | * |------+------+------+-------------, ,-------------+------+------+------, From 93bce832555f0f34b2b9a681a7d5d0dbe4462a26 Mon Sep 17 00:00:00 2001 From: Griffin J Rademacher Date: Fri, 4 Oct 2019 15:56:01 -0400 Subject: [PATCH 026/316] [Keymap] :world_map: Adds massdrop/alt/favorable-mutation keymap (#6893) Features: * Tap space for space, hold for cmd * Tap caps lock for esc, hold for ctrl * Dedicated key for entering default mode of yabai window manager * Who needs arrow keys, anyways??? * Method for clearing all stuck-down mods --- .../alt/keymaps/favorable-mutation/README.md | 14 ++ .../alt/keymaps/favorable-mutation/config.h | 28 ++++ .../alt/keymaps/favorable-mutation/keymap.c | 147 ++++++++++++++++++ 3 files changed, 189 insertions(+) create mode 100644 keyboards/massdrop/alt/keymaps/favorable-mutation/README.md create mode 100644 keyboards/massdrop/alt/keymaps/favorable-mutation/config.h create mode 100644 keyboards/massdrop/alt/keymaps/favorable-mutation/keymap.c diff --git a/keyboards/massdrop/alt/keymaps/favorable-mutation/README.md b/keyboards/massdrop/alt/keymaps/favorable-mutation/README.md new file mode 100644 index 000000000000..9b0ad513b45f --- /dev/null +++ b/keyboards/massdrop/alt/keymaps/favorable-mutation/README.md @@ -0,0 +1,14 @@ +### Massdrop Alt Layout + +This layout is for the [Massdrop Alt +Keyboard](https://drop.com/buy/massdrop-alt-mechanical-keyboard) +and targets MacOS machines. + +Some features: + +* Tap space for space, hold for cmd +* Tap caps lock for esc, hold for ctrl +* Dedicated key for entering default mode of [yabai window +manager](/~https://github.com/koekeishiya/yabai) +* Who needs arrow keys, anyways??? +* Method for clearing all stuck-down mods diff --git a/keyboards/massdrop/alt/keymaps/favorable-mutation/config.h b/keyboards/massdrop/alt/keymaps/favorable-mutation/config.h new file mode 100644 index 000000000000..1893f2ba6e06 --- /dev/null +++ b/keyboards/massdrop/alt/keymaps/favorable-mutation/config.h @@ -0,0 +1,28 @@ +/* +Copyright 2019 Griffin Rademacher + +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 . +*/ + +#pragma once + +// toggle one-shot layer keys after this many presses +#define ONESHOT_TAP_TOGGLE 3 + +// set time held before Mod-Tap key sends mod code +#define TAPPING_TERM 1000 + +// permissive hold: if holding down a Mod-Tap key while pressing another, it +// acts as a mod, even within the tapping term +#define PERMISSIVE_HOLD diff --git a/keyboards/massdrop/alt/keymaps/favorable-mutation/keymap.c b/keyboards/massdrop/alt/keymaps/favorable-mutation/keymap.c new file mode 100644 index 000000000000..873d18449b10 --- /dev/null +++ b/keyboards/massdrop/alt/keymaps/favorable-mutation/keymap.c @@ -0,0 +1,147 @@ +#include QMK_KEYBOARD_H + +enum alt_keycodes { + U_T_AUTO = SAFE_RANGE, //USB Extra Port Toggle Auto Detect / Always Active + U_T_AGCR, //USB Toggle Automatic GCR control + DBG_TOG, //DEBUG Toggle On / Off + DBG_MTRX, //DEBUG Toggle Matrix Prints + DBG_KBD, //DEBUG Toggle Keyboard Prints + DBG_MOU, //DEBUG Toggle Mouse Prints + MD_BOOT, //Restart into bootloader after hold timeout + HK_COSL, //Clear held-down keys +}; + +#define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode +#define CTL_ESC LCTL_T(KC_ESC) +#define TP_LSFT OSM(MOD_LSFT) +#define TP_RSFT OSM(MOD_RSFT) +#define TP_LALT OSM(MOD_LALT) +#define TP_RALT OSM(MOD_RALT) +#define KC_YBAI LCTL(KC_SPC) +#define GUI_SPC LGUI_T(KC_SPC) +#define KC_SPOT LGUI(KC_SPC) + +//TODO default layer vim-like binds that work with WM, i to type??? this leads +//to layers of vim modes - what's the best way to deal with that? +//also need to deal with shift not working for other mods, add to shift layer +//most likely +// +//TODO tap/toggle for layers + +keymap_config_t keymap_config; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + 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_BSPC, KC_SPOT, + 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_HOME, + CTL_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_MUTE, + TP_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_VOLU, KC_MPLY, + TP_LALT, TG(2), KC_YBAI, GUI_SPC, TP_RALT, TG(1), KC_MRWD, KC_VOLD, KC_MFFD + ), + [1] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, + _______, RGB_SPD, RGB_VAI, RGB_SPI, RGB_HUI, RGB_SAI, _______, U_T_AUTO,U_T_AGCR,_______, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_HOME, + _______, RGB_RMOD,RGB_VAD, RGB_MOD, RGB_HUD, RGB_SAD, _______, KC_MRWD, KC_MFFD, _______, _______, _______, _______, KC_PGUP, + _______, RGB_TOG, _______, _______, _______, MD_BOOT, TG_NKRO, DBG_TOG, _______, _______, _______, _______, KC_UP, KC_PGDN, + _______, _______, _______, HK_COSL, _______, TG(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + /* + [X] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + */ +}; + +// 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) { +}; + +#define MODS_SHIFT (get_mods() & MOD_MASK_SHIFT) +#define MODS_CTRL (get_mods() & MOD_MASK_CTRL) +#define MODS_ALT (get_mods() & MOD_MASK_ALT) + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + static uint32_t key_timer; + + switch (keycode) { + case HK_COSL: + clear_keyboard(); + reset_oneshot_layer(); + return true; + case U_T_AUTO: + if (record->event.pressed && MODS_SHIFT && MODS_CTRL) { + TOGGLE_FLAG_AND_PRINT(usb_extra_manual, "USB extra port manual mode"); + } + return false; + case U_T_AGCR: + if (record->event.pressed && MODS_SHIFT && MODS_CTRL) { + TOGGLE_FLAG_AND_PRINT(usb_gcr_auto, "USB GCR auto mode"); + } + return false; + case DBG_TOG: + if (record->event.pressed) { + TOGGLE_FLAG_AND_PRINT(debug_enable, "Debug mode"); + } + return false; + case DBG_MTRX: + if (record->event.pressed) { + TOGGLE_FLAG_AND_PRINT(debug_matrix, "Debug matrix"); + } + return false; + case DBG_KBD: + if (record->event.pressed) { + TOGGLE_FLAG_AND_PRINT(debug_keyboard, "Debug keyboard"); + } + return false; + case DBG_MOU: + if (record->event.pressed) { + TOGGLE_FLAG_AND_PRINT(debug_mouse, "Debug mouse"); + } + return false; + case MD_BOOT: + if (record->event.pressed) { + key_timer = timer_read32(); + } else { + if (timer_elapsed32(key_timer) >= 500) { + reset_keyboard(); + } + } + return false; + case RGB_TOG: + if (record->event.pressed) { + switch (rgb_matrix_get_flags()) { + case LED_FLAG_ALL: { + rgb_matrix_set_flags(LED_FLAG_KEYLIGHT); + rgb_matrix_set_color_all(0, 0, 0); + } + break; + case LED_FLAG_KEYLIGHT: { + rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); + rgb_matrix_set_color_all(0, 0, 0); + } + break; + case LED_FLAG_UNDERGLOW: { + rgb_matrix_set_flags(LED_FLAG_NONE); + rgb_matrix_disable_noeeprom(); + } + break; + default: { + rgb_matrix_set_flags(LED_FLAG_ALL); + rgb_matrix_enable_noeeprom(); + } + break; + } + } + return false; + default: + return true; //Process all other keycodes normally + } +} From c5ffd182c8daeaa0b50c45f4f959b5615ae2a6e6 Mon Sep 17 00:00:00 2001 From: Louis Orleans Date: Fri, 4 Oct 2019 20:32:52 -0700 Subject: [PATCH 027/316] [Keymap] update my keymap for Infinity Ergodox (#6864) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🎉 Building simple flasher * 🎉 Flashing works * 🎨 Cleaning up * 🐛 Being more specific with board identity * 🐛 Flashing correct keymap * 🎉 Adding keymap * ✨ Updating keymap * 🚨 RGB * ⏪ Revert "🚨 RGB" This reverts commit 9ceabfb267f8daedaad929231229c703abc12ec4. * ✨ Improvements to flasher * ✨ Layout tweaks * 💄 Messing around with LCD * 💄 Enabling LCD backlight matching * 🔧 Updating layout * 🐛 Fixing console logging * 🎨 Cleaning up indentation * 🔧 Adding editorconfig * ✨ Adding game layer * 💄 Changing numpad layout * ✨🔥 redoing entire layout It's now more similar to the Planck default layout * ✨ add workman and dvorak layouts * 🐛 fix numpad * 🐛 fix layer orders * 🐛 fix layer toggling * 🐛 fix tri-layer switching * 🐛 fix LCD colors for adjustment layers * 🔥 remove old flasher project * 🔥 remove simple_visualizer * 💄 update LCD colors * 📝 fix layout comments * 💄 swapping 2u buttons * 🔥🔧 removing editorconfig * 🚨 using 2 spaces * 📝 add README * ⏪ Revert "💄 Enabling LCD backlight matching" This reverts commit 51577903dfdc9fea5d33e9ab8cfa9b854e7ae19e. * ⏪ Revert "💄 Messing around with LCD" This reverts commit fdd9acdae514a3e0e4a7153225053680744980e5. * 🐛 fix thumb inconsistency in QWERTY * 🐛 fix media keys * ✨ add F# shortcuts to vertical 1.5u buttons * ✨ hold enter for RShift * ✨ hold for numpad * 🎨 remove unnecessary breaks * 🎨 reoganizing layers * ✨ add Colmak layer * 🚧🔧 add basic config * ✨ use more standard numpad layout * 💄 change layer orders * ✨ add caps lock on adjust layer * 🔥 disable space cadet * 📝 update README * 🔨 use userspace config * 🎨 clean up a bit * 🐛 undefine tapping toggle from base config * 🔨 rename LED functions * 💩 someone commited Windows line endings * ✨ left hand thumb is space * ♻️ extract layers def to new file * 🔥 remove unnecessary hooks * ✨💄 set LCD text and color by layer * 💄 update keymap removing layer buttons that I don't really use * ✨ set backlight to full brightness on boot * 🔥 remove unnecessary includes --- .../keymaps/dudeofawesome/keymap.c | 174 +++----- .../keymaps/dudeofawesome/layers.h | 14 + .../keymaps/dudeofawesome/simple_visualizer.h | 123 ++++++ .../keymaps/dudeofawesome/visualizer.c | 384 +++--------------- 4 files changed, 263 insertions(+), 432 deletions(-) create mode 100644 keyboards/ergodox_infinity/keymaps/dudeofawesome/layers.h create mode 100644 keyboards/ergodox_infinity/keymaps/dudeofawesome/simple_visualizer.h diff --git a/keyboards/ergodox_infinity/keymaps/dudeofawesome/keymap.c b/keyboards/ergodox_infinity/keymaps/dudeofawesome/keymap.c index cf0b452bdfdf..26de392f9a7c 100644 --- a/keyboards/ergodox_infinity/keymaps/dudeofawesome/keymap.c +++ b/keyboards/ergodox_infinity/keymaps/dudeofawesome/keymap.c @@ -1,20 +1,6 @@ #include QMK_KEYBOARD_H -#include "debug.h" -#include "action_layer.h" #include "version.h" - -enum custom_layers { - _QWERTY, - _WORKMAN, - _DVORAK, - _COLEMAK, - _LOWER, - _RAISE, - _ADJUST, - _GAME, - _MOUSE, - _NUM, -}; +#include "layers.h" enum custom_keycodes { QWERTY = SAFE_RANGE, @@ -39,41 +25,41 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Tab | Q | W | E | R | T | [{ | | ]} | Y | U | I | O | P | BSPC | * |--------+-----+-----+-----+-----+-----| | | |-----+-----+-----+-----+-----+--------| * | ESC | A | S | D | F | G |------| |------| H | J | K | L | ; | ' | - * |--------+-----+-----+-----+-----+-----| L1 | | L1 |-----+-----+-----+-----+-----+--------| + * |--------+-----+-----+-----+-----+-----| | | |-----+-----+-----+-----+-----+--------| * | LShift | Z | X | C | V | B | | | | N | M | , | . | / | Enter | * `--------+-----+-----+-----+-----+------------' `------------+-----+-----+-----+-----+--------' * | Num |Ctrl | Alt |LGUI |Lower| |Raise|Left |Down | Up |Right | * `------------------------------' `------------------------------' * ,------------. ,------------. - * |Play |Mouse | | Num |Mouse| - * ,----|-----|------| |------+-----+-----. - * | | | Alt | | Alt | | | - * |BSPC|LOWER|------| |------|RAISE|Space| - * | | | LGUI | | LGUI | | | - * `-----------------' `------------------' + * |Play | | | |Play | + * ,-----|-----|------| |------+-----+-----. + * | | | Alt | | Alt | | | + * |Space|LOWER|------| |------|RAISE|Space| + * | | | LGUI | | LGUI | | | + * `------------------' `------------------' */ [_QWERTY] = LAYOUT_ergodox( // left hand KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRACKET, KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_FN1, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, _______, TT(_NUM), KC_LCTL, KC_LALT, KC_LGUI, LOWER, - KC_MPLY, TG(_MOUSE), + KC_MPLY, _______, KC_LALT, - KC_BSPACE, LOWER, KC_LGUI, + KC_SPACE, LOWER, KC_LGUI, // right hand KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, KC_RBRACKET, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPACE, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_QUOTE, - KC_FN1, KC_N, KC_M, KC_COMM, KC_DOT, LT(_MOUSE, KC_SLSH), RSFT_T(KC_ENT), + _______, KC_N, KC_M, KC_COMM, KC_DOT, LT(_MOUSE, KC_SLSH), RSFT_T(KC_ENT), RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, - TT(_NUM), TG(_MOUSE), + _______, KC_MPLY, KC_LALT, - KC_LGUI, RAISE, KC_SPACE + KC_LGUI, RAISE, KC_SPACE ), /* Keymap 0: Basic Workman layer @@ -84,41 +70,41 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Tab | Q | D | R | W | B | [{ | | ]} | J | F | U | P | ; | BSPC | * |--------+-----+-----+-----+-----+-----| | | |-----+-----+-----+-----+-----+--------| * | ESC | A | S | H | T | G |------| |------| Y | N | E | O | I | ' | - * |--------+-----+-----+-----+-----+-----| L1 | | L1 |-----+-----+-----+-----+-----+--------| + * |--------+-----+-----+-----+-----+-----| | | |-----+-----+-----+-----+-----+--------| * | LShift | Z | X | M | C | V | | | | K | L | , | . | / | Enter | * `--------+-----+-----+-----+-----+------------' `------------+-----+-----+-----+-----+--------' * | Num |Ctrl | Alt |LGUI |Lower| |Raise|Left |Down | Up |Right | * `------------------------------' `------------------------------' * ,------------. ,------------. - * |Play |Mouse | | Num |Mouse| - * ,----|-----|------| |------+-----+-----. - * | | | Alt | | Alt | | | - * |BSPC|LOWER|------| |------|RAISE|Space| - * | | | LGUI | | LGUI | | | - * `-----------------' `------------------' + * |Play | | | |Play | + * ,-----|-----|------| |------+-----+-----. + * | | | Alt | | Alt | | | + * |Space|LOWER|------| |------|RAISE|Space| + * | | | LGUI | | LGUI | | | + * `------------------' `------------------' */ [_WORKMAN] = LAYOUT_ergodox( // left hand KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, KC_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_LBRACKET, KC_ESC, KC_A, KC_S, KC_H, KC_T, KC_G, - KC_LSFT, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_FN1, + KC_LSFT, KC_Z, KC_X, KC_M, KC_C, KC_V, _______, TT(_NUM), KC_LCTL, KC_LALT, KC_LGUI, LOWER, - KC_MPLY, TG(_MOUSE), + KC_MPLY, _______, KC_LALT, - KC_BSPACE, LOWER, KC_LGUI, + KC_SPACE, LOWER, KC_LGUI, // right hand KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, KC_RBRACKET, KC_J, KC_F, KC_U, KC_P, KC_SCOLON, KC_BSPACE, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOTE, - KC_FN1, KC_K, KC_L, KC_COMM, KC_DOT, LT(_MOUSE, KC_SLSH), RSFT_T(KC_ENT), + _______, KC_K, KC_L, KC_COMM, KC_DOT, LT(_MOUSE, KC_SLSH), RSFT_T(KC_ENT), RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, - TT(_NUM), TG(_MOUSE), + _______, KC_MPLY, KC_LALT, - KC_LGUI, RAISE, KC_SPACE + KC_LGUI, RAISE, KC_SPACE ), /* Keymap 0: Basic Dvorak layer @@ -129,41 +115,41 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Tab | ' | , | . | P | Y | [{ | | ]} | F | G | C | R | L | BSPC | * |--------+-----+-----+-----+-----+-----| | | |-----+-----+-----+-----+-----+--------| * | ESC | A | O | E | U | I |------| |------| D | H | T | N | S | / | - * |--------+-----+-----+-----+-----+-----| L1 | | L1 |-----+-----+-----+-----+-----+--------| + * |--------+-----+-----+-----+-----+-----| | | |-----+-----+-----+-----+-----+--------| * | LShift | ; | Q | J | K | X | | | | B | M | W | V | Z | Enter | * `--------+-----+-----+-----+-----+------------' `------------+-----+-----+-----+-----+--------' * | Num |Ctrl | Alt |LGUI |Lower| |Raise|Left |Down | Up |Right | * `------------------------------' `------------------------------' * ,------------. ,------------. - * |Play |Mouse | | Num |Mouse| - * ,----|-----|------| |------+-----+-----. - * | | | Alt | | Alt | | | - * |BSPC|LOWER|------| |------|RAISE|Space| - * | | | LGUI | | LGUI | | | - * `-----------------' `------------------' + * |Play | | | |Play | + * ,-----|-----|------| |------+-----+-----. + * | | | Alt | | Alt | | | + * |Space|LOWER|------| |------|RAISE|Space| + * | | | LGUI | | LGUI | | | + * `------------------' `------------------' */ [_DVORAK] = LAYOUT_ergodox( // left hand KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_LBRACKET, KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, - KC_LSFT, KC_SCOLON, KC_Q, KC_J, KC_K, KC_X, KC_FN1, + KC_LSFT, KC_SCOLON, KC_Q, KC_J, KC_K, KC_X, _______, TT(_NUM), KC_LCTL, KC_LALT, KC_LGUI, LOWER, - KC_MPLY, TG(_MOUSE), + KC_MPLY, _______, KC_LALT, - KC_BSPACE, LOWER, KC_LGUI, + KC_SPACE, LOWER, KC_LGUI, // right hand KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, KC_RBRACKET, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPACE, KC_D, KC_H, KC_T, KC_N, KC_S, LT(MOUSE, KC_SLSH), - KC_FN1, KC_B, KC_M, KC_W, KC_V, KC_Z, RSFT_T(KC_ENT), + _______, KC_B, KC_M, KC_W, KC_V, KC_Z, RSFT_T(KC_ENT), RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, - TT(_NUM), TG(_MOUSE), + _______, KC_MPLY, KC_LALT, - KC_LGUI, RAISE, KC_SPACE + KC_LGUI, RAISE, KC_SPACE ), /* Keymap 0: Basic Colemak layer @@ -174,41 +160,41 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Tab | Q | W | F | P | G | [{ | | ]} | J | L | U | Y | ; | BSPC | * |--------+-----+-----+-----+-----+-----| | | |-----+-----+-----+-----+-----+--------| * | ESC | A | R | S | T | D |------| |------| H | N | E | I | O | ' | - * |--------+-----+-----+-----+-----+-----| L1 | | L1 |-----+-----+-----+-----+-----+--------| + * |--------+-----+-----+-----+-----+-----| | | |-----+-----+-----+-----+-----+--------| * | LShift | Z | X | C | V | B | | | | K | M | , | . | / | Enter | * `--------+-----+-----+-----+-----+------------' `------------+-----+-----+-----+-----+--------' * | Num |Ctrl | Alt |LGUI |Lower| |Raise|Left |Down | Up |Right | * `------------------------------' `------------------------------' * ,------------. ,------------. - * |Play |Mouse | | Num |Mouse| - * ,----|-----|------| |------+-----+-----. - * | | | Alt | | Alt | | | - * |BSPC|LOWER|------| |------|RAISE|Space| - * | | | LGUI | | LGUI | | | - * `-----------------' `------------------' + * |Play | | | |Play | + * ,-----|-----|------| |------+-----+-----. + * | | | Alt | | Alt | | | + * |Space|LOWER|------| |------|RAISE|Space| + * | | | LGUI | | LGUI | | | + * `------------------' `------------------' */ [_COLEMAK] = LAYOUT_ergodox( // left hand KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_LBRACKET, KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_FN1, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, _______, TT(_NUM), KC_LCTL, KC_LALT, KC_LGUI, LOWER, - KC_MPLY, TG(_MOUSE), + KC_MPLY, _______, KC_LALT, - KC_BSPACE, LOWER, KC_LGUI, + KC_SPACE, LOWER, KC_LGUI, // right hand KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, KC_RBRACKET, KC_J, KC_L, KC_U, KC_Y, KC_SCOLON, KC_BSPACE, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOTE, - KC_FN1, KC_K, KC_M, KC_COMM, KC_DOT, LT(_MOUSE, KC_SLSH), RSFT_T(KC_ENT), + _______, KC_K, KC_M, KC_COMM, KC_DOT, LT(_MOUSE, KC_SLSH), RSFT_T(KC_ENT), RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, - TT(_NUM), TG(_MOUSE), + _______, KC_MPLY, KC_LALT, - KC_LGUI, RAISE, KC_SPACE + KC_LGUI, RAISE, KC_SPACE ), /* Lower @@ -216,19 +202,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,---------------------------------------------------. ,--------------------------------------------------. * | Version | F1 | F2 | F3 | F4 | F5 | F11 | | F12 | F6 | F7 | F8 | F9 | F10 | | * |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| - * | ~ | ! | @ | # | $ | % | | | | ^ | & | * | ( | ) | | + * | ~ | ! | @ | # | $ | % | F6 | | F5 | ^ | & | * | ( | ) | | * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | Del | F1 | F2 | F3 | F4 | F5 |------| |------| F6 | _ | + | { | } | | | - * |---------+------+------+------+------+------| L2 | | L2 |------+------+------+------+------+--------| + * |---------+------+------+------+------+------| F12 | | F11 |------+------+------+------+------+--------| * | | F7 | F8 | F9 | F10 | F11 | | | | F12 |ISO ~ |ISO | | Home | End | | * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * | | | | | | | | Play | Vol- | Vol+ | Next | * `-----------------------------------' `----------------------------------' * ,-------------. ,-------------. - * |Animat| | |Toggle|Solid | + * | | | | | | * ,------|------|------| |------+------+------. - * |Bright|Bright| | | |Hue- |Hue+ | - * |ness- |ness+ |------| |------| | | + * | | | | | | | | + * | | |------| |------| | | * | | | | | | | | * `--------------------' `--------------------' */ @@ -261,10 +247,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,---------------------------------------------------. ,--------------------------------------------------. * | Version | F1 | F2 | F3 | F4 | F5 | F11 | | F12 | F6 | F7 | F8 | F9 | F10 | F11 | * |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| - * | ` | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | | + * | ` | 1 | 2 | 3 | 4 | 5 | F6 | | F5 | 6 | 7 | 8 | 9 | 0 | | * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | Del | F1 | F2 | F3 | F4 | F5 |------| |------| F6 | - | = | [ | ] | \ | - * |---------+------+------+------+------+------| L2 | | L2 |------+------+------+------+------+--------| + * |---------+------+------+------+------+------| F12 | | F11 |------+------+------+------+------+--------| * | | F7 | F8 | F9 | F10 | F11 | | | | F12 |ISO # |ISO / |Pg Up |Pg Dn | | * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * | | | | | | | | Play | Vol- | Vol+ | Next | @@ -308,7 +294,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * | |Reset |Debug | | | | | | | |TRM on|TRMoff| | | Del | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | CPSLCK | | | | |AG Nrm|------| |------|AG Swp|QWERTY|Wrkman|Dvorak| | | + * | CPSLCK | | | | |AG Nrm|------| |------|AG Swp|QWERTY|Wrkman|Dvorak|Colmak| | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | | | | | | | | | | | | Prev | Next | | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' @@ -325,7 +311,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_ADJUST] = LAYOUT_ergodox( // left hand VRSN, _______, _______, _______, _______, _______, _______, - _______, RESET, DEBUG, _______, _______, _______, _______, + _______, RESET, DEBUG, BL_TOGG, BL_STEP, _______, _______, KC_CAPS, _______, _______, _______, _______, AG_NORM, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -502,6 +488,11 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) return MACRO_NONE; }; +void matrix_init_user() { + backlight_enable(); + backlight_level(BACKLIGHT_LEVELS); +} + bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case QWERTY: @@ -576,34 +567,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } 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) { - uint8_t layer = biton32(layer_state); - - ergodox_board_led_off(); - ergodox_led_lower_off(); - ergodox_led_raise_off(); - ergodox_led_adjust_off(); - - switch (layer) { - case _LOWER: - ergodox_led_lower_on(); - break; - case _RAISE: - ergodox_led_raise_on(); - break; - case _ADJUST: - ergodox_led_adjust_on(); - break; - } -}; diff --git a/keyboards/ergodox_infinity/keymaps/dudeofawesome/layers.h b/keyboards/ergodox_infinity/keymaps/dudeofawesome/layers.h new file mode 100644 index 000000000000..d852fe980328 --- /dev/null +++ b/keyboards/ergodox_infinity/keymaps/dudeofawesome/layers.h @@ -0,0 +1,14 @@ +#include QMK_KEYBOARD_H + +enum custom_layers { + _QWERTY, + _WORKMAN, + _DVORAK, + _COLEMAK, + _LOWER, + _RAISE, + _ADJUST, + _GAME, + _MOUSE, + _NUM, +}; diff --git a/keyboards/ergodox_infinity/keymaps/dudeofawesome/simple_visualizer.h b/keyboards/ergodox_infinity/keymaps/dudeofawesome/simple_visualizer.h new file mode 100644 index 000000000000..9213e99f4289 --- /dev/null +++ b/keyboards/ergodox_infinity/keymaps/dudeofawesome/simple_visualizer.h @@ -0,0 +1,123 @@ +/* Copyright 2017 Fred Sundvik + * + * 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 KEYBOARDS_ERGODOX_INFINITY_SIMPLE_VISUALIZER_H_ +#define KEYBOARDS_ERGODOX_INFINITY_SIMPLE_VISUALIZER_H_ + +// Currently we are assuming that both the backlight and LCD are enabled +// But it's entirely possible to write a custom visualizer that use only +// one of them +#ifndef LCD_BACKLIGHT_ENABLE +#error This visualizer needs that LCD backlight is enabled +#endif + +#ifndef LCD_ENABLE +#error This visualizer needs that LCD is enabled +#endif + +#include "visualizer.h" +#include "visualizer_keyframes.h" +#include "lcd_keyframes.h" +#include "lcd_backlight_keyframes.h" +#include "system/serial_link.h" +#include "led.h" +#include "default_animations.h" + +static const uint32_t logo_background_color = LCD_COLOR(0x00, 0x00, 0xFF); +static const uint32_t initial_color = LCD_COLOR(0, 0, 0); + +static bool initial_update = true; + +// Feel free to modify the animations below, or even add new ones if needed + +static keyframe_animation_t lcd_layer_display = { + .num_frames = 1, + .loop = false, + .frame_lengths = {gfxMillisecondsToTicks(0)}, + .frame_functions = {lcd_keyframe_display_layer_and_led_states} +}; + +// The color animation animates the LCD color when you change layers +static keyframe_animation_t color_animation = { + .num_frames = 2, + .loop = false, + // Note that there's a 200 ms no-operation frame, + // this prevents the color from changing when activating the layer + // momentarily + .frame_lengths = {gfxMillisecondsToTicks(1), gfxMillisecondsToTicks(5)}, + .frame_functions = {keyframe_no_operation, lcd_backlight_keyframe_animate_color}, +}; + +void initialize_user_visualizer(visualizer_state_t* state) { + // The brightness will be dynamically adjustable in the future + // But for now, change it here. + lcd_backlight_brightness(130); + state->current_lcd_color = initial_color; + state->target_lcd_color = logo_background_color; + initial_update = true; + start_keyframe_animation(&default_startup_animation); +} + + +// This function should be implemented by the keymap visualizer +// Don't change anything else than state->target_lcd_color and state->layer_text as that's the only thing +// that the simple_visualizer assumes that you are updating +// Also make sure that the buffer passed to state->layer_text remains valid until the previous animation is +// stopped. This can be done by either double buffering it or by using constant strings +static void get_visualizer_layer_and_color(visualizer_state_t* state); + +void update_user_visualizer_state(visualizer_state_t* state, visualizer_keyboard_status_t* prev_status) { + // Add more tests, change the colors and layer texts here + // Usually you want to check the high bits (higher layers first) + // because that's the order layers are processed for keypresses + // You can for check for example: + // state->status.layer + // state->status.default_layer + // state->status.leds (see led.h for available statuses) + + uint32_t prev_color = state->target_lcd_color; + const char* prev_layer_text = state->layer_text; + + get_visualizer_layer_and_color(state); + + if (initial_update || prev_color != state->target_lcd_color) { + start_keyframe_animation(&color_animation); + } + + if (initial_update || prev_layer_text != state->layer_text) { + start_keyframe_animation(&lcd_layer_display); + } + // You can also stop existing animations, and start your custom ones here + // remember that you should normally have only one animation for the LCD + // and one for the background. But you can also combine them if you want. +} + +void user_visualizer_suspend(visualizer_state_t* state) { + state->layer_text = "Suspending..."; + uint8_t hue = LCD_HUE(state->current_lcd_color); + uint8_t sat = LCD_SAT(state->current_lcd_color); + state->target_lcd_color = LCD_COLOR(hue, sat, 0); + start_keyframe_animation(&default_suspend_animation); +} + +void user_visualizer_resume(visualizer_state_t* state) { + state->current_lcd_color = initial_color; + state->target_lcd_color = logo_background_color; + initial_update = true; + start_keyframe_animation(&default_startup_animation); +} + +#endif /* KEYBOARDS_ERGODOX_INFINITY_SIMPLE_VISUALIZER_H_ */ diff --git a/keyboards/ergodox_infinity/keymaps/dudeofawesome/visualizer.c b/keyboards/ergodox_infinity/keymaps/dudeofawesome/visualizer.c index d339ecc9704a..54fc2363c76c 100644 --- a/keyboards/ergodox_infinity/keymaps/dudeofawesome/visualizer.c +++ b/keyboards/ergodox_infinity/keymaps/dudeofawesome/visualizer.c @@ -1,5 +1,5 @@ /* -Copyright 2016 Fred Sundvik +Copyright 2017 Fred Sundvik 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 @@ -15,331 +15,65 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -/** - * Currently we are assuming that both the backlight and LCD are enabled - * But it's entirely possible to write a custom visualizer that use only - * one of them - */ -#ifndef LCD_BACKLIGHT_ENABLE -#error This visualizer needs that LCD backlight is enabled -#endif - -#ifndef LCD_ENABLE -#error This visualizer needs that LCD is enabled -#endif - -#include "./visualizer.h" -#include "visualizer_keyframes.h" -#include "lcd_keyframes.h" -#include "lcd_backlight_keyframes.h" -#include "system/serial_link.h" -#include "default_animations.h" - -static const uint32_t logo_background_color = LCD_COLOR(0, 0, 255); -static const uint32_t initial_color = LCD_COLOR(84, 255, 255); - -static const uint32_t led_emulation_colors[4] = { - LCD_COLOR(0, 0, 255), - LCD_COLOR(141, 255, 255), - LCD_COLOR(18, 255, 255), - LCD_COLOR(194, 255, 255), -}; - -static uint32_t next_led_target_color = 0; - -typedef enum { - LCD_STATE_INITIAL, - LCD_STATE_LAYER_BITMAP, - LCD_STATE_BITMAP_AND_LEDS, -} lcd_state_t; - -static lcd_state_t lcd_state = LCD_STATE_INITIAL; - -typedef struct { - uint8_t led_on; - uint8_t led1; - uint8_t led2; - uint8_t led3; -} visualizer_user_data_t; - -/** - * Don't access from visualization function, use the visualizer state instead - */ -static visualizer_user_data_t user_data_keyboard = { - .led_on = 0, - .led1 = LED_BRIGHTNESS_HI, - .led2 = LED_BRIGHTNESS_HI, - .led3 = LED_BRIGHTNESS_HI, -}; - -_Static_assert(sizeof(visualizer_user_data_t) <= VISUALIZER_USER_DATA_SIZE, - "Please increase the VISUALIZER_USER_DATA_SIZE"); - -// Feel free to modify the animations below, or even add new ones if needed - -// The color animation animates the LCD color when you change layers -static keyframe_animation_t one_led_color = { - .num_frames = 1, - .loop = false, - .frame_lengths = {gfxMillisecondsToTicks(0)}, - .frame_functions = {lcd_backlight_keyframe_set_color}, -}; - -bool swap_led_target_color(keyframe_animation_t* animation, visualizer_state_t* state) { - uint32_t temp = next_led_target_color; - next_led_target_color = state->target_lcd_color; - state->target_lcd_color = temp; - return false; -} - -// The color animation animates the LCD color when you change layers -static keyframe_animation_t two_led_colors = { - .num_frames = 2, - .loop = true, - .frame_lengths = {gfxMillisecondsToTicks(1000), gfxMillisecondsToTicks(0)}, - .frame_functions = {lcd_backlight_keyframe_set_color, swap_led_target_color}, -}; - -/** - * The LCD animation alternates between the layer name display and a - * bitmap that displays all active layers - */ -static keyframe_animation_t lcd_bitmap_animation = { - .num_frames = 1, - .loop = false, - .frame_lengths = {gfxMillisecondsToTicks(0)}, - .frame_functions = {lcd_keyframe_display_layer_bitmap}, -}; - -static keyframe_animation_t lcd_bitmap_leds_animation = { - .num_frames = 2, - .loop = true, - .frame_lengths = {gfxMillisecondsToTicks(2000), gfxMillisecondsToTicks(2000)}, - .frame_functions = {lcd_keyframe_display_layer_bitmap, lcd_keyframe_display_led_states}, -}; - -void initialize_user_visualizer(visualizer_state_t* state) { - /** - * The brightness will be dynamically adjustable in the future - * But for now, change it here. - */ - lcd_backlight_brightness(180); - state->current_lcd_color = initial_color; - state->target_lcd_color = logo_background_color; - lcd_state = LCD_STATE_INITIAL; - start_keyframe_animation(&default_startup_animation); -} - -static inline bool is_led_on(visualizer_user_data_t* user_data, uint8_t num) { - return user_data->led_on & (1u << num); -} - -static uint8_t get_led_index_master(visualizer_user_data_t* user_data) { - for (int i=0; i < 4; i++) { - if (is_led_on(user_data, i)) { - return i + 1; - } - } - return 0; -} - -static uint8_t get_led_index_slave(visualizer_user_data_t* user_data) { - uint8_t master_index = get_led_index_master(user_data); - if (master_index!=0) { - for (int i=master_index; i < 4; i++) { - if (is_led_on(user_data, i)) { - return i + 1; - } - } - } - - return 0; -} - -static uint8_t get_secondary_led_index(visualizer_user_data_t* user_data) { - if ( - is_led_on(user_data, 0) && - is_led_on(user_data, 1) && - is_led_on(user_data, 2) - ) { - return 3; - } - return 0; -} - -static uint8_t get_brightness(visualizer_user_data_t* user_data, uint8_t index) { - switch (index) { - case 1: - return user_data->led1; - case 2: - return user_data->led2; - case 3: - return user_data->led3; - } - return 0; -} - -static void update_emulated_leds(visualizer_state_t* state, visualizer_keyboard_status_t* prev_status) { - visualizer_user_data_t* user_data_new = (visualizer_user_data_t*)state->status.user_data; - visualizer_user_data_t* user_data_old = (visualizer_user_data_t*)prev_status->user_data; - - uint8_t new_index; - uint8_t old_index; - - if (true || is_serial_link_master()) { - new_index = get_led_index_master(user_data_new); - old_index = get_led_index_master(user_data_old); - } else { - new_index = get_led_index_slave(user_data_new); - old_index = get_led_index_slave(user_data_old); - } - - uint8_t new_secondary_index = get_secondary_led_index(user_data_new); - uint8_t old_secondary_index = get_secondary_led_index(user_data_old); - - uint8_t new_brightness = get_brightness(user_data_new, new_index); - uint8_t old_brightness = get_brightness(user_data_old, old_index); - - uint8_t new_secondary_brightness = get_brightness(user_data_new, new_secondary_index); - uint8_t old_secondary_brightness = get_brightness(user_data_old, old_secondary_index); - - if ( - lcd_state == LCD_STATE_INITIAL || - new_index != old_index || - new_secondary_index != old_secondary_index || - new_brightness != old_brightness || - new_secondary_brightness != old_secondary_brightness - ) { - if (new_secondary_index != 0) { - state->target_lcd_color = change_lcd_color_intensity( - led_emulation_colors[new_index], new_brightness); - next_led_target_color = change_lcd_color_intensity( - led_emulation_colors[new_secondary_index], new_secondary_brightness); - - stop_keyframe_animation(&one_led_color); - start_keyframe_animation(&two_led_colors); - } else { - state->target_lcd_color = change_lcd_color_intensity( - led_emulation_colors[new_index], new_brightness); - - stop_keyframe_animation(&two_led_colors); - start_keyframe_animation(&one_led_color); - } +#include "./simple_visualizer.h" +#include "util.h" +#include "layers.h" + +// This function should be implemented by the keymap visualizer +// Don't change anything else than state->target_lcd_color and state->layer_text as that's the only thing +// that the simple_visualizer assumes that you are updating +// Also make sure that the buffer passed to state->layer_text remains valid until the previous animation is +// stopped. This can be done by either double buffering it or by using constant strings +static void get_visualizer_layer_and_color(visualizer_state_t* state) { + switch(biton32(default_layer_state)) { + case _QWERTY: + state->layer_text = "QWERTY"; + state->target_lcd_color = LCD_COLOR(0, 255, 128); + break; + case _WORKMAN: + state->layer_text = "Workman"; + state->target_lcd_color = LCD_COLOR(80, 255, 128); + break; + case _DVORAK: + state->layer_text = "Dvorak"; + state->target_lcd_color = LCD_COLOR(194, 255, 128); + break; + case _COLEMAK: + state->layer_text = "Colemak"; + state->target_lcd_color = LCD_COLOR(18, 255, 128); + break; } -} - -static void update_lcd_text(visualizer_state_t* state, visualizer_keyboard_status_t* prev_status) { - if (state->status.leds) { - if ( - lcd_state != LCD_STATE_BITMAP_AND_LEDS || - state->status.leds != prev_status->leds || - state->status.layer != prev_status->layer || - state->status.default_layer != prev_status->default_layer - ) { - // NOTE: that it doesn't matter if the animation isn't playing, stop will do nothing in that case - stop_keyframe_animation(&lcd_bitmap_animation); - lcd_state = LCD_STATE_BITMAP_AND_LEDS; - /** - * For information: - * The logic in this function makes sure that this doesn't happen, but if you call start on an - * animation that is already playing it will be restarted. - */ - start_keyframe_animation(&lcd_bitmap_leds_animation); - } - } else { - if ( - lcd_state != LCD_STATE_LAYER_BITMAP || - state->status.layer != prev_status->layer || - state->status.default_layer != prev_status->default_layer - ) { - stop_keyframe_animation(&lcd_bitmap_leds_animation); - - lcd_state = LCD_STATE_LAYER_BITMAP; - start_keyframe_animation(&lcd_bitmap_animation); - } + switch(biton32(state->status.layer)) { + case _LOWER: + state->layer_text = "Lower"; + state->target_lcd_color = LCD_COLOR(141, 255, 255); + break; + case _RAISE: + state->layer_text = "Raise"; + state->target_lcd_color = LCD_COLOR(18, 255, 255); + break; + case _ADJUST: + state->layer_text = "Adjust"; + state->target_lcd_color = LCD_COLOR(194, 255, 255); + break; + case _NUM: + state->layer_text = "Numpad"; + state->target_lcd_color = LCD_COLOR(80, 255, 255); + break; + case _MOUSE: + state->layer_text = "Mouse"; + state->target_lcd_color = LCD_COLOR(300, 255, 255); + break; + case _GAME: + state->layer_text = "Game"; + state->target_lcd_color = LCD_COLOR(300, 255, 255); + break; + case _QWERTY: case _WORKMAN: case _DVORAK: case _COLEMAK: + break; + default: + state->layer_text = "NONE"; + state->target_lcd_color = LCD_COLOR(0, 255, 255); + break; } } - -void update_user_visualizer_state(visualizer_state_t* state, visualizer_keyboard_status_t* prev_status) { - /** - * Check the status here to start and stop animations - * You might have to save some state, like the current animation here so that you can start the right - * This function is called every time the status changes - * - * NOTE that this is called from the visualizer thread, so don't access anything else outside the status - * This is also important because the slave won't have access to the active layer for example outside the - * status. - */ - - update_emulated_leds(state, prev_status); - update_lcd_text(state, prev_status); -} - -void user_visualizer_suspend(visualizer_state_t* state) { - state->layer_text = "Suspending..."; - uint8_t hue = LCD_HUE(state->current_lcd_color); - uint8_t sat = LCD_SAT(state->current_lcd_color); - state->target_lcd_color = LCD_COLOR(hue, sat, 0); - start_keyframe_animation(&default_suspend_animation); -} - -void user_visualizer_resume(visualizer_state_t* state) { - state->current_lcd_color = initial_color; - state->target_lcd_color = logo_background_color; - lcd_state = LCD_STATE_INITIAL; - start_keyframe_animation(&default_startup_animation); -} - -void ergodox_board_led_on(void){ - // No board led support -} - -void ergodox_led_lower_on(void){ - user_data_keyboard.led_on |= (1u << 0); - visualizer_set_user_data(&user_data_keyboard); -} - -void ergodox_led_raise_on(void){ - user_data_keyboard.led_on |= (1u << 1); - visualizer_set_user_data(&user_data_keyboard); -} - -void ergodox_led_adjust_on(void){ - user_data_keyboard.led_on |= (1u << 2); - visualizer_set_user_data(&user_data_keyboard); -} - -void ergodox_board_led_off(void){ - // No board led support -} - -void ergodox_led_lower_off(void){ - user_data_keyboard.led_on &= ~(1u << 0); - visualizer_set_user_data(&user_data_keyboard); -} - -void ergodox_led_raise_off(void){ - user_data_keyboard.led_on &= ~(1u << 1); - visualizer_set_user_data(&user_data_keyboard); -} - -void ergodox_led_adjust_off(void){ - user_data_keyboard.led_on &= ~(1u << 2); - visualizer_set_user_data(&user_data_keyboard); -} - -void ergodox_led_lower_set(uint8_t n) { - user_data_keyboard.led1 = n; - visualizer_set_user_data(&user_data_keyboard); -} - -void ergodox_led_raise_set(uint8_t n) { - user_data_keyboard.led2 = n; - visualizer_set_user_data(&user_data_keyboard); -} - -void ergodox_led_adjust_set(uint8_t n) { - user_data_keyboard.led3 = n; - visualizer_set_user_data(&user_data_keyboard); -} From ec053c8283a58de59954f6fe9a9438ef29a24918 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Fri, 4 Oct 2019 22:03:10 -0700 Subject: [PATCH 028/316] [Keyboard] Percent Skog Lite (#6882) * initial commit of skog_lite * add layout macro from misterkeeb's tool * add default keymap * add pins used * rgb support * add tkl ansi community support * update readmes * add new layouts and configurator support --- keyboards/percent/skog_lite/config.h | 41 ++ keyboards/percent/skog_lite/info.json | 20 + .../skog_lite/keymaps/default/keymap.c | 27 ++ .../skog_lite/keymaps/default/readme.md | 1 + keyboards/percent/skog_lite/readme.md | 48 +++ keyboards/percent/skog_lite/rules.mk | 43 ++ keyboards/percent/skog_lite/skog_lite.c | 88 ++++ keyboards/percent/skog_lite/skog_lite.h | 75 ++++ keyboards/percent/skog_lite/usbconfig.h | 393 ++++++++++++++++++ 9 files changed, 736 insertions(+) create mode 100644 keyboards/percent/skog_lite/config.h create mode 100644 keyboards/percent/skog_lite/info.json create mode 100644 keyboards/percent/skog_lite/keymaps/default/keymap.c create mode 100644 keyboards/percent/skog_lite/keymaps/default/readme.md create mode 100644 keyboards/percent/skog_lite/readme.md create mode 100644 keyboards/percent/skog_lite/rules.mk create mode 100644 keyboards/percent/skog_lite/skog_lite.c create mode 100644 keyboards/percent/skog_lite/skog_lite.h create mode 100644 keyboards/percent/skog_lite/usbconfig.h diff --git a/keyboards/percent/skog_lite/config.h b/keyboards/percent/skog_lite/config.h new file mode 100644 index 000000000000..8362139119c2 --- /dev/null +++ b/keyboards/percent/skog_lite/config.h @@ -0,0 +1,41 @@ +/* +Copyright 2017 Luiz Ribeiro + +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 . +*/ + +#pragma once + +#include "config_common.h" + +#define VENDOR_ID 0x20A0 +#define PRODUCT_ID 0x422D +#define MANUFACTURER Percent +#define PRODUCT Skog Lite + +#define RGBLED_NUM 18 + +#define MATRIX_ROWS 7 +#define MATRIX_COLS 15 + +// 0 1 2 3 4 5 6 7 8 9 A B C D E +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B6, B5 } +#define MATRIX_COL_PINS { C4, C2, D7, C7, C6, A0, A1, A2, A3, A7, A6, A5, A4, C5, C3} +#define UNUSED_PINS + +#define DIODE_DIRECTION COL2ROW +#define DEBOUNCE 5 + +#define BACKLIGHT_LEVELS 1 +#define RGBLIGHT_ANIMATIONS diff --git a/keyboards/percent/skog_lite/info.json b/keyboards/percent/skog_lite/info.json new file mode 100644 index 000000000000..d8e382cce0b9 --- /dev/null +++ b/keyboards/percent/skog_lite/info.json @@ -0,0 +1,20 @@ +{ + "keyboard_name": "Skog Lite", + "url": "", + "maintainer": "qmk", + "width": 18.25, + "height": 6.5, + "layouts": { + "LAYOUT_tkl_ansi": { + "layout": [{"x":0, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6.5, "y":0}, {"x":7.5, "y":0}, {"x":8.5, "y":0}, {"x":9.5, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15.25, "y":0}, {"x":16.25, "y":0}, {"x":17.25, "y":0}, {"x":0, "y":1.5}, {"x":1, "y":1.5}, {"x":2, "y":1.5}, {"x":3, "y":1.5}, {"x":4, "y":1.5}, {"x":5, "y":1.5}, {"x":6, "y":1.5}, {"x":7, "y":1.5}, {"x":8, "y":1.5}, {"x":9, "y":1.5}, {"x":10, "y":1.5}, {"x":11, "y":1.5}, {"x":12, "y":1.5}, {"x":13, "y":1.5, "w":2}, {"x":15.25, "y":1.5}, {"x":16.25, "y":1.5}, {"x":17.25, "y":1.5}, {"x":0, "y":2.5, "w":1.5}, {"x":1.5, "y":2.5}, {"x":2.5, "y":2.5}, {"x":3.5, "y":2.5}, {"x":4.5, "y":2.5}, {"x":5.5, "y":2.5}, {"x":6.5, "y":2.5}, {"x":7.5, "y":2.5}, {"x":8.5, "y":2.5}, {"x":9.5, "y":2.5}, {"x":10.5, "y":2.5}, {"x":11.5, "y":2.5}, {"x":12.5, "y":2.5}, {"x":13.5, "y":2.5, "w":1.5}, {"x":15.25, "y":2.5}, {"x":16.25, "y":2.5}, {"x":17.25, "y":2.5}, {"x":0, "y":3.5, "w":1.75}, {"x":1.75, "y":3.5}, {"x":2.75, "y":3.5}, {"x":3.75, "y":3.5}, {"x":4.75, "y":3.5}, {"x":5.75, "y":3.5}, {"x":6.75, "y":3.5}, {"x":7.75, "y":3.5}, {"x":8.75, "y":3.5}, {"x":9.75, "y":3.5}, {"x":10.75, "y":3.5}, {"x":11.75, "y":3.5}, {"x":12.75, "y":3.5, "w":2.25}, {"x":0, "y":4.5, "w":2.25}, {"x":2.25, "y":4.5}, {"x":3.25, "y":4.5}, {"x":4.25, "y":4.5}, {"x":5.25, "y":4.5}, {"x":6.25, "y":4.5}, {"x":7.25, "y":4.5}, {"x":8.25, "y":4.5}, {"x":9.25, "y":4.5}, {"x":10.25, "y":4.5}, {"x":11.25, "y":4.5}, {"x":12.25, "y":4.5, "w":2.75}, {"x":16.25, "y":4.5}, {"x":0, "y":5.5, "w":1.25}, {"x":1.25, "y":5.5, "w":1.25}, {"x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"x":10, "y":5.5, "w":1.25}, {"x":11.25, "y":5.5, "w":1.25}, {"x":12.5, "y":5.5, "w":1.25}, {"x":13.75, "y":5.5, "w":1.25}, {"x":15.25, "y":5.5}, {"x":16.25, "y":5.5}, {"x":17.25, "y":5.5}] + }, + + "LAYOUT_tkl_7u_ansi": { + "layout": [{"x":0, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6.5, "y":0}, {"x":7.5, "y":0}, {"x":8.5, "y":0}, {"x":9.5, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15.25, "y":0}, {"x":16.25, "y":0}, {"x":17.25, "y":0}, {"x":0, "y":1.5}, {"x":1, "y":1.5}, {"x":2, "y":1.5}, {"x":3, "y":1.5}, {"x":4, "y":1.5}, {"x":5, "y":1.5}, {"x":6, "y":1.5}, {"x":7, "y":1.5}, {"x":8, "y":1.5}, {"x":9, "y":1.5}, {"x":10, "y":1.5}, {"x":11, "y":1.5}, {"x":12, "y":1.5}, {"x":13, "y":1.5, "w":2}, {"x":15.25, "y":1.5}, {"x":16.25, "y":1.5}, {"x":17.25, "y":1.5}, {"x":0, "y":2.5, "w":1.5}, {"x":1.5, "y":2.5}, {"x":2.5, "y":2.5}, {"x":3.5, "y":2.5}, {"x":4.5, "y":2.5}, {"x":5.5, "y":2.5}, {"x":6.5, "y":2.5}, {"x":7.5, "y":2.5}, {"x":8.5, "y":2.5}, {"x":9.5, "y":2.5}, {"x":10.5, "y":2.5}, {"x":11.5, "y":2.5}, {"x":12.5, "y":2.5}, {"x":13.5, "y":2.5, "w":1.5}, {"x":15.25, "y":2.5}, {"x":16.25, "y":2.5}, {"x":17.25, "y":2.5}, {"x":0, "y":3.5, "w":1.75}, {"x":1.75, "y":3.5}, {"x":2.75, "y":3.5}, {"x":3.75, "y":3.5}, {"x":4.75, "y":3.5}, {"x":5.75, "y":3.5}, {"x":6.75, "y":3.5}, {"x":7.75, "y":3.5}, {"x":8.75, "y":3.5}, {"x":9.75, "y":3.5}, {"x":10.75, "y":3.5}, {"x":11.75, "y":3.5}, {"x":12.75, "y":3.5, "w":2.25}, {"x":0, "y":4.5, "w":2.25}, {"x":2.25, "y":4.5}, {"x":3.25, "y":4.5}, {"x":4.25, "y":4.5}, {"x":5.25, "y":4.5}, {"x":6.25, "y":4.5}, {"x":7.25, "y":4.5}, {"x":8.25, "y":4.5}, {"x":9.25, "y":4.5}, {"x":10.25, "y":4.5}, {"x":11.25, "y":4.5}, {"x":12.25, "y":4.5, "w":2.75}, {"x":16.25, "y":4.5}, {"x":0, "y":5.5, "w":1.5}, {"x":1.5, "y":5.5}, {"x":2.5, "y":5.5, "w":1.5}, {"x":4, "y":5.5, "w":7}, {"x":11, "y":5.5, "w":1.5}, {"x":12.5, "y":5.5}, {"x":13.5, "y":5.5, "w":1.5}, {"x":15.25, "y":5.5}, {"x":16.25, "y":5.5}, {"x":17.25, "y":5.5}] + }, + + "LAYOUT_tkl_7u_ansi_blocker": { + "layout": [{"x":0, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6.5, "y":0}, {"x":7.5, "y":0}, {"x":8.5, "y":0}, {"x":9.5, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15.25, "y":0}, {"x":16.25, "y":0}, {"x":17.25, "y":0}, {"x":0, "y":1.5}, {"x":1, "y":1.5}, {"x":2, "y":1.5}, {"x":3, "y":1.5}, {"x":4, "y":1.5}, {"x":5, "y":1.5}, {"x":6, "y":1.5}, {"x":7, "y":1.5}, {"x":8, "y":1.5}, {"x":9, "y":1.5}, {"x":10, "y":1.5}, {"x":11, "y":1.5}, {"x":12, "y":1.5}, {"x":13, "y":1.5, "w":2}, {"x":15.25, "y":1.5}, {"x":16.25, "y":1.5}, {"x":17.25, "y":1.5}, {"x":0, "y":2.5, "w":1.5}, {"x":1.5, "y":2.5}, {"x":2.5, "y":2.5}, {"x":3.5, "y":2.5}, {"x":4.5, "y":2.5}, {"x":5.5, "y":2.5}, {"x":6.5, "y":2.5}, {"x":7.5, "y":2.5}, {"x":8.5, "y":2.5}, {"x":9.5, "y":2.5}, {"x":10.5, "y":2.5}, {"x":11.5, "y":2.5}, {"x":12.5, "y":2.5}, {"x":13.5, "y":2.5, "w":1.5}, {"x":15.25, "y":2.5}, {"x":16.25, "y":2.5}, {"x":17.25, "y":2.5}, {"x":0, "y":3.5, "w":1.75}, {"x":1.75, "y":3.5}, {"x":2.75, "y":3.5}, {"x":3.75, "y":3.5}, {"x":4.75, "y":3.5}, {"x":5.75, "y":3.5}, {"x":6.75, "y":3.5}, {"x":7.75, "y":3.5}, {"x":8.75, "y":3.5}, {"x":9.75, "y":3.5}, {"x":10.75, "y":3.5}, {"x":11.75, "y":3.5}, {"x":12.75, "y":3.5, "w":2.25}, {"x":0, "y":4.5, "w":2.25}, {"x":2.25, "y":4.5}, {"x":3.25, "y":4.5}, {"x":4.25, "y":4.5}, {"x":5.25, "y":4.5}, {"x":6.25, "y":4.5}, {"x":7.25, "y":4.5}, {"x":8.25, "y":4.5}, {"x":9.25, "y":4.5}, {"x":10.25, "y":4.5}, {"x":11.25, "y":4.5}, {"x":12.25, "y":4.5, "w":2.75}, {"x":16.25, "y":4.5}, {"x":0, "y":5.5, "w":1.5}, {"x":2.5, "y":5.5, "w":1.5}, {"x":4, "y":5.5, "w":7}, {"x":11, "y":5.5, "w":1.5}, {"x":13.5, "y":5.5, "w":1.5}, {"x":15.25, "y":5.5}, {"x":16.25, "y":5.5}, {"x":17.25, "y":5.5}] + } + } +} diff --git a/keyboards/percent/skog_lite/keymaps/default/keymap.c b/keyboards/percent/skog_lite/keymaps/default/keymap.c new file mode 100644 index 000000000000..ee1daa34e7db --- /dev/null +++ b/keyboards/percent/skog_lite/keymaps/default/keymap.c @@ -0,0 +1,27 @@ +/* Copyright 2019 mechmerlin + * + * 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 . + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT_tkl_ansi(\ + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR,KC_SLCK,KC_PAUS, \ + 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_BSPC, KC_INS ,KC_HOME,KC_PGUP, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,KC_LBRC,KC_RBRC,KC_BSLS, KC_DEL ,KC_END ,KC_PGDN, \ + 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,KC_SLSH, KC_RSFT, KC_UP, \ + KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, KC_APP,KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT) \ +}; diff --git a/keyboards/percent/skog_lite/keymaps/default/readme.md b/keyboards/percent/skog_lite/keymaps/default/readme.md new file mode 100644 index 000000000000..c7ec726b03ca --- /dev/null +++ b/keyboards/percent/skog_lite/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for Skog Lite \ No newline at end of file diff --git a/keyboards/percent/skog_lite/readme.md b/keyboards/percent/skog_lite/readme.md new file mode 100644 index 000000000000..369129e86fe0 --- /dev/null +++ b/keyboards/percent/skog_lite/readme.md @@ -0,0 +1,48 @@ +# Skog Lite + +TKL Custom Keyboard. + + +Keyboard Maintainer: [mechmerlin](/~https://github.com/mechmerlin) +Hardware Supported: Skog Lite PCB +Hardware Availability: [Kono Store](https://kono.store/products/skog-lite) + + +Make example for this keyboard (after setting up your build environment): + + make percent/skog_lite:default + +Flashing + +ps2avr(GB) boards use an atmega32a microcontroller and a different bootloader. It is not flashable using the regular QMK methods. + +**Reset Key:** Hold down the key located at `K05`, commonly programmed as `F5` while plugging in the keyboard. + +Windows: +1. Download [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash). +2. Place your keyboard into reset. +3. Press the `Find Device` button and ensure that your keyboard is found. +4. Press the `Open .hex File` button and locate the `.hex` file you created. +5. Press the `Flash Device` button and wait for the process to complete. + +macOS: +1. Install homebrew by typing the following: + ``` + /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + ``` +2. Install `crosspack-avr`. + ``` + brew cask install crosspack-avr + ``` +3. Install the following packages: + ``` + brew install python3 + pip3 install pyusb + brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb + ``` + +4. Place your keyboard into reset. +5. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file. + + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/percent/skog_lite/rules.mk b/keyboards/percent/skog_lite/rules.mk new file mode 100644 index 000000000000..ed29c47f2c26 --- /dev/null +++ b/keyboards/percent/skog_lite/rules.mk @@ -0,0 +1,43 @@ +# Copyright 2017 Luiz Ribeiro +# +# 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 . + +# MCU name +MCU = atmega32a + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = bootloadHID + +# build options +BOOTMAGIC_ENABLE = no +MOUSEKEY_ENABLE = yes +EXTRAKEY_ENABLE = yes +CONSOLE_ENABLE = yes +COMMAND_ENABLE = yes +BACKLIGHT_ENABLE = yes +RGBLIGHT_ENABLE = yes +RGBLIGHT_CUSTOM_DRIVER = yes + +OPT_DEFS = -DDEBUG_LEVEL=0 + +SRC = i2c_master.c + +LAYOUTS = tkl_ansi diff --git a/keyboards/percent/skog_lite/skog_lite.c b/keyboards/percent/skog_lite/skog_lite.c new file mode 100644 index 000000000000..a77fc925868d --- /dev/null +++ b/keyboards/percent/skog_lite/skog_lite.c @@ -0,0 +1,88 @@ +/* Copyright 2019 mechmerlin + * + * 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 . + */ +#include "rgblight.h" +#include "i2c_master.h" +#include "quantum.h" + +#ifdef RGBLIGHT_ENABLE +extern rgblight_config_t rgblight_config; + +void rgblight_set(void) { + if (!rgblight_config.enable) { + for (uint8_t i = 0; i < RGBLED_NUM; i++) { + led[i].r = 0; + led[i].g = 0; + led[i].b = 0; + } + } + + i2c_init(); + i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); +} +#endif + +void matrix_init_kb(void) { +#ifdef RGBLIGHT_ENABLE + if (rgblight_config.enable) { + i2c_init(); + i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); + } +#endif + // call user level keymaps, if any + matrix_init_user(); +} + +void matrix_scan_kb(void) { +#ifdef RGBLIGHT_ENABLE + rgblight_task(); +#endif + matrix_scan_user(); + /* Nothing else for now. */ +} + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + +void backlight_init_ports(void) { + // initialize pins D0, D1, D4 and D6 as output + setPinOutput(D0); + setPinOutput(D1); + setPinOutput(D4); + setPinOutput(D6); + + // turn backlight LEDs on + writePinHigh(D0); + writePinHigh(D1); + writePinHigh(D4); + writePinHigh(D6); +} + +void backlight_set(uint8_t level) { + if (level == 0) { + // turn backlight LEDs off + writePinLow(D0); + writePinLow(D1); + writePinLow(D4); + writePinLow(D6); + } else { + // turn backlight LEDs on + writePinHigh(D0); + writePinHigh(D1); + writePinHigh(D4); + writePinHigh(D6); + } +} diff --git a/keyboards/percent/skog_lite/skog_lite.h b/keyboards/percent/skog_lite/skog_lite.h new file mode 100644 index 000000000000..16dc70bf674a --- /dev/null +++ b/keyboards/percent/skog_lite/skog_lite.h @@ -0,0 +1,75 @@ +/* Copyright 2019 mechmerlin + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define ___ KC_NO + +// This a shortcut to help you visually see your layout. +// The first section contains all of the arguments +// The second converts the arguments into a two-dimensional array + +#define LAYOUT_tkl_ansi( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k6c, \ + k10, k1e, k11, k12, k13, k14, k1d, k15, k16, k17, k18, k19, k1a, k1b, k1c, k6b, k6a, \ + k20, k2e, k21, k22, k23, k24, k2d, k25, k26, k27, k28, k29, k2a, k2b, k2c, k69, k68, \ + k30, k3e, k31, k32, k33, k34, k3d, k35, k36, k37, k38, k39, k3a, \ + k40, k4e, k41, k42, k43, k44, k4d, k45, k46, k47, k48, k4b, k4c, \ + k50, k5e, k51, k54, k56, k57, k58, k5b, k5a, k5c, k67 \ +){ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, ___, ___, k3d, k3e }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, ___, ___, k4b, k4c, k4d, k4e }, \ + { k50, k51, ___, ___, k54, ___, k56, k57, k58, ___, k5a, k5b, k5c, ___, k5e }, \ + { ___, ___, ___, ___, ___, ___, ___, k67, k68, k69, k6a, k6b, k6c, ___, ___ }, \ +} + +#define LAYOUT_tkl_7u_ansi( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k6c, \ + k10, k1e, k11, k12, k13, k14, k1d, k15, k16, k17, k18, k19, k1a, k1b, k1c, k6b, k6a, \ + k20, k2e, k21, k22, k23, k24, k2d, k25, k26, k27, k28, k29, k2a, k2b, k2c, k69, k68, \ + k30, k3e, k31, k32, k33, k34, k3d, k35, k36, k37, k38, k39, k3a, \ + k40, k4e, k41, k42, k43, k44, k4d, k45, k46, k47, k48, k4b, k4c, \ + k50, k5e, k51, k54, k57, k58, k5b, k5a, k5c, k67 \ +){ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, ___, ___, k3d, k3e }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, ___, ___, k4b, k4c, k4d, k4e }, \ + { k50, k51, ___, ___, k54, ___, ___, k57, k58, ___, k5a, k5b, k5c, ___, k5e }, \ + { ___, ___, ___, ___, ___, ___, ___, k67, k68, k69, k6a, k6b, k6c, ___, ___ }, \ +} + +#define LAYOUT_tkl_7u_ansi_blocker( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k6c, \ + k10, k1e, k11, k12, k13, k14, k1d, k15, k16, k17, k18, k19, k1a, k1b, k1c, k6b, k6a, \ + k20, k2e, k21, k22, k23, k24, k2d, k25, k26, k27, k28, k29, k2a, k2b, k2c, k69, k68, \ + k30, k3e, k31, k32, k33, k34, k3d, k35, k36, k37, k38, k39, k3a, \ + k40, k4e, k41, k42, k43, k44, k4d, k45, k46, k47, k48, k4b, k4c, \ + k50, k51, k54, k57, k5b, k5a, k5c, k67 \ +){ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, ___, ___, k3d, k3e }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, ___, ___, k4b, k4c, k4d, k4e }, \ + { k50, k51, ___, ___, k54, ___, ___, k57, ___, ___, k5a, k5b, k5c, ___, ___ }, \ + { ___, ___, ___, ___, ___, ___, ___, k67, k68, k69, k6a, k6b, k6c, ___, ___ }, \ +} diff --git a/keyboards/percent/skog_lite/usbconfig.h b/keyboards/percent/skog_lite/usbconfig.h new file mode 100644 index 000000000000..54a7d20f1427 --- /dev/null +++ b/keyboards/percent/skog_lite/usbconfig.h @@ -0,0 +1,393 @@ +/* Name: usbconfig.h + * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers + * Author: Christian Starkjohann + * Creation Date: 2005-04-01 + * Tabsize: 4 + * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH + * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) + * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $ + */ + +#pragma once + +#include "config.h" + +/* +General Description: +This file is an example configuration (with inline documentation) for the USB +driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is +also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may +wire the lines to any other port, as long as D+ is also wired to INT0 (or any +other hardware interrupt, as long as it is the highest level interrupt, see +section at the end of this file). +*/ + +/* ---------------------------- Hardware Config ---------------------------- */ + +#define USB_CFG_IOPORTNAME D +/* This is the port where the USB bus is connected. When you configure it to + * "B", the registers PORTB, PINB and DDRB will be used. + */ +#define USB_CFG_DMINUS_BIT 3 +/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected. + * This may be any bit in the port. + */ +#define USB_CFG_DPLUS_BIT 2 +/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected. + * This may be any bit in the port. Please note that D+ must also be connected + * to interrupt pin INT0! [You can also use other interrupts, see section + * "Optional MCU Description" below, or you can connect D- to the interrupt, as + * it is required if you use the USB_COUNT_SOF feature. If you use D- for the + * interrupt, the USB interrupt will also be triggered at Start-Of-Frame + * markers every millisecond.] + */ +#define USB_CFG_CLOCK_KHZ (F_CPU/1000) +/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000, + * 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code + * require no crystal, they tolerate +/- 1% deviation from the nominal + * frequency. All other rates require a precision of 2000 ppm and thus a + * crystal! + * Since F_CPU should be defined to your actual clock rate anyway, you should + * not need to modify this setting. + */ +#define USB_CFG_CHECK_CRC 0 +/* Define this to 1 if you want that the driver checks integrity of incoming + * data packets (CRC checks). CRC checks cost quite a bit of code size and are + * currently only available for 18 MHz crystal clock. You must choose + * USB_CFG_CLOCK_KHZ = 18000 if you enable this option. + */ + +/* ----------------------- Optional Hardware Config ------------------------ */ + +/* #define USB_CFG_PULLUP_IOPORTNAME D */ +/* If you connect the 1.5k pullup resistor from D- to a port pin instead of + * V+, you can connect and disconnect the device from firmware by calling + * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h). + * This constant defines the port on which the pullup resistor is connected. + */ +/* #define USB_CFG_PULLUP_BIT 4 */ +/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined + * above) where the 1.5k pullup resistor is connected. See description + * above for details. + */ + +/* --------------------------- Functional Range ---------------------------- */ + +#define USB_CFG_HAVE_INTRIN_ENDPOINT 1 +/* Define this to 1 if you want to compile a version with two endpoints: The + * default control endpoint 0 and an interrupt-in endpoint (any other endpoint + * number). + */ +#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1 +/* Define this to 1 if you want to compile a version with three endpoints: The + * default control endpoint 0, an interrupt-in endpoint 3 (or the number + * configured below) and a catch-all default interrupt-in endpoint as above. + * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature. + */ +#define USB_CFG_EP3_NUMBER 3 +/* If the so-called endpoint 3 is used, it can now be configured to any other + * endpoint number (except 0) with this macro. Default if undefined is 3. + */ +/* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */ +/* The above macro defines the startup condition for data toggling on the + * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1. + * Since the token is toggled BEFORE sending any data, the first packet is + * sent with the oposite value of this configuration! + */ +#define USB_CFG_IMPLEMENT_HALT 0 +/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature + * for endpoint 1 (interrupt endpoint). Although you may not need this feature, + * it is required by the standard. We have made it a config option because it + * bloats the code considerably. + */ +#define USB_CFG_SUPPRESS_INTR_CODE 0 +/* Define this to 1 if you want to declare interrupt-in endpoints, but don't + * want to send any data over them. If this macro is defined to 1, functions + * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if + * you need the interrupt-in endpoints in order to comply to an interface + * (e.g. HID), but never want to send any data. This option saves a couple + * of bytes in flash memory and the transmit buffers in RAM. + */ +#define USB_CFG_INTR_POLL_INTERVAL 1 +/* If you compile a version with endpoint 1 (interrupt-in), this is the poll + * interval. The value is in milliseconds and must not be less than 10 ms for + * low speed devices. + */ +#define USB_CFG_IS_SELF_POWERED 0 +/* Define this to 1 if the device has its own power supply. Set it to 0 if the + * device is powered from the USB bus. + */ +#define USB_CFG_MAX_BUS_POWER 500 +/* Set this variable to the maximum USB bus power consumption of your device. + * The value is in milliamperes. [It will be divided by two since USB + * communicates power requirements in units of 2 mA.] + */ +#define USB_CFG_IMPLEMENT_FN_WRITE 1 +/* Set this to 1 if you want usbFunctionWrite() to be called for control-out + * transfers. Set it to 0 if you don't need it and want to save a couple of + * bytes. + */ +#define USB_CFG_IMPLEMENT_FN_READ 0 +/* Set this to 1 if you need to send control replies which are generated + * "on the fly" when usbFunctionRead() is called. If you only want to send + * data from a static buffer, set it to 0 and return the data from + * usbFunctionSetup(). This saves a couple of bytes. + */ +#define USB_CFG_IMPLEMENT_FN_WRITEOUT 0 +/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints. + * You must implement the function usbFunctionWriteOut() which receives all + * interrupt/bulk data sent to any endpoint other than 0. The endpoint number + * can be found in 'usbRxToken'. + */ +#define USB_CFG_HAVE_FLOWCONTROL 0 +/* Define this to 1 if you want flowcontrol over USB data. See the definition + * of the macros usbDisableAllRequests() and usbEnableAllRequests() in + * usbdrv.h. + */ +#define USB_CFG_DRIVER_FLASH_PAGE 0 +/* If the device has more than 64 kBytes of flash, define this to the 64 k page + * where the driver's constants (descriptors) are located. Or in other words: + * Define this to 1 for boot loaders on the ATMega128. + */ +#define USB_CFG_LONG_TRANSFERS 0 +/* Define this to 1 if you want to send/receive blocks of more than 254 bytes + * in a single control-in or control-out transfer. Note that the capability + * for long transfers increases the driver size. + */ +/* #define USB_RX_USER_HOOK(data, len) if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */ +/* This macro is a hook if you want to do unconventional things. If it is + * defined, it's inserted at the beginning of received message processing. + * If you eat the received message and don't want default processing to + * proceed, do a return after doing your things. One possible application + * (besides debugging) is to flash a status LED on each packet. + */ +/* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */ +/* This macro is a hook if you need to know when an USB RESET occurs. It has + * one parameter which distinguishes between the start of RESET state and its + * end. + */ +/* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */ +/* This macro (if defined) is executed when a USB SET_ADDRESS request was + * received. + */ +#define USB_COUNT_SOF 1 +/* define this macro to 1 if you need the global variable "usbSofCount" which + * counts SOF packets. This feature requires that the hardware interrupt is + * connected to D- instead of D+. + */ +/* #ifdef __ASSEMBLER__ + * macro myAssemblerMacro + * in YL, TCNT0 + * sts timer0Snapshot, YL + * endm + * #endif + * #define USB_SOF_HOOK myAssemblerMacro + * This macro (if defined) is executed in the assembler module when a + * Start Of Frame condition is detected. It is recommended to define it to + * the name of an assembler macro which is defined here as well so that more + * than one assembler instruction can be used. The macro may use the register + * YL and modify SREG. If it lasts longer than a couple of cycles, USB messages + * immediately after an SOF pulse may be lost and must be retried by the host. + * What can you do with this hook? Since the SOF signal occurs exactly every + * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in + * designs running on the internal RC oscillator. + * Please note that Start Of Frame detection works only if D- is wired to the + * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES! + */ +#define USB_CFG_CHECK_DATA_TOGGLING 0 +/* define this macro to 1 if you want to filter out duplicate data packets + * sent by the host. Duplicates occur only as a consequence of communication + * errors, when the host does not receive an ACK. Please note that you need to + * implement the filtering yourself in usbFunctionWriteOut() and + * usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable + * for each control- and out-endpoint to check for duplicate packets. + */ +#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0 +/* define this macro to 1 if you want the function usbMeasureFrameLength() + * compiled in. This function can be used to calibrate the AVR's RC oscillator. + */ +#define USB_USE_FAST_CRC 0 +/* The assembler module has two implementations for the CRC algorithm. One is + * faster, the other is smaller. This CRC routine is only used for transmitted + * messages where timing is not critical. The faster routine needs 31 cycles + * per byte while the smaller one needs 61 to 69 cycles. The faster routine + * may be worth the 32 bytes bigger code size if you transmit lots of data and + * run the AVR close to its limit. + */ + +/* -------------------------- Device Description --------------------------- */ + +#define USB_CFG_VENDOR_ID (VENDOR_ID & 0xFF), ((VENDOR_ID >> 8) & 0xFF) +/* USB vendor ID for the device, low byte first. If you have registered your + * own Vendor ID, define it here. Otherwise you may use one of obdev's free + * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_ID (PRODUCT_ID & 0xFF), ((PRODUCT_ID >> 8) & 0xFF) +/* This is the ID of the product, low byte first. It is interpreted in the + * scope of the vendor ID. If you have registered your own VID with usb.org + * or if you have licensed a PID from somebody else, define it here. Otherwise + * you may use one of obdev's free shared VID/PID pairs. See the file + * USB-IDs-for-free.txt for details! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_VERSION 0x00, 0x02 +/* Version number of the device: Minor number first, then major number. + */ +#define USB_CFG_VENDOR_NAME 'w', 'i', 'n', 'k', 'e', 'y', 'l', 'e', 's', 's', '.', 'k', 'r' +#define USB_CFG_VENDOR_NAME_LEN 13 +/* These two values define the vendor name returned by the USB device. The name + * must be given as a list of characters under single quotes. The characters + * are interpreted as Unicode (UTF-16) entities. + * If you don't want a vendor name string, undefine these macros. + * ALWAYS define a vendor name containing your Internet domain name if you use + * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for + * details. + */ +#define USB_CFG_DEVICE_NAME 'p', 's', '2', 'a', 'v', 'r', 'G', 'B' +#define USB_CFG_DEVICE_NAME_LEN 8 +/* Same as above for the device name. If you don't want a device name, undefine + * the macros. See the file USB-IDs-for-free.txt before you assign a name if + * you use a shared VID/PID. + */ +/*#define USB_CFG_SERIAL_NUMBER 'N', 'o', 'n', 'e' */ +/*#define USB_CFG_SERIAL_NUMBER_LEN 0 */ +/* Same as above for the serial number. If you don't want a serial number, + * undefine the macros. + * It may be useful to provide the serial number through other means than at + * compile time. See the section about descriptor properties below for how + * to fine tune control over USB descriptors such as the string descriptor + * for the serial number. + */ +#define USB_CFG_DEVICE_CLASS 0 +#define USB_CFG_DEVICE_SUBCLASS 0 +/* See USB specification if you want to conform to an existing device class. + * Class 0xff is "vendor specific". + */ +#define USB_CFG_INTERFACE_CLASS 3 /* HID */ +#define USB_CFG_INTERFACE_SUBCLASS 1 /* Boot */ +#define USB_CFG_INTERFACE_PROTOCOL 1 /* Keyboard */ +/* See USB specification if you want to conform to an existing device class or + * protocol. The following classes must be set at interface level: + * HID class is 3, no subclass and protocol required (but may be useful!) + * CDC class is 2, use subclass 2 and protocol 1 for ACM + */ +#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 0 +/* Define this to the length of the HID report descriptor, if you implement + * an HID device. Otherwise don't define it or define it to 0. + * If you use this define, you must add a PROGMEM character array named + * "usbHidReportDescriptor" to your code which contains the report descriptor. + * Don't forget to keep the array and this define in sync! + */ + +/* #define USB_PUBLIC static */ +/* Use the define above if you #include usbdrv.c instead of linking against it. + * This technique saves a couple of bytes in flash memory. + */ + +/* ------------------- Fine Control over USB Descriptors ------------------- */ +/* If you don't want to use the driver's default USB descriptors, you can + * provide our own. These can be provided as (1) fixed length static data in + * flash memory, (2) fixed length static data in RAM or (3) dynamically at + * runtime in the function usbFunctionDescriptor(). See usbdrv.h for more + * information about this function. + * Descriptor handling is configured through the descriptor's properties. If + * no properties are defined or if they are 0, the default descriptor is used. + * Possible properties are: + * + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched + * at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is + * used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if + * you want RAM pointers. + * + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found + * in static memory is in RAM, not in flash memory. + * + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash), + * the driver must know the descriptor's length. The descriptor itself is + * found at the address of a well known identifier (see below). + * List of static descriptor names (must be declared PROGMEM if in flash): + * char usbDescriptorDevice[]; + * char usbDescriptorConfiguration[]; + * char usbDescriptorHidReport[]; + * char usbDescriptorString0[]; + * int usbDescriptorStringVendor[]; + * int usbDescriptorStringDevice[]; + * int usbDescriptorStringSerialNumber[]; + * Other descriptors can't be provided statically, they must be provided + * dynamically at runtime. + * + * Descriptor properties are or-ed or added together, e.g.: + * #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18)) + * + * The following descriptors are defined: + * USB_CFG_DESCR_PROPS_DEVICE + * USB_CFG_DESCR_PROPS_CONFIGURATION + * USB_CFG_DESCR_PROPS_STRINGS + * USB_CFG_DESCR_PROPS_STRING_0 + * USB_CFG_DESCR_PROPS_STRING_VENDOR + * USB_CFG_DESCR_PROPS_STRING_PRODUCT + * USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER + * USB_CFG_DESCR_PROPS_HID + * USB_CFG_DESCR_PROPS_HID_REPORT + * USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver) + * + * Note about string descriptors: String descriptors are not just strings, they + * are Unicode strings prefixed with a 2 byte header. Example: + * int serialNumberDescriptor[] = { + * USB_STRING_DESCRIPTOR_HEADER(6), + * 'S', 'e', 'r', 'i', 'a', 'l' + * }; + */ + +#define USB_CFG_DESCR_PROPS_DEVICE 0 +#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_CONFIGURATION 0 +#define USB_CFG_DESCR_PROPS_STRINGS 0 +#define USB_CFG_DESCR_PROPS_STRING_0 0 +#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0 +#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0 +#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0 +#define USB_CFG_DESCR_PROPS_HID USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID 0 +#define USB_CFG_DESCR_PROPS_HID_REPORT USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID_REPORT 0 +#define USB_CFG_DESCR_PROPS_UNKNOWN 0 + +#define usbMsgPtr_t unsigned short +/* If usbMsgPtr_t is not defined, it defaults to 'uchar *'. We define it to + * a scalar type here because gcc generates slightly shorter code for scalar + * arithmetics than for pointer arithmetics. Remove this define for backward + * type compatibility or define it to an 8 bit type if you use data in RAM only + * and all RAM is below 256 bytes (tiny memory model in IAR CC). + */ + +/* ----------------------- Optional MCU Description ------------------------ */ + +/* The following configurations have working defaults in usbdrv.h. You + * usually don't need to set them explicitly. Only if you want to run + * the driver on a device which is not yet supported or with a compiler + * which is not fully supported (such as IAR C) or if you use a differnt + * interrupt than INT0, you may have to define some of these. + */ +/* #define USB_INTR_CFG MCUCR */ +/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */ +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE GIMSK */ +/* #define USB_INTR_ENABLE_BIT INT0 */ +/* #define USB_INTR_PENDING GIFR */ +/* #define USB_INTR_PENDING_BIT INTF0 */ +/* #define USB_INTR_VECTOR INT0_vect */ + +/* Set INT1 for D- falling edge to count SOF */ +/* #define USB_INTR_CFG EICRA */ +#define USB_INTR_CFG_SET ((1 << ISC11) | (0 << ISC10)) +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE EIMSK */ +#define USB_INTR_ENABLE_BIT INT1 +/* #define USB_INTR_PENDING EIFR */ +#define USB_INTR_PENDING_BIT INTF1 +#define USB_INTR_VECTOR INT1_vect From 537623c9db15e29889c1c78e55ebcbba13edbabb Mon Sep 17 00:00:00 2001 From: hvp <32483282+hvpkod@users.noreply.github.com> Date: Sat, 5 Oct 2019 07:04:08 +0200 Subject: [PATCH 029/316] [Keymap] Added my version of the alpha28 layout. Usable. (#6862) * Added my version of the alpha28 layout. Usable. * Added enum. Test ok --- keyboards/alpha/keymaps/hvp/keymap.c | 51 ++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100755 keyboards/alpha/keymaps/hvp/keymap.c diff --git a/keyboards/alpha/keymaps/hvp/keymap.c b/keyboards/alpha/keymaps/hvp/keymap.c new file mode 100755 index 000000000000..9e8f2d3b9c34 --- /dev/null +++ b/keyboards/alpha/keymaps/hvp/keymap.c @@ -0,0 +1,51 @@ +#include QMK_KEYBOARD_H + +enum layer_names { + HOME, + MODS, + MODS2, + OTHER, +}; + +enum custom_keycodes { + MACRO1 = SAFE_RANGE +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch (keycode) { + case MACRO1: + SEND_STRING("I'm so sorry... -PyroL"); + return false; + } + } + return true; +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [HOME] = LAYOUT( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, MT(MOD_LCTL,KC_P), + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, MT(MOD_LSFT,KC_ENT), + KC_Z, KC_X, KC_C, LT(MODS2,KC_V), LT(MODS, KC_SPC), LT(OTHER,KC_B), KC_N, KC_M), + + [MODS] = LAYOUT( + KC_TAB, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_BSPC, + KC_LSFT, KC_ESC, _______, KC_SCLN, KC_QUOT, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, + KC_LCTL, KC_LGUI, KC_LALT, _______, _______, KC_COMM, KC_DOT, KC_SLSH), + + [MODS2] = LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_LSFT, KC_ESC, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_GRV, _______, + RGB_VAI, RGB_VAD, RGB_HUI, _______, _______, KC_MPLY, KC_VOLD, KC_VOLU), + + [OTHER] = LAYOUT( + KC_ESC, RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DEL, + 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_NO, KC_NO, KC_NO), +}; + +void matrix_init_user(void) { +} + +void matrix_scan_user(void) { +} \ No newline at end of file From 60b2a9a5ea88321629e970e936652cc1ba786b80 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Fri, 4 Oct 2019 22:06:57 -0700 Subject: [PATCH 030/316] [Keyboard] Preliminary Support for Duck Orion V3 (#6892) * initial commit * fixup init_rows and read_rows routine * fixup matrix based on Marcus's tracing info * add a temporary keymap * add notes * use a standard tkl ansi keymap * turn on that last column * backslash and backspace row left to fix * reorg from backslash to pgdn * got the matrix done but the backspace location at K4N is still suspect * add reset info into readme * add qmk configurator support * add community layout support * remove uneeded keymap readme * add a new column just for the reset switch * change copyright dates * add cautionary message to readme as we don't know about the lighting condition yet * Update keyboards/duck/orion/v3/v3.c Co-Authored-By: fauxpark * Update keyboards/duck/orion/v3/v3.c Co-Authored-By: fauxpark * Update keyboards/duck/orion/v3/v3.c Co-Authored-By: fauxpark * change bootloader comments --- keyboards/duck/orion/info.json | 12 + keyboards/duck/orion/readme.md | 7 + keyboards/duck/orion/rules.mk | 1 + keyboards/duck/orion/v3/config.h | 50 ++++ keyboards/duck/orion/v3/indicator_leds.c | 82 ++++++ keyboards/duck/orion/v3/indicator_leds.h | 1 + .../duck/orion/v3/keymaps/default/keymap.c | 26 ++ keyboards/duck/orion/v3/matrix.c | 272 ++++++++++++++++++ keyboards/duck/orion/v3/readme.md | 30 ++ keyboards/duck/orion/v3/rules.mk | 39 +++ keyboards/duck/orion/v3/v3.c | 65 +++++ keyboards/duck/orion/v3/v3.h | 36 +++ 12 files changed, 621 insertions(+) create mode 100644 keyboards/duck/orion/info.json create mode 100644 keyboards/duck/orion/readme.md create mode 100644 keyboards/duck/orion/rules.mk create mode 100644 keyboards/duck/orion/v3/config.h create mode 100644 keyboards/duck/orion/v3/indicator_leds.c create mode 100644 keyboards/duck/orion/v3/indicator_leds.h create mode 100644 keyboards/duck/orion/v3/keymaps/default/keymap.c create mode 100644 keyboards/duck/orion/v3/matrix.c create mode 100644 keyboards/duck/orion/v3/readme.md create mode 100644 keyboards/duck/orion/v3/rules.mk create mode 100644 keyboards/duck/orion/v3/v3.c create mode 100644 keyboards/duck/orion/v3/v3.h diff --git a/keyboards/duck/orion/info.json b/keyboards/duck/orion/info.json new file mode 100644 index 000000000000..a1f0a5b3894f --- /dev/null +++ b/keyboards/duck/orion/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Duck Orion V3", + "url": "", + "maintainer": "qmk", + "width": 18.25, + "height": 6.5, + "layouts": { + "LAYOUT_tkl_ansi": { + "layout": [{"x":0, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6.5, "y":0}, {"x":7.5, "y":0}, {"x":8.5, "y":0}, {"x":9.5, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15.25, "y":0}, {"x":16.25, "y":0}, {"x":17.25, "y":0}, {"x":0, "y":1.5}, {"x":1, "y":1.5}, {"x":2, "y":1.5}, {"x":3, "y":1.5}, {"x":4, "y":1.5}, {"x":5, "y":1.5}, {"x":6, "y":1.5}, {"x":7, "y":1.5}, {"x":8, "y":1.5}, {"x":9, "y":1.5}, {"x":10, "y":1.5}, {"x":11, "y":1.5}, {"x":12, "y":1.5}, {"x":13, "y":1.5, "w":2}, {"x":15.25, "y":1.5}, {"x":16.25, "y":1.5}, {"x":17.25, "y":1.5}, {"x":0, "y":2.5, "w":1.5}, {"x":1.5, "y":2.5}, {"x":2.5, "y":2.5}, {"x":3.5, "y":2.5}, {"x":4.5, "y":2.5}, {"x":5.5, "y":2.5}, {"x":6.5, "y":2.5}, {"x":7.5, "y":2.5}, {"x":8.5, "y":2.5}, {"x":9.5, "y":2.5}, {"x":10.5, "y":2.5}, {"x":11.5, "y":2.5}, {"x":12.5, "y":2.5}, {"x":13.5, "y":2.5, "w":1.5}, {"x":15.25, "y":2.5}, {"x":16.25, "y":2.5}, {"x":17.25, "y":2.5}, {"x":0, "y":3.5, "w":1.75}, {"x":1.75, "y":3.5}, {"x":2.75, "y":3.5}, {"x":3.75, "y":3.5}, {"x":4.75, "y":3.5}, {"x":5.75, "y":3.5}, {"x":6.75, "y":3.5}, {"x":7.75, "y":3.5}, {"x":8.75, "y":3.5}, {"x":9.75, "y":3.5}, {"x":10.75, "y":3.5}, {"x":11.75, "y":3.5}, {"x":12.75, "y":3.5, "w":2.25}, {"x":0, "y":4.5, "w":2.25}, {"x":2.25, "y":4.5}, {"x":3.25, "y":4.5}, {"x":4.25, "y":4.5}, {"x":5.25, "y":4.5}, {"x":6.25, "y":4.5}, {"x":7.25, "y":4.5}, {"x":8.25, "y":4.5}, {"x":9.25, "y":4.5}, {"x":10.25, "y":4.5}, {"x":11.25, "y":4.5}, {"x":12.25, "y":4.5, "w":2.75}, {"x":16.25, "y":4.5}, {"x":0, "y":5.5, "w":1.25}, {"x":1.25, "y":5.5, "w":1.25}, {"x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"x":10, "y":5.5, "w":1.25}, {"x":11.25, "y":5.5, "w":1.25}, {"x":12.5, "y":5.5, "w":1.25}, {"x":13.75, "y":5.5, "w":1.25}, {"x":15.25, "y":5.5}, {"x":16.25, "y":5.5}, {"x":17.25, "y":5.5}] + } + } +} \ No newline at end of file diff --git a/keyboards/duck/orion/readme.md b/keyboards/duck/orion/readme.md new file mode 100644 index 000000000000..b65901de1645 --- /dev/null +++ b/keyboards/duck/orion/readme.md @@ -0,0 +1,7 @@ +# Duck Orion + +Non official firmware for custom TKL Korean keyboard made by Duck. + +Newest version is the [Orion V3](http://duck0113.tistory.com/127) + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/duck/orion/rules.mk b/keyboards/duck/orion/rules.mk new file mode 100644 index 000000000000..3788e0fbfb76 --- /dev/null +++ b/keyboards/duck/orion/rules.mk @@ -0,0 +1 @@ +DEFAULT_FOLDER = duck/orion/v3 diff --git a/keyboards/duck/orion/v3/config.h b/keyboards/duck/orion/v3/config.h new file mode 100644 index 000000000000..3a17d5941637 --- /dev/null +++ b/keyboards/duck/orion/v3/config.h @@ -0,0 +1,50 @@ +/* +Copyright 2019 MechMerlin + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x444B // Duck ("DK") +#define PRODUCT_ID 0x4F52 // Orion ("OR") +#define DEVICE_VER 0x0002 +#define MANUFACTURER Duck +#define PRODUCT Orion V3 +#define DESCRIPTION TKL Korean custom keyboard + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 18 + +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* number of backlight levels */ +#define BACKLIGHT_LEVELS 3 + +#define RGBLIGHT_ANIMATIONS +#define RGB_DI_PIN D6 +#define RGBLED_NUM 17 + +/* Set to top left most key */ +#define BOOTMAGIC_LITE_ROW 4 +#define BOOTMAGIC_LITE_COLUMN 10 + +#define TAPPING_TERM 200 diff --git a/keyboards/duck/orion/v3/indicator_leds.c b/keyboards/duck/orion/v3/indicator_leds.c new file mode 100644 index 000000000000..951ef462c665 --- /dev/null +++ b/keyboards/duck/orion/v3/indicator_leds.c @@ -0,0 +1,82 @@ +/* +Copyright 2019 MechMerlin + +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 . +*/ +#include +#include +#include +#include +#include "indicator_leds.h" +#include "duck_led/duck_led.h" + +#define LED_T1H 600 +#define LED_T1L 650 +#define LED_T0H 250 +#define LED_T0L 1000 + +void send_bit_d4(bool bitVal) { + if(bitVal) { + asm volatile ( + "sbi %[port], %[bit] \n\t" + ".rept %[onCycles] \n\t" + "nop \n\t" + ".endr \n\t" + "cbi %[port], %[bit] \n\t" + ".rept %[offCycles] \n\t" + "nop \n\t" + ".endr \n\t" + :: + [port] "I" (_SFR_IO_ADDR(PORTD)), + [bit] "I" (4), + [onCycles] "I" (NS_TO_CYCLES(LED_T1H) - 2), + [offCycles] "I" (NS_TO_CYCLES(LED_T1L) - 2)); + } else { + asm volatile ( + "sbi %[port], %[bit] \n\t" + ".rept %[onCycles] \n\t" + "nop \n\t" + ".endr \n\t" + "cbi %[port], %[bit] \n\t" + ".rept %[offCycles] \n\t" + "nop \n\t" + ".endr \n\t" + :: + [port] "I" (_SFR_IO_ADDR(PORTD)), + [bit] "I" (4), + [onCycles] "I" (NS_TO_CYCLES(LED_T0H) - 2), + [offCycles] "I" (NS_TO_CYCLES(LED_T0L) - 2)); + } +} + +void send_value(uint8_t byte, enum Device device) { + for(uint8_t b = 0; b < 8; b++) { + if(device == Device_STATUSLED) { + send_bit_d4(byte & 0b10000000); + byte <<= 1; + } + } +} + +// Send the LED indicators to the WS2811S chips +void indicator_leds_set(bool leds[8]) { + uint8_t led_cnt; + + cli(); + for(led_cnt = 0; led_cnt < 8; led_cnt++) + send_value(leds[led_cnt] ? 255 : 0, Device_STATUSLED); + sei(); + show(); +} + diff --git a/keyboards/duck/orion/v3/indicator_leds.h b/keyboards/duck/orion/v3/indicator_leds.h new file mode 100644 index 000000000000..fe66eef6b2fc --- /dev/null +++ b/keyboards/duck/orion/v3/indicator_leds.h @@ -0,0 +1 @@ +void indicator_leds_set(bool leds[8]); diff --git a/keyboards/duck/orion/v3/keymaps/default/keymap.c b/keyboards/duck/orion/v3/keymaps/default/keymap.c new file mode 100644 index 000000000000..83fa4f9a8e80 --- /dev/null +++ b/keyboards/duck/orion/v3/keymaps/default/keymap.c @@ -0,0 +1,26 @@ +/* Copyright 2019 MechMerlin + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT_tkl_ansi(\ + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR,KC_SLCK,KC_PAUS, \ + 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_BSPC, KC_INS ,KC_HOME,KC_PGUP, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,KC_LBRC,KC_RBRC,KC_BSLS, KC_DEL ,KC_END ,KC_PGDN, \ + 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,KC_SLSH, KC_RSFT, KC_UP, \ + KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, KC_APP,KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT) \ +}; diff --git a/keyboards/duck/orion/v3/matrix.c b/keyboards/duck/orion/v3/matrix.c new file mode 100644 index 000000000000..3c3240b9f4cd --- /dev/null +++ b/keyboards/duck/orion/v3/matrix.c @@ -0,0 +1,272 @@ +/* +Copyright 2019 MechMerlin +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 . +*/ + +#include +#include +#include +#include "matrix.h" +#include "util.h" +#include "print.h" +#include "debug.h" + +static uint8_t debouncing = DEBOUNCE; + +/* matrix state(1:on, 0:off) */ +static matrix_row_t matrix[MATRIX_ROWS]; +static matrix_row_t matrix_debouncing[MATRIX_ROWS]; + +static uint8_t read_rows(uint8_t col); +static void init_rows(void); +static void unselect_cols(void); +static void select_col(uint8_t col); + + +__attribute__ ((weak)) +void matrix_init_kb(void) { + matrix_init_user(); +} + +__attribute__ ((weak)) +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +__attribute__ ((weak)) +void matrix_init_user(void) { +} + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + +void backlight_init_ports(void) +{ + DDRD |= 0b11010000; + PORTD &= ~0b01010000; + PORTD |= 0b10000000; + DDRB |= 0b00011111; + PORTB &= ~0b00001110; + PORTB |= 0b00010001; + DDRE |= 0b01000000; + PORTE &= ~0b01000000; +} + +void matrix_init(void) { + backlight_init_ports(); + unselect_cols(); + init_rows(); + + for (uint8_t i=0; i < MATRIX_ROWS; i++) { + matrix[i] = 0; + matrix_debouncing[i] = 0; + } + + matrix_init_quantum(); +} + +uint8_t matrix_scan(void) { + for (uint8_t col = 0; col < MATRIX_COLS; col++) { + select_col(col); + _delay_us(3); + + uint8_t rows = read_rows(col); + + for (uint8_t row = 0; row < MATRIX_ROWS; row++) { + bool prev_bit = matrix_debouncing[row] & ((matrix_row_t)1< + * + * 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 . + */ +#include "v3.h" +#include "indicator_leds.h" + +enum BACKLIGHT_AREAS { + BACKLIGHT_ALPHAS = 0b00000010, + BACKLIGHT_MODNUM = 0b00001000 +}; + +void backlight_set(uint8_t level) { + switch(level) { + case 0: + PORTB |= BACKLIGHT_ALPHAS; + PORTB |= BACKLIGHT_MODNUM; + break; + case 1: + PORTB &= ~BACKLIGHT_ALPHAS; + PORTB |= BACKLIGHT_MODNUM; + break; + case 2: + PORTB |= BACKLIGHT_ALPHAS; + PORTB &= ~BACKLIGHT_MODNUM; + break; + case 3: + PORTB &= ~BACKLIGHT_ALPHAS; + PORTB &= ~BACKLIGHT_MODNUM; + break; + } +} + +// Port from backlight_update_state +void led_set_kb(uint8_t usb_led) { + bool status[8] = { + IS_HOST_LED_ON(USB_LED_SCROLL_LOCK), /* LED 3 */ + IS_HOST_LED_ON(USB_LED_CAPS_LOCK), /* LED 2 */ + IS_HOST_LED_ON(USB_LED_NUM_LOCK), /* LED 1 */ + + layer_state & (1<<2), /* LED 6 */ + layer_state & (1<<1), /* LED 5 */ + layer_state & (1<<0) ? 0: 1, /* LED 4 */ + + layer_state & (1<<5), /* LED 8 */ + layer_state & (1<<4) /* LED 7 */ + }; + + indicator_leds_set(status); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + return process_record_user(keycode, record); +} diff --git a/keyboards/duck/orion/v3/v3.h b/keyboards/duck/orion/v3/v3.h new file mode 100644 index 000000000000..70591cf034dd --- /dev/null +++ b/keyboards/duck/orion/v3/v3.h @@ -0,0 +1,36 @@ +/* Copyright 2019 MechMerlin + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define ___ KC_NO + +#define LAYOUT_tkl_ansi( \ + K5A, K5C, K5D, K5E, K5F, K5G, K5H, K5I, K5J, K5K, K5L, K5M, K5N, K5O, K5P, K5Q, \ + K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, K4R, K4O, K4P, K4Q, \ + K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, K3N, K3O, K3P, K3Q, \ + K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, K2L, K2N, \ + K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, K1N, K1P, \ + K0A, K0B, K0C, K0F, K0I, K0K, K0M, K0N, K0O, K0P, K0Q \ +) { \ + { K5A, ___, K5C, K5D, K5E, K5F, K5G, K5H, K5I, K5J, K5K, K5L, K5M, K5N, K5O, K5P, K5Q, ___ }, \ + { K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, ___, K4O, K4P, K4Q, K4R }, \ + { K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, K3N, K3O, K3P, K3Q, ___ }, \ + { K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, K2L, ___, K2N, ___, ___, ___, ___ }, \ + { K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, ___, ___, K1N, ___, K1P, ___, ___ }, \ + { K0A, K0B, K0C, ___, ___, K0F, ___, ___, K0I, ___, K0K, ___, K0M, K0N, K0O, K0P, K0Q, ___ } \ +} From 38aefaf78e3d9f17ef561f031679a02c9fba869c Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sat, 5 Oct 2019 16:57:00 +0100 Subject: [PATCH 031/316] ARM - Initial backlight support (#6487) * Move AVR backlight to own file, add borrowed ARM implementation * Tiny fix for backlight custom logic * Remove duplicate board from rebase * Fix f303 onekey example * clang-format * clang-format * Remove backlight keymap debug * Initial pass of ARM backlight docs * Initial pass of ARM backlight docs - resolve todos * fix rules validation logic * Add f072 warning * Add f072 warning * tidy up breathing in backlight keymap * tidy up breathing in backlight keymap * add missing break to backlight keymap --- common_features.mk | 23 +- docs/feature_backlight.md | 50 +- keyboards/handwired/onekey/bluepill/config.h | 4 + keyboards/handwired/onekey/bluepill/halconf.h | 2 +- keyboards/handwired/onekey/bluepill/mcuconf.h | 6 +- keyboards/handwired/onekey/bluepill/rules.mk | 6 +- keyboards/handwired/onekey/config.h | 2 + .../onekey/keymaps/backlight/config.h | 3 + .../onekey/keymaps/backlight/keymap.c | 40 ++ .../onekey/keymaps/backlight/rules.mk | 2 + keyboards/handwired/onekey/proton_c/config.h | 5 + .../handwired/onekey/stm32f0_disco/config.h | 5 + quantum/backlight/backlight.c | 1 + quantum/backlight/backlight_arm.c | 218 ++++++++ quantum/backlight/backlight_avr.c | 509 ++++++++++++++++++ quantum/quantum.c | 509 ------------------ tmk_core/common/backlight.h | 4 + 17 files changed, 860 insertions(+), 529 deletions(-) create mode 100644 keyboards/handwired/onekey/keymaps/backlight/config.h create mode 100644 keyboards/handwired/onekey/keymaps/backlight/keymap.c create mode 100644 keyboards/handwired/onekey/keymaps/backlight/rules.mk create mode 100644 quantum/backlight/backlight.c create mode 100644 quantum/backlight/backlight_arm.c create mode 100644 quantum/backlight/backlight_avr.c diff --git a/common_features.mk b/common_features.mk index 79af8a2256c9..05a99fc63c84 100644 --- a/common_features.mk +++ b/common_features.mk @@ -229,13 +229,32 @@ ifeq ($(strip $(LCD_ENABLE)), yes) CIE1931_CURVE = yes endif -ifeq ($(strip $(BACKLIGHT_ENABLE)), yes) +# backward compat +ifeq ($(strip $(BACKLIGHT_CUSTOM_DRIVER)), yes) + BACKLIGHT_ENABLE = custom +endif + +VALID_BACKLIGHT_TYPES := yes custom + +BACKLIGHT_ENABLE ?= no +ifneq ($(strip $(BACKLIGHT_ENABLE)), no) + ifeq ($(filter $(BACKLIGHT_ENABLE),$(VALID_BACKLIGHT_TYPES)),) + $(error BACKLIGHT_ENABLE="$(BACKLIGHT_ENABLE)" is not a valid backlight type) + endif + ifeq ($(strip $(VISUALIZER_ENABLE)), yes) CIE1931_CURVE = yes endif - ifeq ($(strip $(BACKLIGHT_CUSTOM_DRIVER)), yes) + + ifeq ($(strip $(BACKLIGHT_ENABLE)), custom) OPT_DEFS += -DBACKLIGHT_CUSTOM_DRIVER endif + + ifeq ($(PLATFORM),AVR) + SRC += $(QUANTUM_DIR)/backlight/backlight_avr.c + else + SRC += $(QUANTUM_DIR)/backlight/backlight_arm.c + endif endif ifeq ($(strip $(CIE1931_CURVE)), yes) diff --git a/docs/feature_backlight.md b/docs/feature_backlight.md index 556da73859b3..6a2946fd6df5 100644 --- a/docs/feature_backlight.md +++ b/docs/feature_backlight.md @@ -1,6 +1,8 @@ # Backlighting -Many keyboards support backlit keys by way of individual LEDs placed through or underneath the keyswitches. QMK is able to control the brightness of these LEDs by switching them on and off rapidly in a certain ratio, a technique known as *Pulse Width Modulation*, or PWM. By altering the duty cycle of the PWM signal, it creates the illusion of dimming. +Many keyboards support backlit keys by way of individual LEDs placed through or underneath the keyswitches. This feature is distinct from both the [RGB underglow](feature_rgblight.md) and [RGB matrix](feature_rgb_matrix.md) features as it usually allows for only a single colour per switch, though you can obviously install multiple different single coloured LEDs on a keyboard. + +QMK is able to control the brightness of these LEDs by switching them on and off rapidly in a certain ratio, a technique known as *Pulse Width Modulation*, or PWM. By altering the duty cycle of the PWM signal, it creates the illusion of dimming. The MCU can only supply so much current to its GPIO pins. Instead of powering the backlight directly from the MCU, the backlight pin is connected to a transistor or MOSFET that switches the power to the LEDs. @@ -12,9 +14,8 @@ Most keyboards have backlighting enabled by default if they support it, but if i BACKLIGHT_ENABLE = yes ``` -You should then be able to use the keycodes below to change the backlight level. - ## Keycodes +Once enabled the following keycodes below can be used to change the backlight level. |Key |Description | |---------|------------------------------------------| @@ -26,9 +27,9 @@ You should then be able to use the keycodes below to change the backlight level. |`BL_DEC` |Decrease the backlight level | |`BL_BRTG`|Toggle backlight breathing | -## Caveats +## AVR driver -This feature is distinct from both the [RGB underglow](feature_rgblight.md) and [RGB matrix](feature_rgb_matrix.md) features as it usually allows for only a single colour per switch, though you can obviously use multiple different coloured LEDs on a keyboard. +### Caveats Hardware PWM is supported according to the following table: @@ -58,9 +59,9 @@ All other pins will use software PWM. If the [Audio](feature_audio.md) feature i When both timers are in use for Audio, the backlight PWM will not use a hardware timer, but will instead be triggered during the matrix scan. In this case, breathing is not supported, and the backlight might flicker, because the PWM computation may not be called with enough timing precision. -## Configuration +### AVR Configuration -To change the behaviour of the backlighting, `#define` these in your `config.h`: +To change the behavior of the backlighting, `#define` these in your `config.h`: |Define |Default |Description | |---------------------|-------------|-------------------------------------------------------------------------------------------------------------| @@ -72,14 +73,14 @@ To change the behaviour of the backlighting, `#define` these in your `config.h`: |`BREATHING_PERIOD` |`6` |The length of one backlight "breath" in seconds | |`BACKLIGHT_ON_STATE` |`0` |The state of the backlight pin when the backlight is "on" - `1` for high, `0` for low | -## Backlight On State +### Backlight On State Most backlight circuits are driven by an N-channel MOSFET or NPN transistor. This means that to turn the transistor *on* and light the LEDs, you must drive the backlight pin, connected to the gate or base, *high*. Sometimes, however, a P-channel MOSFET, or a PNP transistor is used. In this case, when the transistor is on, the pin is driven *low* instead. This functionality is configured at the keyboard level with the `BACKLIGHT_ON_STATE` define. -## Multiple backlight pins +### Multiple backlight pins Most keyboards have only one backlight pin which control all backlight LEDs (especially if the backlight is connected to an hardware PWM pin). In software PWM, it is possible to define multiple backlight pins. All those pins will be turned on and off at the same time during the PWM duty cycle. @@ -87,13 +88,13 @@ This feature allows to set for instance the Caps Lock LED (or any other controll To activate multiple backlight pins, you need to add something like this to your user `config.h`: -~~~c +```c #define BACKLIGHT_LED_COUNT 2 #undef BACKLIGHT_PIN #define BACKLIGHT_PINS { F5, B2 } -~~~ +``` -## Hardware PWM Implementation +### Hardware PWM Implementation When using the supported pins for backlighting, QMK will use a hardware timer configured to output a PWM signal. This timer will count up to `ICRx` (by default `0xFFFF`) before resetting to 0. The desired brightness is calculated and stored in the `OCRxx` register. When the counter reaches this value, the backlight pin will go low, and is pulled high again when the counter resets. @@ -102,7 +103,7 @@ In this way `OCRxx` essentially controls the duty cycle of the LEDs, and thus th The breathing effect is achieved by registering an interrupt handler for `TIMER1_OVF_vect` that is called whenever the counter resets, roughly 244 times per second. In this handler, the value of an incrementing counter is mapped onto a precomputed brightness curve. To turn off breathing, the interrupt handler is simply disabled, and the brightness reset to the level stored in EEPROM. -## Software PWM Implementation +### Software PWM Implementation When `BACKLIGHT_PIN` is not set to a hardware backlight pin, QMK will use a hardware timer configured to trigger software interrupts. This time will count up to `ICRx` (by default `0xFFFF`) before resetting to 0. When resetting to 0, the CPU will fire an OVF (overflow) interrupt that will turn the LEDs on, starting the duty cycle. @@ -111,6 +112,29 @@ In this way `OCRxx` essentially controls the duty cycle of the LEDs, and thus th The breathing effect is the same as in the hardware PWM implementation. +## ARM Driver + +### Caveats + +Currently only hardware PWM is supported, and does not provide automatic configuration. + +?> STMF072 support is being investigated. + +### ARM Configuration + +To change the behavior of the backlighting, `#define` these in your `config.h`: + +|Define |Default |Description | +|------------------------|-------------|-------------------------------------------------------------------------------------------------------------| +|`BACKLIGHT_PIN` |`B7` |The pin that controls the LEDs. Unless you are designing your own keyboard, you shouldn't need to change this| +|`BACKLIGHT_PWM_DRIVER` |`PWMD4` |The PWM driver to use, see ST datasheets for pin to PWM timer mapping. Unless you are designing your own keyboard, you shouldn't need to change this| +|`BACKLIGHT_PWM_CHANNEL` |`3` |The PWM channel to use, see ST datasheets for pin to PWM channel mapping. Unless you are designing your own keyboard, you shouldn't need to change this| +|`BACKLIGHT_PAL_MODE` |`2` |The pin alternative function to use, see ST datasheets for pin AF mapping. Unless you are designing your own keyboard, you shouldn't need to change this| +|`BACKLIGHT_LEVELS` |`3` |The number of brightness levels (maximum 31 excluding off) | +|`BACKLIGHT_CAPS_LOCK` |*Not defined*|Enable Caps Lock indicator using backlight (for keyboards without dedicated LED) | +|`BACKLIGHT_BREATHING` |*Not defined*|Enable backlight breathing, if supported | +|`BREATHING_PERIOD` |`6` |The length of one backlight "breath" in seconds | + ## Backlight Functions |Function |Description | diff --git a/keyboards/handwired/onekey/bluepill/config.h b/keyboards/handwired/onekey/bluepill/config.h index 3d88ee00e523..81282ae1ffc3 100644 --- a/keyboards/handwired/onekey/bluepill/config.h +++ b/keyboards/handwired/onekey/bluepill/config.h @@ -21,3 +21,7 @@ #define MATRIX_COL_PINS { B0 } #define MATRIX_ROW_PINS { A7 } #define UNUSED_PINS + +#define BACKLIGHT_PIN A0 +#define BACKLIGHT_PWM_DRIVER PWMD2 +#define BACKLIGHT_PWM_CHANNEL 1 diff --git a/keyboards/handwired/onekey/bluepill/halconf.h b/keyboards/handwired/onekey/bluepill/halconf.h index 72879a575b9c..53b2f91e33c0 100644 --- a/keyboards/handwired/onekey/bluepill/halconf.h +++ b/keyboards/handwired/onekey/bluepill/halconf.h @@ -146,7 +146,7 @@ * @brief Enables the SPI subsystem. */ #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI TRUE +#define HAL_USE_SPI FALSE #endif /** diff --git a/keyboards/handwired/onekey/bluepill/mcuconf.h b/keyboards/handwired/onekey/bluepill/mcuconf.h index fced27289e0d..a645d3c5d5cf 100644 --- a/keyboards/handwired/onekey/bluepill/mcuconf.h +++ b/keyboards/handwired/onekey/bluepill/mcuconf.h @@ -132,8 +132,8 @@ * PWM driver system settings. */ #define STM32_PWM_USE_ADVANCED FALSE -#define STM32_PWM_USE_TIM1 TRUE -#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM1 FALSE +#define STM32_PWM_USE_TIM2 TRUE #define STM32_PWM_USE_TIM3 FALSE #define STM32_PWM_USE_TIM4 FALSE #define STM32_PWM_USE_TIM5 FALSE @@ -168,7 +168,7 @@ * SPI driver system settings. */ #define STM32_SPI_USE_SPI1 FALSE -#define STM32_SPI_USE_SPI2 TRUE +#define STM32_SPI_USE_SPI2 FALSE #define STM32_SPI_USE_SPI3 FALSE #define STM32_SPI_SPI1_DMA_PRIORITY 1 #define STM32_SPI_SPI2_DMA_PRIORITY 1 diff --git a/keyboards/handwired/onekey/bluepill/rules.mk b/keyboards/handwired/onekey/bluepill/rules.mk index 46274066dd60..aeda2782b91a 100644 --- a/keyboards/handwired/onekey/bluepill/rules.mk +++ b/keyboards/handwired/onekey/bluepill/rules.mk @@ -1,7 +1,11 @@ # GENERIC STM32F103C8T6 board - stm32duino bootloader +BOARD = GENERIC_STM32_F103 + OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000 MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader -BOARD = GENERIC_STM32_F103 + +DFU_ARGS = -d 1eaf:0003 -a2 -R +DFU_SUFFIX_ARGS ?= -v 1eaf -p 0003 # OPT_DEFS = # MCU_LDSCRIPT = STM32F103x8 diff --git a/keyboards/handwired/onekey/config.h b/keyboards/handwired/onekey/config.h index 6f7ec1289faf..64a447481d2b 100644 --- a/keyboards/handwired/onekey/config.h +++ b/keyboards/handwired/onekey/config.h @@ -35,6 +35,8 @@ along with this program. If not, see . /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 +#define TAPPING_TERM 500 + /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ diff --git a/keyboards/handwired/onekey/keymaps/backlight/config.h b/keyboards/handwired/onekey/keymaps/backlight/config.h new file mode 100644 index 000000000000..af01528b434d --- /dev/null +++ b/keyboards/handwired/onekey/keymaps/backlight/config.h @@ -0,0 +1,3 @@ +#pragma once + +#define BACKLIGHT_BREATHING diff --git a/keyboards/handwired/onekey/keymaps/backlight/keymap.c b/keyboards/handwired/onekey/keymaps/backlight/keymap.c new file mode 100644 index 000000000000..1f4be16a623c --- /dev/null +++ b/keyboards/handwired/onekey/keymaps/backlight/keymap.c @@ -0,0 +1,40 @@ +#include QMK_KEYBOARD_H + +//Tap Dance Declarations +enum { + TD_BL = 0 +}; + +void dance_cln_finished (qk_tap_dance_state_t *state, void *user_data) { + // noop +} + +void dance_cln_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (state->count) { + case 1: + // single tap - step through backlight + backlight_step(); + break; +#ifdef BACKLIGHT_BREATHING + case 2: + // double tap - toggle breathing + breathing_toggle(); + break; + case 3: + //tripple tap - do some pulse stuff + breathing_pulse(); + break; +#endif + default: + // more - nothing + break; + } +} + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_BL] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, dance_cln_finished, dance_cln_reset) +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + LAYOUT( TD(TD_BL) ) +}; diff --git a/keyboards/handwired/onekey/keymaps/backlight/rules.mk b/keyboards/handwired/onekey/keymaps/backlight/rules.mk new file mode 100644 index 000000000000..176e099770cb --- /dev/null +++ b/keyboards/handwired/onekey/keymaps/backlight/rules.mk @@ -0,0 +1,2 @@ +BACKLIGHT_ENABLE = yes +TAP_DANCE_ENABLE = yes diff --git a/keyboards/handwired/onekey/proton_c/config.h b/keyboards/handwired/onekey/proton_c/config.h index f6bedcfe6481..d4fb9c829975 100644 --- a/keyboards/handwired/onekey/proton_c/config.h +++ b/keyboards/handwired/onekey/proton_c/config.h @@ -21,3 +21,8 @@ #define MATRIX_COL_PINS { A3 } #define MATRIX_ROW_PINS { A2 } #define UNUSED_PINS + +#define BACKLIGHT_PIN B8 +#define BACKLIGHT_PWM_DRIVER PWMD4 +#define BACKLIGHT_PWM_CHANNEL 3 +#define BACKLIGHT_PAL_MODE 2 diff --git a/keyboards/handwired/onekey/stm32f0_disco/config.h b/keyboards/handwired/onekey/stm32f0_disco/config.h index 039a1beffda4..4024ee1caa6b 100644 --- a/keyboards/handwired/onekey/stm32f0_disco/config.h +++ b/keyboards/handwired/onekey/stm32f0_disco/config.h @@ -21,3 +21,8 @@ #define MATRIX_COL_PINS { B4 } #define MATRIX_ROW_PINS { B5 } #define UNUSED_PINS + +#define BACKLIGHT_PIN C8 +#define BACKLIGHT_PWM_DRIVER PWMD3 +#define BACKLIGHT_PWM_CHANNEL 3 +#define BACKLIGHT_PAL_MODE 0 diff --git a/quantum/backlight/backlight.c b/quantum/backlight/backlight.c new file mode 100644 index 000000000000..e26de86bf95c --- /dev/null +++ b/quantum/backlight/backlight.c @@ -0,0 +1 @@ +// TODO: Add common code here, for example cie_lightness implementation diff --git a/quantum/backlight/backlight_arm.c b/quantum/backlight/backlight_arm.c new file mode 100644 index 000000000000..3f94ccef8ecd --- /dev/null +++ b/quantum/backlight/backlight_arm.c @@ -0,0 +1,218 @@ +#include "quantum.h" +#include "backlight.h" +#include +#include "debug.h" + +// TODO: remove short term bodge when refactoring BACKLIGHT_CUSTOM_DRIVER out +#ifdef BACKLIGHT_PIN + +# if defined(STM32F0XX) || defined(STM32F0xx) +# error "Backlight support for STMF072 is not available. Please disable." +# endif + +# if defined(STM32F1XX) || defined(STM32F1xx) +# define USE_GPIOV1 +# endif + +// GPIOV2 && GPIOV3 +# ifndef BACKLIGHT_PAL_MODE +# define BACKLIGHT_PAL_MODE 2 +# endif + +// GENERIC +# ifndef BACKLIGHT_PWM_DRIVER +# define BACKLIGHT_PWM_DRIVER PWMD4 +# endif +# ifndef BACKLIGHT_PWM_CHANNEL +# define BACKLIGHT_PWM_CHANNEL 3 +# endif + +static void breathing_callback(PWMDriver *pwmp); + +static PWMConfig pwmCFG = {0xFFFF, /* PWM clock frequency */ + 256, /* PWM period (in ticks) 1S (1/10kHz=0.1mS 0.1ms*10000 ticks=1S) */ + NULL, /* No Callback */ + { /* Default all channels to disabled - Channels will be configured durring init */ + {PWM_OUTPUT_DISABLED, NULL}, + {PWM_OUTPUT_DISABLED, NULL}, + {PWM_OUTPUT_DISABLED, NULL}, + {PWM_OUTPUT_DISABLED, NULL}}, + 0, /* HW dependent part.*/ + 0}; + +static PWMConfig pwmCFG_breathing = {0xFFFF, /** PWM clock frequency */ + 256, /* PWM period (in ticks) 1S (1/10kHz=0.1mS 0.1ms*10000 ticks=1S) */ + breathing_callback, /* Breathing Callback */ + { /* Default all channels to disabled - Channels will be configured durring init */ + {PWM_OUTPUT_DISABLED, NULL}, + {PWM_OUTPUT_DISABLED, NULL}, + {PWM_OUTPUT_DISABLED, NULL}, + {PWM_OUTPUT_DISABLED, NULL}}, + 0, /* HW dependent part.*/ + 0}; + +// See http://jared.geek.nz/2013/feb/linear-led-pwm +static uint16_t cie_lightness(uint16_t v) { + if (v <= 5243) // if below 8% of max + return v / 9; // same as dividing by 900% + else { + uint32_t y = (((uint32_t)v + 10486) << 8) / (10486 + 0xFFFFUL); // add 16% of max and compare + // to get a useful result with integer division, we shift left in the expression above + // and revert what we've done again after squaring. + y = y * y * y >> 8; + if (y > 0xFFFFUL) // prevent overflow + return 0xFFFFU; + else + return (uint16_t)y; + } +} + +void backlight_init_ports(void) { + // printf("backlight_init_ports()\n"); + +# ifdef USE_GPIOV1 + palSetPadMode(PAL_PORT(BACKLIGHT_PIN), PAL_PAD(BACKLIGHT_PIN), PAL_MODE_STM32_ALTERNATE_PUSHPULL); +# else + palSetPadMode(PAL_PORT(BACKLIGHT_PIN), PAL_PAD(BACKLIGHT_PIN), PAL_MODE_ALTERNATE(BACKLIGHT_PAL_MODE)); +# endif + + pwmCFG.channels[BACKLIGHT_PWM_CHANNEL - 1].mode = PWM_OUTPUT_ACTIVE_HIGH; + pwmCFG_breathing.channels[BACKLIGHT_PWM_CHANNEL - 1].mode = PWM_OUTPUT_ACTIVE_HIGH; + pwmStart(&BACKLIGHT_PWM_DRIVER, &pwmCFG); + + backlight_set(get_backlight_level()); + if (is_backlight_breathing()) { + breathing_enable(); + } +} + +void backlight_set(uint8_t level) { + // printf("backlight_set(%d)\n", level); + if (level == 0) { + // Turn backlight off + pwmDisableChannel(&BACKLIGHT_PWM_DRIVER, BACKLIGHT_PWM_CHANNEL - 1); + } else { + // Turn backlight on + if (!is_breathing()) { + uint32_t duty = (uint32_t)(cie_lightness(0xFFFF * (uint32_t)level / BACKLIGHT_LEVELS)); + // printf("duty: (%d)\n", duty); + pwmEnableChannel(&BACKLIGHT_PWM_DRIVER, BACKLIGHT_PWM_CHANNEL - 1, PWM_FRACTION_TO_WIDTH(&BACKLIGHT_PWM_DRIVER, 0xFFFF, duty)); + } + } +} + +uint8_t backlight_tick = 0; + +void backlight_task(void) {} + +# define BREATHING_NO_HALT 0 +# define BREATHING_HALT_OFF 1 +# define BREATHING_HALT_ON 2 +# define BREATHING_STEPS 128 + +static uint8_t breathing_period = BREATHING_PERIOD; +static uint8_t breathing_halt = BREATHING_NO_HALT; +static uint16_t breathing_counter = 0; + +bool is_breathing(void) { return BACKLIGHT_PWM_DRIVER.config == &pwmCFG_breathing; } + +static inline void breathing_min(void) { breathing_counter = 0; } + +static inline void breathing_max(void) { breathing_counter = breathing_period * 256 / 2; } + +void breathing_interrupt_enable(void) { + pwmStop(&BACKLIGHT_PWM_DRIVER); + pwmStart(&BACKLIGHT_PWM_DRIVER, &pwmCFG_breathing); + chSysLockFromISR(); + pwmEnablePeriodicNotification(&BACKLIGHT_PWM_DRIVER); + pwmEnableChannelI(&BACKLIGHT_PWM_DRIVER, BACKLIGHT_PWM_CHANNEL - 1, PWM_FRACTION_TO_WIDTH(&BACKLIGHT_PWM_DRIVER, 0xFFFF, 0xFFFF)); + chSysUnlockFromISR(); +} + +void breathing_interrupt_disable(void) { + pwmStop(&BACKLIGHT_PWM_DRIVER); + pwmStart(&BACKLIGHT_PWM_DRIVER, &pwmCFG); +} + +void breathing_enable(void) { + breathing_counter = 0; + breathing_halt = BREATHING_NO_HALT; + breathing_interrupt_enable(); +} + +void breathing_pulse(void) { + if (get_backlight_level() == 0) + breathing_min(); + else + breathing_max(); + breathing_halt = BREATHING_HALT_ON; + breathing_interrupt_enable(); +} + +void breathing_disable(void) { + // printf("breathing_disable()\n"); + breathing_interrupt_disable(); + // Restore backlight level + backlight_set(get_backlight_level()); +} + +void breathing_self_disable(void) { + if (get_backlight_level() == 0) + breathing_halt = BREATHING_HALT_OFF; + else + breathing_halt = BREATHING_HALT_ON; +} + +void breathing_toggle(void) { + if (is_breathing()) + breathing_disable(); + else + breathing_enable(); +} + +void breathing_period_set(uint8_t value) { + if (!value) value = 1; + breathing_period = value; +} + +void breathing_period_default(void) { breathing_period_set(BREATHING_PERIOD); } + +void breathing_period_inc(void) { breathing_period_set(breathing_period + 1); } + +void breathing_period_dec(void) { breathing_period_set(breathing_period - 1); } + +/* To generate breathing curve in python: + * from math import sin, pi; [int(sin(x/128.0*pi)**4*255) for x in range(128)] + */ +static const uint8_t breathing_table[BREATHING_STEPS] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 17, 20, 24, 28, 32, 36, 41, 46, 51, 57, 63, 70, 76, 83, 91, 98, 106, 113, 121, 129, 138, 146, 154, 162, 170, 178, 185, 193, 200, 207, 213, 220, 225, 231, 235, 240, 244, 247, 250, 252, 253, 254, 255, 254, 253, 252, 250, 247, 244, 240, 235, 231, 225, 220, 213, 207, 200, 193, 185, 178, 170, 162, 154, 146, 138, 129, 121, 113, 106, 98, 91, 83, 76, 70, 63, 57, 51, 46, 41, 36, 32, 28, 24, 20, 17, 15, 12, 10, 8, 6, 5, 4, 3, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + +// Use this before the cie_lightness function. +static inline uint16_t scale_backlight(uint16_t v) { return v / BACKLIGHT_LEVELS * get_backlight_level(); } + +static void breathing_callback(PWMDriver *pwmp) { + (void)pwmp; + uint16_t interval = (uint16_t)breathing_period * 256 / BREATHING_STEPS; + // resetting after one period to prevent ugly reset at overflow. + breathing_counter = (breathing_counter + 1) % (breathing_period * 256); + uint8_t index = breathing_counter / interval % BREATHING_STEPS; + + if (((breathing_halt == BREATHING_HALT_ON) && (index == BREATHING_STEPS / 2)) || ((breathing_halt == BREATHING_HALT_OFF) && (index == BREATHING_STEPS - 1))) { + breathing_interrupt_disable(); + } + + uint32_t duty = cie_lightness(scale_backlight(breathing_table[index] * 256)); + + chSysLockFromISR(); + pwmEnableChannelI(&BACKLIGHT_PWM_DRIVER, BACKLIGHT_PWM_CHANNEL - 1, PWM_FRACTION_TO_WIDTH(&BACKLIGHT_PWM_DRIVER, 0xFFFF, duty)); + chSysUnlockFromISR(); +} + +#else + +__attribute__((weak)) void backlight_init_ports(void) {} + +__attribute__((weak)) void backlight_set(uint8_t level) {} + +__attribute__((weak)) void backlight_task(void) {} + +#endif diff --git a/quantum/backlight/backlight_avr.c b/quantum/backlight/backlight_avr.c new file mode 100644 index 000000000000..445698f47c4c --- /dev/null +++ b/quantum/backlight/backlight_avr.c @@ -0,0 +1,509 @@ +#include "quantum.h" +#include "backlight.h" +#include "debug.h" + +#if defined(BACKLIGHT_ENABLE) && (defined(BACKLIGHT_PIN) || defined(BACKLIGHT_PINS)) + +// This logic is a bit complex, we support 3 setups: +// +// 1. Hardware PWM when backlight is wired to a PWM pin. +// Depending on this pin, we use a different output compare unit. +// 2. Software PWM with hardware timers, but the used timer +// depends on the Audio setup (Audio wins over Backlight). +// 3. Full software PWM, driven by the matrix scan, if both timers are used by Audio. + +# if (defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__) || defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__)) && (BACKLIGHT_PIN == B5 || BACKLIGHT_PIN == B6 || BACKLIGHT_PIN == B7) +# define HARDWARE_PWM +# define ICRx ICR1 +# define TCCRxA TCCR1A +# define TCCRxB TCCR1B +# define TIMERx_OVF_vect TIMER1_OVF_vect +# define TIMSKx TIMSK1 +# define TOIEx TOIE1 + +# if BACKLIGHT_PIN == B5 +# define COMxx1 COM1A1 +# define OCRxx OCR1A +# elif BACKLIGHT_PIN == B6 +# define COMxx1 COM1B1 +# define OCRxx OCR1B +# elif BACKLIGHT_PIN == B7 +# define COMxx1 COM1C1 +# define OCRxx OCR1C +# endif +# elif (defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__) || defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__)) && (BACKLIGHT_PIN == C4 || BACKLIGHT_PIN == C5 || BACKLIGHT_PIN == C6) +# define HARDWARE_PWM +# define ICRx ICR3 +# define TCCRxA TCCR3A +# define TCCRxB TCCR3B +# define TIMERx_OVF_vect TIMER3_OVF_vect +# define TIMSKx TIMSK3 +# define TOIEx TOIE3 + +# if BACKLIGHT_PIN == C4 +# if (defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__)) +# error This MCU has no C4 pin! +# else +# define COMxx1 COM3C1 +# define OCRxx OCR3C +# endif +# elif BACKLIGHT_PIN == C5 +# if (defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__)) +# error This MCU has no C5 pin! +# else +# define COMxx1 COM3B1 +# define OCRxx OCR3B +# endif +# elif BACKLIGHT_PIN == C6 +# define COMxx1 COM3A1 +# define OCRxx OCR3A +# endif +# elif (defined(__AVR_ATmega16U2__) || defined(__AVR_ATmega32U2__)) && (BACKLIGHT_PIN == B7 || BACKLIGHT_PIN == C5 || BACKLIGHT_PIN == C6) +# define HARDWARE_PWM +# define ICRx ICR1 +# define TCCRxA TCCR1A +# define TCCRxB TCCR1B +# define TIMERx_OVF_vect TIMER1_OVF_vect +# define TIMSKx TIMSK1 +# define TOIEx TOIE1 + +# if BACKLIGHT_PIN == B7 +# define COMxx1 COM1C1 +# define OCRxx OCR1C +# elif BACKLIGHT_PIN == C5 +# define COMxx1 COM1B1 +# define OCRxx OCR1B +# elif BACKLIGHT_PIN == C6 +# define COMxx1 COM1A1 +# define OCRxx OCR1A +# endif +# elif defined(__AVR_ATmega32A__) && (BACKLIGHT_PIN == D4 || BACKLIGHT_PIN == D5) +# define HARDWARE_PWM +# define ICRx ICR1 +# define TCCRxA TCCR1A +# define TCCRxB TCCR1B +# define TIMERx_OVF_vect TIMER1_OVF_vect +# define TIMSKx TIMSK +# define TOIEx TOIE1 + +# if BACKLIGHT_PIN == D4 +# define COMxx1 COM1B1 +# define OCRxx OCR1B +# elif BACKLIGHT_PIN == D5 +# define COMxx1 COM1A1 +# define OCRxx OCR1A +# endif +# elif defined(__AVR_ATmega328P__) && (BACKLIGHT_PIN == B1 || BACKLIGHT_PIN == B2) +# define HARDWARE_PWM +# define ICRx ICR1 +# define TCCRxA TCCR1A +# define TCCRxB TCCR1B +# define TIMERx_OVF_vect TIMER1_OVF_vect +# define TIMSKx TIMSK1 +# define TOIEx TOIE1 + +# if BACKLIGHT_PIN == B1 +# define COMxx1 COM1A1 +# define OCRxx OCR1A +# elif BACKLIGHT_PIN == B2 +# define COMxx1 COM1B1 +# define OCRxx OCR1B +# endif +# else +# if !defined(BACKLIGHT_CUSTOM_DRIVER) +# if !defined(B5_AUDIO) && !defined(B6_AUDIO) && !defined(B7_AUDIO) +// Timer 1 is not in use by Audio feature, Backlight can use it +# pragma message "Using hardware timer 1 with software PWM" +# define HARDWARE_PWM +# define BACKLIGHT_PWM_TIMER +# define ICRx ICR1 +# define TCCRxA TCCR1A +# define TCCRxB TCCR1B +# define TIMERx_COMPA_vect TIMER1_COMPA_vect +# define TIMERx_OVF_vect TIMER1_OVF_vect +# if defined(__AVR_ATmega32A__) // This MCU has only one TIMSK register +# define TIMSKx TIMSK +# else +# define TIMSKx TIMSK1 +# endif +# define TOIEx TOIE1 + +# define OCIExA OCIE1A +# define OCRxx OCR1A +# elif !defined(C6_AUDIO) && !defined(C5_AUDIO) && !defined(C4_AUDIO) +# pragma message "Using hardware timer 3 with software PWM" +// Timer 3 is not in use by Audio feature, Backlight can use it +# define HARDWARE_PWM +# define BACKLIGHT_PWM_TIMER +# define ICRx ICR1 +# define TCCRxA TCCR3A +# define TCCRxB TCCR3B +# define TIMERx_COMPA_vect TIMER3_COMPA_vect +# define TIMERx_OVF_vect TIMER3_OVF_vect +# define TIMSKx TIMSK3 +# define TOIEx TOIE3 + +# define OCIExA OCIE3A +# define OCRxx OCR3A +# else +# pragma message "Audio in use - using pure software PWM" +# define NO_HARDWARE_PWM +# endif +# else +# pragma message "Custom driver defined - using pure software PWM" +# define NO_HARDWARE_PWM +# endif +# endif + +# ifndef BACKLIGHT_ON_STATE +# define BACKLIGHT_ON_STATE 0 +# endif + +void backlight_on(uint8_t backlight_pin) { +# if BACKLIGHT_ON_STATE == 0 + writePinLow(backlight_pin); +# else + writePinHigh(backlight_pin); +# endif +} + +void backlight_off(uint8_t backlight_pin) { +# if BACKLIGHT_ON_STATE == 0 + writePinHigh(backlight_pin); +# else + writePinLow(backlight_pin); +# endif +} + +# if defined(NO_HARDWARE_PWM) || defined(BACKLIGHT_PWM_TIMER) // pwm through software + +// we support multiple backlight pins +# ifndef BACKLIGHT_LED_COUNT +# define BACKLIGHT_LED_COUNT 1 +# endif + +# if BACKLIGHT_LED_COUNT == 1 +# define BACKLIGHT_PIN_INIT \ + { BACKLIGHT_PIN } +# else +# define BACKLIGHT_PIN_INIT BACKLIGHT_PINS +# endif + +# define FOR_EACH_LED(x) \ + for (uint8_t i = 0; i < BACKLIGHT_LED_COUNT; i++) { \ + uint8_t backlight_pin = backlight_pins[i]; \ + { x } \ + } + +static const uint8_t backlight_pins[BACKLIGHT_LED_COUNT] = BACKLIGHT_PIN_INIT; + +# else // full hardware PWM + +// we support only one backlight pin +static const uint8_t backlight_pin = BACKLIGHT_PIN; +# define FOR_EACH_LED(x) x + +# endif + +# ifdef NO_HARDWARE_PWM +__attribute__((weak)) void backlight_init_ports(void) { + // Setup backlight pin as output and output to on state. + FOR_EACH_LED(setPinOutput(backlight_pin); backlight_on(backlight_pin);) + +# ifdef BACKLIGHT_BREATHING + if (is_backlight_breathing()) { + breathing_enable(); + } +# endif +} + +__attribute__((weak)) void backlight_set(uint8_t level) {} + +uint8_t backlight_tick = 0; + +# ifndef BACKLIGHT_CUSTOM_DRIVER +void backlight_task(void) { + if ((0xFFFF >> ((BACKLIGHT_LEVELS - get_backlight_level()) * ((BACKLIGHT_LEVELS + 1) / 2))) & (1 << backlight_tick)) { + FOR_EACH_LED(backlight_on(backlight_pin);) + } else { + FOR_EACH_LED(backlight_off(backlight_pin);) + } + backlight_tick = (backlight_tick + 1) % 16; +} +# endif + +# ifdef BACKLIGHT_BREATHING +# ifndef BACKLIGHT_CUSTOM_DRIVER +# error "Backlight breathing only available with hardware PWM. Please disable." +# endif +# endif + +# else // hardware pwm through timer + +# ifdef BACKLIGHT_PWM_TIMER + +// The idea of software PWM assisted by hardware timers is the following +// we use the hardware timer in fast PWM mode like for hardware PWM, but +// instead of letting the Output Match Comparator control the led pin +// (which is not possible since the backlight is not wired to PWM pins on the +// CPU), we do the LED on/off by oursleves. +// The timer is setup to count up to 0xFFFF, and we set the Output Compare +// register to the current 16bits backlight level (after CIE correction). +// This means the CPU will trigger a compare match interrupt when the counter +// reaches the backlight level, where we turn off the LEDs, +// but also an overflow interrupt when the counter rolls back to 0, +// in which we're going to turn on the LEDs. +// The LED will then be on for OCRxx/0xFFFF time, adjusted every 244Hz. + +// Triggered when the counter reaches the OCRx value +ISR(TIMERx_COMPA_vect) { FOR_EACH_LED(backlight_off(backlight_pin);) } + +// Triggered when the counter reaches the TOP value +// this one triggers at F_CPU/65536 =~ 244 Hz +ISR(TIMERx_OVF_vect) { +# ifdef BACKLIGHT_BREATHING + if (is_breathing()) { + breathing_task(); + } +# endif + // for very small values of OCRxx (or backlight level) + // we can't guarantee this whole code won't execute + // at the same time as the compare match interrupt + // which means that we might turn on the leds while + // trying to turn them off, leading to flickering + // artifacts (especially while breathing, because breathing_task + // takes many computation cycles). + // so better not turn them on while the counter TOP is very low. + if (OCRxx > 256) { + FOR_EACH_LED(backlight_on(backlight_pin);) + } +} + +# endif + +# define TIMER_TOP 0xFFFFU + +// See http://jared.geek.nz/2013/feb/linear-led-pwm +static uint16_t cie_lightness(uint16_t v) { + if (v <= 5243) // if below 8% of max + return v / 9; // same as dividing by 900% + else { + uint32_t y = (((uint32_t)v + 10486) << 8) / (10486 + 0xFFFFUL); // add 16% of max and compare + // to get a useful result with integer division, we shift left in the expression above + // and revert what we've done again after squaring. + y = y * y * y >> 8; + if (y > 0xFFFFUL) // prevent overflow + return 0xFFFFU; + else + return (uint16_t)y; + } +} + +// range for val is [0..TIMER_TOP]. PWM pin is high while the timer count is below val. +static inline void set_pwm(uint16_t val) { OCRxx = val; } + +# ifndef BACKLIGHT_CUSTOM_DRIVER +__attribute__((weak)) void backlight_set(uint8_t level) { + if (level > BACKLIGHT_LEVELS) level = BACKLIGHT_LEVELS; + + if (level == 0) { +# ifdef BACKLIGHT_PWM_TIMER + if (OCRxx) { + TIMSKx &= ~(_BV(OCIExA)); + TIMSKx &= ~(_BV(TOIEx)); + FOR_EACH_LED(backlight_off(backlight_pin);) + } +# else + // Turn off PWM control on backlight pin + TCCRxA &= ~(_BV(COMxx1)); +# endif + } else { +# ifdef BACKLIGHT_PWM_TIMER + if (!OCRxx) { + TIMSKx |= _BV(OCIExA); + TIMSKx |= _BV(TOIEx); + } +# else + // Turn on PWM control of backlight pin + TCCRxA |= _BV(COMxx1); +# endif + } + // Set the brightness + set_pwm(cie_lightness(TIMER_TOP * (uint32_t)level / BACKLIGHT_LEVELS)); +} + +void backlight_task(void) {} +# endif // BACKLIGHT_CUSTOM_DRIVER + +# ifdef BACKLIGHT_BREATHING + +# define BREATHING_NO_HALT 0 +# define BREATHING_HALT_OFF 1 +# define BREATHING_HALT_ON 2 +# define BREATHING_STEPS 128 + +static uint8_t breathing_period = BREATHING_PERIOD; +static uint8_t breathing_halt = BREATHING_NO_HALT; +static uint16_t breathing_counter = 0; + +# ifdef BACKLIGHT_PWM_TIMER +static bool breathing = false; + +bool is_breathing(void) { return breathing; } + +# define breathing_interrupt_enable() \ + do { \ + breathing = true; \ + } while (0) +# define breathing_interrupt_disable() \ + do { \ + breathing = false; \ + } while (0) +# else + +bool is_breathing(void) { return !!(TIMSKx & _BV(TOIEx)); } + +# define breathing_interrupt_enable() \ + do { \ + TIMSKx |= _BV(TOIEx); \ + } while (0) +# define breathing_interrupt_disable() \ + do { \ + TIMSKx &= ~_BV(TOIEx); \ + } while (0) +# endif + +# define breathing_min() \ + do { \ + breathing_counter = 0; \ + } while (0) +# define breathing_max() \ + do { \ + breathing_counter = breathing_period * 244 / 2; \ + } while (0) + +void breathing_enable(void) { + breathing_counter = 0; + breathing_halt = BREATHING_NO_HALT; + breathing_interrupt_enable(); +} + +void breathing_pulse(void) { + if (get_backlight_level() == 0) + breathing_min(); + else + breathing_max(); + breathing_halt = BREATHING_HALT_ON; + breathing_interrupt_enable(); +} + +void breathing_disable(void) { + breathing_interrupt_disable(); + // Restore backlight level + backlight_set(get_backlight_level()); +} + +void breathing_self_disable(void) { + if (get_backlight_level() == 0) + breathing_halt = BREATHING_HALT_OFF; + else + breathing_halt = BREATHING_HALT_ON; +} + +void breathing_toggle(void) { + if (is_breathing()) + breathing_disable(); + else + breathing_enable(); +} + +void breathing_period_set(uint8_t value) { + if (!value) value = 1; + breathing_period = value; +} + +void breathing_period_default(void) { breathing_period_set(BREATHING_PERIOD); } + +void breathing_period_inc(void) { breathing_period_set(breathing_period + 1); } + +void breathing_period_dec(void) { breathing_period_set(breathing_period - 1); } + +/* To generate breathing curve in python: + * from math import sin, pi; [int(sin(x/128.0*pi)**4*255) for x in range(128)] + */ +static const uint8_t breathing_table[BREATHING_STEPS] PROGMEM = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 17, 20, 24, 28, 32, 36, 41, 46, 51, 57, 63, 70, 76, 83, 91, 98, 106, 113, 121, 129, 138, 146, 154, 162, 170, 178, 185, 193, 200, 207, 213, 220, 225, 231, 235, 240, 244, 247, 250, 252, 253, 254, 255, 254, 253, 252, 250, 247, 244, 240, 235, 231, 225, 220, 213, 207, 200, 193, 185, 178, 170, 162, 154, 146, 138, 129, 121, 113, 106, 98, 91, 83, 76, 70, 63, 57, 51, 46, 41, 36, 32, 28, 24, 20, 17, 15, 12, 10, 8, 6, 5, 4, 3, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + +// Use this before the cie_lightness function. +static inline uint16_t scale_backlight(uint16_t v) { return v / BACKLIGHT_LEVELS * get_backlight_level(); } + +# ifdef BACKLIGHT_PWM_TIMER +void breathing_task(void) +# else +/* Assuming a 16MHz CPU clock and a timer that resets at 64k (ICR1), the following interrupt handler will run + * about 244 times per second. + */ +ISR(TIMERx_OVF_vect) +# endif +{ + uint16_t interval = (uint16_t)breathing_period * 244 / BREATHING_STEPS; + // resetting after one period to prevent ugly reset at overflow. + breathing_counter = (breathing_counter + 1) % (breathing_period * 244); + uint8_t index = breathing_counter / interval % BREATHING_STEPS; + + if (((breathing_halt == BREATHING_HALT_ON) && (index == BREATHING_STEPS / 2)) || ((breathing_halt == BREATHING_HALT_OFF) && (index == BREATHING_STEPS - 1))) { + breathing_interrupt_disable(); + } + + set_pwm(cie_lightness(scale_backlight((uint16_t)pgm_read_byte(&breathing_table[index]) * 0x0101U))); +} + +# endif // BACKLIGHT_BREATHING + +__attribute__((weak)) void backlight_init_ports(void) { + // Setup backlight pin as output and output to on state. + FOR_EACH_LED(setPinOutput(backlight_pin); backlight_on(backlight_pin);) + + // I could write a wall of text here to explain... but TL;DW + // Go read the ATmega32u4 datasheet. + // And this: http://blog.saikoled.com/post/43165849837/secret-konami-cheat-code-to-high-resolution-pwm-on + +# ifdef BACKLIGHT_PWM_TIMER + // TimerX setup, Fast PWM mode count to TOP set in ICRx + TCCRxA = _BV(WGM11); // = 0b00000010; + // clock select clk/1 + TCCRxB = _BV(WGM13) | _BV(WGM12) | _BV(CS10); // = 0b00011001; +# else // hardware PWM + // Pin PB7 = OCR1C (Timer 1, Channel C) + // Compare Output Mode = Clear on compare match, Channel C = COM1C1=1 COM1C0=0 + // (i.e. start high, go low when counter matches.) + // WGM Mode 14 (Fast PWM) = WGM13=1 WGM12=1 WGM11=1 WGM10=0 + // Clock Select = clk/1 (no prescaling) = CS12=0 CS11=0 CS10=1 + + /* + 14.8.3: + "In fast PWM mode, the compare units allow generation of PWM waveforms on the OCnx pins. Setting the COMnx1:0 bits to two will produce a non-inverted PWM [..]." + "In fast PWM mode the counter is incremented until the counter value matches either one of the fixed values 0x00FF, 0x01FF, or 0x03FF (WGMn3:0 = 5, 6, or 7), the value in ICRn (WGMn3:0 = 14), or the value in OCRnA (WGMn3:0 = 15)." + */ + TCCRxA = _BV(COMxx1) | _BV(WGM11); // = 0b00001010; + TCCRxB = _BV(WGM13) | _BV(WGM12) | _BV(CS10); // = 0b00011001; +# endif + // Use full 16-bit resolution. Counter counts to ICR1 before reset to 0. + ICRx = TIMER_TOP; + + backlight_init(); +# ifdef BACKLIGHT_BREATHING + if (is_backlight_breathing()) { + breathing_enable(); + } +# endif +} + +# endif // hardware backlight + +#else // no backlight + +__attribute__((weak)) void backlight_init_ports(void) {} + +__attribute__((weak)) void backlight_set(uint8_t level) {} + +#endif // backlight \ No newline at end of file diff --git a/quantum/quantum.c b/quantum/quantum.c index 16922dd011eb..f4999456e337 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -24,10 +24,6 @@ # include "outputselect.h" #endif -#ifndef BREATHING_PERIOD -# define BREATHING_PERIOD 6 -#endif - #include "backlight.h" extern backlight_config_t backlight_config; @@ -1019,511 +1015,6 @@ void matrix_scan_quantum() { matrix_scan_kb(); } -#if defined(BACKLIGHT_ENABLE) && (defined(BACKLIGHT_PIN) || defined(BACKLIGHT_PINS)) - -// This logic is a bit complex, we support 3 setups: -// -// 1. Hardware PWM when backlight is wired to a PWM pin. -// Depending on this pin, we use a different output compare unit. -// 2. Software PWM with hardware timers, but the used timer -// depends on the Audio setup (Audio wins over Backlight). -// 3. Full software PWM, driven by the matrix scan, if both timers are used by Audio. - -# if (defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__) || defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__)) && (BACKLIGHT_PIN == B5 || BACKLIGHT_PIN == B6 || BACKLIGHT_PIN == B7) -# define HARDWARE_PWM -# define ICRx ICR1 -# define TCCRxA TCCR1A -# define TCCRxB TCCR1B -# define TIMERx_OVF_vect TIMER1_OVF_vect -# define TIMSKx TIMSK1 -# define TOIEx TOIE1 - -# if BACKLIGHT_PIN == B5 -# define COMxx1 COM1A1 -# define OCRxx OCR1A -# elif BACKLIGHT_PIN == B6 -# define COMxx1 COM1B1 -# define OCRxx OCR1B -# elif BACKLIGHT_PIN == B7 -# define COMxx1 COM1C1 -# define OCRxx OCR1C -# endif -# elif (defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__) || defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__)) && (BACKLIGHT_PIN == C4 || BACKLIGHT_PIN == C5 || BACKLIGHT_PIN == C6) -# define HARDWARE_PWM -# define ICRx ICR3 -# define TCCRxA TCCR3A -# define TCCRxB TCCR3B -# define TIMERx_OVF_vect TIMER3_OVF_vect -# define TIMSKx TIMSK3 -# define TOIEx TOIE3 - -# if BACKLIGHT_PIN == C4 -# if (defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__)) -# error This MCU has no C4 pin! -# else -# define COMxx1 COM3C1 -# define OCRxx OCR3C -# endif -# elif BACKLIGHT_PIN == C5 -# if (defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__)) -# error This MCU has no C5 pin! -# else -# define COMxx1 COM3B1 -# define OCRxx OCR3B -# endif -# elif BACKLIGHT_PIN == C6 -# define COMxx1 COM3A1 -# define OCRxx OCR3A -# endif -# elif (defined(__AVR_ATmega16U2__) || defined(__AVR_ATmega32U2__)) && (BACKLIGHT_PIN == B7 || BACKLIGHT_PIN == C5 || BACKLIGHT_PIN == C6) -# define HARDWARE_PWM -# define ICRx ICR1 -# define TCCRxA TCCR1A -# define TCCRxB TCCR1B -# define TIMERx_OVF_vect TIMER1_OVF_vect -# define TIMSKx TIMSK1 -# define TOIEx TOIE1 - -# if BACKLIGHT_PIN == B7 -# define COMxx1 COM1C1 -# define OCRxx OCR1C -# elif BACKLIGHT_PIN == C5 -# define COMxx1 COM1B1 -# define OCRxx OCR1B -# elif BACKLIGHT_PIN == C6 -# define COMxx1 COM1A1 -# define OCRxx OCR1A -# endif -# elif defined(__AVR_ATmega32A__) && (BACKLIGHT_PIN == D4 || BACKLIGHT_PIN == D5) -# define HARDWARE_PWM -# define ICRx ICR1 -# define TCCRxA TCCR1A -# define TCCRxB TCCR1B -# define TIMERx_OVF_vect TIMER1_OVF_vect -# define TIMSKx TIMSK -# define TOIEx TOIE1 - -# if BACKLIGHT_PIN == D4 -# define COMxx1 COM1B1 -# define OCRxx OCR1B -# elif BACKLIGHT_PIN == D5 -# define COMxx1 COM1A1 -# define OCRxx OCR1A -# endif -# elif defined(__AVR_ATmega328P__) && (BACKLIGHT_PIN == B1 || BACKLIGHT_PIN == B2) -# define HARDWARE_PWM -# define ICRx ICR1 -# define TCCRxA TCCR1A -# define TCCRxB TCCR1B -# define TIMERx_OVF_vect TIMER1_OVF_vect -# define TIMSKx TIMSK1 -# define TOIEx TOIE1 - -# if BACKLIGHT_PIN == B1 -# define COMxx1 COM1A1 -# define OCRxx OCR1A -# elif BACKLIGHT_PIN == B2 -# define COMxx1 COM1B1 -# define OCRxx OCR1B -# endif -# else -# if !defined(BACKLIGHT_CUSTOM_DRIVER) -# if !defined(B5_AUDIO) && !defined(B6_AUDIO) && !defined(B7_AUDIO) -// Timer 1 is not in use by Audio feature, Backlight can use it -# pragma message "Using hardware timer 1 with software PWM" -# define HARDWARE_PWM -# define BACKLIGHT_PWM_TIMER -# define ICRx ICR1 -# define TCCRxA TCCR1A -# define TCCRxB TCCR1B -# define TIMERx_COMPA_vect TIMER1_COMPA_vect -# define TIMERx_OVF_vect TIMER1_OVF_vect -# if defined(__AVR_ATmega32A__) // This MCU has only one TIMSK register -# define TIMSKx TIMSK -# else -# define TIMSKx TIMSK1 -# endif -# define TOIEx TOIE1 - -# define OCIExA OCIE1A -# define OCRxx OCR1A -# elif !defined(C6_AUDIO) && !defined(C5_AUDIO) && !defined(C4_AUDIO) -# pragma message "Using hardware timer 3 with software PWM" -// Timer 3 is not in use by Audio feature, Backlight can use it -# define HARDWARE_PWM -# define BACKLIGHT_PWM_TIMER -# define ICRx ICR1 -# define TCCRxA TCCR3A -# define TCCRxB TCCR3B -# define TIMERx_COMPA_vect TIMER3_COMPA_vect -# define TIMERx_OVF_vect TIMER3_OVF_vect -# define TIMSKx TIMSK3 -# define TOIEx TOIE3 - -# define OCIExA OCIE3A -# define OCRxx OCR3A -# else -# pragma message "Audio in use - using pure software PWM" -# define NO_HARDWARE_PWM -# endif -# else -# pragma message "Custom driver defined - using pure software PWM" -# define NO_HARDWARE_PWM -# endif -# endif - -# ifndef BACKLIGHT_ON_STATE -# define BACKLIGHT_ON_STATE 0 -# endif - -void backlight_on(uint8_t backlight_pin) { -# if BACKLIGHT_ON_STATE == 0 - writePinLow(backlight_pin); -# else - writePinHigh(backlight_pin); -# endif -} - -void backlight_off(uint8_t backlight_pin) { -# if BACKLIGHT_ON_STATE == 0 - writePinHigh(backlight_pin); -# else - writePinLow(backlight_pin); -# endif -} - -# if defined(NO_HARDWARE_PWM) || defined(BACKLIGHT_PWM_TIMER) // pwm through software - -// we support multiple backlight pins -# ifndef BACKLIGHT_LED_COUNT -# define BACKLIGHT_LED_COUNT 1 -# endif - -# if BACKLIGHT_LED_COUNT == 1 -# define BACKLIGHT_PIN_INIT \ - { BACKLIGHT_PIN } -# else -# define BACKLIGHT_PIN_INIT BACKLIGHT_PINS -# endif - -# define FOR_EACH_LED(x) \ - for (uint8_t i = 0; i < BACKLIGHT_LED_COUNT; i++) { \ - uint8_t backlight_pin = backlight_pins[i]; \ - { x } \ - } - -static const uint8_t backlight_pins[BACKLIGHT_LED_COUNT] = BACKLIGHT_PIN_INIT; - -# else // full hardware PWM - -// we support only one backlight pin -static const uint8_t backlight_pin = BACKLIGHT_PIN; -# define FOR_EACH_LED(x) x - -# endif - -# ifdef NO_HARDWARE_PWM -__attribute__((weak)) void backlight_init_ports(void) { - // Setup backlight pin as output and output to on state. - FOR_EACH_LED(setPinOutput(backlight_pin); backlight_on(backlight_pin);) - -# ifdef BACKLIGHT_BREATHING - if (is_backlight_breathing()) { - breathing_enable(); - } -# endif -} - -__attribute__((weak)) void backlight_set(uint8_t level) {} - -uint8_t backlight_tick = 0; - -# ifndef BACKLIGHT_CUSTOM_DRIVER -void backlight_task(void) { - if ((0xFFFF >> ((BACKLIGHT_LEVELS - get_backlight_level()) * ((BACKLIGHT_LEVELS + 1) / 2))) & (1 << backlight_tick)) { - FOR_EACH_LED(backlight_on(backlight_pin);) - } else { - FOR_EACH_LED(backlight_off(backlight_pin);) - } - backlight_tick = (backlight_tick + 1) % 16; -} -# endif - -# ifdef BACKLIGHT_BREATHING -# ifndef BACKLIGHT_CUSTOM_DRIVER -# error "Backlight breathing only available with hardware PWM. Please disable." -# endif -# endif - -# else // hardware pwm through timer - -# ifdef BACKLIGHT_PWM_TIMER - -// The idea of software PWM assisted by hardware timers is the following -// we use the hardware timer in fast PWM mode like for hardware PWM, but -// instead of letting the Output Match Comparator control the led pin -// (which is not possible since the backlight is not wired to PWM pins on the -// CPU), we do the LED on/off by oursleves. -// The timer is setup to count up to 0xFFFF, and we set the Output Compare -// register to the current 16bits backlight level (after CIE correction). -// This means the CPU will trigger a compare match interrupt when the counter -// reaches the backlight level, where we turn off the LEDs, -// but also an overflow interrupt when the counter rolls back to 0, -// in which we're going to turn on the LEDs. -// The LED will then be on for OCRxx/0xFFFF time, adjusted every 244Hz. - -// Triggered when the counter reaches the OCRx value -ISR(TIMERx_COMPA_vect) { FOR_EACH_LED(backlight_off(backlight_pin);) } - -// Triggered when the counter reaches the TOP value -// this one triggers at F_CPU/65536 =~ 244 Hz -ISR(TIMERx_OVF_vect) { -# ifdef BACKLIGHT_BREATHING - if (is_breathing()) { - breathing_task(); - } -# endif - // for very small values of OCRxx (or backlight level) - // we can't guarantee this whole code won't execute - // at the same time as the compare match interrupt - // which means that we might turn on the leds while - // trying to turn them off, leading to flickering - // artifacts (especially while breathing, because breathing_task - // takes many computation cycles). - // so better not turn them on while the counter TOP is very low. - if (OCRxx > 256) { - FOR_EACH_LED(backlight_on(backlight_pin);) - } -} - -# endif - -# define TIMER_TOP 0xFFFFU - -// See http://jared.geek.nz/2013/feb/linear-led-pwm -static uint16_t cie_lightness(uint16_t v) { - if (v <= 5243) // if below 8% of max - return v / 9; // same as dividing by 900% - else { - uint32_t y = (((uint32_t)v + 10486) << 8) / (10486 + 0xFFFFUL); // add 16% of max and compare - // to get a useful result with integer division, we shift left in the expression above - // and revert what we've done again after squaring. - y = y * y * y >> 8; - if (y > 0xFFFFUL) // prevent overflow - return 0xFFFFU; - else - return (uint16_t)y; - } -} - -// range for val is [0..TIMER_TOP]. PWM pin is high while the timer count is below val. -static inline void set_pwm(uint16_t val) { OCRxx = val; } - -# ifndef BACKLIGHT_CUSTOM_DRIVER -__attribute__((weak)) void backlight_set(uint8_t level) { - if (level > BACKLIGHT_LEVELS) level = BACKLIGHT_LEVELS; - - if (level == 0) { -# ifdef BACKLIGHT_PWM_TIMER - if (OCRxx) { - TIMSKx &= ~(_BV(OCIExA)); - TIMSKx &= ~(_BV(TOIEx)); - FOR_EACH_LED(backlight_off(backlight_pin);) - } -# else - // Turn off PWM control on backlight pin - TCCRxA &= ~(_BV(COMxx1)); -# endif - } else { -# ifdef BACKLIGHT_PWM_TIMER - if (!OCRxx) { - TIMSKx |= _BV(OCIExA); - TIMSKx |= _BV(TOIEx); - } -# else - // Turn on PWM control of backlight pin - TCCRxA |= _BV(COMxx1); -# endif - } - // Set the brightness - set_pwm(cie_lightness(TIMER_TOP * (uint32_t)level / BACKLIGHT_LEVELS)); -} - -void backlight_task(void) {} -# endif // BACKLIGHT_CUSTOM_DRIVER - -# ifdef BACKLIGHT_BREATHING - -# define BREATHING_NO_HALT 0 -# define BREATHING_HALT_OFF 1 -# define BREATHING_HALT_ON 2 -# define BREATHING_STEPS 128 - -static uint8_t breathing_period = BREATHING_PERIOD; -static uint8_t breathing_halt = BREATHING_NO_HALT; -static uint16_t breathing_counter = 0; - -# ifdef BACKLIGHT_PWM_TIMER -static bool breathing = false; - -bool is_breathing(void) { return breathing; } - -# define breathing_interrupt_enable() \ - do { \ - breathing = true; \ - } while (0) -# define breathing_interrupt_disable() \ - do { \ - breathing = false; \ - } while (0) -# else - -bool is_breathing(void) { return !!(TIMSKx & _BV(TOIEx)); } - -# define breathing_interrupt_enable() \ - do { \ - TIMSKx |= _BV(TOIEx); \ - } while (0) -# define breathing_interrupt_disable() \ - do { \ - TIMSKx &= ~_BV(TOIEx); \ - } while (0) -# endif - -# define breathing_min() \ - do { \ - breathing_counter = 0; \ - } while (0) -# define breathing_max() \ - do { \ - breathing_counter = breathing_period * 244 / 2; \ - } while (0) - -void breathing_enable(void) { - breathing_counter = 0; - breathing_halt = BREATHING_NO_HALT; - breathing_interrupt_enable(); -} - -void breathing_pulse(void) { - if (get_backlight_level() == 0) - breathing_min(); - else - breathing_max(); - breathing_halt = BREATHING_HALT_ON; - breathing_interrupt_enable(); -} - -void breathing_disable(void) { - breathing_interrupt_disable(); - // Restore backlight level - backlight_set(get_backlight_level()); -} - -void breathing_self_disable(void) { - if (get_backlight_level() == 0) - breathing_halt = BREATHING_HALT_OFF; - else - breathing_halt = BREATHING_HALT_ON; -} - -void breathing_toggle(void) { - if (is_breathing()) - breathing_disable(); - else - breathing_enable(); -} - -void breathing_period_set(uint8_t value) { - if (!value) value = 1; - breathing_period = value; -} - -void breathing_period_default(void) { breathing_period_set(BREATHING_PERIOD); } - -void breathing_period_inc(void) { breathing_period_set(breathing_period + 1); } - -void breathing_period_dec(void) { breathing_period_set(breathing_period - 1); } - -/* To generate breathing curve in python: - * from math import sin, pi; [int(sin(x/128.0*pi)**4*255) for x in range(128)] - */ -static const uint8_t breathing_table[BREATHING_STEPS] PROGMEM = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 17, 20, 24, 28, 32, 36, 41, 46, 51, 57, 63, 70, 76, 83, 91, 98, 106, 113, 121, 129, 138, 146, 154, 162, 170, 178, 185, 193, 200, 207, 213, 220, 225, 231, 235, 240, 244, 247, 250, 252, 253, 254, 255, 254, 253, 252, 250, 247, 244, 240, 235, 231, 225, 220, 213, 207, 200, 193, 185, 178, 170, 162, 154, 146, 138, 129, 121, 113, 106, 98, 91, 83, 76, 70, 63, 57, 51, 46, 41, 36, 32, 28, 24, 20, 17, 15, 12, 10, 8, 6, 5, 4, 3, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - -// Use this before the cie_lightness function. -static inline uint16_t scale_backlight(uint16_t v) { return v / BACKLIGHT_LEVELS * get_backlight_level(); } - -# ifdef BACKLIGHT_PWM_TIMER -void breathing_task(void) -# else -/* Assuming a 16MHz CPU clock and a timer that resets at 64k (ICR1), the following interrupt handler will run - * about 244 times per second. - */ -ISR(TIMERx_OVF_vect) -# endif -{ - uint16_t interval = (uint16_t)breathing_period * 244 / BREATHING_STEPS; - // resetting after one period to prevent ugly reset at overflow. - breathing_counter = (breathing_counter + 1) % (breathing_period * 244); - uint8_t index = breathing_counter / interval % BREATHING_STEPS; - - if (((breathing_halt == BREATHING_HALT_ON) && (index == BREATHING_STEPS / 2)) || ((breathing_halt == BREATHING_HALT_OFF) && (index == BREATHING_STEPS - 1))) { - breathing_interrupt_disable(); - } - - set_pwm(cie_lightness(scale_backlight((uint16_t)pgm_read_byte(&breathing_table[index]) * 0x0101U))); -} - -# endif // BACKLIGHT_BREATHING - -__attribute__((weak)) void backlight_init_ports(void) { - // Setup backlight pin as output and output to on state. - FOR_EACH_LED(setPinOutput(backlight_pin); backlight_on(backlight_pin);) - - // I could write a wall of text here to explain... but TL;DW - // Go read the ATmega32u4 datasheet. - // And this: http://blog.saikoled.com/post/43165849837/secret-konami-cheat-code-to-high-resolution-pwm-on - -# ifdef BACKLIGHT_PWM_TIMER - // TimerX setup, Fast PWM mode count to TOP set in ICRx - TCCRxA = _BV(WGM11); // = 0b00000010; - // clock select clk/1 - TCCRxB = _BV(WGM13) | _BV(WGM12) | _BV(CS10); // = 0b00011001; -# else // hardware PWM - // Pin PB7 = OCR1C (Timer 1, Channel C) - // Compare Output Mode = Clear on compare match, Channel C = COM1C1=1 COM1C0=0 - // (i.e. start high, go low when counter matches.) - // WGM Mode 14 (Fast PWM) = WGM13=1 WGM12=1 WGM11=1 WGM10=0 - // Clock Select = clk/1 (no prescaling) = CS12=0 CS11=0 CS10=1 - - /* - 14.8.3: - "In fast PWM mode, the compare units allow generation of PWM waveforms on the OCnx pins. Setting the COMnx1:0 bits to two will produce a non-inverted PWM [..]." - "In fast PWM mode the counter is incremented until the counter value matches either one of the fixed values 0x00FF, 0x01FF, or 0x03FF (WGMn3:0 = 5, 6, or 7), the value in ICRn (WGMn3:0 = 14), or the value in OCRnA (WGMn3:0 = 15)." - */ - TCCRxA = _BV(COMxx1) | _BV(WGM11); // = 0b00001010; - TCCRxB = _BV(WGM13) | _BV(WGM12) | _BV(CS10); // = 0b00011001; -# endif - // Use full 16-bit resolution. Counter counts to ICR1 before reset to 0. - ICRx = TIMER_TOP; - - backlight_init(); -# ifdef BACKLIGHT_BREATHING - if (is_backlight_breathing()) { - breathing_enable(); - } -# endif -} - -# endif // hardware backlight - -#else // no backlight - -__attribute__((weak)) void backlight_init_ports(void) {} - -__attribute__((weak)) void backlight_set(uint8_t level) {} - -#endif // backlight #ifdef HD44780_ENABLED # include "hd44780.h" diff --git a/tmk_core/common/backlight.h b/tmk_core/common/backlight.h index bb1f897ee874..1e581055db12 100644 --- a/tmk_core/common/backlight.h +++ b/tmk_core/common/backlight.h @@ -26,6 +26,10 @@ along with this program. If not, see . # error "Maximum value of BACKLIGHT_LEVELS is 31" #endif +#ifndef BREATHING_PERIOD +# define BREATHING_PERIOD 6 +#endif + typedef union { uint8_t raw; struct { From dbce3f648b342418f79de977068f2005d534cff7 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Sat, 5 Oct 2019 10:19:49 -0700 Subject: [PATCH 032/316] Budget96 Production PCB Fix (#6900) * production version of the PCB has the top two right most keys swapped around. There are only 6 protos in existence and one of them is mine so we can just do this. * update readme by adding backticks --- keyboards/donutcables/budget96/budget96.h | 4 ++-- keyboards/donutcables/budget96/readme.md | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/keyboards/donutcables/budget96/budget96.h b/keyboards/donutcables/budget96/budget96.h index 561d0cbfa220..05d2700ce1f3 100644 --- a/keyboards/donutcables/budget96/budget96.h +++ b/keyboards/donutcables/budget96/budget96.h @@ -18,7 +18,7 @@ #include "quantum.h" #define LAYOUT_all( \ - k50, k52, k53, k54, k55, k60, k6A, k7A, k70, k5B, k5C, k5D, k5E, k1D, k2E, k0D, k76, k79, k78, \ + k50, k52, k53, k54, k55, k60, k6A, k7A, k70, k5B, k5C, k5D, k5E, k1D, k2E, k0D, k76, k78, k79, \ k40, k41, k42, k43, k44, k45, k61, k6B, k7B, k71, k4A, k4B, k4C, k4D, k4E, k46, k47, k48, k49, \ k30, k31, k32, k33, k34, k35, k62, k6C, k7C, k72, k3A, k3B, k3C, k3D, k36, k37, k38, k39, \ k20, k21, k22, k23, k24, k25, k63, k6D, k7D, k73, k2A, k2B, k2C, k2D, k26, k27, k28, k29, \ @@ -37,7 +37,7 @@ } #define LAYOUT_96_ansi( \ - k50, k52, k53, k54, k55, k60, k6A, k7A, k70, k5B, k5C, k5D, k5E, k1D, k2E, k0D, k76, k79, k78, \ + k50, k52, k53, k54, k55, k60, k6A, k7A, k70, k5B, k5C, k5D, k5E, k1D, k2E, k0D, k76, k78, k79, \ k40, k41, k42, k43, k44, k45, k61, k6B, k7B, k71, k4A, k4B, k4C, k4E, k46, k47, k48, k49, \ k30, k31, k32, k33, k34, k35, k62, k6C, k7C, k72, k3A, k3B, k3C, k3D, k36, k37, k38, k39, \ k20, k21, k22, k23, k24, k25, k63, k6D, k7D, k73, k2A, k2B, k2D, k26, k27, k28, k29, \ diff --git a/keyboards/donutcables/budget96/readme.md b/keyboards/donutcables/budget96/readme.md index 70e4d3afba7e..c83040360ad6 100644 --- a/keyboards/donutcables/budget96/readme.md +++ b/keyboards/donutcables/budget96/readme.md @@ -37,6 +37,7 @@ macOS: brew install python3 pip3 install pyusb brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb + ``` 4. Place your keyboard into reset. 5. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file. From 19b60c273ab63c250db748e5eead6baba88cd0d8 Mon Sep 17 00:00:00 2001 From: "J.Flanagan" Date: Sat, 5 Oct 2019 12:44:55 -0500 Subject: [PATCH 033/316] [Keyboard] Add OSA keyboard (#6849) * initial commit restart of osa development * minor changes Minor changes mostly changing naming and comment out rgb modes * initial commit restart of osa development * minor changes Minor changes mostly changing naming and comment out rgb modes * more minor changes comment out some functions correct some spelling errors change some of the descriptive text * Minor Changes Minor changers per PR requests * Minor Changes Minor changes per PR suggestions * Major Changes Per PR suggestion from noroadsleft: - changed macro to LAYOUT_all in info.json, dualsplit/keymap.c and ocm/keymap.c, and osa.h - added osa.h macros for other layouts per suggestion and used suggested naming - changed naming of layout macros to correspond to macros and naming in default/keymap.c, dualsplit/keymap.c, ocm/keymap.c, splitbs/keymap.c, and splitrs/keymap.c - removed duplicate layers from all keymaps and edited per suggestions - compiled each keymap to check for and correct any potential errors. all compiled with no errors * Minor Change - fixed imgur image link in readme.md to be correct format * Minor Changes changes to macro layouts in osa.h changes to dualsplit/keymap.c - added arrows to layer 1 * Changes - Made changes to info.json to match osa.h - changes to osa.c enabling indicator LEDs - changed "dualsplit" directory name to "all" to match keymap naming in osa.h, info.json, and keymap.c - minor changes to all/keymap.c * Update keyboards/sck/osa/rules.mk Co-Authored-By: fauxpark * Update keyboards/sck/osa/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Changes to info.json - revert to info.json from version in b3b49c3 per requested changes --- keyboards/sck/osa/config.h | 251 ++++++++++++++++++++ keyboards/sck/osa/info.json | 25 ++ keyboards/sck/osa/keymaps/all/config.h | 19 ++ keyboards/sck/osa/keymaps/all/keymap.c | 103 ++++++++ keyboards/sck/osa/keymaps/all/readme.md | 1 + keyboards/sck/osa/keymaps/default/config.h | 19 ++ keyboards/sck/osa/keymaps/default/keymap.c | 103 ++++++++ keyboards/sck/osa/keymaps/default/readme.md | 1 + keyboards/sck/osa/keymaps/ocm/config.h | 19 ++ keyboards/sck/osa/keymaps/ocm/keymap.c | 123 ++++++++++ keyboards/sck/osa/keymaps/ocm/readme.md | 1 + keyboards/sck/osa/keymaps/splitbs/config.h | 19 ++ keyboards/sck/osa/keymaps/splitbs/keymap.c | 103 ++++++++ keyboards/sck/osa/keymaps/splitbs/readme.md | 1 + keyboards/sck/osa/keymaps/splitrs/config.h | 19 ++ keyboards/sck/osa/keymaps/splitrs/keymap.c | 103 ++++++++ keyboards/sck/osa/keymaps/splitrs/readme.md | 1 + keyboards/sck/osa/osa.c | 73 ++++++ keyboards/sck/osa/osa.h | 117 +++++++++ keyboards/sck/osa/readme.md | 19 ++ keyboards/sck/osa/rules.mk | 37 +++ 21 files changed, 1157 insertions(+) create mode 100644 keyboards/sck/osa/config.h create mode 100644 keyboards/sck/osa/info.json create mode 100644 keyboards/sck/osa/keymaps/all/config.h create mode 100644 keyboards/sck/osa/keymaps/all/keymap.c create mode 100644 keyboards/sck/osa/keymaps/all/readme.md create mode 100644 keyboards/sck/osa/keymaps/default/config.h create mode 100644 keyboards/sck/osa/keymaps/default/keymap.c create mode 100644 keyboards/sck/osa/keymaps/default/readme.md create mode 100644 keyboards/sck/osa/keymaps/ocm/config.h create mode 100644 keyboards/sck/osa/keymaps/ocm/keymap.c create mode 100644 keyboards/sck/osa/keymaps/ocm/readme.md create mode 100644 keyboards/sck/osa/keymaps/splitbs/config.h create mode 100644 keyboards/sck/osa/keymaps/splitbs/keymap.c create mode 100644 keyboards/sck/osa/keymaps/splitbs/readme.md create mode 100644 keyboards/sck/osa/keymaps/splitrs/config.h create mode 100644 keyboards/sck/osa/keymaps/splitrs/keymap.c create mode 100644 keyboards/sck/osa/keymaps/splitrs/readme.md create mode 100644 keyboards/sck/osa/osa.c create mode 100644 keyboards/sck/osa/osa.h create mode 100644 keyboards/sck/osa/readme.md create mode 100644 keyboards/sck/osa/rules.mk diff --git a/keyboards/sck/osa/config.h b/keyboards/sck/osa/config.h new file mode 100644 index 000000000000..1b574a0997f4 --- /dev/null +++ b/keyboards/sck/osa/config.h @@ -0,0 +1,251 @@ +/* +Copyright 2019 jrfhoutx + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Space City Keyboards +#define PRODUCT OSA +#define DESCRIPTION PCB for the OSA (A no longer open source version of the TGR Alice) + +/* key matrix size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 8 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { F0, F1, F4, F5, F6, B0, B1, B2, B3, B7 } +#define MATRIX_COL_PINS { B4, D7, D5, D3, D2, D0, D1, B5 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + + #define RGB_DI_PIN D4 + #ifdef RGB_DI_PIN + #define RGBLED_NUM 9 + #define RGBLIGHT_HUE_STEP 10 + #define RGBLIGHT_SAT_STEP 17 + #define RGBLIGHT_VAL_STEP 17 + #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ + /*== all animations enable ==*/ + // #define RGBLIGHT_ANIMATIONS + /*== or choose animations ==*/ + //#define RGBLIGHT_EFFECT_BREATHING + // #define RGBLIGHT_EFFECT_RAINBOW_MOOD + // #define RGBLIGHT_EFFECT_RAINBOW_SWIRL + // #define RGBLIGHT_EFFECT_SNAKE + // #define RGBLIGHT_EFFECT_KNIGHT + // #define RGBLIGHT_EFFECT_CHRISTMAS + // #define RGBLIGHT_EFFECT_STATIC_GRADIENT + // #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING + /*== customize breathing effect ==*/ + /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ + // #define RGBLIGHT_BREATHE_TABLE_SIZE 128 // 256(default) or 128 or 64 + /*==== use exp() and sin() ====*/ + // #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 + // #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 + #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * 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 + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +//#define BOOTMAGIC_LITE_ROW 0 +//#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/sck/osa/info.json b/keyboards/sck/osa/info.json new file mode 100644 index 000000000000..64ed057e4a3b --- /dev/null +++ b/keyboards/sck/osa/info.json @@ -0,0 +1,25 @@ +{ + "keyboard_name": "OSA", + "url": "", + "maintainer": "qmk", + "width": 18.25, + "height": 5, + "layouts": { + "LAYOUT_default_ansi": { + "key_count": 64, + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"~", "x":1.25, "y":0}, {"label":"!", "x":2.25, "y":0}, {"label":"@", "x":3.25, "y":0}, {"label":"#", "x":4.25, "y":0}, {"label":"$", "x":5.25, "y":0}, {"label":"%", "x":6.25, "y":0}, {"label":"^", "x":7.25, "y":0}, {"label":"&", "x":10.25, "y":0}, {"label":"*", "x":11.25, "y":0}, {"label":"(", "x":12.25, "y":0}, {"label":")", "x":13.25, "y":0}, {"label":"_", "x":14.25, "y":0}, {"label":"+", "x":15.25, "y":0}, {"label":"Backspace", "x":16.25, "y":0, "w":2}, {"label":"Page Up", "x":0, "y":1}, {"label":"Tab", "x":1.25, "y":1, "w":1.5}, {"label":"Q", "x":2.75, "y":1}, {"label":"W", "x":3.75, "y":1}, {"label":"E", "x":4.75, "y":1}, {"label":"R", "x":5.75, "y":1}, {"label":"T", "x":6.75, "y":1}, {"label":"Y", "x":9.75, "y":1}, {"label":"U", "x":10.75, "y":1}, {"label":"I", "x":11.75, "y":1}, {"label":"O", "x":12.75, "y":1}, {"label":"P", "x":13.75, "y":1}, {"label":"{", "x":14.75, "y":1}, {"label":"}", "x":15.75, "y":1}, {"label":"|", "x":16.75, "y":1, "w":1.5}, {"label":"Page Down", "x":0, "y":2}, {"label":"Caps Lock", "x":1.25, "y":2, "w":1.75}, {"label":"A", "x":3, "y":2}, {"label":"S", "x":4, "y":2}, {"label":"D", "x":5, "y":2}, {"label":"F", "x":6, "y":2}, {"label":"G", "x":7, "y":2}, {"label":"H", "x":10, "y":2}, {"label":"J", "x":11, "y":2}, {"label":"K", "x":12, "y":2}, {"label":"L", "x":13, "y":2}, {"label":":", "x":14, "y":2}, {"label":"\"", "x":15, "y":2}, {"label":"Enter", "x":16, "y":2, "w":2.25}, {"label":"Shift", "x":1.25, "y":3, "w":2.25}, {"label":"Z", "x":3.5, "y":3}, {"label":"X", "x":4.5, "y":3}, {"label":"C", "x":5.5, "y":3}, {"label":"V", "x":6.5, "y":3}, {"label":"B", "x":7.5, "y":3}, {"label":"B", "x":9.5, "y":3}, {"label":"N", "x":10.5, "y":3}, {"label":"M", "x":11.5, "y":3}, {"label":"<", "x":12.5, "y":3}, {"label":">", "x":13.5, "y":3}, {"label":"?", "x":14.5, "y":3}, {"label":"Shift", "x":15.5, "y":3, "w":2.75}, {"label":"Ctrl", "x":1.25, "y":4, "w":1.5}, {"label":"Win", "x":4.25, "y":4, "w":1.5}, {"x":5.75, "y":4, "w":2.25}, {"label":"Fn", "x":8, "y":4}, {"x":9.5, "y":4, "w":2.75}, {"label":"Alt", "x":12.25, "y":4, "w":1.5}, {"label":"Ctrl", "x":16.75, "y":4, "w":1.5}] + }, + "LAYOUT_split_backspace": { + "key_count": 65, + "layout": [{"label":"Delete", "x":0, "y":0}, {"label":"Esc", "x":1.25, "y":0}, {"label":"!", "x":2.25, "y":0}, {"label":"@", "x":3.25, "y":0}, {"label":"#", "x":4.25, "y":0}, {"label":"$", "x":5.25, "y":0}, {"label":"%", "x":6.25, "y":0}, {"label":"^", "x":7.25, "y":0}, {"label":"&", "x":10.25, "y":0}, {"label":"*", "x":11.25, "y":0}, {"label":"(", "x":12.25, "y":0}, {"label":")", "x":13.25, "y":0}, {"label":"_", "x":14.25, "y":0}, {"label":"+", "x":15.25, "y":0}, {"label":"~", "x":16.25, "y":0}, {"label":"|", "x":17.25, "y":0}, {"label":"Page Up", "x":0, "y":1}, {"label":"Tab", "x":1.25, "y":1, "w":1.5}, {"label":"Q", "x":2.75, "y":1}, {"label":"W", "x":3.75, "y":1}, {"label":"E", "x":4.75, "y":1}, {"label":"R", "x":5.75, "y":1}, {"label":"T", "x":6.75, "y":1}, {"label":"Y", "x":9.75, "y":1}, {"label":"U", "x":10.75, "y":1}, {"label":"I", "x":11.75, "y":1}, {"label":"O", "x":12.75, "y":1}, {"label":"P", "x":13.75, "y":1}, {"label":"{", "x":14.75, "y":1}, {"label":"}", "x":15.75, "y":1}, {"label":"Backspace", "x":16.75, "y":1, "w":1.5}, {"label":"Page Down", "x":0, "y":2}, {"label":"Caps Lock", "x":1.25, "y":2, "w":1.75}, {"label":"A", "x":3, "y":2}, {"label":"S", "x":4, "y":2}, {"label":"D", "x":5, "y":2}, {"label":"F", "x":6, "y":2}, {"label":"G", "x":7, "y":2}, {"label":"H", "x":10, "y":2}, {"label":"J", "x":11, "y":2}, {"label":"K", "x":12, "y":2}, {"label":"L", "x":13, "y":2}, {"label":":", "x":14, "y":2}, {"label":"\"", "x":15, "y":2}, {"label":"Enter", "x":16, "y":2, "w":2.25}, {"label":"Shift", "x":1.25, "y":3, "w":2.25}, {"label":"Z", "x":3.5, "y":3}, {"label":"X", "x":4.5, "y":3}, {"label":"C", "x":5.5, "y":3}, {"label":"V", "x":6.5, "y":3}, {"label":"B", "x":7.5, "y":3}, {"label":"B", "x":9.5, "y":3}, {"label":"N", "x":10.5, "y":3}, {"label":"M", "x":11.5, "y":3}, {"label":"<", "x":12.5, "y":3}, {"label":">", "x":13.5, "y":3}, {"label":"?", "x":14.5, "y":3}, {"label":"Shift", "x":15.5, "y":3, "w":2.75}, {"label":"Ctrl", "x":1.25, "y":4, "w":1.5}, {"label":"Win", "x":4.25, "y":4, "w":1.5}, {"x":5.75, "y":4, "w":2.25}, {"label":"Fn", "x":8, "y":4}, {"x":9.5, "y":4, "w":2.75}, {"label":"Alt", "x":12.25, "y":4, "w":1.5}, {"label":"Ctrl", "x":16.75, "y":4, "w":1.5}] + }, + "LAYOUT_split_right_shift": { + "key_count": 65, + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"~", "x":1.25, "y":0}, {"label":"!", "x":2.25, "y":0}, {"label":"@", "x":3.25, "y":0}, {"label":"#", "x":4.25, "y":0}, {"label":"$", "x":5.25, "y":0}, {"label":"%", "x":6.25, "y":0}, {"label":"^", "x":7.25, "y":0}, {"label":"&", "x":10.25, "y":0}, {"label":"*", "x":11.25, "y":0}, {"label":"(", "x":12.25, "y":0}, {"label":")", "x":13.25, "y":0}, {"label":"_", "x":14.25, "y":0}, {"label":"+", "x":15.25, "y":0}, {"label":"Backspace", "x":16.25, "y":0, "w":2}, {"label":"Page Up", "x":0, "y":1}, {"label":"Tab", "x":1.25, "y":1, "w":1.5}, {"label":"Q", "x":2.75, "y":1}, {"label":"W", "x":3.75, "y":1}, {"label":"E", "x":4.75, "y":1}, {"label":"R", "x":5.75, "y":1}, {"label":"T", "x":6.75, "y":1}, {"label":"Y", "x":9.75, "y":1}, {"label":"U", "x":10.75, "y":1}, {"label":"I", "x":11.75, "y":1}, {"label":"O", "x":12.75, "y":1}, {"label":"P", "x":13.75, "y":1}, {"label":"{", "x":14.75, "y":1}, {"label":"}", "x":15.75, "y":1}, {"label":"|", "x":16.75, "y":1, "w":1.5}, {"label":"Page Down", "x":0, "y":2}, {"label":"Caps Lock", "x":1.25, "y":2, "w":1.75}, {"label":"A", "x":3, "y":2}, {"label":"S", "x":4, "y":2}, {"label":"D", "x":5, "y":2}, {"label":"F", "x":6, "y":2}, {"label":"G", "x":7, "y":2}, {"label":"H", "x":10, "y":2}, {"label":"J", "x":11, "y":2}, {"label":"K", "x":12, "y":2}, {"label":"L", "x":13, "y":2}, {"label":":", "x":14, "y":2}, {"label":"\"", "x":15, "y":2}, {"label":"Enter", "x":16, "y":2, "w":2.25}, {"label":"Shift", "x":1.25, "y":3, "w":2.25}, {"label":"Z", "x":3.5, "y":3}, {"label":"X", "x":4.5, "y":3}, {"label":"C", "x":5.5, "y":3}, {"label":"V", "x":6.5, "y":3}, {"label":"B", "x":7.5, "y":3}, {"label":"B", "x":9.5, "y":3}, {"label":"N", "x":10.5, "y":3}, {"label":"M", "x":11.5, "y":3}, {"label":"<", "x":12.5, "y":3}, {"label":">", "x":13.5, "y":3}, {"label":"?", "x":14.5, "y":3}, {"label":"Shift", "x":15.5, "y":3, "w":1.75}, {"label":"Fn", "x":17.25, "y":3}, {"label":"Ctrl", "x":1.25, "y":4, "w":1.5}, {"label":"Win", "x":4.25, "y":4, "w":1.5}, {"x":5.75, "y":4, "w":2.25}, {"label":"Fn", "x":8, "y":4}, {"x":9.5, "y":4, "w":2.75}, {"label":"Alt", "x":12.25, "y":4, "w":1.5}, {"label":"Ctrl", "x":16.75, "y":4, "w":1.5}] + }, + "LAYOUT_all": { + "key_count": 66, + "layout": [{"label":"Delete", "x":0, "y":0}, {"label":"Esc", "x":1.25, "y":0}, {"label":"!", "x":2.25, "y":0}, {"label":"@", "x":3.25, "y":0}, {"label":"#", "x":4.25, "y":0}, {"label":"$", "x":5.25, "y":0}, {"label":"%", "x":6.25, "y":0}, {"label":"^", "x":7.25, "y":0}, {"label":"&", "x":10.25, "y":0}, {"label":"*", "x":11.25, "y":0}, {"label":"(", "x":12.25, "y":0}, {"label":")", "x":13.25, "y":0}, {"label":"_", "x":14.25, "y":0}, {"label":"+", "x":15.25, "y":0}, {"label":"~", "x":16.25, "y":0}, {"label":"|", "x":17.25, "y":0}, {"label":"Page Up", "x":0, "y":1}, {"label":"Tab", "x":1.25, "y":1, "w":1.5}, {"label":"Q", "x":2.75, "y":1}, {"label":"W", "x":3.75, "y":1}, {"label":"E", "x":4.75, "y":1}, {"label":"R", "x":5.75, "y":1}, {"label":"T", "x":6.75, "y":1}, {"label":"Y", "x":9.75, "y":1}, {"label":"U", "x":10.75, "y":1}, {"label":"I", "x":11.75, "y":1}, {"label":"O", "x":12.75, "y":1}, {"label":"P", "x":13.75, "y":1}, {"label":"{", "x":14.75, "y":1}, {"label":"}", "x":15.75, "y":1}, {"label":"Backspace", "x":16.75, "y":1, "w":1.5}, {"label":"Page Down", "x":0, "y":2}, {"label":"Caps Lock", "x":1.25, "y":2, "w":1.75}, {"label":"A", "x":3, "y":2}, {"label":"S", "x":4, "y":2}, {"label":"D", "x":5, "y":2}, {"label":"F", "x":6, "y":2}, {"label":"G", "x":7, "y":2}, {"label":"H", "x":10, "y":2}, {"label":"J", "x":11, "y":2}, {"label":"K", "x":12, "y":2}, {"label":"L", "x":13, "y":2}, {"label":":", "x":14, "y":2}, {"label":"\"", "x":15, "y":2}, {"label":"Enter", "x":16, "y":2, "w":2.25}, {"label":"Shift", "x":1.25, "y":3, "w":2.25}, {"label":"Z", "x":3.5, "y":3}, {"label":"X", "x":4.5, "y":3}, {"label":"C", "x":5.5, "y":3}, {"label":"V", "x":6.5, "y":3}, {"label":"B", "x":7.5, "y":3}, {"label":"B", "x":9.5, "y":3}, {"label":"N", "x":10.5, "y":3}, {"label":"M", "x":11.5, "y":3}, {"label":"<", "x":12.5, "y":3}, {"label":">", "x":13.5, "y":3}, {"label":"?", "x":14.5, "y":3}, {"label":"Shift", "x":15.5, "y":3, "w":1.75}, {"label":"Fn", "x":17.25, "y":3}, {"label":"Ctrl", "x":1.25, "y":4, "w":1.5}, {"label":"Win", "x":4.25, "y":4, "w":1.5}, {"x":5.75, "y":4, "w":2.25}, {"label":"Fn", "x":8, "y":4}, {"x":9.5, "y":4, "w":2.75}, {"label":"Alt", "x":12.25, "y":4, "w":1.5}, {"label":"Ctrl", "x":16.75, "y":4, "w":1.5}] + } + } +} diff --git a/keyboards/sck/osa/keymaps/all/config.h b/keyboards/sck/osa/keymaps/all/config.h new file mode 100644 index 000000000000..499a4753f4b1 --- /dev/null +++ b/keyboards/sck/osa/keymaps/all/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 jrfhoutx + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/sck/osa/keymaps/all/keymap.c b/keyboards/sck/osa/keymaps/all/keymap.c new file mode 100644 index 000000000000..378f8ed58f40 --- /dev/null +++ b/keyboards/sck/osa/keymaps/all/keymap.c @@ -0,0 +1,103 @@ +/* Copyright 2019 jrfhoutx + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +//enum custom_keycodes { +// QMKBEST = SAFE_RANGE, +// QMKURL +//}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap BASE: (Base Layer) Default Layer + * .----.,----------------------------------------------------------------------. + * | M1 ||Esc| 1 | 2| 3| 4| 5| 6| | 7| 8| 9| 0| -| =| ~ | \ | + * |----||----------------------------------------------------------------------| + * | M2 ||Tab | Q| W| E| R| T| | Y| U| I| O| P| [ | ] |BkSpc| + * |----||----------------------------------------------------------------------| + * | M3 ||Ctrl | A| S| D| F| G| | H| J| K| L| ;| '|Return | + * `----'|----------------------------------------------------------------------| + * |Shift | Z| X| C| V| B| | B| N| M| ,| .| /|Shift | Fn | + * |----------------------------------------------------------------------| + * |CAPS| | Alt | Space | Fn | | Space | Alt | | Ctrl| + * `----------------------------------------------------------------------' + */ +[0] = LAYOUT_all( /* OSA Base */ + KC_DEL, 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_GRV, KC_BSLS, + KC_PGUP, 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_PGDN, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_HOME, + KC_LCTL, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RCTL + ), +/* Keymap BASE: (Base Layer) Default Layer + * .----.,----------------------------------------------------------------------. + * | M1 ||Esc| 1 | 2| 3| 4| 5| 6| | 7| 8| 9| 0| -| =| ~ | \ | + * |----||----------------------------------------------------------------------| + * | M2 ||Tab | Q| UP| E| R| T| | Y| U| I| O| P| [ | ] |BkSpc| + * |----||----------------------------------------------------------------------| + * | M3 ||Ctrl |LFT| DN|RGHT| F| G| |LFT|DN| UP |RGHT| ;| '|Return | + * `----'|----------------------------------------------------------------------| + * |Shift | Z| X| C| V| B| | B| N| M| ,| .| /|Shift | Fn | + * |----------------------------------------------------------------------| + * |CAPS| | Alt | Space | Fn | | Space | Alt | | Ctrl| + * `----------------------------------------------------------------------' + */ +[1] = LAYOUT_all( /* OSA Layer 1 */ + KC_SLCK, 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_GRV, KC_BSLS, + KC_NLCK, KC_TAB, KC_Q, KC_UP, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, + KC_CLCK, KC_LCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_F, KC_G, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_HOME, + KC_LCTL, KC_LALT, KC_SPC, _______, KC_SPC, KC_RALT, KC_RCTL + ), +}; + + + + +//bool process_record_user(uint16_t keycode, keyrecord_t *record) { +// switch (keycode) { +// case QMKBEST: +// if (record->event.pressed) { +// // when keycode QMKBEST is pressed +// SEND_STRING("QMK is the best thing ever!"); +// } else { +// // when keycode QMKBEST is released +// } +// break; +// case QMKURL: +// if (record->event.pressed) { +// // when keycode QMKURL is pressed +// SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); +// } else { +// // when keycode QMKURL is released +// } +// break; +// } +// return true; +//} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/sck/osa/keymaps/all/readme.md b/keyboards/sck/osa/keymaps/all/readme.md new file mode 100644 index 000000000000..03a0b5463ef7 --- /dev/null +++ b/keyboards/sck/osa/keymaps/all/readme.md @@ -0,0 +1 @@ +# The split backspace and split right shift keymap for osa diff --git a/keyboards/sck/osa/keymaps/default/config.h b/keyboards/sck/osa/keymaps/default/config.h new file mode 100644 index 000000000000..499a4753f4b1 --- /dev/null +++ b/keyboards/sck/osa/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 jrfhoutx + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/sck/osa/keymaps/default/keymap.c b/keyboards/sck/osa/keymaps/default/keymap.c new file mode 100644 index 000000000000..d6cfddc46827 --- /dev/null +++ b/keyboards/sck/osa/keymaps/default/keymap.c @@ -0,0 +1,103 @@ +/* Copyright 2019 jrfhoutx + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +//enum custom_keycodes { +// QMKBEST = SAFE_RANGE, +// QMKURL +//}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap BASE: (Base Layer) Default Layer + * .----.,----------------------------------------------------------------------. + * | M1 || ~ | 1 | 2| 3| 4| 5| 6| | 7| 8| 9| 0| -| =|Backsp | + * |----||----------------------------------------------------------------------| + * | M2 ||Tab | Q| W| E| R| T| | Y| U| I| O| P| [ | ] | \ | + * |----||----------------------------------------------------------------------| + * | M3 ||Ctrl | A| S| D| F| G| | H| J| K| L| ;| '|Return | + * `----'|----------------------------------------------------------------------| + * |Shift | Z| X| C| V| B| | B| N| M| ,| .| /|Shift | + * |----------------------------------------------------------------------| + * |CAPS| | Alt | Space | Fn | | Space | Alt | | Ctrl| + * `----------------------------------------------------------------------' + */ + [0] = LAYOUT_default_ansi( /* Base */ + KC_DEL, 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_PGUP, 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_PGDN, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RCTL + ), +/* Keymap BASE: (Base Layer) Default Layer + * .--------.,----------------------------------------------------------------------. + * |RGB_TOG || ~ | 1 | 2| 3| 4| 5| 6| | 7| 8| 9| 0| -| =|Backsp | + * |--------||----------------------------------------------------------------------| + * |RGB_MOD ||Tab | Q| W| E| R| T| | Y| U| I| O| P| [ | ] | \ | + * |--------||----------------------------------------------------------------------| + * |RGB_RMOD||Ctrl | A| S| D| F| G| | H| J| K| L| ;| '|Return | + * `--------'|----------------------------------------------------------------------| + * |Shift | Z| X| C| V| B| | B| N| M| ,| .| /|Shift | + * |----------------------------------------------------------------------| + * |CAPS| | Alt | Space | Fn | | Space | Alt | | Ctrl| + * `----------------------------------------------------------------------' + */ + [1] = LAYOUT_default_ansi( /* OSA Layer 1 */ + RGB_TOG, RGB_M_T, RGB_VAI, RGB_VAD, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + RGB_MOD, 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, + RGB_RMOD, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LALT, KC_SPC, _______, KC_SPC, KC_RALT, KC_RCTL + ), +}; + + + + +//bool process_record_user(uint16_t keycode, keyrecord_t *record) { +// switch (keycode) { +// case QMKBEST: +// if (record->event.pressed) { +// // when keycode QMKBEST is pressed +// SEND_STRING("QMK is the best thing ever!"); +// } else { +// // when keycode QMKBEST is released +// } +// break; +// case QMKURL: +// if (record->event.pressed) { +// // when keycode QMKURL is pressed +// SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); +// } else { +// // when keycode QMKURL is released +// } +// break; +// } +// return true; +//} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +//void led_set_user(uint16_t usb_led) { +// +//} diff --git a/keyboards/sck/osa/keymaps/default/readme.md b/keyboards/sck/osa/keymaps/default/readme.md new file mode 100644 index 000000000000..982042494a5f --- /dev/null +++ b/keyboards/sck/osa/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default ANSI keymap for OSA diff --git a/keyboards/sck/osa/keymaps/ocm/config.h b/keyboards/sck/osa/keymaps/ocm/config.h new file mode 100644 index 000000000000..499a4753f4b1 --- /dev/null +++ b/keyboards/sck/osa/keymaps/ocm/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 jrfhoutx + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/sck/osa/keymaps/ocm/keymap.c b/keyboards/sck/osa/keymaps/ocm/keymap.c new file mode 100644 index 000000000000..cd48b57291f7 --- /dev/null +++ b/keyboards/sck/osa/keymaps/ocm/keymap.c @@ -0,0 +1,123 @@ +/* Copyright 2019 jrfhoutx + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +//enum custom_keycodes { +// QMKBEST = SAFE_RANGE, +// QMKURL +//}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap BASE: (Base Layer) Default Layer + * .----.,----------------------------------------------------------------------. + * | M1 ||Esc| 1 | 2| 3| 4| 5| 6| | 7| 8| 9| 0| -| =| ~ | \ | + * |----||----------------------------------------------------------------------| + * | M2 ||Tab | Q| W| E| R| T| | Y| U| I| O| P| [ | ] |BkSpc| + * |----||----------------------------------------------------------------------| + * | M3 ||Ctrl | A| S| D| F| G| | H| J| K| L| ;| '|Return | + * `----'|----------------------------------------------------------------------| + * |Shift | Z| X| C| V| B| | B| N| M| ,| .| /|Shift | Fn | + * |----------------------------------------------------------------------| + * |CAPS| | Alt | Space | Fn | | Space | Alt | | Ctrl| + * `----------------------------------------------------------------------' + */ +[0] = LAYOUT_all( /* OSA Base */ + KC_DEL, 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_GRV, KC_BSLS, + KC_PGUP, 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_PGDN, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_HOME, + KC_LCTL, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RCTL + ), +/* Keymap BASE: (Base Layer) Default Layer + * .----.,----------------------------------------------------------------------. + * | M1 ||Esc| 1 | 2| 3| 4| 5| 6| | 7| 8| 9| 0| -| =| ~ | \ | + * |----||----------------------------------------------------------------------| + * | M2 ||Tab | Q| W| E| R| T| | Y| U| I| O| P| [ | ] |BkSpc| + * |----||----------------------------------------------------------------------| + * | M3 ||Ctrl | A| S| D| F| G| | H| J| K| L| ;| '|Return | + * `----'|----------------------------------------------------------------------| + * |Shift | Z| X| C| V| B| | B| N| M| ,| .| /|Shift | Fn | + * |----------------------------------------------------------------------| + * |CAPS| | Alt | Space | Fn | | Space | Alt | | Ctrl| + * `----------------------------------------------------------------------' + */ +[1] = LAYOUT_all( /* OSA Layer 1 */ + KC_DEL, 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_GRV, KC_BSLS, + KC_PGUP, 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_PGDN, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_HOME, + KC_LCTL, KC_LALT, KC_SPC, MO(2), KC_SPC, KC_RALT, KC_RCTL + ), +/* Keymap BASE: (Base Layer) Default Layer + * .----.,----------------------------------------------------------------------. + * | M1 ||Esc| 1 | 2| 3| 4| 5| 6| | 7| 8| 9| 0| -| =| ~ | \ | + * |----||----------------------------------------------------------------------| + * | M2 ||Tab | Q| W| E| R| T| | Y| U| I| O| P| [ | ] |BkSpc| + * |----||----------------------------------------------------------------------| + * | M3 ||Ctrl | A| S| D| F| G| | H| J| K| L| ;| '|Return | + * `----'|----------------------------------------------------------------------| + * |Shift | Z| X| C| V| B| | B| N| M| ,| .| /|Shift | Fn | + * |----------------------------------------------------------------------| + * |CAPS| | Alt | Space | Fn | | Space | Alt | | Ctrl| + * `----------------------------------------------------------------------' + */ +[2] = LAYOUT_all( /* OSA Layer 2 */ + KC_DEL, 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_GRV, KC_BSLS, + KC_PGUP, 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_PGDN, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_HOME, + KC_LCTL, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RCTL + ), +}; + + + + +//bool process_record_user(uint16_t keycode, keyrecord_t *record) { +// switch (keycode) { +// case QMKBEST: +// if (record->event.pressed) { +// // when keycode QMKBEST is pressed +// SEND_STRING("QMK is the best thing ever!"); +// } else { +// // when keycode QMKBEST is released +// } +// break; +// case QMKURL: +// if (record->event.pressed) { +// // when keycode QMKURL is pressed +// SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); +// } else { +// // when keycode QMKURL is released +// } +// break; +// } +// return true; +//} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/sck/osa/keymaps/ocm/readme.md b/keyboards/sck/osa/keymaps/ocm/readme.md new file mode 100644 index 000000000000..3624b1078ea7 --- /dev/null +++ b/keyboards/sck/osa/keymaps/ocm/readme.md @@ -0,0 +1 @@ +# OneCreativeMind's keymap for OSA diff --git a/keyboards/sck/osa/keymaps/splitbs/config.h b/keyboards/sck/osa/keymaps/splitbs/config.h new file mode 100644 index 000000000000..499a4753f4b1 --- /dev/null +++ b/keyboards/sck/osa/keymaps/splitbs/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 jrfhoutx + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/sck/osa/keymaps/splitbs/keymap.c b/keyboards/sck/osa/keymaps/splitbs/keymap.c new file mode 100644 index 000000000000..528e45329b78 --- /dev/null +++ b/keyboards/sck/osa/keymaps/splitbs/keymap.c @@ -0,0 +1,103 @@ +/* Copyright 2019 jrfhoutx + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +//enum custom_keycodes { +// QMKBEST = SAFE_RANGE, +// QMKURL +//}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap BASE: (Base Layer) Default Layer + * .----.,----------------------------------------------------------------------. + * | M1 ||Esc| 1 | 2| 3| 4| 5| 6| | 7| 8| 9| 0| -| =| ~ | \ | + * |----||----------------------------------------------------------------------| + * | M2 ||Tab | Q| W| E| R| T| | Y| U| I| O| P| [ | ] |BkSpc| + * |----||----------------------------------------------------------------------| + * | M3 ||Ctrl | A| S| D| F| G| | H| J| K| L| ;| '|Return | + * `----'|----------------------------------------------------------------------| + * |Shift | Z| X| C| V| B| | B| N| M| ,| .| /|Shift | + * |----------------------------------------------------------------------| + * |CAPS| | Alt | Space | Fn | | Space | Alt | | Ctrl| + * `----------------------------------------------------------------------' + */ +[0] = LAYOUT_split_backspace( /* OSA Base */ + KC_DEL, 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_GRV, KC_BSLS, + KC_PGUP, 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_PGDN, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RCTL + ), +/* Keymap BASE: (Base Layer) Default Layer + * .----.,----------------------------------------------------------------------. + * | M1 ||Esc| 1 | 2| 3| 4| 5| 6| | 7| 8| 9| 0| -| =| ~ | \ | + * |----||----------------------------------------------------------------------| + * | M2 ||Tab | Q| W| E| R| T| | Y| U| I| O| P| [ | ] |BkSpc| + * |----||----------------------------------------------------------------------| + * | M3 ||Ctrl | A| S| D| F| G| | H| J| K| L| ;| '|Return | + * `----'|----------------------------------------------------------------------| + * |Shift | Z| X| C| V| B| | B| N| M| ,| .| /|Shift | + * |----------------------------------------------------------------------| + * |CAPS| | Alt | Space | Fn | | Space | Alt | | Ctrl| + * `----------------------------------------------------------------------' + */ +[1] = LAYOUT_split_backspace( /* OSA Layer 1 */ + KC_DEL, 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_GRV, KC_BSLS, + KC_PGUP, 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_PGDN, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LALT, KC_SPC, _______, KC_SPC, KC_RALT, KC_RCTL + ), +}; + + + + +//bool process_record_user(uint16_t keycode, keyrecord_t *record) { +// switch (keycode) { +// case QMKBEST: +// if (record->event.pressed) { +// // when keycode QMKBEST is pressed +// SEND_STRING("QMK is the best thing ever!"); +// } else { +// // when keycode QMKBEST is released +// } +// break; +// case QMKURL: +// if (record->event.pressed) { +// // when keycode QMKURL is pressed +// SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); +// } else { +// // when keycode QMKURL is released +// } +// break; +// } +// return true; +//} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/sck/osa/keymaps/splitbs/readme.md b/keyboards/sck/osa/keymaps/splitbs/readme.md new file mode 100644 index 000000000000..33fb31b336fe --- /dev/null +++ b/keyboards/sck/osa/keymaps/splitbs/readme.md @@ -0,0 +1 @@ +# The split backspace keymap for osa diff --git a/keyboards/sck/osa/keymaps/splitrs/config.h b/keyboards/sck/osa/keymaps/splitrs/config.h new file mode 100644 index 000000000000..499a4753f4b1 --- /dev/null +++ b/keyboards/sck/osa/keymaps/splitrs/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 jrfhoutx + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/sck/osa/keymaps/splitrs/keymap.c b/keyboards/sck/osa/keymaps/splitrs/keymap.c new file mode 100644 index 000000000000..a59b66334e3f --- /dev/null +++ b/keyboards/sck/osa/keymaps/splitrs/keymap.c @@ -0,0 +1,103 @@ +/* Copyright 2019 jrfhoutx + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +//enum custom_keycodes { +// QMKBEST = SAFE_RANGE, +// QMKURL +//}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap BASE: (Base Layer) Default Layer + * .----.,----------------------------------------------------------------------. + * | M1 || ~ | 1 | 2| 3| 4| 5| 6| | 7| 8| 9| 0| -| =|Backsp | + * |----||----------------------------------------------------------------------| + * | M2 ||Tab | Q| W| E| R| T| | Y| U| I| O| P| [ | ] | \ | + * |----||----------------------------------------------------------------------| + * | M3 ||Ctrl | A| S| D| F| G| | H| J| K| L| ;| '|Return | + * `----'|----------------------------------------------------------------------| + * |Shift | Z| X| C| V| B| | B| N| M| ,| .| /|Shift | Fn | + * |----------------------------------------------------------------------| + * |CAPS| | Alt | Space | Fn | | Space | Alt | | Ctrl| + * `----------------------------------------------------------------------' + */ +[0] = LAYOUT_split_right_shift( /* OSA Base */ + KC_DEL, 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_PGUP, 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_PGDN, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_HOME, + KC_LCTL, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RCTL + ), +/* Keymap BASE: (Base Layer) Default Layer + * .----.,----------------------------------------------------------------------. + * | M1 || ~ | 1 | 2| 3| 4| 5| 6| | 7| 8| 9| 0| -| =|Backsp | + * |----||----------------------------------------------------------------------| + * | M2 ||Tab | Q| W| E| R| T| | Y| U| I| O| P| [ | ] | \ | + * |----||----------------------------------------------------------------------| + * | M3 ||Ctrl | A| S| D| F| G| | H| J| K| L| ;| '|Return | + * `----'|----------------------------------------------------------------------| + * |Shift | Z| X| C| V| B| | B| N| M| ,| .| /|Shift | Fn | + * |----------------------------------------------------------------------| + * |CAPS| | Alt | Space | Fn | | Space | Alt | | Ctrl| + * `----------------------------------------------------------------------' + */ +[1] = LAYOUT_split_right_shift( /* OSA Layer 1 */ + KC_DEL, 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_PGUP, 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_PGDN, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_HOME, + KC_LCTL, KC_LALT, KC_SPC, _______, KC_SPC, KC_RALT, KC_RCTL + ), +}; + + + + +//bool process_record_user(uint16_t keycode, keyrecord_t *record) { +// switch (keycode) { +// case QMKBEST: +// if (record->event.pressed) { +// // when keycode QMKBEST is pressed +// SEND_STRING("QMK is the best thing ever!"); +// } else { +// // when keycode QMKBEST is released +// } +// break; +// case QMKURL: +// if (record->event.pressed) { +// // when keycode QMKURL is pressed +// SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); +// } else { +// // when keycode QMKURL is released +// } +// break; +// } +// return true; +//} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/sck/osa/keymaps/splitrs/readme.md b/keyboards/sck/osa/keymaps/splitrs/readme.md new file mode 100644 index 000000000000..9f2315c2a29a --- /dev/null +++ b/keyboards/sck/osa/keymaps/splitrs/readme.md @@ -0,0 +1 @@ +# The split right shift keymap for osa diff --git a/keyboards/sck/osa/osa.c b/keyboards/sck/osa/osa.c new file mode 100644 index 000000000000..138a28893b89 --- /dev/null +++ b/keyboards/sck/osa/osa.c @@ -0,0 +1,73 @@ +/* Copyright 2019 jrfhoutx + * + * 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 . + */ +#include "osa.h" + + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* + +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 matrix_init_board(void){ + setPinOutput(C7); + setPinOutput(C6); + setPinOutput(B6); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { + writePinHigh(C7); + } else { + writePinLow(C7); + } + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinHigh(C6); + } else { + writePinLow(C6); + } + if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { + writePinHigh(B6); + } else { + writePinLow(B6); + } + led_set_user(usb_led); +} + diff --git a/keyboards/sck/osa/osa.h b/keyboards/sck/osa/osa.h new file mode 100644 index 000000000000..46cb3cd85fd5 --- /dev/null +++ b/keyboards/sck/osa/osa.h @@ -0,0 +1,117 @@ +/* Copyright 2019 jrfhoutx + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ + +/* LAYOUT + * ┌───┐ ┌───┬───┬───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┬───┬───┬───┐┌────────┐ + * │10 │ │00 │01 │02 │03 │04 │05 │06 │ │56 │55 │54 │53 │52 │51 │50 │57 ││57 │ + * ├───┤ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┘ ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤└────────┘ + * │20 │ │11 │12 │13 │14 │15 │16 │ │66 │65 │64 │63 │62 │61 │60 │67 │ + * ├───┤ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ └┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │30 │ │21 │22 │23 │24 │25 │26 │ │76 │75 │74 │73 │72 │71 │77 │ + * └───┘ ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┐ ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤┌──────────┐ + * │31 │32 │33 │34 │35 │36 │ │86 │85 │84 │83 │82 │81 │80 │87 ││87 │ + * ├─────┬──┴──┬┴───┴┬──┴───┴┬──┴─┐ ├───┴───┴──┬┴───┴┬──┴───┴────┬─┴───┤└──────────┘ + * │41 │ │43 │45 │46 │ │95 │93 │ │90 │ + * └─────┘ └─────┴───────┴────┘ └──────────┴─────┘ └─────┘ + */ +#define LAYOUT_default_ansi( \ + K10, K00, K01, K02, K03, K04, K05, K06, K56, K55, K54, K53, K52, K51, K57, \ + K20, K11, K12, K13, K14, K15, K16, K66, K65, K64, K63, K62, K61, K60, K67, \ + K30, K21, K22, K23, K24, K25, K26, K76, K75, K74, K73, K72, K71, K77, \ + K31, K32, K33, K34, K35, K36, K86, K85, K84, K83, K82, K81, K87, \ + K41, K43, K45, K46, K95, K93, K90 \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, KC_NO }, \ + { K10, K11, K12, K13, K14, K15, K16, KC_NO }, \ + { K20, K21, K22, K23, K24, K25, K26, KC_NO }, \ + { K30, K31, K32, K33, K34, K35, K36, KC_NO }, \ + { KC_NO, K41, KC_NO, K43, KC_NO, K45, K46, KC_NO }, \ + { KC_NO, K51, K52, K53, K54, K55, K56, K57 }, \ + { K60, K61, K62, K63, K64, K65, K66, K67 }, \ + { KC_NO, K71, K72, K73, K74, K75, K76, K77 }, \ + { KC_NO, K81, K82, K83, K84, K85, K86, K87 }, \ + { K90, KC_NO, KC_NO, K93, KC_NO, K95, KC_NO, KC_NO } \ +} +#define LAYOUT_split_backspace( \ + K10, K00, K01, K02, K03, K04, K05, K06, K56, K55, K54, K53, K52, K51, K50, K57, \ + K20, K11, K12, K13, K14, K15, K16, K66, K65, K64, K63, K62, K61, K60, K67, \ + K30, K21, K22, K23, K24, K25, K26, K76, K75, K74, K73, K72, K71, K77, \ + K31, K32, K33, K34, K35, K36, K86, K85, K84, K83, K82, K81, K87, \ + K41, K43, K45, K46, K95, K93, K90 \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, KC_NO }, \ + { K10, K11, K12, K13, K14, K15, K16, KC_NO }, \ + { K20, K21, K22, K23, K24, K25, K26, KC_NO }, \ + { K30, K31, K32, K33, K34, K35, K36, KC_NO }, \ + { KC_NO, K41, KC_NO, K43, KC_NO, K45, K46, KC_NO }, \ + { K50, K51, K52, K53, K54, K55, K56, K57 }, \ + { K60, K61, K62, K63, K64, K65, K66, K67 }, \ + { KC_NO, K71, K72, K73, K74, K75, K76, K77 }, \ + { KC_NO, K81, K82, K83, K84, K85, K86, K87 }, \ + { K90, KC_NO, KC_NO, K93, KC_NO, K95, KC_NO, KC_NO } \ +} +#define LAYOUT_split_right_shift( \ + K10, K00, K01, K02, K03, K04, K05, K06, K56, K55, K54, K53, K52, K51, K57, \ + K20, K11, K12, K13, K14, K15, K16, K66, K65, K64, K63, K62, K61, K60, K67, \ + K30, K21, K22, K23, K24, K25, K26, K76, K75, K74, K73, K72, K71, K77, \ + K31, K32, K33, K34, K35, K36, K86, K85, K84, K83, K82, K81, K80, K87, \ + K41, K43, K45, K46, K95, K93, K90 \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, KC_NO }, \ + { K10, K11, K12, K13, K14, K15, K16, KC_NO }, \ + { K20, K21, K22, K23, K24, K25, K26, KC_NO }, \ + { K30, K31, K32, K33, K34, K35, K36, KC_NO }, \ + { KC_NO, K41, KC_NO, K43, KC_NO, K45, K46, KC_NO }, \ + { KC_NO, K51, K52, K53, K54, K55, K56, K57 }, \ + { K60, K61, K62, K63, K64, K65, K66, K67 }, \ + { KC_NO, K71, K72, K73, K74, K75, K76, K77 }, \ + { K80, K81, K82, K83, K84, K85, K86, K87 }, \ + { K90, KC_NO, KC_NO, K93, KC_NO, K95, KC_NO, KC_NO } \ +} +#define LAYOUT_all( \ + K10, K00, K01, K02, K03, K04, K05, K06, K56, K55, K54, K53, K52, K51, K50, K57, \ + K20, K11, K12, K13, K14, K15, K16, K66, K65, K64, K63, K62, K61, K60, K67, \ + K30, K21, K22, K23, K24, K25, K26, K76, K75, K74, K73, K72, K71, K77, \ + K31, K32, K33, K34, K35, K36, K86, K85, K84, K83, K82, K81, K80, K87, \ + K41, K43, K45, K46, K95, K93, K90 \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, KC_NO }, \ + { K10, K11, K12, K13, K14, K15, K16, KC_NO }, \ + { K20, K21, K22, K23, K24, K25, K26, KC_NO }, \ + { K30, K31, K32, K33, K34, K35, K36, KC_NO }, \ + { KC_NO, K41, KC_NO, K43, KC_NO, K45, K46, KC_NO }, \ + { K50, K51, K52, K53, K54, K55, K56, K57 }, \ + { K60, K61, K62, K63, K64, K65, K66, K67 }, \ + { KC_NO, K71, K72, K73, K74, K75, K76, K77 }, \ + { K80, K81, K82, K83, K84, K85, K86, K87 }, \ + { K90, KC_NO, KC_NO, K93, KC_NO, K95, KC_NO, KC_NO } \ +} diff --git a/keyboards/sck/osa/readme.md b/keyboards/sck/osa/readme.md new file mode 100644 index 000000000000..024df5cee6bf --- /dev/null +++ b/keyboards/sck/osa/readme.md @@ -0,0 +1,19 @@ +# osa + +![osa](https://i.imgur.com/U2x7TQ8.jpg) + +About the OSA: + +The OSA was run as a private group buy of 20 units. It is an Alice layout keyboard based on the Open Source Alice files, altered by BlindAssassin111 based on input from the private group buy members. +All case and other design files have been either reworked or created from scratch by BlindAssassin111. PCB was designed from scratch by BlindAssassin111. +The OSA PCB is an ATMega32u4 powered, USB Type C, Alice compatible PCB and was created specifically for the OSA case, but with considerations to make it compatible with the Lubrigante acrylic cases (except for the Type C connector it should also be compatible with original TGR Alice cases). + +Keyboard Maintainer: [jrfhoutx](/~https://github.com/jrfhoutx) +Hardware Supported: OSA PCB by BlindAssassin111, ATMEGA32u4 +Hardware Availability: Currently unavailable outside of the private group buy + +Make example for this keyboard (after setting up your build environment): + + make sck/osa:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/sck/osa/rules.mk b/keyboards/sck/osa/rules.mk new file mode 100644 index 000000000000..3538c25babd2 --- /dev/null +++ b/keyboards/sck/osa/rules.mk @@ -0,0 +1,37 @@ +# MCU name +MCU = atmega32u4 + + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # 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 +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) From e8b65d01709c2ebdf50c0aa95963d200fa4fa4c6 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Sun, 6 Oct 2019 05:09:35 +1100 Subject: [PATCH 034/316] Cleanup rules.mk for 32U4 keyboards, A-F (#6804) * Cleanup rules.mk for 32U4 keyboards, A-F * Put back stuff in VIA keymaps --- .../abstract/ellipse/keymaps/default/rules.mk | 0 keyboards/abstract/ellipse/rev1/rules.mk | 51 +- keyboards/acr60/rules.mk | 50 +- keyboards/adkb96/rules.mk | 58 +- keyboards/aeboards/aegis/keymaps/via/rules.mk | 4 +- keyboards/aeboards/aegis/rules.mk | 53 +- keyboards/aeboards/ext65/keymaps/via/rules.mk | 4 +- keyboards/aeboards/ext65/rules.mk | 53 +- keyboards/ai03/lunar/rules.mk | 51 +- keyboards/ai03/orbit/rules.mk | 63 +- keyboards/ai03/quasar/rules.mk | 51 +- keyboards/ai03/soyuz/rules.mk | 51 +- keyboards/akb/eb46/rules.mk | 51 +- keyboards/akb/raine/rules.mk | 51 +- keyboards/al1/rules.mk | 54 +- keyboards/alf/dc60/rules.mk | 54 +- keyboards/alf/x11/rules.mk | 51 +- keyboards/alf/x2/rules.mk | 50 +- keyboards/alpha/keymaps/vderm/alpha_vderm.hex | 1422 ----------------- keyboards/alpha/rules.mk | 46 +- keyboards/alu84/rules.mk | 50 +- keyboards/amj40/rules.mk | 54 +- keyboards/amj60/rules.mk | 54 +- keyboards/amj96/rules.mk | 54 +- keyboards/amjkeyboard/amj66/rules.mk | 41 +- keyboards/amjpad/rules.mk | 54 +- keyboards/angel17/rules.mk | 15 +- keyboards/angel64/rules.mk | 51 +- keyboards/at101_blackheart/rules.mk | 49 +- keyboards/atomic/rules.mk | 52 +- keyboards/atreus/astar/rules.mk | 50 +- keyboards/atreus/teensy2/rules.mk | 50 +- keyboards/atreus62/rules.mk | 47 +- keyboards/baguette/rules.mk | 51 +- keyboards/bantam44/rules.mk | 54 +- keyboards/bigswitch/rules.mk | 49 +- keyboards/blockey/rules.mk | 54 +- keyboards/bm16a/rules.mk | 51 +- keyboards/bm16s/rules.mk | 50 +- keyboards/boardwalk/rules.mk | 50 +- keyboards/bpiphany/sixshooter/rules.mk | 49 +- keyboards/bthlabs/geekpad/rules.mk | 51 +- keyboards/business_card/alpha/rules.mk | 51 +- keyboards/business_card/beta/rules.mk | 51 +- keyboards/business_card/rules.mk | 51 +- .../butterstick/keymaps/default/rules.mk | 0 keyboards/butterstick/rules.mk | 20 +- keyboards/c39/rules.mk | 53 +- keyboards/catch22/rules.mk | 50 +- keyboards/chimera_ergo/rules.mk | 74 +- keyboards/chimera_ls/rules.mk | 73 +- keyboards/chimera_ortho/rules.mk | 64 +- keyboards/choco60/rules.mk | 51 +- .../christmas_tree/keymaps/default/rules.mk | 0 keyboards/christmas_tree/rules.mk | 52 +- keyboards/ckeys/handwire_101/rules.mk | 52 +- keyboards/ckeys/nakey/rules.mk | 54 +- keyboards/ckeys/obelus/rules.mk | 54 +- keyboards/claw44/rules.mk | 60 +- keyboards/clueboard/17/rules.mk | 54 +- keyboards/clueboard/66/rev1/rules.mk | 19 +- keyboards/clueboard/66/rev2/rules.mk | 18 +- keyboards/clueboard/66/rev3/rules.mk | 19 +- .../clueboard/66_hotswap/prototype/rules.mk | 21 +- keyboards/clueboard/card/rules.mk | 16 +- keyboards/cocoa40/keymaps/default/rules.mk | 1 - keyboards/cocoa40/rules.mk | 51 +- keyboards/comet46/rules.mk | 57 +- keyboards/contra/rules.mk | 48 +- keyboards/converter/adb_usb/rules.mk | 59 +- keyboards/converter/hp_46010a/rules.mk | 47 +- keyboards/converter/ibm_5291/rules.mk | 47 +- keyboards/converter/ibm_terminal/rules.mk | 51 +- keyboards/converter/m0110_usb/rules.mk | 58 +- .../converter/numeric_keypad_IIe/rules.mk | 47 +- keyboards/converter/palm_usb/rules.mk | 17 +- keyboards/converter/sun_usb/rules.mk | 17 +- keyboards/converter/usb_usb/rules.mk | 57 +- keyboards/converter/xt_usb/rules.mk | 48 +- .../copenhagen_click/click_pad_v1/rules.mk | 14 +- keyboards/coseyfannitutti/discipad/rules.mk | 7 + keyboards/coseyfannitutti/mullet/rules.mk | 51 +- keyboards/coseyfannitutti/mulletpad/rules.mk | 51 +- keyboards/cospad/rules.mk | 51 +- keyboards/crawlpad/rules.mk | 48 +- keyboards/crkbd/rules.mk | 60 +- keyboards/cu24/rules.mk | 54 +- keyboards/cu75/rules.mk | 51 +- keyboards/daisy/rules.mk | 53 +- keyboards/dc01/arrow/rules.mk | 59 +- keyboards/dc01/left/rules.mk | 59 +- keyboards/dc01/numpad/rules.mk | 59 +- keyboards/dc01/right/rules.mk | 59 +- keyboards/deltasplit75/rules.mk | 56 +- keyboards/dichotomy/rules.mk | 66 +- keyboards/diverge3/rules.mk | 54 +- keyboards/divergetm2/keymaps/default/rules.mk | 0 keyboards/divergetm2/rules.mk | 57 +- keyboards/dk60/rules.mk | 16 +- keyboards/do60/rules.mk | 57 +- keyboards/doro67/multi/rules.mk | 6 +- keyboards/doro67/regular/rules.mk | 5 +- keyboards/doro67/rgb/rules.mk | 56 +- keyboards/dozen0/rules.mk | 51 +- keyboards/dp60/keymaps/via/rules.mk | 3 +- keyboards/dp60/rules.mk | 20 +- keyboards/duck/eagle_viper/v2/rules.mk | 54 +- keyboards/duck/jetfire/rules.mk | 54 +- keyboards/duck/lightsaver/rules.mk | 54 +- keyboards/duck/octagon/v1/rules.mk | 54 +- keyboards/duck/octagon/v2/rules.mk | 54 +- keyboards/dumbpad/rules.mk | 51 +- keyboards/dz60/keymaps/LEdiodes/rules.mk | 45 +- keyboards/dz60/rules.mk | 45 +- keyboards/eco/rules.mk | 47 +- keyboards/emptystring/NQG/rules.mk | 53 +- keyboards/ep/40/rules.mk | 51 +- keyboards/ep/96/rules.mk | 51 +- keyboards/ep/comsn/hs68/rules.mk | 51 +- keyboards/ep/comsn/mollydooker/rules.mk | 51 +- keyboards/ep/comsn/tf_longeboye/rules.mk | 51 +- keyboards/ergo42/rules.mk | 51 +- keyboards/ergodash/rules.mk | 23 +- keyboards/ergodone/rules.mk | 80 +- keyboards/ergodox_ez/rules.mk | 72 +- keyboards/ergoinu/rules.mk | 50 +- keyboards/ergotaco/keymaps/default/rules.mk | 6 - keyboards/ergotaco/rules.mk | 20 +- keyboards/ergotravel/keymaps/default/rules.mk | 0 keyboards/ergotravel/rules.mk | 47 +- keyboards/espectro/rules.mk | 51 +- keyboards/evil80/rules.mk | 52 +- keyboards/exclusive/e65/rules.mk | 7 + keyboards/exclusive/e6_rgb/rules.mk | 54 +- keyboards/exclusive/e6v2/le/rules.mk | 54 +- keyboards/exclusive/e6v2/oe/rules.mk | 54 +- keyboards/exclusive/e7v1/rules.mk | 42 +- keyboards/fc660c/rules.mk | 53 +- keyboards/fc980c/rules.mk | 54 +- keyboards/felix/rules.mk | 40 +- keyboards/fleuron/rules.mk | 54 +- keyboards/fortitude60/rules.mk | 54 +- keyboards/four_banger/rules.mk | 50 +- keyboards/foxlab/leaf60/hotswap/rules.mk | 51 +- keyboards/foxlab/leaf60/universal/rules.mk | 51 +- keyboards/fractal/rules.mk | 46 +- keyboards/freyr/rules.mk | 15 +- 147 files changed, 1019 insertions(+), 6911 deletions(-) delete mode 100644 keyboards/abstract/ellipse/keymaps/default/rules.mk delete mode 100644 keyboards/alpha/keymaps/vderm/alpha_vderm.hex delete mode 100644 keyboards/butterstick/keymaps/default/rules.mk delete mode 100644 keyboards/christmas_tree/keymaps/default/rules.mk delete mode 100644 keyboards/cocoa40/keymaps/default/rules.mk delete mode 100644 keyboards/divergetm2/keymaps/default/rules.mk delete mode 100644 keyboards/ergotravel/keymaps/default/rules.mk diff --git a/keyboards/abstract/ellipse/keymaps/default/rules.mk b/keyboards/abstract/ellipse/keymaps/default/rules.mk deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/keyboards/abstract/ellipse/rev1/rules.mk b/keyboards/abstract/ellipse/rev1/rules.mk index 880d40e49be1..6c7f5fea32a2 100644 --- a/keyboards/abstract/ellipse/rev1/rules.mk +++ b/keyboards/abstract/ellipse/rev1/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/acr60/rules.mk b/keyboards/acr60/rules.mk index 9c4082da29f4..1e6d4bb7cdff 100644 --- a/keyboards/acr60/rules.mk +++ b/keyboards/acr60/rules.mk @@ -1,45 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. @@ -53,4 +23,4 @@ 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 +RGBLIGHT_ENABLE = yes diff --git a/keyboards/adkb96/rules.mk b/keyboards/adkb96/rules.mk index 707fafd7caf2..cb4ce2dd7b0d 100644 --- a/keyboards/adkb96/rules.mk +++ b/keyboards/adkb96/rules.mk @@ -1,58 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection - # Teensy halfkay - # Pro Micro caterina - # Atmel DFU atmel-dfu - # LUFA DFU lufa-dfu - # QMK DFU qmk-dfu - # atmega32a bootloadHID +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# 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 # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically diff --git a/keyboards/aeboards/aegis/keymaps/via/rules.mk b/keyboards/aeboards/aegis/keymaps/via/rules.mk index f072c67198c2..70258b9ead63 100644 --- a/keyboards/aeboards/aegis/keymaps/via/rules.mk +++ b/keyboards/aeboards/aegis/keymaps/via/rules.mk @@ -1,6 +1,6 @@ # project specific files SRC = keyboards/wilba_tech/wt_main.c - + # MCU name MCU = atmega32u4 @@ -65,4 +65,4 @@ AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file +DYNAMIC_KEYMAP_ENABLE = yes diff --git a/keyboards/aeboards/aegis/rules.mk b/keyboards/aeboards/aegis/rules.mk index f1c632289cca..602da8678656 100644 --- a/keyboards/aeboards/aegis/rules.mk +++ b/keyboards/aeboards/aegis/rules.mk @@ -1,50 +1,16 @@ -# project specific files -SRC = keyboards/wilba_tech/wt_main.c - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - # Build Options # change yes to no to disable # @@ -63,3 +29,6 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches + +# project specific files +SRC = keyboards/wilba_tech/wt_main.c diff --git a/keyboards/aeboards/ext65/keymaps/via/rules.mk b/keyboards/aeboards/ext65/keymaps/via/rules.mk index f072c67198c2..70258b9ead63 100644 --- a/keyboards/aeboards/ext65/keymaps/via/rules.mk +++ b/keyboards/aeboards/ext65/keymaps/via/rules.mk @@ -1,6 +1,6 @@ # project specific files SRC = keyboards/wilba_tech/wt_main.c - + # MCU name MCU = atmega32u4 @@ -65,4 +65,4 @@ AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file +DYNAMIC_KEYMAP_ENABLE = yes diff --git a/keyboards/aeboards/ext65/rules.mk b/keyboards/aeboards/ext65/rules.mk index f1c632289cca..bac979ad0c2a 100644 --- a/keyboards/aeboards/ext65/rules.mk +++ b/keyboards/aeboards/ext65/rules.mk @@ -1,50 +1,16 @@ -# project specific files -SRC = keyboards/wilba_tech/wt_main.c - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - # Build Options # change yes to no to disable # @@ -63,3 +29,6 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches + +# project specific files +SRC += keyboards/wilba_tech/wt_main.c diff --git a/keyboards/ai03/lunar/rules.mk b/keyboards/ai03/lunar/rules.mk index 6bb6d9ae9a80..dd3d71baa97b 100644 --- a/keyboards/ai03/lunar/rules.mk +++ b/keyboards/ai03/lunar/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/ai03/orbit/rules.mk b/keyboards/ai03/orbit/rules.mk index e225ad037cf0..758a73cd2af5 100644 --- a/keyboards/ai03/orbit/rules.mk +++ b/keyboards/ai03/orbit/rules.mk @@ -1,69 +1,16 @@ -SRC += split_util.c \ - split_flags.c \ - serial.c \ - transport.c \ - matrix.c - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # @@ -88,4 +35,8 @@ USE_I2C = no # I2C for split communication CUSTOM_MATRIX = yes # For providing custom matrix.c (in this case, override regular matrix.c with split matrix.c) # SPLIT_KEYBOARD = yes # Split keyboard flag disabled as manual edits had to be done to the split common files - +SRC += split_util.c \ + split_flags.c \ + serial.c \ + transport.c \ + matrix.c diff --git a/keyboards/ai03/quasar/rules.mk b/keyboards/ai03/quasar/rules.mk index afbd1de1479d..6b6784779109 100644 --- a/keyboards/ai03/quasar/rules.mk +++ b/keyboards/ai03/quasar/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/ai03/soyuz/rules.mk b/keyboards/ai03/soyuz/rules.mk index 5df789e58187..f092cb35beee 100644 --- a/keyboards/ai03/soyuz/rules.mk +++ b/keyboards/ai03/soyuz/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/akb/eb46/rules.mk b/keyboards/akb/eb46/rules.mk index 195c9e50236c..5360459cf709 100644 --- a/keyboards/akb/eb46/rules.mk +++ b/keyboards/akb/eb46/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/akb/raine/rules.mk b/keyboards/akb/raine/rules.mk index 195c9e50236c..5360459cf709 100644 --- a/keyboards/akb/raine/rules.mk +++ b/keyboards/akb/raine/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/al1/rules.mk b/keyboards/al1/rules.mk index 6ae59c149636..175adfd5d7bd 100644 --- a/keyboards/al1/rules.mk +++ b/keyboards/al1/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable diff --git a/keyboards/alf/dc60/rules.mk b/keyboards/alf/dc60/rules.mk index 0e8f52e2b69b..8df6c4c7c5be 100644 --- a/keyboards/alf/dc60/rules.mk +++ b/keyboards/alf/dc60/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable diff --git a/keyboards/alf/x11/rules.mk b/keyboards/alf/x11/rules.mk index d19b7c1baa26..3439ac47f3be 100644 --- a/keyboards/alf/x11/rules.mk +++ b/keyboards/alf/x11/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/alf/x2/rules.mk b/keyboards/alf/x2/rules.mk index 9c4082da29f4..1e6d4bb7cdff 100644 --- a/keyboards/alf/x2/rules.mk +++ b/keyboards/alf/x2/rules.mk @@ -1,45 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. @@ -53,4 +23,4 @@ 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 +RGBLIGHT_ENABLE = yes diff --git a/keyboards/alpha/keymaps/vderm/alpha_vderm.hex b/keyboards/alpha/keymaps/vderm/alpha_vderm.hex deleted file mode 100644 index 7515ad030511..000000000000 --- a/keyboards/alpha/keymaps/vderm/alpha_vderm.hex +++ /dev/null @@ -1,1422 +0,0 @@ -:100000000C949F020C94E6020C94E6020C94E60217 -:100010000C94E6020C94E6020C94E6020C94E602C0 -:100020000C94E6020C94E6020C94E0250C94B226A3 -:100030000C940D1D0C94E6020C94E6020C94E6025E -:100040000C94E6020C94E6020C94E6020C94E60290 -:100050000C94E6020C94751D0C94E6020C94E602D6 -:100060000C94E6020C94E6020C94E6020C94E60270 -:100070000C94E6020C94E6020C94E6020C94E60260 -:100080000C94E6020C94E6020C94E6020C94E60250 -:100090000C94E6020C94E6020C94E6020C94E60240 -:1000A0000C94E6020C94E6020C94E602AE03B00354 -:1000B000BB03B203B403B603B803BA03BD03BF0363 -:1000C000C103CC03C303C503C703C903CB03CE03DA -:1000D000181318134A134A138813A6130C150C157A -:1000E000E8130C158B148B14FC140C150C1505154A -:1000F00098149814981498149814981498149814A0 -:10010000981498149814981498149814981498148F -:10011000A914B714BE14C514CF149D159D15AF15A1 -:10012000AF15A615AF15AF15AF159D159D15AB15E0 -:10013000AF15AF15AB151F2746273E2846273E288B -:100140009227B5273E280C281B2807634236B79B09 -:10015000D8A71A39685618AEBAAB558C1D3CB7CC27 -:100160005763BD6DEDFD753EF6177231BF0000009F -:10017000803F05A84CCDB2D44EB93836A9020C50F8 -:10018000B9918688083CA6AAAA2ABE000000803F32 -:1001900014001A000800150017001C0018000C00BD -:1001A0001200130004001600070009000A000B00EB -:1001B0000D000E000F0028001D611B64064119424E -:1001C00000002C62000005781174107129007F0076 -:1001D000AA00A900AE004A004E004B004D000000EE -:1001E0002B000000000000000000500051005200F1 -:1001F0004F002A00E000E2000100035100002C62E1 -:100200000000E700E600E4001E001F0020002100BF -:1002100022002300240025002600270035000000CE -:100220002D002E0031002F003000330034002A0052 -:10023000E000E2000351010000002C6200003600E3 -:10024000370038003A003B003C003D003E003F00D4 -:10025000400041004200430044004500000000000F -:10026000000000000000000000004C00E000E20080 -:100270000100010000002C620000E700E600E4003D -:1002800000047F3F1F643214643214783C1E1E1435 -:100290000A056801F000B40078005A000000000070 -:1002A0000001010101010101010102020202020239 -:1002B000020202030303030303030304040404040C -:1002C00004050505050506060606060707070708CF -:1002D0000808080909090A0A0A0A0B0B0B0C0C0C7E -:1002E0000D0D0D0E0E0F0F0F101011111112121314 -:1002F000131414151516161717181819191A1A1B8E -:100300001C1C1D1D1E1F1F202021222223242525E9 -:1003100026272728292A2B2B2C2D2E2F2F30313220 -:1003200033343536363738393A3B3C3D3E3F404131 -:10033000424344464748494A4B4C4D4F5051525313 -:10034000555657585A5B5C5E5F60626364666769C6 -:100350006A6C6D6E707173747678797B7C7E808147 -:10036000838486888A8B8D8F91929496989A9B9D90 -:100370009FA1A3A5A7A9ABADAFB1B3B5B7B9BBBD9D -:10038000BFC1C4C6C8CACCCFD1D3D6D8DADCDFE16E -:10039000E4E6E8EBEDF0F2F5F7FAFCFF04033000D9 -:1003A00000000C0361006C00700068006100000038 -:1003B0000C035000790072006F004C000000040331 -:1003C000090409026D00040100A0FA0904000001FB -:1003D00003010100092111010001224000070581EC -:1003E0000308000A090401000103010200092111A8 -:1003F000010001224D000705820308000A090402DA -:10040000000103000000092111010001223600074C -:1004100005830308000A0904030001030000000922 -:100420002111010001223900070584032000011277 -:1004300001100100000008EDFE60600100010203F0 -:100440000105010906A101050719E029E7150025A5 -:1004500001950875018102050819012905950575A1 -:100460000191029501750391010507190029F715FE -:1004700000250195F875018102C005010980A101DF -:1004800085021601002603001A81002A83007510D8 -:1004900095018100C0050C0901A101850316010029 -:1004A000269C021A01002A9C02751095018100C049 -:1004B00005010902A1010901A10005091901290588 -:1004C00015002501950575018102950175038101CE -:1004D0000501093009311581257F950275088106CE -:1004E00009381581257F950175088106050C0A38A4 -:1004F000021581257F950175088106C0C005010997 -:1005000006A101050719E029E715002501950875E1 -:1005100001810295017508810105081901290595D8 -:1005200005750191029501750391010507190029CF -:10053000FF150026FF00950675088100C0001124F4 -:100540001FBECFEFDAE0DEBFCDBF04B603FE27C08B -:100550008091620290916302A0916402B091650261 -:100560008730904BA740B04BD1F4109262021092AA -:100570006302109264021092650214BE84B7877FF2 -:1005800084BF0FB6F894A89580916000886180932D -:100590006000109260000FBEE0E0F8E3099511E002 -:1005A000A0E0B1E0E0E8F8E502C005900D92A234C9 -:1005B000B107D9F722E0A2E4B1E001C01D92A23652 -:1005C000B207E1F70E940B230C943E2C0C94000020 -:1005D0000895089581E0089581E008950C94EC0257 -:1005E0000C9461080C94630808950C94F4020C9424 -:1005F000F50208950E9489150E94F9022FEF84E305 -:100600009CE0215080409040E1F700C0000087E767 -:1006100097E790930108809300080C949B1DFF922C -:100620000F931F93CF93DF938C01FC01C081D18185 -:1006300080919101811113C08281882349F0CE01FC -:100640000E94E61AF82E682FCE010E948F1A04C06D -:10065000CE010E94BA1AF82EBE018F2D04C0CE0121 -:100660000E94E61ABE010E94B305EC01B8010E9487 -:10067000EE02882309F46CC2B801CE010E94120870 -:10068000882309F465C2C93CFCE5DF0741F4F801A1 -:100690008281882309F45CC20E94290A59C2CA3C9B -:1006A0008CE5D80708F013C1C13C9CE5D90761F47B -:1006B000F8018281882309F44BC20E94B71B827221 -:1006C000F1F00E94490C44C2C23CECE5DE07D0F0D8 -:1006D000F8018281C53CFCE5DF0709F4CDC008F0D4 -:1006E000DDC0C33CECE5DE0709F4CCC008F0D0C0A7 -:1006F000882309F42DC20E94B71B827211F30E9455 -:100700003F0C26C2C531FCE5DF0708F07EC0C230D1 -:100710008CE5D80708F452C0F8018281882309F4D7 -:1007200059C00E94141C811102C00E94F31B0E9438 -:10073000311C90E09093540280935302FE01E350E9 -:10074000FC45E231F10530F4EA5AFF4F8091530243 -:100750000C94E32B80915302816027C0826025C0F6 -:10076000846023C0806121C080621FC080641DC07E -:1007700080681BC08460886018C08E7F16C08D7F23 -:1007800014C08B7F12C08F7E10C08F7D0EC08F7BF8 -:100790000CC08F770AC08B7F877F07C087FB22271B -:1007A00020F991E0922790FB87F980935302809182 -:1007B00053020E94351C0E948915CAC1C1159CE5CF -:1007C000D90781F0C130DC45A9F081E08093470171 -:1007D00080934801C801DF91CF911F910F91FF9045 -:1007E0000C94EA02F8018281882309F4B1C10E94C5 -:1007F000FA02AEC1F8018281882309F4A9C180916F -:100800000B02816080930B02A3C1C531FCE5DF07B9 -:1008100039F50E94B71B982FF801828120910D01B4 -:1008200030910E01882379F09A7A81E009F480E012 -:1008300080934201911102C069E201C065E3C901E0 -:100840000E94971C0AC080914201811102C069E296 -:1008500001C065E3C9010E94A21C0E94841B78C1EB -:10086000C03CDC4509F0B1CFF8018281882309F44E -:100870006FC10E94DA0C6CC1882309F469C10E941F -:10088000880B66C1882309F463C10E94510B60C1C3 -:10089000882309F45DC10E94690B5AC1C73C9CE5DD -:1008A000D90731F4882309F453C10E94BD0B50C10C -:1008B000C83CDC4530F4882309F44AC10E94A30BEC -:1008C00047C1882309F444C10E94D80B41C1C13DEE -:1008D000FCE5DF0749F4F8018281882309F438C177 -:1008E00088E10E943C0C34C1C23D8CE5D80708F079 -:1008F00087C0F8018281CD3CFCE5DF07A1F48823A5 -:1009000009F426C10E941B0A663071058105910514 -:1009100040F00E941B0A683071058105910508F4BA -:10092000EECE86E0DECFCE3C9CE5D90730F5CB3C61 -:10093000ECE5DE0729F4882309F40AC181E0D1CF70 -:10094000CC3CDC4530F4882309F402C10E943E0A05 -:10095000FFC0882309F4FCC00E941B0A62307105A5 -:100960008105910540F00E941B0A653071058105E3 -:10097000910508F4C4CE82E0B4CFCF3C9CE5D90702 -:10098000A1F4882309F4E4C00E941B0A6F307105AA -:100990008105910540F00E941B0A643171058105B3 -:1009A000910508F4ACCE8FE09CCFC03DDC45A0F4AF -:1009B000882309F4CDC00E941B0A693071058105A6 -:1009C000910540F00E941B0A6E307105810591056A -:1009D00008F495CE89E085CF882309F4B9C00E9438 -:1009E0001B0A653171058105910540F00E941B0AC3 -:1009F000673171058105910508F481CE85E171CFDC -:100A0000C53DFCE5DF0739F5F8018281882361F0F7 -:100A1000109248010E943F1D90934601809345012A -:100A200080E20E94D51294C08091480181110FC0CC -:100A300080914501909146010E944B1D883C910593 -:100A400030F487E20E94731187E20E946F1280E205 -:100A50000E94DC127DC0C63D8CE5D80708F043C07B -:100A6000F8018281C33DFCE5DF0729F4882309F4FE -:100A70006FC083E236CFC43DDC45A0F4882309F47F -:100A800067C00E941B0A693171058105910540F01C -:100A90000E941B0A623271058105910508F42FCE70 -:100AA00089E11FCF882351F0109247010E943F1D1A -:100AB000909344018093430182E0B3CF809147013A -:100AC00081110FC080914301909144010E944B1D00 -:100AD000883C910530F486E20E94731186E20E9400 -:100AE0006F1282E0B5CFC93DECE5DE0731F4F801C5 -:100AF0008281882369F180E009C0CA3DFCE5DF07F7 -:100B000041F4F8018281882319F182E00E94A72331 -:100B10001FC0C63DDC4509F058CEF8018281811125 -:100B200077CF80914801811192CF809145019091BA -:100B300046010E944B1D883C910508F088CF80E259 -:100B40000E94DC1288E20E94731188E20E946F12F8 -:100B500080E0DF91CF911F910F91FF90089580E089 -:100B600090E0089508952EE1829FC0011124FC01B8 -:100B70002AE0729FE00DF11D1124E60FF11DEE0F2A -:100B8000FF1FE057FE4F859194910895880F991F9C -:100B9000FC01E058FD4F859194910895CF93DF9328 -:100BA0000E94B3050E947207EC018115904508F080 -:100BB00041C0C11580E4D80708F01CC1C83ED1056A -:100BC00010F5C03ED10508F089C1C83AD10578F4C6 -:100BD000C53AD10508F09EC0C130D10509F47EC1E7 -:100BE00008F435C1C430D10508F078C130C1CD3B1F -:100BF000D10508F49AC0C03CD10508F428C1CE0143 -:100C0000805C9109E9C0C11590E2D90758F4C1157B -:100C100021E0D20708F062C1C03FD10508F417C136 -:100C2000D0655CC1C11580E3D80708F0D9C0CE01FA -:100C30009F70D2C0C11595E5D90708F044C0C11511 -:100C400024E5D20708F0EDC0C11582E5D80710F5FC -:100C5000C11591E5D90708F0D0C0CE0174E0969592 -:100C600087957A95E1F7282F23703C2F337081E028 -:100C700090E002C0880F991F3A95E2F79C68922B8A -:100C8000CF70C695C69520E2C29FE0011124C82B03 -:100C9000D92B24C19E01237033278C2F86958695EE -:100CA000C115D34508F0AEC0C1E0D0E002C0CC0F02 -:100CB000DD1F2A95E2F720E2829FC0011124C82B94 -:100CC000D92BDC680BC1C11529E5D20780F4C11509 -:100CD00088E5D80708F0AAC0C11596E5D90708F03D -:100CE000B6C0CF71DD27DC2FCC27D062F7C0CE0194 -:100CF000C1152AE5D20708F49EC09056811590428E -:100D000008F0A5C08D2F8F710E94EE07DD27D062FD -:100D10008F719BC0C53AD10509F49CC0C63AD10574 -:100D200009F09BC0C2E8D0E4D9C0C83AD10509F4A3 -:100D300097C0C93AD10509F496C0CA3AD10509F459 -:100D400095C0CB3AD10509F494C0CC3AD10509F449 -:100D500093C0CB3BD10509F492C0CC3BD10509F43B -:100D600091C0CD3AD10509F490C0C03BD10509F43A -:100D70008FC0CE3AD10509F48EC0CF3AD10509F41F -:100D80008DC0C13BD10509F48CC0C23BD10509F42B -:100D90008BC0C33BD10509F48AC0C43BD10509F41B -:100DA00089C0C53BD10509F488C0C63BD10509F40B -:100DB00087C0C73BD10509F486C0C83BD10509F4FB -:100DC00085C0C93BD10509F484C0CA3BD10509F4EB -:100DD00083C0C0E0D4E482C00E94C605EC017EC09E -:100DE000CE019927D3FF03C0EC01D86C77C0EC018A -:100DF000D06C74C0DF70D06A71C0DC2FCC27C16F9B -:100E0000D06A6CC0C1E0D0E002C0CC0FDD1F2A95D3 -:100E1000E2F720E2829FC0011124C82BD92BDA68A7 -:100E20005DC0DC2FCC27C46FD06A58C0DC2FCC2724 -:100E3000C06FD06A53C024E0969587952A95E1F754 -:100E40008F70CF70C06ED0E0D06AD82B47C0C0E0A2 -:100E5000D0E044C0C1E8D0E441C0C3E8D0E43EC023 -:100E6000C2EED4E43BC0C9EED4E438C0CAEED4E448 -:100E700035C0C5EBD4E432C0C6EBD4E42FC0C3EB1D -:100E8000D4E42CC0C4EBD4E429C0C7EBD4E426C01E -:100E9000CCECD4E423C0CDECD4E420C0C3E8D5E44A -:100EA0001DC0CAE8D5E41AC0C2E9D5E417C0C4E938 -:100EB000D5E414C0C1E2D6E411C0C3E2D6E40EC04A -:100EC000C4E2D6E40BC0C5E2D6E408C0C6E2D6E46C -:100ED00005C0C7E2D6E402C0CAE2D6E4CE01DF9183 -:100EE000CF9108958238910549F1B0F4813391058D -:100EF00009F459C048F48932910509F44FC08A3287 -:100F0000910509F455C008958533910509F441C050 -:100F10008933910599F00895833E910531F138F4B4 -:100F2000803E910591F0823E9105A9F00895863E9C -:100F3000910501F1873E910539F108952091530201 -:100F400020FD3BC021FD39C008958091530280FFF0 -:100F500034C089E341C08091530282FF30C0809148 -:100F6000530284FD2EC083EE37C08091530282FD70 -:100F700026C0F5CF8091530283FF25C08091530294 -:100F800084FD1FC087EE28C08091530283FD1BC0E3 -:100F9000F5CF8091530285FD18C019C0809153028E -:100FA00085FD15C012C08091530286FD12C013C08A -:100FB0008091530286FD0FC00CC080EE0DC082EE02 -:100FC0000BC080E009C086EE07C089E205C085E35A -:100FD00003C08AE201C081E390E00895909153023A -:100FE00092FF0DC0282F2871283019F4877F846064 -:100FF00006C0282F2471243011F48B7F886093FF62 -:101000000DC0282F2871283119F4877E846106C00D -:10101000282F2471243111F48B7E886194FD877E02 -:10102000089508950F931F93CF93FB0122812111FF -:1010300002C0C1E041C08C01C0915601C11125C060 -:1010400086319C45B1F70E94110881E080935601DA -:101050000E943F1D909355018093540110924901C5 -:1010600010924B0110924A0110924D0110924C01C6 -:1010700010924F0110924E011092510110925001A6 -:10108000109253011092520117C080915401909117 -:1010900055010E944B1D8C32914058F690914901A8 -:1010A000E92FF0E0EE0FFF1FE65BFE4F1183008398 -:1010B0009F5F90934901C0E08C2FCF911F910F91BA -:1010C00008950C94E8020C94E902CF93DF93AAE20E -:1010D000B1E04DE251E061E070E08D91E82FE295E2 -:1010E000EF70F0E021A18F70EB0102C0CC0FDD1F8B -:1010F0008A95E2F7CE019C2F9095922391A392A11D -:10110000892B82A34A175B0741F7A0E2B1E04AE2CC -:1011100051E061E070E08D91E82FE295EF70F0E032 -:1011200021A18F70EB0102C0CC0FDD1F8A95E2F781 -:10113000CE019C2F9095922391A392A1892B82A3FB -:101140004A175B0741F710925E0110925D01109201 -:101150005801109257011092600110925F01109295 -:101160005A0110925901109262011092610110927D -:101170005C0110925B01DF91CF910C94F0022F92F1 -:101180003F924F925F926F927F928F929F92AF9217 -:10119000BF92CF92DF92EF92FF920F931F93CF9364 -:1011A000DF932AE2E22E21E0F22EC7E5D1E03DE511 -:1011B000832E31E0932E01E010E066246394BE019B -:1011C000A880B98019821882D7018D917D01E82FFE -:1011D000E295EF70F0E021A18F70A80102C0440FEA -:1011E000551F8A95E2F7CA01242B21A322A1742E50 -:1011F0007094272122A350EA5A95F1F790E2292E04 -:1012000091E0392E20E030E0D1015D901D01452DA7 -:1012100042954F7050E0DA0190964C90C880D9808A -:10122000552D5F70D80102C0AA0FBB1F5A95E2F777 -:10123000AD01442141F4A801022E02C0440F551F04 -:101240000A94E2F702C040E050E04C295D2959833E -:1012500048832F5F3F4F2A303105B1F691A17922A3 -:1012600071A292A1892B82A32296FB018081918198 -:10127000A816B90641F0609263010E943F1D909349 -:101280006501809364018C169D0609F098CF8091CA -:101290006301882311F180916401909165010E949E -:1012A0004B1D0697D0F08091570190915801909373 -:1012B0005E0180935D018091590190915A01909354 -:1012C000600180935F0180915B0190915C0190933C -:1012D000620180936101109263010E94F20281E039 -:1012E000DF91CF911F910F91FF90EF90DF90CF9002 -:1012F000BF90AF909F908F907F906F905F904F9036 -:101300003F902F900895E82FF0E0EE0FFF1FE35A73 -:10131000FE4F8081918108950895EF92FF920F937F -:101320001F93CF93DF93E901662309F44BC0242F69 -:1013300030E0EFEFF0E0E61BF109B901E69F900124 -:10134000E79F300DF69F300D1124232F8B01031BD7 -:1013500011095CE3E52EF12CB7010E94BB2BFB01C8 -:10136000BC01069FC001079F900D169F900D112490 -:10137000B7010E94BB2BE230F105B1F040F4309789 -:1013800079F0319711F5832F242F461B21C0E430CB -:10139000F105A1F068F03597C1F4842F861B18C0C1 -:1013A000832F262F230F14C0862F830FE42F03C013 -:1013B000E42FE61B842F432F2E2F0AC0842F462FA5 -:1013C000430F06C0842F242F03C080E020E040E0BC -:1013D000E42FF0E0E456FD4F4491E22FF0E0E456B4 -:1013E000FD4F9491E82FF0E0E456FD4FE4914983DE -:1013F0009883EA83DF91CF911F910F91FF90EF9037 -:10140000089588E090E00C94FE2BAB01BC0188E0CD -:1014100090E00C941C2CE9E3F2E083E080831092CE -:101420003A028FEF8283838314826081718182818B -:1014300093810C94050A6091390260FF06C066959D -:101440006F7370E080E090E0089560E070E0CB01A1 -:10145000089580913D0290E001968430910514F04A -:1014600083E090E080933D026091390270913A02EE -:1014700080913B0290913C020C94050A80913D02C0 -:1014800090E0019797FF02C080E090E084309105E2 -:1014900014F083E090E080933D02609139027091F6 -:1014A0003A0280913B0290913C020C94050A809193 -:1014B000390280FF06C065E070E08EE392E00C9494 -:1014C0001910EEE3F2E0118210821282339682E06C -:1014D000ED34F807C1F7EFCF9091390290FF0CC0BF -:1014E000EEE3F2E0818360834283339692E0ED3451 -:1014F000F907C1F70C94570A0895CF93DF9300D0F2 -:101500001F92CDB7DEB72091390220FF0AC09E019D -:101510002F5F3F4F0E948D094B8169818A810E9414 -:101520006C0A0F900F900F90DF91CF9108955F920A -:101530006F927F928F929F92AF92BF92CF92DF92E3 -:10154000EF92FF920F931F93CF93DF9300D01F92E0 -:10155000CDB7DEB78C01E62EF42E522E80913902E3 -:1015600080FF89C0982F9E77923061F49E012F5F93 -:101570003F4FC8010E948D094B8169818A810E9479 -:101580006C0A59C0E82FE695EF739EE39E0F9F7398 -:10159000943018F4F0903C024EC09AE39E0F9F7373 -:1015A000993068F4881F8827881F90913A02292F64 -:1015B000220F022F082B97FB112710F93CC087E25E -:1015C0008E0F8F738A30B8F5F0E07997E0FD02C096 -:1015D00021E001C02FEFEE7FEE56FD4F85919491F3 -:1015E00065E070E00E94BB2B26034001279F900C12 -:1015F0001124580188E9A81A8EEFB80A8EE3C82E84 -:1016000082E0D82E98E6692E77247394C501B30141 -:101610000E94BB2B96014F2D6E2D0E948D09A80CA8 -:10162000B91C83E0C80ED11C8DE4C81682E0D80630 -:1016300069F70E94570A8091390200FB87F980936D -:101640003902902F969580913A028078892B10FB71 -:1016500087F980933A02E0923B02F0923C025520D7 -:1016600051F06091390270913A0280913B02909161 -:101670003C020E94050A0F900F900F90DF91CF91CE -:101680001F910F91FF90EF90DF90CF90BF90AF90A0 -:101690009F908F907F906F905F90089521E00C94C1 -:1016A000970AE9E3F2E02081221F2227221F3091CE -:1016B0003A02432F440F842F822B37FB992790F94E -:1016C000089668E671E00E94CF2B438162810C94FA -:1016D0004E0B20913902221F2227221F30913A02FD -:1016E000432F440F842F822B37FB992790F98830A2 -:1016F00091051CF4805A9E4F05C0089768E671E07A -:101700000E94CF2B40913C0260913B020C944E0B07 -:1017100060913B02862F90E0883F910514F4685F4A -:1017200001C06FEF80913902881F8827881F909130 -:101730003A02292F220F97FB992790F940913C02FA -:10174000822B0C944E0B60913B02862F90E0089701 -:1017500014F0685001C060E080913902881F88272A -:10176000881F90913A02292F220F97FB992790F911 -:1017700040913C02822B0C944E0B40913C02842FF2 -:1017800090E0883F910514F4485F01C04FEF8091CD -:101790003902881F8827881F90913A02292F220F2B -:1017A00097FB992790F960913B02822B0C944E0B8A -:1017B00040913C02842F90E0089714F0485001C0FB -:1017C00040E080913902881F8827881F90913A0253 -:1017D000292F220F97FB992790F960913B02822BCA -:1017E0000C944E0B20E00C94970ACF939091390201 -:1017F00090FF40C09178811102C0926007C085328D -:1018000010F0986403C08F73880F982B909339025F -:10181000662351F06091390270913A0280913B0247 -:1018200090913C020E94050AC09139026C2F669586 -:101830006F7370E04BE050E082E091E00E94E92B92 -:10184000892B19F01092830103C081E080938301FA -:10185000CC1FCC27CC1F90913A02892F880F97FB81 -:10186000992790F940913C0260913B028C2BCF91DB -:101870000C94F20BCF91089561E00C94F50B8091DC -:10188000390286958F738F5F853208F081E00C9462 -:101890003C0C8091390286958F73815009F484E263 -:1018A0000C943C0CE9E3F2E08081816080838695B2 -:1018B0008F730C943C0C60E00C94F50B80910B0240 -:1018C000816080930B020E94141C811104C00E944D -:1018D000F31B0E940B0A0E94010A60933902709365 -:1018E0003A0280933B0290933C026E7761F40E942F -:1018F0000B0A0E94010A6093390270933A028093A6 -:101900003B0290933C0281E08093830180913902F5 -:1019100080FF04C086958F730C945B0C08959091A2 -:10192000390290FF10C0253070F430E0F901EE0F5D -:10193000FF1F2E0F3F1FF901E25CFD4F8183608383 -:1019400042830C94570A08951F93CF93DF9300D0DE -:101950001F92CDB7DEB73091390230FF0CC0122F85 -:101960009E012F5F3F4F0E948D09212F4B8169817E -:101970008A810E948F0C0F900F900F90DF91CF9172 -:101980001F910895E9E3F2E080818E7F808360817A -:101990007181828193810E94050A109283012FEF49 -:1019A00080E792E0215080409040E1F700C00000C5 -:1019B0000C94570A8091390280FD0C94C20C0C944F -:1019C000520CCF93C82F80918101909182010E9487 -:1019D0004B1DEC2FF0E0E257FD4FE491F0E08E1745 -:1019E0009F0708F443C00E943F1D9093820180939B -:1019F00081016091800170E080E090E00E94BC294C -:101A000020E030E04FE753E40E94DF282BED3FE079 -:101A100049E450E40E94E52A0E94522B0E94592971 -:101A20002BE43AE34EE25FE30E94722820EF3BEFA3 -:101A300048ED52E40E94E52A0E948B29462F8091AE -:101A40003902881F8827881F90913A02292F220F78 -:101A500097FB992790F960913B02822B0E947D0AA7 -:101A60008091800190E0019680938001CF9108954C -:101A7000CF93C82F80917E0190917F010E944B1DD2 -:101A8000EC2FF0E0E557FD4FE491F0E08E179F0753 -:101A9000E8F00E943F1D90937F0180937E0140916A -:101AA0003C0260913B0280917C0190917D010E94FB -:101AB0007D0A80917C0190917D01019668E671E03C -:101AC0000E94BB2B90937D0180937C01CF91089560 -:101AD000CF92DF92FF920F931F93CF93DF93F82E55 -:101AE00080917A0190917B010E944B1DEF2DE6952C -:101AF000F0E0E857FD4FE491F0E08E179F07C0F14A -:101B00000E943F1D90937B0180937A010EE312E0C7 -:101B1000C0E0D0E088E6C82EDD24D394809178011F -:101B2000909179018C0F9D1FB6010E94BB2B9801EB -:101B300040913C0260913B020E948D09C85BDF4FDF -:101B40000D5F1F4FC83681E0D80741F70E94570A42 -:101B50008091780190917901F0FE05C00196BE0157 -:101B60000E94BB2B01C0019790937901809378016B -:101B7000DF91CF911F910F91FF90DF90CF9008954B -:101B8000CF92DF92EF92FF920F931F93CF93DF9349 -:101B9000C82F80FF02C01FEF01C011E080917601C5 -:101BA000909177010E944B1DC695EC2FF0E0EB570A -:101BB000FD4FE491F0E08E179F0708F45BC00E9490 -:101BC0003F1D90937701809376012EE3E22E22E071 -:101BD000F22EC0E0D0E0F70111821082128294E070 -:101BE000C92ED12C00E080917501800F87FD8B5F9D -:101BF000082E000C990BC817D907E9F480913C0214 -:101C00008C9DA0018D9D500D11245595479555959E -:101C1000479580913902881F8827881F90913A0242 -:101C2000592F550F97FB992790F9970160913B0227 -:101C3000852B0E948D09010FF1E0CF1AD10899F68A -:101C4000219683E0E80EF11CC530D10521F60E94F3 -:101C5000570A80917501113031F4811102C084E07E -:101C600007C0815005C090E00196BE010E94CF2BB5 -:101C700080937501DF91CF911F910F91FF90EF90AD -:101C8000DF90CF9008950F931F93CF93DF93C82FCA -:101C900080917301909174010E944B1DEC2FF0E034 -:101CA000EE57FD4FE491F0E08E179F0708F456C001 -:101CB0000E943F1D9093740180937301CEE3D2E0A4 -:101CC000FE01118210821282339682E0ED34F80711 -:101CD000C1F700E010E080917201082E000C990B12 -:101CE00008171907ECF080910101082E000C990BE0 -:101CF00080179107ACF080913902881F8827881FD0 -:101D000090913A02592F550F97FB992790F99E0110 -:101D100040913C0260913B02852B0E948D0903C0DB -:101D2000198218821A820F5F1F4F23960530110502 -:101D300091F60E94570A8091000190917201980FCC -:101D40009093720120910101280F20930101121636 -:101D500014F494301CF0819580930001DF91CF91B1 -:101D60001F910F910895EF92FF920F931F93CF93BE -:101D7000DF9380917001909171010E944B1D883E0C -:101D80009340D0F10E943F1D9093710180937001A8 -:101D9000C0916E01D0916F012196C170DD27D09363 -:101DA0006F01C0936E018EE3E82E82E0F82E10E002 -:101DB00008E7812F8695FE01E80FF11DCF018170A4 -:101DC0009927970140913C0260913B02FC010E9FD4 -:101DD000C0010F9F900D11240E948D091F5FF3E039 -:101DE000EF0EF11C153029F7DF91CF911F910F9164 -:101DF000FF90EF900C94570ADF91CF911F910F91B4 -:101E0000FF90EF900895CF93DF9300D01F92CDB74E -:101E1000DEB780916C0190916D010E944B1DE0E84E -:101E2000F2E02591349182179307C0F180916B0104 -:101E300081110CC09E012F5F3F4F4FEF6FEF80E08D -:101E400090E00E948D098A8180936B010E943F1D62 -:101E500090936D0180936C0180916A01813051F003 -:101E600028F0823061F440916B010AC080916B01CF -:101E700040E007C060916B0140E080E003C040E0BB -:101E800080E060E00E946C0A80916A0190E0019617 -:101E900063E070E00E94CF2B80936A010F900F9057 -:101EA0000F90DF91CF910895CF93DF9380916801D8 -:101EB000909169010E944B1D843F914008F444C0F9 -:101EC0000E943F1D9093690180936801C0E0D0E0BB -:101ED00020916601309167018091390290913A0218 -:101EE000C230D1051CF4232B79F002C0232B61F4FE -:101EF000881F8827881F392F330F97FB992790F960 -:101F00002C2F40913C020AC0881F8827881F392F38 -:101F1000330F97FB992790F92C2F40E060913B02FB -:101F2000832B0E94A40C2196C530D10589F60E940E -:101F3000570A8091660190916701019681709927F7 -:101F40009093670180936601DF91CF91089580910E -:101F500083018823D9F190913902892F86958F7357 -:101F60002EE3280F2F73243018F482500C94E10CC8 -:101F70002AE3280F2F73233018F486500C94380D61 -:101F800027E3280F2F73263018F489500C94680D1E -:101F900021E3280F2F73263018F48F500C94C00DB6 -:101FA0002BE2280F2F73233018F485510C94430E25 -:101FB000892F8E77803311F40C94B30E863411F48C -:101FC0000C94030F883411F40C94540F089521B32A -:101FD000342F3095232331B3432B3FB7F894FC01C2 -:101FE000680F791FE617F70789F0819198E041BBE8 -:101FF000000000C087FF21BB880F000000C000C0A8 -:1020000000C021BB00C09A9591F7ECCF3FBF089567 -:1020100020B3242B20BB9B01220F331F620F731FA1 -:102020000E94E70F87EC90E00197F1F700C00000F5 -:10203000089540E10C9408109093890180938801E1 -:102040000895E0918801F0918901309721F0019085 -:10205000F081E02D099480E00895E0918801F091ED -:102060008901309721F00280F381E02D09940895D1 -:10207000E0918801F0918901309721F00480F58189 -:10208000E02D099408952091860130918701281749 -:10209000390771F09093870180938601E091880160 -:1020A000F0918901309721F00680F781E02D0994A5 -:1020B000089520918401309185012817390771F026 -:1020C0009093850180938401E0918801F0918901CA -:1020D000309721F00084F185E02D0994089508954A -:1020E0000C946F1081E008950E94361D85B78068BA -:1020F00085BF85B7806885BF0E9465080E94F81D6E -:102100000C945E0C5F926F927F928F929F92AF922F -:10211000BF92CF92DF92EF92FF920F931F93CF93D4 -:10212000DF93CDB7DEB72A970FB6F894DEBF0FBEA8 -:10213000CDBF0E94BF080E947210811111C08FEFA5 -:1021400089838A831B820E943F1D8160782F9D8333 -:102150008C8349815A816B818D810E943F1156C0C9 -:102160009BE8692E91E0792E00E010E088248394AA -:10217000912C502E802F0E9483096C01F301A190B5 -:10218000B1903F01A826B926A114B10431F40F5F24 -:102190001F4F0330110569F7D2CF80910B0281FDEB -:1021A0000E948C0980E090E07401082E02C0EE0CC1 -:1021B000FF1C0A94E2F795012E213F21232B09F100 -:1021C0008E835F82CE20DF2081E0CD2809F480E07D -:1021D00088870E943F1D8160782F9A8789874E816A -:1021E0005F8168858A850E943F11000F111FF801E9 -:1021F000E557FE4F80819181E826F926F182E08241 -:1022000005C001968A30910579F6C1CF0E949B20C6 -:102210000E94211090918A018917D9F00E94211003 -:1022200080938A012A960FB6F894DEBF0FBECDBF09 -:10223000DF91CF911F910F91FF90EF90DF90CF90A2 -:10224000BF90AF909F908F907F906F905F900C9415 -:10225000F7022A960FB6F894DEBF0FBECDBFDF910E -:10226000CF911F910F91FF90EF90DF90CF90BF9093 -:10227000AF909F908F907F906F905F900895CF93D5 -:10228000DF93CDB7DEB72B970FB6F894DEBF0FBE46 -:10229000CDBF4F83588769877A878B87DE01119678 -:1022A00086E0FD0111928A95E9F785E0FE013796F7 -:1022B00001900D928A95E1F749815A816B817C8169 -:1022C0008D819E810E9456182B960FB6F894DEBF22 -:1022D0000FBECDBFDF91CF910895FC018081918128 -:1022E0000E94251B0895882309F4F8C08238C1F4A0 -:1022F0000E94211081FDF2C069E380910D0190914F -:102300000E010E94971C0E94841B2FEF81EE94E027 -:10231000215080409040E1F700C0000069E319C0FF -:102320008338F9F40E94211080FDD8C063E58091C4 -:102330000D0190910E010E94971C0E94841B2FEFAB -:1023400081EE94E0215080409040E1F700C0000011 -:1023500063E580910D0190910E010E94A21C0C94E6 -:10236000841B8438C1F40E94211082FDB7C067E449 -:1023700080910D0190910E010E94971C0E94841B78 -:102380002FEF81EE94E0215080409040E1F700C0B3 -:10239000000067E4DECF9CEF980F913A40F4682F7D -:1023A00080910D0190910E010E94971CD8CF90E270 -:1023B000980F983050F4877091E001C0990F8A957A -:1023C000EAF7892F0E94BA1BCACF9BE5980F93307A -:1023D00070F4853A29F0863A31F083E890E005C040 -:1023E00081E890E002C082E890E00C94431098E508 -:1023F000980F953108F06EC0883A61F1893A69F119 -:102400008A3A71F18B3A79F18C3A81F18B3B89F1FF -:102410008C3B91F18D3A99F1803BA1F18E3AA9F173 -:102420008F3AB1F1813BB9F1823BC1F1833BC9F1F4 -:10243000843BD1F1853BD9F1863BE1F1873BE9F162 -:10244000883BF1F1893BF9F18A3B09F43FC080E018 -:1024500090E03EC082EE90E03BC089EE90E038C054 -:102460008AEE90E035C085EB90E032C086EB90E0DC -:102470002FC083EB90E02CC084EB90E029C087EB69 -:1024800090E026C08CEC90E023C08DEC90E020C062 -:1024900083E891E01DC08AE891E01AC082E991E0EA -:1024A00017C084E991E014C081E292E011C083E298 -:1024B00092E00EC084E292E00BC085E292E008C098 -:1024C00086E292E005C087E292E002C08AE292E0F2 -:1024D0000C945910803F10F00C94A31F089588238A -:1024E00009F462C0823879F40E94211081FF5CC037 -:1024F00069E380910D0190910E010E94971C0E944A -:10250000841B69E310C08338B1F40E94211080FF5E -:102510004BC063E580910D0190910E010E94971CC4 -:102520000E94841B63E580910D0190910E010E9431 -:10253000A21C0C94841B843879F40E94211082FF21 -:1025400033C067E480910D0190910E010E94971CA9 -:102550000E94841B67E4E7CF9CEF980F913A10F438 -:10256000682FE1CF90E2980F983050F4877091E097 -:1025700001C0990F8A95EAF7892F0E94C01BD9CF15 -:102580009BE5980F933020F480E090E00C9443108A -:1025900098E5980F953120F480E090E00C94591064 -:1025A000803F10F00C940B200895882321F00E94A6 -:1025B000BA1B0C94841B0895882321F00E94C01B31 -:1025C0000C94841B08958F929F92AF92BF92DF92DA -:1025D000EF92FF920F931F93CF93DF937C01D62F3F -:1025E000C72FFC01058102950F70128111110E9405 -:1025F000D71B0E947D1B882379F0112369F080E2AC -:102600008D0F883048F082E00E94661B0E947D1B7F -:1026100091E0D82ED92601C0D12CBC2EB2948FE0E7 -:10262000B8228B2D90E0FC01E859FF4F0C94E32B6E -:102630008C2F807FCF70882311F0C295C07F11232B -:1026400099F0CC2309F4C3C180E28D0F883010F0DB -:10265000D11104C08C2F0E94BA1B03C08C2F0E9482 -:10266000CA1B0E94841BB3C18D2F0E946F12CC2302 -:1026700009F4D2C180E28D0F883010F0D11104C06E -:102680008C2F0E94C01B03C08C2F0E94D01B0E9465 -:10269000841BC2C18C2F807FCF70803211F0C29515 -:1026A000C07FDD2319F0D130C9F022C0112371F0B1 -:1026B000002341F0013031F40E94F01B8C2B0E946A -:1026C000EA1BAAC10E94F01B8C2B3AC1002319F00F -:1026D000013009F4A1C10E94ED1B18C0112321F0A3 -:1026E000063008F099C10EC0053008F095C10EC043 -:1026F000112351F0002331F0F701858180FF67C17C -:102700008F7085838C2F1CC1011172C18C2F1EC14B -:102710008C2F86958695837019F0813061F07CC18D -:10272000112321F08D2F9C2F937002C080E090E048 -:102730000E9443107EC1112321F08D2F9C2F937096 -:1027400002C080E090E00E94591073C11123F9F09B -:10275000D53F51F0D63F71F0D43FA9F480914D029E -:1027600090914E0281600BC080914D0290914E027B -:10277000826005C080914D0290914E0284609093DA -:102780004E0280934D028D2F0E94A31F1EC0D53F85 -:1027900051F0D63F71F0D43FA9F480914D02909151 -:1027A0004E028E7F0BC080914D0290914E028D7F24 -:1027B00005C080914D0290914E028B7F90934E0206 -:1027C00080934D028D2F0E940B200E94902031C1DA -:1027D0008C2F837009F04CC0111127C12D2F229529 -:1027E00026952770220F220F6D2F6F70862F90E095 -:1027F000A0E0B0E04C015D01022E04C0880C991CE1 -:10280000AA1CBB1C0A94D2F7D4FF12C08FE090E040 -:10281000A0E0B0E004C0880F991FAA1FBB1F2A9533 -:10282000D2F7BC01CD01609570958095909503C05D -:1028300060E070E0CB01C695C695C370C23051F020 -:1028400080F4682979298A299B29C13071F00E9476 -:10285000A519EBC0682979298A299B290E94B719F3 -:10286000E4C00E94A519C501B4010E949319DDC0FE -:10287000112319F08C2F817001C08695882309F4EB -:10288000D4C02D2F229526952770220F220F6D2F51 -:102890006F70862F90E0A0E0B0E04C015D01022E49 -:1028A00004C0880C991CAA1CBB1C0A94D2F7D4FF44 -:1028B00012C08FE090E0A0E0B0E004C0880F991F44 -:1028C000AA1FBB1F2A95D2F7BC01CD016095709558 -:1028D0008095909503C060E070E0CB01C695C695E9 -:1028E000C370C23051F080F4682979298A299B2964 -:1028F000C13071F00E946A1A98C0682979298A2922 -:102900009B290E947C1A91C00E946A1AC501B401D9 -:102910000E94581A8AC08D2F90E0FC01E05EF109F8 -:10292000E531F10508F04FC0E858FF4F0C94E32B58 -:10293000DF708C2F8F71112331F00E94F1198D2FD0 -:102940000E94D51269C00E94121A8D2F0E94DC12BB -:1029500063C0112341F0053008F05EC08C2F8F71E9 -:102960000E94371A59C0063008F056C0F7CF11231D -:1029700039F08C2F8F710E94F1194EC01123C9F3C9 -:102980008C2F8F710E94121A47C0112329F08C2FAF -:102990008F710E94DC1940C00E94D7193DC01123DD -:1029A00049F0CF718C2F0E94F11963E08C2F0E94A7 -:1029B0005D1B32C081E00E94661B023068F182E03C -:1029C0000E94661B29C0112331F0002391F28D2F44 -:1029D0000E94731121C0002399F2D93349F4FFEF0B -:1029E00027EE83E0F15020408040E1F700C0000076 -:1029F0008D2F0E946F1210C04C2F4F706D2FC7018A -:102A00000E94AF050E94041914C04C2F4F706D2F07 -:102A1000C7010E94B2050DC098E0B91631F0B91691 -:102A200040F086EF8B0D823020F40E9421100E942E -:102A3000F702DD20E1F00E94591B80FD18C0F7016C -:102A400012820E94531B0E94F119C7010E94431574 -:102A50000E94531BDF91CF911F910F91FF90EF9038 -:102A6000DF90BF90AF909F908F900C94121ADF91DF -:102A7000CF911F910F91FF90EF90DF90BF90AF909B -:102A80009F908F9008950F931F93CF93DF93EC0146 -:102A9000988189812B813C81232B31F08F3F31F448 -:102AA00081E09F3F19F403C081E001C080E080FD18 -:102AB00013C0CE010E940F03882371F068817981D1 -:102AC0008A810E94301B8C010E948E1A0E948119FB -:102AD000B801CE010E94E312DF91CF911F910F91B7 -:102AE00008950E94D71B0E94E71B80910D019091D1 -:102AF0000E010E94AD1C0E94841B0E9432210E9484 -:102B0000902080E090E00E94431080E090E00C94E0 -:102B100059100E94C71B0C9471150E94251BE92FA8 -:102B2000E295EF704E2F50E0FA013297EE30F1054A -:102B3000B0F4E357FF4F0C94E32B803F91F018F46F -:102B4000803E68F40EC0843F51F40BC0803E48F0D4 -:102B5000813F29F406C093FB882780F9089580E01F -:102B6000089581E00895CF93DF9300D000D01F92A5 -:102B7000CDB7DEB70F900F900F900F900F90DF91B1 -:102B8000CF910895CF93DF9300D000D000D0CDB780 -:102B9000DEB726960FB6F894DEBF0FBECDBFDF912D -:102BA000CF9108951F93CF93DF93C091920116E0C8 -:102BB00080919301C81799F0D0E01C9FF0011D9FF0 -:102BC000F00D1124EC56FE4F4081518162817381DA -:102BD000848195810E94C2152196C770E9CFDF914B -:102BE000CF911F9108954091C4015091C50160910A -:102BF000C6017091C7018091C8019091C9010C94E0 -:102C0000C215CF938091C90182958F7009F05FC082 -:102C10008091C601882309F45AC080919201B09135 -:102C200093017091C401A091C5014091C7015091D9 -:102C3000C80191E07F3F09F090E0692FC6E08B1753 -:102C400009F445C04115510521F0AF3F21F020E0C6 -:102C500003C021E001C0262F90E020FD35C0C89FB1 -:102C6000F001C99FF00D1124EC56FE4F21812A136B -:102C70002BC02081271328C02281211125C0238148 -:102C800034812417350710F421503109241B350BEA -:102C9000283C3105C8F42091C9012F702061209390 -:102CA000C90126E0289FF001299FF00D1124E75665 -:102CB000FE4F80818F708061808384EC91E00E9460 -:102CC0004315CF910C94D21501968770B8CFCF9150 -:102CD0000895AF92BF92CF92DF92EF92FF920F933F -:102CE0001F93CF93DF93CDB7DEB761970FB6F894FC -:102CF000DEBF0FBECDBF8C0185E0F801DE011D9661 -:102D000001900D928A95E1F7D8014C9111965C9152 -:102D100011971296EC903091C4016091C501809199 -:102D2000C7019091C801009731F06F3F31F421E065 -:102D30003F3F19F403C021E001C020E0B22FB17081 -:102D4000BB2E20FD60C1F801C380D480A090C601D5 -:102D5000AA2009F4EEC02091C901C816D90628F0AE -:102D6000D601A81BB90BCD0104C0809590958C0DA0 -:102D70009D1DFF24F394883C910580F0F12C207F69 -:102D800009F09CC07C2DD98AC88A6E2D89890E9441 -:102D9000B31584EC91E00E9443152DC1822F807FF2 -:102DA00009F054C0561314C0431312C0FE2CE11096 -:102DB0000FC02F7020612093C9010E94F31584EC8D -:102DC00091E00E9443158091C901F80185835CC19F -:102DD000CD2831F05F3F31F481E04F3F19F403C05B -:102DE00081E001C080E080FD03C081E08E2502C04B -:102DF00080E090E0F82FF170FF2E80FF1CC08091E2 -:102E000092012091930136E0821709F41AC190E0F3 -:102E1000389FF001399FF00D1124EC56FE4F61816F -:102E2000561306C06081461303C06281E61203C0D8 -:102E300001968770E9CFFE2CEE2009F425C1809120 -:102E4000C90181608093C901F12C1EC1561309C0CC -:102E5000431307C0E11005C08091C901F8018583C3 -:102E6000A4C04D875E878D859E850E948D15882321 -:102E700079F1EE2069F12091C901822F82958F703E -:102E800090E0029774F08091C4019091C5019887F9 -:102E90008F831986DB86CA862C87CE0107960E940F -:102EA000431586E0F801A4ECB1E001900D928A95FB -:102EB000E1F70E9401160E94F3150DC0561771F03C -:102EC0004D875E878D859E850E948D1581111AC064 -:102ED000C8010E944315FF24F394D6C04313F0CFDA -:102EE000E110EECF8091C901F8018583C8010E94ED -:102EF000431586E0E4ECF1E0DF011D928A95E9F7E5 -:102F0000FA2CC2C0EE2021F32091C901822F8295B4 -:102F10008F7090E002972CF28091C4019091C501CE -:102F20009A8389831B82DD82CC822E83CE01019617 -:102F3000B6CFC816D90628F0F601E81BF90BCF0169 -:102F400004C0809590958C0D9D1D883C910548F09E -:102F5000F12C7C2DD98AC88A6E2D89890E94B315DF -:102F60004AC0FE2CEE2009F4B3CF561333C04313EE -:102F700031C02091C90120FD24C0822F82958F701D -:102F8000482F50E041155105E1F0D80115962C93DA -:102F900015974F30510549F08F5F982F9295907F8C -:102FA000822F8F70892B15968C93C8010E94431530 -:102FB00086E0F801A4ECB1E001900D928A95E1F76A -:102FC0003DC086E0F801A4ECB1E001900D928A9535 -:102FD000E1F75AC04D875E878D859E850E948D15CD -:102FE00081115FCF8091C90181608093C901C801BF -:102FF0000E94431549C0E4ECF1E086E0DF011D9238 -:103000008A95E9F71BC0EE2009F462CF4D875E87F1 -:103010008D859E850E948D15F82E882309F458CF42 -:1030200086E0F801A4ECB1E001900D928A95E1F7F9 -:1030300084EC91E00E946D110E9401160E94F3152C -:1030400023C04D875E878D859E850E94251B292F75 -:1030500022952F70223028F49F7039F0811105C01D -:103060000BC0243028F49F7049F4805E883020F033 -:10307000C8010E944315BF2CFB2C06C0D801159631 -:103080009C91907F91F7F8CF8F2D61960FB6F894B1 -:10309000DEBF0FBECDBFDF91CF911F910F91FF908B -:1030A000EF90DF90CF90BF90AF9008951F93CF9394 -:1030B000DF93CDB7DEB72C970FB6F894DEBF0FBE07 -:1030C000CDBF4F83588769877A878B879C87CE01CE -:1030D00007960E9469168823D1F09F8188852A85EA -:1030E0003B85232B31F08F3F31F481E09F3F19F472 -:1030F00003C081E001C080E080FD47C04F8158855A -:1031000069857A858B859C850E94C2153EC086E0C4 -:10311000FE013796DE01119601900D928A95E1F736 -:10312000FF81E8856A857B856115710531F0EF3F88 -:1031300031F481E0FF3F19F403C081E001C080E079 -:1031400080FD23C02091930130E0C9010196877072 -:1031500099274091920150E084179507F1F1F98386 -:10316000EA837D836C8396E0929FD001939FB00D9C -:103170001124AC56BE4FFE01319601900D929A95E6 -:10318000E1F7809393010E94D21516E0809192019D -:1031900090919301891771F1189FC00111248C56E9 -:1031A0009E4F0E946916882329F1E09192011E9F8B -:1031B000F0011124EC56FE4F4081518162817381F0 -:1031C000848195810E94C2158091920190E00196C0 -:1031D0008770992780939201D9CF0E948915109208 -:1031E000930110929201E4ECF1E086E0DF011D9280 -:1031F0008A95E9F72C960FB6F894DEBF0FBECDBFC7 -:10320000DF91CF911F910895EF92FF920F931F933B -:10321000CF93DF938C01892B09F46CC0F12CEE2441 -:10322000E394E8012196F8018491843740F48430D6 -:1032300008F051C0813081F0823019F15BC08537D0 -:1032400009F444C0A8F19CE7980F903708F052C0E9 -:103250008F770E946F1241C00E5F1F4FFE01849155 -:1032600090E2980F983050F48770FE2D01C0FF0F48 -:103270008A95EAF78F2F0E94DA1B14C00E947311FF -:103280002DC00E5F1F4FFE01849190E2980F983081 -:1032900060F48770FE2D01C0FF0F8A95EAF78F2F2B -:1032A0000E94E01B0E94841B19C00E946F1216C06E -:1032B0000E5F1F4FFE01C491CC2381F08FE99FE088 -:1032C0000197F1F700C00000C150F6CF0E5F1F4F0D -:1032D000FE01F49003C00E9473118E018F2D88238C -:1032E00009F49FCFEFE9FFE03197F1F700C000004C -:1032F0008150F5CFDF91CF911F910F91FF90EF900B -:103300000895089508950C9482190E94831960937A -:10331000E2017093E3018093E4019093E5010C9442 -:1033200071150C9485190F931F930091E201109170 -:10333000E3012091E4013091E501602B712B822B98 -:10334000932B1F910F910C9485190F931F9300914C -:10335000E2011091E3012091E4013091E501602345 -:103360007123822393231F910F910C9485190F933E -:103370001F930091E2011091E3012091E40130914B -:10338000E50160277127822793271F910F910C94E5 -:1033900085190C9482190E94C9196093DE017093FB -:1033A000DF018093E0019093E1010C94711560E0DE -:1033B00070E0CB010C94CB190F931F9341E050E0C8 -:1033C00060E070E08A019B0104C0000F111F221F02 -:1033D000331F8A95D2F7C901B8011F910F910C9440 -:1033E000CB190F931F9341E050E060E070E004C000 -:1033F000440F551F661F771F8A95D2F78091DE0113 -:103400009091DF01A091E001B091E1018A019B015F -:10341000082B192B2A2B3B2BC901B8011F910F91A7 -:103420000C94CB190F931F9341E050E060E070E0E3 -:1034300004C0440F551F661F771F8A95D2F7409529 -:103440005095609570958091DE019091DF01A0917B -:10345000E001B091E1018A019B01082319232A238D -:103460003B23C901B8011F910F910C94CB190F9305 -:103470001F9341E050E060E070E004C0440F551F2E -:10348000661F771F8A95D2F78091DE019091DF0148 -:10349000A091E001B091E1018A019B010827192761 -:1034A0002A273B27C901B8011F910F910C94CB1912 -:1034B0000F931F930091DE011091DF012091E00135 -:1034C0003091E101602B712B822B932B1F910F9177 -:1034D0000C94CB190F931F930091DE011091DF0123 -:1034E0002091E0013091E101602371238223932335 -:1034F0001F910F910C94CB190F931F930091DE0134 -:103500001091DF012091E0013091E10160277127E6 -:10351000822793271F910F910C94CB1908952AE0CD -:10352000929F800D1124E82FE695E695E695877029 -:1035300051E001C0550F8A95EAF785E0E89FF00158 -:103540001124E653FE4F20E030E070E04081CB01D3 -:10355000022E02C0969587950A94E2F781708195B4 -:1035600084278523842781932F5F3F4F25303105A2 -:1035700069F708952AE0929F800D1124682F6695BF -:1035800066956695982F977085E0689FB001112425 -:1035900040E050E080E0FB01E40FF51FE653FE4FF2 -:1035A000208130E0092E02C0369527950A94E2F773 -:1035B00021703327042E01C0220F0A94EAF7822BD0 -:1035C0004F5F5F4F4530510531F70895CF92DF923D -:1035D000EF92FF920F931F93CF93DF938C01C090D4 -:1035E000DE01D090DF01E090E001F090E1018091F8 -:1035F000E2019091E301A091E401B091E501C82AB4 -:10360000D92AEA2AFB2ACFE1D0E0D701C6010C2E45 -:1036100004C0B695A795979587950A94D2F780FD33 -:1036200004C0219790F780E007C0B8018C2F0E945A -:10363000CE050197B1F38C2FDF91CF911F910F91A0 -:10364000FF90EF90DF90CF900895CF93DF93EC0140 -:103650000E94E61ABE010E94CE05DF91CF91089527 -:103660001F93CF93DF93EB0190919101992321F068 -:10367000CB010E94251B13C0882349F0CB010E9477 -:10368000E61A182F682FCE010E948F1A04C0CB01B2 -:103690000E94BA1A182FBE01812F0E94CE05DF9119 -:1036A000CF911F9108958091E60185958595859527 -:1036B00008958091E6018770089598E0899F9001B0 -:1036C0001124262B2093E6010C94F1192091E60198 -:1036D000809582238093E601982F977069F430E0FB -:1036E000482F082E000C550B2417350729F0859517 -:1036F000859585950C94121A08959091E60197701E -:1037000081E009F480E00895E0910D01F0910E014F -:1037100080910A028083E0910D01F0910E01908169 -:1037200080910902892B8083E0910D01F0910E01B7 -:10373000908180910802892B80838091E701882302 -:1037400081F0E0910D01F0910E019081892B808331 -:1037500080910D0190910E010E943A1C81111092EE -:10376000E70180910D0190910E010C942D10809134 -:103770000A02089590910A02892B80930A02089503 -:10378000809590910A02892380930A0208951092ED -:103790000A02089590910902892B809309020895E5 -:1037A00080959091090289238093090208951092CF -:1037B0000902089590910802892B809308020895C8 -:1037C00080959091080289238093080208951092B1 -:1037D000080208958093E70108951092E701089583 -:1037E0008091E70108956DEE7EEF80E090E00E9409 -:1037F000282C60E082E090E00E940A2C60E083E0E8 -:1038000090E00E940A2C60E084E090E00E940A2C84 -:1038100060E085E090E00E940A2C40E050E0BA01B0 -:1038200088E090E00C941C2C80E090E00E94042C36 -:1038300021E08D3E9E4F09F020E0822F089582E026 -:1038400090E00C94F62B682F82E090E00C940A2C08 -:1038500083E090E00C94F62B682F83E090E00C94CA -:103860000A2C84E090E00C94F62B682F84E090E022 -:103870000C940A2CFC0131969C01205E3F4F80E0A5 -:10388000919191118F5FE217F307D1F708959C0191 -:10389000FC0132969FEF80E04191461789F09F3FEF -:1038A00019F4411101C0982F8F5F8E31A9F79F3F06 -:1038B00039F0F901E90FF11D97FDFA95628308953A -:1038C00008959C01225E3F4FFC014281461301C0D6 -:1038D0001282019682179307B9F70895262F26952D -:1038E000269526952F3169F0FC01E20FF11D6770D6 -:1038F00021E030E001C0220F6A95EAF78181282B90 -:1039000021830895262F2695269526952F3171F02F -:10391000FC01E20FF11D677021E030E001C0220FD1 -:103920006A95EAF7209581812823218308952091C3 -:103930001F01222329F02091530227FD0C946E1CB5 -:103940000C94471C20911F01222329F0209153023F -:1039500027FD0C94821C0C94611CFC01319680960E -:103960001192E817F907E1F7089508950C94B51C32 -:103970000C94B51CCF930E94B81C0E94BF080E94F3 -:10398000B61CC0E08C2F0E948309892B29F4CF5FDD -:10399000C330C1F780E001C081E0CF9108950C945D -:1039A000B51C0C94CF1C0E94D11C8091590284300C -:1039B00049F110920C0220E488E190E00FB6F894EF -:1039C000A895809360000FBE2093600080E00E9465 -:1039D000F7020E94D11C83B7817F846083BF83B7C5 -:1039E000816083BF7894889583B78E7F83BF0FB63D -:1039F000F894A8958091600088618093600010928F -:103A000060000FBE08950C94B51C0E9489150E9499 -:103A100021100E94F7020C94031D1F920F920FB603 -:103A20000F9211248F939F93AF93BF9380910C02B9 -:103A3000811113C080914F0290915002A0915102C8 -:103A4000B09152024196A11DB11D80934F029093F7 -:103A50005002A0935102B0935202BF91AF919F9137 -:103A60008F910F900FBE0F901F90189582E084BD2C -:103A700093E095BD9AEF97BD80936E0008952FB7A0 -:103A8000F89480914F0290915002A0915102B09110 -:103A900052022FBF0895CF92DF92EF92FF920F93C1 -:103AA0001F932FB7F89440914F02509150026091AC -:103AB0005102709152022FBF6A017B01EE24FF2454 -:103AC0008C0120E030E0C016D106E206F30610F4C7 -:103AD000415051099A01281B390BC9011F910F91BF -:103AE000FF90EF90DF90CF90089578941F920F92FF -:103AF0000FB60F9211248F939F93AF93BF93809132 -:103B00004F0290915002A0915102B0915202019641 -:103B1000A11DB11D80934F0290935002A0935102BA -:103B2000B0935202BF91AF919F918F910F900FBEB2 -:103B30000F901F90189587E797E79093010880935F -:103B400000089AE088E10FB6F894A8958093600089 -:103B50000FBE90936000FFCFAF92BF92CF92DF92E3 -:103B6000EF92FF920F931F93CF93C0E0CC24C394A6 -:103B7000D12CE82EF12C8C2F0E9483095C0100E0EF -:103B800010E0C601002E02C0880F991F0A94E2F7C8 -:103B90008A219B21892B31F40F5F1F4F0A301105B9 -:103BA00081F70AC0602F7C2F80E00E94B305E816E1 -:103BB000F90691F781E004C0CF5FC330E1F680E001 -:103BC000CF911F910F91FF90EF90DF90CF90BF901A -:103BD000AF900895CF93C82F8CE20E94AC1D88232C -:103BE00021F08C2FCF910C94AC1D80E0CF910895E3 -:103BF000CF930E94141C811102C00E94F31BC5E6E2 -:103C0000C15049F00E94BF088FE39CE90197F1F78A -:103C100000C00000F5CF89E20E94EA1D81110FC1AA -:103C20008AE20E94EA1D81110E94F31B85E00E9436 -:103C3000EA1D81110E949B1D0E941F1C80930B0294 -:103C400087E00E94EA1D8823A9F18BE10E94EA1D0A -:103C5000882351F080910B0281FB222720F991E00B -:103C6000922790FB81F90EC08EE00E94EA1D882306 -:103C700061F080910B0282FB222720F991E09227CC -:103C800090FB82F980930B0215C080E10E94EA1D2F -:103C900090910B02882341F093FB222720F981E0C9 -:103CA000822780FB93F904C0892F809580FB90F9CF -:103CB00090930B0280910B020E94231C0E94311CE6 -:103CC00090E0909354028093530280EE0E94EA1D8C -:103CD000882341F080915302982F909590FB80F9B2 -:103CE0008093530289E30E94EA1D882359F0809152 -:103CF000530281FB222720F991E0922790FB81F962 -:103D00008093530282EE0E94EA1D882359F080912D -:103D1000530282FB222720F991E0922790FB82F93F -:103D20008093530286EE0E94EA1D882359F0809109 -:103D3000530283FB222720F991E0922790FB83F91D -:103D40008093530283EE0E94EA1D882359F08091EC -:103D5000530284FB222720F991E0922790FB84F9FB -:103D60008093530285E30E94EA1D882359F08091D5 -:103D7000530285FB222720F991E0922790FB85F9D9 -:103D80008093530281E30E94EA1D882359F08091B9 -:103D9000530286FB222720F991E0922790FB86F9B7 -:103DA0008093530281E10E94EA1D882359F080919B -:103DB000530287FB222720F991E0922790FB87F995 -:103DC00080935302809153020E94351C87E20E9427 -:103DD000EA1DC82F8EE10E94EA1D8111C2608FE1A9 -:103DE0000E94EA1D8111C46080E20E94EA1D8111D7 -:103DF000C86081E20E94EA1D8111C06182E20E94D6 -:103E0000EA1D8111C06283E20E94EA1D8111C06433 -:103E100084E20E94EA1D882311F0C06802C0CC230E -:103E200029F08C2F0E942C1C6C2F03C00E94281C90 -:103E3000682F70E080E090E0CF910C949119CF91C1 -:103E4000089580910F0280FF0BC06091120185E000 -:103E5000689FB001112475956795759567952BC07E -:103E600081FF09C06091120185E0689FB0011124B3 -:103E70007595679520C082FF07C06091120185E0AB -:103E8000689FB001112417C0909110029923D1F0BE -:103E900060911101961788F72091120185E0289F03 -:103EA00090011124929FA001939F500D112470E066 -:103EB000CA010E94CF2B6038710540F4611571056D -:103EC00019F406C065E070E0862F08958FE7089525 -:103ED00081E0089580910F0280FF08C06091100179 -:103EE00070E0759567957595679521C081FF06C04F -:103EF0006091100170E07595679519C082FF04C04C -:103F00006091100170E010C090911002992399F017 -:103F100060910F019617A0F780911001899FC00151 -:103F2000112470E00E94CF2B6038710540F46115B8 -:103F3000710519F406C061E070E0862F08958FE7DF -:103F4000089581E00895803F21F40E94211F81950A -:103F500004C0813F29F40E94211F80931302089519 -:103F6000823F21F40E94211F819504C0833F29F4E0 -:103F70000E94211F809312020895893F19F40E9424 -:103F80006A1F05C08A3F31F40E946A1F81958093A1 -:103F9000140208958B3F21F40E946A1F819504C08A -:103FA0008C3F29F40E946A1F809315020895843F74 -:103FB00021F480911102816017C0853F21F4809126 -:103FC0001102826011C0863F21F480911102846049 -:103FD0000BC0873F21F480911102886005C0883FA3 -:103FE00031F48091110280618093110208958D3F18 -:103FF00021F480910F0281600BC08E3F21F48091EB -:104000000F02826005C08F3F29F480910F02846007 -:1040100080930F020895803F39F48091130287FF47 -:104020006CC01092130269C0813F29F48091130281 -:104030001816BCF362C090911202823F29F497FFD8 -:104040005CC01092120259C0833F19F41916CCF3C8 -:1040500054C0893F41F48091140218160CF04DC0F1 -:10406000109214024AC08A3F29F48091140287FFFB -:1040700044C0F6CF8B3F39F48091150287FF3DC0D5 -:10408000109215023AC08C3F29F48091150218163F -:10409000BCF333C0843F21F4809111028E7F17C09E -:1040A000853F21F4809111028D7F11C0863F21F45C -:1040B000809111028B7F0BC0873F21F48091110208 -:1040C000877F05C0883F31F4809111028F7E8093F5 -:1040D000110213C08D3F21F480910F028E7F0BC01F -:1040E0008E3F21F480910F028D7F05C08F3F29F410 -:1040F00080910F028B7F80930F02809112028111B9 -:104100000EC08091130281110AC0809114028111A6 -:1041100006C080911502811102C01092100208950C -:1041200081E192E00E9438100E943F1D90930E02A0 -:1041300080930D0208951F93CF93DF9380910D021A -:1041400090910E020E944B1DAC0190911002992398 -:1041500021F02091130130E006C0209114018AE083 -:10416000289F900111244217530708F477C08091CB -:104170001202C0911302D091140210911502811104 -:1041800007C0C11167C0D11165C0111163C066C0FD -:104190009F3F19F09F5F90931002181624F40E941D -:1041A000211F809312028091120287FF05C00E9496 -:1041B000211F8195809312021C1624F40E94211F56 -:1041C000809313028091130287FF05C00E94211F74 -:1041D000819580931302309112023323C1F0209114 -:1041E00013022223A1F045EB3403C0011124892FCF -:1041F000911101C081E08093120235EB2303C001CD -:104200001124892F911101C081E0809313021D16A2 -:1042100024F40E946A1F809314028091140287FF85 -:1042200005C00E946A1F819580931402111624F420 -:104230000E946A1F809315028091150287FF05C0B6 -:104240000E946A1F819580931502DF91CF911F9183 -:104250000C9490209F3F09F09DCFAECFDF91CF917E -:104260001F910895E1E1F2E085E0DF011D928A955A -:10427000E9F71092100210920F0208958091360211 -:1042800008950F931F93CF93DF9300D01F92CDB764 -:10429000DEB78C010E94B723823011F0843019F50B -:1042A00083E089831B830A838093E9008FEF9091D9 -:1042B000E800815095FD06C095ED9A95F1F7000054 -:1042C0008111F5CF8091E80085FF0DC040E050E0FE -:1042D00063E070E0CE0101960E94D4238091E80053 -:1042E0008E778093E8000F900F900F90DF91CF9121 -:1042F0001F910F910895CF93DF9300D01F92CDB7F8 -:10430000DEB720915902243031F522E0298380580C -:1043100091099B838A8383E08093E9008FEF9091DA -:10432000E800815095FD06C095ED9A95F1F70000E3 -:104330008111F5CF8091E80085FF0DC040E050E08D -:1043400063E070E0CE0101960E94D4238091E800E2 -:104350008E778093E8000F900F900F90DF91CF91B0 -:104360000895CF93DF93EC010E94B723823011F0C0 -:104370008430F9F482E08093E9008FEF9091E800B7 -:10438000815095FD06C095ED9A95F1F700008111D9 -:10439000F5CF8091E80085FF0CC040E050E065E07B -:1043A00070E0CE010E94D4238091E8008E77809344 -:1043B000E800DF91CF910895CF93DF93EC010E9445 -:1043C000B723823019F0843009F047C080911F0173 -:1043D0008823E1F08091530287FF18C084E0809326 -:1043E000E9008FEF9091E800815095FD06C095E1BE -:1043F0009A95F1F700008111F5CF8091E80085FFD3 -:104400002CC040E050E060E270E017C081E0809393 -:10441000E9008FEF9091E800815095FD06C095ED81 -:104420009A95F1F700008111F5CF8091E80085FFA2 -:1044300014C040E050E068E070E0CE010E94D42358 -:104440008091E8008E778093E80080E2FE01A6E18B -:10445000B2E001900D928A95E1F7DF91CF91089536 -:1044600080915802811109C00E9465250E94C225D1 -:104470008091E20084608093E200089510925802D7 -:104480000895089508950C94051D42E061EC81E0C3 -:104490000E94DE2442E061EC82E00E94DE2442E0E1 -:1044A00061EC83E00E94DE2442E261EC84E00C9443 -:1044B000DE2480915B02833009F455C030F48130F2 -:1044C00071F0823009F48EC008958A3009F47AC000 -:1044D0008B3009F460C0893009F09CC020C0809105 -:1044E0005A02813A09F096C08091E800877F809354 -:1044F000E80080915E0290915F02892B21F460E2D6 -:1045000086E192E003C060E080E090E070E00E940D -:104510001F248091E8008B778093E80008958091B4 -:104520005A02813209F076C080915E0290915F025A -:10453000009719F0039709F06DC08091E800877F1C -:104540008093E8008091E80082FD05C080915902C7 -:104550008111F8CF5FC08091F10080933602809185 -:10456000E8008B7753C080915A02813A09F052C01B -:1045700080915E0290915F02892B09F04BC080917F -:10458000E800877F8093E8008091E80080FFFCCFFF -:1045900080911F0136C080915A028132D9F58091F5 -:1045A0005E0290915F02892BA9F58091E800877FD8 -:1045B0008093E8000E94132580915C0280931F0184 -:1045C0000C94891580915A02813221F58091E8007E -:1045D000877F8093E8000E94132580915D0280937D -:1045E0003702089580915A02813AA1F48091E8003F -:1045F000877F8093E8008091E80080FFFCCF809166 -:1046000037028093F1008091E8008E778093E80074 -:104610000C941325089584B7877F84BF0FB6F89450 -:10462000A89580916000886180936000109260007E -:104630000FBE80E880936100109261000E947010AC -:104640000E9465250E94C2258091E20084608093CB -:10465000E20078940E9457280E94741085E191E04E -:104660000E941C1080915902853069F40E94D31C6D -:10467000809157028823B1F30E94BA1C882391F3DA -:104680000E94BE23EFCF0E9482100E94A70FEACFA4 -:104690000C944A23292F332723303105C9F060F4C5 -:1046A0002130310581F02230310509F047C08DE617 -:1046B00090E022EC33E046C02132310511F1223284 -:1046C000310561F13BC082E190E02FE234E03AC075 -:1046D00099278130910561F040F08230910559F0C1 -:1046E000039761F5ECE9F3E008C0EEEBF3E005C0F9 -:1046F000E0EBF3E002C0E2EAF3E0849190E09F0196 -:1047000021C064307105D0F4660F771FFB01E75CB0 -:10471000FE4F2081318189E090E014C06430710542 -:1047200068F4FB01EE0FFF1FEF5CFE4F208131812B -:10473000FB01E35DFE4F808190E004C080E090E0EB -:1047400020E030E0FA013183208308950895CF936B -:10475000C82F0E94A623C0933802CF91089580915C -:104760005902843011F081E0089582E0089580912B -:104770003802811102C00C94AF23089580E189BDF5 -:1047800082E189BD09B400FEFDCF8091D8008F7D04 -:104790008093D8008091E00082608093E000809157 -:1047A000E00081FDFCCF0895CF92DF92EF92FF925F -:1047B0000F931F93CF93DF93EC018B017A010E943B -:1047C0003225811133C0E114F10439F0F701808101 -:1047D0009181081B190BC80FD91FC12CD12C0115B1 -:1047E000110519F18091E80085FD16C08091E8005F -:1047F0008E778093E800E114F10449F0F70180819D -:104800009181C80ED91ED182C08285E00FC00E945E -:104810003225882321F30AC089918093F100015049 -:104820001109FFEFCF1ADF0ADACF80E0DF91CF91D5 -:104830001F910F91FF90EF90DF90CF9008952091FE -:104840006002309161022617370748F06115710543 -:1048500039F42091E8002E772093E80001C0B901D7 -:10486000FC0120E06115710579F1809159028823DE -:10487000F1F18530F1F18091E80083FD3CC0809139 -:10488000E80082FD2EC08091E80080FFEBCF2091F0 -:10489000F3008091F20090E0922B6115710551F0C8 -:1048A0008830910538F421912093F100615071090D -:1048B0000196F3CF21E0089709F020E08091E8000D -:1048C0008E778093E800CECF2111CFCF0AC08091A0 -:1048D0005902882361F0853061F08091E80083FD02 -:1048E0000AC08091E80082FFF2CF80E0089582E064 -:1048F000089583E0089581E0089520916002309149 -:1049000061022617370748F06115710539F42091C7 -:10491000E8002E772093E80001C0B901FC0120E0F7 -:104920006115710591F180915902882309F440C005 -:10493000853009F43FC08091E80083FD3DC080913F -:10494000E80082FD2FC08091E80080FFE9CF209130 -:10495000F3008091F20090E0922B6115710559F0FF -:104960008830910540F424912093F10031966150F4 -:1049700071090196F2CF21E0089709F020E08091BB -:10498000E8008E778093E800CBCF2111CCCF0AC00E -:1049900080915902882361F0853061F08091E800B0 -:1049A00083FD0AC08091E80082FFF2CF80E0089585 -:1049B00082E0089583E0089581E00895982F97306C -:1049C00068F59093E900981739F07091EC00209108 -:1049D000ED005091F00003C0242F762F50E021FD10 -:1049E00002C09F5FECCF3091EB003E7F3093EB0035 -:1049F0003091ED003D7F3093ED003091EB00316060 -:104A00003093EB007093EC002093ED005093F00096 -:104A10002091EE0027FDE5CF80E008958F70809310 -:104A2000E90081E0089580915A0287FF11C08091CA -:104A3000E80082FD05C0809159028111F8CF11C0B4 -:104A40008091E8008B770BC080915902882349F050 -:104A50008091E80080FFF8CF8091E8008E77809306 -:104A6000E80008952091E4003091E50095E640913A -:104A7000EC00842F817040FF23C08091E80080FD0E -:104A80001DC080915902882399F0853099F080915A -:104A9000EB0085FD11C04091E4005091E500241722 -:104AA000350729F3915011F09A01E1CF84E0089580 -:104AB00082E0089583E0089581E0089580E00895FC -:104AC0004091E80042FFDDCF08950E94D3250E9467 -:104AD000DB25E0EEF0E0808181608083E8EDF0E0AE -:104AE00080818F77808319BCA7EDB0E08C918E7F99 -:104AF0008C9380818F7E80831092580208950F934B -:104B00001F93CF93DF930E94D3250E94DB25C8ED2E -:104B1000D0E088818F7788838881806888838881C6 -:104B20008F7D888319BC1092590210925502109201 -:104B300057021092560200EE10E0F80180818B7F40 -:104B4000808388818160888342E060E080E00E9409 -:104B5000DE24E1EEF0E080818E7F8083E2EEF0E003 -:104B6000808181608083808188608083F80180817A -:104B70008E7F8083888180618883DF91CF911F91B0 -:104B80000F910895E8EDF0E080818F7E8083E7ED5E -:104B9000F0E080818160808384E082BF81E0809347 -:104BA00058020C947F25E8EDF0E080818E7F8083B1 -:104BB0001092E20008951092DA001092E100089538 -:104BC0001F920F920FB60F9211242F933F934F9382 -:104BD0005F936F937F938F939F93AF93BF93EF9365 -:104BE000FF938091E10082FF0BC08091E20082FF81 -:104BF00007C08091E1008B7F8093E1000E945628DE -:104C00008091DA0080FF1FC08091D80080FF1BC018 -:104C10008091DA008E7F8093DA008091D90080FF46 -:104C20000DC080E189BD82E189BD09B400FEFDCFE0 -:104C300081E0809359020E94302205C019BC109275 -:104C400059020E943E228091E10080FF19C08091AC -:104C5000E20080FF15C08091E2008E7F8093E20029 -:104C60008091E20080618093E2008091D8008062B0 -:104C70008093D80019BC85E0809359020E9442229B -:104C80008091E10084FF30C08091E20084FF2CC05D -:104C900080E189BD82E189BD09B400FEFDCF80912C -:104CA000D8008F7D8093D8008091E1008F7E809323 -:104CB000E1008091E2008F7E8093E2008091E2002B -:104CC00081608093E20080915502882311F084E096 -:104CD00007C08091E30087FD02C081E001C083E04E -:104CE000809359020E9443228091E10083FF29C0F2 -:104CF0008091E20083FF25C08091E100877F80934F -:104D0000E10082E080935902109255028091E10007 -:104D10008E7F8093E1008091E2008E7F8093E2009D -:104D20008091E20080618093E20042E060E080E0F8 -:104D30000E94DE248091F00088608093F0000E9441 -:104D40004122FF91EF91BF91AF919F918F917F9100 -:104D50006F915F914F913F912F910F900FBE0F90E8 -:104D60001F9018951F920F920FB60F9211242F9338 -:104D70003F934F935F936F937F938F939F93AF93E3 -:104D8000BF93CF93DF93EF93FF93C091E900CF7070 -:104D90008091EC00D82FD17080FDD0E81092E9000E -:104DA0008091F000877F8093F00078940E94F6262F -:104DB0001092E9008091F00088608093F000CD2B84 -:104DC000CF70C093E900FF91EF91DF91CF91BF9138 -:104DD000AF919F918F917F916F915F914F913F9193 -:104DE0002F910F900FBE0F901F9018951F93CF9388 -:104DF000DF93CDB7DEB7AA970FB6F894DEBF0FBE2C -:104E0000CDBFEAE5F2E08091F100819322E0E23645 -:104E1000F207C9F70E9459228091E80083FF2EC152 -:104E200080915A0290915B02492F50E04A3051051F -:104E300008F024C1FA01E556FF4F0C94E32B8038AB -:104E400021F0823809F01AC108C080915602909171 -:104E50005702992389F082600FC080915E028F70A3 -:104E6000873008F00BC18093E9008091EB0085FB4F -:104E7000882780F91092E9009091E800977F90933D -:104E8000E8008093F1001092F100D1C0282F2D7F0F -:104E900009F0F4C0882319F0823061F0EFC08091EE -:104EA0005C02813009F0EAC0933009F080E0809321 -:104EB00057022EC080915C0281112AC080915E024F -:104EC0008F702FEF280F263008F0D8C08093E900AC -:104ED0002091EB0020FF1CC0933021F48091EB0067 -:104EE000806214C09091EB0090619093EB0021E000 -:104EF00030E0A90102C0440F551F8A95E2F74093A4 -:104F0000EA001092EA008091EB0088608093EB0049 -:104F10001092E9008091E800877F8093E8000E946A -:104F20001325ACC08111AAC010915C021F7780913B -:104F3000E3008078812B8093E3008091E800877FF5 -:104F40008093E8000E9413258091E80080FFFCCF49 -:104F50008091E30080688093E300111102C082E039 -:104F600001C083E08093590289C08058823008F0E4 -:104F700085C080915C0290915D028C3D53E0950765 -:104F800079F583E08A838AE289834FB7F894DE015A -:104F9000139620E03EE051E2E32FF0E050935700FB -:104FA000E49120FF03C0E295EF703F5FEF708E2F1A -:104FB00090E0EA3010F0C79601C0C0968D939D93A3 -:104FC0002F5F243149F74FBF8091E800877F80939E -:104FD000E8006AE270E0CE0101960E941F2416C02C -:104FE00060915E0270915F02AE014F5F5F4F0E9461 -:104FF0004823BC01892B09F441C09091E800977FB8 -:105000009093E80089819A810E947D248091E80034 -:105010008B778093E80032C0803881F58091E8007A -:10502000877F8093E800809155028093F100809102 -:10503000E8008E7772CF811121C080915C0290913F -:105040005D0299270297D4F48091E800877F8093CE -:10505000E80080915C02809355020E9413258091A4 -:105060005502811106C08091E30087FD02C081E0F6 -:1050700001C084E0809359020E9445228091E8009B -:1050800083FF0AC08091E800877F8093E8008091C9 -:10509000EB0080628093EB00AA960FB6F894DEBF17 -:1050A0000FBECDBFDF91CF911F9108950895CF938B -:1050B000809159028823A1F0C091E900CF709091AE -:1050C000EC00892F817090FD80E8C82B1092E900D8 -:1050D0008091E80083FD0E94F626CF70C093E9001E -:1050E000CF9108955058BB27AA270E948A280C9474 -:1050F000352A0E94272A38F00E942E2A20F039F4FF -:105100009F3F19F426F40C94FD290EF4E095E7FB7B -:105110000C94F729E92F0E94462A58F3BA17620720 -:1051200073078407950720F079F4A6F50C94682A94 -:105130000EF4E0950B2EBA2FA02D0B01B9019001B2 -:105140000C01CA01A0011124FF27591B99F0593FF6 -:1051500050F4503E68F11A16F040A22F232F342F3E -:105160004427585FF3CF469537952795A795F0408C -:105170005395C9F77EF41F16BA0B620B730B840BA1 -:10518000BAF09150A1F0FF0FBB1F661F771F881F59 -:10519000C2F70EC0BA0F621F731F841F48F48795B1 -:1051A00077956795B795F7959E3F08F0B0CF9395A3 -:1051B000880F08F09927EE0F9795879508950E941C -:1051C000F3280C94352A0E942E2A58F00E94272A90 -:1051D00040F029F45F3F29F00C94F72951110C9409 -:1051E000692A0C94FD290E94462A68F39923B1F399 -:1051F000552391F3951B550BBB27AA2762177307FD -:10520000840738F09F5F5F4F220F331F441FAA1F90 -:10521000A9F335D00E2E3AF0E0E832D0915050404C -:10522000E695001CCAF72BD0FE2F29D0660F771FFA -:10523000881FBB1F261737074807AB07B0E809F0E0 -:10524000BB0B802DBF01FF2793585F4F3AF09E3F65 -:10525000510578F00C94F7290C94692A5F3FE4F328 -:10526000983ED4F3869577956795B795F7959F5FA8 -:10527000C9F7880F911D9695879597F90895E1E0F4 -:10528000660F771F881FBB1F621773078407BA0753 -:1052900020F0621B730B840BBA0BEE1F88F7E095AE -:1052A000089529F416F00C94F7290C94682A0C94AC -:1052B000FD290E944E2AA8F39638A0F707F80F920E -:1052C000E8942BE33AEA48EB5FE70E94FB2A0F924F -:1052D0000F920F924DB75EB70F920E94B12AEAE487 -:1052E000F1E00E94002A4F915F91EF91FF91E595C7 -:1052F000EE1FFF1F49F0FE57E0684427EE0F441FE2 -:10530000FA95E1F74195550B0E947B2A0F9007FE15 -:105310000C946F2A08950E944E2A88F09F5798F0A7 -:10532000B92F9927B751B0F0E1F0660F771F881FAA -:10533000991F1AF0BA95C9F714C0B13091F00E94C4 -:10534000682AB1E008950C94682A672F782F88277F -:10535000B85F39F0B93FCCF3869577956795B395EB -:10536000D9F73EF490958095709561957F4F8F4F5A -:105370009F4F0895E89409C097FB3EF4909580955F -:10538000709561957F4F8F4F9F4F9923A9F0F92F0B -:1053900096E9BB279395F695879577956795B79589 -:1053A000F111F8CFFAF4BB0F11F460FF1BC06F5F6F -:1053B0007F4F8F4F9F4F16C0882311F096E911C081 -:1053C000772321F09EE8872F762F05C0662371F0A2 -:1053D00096E8862F70E060E02AF09A95660F771FB6 -:1053E000881FDAF7880F9695879597F9089597F9AA -:1053F0009F6780E870E060E008959FEF80EC08957B -:10540000DF93CF931F930F93FF92EF92DF927B0175 -:105410008C01689406C0DA2EEF010E94F82AFE0182 -:10542000E894A5912591359145915591A6F3EF0109 -:105430000E948A28FE019701A801DA9469F7DF909B -:10544000EF90FF900F911F91CF91DF91089500246D -:105450000A941616170618060906089500240A94D9 -:1054600012161306140605060895092E0394000C5F -:1054700011F4882352F0BB0F40F4BF2B11F460FFEE -:1054800004C06F5F7F4F8F4F9F4F089557FD905817 -:10549000440F551F59F05F3F71F04795880F97FBF8 -:1054A000991F61F09F3F79F08795089512161306B2 -:1054B0001406551FF2CF4695F1DF08C016161706E1 -:1054C0001806991FF1CF8695710561050894089516 -:1054D000E894BB2766277727CB0197F908959B01AE -:1054E000AC0160E070E080E89FE30C94DF280C944E -:1054F000F7290C945A2B0E944E2AD8F39923C9F30A -:10550000940F511DA3F39150504094F059F088230B -:1055100032F0660F771F881F91505040C1F79E3FB1 -:1055200051052CF7880F911D9695879597F9089549 -:105530005F3FACF0983E9CF0BB27869577956795CA -:10554000B79508F4B1609395C1F7BB0F58F711F404 -:1055500060FFE8CF6F5F7F4F8F4F9F4FE3CF0C947B -:10556000692AFA01DC01AA0FBB1F9B01AC01BF57DE -:1055700028F4222733274427507820C0B75190F4CD -:10558000AB2F0024469537952795011CA395D2F3A0 -:10559000002071F0220F331F441FB395DAF30ED0B1 -:1055A0000C94722861307105A0E88A07B94630F47E -:1055B0009B01AC016627772788279078309621F0E9 -:1055C000208331834283538308950E94F82A0C94E8 -:1055D000352A0E94272A38F00E942E2A20F095238F -:1055E00011F00C94F7290C94FD2911240C94692ACC -:1055F0000E94462A70F3959FC1F3950F50E0551F06 -:10560000629FF001729FBB27F00DB11D639FAA2717 -:10561000F00DB11DAA1F649F6627B00DA11D661F66 -:10562000829F2227B00DA11D621F739FB00DA11D87 -:10563000621F839FA00D611D221F749F3327A00D41 -:10564000611D231F849F600D211D822F762F6A2FDD -:1056500011249F5750409AF0F1F088234AF0EE0F42 -:10566000FF1FBB1F661F771F881F91505040A9F76F -:105670009E3F510580F00C94F7290C94692A5F3FF6 -:10568000E4F3983ED4F3869577956795B795F795AB -:10569000E7959F5FC1F7FE2B880F911D9695879523 -:1056A00097F908959F930E946A2B0F9007FCEE5F75 -:1056B0000C94932B9F3F31F0915020F48795779570 -:1056C0006795B795880F911D9695879597F90895D9 -:1056D0000C94FD290E944E2AD8F3E894E0E0BB2701 -:1056E0009F57F0F02AED3FE049EC06C0EE0FBB0FEC -:1056F000661F771F881F28F0B23A62077307840776 -:1057000028F0B25A620B730B840BE3959A9572F7EB -:10571000803830F49A95BB0F661F771F881FD2F729 -:1057200090480C945C2BEF93E0FF07C0A2EA2AEDAF -:105730003FE049EC5FEB0E948A280E94352A0F90D7 -:10574000039401FC9058E2E7F1E00C94A72B9F939F -:105750008F937F936F93FF93EF939B01AC010E9414 -:10576000E52AEF91FF910E94002A2F913F914F91DE -:105770005F910C94E52AAA1BBB1B51E107C0AA1F2D -:10578000BB1FA617B70710F0A61BB70B881F991FE2 -:105790005A95A9F780959095BC01CD01089597FB86 -:1057A000072E16F4009407D077FD09D00E94BB2B7A -:1057B00007FC05D03EF4909581959F4F0895709514 -:1057C00061957F4F0895EE0FFF1F0590F491E02D36 -:1057D0000994FC014150504030F001900616D1F779 -:1057E0003197CF010895882799270895F999FECF19 -:1057F00092BD81BDF89A992780B50895A6E1B0E0E1 -:1058000044E050E00C94302CA8E1B0E042E050E0DD -:105810000C94302C262FF999FECF92BD81BDF89AB9 -:10582000019700B4021639F01FBA20BD0FB6F894E4 -:10583000FA9AF99A0FBE08950396272F0E940B2C0F -:105840000E940A2C252F0E940B2C242F0C940B2C29 -:105850000196272F0E940B2C0C940A2CDC01CB0103 -:10586000FC01F999FECF06C0F2BDE1BDF89A319670 -:1058700000B40D9241505040B8F70895F894FFCF0E -:10588000010201191A1B1C1D1E1F202122E80128DC -:1058900008140A321E3E21DC21B1217B2141210165 -:1058A00097C66636323331F7F6F5943435404D36C7 -:1058B00039FD04B0047A044104D403ED0306041F47 -:0258C0000400E2 -:00000001FF diff --git a/keyboards/alpha/rules.mk b/keyboards/alpha/rules.mk index 61ea958d7e4b..13a720d8c1a3 100755 --- a/keyboards/alpha/rules.mk +++ b/keyboards/alpha/rules.mk @@ -1,46 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - # Build Options # comment out to disable the options. # diff --git a/keyboards/alu84/rules.mk b/keyboards/alu84/rules.mk index 14d3e70898f2..680b13dc07da 100755 --- a/keyboards/alu84/rules.mk +++ b/keyboards/alu84/rules.mk @@ -1,45 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. @@ -53,4 +23,4 @@ SLEEP_LED_ENABLE ?= yes # 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 +RGBLIGHT_ENABLE ?= yes diff --git a/keyboards/amj40/rules.mk b/keyboards/amj40/rules.mk index b9f70de0f175..423e66aeef61 100755 --- a/keyboards/amj40/rules.mk +++ b/keyboards/amj40/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. diff --git a/keyboards/amj60/rules.mk b/keyboards/amj60/rules.mk index 0e9f17d260a4..bccdd668113b 100644 --- a/keyboards/amj60/rules.mk +++ b/keyboards/amj60/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. diff --git a/keyboards/amj96/rules.mk b/keyboards/amj96/rules.mk index a90f0e75a85f..52f610d7d5c1 100644 --- a/keyboards/amj96/rules.mk +++ b/keyboards/amj96/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable diff --git a/keyboards/amjkeyboard/amj66/rules.mk b/keyboards/amjkeyboard/amj66/rules.mk index 80734a990441..4102c0eb2886 100644 --- a/keyboards/amjkeyboard/amj66/rules.mk +++ b/keyboards/amjkeyboard/amj66/rules.mk @@ -1,53 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - # Build Options # change yes to no to disable # diff --git a/keyboards/amjpad/rules.mk b/keyboards/amjpad/rules.mk index 853bbf956fec..fe28924852d7 100644 --- a/keyboards/amjpad/rules.mk +++ b/keyboards/amjpad/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. diff --git a/keyboards/angel17/rules.mk b/keyboards/angel17/rules.mk index dd54bd525f78..ca2563a6e27a 100644 --- a/keyboards/angel17/rules.mk +++ b/keyboards/angel17/rules.mk @@ -1,27 +1,16 @@ # MCU name MCU = atmega32u4 - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/angel64/rules.mk b/keyboards/angel64/rules.mk index 06169e8df925..4242ac2eee68 100644 --- a/keyboards/angel64/rules.mk +++ b/keyboards/angel64/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/at101_blackheart/rules.mk b/keyboards/at101_blackheart/rules.mk index fadff6f23bed..d8cfbd289fd2 100644 --- a/keyboards/at101_blackheart/rules.mk +++ b/keyboards/at101_blackheart/rules.mk @@ -1,49 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = halfkay -# Boot Section Size in *bytes* -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # comment out to disable the options. # @@ -56,4 +23,4 @@ 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 = no # Enable keyboard backlight functionality AUDIO_ENABLE = no -RGBLIGHT_ENABLE = no \ No newline at end of file +RGBLIGHT_ENABLE = no diff --git a/keyboards/atomic/rules.mk b/keyboards/atomic/rules.mk index 2f9e2e71322a..8ccbcb11b4ad 100644 --- a/keyboards/atomic/rules.mk +++ b/keyboards/atomic/rules.mk @@ -1,49 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change to "no" to disable the options, or define them in the Makefile in diff --git a/keyboards/atreus/astar/rules.mk b/keyboards/atreus/astar/rules.mk index dc6f19623730..e6fef517279c 100644 --- a/keyboards/atreus/astar/rules.mk +++ b/keyboards/atreus/astar/rules.mk @@ -1,58 +1,12 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 diff --git a/keyboards/atreus/teensy2/rules.mk b/keyboards/atreus/teensy2/rules.mk index 3fb7c7e5a7e4..ae398e2588c7 100644 --- a/keyboards/atreus/teensy2/rules.mk +++ b/keyboards/atreus/teensy2/rules.mk @@ -1,58 +1,12 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = halfkay - - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 diff --git a/keyboards/atreus62/rules.mk b/keyboards/atreus62/rules.mk index c9edfce0af81..323976c2c25e 100644 --- a/keyboards/atreus62/rules.mk +++ b/keyboards/atreus62/rules.mk @@ -1,47 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically diff --git a/keyboards/baguette/rules.mk b/keyboards/baguette/rules.mk index de88b9798b48..351322b859bf 100644 --- a/keyboards/baguette/rules.mk +++ b/keyboards/baguette/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/bantam44/rules.mk b/keyboards/bantam44/rules.mk index cebe7f46407b..a15b451f31a4 100644 --- a/keyboards/bantam44/rules.mk +++ b/keyboards/bantam44/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=512 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = halfkay # Build Options # comment out to disable the options. diff --git a/keyboards/bigswitch/rules.mk b/keyboards/bigswitch/rules.mk index e4e72f09a2ea..14cc0c85b3b9 100755 --- a/keyboards/bigswitch/rules.mk +++ b/keyboards/bigswitch/rules.mk @@ -1,49 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # comment out to disable the options. # diff --git a/keyboards/blockey/rules.mk b/keyboards/blockey/rules.mk index cea24f83276c..83bc96c11f5e 100644 --- a/keyboards/blockey/rules.mk +++ b/keyboards/blockey/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina # Build Options # change yes to no to disable diff --git a/keyboards/bm16a/rules.mk b/keyboards/bm16a/rules.mk index 013dac3c90a1..50f0ff12110b 100644 --- a/keyboards/bm16a/rules.mk +++ b/keyboards/bm16a/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/bm16s/rules.mk b/keyboards/bm16s/rules.mk index f4f1dfd639b9..23573664db53 100755 --- a/keyboards/bm16s/rules.mk +++ b/keyboards/bm16s/rules.mk @@ -1,60 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# 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. # @@ -69,4 +25,4 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality AUDIO_ENABLE = no RGBLIGHT_ENABLE = yes -LAYOUTS = ortho_4x4 \ No newline at end of file +LAYOUTS = ortho_4x4 diff --git a/keyboards/boardwalk/rules.mk b/keyboards/boardwalk/rules.mk index 0a02497bc3bb..215dfe34ee8b 100644 --- a/keyboards/boardwalk/rules.mk +++ b/keyboards/boardwalk/rules.mk @@ -1,48 +1,14 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu # QMK Build Options diff --git a/keyboards/bpiphany/sixshooter/rules.mk b/keyboards/bpiphany/sixshooter/rules.mk index 5bf8d21650fd..ad76051eb2bc 100644 --- a/keyboards/bpiphany/sixshooter/rules.mk +++ b/keyboards/bpiphany/sixshooter/rules.mk @@ -1,49 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = halfkay - # Build Options # change yes to no to disable # diff --git a/keyboards/bthlabs/geekpad/rules.mk b/keyboards/bthlabs/geekpad/rules.mk index f51259b2910e..e05730c69e66 100644 --- a/keyboards/bthlabs/geekpad/rules.mk +++ b/keyboards/bthlabs/geekpad/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/business_card/alpha/rules.mk b/keyboards/business_card/alpha/rules.mk index 8bb38a51426b..e03f942e9d4e 100644 --- a/keyboards/business_card/alpha/rules.mk +++ b/keyboards/business_card/alpha/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/business_card/beta/rules.mk b/keyboards/business_card/beta/rules.mk index 8bb38a51426b..e03f942e9d4e 100644 --- a/keyboards/business_card/beta/rules.mk +++ b/keyboards/business_card/beta/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/business_card/rules.mk b/keyboards/business_card/rules.mk index d0b8a2367a09..7e37685de6d6 100644 --- a/keyboards/business_card/rules.mk +++ b/keyboards/business_card/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/butterstick/keymaps/default/rules.mk b/keyboards/butterstick/keymaps/default/rules.mk deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/keyboards/butterstick/rules.mk b/keyboards/butterstick/rules.mk index 68b117bf590a..764e7d6aa284 100644 --- a/keyboards/butterstick/rules.mk +++ b/keyboards/butterstick/rules.mk @@ -1,15 +1,16 @@ # MCU name MCU = atmega32u4 -F_CPU = 16000000 -ARCH = AVR8 -F_USB = $(F_CPU) - -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT -DONLYQWERTY -DDEBUG_MATRIX -SRC += sten.c -EXTRAFLAGS += -flto - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu + MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) @@ -17,3 +18,6 @@ COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover STENO_ENABLE = yes # Needed for chording +OPT_DEFS += -DONLYQWERTY -DDEBUG_MATRIX +SRC += sten.c +EXTRAFLAGS += -flto diff --git a/keyboards/c39/rules.mk b/keyboards/c39/rules.mk index 8fcb089817ce..c7a902045a00 100755 --- a/keyboards/c39/rules.mk +++ b/keyboards/c39/rules.mk @@ -1,50 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina # Build Options # change yes to no to disable diff --git a/keyboards/catch22/rules.mk b/keyboards/catch22/rules.mk index 2b76e465cfc0..227117b76668 100644 --- a/keyboards/catch22/rules.mk +++ b/keyboards/catch22/rules.mk @@ -1,49 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -#OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # comment out to disable the options. # @@ -57,4 +24,3 @@ NKRO_ENABLE = no # USB Nkey Rollover - if this doesn't work, see here: https:/ BACKLIGHT_ENABLE = no # Custom backlighting code is used, so this should not be enabled AUDIO_ENABLE = no # This can be enabled if a speaker is connected to the expansion port. Not compatible with RGBLIGHT below RGBLIGHT_ENABLE = yes # This can be enabled if a ws2812 strip is connected to the expansion port. - diff --git a/keyboards/chimera_ergo/rules.mk b/keyboards/chimera_ergo/rules.mk index 0903e5e3864a..0e26588e371f 100644 --- a/keyboards/chimera_ergo/rules.mk +++ b/keyboards/chimera_ergo/rules.mk @@ -1,66 +1,16 @@ - -OPT_DEFS += -DCHIMERA_ERGO_PROMICRO -CHIMERA_ERGO_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \ - avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB) - -# # project specific files -SRC = matrix.c - - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# 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. # @@ -78,4 +28,12 @@ NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA UNICODE_ENABLE = YES # Unicode # BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID + +OPT_DEFS += -DCHIMERA_ERGO_PROMICRO +CHIMERA_ERGO_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \ + avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB) + +# # project specific files +SRC = matrix.c + USB = /dev/ttyACM0 diff --git a/keyboards/chimera_ls/rules.mk b/keyboards/chimera_ls/rules.mk index bc3e4a865e0d..5060b9ebfca2 100644 --- a/keyboards/chimera_ls/rules.mk +++ b/keyboards/chimera_ls/rules.mk @@ -1,66 +1,16 @@ - -OPT_DEFS += -DCHIMERA_LS_PROMICRO -CHIMERA_LS_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \ - avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB) - -# # project specific files -SRC = matrix.c - - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# 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. # @@ -80,4 +30,11 @@ UNICODE_ENABLE = YES # Unicode USB = /dev/ttyACM0 +OPT_DEFS += -DCHIMERA_LS_PROMICRO +CHIMERA_LS_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \ + avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB) + +# project specific files +SRC = matrix.c + LAYOUTS = ortho_4x12 diff --git a/keyboards/chimera_ortho/rules.mk b/keyboards/chimera_ortho/rules.mk index c4ff50dd2f90..549f311496a7 100644 --- a/keyboards/chimera_ortho/rules.mk +++ b/keyboards/chimera_ortho/rules.mk @@ -1,57 +1,16 @@ - -OPT_DEFS += -DCHIMERA_ORTHO_PROMICRO -CHIMERA_ORTHO_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \ - avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB) - -# # project specific files -SRC = matrix.c - - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # comment out to disable the options. # @@ -70,3 +29,10 @@ UNICODE_ENABLE = YES # Unicode # BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID USB = /dev/ttyACM0 + +OPT_DEFS += -DCHIMERA_ORTHO_PROMICRO +CHIMERA_ORTHO_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \ + avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB) + +# project specific files +SRC = matrix.c diff --git a/keyboards/choco60/rules.mk b/keyboards/choco60/rules.mk index 343469db2b33..65b98b73b6c1 100644 --- a/keyboards/choco60/rules.mk +++ b/keyboards/choco60/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/christmas_tree/keymaps/default/rules.mk b/keyboards/christmas_tree/keymaps/default/rules.mk deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/keyboards/christmas_tree/rules.mk b/keyboards/christmas_tree/rules.mk index ec73e527b565..7e5269baf0f8 100644 --- a/keyboards/christmas_tree/rules.mk +++ b/keyboards/christmas_tree/rules.mk @@ -1,49 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina # Build Options # change to "no" to disable the options, or define them in the Makefile in diff --git a/keyboards/ckeys/handwire_101/rules.mk b/keyboards/ckeys/handwire_101/rules.mk index cf904d93c345..07b0c57b4439 100755 --- a/keyboards/ckeys/handwire_101/rules.mk +++ b/keyboards/ckeys/handwire_101/rules.mk @@ -1,52 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - # Build Options # change yes to no to disable # diff --git a/keyboards/ckeys/nakey/rules.mk b/keyboards/ckeys/nakey/rules.mk index 4ba89cee4d6e..afd508247fd3 100644 --- a/keyboards/ckeys/nakey/rules.mk +++ b/keyboards/ckeys/nakey/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=512 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = halfkay # Build Options # change yes to no to disable diff --git a/keyboards/ckeys/obelus/rules.mk b/keyboards/ckeys/obelus/rules.mk index 7b556b23c004..0c55043003d2 100644 --- a/keyboards/ckeys/obelus/rules.mk +++ b/keyboards/ckeys/obelus/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable diff --git a/keyboards/claw44/rules.mk b/keyboards/claw44/rules.mk index c27f399ffd1e..b2c3b436e959 100644 --- a/keyboards/claw44/rules.mk +++ b/keyboards/claw44/rules.mk @@ -1,54 +1,16 @@ -SRC += i2c.c -SRC += serial.c -SRC += ssd1306.c - -# if firmware size over limit, try this option -# CFLAGS += -flto - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically @@ -69,5 +31,11 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend CUSTOM_MATRIX = yes +SRC += i2c.c +SRC += serial.c +SRC += ssd1306.c + +# if firmware size over limit, try this option +# CFLAGS += -flto DEFAULT_FOLDER = claw44/rev1 diff --git a/keyboards/clueboard/17/rules.mk b/keyboards/clueboard/17/rules.mk index 591d40f030c3..68274a8b2357 100644 --- a/keyboards/clueboard/17/rules.mk +++ b/keyboards/clueboard/17/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) diff --git a/keyboards/clueboard/66/rev1/rules.mk b/keyboards/clueboard/66/rev1/rules.mk index 96d4125ac4cb..39fd55921f43 100644 --- a/keyboards/clueboard/66/rev1/rules.mk +++ b/keyboards/clueboard/66/rev1/rules.mk @@ -1,10 +1,15 @@ -LAYOUTS = 66_ansi 66_iso +# MCU name MCU = atmega32u4 -F_CPU = 16000000 -ARCH = AVR8 -F_USB = $(F_CPU) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT -OPT_DEFS += -DBOOTLOADER_SIZE=4096 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. @@ -21,3 +26,5 @@ RGBLIGHT_ENABLE = no # Enable keyboard underlight functionality MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID + +LAYOUTS = 66_ansi 66_iso diff --git a/keyboards/clueboard/66/rev2/rules.mk b/keyboards/clueboard/66/rev2/rules.mk index 4987ac1378df..ec623ec63fcd 100644 --- a/keyboards/clueboard/66/rev2/rules.mk +++ b/keyboards/clueboard/66/rev2/rules.mk @@ -1,11 +1,15 @@ -LAYOUTS = 66_ansi 66_iso +# MCU name MCU = atmega32u4 -F_CPU = 16000000 -ARCH = AVR8 -F_USB = $(F_CPU) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT -OPT_DEFS += -DBOOTLOADER_SIZE=4096 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options BACKLIGHT_ENABLE = yes @@ -20,3 +24,5 @@ RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID + +LAYOUTS = 66_ansi 66_iso diff --git a/keyboards/clueboard/66/rev3/rules.mk b/keyboards/clueboard/66/rev3/rules.mk index 8c1836351f9d..ca7817af1835 100644 --- a/keyboards/clueboard/66/rev3/rules.mk +++ b/keyboards/clueboard/66/rev3/rules.mk @@ -1,10 +1,15 @@ -LAYOUTS = 66_ansi 66_iso +# MCU name MCU = atmega32u4 -F_CPU = 16000000 -ARCH = AVR8 -F_USB = $(F_CPU) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT -OPT_DEFS += -DBOOTLOADER_SIZE=4096 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. @@ -21,3 +26,5 @@ RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID + +LAYOUTS = 66_ansi 66_iso diff --git a/keyboards/clueboard/66_hotswap/prototype/rules.mk b/keyboards/clueboard/66_hotswap/prototype/rules.mk index 887592b37320..0a2a734cf5bf 100644 --- a/keyboards/clueboard/66_hotswap/prototype/rules.mk +++ b/keyboards/clueboard/66_hotswap/prototype/rules.mk @@ -1,11 +1,15 @@ -EXTRAFLAGS += -flto -LAYOUTS = 66_ansi +# MCU name MCU = atmega32u4 -F_CPU = 16000000 -ARCH = AVR8 -F_USB = $(F_CPU) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT -OPT_DEFS += -DBOOTLOADER_SIZE=4096 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. @@ -22,3 +26,6 @@ RGBLIGHT_ENABLE = yes MIDI_ENABLE = no UNICODE_ENABLE = no BLUETOOTH_ENABLE = no + +EXTRAFLAGS += -flto +LAYOUTS = 66_ansi diff --git a/keyboards/clueboard/card/rules.mk b/keyboards/clueboard/card/rules.mk index 46d6f91130dc..2162b25de124 100644 --- a/keyboards/clueboard/card/rules.mk +++ b/keyboards/clueboard/card/rules.mk @@ -1,9 +1,15 @@ +# MCU name MCU = atmega32u4 -F_CPU = 16000000 -ARCH = AVR8 -F_USB = $(F_CPU) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT -OPT_DEFS += -DBOOTLOADER_SIZE=4096 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options diff --git a/keyboards/cocoa40/keymaps/default/rules.mk b/keyboards/cocoa40/keymaps/default/rules.mk deleted file mode 100644 index 8b137891791f..000000000000 --- a/keyboards/cocoa40/keymaps/default/rules.mk +++ /dev/null @@ -1 +0,0 @@ - diff --git a/keyboards/cocoa40/rules.mk b/keyboards/cocoa40/rules.mk index f7e529a4b2f3..ad0ffbf0fe20 100644 --- a/keyboards/cocoa40/rules.mk +++ b/keyboards/cocoa40/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/comet46/rules.mk b/keyboards/comet46/rules.mk index fc00e205bff4..d38f16734f4f 100644 --- a/keyboards/comet46/rules.mk +++ b/keyboards/comet46/rules.mk @@ -1,50 +1,15 @@ -# # project specific files -SRC += matrix.c \ - i2c.c \ - ssd1306.c - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. -# BOOTLOADER = caterina - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina # Build Options # comment out to disable the options. @@ -64,3 +29,7 @@ UNICODE_ENABLE = YES # Unicode # BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID USB = /dev/ttyACM0 +# project specific files +SRC += matrix.c \ + i2c.c \ + ssd1306.c diff --git a/keyboards/contra/rules.mk b/keyboards/contra/rules.mk index 3a97834cff1b..0aded0f29af7 100755 --- a/keyboards/contra/rules.mk +++ b/keyboards/contra/rules.mk @@ -1,45 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina # Build Options # change yes to no to disable diff --git a/keyboards/converter/adb_usb/rules.mk b/keyboards/converter/adb_usb/rules.mk index 7901898c7c38..66ca7652660a 100644 --- a/keyboards/converter/adb_usb/rules.mk +++ b/keyboards/converter/adb_usb/rules.mk @@ -1,59 +1,16 @@ # MCU name -# atmega32u4 Teensy2.0 -# atemga32u4 TMK Converter rev.1 -# atemga32u2 TMK Converter rev.2 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 -# F_CPU = 8000000 - -# -# 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 - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 for TMK Converter rev.1/rev.2 -# LUFA bootloader 4096 -# USBaspLoader 2048 - # Build Options # comment out to disable the options. # diff --git a/keyboards/converter/hp_46010a/rules.mk b/keyboards/converter/hp_46010a/rules.mk index 797258caf781..b23aaadeca90 100644 --- a/keyboards/converter/hp_46010a/rules.mk +++ b/keyboards/converter/hp_46010a/rules.mk @@ -1,45 +1,14 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = halfkay # Build Options diff --git a/keyboards/converter/ibm_5291/rules.mk b/keyboards/converter/ibm_5291/rules.mk index 457dad16612f..edb456a7d841 100644 --- a/keyboards/converter/ibm_5291/rules.mk +++ b/keyboards/converter/ibm_5291/rules.mk @@ -1,45 +1,14 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = halfkay # Build Options diff --git a/keyboards/converter/ibm_terminal/rules.mk b/keyboards/converter/ibm_terminal/rules.mk index a48038ccde23..36913ef331b1 100644 --- a/keyboards/converter/ibm_terminal/rules.mk +++ b/keyboards/converter/ibm_terminal/rules.mk @@ -1,48 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change to "no" to disable the options, or define them in the Makefile in diff --git a/keyboards/converter/m0110_usb/rules.mk b/keyboards/converter/m0110_usb/rules.mk index bffee05fde21..36c3dfa3fdc9 100644 --- a/keyboards/converter/m0110_usb/rules.mk +++ b/keyboards/converter/m0110_usb/rules.mk @@ -1,59 +1,19 @@ # MCU name -# atmega32u4 Teensy2.0 -# atemga32u4 TMK Converter rev.1 -# atemga32u2 TMK Converter rev.2 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 +# Processor frequency F_CPU = 8000000 -# -# 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 - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 for TMK Converter rev.1/rev.2 -# LUFA bootloader 4096 -# USBaspLoader 2048 - # Build Options # comment out to disable the options. # diff --git a/keyboards/converter/numeric_keypad_IIe/rules.mk b/keyboards/converter/numeric_keypad_IIe/rules.mk index f61a7d4501b8..03c1bc8f868f 100644 --- a/keyboards/converter/numeric_keypad_IIe/rules.mk +++ b/keyboards/converter/numeric_keypad_IIe/rules.mk @@ -1,59 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - # Build Options # change yes to no to disable # diff --git a/keyboards/converter/palm_usb/rules.mk b/keyboards/converter/palm_usb/rules.mk index 7374fd955f96..2cd2c47e598d 100644 --- a/keyboards/converter/palm_usb/rules.mk +++ b/keyboards/converter/palm_usb/rules.mk @@ -1,11 +1,14 @@ -MCU = atmega32u4 # Teensy 2.0 -F_CPU = 16000000 -ARCH = AVR8 -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT +# MCU name +MCU = atmega32u4 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina # Build Options diff --git a/keyboards/converter/sun_usb/rules.mk b/keyboards/converter/sun_usb/rules.mk index db6b5c7ee406..60beb4d9b062 100644 --- a/keyboards/converter/sun_usb/rules.mk +++ b/keyboards/converter/sun_usb/rules.mk @@ -1,11 +1,14 @@ -MCU = atmega32u4 # Teensy 2.0 -F_CPU = 16000000 -ARCH = AVR8 -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT +# MCU name +MCU = atmega32u4 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = lufa-dfu # Build Options diff --git a/keyboards/converter/usb_usb/rules.mk b/keyboards/converter/usb_usb/rules.mk index dfe89ee7d945..b4f37d3ad8b8 100644 --- a/keyboards/converter/usb_usb/rules.mk +++ b/keyboards/converter/usb_usb/rules.mk @@ -1,55 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. - -# Since there are different hardware variations of these adapters and since these -# have different CPU clocks, the clock speed should be set in the rules.mk file of the -# respective hardware variantion (i.e. subproject). For example, in /pro_micro/rules.mk -# this is set to 8000000. -# The value here is only a fallback and is ignored if it is defined in the subproject. -F_CPU ?= 16000000 - -DEFAULT_FOLDER = converter/usb_usb/hasu - -# -# 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) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # comment out to disable the options. # @@ -65,3 +26,5 @@ USB_HID_ENABLE = yes CUSTOM_MATRIX = yes SRC = custom_matrix.cpp + +DEFAULT_FOLDER = converter/usb_usb/hasu diff --git a/keyboards/converter/xt_usb/rules.mk b/keyboards/converter/xt_usb/rules.mk index 1f96251830fe..05b70519c7b1 100644 --- a/keyboards/converter/xt_usb/rules.mk +++ b/keyboards/converter/xt_usb/rules.mk @@ -1,45 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - -# Bootloader -# This indicates which bootloader is present on the board. -# BOOTLOADER = caterina # Pro Micro -BOOTLOADER = halfkay # Teensy +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = halfkay # Build Options # comment out to disable the options. diff --git a/keyboards/copenhagen_click/click_pad_v1/rules.mk b/keyboards/copenhagen_click/click_pad_v1/rules.mk index 381604ac5b46..dd7a086de83d 100755 --- a/keyboards/copenhagen_click/click_pad_v1/rules.mk +++ b/keyboards/copenhagen_click/click_pad_v1/rules.mk @@ -7,20 +7,10 @@ MCU = atmega32u4 # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/coseyfannitutti/discipad/rules.mk b/keyboards/coseyfannitutti/discipad/rules.mk index 64f6188542ae..a9d06d608c43 100644 --- a/keyboards/coseyfannitutti/discipad/rules.mk +++ b/keyboards/coseyfannitutti/discipad/rules.mk @@ -2,6 +2,13 @@ MCU = atmega328p # Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = USBasp # Flash program via avrdude, but default command is not suitable. diff --git a/keyboards/coseyfannitutti/mullet/rules.mk b/keyboards/coseyfannitutti/mullet/rules.mk index fa02fe6fce92..f390cfbe092e 100644 --- a/keyboards/coseyfannitutti/mullet/rules.mk +++ b/keyboards/coseyfannitutti/mullet/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/coseyfannitutti/mulletpad/rules.mk b/keyboards/coseyfannitutti/mulletpad/rules.mk index b3a473ef4b94..282a4a36503b 100644 --- a/keyboards/coseyfannitutti/mulletpad/rules.mk +++ b/keyboards/coseyfannitutti/mulletpad/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/cospad/rules.mk b/keyboards/cospad/rules.mk index 61c7a5182ce1..075320a22fbf 100644 --- a/keyboards/cospad/rules.mk +++ b/keyboards/cospad/rules.mk @@ -1,63 +1,16 @@ - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# 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. # diff --git a/keyboards/crawlpad/rules.mk b/keyboards/crawlpad/rules.mk index 2dda38e20138..00931610a1f1 100755 --- a/keyboards/crawlpad/rules.mk +++ b/keyboards/crawlpad/rules.mk @@ -1,45 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. diff --git a/keyboards/crkbd/rules.mk b/keyboards/crkbd/rules.mk index 950000a7ecb4..67674518d9b7 100644 --- a/keyboards/crkbd/rules.mk +++ b/keyboards/crkbd/rules.mk @@ -1,54 +1,16 @@ -QUANTUM_LIB_SRC += i2c.c \ - serial.c -SRC += ssd1306.c - -# if firmware size over limit, try this option -# CFLAGS += -flto - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically @@ -70,5 +32,11 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend CUSTOM_MATRIX = yes +QUANTUM_LIB_SRC += i2c.c \ + serial.c +SRC += ssd1306.c + +# if firmware size over limit, try this option +# CFLAGS += -flto DEFAULT_FOLDER = crkbd/rev1 diff --git a/keyboards/cu24/rules.mk b/keyboards/cu24/rules.mk index 01d74ac473d2..fdfba55b1351 100644 --- a/keyboards/cu24/rules.mk +++ b/keyboards/cu24/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable diff --git a/keyboards/cu75/rules.mk b/keyboards/cu75/rules.mk index a84343f0566d..697d8d18f23a 100644 --- a/keyboards/cu75/rules.mk +++ b/keyboards/cu75/rules.mk @@ -1,41 +1,14 @@ +# MCU name MCU = atmega32u4 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - -# 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 - -SRC = ../lfkeyboards/TWIlib.c ../lfkeyboards/issi.c ../lfkeyboards/lighting.c \ No newline at end of file +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +SRC = ../lfkeyboards/TWIlib.c ../lfkeyboards/issi.c ../lfkeyboards/lighting.c diff --git a/keyboards/daisy/rules.mk b/keyboards/daisy/rules.mk index 5a7cc564c29a..d2b0d7d16728 100644 --- a/keyboards/daisy/rules.mk +++ b/keyboards/daisy/rules.mk @@ -1,50 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4996 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # QMK Build Options # change to "no" to disable the options, or define them in the Makefile in diff --git a/keyboards/dc01/arrow/rules.mk b/keyboards/dc01/arrow/rules.mk index 8426df1bd459..56a9cfc49c2f 100644 --- a/keyboards/dc01/arrow/rules.mk +++ b/keyboards/dc01/arrow/rules.mk @@ -1,54 +1,15 @@ -SRC += matrix.c \ - i2c_slave.c - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable @@ -71,3 +32,5 @@ FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) NO_USB_STARTUP_CHECK = yes # Disable initialization only when usb is plugged in CUSTOM_MATRIX = yes # Use custom matrix +SRC += matrix.c \ + i2c_slave.c diff --git a/keyboards/dc01/left/rules.mk b/keyboards/dc01/left/rules.mk index 8a0d06195347..9e34a0a8084d 100644 --- a/keyboards/dc01/left/rules.mk +++ b/keyboards/dc01/left/rules.mk @@ -1,54 +1,15 @@ -SRC += matrix.c \ - i2c_master.c - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable @@ -70,3 +31,5 @@ AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) CUSTOM_MATRIX = yes # Use custom matrix +SRC += matrix.c \ + i2c_master.c diff --git a/keyboards/dc01/numpad/rules.mk b/keyboards/dc01/numpad/rules.mk index 420534f8cad1..674ef1d026af 100644 --- a/keyboards/dc01/numpad/rules.mk +++ b/keyboards/dc01/numpad/rules.mk @@ -1,54 +1,15 @@ -SRC += matrix.c \ - i2c_slave.c - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable @@ -71,6 +32,8 @@ FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) NO_USB_STARTUP_CHECK = yes # Disable initialization only when usb is plugged in CUSTOM_MATRIX = yes # Use custom matrix +SRC += matrix.c \ + i2c_slave.c # Community layouts supported LAYOUTS = numpad_5x4 ortho_5x4 diff --git a/keyboards/dc01/right/rules.mk b/keyboards/dc01/right/rules.mk index 8426df1bd459..56a9cfc49c2f 100644 --- a/keyboards/dc01/right/rules.mk +++ b/keyboards/dc01/right/rules.mk @@ -1,54 +1,15 @@ -SRC += matrix.c \ - i2c_slave.c - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable @@ -71,3 +32,5 @@ FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) NO_USB_STARTUP_CHECK = yes # Disable initialization only when usb is plugged in CUSTOM_MATRIX = yes # Use custom matrix +SRC += matrix.c \ + i2c_slave.c diff --git a/keyboards/deltasplit75/rules.mk b/keyboards/deltasplit75/rules.mk index eadea1892945..a976360bf199 100644 --- a/keyboards/deltasplit75/rules.mk +++ b/keyboards/deltasplit75/rules.mk @@ -1,52 +1,16 @@ -SRC += matrix.c \ - i2c.c \ - split_util.c \ - serial.c - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically @@ -69,5 +33,9 @@ USE_I2C = yes SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend CUSTOM_MATRIX = yes +SRC += matrix.c \ + i2c.c \ + split_util.c \ + serial.c DEFAULT_FOLDER = deltasplit75/v2 diff --git a/keyboards/dichotomy/rules.mk b/keyboards/dichotomy/rules.mk index 1cced064789c..9ab4d56922ac 100755 --- a/keyboards/dichotomy/rules.mk +++ b/keyboards/dichotomy/rules.mk @@ -1,56 +1,15 @@ - -OPT_DEFS += -DDICHOTOMY_PROMICRO -DICHOTOMY_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \ - avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB) - -# # project specific files -SRC = matrix.c - - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader - # This definition is optional, and if your keyboard supports multiple bootloaders of - # different sizes, comment this out, and the correct address will be loaded - # automatically (+60). See bootloader.mk for all options. - BOOTLOADER = caterina - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina # Build Options # comment out to disable the options. @@ -72,5 +31,12 @@ UNICODE_ENABLE = YES # Unicode USB = /dev/ttyACM0 +OPT_DEFS += -DDICHOTOMY_PROMICRO +DICHOTOMY_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \ + avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB) + +# # project specific files +SRC = matrix.c + #upload: build # $(DICHOTOMY_UPLOAD_COMMAND) diff --git a/keyboards/diverge3/rules.mk b/keyboards/diverge3/rules.mk index 3888ee9370af..42ab5224af16 100644 --- a/keyboards/diverge3/rules.mk +++ b/keyboards/diverge3/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina # Build Options # change yes to no to disable diff --git a/keyboards/divergetm2/keymaps/default/rules.mk b/keyboards/divergetm2/keymaps/default/rules.mk deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/keyboards/divergetm2/rules.mk b/keyboards/divergetm2/rules.mk index f330bd790234..9a461edec90d 100644 --- a/keyboards/divergetm2/rules.mk +++ b/keyboards/divergetm2/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina # Build Options # change yes to no to disable @@ -67,6 +31,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend SPLIT_KEYBOARD = yes - -# must specify this to enable soft-reset -BOOTLOADER = caterina diff --git a/keyboards/dk60/rules.mk b/keyboards/dk60/rules.mk index c85ed9b0a60c..17ee5d96187c 100644 --- a/keyboards/dk60/rules.mk +++ b/keyboards/dk60/rules.mk @@ -1,9 +1,15 @@ +# MCU name MCU = atmega32u4 -F_CPU = 16000000 -ARCH = AVR8 -F_USB = $(F_CPU) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT -OPT_DEFS += -DBOOTLOADER_SIZE=4096 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = no # Mouse keys(+4700) diff --git a/keyboards/do60/rules.mk b/keyboards/do60/rules.mk index 7370a6262e86..bd74db7f8258 100644 --- a/keyboards/do60/rules.mk +++ b/keyboards/do60/rules.mk @@ -1,52 +1,15 @@ # MCU name MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# LUFA specific -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options AUDIO_ENABLE = no # Audio output on port C6 @@ -63,4 +26,4 @@ RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend UNICODE_ENABLE = no # Unicode -LAYOUTS = 60_ansi 60_hhkb 60_ansi_split_bs_rshift \ No newline at end of file +LAYOUTS = 60_ansi 60_hhkb 60_ansi_split_bs_rshift diff --git a/keyboards/doro67/multi/rules.mk b/keyboards/doro67/multi/rules.mk index ef3def96dac2..d719b7043fe6 100644 --- a/keyboards/doro67/multi/rules.mk +++ b/keyboards/doro67/multi/rules.mk @@ -6,10 +6,10 @@ MCU = atmega32u4 # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - # Build Options # change yes to no to disable # @@ -31,4 +31,4 @@ AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) -LAYOUTS = 65_ansi_blocker \ No newline at end of file +LAYOUTS = 65_ansi_blocker diff --git a/keyboards/doro67/regular/rules.mk b/keyboards/doro67/regular/rules.mk index f844f8f95696..d88f6fcfe630 100644 --- a/keyboards/doro67/regular/rules.mk +++ b/keyboards/doro67/regular/rules.mk @@ -7,7 +7,8 @@ MCU = atmega32u4 # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu # Build Options @@ -31,4 +32,4 @@ AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) -LAYOUTS = 65_ansi_blocker \ No newline at end of file +LAYOUTS = 65_ansi_blocker diff --git a/keyboards/doro67/rgb/rules.mk b/keyboards/doro67/rgb/rules.mk index df77b4311be2..769edfb45dd8 100644 --- a/keyboards/doro67/rgb/rules.mk +++ b/keyboards/doro67/rgb/rules.mk @@ -1,65 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - -RGB_MATRIX_ENABLE = WS2812 - - # Build Options # change yes to no to disable # @@ -80,5 +31,6 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +RGB_MATRIX_ENABLE = WS2812 -LAYOUTS = 65_ansi_blocker \ No newline at end of file +LAYOUTS = 65_ansi_blocker diff --git a/keyboards/dozen0/rules.mk b/keyboards/dozen0/rules.mk index bc370be0397c..7218e1e1bf18 100644 --- a/keyboards/dozen0/rules.mk +++ b/keyboards/dozen0/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/dp60/keymaps/via/rules.mk b/keyboards/dp60/keymaps/via/rules.mk index d532fc45590a..27d6223baea7 100644 --- a/keyboards/dp60/keymaps/via/rules.mk +++ b/keyboards/dp60/keymaps/via/rules.mk @@ -11,7 +11,6 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT # LUFA bootloader 4096 # USBaspLoader 2048 BOOTLOADER = atmel-dfu -#OPT_DEFS += -DBOOTLOADER_SIZE=4096 # Do not put the microcontroller into power saving mode # when we get USB suspend event. We want it to keep updating @@ -45,4 +44,4 @@ DYNAMIC_KEYMAP_ENABLE = yes CUSTOM_MATRIX = yes SRC += matrix.c keyboards/wilba_tech/wt_main.c -#keyboards/stm60/webusb.c \ No newline at end of file +#keyboards/stm60/webusb.c diff --git a/keyboards/dp60/rules.mk b/keyboards/dp60/rules.mk index 1404ab7b32e3..0f998746fbf7 100644 --- a/keyboards/dp60/rules.mk +++ b/keyboards/dp60/rules.mk @@ -1,17 +1,15 @@ # MCU name MCU = atmega32u4 -# 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 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu -#OPT_DEFS += -DBOOTLOADER_SIZE=4096 # Do not put the microcontroller into power saving mode # when we get USB suspend event. We want it to keep updating @@ -42,4 +40,4 @@ RGB_MATRIX_ENABLE = yes # Use RGB matrix LAYOUTS = 60_ansi 60_hhkb 60_iso 60_ansi_split_bs_rshift CUSTOM_MATRIX = yes -SRC += matrix.c \ No newline at end of file +SRC += matrix.c diff --git a/keyboards/duck/eagle_viper/v2/rules.mk b/keyboards/duck/eagle_viper/v2/rules.mk index 1abd7d941321..9b3ffa8ac52c 100644 --- a/keyboards/duck/eagle_viper/v2/rules.mk +++ b/keyboards/duck/eagle_viper/v2/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -#OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable diff --git a/keyboards/duck/jetfire/rules.mk b/keyboards/duck/jetfire/rules.mk index dceddc7c7d08..04d4f45695ac 100644 --- a/keyboards/duck/jetfire/rules.mk +++ b/keyboards/duck/jetfire/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable diff --git a/keyboards/duck/lightsaver/rules.mk b/keyboards/duck/lightsaver/rules.mk index bc7b901b4965..b6cb462ebbc3 100644 --- a/keyboards/duck/lightsaver/rules.mk +++ b/keyboards/duck/lightsaver/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -#OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable diff --git a/keyboards/duck/octagon/v1/rules.mk b/keyboards/duck/octagon/v1/rules.mk index 889b93ed4590..7027fb1276ba 100644 --- a/keyboards/duck/octagon/v1/rules.mk +++ b/keyboards/duck/octagon/v1/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -#OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable diff --git a/keyboards/duck/octagon/v2/rules.mk b/keyboards/duck/octagon/v2/rules.mk index c403247074c9..cd4d2c2fec7a 100644 --- a/keyboards/duck/octagon/v2/rules.mk +++ b/keyboards/duck/octagon/v2/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -#OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable diff --git a/keyboards/dumbpad/rules.mk b/keyboards/dumbpad/rules.mk index 5d585c65be69..a5df407da492 100644 --- a/keyboards/dumbpad/rules.mk +++ b/keyboards/dumbpad/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/dz60/keymaps/LEdiodes/rules.mk b/keyboards/dz60/keymaps/LEdiodes/rules.mk index 08adc989df30..38b067eb0f79 100644 --- a/keyboards/dz60/keymaps/LEdiodes/rules.mk +++ b/keyboards/dz60/keymaps/LEdiodes/rules.mk @@ -1,46 +1,3 @@ -# MCU name -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # comment out to disable the options. # @@ -55,4 +12,4 @@ BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality AUDIO_ENABLE = no RGBLIGHT_ENABLE = yes AUTO_SHIFT_ENABLE = yes # If the time depressed is greater than or equal to the AUTO_SHIFT_TIMEOUT, then a shifted version of the key is emitted. If the time is less than the AUTO_SHIFT_TIMEOUT time, then the normal state is emitted -TAP_DANCE_ENABLE = yes \ No newline at end of file +TAP_DANCE_ENABLE = yes diff --git a/keyboards/dz60/rules.mk b/keyboards/dz60/rules.mk index 33beea728c8b..d2faa99897c4 100644 --- a/keyboards/dz60/rules.mk +++ b/keyboards/dz60/rules.mk @@ -1,42 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - -BOOTLOADER=atmel-dfu +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. diff --git a/keyboards/eco/rules.mk b/keyboards/eco/rules.mk index e2cebaf97d5f..4fe5ec1b923f 100644 --- a/keyboards/eco/rules.mk +++ b/keyboards/eco/rules.mk @@ -1,47 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically diff --git a/keyboards/emptystring/NQG/rules.mk b/keyboards/emptystring/NQG/rules.mk index 9a46bb854401..8ebed340ad0c 100644 --- a/keyboards/emptystring/NQG/rules.mk +++ b/keyboards/emptystring/NQG/rules.mk @@ -1,50 +1,15 @@ # MCU name - MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina # Build Options # change to "no" to disable the options, or define them in the Makefile in diff --git a/keyboards/ep/40/rules.mk b/keyboards/ep/40/rules.mk index 9ddf9717e942..7e69544cf49c 100644 --- a/keyboards/ep/40/rules.mk +++ b/keyboards/ep/40/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/ep/96/rules.mk b/keyboards/ep/96/rules.mk index 9ddf9717e942..7e69544cf49c 100644 --- a/keyboards/ep/96/rules.mk +++ b/keyboards/ep/96/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/ep/comsn/hs68/rules.mk b/keyboards/ep/comsn/hs68/rules.mk index b7d3b9b52852..2aa56715575b 100644 --- a/keyboards/ep/comsn/hs68/rules.mk +++ b/keyboards/ep/comsn/hs68/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/ep/comsn/mollydooker/rules.mk b/keyboards/ep/comsn/mollydooker/rules.mk index db4f2edc0bc9..4ef5023dfb35 100644 --- a/keyboards/ep/comsn/mollydooker/rules.mk +++ b/keyboards/ep/comsn/mollydooker/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/ep/comsn/tf_longeboye/rules.mk b/keyboards/ep/comsn/tf_longeboye/rules.mk index 195c9e50236c..5360459cf709 100644 --- a/keyboards/ep/comsn/tf_longeboye/rules.mk +++ b/keyboards/ep/comsn/tf_longeboye/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/ergo42/rules.mk b/keyboards/ergo42/rules.mk index d8544d9ba05c..a02e3ca74e1b 100644 --- a/keyboards/ergo42/rules.mk +++ b/keyboards/ergo42/rules.mk @@ -1,58 +1,16 @@ -SRC += matrix.c \ - i2c.c \ - split_util.c \ - serial.c \ - ssd1306.c - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically @@ -75,6 +33,11 @@ USE_I2C = yes SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend CUSTOM_MATRIX = yes +SRC += matrix.c \ + i2c.c \ + split_util.c \ + serial.c \ + ssd1306.c LAYOUTS = ortho_4x14 diff --git a/keyboards/ergodash/rules.mk b/keyboards/ergodash/rules.mk index 8be059d969ff..d57e4ce13a44 100644 --- a/keyboards/ergodash/rules.mk +++ b/keyboards/ergodash/rules.mk @@ -1,21 +1,14 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -F_CPU = 16000000 - -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - -# Bootloader +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina # Build Options diff --git a/keyboards/ergodone/rules.mk b/keyboards/ergodone/rules.mk index 6acfaf92e96a..4c2fcf159531 100644 --- a/keyboards/ergodone/rules.mk +++ b/keyboards/ergodone/rules.mk @@ -1,71 +1,15 @@ -#---------------------------------------------------------------------------- -# On command line: -# -# make = Make software. -# -# make clean = Clean out built project files. -# -# That's pretty much all you need. To compile, always go make clean, -# followed by make. -# -# For advanced users only: -# make teensy = Download the hex file to the device, using teensy_loader_cli. -# (must have teensy_loader_cli installed). -# -#---------------------------------------------------------------------------- - -# # project specific files -SRC = \ - twimaster.c \ - matrix.c \ - expander.c \ - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina # Build Options # comment out to disable the options. @@ -92,4 +36,10 @@ SWAP_HANDS_ENABLE = no # Disable Onehand RGBLIGHT_ENABLE = no MIDI_ENABLE = no +# project specific files +SRC = \ + twimaster.c \ + matrix.c \ + expander.c \ + LAYOUTS = ergodox diff --git a/keyboards/ergodox_ez/rules.mk b/keyboards/ergodox_ez/rules.mk index 2882072a627d..dbc35f6836fd 100644 --- a/keyboards/ergodox_ez/rules.mk +++ b/keyboards/ergodox_ez/rules.mk @@ -1,68 +1,16 @@ -#---------------------------------------------------------------------------- -# On command line: -# -# make = Make software. -# -# make clean = Clean out built project files. -# -# That's pretty much all you need. To compile, always go make clean, -# followed by make. -# -# For advanced users only: -# make teensy = Download the hex file to the device, using teensy_loader_cli. -# (must have teensy_loader_cli installed). -# -#---------------------------------------------------------------------------- - -# # project specific files -SRC += matrix.c -QUANTUM_LIB_SRC += i2c_master.c - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = halfkay -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # If you have Left LEDs (see # https://geekhack.org/index.php?topic=22780.msg873819#msg873819 for # details), include the following define: @@ -86,4 +34,8 @@ RGBLIGHT_ENABLE = yes RGB_MATRIX_ENABLE = no # enable later DEBOUNCE_TYPE = eager_pr +# project specific files +SRC += matrix.c +QUANTUM_LIB_SRC += i2c_master.c + LAYOUTS = ergodox diff --git a/keyboards/ergoinu/rules.mk b/keyboards/ergoinu/rules.mk index 1797d03ccb40..5c600bcd2e79 100644 --- a/keyboards/ergoinu/rules.mk +++ b/keyboards/ergoinu/rules.mk @@ -1,49 +1,16 @@ -SRC += matrix.c serial.c split_util.c - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically @@ -66,6 +33,7 @@ USE_I2C = no # i2c is not supported SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend CUSTOM_MATRIX = yes +SRC += matrix.c serial.c split_util.c DEFAULT_FOLDER = ergoinu diff --git a/keyboards/ergotaco/keymaps/default/rules.mk b/keyboards/ergotaco/keymaps/default/rules.mk index e394fbf1e647..870d047dc900 100644 --- a/keyboards/ergotaco/keymaps/default/rules.mk +++ b/keyboards/ergotaco/keymaps/default/rules.mk @@ -1,9 +1,3 @@ -#---------------------------------------------------------------------------- -# make ergotaco:default:dfu -# Make sure you have dfu-programmer installed! -#---------------------------------------------------------------------------- -# Firmware options - #Debug options VERBOSE = yes DEBUG_MATRIX_SCAN_RATE = no diff --git a/keyboards/ergotaco/rules.mk b/keyboards/ergotaco/rules.mk index 0af3e347400c..cd8ebc58f0df 100644 --- a/keyboards/ergotaco/rules.mk +++ b/keyboards/ergotaco/rules.mk @@ -1,15 +1,15 @@ -#---------------------------------------------------------------------------- -# make ergotaco:default:dfu -# Make sure you have dfu-programmer installed! -# Do not edit this file! Make a copy of keymaps/default and modify that! -#---------------------------------------------------------------------------- - -# Hardware info +# MCU name MCU = atmega32u4 -F_CPU = 16000000 -ARCH = AVR8 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu -F_USB = $(F_CPU) CUSTOM_MATRIX = yes EXTRAKEY_ENABLE = yes diff --git a/keyboards/ergotravel/keymaps/default/rules.mk b/keyboards/ergotravel/keymaps/default/rules.mk deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/keyboards/ergotravel/rules.mk b/keyboards/ergotravel/rules.mk index c88a7fa14f0a..be7c8d990f8a 100644 --- a/keyboards/ergotravel/rules.mk +++ b/keyboards/ergotravel/rules.mk @@ -1,47 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically diff --git a/keyboards/espectro/rules.mk b/keyboards/espectro/rules.mk index 2c28fe8504eb..2d1c1eed098e 100755 --- a/keyboards/espectro/rules.mk +++ b/keyboards/espectro/rules.mk @@ -1,51 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* - - # Build Options # comment out to disable the options. # diff --git a/keyboards/evil80/rules.mk b/keyboards/evil80/rules.mk index d86594f98f1a..683f89246090 100644 --- a/keyboards/evil80/rules.mk +++ b/keyboards/evil80/rules.mk @@ -1,49 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change to "no" to disable the options, or define them in the Makefile in diff --git a/keyboards/exclusive/e65/rules.mk b/keyboards/exclusive/e65/rules.mk index 33c015cda5d4..0b994a279b23 100644 --- a/keyboards/exclusive/e65/rules.mk +++ b/keyboards/exclusive/e65/rules.mk @@ -2,6 +2,13 @@ MCU = atmega32u4 # Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu # Build Options diff --git a/keyboards/exclusive/e6_rgb/rules.mk b/keyboards/exclusive/e6_rgb/rules.mk index 9e4e0f58f5f9..4695f647607e 100644 --- a/keyboards/exclusive/e6_rgb/rules.mk +++ b/keyboards/exclusive/e6_rgb/rules.mk @@ -1,53 +1,15 @@ # MCU name MCU = atmega32u4 -# project specific files -#SRC = - -# 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 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu -#OPT_DEFS += -DBOOTLOADER_SIZE=4096 # Do not put the microcontroller into power saving mode # when we get USB suspend event. We want it to keep updating diff --git a/keyboards/exclusive/e6v2/le/rules.mk b/keyboards/exclusive/e6v2/le/rules.mk index ffad52dbc55c..e6cad9403399 100644 --- a/keyboards/exclusive/e6v2/le/rules.mk +++ b/keyboards/exclusive/e6v2/le/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable diff --git a/keyboards/exclusive/e6v2/oe/rules.mk b/keyboards/exclusive/e6v2/oe/rules.mk index ffad52dbc55c..e6cad9403399 100644 --- a/keyboards/exclusive/e6v2/oe/rules.mk +++ b/keyboards/exclusive/e6v2/oe/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable diff --git a/keyboards/exclusive/e7v1/rules.mk b/keyboards/exclusive/e7v1/rules.mk index f903df7de52f..335e228bba58 100644 --- a/keyboards/exclusive/e7v1/rules.mk +++ b/keyboards/exclusive/e7v1/rules.mk @@ -1,42 +1,14 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu # Build Options diff --git a/keyboards/fc660c/rules.mk b/keyboards/fc660c/rules.mk index c947947f8081..18613a591712 100644 --- a/keyboards/fc660c/rules.mk +++ b/keyboards/fc660c/rules.mk @@ -1,50 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - - -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options diff --git a/keyboards/fc980c/rules.mk b/keyboards/fc980c/rules.mk index 261bb41c8f08..596b96f1f451 100644 --- a/keyboards/fc980c/rules.mk +++ b/keyboards/fc980c/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - - -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. diff --git a/keyboards/felix/rules.mk b/keyboards/felix/rules.mk index b33785b64a11..7371e3b1a03a 100644 --- a/keyboards/felix/rules.mk +++ b/keyboards/felix/rules.mk @@ -1,52 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - # Build Options # change yes to no to disable # diff --git a/keyboards/fleuron/rules.mk b/keyboards/fleuron/rules.mk index 8e0b084c459c..5695e68856b5 100644 --- a/keyboards/fleuron/rules.mk +++ b/keyboards/fleuron/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable diff --git a/keyboards/fortitude60/rules.mk b/keyboards/fortitude60/rules.mk index 5ea1cc5a50af..1fdbfb016314 100644 --- a/keyboards/fortitude60/rules.mk +++ b/keyboards/fortitude60/rules.mk @@ -1,51 +1,16 @@ -SRC += matrix.c \ - split_util.c \ - serial.c - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically @@ -67,5 +32,8 @@ USE_SERIAL = yes # Serial support only on fortitude60 SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend CUSTOM_MATRIX = yes +SRC += matrix.c \ + split_util.c \ + serial.c DEFAULT_FOLDER = fortitude60/rev1 diff --git a/keyboards/four_banger/rules.mk b/keyboards/four_banger/rules.mk index 212e74059e4b..d37439a0f7bb 100644 --- a/keyboards/four_banger/rules.mk +++ b/keyboards/four_banger/rules.mk @@ -1,45 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. @@ -53,4 +23,4 @@ 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 = no # Enable keyboard backlight functionality AUDIO_ENABLE = no -RGBLIGHT_ENABLE = yes \ No newline at end of file +RGBLIGHT_ENABLE = yes diff --git a/keyboards/foxlab/leaf60/hotswap/rules.mk b/keyboards/foxlab/leaf60/hotswap/rules.mk index 75ee00a1a9c4..6c1ec4525c31 100644 --- a/keyboards/foxlab/leaf60/hotswap/rules.mk +++ b/keyboards/foxlab/leaf60/hotswap/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/foxlab/leaf60/universal/rules.mk b/keyboards/foxlab/leaf60/universal/rules.mk index a865410333ad..1fcd0aa22d7b 100644 --- a/keyboards/foxlab/leaf60/universal/rules.mk +++ b/keyboards/foxlab/leaf60/universal/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/fractal/rules.mk b/keyboards/fractal/rules.mk index 0de2a7d39f7e..4894f1f4d86d 100755 --- a/keyboards/fractal/rules.mk +++ b/keyboards/fractal/rules.mk @@ -1,46 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - # Build Options # change yes to no to disable # diff --git a/keyboards/freyr/rules.mk b/keyboards/freyr/rules.mk index d017c9195fed..1a00e299fa03 100644 --- a/keyboards/freyr/rules.mk +++ b/keyboards/freyr/rules.mk @@ -1,27 +1,16 @@ # MCU name MCU = atmega32u4 - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # From e02383fa1ff5f4b901e2819f2e2d37bac1cabbf5 Mon Sep 17 00:00:00 2001 From: Leivince John Marte Date: Sun, 6 Oct 2019 02:17:36 +0800 Subject: [PATCH 035/316] [Keymap] Added KBD6X Vimwarrior HHKB TOFU Personal Keymap (#6878) * Added KBD6X Vimwarrior HHKB TOFU Personal Layout * Added Readme.md for Vimwarrior HHKB Tofu Keymap * Added DZ60 Vimwarrior WKL Tofu Keymap * Update Rename keymaps to devinceble_hhkb_tofu and devinceble_wkl_tofu * Update rules.mk Added BOOTLOADER config. --- .../dz60/keymaps/devinceble_wkl_tofu/keymap.c | 41 +++++++++++++++ .../keymaps/devinceble_wkl_tofu/readme.md | 9 ++++ .../dz60/keymaps/devinceble_wkl_tofu/rules.mk | 1 + .../keymaps/devinceble_hhkb_tofu/keymap.c | 52 +++++++++++++++++++ .../keymaps/devinceble_hhkb_tofu/readme.md | 9 ++++ .../keymaps/devinceble_hhkb_tofu/rules.mk | 2 + 6 files changed, 114 insertions(+) create mode 100644 keyboards/dz60/keymaps/devinceble_wkl_tofu/keymap.c create mode 100644 keyboards/dz60/keymaps/devinceble_wkl_tofu/readme.md create mode 100644 keyboards/dz60/keymaps/devinceble_wkl_tofu/rules.mk create mode 100644 keyboards/kbdfans/kbd6x/keymaps/devinceble_hhkb_tofu/keymap.c create mode 100644 keyboards/kbdfans/kbd6x/keymaps/devinceble_hhkb_tofu/readme.md create mode 100644 keyboards/kbdfans/kbd6x/keymaps/devinceble_hhkb_tofu/rules.mk diff --git a/keyboards/dz60/keymaps/devinceble_wkl_tofu/keymap.c b/keyboards/dz60/keymaps/devinceble_wkl_tofu/keymap.c new file mode 100644 index 000000000000..63b86b1d27a3 --- /dev/null +++ b/keyboards/dz60/keymaps/devinceble_wkl_tofu/keymap.c @@ -0,0 +1,41 @@ +/* Copyright 2019 Devinceble AKA Vimwarrior + * + * 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 . + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_60_tsangan_hhkb( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, \ + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), \ + KC_LALT, KC_LCTL, KC_LGUI, KC_SPC, KC_RCTL, KC_RGUI, MO(2) + ), + [1] = LAYOUT_60_tsangan_hhkb( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, \ + KC_TRNS, KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_RGHT, KC_TRNS, \ + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DOWN, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [2] = LAYOUT_60_tsangan_hhkb( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_MOD, RGB_RMOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_SPI, RGB_SPD, KC_TRNS, KC_TRNS, \ + KC_CAPS, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, BL_TOGG, BL_STEP, BL_ON, BL_OFF, BL_INC, BL_DEC, BL_BRTG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/dz60/keymaps/devinceble_wkl_tofu/readme.md b/keyboards/dz60/keymaps/devinceble_wkl_tofu/readme.md new file mode 100644 index 000000000000..221ce8061e73 --- /dev/null +++ b/keyboards/dz60/keymaps/devinceble_wkl_tofu/readme.md @@ -0,0 +1,9 @@ +# Devinceble AKA Vimwarrior WKL Tofu Keymap + +Build Hex File: + + make dz60:devinceble_wkl_tofu + +Flash Keyboard + + make dz60:devinceble_wkl_tofu:flash diff --git a/keyboards/dz60/keymaps/devinceble_wkl_tofu/rules.mk b/keyboards/dz60/keymaps/devinceble_wkl_tofu/rules.mk new file mode 100644 index 000000000000..522abf46b15b --- /dev/null +++ b/keyboards/dz60/keymaps/devinceble_wkl_tofu/rules.mk @@ -0,0 +1 @@ +MOUSEKEY_ENABLE = yes diff --git a/keyboards/kbdfans/kbd6x/keymaps/devinceble_hhkb_tofu/keymap.c b/keyboards/kbdfans/kbd6x/keymaps/devinceble_hhkb_tofu/keymap.c new file mode 100644 index 000000000000..7fe2a9f4d33e --- /dev/null +++ b/keyboards/kbdfans/kbd6x/keymaps/devinceble_hhkb_tofu/keymap.c @@ -0,0 +1,52 @@ +/* Copyright 2019 Devinceble AKA Vimwarrior + * + * 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 . + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, \ + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), \ + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RCTL, MO(2), KC_RGUI + ), + [1] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, \ + KC_TRNS, KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_RGHT, KC_TRNS, \ + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DOWN, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [2] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_MOD, RGB_RMOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_SPI, RGB_SPD, KC_TRNS, KC_TRNS, \ + KC_CAPS, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, BL_TOGG, BL_STEP, BL_ON, BL_OFF, BL_INC, BL_DEC, BL_BRTG, 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; +} diff --git a/keyboards/kbdfans/kbd6x/keymaps/devinceble_hhkb_tofu/readme.md b/keyboards/kbdfans/kbd6x/keymaps/devinceble_hhkb_tofu/readme.md new file mode 100644 index 000000000000..ebd416aea572 --- /dev/null +++ b/keyboards/kbdfans/kbd6x/keymaps/devinceble_hhkb_tofu/readme.md @@ -0,0 +1,9 @@ +# Devinceble AKA Vimwarrior HHKB Tofu Keymap + +Build Hex File: + + make kbdfans/kbd6x:devinceble_hhkb_tofu + +Flash Keyboard + + make kbdfans/kbd6x:devinceble_hhkb_tofu:flash diff --git a/keyboards/kbdfans/kbd6x/keymaps/devinceble_hhkb_tofu/rules.mk b/keyboards/kbdfans/kbd6x/keymaps/devinceble_hhkb_tofu/rules.mk new file mode 100644 index 000000000000..23f4c5674454 --- /dev/null +++ b/keyboards/kbdfans/kbd6x/keymaps/devinceble_hhkb_tofu/rules.mk @@ -0,0 +1,2 @@ +BOOTLOADER = atmel-dfu +MOUSEKEY_ENABLE = yes From b91874454d0a34335409590808c54ff062e2e3ed Mon Sep 17 00:00:00 2001 From: Colai <1r00t@users.noreply.github.com> Date: Sat, 5 Oct 2019 20:56:11 +0200 Subject: [PATCH 036/316] [Keymap] dz60 Iso de 5x1u split right shift (#6889) * add ISO-DE layout with 5x1u and split right shift * cleaning up * renamed readme.md and layout. added underglow * change layout name in info.json * rename readme.md * renamed layout in comment. added rgb keys to visualisation * change Layout name in dz60.h visualization --- keyboards/dz60/dz60.h | 27 ++++ keyboards/dz60/info.json | 4 + keyboards/dz60/keymaps/iso_de_root/keymap.c | 127 +++++++++++++++++++ keyboards/dz60/keymaps/iso_de_root/readme.md | 4 + keyboards/dz60/keymaps/iso_de_root/rules.mk | 15 +++ 5 files changed, 177 insertions(+) create mode 100644 keyboards/dz60/keymaps/iso_de_root/keymap.c create mode 100644 keyboards/dz60/keymaps/iso_de_root/readme.md create mode 100644 keyboards/dz60/keymaps/iso_de_root/rules.mk diff --git a/keyboards/dz60/dz60.h b/keyboards/dz60/dz60.h index de18faf62650..172085be4f74 100644 --- a/keyboards/dz60/dz60.h +++ b/keyboards/dz60/dz60.h @@ -305,6 +305,33 @@ { k40, k41, KC_NO, k43, KC_NO, KC_NO, k46, KC_NO, KC_NO, KC_NO, k4a, k4b, k4c, k4d, k4e } \ } +/* LAYOUT_60_iso_5x1u_split_rshift + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0a │0b │0c │0e │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │10 │12 │13 │14 │15 │16 │17 │18 │19 │1a │1b │1c │1d │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐2d │ + * │20 │22 │23 │24 │25 │26 │27 │28 │29 │2a │2b │2c │1e │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┤ + * │30 │31 │32 │33 │34 │35 │36 │37 │38 │39 │3a │3b │3d │3e │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┤ + * │40 │41 │43 │46 │4a │4b │4c │4d │4e │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ +*/ +#define LAYOUT_60_iso_5x1u_split_rshift( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, \ + k10, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k1e, k2d, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, k3e, \ + k40, k41, k43, k46, k4a, k4b, k4c, k4d, k4e \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, KC_NO, k0e }, \ + { k10, KC_NO, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e }, \ + { k20, KC_NO, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, KC_NO }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, KC_NO, k3d, k3e }, \ + { k40, k41, KC_NO, k43, KC_NO, KC_NO, k46, KC_NO, KC_NO, KC_NO, k4a, k4b, k4c, k4d, k4e } \ +} + /* LAYOUT_60_iso_split * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0a │0b │0c │0e │ diff --git a/keyboards/dz60/info.json b/keyboards/dz60/info.json index 06ce3627206f..7d1717b6f23e 100644 --- a/keyboards/dz60/info.json +++ b/keyboards/dz60/info.json @@ -45,6 +45,10 @@ "key_count": 63, "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"CapsLock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"|", "x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"~", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"/", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Fn", "x":10, "y":4}, {"label":"←", "x":11, "y":4}, {"label":"↓", "x":12, "y":4}, {"label":"↑", "x":13, "y":4}, {"label":"→", "x":14, "y":4}] }, + "LAYOUT_60_iso_5x1u_split_rshift": { + "key_count": 64, + "layout": [{"label":"\u00ac", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"\u00a3", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"@", "x":11.75, "y":2}, {"label":"~", "x":12.75, "y":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"fn", "x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"AltGr", "x":10, "y":4}, {"label":"\u2190", "x":11, "y":4}, {"label":"\u2193", "x":12, "y":4}, {"label":"\u2191", "x":13, "y":4}, {"label":"\u2192", "x":14, "y":4}] + }, "LAYOUT_60_iso_split": { "key_count": 64, "layout": [{"label":"¬", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"£", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"CapsLock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"@", "x":11.75, "y":2}, {"label":"~", "x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":2.25}, {"label":"FN", "x":6.00, "y":4, "w":1.25}, {"x":7.25, "y":4, "w":2.75}, {"label":"AltGr", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] diff --git a/keyboards/dz60/keymaps/iso_de_root/keymap.c b/keyboards/dz60/keymaps/iso_de_root/keymap.c new file mode 100644 index 000000000000..e0d781f9a316 --- /dev/null +++ b/keyboards/dz60/keymaps/iso_de_root/keymap.c @@ -0,0 +1,127 @@ + +#include QMK_KEYBOARD_H + +// enable dynamic macro recording +enum root_keycodes { + FN_LAYR = SAFE_RANGE, + DYNAMIC_MACRO_RANGE, +}; + +enum { + DEF = 0, + FN1, + NUM, + DYN, +}; + +#include "dynamic_macro.h" + + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + uint16_t macro_kc = (keycode == MO(DYN) ? DYN_REC_STOP : keycode); + + if (!process_record_dynamic_macro(macro_kc, record)) { + return false; + } + + return true; +} + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* LAYOUT_60_iso_5x1u_split_rshift + * + * DEF + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │ESC│1 │2 │3 │4 │5 │6 │7 │8 │9 │0 │ß │´ │Backspc│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │Tab │Q │W │E │R │T │Z │U │I │O │P │Ü │+ │Enter│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ + * │MO1 │A │S │D │F │G │H │J │K │L │Ö │Ä │# │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┤ + * │LSFT│< │Y │X │C │V │B │N │M │, │. │- │RShift│MO3│ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┤ + * │Ctrl│Win │Alt │ Space │AGr│ ← │ ↓ │ ↑ │ → │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ + * + * FN1 + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │^ │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│Del │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │ │ │ │ │Rst│ │ │ │ │ │Prt│ScL│Pau│ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ + * │ │ │ │ │ │ │ │TO2│ │ │Ins│Del│NuL│ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┤ + * │LSFT│ │ │ │MPl│MSt│MPv│MNx│Mut│Vo-│Vo+│ │RShift│ │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┤ + * │Ctrl│Win │Alt │ Ctrl │AGr│Hom│PgD│PgU│End│ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ + * + * NUM + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │TO0│ │ │ │ │ │ │7 │8 │9 │ │ │ │Backspc│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │ │ │ │ │ │ │ │4 │5 │6 │ │ │ │Enter│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ + * │ │ │ │ │ │ │ │1 │2 │3 │ │ │ │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┤ + * │ │ │ │ │ │ │ │0 │0 │, │. │- │RShift│ │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┤ + * │ │ │ │ │AGr│ │ │ │ │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ + * + * DYN + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │MSp│ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │ │RTg│RMo│RDe│RIn│ │ │ │ │ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ + * │ │HDe│HIn│SDe│SIn│ │ │ │ │ │ │ │ │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │MSp│ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┤ + * │ │ │ │ │ │MS1│MS2│MP1│MP2│ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ +*/ + +#define MacRec1 DYN_REC_START1 +#define MacRec2 DYN_REC_START2 +#define MacPla1 DYN_MACRO_PLAY1 +#define MacPla2 DYN_MACRO_PLAY2 +#define MacStop DYN_REC_STOP + + [DEF] = LAYOUT_60_iso_5x1u_split_rshift( + 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, + MO(FN1), 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_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, MO(DYN), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + + + [FN1] = LAYOUT_60_iso_5x1u_split_rshift( + 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_DEL, + _______, XXXXXXX, XXXXXXX, XXXXXXX, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PSCR, KC_SLCK, KC_PAUS, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, TO(NUM), XXXXXXX, XXXXXXX, KC_INS, KC_DEL, KC_NLCK, XXXXXXX, + _______, XXXXXXX, XXXXXXX, XXXXXXX, KC_MPLY, KC_MSTP, KC_MPRV, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, KC_RSFT, XXXXXXX, + _______, _______, _______, KC_LCTL, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END + ), + + [NUM] = LAYOUT_60_iso_5x1u_split_rshift( + TO(DEF), _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, _______, XXXXXXX, XXXXXXX, _______, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_P4, KC_P5, KC_P6, XXXXXXX, XXXXXXX, _______, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_P1, KC_P2, KC_P3, XXXXXXX, XXXXXXX, XXXXXXX, _______, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_P0, KC_P0, _______, _______, _______, _______, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ), + + [DYN] = LAYOUT_60_iso_5x1u_split_rshift( + MacStop, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, RGB_TOG, RGB_MOD, RGB_VAD, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MacRec1, MacRec2, MacPla1, MacPla2 + ), +}; + diff --git a/keyboards/dz60/keymaps/iso_de_root/readme.md b/keyboards/dz60/keymaps/iso_de_root/readme.md new file mode 100644 index 000000000000..b06ad09cd40d --- /dev/null +++ b/keyboards/dz60/keymaps/iso_de_root/readme.md @@ -0,0 +1,4 @@ +# ISO DE layout + +This layout is ISO-DE and similar to a standard 60 ISO layout. The bottom right has 5x 1u keys. +Right shift is split to add a function key. diff --git a/keyboards/dz60/keymaps/iso_de_root/rules.mk b/keyboards/dz60/keymaps/iso_de_root/rules.mk new file mode 100644 index 000000000000..0dcfa1b71d6e --- /dev/null +++ b/keyboards/dz60/keymaps/iso_de_root/rules.mk @@ -0,0 +1,15 @@ +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # 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 = no # Enable keyboard backlight functionality +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = yes +AUTO_SHIFT_ENABLE = no # If the time depressed is greater than or equal to the AUTO_SHIFT_TIMEOUT, then a shifted version of the key is emitted. If the time is less than the AUTO_SHIFT_TIMEOUT time, then the normal state is emitted +TAP_DANCE_ENABLE = no From 3e20697a33ddb5ce22e91dc786b8de3ff3c74f0c Mon Sep 17 00:00:00 2001 From: Nikita Titov Date: Sat, 5 Oct 2019 22:04:46 +0300 Subject: [PATCH 037/316] removed deprecated option for Travis (#6896) --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ee451ab8ab54..84fa63faf3d3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,5 @@ os: linux dist: trusty -sudo: required group: edge language: c branches: From 03c132b33124630ab64e7f6370be9419e7a26b04 Mon Sep 17 00:00:00 2001 From: Matthew Lyon Date: Sat, 5 Oct 2019 12:22:52 -0700 Subject: [PATCH 038/316] [Keymap] finally committing my updates (#6904) --- keyboards/keebio/iris/keymaps/mattly/keymap.c | 12 +++--- users/mattly/mattly.h | 37 +++++++++++++------ 2 files changed, 32 insertions(+), 17 deletions(-) diff --git a/keyboards/keebio/iris/keymaps/mattly/keymap.c b/keyboards/keebio/iris/keymaps/mattly/keymap.c index 4f4ff225ee7d..b7713a014647 100644 --- a/keyboards/keebio/iris/keymaps/mattly/keymap.c +++ b/keyboards/keebio/iris/keymaps/mattly/keymap.c @@ -6,18 +6,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_SCLN, + KC_DEL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_ESC, + KC_BSPC, KC_Q, W_CTRL, E_ALT, R_GUI, KC_T, KC_Y, U_GUI, I_ALT, O_CTRL, KC_P, KC_SCLN, KC_CAPS, A_CTRL, S_ALT, D_GUI, F_SHFT, KC_G, KC_H, J_SHFT, K_GUI, L_ALT, MINSCTL, KC_QUOT, - XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, SPC_SFT, BSP_NUM, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, - ESC_HYP, BSP_NUM, ENT_SFT, SPC_SFT, TAB_SYM, DEL_WRP + NAVLOCK, KC_Z, KC_X, KC_C, KC_V, KC_B, ENT_SYM, TAB_NUM, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + ESC_HYP, TAB_NUM, SPC_SFT, SPC_SFT, BSP_SYM, DEL_WRP ), [_SYMBOL] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_AMPR, KC_GRV, KC_TILD, KC_LBRC, KC_RBRC, KC_LABK, KC_RABK, KC_PLUS, KC_ASTR, XXXXXXX, _______, _______, KC_DLR, KC_PERC, KC_EQL, KC_LPRN, KC_RPRN, KC_SCLN, KC_COLN, KC_EXLM, KC_AT, KC_UNDS, _______, - RESET, XXXXXXX, KC_CIRC, KC_HASH, KC_LCBR, KC_RCBR, _______, _______, KC_QUOT, KC_DQUO, KC_PIPE, KC_BSLS, KC_QUES, _______, + _______, XXXXXXX, KC_CIRC, KC_HASH, KC_LCBR, KC_RCBR, _______, _______, KC_QUOT, KC_DQUO, KC_PIPE, KC_BSLS, KC_QUES, _______, _______, _______, _______, _______, _______, _______ ), @@ -25,7 +25,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { XNOTIFY, XXXXXXX, XPRVSPC, NWIN, XNXTSPC, XXXXXXX, XXXXXXX, KC_SLSH, KC_ASTR, KC_MINS, KC_PLUS, XXXXXXX, XALLWIN, NAVFWD, BWORD, KC_UP, FWORD, KC_PGUP, KC_DLR, KC_P7, KC_P8, KC_P9, KC_DOT, XXXXXXX, XDESKTP, NAVBACK, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_PERC, KC_P4, KC_P5, KC_P6, KC_EQL, XXXXXXX, - RESET, PTAB, KC_HOME, PWIN, KC_END, NTAB, _______, _______, XXXXXXX, KC_P1, KC_P2, KC_P3, KC_ENT, XXXXXXX, + _______, PTAB, KC_HOME, PWIN, KC_END, NTAB, _______, _______, KC_P0, KC_P1, KC_P2, KC_P3, KC_COMM, _______, _______, _______, _______, _______, _______, KC_P0 ), diff --git a/users/mattly/mattly.h b/users/mattly/mattly.h index 08318840d0c7..da09ddcdb268 100644 --- a/users/mattly/mattly.h +++ b/users/mattly/mattly.h @@ -26,36 +26,50 @@ enum { _FUNCT, }; +// == Thumbs // left hand #define ESC_HYP MT(MOD_HYPR, KC_ESC) -#define BSP_NUM LT(_NAVNUM, KC_BSPC) -#define ENT_SFT MT(MOD_LSFT, KC_ENT) +#define TAB_NUM LT(_NAVNUM, KC_TAB) #define SPC_SFT MT(MOD_LSFT, KC_SPC) +#define ENT_SYM LT(_SYMBOL, KC_ENT) + // right hand #define SPC_SFT MT(MOD_LSFT, KC_SPC) -#define TAB_SYM LT(_SYMBOL, KC_TAB) +#define BSP_SYM LT(_SYMBOL, KC_BSPC) #define DEL_WRP MT(MOD_LCTL | MOD_LALT | MOD_LGUI, KC_DEL) #define NAVLOCK TG(_NAVNUM) #define SYMLOCK TG(_SYMBOL) -// QWERTY - +// == QWERTY +// left hand home row #define A_CTRL MT(MOD_LCTL, KC_A) #define S_ALT MT(MOD_LALT, KC_S) #define D_GUI MT(MOD_LGUI, KC_D) #define F_SHFT MT(MOD_LSFT, KC_F) +// left hand aux +#define W_CTRL MT(MOD_LCTL, KC_W) +#define E_ALT MT(MOD_LALT, KC_E) +#define R_GUI MT(MOD_LGUI, KC_R) + +// right hand home row #define J_SHFT MT(MOD_RSFT, KC_J) #define K_GUI MT(MOD_RGUI, KC_K) #define L_ALT MT(MOD_RALT, KC_L) #define MINSCTL MT(MOD_RCTL, KC_MINS) +// right hand aux +#define U_GUI MT(MOD_RGUI, KC_U) +#define I_ALT MT(MOD_RALT, KC_I) +#define O_CTRL MT(MOD_RCTL, KC_O) +// == OS X default keys +// movement by word #define BWORD LALT(KC_LEFT) #define FWORD LALT(KC_RIGHT) -// OS X default keys +// gui navigation #define NWIN LGUI(KC_GRV) // Next Window #define PWIN LGUI(LSFT(KC_GRV)) // Prev Window #define NTAB LGUI(LSFT(KC_RBRC)) // Next Tab @@ -70,12 +84,13 @@ enum { #define XPRVSPC HYPR(KC_F17) #define XNOTIFY HYPR(KC_F18) +// == UNDERGLOW #ifdef RGBLIGHT_ENABLE -#define HSV_CAPS 42, 255, 255 -#define HSV_DEFAULT 30, 218, 255 -#define HSV_SYMBOL 22, 255, 255 -#define HSV_NAVNUM 245, 200, 255 -#define HSV_FUNCT 233, 255, 255 +#define HSV_CAPS 60, 255, 255 +#define HSV_DEFAULT 30, 255, 255 +#define HSV_SYMBOL 18, 255, 255 +#define HSV_NAVNUM 250, 255, 255 +#define HSV_FUNCT 238, 255, 255 #define HSV_RESET 180, 255, 255 #endif From c23581d985430c2571af958c4aca43499737fb72 Mon Sep 17 00:00:00 2001 From: Jonathan Rascher Date: Sat, 5 Oct 2019 14:40:08 -0500 Subject: [PATCH 039/316] [Keymap] Initial personal keymap for Lily58 (#6908) * Initial Lily58 keymap * Still not sure if these thumb key placements are optimal or not. I might want to move space (enter) one key to the left (right), respectively. * Also unsure how I feel about Esc on a mod tap key with Ctrl... might move it back to its own key and relocate the = key. * Missing bindings for Print Screen, Scroll Lock, Pause/Break. * Make Lily58 layout support operation without numrow * Move some Lily58 modifiers around * Move nav keys to more consistent locations * Rebinding shift on Raise is stupid * Don't stomp Ctrl on the Lower layer * Tweak bottom row a little bit --- keyboards/lily58/keymaps/bcat/config.h | 3 ++ keyboards/lily58/keymaps/bcat/keymap.c | 51 ++++++++++++++++++++++++++ keyboards/lily58/keymaps/bcat/rules.mk | 1 + users/bcat/config.h | 5 +++ 4 files changed, 60 insertions(+) create mode 100644 keyboards/lily58/keymaps/bcat/config.h create mode 100644 keyboards/lily58/keymaps/bcat/keymap.c create mode 100644 keyboards/lily58/keymaps/bcat/rules.mk diff --git a/keyboards/lily58/keymaps/bcat/config.h b/keyboards/lily58/keymaps/bcat/config.h new file mode 100644 index 000000000000..180926204492 --- /dev/null +++ b/keyboards/lily58/keymaps/bcat/config.h @@ -0,0 +1,3 @@ +#pragma once + +#define EE_HANDS diff --git a/keyboards/lily58/keymaps/bcat/keymap.c b/keyboards/lily58/keymaps/bcat/keymap.c new file mode 100644 index 000000000000..562aad3fd047 --- /dev/null +++ b/keyboards/lily58/keymaps/bcat/keymap.c @@ -0,0 +1,51 @@ +#include QMK_KEYBOARD_H + +enum layer { + LAYER_DEFAULT, + LAYER_LOWER, + LAYER_RAISE, + LAYER_ADJUST, +}; + +#define LY_LWR MO(LAYER_LOWER) +#define LY_RSE MO(LAYER_RAISE) + +#define KY_CESC LCTL_T(KC_ESC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [LAYER_DEFAULT] = LAYOUT( + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KY_CESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC, KC_RBRC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LALT, LY_LWR, KC_SPC, KC_ENT, LY_RSE, KC_RGUI, KC_APP + ), + + [LAYER_LOWER] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, KC_F12, KC_INS, KC_DEL, _______, _______, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, _______, KC_LBRC, KC_RBRC, KC_GRV, KC_BSLS, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [LAYER_RAISE] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_PLUS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_UNDS, + _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_HOME, KC_PGUP, + _______, _______, KC_CAPS, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, KC_LCBR, KC_RCBR, KC_TILD, KC_PIPE, KC_END, KC_PGDN, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [LAYER_ADJUST] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_MPLY, KC_VOLU, KC_MSTP, _______, _______, EEP_RST, RESET, _______, _______, _______, _______, + _______, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, LAYER_LOWER, LAYER_RAISE, LAYER_ADJUST); +} diff --git a/keyboards/lily58/keymaps/bcat/rules.mk b/keyboards/lily58/keymaps/bcat/rules.mk new file mode 100644 index 000000000000..c87b447c1e3d --- /dev/null +++ b/keyboards/lily58/keymaps/bcat/rules.mk @@ -0,0 +1 @@ +BOOTLOADER = atmel-dfu # Elite-C diff --git a/users/bcat/config.h b/users/bcat/config.h index 990fda68cad1..a0942e9f4f5b 100644 --- a/users/bcat/config.h +++ b/users/bcat/config.h @@ -3,6 +3,11 @@ #define TAP_CODE_DELAY 20 +/* Extend default tap timeout because I'm too slow. :) */ +#undef TAPPING_TERM + +#define TAPPING_TERM 250 + #if defined(RGBLIGHT_ENABLE) /* Turn off RGB underglow when the host goes to sleep. */ #define RGBLIGHT_SLEEP From 8cf1491d04f96f3ab4bedac408c434e8e50adf7d Mon Sep 17 00:00:00 2001 From: gtips <51393966+gtips@users.noreply.github.com> Date: Sun, 6 Oct 2019 08:10:27 +0900 Subject: [PATCH 040/316] [Keyboard] Add keyboard Reviung34 (#6847) --- keyboards/reviung34/config.h | 251 ++++++++++++++++++ keyboards/reviung34/info.json | 0 keyboards/reviung34/keymaps/default/config.h | 20 ++ keyboards/reviung34/keymaps/default/keymap.c | 67 +++++ keyboards/reviung34/keymaps/default/readme.md | 1 + keyboards/reviung34/readme.md | 18 ++ keyboards/reviung34/reviung34.c | 51 ++++ keyboards/reviung34/reviung34.h | 39 +++ keyboards/reviung34/rules.mk | 45 ++++ 9 files changed, 492 insertions(+) create mode 100755 keyboards/reviung34/config.h create mode 100755 keyboards/reviung34/info.json create mode 100755 keyboards/reviung34/keymaps/default/config.h create mode 100755 keyboards/reviung34/keymaps/default/keymap.c create mode 100755 keyboards/reviung34/keymaps/default/readme.md create mode 100755 keyboards/reviung34/readme.md create mode 100755 keyboards/reviung34/reviung34.c create mode 100755 keyboards/reviung34/reviung34.h create mode 100755 keyboards/reviung34/rules.mk diff --git a/keyboards/reviung34/config.h b/keyboards/reviung34/config.h new file mode 100755 index 000000000000..5ebb631209a1 --- /dev/null +++ b/keyboards/reviung34/config.h @@ -0,0 +1,251 @@ +/* +Copyright 2019 gtips + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER gtips +#define PRODUCT reviung34 +#define DESCRIPTION A 34-key split keyboard + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 9 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { F4, F5, F6, F7} +#define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B1, B3, B2, B6 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * 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 + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/reviung34/info.json b/keyboards/reviung34/info.json new file mode 100755 index 000000000000..e69de29bb2d1 diff --git a/keyboards/reviung34/keymaps/default/config.h b/keyboards/reviung34/keymaps/default/config.h new file mode 100755 index 000000000000..1924c64a1ef4 --- /dev/null +++ b/keyboards/reviung34/keymaps/default/config.h @@ -0,0 +1,20 @@ +/* Copyright 2019 gtips + * + * 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 . + */ + +#pragma once + +// place overrides here + diff --git a/keyboards/reviung34/keymaps/default/keymap.c b/keyboards/reviung34/keymaps/default/keymap.c new file mode 100755 index 000000000000..4d497a76b766 --- /dev/null +++ b/keyboards/reviung34/keymaps/default/keymap.c @@ -0,0 +1,67 @@ +/* Copyright 2019 gtips + * + * 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 . + */ +#include QMK_KEYBOARD_H + +enum layer_names { + _BASE, + _LOWER, + _RAISE, + _ADJUST +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +#define CT_TB LCTL_T(KC_TAB) +#define CT_Q LCTL_T(KC_Q) +#define SF_Z LSFT_T(KC_Z) +#define SF_SS RSFT_T(KC_SLSH) +#define AL_X LALT_T(KC_X) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_reviung34( + CT_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, + SF_Z, AL_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, SF_SS, + CT_TB, LOWER, RAISE, KC_SPC + ), + + [_LOWER] = LAYOUT_reviung34( + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, + KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_QUOT, + KC_LSFT, KC_ESC, KC_LGUI, KC_LALT, KC_CAPS, KC_HOME, KC_END, KC_PGUP, KC_PGDN, KC_DEL, + _______, _______, _______, KC_BSPC + ), + + [_RAISE] = LAYOUT_reviung34( + 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_LBRC, KC_RBRC, KC_BSLS, XXXXXXX, XXXXXXX, KC_GRV, KC_TILD, KC_DQUO, + KC_LSFT, KC_ESC, KC_RGUI, KC_LALT, KC_CAPS, KC_TAB, KC_RALT, KC_RCTL, KC_RSFT, KC_BSPC, + _______, _______, _______, KC_ENT + ), + + [_ADJUST] = LAYOUT_reviung34( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_F7, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_F11, KC_F12, XXXXXXX, XXXXXXX, KC_PSCR, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, _______, _______, XXXXXXX + ), +}; + +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + diff --git a/keyboards/reviung34/keymaps/default/readme.md b/keyboards/reviung34/keymaps/default/readme.md new file mode 100755 index 000000000000..2e4619fae837 --- /dev/null +++ b/keyboards/reviung34/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for reviung34 diff --git a/keyboards/reviung34/readme.md b/keyboards/reviung34/readme.md new file mode 100755 index 000000000000..48b054cf941a --- /dev/null +++ b/keyboards/reviung34/readme.md @@ -0,0 +1,18 @@ +# reviung34 + +![REVIUNG34 SPLIT](/~https://github.com/gtips/reviung/blob/master/reviung34split/image/REVIUNG34.jpg) + +The REVIUNG34 SPLIT is 34-key split ortholinear keyboard. +Use one ProMicro. +And connect the left and right keyboards using a LAN cable. + +Keyboard Maintainer: [gtips](/~https://github.com/gtips) +Hardware Supported: The REVIUNG34 PCBs, Pro Micro supported +Hardware Availability: [PCB & Case Data](/~https://github.com/gtips/reviung/tree/master/reviung34split) + +Make example for this keyboard (after setting up your build environment): + + make reviung34:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + diff --git a/keyboards/reviung34/reviung34.c b/keyboards/reviung34/reviung34.c new file mode 100755 index 000000000000..9a10f96f56c7 --- /dev/null +++ b/keyboards/reviung34/reviung34.c @@ -0,0 +1,51 @@ +/* Copyright 2019 gtips + * + * 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 . + */ +#include "reviung34.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* + +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/reviung34/reviung34.h b/keyboards/reviung34/reviung34.h new file mode 100755 index 000000000000..ccf9762f7b54 --- /dev/null +++ b/keyboards/reviung34/reviung34.h @@ -0,0 +1,39 @@ +/* Copyright 2019 gtips + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_reviung34( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K35, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K36, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K37, \ + K32, K33, K34, K38 \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08 }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28 }, \ + { KC_NO, KC_NO, K32, K33, K34, K35, K36, K37, K38 } \ +} diff --git a/keyboards/reviung34/rules.mk b/keyboards/reviung34/rules.mk new file mode 100755 index 000000000000..7c3d5f39171d --- /dev/null +++ b/keyboards/reviung34/rules.mk @@ -0,0 +1,45 @@ +# MCU name +MCU = atmega32u4 + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = caterina + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + From 18a0e6fedc9b88209029979f52b7952328b095fd Mon Sep 17 00:00:00 2001 From: Josh Benavides Date: Sun, 6 Oct 2019 09:24:31 +1000 Subject: [PATCH 041/316] [Keymap] Add HHKB-based keymap for DZ60 (#6907) * Created personal keymap for dz60 hhkb layout. * Renamed directory joooosh to joooosh_hhkb... Removed redundant KC_TRNS alias #define... Updated to use KC_TRNS alias defined in QMK_KEYBOARD_H. --- keyboards/dz60/keymaps/joooosh_hhkb/keymap.c | 49 ++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 keyboards/dz60/keymaps/joooosh_hhkb/keymap.c diff --git a/keyboards/dz60/keymaps/joooosh_hhkb/keymap.c b/keyboards/dz60/keymaps/joooosh_hhkb/keymap.c new file mode 100644 index 000000000000..05ceb27e5ed5 --- /dev/null +++ b/keyboards/dz60/keymaps/joooosh_hhkb/keymap.c @@ -0,0 +1,49 @@ +#include QMK_KEYBOARD_H + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + + /* BASE LAYER + * + * ,-----------------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \| | Del | + * |-----------------------------------------------------------------------------------------+ + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | + * |-----------------------------------------------------------------------------------------+ + * | LCTRL | A | S | D | F | G | H | J | K | L | ; | ' | Enter | + * |-----------------------------------------------------------------------------------------+ + * | LShift | Z | X | C | V | B | N | M | , | . | / | RShift | FN1 | + * |-----------------------------------------------------------------------------------------+ + * | LGUI | LAlt | Space | RAlt | RCTRL | + * `-----------------------------------------------------------------------------------------' + */ + LAYOUT_60_hhkb( + KC_GESC, 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_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL), + + +/* FN1 LAYER + * + * ,--------------------------------------------------------------------------------------------------------------------- + * | KC_GRV | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | INSERT | RESET | + * |---------------------------------------------------------------------------------------------------------------------+ + * | RGB_TOG | _ | _ | _ | _ | _ | _ | _ | PSCR | SLCK | PAUS | UP | _ | CLR | + * |---------------------------------------------------------------------------------------------------------------------+ + * | CAPS | VOLD | VOLU | MUTE | _ | _ | PAST | PSLS | HOME | PGUP | LEFT | RIGHT | RETURN | + * |---------------------------------------------------------------------------------------------------------------------+ + * | _ | _ | _ | _ | _ | _ | PPLS | PMNS | END | PGDN | DOWN | _ | _ | + * |---------------------------------------------------------------------------------------------------------------------+ + * | _ | _ | _ | APP | _ | + * `---------------------------------------------------------------------------------------------------------------------' + */ + LAYOUT_60_hhkb( + 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_INS, RESET, + RGB_TOG, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, KC_CLR, + KC_CAPS, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RIGHT, KC_RETURN, + _______, _______, _______, _______, _______, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, + _______, _______, _______, KC_APP, _______), +}; From 60267fe2ca2c5373231a8f3d3bff43527fbbb7bf Mon Sep 17 00:00:00 2001 From: Max Rumpf Date: Sun, 6 Oct 2019 01:44:22 +0200 Subject: [PATCH 042/316] [Keyboard] Add Phoebe, a keyboard by Maxr1998 (#6870) * Add Phoebe, a keyboard by Maxr1998 * Improve include-guard * Remove unused functions * Remove unused extern * Add image * Some more fixes --- keyboards/maxr1998/phoebe/config.h | 71 ++++++++++++ keyboards/maxr1998/phoebe/info.json | 73 +++++++++++++ .../maxr1998/phoebe/keymaps/default/keymap.c | 102 ++++++++++++++++++ .../maxr1998/phoebe/keymaps/default/rules.mk | 0 keyboards/maxr1998/phoebe/phoebe.c | 1 + keyboards/maxr1998/phoebe/phoebe.h | 18 ++++ keyboards/maxr1998/phoebe/readme.md | 13 +++ keyboards/maxr1998/phoebe/rules.mk | 30 ++++++ 8 files changed, 308 insertions(+) create mode 100644 keyboards/maxr1998/phoebe/config.h create mode 100644 keyboards/maxr1998/phoebe/info.json create mode 100644 keyboards/maxr1998/phoebe/keymaps/default/keymap.c create mode 100644 keyboards/maxr1998/phoebe/keymaps/default/rules.mk create mode 100644 keyboards/maxr1998/phoebe/phoebe.c create mode 100644 keyboards/maxr1998/phoebe/phoebe.h create mode 100644 keyboards/maxr1998/phoebe/readme.md create mode 100644 keyboards/maxr1998/phoebe/rules.mk diff --git a/keyboards/maxr1998/phoebe/config.h b/keyboards/maxr1998/phoebe/config.h new file mode 100644 index 000000000000..2e912b096519 --- /dev/null +++ b/keyboards/maxr1998/phoebe/config.h @@ -0,0 +1,71 @@ +/* +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Maxr1998 +#define PRODUCT Phoebe +#define DESCRIPTION A 5x12 ortolinear keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 12 + +/* Planck PCB default pin-out */ +#define MATRIX_ROW_PINS { B7, B3, B2, B1, D6 } +#define MATRIX_COL_PINS { D7, B4, B5, B6, C6, C7, B0, F1, F4, F5, F6, F7 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 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 + +/* RGB LED Setup */ +#define RGB_DI_PIN F0 // pin the DI on the WS2812B is hooked-up to +#define RGBLIGHT_ANIMATIONS // run RGB animations +#define RGBLED_NUM 8 // number of LEDs + +/* + * 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 diff --git a/keyboards/maxr1998/phoebe/info.json b/keyboards/maxr1998/phoebe/info.json new file mode 100644 index 000000000000..f5d81cc6f54c --- /dev/null +++ b/keyboards/maxr1998/phoebe/info.json @@ -0,0 +1,73 @@ +{ + "keyboard_name": "Phoebe", + "keyboard_folder": "maxr1998/phoebe", + "url": "/~https://github.com/Maxr1998/Phoebe_Keyboard", + "maintainer": "Maxr1998", + "width": 12, + "height": 5, + "layouts": { + "LAYOUT": { + "key_count": 59, + "layout": [ + { "w": 1, "x": 0, "y": 0 }, + { "w": 1, "x": 1, "y": 0 }, + { "w": 1, "x": 2, "y": 0 }, + { "w": 1, "x": 3, "y": 0 }, + { "w": 1, "x": 4, "y": 0 }, + { "w": 1, "x": 5, "y": 0 }, + { "w": 1, "x": 6, "y": 0 }, + { "w": 1, "x": 7, "y": 0 }, + { "w": 1, "x": 8, "y": 0 }, + { "w": 1, "x": 9, "y": 0 }, + { "w": 1, "x": 10, "y": 0 }, + { "w": 1, "x": 11, "y": 0 }, + { "w": 1, "x": 0, "y": 1 }, + { "w": 1, "x": 1, "y": 1 }, + { "w": 1, "x": 2, "y": 1 }, + { "w": 1, "x": 3, "y": 1 }, + { "w": 1, "x": 4, "y": 1 }, + { "w": 1, "x": 5, "y": 1 }, + { "w": 1, "x": 6, "y": 1 }, + { "w": 1, "x": 7, "y": 1 }, + { "w": 1, "x": 8, "y": 1 }, + { "w": 1, "x": 9, "y": 1 }, + { "w": 1, "x": 10, "y": 1 }, + { "w": 1, "x": 11, "y": 1 }, + { "w": 1, "x": 0, "y": 2 }, + { "w": 1, "x": 1, "y": 2 }, + { "w": 1, "x": 2, "y": 2 }, + { "w": 1, "x": 3, "y": 2 }, + { "w": 1, "x": 4, "y": 2 }, + { "w": 1, "x": 5, "y": 2 }, + { "w": 1, "x": 6, "y": 2 }, + { "w": 1, "x": 7, "y": 2 }, + { "w": 1, "x": 8, "y": 2 }, + { "w": 1, "x": 9, "y": 2 }, + { "w": 1, "x": 10, "y": 2 }, + { "w": 1, "x": 11, "y": 2 }, + { "w": 1, "x": 0, "y": 3 }, + { "w": 1, "x": 1, "y": 3 }, + { "w": 1, "x": 2, "y": 3 }, + { "w": 1, "x": 3, "y": 3 }, + { "w": 1, "x": 4, "y": 3 }, + { "w": 1, "x": 5, "y": 3 }, + { "w": 1, "x": 6, "y": 3 }, + { "w": 1, "x": 7, "y": 3 }, + { "w": 1, "x": 8, "y": 3 }, + { "w": 1, "x": 9, "y": 3 }, + { "w": 1, "x": 10, "y": 3 }, + { "w": 1, "x": 11, "y": 3 }, + { "w": 1, "x": 0, "y": 4 }, + { "w": 1, "x": 1, "y": 4 }, + { "w": 1, "x": 2, "y": 4 }, + { "w": 1, "x": 3, "y": 4 }, + { "w": 1, "x": 4, "y": 4 }, + { "w": 2, "x": 5, "y": 4 }, + { "w": 1, "x": 7, "y": 4 }, + { "w": 1, "x": 8, "y": 4 }, + { "w": 1, "x": 9, "y": 4 }, + { "w": 1, "x": 10, "y": 4 }, + { "w": 1, "x": 11, "y": 4 } ] + } + } +} diff --git a/keyboards/maxr1998/phoebe/keymaps/default/keymap.c b/keyboards/maxr1998/phoebe/keymaps/default/keymap.c new file mode 100644 index 000000000000..1bf6f291dc8a --- /dev/null +++ b/keyboards/maxr1998/phoebe/keymaps/default/keymap.c @@ -0,0 +1,102 @@ +#include QMK_KEYBOARD_H + +#include "keymap_german.h" + +enum layers { + _QWERTZ, + _SC, + _FN, + _GAMING +}; + +#define KC_SC MO(_SC) +#define KC_FN MO(_FN) +#define G_1 TO(_GAMING) +#define G_0 TG(_GAMING) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwertz + * ,-----------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bspc | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Grv | Q | W | E | R | T | Z | U | I | O | P | Enter| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | A | S | D | F | G | H | J | K | L | +* ~ | ? | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Y | X | C | V | B | N | M | , | . | Up | Shift| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Sup | Alt | Alt | SpCh | Space | AltGr| Fun | Left | Down | Right| + * `-----------------------------------------------------------------------------------' + */ +[_QWERTZ] = LAYOUT( + KC_ESC, DE_1, DE_2, DE_3, DE_4, DE_5, DE_6, DE_7, DE_8, DE_9, DE_0, KC_BSPC, + KC_GRV, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, DE_PLUS, DE_QST, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_LALT, KC_SC, KC_SPC, KC_ALGR, KC_FN, KC_LEFT, KC_DOWN, KC_RGHT +), + +/* Special characters + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | #' | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | <> | | | | | | | | | | -_ | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | ---- | ---- | | | ---- | | | | + * `-----------------------------------------------------------------------------------' + */ +[_SC] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, DE_HASH, _______, + _______, DE_LESS, _______, _______, _______, _______, _______, _______, _______, _______, DE_MINS, _______, + _______, _______, _______, XXXXXXX, _______, _______, _______, XXXXXXX, _______, _______, _______ +), + +/* Function layer + * ,-----------------------------------------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Ü | | Ö | F11 | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Lock | Ä | ß | | | GAME | | RGBS | RGBB | RGBS | F12 | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | RGBH-| RGBT | RGBH+| PgUp | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | ---- | ---- | | ---- | ---- | Home | PgDn | End | + * `-----------------------------------------------------------------------------------' + */ +[_FN] = LAYOUT( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL, + _______, _______, _______, _______, _______, _______, _______, DE_UE, _______, DE_OE, KC_F11, _______, + KC_LOCK, DE_AE, DE_SS, _______, _______, G_1, _______, RGB_M_P, RGB_M_B, RGB_M_SW,KC_F12, _______, + _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_TOG, RGB_HUI, KC_PGUP, _______, + XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDN, KC_END +), + +/* Gaming + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Space| | | | | | | Leave| | | | + * `-----------------------------------------------------------------------------------' + */ +[_GAMING] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_SPC, XXXXXXX, _______, _______, _______, _______, _______, G_0, _______, _______, _______ +) +}; diff --git a/keyboards/maxr1998/phoebe/keymaps/default/rules.mk b/keyboards/maxr1998/phoebe/keymaps/default/rules.mk new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/keyboards/maxr1998/phoebe/phoebe.c b/keyboards/maxr1998/phoebe/phoebe.c new file mode 100644 index 000000000000..d8629f7f55d5 --- /dev/null +++ b/keyboards/maxr1998/phoebe/phoebe.c @@ -0,0 +1 @@ +#include "phoebe.h" diff --git a/keyboards/maxr1998/phoebe/phoebe.h b/keyboards/maxr1998/phoebe/phoebe.h new file mode 100644 index 000000000000..2bf5a2d7990b --- /dev/null +++ b/keyboards/maxr1998/phoebe/phoebe.h @@ -0,0 +1,18 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + 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, k45, k47, k48, k49, k4a, k4b \ +) \ +{ \ + { 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, k45, k47, k48, k49, k4a, k4b } \ +} diff --git a/keyboards/maxr1998/phoebe/readme.md b/keyboards/maxr1998/phoebe/readme.md new file mode 100644 index 000000000000..72238e5db835 --- /dev/null +++ b/keyboards/maxr1998/phoebe/readme.md @@ -0,0 +1,13 @@ +# Phoebe +A 5x12 ortolinear keyboard, developed by Maxr1998, [fully open-source](/~https://github.com/Maxr1998/Phoebe_Keyboard). + +![Image](https://i.imgur.com/zEZxqZC.jpg) + +Keyboard Maintainer: [Maxr1998](/~https://github.com/Maxr1998) +Hardware Availability: DIY from the [open-source design files](/~https://github.com/Maxr1998/Phoebe), potential official distribution in the future + +Make example for this keyboard (after setting up your build environment): + + make maxr1998/phoebe:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/maxr1998/phoebe/rules.mk b/keyboards/maxr1998/phoebe/rules.mk new file mode 100644 index 000000000000..1f272473792e --- /dev/null +++ b/keyboards/maxr1998/phoebe/rules.mk @@ -0,0 +1,30 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader +# This definition is optional, and if your keyboard supports multiple bootloaders of +# different sizes, comment this out, and the correct address will be loaded +# automatically (+60). See bootloader.mk for all options. +BOOTLOADER = atmel-dfu + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +COMBO_ENABLE = no # Key combo feature +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +KEY_LOCK_ENABLE = yes +API_SYSEX_ENABLE = no +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + From f3f7f941dc7627ea8cdeb00b73c72bff3739de15 Mon Sep 17 00:00:00 2001 From: Kaiede <41651119+Kaiede@users.noreply.github.com> Date: Sat, 5 Oct 2019 19:59:16 -0700 Subject: [PATCH 043/316] [Keyboard] Whitefox Aria Layout Support (#6915) * [Keyboard] Add Whitefox Aria Layout * [Keyboard] Add Whitefox Aria to info.json * [Keyboard] Apply Whitefox.h Suggestions from Review Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> --- keyboards/whitefox/info.json | 4 ++++ keyboards/whitefox/whitefox.h | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/keyboards/whitefox/info.json b/keyboards/whitefox/info.json index e77e3ad2c373..5efe2910fc5a 100644 --- a/keyboards/whitefox/info.json +++ b/keyboards/whitefox/info.json @@ -10,6 +10,10 @@ "LAYOUT_truefox": { "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"x":15, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] + }, + + "LAYOUT_aria": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"x":15, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"x":15, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] } } } diff --git a/keyboards/whitefox/whitefox.h b/keyboards/whitefox/whitefox.h index 2724aad5a2bf..7791dac67ca6 100644 --- a/keyboards/whitefox/whitefox.h +++ b/keyboards/whitefox/whitefox.h @@ -102,4 +102,36 @@ along with this program. If not, see . { K80, K81, K82, K83, K84, K85, K86, KC_NO } \ } +/* ARIA WhiteFox + * ,---------------------------------------------------------------. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| Backsp|Ins| + * |---------------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \|Del| + * |---------------------------------------------------------------| + * |CapsL | A| S| D| F| G| H| J| K| L| ;| '|Enter |PgU| + * |---------------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |Up |PgD| + * |---------------------------------------------------------------| + * |Ctrl|GUI |Alt | Space |Alt |Ctrl| |Lef|Dow|Rig| + * `---------------------------------------------------------------' + */ + +#define LAYOUT_aria( \ + K00, K10, K20, K30, K40, K50, K60, K70, K80, K01, K11, K21, K31, K51, K61, \ + K71, K81, K02, K12, K22, K32, K42, K52, K62, K72, K82, K03, K13, K23, K33, \ + K43, K53, K63, K73, K83, K04, K14, K24, K34, K44, K54, K64, K84, K05, \ + K15, K35, K45, K55, K65, K75, K85, K06, K16, K26, K36, K46, K56, K66, \ + K76, K86, K07, K17, K27, K37, K57, K67, K77 \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07 }, \ + { K10, K11, K12, K13, K14, K15, K16, K17 }, \ + { K20, K21, K22, K23, K24, KC_NO, K26, K27 }, \ + { K30, K31, K32, K33, K34, K35, K36, K37 }, \ + { K40, KC_NO, K42, K43, K44, K45, K46, KC_NO }, \ + { K50, K51, K52, K53, K54, K55, K56, K57 }, \ + { K60, K61, K62, K63, K64, K65, K66, K67 }, \ + { K70, K71, K72, K73, KC_NO, K75, K76, K77 }, \ + { K80, K81, K82, K83, K84, K85, K86, KC_NO } \ +} + #endif From 78f01eef2e4586f59b56703d0a4f1a57a1af40a1 Mon Sep 17 00:00:00 2001 From: "St. John Johnson" Date: Sat, 5 Oct 2019 23:41:15 -0700 Subject: [PATCH 044/316] Use `keymap` instead of `username` variable for `qmk new_keymap` (#6885) Username is not defined and this causes `qmk new_keymap` to error. This appears to have originated from a partial update in /~https://github.com/qmk/qmk_firmware/pull/6708/files#diff-d5208bcbc79aa428556a743b6ff41086. This change completes the migration from `username` to `keymap` --- lib/python/qmk/cli/new/keymap.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/python/qmk/cli/new/keymap.py b/lib/python/qmk/cli/new/keymap.py index 5efb81c93fbf..96525e28e1b7 100755 --- a/lib/python/qmk/cli/new/keymap.py +++ b/lib/python/qmk/cli/new/keymap.py @@ -12,14 +12,14 @@ def new_keymap(cli): """Creates a new keymap for the keyboard of your choosing. """ - # ask for user input if keyboard or username was not provided in the command line + # ask for user input if keyboard or keymap was not provided in the command line keyboard = cli.config.new_keymap.keyboard if cli.config.new_keymap.keyboard else input("Keyboard Name: ") keymap = cli.config.new_keymap.keymap if cli.config.new_keymap.keymap else input("Keymap Name: ") # generate keymap paths kb_path = os.path.join(os.getcwd(), "keyboards", keyboard) keymap_path_default = os.path.join(kb_path, "keymaps/default") - keymap_path = os.path.join(kb_path, "keymaps/%s" % username) + keymap_path = os.path.join(kb_path, "keymaps/%s" % keymap) # check directories if not os.path.exists(kb_path): @@ -36,5 +36,5 @@ def new_keymap(cli): shutil.copytree(keymap_path_default, keymap_path, symlinks=True) # end message to user - cli.log.info("%s keymap directory created in: %s", username, keymap_path) - cli.log.info("Compile a firmware with your new keymap by typing: \n" + "qmk compile -kb %s -km %s", keyboard, username) + cli.log.info("%s keymap directory created in: %s", keymap, keymap_path) + cli.log.info("Compile a firmware with your new keymap by typing: \n" + "qmk compile -kb %s -km %s", keyboard, keymap) From 345d3cc046bb75c10b454c7b0d5bbf8675862e37 Mon Sep 17 00:00:00 2001 From: Daniel Klug Date: Sat, 5 Oct 2019 23:58:23 -0700 Subject: [PATCH 045/316] [Keymap] dactyl_left (#6775) * [keymap] dactyl_left Special layout for the left side of the ergodox dactyl. * [keymap] dactyl_left Special layout for the left side of the ergodox dactyl. * Updated readme.md * Update keyboards/handwired/dactyl_left/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/handwired/dactyl_left/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/handwired/dactyl_left/info.json Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/handwired/dactyl_left/info.json Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/handwired/dactyl_left/info.json Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Addressing changes for PR removed layers.json and 15-24 from rules.mk * Updating keymap for better a default Hopefully this works as a starting point --- keyboards/handwired/dactyl_left/config.h | 251 ++++++++++++++++++ keyboards/handwired/dactyl_left/dactyl_left.c | 51 ++++ keyboards/handwired/dactyl_left/dactyl_left.h | 42 +++ keyboards/handwired/dactyl_left/info.json | 12 + .../dactyl_left/keymaps/default/config.h | 19 ++ .../dactyl_left/keymaps/default/keymap.c | 57 ++++ .../dactyl_left/keymaps/default/readme.md | 1 + keyboards/handwired/dactyl_left/readme.md | 15 ++ keyboards/handwired/dactyl_left/rules.mk | 34 +++ 9 files changed, 482 insertions(+) create mode 100644 keyboards/handwired/dactyl_left/config.h create mode 100644 keyboards/handwired/dactyl_left/dactyl_left.c create mode 100644 keyboards/handwired/dactyl_left/dactyl_left.h create mode 100644 keyboards/handwired/dactyl_left/info.json create mode 100644 keyboards/handwired/dactyl_left/keymaps/default/config.h create mode 100644 keyboards/handwired/dactyl_left/keymaps/default/keymap.c create mode 100644 keyboards/handwired/dactyl_left/keymaps/default/readme.md create mode 100644 keyboards/handwired/dactyl_left/readme.md create mode 100644 keyboards/handwired/dactyl_left/rules.mk diff --git a/keyboards/handwired/dactyl_left/config.h b/keyboards/handwired/dactyl_left/config.h new file mode 100644 index 000000000000..43c0d3d43fcd --- /dev/null +++ b/keyboards/handwired/dactyl_left/config.h @@ -0,0 +1,251 @@ +/* +Copyright 2019 RedForty + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER RedForty +#define PRODUCT dactyl_left +#define DESCRIPTION A custom keyboard + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 6 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS \ + { F0, F1, F4, F5, F6, F7 } +#define MATRIX_COL_PINS \ + { D0, B7, B3, B2, B1, B0 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D2 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * 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 + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/handwired/dactyl_left/dactyl_left.c b/keyboards/handwired/dactyl_left/dactyl_left.c new file mode 100644 index 000000000000..e6fe3402dac6 --- /dev/null +++ b/keyboards/handwired/dactyl_left/dactyl_left.c @@ -0,0 +1,51 @@ +/* Copyright 2019 RedForty + * + * 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 . + */ +#include "dactyl_left.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* + +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/handwired/dactyl_left/dactyl_left.h b/keyboards/handwired/dactyl_left/dactyl_left.h new file mode 100644 index 000000000000..1babf3fe47f3 --- /dev/null +++ b/keyboards/handwired/dactyl_left/dactyl_left.h @@ -0,0 +1,42 @@ +/* Copyright 2019 RedForty + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT(\ + 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, \ + k50, k51, k52, k53, k54, k55 \ +) { \ + { 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, KC_NO }, \ + { k50, k51, k52, k53, k54, k55 } \ +} diff --git a/keyboards/handwired/dactyl_left/info.json b/keyboards/handwired/dactyl_left/info.json new file mode 100644 index 000000000000..4c9cd0845b25 --- /dev/null +++ b/keyboards/handwired/dactyl_left/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "dactyl_left", + "url": "", + "maintainer": "RedForty", + "width": 8, + "height": 7.75, + "layouts": { + "LAYOUT": { + "layout": [{"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":0, "y":1.375, "w":1.5}, {"x":1.5, "y":1.375}, {"x":2.5, "y":1.125}, {"x":3.5, "y":1}, {"x":4.5, "y":1.125}, {"x":5.5, "y":1.25}, {"x":0, "y":2.375, "w":1.5}, {"x":1.5, "y":2.375}, {"x":2.5, "y":2.125}, {"x":3.5, "y":2}, {"x":4.5, "y":2.125}, {"x":5.5, "y":2.25}, {"x":0, "y":3.375, "w":1.5}, {"x":1.5, "y":3.375}, {"x":2.5, "y":3.125}, {"x":3.5, "y":3}, {"x":4.5, "y":3.125}, {"x":5.5, "y":3.25}, {"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4}, {"x":4.5, "y":4.125}, {"x":6, "y":4.75}, {"x":7, "y":4.75}, {"x":5, "y":5.75, "h":2}, {"x":6, "y":5.75, "h":2}, {"x":7, "y":5.75}, {"x":7, "y":6.75}] + } + } +} diff --git a/keyboards/handwired/dactyl_left/keymaps/default/config.h b/keyboards/handwired/dactyl_left/keymaps/default/config.h new file mode 100644 index 000000000000..729cab168462 --- /dev/null +++ b/keyboards/handwired/dactyl_left/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 RedForty + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/handwired/dactyl_left/keymaps/default/keymap.c b/keyboards/handwired/dactyl_left/keymaps/default/keymap.c new file mode 100644 index 000000000000..708a380890f5 --- /dev/null +++ b/keyboards/handwired/dactyl_left/keymaps/default/keymap.c @@ -0,0 +1,57 @@ +/* Copyright 2019 RedForty + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { QMKBEST = SAFE_RANGE, QMKURL }; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT(/* Base */ + KC_SPC, KC_1, KC_2, KC_3, KC_4, KC_5, + KC_SPC, KC_Q, KC_W, KC_E, KC_R, KC_T, + KC_SPC, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_SPC, KC_Z, KC_X, KC_C, KC_V, KC_B, + KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, + KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMKBEST: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + SEND_STRING("QMK is the best thing ever!"); + } else { + // when keycode QMKBEST is released + } + break; + case QMKURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} + +void matrix_init_user(void) {} + +void matrix_scan_user(void) {} + +void led_set_user(uint8_t usb_led) {} diff --git a/keyboards/handwired/dactyl_left/keymaps/default/readme.md b/keyboards/handwired/dactyl_left/keymaps/default/readme.md new file mode 100644 index 000000000000..7fa3e26f5fde --- /dev/null +++ b/keyboards/handwired/dactyl_left/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for dactyl_left \ No newline at end of file diff --git a/keyboards/handwired/dactyl_left/readme.md b/keyboards/handwired/dactyl_left/readme.md new file mode 100644 index 000000000000..edcc83206875 --- /dev/null +++ b/keyboards/handwired/dactyl_left/readme.md @@ -0,0 +1,15 @@ +# dactyl_left + +![dactyl_left](https://i.imgur.com/PYL3Ca2.png) + +A custom build of an ergodox dactyl using a Teensy. Pins are custom. + +Keyboard Maintainer: [RedForty](/~https://github.com/RedForty) +Hardware Supported: Left side of the dactyl only +Hardware Availability: Custom job + +Make example for this keyboard (after setting up your build environment): + + make handwired/dactyl_left:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/handwired/dactyl_left/rules.mk b/keyboards/handwired/dactyl_left/rules.mk new file mode 100644 index 000000000000..61c123d03811 --- /dev/null +++ b/keyboards/handwired/dactyl_left/rules.mk @@ -0,0 +1,34 @@ +# MCU name +MCU = atmega32u4 + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = halfkay + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) From f73f71db9c65385d968cebf7471389a99ead6ba5 Mon Sep 17 00:00:00 2001 From: Janne Peippo Date: Sun, 6 Oct 2019 17:44:02 +0300 Subject: [PATCH 046/316] [Keymap] Add new Cyclops keymap (#6923) --- .../cyclops/keymaps/peippo/config.h | 19 +++++ .../cyclops/keymaps/peippo/keymap.c | 79 +++++++++++++++++++ .../cyclops/keymaps/peippo/readme.md | 20 +++++ 3 files changed, 118 insertions(+) create mode 100644 keyboards/westfoxtrot/cyclops/keymaps/peippo/config.h create mode 100644 keyboards/westfoxtrot/cyclops/keymaps/peippo/keymap.c create mode 100644 keyboards/westfoxtrot/cyclops/keymaps/peippo/readme.md diff --git a/keyboards/westfoxtrot/cyclops/keymaps/peippo/config.h b/keyboards/westfoxtrot/cyclops/keymaps/peippo/config.h new file mode 100644 index 000000000000..6278fae65853 --- /dev/null +++ b/keyboards/westfoxtrot/cyclops/keymaps/peippo/config.h @@ -0,0 +1,19 @@ +/* Copyright 2018 'mechmerlin' + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/westfoxtrot/cyclops/keymaps/peippo/keymap.c b/keyboards/westfoxtrot/cyclops/keymaps/peippo/keymap.c new file mode 100644 index 000000000000..902645d1770f --- /dev/null +++ b/keyboards/westfoxtrot/cyclops/keymaps/peippo/keymap.c @@ -0,0 +1,79 @@ +/* Copyright 2018 westfoxtrot + * + * 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 . + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Default layer + * ,--------------------------------------------------------------------------------------------------------------------. ,-------. + * | GrvEsc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | + | ´ | Backspace | | PgUp | + * |--------------------------------------------------------------------------------------------------------------------+ +-------+ + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Å | ¨ | Enter | | PgDn | + * |-----------------------------------------------------------------------------------------------------------, | `-------` + * | Mod Layer | A | S | D | F | G | H | J | K | L | Ö | Ä | ' | | + * |-----------------------------------------------------------------------------------------------------------------------, + * | Shift | < | Z | X | C | V | B | N | M | , | . | - | Shift | Up | + * |-----------------------------------------------------------------------------------------------------------------------+-------, + * | Control | Option | Command | Space | Command | Option | Left | Down | Right | + * `-------------------------------------------------------------------------------------------------------------------------------' + */ + + [0] = LAYOUT( + KC_GESC, 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_PGUP, + 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_PGDN, + MO(1), 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_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_NO, KC_UP, + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT), + + + /* Modifier layer + * ,--------------------------------------------------------------------------------------------------------------------. ,-------. + * | Esc | | | | | | | | [ | ] | | | | Delete | | VolUp | + * |--------------------------------------------------------------------------------------------------------------------+ +-------+ + * | | | | | | | | PgUp | Up | PgDn | | | | | | VolDn | + * |-----------------------------------------------------------------------------------------------------------, | `-------` + * | | |Scrnsht|Desktop| | | | Left | Down | Right | | | Reset | | + * |-----------------------------------------------------------------------------------------------------------------------, + * | Shift | | | | | | | | | | | | Shift | Play | + * |-----------------------------------------------------------------------------------------------------------------------+-------, + * | | | | | | | Prev | Mute | Next | + * `-------------------------------------------------------------------------------------------------------------------------------' + */ + + [1] = LAYOUT( + KC_ESC, _______, _______, _______, _______, _______, _______, _______, RALT(KC_8), RALT(KC_9), _______, _______, _______, KC_DEL, KC__VOLUP, + _______, _______, _______, _______, _______, _______, _______, KC_PGUP, KC_UP, KC_PGDN, _______, _______, _______, KC__VOLDOWN, + _______, _______, SGUI(KC_5), KC_F11, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, RESET , _______, + KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RSFT, _______, KC_MPLY, + _______, _______, _______, _______, _______, _______, KC_MRWD, KC__MUTE, KC_MFFD), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/westfoxtrot/cyclops/keymaps/peippo/readme.md b/keyboards/westfoxtrot/cyclops/keymaps/peippo/readme.md new file mode 100644 index 000000000000..a587d74c2af9 --- /dev/null +++ b/keyboards/westfoxtrot/cyclops/keymaps/peippo/readme.md @@ -0,0 +1,20 @@ +# Cyclops keymap by peippo + +Nordic layout with faster access to cursor movement keys and brackets. + +## Keymap notes + +- Default layer has a Grave Escape which outputs Escape when pressed normally, and `§` when Shift or Command are held. I like to setup Command+Esc to moving focus to next window (MacOS preferences, Keyboard / Shortcuts / Keyboard). +- `Caps Lock` can be held to access the modifier layer. + +## Modifier layer + +- Additional cursor movement keys on `J/K/L/I`, and Page Up/Page Down on `U/O`. +- Easier access to [] & {} (w/ Shift) on `8/9`. +- Show desktop on `D`. +- Screen capture tool on `S`. +- Media shortcuts on Arrow keys & Page Up/Page Down. + +### Build + +To build the firmware, run `make westfoxtrot/cyclops:peippo`. From c73d6f6ac8904395557b857a1cac551c6dd5fe9c Mon Sep 17 00:00:00 2001 From: Erdem Efe Erol <33372714+iTechsTR@users.noreply.github.com> Date: Sun, 6 Oct 2019 17:56:35 +0300 Subject: [PATCH 047/316] [Docs] Removed dead link (#6922) Removed an old link and fixed a typo --- docs/feature_ps2_mouse.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/feature_ps2_mouse.md b/docs/feature_ps2_mouse.md index 01e2cc63db6b..d138967991fe 100644 --- a/docs/feature_ps2_mouse.md +++ b/docs/feature_ps2_mouse.md @@ -149,7 +149,7 @@ In your keyboard config.h: #### PS/2 Mouse Features -These enable settings supported by the PS/2 mouse protocol: http://www.computer-engineering.org/ps2mouse/ +These enable settings supported by the PS/2 mouse protocol. ``` /* Use remote mode instead of the default stream mode (see link) */ @@ -202,7 +202,7 @@ Note: you can also use `ps2_mouse_set_resolution` for the same effect (not suppo #### Scroll Button If you're using a trackpoint, you will likely want to be able to use it for scrolling. -Its possible to enable a "scroll button/s" that when pressed will cause the mouse to scroll instead of moving. +It's possible to enable a "scroll button/s" that when pressed will cause the mouse to scroll instead of moving. To enable the feature, you must set a scroll button mask as follows: ``` From 60cd12f8a4ac82b1dcb2c8ec0f0231c2004507ce Mon Sep 17 00:00:00 2001 From: Erovia Date: Sun, 6 Oct 2019 20:15:17 +0200 Subject: [PATCH 048/316] Dimple: Fix Caps Lock LED behaviour (#6936) * Dimple: Fix Caps Lock LED behaviour * Dimple: fix helper functions and cleanup unnecessary code --- keyboards/lazydesigners/dimple/config.h | 6 ------ keyboards/lazydesigners/dimple/dimple.c | 4 ++-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/keyboards/lazydesigners/dimple/config.h b/keyboards/lazydesigners/dimple/config.h index 9814d1050ca6..5c36a7252729 100644 --- a/keyboards/lazydesigners/dimple/config.h +++ b/keyboards/lazydesigners/dimple/config.h @@ -58,9 +58,3 @@ along with this program. If not, see . /* #define RGBLIGHT_SAT_STEP 8 */ /* #define RGBLIGHT_VAL_STEP 8 */ #endif - -/* CapsLock LED */ -#define BACKLIGHT_PIN E6 -#ifdef BACKLIGHT_PIN - #define BACKLIGHT_LEVELS 6 -#endif diff --git a/keyboards/lazydesigners/dimple/dimple.c b/keyboards/lazydesigners/dimple/dimple.c index 69fb2253fc00..6bbb9a0477dd 100644 --- a/keyboards/lazydesigners/dimple/dimple.c +++ b/keyboards/lazydesigners/dimple/dimple.c @@ -16,11 +16,11 @@ #include "dimple.h" void dimple_led_on() { - writePinHigh(E6); + writePinLow(E6); } void dimple_led_off() { - writePinLow(E6); + writePinHigh(E6); } void keyboard_pre_init_kb(void) { From d0ef1397491d8e57ef3b72b3aa6af959cd3eb5c6 Mon Sep 17 00:00:00 2001 From: Erdem Efe Erol <33372714+iTechsTR@users.noreply.github.com> Date: Mon, 7 Oct 2019 02:39:23 +0300 Subject: [PATCH 049/316] [Docs] Typo fix for feature_hd44780.md (#6917) * Typo fix Fixed a typo. * Update feature_hd44780.md * Update feature_hd44780.md --- docs/feature_hd44780.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/feature_hd44780.md b/docs/feature_hd44780.md index e9d9e8b7b872..e0838948a2bd 100644 --- a/docs/feature_hd44780.md +++ b/docs/feature_hd44780.md @@ -6,7 +6,8 @@ You can enable support for HD44780 Displays by setting the `HD44780_ENABLE` flag ## Configuration -You will need to configure the pins used by your display and its number of lines and collumn in your keyboards `config.h`. +You will need to configure the pins used by your display, and its number of lines and columns in your keyboard's `config.h`. + Uncomment the section labled HD44780 and change the parameters as needed. ```` @@ -40,7 +41,7 @@ Should you need to configure other properties you can copy them from `quantum/hd ## Usage -To initialize your display call lcd_init() with one of these parameters: +To initialize your display, call `lcd_init()` with one of these parameters: ```` LCD_DISP_OFF : display off LCD_DISP_ON : display on, cursor off @@ -53,4 +54,4 @@ To do so call `lcd_clrsrc()`. To now print something to your Display you first call `lcd_gotoxy(column, line)`. To go to the start of the first line you would call `lcd_gotoxy(0, 0)` and then print a string with `lcd_puts("example string")`. -There are more posible methods to control the display. [For in depth documentation please visit the linked page.](http://homepage.hispeed.ch/peterfleury/doxygen/avr-gcc-libraries/group__pfleury__lcd.html) +There are more methods available to control the display. [For in depth documentation please visit the linked page.](http://homepage.hispeed.ch/peterfleury/doxygen/avr-gcc-libraries/group__pfleury__lcd.html) From 2881f53dd49d3fe70fefe9f05a618ac713c8529b Mon Sep 17 00:00:00 2001 From: Jonas Avellana <14019120+ninjonas@users.noreply.github.com> Date: Mon, 7 Oct 2019 11:42:03 -0600 Subject: [PATCH 050/316] [Keymap] updating ninjonas userspace (#6903) * [refactor] updating ninjonas layout blocks and standardized LOWER & ADJUST * [feat] added new macro M_TERM to open MacOS terminal app * [feat] introducing mod-tap functionality on keymap * [fix] fixing oled turning on when it feels like it. thanks @drashna for helping * [feat] updating OLED to rotate logo 180 degrees * [feat] updating keymaps to reflect VSCode frequent habits * [refactor] converting crkbd modifier keys to layer blocks * [fix(#6903)] converting _delay_ms to wait_ms on launching terminal macro --- keyboards/crkbd/keymaps/ninjonas/keymap.c | 18 ++++---- keyboards/hotdox/keymaps/ninjonas/keymap.c | 6 +-- keyboards/lily58/keymaps/ninjonas/keymap.c | 22 +++++----- keyboards/pinky/3/keymaps/ninjonas/keymap.c | 12 +++--- users/ninjonas/README.md | 13 ++++-- users/ninjonas/ninjonas.h | 47 +++++++++++++++++---- users/ninjonas/oled.c | 15 +++++-- users/ninjonas/process_records.c | 21 ++++++--- users/ninjonas/process_records.h | 1 + 9 files changed, 105 insertions(+), 50 deletions(-) diff --git a/keyboards/crkbd/keymaps/ninjonas/keymap.c b/keyboards/crkbd/keymaps/ninjonas/keymap.c index 21f83cc78e63..57164441b6a7 100644 --- a/keyboards/crkbd/keymaps/ninjonas/keymap.c +++ b/keyboards/crkbd/keymaps/ninjonas/keymap.c @@ -10,7 +10,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| _____________________QWERTY_L3______________________, _____________________QWERTY_R3______________________, //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| - T_GUI, KC_LCTL,LT_RAI, LT_LOW,KC_BSPC,KC_DEL + ________MOD_LEFT_________, ________MOD_RIGHT________ //`---------------------' `---------------------' ), @@ -22,7 +22,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| _____________________DVORAK_L3______________________, _____________________DVORAK_R3______________________, //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| - T_GUI, KC_LCTL,LT_RAI, LT_LOW,KC_BSPC,KC_DEL + ________MOD_LEFT_________, ________MOD_RIGHT________ //`---------------------' `---------------------' ), @@ -34,17 +34,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| _____________________COLEMAK_L3_____________________, _____________________COLEMAK_R3_____________________, //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| - T_GUI, KC_LCTL,LT_RAI, LT_LOW,KC_BSPC,KC_DEL + ________MOD_LEFT_________, ________MOD_RIGHT________ //`---------------------' `---------------------' ), [_LOWER] = LAYOUT_wrapper( //,----------------------------------------------------. ,----------------------------------------------------. - M_XXX2, M_XXX3, _________MEDIA_1_________, K_CSCN, _______________NAV_1______________, XXXXXXX, K_MDSH, + _____________________LOWER_L1_______________________, _____________________LOWER_R1_______________________, //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| - M_XXX4, M_XXX5, _________MEDIA_2_________, XXXXXXX, _______________NAV_2______________, K_LOCK, XXXXXXX, + _____________________LOWER_L2_______________________, _____________________LOWER_R2_______________________, //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| - KC_LSFT, M_SHFT, _________MEDIA_3_________, T_LBRC, T_RBRC, KC_M, XXXXXXX, M_CODE, M_XXX1, M_PYNV, + _____________________LOWER_L3_______________________, _____________________LOWER_R3_______________________, //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| _______,_______,_______, _______,_______,_______ //`---------------------' `---------------------' @@ -64,11 +64,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_ADJUST] = LAYOUT_wrapper( \ //,----------------------------------------------------. ,----------------------------------------------------. - M_MAKE, EEP_RST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, XXXXXXX, XXXXXXX, COLEMAK, DVORAK, QWERTY, + _____________________ADJUST_L1______________________, _____________________ADJUST_R1______________________, //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| - M_VRSN, M_MALL, RGB_SPI, RGB_SAI, RGB_HUI, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _____________________ADJUST_L2______________________, _____________________ADJUST_R2______________________, //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| - M_FLSH, XXXXXXX, RGB_SPD, RGB_SAD, RGB_HUD, RGB_VAD, RGB_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _____________________ADJUST_L3______________________, _____________________ADJUST_R3______________________, //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| _______,_______,_______, _______,_______,_______ //`---------------------' `---------------------' diff --git a/keyboards/hotdox/keymaps/ninjonas/keymap.c b/keyboards/hotdox/keymaps/ninjonas/keymap.c index 7a505b4e1be1..eea86200c754 100644 --- a/keyboards/hotdox/keymaps/ninjonas/keymap.c +++ b/keyboards/hotdox/keymaps/ninjonas/keymap.c @@ -61,7 +61,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LEFT, KC_RGHT, KC_PGUP, KC_PGDN, - KC_DEL, LT_LOW + MT_DEL, LT_LOW ), /* DVORAK @@ -108,7 +108,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LEFT, KC_RGHT, KC_PGUP, KC_PGDN, - KC_DEL, LT_LOW + MT_DEL, LT_LOW ), /* COLEMAK @@ -155,7 +155,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LEFT, KC_RGHT, KC_PGUP, KC_PGDN, - KC_DEL, LT_LOW + MT_DEL, LT_LOW ), /* LOWER diff --git a/keyboards/lily58/keymaps/ninjonas/keymap.c b/keyboards/lily58/keymaps/ninjonas/keymap.c index 6c6a41b3b7a6..0ed197c14117 100644 --- a/keyboards/lily58/keymaps/ninjonas/keymap.c +++ b/keyboards/lily58/keymaps/ninjonas/keymap.c @@ -100,9 +100,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_LOWER] = LAYOUT_wrapper( \ _____________________FUNC_LEFT______________________, _____________________FUNC_RIGHT_____________________, \ - M_XXX2, M_XXX3, _________MEDIA_1_________, _______, _______________NAV_1______________, _______, K_MDSH, \ - M_XXX4, M_XXX5, _________MEDIA_2_________, _______, _______________NAV_2______________, K_LOCK, _______, \ - _______, M_SHFT, _________MEDIA_3_________, _______, _______, _______, _______, KC_M, _______, _______, M_XXX1, M_PYNV, \ + _____________________LOWER_L1_______________________, _____________________LOWER_R1_______________________, \ + _____________________LOWER_L2_______________________, _____________________LOWER_R2_______________________, \ + _____________________LOWER_L3_______________________, _______, _______, _____________________LOWER_R3_______________________, \ __________________________________, _______, _______, M_CODE, _______ \ ), @@ -121,7 +121,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `----------------------------' '------''--------------------' */ [_RAISE] = LAYOUT_wrapper( \ - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, K_CSCN, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ XXXXXXX, XXXXXXX, _____________MOUSE_1______________, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ XXXXXXX, XXXXXXX, _____________MOUSE_2______________, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\ @@ -130,9 +130,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* ADJUST * ,------------------------------------------. ,-----------------------------------------. - * |EEP_RST| | | | | | | | | |COLMAK|DVORAK|QWERTY| + * | | | | | | | | | | | | | | * |-------+------+------+------+------+------| |------+------+------+------+------+------| - * |M_MAKE | | | | | | | | | | | | | + * |M_MAKE |EEPRST| | | | | | | | |COLMAK|DVORAK|QWERTY| * |-------+------+------+------+------+------| |------+------+------+------+------+------| * |M_VRSN |M_MALL| | | | |-------. ,-------| | | | | | | * |-------+------+------+------+------+------| | | |------+------+------+------+------+------| @@ -143,10 +143,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `----------------------------' '------''--------------------' */ [_ADJUST] = LAYOUT_wrapper( \ - EEP_RST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, COLEMAK, DVORAK, QWERTY, \ - M_MAKE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - M_VRSN, M_MALL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - M_FLSH, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\ - __________________________________, __________________________________ \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + _____________________ADJUST_L1______________________, _____________________ADJUST_R1______________________, \ + _____________________ADJUST_L2______________________, _____________________ADJUST_R2______________________, \ + _____________________ADJUST_L3______________________, XXXXXXX, XXXXXXX, _____________________ADJUST_R3______________________,\ + __________________________________, __________________________________ \ ), }; \ No newline at end of file diff --git a/keyboards/pinky/3/keymaps/ninjonas/keymap.c b/keyboards/pinky/3/keymaps/ninjonas/keymap.c index b7d9f2fa7563..2b93c5aa8ed6 100644 --- a/keyboards/pinky/3/keymaps/ninjonas/keymap.c +++ b/keyboards/pinky/3/keymaps/ninjonas/keymap.c @@ -61,11 +61,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_LOWER] = LAYOUT_wrapper( //,---------------------------------------------------------------------. ,---------------------------------------------------------------------. - M_XXX2, M_XXX3, _________MEDIA_1_________, XXXXXXX, K_CSCN, XXXXXXX, _______________NAV_1______________, XXXXXXX, K_MDSH, + _____________________LOWER_L1_______________________, K_CSCN, XXXXXXX, _____________________LOWER_R1_______________________, //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| - M_XXX4, M_XXX5, _________MEDIA_2_________, XXXXXXX, XXXXXXX, XXXXXXX, _______________NAV_2______________, K_LOCK, XXXXXXX, + _____________________LOWER_L2_______________________, XXXXXXX, XXXXXXX, _____________________LOWER_R2_______________________, //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| - XXXXXXX, M_SHFT, _________MEDIA_3_________, XXXXXXX, _______, _______, XXXXXXX, KC_M, XXXXXXX, XXXXXXX, M_XXX1, M_PYNV, + _____________________LOWER_L3_______________________, _______, _______, _____________________LOWER_R3_______________________, //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| __________________________________, _______, _______, M_CODE, _______ //`---------------------------------------' `---------------------------------------' @@ -85,11 +85,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_ADJUST] = LAYOUT_wrapper( //,---------------------------------------------------------------------. ,---------------------------------------------------------------------. - M_MAKE, EEP_RST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, COLEMAK, DVORAK, QWERTY, + _____________________ADJUST_L1______________________, XXXXXXX, XXXXXXX, _____________________ADJUST_R1______________________, //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| - M_VRSN, M_MALL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _____________________XXXXXXX________________________, + _____________________ADJUST_L2______________________, XXXXXXX, XXXXXXX, _____________________ADJUST_R2______________________, //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| - M_FLSH, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _____________________XXXXXXX________________________, + _____________________ADJUST_L3______________________, _______, _______, _____________________ADJUST_R3______________________, //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| __________________________________, __________________________________ //`---------------------------------------' `---------------------------------------' diff --git a/users/ninjonas/README.md b/users/ninjonas/README.md index 32ccdc699f72..1e3fe9c31f06 100644 --- a/users/ninjonas/README.md +++ b/users/ninjonas/README.md @@ -19,7 +19,7 @@ See: https://docs.qmk.fm/#/feature_userspace ### [Keys](ninjonas.h#L37) |Code | Description | |---|---| -|K_LOCK | MacOS shortcut to execute lock command  + ctrl + Q | +|K_LOCK | MacOS shortcut to execute lock command  + CTRL + Q | |K_CSCN | MacOS shortcut to copy a portion of the screen to the clipboard | |K_MDSH | MacOS shortcut to get em-dash `–` | |K_RAPP | MacOS shortcut to switch apps to the right | @@ -34,7 +34,13 @@ See: https://docs.qmk.fm/#/feature_userspace |LM_LOW | Dedicated key to momentarily toggle to use LOWER layer | |LM_RAI | Dedicated key to momentarily toggle to use RAISE layer | -### [Layout Blocks](ninjonas.h#L50) +### [Mod-Taps](ninjonas.h#L50) +|Code | Description | +|---|---| +|MT_DEL | Tap for Delete, hold for  + ALT + SHIFT | +|MT_EQL | Tap for =, hold for ALT + SHIFT | + +### [Layout Blocks](ninjonas.h#L54) Predefined keyboard layout templates to speed up configuring split keyboards |Code | Description | @@ -59,6 +65,7 @@ Predefined keyboard layout templates to speed up configuring split keyboards |M_VRSN | macro to send QMK version | |M_SHFT | Sends  + alt + shift to a keycode to activate [ShiftIt](/~https://github.com/fikovnik/ShiftIt) | |M_CODE | Opens [Visual Studio Code](https://code.visualstudio.com/) on current directory | +|M_TERM | Launches Spotlight and calls Terminal | |M_XXX1 to M_XXX5 | Reserved for secret macros see [Secrets](#secrets) | ### [Tap-Dance](tap_dances.h) @@ -78,7 +85,7 @@ There's times where you have macros you don't want to share like emails, an addr ```c // secrets.c -#include "ninjonas.h" +#include "ninjonas.h" static const char * const secret[] = { "BLANK1", diff --git a/users/ninjonas/ninjonas.h b/users/ninjonas/ninjonas.h index fdba683702f4..b86ccc7333e8 100644 --- a/users/ninjonas/ninjonas.h +++ b/users/ninjonas/ninjonas.h @@ -47,6 +47,10 @@ #define LT_LOW LT(_LOWER, KC_ENT) #define LT_RAI LT(_RAISE, KC_SPC) +// Mod-Tap Keys +#define MT_DEL MT(MOD_LGUI | MOD_LALT | MOD_LSFT, KC_DEL) +#define MT_EQL MT(MOD_LALT | MOD_LSFT, KC_EQL) + // Layout blocks #define _____________________QWERTY_L1______________________ T_TAB, T_Q, T_W, KC_E, KC_R, KC_T #define _____________________QWERTY_L2______________________ T_ESC, KC_A, KC_S, KC_D, KC_F, KC_G @@ -54,7 +58,7 @@ #define _____________________QWERTY_R1______________________ KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS #define _____________________QWERTY_R2______________________ KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT -#define _____________________QWERTY_R3______________________ KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_EQL +#define _____________________QWERTY_R3______________________ KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT_EQL #define _____________________DVORAK_L1______________________ T_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y #define _____________________DVORAK_L2______________________ T_ESC, KC_A, KC_O, KC_E, KC_U, KC_I @@ -62,7 +66,7 @@ #define _____________________DVORAK_R1______________________ KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSLS #define _____________________DVORAK_R2______________________ KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH -#define _____________________DVORAK_R3______________________ KC_B, KC_M, T_W, KC_V, KC_Z, KC_EQL +#define _____________________DVORAK_R3______________________ KC_B, KC_M, T_W, KC_V, KC_Z, MT_EQL #define _____________________COLEMAK_L1_____________________ T_TAB, T_Q, T_W, KC_F, KC_P, KC_G #define _____________________COLEMAK_L2_____________________ T_ESC, KC_A, KC_R, KC_S, KC_T, KC_D @@ -70,7 +74,7 @@ #define _____________________COLEMAK_R1_____________________ KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS #define _____________________COLEMAK_R2_____________________ KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT -#define _____________________COLEMAK_R3_____________________ KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_EQL +#define _____________________COLEMAK_R3_____________________ KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT_EQL #define _____________________NUM_LEFT_______________________ T_GRV, KC_1, KC_2, KC_3, KC_4, KC_5 #define _____________________NUM_RIGHT______________________ KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS @@ -81,8 +85,31 @@ #define _____________________SYM_LEFT_______________________ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC #define _____________________SYM_RIGHT______________________ KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_UNDS -#define ____________________________________________________ _______, _______, _______, _______, _______, _______ -#define _____________________XXXXXXX________________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +#define _____________________LOWER_L1_______________________ M_XXX2, M_XXX3, _________MEDIA_1_________, K_CSCN +#define _____________________LOWER_L2_______________________ M_XXX4, M_XXX5, _________MEDIA_2_________, XXXXXXX +#define _____________________LOWER_L3_______________________ KC_LSFT, M_SHFT, _________MEDIA_3_________, T_LBRC + +#define _____________________LOWER_R1_______________________ _______________NAV_1______________, XXXXXXX, K_MDSH +#define _____________________LOWER_R2_______________________ _______________NAV_2______________, K_LOCK, XXXXXXX +#define _____________________LOWER_R3_______________________ T_RBRC, KC_M, M_TERM, M_CODE, M_XXX1, M_PYNV + +#define _____________________ADJUST_L1______________________ M_MAKE, EEP_RST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +#ifdef RGB_MATRIX_ENABLE + #define _____________________ADJUST_L2______________________ M_VRSN, M_MALL, RGB_SPI, RGB_SAI, RGB_HUI, RGB_VAI + #define _____________________ADJUST_L3______________________ M_FLSH, XXXXXXX, RGB_SPD, RGB_SAD, RGB_HUD, RGB_VAD +#else + #define _____________________ADJUST_L2______________________ M_VRSN, M_MALL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + #define _____________________ADJUST_L3______________________ M_FLSH, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +#endif + +#ifdef RGB_MATRIX_ENABLE + #define _____________________ADJUST_R1______________________ RGB_TOG, XXXXXXX, XXXXXXX, COLEMAK, DVORAK, QWERTY + #define _____________________ADJUST_R3______________________ RGB_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +#else + #define _____________________ADJUST_R1______________________ XXXXXXX, XXXXXXX, XXXXXXX, COLEMAK, DVORAK, QWERTY + #define _____________________ADJUST_R3______________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +#endif +#define _____________________ADJUST_R2______________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX #define _______________NAV_1______________ KC_PGUP, KC_HOME, KC_UP, KC_END #define _______________NAV_2______________ KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT @@ -91,14 +118,18 @@ #define _____________MOUSE_2______________ KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_U #define __________________________________ _______, _______, _______, _______ -#define _____________XXXXXXX______________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX #define _________MEDIA_1_________ KC_BRIU, KC_MPLY, KC_MUTE #define _________MEDIA_2_________ KC_BRID, KC_MFFD, KC__VOLUP #define _________MEDIA_3_________ XXXXXXX, KC_MRWD, KC__VOLDOWN -#define ________MOD_LEFT_________ KC_LALT, T_GUI, KC_LCTL -#define ________MOD_RIGHT________ KC_BSPC, KC_DEL, LM_LOW +#ifdef KEYBOARD_crkbd_rev1 + #define ________MOD_LEFT_________ T_GUI, KC_LCTL, LT_RAI + #define ________MOD_RIGHT________ LT_LOW, KC_BSPC, MT_DEL +#else + #define ________MOD_LEFT_________ KC_LALT, T_GUI, KC_LCTL + #define ________MOD_RIGHT________ KC_BSPC, MT_DEL, LM_LOW +#endif // Layout wrappers #define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__) diff --git a/users/ninjonas/oled.c b/users/ninjonas/oled.c index 8a9c9959366f..721038e15bf1 100644 --- a/users/ninjonas/oled.c +++ b/users/ninjonas/oled.c @@ -4,12 +4,19 @@ #ifdef OLED_DRIVER_ENABLE -static uint16_t oled_timer = 0; +static uint32_t oled_timer = 0; extern uint8_t is_master; +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + if (is_master) { + return OLED_ROTATION_0; + } + return OLED_ROTATION_180; +} + bool process_record_oled(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { - oled_timer = timer_read(); + oled_timer = timer_read32(); } return true; } @@ -64,7 +71,7 @@ static void render_logo(void) { } void oled_task_user(void) { - if (timer_elapsed(oled_timer) > 30000) { + if (timer_elapsed32(oled_timer) > 30000) { oled_off(); return; } @@ -75,8 +82,8 @@ void oled_task_user(void) { if (is_master) { render_status(); } else { - oled_write_P(PSTR("\n"), false); render_logo(); + oled_write_P(PSTR("\n"), false); oled_scroll_left(); } } diff --git a/users/ninjonas/process_records.c b/users/ninjonas/process_records.c index 6ec5be597882..8044b49f1008 100644 --- a/users/ninjonas/process_records.c +++ b/users/ninjonas/process_records.c @@ -12,10 +12,6 @@ bool process_record_oled(uint16_t keycode, keyrecord_t *record) { return true; } #endif bool process_record_user(uint16_t keycode, keyrecord_t *record) { - #ifdef OLED_DRIVER_ENABLE - process_record_oled(keycode, record); - #endif - switch (keycode) { // Sends pyenv to activate 'jira' environment @@ -81,7 +77,16 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { // Opens Visual Studio Code on current directory case M_CODE: if (record->event.pressed) { - SEND_STRING("code ." SS_TAP(X_ENTER)); + SEND_STRING("code .\n"); + } + break; + + // Opens Terminal + case M_TERM: + if (record->event.pressed) { + SEND_STRING(SS_DOWN(X_LGUI) SS_TAP(X_SPACE) SS_UP(X_LGUI)); + wait_ms(250); + SEND_STRING("terminal\n"); } break; @@ -104,5 +109,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { // END: Layer macros } - return process_record_keymap(keycode, record) && process_record_secrets(keycode, record); + return process_record_keymap(keycode, record) && process_record_secrets(keycode, record) + #ifdef OLED_DRIVER_ENABLE + && process_record_oled(keycode, record) + #endif + ; // Close return } diff --git a/users/ninjonas/process_records.h b/users/ninjonas/process_records.h index 07babdd58325..2e69ca216323 100644 --- a/users/ninjonas/process_records.h +++ b/users/ninjonas/process_records.h @@ -14,6 +14,7 @@ enum custom_keycodes { M_FLSH, M_VRSN, M_CODE, + M_TERM, // Secret Macros M_XXX1, M_XXX2, From d9b056486bf62f4751999d926fb3f8aad6d0c821 Mon Sep 17 00:00:00 2001 From: Jesper Nellemann Jakobsen Date: Mon, 7 Oct 2019 20:17:08 +0200 Subject: [PATCH 051/316] [Keymap] Move brightness controls one key over (#6945) I forgot to count the extra ISO-only key next to left shift when initially adding these brightness controls. --- keyboards/dz60/keymaps/bingocaller/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/dz60/keymaps/bingocaller/keymap.c b/keyboards/dz60/keymaps/bingocaller/keymap.c index 6b3317497823..c19f673f7675 100644 --- a/keyboards/dz60/keymaps/bingocaller/keymap.c +++ b/keyboards/dz60/keymaps/bingocaller/keymap.c @@ -80,7 +80,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, KC_BRMD, KC_BRMU, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_BRMD, KC_BRMU, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), // TEMPLATE From f04e58dad6f56cdbd5d369c9e00405dcdb47c8ea Mon Sep 17 00:00:00 2001 From: Dan McClain Date: Mon, 7 Oct 2019 14:32:30 -0400 Subject: [PATCH 052/316] [CLI] Add `qmk list_keyboards` (#6927) `list_keyboards` replicates the `make list-keyboards` by globbing for all paths that include `rules.mk` and then removing the paths that include `keymaps`. This basis of this cli command could be reused in the future as a util, but is not done so here since this would be the only place that would use it currently Resolves #6911 --- docs/cli.md | 10 +++++++++ lib/python/qmk/cli/__init__.py | 1 + lib/python/qmk/cli/list/__init__.py | 1 + lib/python/qmk/cli/list/keyboards.py | 26 +++++++++++++++++++++++ lib/python/qmk/tests/test_cli_commands.py | 8 +++++++ 5 files changed, 46 insertions(+) create mode 100644 lib/python/qmk/cli/list/__init__.py create mode 100644 lib/python/qmk/cli/list/keyboards.py diff --git a/docs/cli.md b/docs/cli.md index fe86cac1fb49..6ffe0336539b 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -115,6 +115,16 @@ This command examines your environment and alerts you to potential build or flas qmk doctor ``` +## `qmk list_keyboards` + +This command lists all the keyboards currently defined in `qmk_firmware` + +**Usage**: + +``` +qmk list_keyboards +``` + ## `qmk new-keymap` This command creates a new keymap based on a keyboard's existing default keymap. diff --git a/lib/python/qmk/cli/__init__.py b/lib/python/qmk/cli/__init__.py index fb4e0ecb46ed..e982a75fc84f 100644 --- a/lib/python/qmk/cli/__init__.py +++ b/lib/python/qmk/cli/__init__.py @@ -8,6 +8,7 @@ from . import doctor from . import hello from . import json +from . import list from . import new from . import pyformat from . import pytest diff --git a/lib/python/qmk/cli/list/__init__.py b/lib/python/qmk/cli/list/__init__.py new file mode 100644 index 000000000000..c36ba69548ed --- /dev/null +++ b/lib/python/qmk/cli/list/__init__.py @@ -0,0 +1 @@ +from . import keyboards diff --git a/lib/python/qmk/cli/list/keyboards.py b/lib/python/qmk/cli/list/keyboards.py new file mode 100644 index 000000000000..53a7af75c668 --- /dev/null +++ b/lib/python/qmk/cli/list/keyboards.py @@ -0,0 +1,26 @@ +"""List the keyboards currently defined within QMK +""" +import os +import re +import glob + +from milc import cli + +@cli.subcommand("List the keyboards currently defined within QMK") +def list_keyboards(cli): + """List the keyboards currently defined within QMK + """ + + base_path = os.path.join(os.getcwd(), "keyboards") + os.path.sep + kb_path_wildcard = os.path.join(base_path, "**", "rules.mk") + + # find everywhere we have rules.mk where keymaps isn't in the path + paths = [path for path in glob.iglob(kb_path_wildcard, recursive=True) if 'keymaps' not in path] + + # strip the keyboard directory path prefix and rules.mk suffix and alphabetize + find_name = lambda path: path.replace(base_path, "").replace(os.path.sep + "rules.mk", "") + names = sorted(map(find_name, paths)) + + for name in names: + # We echo instead of cli.log.info to allow easier piping of this output + cli.echo(name) diff --git a/lib/python/qmk/tests/test_cli_commands.py b/lib/python/qmk/tests/test_cli_commands.py index 2fc6e0f7237a..c9d632517bdc 100644 --- a/lib/python/qmk/tests/test_cli_commands.py +++ b/lib/python/qmk/tests/test_cli_commands.py @@ -37,3 +37,11 @@ def test_pyformat(): result = check_subcommand('pyformat') assert result.returncode == 0 assert 'Successfully formatted the python code' in result.stderr + + +def test_list_keyboards(): + result = check_subcommand('list_keyboards') + assert result.returncode == 0 + # check to see if a known keyboard is returned + # this will fail if handwired/onekey/pytest is removed + assert 'handwired/onekey/pytest' in result.stdout From b5b057ad95951c6bc343705a4b9d05161e464b92 Mon Sep 17 00:00:00 2001 From: Ethan Durrant <5387347+emdarcher@users.noreply.github.com> Date: Mon, 7 Oct 2019 12:42:12 -0600 Subject: [PATCH 053/316] [Keymap] MF68 keymap LED pins fixed (#6946) * fixing LED pins to accurately use the Pro Micro LEDs * fixing trailing whitespace --- keyboards/40percentclub/mf68/keymaps/emdarcher/keymap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboards/40percentclub/mf68/keymaps/emdarcher/keymap.c b/keyboards/40percentclub/mf68/keymaps/emdarcher/keymap.c index d35025f11343..546f862a6e3c 100644 --- a/keyboards/40percentclub/mf68/keymaps/emdarcher/keymap.c +++ b/keyboards/40percentclub/mf68/keymaps/emdarcher/keymap.c @@ -43,13 +43,13 @@ void led_set_user(uint8_t usb_led){ //set led pins to low setPinOutput(B0); writePinLow(B0); - setPinOutput(B5); - writePinLow(B5); + setPinOutput(D5); + writePinLow(D5); } else { //set to Hi-Z setPinInput(B0); writePinLow(B0); - setPinInput(B5); - writePinLow(B5); + setPinInput(D5); + writePinLow(D5); } } From 26fe4e44d56e19a2c045e2558856fdcecd361737 Mon Sep 17 00:00:00 2001 From: Diego <921798+diegor2@users.noreply.github.com> Date: Mon, 7 Oct 2019 15:57:35 -0300 Subject: [PATCH 054/316] [Keymap] Fix talljoe-gherkin keymap typo (#6950) --- .../40percentclub/gherkin/keymaps/talljoe-gherkin/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/40percentclub/gherkin/keymaps/talljoe-gherkin/keymap.c b/keyboards/40percentclub/gherkin/keymaps/talljoe-gherkin/keymap.c index ca3da579a132..2c3e872265b9 100644 --- a/keyboards/40percentclub/gherkin/keymaps/talljoe-gherkin/keymap.c +++ b/keyboards/40percentclub/gherkin/keymaps/talljoe-gherkin/keymap.c @@ -30,7 +30,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [_RAISE] = LAYOUT_ortho_3x10( - KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_7, KC_9, KC_0, + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_ESC, KC_MINS, KC_EQL, _______, KC_LBRC, KC_RBRC, _______, KC_QUOT, KC_SCLN, _______, OS_LCTL, OS_LGUI, OS_LALT, KC_GRV, _______, KC_TAB, KC_BSLS, KC_COMM, KC_DOT, KC_SLSH ), From c2709a7ca4a139af0606b085d21a0af460dbf87e Mon Sep 17 00:00:00 2001 From: Dylan Khor Date: Mon, 7 Oct 2019 15:35:37 -0400 Subject: [PATCH 055/316] [Keymap] Clean up / adjust khord let's split keymap (#6951) Remove unneeded lines and change right side mouse buttons on raise layer back to media control --- keyboards/lets_split/keymaps/khord/keymap.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/keyboards/lets_split/keymaps/khord/keymap.c b/keyboards/lets_split/keymaps/khord/keymap.c index 4209efabed7a..60b297394794 100644 --- a/keyboards/lets_split/keymaps/khord/keymap.c +++ b/keyboards/lets_split/keymaps/khord/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H - extern keymap_config_t keymap_config; #define _QWERTY 0 @@ -25,7 +24,6 @@ enum { // Dylan's additions #define C_A_DEL LALT(LCTL(KC_DEL)) #define C_A_INS LALT(LCTL(KC_INS)) -//#define MAC_LOK S(LCTL(KC_PWR)) #define MAC_LOK LCTL(LGUI(KC_Q)) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -81,7 +79,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_PGDN, KC_PGUP, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_BTN1, KC_BTN2, KC_BTN3, KC_BTN4 \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ ), /* Adjust (Lower + Raise) From 6bed2394866f0b98ac9b13a82999c875abc9e44a Mon Sep 17 00:00:00 2001 From: Yan-Fa Li Date: Mon, 7 Oct 2019 13:31:11 -0700 Subject: [PATCH 056/316] [Keymap] Community layout for hhkb (#6961) --- layouts/community/60_hhkb/yanfali/keymap.c | 51 ++++++++++++++++++++++ users/yanfali/rules.mk | 8 +++- 2 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 layouts/community/60_hhkb/yanfali/keymap.c diff --git a/layouts/community/60_hhkb/yanfali/keymap.c b/layouts/community/60_hhkb/yanfali/keymap.c new file mode 100644 index 000000000000..98649ca4b9f6 --- /dev/null +++ b/layouts/community/60_hhkb/yanfali/keymap.c @@ -0,0 +1,51 @@ +#include QMK_KEYBOARD_H + +enum _layers { + BL, + FN +}; +/* + * Default HHKB Layout + */ +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* 0: Default layer +┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ +│ Esc │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ \ │ ` │ +├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ +│ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │BkSpc│█████│ +├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ +│Ctrl │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │█████│Enter│█████│ +├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ +│Shift│█████│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │█████│Shift│ Fn │ +├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ +│█████│ Gui │ Alt │█████│█████│Space│█████│█████│█████│█████│█████│ Alt │ Gui │█████│█████│ +└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ + */ +[BL] = LAYOUT_60_hhkb( + 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_GRV, 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, \ + LCTL_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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(FN), \ + KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT ), + /* 1: HHKB Fn layer +┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ +│ Pwr │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │ Ins │ Del │ +├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ +│Caps │ RGB │RGBfw│RGBrv│BLtog│BLstp│ │ │ Psc │ Slk │ Pus │ Up │ │ │█████│ +├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ +│ │ VoD │ VoU │ Mut │ Ejc │ │NP_* │NP_/ │Home │PgUp │Left │Right│█████│NPEnt│█████│ +├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ +│ │█████│ │ │ │ │ │NP_+ │NP_- │ End │PgDwn│Down │█████│ │ │ +├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ +│█████│ │ │█████│█████│█████│ │█████│█████│█████│█████│ │ │█████│█████│ +└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ + */ +[FN]= LAYOUT_60_hhkb( + KC_PWR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, \ + _______, RGB_TOG, KC_UP, RGB_RMOD, BL_TOGG, BL_STEP, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, RESET, \ + KC_CAPS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_EJCT, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT, \ + KC_TRNS, RGB_TOG, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), +}; + + diff --git a/users/yanfali/rules.mk b/users/yanfali/rules.mk index bbd4d4bba681..ebee8b8275ee 100644 --- a/users/yanfali/rules.mk +++ b/users/yanfali/rules.mk @@ -2,5 +2,11 @@ BOOTMAGIC = lite DYNAMIC_KEYMAP_ENABLE = no CONSOLE_ENABLE = yes COMMAND_ENABLE = yes -AUDIO_ENABLE = yes LINK_TIME_OPTIMIZATION_ENABLE = yes + +ifneq (, $(findstring tokyo60, $(KEYBOARD))) + AUDIO_ENABLE = no +else + AUDIO_ENABLE = yes +endif + From 2c51d1422309d389346022711b4cbc54a8c42f79 Mon Sep 17 00:00:00 2001 From: NoshBar Date: Mon, 7 Oct 2019 23:35:28 +0200 Subject: [PATCH 057/316] [Keyboard] Cannon Keys Satisfaction75: Fix buffer sizes for sprintfs. (#6954) sprintf always adds a NULL terminator at the end of the buffer it works on. A few places made just enough space for the resulting string, but not the terminator. So this just adds one to the buffer size to make room for it. --- .../cannonkeys/satisfaction75/satisfaction_oled.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/keyboards/cannonkeys/satisfaction75/satisfaction_oled.c b/keyboards/cannonkeys/satisfaction75/satisfaction_oled.c index 4e22587db851..6553bd13004e 100644 --- a/keyboards/cannonkeys/satisfaction75/satisfaction_oled.c +++ b/keyboards/cannonkeys/satisfaction75/satisfaction_oled.c @@ -91,8 +91,8 @@ void draw_default(){ if (hour == 0){ hour = 12; } - char hour_str[2] = ""; - char min_str[2] = ""; + char hour_str[3] = ""; + char min_str[3] = ""; sprintf(hour_str, "%02d", hour); sprintf(min_str, "%02d", minute); @@ -199,11 +199,11 @@ void draw_clock(){ if (hour == 0){ hour = 12; } - char hour_str[2] = ""; - char min_str[2] = ""; - char year_str[4] = ""; - char month_str[2] = ""; - char day_str[2] = ""; + char hour_str[3] = ""; + char min_str[3] = ""; + char year_str[5] = ""; + char month_str[3] = ""; + char day_str[3] = ""; sprintf(hour_str, "%02d", hour); sprintf(min_str, "%02d", minute); From 3e22af92ee67e77e4089771ab4d45dc37df38c53 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Tue, 8 Oct 2019 08:50:10 +1100 Subject: [PATCH 058/316] [Docs] Add an important note about modifying user code (#6959) * Add an important note about modifying user code * Update docs/contributing.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> --- docs/contributing.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/contributing.md b/docs/contributing.md index 761bc9959b58..04dc0da20fda 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -63,11 +63,11 @@ Most of our style is pretty easy to pick up on. If you are familiar with either We have a few different types of changes in QMK, each requiring a different level of rigor. We'd like you to keep the following guidelines in mind no matter what type of change you're making. -* Separate PR's into logical units. For example, do not submit one PR covering two separate features, instead submit a separate PR for each feature. +* Separate PRs into logical units. For example, do not submit one PR covering two separate features, instead submit a separate PR for each feature. * Check for unnecessary whitespace with `git diff --check` before committing. * Make sure your code change actually compiles. - * Keymaps: Make sure that `make keyboard:your_new_keymap` does not return an error - * Keyboards: Make sure that `make keyboard:all` does not return any errors + * Keymaps: Make sure that `make keyboard:your_new_keymap` does not return any errors. + * Keyboards: Make sure that `make keyboard:all` does not return any errors. * Core: Make sure that `make all` does not return any errors. * Make sure commit messages are understandable on their own. You should put a short description (no more than 70 characters) on the first line, the second line should be empty, and on the 3rd and later lines you should describe your commit in detail, if required. Example: @@ -79,6 +79,8 @@ The kerpleplork was intermittently failing with error code 23. The root cause wa Limited experimentation on the devices I have available shows that 7 is high enough to avoid confusing the kerpleplork, but I'd like to get some feedback from people with ARM devices to be sure. ``` +!> **IMPORTANT:** If you would like to contribute a bugfix or improvement to user code, such as non-default keymaps, userspace and layouts, be sure to tag the original submitter of the code in your PR. Many users, regardless of skill level with Git and GitHub, may be confused or frustrated at their code being modified without their knowledge. + ## Documentation Documentation is one of the easiest ways to get started contributing to QMK. Finding places where the documentation is wrong or incomplete and fixing those is easy! We also very badly need someone to edit our documentation, so if you have editing skills but aren't sure where or how to jump in please [reach out for help](#where-can-i-go-for-help)! From 5bb3fe7a3517e426ba3827a5b889e69bd222bf10 Mon Sep 17 00:00:00 2001 From: Max Rumpf Date: Mon, 7 Oct 2019 19:54:17 +0200 Subject: [PATCH 059/316] Remove unanswered/unnecessary FAQ item As discussed in #6957, closes #6957 --- docs/faq_general.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/docs/faq_general.md b/docs/faq_general.md index e0d8c69f2156..f14272ede8f0 100644 --- a/docs/faq_general.md +++ b/docs/faq_general.md @@ -4,10 +4,6 @@ [QMK](/~https://github.com/qmk), short for Quantum Mechanical Keyboard, is a group of people building tools for custom keyboards. We started with the [QMK firmware](/~https://github.com/qmk/qmk_firmware), a heavily modified fork of [TMK](/~https://github.com/tmk/tmk_keyboard). -### Why the Name Quantum? - - - ## What Differences Are There Between QMK and TMK? TMK was originally designed and implemented by [Jun Wako](/~https://github.com/tmk). QMK started as [Jack Humbert](/~https://github.com/jackhumbert)'s fork of TMK for the Planck. After a while Jack's fork had diverged quite a bit from TMK, and in 2015 Jack decided to rename his fork to QMK. From 93767540e1d60dd27542f86b91d49f813b65807f Mon Sep 17 00:00:00 2001 From: Janne Peippo Date: Tue, 8 Oct 2019 03:15:59 +0300 Subject: [PATCH 060/316] [Keymap] Add new TADA68 keymap (#6938) * Add new TADA68 keymap * Remove unnecessary backlashes * Change from MacOS specific to generic volume keycodes --- keyboards/tada68/keymaps/peippo/config.h | 1 + keyboards/tada68/keymaps/peippo/keymap.c | 52 +++++++++++++++++++++++ keyboards/tada68/keymaps/peippo/readme.md | 24 +++++++++++ 3 files changed, 77 insertions(+) create mode 100644 keyboards/tada68/keymaps/peippo/config.h create mode 100644 keyboards/tada68/keymaps/peippo/keymap.c create mode 100644 keyboards/tada68/keymaps/peippo/readme.md diff --git a/keyboards/tada68/keymaps/peippo/config.h b/keyboards/tada68/keymaps/peippo/config.h new file mode 100644 index 000000000000..6f70f09beec2 --- /dev/null +++ b/keyboards/tada68/keymaps/peippo/config.h @@ -0,0 +1 @@ +#pragma once diff --git a/keyboards/tada68/keymaps/peippo/keymap.c b/keyboards/tada68/keymaps/peippo/keymap.c new file mode 100644 index 000000000000..236d7ceccaa1 --- /dev/null +++ b/keyboards/tada68/keymaps/peippo/keymap.c @@ -0,0 +1,52 @@ +#include QMK_KEYBOARD_H + +#define _BL 0 +#define _FL 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Default layer + * ,----------------------------------------------------------------------------------------------------------------------------. + * | GrvEsc| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | + | ´ | Backspace | MacOS | + * |----------------------------------------------------------------------------------------------------------------------------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Å | ¨ | Enter | Del | + * |-----------------------------------------------------------------------------------------------------------, |-------| + * | Mod Layer | A | S | D | F | G | H | J | K | L | Ö | Ä | ' | | PgUp | + * |----------------------------------------------------------------------------------------------------------------------------| + * | Shift | < | Z | X | C | V | B | N | M | , | . | - | Shift | Up | PgDn | + * |----------------------------------------------------------------------------------------------------------------------------| + * | Control | Option | Command | Space | Cmnd | Opt | ModLr | Left | Down | Right | + * `----------------------------------------------------------------------------------------------------------------------------' + */ + + [_BL] = LAYOUT_iso( + KC_GESC, 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, AG_NORM, + 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_DEL, + MO(_FL), 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_PGUP, + 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_UP, KC_PGDN, + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* Modifier layer + * ,----------------------------------------------------------------------------------------------------------------------------. + * | Esc | | | | | | | | [ | ] | | | | Delete |Windows| + * |----------------------------------------------------------------------------------------------------------------------------| + * | | | | | | | | PgUp | Up | PgDn | | | | | | + * |-----------------------------------------------------------------------------------------------------------, |-------| + * | | |Scrnsht|Desktop| | | | Left | Down | Right | | | | | VolUp | + * |----------------------------------------------------------------------------------------------------------------------------| + * | Shift | | | | | BL- |BL Togg| BL+ | | | | | Shift | Play | VolDn | + * |----------------------------------------------------------------------------------------------------------------------------| + * | | | | | | | | Prev | Mute | Next | + * `----------------------------------------------------------------------------------------------------------------------------' + */ + + [_FL] = LAYOUT_iso( + KC_ESC, _______, _______, _______, _______, _______, _______, _______, RALT(KC_8), RALT(KC_9), _______, _______, _______, KC_DEL, AG_SWAP, + _______, _______, _______, _______, _______, _______, _______, KC_PGUP, KC_UP, KC_PGDN, _______, _______, _______, _______, + _______, _______, SGUI(KC_5), KC_F11, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, KC_VOLU, + KC_LSFT, _______, _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, _______, _______, _______, _______, KC_RSFT, KC_MPLY, KC_VOLD, + _______, _______, _______, _______, _______, _______, _______, KC_MRWD, KC__MUTE, KC_MFFD + ), + +}; diff --git a/keyboards/tada68/keymaps/peippo/readme.md b/keyboards/tada68/keymaps/peippo/readme.md new file mode 100644 index 000000000000..c3cf8b3c62c7 --- /dev/null +++ b/keyboards/tada68/keymaps/peippo/readme.md @@ -0,0 +1,24 @@ +# TADA68 ISO keymap by peippo + +Nordic ISO layout with faster access to cursor movement keys and brackets. + +## Keymap notes + +- A few MacOS specific shortcuts, but also has a key dedicated for swapping Alt and GUI buttons for Windows use. +- Default layer has a Grave Escape which outputs Escape when pressed normally, and `§` when Shift or Command are held. I like to setup Command+Esc to moving focus to next window (MacOS preferences, Keyboard / Shortcuts / Keyboard). +- `Caps Lock` or `FN` can be held to access the modifier layer. + +## Modifier layer + +- Additional cursor movement keys on `J/K/L/I`, and Page Up/Page Down on `U/O`. +- Easier access to [] & {} (w/ Shift) on `8/9` (MacOS). +- Show desktop on `D` (MacOS). +- Screen capture tool on `S` (MacOS). +- Media shortcuts on Arrow keys & Page Up/Page Down. +- MacOS/Windows key for swapping Alt and GUI on both sides. +- Backlighting adjustment (Toggle on `B`, increase/decrease on `V/B`). + +### Build + +To build the firmware, run `make tada68:peippo:flashbin`. +Detailed instructions at /~https://github.com/qmk/qmk_firmware/tree/master/keyboards/tada68 From dc5876a8e62aa0f627aee85bca3a78a94f94fc5d Mon Sep 17 00:00:00 2001 From: Lukas Werling Date: Tue, 8 Oct 2019 02:18:18 +0200 Subject: [PATCH 061/316] [Keymap] katana60: Fix = key in default keymap (#6941) The top-right key should be = and not the shifted pseudo-key +. This matches the sample layout from the picture in the readme [0]. [0]: https://i.imgur.com/xVkODOu.jpg --- keyboards/katana60/keymaps/default/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/katana60/keymaps/default/keymap.c b/keyboards/katana60/keymaps/default/keymap.c index 3e7e2191ffce..989c7c16b375 100644 --- a/keyboards/katana60/keymaps/default/keymap.c +++ b/keyboards/katana60/keymaps/default/keymap.c @@ -34,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = LAYOUT( /* Base */ - KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, DF(1), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_PLUS, + KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, DF(1), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, MO(3), KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_DEL, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, From 403c139b34fe97f61eedb4a3cc4772d58bce0efc Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Mon, 7 Oct 2019 19:08:14 -0700 Subject: [PATCH 062/316] [Docs] Add AVR and ARM examples to GPIO Commands (#6942) * [Docs] Add AVR and ARM examples to GPIO Commands Add examples for reference for people not as well versed in microcontroller coding, such as myself. * Apply suggestions from code review Co-Authored-By: fauxpark Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> --- docs/internals_gpio_control.md | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/docs/internals_gpio_control.md b/docs/internals_gpio_control.md index 51a549f1c9b8..8b8351382d10 100644 --- a/docs/internals_gpio_control.md +++ b/docs/internals_gpio_control.md @@ -6,18 +6,17 @@ QMK has a GPIO control abstraction layer which is microcontroller agnostic. This The following functions can provide basic control of GPIOs and are found in `quantum/quantum.h`. -|Function |Description | -|----------------------|------------------------------------------------------------------| -|`setPinInput(pin)` |Set pin as input with high impedance (High-Z) | -|`setPinInputHigh(pin)`|Set pin as input with build in pull-up | -|`setPinInputLow(pin)` |Set pin as input with build in pull-down (Supported only on STM32)| -|`setPinOutput(pin)` |Set pin as output | -|`writePinHigh(pin)` |Set pin level as high, assuming it is an output | -|`writePinLow(pin)` |Set pin level as low, assuming it is an output | -|`writePin(pin, level)`|Set pin level, assuming it is an output | -|`readPin(pin)` |Returns the level of the pin | +|Function |Description | Old AVR Examples | Old ChibiOS/ARM Examples | +|----------------------|------------------------------------------------------------------|------------------------------------------------|-------------------------------------------------| +|`setPinInput(pin)` |Set pin as input with high impedance (High-Z) | `DDRB &= ~(1<<2)` | `palSetLineMode(pin, PAL_MODE_INPUT)` | +|`setPinInputHigh(pin)`|Set pin as input with builtin pull-up resistor | `DDRB &= ~(1<<2); PORTB \|= (1<<2)` | `palSetLineMode(pin, PAL_MODE_INPUT_PULLUP)` | +|`setPinInputLow(pin)` |Set pin as input with builtin pull-down resistor | N/A (Not supported on AVR) | `palSetLineMode(pin, PAL_MODE_INPUT_PULLDOWN)` | +|`setPinOutput(pin)` |Set pin as output | `DDRB \|= (1<<2)` | `palSetLineMode(pin, PAL_MODE_OUTPUT_PUSHPULL)` | +|`writePinHigh(pin)` |Set pin level as high, assuming it is an output | `PORTB \|= (1<<2)` | `palSetLine(pin)` | +|`writePinLow(pin)` |Set pin level as low, assuming it is an output | `PORTB &= ~(1<<2)` | `palClearLine(pin)` | +|`writePin(pin, level)`|Set pin level, assuming it is an output | `(level) ? PORTB \|= (1<<2) : PORTB &= ~(1<<2)` | `(level) ? palSetLine(pin) : palClearLine(pin)` | +|`readPin(pin)` |Returns the level of the pin | `_SFR_IO8(pin >> 4) & _BV(pin & 0xF)` | `palReadLine(pin)` | ## Advanced Settings Each microcontroller can have multiple advanced settings regarding its GPIO. This abstraction layer does not limit the use of architecture-specific functions. Advanced users should consult the datasheet of their desired device and include any needed libraries. For AVR, the standard avr/io.h library is used; for STM32, the ChibiOS [PAL library](http://chibios.sourceforge.net/docs3/hal/group___p_a_l.html) is used. - From 8fe15fa17af87c9430afde7fe30c323033a18f02 Mon Sep 17 00:00:00 2001 From: Yan-Fa Li Date: Mon, 7 Oct 2019 19:23:59 -0700 Subject: [PATCH 063/316] [Keymap] Overly greedy community keymap build userspace (#6969) - this fixes breakage in instant60 pcb sorry @upas --- users/yanfali/rules.mk | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/users/yanfali/rules.mk b/users/yanfali/rules.mk index ebee8b8275ee..b52bd55620e5 100644 --- a/users/yanfali/rules.mk +++ b/users/yanfali/rules.mk @@ -4,9 +4,10 @@ CONSOLE_ENABLE = yes COMMAND_ENABLE = yes LINK_TIME_OPTIMIZATION_ENABLE = yes -ifneq (, $(findstring tokyo60, $(KEYBOARD))) - AUDIO_ENABLE = no -else +# only enable audio on specific boards +ifeq ($(strip $(KEYBOARD)), maartenwut/plain60) AUDIO_ENABLE = yes +else + AUDIO_ENABLE = no endif From e2ec5790b71c18d02b79fdc9979e94b3fadba2a3 Mon Sep 17 00:00:00 2001 From: Ethan Durrant <5387347+emdarcher@users.noreply.github.com> Date: Mon, 7 Oct 2019 20:28:48 -0600 Subject: [PATCH 064/316] [Docs] updated and cleaned up documentation for Tap Dance (#6949) --- docs/feature_tap_dance.md | 62 +++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 32 deletions(-) diff --git a/docs/feature_tap_dance.md b/docs/feature_tap_dance.md index e381c2af01d4..4f98b858e90f 100644 --- a/docs/feature_tap_dance.md +++ b/docs/feature_tap_dance.md @@ -422,7 +422,7 @@ Tap Dance can be used to mimic MO(layer) and TG(layer) functionality. For this e The first step is to include the following code towards the beginning of your `keymap.c`: -``` +```c typedef struct { bool is_press_action; int state; @@ -452,36 +452,20 @@ void ql_reset (qk_tap_dance_state_t *state, void *user_data); int active_layer; ``` -The above code is similar to that used in previous examples. The one point to note is that you need to declare a variable to keep track of what layer is currently the active layer. We'll see why shortly. - Towards the bottom of your `keymap.c`, include the following code: -``` -//Update active_layer -uint32_t layer_state_set_user(uint32_t state) { - switch (biton32(state)) { - case 1: - active_layer = 1; - break; - case 2: - active_layer = 2; - break; - case 3: - active_layer = 3; - break; - default: - active_layer = 0; - break; - } - return state; -} - +```c //Determine the current tap dance state int cur_dance (qk_tap_dance_state_t *state) { if (state->count == 1) { - if (!state->pressed) {return SINGLE_TAP;} - else return SINGLE_HOLD; - } else if (state->count == 2) {return DOUBLE_TAP;} + if (!state->pressed) { + return SINGLE_TAP; + } else { + return SINGLE_HOLD; + } + } else if (state->count == 2) { + return DOUBLE_TAP; + } else return 8; } @@ -495,16 +479,30 @@ static tap ql_tap_state = { void ql_finished (qk_tap_dance_state_t *state, void *user_data) { ql_tap_state.state = cur_dance(state); switch (ql_tap_state.state) { - case SINGLE_TAP: tap_code(KC_QUOT); break; - case SINGLE_HOLD: layer_on(_MY_LAYER); break; + case SINGLE_TAP: + tap_code(KC_QUOT); + break; + case SINGLE_HOLD: + layer_on(_MY_LAYER); + break; case DOUBLE_TAP: - if (active_layer==_MY_LAYER) {layer_off(_MY_LAYER);} - else layer_on(_MY_LAYER); + //check to see if the layer is already set + if (layer_state_is(_MY_LAYER)) { + //if already set, then switch it off + layer_off(_MY_LAYER); + } else { + //if not already set, then switch the layer on + layer_on(_MY_LAYER); + } + break; } } void ql_reset (qk_tap_dance_state_t *state, void *user_data) { - if (ql_tap_state.state==SINGLE_HOLD) {layer_off(_MY_LAYER);} + //if the key was held down and now is released then switch off the layer + if (ql_tap_state.state==SINGLE_HOLD) { + layer_off(_MY_LAYER); + } ql_tap_state.state = 0; } @@ -514,7 +512,7 @@ qk_tap_dance_action_t tap_dance_actions[] = { }; ``` -The is where the real logic of our tap dance key gets worked out. Since `layer_state_set_user()` is called on any layer switch, we use it to update `active_layer`. Our example is assuming that your `keymap.c` includes 4 layers, so adjust the switch statement here to fit your actual number of layers. +The above code is similar to that used in previous examples. The one point to note is that we need to be able to check which layers are active at any time so we can toggle them if needed. To do this we use the `layer_state_is( layer )` function which returns `true` if the given `layer` is active. The use of `cur_dance()` and `ql_tap_state` mirrors the above examples. From 49fdd386b23da8eed43241a85023461b11571526 Mon Sep 17 00:00:00 2001 From: kuchosauronad0 <22005492+kuchosauronad0@users.noreply.github.com> Date: Mon, 7 Oct 2019 20:08:05 -0700 Subject: [PATCH 065/316] [Docs] Clean up docs/newbs_building_firmware.md (#6930) * Clean up the blocks in the second section so that macOS & Windows are in the same block with the command * As suggested by fauxpark --- docs/newbs_building_firmware.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/newbs_building_firmware.md b/docs/newbs_building_firmware.md index fabfefb190a4..5a8f181b8c4c 100644 --- a/docs/newbs_building_firmware.md +++ b/docs/newbs_building_firmware.md @@ -8,15 +8,15 @@ If you have closed and reopened your terminal window since following the first p Start by navigating to the `keymaps` folder for your keyboard. -?> If you are on macOS or Windows there are commands you can use to easily open the keymaps folder. +If you are on macOS or Windows there are commands you can use to easily open the keymaps folder. -?> macOS: +### macOS: - open keyboards//keymaps +``` open keyboards//keymaps ``` -?> Windows: +### Windows: - start .\\keyboards\\\\keymaps +``` start .\\keyboards\\\\keymaps ``` ## Create a Copy Of The `default` Keymap From d00326ecb3f7e3b6703f9f0656c1f5a917da086b Mon Sep 17 00:00:00 2001 From: lucwastiaux Date: Tue, 8 Oct 2019 23:43:54 +0800 Subject: [PATCH 066/316] [Keymap] modify ergodox_ez / dvorak_42_key layout (#6832) * add macros for windows 10 workspace switching * change debounce settings * add comment * remove debounce --- .../ergodox_ez/keymaps/dvorak_42_key/keymap.c | 50 ++++++++++++------- 1 file changed, 33 insertions(+), 17 deletions(-) diff --git a/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c b/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c index c342b9076987..dc18edac8f23 100644 --- a/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c +++ b/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c @@ -15,6 +15,12 @@ // pushing dev branch // git push origin dev:dev +// debounce settings +// remove these after getting a new keyboard +// #define DEBOUNCE 50 +// #define QMK_KEYS_PER_SCAN 4 + + enum custom_keycodes { PLACEHOLDER = SAFE_RANGE, // can always be here EPRM, @@ -43,7 +49,7 @@ enum custom_keycodes { SHELL_EXPAND_OE_LOGPATTERN, SHELL_EXPAND_OE_TRANPATTERN, - + // Cloud9 macros CLOUD9_TAB_LEFT, CLOUD9_TAB_RIGHT, @@ -52,6 +58,9 @@ enum custom_keycodes { CLOUD9_GOTO_LINE, CLOUD9_NAVIGATE, + // Windows 10 macros, + WINDOWS10_WORKSPACE_LEFT, + WINDOWS10_WORKSPACE_RIGHT, }; @@ -61,7 +70,7 @@ enum custom_keycodes { #define KEYSEL 3 // arrow navigation + shift (allow text selection) #define SHELL_NAV 4 // bash shortcuts #define SHELL_SCREEN 5 // linux screen shortcuts -#define SCREEN_NAV 6 // navigate between linux screen tabs +#define SCREEN_NAV 6 // navigate between linux screen tabs #define BROWSER_CONTROL 7 // control browser and mouse #define COMBINED 8 // combined numbers and symbols layer #define ANDROID_STUDIO 9 @@ -161,7 +170,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { MEH(KC_1), OSM(MOD_LSFT), OSM(MOD_LCTL), MO(KEYSEL), MO(BROWSER_CONTROL), // left thumb cluster - MEH(KC_4), MEH(KC_5), + WINDOWS10_WORKSPACE_LEFT, WINDOWS10_WORKSPACE_RIGHT, MEH(KC_6), MO(COMBINED),MO(KEYNAV), OSM(MOD_LALT), @@ -176,7 +185,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { MEH(KC_F5),MEH(KC_F6),MEH(KC_F7),MEH(KC_F8),KC_ENTER,KC_SPACE ), - + // alternate base layout [BASE_ALTERNATE] = LAYOUT_ergodox( // left hand @@ -201,7 +210,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS - ), + ), [KEYNAV] = LAYOUT_ergodox( // left hand @@ -381,8 +390,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS), - - + + [BROWSER_CONTROL] = LAYOUT_ergodox( // left hand KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -493,19 +502,19 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) if (record->event.pressed) { return MACRO( D(LCTL), T(A), U(LCTL), T(RBRC), END); } - break; + break; case DEL_TO_HOME: if (record->event.pressed) { - return MACRO( + return MACRO( // delete to the beginning of the line D(LSFT), T(HOME), U(LSFT), T(DELETE), END); - } - break; + } + break; + - } return MACRO_NONE; }; @@ -599,21 +608,21 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case SHELL_HTCSTATUS: SEND_STRING("htcStatus -j "); return true; - break; + break; case SHELL_HTCBOUNCE: SEND_STRING("htcBounce -j "); return true; - break; + break; case SHELL_EXPAND_OE_LOGPATTERN: SEND_STRING(SS_TAP(X_LEFT)"*CQW_HKEX"SS_TAP(X_END)"*.log"SS_LCTRL("x")SS_LSFT("8")); - break; + break; case SHELL_EXPAND_OE_TRANPATTERN: SEND_STRING(SS_TAP(X_LEFT)"*CQW_HKEX"SS_TAP(X_END)"*.tran"SS_LCTRL("x")SS_LSFT("8")); - break; + break; case SHELL_DUMPTLOG: SEND_STRING(" | dumptlog - "); return true; - break; + break; // Cloud9 macros case CLOUD9_TAB_LEFT: SEND_STRING(SS_LCTRL("[")); @@ -639,6 +648,13 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { SEND_STRING(SS_LCTRL("e")); return true; break; + case WINDOWS10_WORKSPACE_LEFT: + SEND_STRING(SS_LGUI(SS_LCTRL(SS_TAP(X_LEFT)))); + return true; + break; + case WINDOWS10_WORKSPACE_RIGHT: + SEND_STRING(SS_LGUI(SS_LCTRL(SS_TAP(X_RIGHT)))); + break; } } From 5e43f87956c36a609d49ab696c939f2547d076dc Mon Sep 17 00:00:00 2001 From: yiancar Date: Tue, 8 Oct 2019 17:03:51 +0100 Subject: [PATCH 067/316] [Keyboard] RGB updates on NK65 and HS60 (#6795) * RGB update commit * Convert caps lock indicator check to IS_LED_ON * ISSI3733 minor change --- drivers/issi/is31fl3733.c | 3 ++- keyboards/hs60/v2/config.h | 2 +- keyboards/nk65/config.h | 2 +- keyboards/wilba_tech/wt_rgb_backlight.c | 14 ++++---------- 4 files changed, 8 insertions(+), 13 deletions(-) diff --git a/drivers/issi/is31fl3733.c b/drivers/issi/is31fl3733.c index 968f072de876..cc2d895efda8 100644 --- a/drivers/issi/is31fl3733.c +++ b/drivers/issi/is31fl3733.c @@ -231,5 +231,6 @@ void IS31FL3733_update_led_control_registers(uint8_t addr, uint8_t index) { IS31FL3733_write_register(addr, i, g_led_control_registers[index][i]); } } - g_led_control_registers_update_required[index] = false; + // This seems counter intuitive but sometimes this page can get corrupted. So update it every time. + // g_led_control_registers_update_required[index] = false; } diff --git a/keyboards/hs60/v2/config.h b/keyboards/hs60/v2/config.h index 57014993f498..02df0074cc25 100644 --- a/keyboards/hs60/v2/config.h +++ b/keyboards/hs60/v2/config.h @@ -106,7 +106,7 @@ along with this program. If not, see . #define RGB_BACKLIGHT_BRIGHTNESS 255 // the default effect (RGB test) -#define RGB_BACKLIGHT_EFFECT 255 +#define RGB_BACKLIGHT_EFFECT 6 // the default effect speed (0-3) #define RGB_BACKLIGHT_EFFECT_SPEED 0 diff --git a/keyboards/nk65/config.h b/keyboards/nk65/config.h index 4358d9cf9597..51e101cde5e3 100755 --- a/keyboards/nk65/config.h +++ b/keyboards/nk65/config.h @@ -106,7 +106,7 @@ along with this program. If not, see . #define RGB_BACKLIGHT_BRIGHTNESS 255 // the default effect (RGB test) -#define RGB_BACKLIGHT_EFFECT 255 +#define RGB_BACKLIGHT_EFFECT 6 // the default effect speed (0-3) #define RGB_BACKLIGHT_EFFECT_SPEED 0 diff --git a/keyboards/wilba_tech/wt_rgb_backlight.c b/keyboards/wilba_tech/wt_rgb_backlight.c index 9116e98ba798..ca8c3269f637 100644 --- a/keyboards/wilba_tech/wt_rgb_backlight.c +++ b/keyboards/wilba_tech/wt_rgb_backlight.c @@ -791,7 +791,7 @@ const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { {208,255}, {39,255}, {23,238}, {235,255}, {235,255}, {33,255}, {19,255}, {255,233}, {224,255}, {160,255}, {164,255}, {169,255}, {188,255}, {255,255},// LA61 does not exit, dummy //LA62..LB5 - {221,255}, {225,255}, {229,255}, {22,255}, {12,255}, {244,255}, {234,255}, {255,255}, + {221,255}, {225,255}, {229,255}, {22,255}, {12,255}, {244,255}, {234,255}, {255,255} }; #elif defined(RGB_BACKLIGHT_M6_B) // M6-B is really simple: @@ -1551,20 +1551,14 @@ void backlight_effect_indicators(void) } #if defined(RGB_BACKLIGHT_NK65) - if ( g_indicator_state & (1< Date: Tue, 8 Oct 2019 19:45:34 +0200 Subject: [PATCH 068/316] [Docs] French translation of Complete Newbs Guide (#6901) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Translated _summary.md + newbs.md * Translated news_best_practices.md in French * Translated newbs_building_firmware_configurator.md in French * Translated the file newbs_building_firmware.md in French * Translated page newbs_flashing.md in French * Translated the page newbs_getting_started.md in French * Translated the page newbs_learn_more_resources.md in French * Translated the page newbs_testing_debugging.md in French * Change translation of split from 'séparé' to 'scindé' * Adding the lang file for gitbook and some others tranme other translation * Correcting typos after Gimly's review * Some others sections on the summary * Fix first comments from @zekth * Fix some issues from @4sStylZ * Fix other issues from @4sStylZ * Fix weird phrase * Replaced all uses of 'téléverser' by 'flash' * Replaced all planches by board * Fix other PR comments * Fix comment --- docs/_langs.md | 3 +- docs/fr-FR/README.md | 32 ++ docs/fr-FR/_summary.md | 125 +++++++ docs/fr-FR/flashing.md | 236 ++++++++++++ docs/fr-FR/newbs.md | 23 ++ docs/fr-FR/newbs_best_practices.md | 161 ++++++++ docs/fr-FR/newbs_building_firmware.md | 81 ++++ .../newbs_building_firmware_configurator.md | 105 ++++++ docs/fr-FR/newbs_flashing.md | 348 ++++++++++++++++++ docs/fr-FR/newbs_getting_started.md | 101 +++++ docs/fr-FR/newbs_learn_more_resources.md | 14 + docs/fr-FR/newbs_testing_debugging.md | 101 +++++ 12 files changed, 1329 insertions(+), 1 deletion(-) create mode 100644 docs/fr-FR/README.md create mode 100644 docs/fr-FR/_summary.md create mode 100644 docs/fr-FR/flashing.md create mode 100644 docs/fr-FR/newbs.md create mode 100644 docs/fr-FR/newbs_best_practices.md create mode 100644 docs/fr-FR/newbs_building_firmware.md create mode 100644 docs/fr-FR/newbs_building_firmware_configurator.md create mode 100644 docs/fr-FR/newbs_flashing.md create mode 100644 docs/fr-FR/newbs_getting_started.md create mode 100644 docs/fr-FR/newbs_learn_more_resources.md create mode 100644 docs/fr-FR/newbs_testing_debugging.md diff --git a/docs/_langs.md b/docs/_langs.md index 382231d5056d..c91e0d93fc52 100644 --- a/docs/_langs.md +++ b/docs/_langs.md @@ -1,3 +1,4 @@ - Translations - [:uk: English](/) - - [:cn: 中文](/zh-cn/) \ No newline at end of file + - [:cn: 中文](/zh-cn/) + - [:fr: Français](/fr-fr/) diff --git a/docs/fr-FR/README.md b/docs/fr-FR/README.md new file mode 100644 index 000000000000..5bbe353b48c3 --- /dev/null +++ b/docs/fr-FR/README.md @@ -0,0 +1,32 @@ +# Quantum Mechanical Keyboard Firmware + +[![Version courante](https://img.shields.io/github/tag/qmk/qmk_firmware.svg)](/~https://github.com/qmk/qmk_firmware/tags) +[![Statut du build](https://travis-ci.org/qmk/qmk_firmware.svg?branch=master)](https://travis-ci.org/qmk/qmk_firmware) +[![Discord](https://img.shields.io/discord/440868230475677696.svg)](https://discord.gg/Uq7gcHh) +[![Statut de la doc](https://img.shields.io/badge/docs-ready-orange.svg)](https://docs.qmk.fm) +[![Contributeurs Github](https://img.shields.io/github/contributors/qmk/qmk_firmware.svg)](/~https://github.com/qmk/qmk_firmware/pulse/monthly) +[![Forks Github](https://img.shields.io/github/forks/qmk/qmk_firmware.svg?style=social&label=Fork)](/~https://github.com/qmk/qmk_firmware/) + +## Qu'est ce que QMK Firmware ? + +QMK (*Quantum Mechanical Keyboard*) est une communauté open source qui maintient le firmware QMK, la QMK Toolbox (*Boite à outil*), qmk.fm et leurs documentations. QMK Firmware est un firmware dédié aux claviers qui est basé sur [tmk\_keyboard](http://github.com/tmk/tmk_keyboard). Il offre des fonctionnalités très utiles pour les contrôleurs Atmel AVR, et, plus spécifiquement pour [les produits d'OLKB](http://olkb.com), le clavier [ErgoDox EZ](http://www.ergodox-ez.com), et pour les [produits Clueboard](http://clueboard.co/). Il prend désormais aussi en charge les processeurs ARM qui utilisent ChibiOS. Vous pouvez l'utiliser pour contrôler un clavier personnalisé soudé à la main ou alors sur un clavier avec un PCB personnalisé. + +## Comment l'obtenir + +Si vous souhaitez contribuer à une disposition de clavier (keymap), ou à des fonctionnalités de QMK alors le plus simple est de [forker le dépôt avec Github](/~https://github.com/qmk/qmk_firmware#fork-destination-box) puis cloner le dépôt localement pour y faire des changements. Vous pourrez pousser vos changements sur github puis ouvrir un [Pull Request](/~https://github.com/qmk/qmk_firmware/pulls) depuis votre fork Github. + +Sinon, vous pouvez aussi le télécharger directement en ([zip](/~https://github.com/qmk/qmk_firmware/zipball/master), [tar](/~https://github.com/qmk/qmk_firmware/tarball/master)), ou le cloner avec git en ssh (`git@github.com:qmk/qmk_firmware.git`), ou https (`/~https://github.com/qmk/qmk_firmware.git`). + +## Comment le compiler + +Avant d'être prêt à compiler vous allez devoir [installer un environnement](getting_started_build_tools.md) pour les développements AVR et/ou ARM. Une fois ceci fait, vous pourrez utiliser la commande `make` pour compiler le clavier et la disposition avec une commande de ce type : + + make planck/rev4:default + +Cette commande compilera la révision `rev4` du clavier `planck` avec la disposition `default`. Notez que tous les claviers n'ont pas forcément de révisions (aussi appelées sous-projects ou dossiers, ou en en Anglais « subprojects » ou « folder »). Cette option peut donc être omise : + + make preonic:default + +## Comment le personnaliser + +QMK a beaucoup de [fonctionnalités](features.md) à explorer, et [une documentation](http://docs.qmk.fm) très abondante que vous pourrez parcourir. La plupart des fonctionnalités vous permettrons de modifier vos [dispositions](keymap.md) (keymaps) et de changer [les codes de caractères](keycodes.md) (keycodes). diff --git a/docs/fr-FR/_summary.md b/docs/fr-FR/_summary.md new file mode 100644 index 000000000000..7b87d4605ff8 --- /dev/null +++ b/docs/fr-FR/_summary.md @@ -0,0 +1,125 @@ +**En Français** + +* [Guide pour débutant complet](fr-FR/newbs.md) + * [Pour débuter](fr-FR/newbs_getting_started.md) + * [Compiler son premier firmware](fr-FR/newbs_building_firmware.md) + * [Flasher le Firmware](fr-FR/newbs_flashing.md) + * [Test et Débuggage](fr-FR/newbs_testing_debugging.md) + * [Bonnes pratiques Git](fr-FR/newbs_best_practices.md) + * [Ressources d'apprentissage](fr-FR/newbs_learn_more_resources.md) + +**En Anglais** + +* [Les bases de QMK](README.md) + * [Introduction à QMK](getting_started_introduction.md) + * [QMK en ligne de commande](cli.md) + * [Configurer les lignes de commandes CLI](cli_configuration.md) + * [Contribuer à QMK](contributing.md) + * [Comment utiliser Github](getting_started_github.md) + * [Obtenir de l’aide](getting_started_getting_help.md) + +* [Changements non rétro-compatibles](breaking_changes.md) + * [30 Aout 2019](ChangeLog/20190830.md) + +* [FAQ](faq.md) + * [FAQ Générale](faq_general.md) + * [Compiler QMK](faq_build.md) + * [Débugguer / Dépanner QMK](faq_debug.md) + * [Keymap / Disposition](faq_keymap.md) + * [Installer les drivers avec Zadig](driver_installation_zadig.md) + +* Guides détaillés + * [Installation des outils de compilation](getting_started_build_tools.md) + * [Guide Vagrant](getting_started_vagrant.md) + * [Commandes de compilations](getting_started_make_guide.md) + * [Flasher les firmwares](fr-fr/flashing.md) + * [Personnaliser les fonctionnalités](custom_quantum_functions.md) + * [Aperçu des fonctionnalités des dispositions](keymap.md) + +* [Hardware](hardware.md) + * [Processeurs AVR](hardware_avr.md) + * [Pilotes / Drivers](hardware_drivers.md) + +* Réferences + * [Lignes de conduite des claviers](hardware_keyboard_guidelines.md) + * [Options de configurations](config_options.md) + * [Keycodes / Codes des caractères](keycodes.md) + * [Conventions de codage - C](coding_conventions_c.md) + * [Conventions de codage - Python](coding_conventions_python.md) + * [Meilleurs pratiques sur la documentation](documentation_best_practices.md) + * [Modèles de documentation](documentation_templates.md) + * [Glossaire](reference_glossary.md) + * [Tests unitaires](unit_testing.md) + * [Fonctions utiles](ref_functions.md) + * [Support de configuration](reference_configurator_support.md) + * [Format du fichier info.json](reference_info_json.md) + * [Développer la CLI en Python](cli_development.md) + +* [Fonctionnalités](features.md) + * [Keycodes basiques](keycodes_basic.md) + * [Touches utilisées avec Shift (US ANSI)](keycodes_us_ansi_shifted.md) + * [Keycodes quantiques](quantum_keycodes.md) + * [Keycodes avancés](feature_advanced_keycodes.md) + * [Fonctionnalités audio](feature_audio.md) + * [Majuscule automatique](feature_auto_shift.md) + * [Rétroéclairage](feature_backlight.md) + * [Bluetooth](feature_bluetooth.md) + * [Bootmagic](feature_bootmagic.md) + * [Combos](feature_combo.md) + * [Commande](feature_command.md) + * [API anti-rebond](feature_debounce_type.md) + * [DIP Switch](feature_dip_switch.md) + * [Macros dynamiques](feature_dynamic_macros.md) + * [Interrupteurs rotatifs](feature_encoders.md) + * [Grave Escape](feature_grave_esc.md) + * [Retour haptique](feature_haptic_feedback.md) + * [Contrôleur LCD HD44780](feature_hd44780.md) + * [Touche à verrou / Lock-key](feature_key_lock.md) + * [Dispositions / layouts](feature_layouts.md) + * [Touche leader](feature_leader_key.md) + * [Matrice LED](feature_led_matrix.md) + * [Macros](feature_macros.md) + * [Boutons de souris](feature_mouse_keys.md) + * [Pilotes / Drivers OLED](feature_oled_driver.md) + * [Touche one-shot](feature_advanced_keycodes.md#one-shot-keys) + * [Périphériques de pointage](feature_pointing_device.md) + * [Souris PS/2](feature_ps2_mouse.md) + * [Éclairage RGB](feature_rgblight.md) + * [Matrice RGB](feature_rgb_matrix.md) + * [Space Cadet](feature_space_cadet.md) + * [Claviers scindés / splittés](feature_split_keyboard.md) + * [Stenographie](feature_stenography.md) + * [Inversion des mains](feature_swap_hands.md) + * [Tap Dance](feature_tap_dance.md) + * [Terminale](feature_terminal.md) + * [Imprimante thermique](feature_thermal_printer.md) + * [Caractères unicodes](feature_unicode.md) + * [Dossier utilisateur](feature_userspace.md) + * [Velocikey](feature_velocikey.md) + +* Pour les makers et les bricoleurs + * [Guide des claviers soudés à la main](hand_wire.md) + * [Guide de flash de l’ISP](isp_flashing_guide.md) + * [Guide du débogage ARM](arm_debugging.md) + * [Drivers i2c](i2c_driver.md) + * [Contrôles des GPIO](internals_gpio_control.md) + * [Conversion en Proton C](proton_c_conversion.md) + +* Pour aller plus loin + * [Comment fonctionnent les claviers](how_keyboards_work.md) + * [Comprendre QMK](understanding_qmk.md) + +* Autres sujets + * [Utiliser Eclipse avec QMK](other_eclipse.md) + * [Utiliser VSCode avec QMK](other_vscode.md) + * [Support](support.md) + * [Comment ajouter des traductions](translating.md) + +* À l’intérieur de QMK (En cours de documentation) + * [Définitions](internals_defines.md) + * [Input Callback Reg](internals_input_callback_reg.md) + * [Appareils Midi](internals_midi_device.md) + * [Installation d’un appareil Midi](internals_midi_device_setup_process.md) + * [Utilitaires Midi](internals_midi_util.md) + * [Fonctions Midi](internals_send_functions.md) + * [Outils Sysex](internals_sysex_tools.md) diff --git a/docs/fr-FR/flashing.md b/docs/fr-FR/flashing.md new file mode 100644 index 000000000000..f4379189a714 --- /dev/null +++ b/docs/fr-FR/flashing.md @@ -0,0 +1,236 @@ +# Instructions pour flasher et informations sur les bootloader + +Les claviers utilisent différents types de bootloaders et certains doivent être flashés différement. Heureusement, certains projets comme la [QMK Toolbox](/~https://github.com/qmk/qmk_toolbox/releases) ont pour objectifs de permettre de flasher les différents bootloader sans trop se faire de soucis et ça peut importe les manières de les flasher. + +Si vous avez un bootloader sélectionné avec la variable `BOOTLOADER` dans votre fichier `rules.mk` alors QMK vas automatiquement calculer si votre fichier .hex n'est pas trop grand pour être flashé sur votre appareil, et il affichera la taille finale du firmware. Pour vérifier la taille manuellement, vous pouvez aussi compiler le firmware avec l'option `check-size`. Exemple : `make planck/rev4:default:check-size`. + +## DFU + +Le bootloader pour les processeurs Atmel DFU est fourni par défaut sur tous les processeurs atmega32u4. Celui-ci est utilisé par beaucoup de claviers plus vieux que les OLKB et Clueboard qui ont leur propre ICs sur leurs PCBs. D'autres claviers utilisent le bootloader DFU de LUFA (ou son fork QMK), notamment les nouveaux claviers OLKB. Ce dernier ajoute des fonctionnalités spécifiques sur le matériel. + +Pour vérifier la compatibilité avec le bootloader DFU, vérifiez que ce bloc de code est présent dans votre fichier `rules.mk`. Parfois il peut être inscrit `lufa-dfu` ou `qmk-dfu` à la place. + +```make +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu +``` + +Méthodes de flash compatibles : + +* [QMK Toolbox](/~https://github.com/qmk/qmk_toolbox/releases) (interface graphique recommandé) +* [dfu-programmer](/~https://github.com/dfu-programmer/dfu-programmer) / `:dfu` avec QMK (outil en ligne de commande recommandé) +* [Atmel's Flip](http://www.microchip.com/developmenttools/productdetails.aspx?partno=flip) (non recommandé) + +Ordre des actions : + +1. Pressez le keycode `RESET`, ou appuyez sur le bouton physique RESET ou alors créez un contact entre RST et GND. +2. Attendez que l'OS detecte l'appareil. +3. Éffacez la mémoire, cela peut être fait automatiquement. +4. Flasher le fichier .hex. +5. Redémarrez l'appareil en mode « application », cela peut être fait automatiquement. + +Alternativement : + + make ::dfu + +### DFU QMK + +QMK a un fork du bootloader LUFA DFU qui vous permet de faire un simple scan de la matrice pour quitter le bootloader et retourner à l'application. En même temps que le flash se produira, il est possible de faire flasher un led ou de produire un son via un haut parleur. Pour activer ces fonctionnalités, vous pouvez utiliser ce bloc dans votre fichier `config.h` (La touche permettant de quitter le bootloader a besoin d'être reliée entre les ports définis en INPUT et OUTPUT ici): + + #define QMK_ESC_OUTPUT F1 // usually COL + #define QMK_ESC_INPUT D5 // usually ROW + #define QMK_LED E6 + #define QMK_SPEAKER C6 + +Le fabriquant et le nom du produit proviennent de vos définitions dans fichier `config.h`, et la chaîne de caractère « bootloader » est ajoutée au nom du prodruit. + +Pour génerer le bootloader, utilisez la cible `bootloader`. Exemple : `make planck/rev4:default:bootloader`. + +Pour génerer un fichier .hex prêt pour la production qui contiendra tant l'application que le bootloader, utilisez la cible `production`. Exemple : `make planck/rev4:default:production`. + +### Commandes DFU + +Il y a plusieurs commandes DFU que vous pouvez utiliser pour flasher le firmware sur un appareil DFU. + +* `:dfu` - C'est l'option normale qui attend qu'un appareil DFU soit disponible et qui flashe le firmware dès que c'est le cas. La vérification sera faite toutes les 5 secondes. +* `:dfu-ee` - Cette option flash un fichier `.eep` à la place d'un fichier `.hex`. Ce cas est plutôt rare. +* `:dfu-split-left` - Cette option flashe le firmware normal comme avec l'option (`:dfu`). Mais cela aussi flash le coté gauche du fichier EEPROM pour les claviers scindés. _C'est l'option idéale pour un clavier scindé basé sur le Elite C_ +* `:dfu-split-right` - Cette option flashe le firmware normal comme avec l'option (`:dfu`). Mais cela aussi flash le coté droite du fichier EEPROM pour les claviers scindés. _C'est l'option idéale pour un clavier scindé basé sur le Elite C_ + +## Caterina + +Les cartes arduinos et leurs clones utilisent le [bootloader Caterina](/~https://github.com/arduino/ArduinoCore-avr/tree/master/bootloaders/caterina) (tous les claviers utilisant un Pro Micro, ou un clone). Ils utilisent aussi le protocole avr109 pour communiquer en virtuellement en série (serial en Anglais). Les bootloaders comme le [A-Star](https://www.pololu.com/docs/0J61/9) sont basés sur Caterina. + +Pour vérifier la compatibilité avec un bootloader Caterina, vérifiez que ce bloc est présent dans votre fichier `rules.mk` : + +```make +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina +``` + +Flashers compatibles : + +* [QMK Toolbox](/~https://github.com/qmk/qmk_toolbox/releases) (Interface graphique recomandée) +* [avrdude](http://www.nongnu.org/avrdude/) avec avr109 / `:avrdude` (Outil en ligne de commande recomandé) +* [AVRDUDESS](/~https://github.com/zkemble/AVRDUDESS) + +Séquence de flash :  + +1. Pressez la touche avec le keycode `RESET`, ou reliez les ports GND et RST. Vous n'avez que 7 secondes pour flasher une fois que l'opération a été faite. +2. Attendez que l'OS détecte l'appareil. +3. Flasher le fichier .hex. +4. Attendez que l'appareil redémarre automatiquement. + +ou, utilisez : + + make ::avrdude + +ou, si vous vous voulez flasher plusieurs claviers, utilisez la commande suivante : + + make ::avrdude-loop + +Quand vous avez fini de flasher vos claviers, vous aurez besoin d'utiliser Ctrl + C ou alors la touche ayant la fonction similaire sur votre OS pour sortir de la boucle. + +## Halfkay + +Halfkay est un protocole ultra-simple développé par PJRC qui utilise HID et qui est fourni avec tous les Teensys après le modèle 2.0. + +Pour vérifier la compatibilité avec le booloader Halfkay, vérifiez que ce bloc est présent dans votre fichier `rules.mk` : + +```make +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = halfkay +``` + +Flasher compatibles : + +* [QMK Toolbox](/~https://github.com/qmk/qmk_toolbox/releases) (Interface graphique recomandée) +* [Teensy Loader](https://www.pjrc.com/teensy/loader.html) (petit utilitaire ultra simple) + [Teensy Loader en ligne de commande](https://www.pjrc.com/teensy/loader_cli.html) (Outil en ligne de commande recommandé) + +Séquence de flash : + +1. Pressez la touche du keycode `RESET`, ou reliez les ports RST et GND rapidement. Vous avez ensuite 7 secondes pour réaliser le flash. +2. Attendez que l'OS détecte l'appareil. +3. Flasher le fichier .hex. +4. Redémarrez l'appareil en mode « application ». Cela peut être fait automatiquement. + +## USBasploader + +USBasploader est un bootloader développé par matrixstorm. Il est utilisé sur des processeurs AVR non-USB comme le ATmega328P, qui fonctionne grâce à V-USB. + +Pour vérifier la compatibilité avec le booloader USBasploader, vérifiez que ce bloc est présent dans votre fichier `rules.mk` : + +```make +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = USBasp +``` + +Flashers compatibles : + +* [QMK Toolbox](/~https://github.com/qmk/qmk_toolbox/releases) (Interface graphique recommandé) +* [avrdude](http://www.nongnu.org/avrdude/) avec le programmeur `usbasp`. +* [AVRDUDESS](/~https://github.com/zkemble/AVRDUDESS) + +Séquence de flash : + +1. Pressez la touche du keycode `RESET`, ou reliez le port de boot pendant que RST et GND snt reliés. Cela doit être fait très rapidement. +2. Attendez que l'OS détecte l'appareil. +3. Flasher le fichier .hex. +4. Redémarrez l'appareil en mode « application ». Cela peut être fait automatiquement. + +## BootloadHID + +BootloadHID est un bootloader pour les microcontroleurs AVR. L'utilitaire de téleversement ne demande pas de drivers au niveau du kernel et peut être lancé sans installer aucune DLLs. + +Pour vérifier la compatibilité avec le bootloader bootloadHID, vérifiez que ce bloc existe dans votre fichier `rules.mk` :  + +```make +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = bootloadHID +``` + +Utilitaires de flash compatibles : + +* [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash) (Utilitaire avec interface graphique recommandé) +* [bootloadhid Command Line](https://www.obdev.at/products/vusb/bootloadhid.html) / `:BootloadHID` avec QMK (utilitaire en ligne de commande recommandé) + +Séquence de flash + +1. Entrez dans le bootloader en utilisant l'une de ces méthodes : + * Pressez la touche du keycode `RESET` (Cela ne fonctionnera pas sur certains appareils). + * Verouillez la touche « Salt » tout en branchant le clavier (Géneralement ce principe est documenté dans le fichier readme du clavier) +2. Attendez que l'OS détecte l'appareil. +3. Flasher le fichier .hex. +4. Redémarrez l'appareil en mode « application ». Cela peut être fait automatiquement. + +Ou alors : + + make ::bootloadHID + +## STM32 + +Tous les processeurs STM32 contiennent un bootloader installé en usine qui ne peut pas être modifié ou supprimé. Certains processeurs STM32 ont des bootloaders qui ne peuvent pas être programmés par USB (ex : STM32F103) mais le processus reste le même. + +Pour le moment, aucune variable `BOOTLOADER` n'est nécessaire dans le fichier `rules.mk`. + +Flashers compatibles : + +* [QMK Toolbox](/~https://github.com/qmk/qmk_toolbox/releases) (interface graphique recommandé) +* [dfu-util](/~https://github.com/Stefan-Schmidt/dfu-util) / `:dfu-util` (utilitaire en ligne de commande recommandé) + +Séquence pour flasher: + +1. Entrez dans le bootloader en utilisant l'une de ces méthodes : + * Utilisez une touche sur laquelle le keycode `RESET` (Cela peut ne pas fonctionner sur les appareils STM32F042) + * Si un circuit de réinitialisation (Reset) est présent alors utilisé le bouton qui lui est dédié. + * Autrement, vous devez réaliser une liaison entre BOOT0 et VCC (en appuyant sur le bouton ou à l'aide d'un pont) puis faire un pont entre RESET et GND et enfin relacher le pont BOOT0. +2. Attendre que l'os détecte l'appareil. +3. Flasher un fichier `.bin`.h + * Vous allez recevoir un avertissement à propos de la signature DFU. Ignorez-la. +4. Réinitialisez l'appareil en mode « application ». Cela peut être fait automatiquement. + * Si vous êtes en train de travailler en ligne de commande, par exemple avec un `make planck/rev6:default:dfu-util` alors soyez bien sur que l'argument `:leave` est passé aux argument DFU grâce à la variable `DFU_ARGS` à l'intérieur de votre fichier `rules.mk` (Ex : `DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave`) afin que votre appareil redémarre après avoir été flashé. + +### Commandes STM32 + +Il y a différentes commandes que vous pouvez utiliser pour flasher un firmware dans un appareil STM32  : + +* `:dfu-util` - La commande par défaut pour flasher un appareil STM32. +* `:dfu-util-split-left` - Permet de flasher un firmware normalement, tout comme l'option précedente mais permet de configurer le coté gauche des paramètres EEPROM sur un clavier scindé. +* `:dfu-util-split-right` - Permet de flasher un firmware normalement, tout comme l'option précedente mais permet de configurer le coté droit des paramètres EEPROM sur un clavier scindé. +* `:st-link-cli` - Cela permet de flasher le firmware avec l'utilitaire en ligne de commande ST-LINK's plutôt que d'utiliser dfu-util. diff --git a/docs/fr-FR/newbs.md b/docs/fr-FR/newbs.md new file mode 100644 index 000000000000..13b06b429e31 --- /dev/null +++ b/docs/fr-FR/newbs.md @@ -0,0 +1,23 @@ +# Le Guide pour débutant complet à QMK + +QMK est un firmware Open Source pour votre clavier mécanique. Vous pouvez utiliser QMK pour customiser votre clavier de manière simple et puissante. Tout le monde, du débutant complet au développeur avancé, ont utilisé avec succès QMK pour customiser leur clavier. Ce guide vous aidera à faire de même, quelles que soient vos compétences. + +Vous voulez savoir si votre clavier peut utiliser QMK? Si c'est un clavier mécanique que vous avez vous-même construit, il y a de bonnes chances que vous pouvez. Nous supportons un [grand nombre de "hobbyist boards"](http://qmk.fr/keyboards), donc même si votre clavier ne peut pas utiliser QMK, vous ne devriez pas avoir trop de problème pour en trouver un qui vous convienne. + +## Vue d'ensemble + +Il y a 7 sections principales dans ce guide: + +* [Pour débuter](fr-FR/newbs_getting_started.md) +* [Compiler votre premier firmware en utilisant la ligne de commande](fr-FR/newbs_building_firmware.md) +* [Compiler votre premier firmware en utilisant l'interface graphique en ligne](fr-FR/newbs_building_firmware_configurator.md) +* [Flasher le Firmware](fr-FR/newbs_flashing.md) +* [Test et Débuggage](fr-FR/newbs_testing_debugging.md) +* [Bonnes pratiques Git](fr-FR/newbs_best_practices.md) +* [Ressources d'apprentissage](fr-FR/newbs_learn_more_resources.md) + +Ce guide a pour but principal d'aider quelqu'un qui n'a jamais compilé de logiciel avant. Les recommandations et les choix qu'il contient vont donc dans ce sens. Il y a des méthodes alternatives pour beaucoup de ces procédures, et nous supportons la plupart de ces alternatives. Si vous avez un doute sur comment accomplir une tâche, vous pouvez [nous demander de l'aide](fr-FR/getting_started_getting_help.md). + +## Ressources additionnelles + +* [Thomas Baart's QMK Basics Blog](https://thomasbaart.nl/category/mechanical-keyboards/firmware/qmk/qmk-basics/) – Un blog créé par un utilisateur qui couvre les bases de l'utilisation du Firmware QMK, vue d'un point de vue d'un nouvel utilisateur (anglais). diff --git a/docs/fr-FR/newbs_best_practices.md b/docs/fr-FR/newbs_best_practices.md new file mode 100644 index 000000000000..c0e76b1c9660 --- /dev/null +++ b/docs/fr-FR/newbs_best_practices.md @@ -0,0 +1,161 @@ +# Bonnes Pratiques + +## Ou, "Comment j'ai appris à ne plus m'en faire et aimer Git." + +Ce document a pour but d'apprendre aux novices les meilleures solutions pour faciliter la contribution à QMK. Nous allons étudier le processus de contribution à QMK, détaillant quelques moyens de rendre cette tâche plus simple. Nous allons faire quelques erreurs afin de vous apprendre à les résoudre. + +Ce document suppose les choses suivantes: + +1. Vous avez un compte GitHub, et avez [créé un "fork" pour le dépôt qmk_firmware](fr-FR/getting_started_github.md) avec votre compte. +2. Vous avez [configuré votre environnement de compilation](fr-FR/newbs_getting_started.md?id=environment-setup). + +## La branche master de votre fork: Mettre à jour souvent, ne jamais commit + +Il est hautement recommandé pour le développement de QMK, peu importe ce qui est fait ou où, de garder votre branche `master` à jour, mais de ne ***jamais*** commit dessus. A la place, faites tous vos changement dans une branche de développement et crééz des "pull requests" de votre branche lorsque vous développez. + +Pour réduire les chances de conflits de fusion (merge) — des cas où deux ou plus d'utilisateurs ont édité la même section d'un fichier en parallèle — gardez votre branche `master` relativement à jour et démarrez chaque nouveau développement en créant une nouvelle branche. + +### Mettre à jour votre branche master + +Pour garder votre branche `master` à jour, il est recommandé d'ajouter le dépôt du firmware QMK comme un dépôt distant (remote) dans git. pour se faire, ouvrez votre interface de ligne de commande Git et entrez: + +```bash +git remote add upstream /~https://github.com/qmk/qmk_firmware.git +``` + +Pour vérifier que le dépôt a bien été ajouté, lancez la commande `git remote -v`, qui devrait retourner le résultat suivant: + +```bash +$ git remote -v +origin /~https://github.com//qmk_firmware.git (fetch) +origin /~https://github.com//qmk_firmware.git (push) +upstream /~https://github.com/qmk/qmk_firmware.git (fetch) +upstream /~https://github.com/qmk/qmk_firmware.git (push) +``` + +Maintenant que c'est fait, vous pouvez vérifier les mises à jour au dépôt en lançant `git fetch upstream`. Cela récupère les branches et les tags — appelé de manière générale "refs" — du dépôt QMK, qui a maintenant le surnom `upstream`. Nous pouvons maintenant comparer les données sur notre "fork" `origin` à celles contenues par QMK. + +Pour mettre à jour la branche master de votre "fork", lancez les commandes suivantes (en appuyant sur Enter après chaque ligne): + +```bash +git checkout master +git fetch upstream +git pull upstream master +git push origin master +``` + +Cela vous change la branche courante en master, synchronise les données de réferences du dépôt QMK vers votre ordinateur. La commande pull tire les données de réferences vers votre branche courante puis les y téleverse. La commande push permet de pousser la branche courante (master) vers votre fork github. + +### Faire des changements + +Pour faire des changements, créez une nouvelle branche en entrant: + +```bash +git checkout -b dev_branch +git push --set-upstream origin dev_branch +``` + +Ceci crée une branche nommée `dev_branch`, bascule vers cette branche, et ensuite sauvegarde cette nouvelle branche vers votre fork. L'argument `--set-upstream` demande à git d'utiliser votre fork et la branche `dev_branch` à chaque fois que vous utilisez `git push` ou `git pull` depuis cette branche. Vous ne devez l'utiliser que pour le premier "push", après celà, vous pouvez utiliser simplement `git push` ou `git pull`, sans le reste des arguments. + +!> Avec `git push`, vous pouvez utiliser `-u` à la place de `--set-upstream` — `-u` est un alias pour `--set-upstream`. + +Vous pouvez appeler votre branche à peu prêt comme vous voulez, toutefois il est recommandé d'utiliser un nom qui est lié aux changements que vous allez faire. + +Par défaut, `git checkout -b` va faire de la branche actuelle la branche de base de votre nouvelle branche. Vous pouvez définir la base de votre nouvelle branche comme étant n'importe quelle branche existante qui n'est pas la courante en utilisant la commande: + +```bash +git checkout -b dev_branch master +``` + +Maintenant que vous avez une branche de développement, ouvrez votre éditeur de texte et faites vos changements. Il est recommandé de faire beaucoup de petits commits dans votre branche. Ainsi, un changement qui crée un problème peut être plus facilement retracé et annulé si nécessaire. Pour faire un changement, éditez et sauvez n'importe quel fichier qui doit être mis à jour, ajoutez les à la *zone de staging* de Git, et commitez les vers votre branche: + +```bash +git add path/to/updated_file +git commit -m "My commit message." +``` + +`git add` ajoute les fichiers qui ont été changés dans la *zone de staging* de Git, qui est sa "zone de chargement". Elle contient tous les changements qui vont être *validés* (committed) par `git commit`, qui sauvegarde les changements vers le dépôt. Utilisez des messages de validation descriptifs afin que vous puissiez savoir ce qui a changé d'un coup d'oeil. + +!> Si vous changez beaucoup de fichiers, mais tous les fichiers font partie du même changement, vous pouvez utiliser `git add .` pour ajouter tous les fichiers changés dans le répertoire courant, plutôt que d'avoir à ajouter chaque fichiers individuellement. + +### Publier Vos Changements + +La dernière étape est de pousser vos changements vers votre fork. pour se faire, entrez `git push`. Git publie maintenant l'état courant de `dev_branch` vers votre fork. + +## Résoudre Les Conflits De Merge + +Parfois, lorsque votre travail sur une branche met beaucoup de temps à se compléter, des changements réalisés par d'autres peuvent entrer en conflit avec les changements que vous avez fait sur votre branche au moment où vous avez ouvert un pull request. Ceci est appelé un *conflit de merge*, et c'est ce qui arrive lorsque plusieurs personnes modifient les mêmes parties de mêmes fichiers. + +### Rebaser Vos Changements + +Un *rebase* est la manière pour Git de prendre les changements qui ont été faits à un point, les annuler, et les réappliquer sur un autre point. Dans le cas d'un conflit de merge, vous pouvez rebaser votre branche pour récupérer les changements qui ont été faits entre le moment où vous avez créé votre branche et le présent. + +Pour démarrer, lancez les commandes suivantes: + +```bash +git fetch upstream +git rev-list --left-right --count HEAD...upstream/master +``` + +La commande `git rev-list` retourne le nombre de commits qui diffère entre la branche courante et la branche master de QMK. Nous lançons `git fetch` en premier afin d'être sûr que les refs qui représentent l'état courant du dépôt upstream soient à jour. Le résultat de la commande `git rev-list` retourne deux nombres: + +```bash +$ git rev-list --left-right --count HEAD...upstream/master +7 35 +``` + +Le premier nombre représente combien il y a eu de commits sur la branche courante depuis qu'elle a été créée, et le second nombre est combien de commits ont été faits sur la branche `upstream/master` depuis que la branche a été créée et, ainsi, les changements qui ne sont pas enregistrés sur la branche courante. + +Maintenant que l'état actuel de la branche courante et la branche upstream sont connus, nous pouvons maintenant démarrer une opération de rebase: + +```bash +git rebase upstream/master +``` + +Ceci dit à Git d'annuler les commits de la branche courrante puis de les réappliquer sur la branche master de QMK. + +```bash +$ git rebase upstream/master +First, rewinding head to replay your work on top of it... +Applying: Commit #1 +Using index info to reconstruct a base tree... +M conflicting_file_1.txt +Falling back to patching base and 3-way merge... +Auto-merging conflicting_file_1.txt +CONFLICT (content): Merge conflict in conflicting_file_1.txt +error: Failed to merge in the changes. +hint: Use 'git am --show-current-patch' to see the failed patch +Patch failed at 0001 Commit #1 + +Resolve all conflicts manually, mark them as resolved with +"git add/rm ", then run "git rebase --continue". +You can instead skip this commit: run "git rebase --skip". +To abort and get back to the state before "git rebase", run "git rebase --abort". +``` + +Ceci nous dit que nous avons un conflit de merge, et nous donne le nom du fichier en conflit. Ouvez le fichier conflictuel dans votre éditeur de texte et, quelque part dans le fichier, vous trouverez quelque chose comme ça: + +```bash +<<<<<<< HEAD +

For help with any issues, email us at support@webhost.us.

+======= +

Need help? Email support@webhost.us.

+>>>>>>> Commit #1 +``` + +La ligne `<<<<<<< HEAD` montre le début d'un conflit de merge et la ligne `>>>>>>> Commit #1` indique la fin, avec les sections conflictuelles séparées par `=======`. La partie du côté `HEAD` vient de la version du fichier provenant de la branche master de QMK, et la partie marquée avec le numéro du commit provient de la branche courrante. + +Parce que Git suis *les changements des fichiers*, plutôt que les contenus des fichiers directement, si Git ne peut pas trouver le texte qu'il y avait dans le fichier avant que le commit soit fait, il ne saura pas comment modifier le fichier. Modifier le fichier à nouveau va résoudre le conflit. Faites votre changement, et sauvez le fichier. + +```bash +

Need help? Email support@webhost.us.

+``` + +Maintenant, lancez: + +```bash +git add conflicting_file_1.txt +git rebase --continue +``` + +Git enregistre le changement dans le fichier conflictuel, et continue à appliquer les commits depuis votre branche jusqu'à ce qu'il arrive à la fin. diff --git a/docs/fr-FR/newbs_building_firmware.md b/docs/fr-FR/newbs_building_firmware.md new file mode 100644 index 000000000000..81870d31e477 --- /dev/null +++ b/docs/fr-FR/newbs_building_firmware.md @@ -0,0 +1,81 @@ +# Compiler Votre Premier Firmware + +Maintenant que vous avez configuré votre environnement de build, vous être prêts à compiler un firmware customisé. Pour cette section, nous allons utiliser trois programmes différents: votre explorateur de fichier, votre éditeur de texte et votre fenêtre de terminal. Gardez les 3 ouverts jusqu'à ce que vous ayez terminé et soyez content de votre firmware de clavier. + +Si vous avez fermé et rouvert votre fenêtre de terminal depuis le démarrage de ce guide, n'oubliez pas de `cd qmk_firmware` afin que votre terminal soit dans le bon répertoire. + +## Naviguez vers votre répertoire keymaps + +Démarrez par naviguer dans le répertoire `keymaps` de votre clavier. + +?> Si vous êtes sous macOS ou Windows, il y a des commandes que vous pouvez utiliser pour facilement ouvrir le dossier keymaps. + +?> macOS: + + open keyboards//keymaps + +?> Windows: + + start .\\keyboards\\\\keymaps + +## Créez une copie de la keymap `default` + +Une fois le dossier `keymaps` ouvert, créez une copie du répertoire `default`. Nous vous recommandons de nommer ce répertoire de la même manière que votre nom d'utilisateur GitHub. Vous pouvez aussi utiliser le nom que vous voulez, tant qu'il contient uniquement des lettres minuscules, des nombres et le caractère souligné (_). + +Afin d'automatiser ce processus, vous avez aussi l'option de lancer le script `new_keymap.sh`. + +Naviguez vers le répertoire `qmk_firmware/util` et tapez ce qui suit: + +``` +./new_keymap.sh +``` + +Par exemple, pour un utilisateur s'appeleant John, essayant de créer une nouvelle keymap pour le 1up60hse, il taperait: + +``` +./new_keymap.sh 1upkeyboards/1up60hse john +``` + +## Ouvrez `keymap.c` dans votre éditeur de texte préféré + +Ouvrez votre fichier `keymap.c`. Dans ce fichier, vous trouverez la structure qui contrôle comment votre clavier se comporte. En haut du fichier `keymap.c` il peut y avoir quelques `defines` et `enums` qui rendent la keymap plus simple à lire. Plus bas, vous trouverez une ligne telle que celle-ci: + + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +Cette ligne indique le début d'une liste de calques (layers). En dessous, vous trouverez des lignes contenant soit `LAYOUT`, soit `KEYMAP` et ces lignes indiquent le début d'un calque. En dessous de cette ligne se trouve la liste des touches qui comprennent ce calque particulier. + +!> Lorsque vous éditez votre fichier keymap, faites attention à ne pas ajouter ou enlever une virgule. Si vous le faites, vous aller empêcher votre firmware de compiler et il ne sera pas facile de trouver où la virgule est manquante ou en trop. + +## Customisez le layout à votre goût + +Libre à vous de choisir comment compléter cette étape. Faites le petit changement qui vous dérange ou retravaillez tout de zéro. Vous pouvez supprimer des calques si vous ne les utilisez pas tous, ou ajouter des calques jusqu'à un maximum de 32. Vérifiez la documentation suivante pour trouver ce que vous pouvez définir ici: + +* [Keycodes](keycodes.md) +* [Fonctionnalités](features.md) +* [FAQ](faq.md) + +?> Lorsque vous découvrez comment des keymaps fonctionnent, faites de petits changements. De gros changements rendent le débuggage des problèmes éventuels plus difficile. + +## Compilez votre firmware + +Lorsque les changements de votre keymap sont complets, vous allez devoir compiler le firmware. Pour ce faire, retournez à votre terminal et lancez la commande de compilation: + + make : + +Par exemple, si votre keymap s'appelle "xyverz" et vous compilez une keymap pour une plank rev5, vous allez utiliser cette commande: + + make planck/rev5:xyverz + +Durant la compilation, vous allez avoir beaucoup de messages sur l'écran vous informant de quels fichiers sont en train d'être compilés. Il devrait se terminer avec des messages qui ressemblent comme suit: + +``` +Linking: .build/planck_rev5_xyverz.elf [OK] +Creating load file for flashing: .build/planck_rev5_xyverz.hex [OK] +Copying planck_rev5_xyverz.hex to qmk_firmware folder [OK] +Checking file size of planck_rev5_xyverz.hex [OK] + * File size is fine - 18392/28672 +``` + +## Flasher votre firmware + +Allez sur la page [Flasher le firmware](fr-FR/newbs_flashing.md) pour apprendre comment écrire votre nouveau firmware sur votre clavier. diff --git a/docs/fr-FR/newbs_building_firmware_configurator.md b/docs/fr-FR/newbs_building_firmware_configurator.md new file mode 100644 index 000000000000..ea284c505953 --- /dev/null +++ b/docs/fr-FR/newbs_building_firmware_configurator.md @@ -0,0 +1,105 @@ +# Configurateur de QMK + +Le [Configurateur de QMK](https://config.qmk.fm) est une interface graphique en ligne permettant de générer des fichiers "hex" du firmware de QMK. + +?> **S'il vous plaît, suivez les étapes suivantes dans l'ordre.** + +Regardez le [Tutoriel vidéo](https://youtu.be/tx54jkRC9ZY) + +Le configurateur de QMK fonctionne mieux avec Chrome et Firefox. + +!> **Les fichiers d'autres outils, tels que KLE ou kbfirmware ne seront pas compatibles avec le configurateur QMK. Ne les chargez pas, ne les importez pas. Le configurateur QMK est un outil DIFFERENT.** + +## Sélectionner votre clavier + +Cliquez la boîte déroulante et sélectionnez le clavier pour lequel vous voulez créer une keymap. + +?> Si votre clavier a plusieurs versions, faites attention à utiliser la bonne. + +Je vais le répéter, parce que c'est important + +!> **FAITES ATTENTION A UTILISER LA BONNE VERSION !** + +Si votre clavier est annoncé comme fonctionnant grâce à QMK mais n'est pas dans la liste, il y a des chances que le développeur ne l'ait pas encore fait, ou que nous n'avons pas encore eu le temps de le merger. Ajoutez un problème (issue) sur [qmk_firmware](/~https://github.com/qmk/qmk_firmware/issues) demandant le support de votre clavier, s'il n'y a pas de [Pull Request](/~https://github.com/qmk/qmk_firmware/pulls?q=is%3Aopen+is%3Apr+label%3Akeyboard) ouvert pour lui. Il y a aussi des clavier alimentés par QMK qui sont sur le compte GitHub du fabriquant, il est bon de le vérifier aussi. + +## Sélectionner la disposition de votre clavier + +Choisissez la disposition (layout) qui représente le mieux la keymap que vous voulez créer. Certains clavier n'ont pas encore assez de dispositions ou des dispositions incorrectes. Ils seront supportés dans le future. + +## Nom de la Keymap + +Appelez cette keymap comme vous voulez. + +?> Si vous rencontrez des problèmes lors de la compilation, il peut être utile de changer ce nom, il peut déjà exister dans le dépôt du firmware QMK. + +## Créer votre keymap + +Entrer un keycode peut s'accomplir de 3 façons différentes. + +1. Glisser déposer +2. Cliquer sur un endroit vide sur le layout et cliquer sur le keycode souhaité +3. Cliquer sur un endroit vide sur le layout et appuyer sur une touche physique de votre clavier. + +Passez votre souris au dessus d'une touche et un affichage vous dira quel est le rôle du keycode. Pour une version plus verbeuse suivre: + +[Référence Keycode basique](https://docs.qmk.fm/#/keycodes_basic) +[Référence Keycode avancé](https://docs.qmk.fm/#/feature_advanced_keycodes) + +Dans le cas où vous ne trouvez pas une disposition qui supporte votre keymap, par exemple trois places pour une barre d'espace, ou deux places pour retour clavier, ou deux places pour shift, etc. etc. remplissez les TOUTES. + +### Exemples + +3 places pour la barre d'espace: Remplissez les TOUTES avec la barre d'espace + +2 places pour un retour clavier: Remplissez les DEUX avec un retour clavier + +2 places pour un shift droit: Remplissez les DEUX avec un shift droit + +1 place pour un shift gauche et 1 place pour le support ISO: Remplissez les deux avec un shift gauche + +5 places, mais seulement 4 touches: Deviner et vérifier, ou demander à quelqu'un qui l'a déjà fait. + +## Sauvez votre keymap pour des éditions futures + +Une fois satisfait de votre keymap, ou si vous souhaitez revenir travailler dessus plus tard, appuyez sur le bouton `Export Keymap`. Il vous permettra de sauvegarder votre keymap avec le nom choisi au dessus suivi de .json. + +Vous pouvez ensuite charger ce fichier .json à nouveau en appuxant sur le bouton `Import Keymap`. + +!> **ATTENTION** Ce n'est pas le même type de fichier .json utilisé pour kbfirmware.com ou n'importe quel autre outil. Si vous essayez d'utiliser ce fichier pour d'autres outil, ou le fichier .json d'autres outils avec le configurateur QMK, il y a des chances que votre clavier **explose**. + +## Générer votre fichier firmware + +Appuyez sur le bouton `Compile`. + +Une fois la compilation terminée, vous pourrez appuyer sur le bouton vert `Download Firmware`. + +## Ecrire votre firmware sur votre clavier + +Merci de vous référer à [Flasher le Firmware](fr-FR/newbs_flashing.md) + +## Dépannage + +#### Mon fichier json ne fonctionne pas + +Si le fichier .json a été généré par le configurateur QMK, bravo vous avez trouvé un bug. Merci d'ouvrir une issue sur [qmk_configurator](/~https://github.com/qmk/qmk_configurator/issues) + +Sinon... vous avez raté mon message écris en gras qui dit de ne pas utiliser d'autres fichiers .json? + +#### Il y a des espaces en trop dans mon alyout? Qu'est-ce que je fais? + +Si vous voulez dire que vous avez trois places pour une barre d'espace, le mieux est de les remplir tous avec une barre d'espace. Vous pouvez faire de même avec les retour clavier et les shift. + +#### C'est quoi le keycode pour ....... + +Merci de regarder + +[Référence keycode basique](https://docs.qmk.fm/#/keycodes_basic) +[Référence keycode avancé](https://docs.qmk.fm/#/feature_advanced_keycodes) + +#### Ca ne compile pas? + +Merci de vérifier les autres dispositions de votre keymap afin d'être sûr qu'il n'y a pas de touches aléatoires. + +## Problèmes et Bugs + +Nous acceptons toujours les demandes des clients et les rapports de bugs. Merci de les remplirs sur [qmk_configurator](/~https://github.com/qmk/qmk_configurator/issues) diff --git a/docs/fr-FR/newbs_flashing.md b/docs/fr-FR/newbs_flashing.md new file mode 100644 index 000000000000..401c524acabb --- /dev/null +++ b/docs/fr-FR/newbs_flashing.md @@ -0,0 +1,348 @@ +# Flasher votre clavier + +Maintenant que vous avez compilé un firmware custom, vous allez vouloir le flasher dans votre clavier. + +## Flasher votre clavier avec QMK Toolbox + +La manière la plus simple de flasher votre clavier est avec [QMK Toolbox](/~https://github.com/qmk/qmk_toolbox/releases). + +Toutefois, la QMK Toolbox n'est actuellement disponible que pour Windows et macOS. Si vous utilisez Linux (ou préférez flasher le firmware depuis la ligne de commande), vous devrez utiliser [la métode décrite ci-dessous](newbs_flashing.md#flash-your-keyboard-from-the-command-line). + +### Charger le fichier dans QMK Toolbox + +Démarrez en ouvrant l'application QMK Toolbox. Cherchez le fichier de firmware dans Finder ou Explorer. Vore firmware de clavier peut être dans un de deux formats `.hex` ou `.bin`. QMK essaye de copier le bon format pour votre clavier du répertoire racine `qmk_firmware`. + +?> Si vous êtes sous Windows ou macOS il y a des commandes que vous pouvez utiliser pour facilement ouvrir le répertoire firmware dans Explorer ou Finder. + +?> Windows: + + start . + +?> macOS: + + open . + +Le fichier firmware suit toujours ce format de nommage: + + _.{bin,hex} + +Par exemple, le `plank/rev5` avec une keymap `default` aura ce nom de fichier: + + planck_rev5_default.hex + +Une fois que vous aurez trouvé votre fichier de firmware, glissez le dans la boîte "Local file" sur QMK Toolbox, ou cliquez sur "Open" et naviguez où votre firmware est enregistré. + +### Mettez votre clavier en mode DFU (Bootloader) + +Afin de flasher votre firmware custom, vous devez mettre votre clavier dans un mode spécial. Lorsqu'il sera dans ce mode, vous ne pourrez pas taper ou utiliser votre clavier. Il est très important que vous ne débranchiez pas votre clavier ou n'arrêtiez pas le processus d'écriture du firmware. + +Chaque clavier a une manière différente d'entrer dans ce mode spécial. Si votre clavier tourne actuellement QMK ou TMK et vous n'avez pas reçu d'instruction spécifiques, essayez, dans cet ordre: + +* Enfoncez les deux touches shift et appuyez sur `Pause` +* Enfoncez les deux touches shift et appuyez sur `B` +* Débranchez votre clavier, gardez shift la barre d'espace et `B` en même temps, branchez votre clavier et attendez une seconde avant de relâcher les touches. +* Appuyez la touche physique `RESET` en bas du PCB +* Trouvez les pins sur le PCB marquées `BOOT0` ou `RESET`, court circuitez ces pins en branchant votre PCB + +Lorsque vous aurez réussi, vous verrez le message suivant dans QMK Toolbox: + +``` +*** Clueboard - Clueboard 66% HotSwap disconnected -- 0xC1ED:0x2390 +*** DFU device connected +``` + +### Flasher votre clavier + +Appuyez sur le boutton `Flash` dans QMK Toolbox. Vous verrez un résultat similaire à ce qui suit: + +``` +*** Clueboard - Clueboard 66% HotSwap disconnected -- 0xC1ED:0x2390 +*** DFU device connected +*** Attempting to flash, please don't remove device +>>> dfu-programmer atmega32u4 erase --force + Erasing flash... Success + Checking memory from 0x0 to 0x6FFF... Empty. +>>> dfu-programmer atmega32u4 flash /Users/skully/qmk_firmware/clueboard_66_hotswap_gen1_skully.hex + Checking memory from 0x0 to 0x55FF... Empty. + 0% 100% Programming 0x5600 bytes... + [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success + 0% 100% Reading 0x7000 bytes... + [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success + Validating... Success + 0x5600 bytes written into 0x7000 bytes memory (76.79%). +>>> dfu-programmer atmega32u4 reset + +*** DFU device disconnected +*** Clueboard - Clueboard 66% HotSwap connected -- 0xC1ED:0x2390 +``` + +## Flashez votre clavier à l'aide de la ligne de commande + +La première chose que vous devez savoir c'est quel bootloader utilise votre clavier. Il y a quatre bootloaders principaux. Pro-Micro et les clones, utilisent CATERINA, les Teensy utilisent Halfkay, les OLKB utilisent QMK-DFU et les autres chips atmega32u4 utilisent DFU. + +Vous pouvez trouver plus d'information à propos des bootloaders sur la page [Instructions de flash et information sur le Bootloader](flashing.md). + +Si vous savez quel bootloader vous utilisez, lorsque vous compilez le firmware, vous pouvez ajouter quelques options à la commande `make` pour automatiser le processus de flash. + +### DFU + +Pour le bootloader DFU, lorsque vous êtes prêts à compiler et flasher votre firmware, ouvrez votre fenêtre de terminal et lancez la commande de compilation: + + make ::dfu + +Par exemple, si vous keymap s'appelle "xyverz" et vous compilez une keymap pour une plank rev5, vous utiliserez cette commande: + + make planck/rev5:xyverz:dfu + +Une fois la compilation terminée, le résultat devrait être le suivant: + +``` +Linking: .build/planck_rev5_xyverz.elf [OK] +Creating load file for flashing: .build/planck_rev5_xyverz.hex [OK] +Copying planck_rev5_xyverz.hex to qmk_firmware folder [OK] +Checking file size of planck_rev5_xyverz.hex + * File size is fine - 18574/28672 + ``` + +Une fois arrivé à ce stade, le script de compilation va checher le bootloader DFU toutes les 5 secondes. Il va répéter les messages suivants jusqu'à ce que l'appareil soit trouvé ou que vous l'annuliez. + + dfu-programmer: no device present. + Error: Bootloader not found. Trying again in 5s. + +Une fois terminé, vous devrez mettre à zéro le contrôleur. Vous allez voir un résultat similaire à ceci: + +``` +*** Attempting to flash, please don't remove device +>>> dfu-programmer atmega32u4 erase --force + Erasing flash... Success + Checking memory from 0x0 to 0x6FFF... Empty. +>>> dfu-programmer atmega32u4 flash /Users/skully/qmk_firmware/clueboard_66_hotswap_gen1_skully.hex + Checking memory from 0x0 to 0x55FF... Empty. + 0% 100% Programming 0x5600 bytes... + [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success + 0% 100% Reading 0x7000 bytes... + [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success + Validating... Success + 0x5600 bytes written into 0x7000 bytes memory (76.79%). +>>> dfu-programmer atmega32u4 reset +``` + +?> Si vous avez des soucis concerant ceci - comme par exemple `dfu-programmer: no device present` - merci de regarder [Foires Aux Questions de Compilation](faq_build.md). + +#### Commandes DFU + +Il y aun certain nombre de commandes du DFU que vous pouvez utiliser pour flasher un firmware sur un device DFU: + +* `:dfu` - C'est l'option standard qui attends jusqu'à e qu'un appareil DFU soit disponible, puis flash le firmware. Il va vérifier toutes les 5 secondes, afin de voir si un appareil DFU est apparu. +* `:dfu-ee` - Ceci flash un fichier `eep` à la place du standard hex, peu commun. +* `:dfu-split-left` - Ceci flash le firmware standard, comme la commande standard (`:dfu`). Toutefois, elle flash aussi les fichiers EEPROM du "côté gauche" pour les claviers scindés. _C'est l'option idéale pour les claviers scindés basés sur Elite C._ +* `:dfu-split-right` - Ceci flash le firmware standard, comme la commande standard (`:dfu`). Toutefois, elle flash aussi les fichiers EEPROM du "côté droit" pour les claviers scindés. _C'est l'option idéale pour les claviers scindés basés sur Elite C._ + +### Caterina + +Pour les boards Arduino et leurs clones (tel que le SparkFun ProMicro), lorsque vous êtes prêt à compiler et flasher votre firmware, ouvrez votre terminal et lancer la commande de compilation: + + make ::avrdude + +Par exemple, si votre keymap se nomme "xyverz" et que vous compilez une keymap pour un Lets Split rev2, vous utiliserez la commande suivante: + + make lets_split/rev2:xyverz:avrdude + +Une fois le firmware compilé, vous aurez le résultat suivant: + +``` +Linking: .build/lets_split_rev2_xyverz.elf [OK] +Creating load file for flashing: .build/lets_split_rev2_xyverz.hex [OK] +Checking file size of lets_split_rev2_xyverz.hex [OK] + * File size is fine - 27938/28672 +Detecting USB port, reset your controller now.............. +``` + +Une fois ceci fait, réinitialisez votre board et le script va détecter et flasher le firmware. La sortie devrait ressember à quelque chose comme ça: + +``` +Detected controller on USB port at /dev/ttyS15 + +Connecting to programmer: . +Found programmer: Id = "CATERIN"; type = S + Software Version = 1.0; No Hardware Version given. +Programmer supports auto addr increment. +Programmer supports buffered memory access with buffersize=128 bytes. + +Programmer supports the following devices: + Device code: 0x44 + +avrdude.exe: AVR device initialized and ready to accept instructions + +Reading | ################################################## | 100% 0.00s + +avrdude.exe: Device signature = 0x1e9587 (probably m32u4) +avrdude.exe: NOTE: "flash" memory has been specified, an erase cycle will be performed + To disable this feature, specify the -D option. +avrdude.exe: erasing chip +avrdude.exe: reading input file "./.build/lets_split_rev2_xyverz.hex" +avrdude.exe: input file ./.build/lets_split_rev2_xyverz.hex auto detected as Intel Hex +avrdude.exe: writing flash (27938 bytes): + +Writing | ################################################## | 100% 2.40s + +avrdude.exe: 27938 bytes of flash written +avrdude.exe: verifying flash memory against ./.build/lets_split_rev2_xyverz.hex: +avrdude.exe: load data flash data from input file ./.build/lets_split_rev2_xyverz.hex: +avrdude.exe: input file ./.build/lets_split_rev2_xyverz.hex auto detected as Intel Hex +avrdude.exe: input file ./.build/lets_split_rev2_xyverz.hex contains 27938 bytes +avrdude.exe: reading on-chip flash data: + +Reading | ################################################## | 100% 0.43s + +avrdude.exe: verifying ... +avrdude.exe: 27938 bytes of flash verified + +avrdude.exe: safemode: Fuses OK (E:CB, H:D8, L:FF) + +avrdude.exe done. Thank you. +``` + +Si vous avez un soucis, essayez de faire ceci: + + sudo make ::avrdude + +En addition, si vous voulez flasher plusieurs boards, utilisez la commande suivante: + + make ::avrdude-loop + +Une fois que vous avez terminé de flasher des boards, vous devrez appuyer sur Ctrl + C, ou les touches correspondantes pour votre système d'exploitation pour arrêter la boucle. + +### HalfKay + +Pour les composants PJRC (les Teensy), lorsque vous êtes prêts à compiler et flasher votre firmware, ouvrez votre fenêtre de terminal et lancez la commande de compilation suivante: + + make ::teensy + +Par exemple, si vous keymap s'appelle "xyverz" et vous compilez une keymap pour un Ergodox ou un Ergodox EZ, vous utiliserez cette commande: + + make ergodox_ez:xyverz:teensy + +Une fois la compilation du firmware terminée, votre sortie devrait ressembler à ça: + +``` +Linking: .build/ergodox_ez_xyverz.elf [OK] +Creating load file for flashing: .build/ergodox_ez_xyverz.hex [OK] +Checking file size of ergodox_ez_xyverz.hex [OK] + * File size is fine - 25584/32256 + Teensy Loader, Command Line, Version 2.1 +Read "./.build/ergodox_ez_xyverz.hex": 25584 bytes, 79.3% usage +Waiting for Teensy device... + (hint: press the reset button) + ``` + +Une fois terminé, réinitialisez votre board. Une fois fait, vous verrez une sortie comme ça: + + ``` + Found HalfKay Bootloader +Read "./.build/ergodox_ez_xyverz.hex": 28532 bytes, 88.5% usage +Programming............................................................................................................................................................................ +................................................... +Booting +``` + +### BootloadHID + +Pour les boards basée sur Bootmapper Client(BMC)/bootloadHID/ATmega32A, une fois prêt à compiler et flasher le firmware, ouvrez votre fenêtre de terminal et lancez la commande suivante: + + make ::bootloaderHID + +Par exemple, si votre keymap s'appelle "xyverz" et que vous compilez une keymap pour un jj40, vous utilisez cette commande: + + make jj40:xyverz:bootloaderHID + +Une fois le firmware compilé, vous aurez cette sortie: + +``` +Linking: .build/jj40_default.elf [OK] +Creating load file for flashing: .build/jj40_default.hex [OK] +Copying jj40_default.hex to qmk_firmware folder [OK] +Checking file size of jj40_default.hex [OK] + * The firmware size is fine - 21920/28672 (6752 bytes free) +``` + +A ce stade, le script de build va chercher le bootloader DFU toutes les 5 secondes. Il va répéter la sortie suivante jusqu'à ce que le dispositif soit trouvé ou que vous l'annuliez. + +``` +Error opening HIDBoot device: The specified device was not found +Trying again in 5s. +``` + +Une fois ce résultat atteint, réinitialisez le contrôleur. Il devrait afficher le résultat suivant: + +``` +Page size = 128 (0x80) +Device size = 32768 (0x8000); 30720 bytes remaining +Uploading 22016 (0x5600) bytes starting at 0 (0x0) +0x05580 ... 0x05600 +``` + +### STM32 (ARM) + +Pour la majorité des boards ARM (incluant les Proton C, Planck Rev 6, et Preonic Rev 3), lorsque vous êtes prêt à compiler et flasher votre firmware,ouvrez la fenêtre de terminal et lancez la commande de compilation: + + make ::dfu-util + +Par exemple, si votre keymap s'appelle "xyverz" et vous compilez une keymap pour le clavier Plank Revision 6, vous utiliserez cette commande et redémarrerez le clavier vers le bootloader (avant que la compilation soit terminée): + + make planck/rev6:xyverz:dfu-util + +Une fois le firmware compilé, il va afficher quelque chose comme ça: + +``` +Linking: .build/planck_rev6_xyverz.elf [OK] +Creating binary load file for flashing: .build/planck_rev6_xyverz.bin [OK] +Creating load file for flashing: .build/planck_rev6_xyverz.hex [OK] + +Size after: + text data bss dec hex filename + 0 41820 0 41820 a35c .build/planck_rev6_xyverz.hex + +Copying planck_rev6_xyverz.bin to qmk_firmware folder [OK] +dfu-util 0.9 + +Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc. +Copyright 2010-2016 Tormod Volden and Stefan Schmidt +This program is Free Software and has ABSOLUTELY NO WARRANTY +Please report bugs to http://sourceforge.net/p/dfu-util/tickets/ + +Invalid DFU suffix signature +A valid DFU suffix will be required in a future dfu-util release!!! +Opening DFU capable USB device... +ID 0483:df11 +Run-time device DFU version 011a +Claiming USB DFU Interface... +Setting Alternate Setting #0 ... +Determining device status: state = dfuERROR, status = 10 +dfuERROR, clearing status +Determining device status: state = dfuIDLE, status = 0 +dfuIDLE, continuing +DFU mode device DFU version 011a +Device returned transfer size 2048 +DfuSe interface name: "Internal Flash " +Downloading to address = 0x08000000, size = 41824 +Download [=========================] 100% 41824 bytes +Download done. +File downloaded successfully +Transitioning to dfuMANIFEST state +``` + +#### Commandes STM32 + +Il y aun certain nombre de commandes du DFU que vous pouvez utiliser pour flasher un firmware sur un device STM32: + +* `:dfu-util` - C'est l'option standard pour flasher un appareil STM32. +* `:dfu-util-wait` - Ceci fonctionne comme la commande standard, mais permet de d'avoir une pause (configurable( de 10 secondes avant de flasher le fimrware. Vous pouvez utiliser `TIME_DELAY=20` à la ligne de commande pour changer le délai. +* `:dfu-util-left` - Ceci flasher le firmware standard, comme la commande standard (`:dfu-util`). Toutefois, elle flasher aussi les fichiers EEPROM du "côté gauche" pour les claviers scindés. +* `:dfu-util-right` - Ceci flash le firmware standard, comme la commande standard (`:dfu-util`). Toutefois, elle flash aussi les fichiers EEPROM du "côté droit" pour les claviers scindés. + +## Faites l'essai! + +Bravo! Votre firmware customisé a été programmé sur votre clavier! + +Essayez-le et vérifiez qu'il fonctionne comme vous le souhaitez. Nous avons écrit [Tester et débugger](newbs_testing_debugging.md) pour compléter le guide du débutant, alors allez voir là-bas pour apprendre comment dépanner vos fonctionnalités custom. diff --git a/docs/fr-FR/newbs_getting_started.md b/docs/fr-FR/newbs_getting_started.md new file mode 100644 index 000000000000..751fd0563ac4 --- /dev/null +++ b/docs/fr-FR/newbs_getting_started.md @@ -0,0 +1,101 @@ +# Introduction + +Votre clavier d'ordinateur contient un processeur, proche de celui dans votre ordinateur. Ce processeur exécute un logiciel responsable de détecter les touches appuyées et envoie des rapports à propos de l'état du clavier lorsque les touches sont appuyées et relâchées. QMK prend le rôle de ce logiciel, détectant les appuis des boutons et passant cette information à l'ordinateur hôte. Lorsque vous construisez votre keymap customisée, vous créez l'équivalent d'un programme exécutable pour votre clavier. + +QMK essaie de rendre les choses simples faciles, et les choses difficiles possibles. Vous n'avez pas à savoir programmer pour créer des keymaps puissantes - vous devez seulement suivre quelques rêgles de syntaxe simples. + +# Guide de démarrage + +Avant de pouvoir construire des keymaps, vous devez installer quelques logiciels et configurer votre environnement de compilation. Ceci n'a besoin d'être fait seulement une fois, peu importe le nombre de clavier pour lesquels vous compter compiler un firmware. + +Si vous préférez une approche plus proche d'une interface graphique, considérez utiliser l'outil en ligne [QMK Configurator](https://config.qmk.fm). Référez vous à [Construire votre premier firmware en utilisant l'interface graphique en ligne](newbs_building_firmware_configurator.md). + +## Logiciels à télécharger + +### Editeur de texte + +Vous allez avoir besoin d'un programme qui peut éditer et sauvegarder des fichier **plain text**. Si vous êtes sur Windows, vous pouvez utiliser notepad et sur Linux vous pouvez utiliser gedit. Ces deux options sont des éditeurs de texte simples mais fonctionnels. Sur macOS, faites attention avec l'application par défaut TextEdit: elle ne sauvegardera pas les fichiers en mode "plain text" sauf si vous sélectionnez explicitement _Make Plain Text_ à partir du menu _Format_. + +Vous pouvez aussi télécharger et installer un éditeur de texte dédié comme [Sublime Text](https://www.sublimetext.com/) ou [VS Code](https://code.visualstudio.com/). C'est probablement la meilleure solution peu importe la plateforme car ce sont des programmes conçus spécifiquement pour éditer du code. + +?> Pas sûr de quel éditeur de texte utiliser? Laurence Bradford a écrit une [excellente introduction](https://learntocodewith.me/programming/basics/text-editors/) au sujet. + +### QMK Toolbox + +QMK Toolbox est un programme graphique optionnel pour Windows et macOS qui permet à la fois de programmer et débugger votre clavier customisé. Il vous sera probablement très utile pour facilement flasher votre clavier et analyser ses messages de débugage. + +[Télécharger la dernière version ici.](/~https://github.com/qmk/qmk_toolbox/releases/latest) + +* Pour Windows: `qmk_toolbox.exe` (portable) or `qmk_toolbox_install.exe` (installeur) +* Pour macOS: `QMK.Toolbox.app.zip` (portable) or `QMK.Toolbox.pkg` (installeur) + +## Configurez votre environnement + +Nous avons essayé de rendre QMK aussi simple que possible à configurer. Vous avez uniquement à préparer votre environnment Linux ou Unix et laisser QMK installer le reste. + +?> Si vous n'avez jamais travailé avec la lignde commande Linux/Unix, il y a un certain nombre de concepts basiques et de commandes que vous devriez apprendre. Ces ressources vous apprendrons suffisemment pour travailler avec QMK:
+[Commandes Linux à savoir](https://www.guru99.com/must-know-linux-commands.html)
+[Commandes Unix de base](https://www.tjhsst.edu/~dhyatt/superap/unixcmd.html) + +### Windows + +Vous devez installer MSYS2 et Git. + +* Suivez les instructions d'installation sur la [page de MSYS2](http://www.msys2.org). +* Fermez tous les terminaux MSYS2 éventuellement ouverts et ouvrez un nouveau terminal MSYS2 MinGW 64-bit. +* Installez Git en lançant la commande: `pacman -S git`. + +### macOS + +Vous devez installer Homebew. Suivez les instructions sur la [page de Homebrew](https://brew.sh). + +Une fois Homebrew installé, continuez avec _Configurer QMK_. Dans cete étape, nous lancerons un script qui va installer d'autres paquets. + +### Linux + +Vous devez installer Git. Il est très probable que vous l'ayez déjà installé, mais sinon, une des commandes suivantes devrait l'installer: + +* Debian / Ubuntu / Devuan: `apt-get install git` +* Fedora / Red Hat / CentOS: `yum install git` +* Arch: `pacman -S git` + +?> Docker est aussi une option sur toutes les plateformes. [Appuyez ici pour plus de détail.](getting_started_build_tools.md#docker) + +## Configurer QMK + +Une fois votre environnement Linux/Unix configuré, vous êtes prêt à télécharger QMK. Nous allons le faire en utilisant Git pour "cloner" le dépôt de QMK. Ouvrez un terminal ou une fenêtre MSYS2 MinGW et gardez le ouvert pour le reste de ce guide. Dans ce terminal, lancez ces deux commandes: + +```shell +git clone --recurse-submodules /~https://github.com/qmk/qmk_firmware.git +cd qmk_firmware +``` + +?> Si vous savez déjà [comment utiliser GitHub](getting_started_github.md), nous recommandons que vous créez et clonez votre propre fork. Si vous ne savez pas ce que cela veut dire, vous pouvez sans problème ignorer ce message. + +QMK vient avec un script pour vous aider à configurer le reste de ce que vous aurez besoin. Vous devez le lancer en tapant la ligne de commande suivante: + + util/qmk_install.sh + +## Testez votre environnement de compilation + +Maintenant que votre environnement de compilation de QMK est configuré, vous pouvez compiler un firmware pour votre clavier. Démarrez en compilant la keymap par défaut du clavier. Vous devriez pouvoir le faire avec une commande de ce format: + + make :default + +Par exemple, pour compiler un firmware pour une Clueboard 66%, vous utiliserez: + + make clueboard/66/rev3:default + +Une fois ceci fait, vous devriez avoir beaucoup d'information dans votre sortie qui devrait se terminer par quelque chose de similaire à ça: + +``` +Linking: .build/clueboard_66_rev3_default.elf [OK] +Creating load file for flashing: .build/clueboard_66_rev3_default.hex [OK] +Copying clueboard_66_rev3_default.hex to qmk_firmware folder [OK] +Checking file size of clueboard_66_rev3_default.hex [OK] + * The firmware size is fine - 26356/28672 (2316 bytes free) +``` + +# Créer votre Keymap + +Vous êtes maintenant prêt à créer votre propre keymap! Passez à l'étape [Compiler votre premier firmware](newbs_building_firmware.md) pour ce faire. diff --git a/docs/fr-FR/newbs_learn_more_resources.md b/docs/fr-FR/newbs_learn_more_resources.md new file mode 100644 index 000000000000..01b1c9e8ebe0 --- /dev/null +++ b/docs/fr-FR/newbs_learn_more_resources.md @@ -0,0 +1,14 @@ +# Ressources d'apprentissage + +Ces ressources permettent de donner aux nouveaux membres de la communauté QMK plus de compréhension aux informations données dans la documentation Newbs. + +Ressources Git: + +* [Tutoriel général](https://www.codecademy.com/learn/learn-git) +* [Jeu Git pour apprendre avec des exemples](https://learngitbranching.js.org/) +* [Des ressources Git pour en savoir plus à propos de GitHub](getting_started_github.md) +* [Des ressources Git spécifiques à QMK](contributing.md) + +Ressources sur les lignes de commande: + +* [Bon tutoriel général sur la ligne de commande](https://www.codecademy.com/learn/learn-the-command-line) diff --git a/docs/fr-FR/newbs_testing_debugging.md b/docs/fr-FR/newbs_testing_debugging.md new file mode 100644 index 000000000000..4b03ae3ed255 --- /dev/null +++ b/docs/fr-FR/newbs_testing_debugging.md @@ -0,0 +1,101 @@ +# Test et débugage + +Une fois votre clavier configuré avec un firmware custom, vous êtes prêt à le tester. Avec un peu de chance, tout fonctionne parfaitement bien, dans le cas contraire, ce document vous aidera à trouver où se trouve le problème. + +## Tester + +Tester votre clavier est normalement assez simple. Appuyez chaque touche de votre clavier et assurez vous qu'il envoie les touches auquel vous vous attendiez. Il existe même des programmes qui vous aideront à vérifier qu'aucune touche ne soit oubliée. + +Note: ces programmes ne sont ni fournis ni approuvés par QMK. + +* [Switch Hitter](https://elitekeyboards.com/switchhitter.php) (Windows seulement) +* [Keyboard Viewer](https://www.imore.com/how-use-keyboard-viewer-your-mac) (Mac seulement) +* [Keyboard Tester](http://www.keyboardtester.com) (Web) +* [Keyboard Checker](http://keyboardchecker.com) (Web) + +## Débuguer + +Votre clavier va envoyer des informations de débugage si vous avez `CONSOLE_ENABLE = yes` dans votre fichier `rules.mk`. Par défaut, la sortie est très limitée, mais vous pouvez activer le mode debug pour augmenter la quantité de sortie de débugage. Utilisez le keycode `DEBUG` dans votre keymap, utilisez la fonction [Commande](feature_command.md) pour activer le mode debug ou ajoutez le code suivant à votre keymap. + +```c +void keyboard_post_init_user(void) { + // Customise these values to desired behaviour + debug_enable=true; + debug_matrix=true; + //debug_keyboard=true; + //debug_mouse=true; +} +``` + +### Débuguer avec QMK Toolbox + +Pour les plateformes compatibles, [QMK Toolbox](/~https://github.com/qmk/qmk_toolbox) peut être utilisé pour afficher les message de débugage pour votre clavier. + +### Débuguer avec hid_listen + +Vous préférez une solution basée sur le terminal? [hid_listen](https://www.pjrc.com/teensy/hid_listen.html), fourni par PJRC, peut aussi être utilisé pour afficher des messages de débugage. Des versions compilées pour Windows, Linux et MacOS sont disponibles. + + + +## Envoyer vos propres messages de débugage + +Parfois, il est utile d'afficher des messages de débugage depuis votre [code custom](custom_quantum_functions.md). Le faire est assez simple. Commencez par ajouter `print.h` au début de votre fichier: + + #include + +Une fois fait, vous pouvez utiliser les fonctions print suivantes: + +* `print("string")`: Affiche une simple chaîne de caractères. +* `uprintf("%s string", var)`: Affiche une chaîne de caractères formattée. +* `dprint("string")` Affiche une chaîne de caractère simple, mais uniquement lorsque le mode debug est activé. +* `dprintf("%s string", var)`: Affiche une chaîne de caractère formattée, mais uniquement lorsque le mode debug est activé. + +## Exemples de debugage + +Si dessous se trouve une liste d'exemples réels de débugage. Pour plus d'information, référez-vous à [Débuguer/Dépanner QMK](faq_debug.md). + +### A quelle position de la matrice se trouve cette activation de touche? + +Lors du portage ou lorsque vous essayez de diagnostiquer un problème de PCB, il est utile de savoir si une activation de touche est enregistrée correctement. Pour activer le log de ce scénario, ajoutez le code suivant à votre fichier keymaps `keymap.c`. + +```c +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + // If console is enabled, it will print the matrix position and status of each key pressed +#ifdef CONSOLE_ENABLE + uprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed); +#endif + return true; +} +``` + +Exemple de sortie + +```text +Waiting for device:....... +Listening: +KL: kc: 169, col: 0, row: 0, pressed: 1 +KL: kc: 169, col: 0, row: 0, pressed: 0 +KL: kc: 174, col: 1, row: 0, pressed: 1 +KL: kc: 174, col: 1, row: 0, pressed: 0 +KL: kc: 172, col: 2, row: 0, pressed: 1 +KL: kc: 172, col: 2, row: 0, pressed: 0 +``` + +### Combien de temps cela a pris pour une activation de touche? + +Lorsque vous testez des problèmes de performance, il peut être utile de savoir à quelle fréquence la matrice est scannée. Pour activer le log dans ce scénario, ajoutez la ligne suivante à votre fichier `config.h` de votre keymaps. + +```c +#define DEBUG_MATRIX_SCAN_RATE +``` + +Exemple de sortie + +```text + > matrix scan frequency: 315 + > matrix scan frequency: 313 + > matrix scan frequency: 316 + > matrix scan frequency: 316 + > matrix scan frequency: 316 + > matrix scan frequency: 316 +``` From 2707652c9877e5fc7dd67670f8e14962c31baf42 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Wed, 9 Oct 2019 05:06:26 +1100 Subject: [PATCH 069/316] [Docs] CLI command to serve docs locally (#6956) * CLI command to serve docs locally * Document it * Default port * Use `with` and subclass `SimpleHTTPRequestHandler` to set working dir * Apply suggestions from code review Co-Authored-By: skullydazed * Update docs/cli.md --- docs/cli.md | 10 ++++++++++ lib/python/qmk/cli/__init__.py | 1 + lib/python/qmk/cli/docs.py | 22 ++++++++++++++++++++++ 3 files changed, 33 insertions(+) create mode 100644 lib/python/qmk/cli/docs.py diff --git a/docs/cli.md b/docs/cli.md index 6ffe0336539b..d150ee917de5 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -105,6 +105,16 @@ This command lets you configure the behavior of QMK. For the full `qmk config` d qmk config [-ro] [config_token1] [config_token2] [...] [config_tokenN] ``` +## `qmk docs` + +This command starts a local HTTP server which you can use for browsing or improving the docs. Default port is 8936. + +**Usage**: + +``` +qmk docs [-p PORT] +``` + ## `qmk doctor` This command examines your environment and alerts you to potential build or flash problems. diff --git a/lib/python/qmk/cli/__init__.py b/lib/python/qmk/cli/__init__.py index e982a75fc84f..e41cc3dcb2bb 100644 --- a/lib/python/qmk/cli/__init__.py +++ b/lib/python/qmk/cli/__init__.py @@ -5,6 +5,7 @@ from . import cformat from . import compile from . import config +from . import docs from . import doctor from . import hello from . import json diff --git a/lib/python/qmk/cli/docs.py b/lib/python/qmk/cli/docs.py new file mode 100644 index 000000000000..a0888ec38896 --- /dev/null +++ b/lib/python/qmk/cli/docs.py @@ -0,0 +1,22 @@ +"""Serve QMK documentation locally +""" +import http.server + +from milc import cli + + +class DocsHandler(http.server.SimpleHTTPRequestHandler): + def __init__(self, *args, **kwargs): + super().__init__(*args, directory='docs', **kwargs) + + +@cli.argument('-p', '--port', default=8936, type=int, help='Port number to use.') +@cli.subcommand('Run a local webserver for QMK documentation.') +def docs(cli): + """Spin up a local HTTPServer instance for the QMK docs. + """ + with http.server.HTTPServer(('', cli.config.docs.port), DocsHandler) as httpd: + cli.log.info("Serving QMK docs at http://localhost:%d/", cli.config.docs.port) + cli.log.info("Press Control+C to exit.") + + httpd.serve_forever() From 19584b92c559b134401be1efa7a5f199eda12f89 Mon Sep 17 00:00:00 2001 From: dsanchezseco Date: Tue, 8 Oct 2019 20:16:38 +0200 Subject: [PATCH 070/316] [Keymap] keymaps for planck and crkbd (#6895) * using similar keymaps (with vim in mind) for planck and crkbd * changed to rgb matrix and lower max brightness to prevent unresponsiveness * readme and default rgb mode * disable all the not wanted effects and activate the framebuffer ones * changed effects * changed custom keycodes to defines * fixed comment --- .../crkbd/keymaps/dsanchezseco/README.md | 10 ++ keyboards/crkbd/keymaps/dsanchezseco/config.h | 69 +++++++++++ keyboards/crkbd/keymaps/dsanchezseco/keymap.c | 111 ++++++++++++++++++ .../crkbd/keymaps/dsanchezseco/logo_reader.c | 9 ++ keyboards/crkbd/keymaps/dsanchezseco/rules.mk | 15 +++ .../planck/keymaps/dsanchezseco/keymap.c | 83 +++---------- 6 files changed, 232 insertions(+), 65 deletions(-) create mode 100644 keyboards/crkbd/keymaps/dsanchezseco/README.md create mode 100644 keyboards/crkbd/keymaps/dsanchezseco/config.h create mode 100644 keyboards/crkbd/keymaps/dsanchezseco/keymap.c create mode 100644 keyboards/crkbd/keymaps/dsanchezseco/logo_reader.c create mode 100644 keyboards/crkbd/keymaps/dsanchezseco/rules.mk diff --git a/keyboards/crkbd/keymaps/dsanchezseco/README.md b/keyboards/crkbd/keymaps/dsanchezseco/README.md new file mode 100644 index 000000000000..ce161e3c55df --- /dev/null +++ b/keyboards/crkbd/keymaps/dsanchezseco/README.md @@ -0,0 +1,10 @@ +# Dvorak keymap for CRKBD + +To flash the halves use: + +``` +#left side +make crkbd:dsanchezseco:dfu-split-left +#right side, with RGB matrix fix +make crkbd:dsanchezseco:dfu-split-right RGB_MATRIX_SPLIT_RIGHT=yes +``` diff --git a/keyboards/crkbd/keymaps/dsanchezseco/config.h b/keyboards/crkbd/keymaps/dsanchezseco/config.h new file mode 100644 index 000000000000..14efb7d4ec6d --- /dev/null +++ b/keyboards/crkbd/keymaps/dsanchezseco/config.h @@ -0,0 +1,69 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + +//#define USE_MATRIX_I2C +#define USE_SERIAL + +/* Select hand configuration */ + +// #define MASTER_LEFT +// #define MASTER_RIGHT +#define EE_HANDS + +// lower maximum brightness to lower power usage and prevent unresponsiveness +#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 +#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT + +//disable effects +#define DISABLE_RGB_MATRIX_ALPHAS_MODS // Static dual hue speed is hue for secondary hue +#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Static gradient top to bottom speed controls how much gradient changes +#define DISABLE_RGB_MATRIX_BAND_SAT // Single hue band fading saturation scrolling left to right +#define DISABLE_RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right +#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades saturation +#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // Single hue 3 blade spinning pinwheel fades brightness +#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT // Single hue spinning spiral fades saturation +#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL // Single hue spinning spiral fades brightness +#define DISABLE_RGB_MATRIX_CYCLE_ALL // Full keyboard solid hue cycling through full gradient +#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN // Full gradient scrolling top to bottom +#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN // Full gradient scrolling out to in +#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Full dual gradients scrolling out to in +#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradent Chevron shapped scrolling left to right +#define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL // Full gradient spinning pinwheel around center of keyboard +#define DISABLE_RGB_MATRIX_CYCLE_SPIRAL // Full gradient spinning spiral around center of keyboard +#define DISABLE_RGB_MATRIX_DUAL_BEACON // Full gradient spinning around center of keyboard +#define DISABLE_RGB_MATRIX_RAINBOW_BEACON // Full tighter gradient spinning around center of keyboard +#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Full dual gradients spinning two halfs of keyboard +#define DISABLE_RGB_MATRIX_RAINDROPS // Randomly changes a single key's hue +#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE // Pulses keys hit to hue & value then fades value out +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE // Static single hue pulses keys hit to shifted hue then fades to current hue +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse near a single key hit then fades value out +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS // Hue & value pulse the same column and row of a single key hit then fades value out +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out +#define DISABLE_RGB_MATRIX_SPLASH // Full gradient & value pulse away from a single key hit then fades value out +#define DISABLE_RGB_MATRIX_MULTISPLASH // Full gradient & value pulse away from multiple key hits then fades value out +#define DISABLE_RGB_MATRIX_SOLID_SPLASH // Hue & value pulse away from a single key hit then fades value out +#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH // Hue & value pulse away from multiple key hits then fades value out +#define DISABLE_RGB_MATRIX_EFFECT_MAX diff --git a/keyboards/crkbd/keymaps/dsanchezseco/keymap.c b/keyboards/crkbd/keymaps/dsanchezseco/keymap.c new file mode 100644 index 000000000000..a2e799e198b1 --- /dev/null +++ b/keyboards/crkbd/keymaps/dsanchezseco/keymap.c @@ -0,0 +1,111 @@ +#include QMK_KEYBOARD_H +#include "split_util.h" + +extern keymap_config_t keymap_config; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +extern uint8_t is_master; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define ESC_CTL LCTL_T(KC_ESC) + +// 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. +enum crkbd_layers { + _DVORAK, + _LOWER, + _RAISE, + _ADJUST +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_DVORAK] = LAYOUT( \ + //,-----------------------------------------------. ,-----------------------------------------------. + KC_TAB, KC_QUOT,KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH,\ + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + ESC_CTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINUS,\ + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + KC_LSFT,KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z,KC_SFTENT,\ + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + KC_LGUI, LOWER, KC_SPC, KC_BSPC, RAISE,KC_RALT \ + //`-----------------------' `----------------------' + ), + + + [_LOWER] = LAYOUT( \ + //,-----------------------------------------------. ,-----------------------------------------------. + KC_TILD,KC_EXLM, KC_AT, KC_HASH, KC_DLR,KC_PERC, KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RIGHT,KC_RPRN,\ + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + _______,KC_VOLD,KC_VOLU,KC_MPRV,KC_MPLY,KC_MNXT, _______,KC_LEFT,KC_PLUS,KC_LCBR,KC_RCBR,KC_PIPE,\ + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + _______,_______,_______,KC_DOWN, KC_UP, _______, _______,_______,_______,KC_HOME, KC_END,_______,\ + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + _______,_______,_______, KC_DEL,_______,_______ \ + //`-----------------------' `----------------------' + ), + + [_RAISE] = LAYOUT( \ + //,-----------------------------------------------. ,-----------------------------------------------. + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9,KC_RIGHT, KC_0, \ + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + _______,_______,_______,_______,_______,_______, _______,KC_LEFT, KC_EQL,KC_LBRC,KC_RBRC,KC_BSLS,\ + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + _______,_______,_______,KC_DOWN, KC_UP, _______, _______,_______,_______,KC_PGUP,KC_PGDN,_______,\ + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + _______,_______,_______, KC_DEL ,_______,_______ \ + //`-----------------------' `----------------------' + ), + + [_ADJUST] = LAYOUT( \ + //,-----------------------------------------------. ,-----------------------------------------------. + RGB_TOG,RGB_HUI,RGB_SAI,RGB_VAI,_______,RGB_M_T, _______,_______,_______,_______,KC_RIGHT,_______,\ + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + RGB_MOD,RGB_HUD,RGB_SAD,RGB_VAD,_______,_______, _______,KC_LEFT,_______,_______,_______,_______,\ + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + _______,KC_PSCR,_______,KC_DOWN, KC_UP, _______, _______,_______,_______,_______,_______,_______,\ + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + _______,_______,_______, KC_DEL ,_______,_______ \ + //`-----------------------' `----------------------' + ) +}; + +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +#ifdef OLED_DRIVER_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + if (!isLeftHand) + return OLED_ROTATION_180; // flips the display 180 to see it from my side + return rotation; +} + +const char *read_logo(void); +void oled_task_user(void){ + switch (biton32(layer_state)){ + case _DVORAK: + oled_write_ln_P(PSTR("DVRK"), false); + break; + case _LOWER: + oled_write_ln_P(PSTR("LOWER"), false); + break; + case _RAISE: + oled_write_ln_P(PSTR("RAISE"), false); + break; + case _ADJUST: + oled_write_ln_P(PSTR("ADJST"), false); + break; + default: + oled_write_ln_P(PSTR("?????"), false); + } + //now print logo + oled_write(read_logo(), false); +} +#endif diff --git a/keyboards/crkbd/keymaps/dsanchezseco/logo_reader.c b/keyboards/crkbd/keymaps/dsanchezseco/logo_reader.c new file mode 100644 index 000000000000..039a538cc541 --- /dev/null +++ b/keyboards/crkbd/keymaps/dsanchezseco/logo_reader.c @@ -0,0 +1,9 @@ +const char *read_logo(void) { + static char logo[] = { + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, + 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, + 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, + 0}; + + return logo; +} diff --git a/keyboards/crkbd/keymaps/dsanchezseco/rules.mk b/keyboards/crkbd/keymaps/dsanchezseco/rules.mk new file mode 100644 index 000000000000..44f60368b885 --- /dev/null +++ b/keyboards/crkbd/keymaps/dsanchezseco/rules.mk @@ -0,0 +1,15 @@ + +# If you want to change the display of OLED, you need to change here +SRC += ./logo_reader.c + +# enable OLED displays +OLED_DRIVER_ENABLE = yes + +# enable media keys +EXTRAKEY_ENABLE = yes + +# enable LEDs +RGB_MATRIX_ENABLE = WS2812 + +# using elite-c controllers +BOOTLOADER = qmk-dfu diff --git a/keyboards/planck/keymaps/dsanchezseco/keymap.c b/keyboards/planck/keymaps/dsanchezseco/keymap.c index f7764ca84607..adbbe44b8994 100644 --- a/keyboards/planck/keymaps/dsanchezseco/keymap.c +++ b/keyboards/planck/keymaps/dsanchezseco/keymap.c @@ -1,6 +1,10 @@ #include QMK_KEYBOARD_H #include "muse.h" +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define ESC_CTL LCTL_T(KC_ESC) + extern keymap_config_t keymap_config; enum planck_layers { @@ -10,85 +14,34 @@ enum planck_layers { _ADJUST }; -enum planck_keycodes { - DVORAK = SAFE_RANGE, -}; - -#define LOWER MO(_LOWER) -#define RAISE MO(_RAISE) - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Dvorak - * ,-----------------------------------------------------------------------------------. - * | Tab | " | , | . | P | Y | F | G | C | R | L | / | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | O | E | U | I | D | H | T | N | S | - | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | AltGr| Alt | GUI |Lower |Space | Bksp |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ [_DVORAK] = LAYOUT_planck_grid( KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, - KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINUS, + ESC_CTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINUS, KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_SFTENT, - KC_LCTL, KC_RALT, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_BSPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + KC_LCTL, _______, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_BSPC, RAISE, KC_RGUI, KC_RALT, _______, KC_RCTL ), -/* Lower - * ,-----------------------------------------------------------------------------------. - * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | Del | | Play | Vol- | Vol+ | Next | - * `-----------------------------------------------------------------------------------' - */ [_LOWER] = LAYOUT_planck_grid( - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, - KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______, - _______, _______, _______, _______, _______, _______, KC_DEL, _______, KC_MPLY, KC_VOLD, KC_VOLU, KC_MNXT + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RIGHT,KC_RPRN, + _______, KC_VOLD, KC_VOLU, KC_MPRV, KC_MPLY, KC_MNXT, _______, KC_LEFT, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, _______, _______, KC_DOWN, KC_UP, _______, _______, _______, _______, KC_HOME, KC_END, _______, + _______, _______, _______, _______, _______, _______, KC_DEL, _______, _______, _______, _______, _______ ), -/* Raise - * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | Del | | Play | Vol- | Vol+ | Next | - * `-----------------------------------------------------------------------------------' - */ [_RAISE] = LAYOUT_planck_grid( - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, - KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, - _______, _______, _______, _______, _______, _______, KC_DEL, _______, KC_MPLY, KC_VOLD, KC_VOLU, KC_MNXT + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_RIGHT, KC_0, + _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, _______, _______, KC_DOWN, KC_UP, _______, _______, _______, _______, KC_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, KC_DEL, _______, _______, _______, _______, _______ ), -/* Adjust (Lower + Raise) - * ,----------------------------------------------------------------------------------- - * | | Reset| | | | | | | | | | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | | | | | | | | | | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | |PtrScr| |Mus on|Musoff| | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' - */ [_ADJUST] = LAYOUT_planck_grid( - _______, RESET, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, KC_PSCR, _______, MU_ON, MU_OFF, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, KC_RIGHT, _______, + _______, _______, _______, _______, _______, _______, _______, KC_LEFT, _______, _______, _______, _______, + _______, KC_PSCR, _______, KC_DOWN, KC_UP, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) }; From 9fe7b406cb43e334d588e69b14c3fa41ae4c4925 Mon Sep 17 00:00:00 2001 From: Garret G <45295190+TheRoyalSweatshirt@users.noreply.github.com> Date: Tue, 8 Oct 2019 13:24:20 -0500 Subject: [PATCH 071/316] [Keyboard] Move existing boards to Kingly_Keys and add more boards (#6879) * try to fix and orginize to Kingly_Keys subfolder and add various keyboard support * fixed layout nomenclature and rules.mk pref * modified readme for smd_milk * fixed layout name in little_foot.h * Update keyboards/kingly_keys/romac_plus/keymaps/default/keymap.c Co-Authored-By: Drashna Jaelre * Update keyboards/kingly_keys/romac_plus/keymaps/default/keymap.c Co-Authored-By: Drashna Jaelre * Update keyboards/kingly_keys/romac_plus/keymaps/default/keymap.c Co-Authored-By: Drashna Jaelre * remove old stand-alone keyboard folders * Fixed missing comma in littlefoot keymap * remove OLED code in romac_plus.c * Update rules.mk * Update readme.md * Apply suggestions from code review Co-Authored-By: fauxpark * Update rules.mk * Update rules.mk * Update keymap.c * Update keymap.c * Update keymap.c * fix little_foot.h layouts, delete smd_milk readme.md * Fix ALpha Edits * Fix ALpha Edits p.2 * update little_foot.h * fix little_foot.h p.2 * Update keyboards/kingly_keys/little_foot/little_foot.h Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/kingly_keys/little_foot/keymaps/default/keymap.c Co-Authored-By: Drashna Jaelre * Update keyboards/kingly_keys/romac_plus/keymaps/default/keymap.c Co-Authored-By: Drashna Jaelre * Update keyboards/kingly_keys/romac_plus/keymaps/default/keymap.c Co-Authored-By: Drashna Jaelre * Update keyboards/kingly_keys/romac_plus/keymaps/default/keymap.c Co-Authored-By: Drashna Jaelre * Update keyboards/kingly_keys/romac_plus/keymaps/default/keymap.c Co-Authored-By: Drashna Jaelre * Update keyboards/kingly_keys/romac_plus/keymaps/default/keymap.c Co-Authored-By: Drashna Jaelre * Modify config.h for cleaned up PCB. --- keyboards/kingly_keys/little_foot/config.h | 58 ++++++++++++++++ keyboards/kingly_keys/little_foot/info.json | 16 +++++ .../little_foot/keymaps/default/keymap.c | 40 +++++++++++ .../kingly_keys/little_foot/little_foot.c | 1 + .../kingly_keys/little_foot/little_foot.h | 35 ++++++++++ keyboards/kingly_keys/little_foot/readme.md | 17 +++++ keyboards/kingly_keys/little_foot/rules.mk | 25 +++++++ keyboards/{ => kingly_keys}/romac/config.h | 0 keyboards/{ => kingly_keys}/romac/info.json | 0 .../romac/keymaps/default/keymap.c | 4 +- .../romac/keymaps/jarred/keymap.c | 0 .../romac/keymaps/stanrc85/config.h | 0 .../romac/keymaps/stanrc85/keymap.c | 0 .../romac/keymaps/stanrc85/rules.mk | 0 keyboards/{ => kingly_keys}/romac/readme.md | 0 keyboards/{ => kingly_keys}/romac/romac.c | 0 keyboards/{ => kingly_keys}/romac/romac.h | 0 keyboards/kingly_keys/romac/rules.mk | 26 +++++++ keyboards/kingly_keys/romac_plus/config.h | 46 +++++++++++++ keyboards/kingly_keys/romac_plus/info.json | 13 ++++ .../romac_plus/keymaps/default/keymap.c | 65 ++++++++++++++++++ keyboards/kingly_keys/romac_plus/readme.md | 16 +++++ keyboards/kingly_keys/romac_plus/romac_plus.c | 2 + keyboards/kingly_keys/romac_plus/romac_plus.h | 16 +++++ keyboards/kingly_keys/romac_plus/rules.mk | 24 +++++++ keyboards/{ => kingly_keys}/ropro/config.h | 4 +- keyboards/{ => kingly_keys}/ropro/info.json | 0 .../ropro/keymaps/default/keymap.c | 18 ++--- .../ropro/keymaps/default/readme.md | 0 keyboards/{ => kingly_keys}/ropro/readme.md | 0 keyboards/{ => kingly_keys}/ropro/ropro.c | 0 keyboards/{ => kingly_keys}/ropro/ropro.h | 0 keyboards/kingly_keys/ropro/rules.mk | 33 +++++++++ keyboards/kingly_keys/smd_milk/2_milk.c | 16 +++++ keyboards/kingly_keys/smd_milk/2_milk.h | 26 +++++++ keyboards/kingly_keys/smd_milk/config.h | 56 ++++++++++++++++ keyboards/kingly_keys/smd_milk/info.json | 15 +++++ .../smd_milk/keymaps/default/keymap.c | 8 +++ keyboards/kingly_keys/smd_milk/readme.md | 21 ++++++ keyboards/kingly_keys/smd_milk/rules.mk | 26 +++++++ keyboards/kingly_keys/smd_milk/smd_milk.c | 16 +++++ keyboards/kingly_keys/smd_milk/smd_milk.h | 26 +++++++ keyboards/kingly_keys/soap/README.md | 16 +++++ keyboards/kingly_keys/soap/config.h | 54 +++++++++++++++ keyboards/kingly_keys/soap/info.json | 13 ++++ .../kingly_keys/soap/keymaps/default/keymap.c | 62 +++++++++++++++++ keyboards/kingly_keys/soap/rules.mk | 32 +++++++++ keyboards/kingly_keys/soap/soap.c | 1 + keyboards/kingly_keys/soap/soap.h | 32 +++++++++ keyboards/romac/rules.mk | 57 ---------------- keyboards/ropro/rules.mk | 67 ------------------- 51 files changed, 867 insertions(+), 136 deletions(-) create mode 100644 keyboards/kingly_keys/little_foot/config.h create mode 100644 keyboards/kingly_keys/little_foot/info.json create mode 100644 keyboards/kingly_keys/little_foot/keymaps/default/keymap.c create mode 100644 keyboards/kingly_keys/little_foot/little_foot.c create mode 100644 keyboards/kingly_keys/little_foot/little_foot.h create mode 100644 keyboards/kingly_keys/little_foot/readme.md create mode 100644 keyboards/kingly_keys/little_foot/rules.mk rename keyboards/{ => kingly_keys}/romac/config.h (100%) rename keyboards/{ => kingly_keys}/romac/info.json (100%) rename keyboards/{ => kingly_keys}/romac/keymaps/default/keymap.c (94%) rename keyboards/{ => kingly_keys}/romac/keymaps/jarred/keymap.c (100%) rename keyboards/{ => kingly_keys}/romac/keymaps/stanrc85/config.h (100%) rename keyboards/{ => kingly_keys}/romac/keymaps/stanrc85/keymap.c (100%) rename keyboards/{ => kingly_keys}/romac/keymaps/stanrc85/rules.mk (100%) rename keyboards/{ => kingly_keys}/romac/readme.md (100%) rename keyboards/{ => kingly_keys}/romac/romac.c (100%) rename keyboards/{ => kingly_keys}/romac/romac.h (100%) create mode 100644 keyboards/kingly_keys/romac/rules.mk create mode 100644 keyboards/kingly_keys/romac_plus/config.h create mode 100644 keyboards/kingly_keys/romac_plus/info.json create mode 100644 keyboards/kingly_keys/romac_plus/keymaps/default/keymap.c create mode 100644 keyboards/kingly_keys/romac_plus/readme.md create mode 100644 keyboards/kingly_keys/romac_plus/romac_plus.c create mode 100644 keyboards/kingly_keys/romac_plus/romac_plus.h create mode 100644 keyboards/kingly_keys/romac_plus/rules.mk rename keyboards/{ => kingly_keys}/ropro/config.h (98%) rename keyboards/{ => kingly_keys}/ropro/info.json (100%) rename keyboards/{ => kingly_keys}/ropro/keymaps/default/keymap.c (87%) rename keyboards/{ => kingly_keys}/ropro/keymaps/default/readme.md (100%) rename keyboards/{ => kingly_keys}/ropro/readme.md (100%) rename keyboards/{ => kingly_keys}/ropro/ropro.c (100%) rename keyboards/{ => kingly_keys}/ropro/ropro.h (100%) create mode 100644 keyboards/kingly_keys/ropro/rules.mk create mode 100644 keyboards/kingly_keys/smd_milk/2_milk.c create mode 100644 keyboards/kingly_keys/smd_milk/2_milk.h create mode 100644 keyboards/kingly_keys/smd_milk/config.h create mode 100644 keyboards/kingly_keys/smd_milk/info.json create mode 100644 keyboards/kingly_keys/smd_milk/keymaps/default/keymap.c create mode 100644 keyboards/kingly_keys/smd_milk/readme.md create mode 100644 keyboards/kingly_keys/smd_milk/rules.mk create mode 100644 keyboards/kingly_keys/smd_milk/smd_milk.c create mode 100644 keyboards/kingly_keys/smd_milk/smd_milk.h create mode 100644 keyboards/kingly_keys/soap/README.md create mode 100644 keyboards/kingly_keys/soap/config.h create mode 100644 keyboards/kingly_keys/soap/info.json create mode 100644 keyboards/kingly_keys/soap/keymaps/default/keymap.c create mode 100644 keyboards/kingly_keys/soap/rules.mk create mode 100644 keyboards/kingly_keys/soap/soap.c create mode 100644 keyboards/kingly_keys/soap/soap.h delete mode 100644 keyboards/romac/rules.mk delete mode 100644 keyboards/ropro/rules.mk diff --git a/keyboards/kingly_keys/little_foot/config.h b/keyboards/kingly_keys/little_foot/config.h new file mode 100644 index 000000000000..e0bd0daf99c6 --- /dev/null +++ b/keyboards/kingly_keys/little_foot/config.h @@ -0,0 +1,58 @@ +/* Copyright 2019 Garret G. (TheRoyalSweatshirt) + * + * 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 .#pragma once + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Kingly-Keys +#define PRODUCT The Little Foot +#define DESCRIPTION A Mighty Small, 45-Percent, Ortholinear Keyboard. + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 10 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { F6, B6, B2, B3, B1 } +#define MATRIX_COL_PINS { F5, F7, B5, B4, E6, D7, C6, D4, D0, D1 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 +#define FORCE_NKRO + +/* 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 + +/* ws2812 RGB LED */ +#define RGB_DI_PIN F4 +#define RGBLED_NUM 10 // Number of LEDs + +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_HUE_STEP 6 +#define RGBLIGHT_SAT_STEP 4 +#define RGBLIGHT_VAL_STEP 8 diff --git a/keyboards/kingly_keys/little_foot/info.json b/keyboards/kingly_keys/little_foot/info.json new file mode 100644 index 000000000000..6a8d50894068 --- /dev/null +++ b/keyboards/kingly_keys/little_foot/info.json @@ -0,0 +1,16 @@ +{ + "keyboard_name": "Little Foot", + "url": "", + "maintainer": "TheRoyalSweatshirt", + "width": 10, + "height": 5, + "layouts": { + "LAYOUT_split_space_base": { + "key_count": 44, + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":6, "y":3}, {"x":7, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":1.5, "y":4, "w":1.5}, {"x":3, "y":4, "w":2}, {"x":5, "y":4, "w":2}, {"x":7, "y":4, "w":1.5}] + }, + "LAYOUT_big_space_base": { + "key_count": 41, + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":6, "y":3}, {"x":7, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":1.5, "y":4, "w":7}] + } +} diff --git a/keyboards/kingly_keys/little_foot/keymaps/default/keymap.c b/keyboards/kingly_keys/little_foot/keymaps/default/keymap.c new file mode 100644 index 000000000000..e85e0d6c4751 --- /dev/null +++ b/keyboards/kingly_keys/little_foot/keymaps/default/keymap.c @@ -0,0 +1,40 @@ + +#include QMK_KEYBOARD_H + +// Layer names +enum{ + // - Base layer: + _BASE, + // - Symbols, numbers, and functions: + _FN, + // - Alternate Function layer: + _LN +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = LAYOUT_split_space_base( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_ENT, + MO(_FN), KC_LSHIFT, KC_SPACE, RGB_MOD + ), + + [_FN] = LAYOUT_split_space_base( + LT(_LN, KC_ESC), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_BSPC, + KC_TAB, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, LSFT(KC_MINS), KC_BSLS, + KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_QUOT, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_LALT, KC_TRNS, KC_LCTRL + ), + + [_LN] = LAYOUT_split_space_base( + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_TRNS, KC_TRNS, KC_TRNS, KC_7, KC_8, KC_9, + KC_TRNS, KC_F4, KC_F5, KC_F6, KC_TRNS, KC_TRNS, KC_TRNS, KC_4, KC_5, KC_6, + KC_TRNS, KC_F7, KC_F8, KC_F9, KC_TRNS, KC_TRNS, KC_TRNS, KC_1, KC_2, KC_3, + KC_TRNS, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/kingly_keys/little_foot/little_foot.c b/keyboards/kingly_keys/little_foot/little_foot.c new file mode 100644 index 000000000000..5513b113a06c --- /dev/null +++ b/keyboards/kingly_keys/little_foot/little_foot.c @@ -0,0 +1 @@ +#include "little_foot.h" diff --git a/keyboards/kingly_keys/little_foot/little_foot.h b/keyboards/kingly_keys/little_foot/little_foot.h new file mode 100644 index 000000000000..860eaeb8f0f0 --- /dev/null +++ b/keyboards/kingly_keys/little_foot/little_foot.h @@ -0,0 +1,35 @@ +#pragma once + +#include "quantum.h" + +#define XXX KC_NO + +#define LAYOUT_split_space_base( \ + k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, \ + k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, \ + k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, \ + k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, \ + k42, k46, k47, k49 \ +) \ +{ \ + { k01, k02, k03, k04, k05, k06, k07, k08, k09, k010 }, \ + { k11, k12, k13, k14, k15, k16, k17, k18, k19, k110 }, \ + { k21, k22, k23, k24, k25, k26, k27, k28, k29, k210 }, \ + { k31, k32, k33, k34, k35, k36, k37, k38, k39, k310 }, \ + { XXX, k42, XXX, XXX, XXX, k46, k47, XXX, k49, XXX } \ +} + +#define LAYOUT_big_space_base( \ + k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, \ + k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, \ + k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, \ + k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, \ + k46 \ +) \ +{ \ + { k01, k02, k03, k04, k05, k06, k07, k08, k09, k010 }, \ + { k11, k12, k13, k14, k15, k16, k17, k18, k19, k110 }, \ + { k21, k22, k23, k24, k25, k26, k27, k28, k29, k210 }, \ + { k31, k32, k33, k34, k35, k36, k37, k38, k39, k310 }, \ + { XXX, k42, XXX, XXX, XXX, k46, XXX, XXX, k49, XXX } \ +} diff --git a/keyboards/kingly_keys/little_foot/readme.md b/keyboards/kingly_keys/little_foot/readme.md new file mode 100644 index 000000000000..1052952cdabc --- /dev/null +++ b/keyboards/kingly_keys/little_foot/readme.md @@ -0,0 +1,17 @@ +# Little Foot + +![Little_Foot](https://i.imgur.com/M0Usdtg.jpg) +=== + +A mighty small keyboard. + +Keyboard Maintainer: Garret G. - a.k.a. [The_Royal](https://www.reddit.com/user/The_Royal/) on Reddit, and [TheRoyalSweatshirt](/~https://github.com/TheRoyalSweatshirt) on GitHub +Hardware Supported: Little_Foot Rev1.2 & Rev1.4, Pro-Micro, and Elite-C +Hardware Availability: Through GB or Direct Message + +Make example for this keyboard (after setting up your build environment): + + make kingly_keys/little_foot:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + diff --git a/keyboards/kingly_keys/little_foot/rules.mk b/keyboards/kingly_keys/little_foot/rules.mk new file mode 100644 index 000000000000..0c3011db9da9 --- /dev/null +++ b/keyboards/kingly_keys/little_foot/rules.mk @@ -0,0 +1,25 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = caterina + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = lite # 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 = no # Enable keyboard backlight functionality +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = yes diff --git a/keyboards/romac/config.h b/keyboards/kingly_keys/romac/config.h similarity index 100% rename from keyboards/romac/config.h rename to keyboards/kingly_keys/romac/config.h diff --git a/keyboards/romac/info.json b/keyboards/kingly_keys/romac/info.json similarity index 100% rename from keyboards/romac/info.json rename to keyboards/kingly_keys/romac/info.json diff --git a/keyboards/romac/keymaps/default/keymap.c b/keyboards/kingly_keys/romac/keymaps/default/keymap.c similarity index 94% rename from keyboards/romac/keymaps/default/keymap.c rename to keyboards/kingly_keys/romac/keymaps/default/keymap.c index 35636f36b3f7..44263453d01d 100644 --- a/keyboards/romac/keymaps/default/keymap.c +++ b/keyboards/kingly_keys/romac/keymaps/default/keymap.c @@ -25,13 +25,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_7, KC_8, KC_9, \ KC_4, KC_5, KC_6, \ KC_1, KC_2, KC_3, \ - MO(_FN1), KC_0, KC_ENT \ + MO(1), KC_0, KC_DOT \ ), [_FN1] = LAYOUT( KC_TRNS, KC_HOME, KC_PGUP, \ KC_TRNS, KC_END, KC_PGDN, \ KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_DOT \ + KC_TRNS, KC_TRNS, KC_ENT \ ) }; diff --git a/keyboards/romac/keymaps/jarred/keymap.c b/keyboards/kingly_keys/romac/keymaps/jarred/keymap.c similarity index 100% rename from keyboards/romac/keymaps/jarred/keymap.c rename to keyboards/kingly_keys/romac/keymaps/jarred/keymap.c diff --git a/keyboards/romac/keymaps/stanrc85/config.h b/keyboards/kingly_keys/romac/keymaps/stanrc85/config.h similarity index 100% rename from keyboards/romac/keymaps/stanrc85/config.h rename to keyboards/kingly_keys/romac/keymaps/stanrc85/config.h diff --git a/keyboards/romac/keymaps/stanrc85/keymap.c b/keyboards/kingly_keys/romac/keymaps/stanrc85/keymap.c similarity index 100% rename from keyboards/romac/keymaps/stanrc85/keymap.c rename to keyboards/kingly_keys/romac/keymaps/stanrc85/keymap.c diff --git a/keyboards/romac/keymaps/stanrc85/rules.mk b/keyboards/kingly_keys/romac/keymaps/stanrc85/rules.mk similarity index 100% rename from keyboards/romac/keymaps/stanrc85/rules.mk rename to keyboards/kingly_keys/romac/keymaps/stanrc85/rules.mk diff --git a/keyboards/romac/readme.md b/keyboards/kingly_keys/romac/readme.md similarity index 100% rename from keyboards/romac/readme.md rename to keyboards/kingly_keys/romac/readme.md diff --git a/keyboards/romac/romac.c b/keyboards/kingly_keys/romac/romac.c similarity index 100% rename from keyboards/romac/romac.c rename to keyboards/kingly_keys/romac/romac.c diff --git a/keyboards/romac/romac.h b/keyboards/kingly_keys/romac/romac.h similarity index 100% rename from keyboards/romac/romac.h rename to keyboards/kingly_keys/romac/romac.h diff --git a/keyboards/kingly_keys/romac/rules.mk b/keyboards/kingly_keys/romac/rules.mk new file mode 100644 index 000000000000..1dd9bd658b0c --- /dev/null +++ b/keyboards/kingly_keys/romac/rules.mk @@ -0,0 +1,26 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = caterina + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = full # 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 = no # Enable keyboard backlight functionality +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = no + diff --git a/keyboards/kingly_keys/romac_plus/config.h b/keyboards/kingly_keys/romac_plus/config.h new file mode 100644 index 000000000000..503a463f5119 --- /dev/null +++ b/keyboards/kingly_keys/romac_plus/config.h @@ -0,0 +1,46 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER TheRoyalSweatshirt +#define PRODUCT RoMac+ +#define DESCRIPTION A *Plaid inspired twelve-key macropad with upgraded features +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 3 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { C6, D4, D2, D3 } +#define MATRIX_COL_PINS { F6, F5, F4 } +#define UNUSED_PINS + +#define ENCODERS_PAD_A { B3 } +#define ENCODERS_PAD_B { B2 } + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ +#define BACKLIGHT_LEVELS 0 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 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 + +/* ws2812 RGB LED */ +#define RGB_DI_PIN F7 +#define RGBLED_NUM 4 // Number of LEDs + +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_HUE_STEP 6 +#define RGBLIGHT_SAT_STEP 4 +#define RGBLIGHT_VAL_STEP 8 diff --git a/keyboards/kingly_keys/romac_plus/info.json b/keyboards/kingly_keys/romac_plus/info.json new file mode 100644 index 000000000000..5c73db5b27bf --- /dev/null +++ b/keyboards/kingly_keys/romac_plus/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "RoMac+", + "url": "", + "maintainer": "TheRoyalSweatshirt", + "width": 3, + "height": 4, + "layouts": { + "LAYOUT": { + "key_count": 12, + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}] + } + } +} diff --git a/keyboards/kingly_keys/romac_plus/keymaps/default/keymap.c b/keyboards/kingly_keys/romac_plus/keymaps/default/keymap.c new file mode 100644 index 000000000000..556af1d1e04b --- /dev/null +++ b/keyboards/kingly_keys/romac_plus/keymaps/default/keymap.c @@ -0,0 +1,65 @@ +/* Copyright 2018 Jack Humbert + * + * 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 . + */ + +#include QMK_KEYBOARD_H + +#define BASE 0 +#define FN 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [BASE] = LAYOUT( + KC_7, KC_8, KC_9, + KC_4, KC_5, KC_6, + KC_1, KC_2, KC_3, + MO(1), KC_0, KC_DOT + ), + + [FN] = LAYOUT( + KC_TRNS, KC_HOME, KC_PGUP, + KC_TRNS, KC_END, KC_PGDN, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_ENT + ) +}; + +#ifdef OLED_DRIVER_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_270; // flips the display 180 degrees if offhand +} + +void oled_task_user(void) { + // Host Keyboard Layer Status + oled_write_P(PSTR("Let's\nbuild\nsome-\nthing\nto-\nget-\nher!"), false); + switch (get_highest_layer(layer_state)) { + case BASE: + oled_write_ln_P(PSTR(""), false); + break; + case FN: + oled_write_ln_P(PSTR("FN"), false); + break; + default: + // Or use the write_ln shortcut over adding '\n' to the end of your string + oled_write_ln_P(PSTR("Undef"), false); + } + + // Host Keyboard LED Status + uint8_t led_usb_state = host_keyboard_leds(); + oled_write_P(IS_LED_ON(led_usb_state, USB_LED_NUM_LOCK) ? PSTR("NLCK ") : PSTR(" "), false); + oled_write_P(IS_LED_ON(led_usb_state, USB_LED_CAPS_LOCK) ? PSTR("CAPS ") : PSTR(" "), false); + oled_write_P(IS_LED_ON(led_usb_state, USB_LED_SCROLL_LOCK) ? PSTR("SCRLK") : PSTR(" "), false); +} +#endif diff --git a/keyboards/kingly_keys/romac_plus/readme.md b/keyboards/kingly_keys/romac_plus/readme.md new file mode 100644 index 000000000000..4411701ca928 --- /dev/null +++ b/keyboards/kingly_keys/romac_plus/readme.md @@ -0,0 +1,16 @@ + +# RoMac+ + +![RoMac+](https://i.imgur.com/YJ2nCrS.png) + +An Upgraded “Plaid” Inspired 12-Key (3x4) Macropad With Fancy Features. + +- Keyboard Maintainer: [Garret G.](/~https://github.com/TheRoyalSweatshirt) +- Hardware Supported: RoMac+ Rev3.0, Pro Micro, Elite-C, Proton C, BlueMicro. +- Hardware Availability: Through Online Store [Kingly-Keys](https://kingly-keys.xyz/) (Stock Varies). + +Make example for this keyboard (after setting up your build environment): + + make romac_plus:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/kingly_keys/romac_plus/romac_plus.c b/keyboards/kingly_keys/romac_plus/romac_plus.c new file mode 100644 index 000000000000..1e95f36c785f --- /dev/null +++ b/keyboards/kingly_keys/romac_plus/romac_plus.c @@ -0,0 +1,2 @@ +#include "romac_plus.h" + \ No newline at end of file diff --git a/keyboards/kingly_keys/romac_plus/romac_plus.h b/keyboards/kingly_keys/romac_plus/romac_plus.h new file mode 100644 index 000000000000..e6fb9694d2e8 --- /dev/null +++ b/keyboards/kingly_keys/romac_plus/romac_plus.h @@ -0,0 +1,16 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K00, K01, K02, \ + K10, K11, K12, \ + K20, K21, K22, \ + K30, K31, K32 \ +) \ +{ \ + { K00, K01, K02 }, \ + { K10, K11, K12 }, \ + { K20, K21, K22 }, \ + { K30, K31, K32 } \ +} diff --git a/keyboards/kingly_keys/romac_plus/rules.mk b/keyboards/kingly_keys/romac_plus/rules.mk new file mode 100644 index 000000000000..d0aab2dd186a --- /dev/null +++ b/keyboards/kingly_keys/romac_plus/rules.mk @@ -0,0 +1,24 @@ +MCU = atmega32u4 + +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +ENCODER_ENABLE = yes # Enable support for EC11 Rotary Encoder +OLED_DRIVER_ENABLE = yes # Enable Support for SSD1306 or SH1106 OLED Displays; Communicating over I2C diff --git a/keyboards/ropro/config.h b/keyboards/kingly_keys/ropro/config.h similarity index 98% rename from keyboards/ropro/config.h rename to keyboards/kingly_keys/ropro/config.h index 5079217f9c6c..3784ebc62517 100644 --- a/keyboards/ropro/config.h +++ b/keyboards/kingly_keys/ropro/config.h @@ -53,6 +53,8 @@ /* ws2812 RGB LED --- DIN Pin Routed to VIA on main PCB marked "RGB" */ #define RGB_DI_PIN D3 +#define RGBLED_NUM 18 + #define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 16 + diff --git a/keyboards/ropro/info.json b/keyboards/kingly_keys/ropro/info.json similarity index 100% rename from keyboards/ropro/info.json rename to keyboards/kingly_keys/ropro/info.json diff --git a/keyboards/ropro/keymaps/default/keymap.c b/keyboards/kingly_keys/ropro/keymaps/default/keymap.c similarity index 87% rename from keyboards/ropro/keymaps/default/keymap.c rename to keyboards/kingly_keys/ropro/keymaps/default/keymap.c index 6e6da8f9a5aa..1bbe1c262301 100644 --- a/keyboards/ropro/keymaps/default/keymap.c +++ b/keyboards/kingly_keys/ropro/keymaps/default/keymap.c @@ -30,9 +30,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | * |------+------+------+------+------+-------------+------+------+------+------+------| * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | - * |+------+------+------+------+-----+------+------+------+------+------+------+------|--------------. - * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | Rotary Click | - * ,------+------+------+------+------+------+------+------+------+------+------+------+------|--------------' + * |+------+------+------+------+-----+------+------+------+------+------+------+------| + * RotEn | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * ,------+------+------+------+------+------+------+------+------+------+------+------+------| * | PgUp | Ctrl | A | S | D | F | G | H | J | K | L | ; | " | * |------+------+------+------+------+------+-------------+------+------+------+------+------| * | Lower| Shift| Z | X | C | V | B | N | M | , | . | / |Enter | @@ -43,9 +43,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BASE] = LAYOUT( 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_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, -KC_CAPS, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_NO, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_PGUP, KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, - LOWER, KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + KC_HOME, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, KC_PGDN, KC_DEL, KC_RCTRL, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, KC_END, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), @@ -54,9 +54,9 @@ KC_CAPS, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, * |TOGRGB| | | |Sat(-)|Hue(-)|Hue(+)|Sat(+)| | |Brght-|Brght+| * |------+------+------+------+------+-------------+------+------+------+------+------| * | ` | | | | | | | | | | | = | - * |+------+------+------+------+-----+------+------+------+------+------+------+------|--------------. - * | | | Up | | | | | | | [ | ] | \ | NumLock | - * ,------+------+------+------+------+------+------+------+------+------+------+------+------|--------------' + * |+------+------+------+------+-----+------+------+------+------+------+------+------| + * RotEn | | | Up | | | | | | | [ | ] | \ | + * ,------+------+------+------+------+------+------+------+------+------+------+------+------| * | Home | | Left | Down |Right | | | | | | | | | * |------+------+------+------+------+------+-------------+------+------+------+------+------| * | | | | | | | | | | | | | | @@ -67,7 +67,7 @@ KC_CAPS, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, [_LOWER] = LAYOUT( RGB_TOG, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SAD, RGB_HUD, RGB_HUI, RGB_SAI, KC_TRNS, KC_TRNS, RGB_VAD, RGB_VAI, KC_GRAVE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_EQUAL, -KC_NLCK, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_BSLS, + KC_NLCK, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_BSLS, KC_HOME, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR diff --git a/keyboards/ropro/keymaps/default/readme.md b/keyboards/kingly_keys/ropro/keymaps/default/readme.md similarity index 100% rename from keyboards/ropro/keymaps/default/readme.md rename to keyboards/kingly_keys/ropro/keymaps/default/readme.md diff --git a/keyboards/ropro/readme.md b/keyboards/kingly_keys/ropro/readme.md similarity index 100% rename from keyboards/ropro/readme.md rename to keyboards/kingly_keys/ropro/readme.md diff --git a/keyboards/ropro/ropro.c b/keyboards/kingly_keys/ropro/ropro.c similarity index 100% rename from keyboards/ropro/ropro.c rename to keyboards/kingly_keys/ropro/ropro.c diff --git a/keyboards/ropro/ropro.h b/keyboards/kingly_keys/ropro/ropro.h similarity index 100% rename from keyboards/ropro/ropro.h rename to keyboards/kingly_keys/ropro/ropro.h diff --git a/keyboards/kingly_keys/ropro/rules.mk b/keyboards/kingly_keys/ropro/rules.mk new file mode 100644 index 000000000000..0819dbafadb7 --- /dev/null +++ b/keyboards/kingly_keys/ropro/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = atmega32u4 + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + + +# Build Options +# change yes to no to disable +# +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 +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI controls +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +ENCODER_ENABLE = yes +RGBLIGHT_ENABLE = yes +LAYOUTS_HAS_RGB = yes diff --git a/keyboards/kingly_keys/smd_milk/2_milk.c b/keyboards/kingly_keys/smd_milk/2_milk.c new file mode 100644 index 000000000000..95fa50e02979 --- /dev/null +++ b/keyboards/kingly_keys/smd_milk/2_milk.c @@ -0,0 +1,16 @@ +/* Copyright 2019 Sebastian Williams + * + * 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 . + */ +#include "smd_milk.h" diff --git a/keyboards/kingly_keys/smd_milk/2_milk.h b/keyboards/kingly_keys/smd_milk/2_milk.h new file mode 100644 index 000000000000..8f294817f912 --- /dev/null +++ b/keyboards/kingly_keys/smd_milk/2_milk.h @@ -0,0 +1,26 @@ +/* Copyright 2019 Sebastian Williams + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K00, \ + K01 \ +) { \ + { K00 }, \ + { K01 } \ +} diff --git a/keyboards/kingly_keys/smd_milk/config.h b/keyboards/kingly_keys/smd_milk/config.h new file mode 100644 index 000000000000..6e16d373d16d --- /dev/null +++ b/keyboards/kingly_keys/smd_milk/config.h @@ -0,0 +1,56 @@ +/* Copyright 2019 Sebastian Williams + * + * 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 . + */ +#pragma once +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0xB195 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Kingly-Keys +#define PRODUCT SMD-2% Milk +#define DESCRIPTION The SMD Ed. of the Milk themed 2% Keyboard by rionlion100 + +/* key matrix size */ +#define MATRIX_ROWS 2 +#define MATRIX_COLS 1 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { C5, D2 } +#define MATRIX_COL_PINS { D3 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION ROW2COL + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 +#define FORCE_NKRO + +/* 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 + +/* ws2812 RGB LED */ +#define RGB_DI_PIN B3 +#define RGBLED_NUM 4 // Number of LEDs + +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_HUE_STEP 6 +#define RGBLIGHT_SAT_STEP 4 +#define RGBLIGHT_VAL_STEP 10 \ No newline at end of file diff --git a/keyboards/kingly_keys/smd_milk/info.json b/keyboards/kingly_keys/smd_milk/info.json new file mode 100644 index 000000000000..8d9dbab9901d --- /dev/null +++ b/keyboards/kingly_keys/smd_milk/info.json @@ -0,0 +1,15 @@ +{ + "keyboard_name": "smd_milk", + "keyboard_folder": "kinlgy_keys/smd_milk", + "url": "", + "maintainer": "TheRoyalSweatshirt", + "width": 1, + "height": 2, + "layouts": { + "LAYOUT": { + "key_count": 2, + "layout": [ {"x": 0, "y": 0 }, {"x": 0, "y": 1 }] + } + } +} + diff --git a/keyboards/kingly_keys/smd_milk/keymaps/default/keymap.c b/keyboards/kingly_keys/smd_milk/keymaps/default/keymap.c new file mode 100644 index 000000000000..22fb9cad689b --- /dev/null +++ b/keyboards/kingly_keys/smd_milk/keymaps/default/keymap.c @@ -0,0 +1,8 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_HOME, + KC_END + ) +}; diff --git a/keyboards/kingly_keys/smd_milk/readme.md b/keyboards/kingly_keys/smd_milk/readme.md new file mode 100644 index 000000000000..98823d54ab6b --- /dev/null +++ b/keyboards/kingly_keys/smd_milk/readme.md @@ -0,0 +1,21 @@ +# 2% Milk + +![SMD_MILK](https://i.imgur.com/oAeKSGF.jpg) + +An SMD Version of the 2% Meme board themed around a milk carton and love + +Keyboard Maintainer: [Garret G.](/~https://github.com/TheRoyalSweatshirt) a.k.a. [/u/The_Royal](https://www.reddit.com/user/The_Royal) +Hardware Availability: Through GB + +Make example for this keyboard (after setting up your build environment): + + make kingly_keys/smd_milk:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +### Credits ++ Original Concept by rionlion100 ++ Case design by Soft ++ Original 2% Milk PCB by PyroL ++ new SMD PCB by The_Royal ++ Name by jetpacktuxedo diff --git a/keyboards/kingly_keys/smd_milk/rules.mk b/keyboards/kingly_keys/smd_milk/rules.mk new file mode 100644 index 000000000000..815f4866cf18 --- /dev/null +++ b/keyboards/kingly_keys/smd_milk/rules.mk @@ -0,0 +1,26 @@ +# MCU name +MCU = atmega32u2 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # 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 = no # Custom backlighting code is used, so this should not be enabled +AUDIO_ENABLE = no # This can be enabled if a speaker is connected to the expansion port. Not compatible with RGBLIGHT below +RGBLIGHT_ENABLE = yes # This can be enabled if a ws2812 strip is connected to the expansion port. diff --git a/keyboards/kingly_keys/smd_milk/smd_milk.c b/keyboards/kingly_keys/smd_milk/smd_milk.c new file mode 100644 index 000000000000..95fa50e02979 --- /dev/null +++ b/keyboards/kingly_keys/smd_milk/smd_milk.c @@ -0,0 +1,16 @@ +/* Copyright 2019 Sebastian Williams + * + * 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 . + */ +#include "smd_milk.h" diff --git a/keyboards/kingly_keys/smd_milk/smd_milk.h b/keyboards/kingly_keys/smd_milk/smd_milk.h new file mode 100644 index 000000000000..8f294817f912 --- /dev/null +++ b/keyboards/kingly_keys/smd_milk/smd_milk.h @@ -0,0 +1,26 @@ +/* Copyright 2019 Sebastian Williams + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K00, \ + K01 \ +) { \ + { K00 }, \ + { K01 } \ +} diff --git a/keyboards/kingly_keys/soap/README.md b/keyboards/kingly_keys/soap/README.md new file mode 100644 index 000000000000..0e32244d2f43 --- /dev/null +++ b/keyboards/kingly_keys/soap/README.md @@ -0,0 +1,16 @@ +SOAP +=== + +![SOAP](https://i.imgur.com/6h6O4QP.png) + +A Sanitary, "SOAP" Themed, Macro Pad by [Garret G.](/~https://github.com/TheRoyalSweatshirt) a.k.a. [/u/The_Royal](https://www.reddit.com/user/The_Royal) + +Keyboard Maintainer: [Garret G.](/~https://github.com/TheRoyalSweatshirt) a.k.a. [/u/The_Royal](https://www.reddit.com/user/The_Royal/) of Reddit. +Hardware Supported: SOAP rev1.0, rev2.0 PCB +Hardware Availability: [Kingly-Keys.xyz](https://kingly-keys.xyz/) - (Through GB) + +Make example for this keyboard (after setting up your build environment): + + make kingly_keys/soap:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs) diff --git a/keyboards/kingly_keys/soap/config.h b/keyboards/kingly_keys/soap/config.h new file mode 100644 index 000000000000..2ffbaacc70f9 --- /dev/null +++ b/keyboards/kingly_keys/soap/config.h @@ -0,0 +1,54 @@ +/* Copyright 2019 Garret G. (TheRoyalSweatshirt) + * + * 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 .#pragma once + */ + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0003 +#define DEVICE_VER 0x0004 +#define MANUFACTURER Kingly-Keys +#define PRODUCT SOAP +#define DESCRIPTION A Sanitary "Soap" Themed Macropad with Rotary Encoder + + /* key matrix size */ +#define MATRIX_ROWS 2 +#define MATRIX_COLS 4 + +#define ENCODERS_PAD_A { D6 } +#define ENCODERS_PAD_B { D7 } + + /* key matrix pins */ +#define MATRIX_ROW_PINS { C7, C6 } +#define MATRIX_COL_PINS { F4, F1, F0, D5 } +#define UNUSED_PINS + + /* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + + /* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 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 + +/* ws2812 RGB LED --- DIN Pin Routed to VIA on main PCB marked "RGB" */ +#define RGB_DI_PIN B6 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 3 diff --git a/keyboards/kingly_keys/soap/info.json b/keyboards/kingly_keys/soap/info.json new file mode 100644 index 000000000000..257391eea21b --- /dev/null +++ b/keyboards/kingly_keys/soap/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "soap", + "url": "/~https://github.com/TheRoyalSweatshirt/SOAP", + "maintainer": "[TheRoyalSweatshirt](/~https://github.com/TheRoyalSweatshirt)", + "width": 4, + "height": 2, + "layouts": { + "LAYOUT": { + "key_count": 8, + "layout": [{"label":"K00", "x":0, "y":0}, {"label":"K01", "x":1, "y":0}, {"label":"K02", "x":2, "y":0}, {"label":"K03", "x":4, "y":0}, {"label":"K10", "x":0, "y":1}, {"label":"K11", "x":1, "y":1}, {"label":"K12", "x":2, "y":1}, {"label":"K13", "x":4, "y":1}] + } + } +} diff --git a/keyboards/kingly_keys/soap/keymaps/default/keymap.c b/keyboards/kingly_keys/soap/keymaps/default/keymap.c new file mode 100644 index 000000000000..03966e42be7a --- /dev/null +++ b/keyboards/kingly_keys/soap/keymaps/default/keymap.c @@ -0,0 +1,62 @@ +/* Copyright 2019 Garret G. (TheRoyalSweatshirt) + * + * 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 . + */ + +#include QMK_KEYBOARD_H + +#define BASE 0 +#define FN 1 +#define RGB RGB_MOD +#define XXX KC_NO +#define KC_TR KC_TRANSPARENT +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* BASE + * ,----------------------------------------. + * | DEL | UP | ENTER | | RGB | + * |-------+-------+-------+-------+--------| + * | LEFT | DOWN | RIGHT | | FN | + * `----------------------------------------' + */ + [BASE] = LAYOUT( + KC_DEL, KC_UP, KC_ENT, RGB, + KC_LEFT, KC_DOWN, KC_RIGHT, MO(1) + ), + + /* FN + * ,----------------------------------------. + * | HU+ | Br+ | Sat+ | | | + * |-------+-------+-------+-------+--------| + * | HU- | Br- | Sat- | | | + * `----------------------------------------' + */ + [FN] = LAYOUT( + RGB_HUI, RGB_VAI, RGB_SAI, KC_TR, + RGB_HUD, RGB_VAD, RGB_SAD, KC_TR + ) +}; + + /* Rotary Encoder Settings: */ + /* - Current Value = Horizontal Scrolling */ + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + if (clockwise) { + tap_code(KC_WH_L); + } else { + tap_code(KC_WH_R); + } + } +} diff --git a/keyboards/kingly_keys/soap/rules.mk b/keyboards/kingly_keys/soap/rules.mk new file mode 100644 index 000000000000..7e98ab6eb491 --- /dev/null +++ b/keyboards/kingly_keys/soap/rules.mk @@ -0,0 +1,32 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + + +# Build Options +# change yes to no to disable +# +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 +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI controls +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +ENCODER_ENABLE = yes +RGBLIGHT_ENABLE = yes +LAYOUTS_HAS_RGB = yes diff --git a/keyboards/kingly_keys/soap/soap.c b/keyboards/kingly_keys/soap/soap.c new file mode 100644 index 000000000000..a467c54b7491 --- /dev/null +++ b/keyboards/kingly_keys/soap/soap.c @@ -0,0 +1 @@ +#include "soap.h" diff --git a/keyboards/kingly_keys/soap/soap.h b/keyboards/kingly_keys/soap/soap.h new file mode 100644 index 000000000000..8d5eba3ad25f --- /dev/null +++ b/keyboards/kingly_keys/soap/soap.h @@ -0,0 +1,32 @@ +/* Copyright 2019 Garret G. (TheRoyalSweatshirt) + * + * 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 . + * + * Note: Matrix is a little wacky with the rotary encoder click mapping being + * on the opposite side of the board. Remember to pay attention to + * the 13th column where the lone key mapped for rotary encoder click (K132). +*/ + +#pragma once + +#include "quantum.h" + + +#define LAYOUT( \ + K00, K01, K02, K03, \ + K10, K11, K12, K13 \ +) { \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, K13 } \ +} diff --git a/keyboards/romac/rules.mk b/keyboards/romac/rules.mk deleted file mode 100644 index b500f1b885a1..000000000000 --- a/keyboards/romac/rules.mk +++ /dev/null @@ -1,57 +0,0 @@ -# MCU name -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE = full # 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 = no # Enable keyboard backlight functionality -AUDIO_ENABLE = no -RGBLIGHT_ENABLE = no - diff --git a/keyboards/ropro/rules.mk b/keyboards/ropro/rules.mk deleted file mode 100644 index c63f62146e7c..000000000000 --- a/keyboards/ropro/rules.mk +++ /dev/null @@ -1,67 +0,0 @@ -# MCU name -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# atmega32a bootloadHID -BOOTLOADER = caterina - - -# Build Options -# change yes to no to disable -# -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 -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI controls -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 -ENCODER_ENABLE = yes -RGBLIGHT_ENABLE = yes -LAYOUTS_HAS_RGB = yes From 89fe8d2d8727574f6d1fa8f56a0ab35aa4b0245c Mon Sep 17 00:00:00 2001 From: Pittyolo Date: Tue, 8 Oct 2019 20:26:17 +0200 Subject: [PATCH 072/316] [Keymap] Adding my keymaps for Preonic and XD75 (#6874) * Added my keymaps * Update to readmes * Update keyboards/preonic/keymaps/pitty/config.h Thanks! Co-Authored-By: Drashna Jaelre * Update keyboards/preonic/keymaps/pitty/config.h Thanks! Co-Authored-By: Drashna Jaelre * Update keyboards/preonic/keymaps/pitty/config.h Thanks! Co-Authored-By: Drashna Jaelre * Update config.h * Update keyboards/preonic/keymaps/pitty/keymap.c Thanks! Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Removed copyrighted material * Update keyboards/xd75/keymaps/pitty/keymap.c Thanks! Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update config.h * Update config.h * Update config.h * Update keymap.c * Update keymap.c * Update config.h * Update keymap.c * Update keyboards/preonic/keymaps/pitty/config.h Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/preonic/keymaps/pitty/config.h Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> --- keyboards/preonic/keymaps/pitty/config.h | 40 +++++ keyboards/preonic/keymaps/pitty/keymap.c | 203 ++++++++++++++++++++++ keyboards/preonic/keymaps/pitty/readme.md | 5 + keyboards/preonic/keymaps/pitty/rules.mk | 0 keyboards/xd75/keymaps/pitty/config.h | 19 ++ keyboards/xd75/keymaps/pitty/keymap.c | 148 ++++++++++++++++ keyboards/xd75/keymaps/pitty/readme.md | 3 + keyboards/xd75/keymaps/pitty/rules.mk | 15 ++ 8 files changed, 433 insertions(+) create mode 100644 keyboards/preonic/keymaps/pitty/config.h create mode 100644 keyboards/preonic/keymaps/pitty/keymap.c create mode 100644 keyboards/preonic/keymaps/pitty/readme.md create mode 100644 keyboards/preonic/keymaps/pitty/rules.mk create mode 100644 keyboards/xd75/keymaps/pitty/config.h create mode 100644 keyboards/xd75/keymaps/pitty/keymap.c create mode 100644 keyboards/xd75/keymaps/pitty/readme.md create mode 100644 keyboards/xd75/keymaps/pitty/rules.mk diff --git a/keyboards/preonic/keymaps/pitty/config.h b/keyboards/preonic/keymaps/pitty/config.h new file mode 100644 index 000000000000..f87dd8f30526 --- /dev/null +++ b/keyboards/preonic/keymaps/pitty/config.h @@ -0,0 +1,40 @@ +#pragma once + +#ifdef AUDIO_ENABLE + + +# define STARTUP_SONG SONG(PREONIC_SOUND) +# define GOODBYE_SONG SONG(STARTUP_SOUND) +# define MUSIC_ON_SONG SONG(TERMINAL_SOUND) +#endif + +#undef TEMPO_DEFAULT + +#define TEMPO_DEFAULT 200 + + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ + +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + + diff --git a/keyboards/preonic/keymaps/pitty/keymap.c b/keyboards/preonic/keymaps/pitty/keymap.c new file mode 100644 index 000000000000..10957d8ac27a --- /dev/null +++ b/keyboards/preonic/keymaps/pitty/keymap.c @@ -0,0 +1,203 @@ +/* Copyright 2015-2017 Jack Humbert + * + * 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 . + */ + +#include QMK_KEYBOARD_H +#include "keymap_hungarian.h" + +enum preonic_layers { + _QWERTY, + _GAME, + _LOWER, + _RAISE, + _ADJUST +}; + +enum preonic_keycodes { + QWERTY = SAFE_RANGE, + GAME, + LOWER, + RAISE, +}; + + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Ö | Ü | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | TAB | Q | W | E | R | T | Z | U | I | O | P | Ő | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | É | Á | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Y | X | C | V | B | N | M | , | . | - | Shift| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | ALt |Lower | Space | Bksp | Enter|Raise | Left | Down |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_preonic_grid( \ + HU_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, HU_OE, HU_UE, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, HU_Z, KC_U, KC_I, KC_O, KC_P, HU_OEE, \ + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, HU_EE, HU_AA, \ + MT(MOD_LSFT, KC_NUBS), HU_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, HU_COMM, HU_DOT, HU_MINS, KC_RSFT, \ + KC_LCTL, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, KC_ENT, KC_BSPC, KC_RALT, RAISE, KC_INS, KC_DEL \ +), + + +/* Game + * ,-----------------------------------------------------------------------------------. + * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Ö | Ü | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | TAB | Q | W | E | R | T | Z | U | I | O | P | Ő | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | É | Á | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Y | X | C | V | B | N | M | , | . | - | Shift| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | ALt |Raise | Space | Bksp | Enter|Lower | Left | Down |Right | + * `-----------------------------------------------------------------------------------' + */ +[_GAME] = LAYOUT_preonic_grid( \ + HU_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, HU_OE, HU_UE, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, HU_Z, KC_U, KC_I, KC_O, KC_P, HU_OEE, \ + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, HU_EE, HU_AA, \ + KC_LSFT, HU_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, HU_COMM, HU_DOT, HU_MINS, KC_RSFT, \ + KC_LCTL, KC_LGUI, KC_LALT, RAISE, KC_SPC, KC_SPC, KC_ENT, KC_BSPC, KC_RALT, LOWER, KC_INS, KC_DEL \ +), + + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | 7 | 8 | 9 | + | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | Up | | | | | 4 | 5 | 6 | - | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | Left | Down | Right| | | | 1 | 2 | 3 | * | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | |Lnxcpy|Lnxpst| | | 0 | | | / | = | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Home |PageDn|PageUp| End | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_preonic_grid( \ + _______, _______, _______, _______, _______, _______, _______, HU_7, HU_8, HU_9, HU_PLUS, _______, \ + _______, _______, KC_UP, _______, _______, KC_HOME, KC_PGUP, HU_4, HU_5, HU_6, HU_MINS, _______, \ + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_END, KC_PGDN, HU_1, HU_2, HU_3, HU_ASTR, _______, \ + _______, _______, _______, _______, _______, _______, _______, HU_0, _______, _______, HU_SLSH, HU_EQL, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TO(_GAME), TO(_QWERTY) \ +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | F12 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | Up | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | Left | Down | Right| | | | | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Home |PageDn|PageUp| End | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_preonic_grid( \ + KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, \ + _______, _______, KC_UP, _______, _______, KC_HOME, KC_PGUP, _______, _______, _______, _______, _______, \ + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_END, KC_PGDN, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TO(_GAME), TO(_QWERTY) \ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_preonic_grid( \ + 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, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL, \ + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______, \ + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TO(_QWERTY) \ +) + + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + } + return true; +} + +#ifdef AUDIO_ENABLE + +float raise_low[][2] = SONG(TERMINAL_SOUND); +float gaming[][2] = SONG(AG_SWAP_SOUND); +float adjust[][2] = SONG(UNICODE_LINUX); +float my_song[][2] = SONG(NO_SOUND); + +#endif + +layer_state_t layer_state_set_user(layer_state_t state) { + switch (get_highest_layer(state)) { + case _RAISE: + PLAY_SONG (raise_low); + break; + case _LOWER: + PLAY_SONG (raise_low); + break; + case _GAME: + PLAY_SONG (gaming); + break; + case _ADJUST: + PLAY_SONG (adjust); + break; + default: // for any other layers, or the default layer + PLAY_SONG (my_song); + break; + } + return state; +} diff --git a/keyboards/preonic/keymaps/pitty/readme.md b/keyboards/preonic/keymaps/pitty/readme.md new file mode 100644 index 000000000000..42b3076089b8 --- /dev/null +++ b/keyboards/preonic/keymaps/pitty/readme.md @@ -0,0 +1,5 @@ +My Preonic keymap + +Including Hungarian characters and layer reactive sound feedback + +make preonic/rev3:pitty:dfu-util \ No newline at end of file diff --git a/keyboards/preonic/keymaps/pitty/rules.mk b/keyboards/preonic/keymaps/pitty/rules.mk new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/keyboards/xd75/keymaps/pitty/config.h b/keyboards/xd75/keymaps/pitty/config.h new file mode 100644 index 000000000000..e6975da8a201 --- /dev/null +++ b/keyboards/xd75/keymaps/pitty/config.h @@ -0,0 +1,19 @@ +/* Copyright 2017 Benjamin Kesselring + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/xd75/keymaps/pitty/keymap.c b/keyboards/xd75/keymaps/pitty/keymap.c new file mode 100644 index 000000000000..955ae59ed5b3 --- /dev/null +++ b/keyboards/xd75/keymaps/pitty/keymap.c @@ -0,0 +1,148 @@ +/* Copyright 2017 Wunder + * + * 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 . + */ +#include QMK_KEYBOARD_H +#include "keymap_hungarian.h" + +enum XD75_layers { + _QWERTY, + _GAME, + _LOWER, + _RAISE +}; + + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QWERTY = SAFE_RANGE, + GAME, + LOWER, + RAISE, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + +/* Qwerty + * ,--------------------------------------------------------------------------------------------------------. + * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Ö | Ü | Ó | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | TAB | Q | W | E | R | T | Z | U | I | O | P | Ő | Ú | | | + * |------+------+------+------+------+-------------+------+------+------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | É | Á | Ű | | | + * |------+------+------+------+------+------|------+------+------+------+------+------+------+------+------| + * | Shift| Y | X | C | V | B | N | M | , | . | - | Shift| | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | ALt |Lower | Space | Enter| Bksp |AltGr | Raise| | | | | | + * `--------------------------------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_ortho_5x15( \ + HU_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, HU_OE, HU_UE, HU_OO, KC_INS, KC_PGUP, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, HU_Z, KC_U, KC_I, KC_O, KC_P, HU_OEE, HU_UU, KC_DEL, KC_PGDN, \ + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, HU_EE, HU_AA, HU_UEE, _______, KC_HOME, \ + MT(MOD_LSFT, KC_NUBS), HU_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, HU_COMM, HU_DOT, HU_MINS, KC_RSFT, HU_EQL, KC_UP, KC_END, \ + KC_LCTL, KC_LGUI, KC_LALT, TT(_LOWER), KC_SPC, _______, KC_ENT, KC_BSPC, KC_RALT, TT(_RAISE), _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT \ +), + + +/* Game + * ,--------------------------------------------------------------------------------------------------------. + * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Ö | Ü | Ó | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | TAB | Q | W | E | R | T | Z | U | I | O | P | Ő | Ú | | | + * |------+------+------+------+------+-------------+------+------+------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | É | Á | Ű | | | + * |------+------+------+------+------+------|------+------+------+------+------+------+------+------+------| + * | Shift| Y | X | C | V | B | N | M | , | . | - | Shift| | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | ALt |Raise | Space | Enter| Bksp |AltGr | Lower| | | | | | + * `--------------------------------------------------------------------------------------------------------' + */ +[_GAME] = LAYOUT_ortho_5x15( \ + HU_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, HU_OE, HU_UE, HU_OO, KC_INS, KC_PGUP, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, HU_Z, KC_U, KC_I, KC_O, KC_P, HU_OEE, HU_UU, KC_DEL, KC_PGDN, \ + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, HU_EE, HU_AA, HU_UEE, _______, KC_HOME, \ + KC_LSFT, HU_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, HU_COMM, HU_DOT, HU_MINS, KC_RSFT, HU_EQL, KC_UP, KC_END, \ + KC_LCTL, KC_LGUI, KC_LALT, TT(_RAISE), KC_SPC, _______, KC_ENT, KC_BSPC, KC_RALT, TT(_LOWER), _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT \ +), + + +/* Lower + * ,--------------------------------------------------------------------------------------------------------. + * | | | | | | | | 7 | 8 | 9 | + | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | Up | | | | | 4 | 5 | 6 | - | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------+------+------+------| + * | | Left | Down | Right| | | | 1 | 2 | 3 | * | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------+------+------+------| + * | | | |Lnxcpy|Lnxpst| | | 0 | | | / | = | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Home |PageDn|PageUp| End | | | | + * `--------------------------------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_ortho_5x15( \ + _______, _______, _______, _______, _______, _______, _______, HU_7, HU_8, HU_9, HU_PLUS, _______, _______, _______, _______, \ + _______, _______, KC_UP, _______, _______, _______, _______, HU_4, HU_5, HU_6, HU_MINS, _______, _______, _______, _______, \ + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, HU_1, HU_2, HU_3, HU_ASTR, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, HU_0, _______, _______, HU_SLSH, HU_EQL, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TO(_GAME), TO(_QWERTY), _______, _______, _______ \ +), + +/* Raise + * ,--------------------------------------------------------------------------------------------------------. + * | F12 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | Up | | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------+------+------+------| + * | | Left | Down | Right| | | | | | | | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Home |PageDn|PageUp| End | | | | + * `--------------------------------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_ortho_5x15( \ + _______, 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_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TO(_GAME), TO(_QWERTY), _______, _______, _______ \ +), + + + +}; + + + +layer_state_t layer_state_set_user(layer_state_t state) { + switch (get_highest_layer(state)) { + case _RAISE: + rgblight_setrgb (0xC3, 0xFF, 0xFF); + rgblight_mode(5); + break; + case _LOWER: + rgblight_setrgb (0xFF, 0xFF, 0xFF); + rgblight_mode(5); + break; + case _GAME: + rgblight_mode(8); + break; + default: // for any other layers, or the default layer + rgblight_mode(14); + break; + } + return state; +} diff --git a/keyboards/xd75/keymaps/pitty/readme.md b/keyboards/xd75/keymaps/pitty/readme.md new file mode 100644 index 000000000000..b0cc42997864 --- /dev/null +++ b/keyboards/xd75/keymaps/pitty/readme.md @@ -0,0 +1,3 @@ +My keymap for the XD75 + +Including Hungarian characters and layer reactive underglow. \ No newline at end of file diff --git a/keyboards/xd75/keymaps/pitty/rules.mk b/keyboards/xd75/keymaps/pitty/rules.mk new file mode 100644 index 000000000000..52a8f38d45ff --- /dev/null +++ b/keyboards/xd75/keymaps/pitty/rules.mk @@ -0,0 +1,15 @@ +# Copyright 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 . + From 4335b97a072cef1a5814d8a07368c25fc175a93d Mon Sep 17 00:00:00 2001 From: fauxpark Date: Wed, 9 Oct 2019 05:47:37 +1100 Subject: [PATCH 073/316] Reorder Raw HID interface to match what the USB spec expects (#6801) --- tmk_core/protocol/usb_descriptor.c | 20 ++++++++++---------- tmk_core/protocol/usb_descriptor.h | 16 ++++++++-------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/tmk_core/protocol/usb_descriptor.c b/tmk_core/protocol/usb_descriptor.c index 7d509f4ef437..ffcf0957f358 100644 --- a/tmk_core/protocol/usb_descriptor.c +++ b/tmk_core/protocol/usb_descriptor.c @@ -331,6 +331,16 @@ const USB_Descriptor_Configuration_t PROGMEM .Keyboard_INEndpoint = {.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint}, .EndpointAddress = (ENDPOINT_DIR_IN | KEYBOARD_IN_EPNUM), .Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = KEYBOARD_EPSIZE, .PollingIntervalMS = USB_POLLING_INTERVAL_MS}, #endif +#ifdef RAW_ENABLE + /* + * Raw HID + */ + .Raw_Interface = {.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface}, .InterfaceNumber = RAW_INTERFACE, .AlternateSetting = 0x00, .TotalEndpoints = 2, .Class = HID_CSCP_HIDClass, .SubClass = HID_CSCP_NonBootSubclass, .Protocol = HID_CSCP_NonBootProtocol, .InterfaceStrIndex = NO_DESCRIPTOR}, + .Raw_HID = {.Header = {.Size = sizeof(USB_HID_Descriptor_HID_t), .Type = HID_DTYPE_HID}, .HIDSpec = VERSION_BCD(1, 1, 1), .CountryCode = 0x00, .TotalReportDescriptors = 1, .HIDReportType = HID_DTYPE_Report, .HIDReportLength = sizeof(RawReport)}, + .Raw_INEndpoint = {.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint}, .EndpointAddress = (ENDPOINT_DIR_IN | RAW_IN_EPNUM), .Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = RAW_EPSIZE, .PollingIntervalMS = 0x01}, + .Raw_OUTEndpoint = {.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint}, .EndpointAddress = (ENDPOINT_DIR_OUT | RAW_OUT_EPNUM), .Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = RAW_EPSIZE, .PollingIntervalMS = 0x01}, +#endif + #if defined(MOUSE_ENABLE) && !defined(MOUSE_SHARED_EP) /* * Mouse @@ -361,16 +371,6 @@ const USB_Descriptor_Configuration_t PROGMEM .Shared_INEndpoint = {.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint}, .EndpointAddress = (ENDPOINT_DIR_IN | SHARED_IN_EPNUM), .Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = SHARED_EPSIZE, .PollingIntervalMS = USB_POLLING_INTERVAL_MS}, #endif -#ifdef RAW_ENABLE - /* - * Raw HID - */ - .Raw_Interface = {.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface}, .InterfaceNumber = RAW_INTERFACE, .AlternateSetting = 0x00, .TotalEndpoints = 2, .Class = HID_CSCP_HIDClass, .SubClass = HID_CSCP_NonBootSubclass, .Protocol = HID_CSCP_NonBootProtocol, .InterfaceStrIndex = NO_DESCRIPTOR}, - .Raw_HID = {.Header = {.Size = sizeof(USB_HID_Descriptor_HID_t), .Type = HID_DTYPE_HID}, .HIDSpec = VERSION_BCD(1, 1, 1), .CountryCode = 0x00, .TotalReportDescriptors = 1, .HIDReportType = HID_DTYPE_Report, .HIDReportLength = sizeof(RawReport)}, - .Raw_INEndpoint = {.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint}, .EndpointAddress = (ENDPOINT_DIR_IN | RAW_IN_EPNUM), .Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = RAW_EPSIZE, .PollingIntervalMS = 0x01}, - .Raw_OUTEndpoint = {.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint}, .EndpointAddress = (ENDPOINT_DIR_OUT | RAW_OUT_EPNUM), .Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = RAW_EPSIZE, .PollingIntervalMS = 0x01}, -#endif - #ifdef CONSOLE_ENABLE /* * Console diff --git a/tmk_core/protocol/usb_descriptor.h b/tmk_core/protocol/usb_descriptor.h index e922edc4523f..b2423fa7e662 100644 --- a/tmk_core/protocol/usb_descriptor.h +++ b/tmk_core/protocol/usb_descriptor.h @@ -62,6 +62,14 @@ typedef struct { USB_Descriptor_Endpoint_t Keyboard_INEndpoint; #endif +#ifdef RAW_ENABLE + // Raw HID Interface + USB_Descriptor_Interface_t Raw_Interface; + USB_HID_Descriptor_HID_t Raw_HID; + USB_Descriptor_Endpoint_t Raw_INEndpoint; + USB_Descriptor_Endpoint_t Raw_OUTEndpoint; +#endif + #if defined(MOUSE_ENABLE) && !defined(MOUSE_SHARED_EP) // Mouse HID Interface USB_Descriptor_Interface_t Mouse_Interface; @@ -76,14 +84,6 @@ typedef struct { USB_Descriptor_Endpoint_t Shared_INEndpoint; #endif -#ifdef RAW_ENABLE - // Raw HID Interface - USB_Descriptor_Interface_t Raw_Interface; - USB_HID_Descriptor_HID_t Raw_HID; - USB_Descriptor_Endpoint_t Raw_INEndpoint; - USB_Descriptor_Endpoint_t Raw_OUTEndpoint; -#endif - #ifdef CONSOLE_ENABLE // Console HID Interface USB_Descriptor_Interface_t Console_Interface; From 0ea4e861753dec47533b7f56f850d766b496c133 Mon Sep 17 00:00:00 2001 From: Xavier Hahn Date: Tue, 8 Oct 2019 22:27:45 +0200 Subject: [PATCH 074/316] [Docs] French translation of QMK Basics (#6925) * Adds the files that will be translated * Start translate cli_configuration.md in French * Translated cli.md in French * Translated getting_started_getting_help.md in French * /getting_started_github.md * Translated first part of contributing.md in French * Finish translation of contributing.md * Translated the getting_started_introduction.md in French * Corrected issues from @zekth review Co-Authored-By: Vincent LE GOFF --- docs/fr-FR/_summary.md | 16 +-- docs/fr-FR/cli.md | 146 +++++++++++++++++++ docs/fr-FR/cli_configuration.md | 121 ++++++++++++++++ docs/fr-FR/contributing.md | 154 +++++++++++++++++++++ docs/fr-FR/getting_started_getting_help.md | 15 ++ docs/fr-FR/getting_started_github.md | 61 ++++++++ docs/fr-FR/getting_started_introduction.md | 62 +++++++++ 7 files changed, 567 insertions(+), 8 deletions(-) create mode 100644 docs/fr-FR/cli.md create mode 100644 docs/fr-FR/cli_configuration.md create mode 100644 docs/fr-FR/contributing.md create mode 100644 docs/fr-FR/getting_started_getting_help.md create mode 100644 docs/fr-FR/getting_started_github.md create mode 100644 docs/fr-FR/getting_started_introduction.md diff --git a/docs/fr-FR/_summary.md b/docs/fr-FR/_summary.md index 7b87d4605ff8..204f03aabd4c 100644 --- a/docs/fr-FR/_summary.md +++ b/docs/fr-FR/_summary.md @@ -8,15 +8,15 @@ * [Bonnes pratiques Git](fr-FR/newbs_best_practices.md) * [Ressources d'apprentissage](fr-FR/newbs_learn_more_resources.md) -**En Anglais** +* [Les bases de QMK](fr-FR/README.md) + * [Indroduction à QMK](fr-FR/getting_started_introduction.md) + * [QMK CLI](fr-FR/cli.md) + * [Configuration de la CLI QMK](fr-FR/cli_configuration.md) + * [Contribuer à QMK](fr-FR/contributing.md) + * [Comment utiliser GitHub](fr-FR/getting_started_github.md) + * [Trouver de l'aide](fr-FR/getting_started_getting_help.md) -* [Les bases de QMK](README.md) - * [Introduction à QMK](getting_started_introduction.md) - * [QMK en ligne de commande](cli.md) - * [Configurer les lignes de commandes CLI](cli_configuration.md) - * [Contribuer à QMK](contributing.md) - * [Comment utiliser Github](getting_started_github.md) - * [Obtenir de l’aide](getting_started_getting_help.md) +**En Anglais** * [Changements non rétro-compatibles](breaking_changes.md) * [30 Aout 2019](ChangeLog/20190830.md) diff --git a/docs/fr-FR/cli.md b/docs/fr-FR/cli.md new file mode 100644 index 000000000000..176ee90da45e --- /dev/null +++ b/docs/fr-FR/cli.md @@ -0,0 +1,146 @@ +# La CLI de QMK + +Cette page décrit comment configurer et utiliser la CLI QMK. + +# Vue d'ensemble + +La CLI de QMK permet de simplifier la compilation et l'intéraction avec les clavier QMK. Nous avons définis plusieurs commandes pour simplifier et rationaliser les tâches telles qu'obtenir et compiler le firmware QMK, créer de nouvelles keymaps, et plus. + +* [CLI globale](#global-cli) +* [CLI locale](#local-cli) +* [Les commandes CLI](#cli-commands) + +# Pré-requis + +La CLI nécessite Python 3.5 ou plus récent. Nous essayons de limiter le nombre de pré-requis, mais vous allez aussi devoir installer les paquets listés dans le fichier [`requirements.txt`](/~https://github.com/qmk/qmk_firmware/blob/master/requirements.txt). + +# CLI globale + +QMK met à disposition une CLI installable qui peut être utilisée pour configurer votre environnement de compilation QMK, fonctionne avec QMK, et qui rend l'utilisation de plusieurs copies de `qmk_firmware` plus simple. Nous recommandons d'installer et de mettre à jour ceci régulièrement. + +## Installer en utilisant Homebrew (macOS, quelques Linux) + +Si vous avez installé [Homebrew](https://brew.sh) vous pouvez entrer ce qui suit et installer QMK: + +``` +brew tap qmk/qmk +brew install qmk +export QMK_HOME='~/qmk_firmware' # Optional, set the location for `qmk_firmware` +qmk setup # This will clone `qmk/qmk_firmware` and optionally set up your build environment +``` + +## Installer en utilisant easy_install ou pip + +Si votre système n'est pas listé ci-dessus, vous pouvez installer QMK manuellement. Premièrement, vérifiez que vous avez bien installé Python 3.5 (ou plus récent) et pip. Ensuite, installez QMK avec cette commande: + +``` +pip3 install qmk +export QMK_HOME='~/qmk_firmware' # Optional, set the location for `qmk_firmware` +qmk setup # This will clone `qmk/qmk_firmware` and optionally set up your build environment +``` + +## Paquets pour d'autres systèmes d'exploitation + +Nous recherchons des gens pour créer et maintenir un paquet `qmk` pour plus de systèmes d'exploitation. Si vous voulez créer un paquet pour votre système d'exploitation, suivez ces directives: + +* Suivez les bonnes pratiques pour votre système d'exploitation lorsqu'elles entrent en conflit avec ces directives + * Documentez pourquoi dans un commentaire lorsque vous ne les suivez pas +* Installez en utilisant un virtualenv +* Expliquez à l'utilisateur de définir la variable d'environnement `QMK_Home` pour "check out" les sources du firmware à un autre endroit que `~/qmk_firmware`. + +# CLI locale + +Si vous ne voulez pas utiliser la CLI globale, il y a une CLI locale empaquetée avec `qmk_firmware`. Vous pouvez le trouver dans `qmk_firmware/bin/qmk`. Vous pouvez lancer la commande `qmk` depuis n'importe quel répertoire et elle fonctionnera toujours sur cette copie de `qmk_firmware`. + +**Exemple**: + +``` +$ ~/qmk_firmware/bin/qmk hello +Ψ Hello, World! +``` + +## Limitations de la CLI locale + +Il y a quelques limitations à la CLI locale comparé à la globale: + +* La CLI locale ne supporte pas `qmk setup` ou `qmk clone` +* La CLI locale n'opère pas sur le même arbre `qmk_firmware`, même si vous avez plusieurs dépôts clonés. +* La CLI locale ne s'exécute pas dans un virtualenv, donc il y a des risques que des dépendances seront en conflit + +# Les commandes CLI + +## `qmk compile` + +Cette commande permet de compiler le firmware de n'importe quel répertoire. Vous pouvez compiler des exports JSON de ou compiler des keymaps du dépôt. + +**Utilisation pour les exports de configuration**: + +``` +qmk compile +``` + +**Utilisation pour les Keymaps**: + +``` +qmk compile -kb -km +``` + +## `qmk cformat` + +Cette commande formatte le code C en utilisant clang-format. Lancez-la sans arguments pour formatter tout le code core, ou passez les noms de fichiers à la ligne de commande pour la lancer sur des fichiers spécifiques. + +**Utilisation**: + +``` +qmk cformat [file1] [file2] [...] [fileN] +``` + +## `qmk config` + +Cette commande vous permet de configurer le comportement de QMK. Pour la documentation complète de `qmk config`, regardez [Configuration de CLI](cli_configuration.md). + +**Utilisation**: + +``` +qmk config [-ro] [config_token1] [config_token2] [...] [config_tokenN] +``` + +## `qmk doctor` + +Cette commande examine votre environnement et vous alertes des potentiels problèmes de compilation ou de flash. + +**Utilisation**: + +``` +qmk doctor +``` + +## `qmk new-keymap` + +Cette commande crée une nouvelle keymap basée sur une keymap par défaut d'un clavier existant. + +**Utilisation**: + +``` +qmk new-keymap [-kb KEYBOARD] [-km KEYMAP] +``` + +## `qmk pyformat` + +Cette commande formatte le code python dans `qmk_firmware`. + +**Utilisation**: + +``` +qmk pyformat +``` + +## `qmk pytest` + +Cette commande démarre la suite de test python. Si vous faites des changements dans le code Python, assurez vous que les tests se lancent avec succès. + +**Utilisation**: + +``` +qmk pytest +``` diff --git a/docs/fr-FR/cli_configuration.md b/docs/fr-FR/cli_configuration.md new file mode 100644 index 000000000000..dcd197f85219 --- /dev/null +++ b/docs/fr-FR/cli_configuration.md @@ -0,0 +1,121 @@ +# Configuration de QMK CLI + +Ce document explique comment fonctionne la commande `qmk config`. + +# Introduction + +La configuration pour QMK CLI est un système clé/valeur. Chaque clé est composée d'une sous-commande et d'un argument séparé par une virgule. Cela permet une traduction simple et directe entre les clés de configuration et l'argument qu'elle définit. + +## Exemple simple + +Comme exemple, regardons la commande `qmk compile --keyboard clueboard/66/rev4 --keymap default`. + +Il y a deux arguments de ligne de commande qui peuvent être lu de la configuration: + +* `compile.keyboard` +* `compile.keymap` + +Essayons de les définir: + +```shell +$ qmk config compile.keyboard=clueboard/66/rev4 compile.keymap=default +compile.keyboard: None -> clueboard/66/rev4 +compile.keymap: None -> default +Ψ Wrote configuration to '/Users/example/Library/Application Support/qmk/qmk.ini' +``` + +Maintenant, je peux lancer la commande `qmk compile` sans avoir à spécifier mon clavier et keymap à chaque fois. + +## Définir les options par défaut + +Parfois, il est utile de partager une configuration entre plusieurs commandes. Par exemple, plusieurs commandes prennent un argument `--keyboard`. Plutôt que de devoir définir cette valeur pour chaque commande, vous pouvez définir une valeur d'utilisateur qui sera utilisée par toutes les commandes qui prennent cet argument. + +Exemple: + +``` +$ qmk config user.keyboard=clueboard/66/rev4 user.keymap=default +user.keyboard: None -> clueboard/66/rev4 +user.keymap: None -> default +Ψ Wrote configuration to '/Users/example/Library/Application Support/qmk/qmk.ini' +``` + +# CLI Documentation (`qmk config`) + +La commande `qmk config` est utilisée pour intéragir avec la configuration sous-jacente. Lancée sans argument, elle affiche la configuration courante. Lorsque des arguments sont définis, ils sont considérés comme étant des jetons de configuration, qui sont des chaînes de caractère ne contenant aucun espace avec le format suivant: + + [.][=] + +## Définir des valeurs de configuration + +Vous pouvez définir des valeurs de configuration en mettant le caractère égal (=) dans votre clé de configuration. La clé doit toujours être dans le format complet `
.`. + +Exemple: + +``` +$ qmk config default.keymap=default +default.keymap: None -> default +Ψ Wrote configuration to '/Users/example/Library/Application Support/qmk/qmk.ini' +``` + +## Lire des valeurs de configuration + +Vous pouvez lire les valeurs de configuration pour la totalité de la configuration, une seule clé, ou une section entière. Vous pouvez aussi spécifier plusieurs clés pour afficher plus d'une valeur. + +### Exemple avec la totalité de la configuration + + qmk config + +### Exemple avec une section entière + + qmk config compile + +### Exemple avec une clé unique + + qmk config compile.keyboard + +### Exemple avec plusieurs clés + + qmk config user compile.keyboard compile.keymap + +## Supprimer des valeurs de configuration + +Vous pouvez supprimer une valeur de configuration en la définissant avec la chaîne spéciale `None`. + +Exemple: + +``` +$ qmk config default.keymap=None +default.keymap: default -> None +Ψ Wrote configuration to '/Users/example/Library/Application Support/qmk/qmk.ini' +``` + +## Plusieurs opérations + +Vous pouvez combiner plusieures opérations d'écriture et de lecture en une seule commande. Elle seront exécutées et affichées dans l'ordre: + +``` +$ qmk config compile default.keymap=default compile.keymap=None +compile.keymap=skully +compile.keyboard=clueboard/66_hotswap/gen1 +default.keymap: None -> default +compile.keymap: skully -> None +Ψ Wrote configuration to '/Users/example/Library/Application Support/qmk/qmk.ini' +``` + +# Options de configuration utilisateur + +| Clé | Valeur par défaut | Description | +|-----|---------------|-------------| +| user.keyboard | None | Le chemin d'accès vers le clavier (Exemple: `clueboard/66/rev4`) | +| user.keymap | None | Le nom de la keymap (Exemple: `default`) | +| user.name | None | Le nom d'utilisateur GitHub de l'utilisateur. | + +# Toutes les options de configuration + +| Clé | Valeur par défaut | Description | +|-----|---------------|-------------| +| compile.keyboard | None | Le chemin d'accès vers le clavier (Exemple: `clueboard/66/rev4`) | +| compile.keymap | None | Le nom de la keymap (Exemple: `default`) | +| hello.name | None | Le nom à saluer lorsque démarré. | +| new_keyboard.keyboard | None | Le chemin d'accès vers le clavier (Exemple: `clueboard/66/rev4`) | +| new_keyboard.keymap | None | Le nom de la keymap (Example: `default`) | diff --git a/docs/fr-FR/contributing.md b/docs/fr-FR/contributing.md new file mode 100644 index 000000000000..6d6889b018bf --- /dev/null +++ b/docs/fr-FR/contributing.md @@ -0,0 +1,154 @@ +# Comment contribuer + +👍🎉 Premièrement, merci de prendre le temps de lire ceci et de contribuer! 🎉👍 + +Les contributions de tiers nous aide à améliorer et faire grandir QMK. Nous voulons rendre les pull requests et le processus de contribution utile et simple à la fois pour les contributeurs et les mainteneurs. C'est pourquoi nous avons mis en places des directives pour les contibuteurs afin que votre pull request puisse être accepté sans changement majeur. + +* [Aperçu du projet](#project-overview) +* [Conventions de codage](#coding-conventions) +* [Directives générales](#general-guidelines) +* [Que veut dire le code de conduite pour moi?](#what-does-the-code-of-conduct-mean-for-me) + +## Je ne veux pas lire tout ce pavé! J'ai juste une question! + +Si vous voulez poser une question sur QMK, vous pouvez le faire sur le [sous-reddit OLKB](https://reddit.com/r/olkb) ou sur [Discord](https://discord.gg/Uq7gcHh). + +Merci de garder ceci en tête: + +* Cela peut prendre plusieurs heures pour que quelqu'un réponde à votre question. Merci d'être patient! +* Tous ceux impliqués avec QMK fait don de son temps et de son énergie. Nous ne sommes pas payés pour travailler sur ou répondre aux questions concernant QMK. +* Essayez de poser vos questions de manière à ce qu'elles soient le plus simple à répondre possible. Si vous n'êtes pas sûrs de savoir comment faire, voici quelques bon guides (en anglais): + * https://opensource.com/life/16/10/how-ask-technical-questions + * http://www.catb.org/esr/faqs/smart-questions.html + +# Aperçu du projet + +QMK est majoritairement écrit en C, avec quelques fonctions et parties spécifiques écrites en C++. Il est destiné aux processeurs intégrés que l'on trouve dans des clavier, particulièrement AVR ([LUFA](http://www.fourwalledcubicle.com/LUFA.php)) et ARM ([ChibiOS](http://www.chibios.com)). Si vous maîtrisez déjà la programmation sur Arduino, vous trouverez beaucoup de concepts et de limitations familiers. Une expérience préalable avec les Arduino n'est pas nécessaire à contribuer avec succès à QMK. + + + +# Où trouver de l'aide? + +Si vous avez besoin d'aide, vous pouvez [ouvrir une issue](/~https://github.com/qmk/qmk_firmware/issues) ou [un chat sur Discord](https://discord.gg/Uq7gcHh). + +# Comment contribuer? + +Vous n'avez encore jamais contribué à un projet open source? Vous vous demandez comment les contributions dans QMK fonctionnent? Voici un aperçu rapide! + +0. Enregistrez-vous sur [GitHub](https://github.com). +1. Définissez une keymap à contribuer, [trouvez une issue](/~https://github.com/qmk/qmk_firmware/issues) que vous souhaitez corriger, ou [une fonction](/~https://github.com/qmk/qmk_firmware/issues?q=is%3Aopen+is%3Aissue+label%3Afeature) que vous voulez ajouter. +2. Créez un fork sur le dépôt associé avec une issue sur votre compte GitHub. Cela veut dire que vous allez avoir une copie du dépôt sous `votre-login-GitHub/qmk_firmware`. +3. Clonez le dépôt sur votre macine locale en utilisant `git clone /~https://github.com/login-github/repository-name.git`. +4. Si vous travaillez sur une nouvelle fonctionnalité, pensez à ouvrir une issue pour parler avec nous du travail que vous souhaitez démarrer. +5. Créez une nouvelle branche pour votre correctif en utilisant `git checkout -b nom-de-branche`. +6. Faites les changements nécessaires pour corriger le problème ou ajouter la fonctionnalité. +7. Utilisez `git add chemin-de-fichier` pour ajouter les contenus des fichiers modifiés au "snapshot" que git utilise pour gérer l'état du projet, appelé aussi l'index. +8. Utilisez `git commit -m "Insérez une description courte des changements (en anglais)"` pour enregistrer le contenu de l'index avec un message descriptif. +9. Poussez les changements vers votre dépôt sur GitHub en utilisant `git push origin nom-de-branche`. +10. Créez un pull request sur [QMK Firmware](/~https://github.com/qmk/qmk_firmware/pull/new/master). +11. Donnez un titre à votre pull request en utilisant une description courte des changements que vous avez fait et ajoutez le numéro de l'issue ou du bug associé avec votre changement. Les commentaires de PR devraient se faire en anglais de préférence. Par exemple, vous pouvez utiliser un titre tel que celui-là: "Added more log outputting to resolve #4352". +12. Dans la description du pull request, expliquez les changements que vous avez fait et tous les problèmes qui existent, selon vous, sur le pull request que vous avez fait. Vous pouvez aussi utiliser la description pour poser des questions au mainteneur. Il n'est pas nécessaire que votre pull request soit parfait (aucun pull request ne l'est), le reviewer sera là pour vous aider à résoudre les problèmes et l'améliorer! +13. Attendez que le pull request soit revu par un mainteneur. +14. Faites des changements au pull request si le mainteneur le recommande. +15. Célébrez votre succès une fois votre pull request fusionné! + +# Conventions de codage + +La grande majorité de notre style est plutôt simple à comprendre. Si vous connaissez C ou Python, vous ne devriez pas avoir trop de difficulté avec notre style. + +* [Conventions de codage - C](coding_conventions_c.md) +* [Conventions de codage - Python](coding_conventions_python.md) + +# Directives générales + +Nous avons un certain nombre de type de changements dans QMK, chacun nécessitant un niveau de rigueur différent. Nous voulons que vous gardiez les directives suivantes en tête quel que soit le changement que vous êtes en train de faire. + +* Séparez les PR dans des unités logiques. Par exemple, ne soumettez pas un PR qui couvre deux fonctionnalités séparées, soumettez plutôt un PR pour chaque fonctionnalité. +* Vérifiez les espaces blancs non nécessaires avec `git diff --check` avant de commit. +* Assurez-vous que votre code compile. + * Keymaps: Assurez-vous que `make keyboard:your_new_keymap` ne renvoie pas d'erreur. + * Claviers: Assurez-vous que `make keyboard:all` ne renvoie pas d'erreur. + * Core: Assurez-vous que `make all` ne renvoie pas d'erreur. +* Assurez-vous que les messages de commit soient compréhensibles d'eux-même. Vous devriez écrire une description simple (pas plus de 70 caractères) sur la première ligne, suivi d'une ligne vide, suivi d'un détail de votre commit, si nécessaire. Exemple: + +``` +Adjust the fronzlebop for the kerpleplork + +The kerpleplork was intermittently failing with error code 23. The root cause was the fronzlebop setting, which causes the kerpleplork to activate every N iterations. + +Limited experimentation on the devices I have available shows that 7 is high enough to avoid confusing the kerpleplork, but I'd like to get some feedback from people with ARM devices to be sure. +``` + +## Documentation + +La documentation est l'une des manière les plus simples de démarrer la contribution sur QMK. Il est simple de trouver des endroits où la documentation est fausse ou incomplète, et il est tout aussi simple de la corriger! Nous avons aussi grandement besoin de quelqu'un pour éditer notre documentation, donc si vous avez des compétences en édition mais que vous n'êtes pas sûr de savoir où aller, n'hésitez pas [demandez de l'aide](#where-can-i-go-for-help)! + +Vous trouverez toute notre documentation dans le répertoire `qmk_firmware/docs`, ou si vous préférez utiliser des outils web, vous pouvez cliquer sur le bouton "Suggest An Edit" en haut de chaque page sur http://docs.qmk.fm/. + +Lorsque vous donnez des exemples de code dans la documentation, essayez de suivre les conventions de nommage utilisées ailleurs dnas la documentation. Par exemple, standardisez les enums en utilisant `my_layers` ou `my_keycodes` afin de garder une consistance: + +```c +enum my_layers { + _FIRST_LAYER, + _SECOND_LAYER +}; + +enum my_keycodes { + FIRST_LAYER = SAFE_RANGE, + SECOND_LAYER +}; +``` + +## Keymaps + +La plupart des contributeurs débutants démarrent avec leurs keymaps personnelles. Nous essayons de garder les standards pour les keymaps pluôt simple (les keymaps reflètent, après tout, la personnalité de leurs créateurs) mais nous demandons que vous suiviez les directives suivantes afin que d'autres puissent découvrir et apprendre de votre keymap. + +* Ecrivez un fichier `readme.md` en utilisant [la template](documentation_templates.md). +* Tous les PR de keymaps doivent être "squashés", donc si la manière dont vos commits sont squashés vous est important, vous devez le faire vous-même. +* Ne regroupez pas des fonctionnalités avec votre PR de keymap. Envoyez d'abord votre fonctionnalité, puis créez un second PR pour la keymap. +* N'incluez pas de fichier `Makefile` dans votre dossier de keymap (ils ne sont plus utilisés) +* Mettez à jour les copyrights dans les en-têtes de fichiers (cherchez `%YOUR_NAME%`) + +## Claviers + +Les claviers sont la raison d'être de QMK. Certains claviers sont maintenus par la communauté, alors que d'autre sont maintenus par les gens responsables de la création du clavier. Le fichier `readme.md` devrait vous informer de qui maintient le clavier. Si vous avez des questions concernant un clavier en particulier, vous pouvez [Ouvrir une issue](/~https://github.com/qmk/qmk_firmware/issues) et tagger le mainteneur dans votre question. + +Nous vous demandons aussi que vous suiviez ces directives: + +* Ecrivez un fichier `readme.md` en utilisant [le template](documentation_templates.md). +* Gardez un nombre de commits raisonnable, ou nous squasherons votre PR. +* Ne regroupez pas des fonctionnalités avec le PR pour votre clavier. Envoyez d'abord votre fonctionnalité, puis créez un second PR pour le clavier. +* Appelez les fichiers `.c`/`.h` du nom du dossier parent, par exemple `/keyboards///.[ch]` +* N'incluez pas de fichier `Makefile` dans votre dossier de keymap (ils ne sont plus utilisés) +* Mettez à jour les copyrights dans les en-têtes de fichiers (cherchez `%YOUR_NAME%`) + +## Quantum/TMK Core + +Faites attention d'être sûr d'implémenter votre nouvelle fonctionnalité de la meilleure manière qu'il soit avant d'investir beaucoup de travail à son développement. Vous pouvez apprendre les bases de QMK en lisant [Comprendre QMK](understanding_qmk.md), qui vous donnera une idée du flux du programme QMK. A partir de là, parlez nous afin de définir la meilleure façon d'implémenter votre idée. Il y a deux façons principale de le faire: + +* [Chat sur Discord](https://discord.gg/Uq7gcHh) +* [Ouvrir une Issue](/~https://github.com/qmk/qmk_firmware/issues/new) + +Les PR de nouvelles fonctionnalités de de correction de bug affectent tous les claviers. Nous sommes aussi dans un processus de restructuration de QMK. Pour cette raison, il est absolument nécessaire que tout changement important ou significatif soit discuté avant que l'implémentation soit faite. Si vous ouvrez un PR sans nous avoir parlé, préparez vous à faire des refontes significatives si vous changements ne sont pas compatibles avec ce que nous avons planifié. + +Voici quelques choses à garder en tête lorsque vous travaillez sur une fonctionnalité ou un bug fix. + +* **Désactivé par défaut** - la mémoire est plutôt limitée sur la plupart des puces que QMK supporte, et il est important que les keymaps courantes ne soient pas cassées. S'il vous plaît faites que vos features doivent être **activées** plutôt que désactivées. Si vous pensez qu'elle devrait être activée par défaut, ou que cela réduit la taille du code, parlez-nous en. +* **Compilez localement avant de soumettre** - Cela devrait aller sans dire, mais votre code doit compiler! Notre système Travis devrait relever les problèmes, mais il est généralement plus rapide de compiler quelques claviers en local plutôt que d'attendre le retour des résultats +* **Faites attention aux révisions et différentes bases de puces** - beaucoup de claviers ont des révisions qui permettent des changements de configuration mineurs, voir des bases de chip différentes. Essayez de faire que votre fonctionnalité soit supportée à la fois sur ARM et AVR, ou désactivez-là automatiquement sur les plateformes non supportées. +* **Expliquez votre fonctionnalité** - Documentez-là dans `docs/`, soit dans un nouveau fichier, ou dans une partie d'un fichier existant. Si vous ne la documentez pas, personne ne pourra bénéficier de votre dur labeur. + +Nous vous demandons aussi de suivre ces ces directives: + +* Gardez un nombre de commits raisonnable, ou nous squasherons votre PR. +* Ne regroupez pas des claviers ou des keymaps avec des changements core. Soumettez vos changements core en premier. +* Ecrivez des [Tests Unitaires](unit_testing.md) pour votre fonctionnalité. +* Suivez le style du fichier que vous modifiez. Si le style n'est pas clair ou qu'il y a un mélange de fichiers, vous devriez vous conformer aux [conventions de codage](#coding-conventions) au dessus. + +## Refactoriser + +Afin de maintenir une vision claire sur comment les choses sont architectuées dans QMK, nous essayons de planifier des refactorisations en profondeur et qu'un collaborateur fasse le changement. Si vous avez une idée de refactorisation, ou une suggestion, [ouvrez une issue] [open an issue](/~https://github.com/qmk/qmk_firmware/issues), nous adorons discuter de comment améliorer QMK. + +# Que veut dire le code de conduite pour moi? + +Note [Code De Conduite](/~https://github.com/qmk/qmk_firmware/blob/master/CODE_OF_CONDUCT.md) veut dire que vous avez la responsabilité de traiter tout le monde dans le projet avec respect et courtoisie, peut importe leur identité. Si vous êtes victime d'une attitude ou de commentaires inapropriés, tels que décrit dans notre Code de Conduite, nous sommes là pour vous et nous ferons de notre mieux pour nous assurer que le fautif soit réprimandé, tel que décrit dans notre code. diff --git a/docs/fr-FR/getting_started_getting_help.md b/docs/fr-FR/getting_started_getting_help.md new file mode 100644 index 000000000000..5eaf51975187 --- /dev/null +++ b/docs/fr-FR/getting_started_getting_help.md @@ -0,0 +1,15 @@ +# Trouver de l'aide + +Il y a beaucoup de ressources pour trouver de l'aide avec QMK. + +## Chat temps-réel + +Vous trouverez des développeurs QMK et des utilisateurs sur notre [Serveur Discord](https://discord.gg/Uq7gcHh) principal. Il y a des canaux spécifiques dans le serveurs pour discuter des firmware, toolbox, hardware et configurateurs. + +## Sous-Reddit OLKB + +Le forum officiel de QMK est [/r/olkb](https://reddit.com/r/olkb) sur [reddit.com](https://reddit.com). + +## Tickets GitHub + +Vous pouvez ouvrir un [ticket sur GitHub](/~https://github.com/qmk/qmk_firmware/issues). Ceci est spécialement pratique lorsque votre problème demande une discussion long terme ou un débugage. diff --git a/docs/fr-FR/getting_started_github.md b/docs/fr-FR/getting_started_github.md new file mode 100644 index 000000000000..32a68d0cab94 --- /dev/null +++ b/docs/fr-FR/getting_started_github.md @@ -0,0 +1,61 @@ +# Comment utiliser GitHub avec QMK + +GitHub peut être un peu compliqué pour ceux qui n'y sont pas familier. Ce guide va vous expliquer chaque étape de "fork", clone et envoi d'un pull request avec QMK. + +?> Ce guide part du principe que vous êtes suffisamment à l'aise pour envoyer commandes sur la ligne de commande et que vous avez Git installé sur votre système. + +Commencez par la [page GitHub de QMK](/~https://github.com/qmk/qmk_firmware), et vous verrez un bouton dans le coin en haut à droite qui indique "Fork": + +![Fork on Github](http://i.imgur.com/8Toomz4.jpg) + +Si vous faites partie d'une organisation, vous aurez besoin de savoir quel compte utiliser pour le fork. Dans la plupart des cas, vous voudrez créer le fork dans votre compte personnel. Une fois le fork complet (cela peut quelque fois prendre un peu de temps), appuyez sur le bouton "Clone or download": + +![Download from Github](http://i.imgur.com/N1NYcSz.jpg) + +Faites attention à sélectionner "HTTPS", et sélectionnez le liens et copiez-le: + +![HTTPS link](http://i.imgur.com/eGO0ohO.jpg) + +Ensuite, entrez `git clone` dans la ligne de commande, et collez votre lien: + +``` +user@computer:~$ git clone /~https://github.com/whoeveryouare/qmk_firmware.git +Cloning into 'qmk_firmware'... +remote: Counting objects: 46625, done. +remote: Compressing objects: 100% (2/2), done. +remote: Total 46625 (delta 0), reused 0 (delta 0), pack-reused 46623 +Receiving objects: 100% (46625/46625), 84.47 MiB | 3.14 MiB/s, done. +Resolving deltas: 100% (29362/29362), done. +Checking out files: 100% (2799/2799), done. +``` + +Vous avez maintenant votre fork QMK sur votre machine locale, vous pouvez ajouter votre keymap, la compiler et la flasher sur votre board. Une fois heureux avec vos changements, vous pouvez les ajouter, commit, et pousser vers votre fork comme suit: + +``` +user@computer:~$ git add . +user@computer:~$ git commit -m "adding my keymap" +[master cccb1608] adding my keymap + 1 file changed, 1 insertion(+) + create mode 100644 keyboards/planck/keymaps/mine/keymap.c +user@computer:~$ git push +Counting objects: 1, done. +Delta compression using up to 4 threads. +Compressing objects: 100% (1/1), done. +Writing objects: 100% (1/1), 1.64 KiB | 0 bytes/s, done. +Total 1 (delta 1), reused 0 (delta 0) +remote: Resolving deltas: 100% (1/1), completed with 1 local objects. +To /~https://github.com/whoeveryouare/qmk_firmware.git + + 20043e64...7da94ac5 master -> master +``` + +Vos changements existent maintenant dans votre fork sur GitHub. Si vous allez à cete adresse (`/~https://github.com//qmk_firmware`), vous pouvez créer un nouveau "Pull Request" en cliquant sur ce bouton: + +![New Pull Request](http://i.imgur.com/DxMHpJ8.jpg) + +Maintenant, vous pourrez voir exactement ce que vous avez commité. Si ça vous semble bien, vous pouvez le finaliser en cliquant sur "Create Pull Request": + +![Create Pull Request](http://i.imgur.com/Ojydlaj.jpg) + +Une fois transmis, nous pourrons vous parler de vos changements, vous demander de faire des changements, et éventuellement de les accepter! + +Merci de contribuer à QMK :) diff --git a/docs/fr-FR/getting_started_introduction.md b/docs/fr-FR/getting_started_introduction.md new file mode 100644 index 000000000000..b64a7728f60a --- /dev/null +++ b/docs/fr-FR/getting_started_introduction.md @@ -0,0 +1,62 @@ +# Introduction + +Le but de cette page est d'expliquer les informations de base qui vous serons nécessaire pour travailler sur le projet QMK. Il a pour pré-requis que vous soyez familier à la navigation à l'aide d'un shell Unix, mais ne s'attend pas à ce que vous soyez familier avec C ou la compilation en utilisant make. + +## Structure de base de QMK + +QMK est un fork du projet [tmk_keyboard](/~https://github.com/tmk/tmk_keyboard) créé par [Jun Wako](/~https://github.com/tmk). Le code originel de TMK, avec quelques modifications, se trouve dans le dossier `tmk`. Les additions que QMK amène au projet se trouvent dans le dossier `quantum`. Les projets de clavier se trouvent dans les dossiers `handwired` et `keyboard`. + +### Structure du Userspace + +Dans le dossier `users` se trouve un répertoire pour chaque utilisateur. C'est un endroit où les utilisateurs peuvent mettre du code qui serait partagé entre plusieurs claviers. Merci de lire la documentation [Fonctionnalité Userspace](feature_userspace.md) pour plus d'information. + +### Structure du projet clavier + +Dans le dossier `keyboards`, son sous-dossier `handwired` et ses sous-dossiers pour les revendeurs et fabriquants (par exemple `clueboard`) se trouve un répertoire pour chaque projet clavier. Par exemple `qmk_firmware/keyboards/clueboard/2x1800`. + +A l'intérieur, vous trouverez la structure suivante: + +* `keymaps/`: différentes keymaps qui peuvent être compilées +* `rules.mk`: Ce fichier définit les options "make" par défaut. Ne modifiez pas ce fichier directement, utilisez à la place un `rules.mk` spécifique à la keymap. +* `config.h`: Ce fichier définit les options de compilation par défaut. Ne modifiez pas ce fichier directement, utilisez à la place un `config.h` spécifique à la keymap. +* `info.json`: Le fichier utilisé pour définir les options de layout de QMK Configurator. Voyez [Support Configurator](reference_configurator_support.md) pour plus d'information. +* `readme.md`: une brève description du clavier. +* `.h`: Ce fichier définit le layout du fichier par rapport à la matrice de commutation. +* `.c`: Ce fichier définit du code custom pour le clavier. + +Pour plus d'information sur la structure du projet, voyez [Directives clavier QMK](hardware_keyboard_guidelines.md). + +### Structure d'une Keymap + +Dans chaque dossier keymap, vous allez trouver les fichiers suivants. Seul le fichier `keymap.c` est nécessaire, et si le reste des fichiers n'existent pas, les options par défaut seront choisies. + +* `config.h`: les options de configuration de votre keymap +* `keymap.c`: tout le code de votre keymap, requis +* `rules.mk`: les features de QMK qui sont activées +* `readme.md`: une description de votre keymap, comment d'autres l'utiliseront, et des explications des fonctionnalités. Uploadez les images vers un service comme imgur. + +# Le fichier `config.h` + +Le fichier `config.h` peut être mis à 3 endroits: + +* keyboard (`/keyboards//config.h`) +* userspace (`/users//config.h`) +* keymap (`/keyboards//keymaps//config.h`) + +Le système de compilation cherche automatiquement les fichiers de configuration dans l'ordre au dessus. Si vous souhaitez surcharger une configuration définie par un `config.h` précédent, vous devrez d'abord ajouter le code suivant. + +``` +#pragma once +``` + +Ensuite, pour surcharger l'option du fichier `config.h` précédent, vous devez `#undef` puis `#define` l'option à nouveau. + +Voici à quoi l'ensemble du code resemble une fois regroupé: + +``` +#pragma once + +// overrides go here! +#undef MY_SETTING +#define MY_SETTING 4 +``` From 1c07d4e7efd4d0bc3c9baa876987690de56ac715 Mon Sep 17 00:00:00 2001 From: Max Rumpf Date: Wed, 9 Oct 2019 06:55:44 +0200 Subject: [PATCH 075/316] [Docs] Clean up docs/newbs_flashing.md (#6973) * [Docs] Clean up docs/newbs_flashing.md See #6930 * Fix typo --- docs/newbs_flashing.md | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/docs/newbs_flashing.md b/docs/newbs_flashing.md index fa21709763fd..9c76f5592de9 100644 --- a/docs/newbs_flashing.md +++ b/docs/newbs_flashing.md @@ -12,23 +12,31 @@ However, the QMK Toolbox is only available for Windows and macOS currently. If Begin by opening the QMK Toolbox application. You'll want to locate the firmware file in Finder or Explorer. Your keyboard firmware may be in one of two formats- `.hex` or `.bin`. QMK tries to copy the appropriate one for your keyboard into the root `qmk_firmware` directory. -?> If you are on Windows or macOS there are commands you can use to easily open the current firmware folder in Explorer or Finder. +If you are on Windows or macOS there are commands you can use to easily open the current firmware folder in Explorer or Finder. -?> Windows: +#### Windows - start . +``` +start . +``` -?> macOS: +#### macOS - open . +``` +open . +``` The firmware file always follows this naming format: - _.{bin,hex} +``` +_.{bin,hex} +``` -For example, the `plank/rev5` with a `default` keymap will have this filename: +For example, the `planck/rev5` with a `default` keymap will have this filename: - planck_rev5_default.hex +``` +planck_rev5_default.hex +``` Once you have located your firmware file drag it into the "Local file" box in QMK Toolbox, or click "Open" and navigate to where your firmware file is stored. From 8991d9ab3a53d8180ef85abba014fee57980da65 Mon Sep 17 00:00:00 2001 From: shu_numata Date: Wed, 9 Oct 2019 13:59:11 +0900 Subject: [PATCH 076/316] [Docs] Fix missing link in readme (#6958) --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index b08c675e4e8c..2641e2c2ef86 100644 --- a/readme.md +++ b/readme.md @@ -13,7 +13,7 @@ This is a keyboard firmware based on the [tmk\_keyboard firmware](https://github * [See the official documentation on docs.qmk.fm](https://docs.qmk.fm) -The docs are hosted on [Gitbook](https://www.gitbook.com/book/qmk/firmware/details) and [GitHub](/docs/) (they are synced). You can request changes by making a fork and [pull request](/~https://github.com/qmk/qmk_firmware/pulls), or by clicking the "suggest an edit" link on any page of the docs. +The docs are powered by [Docsify](https://docsify.js.org/) and hosted on [GitHub](/docs/). You can request changes by making a fork and [pull request](/~https://github.com/qmk/qmk_firmware/pulls), or by clicking the "Edit Document" link at the bottom of any page. ## Supported Keyboards From 8da25dd6e36bdd8a21bcd6dbb619a42549b396c9 Mon Sep 17 00:00:00 2001 From: Ethan Durrant <5387347+emdarcher@users.noreply.github.com> Date: Tue, 8 Oct 2019 23:01:56 -0600 Subject: [PATCH 077/316] [Docs] removed unneeded line of code in Tap Dance documentation (#6981) --- docs/feature_tap_dance.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/docs/feature_tap_dance.md b/docs/feature_tap_dance.md index 4f98b858e90f..7427a77146b5 100644 --- a/docs/feature_tap_dance.md +++ b/docs/feature_tap_dance.md @@ -447,9 +447,6 @@ int cur_dance (qk_tap_dance_state_t *state); //Functions associated with individual tap dances void ql_finished (qk_tap_dance_state_t *state, void *user_data); void ql_reset (qk_tap_dance_state_t *state, void *user_data); - -//Declare variable to track which layer is active -int active_layer; ``` Towards the bottom of your `keymap.c`, include the following code: From db3d4a92aefef5023ac7002d6b2c1c9969492931 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Wed, 9 Oct 2019 06:48:29 -0700 Subject: [PATCH 078/316] Kingly Keys Little Foot Configurator layout fix (#6988) * fix Kingly Keys Little Foot info.json Was missing a closing curly bracket. * clean up the indenting White-space-only change. --- keyboards/kingly_keys/little_foot/info.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/keyboards/kingly_keys/little_foot/info.json b/keyboards/kingly_keys/little_foot/info.json index 6a8d50894068..d8fa905521ba 100644 --- a/keyboards/kingly_keys/little_foot/info.json +++ b/keyboards/kingly_keys/little_foot/info.json @@ -9,8 +9,9 @@ "key_count": 44, "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":6, "y":3}, {"x":7, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":1.5, "y":4, "w":1.5}, {"x":3, "y":4, "w":2}, {"x":5, "y":4, "w":2}, {"x":7, "y":4, "w":1.5}] }, - "LAYOUT_big_space_base": { - "key_count": 41, - "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":6, "y":3}, {"x":7, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":1.5, "y":4, "w":7}] + "LAYOUT_big_space_base": { + "key_count": 41, + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":6, "y":3}, {"x":7, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":1.5, "y":4, "w":7}] } + } } From 1f2ad80c169f407ce56df97a31c480255636ce96 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Wed, 9 Oct 2019 07:09:57 -0700 Subject: [PATCH 079/316] Gray Studio Space65 Configurator Layout fix (#6987) - LAYOUT_65_ansi_blocker data was actually LAYOUT's data. - added actual LAYOUT_65_ansi_blocker data --- keyboards/gray_studio/space65/info.json | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/keyboards/gray_studio/space65/info.json b/keyboards/gray_studio/space65/info.json index c45491fecbf5..72674bdef69e 100644 --- a/keyboards/gray_studio/space65/info.json +++ b/keyboards/gray_studio/space65/info.json @@ -5,8 +5,12 @@ "width": 16, "height": 5, "layouts": { - "LAYOUT_65_ansi_blocker": { + "LAYOUT": { "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":15, "y":1}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":15, "y":2}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":2.25}, {"x":6, "y":4, "w":1.25}, {"x":7.25, "y":4, "w":2.75}, {"x":10, "y":4, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] + }, + + "LAYOUT_65_ansi_blocker": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0, "w":2}, {"x":15, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":15, "y":1}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":15, "y":2}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] } } -} \ No newline at end of file +} From 23cac6a606adc52a5956d878bbc9606b8cfdca88 Mon Sep 17 00:00:00 2001 From: Leivince John Marte Date: Thu, 10 Oct 2019 00:58:39 +0800 Subject: [PATCH 080/316] [Keymap] Feature/keymap/tada68 (#6983) * Added KBD6X Vimwarrior HHKB TOFU Personal Layout * Added Readme.md for Vimwarrior HHKB Tofu Keymap * Added DZ60 Vimwarrior WKL Tofu Keymap * Update Rename keymaps to devinceble_hhkb_tofu and devinceble_wkl_tofu * Update rules.mk Added BOOTLOADER config. * [Keymap] Added devinceble keymap for TADA68 * Update Reduce down rules.mk to just MOUSEKEY_ENABLE --- keyboards/tada68/keymaps/devinceble/keymap.c | 42 +++++++++++++++++++ keyboards/tada68/keymaps/devinceble/readme.md | 6 +++ keyboards/tada68/keymaps/devinceble/rules.mk | 3 ++ 3 files changed, 51 insertions(+) create mode 100755 keyboards/tada68/keymaps/devinceble/keymap.c create mode 100755 keyboards/tada68/keymaps/devinceble/readme.md create mode 100644 keyboards/tada68/keymaps/devinceble/rules.mk diff --git a/keyboards/tada68/keymaps/devinceble/keymap.c b/keyboards/tada68/keymaps/devinceble/keymap.c new file mode 100755 index 000000000000..0fddd0ada36b --- /dev/null +++ b/keyboards/tada68/keymaps/devinceble/keymap.c @@ -0,0 +1,42 @@ +/* Copyright 2019 Devinceble AKA Vimwarrior + * + * 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 . + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ansi( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS,KC_GRV, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC,KC_BSPC,KC_DEL, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT,KC_PGUP, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT,MO(1),KC_PGDN, \ + MO(2), KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RCTRL, KC_LEFT,KC_DOWN,KC_UP,KC_RGHT), + + [1] = LAYOUT_ansi( + _______, KC_F1 ,KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_INS , \ + _______,KC_BTN1, KC_MS_U,KC_BTN2,_______, _______,_______,_______,_______,_______,_______,KC_UP,_______, _______,KC_HOME, \ + KC_CAPS,KC_MS_L,KC_MS_D,KC_MS_R,_______,_______,_______,_______,_______,_______,KC_LEFT,KC_RGHT, _______,KC_END, \ + _______,_______,_______,_______, _______,_______, _______,_______,_______,_______,KC_DOWN,_______, _______, _______, \ + _______,_______,_______, _______, _______,_______,_______,_______,_______, _______ + ), + + [2] = LAYOUT_ansi( + _______, KC_F1 ,KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_INS , \ + _______,_______, _______,_______,_______, _______,_______,_______,_______,_______,_______,_______,_______, _______,KC_HOME, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,KC_END, \ + _______,_______,_______,BL_DEC, BL_TOGG,BL_INC, _______,KC_VOLD,KC_VOLU,KC_MUTE,_______,_______, _______, _______, \ + _______,_______,_______, _______, _______,_______,_______,_______,_______, _______ + ), +}; diff --git a/keyboards/tada68/keymaps/devinceble/readme.md b/keyboards/tada68/keymaps/devinceble/readme.md new file mode 100755 index 000000000000..a11be12075dc --- /dev/null +++ b/keyboards/tada68/keymaps/devinceble/readme.md @@ -0,0 +1,6 @@ +# Devinceble AKA Vimwarrior TADA68 Keymap + +Build BIN File: + + make tada68:devinceble + diff --git a/keyboards/tada68/keymaps/devinceble/rules.mk b/keyboards/tada68/keymaps/devinceble/rules.mk new file mode 100644 index 000000000000..b1b4e0269980 --- /dev/null +++ b/keyboards/tada68/keymaps/devinceble/rules.mk @@ -0,0 +1,3 @@ +MOUSEKEY_ENABLE = yes + + From 3cb216f3816b9f0b2403ae5f015a6af3febc866b Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Wed, 9 Oct 2019 10:23:38 -0700 Subject: [PATCH 081/316] [Keyboard] New Keyboard: Exent (#6985) * initial commit * thank you mr keebs for making this easy. Added 65_ansi macro made from mrkeebs kle2qmk tool. * split backspace requires an additional row * change k43 to k42 * add in split space bar support for LAYOUT_all * add QMK Configurator support * make default keymap more usable * update readme * Update keyboards/exent/info.json Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/exent/keymaps/default/keymap.c Co-Authored-By: fauxpark * Update keyboards/exent/keymaps/default/keymap.c Co-Authored-By: fauxpark * Update keyboards/exent/rules.mk Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> --- keyboards/exent/config.h | 53 +++ keyboards/exent/exent.c | 90 +++++ keyboards/exent/exent.h | 68 ++++ keyboards/exent/info.json | 20 ++ keyboards/exent/keymaps/default/config.h | 19 ++ keyboards/exent/keymaps/default/keymap.c | 18 + keyboards/exent/keymaps/default/readme.md | 1 + keyboards/exent/readme.md | 19 ++ keyboards/exent/rules.mk | 28 ++ keyboards/exent/usbconfig.h | 383 ++++++++++++++++++++++ 10 files changed, 699 insertions(+) create mode 100644 keyboards/exent/config.h create mode 100644 keyboards/exent/exent.c create mode 100644 keyboards/exent/exent.h create mode 100644 keyboards/exent/info.json create mode 100644 keyboards/exent/keymaps/default/config.h create mode 100644 keyboards/exent/keymaps/default/keymap.c create mode 100644 keyboards/exent/keymaps/default/readme.md create mode 100644 keyboards/exent/readme.md create mode 100644 keyboards/exent/rules.mk create mode 100644 keyboards/exent/usbconfig.h diff --git a/keyboards/exent/config.h b/keyboards/exent/config.h new file mode 100644 index 000000000000..08d241f653a1 --- /dev/null +++ b/keyboards/exent/config.h @@ -0,0 +1,53 @@ +/* +Copyright 2019 mechmerlin + +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 . +*/ + +#pragma once + +#include "config_common.h" + +#define VENDOR_ID 0x20A0 +#define PRODUCT_ID 0x422D +#define DEVICE_VER 0x0001 +#define MANUFACTURER Quadcube +#define PRODUCT Exent +#define DESCRIPTION 65% Keyboard + +#define RGBLED_NUM 18 + +#define MATRIX_ROWS 7 +#define MATRIX_COLS 14 + +// 0 1 2 3 4 5 6 7 8 9 A B C D +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6 } +#define MATRIX_COL_PINS { D7, C2, C3, C4, C5, C6, C7, A7, A6, A5, A4, A3, A1, A0 } +#define UNUSED_PINS + +#define DIODE_DIRECTION COL2ROW +#define DEBOUNCE 5 + +#define BACKLIGHT_LEVELS 1 +#define RGBLIGHT_ANIMATIONS + +#define NO_UART 1 + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/exent/exent.c b/keyboards/exent/exent.c new file mode 100644 index 000000000000..00cd20aff6fd --- /dev/null +++ b/keyboards/exent/exent.c @@ -0,0 +1,90 @@ +/* Copyright 2019 mechmerlin + * + * 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 . + */ + +#include "exent.h" + +#ifdef RGBLIGHT_ENABLE + +# include +# include "i2c_master.h" +# include "rgblight.h" + +extern rgblight_config_t rgblight_config; + +void matrix_init_kb(void) { + i2c_init(); + // call user level keymaps, if any + matrix_init_user(); +} + +// custom RGB driver +void rgblight_set(void) { + if (!rgblight_config.enable) { + memset(led, 0, 3 * RGBLED_NUM); + } + + i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); +} + +bool rgb_init = false; + +void matrix_scan_kb(void) { + // if LEDs were previously on before poweroff, turn them back on + if (rgb_init == false && rgblight_config.enable) { + i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); + rgb_init = true; + } + + rgblight_task(); + matrix_scan_user(); +} + +#endif + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* + +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/exent/exent.h b/keyboards/exent/exent.h new file mode 100644 index 000000000000..256457c5ce7d --- /dev/null +++ b/keyboards/exent/exent.h @@ -0,0 +1,68 @@ +/* Copyright 2019 mechmerlin + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define ___ KC_NO + +#define LAYOUT_all( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k6d, k53, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k52, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k51, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k50, \ + k40, k41, k42, k44, k45, k46, k47, k48, k49, k4b, k4c, k4d \ +){ \ + { 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, k47, k48, k49, ___, k4b, k4c, k4d }, \ + { k50, k51, k52, k53, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___ }, \ + { ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, k6d } \ +} + +#define LAYOUT_65_ansi( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k53, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k52, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, k51, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k50, \ + k40, k41, k42, k45, k47, k48, k49, k4b, k4c, k4d \ +){ \ + { 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, ___, k2d }, \ + { k30, ___, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d }, \ + { k40, k41, k42, ___, ___, k45, ___, k47, k48, k49, ___, k4b, k4c, k4d }, \ + { k50, k51, k52, k53, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___ }, \ + { ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___ } \ +} + +#define LAYOUT_65_iso( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k53, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k52, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k51, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k50, \ + k40, k41, k42, k45, k47, k48, k49, k4b, k4c, k4d \ +){ \ + { 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, ___ }, \ + { 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, ___, ___, k45, ___, k47, k48, k49, ___, k4b, k4c, k4d }, \ + { k50, k51, k52, k53, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___ }, \ + { ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___ } \ +} diff --git a/keyboards/exent/info.json b/keyboards/exent/info.json new file mode 100644 index 000000000000..920a9ffe3dc2 --- /dev/null +++ b/keyboards/exent/info.json @@ -0,0 +1,20 @@ +{ + "keyboard_name": "Exent", + "url": "", + "maintainer": "qmk", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":15, "y":1}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2}, {"x":13.75, "y":2, "w":1.25}, {"x":15, "y":2}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":2.25}, {"x":6, "y":4, "w":1.25}, {"x":7.25, "y":4, "w":2.75}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] + }, + + "LAYOUT_65_ansi": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0, "w":2}, {"x":15, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":15, "y":1}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":15, "y":2}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] + }, + + "LAYOUT_65_iso": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0, "w":2}, {"x":15, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":15, "y":1}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2}, {"x":13.75, "y":1, "w":1.25, "h":2}, {"x":15, "y":2}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] + } + } +} diff --git a/keyboards/exent/keymaps/default/config.h b/keyboards/exent/keymaps/default/config.h new file mode 100644 index 000000000000..60dd02a9d0ee --- /dev/null +++ b/keyboards/exent/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 mechmerlin + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/exent/keymaps/default/keymap.c b/keyboards/exent/keymaps/default/keymap.c new file mode 100644 index 000000000000..943b1133e7ec --- /dev/null +++ b/keyboards/exent/keymaps/default/keymap.c @@ -0,0 +1,18 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* layer 0: qwerty */ + [0] = LAYOUT_65_ansi( + 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_HOME, + 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_PGUP, + 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_PGDN, + 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_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + [1] = LAYOUT_65_ansi( + 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_DEL, KC_TRNS, + BL_TOGG, BL_STEP, BL_INC, BL_DEC, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + }; diff --git a/keyboards/exent/keymaps/default/readme.md b/keyboards/exent/keymaps/default/readme.md new file mode 100644 index 000000000000..9d596e699fb4 --- /dev/null +++ b/keyboards/exent/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for exent diff --git a/keyboards/exent/readme.md b/keyboards/exent/readme.md new file mode 100644 index 000000000000..08807eda55e9 --- /dev/null +++ b/keyboards/exent/readme.md @@ -0,0 +1,19 @@ +# exent + +65% custom keyboard with large bezels. + +Keyboard Maintainer: [mechmerlin](/~https://github.com/mechmerlin) +Hardware Supported: Exent PCB +Hardware Availability: [Geekhack GB](https://geekhack.org/index.php?topic=87213.0) + +Make example for this keyboard (after setting up your build environment): + + make exent:default + +Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](flashing_bootloadhid.md)) + + make exent:default:flash + +**Reset Key**: Hold down the key located at `k0d`, commonly programmed as Backspace while plugging in the keyboard. + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/exent/rules.mk b/keyboards/exent/rules.mk new file mode 100644 index 000000000000..a49f32058290 --- /dev/null +++ b/keyboards/exent/rules.mk @@ -0,0 +1,28 @@ +# MCU name +MCU = atmega32a + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = bootloadHID + +# build options +BOOTMAGIC_ENABLE = no +MOUSEKEY_ENABLE = no +EXTRAKEY_ENABLE = yes +CONSOLE_ENABLE = yes +COMMAND_ENABLE = yes +BACKLIGHT_ENABLE = no +RGBLIGHT_ENABLE = yes +RGBLIGHT_CUSTOM_DRIVER = yes + +OPT_DEFS = -DDEBUG_LEVEL=0 + +SRC += i2c_master.c + +LAYOUTS = 65_ansi 65_iso diff --git a/keyboards/exent/usbconfig.h b/keyboards/exent/usbconfig.h new file mode 100644 index 000000000000..9ef232f045f2 --- /dev/null +++ b/keyboards/exent/usbconfig.h @@ -0,0 +1,383 @@ +#pragma once + +#include "config.h" + +/* +General Description: +This file is an example configuration (with inline documentation) for the USB +driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is +also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may +wire the lines to any other port, as long as D+ is also wired to INT0 (or any +other hardware interrupt, as long as it is the highest level interrupt, see +section at the end of this file). +*/ + +/* ---------------------------- Hardware Config ---------------------------- */ + +#define USB_CFG_IOPORTNAME D +/* This is the port where the USB bus is connected. When you configure it to + * "B", the registers PORTB, PINB and DDRB will be used. + */ +#define USB_CFG_DMINUS_BIT 3 +/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected. + * This may be any bit in the port. + */ +#define USB_CFG_DPLUS_BIT 2 +/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected. + * This may be any bit in the port. Please note that D+ must also be connected + * to interrupt pin INT0! [You can also use other interrupts, see section + * "Optional MCU Description" below, or you can connect D- to the interrupt, as + * it is required if you use the USB_COUNT_SOF feature. If you use D- for the + * interrupt, the USB interrupt will also be triggered at Start-Of-Frame + * markers every millisecond.] + */ +#define USB_CFG_CLOCK_KHZ (F_CPU / 1000) +/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000, + * 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code + * require no crystal, they tolerate +/- 1% deviation from the nominal + * frequency. All other rates require a precision of 2000 ppm and thus a + * crystal! + * Since F_CPU should be defined to your actual clock rate anyway, you should + * not need to modify this setting. + */ +#define USB_CFG_CHECK_CRC 0 +/* Define this to 1 if you want that the driver checks integrity of incoming + * data packets (CRC checks). CRC checks cost quite a bit of code size and are + * currently only available for 18 MHz crystal clock. You must choose + * USB_CFG_CLOCK_KHZ = 18000 if you enable this option. + */ + +/* ----------------------- Optional Hardware Config ------------------------ */ + +/* #define USB_CFG_PULLUP_IOPORTNAME D */ +/* If you connect the 1.5k pullup resistor from D- to a port pin instead of + * V+, you can connect and disconnect the device from firmware by calling + * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h). + * This constant defines the port on which the pullup resistor is connected. + */ +/* #define USB_CFG_PULLUP_BIT 4 */ +/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined + * above) where the 1.5k pullup resistor is connected. See description + * above for details. + */ + +/* --------------------------- Functional Range ---------------------------- */ + +#define USB_CFG_HAVE_INTRIN_ENDPOINT 1 +/* Define this to 1 if you want to compile a version with two endpoints: The + * default control endpoint 0 and an interrupt-in endpoint (any other endpoint + * number). + */ +#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1 +/* Define this to 1 if you want to compile a version with three endpoints: The + * default control endpoint 0, an interrupt-in endpoint 3 (or the number + * configured below) and a catch-all default interrupt-in endpoint as above. + * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature. + */ +#define USB_CFG_EP3_NUMBER 3 +/* If the so-called endpoint 3 is used, it can now be configured to any other + * endpoint number (except 0) with this macro. Default if undefined is 3. + */ +/* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */ +/* The above macro defines the startup condition for data toggling on the + * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1. + * Since the token is toggled BEFORE sending any data, the first packet is + * sent with the oposite value of this configuration! + */ +#define USB_CFG_IMPLEMENT_HALT 0 +/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature + * for endpoint 1 (interrupt endpoint). Although you may not need this feature, + * it is required by the standard. We have made it a config option because it + * bloats the code considerably. + */ +#define USB_CFG_SUPPRESS_INTR_CODE 0 +/* Define this to 1 if you want to declare interrupt-in endpoints, but don't + * want to send any data over them. If this macro is defined to 1, functions + * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if + * you need the interrupt-in endpoints in order to comply to an interface + * (e.g. HID), but never want to send any data. This option saves a couple + * of bytes in flash memory and the transmit buffers in RAM. + */ +#define USB_CFG_INTR_POLL_INTERVAL 1 +/* If you compile a version with endpoint 1 (interrupt-in), this is the poll + * interval. The value is in milliseconds and must not be less than 10 ms for + * low speed devices. + */ +#define USB_CFG_IS_SELF_POWERED 0 +/* Define this to 1 if the device has its own power supply. Set it to 0 if the + * device is powered from the USB bus. + */ +#define USB_CFG_MAX_BUS_POWER 500 +/* Set this variable to the maximum USB bus power consumption of your device. + * The value is in milliamperes. [It will be divided by two since USB + * communicates power requirements in units of 2 mA.] + */ +#define USB_CFG_IMPLEMENT_FN_WRITE 1 +/* Set this to 1 if you want usbFunctionWrite() to be called for control-out + * transfers. Set it to 0 if you don't need it and want to save a couple of + * bytes. + */ +#define USB_CFG_IMPLEMENT_FN_READ 0 +/* Set this to 1 if you need to send control replies which are generated + * "on the fly" when usbFunctionRead() is called. If you only want to send + * data from a static buffer, set it to 0 and return the data from + * usbFunctionSetup(). This saves a couple of bytes. + */ +#define USB_CFG_IMPLEMENT_FN_WRITEOUT 0 +/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints. + * You must implement the function usbFunctionWriteOut() which receives all + * interrupt/bulk data sent to any endpoint other than 0. The endpoint number + * can be found in 'usbRxToken'. + */ +#define USB_CFG_HAVE_FLOWCONTROL 0 +/* Define this to 1 if you want flowcontrol over USB data. See the definition + * of the macros usbDisableAllRequests() and usbEnableAllRequests() in + * usbdrv.h. + */ +#define USB_CFG_DRIVER_FLASH_PAGE 0 +/* If the device has more than 64 kBytes of flash, define this to the 64 k page + * where the driver's constants (descriptors) are located. Or in other words: + * Define this to 1 for boot loaders on the ATMega128. + */ +#define USB_CFG_LONG_TRANSFERS 0 +/* Define this to 1 if you want to send/receive blocks of more than 254 bytes + * in a single control-in or control-out transfer. Note that the capability + * for long transfers increases the driver size. + */ +/* #define USB_RX_USER_HOOK(data, len) if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */ +/* This macro is a hook if you want to do unconventional things. If it is + * defined, it's inserted at the beginning of received message processing. + * If you eat the received message and don't want default processing to + * proceed, do a return after doing your things. One possible application + * (besides debugging) is to flash a status LED on each packet. + */ +/* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */ +/* This macro is a hook if you need to know when an USB RESET occurs. It has + * one parameter which distinguishes between the start of RESET state and its + * end. + */ +/* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */ +/* This macro (if defined) is executed when a USB SET_ADDRESS request was + * received. + */ +#define USB_COUNT_SOF 1 +/* define this macro to 1 if you need the global variable "usbSofCount" which + * counts SOF packets. This feature requires that the hardware interrupt is + * connected to D- instead of D+. + */ +/* #ifdef __ASSEMBLER__ + * macro myAssemblerMacro + * in YL, TCNT0 + * sts timer0Snapshot, YL + * endm + * #endif + * #define USB_SOF_HOOK myAssemblerMacro + * This macro (if defined) is executed in the assembler module when a + * Start Of Frame condition is detected. It is recommended to define it to + * the name of an assembler macro which is defined here as well so that more + * than one assembler instruction can be used. The macro may use the register + * YL and modify SREG. If it lasts longer than a couple of cycles, USB messages + * immediately after an SOF pulse may be lost and must be retried by the host. + * What can you do with this hook? Since the SOF signal occurs exactly every + * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in + * designs running on the internal RC oscillator. + * Please note that Start Of Frame detection works only if D- is wired to the + * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES! + */ +#define USB_CFG_CHECK_DATA_TOGGLING 0 +/* define this macro to 1 if you want to filter out duplicate data packets + * sent by the host. Duplicates occur only as a consequence of communication + * errors, when the host does not receive an ACK. Please note that you need to + * implement the filtering yourself in usbFunctionWriteOut() and + * usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable + * for each control- and out-endpoint to check for duplicate packets. + */ +#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0 +/* define this macro to 1 if you want the function usbMeasureFrameLength() + * compiled in. This function can be used to calibrate the AVR's RC oscillator. + */ +#define USB_USE_FAST_CRC 0 +/* The assembler module has two implementations for the CRC algorithm. One is + * faster, the other is smaller. This CRC routine is only used for transmitted + * messages where timing is not critical. The faster routine needs 31 cycles + * per byte while the smaller one needs 61 to 69 cycles. The faster routine + * may be worth the 32 bytes bigger code size if you transmit lots of data and + * run the AVR close to its limit. + */ + +/* -------------------------- Device Description --------------------------- */ + +#define USB_CFG_VENDOR_ID (VENDOR_ID & 0xFF), ((VENDOR_ID >> 8) & 0xFF) +/* USB vendor ID for the device, low byte first. If you have registered your + * own Vendor ID, define it here. Otherwise you may use one of obdev's free + * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_ID (PRODUCT_ID & 0xFF), ((PRODUCT_ID >> 8) & 0xFF) +/* This is the ID of the product, low byte first. It is interpreted in the + * scope of the vendor ID. If you have registered your own VID with usb.org + * or if you have licensed a PID from somebody else, define it here. Otherwise + * you may use one of obdev's free shared VID/PID pairs. See the file + * USB-IDs-for-free.txt for details! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_VERSION 0x00, 0x02 +/* Version number of the device: Minor number first, then major number. + */ +#define USB_CFG_VENDOR_NAME 'w', 'i', 'n', 'k', 'e', 'y', 'l', 'e', 's', 's', '.', 'k', 'r' +#define USB_CFG_VENDOR_NAME_LEN 13 +/* These two values define the vendor name returned by the USB device. The name + * must be given as a list of characters under single quotes. The characters + * are interpreted as Unicode (UTF-16) entities. + * If you don't want a vendor name string, undefine these macros. + * ALWAYS define a vendor name containing your Internet domain name if you use + * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for + * details. + */ +#define USB_CFG_DEVICE_NAME 'p', 's', '2', 'a', 'v', 'r', 'G', 'B' +#define USB_CFG_DEVICE_NAME_LEN 8 +/* Same as above for the device name. If you don't want a device name, undefine + * the macros. See the file USB-IDs-for-free.txt before you assign a name if + * you use a shared VID/PID. + */ +/*#define USB_CFG_SERIAL_NUMBER 'N', 'o', 'n', 'e' */ +/*#define USB_CFG_SERIAL_NUMBER_LEN 0 */ +/* Same as above for the serial number. If you don't want a serial number, + * undefine the macros. + * It may be useful to provide the serial number through other means than at + * compile time. See the section about descriptor properties below for how + * to fine tune control over USB descriptors such as the string descriptor + * for the serial number. + */ +#define USB_CFG_DEVICE_CLASS 0 +#define USB_CFG_DEVICE_SUBCLASS 0 +/* See USB specification if you want to conform to an existing device class. + * Class 0xff is "vendor specific". + */ +#define USB_CFG_INTERFACE_CLASS 3 /* HID */ +#define USB_CFG_INTERFACE_SUBCLASS 1 /* Boot */ +#define USB_CFG_INTERFACE_PROTOCOL 1 /* Keyboard */ +/* See USB specification if you want to conform to an existing device class or + * protocol. The following classes must be set at interface level: + * HID class is 3, no subclass and protocol required (but may be useful!) + * CDC class is 2, use subclass 2 and protocol 1 for ACM + */ +#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 0 +/* Define this to the length of the HID report descriptor, if you implement + * an HID device. Otherwise don't define it or define it to 0. + * If you use this define, you must add a PROGMEM character array named + * "usbHidReportDescriptor" to your code which contains the report descriptor. + * Don't forget to keep the array and this define in sync! + */ + +/* #define USB_PUBLIC static */ +/* Use the define above if you #include usbdrv.c instead of linking against it. + * This technique saves a couple of bytes in flash memory. + */ + +/* ------------------- Fine Control over USB Descriptors ------------------- */ +/* If you don't want to use the driver's default USB descriptors, you can + * provide our own. These can be provided as (1) fixed length static data in + * flash memory, (2) fixed length static data in RAM or (3) dynamically at + * runtime in the function usbFunctionDescriptor(). See usbdrv.h for more + * information about this function. + * Descriptor handling is configured through the descriptor's properties. If + * no properties are defined or if they are 0, the default descriptor is used. + * Possible properties are: + * + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched + * at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is + * used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if + * you want RAM pointers. + * + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found + * in static memory is in RAM, not in flash memory. + * + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash), + * the driver must know the descriptor's length. The descriptor itself is + * found at the address of a well known identifier (see below). + * List of static descriptor names (must be declared PROGMEM if in flash): + * char usbDescriptorDevice[]; + * char usbDescriptorConfiguration[]; + * char usbDescriptorHidReport[]; + * char usbDescriptorString0[]; + * int usbDescriptorStringVendor[]; + * int usbDescriptorStringDevice[]; + * int usbDescriptorStringSerialNumber[]; + * Other descriptors can't be provided statically, they must be provided + * dynamically at runtime. + * + * Descriptor properties are or-ed or added together, e.g.: + * #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18)) + * + * The following descriptors are defined: + * USB_CFG_DESCR_PROPS_DEVICE + * USB_CFG_DESCR_PROPS_CONFIGURATION + * USB_CFG_DESCR_PROPS_STRINGS + * USB_CFG_DESCR_PROPS_STRING_0 + * USB_CFG_DESCR_PROPS_STRING_VENDOR + * USB_CFG_DESCR_PROPS_STRING_PRODUCT + * USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER + * USB_CFG_DESCR_PROPS_HID + * USB_CFG_DESCR_PROPS_HID_REPORT + * USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver) + * + * Note about string descriptors: String descriptors are not just strings, they + * are Unicode strings prefixed with a 2 byte header. Example: + * int serialNumberDescriptor[] = { + * USB_STRING_DESCRIPTOR_HEADER(6), + * 'S', 'e', 'r', 'i', 'a', 'l' + * }; + */ + +#define USB_CFG_DESCR_PROPS_DEVICE 0 +#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_CONFIGURATION 0 +#define USB_CFG_DESCR_PROPS_STRINGS 0 +#define USB_CFG_DESCR_PROPS_STRING_0 0 +#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0 +#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0 +#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0 +#define USB_CFG_DESCR_PROPS_HID USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID 0 +#define USB_CFG_DESCR_PROPS_HID_REPORT USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID_REPORT 0 +#define USB_CFG_DESCR_PROPS_UNKNOWN 0 + +#define usbMsgPtr_t unsigned short +/* If usbMsgPtr_t is not defined, it defaults to 'uchar *'. We define it to + * a scalar type here because gcc generates slightly shorter code for scalar + * arithmetics than for pointer arithmetics. Remove this define for backward + * type compatibility or define it to an 8 bit type if you use data in RAM only + * and all RAM is below 256 bytes (tiny memory model in IAR CC). + */ + +/* ----------------------- Optional MCU Description ------------------------ */ + +/* The following configurations have working defaults in usbdrv.h. You + * usually don't need to set them explicitly. Only if you want to run + * the driver on a device which is not yet supported or with a compiler + * which is not fully supported (such as IAR C) or if you use a differnt + * interrupt than INT0, you may have to define some of these. + */ +/* #define USB_INTR_CFG MCUCR */ +/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */ +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE GIMSK */ +/* #define USB_INTR_ENABLE_BIT INT0 */ +/* #define USB_INTR_PENDING GIFR */ +/* #define USB_INTR_PENDING_BIT INTF0 */ +/* #define USB_INTR_VECTOR INT0_vect */ + +/* Set INT1 for D- falling edge to count SOF */ +/* #define USB_INTR_CFG EICRA */ +#define USB_INTR_CFG_SET ((1 << ISC11) | (0 << ISC10)) +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE EIMSK */ +#define USB_INTR_ENABLE_BIT INT1 +/* #define USB_INTR_PENDING EIFR */ +#define USB_INTR_PENDING_BIT INTF1 +#define USB_INTR_VECTOR INT1_vect From 531ff70e0d6e5c7ac1a49d72d73b28bdd93b73eb Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Wed, 9 Oct 2019 11:03:33 -0700 Subject: [PATCH 082/316] [Keyboard] Satisfaction75 Configurator support (info.json) (#6833) * add configurator support for rev1 s75 * add configurator support for prototype * Update keyboards/cannonkeys/satisfaction75/prototype/info.json Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/cannonkeys/satisfaction75/rev1/info.json Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/cannonkeys/satisfaction75/rev1/info.json Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/cannonkeys/satisfaction75/rev1/info.json Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/cannonkeys/satisfaction75/rev1/info.json Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/cannonkeys/satisfaction75/rev1/info.json Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * fixup layouts * Update keyboards/cannonkeys/satisfaction75/rev1/info.json Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/cannonkeys/satisfaction75/rev1/info.json Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> --- .../satisfaction75/prototype/info.json | 12 +++++++ .../cannonkeys/satisfaction75/rev1/info.json | 32 +++++++++++++++++++ .../cannonkeys/satisfaction75/rev1/rev1.h | 2 +- 3 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 keyboards/cannonkeys/satisfaction75/prototype/info.json create mode 100644 keyboards/cannonkeys/satisfaction75/rev1/info.json diff --git a/keyboards/cannonkeys/satisfaction75/prototype/info.json b/keyboards/cannonkeys/satisfaction75/prototype/info.json new file mode 100644 index 000000000000..8f5ab9f2a69d --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/prototype/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Satisfaction75 prototype", + "url": "", + "maintainer": "Cannon Keys", + "width": 16.5, + "height": 6.5, + "layouts": { + "LAYOUT_default": { + "layout": [{"x":0, "y":0}, {"x":1.5, "y":0}, {"x":2.5, "y":0}, {"x":3.5, "y":0}, {"x":4.5, "y":0}, {"x":5.75, "y":0}, {"x":6.75, "y":0}, {"x":7.75, "y":0}, {"x":8.75, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":0, "y":1.25}, {"x":1, "y":1.25}, {"x":2, "y":1.25}, {"x":3, "y":1.25}, {"x":4, "y":1.25}, {"x":5, "y":1.25}, {"x":6, "y":1.25}, {"x":7, "y":1.25}, {"x":8, "y":1.25}, {"x":9, "y":1.25}, {"x":10, "y":1.25}, {"x":11, "y":1.25}, {"x":12, "y":1.25}, {"x":13, "y":1.25, "w":2}, {"x":15.5, "y":1}, {"x":0, "y":2.25, "w":1.5}, {"x":1.5, "y":2.25}, {"x":2.5, "y":2.25}, {"x":3.5, "y":2.25}, {"x":4.5, "y":2.25}, {"x":5.5, "y":2.25}, {"x":6.5, "y":2.25}, {"x":7.5, "y":2.25}, {"x":8.5, "y":2.25}, {"x":9.5, "y":2.25}, {"x":10.5, "y":2.25}, {"x":11.5, "y":2.25}, {"x":12.5, "y":2.25}, {"x":13.5, "y":2.25, "w":1.5}, {"x":15.5, "y":2.25}, {"x":0, "y":3.25, "w":1.75}, {"x":1.75, "y":3.25}, {"x":2.75, "y":3.25}, {"x":3.75, "y":3.25}, {"x":4.75, "y":3.25}, {"x":5.75, "y":3.25}, {"x":6.75, "y":3.25}, {"x":7.75, "y":3.25}, {"x":8.75, "y":3.25}, {"x":9.75, "y":3.25}, {"x":10.75, "y":3.25}, {"x":11.75, "y":3.25}, {"x":12.75, "y":3.25, "w":2.25}, {"x":15.5, "y":3.25}, {"x":0, "y":4.25, "w":2.25}, {"x":2.25, "y":4.25}, {"x":3.25, "y":4.25}, {"x":4.25, "y":4.25}, {"x":5.25, "y":4.25}, {"x":6.25, "y":4.25}, {"x":7.25, "y":4.25}, {"x":8.25, "y":4.25}, {"x":9.25, "y":4.25}, {"x":10.25, "y":4.25}, {"x":11.25, "y":4.25}, {"x":12.25, "y":4.25, "w":1.75}, {"x":14.25, "y":4.5}, {"x":15.5, "y":4.25}, {"x":0, "y":5.25, "w":1.25}, {"x":1.25, "y":5.25, "w":1.25}, {"x":2.5, "y":5.25, "w":1.25}, {"x":3.75, "y":5.25, "w":6.25}, {"x":10, "y":5.25}, {"x":11, "y":5.25}, {"x":12, "y":5.25}, {"x":13.25, "y":5.5}, {"x":14.25, "y":5.5}, {"x":15.25, "y":5.5}] + } + } +} diff --git a/keyboards/cannonkeys/satisfaction75/rev1/info.json b/keyboards/cannonkeys/satisfaction75/rev1/info.json new file mode 100644 index 000000000000..fd25aacdb7c1 --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/rev1/info.json @@ -0,0 +1,32 @@ +{ + "keyboard_name": "Satisfaction75 rev1", + "url": "", + "maintainer": "Cannon Keys", + "width": 16.5, + "height": 6.5, + "layouts": { + "LAYOUT_default": { + "layout": [{"x":0, "y":0}, {"x":1.5, "y":0}, {"x":2.5, "y":0}, {"x":3.5, "y":0}, {"x":4.5, "y":0}, {"x":5.75, "y":0}, {"x":6.75, "y":0}, {"x":7.75, "y":0}, {"x":8.75, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":0, "y":1.25}, {"x":1, "y":1.25}, {"x":2, "y":1.25}, {"x":3, "y":1.25}, {"x":4, "y":1.25}, {"x":5, "y":1.25}, {"x":6, "y":1.25}, {"x":7, "y":1.25}, {"x":8, "y":1.25}, {"x":9, "y":1.25}, {"x":10, "y":1.25}, {"x":11, "y":1.25}, {"x":12, "y":1.25}, {"x":13, "y":1.25, "w":2}, {"x":15.5, "y":1}, {"x":0, "y":2.25, "w":1.5}, {"x":1.5, "y":2.25}, {"x":2.5, "y":2.25}, {"x":3.5, "y":2.25}, {"x":4.5, "y":2.25}, {"x":5.5, "y":2.25}, {"x":6.5, "y":2.25}, {"x":7.5, "y":2.25}, {"x":8.5, "y":2.25}, {"x":9.5, "y":2.25}, {"x":10.5, "y":2.25}, {"x":11.5, "y":2.25}, {"x":12.5, "y":2.25}, {"x":13.5, "y":2.25, "w":1.5}, {"x":15.5, "y":2.25}, {"x":0, "y":3.25, "w":1.75}, {"x":1.75, "y":3.25}, {"x":2.75, "y":3.25}, {"x":3.75, "y":3.25}, {"x":4.75, "y":3.25}, {"x":5.75, "y":3.25}, {"x":6.75, "y":3.25}, {"x":7.75, "y":3.25}, {"x":8.75, "y":3.25}, {"x":9.75, "y":3.25}, {"x":10.75, "y":3.25}, {"x":11.75, "y":3.25}, {"x":12.75, "y":3.25, "w":2.25}, {"x":15.5, "y":3.25}, {"x":0, "y":4.25, "w":2.25}, {"x":2.25, "y":4.25}, {"x":3.25, "y":4.25}, {"x":4.25, "y":4.25}, {"x":5.25, "y":4.25}, {"x":6.25, "y":4.25}, {"x":7.25, "y":4.25}, {"x":8.25, "y":4.25}, {"x":9.25, "y":4.25}, {"x":10.25, "y":4.25}, {"x":11.25, "y":4.25}, {"x":12.25, "y":4.25, "w":1.75}, {"x":14.25, "y":4.5}, {"x":15.5, "y":4.25}, {"x":0, "y":5.25, "w":1.25}, {"x":1.25, "y":5.25, "w":1.25}, {"x":2.5, "y":5.25, "w":1.25}, {"x":3.75, "y":5.25, "w":6.25}, {"x":10, "y":5.25}, {"x":11, "y":5.25}, {"x":12, "y":5.25}, {"x":13.25, "y":5.5}, {"x":14.25, "y":5.5}, {"x":15.25, "y":5.5}] + }, + + "LAYOUT_iso": { + "layout": [{"x":0, "y":0}, {"x":1.5, "y":0}, {"x":2.5, "y":0}, {"x":3.5, "y":0}, {"x":4.5, "y":0}, {"x":5.75, "y":0}, {"x":6.75, "y":0}, {"x":7.75, "y":0}, {"x":8.75, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":0, "y":1.25}, {"x":1, "y":1.25}, {"x":2, "y":1.25}, {"x":3, "y":1.25}, {"x":4, "y":1.25}, {"x":5, "y":1.25}, {"x":6, "y":1.25}, {"x":7, "y":1.25}, {"x":8, "y":1.25}, {"x":9, "y":1.25}, {"x":10, "y":1.25}, {"x":11, "y":1.25}, {"x":12, "y":1.25}, {"x":13, "y":1.25, "w":2}, {"x":15.5, "y":1}, {"x":0, "y":2.25, "w":1.5}, {"x":1.5, "y":2.25}, {"x":2.5, "y":2.25}, {"x":3.5, "y":2.25}, {"x":4.5, "y":2.25}, {"x":5.5, "y":2.25}, {"x":6.5, "y":2.25}, {"x":7.5, "y":2.25}, {"x":8.5, "y":2.25}, {"x":9.5, "y":2.25}, {"x":10.5, "y":2.25}, {"x":11.5, "y":2.25}, {"x":12.5, "y":2.25}, {"x":15.5, "y":2.25}, {"x":0, "y":3.25, "w":1.75}, {"x":1.75, "y":3.25}, {"x":2.75, "y":3.25}, {"x":3.75, "y":3.25}, {"x":4.75, "y":3.25}, {"x":5.75, "y":3.25}, {"x":6.75, "y":3.25}, {"x":7.75, "y":3.25}, {"x":8.75, "y":3.25}, {"x":9.75, "y":3.25}, {"x":10.75, "y":3.25}, {"x":11.75, "y":3.25}, {"x":12.75, "y":3.25}, {"x":13.75, "y":2.25, "w":1.25, "h":2}, {"x":15.5, "y":3.25}, {"x":0, "y":4.25, "w":1.25}, {"x":1.25, "y":4.25}, {"x":2.25, "y":4.25}, {"x":3.25, "y":4.25}, {"x":4.25, "y":4.25}, {"x":5.25, "y":4.25}, {"x":6.25, "y":4.25}, {"x":7.25, "y":4.25}, {"x":8.25, "y":4.25}, {"x":9.25, "y":4.25}, {"x":10.25, "y":4.25}, {"x":11.25, "y":4.25}, {"x":12.25, "y":4.25, "w":1.75}, {"x":14.25, "y":4.5}, {"x":15.5, "y":4.25}, {"x":0, "y":5.25, "w":1.25}, {"x":1.25, "y":5.25, "w":1.25}, {"x":2.5, "y":5.25, "w":1.25}, {"x":3.75, "y":5.25, "w":6.25}, {"x":10, "y":5.25}, {"x":11, "y":5.25}, {"x":12, "y":5.25}, {"x":13.25, "y":5.5}, {"x":14.25, "y":5.5}, {"x":15.25, "y":5.5}] + }, + + "LAYOUT_3x2": { + "layout": [{"x":0, "y":0}, {"x":1.5, "y":0}, {"x":2.5, "y":0}, {"x":3.5, "y":0}, {"x":4.5, "y":0}, {"x":5.75, "y":0}, {"x":6.75, "y":0}, {"x":7.75, "y":0}, {"x":8.75, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":0, "y":1.25}, {"x":1, "y":1.25}, {"x":2, "y":1.25}, {"x":3, "y":1.25}, {"x":4, "y":1.25}, {"x":5, "y":1.25}, {"x":6, "y":1.25}, {"x":7, "y":1.25}, {"x":8, "y":1.25}, {"x":9, "y":1.25}, {"x":10, "y":1.25}, {"x":11, "y":1.25}, {"x":12, "y":1.25}, {"x":13, "y":1.25, "w":2}, {"x":15.5, "y":1}, {"x":0, "y":2.25, "w":1.5}, {"x":1.5, "y":2.25}, {"x":2.5, "y":2.25}, {"x":3.5, "y":2.25}, {"x":4.5, "y":2.25}, {"x":5.5, "y":2.25}, {"x":6.5, "y":2.25}, {"x":7.5, "y":2.25}, {"x":8.5, "y":2.25}, {"x":9.5, "y":2.25}, {"x":10.5, "y":2.25}, {"x":11.5, "y":2.25}, {"x":12.5, "y":2.25}, {"x":13.5, "y":2.25, "w":1.5}, {"x":15.5, "y":2.25}, {"x":0, "y":3.25, "w":1.75}, {"x":1.75, "y":3.25}, {"x":2.75, "y":3.25}, {"x":3.75, "y":3.25}, {"x":4.75, "y":3.25}, {"x":5.75, "y":3.25}, {"x":6.75, "y":3.25}, {"x":7.75, "y":3.25}, {"x":8.75, "y":3.25}, {"x":9.75, "y":3.25}, {"x":10.75, "y":3.25}, {"x":11.75, "y":3.25}, {"x":12.75, "y":3.25, "w":2.25}, {"x":15.5, "y":3.25}, {"x":0, "y":4.25, "w":2.25}, {"x":2.25, "y":4.25}, {"x":3.25, "y":4.25}, {"x":4.25, "y":4.25}, {"x":5.25, "y":4.25}, {"x":6.25, "y":4.25}, {"x":7.25, "y":4.25}, {"x":8.25, "y":4.25}, {"x":9.25, "y":4.25}, {"x":10.25, "y":4.25}, {"x":11.25, "y":4.25}, {"x":12.25, "y":4.25, "w":1.75}, {"x":14.25, "y":4.5}, {"x":15.5, "y":4.25}, {"x":0, "y":5.25, "w":1.25}, {"x":1.25, "y":5.25, "w":1.25}, {"x":2.5, "y":5.25, "w":1.25}, {"x":3.75, "y":5.25, "w":6.25}, {"x":10, "y":5.25, "w":1.5}, {"x":11.5, "y":5.25, "w":1.5}, {"x":13.25, "y":5.5}, {"x":14.25, "y":5.5}, {"x":15.25, "y":5.5}] + }, + + "LAYOUT_2x2": { + "layout": [{"x":0, "y":0}, {"x":1.5, "y":0}, {"x":2.5, "y":0}, {"x":3.5, "y":0}, {"x":4.5, "y":0}, {"x":5.75, "y":0}, {"x":6.75, "y":0}, {"x":7.75, "y":0}, {"x":8.75, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":0, "y":1.25}, {"x":1, "y":1.25}, {"x":2, "y":1.25}, {"x":3, "y":1.25}, {"x":4, "y":1.25}, {"x":5, "y":1.25}, {"x":6, "y":1.25}, {"x":7, "y":1.25}, {"x":8, "y":1.25}, {"x":9, "y":1.25}, {"x":10, "y":1.25}, {"x":11, "y":1.25}, {"x":12, "y":1.25}, {"x":13, "y":1.25}, {"x":14, "y":1.25}, {"x":15.5, "y":1}, {"x":0, "y":2.25, "w":1.5}, {"x":1.5, "y":2.25}, {"x":2.5, "y":2.25}, {"x":3.5, "y":2.25}, {"x":4.5, "y":2.25}, {"x":5.5, "y":2.25}, {"x":6.5, "y":2.25}, {"x":7.5, "y":2.25}, {"x":8.5, "y":2.25}, {"x":9.5, "y":2.25}, {"x":10.5, "y":2.25}, {"x":11.5, "y":2.25}, {"x":12.5, "y":2.25}, {"x":13.5, "y":2.25, "w":1.5}, {"x":15.5, "y":2.25}, {"x":0, "y":3.25, "w":1.75}, {"x":1.75, "y":3.25}, {"x":2.75, "y":3.25}, {"x":3.75, "y":3.25}, {"x":4.75, "y":3.25}, {"x":5.75, "y":3.25}, {"x":6.75, "y":3.25}, {"x":7.75, "y":3.25}, {"x":8.75, "y":3.25}, {"x":9.75, "y":3.25}, {"x":10.75, "y":3.25}, {"x":11.75, "y":3.25}, {"x":12.75, "y":3.25, "w":2.25}, {"x":15.5, "y":3.25}, {"x":0, "y":4.25, "w":2.25}, {"x":2.25, "y":4.25}, {"x":3.25, "y":4.25}, {"x":4.25, "y":4.25}, {"x":5.25, "y":4.25}, {"x":6.25, "y":4.25}, {"x":7.25, "y":4.25}, {"x":8.25, "y":4.25}, {"x":9.25, "y":4.25}, {"x":10.25, "y":4.25}, {"x":11.25, "y":4.25}, {"x":12.25, "y":4.25, "w":1.75}, {"x":14.25, "y":4.5}, {"x":15.5, "y":4.25}, {"x":0, "y":5.25, "w":1.5}, {"x":1.5, "y":5.25, "w":1.5}, {"x":3, "y":5.25, "w":7}, {"x":10, "y":5.25, "w":1.5}, {"x":11.5, "y":5.25, "w":1.5}, {"x":13.25, "y":5.5}, {"x":14.25, "y":5.5}, {"x":15.25, "y":5.5}] + }, + + "LAYOUT_split_space": { + "layout": [{"x":0, "y":0}, {"x":1.5, "y":0}, {"x":2.5, "y":0}, {"x":3.5, "y":0}, {"x":4.5, "y":0}, {"x":5.75, "y":0}, {"x":6.75, "y":0}, {"x":7.75, "y":0}, {"x":8.75, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":0, "y":1.25}, {"x":1, "y":1.25}, {"x":2, "y":1.25}, {"x":3, "y":1.25}, {"x":4, "y":1.25}, {"x":5, "y":1.25}, {"x":6, "y":1.25}, {"x":7, "y":1.25}, {"x":8, "y":1.25}, {"x":9, "y":1.25}, {"x":10, "y":1.25}, {"x":11, "y":1.25}, {"x":12, "y":1.25}, {"x":13, "y":1.25, "w":2}, {"x":15.5, "y":1}, {"x":0, "y":2.25, "w":1.5}, {"x":1.5, "y":2.25}, {"x":2.5, "y":2.25}, {"x":3.5, "y":2.25}, {"x":4.5, "y":2.25}, {"x":5.5, "y":2.25}, {"x":6.5, "y":2.25}, {"x":7.5, "y":2.25}, {"x":8.5, "y":2.25}, {"x":9.5, "y":2.25}, {"x":10.5, "y":2.25}, {"x":11.5, "y":2.25}, {"x":12.5, "y":2.25}, {"x":13.5, "y":2.25, "w":1.5}, {"x":15.5, "y":2.25}, {"x":0, "y":3.25, "w":1.75}, {"x":1.75, "y":3.25}, {"x":2.75, "y":3.25}, {"x":3.75, "y":3.25}, {"x":4.75, "y":3.25}, {"x":5.75, "y":3.25}, {"x":6.75, "y":3.25}, {"x":7.75, "y":3.25}, {"x":8.75, "y":3.25}, {"x":9.75, "y":3.25}, {"x":10.75, "y":3.25}, {"x":11.75, "y":3.25}, {"x":12.75, "y":3.25, "w":2.25}, {"x":15.5, "y":3.25}, {"x":0, "y":4.25, "w":2.25}, {"x":2.25, "y":4.25}, {"x":3.25, "y":4.25}, {"x":4.25, "y":4.25}, {"x":5.25, "y":4.25}, {"x":6.25, "y":4.25}, {"x":7.25, "y":4.25}, {"x":8.25, "y":4.25}, {"x":9.25, "y":4.25}, {"x":10.25, "y":4.25}, {"x":11.25, "y":4.25}, {"x":12.25, "y":4.25, "w":1.75}, {"x":14.25, "y":4.5}, {"x":15.5, "y":4.25}, {"x":0, "y":5.25, "w":1.25}, {"x":1.25, "y":5.25, "w":1.25}, {"x":2.5, "y":5.25, "w":1.25}, {"x":3.75, "y":5.25, "w":2.25}, {"x":6, "y":5.25, "w":1.25}, {"x":7.25, "y":5.25, "w":2.75}, {"x":10, "y":5.25}, {"x":11, "y":5.25}, {"x":12, "y":5.25}, {"x":13.25, "y":5.5}, {"x":14.25, "y":5.5}, {"x":15.25, "y":5.5}] + }, + + "LAYOUT_all": { + "layout": [{"x":0, "y":0}, {"x":1.5, "y":0}, {"x":2.5, "y":0}, {"x":3.5, "y":0}, {"x":4.5, "y":0}, {"x":5.75, "y":0}, {"x":6.75, "y":0}, {"x":7.75, "y":0}, {"x":8.75, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":0, "y":1.25}, {"x":1, "y":1.25}, {"x":2, "y":1.25}, {"x":3, "y":1.25}, {"x":4, "y":1.25}, {"x":5, "y":1.25}, {"x":6, "y":1.25}, {"x":7, "y":1.25}, {"x":8, "y":1.25}, {"x":9, "y":1.25}, {"x":10, "y":1.25}, {"x":11, "y":1.25}, {"x":12, "y":1.25}, {"x":13, "y":1.25}, {"x":14, "y":1.25}, {"x":15.5, "y":1}, {"x":0, "y":2.25, "w":1.5}, {"x":1.5, "y":2.25}, {"x":2.5, "y":2.25}, {"x":3.5, "y":2.25}, {"x":4.5, "y":2.25}, {"x":5.5, "y":2.25}, {"x":6.5, "y":2.25}, {"x":7.5, "y":2.25}, {"x":8.5, "y":2.25}, {"x":9.5, "y":2.25}, {"x":10.5, "y":2.25}, {"x":11.5, "y":2.25}, {"x":12.5, "y":2.25}, {"x":13.5, "y":2.25, "w":1.5}, {"x":15.5, "y":2.25}, {"x":0, "y":3.25, "w":1.75}, {"x":1.75, "y":3.25}, {"x":2.75, "y":3.25}, {"x":3.75, "y":3.25}, {"x":4.75, "y":3.25}, {"x":5.75, "y":3.25}, {"x":6.75, "y":3.25}, {"x":7.75, "y":3.25}, {"x":8.75, "y":3.25}, {"x":9.75, "y":3.25}, {"x":10.75, "y":3.25}, {"x":11.75, "y":3.25}, {"x":12.75, "y":3.25}, {"x":13.75, "y":3.25, "w":1.25}, {"x":15.5, "y":3.25}, {"x":0, "y":4.25, "w":1.25}, {"x":1.25, "y":4.25}, {"x":2.25, "y":4.25}, {"x":3.25, "y":4.25}, {"x":4.25, "y":4.25}, {"x":5.25, "y":4.25}, {"x":6.25, "y":4.25}, {"x":7.25, "y":4.25}, {"x":8.25, "y":4.25}, {"x":9.25, "y":4.25}, {"x":10.25, "y":4.25}, {"x":11.25, "y":4.25}, {"x":12.25, "y":4.25, "w":1.75}, {"x":14.25, "y":4.5}, {"x":15.5, "y":4.25}, {"x":0, "y":5.25, "w":1.25}, {"x":1.25, "y":5.25, "w":1.25}, {"x":2.5, "y":5.25, "w":1.25}, {"x":3.75, "y":5.25, "w":2.25}, {"x":6, "y":5.25, "w":1.25}, {"x":7.25, "y":5.25, "w":2.75}, {"x":10, "y":5.25}, {"x":11, "y":5.25}, {"x":12, "y":5.25}, {"x":13.25, "y":5.5}, {"x":14.25, "y":5.5}, {"x":15.25, "y":5.5}] + } + } +} diff --git a/keyboards/cannonkeys/satisfaction75/rev1/rev1.h b/keyboards/cannonkeys/satisfaction75/rev1/rev1.h index 302b7e43def8..65ff16b9859d 100644 --- a/keyboards/cannonkeys/satisfaction75/rev1/rev1.h +++ b/keyboards/cannonkeys/satisfaction75/rev1/rev1.h @@ -24,7 +24,7 @@ #define LAYOUT_iso( \ K000, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K115, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K215, \ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K315, \ K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K415, \ K500, K501, K502, K505, K509, K510, K511, K512, K513, K515 \ From 4e23c700f19c8bf0da1fe810721fb02731591f49 Mon Sep 17 00:00:00 2001 From: Gary Zhao Date: Wed, 9 Oct 2019 12:05:31 -0700 Subject: [PATCH 083/316] [Keymap] Adding garyjzhao's Iris keymap (#6980) * Added Gary's user files * Added Gary's Iris Keymap files * Added Gary's Iris Keymap files * updated readme * removed comments * Cleaned up code even more --- keyboards/keebio/iris/keymaps/gary/README.md | 18 ++++++++ keyboards/keebio/iris/keymaps/gary/config.h | 12 +++++ keyboards/keebio/iris/keymaps/gary/keymap.c | 47 ++++++++++++++++++++ keyboards/keebio/iris/keymaps/gary/rules.mk | 2 + users/gary/gary.c | 1 + users/gary/gary.h | 43 ++++++++++++++++++ users/gary/readme.md | 14 ++++++ users/gary/rules.mk | 1 + 8 files changed, 138 insertions(+) create mode 100644 keyboards/keebio/iris/keymaps/gary/README.md create mode 100644 keyboards/keebio/iris/keymaps/gary/config.h create mode 100644 keyboards/keebio/iris/keymaps/gary/keymap.c create mode 100644 keyboards/keebio/iris/keymaps/gary/rules.mk create mode 100644 users/gary/gary.c create mode 100644 users/gary/gary.h create mode 100644 users/gary/readme.md create mode 100644 users/gary/rules.mk diff --git a/keyboards/keebio/iris/keymaps/gary/README.md b/keyboards/keebio/iris/keymaps/gary/README.md new file mode 100644 index 000000000000..fd50751d89e8 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/gary/README.md @@ -0,0 +1,18 @@ +# Gary's Iris Layout + +My personal keymap for my Iris. + +Copyright 2019 Gary @garyjzhao + +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 . diff --git a/keyboards/keebio/iris/keymaps/gary/config.h b/keyboards/keebio/iris/keymaps/gary/config.h new file mode 100644 index 000000000000..186aee502c10 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/gary/config.h @@ -0,0 +1,12 @@ +#pragma once + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS diff --git a/keyboards/keebio/iris/keymaps/gary/keymap.c b/keyboards/keebio/iris/keymaps/gary/keymap.c new file mode 100644 index 000000000000..41ac9207b85a --- /dev/null +++ b/keyboards/keebio/iris/keymaps/gary/keymap.c @@ -0,0 +1,47 @@ +#include "gary.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT_kc( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + TAB , Q , W , E , R , T , Y , U , I , O , P ,DEL , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + RASE, A , S , D , F , G , H , J , K , L ,SCLN,QUOT, + //|----+----+----+---- +----+----+----. ,----|----+----+----+----+----+----| + LSFT, Z , X , C , V , B ,NEXT, FULL , N , M ,COMM,DOT ,SLSH,SFTENT, + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + LGUI,LOWR,SPC , GARY, ENT,LALT + // `----+----+----' `----+----+----' + ), + + + [_LOWER] = LAYOUT_kc( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + GRV ,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSPC, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + CLTB, ,CNTR,UPLF,UPRG, , , ,PLUS,LBRC,RBRC,OPASS, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + ,LHLF,RHLF,DNLF,DNRG, , , ,MINS, , ,PIPE, + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|` + , , ,CTLC, , , , , , , ,EQL , ,UNDS , + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + , ,DEL , BSPC , , + // `----+----+----' `----+----+----' + ), + + [_RAISE] = LAYOUT_kc( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + TILD, F1 , F2 , F3 ,SHOT, F5 , F6 , F7 , F8 , F9 ,F10 ,F11 , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + ,MPRV,MPLY,MNXT, , , ,PGUP, UP ,PGDN, , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , ,VOLD,VOLU,MUTE, , ,LEFT,DOWN,RGHT, , , + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + , , , , , , , RST, , , , , , , + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + ,LALT, , , , + // `----+----+----' `----+----+----' + ), +}; diff --git a/keyboards/keebio/iris/keymaps/gary/rules.mk b/keyboards/keebio/iris/keymaps/gary/rules.mk new file mode 100644 index 000000000000..2df7e9a2034d --- /dev/null +++ b/keyboards/keebio/iris/keymaps/gary/rules.mk @@ -0,0 +1,2 @@ +RGBLIGHT_ENABLE = no +EXTRAKEY_ENABLE = yes diff --git a/users/gary/gary.c b/users/gary/gary.c new file mode 100644 index 000000000000..aa49e7d659e7 --- /dev/null +++ b/users/gary/gary.c @@ -0,0 +1 @@ +#include "gary.h" diff --git a/users/gary/gary.h b/users/gary/gary.h new file mode 100644 index 000000000000..10f233159105 --- /dev/null +++ b/users/gary/gary.h @@ -0,0 +1,43 @@ +#include QMK_KEYBOARD_H + +#pragma once +#define USE_SERIAL +#define MASTER_LEFT + +// Layers +// #define BASE 0 // Base layer +// #define FCTN 4 // Function +#define _QWERTY 0 +#define _LOWER 1 +#define _RAISE 2 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, +}; + +#define KC_RST RESET +#define KC_ KC_TRNS + +#define KC_LOWR MO(_LOWER) // Lower layer +#define KC_RASE MO(_RAISE) // Raise layer +#define KC_CTLC C(KC_C) +#define KC_CLTB C(KC_TAB) +#define KC_OPASS G(KC_BSLS) // GUI + Back Slash +#define KC_GARY LT(_RAISE, KC_SPC) // Hold for Raise, Tap for Space + +#define KC_SHOT SCMD(C(KC_4)) // Screenshot to Paste + +// Window Management +#define KC_FULL A(G(KC_F)) // Full Screen +#define KC_CNTR A(G(KC_C)) // Center +#define KC_LHLF A(G(KC_LEFT)) // Left Half +#define KC_RHLF A(G(KC_RGHT)) // Right Half + +#define KC_UPLF C(G(KC_LEFT)) // Upper Left +#define KC_UPRG C(G(KC_RGHT)) // Upper Right +#define KC_DNLF S(C(G(KC_LEFT))) // Lower Left +#define KC_DNRG S(C(G(KC_RGHT))) // Lower Right + +#define KC_NEXT LCAG(KC_LEFT) // Move the Window to next display diff --git a/users/gary/readme.md b/users/gary/readme.md new file mode 100644 index 000000000000..a8c22e5ae718 --- /dev/null +++ b/users/gary/readme.md @@ -0,0 +1,14 @@ +Copyright 2019 Gary @garyjzhao + +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 . diff --git a/users/gary/rules.mk b/users/gary/rules.mk new file mode 100644 index 000000000000..b6aa3490ba63 --- /dev/null +++ b/users/gary/rules.mk @@ -0,0 +1 @@ +SRC += gary.c From e58343596af5f749c5bc07aab3a897c6b6b5ac99 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Wed, 9 Oct 2019 15:23:57 -0700 Subject: [PATCH 084/316] Keyboard/ergodox debounce (#6994) * Set default debounce to 30 Lower debounce causes issues, and even 15 isn't lowe enough for the EZ * Cleanup ergodox ez matrix --- keyboards/ergodox_ez/config.h | 2 ++ keyboards/ergodox_ez/matrix.c | 10 ++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/keyboards/ergodox_ez/config.h b/keyboards/ergodox_ez/config.h index c35fe73941f7..bb51ec3215fd 100644 --- a/keyboards/ergodox_ez/config.h +++ b/keyboards/ergodox_ez/config.h @@ -40,6 +40,8 @@ along with this program. If not, see . #define MOUSEKEY_MAX_SPEED 7 #define MOUSEKEY_WHEEL_DELAY 0 +#define DEBOUNCE 30 + #define TAPPING_TOGGLE 1 /* define if matrix has ghost */ diff --git a/keyboards/ergodox_ez/matrix.c b/keyboards/ergodox_ez/matrix.c index 2bfe27b9a300..3c9a2f43a7c6 100644 --- a/keyboards/ergodox_ez/matrix.c +++ b/keyboards/ergodox_ez/matrix.c @@ -31,6 +31,12 @@ along with this program. If not, see . #include "matrix.h" #include "debounce.h" #include QMK_KEYBOARD_H + +// Only enable this if console is enabled to print to +#if defined(DEBUG_MATRIX_SCAN_RATE) && !defined(CONSOLE_ENABLE) +# undef DEBUG_MATRIX_SCAN_RATE +#endif + #ifdef DEBUG_MATRIX_SCAN_RATE # include "timer.h" #endif @@ -47,10 +53,6 @@ along with this program. If not, see . * that comment was written.) */ -#ifndef DEBOUNCE -# define DEBOUNCE 5 -#endif - /* matrix state(1:on, 0:off) */ static matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values static matrix_row_t matrix[MATRIX_ROWS]; // debounced values From da3ff89fac34117400bd19f0da8ac8b420827c15 Mon Sep 17 00:00:00 2001 From: Xavier Hahn Date: Thu, 10 Oct 2019 00:45:41 +0200 Subject: [PATCH 085/316] [Docs] French translation - Breaking Changes section (#6966) * Translated breaking_changes.md in French * Translated ChangeLog/20190830.md to French * Update docs/fr-FR/breaking_changes.md Co-Authored-By: Max Rumpf * Fix comments from @zekth Co-Authored-By: Vincent LE GOFF --- docs/fr-FR/ChangeLog/20190830.md | 52 +++++++++++++++ docs/fr-FR/_summary.md | 6 +- docs/fr-FR/breaking_changes.md | 107 +++++++++++++++++++++++++++++++ 3 files changed, 162 insertions(+), 3 deletions(-) create mode 100644 docs/fr-FR/ChangeLog/20190830.md create mode 100644 docs/fr-FR/breaking_changes.md diff --git a/docs/fr-FR/ChangeLog/20190830.md b/docs/fr-FR/ChangeLog/20190830.md new file mode 100644 index 000000000000..4ce1b0863156 --- /dev/null +++ b/docs/fr-FR/ChangeLog/20190830.md @@ -0,0 +1,52 @@ +# QMK Breaking Change - 30 août 2019 + +Quatre fois par an, QMK lance un processus pour fusionner les Breaking Changes. Un Breaking Change est un changement qui modifie la manière dont QMK fonctionne introduisant des incompatibilités ou des comportements dangereux. Nous n'effectuons ces changements que 4 fois par an afin que les utilisateurs n'aient pas peur de casser leurs keymaps en mettant à jour leur version de QMK. + +Ce document présente les fusions de Breaking Change. Voici la liste des changements. + +## Formattage de code Core avec clang-format + +* Tous les fichiers core (`drivers/`, `quantum/`, `tests/`, et `tmk_core/`) seront formattés avec clang-format +* Un processus travis pour reformatter les PRs lors de la fusion a été mis en place +* Vous pouvez utiliser la nouvelle commande CLI `qmk cformat` afin de formatter avant de soumettre votre PR si vous le souhaitez. + +## Nettoyage des descripteurs LUFA USB + +* Nettoyage du code lié aux descripteurs USB HID sur les claviers AVR, afin de les rendre plus simple à lire et compréhensibles +* Plus d'information: /~https://github.com/qmk/qmk_firmware/pull/4871 +* Normalement pas de changement de fonctionnement et aucune keymap modifiée. + +## Migration des entrées de `ACTION_LAYER_MOMENTARY()` dans `fn_actions` vers des keycodes `MO()` + +* `fn_actions` est déprécié, et ses fonctionnalités ont été remplacées par des keycodes directs et `process_record_user()` +* Supprimer cette fonctionnalité obsolète devrait aboutir à une réduction importante de la taille du firmware et de la complexité du code +* Il est recommandé que toutes les keymaps affectées remplacent `fn_actions` vers les fonctionnalités de [keycode custom](https://docs.qmk.fm/#/custom_quantum_functions) et [macro](https://docs.qmk.fm/#/feature_macros) + +## Mise à jour Atreus vers les conventions de codage courantes + +* Les doublons include guards ont contourné le comportement de traitement des headers attendu +* Il est recommandé pour toutes les keymaps affectées de supprimer le doublon de `/config.h` et `/keymaps//config.h` et de ne garder que des surcharges au niveau keymap + +## Récupération des changements de fichier keymap langage de la fork ZSA + +* Corrige une issue dans le fichier `keymap_br_abnt2.h` qui inclut la mauvaise souce (`keymap_common.h` au lieu de `keymap.h`) +* Met à jour le fichier `keymap_swedish.h` afin d'être spécifique au suédois et plus "nordique" en général. +* Toutes les keymaps qui utilisent ceci devront supprimer `NO_*` et le remplacer par `SE_*`. + +## Mise à jour du repo afin d'utiliser LUFA comme un sous-module git + +* `/lib/LUFA` supprimé du dépôt +* LUFA, définis comme un sous-module, pointe vers qmk/lufa +* Ceci devrait ajouter plus de flexibilité vers LUFA, et nous permet de garder le sous-module à jour bien plus facilement. Il avait environ 2 ans de retard, sans manière simple de corriger. Ce changement devrait simplifier la mise à jour dans le futur. + +## Migration des entrées `ACTION_BACKLIGHT_*()` dans `fn_actions` vers des keycodes `BL_` + +* `fn_actions` est déprécié, et ses fonctionnalités ont été remplacées par des keycodes directs et `process_record_user()` +* Toutes les keymaps utilisant ces actions doivent avoir les clés `KC_FN*` remplacées par les clés `BL_*` équivalentes +* Si vous utilisez actuellement `KC_FN*` vous devrez remplacer `fn_actions` avec les fonctionnalités de [keycode custom](https://docs.qmk.fm/#/custom_quantum_functions) et [macro](https://docs.qmk.fm/#/feature_macros) + +## Remplacer l'alias `KC_DELT` par `KC_DEL` + +* `KC_DELT` était un alias redondant et non documenté pour `KC_DELETE` +* Il a été supprimé et toutes ses utilisations ont été remplacées par l'alias plus courant `KC_DEL` +* Environ 90 keymaps (surtout des boards ErgoDox) ont été modifiées à cette fin diff --git a/docs/fr-FR/_summary.md b/docs/fr-FR/_summary.md index 204f03aabd4c..16ae82d06322 100644 --- a/docs/fr-FR/_summary.md +++ b/docs/fr-FR/_summary.md @@ -16,10 +16,10 @@ * [Comment utiliser GitHub](fr-FR/getting_started_github.md) * [Trouver de l'aide](fr-FR/getting_started_getting_help.md) -**En Anglais** +* [Breaking changes](fr-FR/breaking_changes.md) + * [30 août 2019](fr-FR/ChangeLog/20190830.md) -* [Changements non rétro-compatibles](breaking_changes.md) - * [30 Aout 2019](ChangeLog/20190830.md) +**En Anglais** * [FAQ](faq.md) * [FAQ Générale](faq_general.md) diff --git a/docs/fr-FR/breaking_changes.md b/docs/fr-FR/breaking_changes.md new file mode 100644 index 000000000000..6913dbd3f115 --- /dev/null +++ b/docs/fr-FR/breaking_changes.md @@ -0,0 +1,107 @@ +# Breaking changes + +Ce document décrit le processus de QMK pour la gestion des breaking changes. Un breaking change est un changement qui modifie la manière dont QMK fonctionne introduisant des incompatibilités ou des comportements dangereux. Nous limitons ces changements afin que les utilisateurs n'aient pas peur de casser leurs keymaps en mettant à jour leur version de QMK. + +La période de breaking change est quand nous allons fusionner un PR qui change QMK d'une manière dangereuse ou inattendue. Il y a une période interne de test afin de nous assurer que les problèmes résiduels sont rares ou impossible à prévoir. + +## Qu'est-ce qui a été inclus dans des Breaking Changes précédents? + +* [30 août 2019](ChangeLog/20190830.md) + +## Quand va être le prochain Breaking Change? + +Le prochain Breaking Change est planifié pour le 29 novembre. + +### Dates importantes + +* [x] 21 septembre 2019 - `future` est créé. Il va être rebasé de manière hebdomadaire. +* [ ] 01 novembre 2019 - `future` fermé aux nouveaux PRs. +* [ ] 01 novembre 2019 - Appel aux testeurs. +* [ ] 27 novembre 2019 - `master` est bloqué, pas de PRs fusionnés. +* [ ] 29 novembre 2019 - `future` est fusionné dans `master`. +* [ ] 30 novembre 2019 - `master` est débloqué. Les PRs peuvent à nouveau être fusionnés. + +## Quels changements seront inclus? + +Pour voir une liste de candidats de breaking changes, vous pouvez regardez la liste des [labels `breaking_change`](/~https://github.com/qmk/qmk_firmware/pulls?q=is%3Aopen+label%3Abreaking_change+is%3Apr). De nouveaux changements peuvent être ajoutés entre maintenant et lorsque `future` est fermée, et un PR avec ce label n'est pas garanti d'être fusionné. + +Si vous souhaitez que votre breaking change soit inclus dans ce tour, vous devez créer un PR avec le label `breaking_change` et faire en sorte qu'il soit accepté avant que `future` ne soit fermé. Une fois `future` fermé, aucun nouveau breaking change sera accepté. + +Critère d'acceptation: + +* Le PR est complété et prêt à fusionner +* Le PR a un ChangeLog + +# Checklists + +Cette section documente plusieurs processus que nous utilisons en lançant le processus de Breaking Change. + +## Rebase `future` de `master` + +Ceci est lancé chaque vendredi tant que `future` est ouvert. + +Processus: + +``` +cd qmk_firmware +git checkout master +git pull --ff-only +git checkout future +git rebase master +git push --force +``` + +## Créer la branche `future` + +Ceci est fait immédiatement après la fusion de la branche `future` précédente. + +* `qmk_firmware` git commands + * [ ] `git checkout master` + * [ ] `git pull --ff-only` + * [ ] `git checkout -b future` + * [ ] Modifie `readme.md` + * [ ] Ajoute un message en haut qui indique que c'est une branche de test. + * [ ] Ajoute un lien vers ce document + * [ ] `git commit -m 'Branch point for Breaking Change'` + * [ ] `git tag breakpoint___
` + * [ ] `git tag ` # Evite que le label point d'arrêt soit confondu par un incrément de version + * [ ] `git push origin future` + * [ ] `git push --tags` + +## 4 Semaines Avant la Fusion + +* `future` est maintenant fermé aux nouveaux PRs, seul des correctifs pour les PRs courants peuvent être mergés +* Envoi de l'appel aux testeurs + * [ ] Discord + * [ ] GitHub PR + * [ ] https://reddit.com/r/olkb + +## 1 Semaine Avant la Fusion + +* Annonce que master sera fermée entre <2 jours avant> à + * [ ] Discord + * [ ] GitHub PR + * [ ] https://reddit.com/r/olkb + +## 2 Jours Avant la Fusion + +* Annonce que master est fermé pour 2 jours + * [ ] Discord + * [ ] GitHub PR + * [ ] https://reddit.com/r/olkb + +## Jour de la fusion + +* `qmk_firmware` git commands + * [ ] `git checkout future` + * [ ] `git pull --ff-only` + * [ ] `git rebase origin/master` + * [ ] Modifie `readme.md` + * [ ] Supprimer les notes à propos de `future` + * [ ] Regroupe ChangeLog dans un fichier. + * [ ] `git commit -m 'Merge point for Breaking Change'` + * [ ] `git push origin future` +* Actions sur Github + * [ ] Crée un PR pour `future` + * [ ] S'assurer que Travis ne relève aucun problème + * [ ] Fusion le PR `future` From 528ddb79871b76d026c4b2ca8b1debf9feb1e751 Mon Sep 17 00:00:00 2001 From: Jono Warren <34277641+Micro-Biology@users.noreply.github.com> Date: Wed, 9 Oct 2019 23:55:27 +0100 Subject: [PATCH 086/316] [Keyboard] Added new layout for DZ60 and keymap (#6854) * Added new layout Added my preferred layout * Added my keymap * Update info.json Added LAYOUT_60_stand_stag_all * Update README.md Removed image from the keymap I based this layout from. * Update keyboards/dz60/keymaps/iso_vim_arrow_split_rs/keymap.c Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/dz60/keymaps/iso_vim_arrow_split_rs/keymap.c Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/dz60/info.json Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/dz60/dz60.h Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/dz60/info.json Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/dz60/keymaps/iso_vim_arrow_split_rs/keymap.c Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/dz60/dz60.h Co-Authored-By: fauxpark * Update rules.mk Removed verbose rules.mk --- keyboards/dz60/dz60.h | 27 ++++++++++ keyboards/dz60/info.json | 6 ++- .../keymaps/iso_vim_arrow_split_rs/README.md | 3 ++ .../keymaps/iso_vim_arrow_split_rs/keymap.c | 49 +++++++++++++++++++ .../keymaps/iso_vim_arrow_split_rs/rules.mk | 7 +++ 5 files changed, 91 insertions(+), 1 deletion(-) create mode 100644 keyboards/dz60/keymaps/iso_vim_arrow_split_rs/README.md create mode 100644 keyboards/dz60/keymaps/iso_vim_arrow_split_rs/keymap.c create mode 100644 keyboards/dz60/keymaps/iso_vim_arrow_split_rs/rules.mk diff --git a/keyboards/dz60/dz60.h b/keyboards/dz60/dz60.h index 172085be4f74..7a5096cbfcc9 100644 --- a/keyboards/dz60/dz60.h +++ b/keyboards/dz60/dz60.h @@ -548,4 +548,31 @@ { k40, k41, KC_NO, k43, KC_NO, KC_NO, k46, KC_NO, KC_NO, KC_NO, k4a, KC_NO, k4c, k4d, k4e } \ } +/* LAYOUT_60_iso_5x1u_split_bs_rshift_spc + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0a │0b │0c │0d │0e │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │10 │12 │13 │14 │15 │16 │17 │18 │19 │1a │1b │1c │1d │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐2d │ + * │20 │22 │23 │24 │25 │26 │27 │28 │29 │2a │2b │2c │1e │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┤ + * │30 |31 │32 │33 │34 │35 │36 │37 │38 │39 │3a │3b │3d │3e │ + * ├────┼───┴┬──┴─┬─┴───┴──┬┴───┼───┴───┴──┬┴──┬┴──┬┴──┬───┼───┤ + * │40 │41 │43 │44 │46 │48 │4a │4b │4c │4d │4e │ + * └────┴────┴────┴────────┴────┴──────────┴───┴───┴───┴───┴───┘ +*/ +#define LAYOUT_60_iso_5x1u_split_bs_rshift_spc( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \ + k10, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k1e, k2d, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, k3e, \ + k40, k41, k43, k44, k46, k48, k4a, k4b, k4c, k4d, k4e \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e }, \ + { k10, KC_NO, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e }, \ + { k20, KC_NO, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, KC_NO }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, KC_NO,k3d, k3e }, \ + { k40, k41, KC_NO, k43, k44, KC_NO, k46, KC_NO, k48, KC_NO, k4a, k4b, k4c, k4d, k4e } \ +} + #endif diff --git a/keyboards/dz60/info.json b/keyboards/dz60/info.json index 7d1717b6f23e..fac53a1396d6 100644 --- a/keyboards/dz60/info.json +++ b/keyboards/dz60/info.json @@ -80,6 +80,10 @@ "LAYOUT_60_2_function": { "key_count": 63, "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"|", "x":13, "y":0}, {"label":"~", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Backspace", "x":13.5, "y":1, "w":1.5}, {"label":"Control", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Fn", "x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"GUI", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.5}, {"label":"Control", "x":11.5, "y":4, "w":1.5}, {"label":"GUI", "x":13, "y":4}, {"label":"Fn2", "x":14, "y":4}] - } + }, + "LAYOUT_60_iso_5x1u_split_bs_rshift_spc": { + "key_count": 67, + "layout": [{"label":"Esc/¬", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"£", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Del", "x":13, "y":0, "w":1}, {"label":"Backspace", "x":14, "y":0, "w":1}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"CapsLock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"@", "x":11.75, "y":2}, {"label":"~", "x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"VolUp", "x":14, "y":3, "w":1}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":2.25}, {"x":6.00, "y":4, "w":1.25}, {"x":7.25, "y":4, "w":2.75}, {"label":"Left", "x":10, "y":4, "w":1}, {"label":"Down", "x":11, "y":4, "w":1}, {"label":"Up", "x":12, "y":4, "w":1}, {"label":"Right", "x":13, "y":4, "w":1}, {"label":"VolDown", "x":14, "y":4, "w":1}] + }, } } diff --git a/keyboards/dz60/keymaps/iso_vim_arrow_split_rs/README.md b/keyboards/dz60/keymaps/iso_vim_arrow_split_rs/README.md new file mode 100644 index 000000000000..e0fbb2dfc69b --- /dev/null +++ b/keyboards/dz60/keymaps/iso_vim_arrow_split_rs/README.md @@ -0,0 +1,3 @@ +# ISO layout with VIM style arrow cluster + +Vim arrow keys with split right shift and backspace (currently not utilised in this layout but I thought I would add it to make it easier for people to add it for their layouts). diff --git a/keyboards/dz60/keymaps/iso_vim_arrow_split_rs/keymap.c b/keyboards/dz60/keymaps/iso_vim_arrow_split_rs/keymap.c new file mode 100644 index 000000000000..8c34b606ae0e --- /dev/null +++ b/keyboards/dz60/keymaps/iso_vim_arrow_split_rs/keymap.c @@ -0,0 +1,49 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* + * ,-----------------------------------------------------------. + * |Esc|1 !|2 "|3 £|4 $|5 %|6 ^|7 &|8 *|9 (|0 )|- _|= +|bck|bck| + * |-----------------------------------------------------------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P |[ {|] }|Enter| + * |------------------------------------------------------. | + * | Fn1 | A | S | D | F | G | H | J | K | L |; :|' @|# ~| | + * |-----------------------------------------------------------| + * |Sft |\ || Z | X | C | V | B | N | M |, <|. >|/ ?| Caps |vU | + * |-----------------------------------------------------------| + * |Ctrl |GUI|Alt | Space |Lft|Dwn|Up |Rht|vD | + * `-----------------------------------------------------------' + */ + LAYOUT_60_iso_5x1u_split_bs_rshift_spc( +//QWERTY Base layer: +// 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 + KC_GESC, 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_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, + MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_CAPS, KC_VOLU, + KC_LCTL, KC_LGUI, KC_LALT, KC_NO, KC_SPC, KC_NO, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,KC_VOLD + ), + + + LAYOUT_60_iso_5x1u_split_bs_rshift_spc( +//F key layer: +// 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_DEL, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + LAYOUT_60_iso_5x1u_split_bs_rshift_spc( +//Reset by holding Fn1 and Fn2 and press the D key +// 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + +}; diff --git a/keyboards/dz60/keymaps/iso_vim_arrow_split_rs/rules.mk b/keyboards/dz60/keymaps/iso_vim_arrow_split_rs/rules.mk new file mode 100644 index 000000000000..3bfdaadaf7f5 --- /dev/null +++ b/keyboards/dz60/keymaps/iso_vim_arrow_split_rs/rules.mk @@ -0,0 +1,7 @@ +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no From ed1bf3afa25d7e7674df7e8618dfaf243de3058b Mon Sep 17 00:00:00 2001 From: fauxpark Date: Thu, 10 Oct 2019 21:48:37 +1100 Subject: [PATCH 087/316] Prevent clang-format messing up placeholder tokens within keyboard templates (#6790) * Use .template file extension for keyboard template files * Filter out .template files completely before passing to clang-format * Undo file extension stuff; just ignore quantum/template dir --- quantum/template/avr/config.h | 10 ++++---- .../template/avr/{template.c => keyboard.c} | 0 .../template/base/{template.h => keyboard.h} | 10 ++++++-- .../template/base/keymaps/default/keymap.c | 23 ++++++++++++++----- .../template/base/keymaps/default/readme.md | 2 +- quantum/template/ps2avrgb/config.h | 11 ++++----- .../ps2avrgb/{template.c => keyboard.c} | 0 util/new_keyboard.sh | 4 ++-- util/travis_compiled_push.sh | 2 +- 9 files changed, 37 insertions(+), 25 deletions(-) rename quantum/template/avr/{template.c => keyboard.c} (100%) rename quantum/template/base/{template.h => keyboard.h} (89%) rename quantum/template/ps2avrgb/{template.c => keyboard.c} (100%) diff --git a/quantum/template/avr/config.h b/quantum/template/avr/config.h index 713d6be3a505..304a54ae59a9 100644 --- a/quantum/template/avr/config.h +++ b/quantum/template/avr/config.h @@ -23,8 +23,8 @@ along with this program. If not, see . #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x0000 #define DEVICE_VER 0x0001 -#define MANUFACTURER % YOUR_NAME % -#define PRODUCT % KEYBOARD % +#define MANUFACTURER %YOUR_NAME% +#define PRODUCT %KEYBOARD% #define DESCRIPTION A custom keyboard /* key matrix size */ @@ -41,10 +41,8 @@ along with this program. If not, see . * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) * */ -#define MATRIX_ROW_PINS \ - { D0, D5 } -#define MATRIX_COL_PINS \ - { F1, F0, B0 } +#define MATRIX_ROW_PINS { D0, D5 } +#define MATRIX_COL_PINS { F1, F0, B0 } #define UNUSED_PINS /* COL2ROW, ROW2COL*/ diff --git a/quantum/template/avr/template.c b/quantum/template/avr/keyboard.c similarity index 100% rename from quantum/template/avr/template.c rename to quantum/template/avr/keyboard.c diff --git a/quantum/template/base/template.h b/quantum/template/base/keyboard.h similarity index 89% rename from quantum/template/base/template.h rename to quantum/template/base/keyboard.h index 595da73c60e3..2e531b1fd42b 100644 --- a/quantum/template/base/template.h +++ b/quantum/template/base/keyboard.h @@ -25,5 +25,11 @@ * The second converts the arguments into a two-dimensional array which * represents the switch matrix. */ -#define LAYOUT(k00, k01, k02, k10, k11) \ - { {k00, k01, k02}, {k10, KC_NO, k11}, } +#define LAYOUT( \ + k00, k01, k02, \ + k10, k11 \ +) \ +{ \ + { k00, k01, k02 }, \ + { k10, KC_NO, k11 }, \ +} diff --git a/quantum/template/base/keymaps/default/keymap.c b/quantum/template/base/keymaps/default/keymap.c index 308cb92a7760..3508055b7866 100644 --- a/quantum/template/base/keymaps/default/keymap.c +++ b/quantum/template/base/keymaps/default/keymap.c @@ -16,11 +16,16 @@ #include QMK_KEYBOARD_H // Defines the keycodes used by our macros in process_record_user -enum custom_keycodes { QMKBEST = SAFE_RANGE, QMKURL }; +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT(/* Base */ - KC_A, KC_1, KC_H, KC_TAB, KC_SPC), + [0] = LAYOUT( /* Base */ + KC_A, KC_1, KC_H, + KC_TAB, KC_SPC + ), }; bool process_record_user(uint16_t keycode, keyrecord_t *record) { @@ -45,8 +50,14 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } -void matrix_init_user(void) {} +void matrix_init_user(void) { + +} -void matrix_scan_user(void) {} +void matrix_scan_user(void) { -void led_set_user(uint8_t usb_led) {} +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/quantum/template/base/keymaps/default/readme.md b/quantum/template/base/keymaps/default/readme.md index 21aa663d55b8..e052ed80f14d 100644 --- a/quantum/template/base/keymaps/default/readme.md +++ b/quantum/template/base/keymaps/default/readme.md @@ -1 +1 @@ -# The default keymap for %KEYBOARD% \ No newline at end of file +# The default keymap for %KEYBOARD% diff --git a/quantum/template/ps2avrgb/config.h b/quantum/template/ps2avrgb/config.h index a780a10afc39..f6d7c25e0449 100644 --- a/quantum/template/ps2avrgb/config.h +++ b/quantum/template/ps2avrgb/config.h @@ -23,7 +23,7 @@ along with this program. If not, see . #define PRODUCT_ID 0x422D #define DEVICE_VER 0x0001 #define MANUFACTURER You -#define PRODUCT % KEYBOARD % +#define PRODUCT %KEYBOARD% #define DESCRIPTION A custom keyboard #define RGBLED_NUM 16 @@ -31,13 +31,10 @@ along with this program. If not, see . #define MATRIX_ROWS 8 #define MATRIX_COLS 11 -#define MATRIX_ROW_PINS \ - { B0, B1, B2, B3, B4, B5, B6, B7 } -#define MATRIX_COL_PINS \ - { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5 } +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 } +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5 } // #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, C1, C0, D7 } -#define UNUSED_PINS \ - {} +#define UNUSED_PINS {} #define DIODE_DIRECTION COL2ROW #define DEBOUNCE 5 diff --git a/quantum/template/ps2avrgb/template.c b/quantum/template/ps2avrgb/keyboard.c similarity index 100% rename from quantum/template/ps2avrgb/template.c rename to quantum/template/ps2avrgb/keyboard.c diff --git a/util/new_keyboard.sh b/util/new_keyboard.sh index 35d89e4026b0..fe7c1a8299c4 100755 --- a/util/new_keyboard.sh +++ b/util/new_keyboard.sh @@ -41,8 +41,8 @@ copy_templates() { echo " done" echo -n "Renaming keyboard files..." - mv "${keyboard_dir}/template.c" "${keyboard_dir}/${keyboard_name}.c" - mv "${keyboard_dir}/template.h" "${keyboard_dir}/${keyboard_name}.h" + mv "${keyboard_dir}/keyboard.c" "${keyboard_dir}/${keyboard_name}.c" + mv "${keyboard_dir}/keyboard.h" "${keyboard_dir}/${keyboard_name}.h" echo " done" } diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh index 4737d693b8d7..8ca65f21a05d 100755 --- a/util/travis_compiled_push.sh +++ b/util/travis_compiled_push.sh @@ -12,7 +12,7 @@ if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]] ; the # fix formatting git checkout master git diff --diff-filter=AM --name-only -n 1 -z ${TRAVIS_COMMIT_RANGE} | xargs -0 dos2unix -git diff --diff-filter=AM --name-only -n 1 -z ${TRAVIS_COMMIT_RANGE} | grep -e '^drivers' -e '^quantum' -e '^tests' -e '^tmk_core' | xargs -0 clang-format +git diff --diff-filter=AM --name-only -n 1 -z ${TRAVIS_COMMIT_RANGE} | grep -e '^drivers' -e '^quantum' -e '^tests' -e '^tmk_core' | grep -v 'quantum/template' | xargs -0 clang-format git diff --diff-filter=AM --name-only -n 1 -z ${TRAVIS_COMMIT_RANGE} | xargs -0 git add git commit -m "format code according to conventions [skip ci]" && git push git@github.com:qmk/qmk_firmware.git master From 5156a7e05c44e996a3a9c1e590964a5c4d333dd9 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Thu, 10 Oct 2019 07:58:38 -0700 Subject: [PATCH 088/316] fix DZ60 info.json (#7000) --- keyboards/dz60/info.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/dz60/info.json b/keyboards/dz60/info.json index fac53a1396d6..c06b50709eb8 100644 --- a/keyboards/dz60/info.json +++ b/keyboards/dz60/info.json @@ -84,6 +84,6 @@ "LAYOUT_60_iso_5x1u_split_bs_rshift_spc": { "key_count": 67, "layout": [{"label":"Esc/¬", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"£", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Del", "x":13, "y":0, "w":1}, {"label":"Backspace", "x":14, "y":0, "w":1}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"CapsLock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"@", "x":11.75, "y":2}, {"label":"~", "x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"VolUp", "x":14, "y":3, "w":1}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":2.25}, {"x":6.00, "y":4, "w":1.25}, {"x":7.25, "y":4, "w":2.75}, {"label":"Left", "x":10, "y":4, "w":1}, {"label":"Down", "x":11, "y":4, "w":1}, {"label":"Up", "x":12, "y":4, "w":1}, {"label":"Right", "x":13, "y":4, "w":1}, {"label":"VolDown", "x":14, "y":4, "w":1}] - }, + } } } From 918f13a4ac7cc71f266fa294d093b9c46f61ae77 Mon Sep 17 00:00:00 2001 From: Leivince John Marte Date: Fri, 11 Oct 2019 05:48:03 +0800 Subject: [PATCH 089/316] =?UTF-8?q?Fix/projectkb/alice/right=20spacebar=20?= =?UTF-8?q?layout=20size=20from=202.25=20to=202.7=E2=80=A6=20(#6984)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Added KBD6X Vimwarrior HHKB TOFU Personal Layout * Added Readme.md for Vimwarrior HHKB Tofu Keymap * Added DZ60 Vimwarrior WKL Tofu Keymap * Update Rename keymaps to devinceble_hhkb_tofu and devinceble_wkl_tofu * Update rules.mk Added BOOTLOADER config. * [Keymap] Added devinceble keymap for TADA68 * Fix projectkb/alice Right Spacebar Size to 2.75 not a bug though but confusing * Update Right Alt for Layout Fix --- keyboards/projectkb/alice/info.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/projectkb/alice/info.json b/keyboards/projectkb/alice/info.json index fbeef50cc31d..a94c1352c017 100644 --- a/keyboards/projectkb/alice/info.json +++ b/keyboards/projectkb/alice/info.json @@ -74,8 +74,8 @@ {"label":"Alt", "x":5, "y":4.25, "w":1.5}, {"label":"Space", "x":6.5, "y":4.25, "w":2}, {"label":"Menu", "x":8.5, "y":4.25}, - {"label":"Space", "x":10.25, "y":4.25, "w":2.25}, - {"label":"Alt", "x":12.5, "y":4.25, "w":1.5}, + {"label":"Space", "x":10.25, "y":4.25, "w":2.75}, + {"label":"Alt", "x":13, "y":4.25, "w":1.5}, {"label":"Ctrl", "x":18, "y":4.25, "w":1.5} ] } From 094aa7c24b1d7d8fbea8404c93c2a3e99106d65b Mon Sep 17 00:00:00 2001 From: Olivierko Date: Thu, 10 Oct 2019 23:52:16 +0200 Subject: [PATCH 090/316] added new layout and Olivierko keymap for dz60 (#6996) * - added new layout for dz60 - created personal keymap using new layout * - changes based on pr feedback from @noroadsleft * - further readme formatting * Apply suggestions from code review applied changes based on review feedback Co-Authored-By: fauxpark * - readme formatting * Apply suggestions from code review Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> --- keyboards/dz60/dz60.h | 26 +++++++ keyboards/dz60/info.json | 6 +- keyboards/dz60/keymaps/olivierko/keymap.c | 87 ++++++++++++++++++++++ keyboards/dz60/keymaps/olivierko/readme.md | 21 ++++++ 4 files changed, 139 insertions(+), 1 deletion(-) create mode 100644 keyboards/dz60/keymaps/olivierko/keymap.c create mode 100644 keyboards/dz60/keymaps/olivierko/readme.md diff --git a/keyboards/dz60/dz60.h b/keyboards/dz60/dz60.h index 7a5096cbfcc9..29e57f801128 100644 --- a/keyboards/dz60/dz60.h +++ b/keyboards/dz60/dz60.h @@ -575,4 +575,30 @@ { k40, k41, KC_NO, k43, k44, KC_NO, k46, KC_NO, k48, KC_NO, k4a, k4b, k4c, k4d, k4e } \ } +/* LAYOUT_60_olivierko + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0a │0b │0c │0d │0e │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │10 │12 │13 │14 │15 │16 │17 │18 │19 │1a │1b │1c │1d │1e │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │20 │22 │23 │24 │25 │26 │27 │28 │29 │2a │2b │2c │2d │ + * ├──────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬───────┤ + * │30 │32 │33 │34 │35 │36 │37 │38 │39 │3a │3b │3c │3d │ + * ├─────┬─┴─┬─┴───┼───┴───┴───┴───┴───┴───┴───┼───┼───┼───┬───┤ + * │40 │41 │43 │46 (7u) │4b │4c │4d │4e │ + * └─────┴───┴─────┴───────────────────────────┴───┴───┴───┴───┘ +*/ +#define LAYOUT_olivierko( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \ + k10, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, \ + k20, 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, k43, k46, k4b, k4c, k4d, k4e \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e }, \ + { k10, KC_NO, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e }, \ + { k20, KC_NO, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, KC_NO }, \ + { k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, KC_NO }, \ + { k40, k41, KC_NO, k43, KC_NO, KC_NO, k46, KC_NO, KC_NO, KC_NO, KC_NO, k4b, k4c, k4d, k4e } \ +} #endif diff --git a/keyboards/dz60/info.json b/keyboards/dz60/info.json index c06b50709eb8..b0df9379779b 100644 --- a/keyboards/dz60/info.json +++ b/keyboards/dz60/info.json @@ -80,10 +80,14 @@ "LAYOUT_60_2_function": { "key_count": 63, "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"|", "x":13, "y":0}, {"label":"~", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Backspace", "x":13.5, "y":1, "w":1.5}, {"label":"Control", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Fn", "x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"GUI", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.5}, {"label":"Control", "x":11.5, "y":4, "w":1.5}, {"label":"GUI", "x":13, "y":4}, {"label":"Fn2", "x":14, "y":4}] - }, + }, "LAYOUT_60_iso_5x1u_split_bs_rshift_spc": { "key_count": 67, "layout": [{"label":"Esc/¬", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"£", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Del", "x":13, "y":0, "w":1}, {"label":"Backspace", "x":14, "y":0, "w":1}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"CapsLock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"@", "x":11.75, "y":2}, {"label":"~", "x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"VolUp", "x":14, "y":3, "w":1}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":2.25}, {"x":6.00, "y":4, "w":1.25}, {"x":7.25, "y":4, "w":2.75}, {"label":"Left", "x":10, "y":4, "w":1}, {"label":"Down", "x":11, "y":4, "w":1}, {"label":"Up", "x":12, "y":4, "w":1}, {"label":"Right", "x":13, "y":4, "w":1}, {"label":"VolDown", "x":14, "y":4, "w":1}] + }, + "LAYOUT_olivierko": { + "key_count": 63, + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"|", "x":13, "y":0}, {"label":"~", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Backspace", "x":13.5, "y":1, "w":1.5}, {"label":"Fn", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2}, {"label":"Z", "x":2, "y":3}, {"label":"X", "x":3, "y":3}, {"label":"C", "x":4, "y":3}, {"label":"V", "x":5, "y":3}, {"label":"B", "x":6, "y":3}, {"label":"N", "x":7, "y":3}, {"label":"M", "x":8, "y":3}, {"label":"<", "x":9, "y":3}, {"label":">", "x":10, "y":3}, {"label":"?", "x":11, "y":3}, {"label":"↑", "x":12, "y":3}, {"label":"Shift", "x":13, "y":3, "w":2}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"←", "x":11, "y":4}, {"label":"↓", "x":12, "y":4}, {"label":"→", "x":13, "y":4}, {"label":"Ctrl", "x":14, "y":4}] } } } diff --git a/keyboards/dz60/keymaps/olivierko/keymap.c b/keyboards/dz60/keymaps/olivierko/keymap.c new file mode 100644 index 000000000000..38d12d4d4b8f --- /dev/null +++ b/keyboards/dz60/keymaps/olivierko/keymap.c @@ -0,0 +1,87 @@ +#include QMK_KEYBOARD_H + +enum keyboard_layers { + _BL, + _SL, + _FL, + _CL, +}; + +enum custom_keycodes { + SWE_AA = SAFE_RANGE, + SWE_AE, + SWE_OE, +}; + +char *alt_codes[][2] = { + { + SS_LALT(SS_TAP(X_KP_0)SS_TAP(X_KP_2)SS_TAP(X_KP_2)SS_TAP(X_KP_9)), // Alt+0229 → å + SS_LALT(SS_TAP(X_KP_0)SS_TAP(X_KP_1)SS_TAP(X_KP_9)SS_TAP(X_KP_7)), // Alt+0197 → Å + }, + { + SS_LALT(SS_TAP(X_KP_0)SS_TAP(X_KP_2)SS_TAP(X_KP_2)SS_TAP(X_KP_8)), // Alt+0228 → ä + SS_LALT(SS_TAP(X_KP_0)SS_TAP(X_KP_1)SS_TAP(X_KP_9)SS_TAP(X_KP_6)), // Alt+0196 → Ä + }, + { + SS_LALT(SS_TAP(X_KP_0)SS_TAP(X_KP_2)SS_TAP(X_KP_4)SS_TAP(X_KP_6)), // Alt+0246 → ö + SS_LALT(SS_TAP(X_KP_0)SS_TAP(X_KP_2)SS_TAP(X_KP_1)SS_TAP(X_KP_4)), // Alt+0214 → Ö + }, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BL] = LAYOUT_olivierko( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, + MO(_FL), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LEFT, KC_DOWN, KC_RIGHT, KC_RCTL), + + [_SL] = LAYOUT_olivierko( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, SWE_AA, KC_NO, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, SWE_OE, SWE_AE, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + [_FL] = LAYOUT_olivierko( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_PAUSE, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DELETE, + KC_NO, DF(_BL), DF(_SL), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_INS, + KC_LSFT, KC_NO, KC_NO, KC_CAPS, KC_NO, KC_NO, KC_NO, KC_MUTE, KC_NO, KC_NO, KC_NO, KC_PGUP, KC_RSFT, + KC_LCTL, MO(_CL), KC_LALT, KC_MPLY, KC_HOME, KC_PGDOWN, KC_END, KC_RCTL), + + [_CL] = LAYOUT_olivierko( + RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, DEBUG, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_RSFT, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) +{ + if (!record->event.pressed) + return true; + + switch (keycode) { + case SWE_AA: + case SWE_AE: + case SWE_OE: { + uint16_t index = keycode - SWE_AA; + uint8_t shift = get_mods() & (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)); + + unregister_code(KC_LSFT); + unregister_code(KC_RSFT); + + send_string(alt_codes[index][(bool)shift]); + + if (shift & MOD_BIT(KC_LSFT)) register_code(KC_LSFT); + if (shift & MOD_BIT(KC_RSFT)) register_code(KC_RSFT); + + return false; + } + default: + return true; + } +} \ No newline at end of file diff --git a/keyboards/dz60/keymaps/olivierko/readme.md b/keyboards/dz60/keymaps/olivierko/readme.md new file mode 100644 index 000000000000..54ade6d78e69 --- /dev/null +++ b/keyboards/dz60/keymaps/olivierko/readme.md @@ -0,0 +1,21 @@ +# DZ60 +### _BL: +Base layer with american ANSI layout. + +![_BL](https://i.imgur.com/BPMn7dk.png) +### _SL: +Swedish layer with ÅÄÖ at original positions. + +![_SL](https://i.imgur.com/I8QRh24.png) +### _FL: +Function layer including various extra keys. + +![_FL](https://i.imgur.com/nCbCIrZ.png) +### _CL: +Control layer for managing RGB and flashing. + +![_CL](https://i.imgur.com/QnoMgsb.png) +### Make command: +```sh +make dz60:olivierko:flash +``` \ No newline at end of file From 64c075ed2c2e2ddb2da9321bf17ed911d758a9b2 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Fri, 11 Oct 2019 12:11:47 +0100 Subject: [PATCH 091/316] Fix CONVERT_TO_PROTON_C_RXLED pins (#7007) --- quantum/config_common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quantum/config_common.h b/quantum/config_common.h index fb9f1fd00a66..80715f2fcd2e 100644 --- a/quantum/config_common.h +++ b/quantum/config_common.h @@ -175,7 +175,7 @@ // LEDs (only D5/C13 uses an actual LED) # ifdef CONVERT_TO_PROTON_C_RXLED -# define D5 PAL_LINE(GPIOC, 13) +# define D5 PAL_LINE(GPIOC, 14) # define B0 PAL_LINE(GPIOC, 13) # else # define D5 PAL_LINE(GPIOC, 13) From 76378d74f522f53eebc05907d44c839455a0336b Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sat, 12 Oct 2019 04:25:43 +0100 Subject: [PATCH 092/316] ARM split - detect USB to select master/slave (#6424) * Initial split refactor to allow usb master detection * Add split USB detect docs * Add SPLIT_USB_DETECT demo mode limitation * fix rebase issues * clang-format --- docs/config_options.md | 8 ++++++++ docs/feature_split_keyboard.md | 12 +++++++++++ quantum/split_common/matrix.c | 4 +--- quantum/split_common/split_util.c | 33 +++++++++++++++++++++++++------ quantum/split_common/split_util.h | 1 + 5 files changed, 49 insertions(+), 9 deletions(-) diff --git a/docs/config_options.md b/docs/config_options.md index 9e43f47c259e..ec3d1a1c8ab2 100644 --- a/docs/config_options.md +++ b/docs/config_options.md @@ -267,6 +267,14 @@ There are a few different ways to set handedness for split keyboards (listed in * 4: about 26kbps * 5: about 20kbps +* `#define SPLIT_USB_DETECT` + * Detect (with timeout) USB connection when delegating master/slave + * Default behavior for ARM + * Required for AVR Teensy + +* `#define SPLIT_USB_TIMEOUT 2500` + * Maximum timeout when detecting master/slave when using `SPLIT_USB_DETECT` + # The `rules.mk` File This is a [make](https://www.gnu.org/software/make/manual/make.html) file that is included by the top-level `Makefile`. It is used to set some information about the MCU that we will be compiling for as well as enabling and disabling certain features. diff --git a/docs/feature_split_keyboard.md b/docs/feature_split_keyboard.md index 42dd838d0da9..efc65a4c700a 100644 --- a/docs/feature_split_keyboard.md +++ b/docs/feature_split_keyboard.md @@ -190,6 +190,18 @@ This sets how many LEDs are directly connected to each controller. The first nu ?> This setting implies that `RGBLIGHT_SPLIT` is enabled, and will forcibly enable it, if it's not. +```c +#define SPLIT_USB_DETECT +``` +This option changes the startup behavior to detect an active USB connection when delegating master/slave. If this operation times out, then the half is assume to be a slave. This is the default behavior for ARM, and required for AVR Teensy boards (due to hardware limitations). + +?> This setting will stop the ability to demo using battery packs. + +```c +#define SPLIT_USB_TIMEOUT 2500 +``` +This sets the maximum timeout when detecting master/slave when using `SPLIT_USB_DETECT`. + ## Additional Resources Nicinabox has a [very nice and detailed guide](/~https://github.com/nicinabox/lets-split-guide) for the Let's Split keyboard, that covers most everything you need to know, including troubleshooting information. diff --git a/quantum/split_common/matrix.c b/quantum/split_common/matrix.c index 313f7830b647..7176d0cc4f33 100644 --- a/quantum/split_common/matrix.c +++ b/quantum/split_common/matrix.c @@ -246,9 +246,7 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) #endif void matrix_init(void) { - debug_enable = true; - debug_matrix = true; - debug_mouse = true; + keyboard_split_setup(); // Set pinout for right half if pinout for that half is defined if (!isLeftHand) { diff --git a/quantum/split_common/split_util.c b/quantum/split_common/split_util.c index d16a989770ad..8983861bcce6 100644 --- a/quantum/split_common/split_util.c +++ b/quantum/split_common/split_util.c @@ -14,8 +14,27 @@ # include "rgblight.h" #endif +#ifndef SPLIT_USB_TIMEOUT +# define SPLIT_USB_TIMEOUT 2500 +#endif + volatile bool isLeftHand = true; +bool waitForUsb(void) { + for (uint8_t i = 0; i < (SPLIT_USB_TIMEOUT / 100); i++) { + // This will return true of a USB connection has been established +#if defined(__AVR__) + if (UDADDR & _BV(ADDEN)) { +#else + if (usbGetDriverStateI(&USBD1) == USB_ACTIVE) { +#endif + return true; + } + wait_ms(100); + } + return false; +} + __attribute__((weak)) bool is_keyboard_left(void) { #if defined(SPLIT_HAND_PIN) // Test pin SPLIT_HAND_PIN for High/Low, if low it's right hand @@ -31,21 +50,23 @@ __attribute__((weak)) bool is_keyboard_left(void) { } __attribute__((weak)) bool is_keyboard_master(void) { -#ifdef __AVR__ static enum { UNKNOWN, MASTER, SLAVE } usbstate = UNKNOWN; // only check once, as this is called often if (usbstate == UNKNOWN) { +#if defined(SPLIT_USB_DETECT) || defined(PROTOCOL_CHIBIOS) + usbstate = waitForUsb() ? MASTER : SLAVE; +#elif defined(__AVR__) USBCON |= (1 << OTGPADE); // enables VBUS pad wait_us(5); usbstate = (USBSTA & (1 << VBUS)) ? MASTER : SLAVE; // checks state of VBUS +#else + usbstate = MASTER; +#endif } return (usbstate == MASTER); -#else - return true; -#endif } static void keyboard_master_setup(void) { @@ -59,8 +80,8 @@ static void keyboard_master_setup(void) { static void keyboard_slave_setup(void) { transport_slave_init(); } -// this code runs before the usb and keyboard is initialized -void matrix_setup(void) { +// this code runs before the keyboard is fully initialized +void keyboard_split_setup(void) { isLeftHand = is_keyboard_left(); #if defined(RGBLIGHT_ENABLE) && defined(RGBLED_SPLIT) diff --git a/quantum/split_common/split_util.h b/quantum/split_common/split_util.h index f41c77605b1f..5d9c523400e1 100644 --- a/quantum/split_common/split_util.h +++ b/quantum/split_common/split_util.h @@ -8,3 +8,4 @@ extern volatile bool isLeftHand; void matrix_master_OLED_init(void); +void keyboard_split_setup(void); From 22aa2ce6b2f3bda51aca84d8f707c17f0301ff3b Mon Sep 17 00:00:00 2001 From: Laurent Lao <32573725+laurentlaurent@users.noreply.github.com> Date: Sat, 12 Oct 2019 00:35:53 -0400 Subject: [PATCH 093/316] [Keymap] laurentlaurent's preonic keymap (#6977) * Removed ugfx binary because of antivirus * Created laurent's keymap * Made QWERTY Mac and QWERTY Windows * Rev 1.0, added _PUNC, _NAV, _EXTRA * REV 1.1, Dynamic macros start/stop now plays a sound, Lower acts like backspace on tap * Formatting fixes * Added Intellisense macro, fixed formatting * Improved ergonomics/muscle mem on punctuation lay * Added Raise Tap to Backspace * Mirrored Ergodox, added One-Handed * Added layers in README.md, added Caps lock, Scroll lock * Moved Caps to better location * Added ErgoDox link * Edit Readme.md with more layer switching information * Modified _PUNC for muscle memory * Reverted .gitignore and .vscode settings.json to reflect master * Improved formatting according to PR review * QMK_KEYBOARD_H def for Intellisense fixed->rev3.h * .gitignore diff fix * Fixing settings.json diff * Update settings.json * Update keyboards/preonic/keymaps/laurentlaurent/keymap.c Co-Authored-By: fauxpark --- .../preonic/keymaps/laurentlaurent/config.h | 41 ++ .../preonic/keymaps/laurentlaurent/keymap.c | 603 ++++++++++++++++++ .../preonic/keymaps/laurentlaurent/readme.md | 252 ++++++++ .../preonic/keymaps/laurentlaurent/rules.mk | 2 + .../keymaps/laurentlaurent/templates.c | 89 +++ 5 files changed, 987 insertions(+) create mode 100644 keyboards/preonic/keymaps/laurentlaurent/config.h create mode 100644 keyboards/preonic/keymaps/laurentlaurent/keymap.c create mode 100644 keyboards/preonic/keymaps/laurentlaurent/readme.md create mode 100644 keyboards/preonic/keymaps/laurentlaurent/rules.mk create mode 100644 keyboards/preonic/keymaps/laurentlaurent/templates.c diff --git a/keyboards/preonic/keymaps/laurentlaurent/config.h b/keyboards/preonic/keymaps/laurentlaurent/config.h new file mode 100644 index 000000000000..36944e9c6864 --- /dev/null +++ b/keyboards/preonic/keymaps/laurentlaurent/config.h @@ -0,0 +1,41 @@ +#pragma once + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PREONIC_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +#endif + +#define MUSIC_MASK (keycode != KC_NO) + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ + +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +// Fix Home Row mod keys +#define IGNORE_MOD_TAP_INTERRUPT +//#define RETRO_TAPPING \ No newline at end of file diff --git a/keyboards/preonic/keymaps/laurentlaurent/keymap.c b/keyboards/preonic/keymaps/laurentlaurent/keymap.c new file mode 100644 index 000000000000..c113bcaf64e8 --- /dev/null +++ b/keyboards/preonic/keymaps/laurentlaurent/keymap.c @@ -0,0 +1,603 @@ +/* Laurent's Preonic Layout + */ + +// For IntelliSense + #ifdef __INTELLISENSE__ + #include "../../rev3/config.h" + #include "../../rev3/rev3.h" + enum dynamic_macro_keycodes { + DYN_REC_START1 = DYNAMIC_MACRO_RANGE, + DYN_REC_START2, + DYN_REC_STOP, + DYN_MACRO_PLAY1, + DYN_MACRO_PLAY2, + }; + #define QMK_KEYBOARD_H "rev3.h" + #endif + + #include QMK_KEYBOARD_H + #include "muse.h" + +// ==== These keys allows usage of the home row as modifiers (when held) ==== +// Very bad for gaming, switch to gaming layout + + // For _QWERTY_MAC + // S and L into Ctrl + #define LCT_S LCTL_T(KC_S) + #define LCT_L LCTL_T(KC_L) + // F, J and Z into CMD + #define LWN_F LGUI_T(KC_F) + #define LWN_Z LGUI_T(KC_Z) + #define LWN_J LGUI_T(KC_J) + + // For _QWERTY_WIN + // S and L into WIN + #define LWN_S LGUI_T(KC_S) + #define LWN_L LGUI_T(KC_L) + // F, J and Z into Ctrl + #define LCT_F LCTL_T(KC_F) + #define LCT_Z LCTL_T(KC_Z) + #define LCT_J LCTL_T(KC_J) + +// ============================================================================ + +// ==== For All ==== + + // Layout helper + #define __LYB__ KC_TRANSPARENT + + // Mod Tap + // Changing K and D into Alt + #define LAT_D LALT_T(KC_D) + #define LAT_K LALT_T(KC_K) + // Equal into Ctrl+Alt+Cmd + #define LCAGEQ LCAG_T(KC_EQUAL) + // Esc into Meh + #define LMHESC MEH_T(KC_ESC) + // Space into Shift + #define LSHFSP SFT_T(KC_SPACE) + // Backspace into Shift + #define LSHFBK SFT_T(KC_BSPACE) + + // Switching layers + #define LTO_BS TO(_QWERTY_MAC) // Go to Base Layer + // Go to _NAV + #define LLY_SC LT(_NAV, KC_SCLN) // From ; + #define LLY_A LT(_NAV, KC_A) // From A + // Go to _PUNC + #define LLY_TB LT(_PUNC, KC_TAB) // From Tab + #define LLY_BK LT(_PUNC, KC_BSPACE) // From Backspace + #define LLY_BS LT(_PUNC, KC_BSLASH) // From Backslash + // Others + #define LLY_GR LT(_ONEHD, KC_GRV) // Go to _ONEHD from ` + #define LLY_ET LT(_EXTRA, KC_ENT) // Go to _EXTRA from Enter + #define LLSWIT MO(_LYSWT) // Layer Switcher + #define LLY_DL LT(_NUM, KC_DEL) // Go to _NUM from Delete + + // Shortcuts + // Mac Windows Resizing + #define LMW_L3 LCA(KC_E) // Resize to 2/3 and move to the left + #define LMW_FS LCA(KC_ENTER) // Resize to full screen + #define LMW_R3 LCA(KC_T) // Resize to 2/3 and move to the right + #define LMW_L1 LCA(KC_D) // Resize to 1/3 and move to the left + #define LMW_M1 LCA(KC_F) // Resize to 1/3 and move to middle + #define LMW_R1 LCA(KC_G) // Resize to 1/3 and move to right + #define LMW_TL LCA(KC_U) // Fit on Top Left corner + #define LMW_TR LCA(KC_I) // Fit on Top Left corner + #define LMW_BL LCA(KC_J) // Fit on Top Left corner + #define LMW_BR LCA(KC_K) // Fit on Top Left corner + #define LMW_LT LCA(KC_LEFT) // Resize to 1/2 horizontally and move to the left + #define LMW_BT LCA(KC_DOWN) // Resize to 1/2 vertically and move to the bottom + #define LMW_TP LCA(KC_UP) // Resize to 1/2 vertically and move to the top + #define LMW_RT LCA(KC_RIGHT) // Resize to 1/2 horizontally and move to the right + +// ==== Audio ==== + #ifdef AUDIO_ENABLE + #include "audio.h" + float tone_macro1_record[][2] = SONG(CAPS_LOCK_ON_SOUND); + float tone_macro2_record[][2] = SONG(SCROLL_LOCK_ON_SOUND); + float tone_macro_record_stop[][2] = SONG(SCROLL_LOCK_OFF_SOUND); + #endif + +enum preonic_layers { + _QWERTY_MAC, + _QWERTY_WIN, + _GAMING, + _MUSIC, + _LOWER, + _RAISE, + _ADJUST, + _PUNC, + _EXTRA, + _NUM, + _NAV, + _ONEHD, + _LYSWT }; + +enum preonic_keycodes { + QWERTY = SAFE_RANGE, + QWWIN, + // COLEMAK, + // DVORAK, + LOWER, + RAISE, + BACKLIT, + DYNAMIC_MACRO_RANGE, +}; + +#include "dynamic_macro.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Qwerty for Mac + * ,-----------------------------------------------------------------------------------. + * | CAG= | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | LY|TB| Q | W | E | R | T | Y | U | I | O | P | LY|\ | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Hyper| LY|A | CT/S | AT/D | WN/F | G | H | WN/J | AT/K | CT/L | LY|; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| WN/Z | X | C | V | B | N | M | , | . | / | Sh/Bk| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | LY|` |ESCMEH| LY|DL|LW|Bkp|LY|Bkp| Shift/Space |LY|ENT|RS|Bkp| [ | ] |LY_SW | + * `-----------------------------------------------------------------------------------' + * LY|` -> To _NUM + * LY|; -> To _NAV + * LY|A -> To _NAV + * LY|TB -> To _PUNC + * LY|\ -> To _PUNC + * LY|Bkp -> To _PUNC + * LY|ENT -> To_EXTRA + */ + [_QWERTY_MAC] = LAYOUT_preonic_grid( \ + LCAGEQ, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, + LLY_TB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, LLY_BS, + KC_HYPR, LLY_A, LCT_S, LAT_D, LWN_F, KC_G, KC_H, LWN_J, LAT_K, LCT_L, LLY_SC, KC_QUOT, + KC_LSFT, LWN_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, LSHFBK, + LLY_GR, LMHESC, LLY_DL, LOWER, LLY_BK, LSHFSP, LSHFSP, LLY_ET, RAISE, KC_LBRC, KC_RBRC, LLSWIT + ), + + /* Qwerty for Windows + * ,-----------------------------------------------------------------------------------. + * | CAG= | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | LY|TB| Q | W | E | R | T | Y | U | I | O | P | LY|\ | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Hyper| LY|A | WN/S | AT/D | CT/F | G | H | CT/J | AT/K | WN/L | LY/; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| CT/Z | X | C | V | B | N | M | , | . | / | Sh/Bk| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | LY|` |MH/ESC| LY|DL|LW|Bkp|LY|Bk | Space |LY|ENT|RS|Bkp| [ | ] |LY_SW | + * `-----------------------------------------------------------------------------------' + */ + [_QWERTY_WIN] = LAYOUT_preonic_grid( \ + LCAGEQ, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, + LLY_TB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, LLY_BS, + KC_HYPR, LLY_A, LWN_S, LAT_D, LCT_F, KC_G, KC_H, LCT_J, LAT_K, LWN_L, LLY_SC, KC_QUOT, + KC_LSFT, LCT_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, LSHFBK, + LLY_GR, LMHESC, LLY_DL, LOWER, LLY_BK, LSHFSP, LSHFSP, LLY_ET, RAISE, KC_LBRC, KC_RBRC, LLSWIT + ), + + /* Gaming + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | \ | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Ctrl | A | S | D | F | G | H | J | K | L | LY|; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / | = | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | ESC | Alt |LW|Bkp|LY|Bk | Space |LY|ENT|RS|Bkp| [ | ] |LY_SW | + * `-----------------------------------------------------------------------------------' + */ + [_GAMING] = LAYOUT_preonic_grid( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLASH, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LLY_SC, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_EQUAL, + KC_LCTL, KC_ESC, KC_LALT, LOWER, LLY_BK, KC_SPC, KC_SPC, LLY_ET, RAISE, KC_LBRC, KC_RBRC, LLSWIT + ), + + /* Music Layer (Switch to this layer if want to use music mode) + * ,-----------------------------------------------------------------------------------. + * | Esc | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | CTRL | ALT | CMD | | XXXX | Space | XXXX | | XXXX | XXXX |LY_SW | + * `-----------------------------------------------------------------------------------' + */ + [_MUSIC] = LAYOUT_preonic_grid( \ + KC_ESC , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_LCTL, KC_LALT, KC_LGUI, _______, XXXXXXX, KC_SPC, KC_SPC, XXXXXXX, _______, XXXXXXX, XXXXXXX, LLSWIT + ), + + /* Lower + * ,-----------------------------------------------------------------------------------. + * | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Tab | Home | Up | End | PGUP | XXXX | XXXX | XXXX | PrSc | Home | PGUP | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | " | Left | Down | Right|PGDWN | XXXX | XXXX | XXXX | Pause| End |PGDWN | F12 | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | CTRL | Alt | CMD | XXXX | XXXX | XXXX | XXXX | Prev | Play | Next | INS | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | CTRL | Alt | CMD | !!!! | Bksp | Space | Enter| | Vol- | Vol+ |LY_SW | + * `-----------------------------------------------------------------------------------' + */ + [_LOWER] = LAYOUT_preonic_grid( \ + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_TAB, KC_HOME, KC_UP, KC_END, KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX, KC_PSCR, KC_HOME, KC_PGUP, KC_DEL, + KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, XXXXXXX, XXXXXXX, XXXXXXX, KC_PAUS, KC_END, KC_PGDN, KC_F12, + _______, KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, KC_INS, + KC_LCTL, KC_LALT, KC_LGUI, __LYB__, KC_BSPC, KC_SPC, KC_SPC, KC_ENT, _______, KC_VOLD, KC_VOLU, LLSWIT\ + ), + + /* Raise + * ,-----------------------------------------------------------------------------------. + * | ESC | F1 | F2 | F3 | F4 | F5 | SCLK | & | * | ( | ) | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | F7 | F8 | F9 | F10 | F11 | XXXX | & | * | { | } | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Caps | F1 | F2 | F3 | F4 | F5 | XXXX | - | = | [ | ] | XXXX | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | XXXX |ISO # |ISO \ | MRC1 | MRC2 | MRSP | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | CTRL | Alt | CMD | | Bksp | Space | Enter| !!!! | MPL1 | MPL2 |LY_SW | + * `-----------------------------------------------------------------------------------' + */ + [_RAISE] = LAYOUT_preonic_grid( \ + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_SLCK, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, + KC_TAB, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, KC_AMPR, KC_ASTR, KC_LCBR, KC_RCBR, KC_DEL, + KC_CLCK, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, XXXXXXX, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, XXXXXXX, + _______, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, XXXXXXX, KC_NUHS, KC_NUBS, DYN_REC_START1, DYN_REC_START2, DYN_REC_STOP, + KC_LCTL, KC_LALT, KC_LGUI, _______, KC_BSPC, KC_SPC, KC_SPC, KC_ENT, __LYB__, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, LLSWIT + ), + + /* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Reset| | | | | | | | | | XXXX | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|AudOff|QWmac |QWwin |QWmac |QWin | | | F12 | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | |LY_SW | + * `-----------------------------------------------------------------------------------' + */ + [_ADJUST] = LAYOUT_preonic_grid( \ + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_TAB, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, XXXXXXX, + /*_______, _______, MU_MOD, AU_ON, AU_OFF, QWERTY, QWWIN, QWERTY, COLEMAK, DVORAK, _______, _______, \ Remove this if adding Colemak and Dvorak*/ + _______, _______, MU_MOD, AU_ON, AU_OFF, QWERTY, QWWIN, QWERTY, QWWIN, _______, _______, KC_F12, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, LLSWIT + ), + + /* Punctuation Layer + * ,-----------------------------------------------------------------------------------. + * | + | ! | @ | # | $ | % | ^ | & | * | ( | ) | _ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | !!!! | & | | | { | } | - | - | XXXX | XXXX | { | } | |(!)| + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | " | / | * | ( | ) | + | + | XXXX | XXXX | [ | ] | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | \ | % | [ | ] | = | = | XXXX | < | > | ? | INS | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ~ | _ | ^ | Del | !!!! | Space | Enter| XXXX | [ | ] |LY_SW | + * `-----------------------------------------------------------------------------------' + */ + [_PUNC] = LAYOUT_preonic_grid( \ + KC_PLUS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_UNDS, + __LYB__, KC_AMPR, KC_PIPE, KC_LCBR, KC_RCBR, KC_MINS, KC_MINS, XXXXXXX, XXXXXXX, KC_LCBR, KC_RCBR, KC_PIPE, + KC_DQUO, KC_SLSH, KC_ASTR, KC_LPRN, KC_RPRN, KC_PLUS, KC_PLUS, XXXXXXX, XXXXXXX, KC_LBRC, KC_RBRC, KC_DQUO, + _______, KC_BSLS, KC_PERC, KC_LBRC, KC_RBRC, KC_EQL, KC_EQL, XXXXXXX, KC_LABK, KC_RABK, KC_QUES, KC_INS, + KC_TILDE, KC_UNDS, KC_CIRC, KC_DEL, __LYB__, KC_SPC, KC_SPC, KC_ENT, XXXXXXX, KC_LBRC, KC_RBRC, LLSWIT + ), + + /* Extra Layer + * ,-----------------------------------------------------------------------------------. + * | ESC | | | | | | SCLK | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | | | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Caps | | | | | | | | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | MRC1 | MRC2 | MRSP | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | CTRL | ALT | CMD | Del | Bksp | Space | !!!! | | MPL1 | MPL2 |LY_SW | + * `-----------------------------------------------------------------------------------' + */ + [_EXTRA] = LAYOUT_preonic_grid( \ + KC_ESC, _______, _______, _______, _______, KC_SLCK, _______, _______, _______, _______, _______, _______, + KC_TAB, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, + KC_CLCK, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, DYN_REC_START1, DYN_REC_START2, DYN_REC_STOP, + KC_LCTL, KC_LALT, KC_LGUI, KC_DEL, KC_BSPC, KC_SPC, KC_SPC, __LYB__, _______, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, LLSWIT + ), + + /* Numeric Pad + * ,-----------------------------------------------------------------------------------. + * | ESC | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | NMLK | NUM/ | NUM* | NUM- | XXXX | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Home | Up | End | PGUP | XXXX | XXXX | NUM7 | NUM8 | NUM9 | NUM+ | XXXX | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | XXXX | Left | Down | Right| PGDWN| XXXX | XXXX | NUM4 | NUM5 | NUM6 | NUM+ | XXXX | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | CTRL | ALT | CMD | XXXX | XXXX | XXXX | NUM1 | NUM2 | NUM3 | NENT | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | XXXX | !!!! | XXXX | Bksp | Space | NUM0 | NUM0 | NUM. | NENT | QMAC | + * `-----------------------------------------------------------------------------------' + */ + [_NUM] = LAYOUT_preonic_grid( \ + KC_ESC , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, XXXXXXX, + _______, KC_HOME, KC_UP, KC_END, KC_PGUP, XXXXXXX, XXXXXXX, KC_P7, KC_P8, KC_P9, KC_PPLS, XXXXXXX, + KC_DQUO, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, XXXXXXX, XXXXXXX, KC_P4, KC_P5, KC_P6, KC_PPLS, XXXXXXX, + _______, KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, XXXXXXX, XXXXXXX, KC_P1, KC_P2, KC_P3, KC_PENT, KC_BSPC, + _______, XXXXXXX, __LYB__, XXXXXXX, KC_BSPC, KC_SPC, KC_SPC, KC_P0, KC_P0, KC_PDOT, KC_PENT, LTO_BS + ), + + /* NAV + * ,-----------------------------------------------------------------------------------. + * | ESC | | | MOB3 | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | A | MOB2 | MOUP | MOB1 | MOSU | PGUP | Home | Up | End | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | !!!! | MOLF | MODN | MORT | MOSD | PGDN | Left | Down | Right| !!!! | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | MOB4 | MOB5 | MOSL | MOSR | MOA2 | MOA0 | MPRV | MPLY | MNXT | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | CTRL | ALT | CMD | | Bksp | Space | Enter| VILM | VOLD | VOLU | QMAC | + * `-----------------------------------------------------------------------------------' + */ + [_NAV] = LAYOUT_preonic_grid( \ + KC_ESC, _______, _______, KC_BTN3, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_A, KC_BTN2, KC_MS_U, KC_BTN1, KC_WH_U, KC_PGUP, KC_HOME, KC_UP, KC_END, _______, KC_DEL, + _______, __LYB__, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, __LYB__, _______, + _______, _______, KC_BTN4, KC_BTN5, KC_WH_L, KC_WH_R, KC_ACL2, KC_ACL0, KC_MPRV, KC_MPLY, KC_MNXT, _______, + KC_LCTL, KC_LALT, KC_LGUI, _______, KC_BSPC, KC_SPC, KC_SPC, KC_ENT, KC_MUTE, KC_VOLD, KC_VOLU, LTO_BS + ), + + /* One-Handed + * ,-----------------------------------------------------------------------------------. + * | Esc | 6 | 7 | 8 | 9 | 0 | - | XXXX | XXXX | XXXX | XXXX | XXXX | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Y | U | I | O | P | MWL3 | MWFS | MWR3 | MWTL | MWTR | XXXX | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | H | J | K | L | : | MWL1 | MWM1 | MWR1 | MWBL | MWBR | XXXX | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | N | M | , | . | / | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | !!!! | Esc | Del | Ent | Bksp | | MWLT | MWBT | MWUP | MWRT |LY_SW | + * `-----------------------------------------------------------------------------------' + */ + [_ONEHD] = LAYOUT_preonic_grid( \ + KC_ESC , KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, KC_Y, KC_U, KC_I, KC_O, KC_P, LMW_L3, LMW_FS, LMW_R3, LMW_TL, LMW_TR, XXXXXXX, + _______, KC_H, KC_J, KC_K, KC_L, KC_SCLN, LMW_L1, LMW_M1, LMW_R1, LMW_BL, LMW_BR, XXXXXXX, + _______, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + __LYB__, KC_ESC, KC_DEL, KC_ENT, KC_BSPACE, KC_SPC, KC_SPC, LMW_LT, LMW_BT, LMW_TP, LMW_RT, LLSWIT + ), + + /* Layer Switcher + * ,-----------------------------------------------------------------------------------. + * | Esc | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Brite | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | XXXX | XXXX | XXXX | XXXX | XXXX | GAME | XXXX | XXXX | XXXX | XXXX | NAV | XXXX | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | XXXX | XXXX | XXXX | XXXX | QMAC | XXXX | MUSC | XXXX | XXXX | XXXX | XXXX | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | XXXX | XXXX | NUM | XXXX | XXXX | XXXXX | XXXX | XXXX | XXXX | XXXX | !!!! | + * `-----------------------------------------------------------------------------------' + */ + [_LYSWT] = LAYOUT_preonic_grid( \ + KC_ESC , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + BACKLIT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, TO(_GAMING), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, TO(_NAV), XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, LTO_BS, XXXXXXX, TO(_MUSIC), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, TO(_NUM), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______ + ) //, //Don't forget to add the comma if going to add more layers here +}; + +static uint16_t key_timer; +static uint16_t timer_thresh = 200; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + // For dynamic macros + if (!process_record_dynamic_macro(keycode, record)) { +// Play sound on Macro stop +#ifdef AUDIO_ENABLE + switch (keycode) { + case DYN_REC_STOP: + if (record->event.pressed) { + PLAY_SONG(tone_macro_record_stop); + } + return false; + break; + } +#endif + return false; + } + + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY_MAC); + } + return false; + break; + case QWWIN: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY_WIN); + } + return false; + break; + // Reinstate these cases if COLEMAK, DVORAK are included in the layouts + /*case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + break; + */ + case LOWER: + if (record->event.pressed) { + key_timer = timer_read(); // For Backspace on tap + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + // Backspace on tap + if (timer_elapsed(key_timer) < timer_thresh) { + tap_code(KC_BSPC); + } + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + key_timer = timer_read(); // For Backspace on tap + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + // Backspace on tap + if (timer_elapsed(key_timer) < timer_thresh) { + tap_code(KC_BSPC); + } + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); +#ifdef BACKLIGHT_ENABLE + backlight_step(); +#endif +#ifdef __AVR__ + PORTE &= ~(1 << 6); +#endif + } else { + unregister_code(KC_RSFT); +#ifdef __AVR__ + PORTE |= (1 << 6); +#endif + } + return false; + break; +#ifdef AUDIO_ENABLE + // Play sound on Macro record start + case DYN_REC_START1: + if (record->event.pressed) { + PLAY_SONG(tone_macro1_record); + } + return false; + break; + case DYN_REC_START2: + if (record->event.pressed) { + PLAY_SONG(tone_macro2_record); + } + return false; + break; +#endif + } + return true; +}; + +bool muse_mode = false; +uint8_t last_muse_note = 0; +uint16_t muse_counter = 0; +uint8_t muse_offset = 70; +uint16_t muse_tempo = 50; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (muse_mode) { + if (IS_LAYER_ON(_RAISE)) { + if (clockwise) { + muse_offset++; + } else { + muse_offset--; + } + } else { + if (clockwise) { + muse_tempo += 1; + } else { + muse_tempo -= 1; + } + } + } else { + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } +} + +void dip_switch_update_user(uint8_t index, bool active) { + switch (index) { + case 0: + if (active) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + break; + case 1: + if (active) { + muse_mode = true; + } else { + muse_mode = false; + } + } +} + +void matrix_scan_user(void) { +#ifdef AUDIO_ENABLE + if (muse_mode) { + if (muse_counter == 0) { + uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()]; + if (muse_note != last_muse_note) { + stop_note(compute_freq_for_midi_note(last_muse_note)); + play_note(compute_freq_for_midi_note(muse_note), 0xF); + last_muse_note = muse_note; + } + } + muse_counter = (muse_counter + 1) % muse_tempo; + } else { + if (muse_counter) { + stop_all_notes(); + muse_counter = 0; + } + } +#endif +} + +bool music_mask_user(uint16_t keycode) { + switch (keycode) { + case RAISE: + case LOWER: + return false; + default: + return true; + } +} diff --git a/keyboards/preonic/keymaps/laurentlaurent/readme.md b/keyboards/preonic/keymaps/laurentlaurent/readme.md new file mode 100644 index 000000000000..b1909f8e1eab --- /dev/null +++ b/keyboards/preonic/keymaps/laurentlaurent/readme.md @@ -0,0 +1,252 @@ +# laurentlaurent's Preonic keyboard +Largely similar to his [ErgoDox EZ](https://configure.ergodox-ez.com/ergodox-ez/layouts/jZpmo/latest/0)'s layout + +## Features + +### Special Modifiers for Global Shortcuts +* Hyper key (Ctrl+Alt+Cmd+Shift) +* CAG key (Ctrl+Alt+Cmd) +* Meh key (Ctrl+Alt+Shift) + +### Home Row modifiers +* Home Row modifiers (hold F/J to use CMD/Ctrl, D/L for Alt, ... ) +* Separate layers for Mac and Windows keyboard to improve muscle memory linked to Home Row modifiers (CMD is mapped to F and J on Mac, CTRL for Windows) +* Extra CMD/CTRL key mapped to Z for one-handed CMD+F/CTRL+F + +### Qwerty Layout improvements +* Backspace and Enter are on bottom row (next to Space bar) +* = is where Esc would be expected to be +* "-" is where Backspace would be expected to be +* Grave is where LCTRL would be expected to be +* Esc is where Alt (on Mac)/Win (on PC) would be expected to be +* Del is where CMD (on Mac)/Alt (on PC) would be expected to be +* Hyper key replaces Caps Lock + +### Mod taps +* Home Row modifiers +* Lower and Raise are Backspace on tap +* Holding = is CAG (CTRL+ALT+CMD) +* Holding Esc is MEH (Ctrl+Shift+Alt) +* Right Shift is bound to RShift on hold, Backspace on tap +* Spacebar acts like a LShift on hold, Spacebar on tap +* In instances where repeated keys is needed: + * Tap then tap-hold repeats the key + * Lower, Raise (and most other layers) turns off mod-tap on most keys +* Music layer disables all key mappings, Gaming layer disables modtaps + +### Layer Switching +* Layer switcher key, used to switch layout (allows use of _NAV, _NUM layout without holding their layer keys) +* **Punctuation layer** accessible by holding Tab, Backslash or Backspace +* Grave switches to **One-Handed layer** on hold +* **Mouse and arrow key layer** accessible by holding ; or A +* Del switches to **Numpad** on hold +* Enter switches to **Extra layer** on hold + * Extra layer will be used for applications shortcuts + +## Layers + +### Mac Qwerty +``` +,-----------------------------------------------------------------------------------. +| CAG/=| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | +|------+------+------+------+------+------+------+------+------+------+------+------| +| LY|TB| Q | W | E | R | T | Y | U | I | O | P | LY|\ | +|------+------+------+------+------+-------------+------+------+------+------+------| +| Hyper| LY|A | CT/S | AT/D | WN/F | G | H | WN/J | AT/K | CT/L | LY|; | " | +|------+------+------+------+------+------|------+------+------+------+------+------| +| Shift| WN/Z | X | C | V | B | N | M | , | . | / | Sh/Bk| +|------+------+------+------+------+------+------+------+------+------+------+------| +| LY|` |MH/ESC| LY|DL|LW|Bkp|LY|Bkp| Shift/Space |LY|ENT|RS|Bkp| [ | ] |LY_SW | +`-----------------------------------------------------------------------------------' +``` +* Hold Tab (LY|TB), Backspace (LY|Bkp) or Backslash (LY|\ ) for **Punctuation Layer** +* Hold Grave (LY|`) for **One-Handed Layer** +* Hold Del (LY|DL) for **Numpad Layer** +* Hold A or ; for **Navigation/Mouse Layer** +* Hold Enter (LY|ENT) for **Extra layer** + +### Win Qwerty +``` +,-----------------------------------------------------------------------------------. +| CAG= | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | +|------+------+------+------+------+------+------+------+------+------+------+------| +| LY|TB| Q | W | E | R | T | Y | U | I | O | P | LY|\ | +|------+------+------+------+------+-------------+------+------+------+------+------| +| Hyper| LY|A | WN/S | AT/D | CT/F | G | H | CT/J | AT/K | WN/L | LY/; | " | +|------+------+------+------+------+------|------+------+------+------+------+------| +| Shift| CT/Z | X | C | V | B | N | M | , | . | / | Sh/Bk| +|------+------+------+------+------+------+------+------+------+------+------+------| +| LY|` |ESCMEH| LY|DL|LW|Bkp|LY|Bk | Space |LY|ENT|RS|Bkp| [ | ] |LY_SW | +`-----------------------------------------------------------------------------------' +``` +* Hold Tab (LY|TB), Backspace (LY|Bkp) or Backslash (LY|\ ) for **Punctuation Layer** +* Hold Grave (LY|`) for **One-Handed Layer** +* Hold Del (LY|DL) for **Numpad Layer** +* Hold A or ; for **Navigation/Mouse Layer** +* Hold Enter (LY|ENT) for **Extra layer** + +### Gaming Qwerty +``` +,-----------------------------------------------------------------------------------. +| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Tab | Q | W | E | R | T | Y | U | I | O | P | \ | +|------+------+------+------+------+-------------+------+------+------+------+------| +| Ctrl | A | S | D | F | G | H | J | K | L | LY|; | " | +|------+------+------+------+------+------|------+------+------+------+------+------| +| Shift| Z | X | C | V | B | N | M | , | . | / | = | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Ctrl | ESC | Alt |LW|Bkp|LY|Bk | Space |LY|ENT|RS|Bkp| [ | ] |LY_SW | +`-----------------------------------------------------------------------------------' +``` + +### Music Layer +``` +,-----------------------------------------------------------------------------------. +| Esc | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | +|------+------+------+------+------+------+------+------+------+------+------+------| +| XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | +|------+------+------+------+------+-------------+------+------+------+------+------| +| | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | +|------+------+------+------+------+------|------+------+------+------+------+------| +| | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | +|------+------+------+------+------+------+------+------+------+------+------+------| +| CTRL | ALT | CMD | | XXXX | Space | XXXX | | XXXX | XXXX |LY_SW | +`-----------------------------------------------------------------------------------' +``` + +### Lower Layer +``` +,-----------------------------------------------------------------------------------. +| ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | +|------+------+------+------+------+-------------+------+------+------+------+------| +| Tab | Home | Up | End | PGUP | XXXX | XXXX | XXXX | PrSc | Home | PGUP | Del | +|------+------+------+------+------+-------------+------+------+------+------+------| +| " | Left | Down | Right|PGDWN | XXXX | XXXX | XXXX | Pause| End |PGDWN | F12 | +|------+------+------+------+------+------|------+------+------+------+------+------| +| | CTRL | Alt | CMD | XXXX | XXXX | XXXX | XXXX | Prev | Play | Next | INS | +|------+------+------+------+------+------+------+------+------+------+------+------| +| CTRL | Alt | CMD | !!!! | Bksp | Space | Enter| | Vol- | Vol+ |LY_SW | +`-----------------------------------------------------------------------------------' +``` + +### Raise Layer +``` +,-----------------------------------------------------------------------------------. +| ESC | F1 | F2 | F3 | F4 | F5 | SCLK | & | * | ( | ) | Bksp | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Tab | F7 | F8 | F9 | F10 | F11 | XXXX | & | * | { | } | Del | +|------+------+------+------+------+-------------+------+------+------+------+------| +| Caps | F1 | F2 | F3 | F4 | F5 | XXXX | - | = | [ | ] | XXXX | +|------+------+------+------+------+------|------+------+------+------+------+------| +| | F7 | F8 | F9 | F10 | F11 | XXXX |ISO # |ISO \ | MRC1 | MRC2 | MRSP | +|------+------+------+------+------+------+------+------+------+------+------+------| +| CTRL | Alt | CMD | | Bksp | Space | Enter| !!!! | MPL1 | MPL2 |LY_SW | +`-----------------------------------------------------------------------------------' +``` + +### Adjust Layer +``` +,-----------------------------------------------------------------------------------. +| | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Tab | Reset| | | | | | | | | | XXXX | +|------+------+------+------+------+-------------+------+------+------+------+------| +| | | |Aud on|AudOff|QWmac |QWwin |QWmac |QWin | | | F12 | +|------+------+------+------+------+------|------+------+------+------+------+------| +| |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | | |LY_SW | +`-----------------------------------------------------------------------------------' +``` + +### Punctuation Layer +``` +,-----------------------------------------------------------------------------------. +| + | ! | @ | # | $ | % | ^ | & | * | ( | ) | _ | +|------+------+------+------+------+------+------+------+------+------+------+------| +| !!!! | & | | | { | } | - | - | XXXX | XXXX | { | } | |(!)| +|------+------+------+------+------+-------------+------+------+------+------+------| +| " | / | * | ( | ) | + | + | XXXX | XXXX | [ | ] | " | +|------+------+------+------+------+------|------+------+------+------+------+------| +| | \ | % | [ | ] | = | = | XXXX | < | > | ? | INS | +|------+------+------+------+------+------+------+------+------+------+------+------| +| ~ | _ | ^ | Del | !!!! | Space | Enter| XXXX | [ | ] |LY_SW | +`-----------------------------------------------------------------------------------' +``` + +### Extra Layer +``` +,-----------------------------------------------------------------------------------. +| ESC | | | | | | SCLK | | | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Tab | | | | | | | | | | | Del | +|------+------+------+------+------+-------------+------+------+------+------+------| +| Caps | | | | | | | | | | | | +|------+------+------+------+------+------|------+------+------+------+------+------| +| | | | | | | | | | MRC1 | MRC2 | MRSP | +|------+------+------+------+------+------+------+------+------+------+------+------| +| CTRL | ALT | CMD | Del | Bksp | Space | !!!! | | MPL1 | MPL2 |LY_SW | +`-----------------------------------------------------------------------------------' +``` + +### Numeric Pad Layer +``` +,-----------------------------------------------------------------------------------. +| ESC | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | NMLK | NUM/ | NUM* | NUM- | XXXX | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | Home | Up | End | PGUP | XXXX | XXXX | NUM7 | NUM8 | NUM9 | NUM+ | XXXX | +|------+------+------+------+------+-------------+------+------+------+------+------| +| XXXX | Left | Down | Right| PGDWN| XXXX | XXXX | NUM4 | NUM5 | NUM6 | NUM+ | XXXX | +|------+------+------+------+------+------|------+------+------+------+------+------| +| | CTRL | ALT | CMD | XXXX | XXXX | XXXX | NUM1 | NUM2 | NUM3 | NENT | Bksp | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | XXXX | !!!! | XXXX | Bksp | Space | NUM0 | NUM0 | NUM. | NENT | QMAC | +`-----------------------------------------------------------------------------------' +``` + +### Navigation Layer +``` +,-----------------------------------------------------------------------------------. +| ESC | | | MOB3 | | | | | | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | A | MOB2 | MOUP | MOB1 | MOSU | PGUP | Home | Up | End | | Del | +|------+------+------+------+------+-------------+------+------+------+------+------| +| | !!!! | MOLF | MODN | MORT | MOSD | PGDN | Left | Down | Right| !!!! | | +|------+------+------+------+------+------|------+------+------+------+------+------| +| | | MOB4 | MOB5 | MOSL | MOSR | MOA2 | MOA0 | MPRV | MPLY | MNXT | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| CTRL | ALT | CMD | | Bksp | Space | Enter| VILM | VOLD | VOLU | QMAC | +`-----------------------------------------------------------------------------------' +``` + +### One-Handed Layer +``` +,-----------------------------------------------------------------------------------. +| Esc | 6 | 7 | 8 | 9 | 0 | - | XXXX | XXXX | XXXX | XXXX | XXXX | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | Y | U | I | O | P | MWL3 | MWFS | MWR3 | MWTL | MWTR | XXXX | +|------+------+------+------+------+-------------+------+------+------+------+------| +| | H | J | K | L | : | MWL1 | MWM1 | MWR1 | MWBL | MWBR | XXXX | +|------+------+------+------+------+------|------+------+------+------+------+------| +| | N | M | , | . | / | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | +|------+------+------+------+------+------+------+------+------+------+------+------| +| !!!! | Esc | Del | Ent | Bksp | | MWLT | MWBT | MWUP | MWRT |LY_SW | +`-----------------------------------------------------------------------------------' +``` +The right hand side of the keyboard contains shortcuts for moving windows on Mac (using Magnet) + +### Layer Switcher +``` +,-----------------------------------------------------------------------------------. +| Esc | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | +|------+------+------+------+------+------+------+------+------+------+------+------| +|Brite | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | +|------+------+------+------+------+-------------+------+------+------+------+------| +| XXXX | XXXX | XXXX | XXXX | XXXX | GAME | XXXX | XXXX | XXXX | XXXX | NAV | XXXX | +|------+------+------+------+------+------|------+------+------+------+------+------| +| | XXXX | XXXX | XXXX | XXXX | QMAC | XXXX | MUSC | XXXX | XXXX | XXXX | XXXX | +|------+------+------+------+------+------+------+------+------+------+------+------| +| XXXX | XXXX | NUM | XXXX | XXXX | XXXXX | XXXX | XXXX | XXXX | XXXX | !!!! | +`-----------------------------------------------------------------------------------' +``` diff --git a/keyboards/preonic/keymaps/laurentlaurent/rules.mk b/keyboards/preonic/keymaps/laurentlaurent/rules.mk new file mode 100644 index 000000000000..3a551bd429bc --- /dev/null +++ b/keyboards/preonic/keymaps/laurentlaurent/rules.mk @@ -0,0 +1,2 @@ +SRC += muse.c +MOUSEKEY_ENABLE = yes diff --git a/keyboards/preonic/keymaps/laurentlaurent/templates.c b/keyboards/preonic/keymaps/laurentlaurent/templates.c new file mode 100644 index 000000000000..0056e088f775 --- /dev/null +++ b/keyboards/preonic/keymaps/laurentlaurent/templates.c @@ -0,0 +1,89 @@ +// Templates for Preonic Keyboard + +/* BLANK Pass through + * ,-----------------------------------------------------------------------------------. + * | ESC | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | CTRL | ALT | CMD | | | | | | | |LY_SW | + * `-----------------------------------------------------------------------------------' + */ +[_BLANK] = LAYOUT_preonic_grid( \ + KC_ESC , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_LCTL, KC_LALT, KC_LGUI, _______, _______, _______, _______, _______, _______, _______, _______, LLSWIT \ +), + +/* BLANK No Pass through + * ,-----------------------------------------------------------------------------------. + * | Esc | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | XXXX | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | CTRL | ALT | CMD | | XXXX | | XXXX | | XXXX | XXXX |LY_SW | + * `-----------------------------------------------------------------------------------' + */ +[_BLANK] = LAYOUT_preonic_grid( \ + KC_ESC , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + KC_LCTL, KC_LALT, KC_LGUI, _______, XXXXXXX, _______, _______, XXXXXXX, _______, XXXXXXX, XXXXXXX, LLSWIT \ +), + + +//===== From default preonic layouts +// if you add this, make sure to add _COLEMAK and _DVORAK in the enum + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | XXXX | XXXX | XXXX |LY_SW | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = LAYOUT_preonic_grid( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL, \ + KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \ + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, XXXXXXX, XXXXXXX, XXXXXXX, LLSWIT \ +), + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | " | , | . | P | Y | F | G | C | R | L | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | XXXX | XXXX | XXXX |LY_SW | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = LAYOUT_preonic_grid( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL, \ + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \ + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT, \ + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, XXXXXXX, XXXXXXX, XXXXXXX, LLSWIT \ +), From e47ab6a5752e16bd3b4288153798c12af1bee3d5 Mon Sep 17 00:00:00 2001 From: Wilba Date: Sat, 12 Oct 2019 15:37:03 +1100 Subject: [PATCH 094/316] [Keyboard] wilba.tech PCB refactoring (#6982) * Cleanup * Refactor VIA rules.mk * WT mono backlight refactor, VIA support * Added WT75-C * Fixed compile error * Cleanup rules.mk * Review changes * Review changes --- keyboards/aeboards/aegis/config.h | 2 - keyboards/aeboards/ext65/config.h | 2 - keyboards/snagpad/config.h | 3 - keyboards/wilba_tech/rama_works_koyu/rules.mk | 46 +-- .../wilba_tech/rama_works_m10_b/config.h | 2 - .../wilba_tech/rama_works_m10_b/rules.mk | 46 +-- .../wilba_tech/rama_works_m60_a/rules.mk | 44 +-- keyboards/wilba_tech/rama_works_m6_a/rules.mk | 45 +-- keyboards/wilba_tech/rama_works_m6_b/rules.mk | 46 +-- .../wilba_tech/rama_works_u80_a/config.h | 2 - .../wilba_tech/rama_works_u80_a/rules.mk | 46 +-- keyboards/wilba_tech/wt60_a/config.h | 35 +- .../wilba_tech/wt60_a/keymaps/via/rules.mk | 69 ---- keyboards/wilba_tech/wt60_a/rules.mk | 1 + .../wilba_tech/wt60_d/keymaps/via/rules.mk | 66 ---- keyboards/wilba_tech/wt60_d/rules.mk | 49 +-- keyboards/wilba_tech/wt65_a/config.h | 32 +- .../wilba_tech/wt65_a/keymaps/via/rules.mk | 69 ---- keyboards/wilba_tech/wt65_a/rules.mk | 47 +-- keyboards/wilba_tech/wt65_b/config.h | 32 +- .../wilba_tech/wt65_b/keymaps/via/rules.mk | 69 ---- keyboards/wilba_tech/wt65_b/rules.mk | 47 +-- .../wilba_tech/wt69_a/keymaps/via/rules.mk | 66 ---- keyboards/wilba_tech/wt69_a/rules.mk | 48 +-- keyboards/wilba_tech/wt75_a/config.h | 35 +- .../wilba_tech/wt75_a/keymaps/via/rules.mk | 69 ---- keyboards/wilba_tech/wt75_a/rules.mk | 47 +-- keyboards/wilba_tech/wt75_b/config.h | 35 +- .../wilba_tech/wt75_b/keymaps/via/rules.mk | 69 ---- keyboards/wilba_tech/wt75_b/rules.mk | 47 +-- keyboards/wilba_tech/wt75_c/config.h | 223 ++++++++++++ keyboards/wilba_tech/wt75_c/info.json | 12 + .../wt75_c/keymaps/default/keymap.c | 41 +++ .../wilba_tech/wt75_c/keymaps/via/keymap.c | 41 +++ .../wilba_tech/wt75_c/keymaps/via/rules.mk | 2 + keyboards/wilba_tech/wt75_c/readme.md | 13 + keyboards/wilba_tech/wt75_c/rules.mk | 39 ++ keyboards/wilba_tech/wt75_c/wt75_c.c | 17 + keyboards/wilba_tech/wt75_c/wt75_c.h | 46 +++ keyboards/wilba_tech/wt80_a/config.h | 32 +- .../wilba_tech/wt80_a/keymaps/via/rules.mk | 69 ---- keyboards/wilba_tech/wt80_a/rules.mk | 47 +-- keyboards/wilba_tech/wt8_a/rules.mk | 49 +-- keyboards/wilba_tech/wt_main.c | 54 ++- keyboards/wilba_tech/wt_mono_backlight.c | 341 +++++++++++++++++- keyboards/wilba_tech/wt_mono_backlight.h | 48 ++- keyboards/wilba_tech/zeal60/rules.mk | 46 +-- keyboards/wilba_tech/zeal65/rules.mk | 46 +-- 48 files changed, 1132 insertions(+), 1250 deletions(-) create mode 100644 keyboards/wilba_tech/wt75_c/config.h create mode 100644 keyboards/wilba_tech/wt75_c/info.json create mode 100644 keyboards/wilba_tech/wt75_c/keymaps/default/keymap.c create mode 100644 keyboards/wilba_tech/wt75_c/keymaps/via/keymap.c create mode 100644 keyboards/wilba_tech/wt75_c/keymaps/via/rules.mk create mode 100644 keyboards/wilba_tech/wt75_c/readme.md create mode 100644 keyboards/wilba_tech/wt75_c/rules.mk create mode 100644 keyboards/wilba_tech/wt75_c/wt75_c.c create mode 100644 keyboards/wilba_tech/wt75_c/wt75_c.h diff --git a/keyboards/aeboards/aegis/config.h b/keyboards/aeboards/aegis/config.h index d8c256c7d987..2a35897300dd 100644 --- a/keyboards/aeboards/aegis/config.h +++ b/keyboards/aeboards/aegis/config.h @@ -47,8 +47,6 @@ /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -//#define WT_MONO_BACKLIGHT - #define DYNAMIC_KEYMAP_LAYER_COUNT 4 // EEPROM usage diff --git a/keyboards/aeboards/ext65/config.h b/keyboards/aeboards/ext65/config.h index b3e1b8c2f0bf..7255b463fc6f 100644 --- a/keyboards/aeboards/ext65/config.h +++ b/keyboards/aeboards/ext65/config.h @@ -47,8 +47,6 @@ /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -//#define WT_MONO_BACKLIGHT - #define DYNAMIC_KEYMAP_LAYER_COUNT 4 // EEPROM usage diff --git a/keyboards/snagpad/config.h b/keyboards/snagpad/config.h index cd32a3d8c264..a4ab9d5e26ad 100644 --- a/keyboards/snagpad/config.h +++ b/keyboards/snagpad/config.h @@ -48,9 +48,6 @@ #define RGBLIGHT_VAL_STEP 8 #endif -// Does not use WT_MONO_BACKLIGHT -// #define WT_MONO_BACKLIGHT - #define DYNAMIC_KEYMAP_LAYER_COUNT 4 // EEPROM usage diff --git a/keyboards/wilba_tech/rama_works_koyu/rules.mk b/keyboards/wilba_tech/rama_works_koyu/rules.mk index 9839602247b0..ebcb6a455f74 100644 --- a/keyboards/wilba_tech/rama_works_koyu/rules.mk +++ b/keyboards/wilba_tech/rama_works_koyu/rules.mk @@ -1,5 +1,3 @@ - - # project specific files SRC = keyboards/wilba_tech/wt_main.c \ keyboards/wilba_tech/wt_rgb_backlight.c \ @@ -10,42 +8,14 @@ SRC = keyboards/wilba_tech/wt_main.c \ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - -# Boot Section +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu # Do not put the microcontroller into power saving mode diff --git a/keyboards/wilba_tech/rama_works_m10_b/config.h b/keyboards/wilba_tech/rama_works_m10_b/config.h index 6901309a08b0..f72ecae85c2d 100644 --- a/keyboards/wilba_tech/rama_works_m10_b/config.h +++ b/keyboards/wilba_tech/rama_works_m10_b/config.h @@ -181,8 +181,6 @@ along with this program. If not, see . /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 -//#define WT_MONO_BACKLIGHT - #define DYNAMIC_KEYMAP_LAYER_COUNT 4 // EEPROM usage diff --git a/keyboards/wilba_tech/rama_works_m10_b/rules.mk b/keyboards/wilba_tech/rama_works_m10_b/rules.mk index 70258b9ead63..99330021f248 100644 --- a/keyboards/wilba_tech/rama_works_m10_b/rules.mk +++ b/keyboards/wilba_tech/rama_works_m10_b/rules.mk @@ -4,44 +4,14 @@ SRC = keyboards/wilba_tech/wt_main.c # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu diff --git a/keyboards/wilba_tech/rama_works_m60_a/rules.mk b/keyboards/wilba_tech/rama_works_m60_a/rules.mk index 3b2287333c4c..4ce5dc54cb9d 100644 --- a/keyboards/wilba_tech/rama_works_m60_a/rules.mk +++ b/keyboards/wilba_tech/rama_works_m60_a/rules.mk @@ -10,42 +10,14 @@ SRC = keyboards/wilba_tech/wt_main.c \ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - -# Boot Section +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu # Do not put the microcontroller into power saving mode diff --git a/keyboards/wilba_tech/rama_works_m6_a/rules.mk b/keyboards/wilba_tech/rama_works_m6_a/rules.mk index 4270e7090c0c..32f0e25de8e9 100644 --- a/keyboards/wilba_tech/rama_works_m6_a/rules.mk +++ b/keyboards/wilba_tech/rama_works_m6_a/rules.mk @@ -4,43 +4,14 @@ SRC = keyboards/wilba_tech/wt_main.c # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - -# Boot Section +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu # Do not put the microcontroller into power saving mode diff --git a/keyboards/wilba_tech/rama_works_m6_b/rules.mk b/keyboards/wilba_tech/rama_works_m6_b/rules.mk index 6b7b3a63d85c..c016fa344f50 100644 --- a/keyboards/wilba_tech/rama_works_m6_b/rules.mk +++ b/keyboards/wilba_tech/rama_works_m6_b/rules.mk @@ -5,47 +5,17 @@ SRC = keyboards/wilba_tech/wt_main.c \ drivers/issi/is31fl3218.c \ drivers/avr/i2c_master.c - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - -# Boot Section +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu # Do not put the microcontroller into power saving mode diff --git a/keyboards/wilba_tech/rama_works_u80_a/config.h b/keyboards/wilba_tech/rama_works_u80_a/config.h index 348b124b90b8..d0bf0ed1e3b1 100644 --- a/keyboards/wilba_tech/rama_works_u80_a/config.h +++ b/keyboards/wilba_tech/rama_works_u80_a/config.h @@ -179,8 +179,6 @@ /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 -//#define WT_MONO_BACKLIGHT - // IS31FL3731 driver #define DRIVER_COUNT 3 #define DRIVER_LED_TOTAL 108 diff --git a/keyboards/wilba_tech/rama_works_u80_a/rules.mk b/keyboards/wilba_tech/rama_works_u80_a/rules.mk index 6079ad8932d3..caecaecbb7d9 100644 --- a/keyboards/wilba_tech/rama_works_u80_a/rules.mk +++ b/keyboards/wilba_tech/rama_works_u80_a/rules.mk @@ -8,44 +8,14 @@ SRC = keyboards/wilba_tech/wt_main.c \ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu diff --git a/keyboards/wilba_tech/wt60_a/config.h b/keyboards/wilba_tech/wt60_a/config.h index 3ac8ea6fc046..6e1e0e81cc80 100644 --- a/keyboards/wilba_tech/wt60_a/config.h +++ b/keyboards/wilba_tech/wt60_a/config.h @@ -179,14 +179,33 @@ /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 -#define WT_MONO_BACKLIGHT +// enable the mono backlight +#define MONO_BACKLIGHT_ENABLED 1 + +// enable the RGB indicator for WT75-A +#define MONO_BACKLIGHT_WT75_A + +// disable backlight when USB suspended (PC sleep/hibernate/shutdown) +#define MONO_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED 0 + +// disable backlight after timeout in minutes, 0 = no timeout +#define MONO_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0 + +// the default brightness +#define MONO_BACKLIGHT_BRIGHTNESS 255 + +// the default effect +#define MONO_BACKLIGHT_EFFECT 1 + +// the default effect speed (0-3) +#define MONO_BACKLIGHT_EFFECT_SPEED 0 #define DYNAMIC_KEYMAP_LAYER_COUNT 4 // EEPROM usage // TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F +#define EEPROM_MAGIC 0x4520 #define EEPROM_MAGIC_ADDR 34 // Bump this every time we change what we store // This will automatically reset the EEPROM with defaults @@ -194,9 +213,11 @@ #define EEPROM_VERSION 0x08 #define EEPROM_VERSION_ADDR 36 -// Dynamic keymap starts after EEPROM version -#define DYNAMIC_KEYMAP_EEPROM_ADDR 37 -// Dynamic macro starts after dynamic keymaps (37+(4*5*14*2)) = (37+560) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 597 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 427 +// Backlight config starts after EEPROM version +#define MONO_BACKLIGHT_CONFIG_EEPROM_ADDR 37 +// Dynamic keymap starts after backlight config (37+7) +#define DYNAMIC_KEYMAP_EEPROM_ADDR 44 +// Dynamic macro starts after dynamic keymaps (44+(4*5*14*2)) = (44+560) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 604 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 420 #define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/wilba_tech/wt60_a/keymaps/via/rules.mk b/keyboards/wilba_tech/wt60_a/keymaps/via/rules.mk index 76a07d7a44ac..8834bf0c8e51 100644 --- a/keyboards/wilba_tech/wt60_a/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt60_a/keymaps/via/rules.mk @@ -1,71 +1,2 @@ -# project specific files -SRC = drivers/issi/is31fl3736.c \ - drivers/avr/i2c_master.c \ - keyboards/wilba_tech/wt_mono_backlight.c \ - keyboards/wilba_tech/wt_main.c - -# MCU name -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section -BOOTLOADER = atmel-dfu - - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # 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 -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = yes # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 -FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches - RAW_ENABLE = yes DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/wilba_tech/wt60_a/rules.mk b/keyboards/wilba_tech/wt60_a/rules.mk index e41f2186b3a3..4f702fab4983 100644 --- a/keyboards/wilba_tech/wt60_a/rules.mk +++ b/keyboards/wilba_tech/wt60_a/rules.mk @@ -1,6 +1,7 @@ # project specific files SRC = drivers/issi/is31fl3736.c \ drivers/avr/i2c_master.c \ + quantum/color.c \ keyboards/wilba_tech/wt_mono_backlight.c \ keyboards/wilba_tech/wt_main.c diff --git a/keyboards/wilba_tech/wt60_d/keymaps/via/rules.mk b/keyboards/wilba_tech/wt60_d/keymaps/via/rules.mk index f072c67198c2..8834bf0c8e51 100644 --- a/keyboards/wilba_tech/wt60_d/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt60_d/keymaps/via/rules.mk @@ -1,68 +1,2 @@ -# project specific files -SRC = keyboards/wilba_tech/wt_main.c - -# MCU name -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section -BOOTLOADER = atmel-dfu - - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # 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 -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = yes # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 -FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches - RAW_ENABLE = yes DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/wilba_tech/wt60_d/rules.mk b/keyboards/wilba_tech/wt60_d/rules.mk index f072c67198c2..7ba0b9223b29 100644 --- a/keyboards/wilba_tech/wt60_d/rules.mk +++ b/keyboards/wilba_tech/wt60_d/rules.mk @@ -1,50 +1,19 @@ # project specific files SRC = keyboards/wilba_tech/wt_main.c - + # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - # Build Options # change yes to no to disable # diff --git a/keyboards/wilba_tech/wt65_a/config.h b/keyboards/wilba_tech/wt65_a/config.h index f1bcb990aab2..9d67c317b289 100644 --- a/keyboards/wilba_tech/wt65_a/config.h +++ b/keyboards/wilba_tech/wt65_a/config.h @@ -179,14 +179,30 @@ /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 -#define WT_MONO_BACKLIGHT +// enable the mono backlight +#define MONO_BACKLIGHT_ENABLED 1 + +// disable backlight when USB suspended (PC sleep/hibernate/shutdown) +#define MONO_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED 0 + +// disable backlight after timeout in minutes, 0 = no timeout +#define MONO_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0 + +// the default brightness +#define MONO_BACKLIGHT_BRIGHTNESS 255 + +// the default effect +#define MONO_BACKLIGHT_EFFECT 1 + +// the default effect speed (0-3) +#define MONO_BACKLIGHT_EFFECT_SPEED 0 #define DYNAMIC_KEYMAP_LAYER_COUNT 4 // EEPROM usage // TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F +#define EEPROM_MAGIC 0x4520 #define EEPROM_MAGIC_ADDR 34 // Bump this every time we change what we store // This will automatically reset the EEPROM with defaults @@ -194,9 +210,11 @@ #define EEPROM_VERSION 0x08 #define EEPROM_VERSION_ADDR 36 -// Dynamic keymap starts after EEPROM version -#define DYNAMIC_KEYMAP_EEPROM_ADDR 37 -// Dynamic macro starts after dynamic keymaps (37+(4*5*15*2)) = (37+600) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 637 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 387 +// Backlight config starts after EEPROM version +#define MONO_BACKLIGHT_CONFIG_EEPROM_ADDR 37 +// Dynamic keymap starts after backlight config (37+7) +#define DYNAMIC_KEYMAP_EEPROM_ADDR 44 +// Dynamic macro starts after dynamic keymaps (44+(4*5*15*2)) = (44+600) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 644 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 380 #define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/wilba_tech/wt65_a/keymaps/via/rules.mk b/keyboards/wilba_tech/wt65_a/keymaps/via/rules.mk index 76a07d7a44ac..8834bf0c8e51 100644 --- a/keyboards/wilba_tech/wt65_a/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt65_a/keymaps/via/rules.mk @@ -1,71 +1,2 @@ -# project specific files -SRC = drivers/issi/is31fl3736.c \ - drivers/avr/i2c_master.c \ - keyboards/wilba_tech/wt_mono_backlight.c \ - keyboards/wilba_tech/wt_main.c - -# MCU name -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section -BOOTLOADER = atmel-dfu - - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # 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 -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = yes # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 -FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches - RAW_ENABLE = yes DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/wilba_tech/wt65_a/rules.mk b/keyboards/wilba_tech/wt65_a/rules.mk index e41f2186b3a3..9b5bd1e7f9ba 100644 --- a/keyboards/wilba_tech/wt65_a/rules.mk +++ b/keyboards/wilba_tech/wt65_a/rules.mk @@ -1,50 +1,21 @@ # project specific files SRC = drivers/issi/is31fl3736.c \ drivers/avr/i2c_master.c \ + quantum/color.c \ keyboards/wilba_tech/wt_mono_backlight.c \ keyboards/wilba_tech/wt_main.c # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu diff --git a/keyboards/wilba_tech/wt65_b/config.h b/keyboards/wilba_tech/wt65_b/config.h index 765ed8ee1d0d..8b2437fc92af 100644 --- a/keyboards/wilba_tech/wt65_b/config.h +++ b/keyboards/wilba_tech/wt65_b/config.h @@ -179,14 +179,30 @@ /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 -#define WT_MONO_BACKLIGHT +// enable the mono backlight +#define MONO_BACKLIGHT_ENABLED 1 + +// disable backlight when USB suspended (PC sleep/hibernate/shutdown) +#define MONO_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED 0 + +// disable backlight after timeout in minutes, 0 = no timeout +#define MONO_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0 + +// the default brightness +#define MONO_BACKLIGHT_BRIGHTNESS 255 + +// the default effect +#define MONO_BACKLIGHT_EFFECT 1 + +// the default effect speed (0-3) +#define MONO_BACKLIGHT_EFFECT_SPEED 0 #define DYNAMIC_KEYMAP_LAYER_COUNT 4 // EEPROM usage // TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F +#define EEPROM_MAGIC 0x4520 #define EEPROM_MAGIC_ADDR 34 // Bump this every time we change what we store // This will automatically reset the EEPROM with defaults @@ -194,9 +210,11 @@ #define EEPROM_VERSION 0x08 #define EEPROM_VERSION_ADDR 36 -// Dynamic keymap starts after EEPROM version -#define DYNAMIC_KEYMAP_EEPROM_ADDR 37 -// Dynamic macro starts after dynamic keymaps (37+(4*5*15*2)) = (37+600) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 637 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 387 +// Backlight config starts after EEPROM version +#define MONO_BACKLIGHT_CONFIG_EEPROM_ADDR 37 +// Dynamic keymap starts after backlight config (37+7) +#define DYNAMIC_KEYMAP_EEPROM_ADDR 44 +// Dynamic macro starts after dynamic keymaps (44+(4*5*15*2)) = (44+600) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 644 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 380 #define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/wilba_tech/wt65_b/keymaps/via/rules.mk b/keyboards/wilba_tech/wt65_b/keymaps/via/rules.mk index 76a07d7a44ac..8834bf0c8e51 100644 --- a/keyboards/wilba_tech/wt65_b/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt65_b/keymaps/via/rules.mk @@ -1,71 +1,2 @@ -# project specific files -SRC = drivers/issi/is31fl3736.c \ - drivers/avr/i2c_master.c \ - keyboards/wilba_tech/wt_mono_backlight.c \ - keyboards/wilba_tech/wt_main.c - -# MCU name -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section -BOOTLOADER = atmel-dfu - - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # 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 -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = yes # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 -FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches - RAW_ENABLE = yes DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/wilba_tech/wt65_b/rules.mk b/keyboards/wilba_tech/wt65_b/rules.mk index e41f2186b3a3..9b5bd1e7f9ba 100644 --- a/keyboards/wilba_tech/wt65_b/rules.mk +++ b/keyboards/wilba_tech/wt65_b/rules.mk @@ -1,50 +1,21 @@ # project specific files SRC = drivers/issi/is31fl3736.c \ drivers/avr/i2c_master.c \ + quantum/color.c \ keyboards/wilba_tech/wt_mono_backlight.c \ keyboards/wilba_tech/wt_main.c # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu diff --git a/keyboards/wilba_tech/wt69_a/keymaps/via/rules.mk b/keyboards/wilba_tech/wt69_a/keymaps/via/rules.mk index f072c67198c2..8834bf0c8e51 100644 --- a/keyboards/wilba_tech/wt69_a/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt69_a/keymaps/via/rules.mk @@ -1,68 +1,2 @@ -# project specific files -SRC = keyboards/wilba_tech/wt_main.c - -# MCU name -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section -BOOTLOADER = atmel-dfu - - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # 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 -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = yes # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 -FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches - RAW_ENABLE = yes DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/wilba_tech/wt69_a/rules.mk b/keyboards/wilba_tech/wt69_a/rules.mk index f1c632289cca..f349608cd98f 100644 --- a/keyboards/wilba_tech/wt69_a/rules.mk +++ b/keyboards/wilba_tech/wt69_a/rules.mk @@ -1,47 +1,17 @@ # project specific files SRC = keyboards/wilba_tech/wt_main.c - + # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu diff --git a/keyboards/wilba_tech/wt75_a/config.h b/keyboards/wilba_tech/wt75_a/config.h index 024370d54d86..f63bbf69c7a8 100644 --- a/keyboards/wilba_tech/wt75_a/config.h +++ b/keyboards/wilba_tech/wt75_a/config.h @@ -179,14 +179,33 @@ /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 -#define WT_MONO_BACKLIGHT +// enable the mono backlight +#define MONO_BACKLIGHT_ENABLED 1 + +// enable the RGB indicator for WT75-A +#define MONO_BACKLIGHT_WT75_A + +// disable backlight when USB suspended (PC sleep/hibernate/shutdown) +#define MONO_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED 0 + +// disable backlight after timeout in minutes, 0 = no timeout +#define MONO_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0 + +// the default brightness +#define MONO_BACKLIGHT_BRIGHTNESS 255 + +// the default effect +#define MONO_BACKLIGHT_EFFECT 1 + +// the default effect speed (0-3) +#define MONO_BACKLIGHT_EFFECT_SPEED 0 #define DYNAMIC_KEYMAP_LAYER_COUNT 4 // EEPROM usage // TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F +#define EEPROM_MAGIC 0x4520 #define EEPROM_MAGIC_ADDR 34 // Bump this every time we change what we store // This will automatically reset the EEPROM with defaults @@ -194,9 +213,11 @@ #define EEPROM_VERSION 0x08 #define EEPROM_VERSION_ADDR 36 -// Dynamic keymap starts after EEPROM version -#define DYNAMIC_KEYMAP_EEPROM_ADDR 37 -// Dynamic macro starts after dynamic keymaps (37+(4*6*15*2)) = (37+720) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 757 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 267 +// Backlight config starts after EEPROM version +#define MONO_BACKLIGHT_CONFIG_EEPROM_ADDR 37 +// Dynamic keymap starts after backlight config (37+7) +#define DYNAMIC_KEYMAP_EEPROM_ADDR 44 +// Dynamic macro starts after dynamic keymaps (44+(4*6*15*2)) = (44+720) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 764 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 260 #define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/wilba_tech/wt75_a/keymaps/via/rules.mk b/keyboards/wilba_tech/wt75_a/keymaps/via/rules.mk index 76a07d7a44ac..8834bf0c8e51 100644 --- a/keyboards/wilba_tech/wt75_a/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt75_a/keymaps/via/rules.mk @@ -1,71 +1,2 @@ -# project specific files -SRC = drivers/issi/is31fl3736.c \ - drivers/avr/i2c_master.c \ - keyboards/wilba_tech/wt_mono_backlight.c \ - keyboards/wilba_tech/wt_main.c - -# MCU name -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section -BOOTLOADER = atmel-dfu - - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # 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 -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = yes # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 -FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches - RAW_ENABLE = yes DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/wilba_tech/wt75_a/rules.mk b/keyboards/wilba_tech/wt75_a/rules.mk index e41f2186b3a3..9b5bd1e7f9ba 100644 --- a/keyboards/wilba_tech/wt75_a/rules.mk +++ b/keyboards/wilba_tech/wt75_a/rules.mk @@ -1,50 +1,21 @@ # project specific files SRC = drivers/issi/is31fl3736.c \ drivers/avr/i2c_master.c \ + quantum/color.c \ keyboards/wilba_tech/wt_mono_backlight.c \ keyboards/wilba_tech/wt_main.c # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu diff --git a/keyboards/wilba_tech/wt75_b/config.h b/keyboards/wilba_tech/wt75_b/config.h index b8ada14e8f22..b173b024174d 100644 --- a/keyboards/wilba_tech/wt75_b/config.h +++ b/keyboards/wilba_tech/wt75_b/config.h @@ -179,14 +179,33 @@ /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 -#define WT_MONO_BACKLIGHT +// enable the mono backlight +#define MONO_BACKLIGHT_ENABLED 1 + +// enable the RGB indicator for WT75-A +#define MONO_BACKLIGHT_WT75_A + +// disable backlight when USB suspended (PC sleep/hibernate/shutdown) +#define MONO_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED 0 + +// disable backlight after timeout in minutes, 0 = no timeout +#define MONO_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0 + +// the default brightness +#define MONO_BACKLIGHT_BRIGHTNESS 255 + +// the default effect +#define MONO_BACKLIGHT_EFFECT 1 + +// the default effect speed (0-3) +#define MONO_BACKLIGHT_EFFECT_SPEED 0 #define DYNAMIC_KEYMAP_LAYER_COUNT 4 // EEPROM usage // TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F +#define EEPROM_MAGIC 0x4520 #define EEPROM_MAGIC_ADDR 34 // Bump this every time we change what we store // This will automatically reset the EEPROM with defaults @@ -194,9 +213,11 @@ #define EEPROM_VERSION 0x08 #define EEPROM_VERSION_ADDR 36 -// Dynamic keymap starts after EEPROM version -#define DYNAMIC_KEYMAP_EEPROM_ADDR 37 -// Dynamic macro starts after dynamic keymaps (37+(4*6*16*2)) = (37+768) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 805 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 219 +// Backlight config starts after EEPROM version +#define MONO_BACKLIGHT_CONFIG_EEPROM_ADDR 37 +// Dynamic keymap starts after backlight config (37+7) +#define DYNAMIC_KEYMAP_EEPROM_ADDR 44 +// Dynamic macro starts after dynamic keymaps (44+(4*6*16*2)) = (44+768) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 812 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 212 #define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/wilba_tech/wt75_b/keymaps/via/rules.mk b/keyboards/wilba_tech/wt75_b/keymaps/via/rules.mk index 76a07d7a44ac..8834bf0c8e51 100644 --- a/keyboards/wilba_tech/wt75_b/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt75_b/keymaps/via/rules.mk @@ -1,71 +1,2 @@ -# project specific files -SRC = drivers/issi/is31fl3736.c \ - drivers/avr/i2c_master.c \ - keyboards/wilba_tech/wt_mono_backlight.c \ - keyboards/wilba_tech/wt_main.c - -# MCU name -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section -BOOTLOADER = atmel-dfu - - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # 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 -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = yes # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 -FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches - RAW_ENABLE = yes DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/wilba_tech/wt75_b/rules.mk b/keyboards/wilba_tech/wt75_b/rules.mk index e41f2186b3a3..9b5bd1e7f9ba 100644 --- a/keyboards/wilba_tech/wt75_b/rules.mk +++ b/keyboards/wilba_tech/wt75_b/rules.mk @@ -1,50 +1,21 @@ # project specific files SRC = drivers/issi/is31fl3736.c \ drivers/avr/i2c_master.c \ + quantum/color.c \ keyboards/wilba_tech/wt_mono_backlight.c \ keyboards/wilba_tech/wt_main.c # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu diff --git a/keyboards/wilba_tech/wt75_c/config.h b/keyboards/wilba_tech/wt75_c/config.h new file mode 100644 index 000000000000..71059987744e --- /dev/null +++ b/keyboards/wilba_tech/wt75_c/config.h @@ -0,0 +1,223 @@ +/* Copyright 2018 Jason Williams (Wilba) + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x6582 // wilba.tech +#define PRODUCT_ID 0x075C // 75-C +#define DEVICE_VER 0x0001 +#define MANUFACTURER wilba.tech +#define PRODUCT wilba.tech WT75-C +#define DESCRIPTION wilba.tech WT75-C + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 16 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { F1, F0, E6, F4, F6, F7 } +#define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6, B7, D4 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL */ +#define DIODE_DIRECTION ROW2COL + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * 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 + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +// enable the mono backlight +#define MONO_BACKLIGHT_ENABLED 1 + +// enable the RGB indicator for WT75-A +#define MONO_BACKLIGHT_WT75_A + +// disable backlight when USB suspended (PC sleep/hibernate/shutdown) +#define MONO_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED 0 + +// disable backlight after timeout in minutes, 0 = no timeout +#define MONO_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0 + +// the default brightness +#define MONO_BACKLIGHT_BRIGHTNESS 255 + +// the default effect +#define MONO_BACKLIGHT_EFFECT 1 + +// the default effect speed (0-3) +#define MONO_BACKLIGHT_EFFECT_SPEED 0 + +#define DYNAMIC_KEYMAP_LAYER_COUNT 4 + +// EEPROM usage + +// TODO: refactor with new user EEPROM code (coming soon) +#define EEPROM_MAGIC 0x4520 +#define EEPROM_MAGIC_ADDR 34 +// Bump this every time we change what we store +// This will automatically reset the EEPROM with defaults +// and avoid loading invalid data from the EEPROM +#define EEPROM_VERSION 0x08 +#define EEPROM_VERSION_ADDR 36 + +// Backlight config starts after EEPROM version +#define MONO_BACKLIGHT_CONFIG_EEPROM_ADDR 37 +// Dynamic keymap starts after backlight config (37+7) +#define DYNAMIC_KEYMAP_EEPROM_ADDR 44 +// Dynamic macro starts after dynamic keymaps (44+(4*6*16*2)) = (44+768) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 812 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 212 +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/wilba_tech/wt75_c/info.json b/keyboards/wilba_tech/wt75_c/info.json new file mode 100644 index 000000000000..bf63b2d00fa7 --- /dev/null +++ b/keyboards/wilba_tech/wt75_c/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "wilba.tech WT75-A", + "url": "https://wilba.tech", + "maintainer": "Wilba", + "width": 16.25, + "height": 6.5, + "layouts": { + "LAYOUT_all": { + "layout": [{"label":"0", "x":0, "y":0}, {"label":"1", "x":1.25, "y":0}, {"label":"2", "x":2.25, "y":0}, {"label":"3", "x":3.25, "y":0}, {"label":"4", "x":4.25, "y":0}, {"label":"5", "x":5.5, "y":0}, {"label":"6", "x":6.5, "y":0}, {"label":"7", "x":7.5, "y":0}, {"label":"8", "x":8.5, "y":0}, {"label":"9", "x":9.75, "y":0}, {"label":"10", "x":10.75, "y":0}, {"label":"11", "x":11.75, "y":0}, {"label":"12", "x":12.75, "y":0}, {"label":"13", "x":14, "y":0}, {"label":"14", "x":0, "y":1.25}, {"label":"15", "x":1, "y":1.25}, {"label":"16", "x":2, "y":1.25}, {"label":"17", "x":3, "y":1.25}, {"label":"18", "x":4, "y":1.25}, {"label":"19", "x":5, "y":1.25}, {"label":"20", "x":6, "y":1.25}, {"label":"21", "x":7, "y":1.25}, {"label":"22", "x":8, "y":1.25}, {"label":"23", "x":9, "y":1.25}, {"label":"24", "x":10, "y":1.25}, {"label":"25", "x":11, "y":1.25}, {"label":"26", "x":12, "y":1.25}, {"label":"27", "x":13, "y":1.25}, {"label":"28", "x":14, "y":1.25}, {"label":"29", "x":15.25, "y":1.25}, {"label":"30", "x":0, "y":2.25, "w":1.5}, {"label":"31", "x":1.5, "y":2.25}, {"label":"32", "x":2.5, "y":2.25}, {"label":"33", "x":3.5, "y":2.25}, {"label":"34", "x":4.5, "y":2.25}, {"label":"35", "x":5.5, "y":2.25}, {"label":"36", "x":6.5, "y":2.25}, {"label":"37", "x":7.5, "y":2.25}, {"label":"38", "x":8.5, "y":2.25}, {"label":"39", "x":9.5, "y":2.25}, {"label":"40", "x":10.5, "y":2.25}, {"label":"41", "x":11.5, "y":2.25}, {"label":"42", "x":12.5, "y":2.25}, {"label":"43", "x":13.5, "y":2.25, "w":1.5}, {"label":"44", "x":15.25, "y":2.25}, {"label":"45", "x":0, "y":3.25, "w":1.75}, {"label":"46", "x":1.75, "y":3.25}, {"label":"47", "x":2.75, "y":3.25}, {"label":"48", "x":3.75, "y":3.25}, {"label":"49", "x":4.75, "y":3.25}, {"label":"50", "x":5.75, "y":3.25}, {"label":"51", "x":6.75, "y":3.25}, {"label":"52", "x":7.75, "y":3.25}, {"label":"53", "x":8.75, "y":3.25}, {"label":"54", "x":9.75, "y":3.25}, {"label":"55", "x":10.75, "y":3.25}, {"label":"56", "x":11.75, "y":3.25}, {"label":"57", "x":12.75, "y":3.25, "w":2.25}, {"label":"58", "x":15.25, "y":3.25}, {"label":"59", "x":0, "y":4.25, "w":2.25}, {"label":"60", "x":2.25, "y":4.25}, {"label":"61", "x":3.25, "y":4.25}, {"label":"62", "x":4.25, "y":4.25}, {"label":"63", "x":5.25, "y":4.25}, {"label":"64", "x":6.25, "y":4.25}, {"label":"65", "x":7.25, "y":4.25}, {"label":"66", "x":8.25, "y":4.25}, {"label":"67", "x":9.25, "y":4.25}, {"label":"68", "x":10.25, "y":4.25}, {"label":"69", "x":11.25, "y":4.25}, {"label":"70", "x":12.25, "y":4.25, "w":1.75}, {"label":"71", "x":14.25, "y":4.5}, {"label":"72", "x":0, "y":5.25, "w":1.5}, {"label":"73", "x":1.5, "y":5.25}, {"label":"74", "x":2.5, "y":5.25, "w":1.5}, {"label":"75", "x":4, "y":5.25, "w":6}, {"label":"76", "x":10, "y":5.25, "w":1.5}, {"label":"77", "x":11.5, "y":5.25, "w":1.5}, {"label":"78", "x":13.25, "y":5.5}, {"label":"79", "x":14.25, "y":5.5}, {"label":"80", "x":15.25, "y":5.5}] + } + } +} \ No newline at end of file diff --git a/keyboards/wilba_tech/wt75_c/keymaps/default/keymap.c b/keyboards/wilba_tech/wt75_c/keymaps/default/keymap.c new file mode 100644 index 000000000000..0eedd4cb10c6 --- /dev/null +++ b/keyboards/wilba_tech/wt75_c/keymaps/default/keymap.c @@ -0,0 +1,41 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // Default layer + [0] = LAYOUT_all( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, + KC_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_BSPC, KC_BSPC, KC_DEL, + 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_PGUP, + 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_PGDN, + 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_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), + + // Fn1 Layer + [1] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + // Fn2 Layer + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + // Fn3 Layer + [3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; + diff --git a/keyboards/wilba_tech/wt75_c/keymaps/via/keymap.c b/keyboards/wilba_tech/wt75_c/keymaps/via/keymap.c new file mode 100644 index 000000000000..0eedd4cb10c6 --- /dev/null +++ b/keyboards/wilba_tech/wt75_c/keymaps/via/keymap.c @@ -0,0 +1,41 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // Default layer + [0] = LAYOUT_all( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, + KC_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_BSPC, KC_BSPC, KC_DEL, + 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_PGUP, + 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_PGDN, + 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_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), + + // Fn1 Layer + [1] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + // Fn2 Layer + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + // Fn3 Layer + [3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; + diff --git a/keyboards/wilba_tech/wt75_c/keymaps/via/rules.mk b/keyboards/wilba_tech/wt75_c/keymaps/via/rules.mk new file mode 100644 index 000000000000..8834bf0c8e51 --- /dev/null +++ b/keyboards/wilba_tech/wt75_c/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/wilba_tech/wt75_c/readme.md b/keyboards/wilba_tech/wt75_c/readme.md new file mode 100644 index 000000000000..7bcef19003ef --- /dev/null +++ b/keyboards/wilba_tech/wt75_c/readme.md @@ -0,0 +1,13 @@ +# wilba.tech WT75-C + +WT75-C is a keyboard PCB supporting 75% layout with offset arrow keys. [More info at wilba.tech](https://wilba.tech/) + +Keyboard Maintainer: [Wilba6582](/~https://github.com/Wilba6582) +Hardware Supported: wilba.tech WT75-C +Hardware Availability: Custom keyboard group buys + +Make example for this keyboard (after setting up your build environment): + + make wilba_tech/wt75_c:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). \ No newline at end of file diff --git a/keyboards/wilba_tech/wt75_c/rules.mk b/keyboards/wilba_tech/wt75_c/rules.mk new file mode 100644 index 000000000000..9b5bd1e7f9ba --- /dev/null +++ b/keyboards/wilba_tech/wt75_c/rules.mk @@ -0,0 +1,39 @@ +# project specific files +SRC = drivers/issi/is31fl3736.c \ + drivers/avr/i2c_master.c \ + quantum/color.c \ + keyboards/wilba_tech/wt_mono_backlight.c \ + keyboards/wilba_tech/wt_main.c + +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # 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 +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches diff --git a/keyboards/wilba_tech/wt75_c/wt75_c.c b/keyboards/wilba_tech/wt75_c/wt75_c.c new file mode 100644 index 000000000000..ccff6d62c94b --- /dev/null +++ b/keyboards/wilba_tech/wt75_c/wt75_c.c @@ -0,0 +1,17 @@ +/* Copyright 2018 Jason Williams (Wilba) + * + * 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 . + */ + +// Nothing to see here, move along... ;-) diff --git a/keyboards/wilba_tech/wt75_c/wt75_c.h b/keyboards/wilba_tech/wt75_c/wt75_c.h new file mode 100644 index 000000000000..4c74bb117c16 --- /dev/null +++ b/keyboards/wilba_tech/wt75_c/wt75_c.h @@ -0,0 +1,46 @@ +/* Copyright 2018 Jason Williams (Wilba) + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define ____ KC_NO + +// Right switch of split backspace is at 2,13 and is the only switch +// whose physical position doesn't match switch matrix position :-( +// However, it also makes no sense to view the physical as 16 columns, +// so the numbering goes 00 to 14. Deal with it. +// +// 0,15 exists on PCB but is blocked by the 7V blocker so until someone +// designs a case that uses it, we can just forget it exists. + +#define LAYOUT_all( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K315, \ + K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, \ + K500, K501, K502, K506, K510, K511, K512, K513, K515 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, ____, K014, ____ }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, ____, K215 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, ____, ____, K315 }, \ + { K400, ____, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, ____, ____ }, \ + { K500, K501, K502, ____, ____, ____, K506, ____, ____, ____, K510, K511, K512, K513, ____, K515 } \ +} + diff --git a/keyboards/wilba_tech/wt80_a/config.h b/keyboards/wilba_tech/wt80_a/config.h index 3ba90230b583..15dac9047fe9 100644 --- a/keyboards/wilba_tech/wt80_a/config.h +++ b/keyboards/wilba_tech/wt80_a/config.h @@ -179,14 +179,30 @@ /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 -#define WT_MONO_BACKLIGHT +// enable the mono backlight +#define MONO_BACKLIGHT_ENABLED 1 + +// disable backlight when USB suspended (PC sleep/hibernate/shutdown) +#define MONO_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED 0 + +// disable backlight after timeout in minutes, 0 = no timeout +#define MONO_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0 + +// the default brightness +#define MONO_BACKLIGHT_BRIGHTNESS 255 + +// the default effect +#define MONO_BACKLIGHT_EFFECT 1 + +// the default effect speed (0-3) +#define MONO_BACKLIGHT_EFFECT_SPEED 0 #define DYNAMIC_KEYMAP_LAYER_COUNT 4 // EEPROM usage // TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F +#define EEPROM_MAGIC 0x4520 #define EEPROM_MAGIC_ADDR 34 // Bump this every time we change what we store // This will automatically reset the EEPROM with defaults @@ -194,9 +210,11 @@ #define EEPROM_VERSION 0x08 #define EEPROM_VERSION_ADDR 36 -// Dynamic keymap starts after EEPROM version -#define DYNAMIC_KEYMAP_EEPROM_ADDR 37 -// Dynamic macro starts after dynamic keymaps (37+(4*6*17*2)) = (37+816) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 853 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 171 +// Backlight config starts after EEPROM version +#define MONO_BACKLIGHT_CONFIG_EEPROM_ADDR 37 +// Dynamic keymap starts after backlight config (37+7) +#define DYNAMIC_KEYMAP_EEPROM_ADDR 44 +// Dynamic macro starts after dynamic keymaps (44+(4*6*17*2)) = (44+816) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 860 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 164 #define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/wilba_tech/wt80_a/keymaps/via/rules.mk b/keyboards/wilba_tech/wt80_a/keymaps/via/rules.mk index 76a07d7a44ac..8834bf0c8e51 100644 --- a/keyboards/wilba_tech/wt80_a/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt80_a/keymaps/via/rules.mk @@ -1,71 +1,2 @@ -# project specific files -SRC = drivers/issi/is31fl3736.c \ - drivers/avr/i2c_master.c \ - keyboards/wilba_tech/wt_mono_backlight.c \ - keyboards/wilba_tech/wt_main.c - -# MCU name -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section -BOOTLOADER = atmel-dfu - - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # 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 -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = yes # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 -FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches - RAW_ENABLE = yes DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/wilba_tech/wt80_a/rules.mk b/keyboards/wilba_tech/wt80_a/rules.mk index e41f2186b3a3..9b5bd1e7f9ba 100644 --- a/keyboards/wilba_tech/wt80_a/rules.mk +++ b/keyboards/wilba_tech/wt80_a/rules.mk @@ -1,50 +1,21 @@ # project specific files SRC = drivers/issi/is31fl3736.c \ drivers/avr/i2c_master.c \ + quantum/color.c \ keyboards/wilba_tech/wt_mono_backlight.c \ keyboards/wilba_tech/wt_main.c # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu diff --git a/keyboards/wilba_tech/wt8_a/rules.mk b/keyboards/wilba_tech/wt8_a/rules.mk index f1c632289cca..5e87a299592f 100644 --- a/keyboards/wilba_tech/wt8_a/rules.mk +++ b/keyboards/wilba_tech/wt8_a/rules.mk @@ -1,50 +1,19 @@ # project specific files SRC = keyboards/wilba_tech/wt_main.c - + # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - # Build Options # change yes to no to disable # diff --git a/keyboards/wilba_tech/wt_main.c b/keyboards/wilba_tech/wt_main.c index e6ea4a21bd14..32fc6f9e4417 100644 --- a/keyboards/wilba_tech/wt_main.c +++ b/keyboards/wilba_tech/wt_main.c @@ -20,9 +20,9 @@ #if RGB_BACKLIGHT_ENABLED #include "keyboards/wilba_tech/wt_rgb_backlight.h" #endif // RGB_BACKLIGHT_ENABLED -#ifdef WT_MONO_BACKLIGHT +#if MONO_BACKLIGHT_ENABLED #include "keyboards/wilba_tech/wt_mono_backlight.h" -#endif // WT_MONO_BACKLIGHT +#endif // MONO_BACKLIGHT_ENABLED #include "keyboards/wilba_tech/via_api.h" // Temporary hack #include "keyboards/wilba_tech/via_keycodes.h" // Temporary hack @@ -150,7 +150,7 @@ void raw_hid_receive( uint8_t *data, uint8_t length ) break; } #endif // DYNAMIC_KEYMAP_ENABLE -#if RGB_BACKLIGHT_ENABLED +#if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED case id_backlight_config_set_value: { backlight_config_set_value(command_data); @@ -166,7 +166,7 @@ void raw_hid_receive( uint8_t *data, uint8_t length ) backlight_config_save(); break; } -#endif // RGB_BACKLIGHT_ENABLED +#endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED case id_eeprom_reset: { eeprom_reset(); @@ -202,16 +202,16 @@ void main_init(void) // If the EEPROM has the magic, the data is good. // OK to load from EEPROM. if (eeprom_is_valid()) { -#if RGB_BACKLIGHT_ENABLED +#if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED backlight_config_load(); -#endif // RGB_BACKLIGHT_ENABLED +#endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED } else { -#if RGB_BACKLIGHT_ENABLED +#if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED // If the EEPROM has not been saved before, or is out of date, // save the default values to the EEPROM. Default values - // come from construction of the zeal_backlight_config instance. + // come from construction of the backlight_config instance. backlight_config_save(); -#endif // RGB_BACKLIGHT_ENABLED +#endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED #ifdef DYNAMIC_KEYMAP_ENABLE // This resets the keymaps in EEPROM to what is in flash. dynamic_keymap_reset(); @@ -222,20 +222,13 @@ void main_init(void) eeprom_set_valid(true); } -#if RGB_BACKLIGHT_ENABLED - // Initialize LED drivers for backlight. - backlight_init_drivers(); - - backlight_timer_init(); - backlight_timer_enable(); -#endif // RGB_BACKLIGHT_ENABLED -#ifdef WT_MONO_BACKLIGHT +#if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED // Initialize LED drivers for backlight. backlight_init_drivers(); backlight_timer_init(); backlight_timer_enable(); -#endif // WT_MONO_BACKLIGHT +#endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED } void bootmagic_lite(void) @@ -267,22 +260,18 @@ void matrix_init_kb(void) void matrix_scan_kb(void) { -#if RGB_BACKLIGHT_ENABLED - // This only updates the LED driver buffers if something has changed. - backlight_update_pwm_buffers(); -#endif // RGB_BACKLIGHT_ENABLED -#ifdef WT_MONO_BACKLIGHT +#if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED // This only updates the LED driver buffers if something has changed. backlight_update_pwm_buffers(); -#endif +#endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED matrix_scan_user(); } bool process_record_kb(uint16_t keycode, keyrecord_t *record) { -#if RGB_BACKLIGHT_ENABLED +#if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED process_record_backlight(keycode, record); -#endif // RGB_BACKLIGHT_ENABLED +#endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED switch(keycode) { case FN_MO13: @@ -372,22 +361,23 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) void led_set_kb(uint8_t usb_led) { -#if RGB_BACKLIGHT_ENABLED +#if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED backlight_set_indicator_state(usb_led); -#endif // RGB_BACKLIGHT_ENABLED +#endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED + led_set_user(usb_led); } void suspend_power_down_kb(void) { -#if RGB_BACKLIGHT_ENABLED +#if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED backlight_set_suspend_state(true); -#endif // RGB_BACKLIGHT_ENABLED +#endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED } void suspend_wakeup_init_kb(void) { -#if RGB_BACKLIGHT_ENABLED +#if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED backlight_set_suspend_state(false); -#endif // RGB_BACKLIGHT_ENABLED +#endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED } diff --git a/keyboards/wilba_tech/wt_mono_backlight.c b/keyboards/wilba_tech/wt_mono_backlight.c index bf485bce1f23..69d82e582ac9 100644 --- a/keyboards/wilba_tech/wt_mono_backlight.c +++ b/keyboards/wilba_tech/wt_mono_backlight.c @@ -14,20 +14,43 @@ * along with this program. If not, see . */ +#include "quantum.h" #include "wt_mono_backlight.h" +#include "wt_rgb_backlight_api.h" // reuse these for now +#include "wt_rgb_backlight_keycodes.h" // reuse these for now + #include "drivers/avr/i2c_master.h" #include "drivers/issi/is31fl3736.h" - #include +#include "progmem.h" +#include "quantum/color.h" + #define ISSI_ADDR_DEFAULT 0x50 +#define BACKLIGHT_EFFECT_MAX 3 + +#ifndef MONO_BACKLIGHT_COLOR_1 +#define MONO_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 } +#endif + +backlight_config g_config = { + .disable_when_usb_suspended = MONO_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED, + .disable_after_timeout = MONO_BACKLIGHT_DISABLE_AFTER_TIMEOUT, + .brightness = MONO_BACKLIGHT_BRIGHTNESS, + .effect = MONO_BACKLIGHT_EFFECT, + .effect_speed = MONO_BACKLIGHT_EFFECT_SPEED, + .color_1 = MONO_BACKLIGHT_COLOR_1, +}; + bool g_suspend_state = false; +uint8_t g_indicator_state = 0; // Global tick at 20 Hz uint32_t g_tick = 0; -uint8_t g_config_effect_speed = 0; -uint8_t g_config_brightness = 255; + +// Ticks since any key was last hit. +uint32_t g_any_key_hit = 0; void backlight_init_drivers(void) { @@ -41,6 +64,10 @@ void backlight_init_drivers(void) IS31FL3736_update_led_control_registers( ISSI_ADDR_DEFAULT, 0x00 ); } +void backlight_set_key_hit(uint8_t row, uint8_t column) +{ + g_any_key_hit = 0; +} // This is (F_CPU/1024) / 20 Hz // = 15625 Hz / 20 Hz @@ -82,13 +109,63 @@ void backlight_set_suspend_state(bool state) g_suspend_state = state; } +void backlight_set_indicator_state(uint8_t state) +{ + g_indicator_state = state; +} + +void backlight_set_brightness_all( uint8_t value ) +{ + IS31FL3736_mono_set_brightness_all( value ); +} + +void backlight_effect_all_off(void) +{ + IS31FL3736_mono_set_brightness_all( 0 ); +} + +void backlight_effect_all_on(void) +{ + IS31FL3736_mono_set_brightness_all( g_config.brightness ); +} + +void backlight_effect_raindrops(bool initialize) +{ + // Change one LED every tick + uint8_t led_to_change = ( g_tick & 0x000 ) == 0 ? rand() % 96 : 255; + + for ( int i=0; i<96; i++ ) + { + // If initialize, all get set to random brightness + // If not, all but one will stay the same as before. + if ( initialize || i == led_to_change ) + { + IS31FL3736_mono_set_brightness(i, rand() & 0xFF ); + } + } +} + void backlight_effect_cycle_all(void) { - uint8_t offset = ( g_tick << g_config_effect_speed ) & 0xFF; + uint8_t offset = ( g_tick << g_config.effect_speed ) & 0xFF; backlight_set_brightness_all( offset ); } +// This runs after another backlight effect and replaces +// colors already set +void backlight_effect_indicators(void) +{ +#if defined(MONO_BACKLIGHT_WT75_A) + HSV hsv = { .h = g_config.color_1.h, .s = g_config.color_1.s, .v = g_config.brightness }; + RGB rgb = hsv_to_rgb( hsv ); + // G8, H8, I8 -> (6*8+7) (7*8+7), (8*8+7) + IS31FL3736_mono_set_brightness(55, rgb.r); + IS31FL3736_mono_set_brightness(63, rgb.g); + IS31FL3736_mono_set_brightness(71, rgb.b); +#endif // MONO_BACKLIGHT_WT75_A +} + ISR(TIMER3_COMPA_vect) { // delay 1 second before driving LEDs or doing anything else @@ -100,8 +177,154 @@ ISR(TIMER3_COMPA_vect) g_tick++; - //backlight_effect_cycle_all(); - backlight_set_brightness_all( 255 ); + if ( g_any_key_hit < 0xFFFFFFFF ) + { + g_any_key_hit++; + } + + // Ideally we would also stop sending zeros to the LED driver PWM buffers + // while suspended and just do a software shutdown. This is a cheap hack for now. + bool suspend_backlight = ((g_suspend_state && g_config.disable_when_usb_suspended) || + (g_config.disable_after_timeout > 0 && g_any_key_hit > g_config.disable_after_timeout * 60 * 20)); + uint8_t effect = suspend_backlight ? 0 : g_config.effect; + + // Keep track of the effect used last time, + // detect change in effect, so each effect can + // have an optional initialization. + static uint8_t effect_last = 255; + bool initialize = effect != effect_last; + effect_last = effect; + + // this gets ticked at 20 Hz. + // each effect can opt to do calculations + // and/or request PWM buffer updates. + switch ( effect ) + { + case 0: + backlight_effect_all_off(); + break; + case 1: + backlight_effect_all_on();; + break; + case 2: + backlight_effect_raindrops(initialize); + break; + default: + backlight_effect_all_off(); + break; + } + + if ( ! suspend_backlight ) + { + backlight_effect_indicators(); + } +} + +// Some helpers for setting/getting HSV +void _set_color( HS *color, uint8_t *data ) +{ + color->h = data[0]; + color->s = data[1]; +} + +void _get_color( HS *color, uint8_t *data ) +{ + data[0] = color->h; + data[1] = color->s; +} + +void backlight_config_set_value( uint8_t *data ) +{ + bool reinitialize = false; + uint8_t *value_id = &(data[0]); + uint8_t *value_data = &(data[1]); + switch ( *value_id ) + { + case id_disable_when_usb_suspended: + { + g_config.disable_when_usb_suspended = (bool)*value_data; + break; + } + case id_disable_after_timeout: + { + g_config.disable_after_timeout = *value_data; + break; + } + case id_brightness: + { + g_config.brightness = *value_data; + break; + } + case id_effect: + { + g_config.effect = *value_data; + break; + } + case id_effect_speed: + { + g_config.effect_speed = *value_data; + break; + } + case id_color_1: + { + _set_color( &(g_config.color_1), value_data ); + break; + } + } + + if ( reinitialize ) + { + backlight_init_drivers(); + } +} + +void backlight_config_get_value( uint8_t *data ) +{ + uint8_t *value_id = &(data[0]); + uint8_t *value_data = &(data[1]); + switch ( *value_id ) + { + case id_disable_when_usb_suspended: + { + *value_data = ( g_config.disable_when_usb_suspended ? 1 : 0 ); + break; + } + case id_disable_after_timeout: + { + *value_data = g_config.disable_after_timeout; + break; + } + case id_brightness: + { + *value_data = g_config.brightness; + break; + } + case id_effect: + { + *value_data = g_config.effect; + break; + } + case id_effect_speed: + { + *value_data = g_config.effect_speed; + break; + } + case id_color_1: + { + _get_color( &(g_config.color_1), value_data ); + break; + } + } +} + +void backlight_config_load(void) +{ + eeprom_read_block( &g_config, ((void*)MONO_BACKLIGHT_CONFIG_EEPROM_ADDR), sizeof(backlight_config) ); +} + +void backlight_config_save(void) +{ + eeprom_update_block( &g_config, ((void*)MONO_BACKLIGHT_CONFIG_EEPROM_ADDR), sizeof(backlight_config) ); } void backlight_update_pwm_buffers(void) @@ -109,8 +332,110 @@ void backlight_update_pwm_buffers(void) IS31FL3736_update_pwm_buffers(ISSI_ADDR_DEFAULT,0x00); } -void backlight_set_brightness_all( uint8_t value ) +bool process_record_backlight(uint16_t keycode, keyrecord_t *record) { - IS31FL3736_mono_set_brightness_all( value ); + // Record keypresses for backlight effects + if ( record->event.pressed ) + { + backlight_set_key_hit( record->event.key.row, record->event.key.col ); + } + + switch(keycode) + { + case BR_INC: + if (record->event.pressed) + { + backlight_brightness_increase(); + } + return false; + break; + case BR_DEC: + if (record->event.pressed) + { + backlight_brightness_decrease(); + } + return false; + break; + case EF_INC: + if (record->event.pressed) + { + backlight_effect_increase(); + } + return false; + break; + case EF_DEC: + if (record->event.pressed) + { + backlight_effect_decrease(); + } + return false; + break; + case ES_INC: + if (record->event.pressed) + { + backlight_effect_speed_increase(); + } + return false; + break; + case ES_DEC: + if (record->event.pressed) + { + backlight_effect_speed_decrease(); + } + return false; + break; + } + + return true; +} + +// Deals with the messy details of incrementing an integer +uint8_t increment( uint8_t value, uint8_t step, uint8_t min, uint8_t max ) +{ + int16_t new_value = value; + new_value += step; + return MIN( MAX( new_value, min ), max ); } +uint8_t decrement( uint8_t value, uint8_t step, uint8_t min, uint8_t max ) +{ + int16_t new_value = value; + new_value -= step; + return MIN( MAX( new_value, min ), max ); +} + +void backlight_effect_increase(void) +{ + g_config.effect = increment( g_config.effect, 1, 0, BACKLIGHT_EFFECT_MAX ); + backlight_config_save(); +} + +void backlight_effect_decrease(void) +{ + g_config.effect = decrement( g_config.effect, 1, 0, BACKLIGHT_EFFECT_MAX ); + backlight_config_save(); +} + +void backlight_effect_speed_increase(void) +{ + g_config.effect_speed = increment( g_config.effect_speed, 1, 0, 3 ); + backlight_config_save(); +} + +void backlight_effect_speed_decrease(void) +{ + g_config.effect_speed = decrement( g_config.effect_speed, 1, 0, 3 ); + backlight_config_save(); +} + +void backlight_brightness_increase(void) +{ + g_config.brightness = increment( g_config.brightness, 8, 0, 255 ); + backlight_config_save(); +} + +void backlight_brightness_decrease(void) +{ + g_config.brightness = decrement( g_config.brightness, 8, 0, 255 ); + backlight_config_save(); +} diff --git a/keyboards/wilba_tech/wt_mono_backlight.h b/keyboards/wilba_tech/wt_mono_backlight.h index 70031bedc747..2f913d2cb618 100644 --- a/keyboards/wilba_tech/wt_mono_backlight.h +++ b/keyboards/wilba_tech/wt_mono_backlight.h @@ -19,6 +19,36 @@ #include #include +#include "quantum/color.h" + +typedef struct PACKED +{ + uint8_t h; + uint8_t s; +} HS; + +typedef struct +{ + bool disable_when_usb_suspended:1; // | + bool __pad1:1; // | + bool __pad2:1; // | + bool __pad3:1; // | + bool __pad4:1; // | + bool __pad5:1; // | + bool __pad6:1; // | + bool __pad7:1; // 1 byte + uint8_t disable_after_timeout; // 1 byte + uint8_t brightness; // 1 byte + uint8_t effect; // 1 byte + uint8_t effect_speed; // 1 byte + HS color_1; // 2 bytes (Indicator Color for Xeno) +} backlight_config; // = 7 bytes + +void backlight_config_load(void); +void backlight_config_save(void); +void backlight_config_set_value( uint8_t *data ); +void backlight_config_get_value( uint8_t *data ); + void backlight_init_drivers(void); void backlight_timer_init(void); @@ -26,8 +56,24 @@ void backlight_timer_enable(void); void backlight_timer_disable(void); void backlight_set_suspend_state(bool state); +void backlight_set_indicator_state(uint8_t state); +// This should not be called from an interrupt +// (eg. from a timer interrupt). +// Call this while idle (in between matrix scans). +// If the buffer is dirty, it will update the driver with the buffer. void backlight_update_pwm_buffers(void); -void backlight_set_brightness_all( uint8_t value ); +// Handle backlight specific keycodes +bool process_record_backlight(uint16_t keycode, keyrecord_t *record); + +void backlight_set_key_hit(uint8_t row, uint8_t col); + +void backlight_effect_increase(void); +void backlight_effect_decrease(void); +void backlight_effect_speed_increase(void); +void backlight_effect_speed_decrease(void); + +void backlight_brightness_increase(void); +void backlight_brightness_decrease(void); diff --git a/keyboards/wilba_tech/zeal60/rules.mk b/keyboards/wilba_tech/zeal60/rules.mk index 5d20659f831d..b8d63050c69a 100644 --- a/keyboards/wilba_tech/zeal60/rules.mk +++ b/keyboards/wilba_tech/zeal60/rules.mk @@ -1,5 +1,3 @@ - - # project specific files SRC = keyboards/wilba_tech/wt_main.c \ keyboards/wilba_tech/wt_rgb_backlight.c \ @@ -10,42 +8,14 @@ SRC = keyboards/wilba_tech/wt_main.c \ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - -# Boot Section +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu # Do not put the microcontroller into power saving mode diff --git a/keyboards/wilba_tech/zeal65/rules.mk b/keyboards/wilba_tech/zeal65/rules.mk index a1cd32aad5b4..f0df99656146 100644 --- a/keyboards/wilba_tech/zeal65/rules.mk +++ b/keyboards/wilba_tech/zeal65/rules.mk @@ -1,5 +1,3 @@ - - # project specific files SRC = keyboards/wilba_tech/wt_main.c \ keyboards/wilba_tech/wt_rgb_backlight.c \ @@ -10,42 +8,14 @@ SRC = keyboards/wilba_tech/wt_main.c \ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - -# Boot Section +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu # Do not put the microcontroller into power saving mode From c54d2cbe02f1c9c1743aa4d68ed3451a2398eab1 Mon Sep 17 00:00:00 2001 From: Leivince John Marte Date: Sat, 12 Oct 2019 12:38:49 +0800 Subject: [PATCH 095/316] [Keymap] Feature/keymap/projectkb/alice/devinceble (#6986) * Added KBD6X Vimwarrior HHKB TOFU Personal Layout * Added Readme.md for Vimwarrior HHKB Tofu Keymap * Added DZ60 Vimwarrior WKL Tofu Keymap * Update Rename keymaps to devinceble_hhkb_tofu and devinceble_wkl_tofu * Update rules.mk Added BOOTLOADER config. * [Keymap] Added Devinceble Personal Keymap for ProjectKeyboard Alice * Update Remove Backslashes --- .../alice/keymaps/devinceble/keymap.c | 41 +++++++++++++++++++ .../alice/keymaps/devinceble/readme.md | 9 ++++ .../alice/keymaps/devinceble/rules.mk | 1 + 3 files changed, 51 insertions(+) create mode 100644 keyboards/projectkb/alice/keymaps/devinceble/keymap.c create mode 100644 keyboards/projectkb/alice/keymaps/devinceble/readme.md create mode 100644 keyboards/projectkb/alice/keymaps/devinceble/rules.mk diff --git a/keyboards/projectkb/alice/keymaps/devinceble/keymap.c b/keyboards/projectkb/alice/keymaps/devinceble/keymap.c new file mode 100644 index 000000000000..bf46aa95b654 --- /dev/null +++ b/keyboards/projectkb/alice/keymaps/devinceble/keymap.c @@ -0,0 +1,41 @@ +/* Copyright 2019 Devinceble AKA Vimwarrior + * + * 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 . + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_default( + KC_INS, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, + KC_PGUP, 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_PGDN, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_LALT, KC_LGUI, KC_SPC, MO(2), KC_SPC, KC_RALT, KC_RCTL + ), + [1] = LAYOUT_default( + KC_TRNS, KC_TRNS, 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_TRNS, KC_DEL, + KC_TRNS, KC_TRNS, KC_BTN1, KC_MS_U, KC_BTN2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, 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_LEFT, KC_RGHT, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DOWN, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [2] = LAYOUT_default( + RGB_TOG, KC_TRNS, 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_TRNS, KC_DEL, + RGB_MOD, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SAI, RGB_HUI, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + RGB_RMOD, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, RGB_SAD, RGB_HUD, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, BL_INC, BL_DEC, BL_TOGG, BL_BRTG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET + ), +}; diff --git a/keyboards/projectkb/alice/keymaps/devinceble/readme.md b/keyboards/projectkb/alice/keymaps/devinceble/readme.md new file mode 100644 index 000000000000..dfb0392e3d54 --- /dev/null +++ b/keyboards/projectkb/alice/keymaps/devinceble/readme.md @@ -0,0 +1,9 @@ +# Devinceble AKA Vimwarrior ProjectKeyboard Alice + +Build Hex File: + + make projectkb/alice:devinceble + +Flash Keyboard + + make projectkb/alice:devinceble:flash diff --git a/keyboards/projectkb/alice/keymaps/devinceble/rules.mk b/keyboards/projectkb/alice/keymaps/devinceble/rules.mk new file mode 100644 index 000000000000..522abf46b15b --- /dev/null +++ b/keyboards/projectkb/alice/keymaps/devinceble/rules.mk @@ -0,0 +1 @@ +MOUSEKEY_ENABLE = yes From 076d8babbbd762f9a316a26144d966238b9b71cc Mon Sep 17 00:00:00 2001 From: fauxpark Date: Sat, 12 Oct 2019 15:41:58 +1100 Subject: [PATCH 096/316] [CLI] `qmk docs` graceful shutdown on Ctrl+C (#6989) --- lib/python/qmk/cli/docs.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/python/qmk/cli/docs.py b/lib/python/qmk/cli/docs.py index a0888ec38896..b41989139665 100644 --- a/lib/python/qmk/cli/docs.py +++ b/lib/python/qmk/cli/docs.py @@ -19,4 +19,9 @@ def docs(cli): cli.log.info("Serving QMK docs at http://localhost:%d/", cli.config.docs.port) cli.log.info("Press Control+C to exit.") - httpd.serve_forever() + try: + httpd.serve_forever() + except KeyboardInterrupt: + cli.log.info("Stopping HTTP server...") + finally: + httpd.shutdown() From 7becbfb44a7ed11593a1c322cda0dd9825c483d4 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Fri, 11 Oct 2019 21:44:38 -0700 Subject: [PATCH 097/316] [Keyboard] New Keyboard: BM43A (#6997) * new keyboard bm43a * Thanks to noroads for generating this with his online tool * add QMK Configurator support thanks to noroads * turn on bootmagic lite * update readme * remove unneeded comments --- keyboards/bm43a/bm43a.c | 51 ++++++++++++++++ keyboards/bm43a/bm43a.h | 30 ++++++++++ keyboards/bm43a/config.h | 73 +++++++++++++++++++++++ keyboards/bm43a/info.json | 58 ++++++++++++++++++ keyboards/bm43a/keymaps/default/config.h | 19 ++++++ keyboards/bm43a/keymaps/default/keymap.c | 33 ++++++++++ keyboards/bm43a/keymaps/default/readme.md | 1 + keyboards/bm43a/readme.md | 16 +++++ keyboards/bm43a/rules.mk | 33 ++++++++++ 9 files changed, 314 insertions(+) create mode 100644 keyboards/bm43a/bm43a.c create mode 100644 keyboards/bm43a/bm43a.h create mode 100644 keyboards/bm43a/config.h create mode 100644 keyboards/bm43a/info.json create mode 100644 keyboards/bm43a/keymaps/default/config.h create mode 100644 keyboards/bm43a/keymaps/default/keymap.c create mode 100644 keyboards/bm43a/keymaps/default/readme.md create mode 100644 keyboards/bm43a/readme.md create mode 100644 keyboards/bm43a/rules.mk diff --git a/keyboards/bm43a/bm43a.c b/keyboards/bm43a/bm43a.c new file mode 100644 index 000000000000..36543e3721d1 --- /dev/null +++ b/keyboards/bm43a/bm43a.c @@ -0,0 +1,51 @@ +/* Copyright 2019 mechmerlin + * + * 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 . + */ +#include "bm43a.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* + +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/bm43a/bm43a.h b/keyboards/bm43a/bm43a.h new file mode 100644 index 000000000000..87ca05c4d1aa --- /dev/null +++ b/keyboards/bm43a/bm43a.h @@ -0,0 +1,30 @@ +/* Copyright 2019 mechmerlin + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1B, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2B, \ + K30, K31, K32, K33, K35, K37, K38, K39, K3B \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, KC_NO, K1B }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, KC_NO, K2B }, \ + { K30, K31, K32, K33, KC_NO, K35, KC_NO, K37, K38, K39, KC_NO, K3B }, \ +} diff --git a/keyboards/bm43a/config.h b/keyboards/bm43a/config.h new file mode 100644 index 000000000000..538b2eadde37 --- /dev/null +++ b/keyboards/bm43a/config.h @@ -0,0 +1,73 @@ +/* +Copyright 2019 mechmerlin + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER KPRepublic +#define PRODUCT BM43A +#define DESCRIPTION A QMK-powered custom keyboard + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { D1, F4, F1, F0 } +#define MATRIX_COL_PINS { B0, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4 } + +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 5 + +#define RGB_DI_PIN E2 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 10 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +/*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +#endif diff --git a/keyboards/bm43a/info.json b/keyboards/bm43a/info.json new file mode 100644 index 000000000000..59dd63c72ef6 --- /dev/null +++ b/keyboards/bm43a/info.json @@ -0,0 +1,58 @@ +{ + "keyboard_name": "BM43A", + "url": "", + "maintainer": "qmk", + "width": 12, + "height": 4, + "layouts": { + "LAYOUT": { + "key_count": 43, + "layout": [ + {"label":"K00 (D1,B0)", "x":0, "y":0}, + {"label":"K01 (D1,F5)", "x":1, "y":0}, + {"label":"K02 (D1,F6)", "x":2, "y":0}, + {"label":"K03 (D1,F7)", "x":3, "y":0}, + {"label":"K04 (D1,C7)", "x":4, "y":0}, + {"label":"K05 (D1,C6)", "x":5, "y":0}, + {"label":"K06 (D1,B6)", "x":6, "y":0}, + {"label":"K07 (D1,B5)", "x":7, "y":0}, + {"label":"K08 (D1,B4)", "x":8, "y":0}, + {"label":"K09 (D1,D7)", "x":9, "y":0}, + {"label":"K0A (D1,D6)", "x":10, "y":0}, + {"label":"K0B (D1,D4)", "x":11, "y":0}, + {"label":"K10 (F4,B0)", "x":0, "y":1, "w":1.25}, + {"label":"K11 (F4,F5)", "x":1.25, "y":1}, + {"label":"K12 (F4,F6)", "x":2.25, "y":1}, + {"label":"K13 (F4,F7)", "x":3.25, "y":1}, + {"label":"K14 (F4,C7)", "x":4.25, "y":1}, + {"label":"K15 (F4,C6)", "x":5.25, "y":1}, + {"label":"K16 (F4,B6)", "x":6.25, "y":1}, + {"label":"K17 (F4,B5)", "x":7.25, "y":1}, + {"label":"K18 (F4,B4)", "x":8.25, "y":1}, + {"label":"K19 (F4,D7)", "x":9.25, "y":1}, + {"label":"K1B (F4,D4)", "x":10.25, "y":1, "w":1.75}, + {"label":"K20 (F1,B0)", "x":0, "y":2, "w":2}, + {"label":"K21 (F1,F5)", "x":2, "y":2}, + {"label":"K22 (F1,F6)", "x":3, "y":2}, + {"label":"K23 (F1,F7)", "x":4, "y":2}, + {"label":"K24 (F1,C7)", "x":5, "y":2}, + {"label":"K25 (F1,C6)", "x":6, "y":2}, + {"label":"K26 (F1,B6)", "x":7, "y":2}, + {"label":"K27 (F1,B5)", "x":8, "y":2}, + {"label":"K28 (F1,B4)", "x":9, "y":2}, + {"label":"K29 (F1,D7)", "x":10, "y":2}, + {"label":"K2B (F1,D4)", "x":11, "y":2}, + {"label":"K30 (F0,B0)", "x":0, "y":3}, + {"label":"K31 (F0,F5)", "x":1, "y":3}, + {"label":"K32 (F0,F6)", "x":2, "y":3}, + {"label":"K33 (F0,F7)", "x":3, "y":3, "w":2.75}, + {"label":"K35 (F0,C6)", "x":5.75, "y":3, "w":2.25}, + {"label":"K37 (F0,B5)", "x":8, "y":3}, + {"label":"K38 (F0,B4)", "x":9, "y":3}, + {"label":"K39 (F0,D7)", "x":10, "y":3}, + {"label":"K3B (F0,D4)", "x":11, "y":3} + ] + } + } + ,"meta": "https://noroadsleft.github.io/kbf_qmk_converter/" +} \ No newline at end of file diff --git a/keyboards/bm43a/keymaps/default/config.h b/keyboards/bm43a/keymaps/default/config.h new file mode 100644 index 000000000000..60dd02a9d0ee --- /dev/null +++ b/keyboards/bm43a/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 mechmerlin + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/bm43a/keymaps/default/keymap.c b/keyboards/bm43a/keymaps/default/keymap.c new file mode 100644 index 000000000000..7cafeadb3212 --- /dev/null +++ b/keyboards/bm43a/keymaps/default/keymap.c @@ -0,0 +1,33 @@ +/* Copyright 2019 mechmerlin + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_UP, KC_DOT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, BL_TOGG, BL_DEC, BL_INC, BL_STEP, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +}; + diff --git a/keyboards/bm43a/keymaps/default/readme.md b/keyboards/bm43a/keymaps/default/readme.md new file mode 100644 index 000000000000..cec19a1f9efb --- /dev/null +++ b/keyboards/bm43a/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for bm43a diff --git a/keyboards/bm43a/readme.md b/keyboards/bm43a/readme.md new file mode 100644 index 000000000000..ee5c173338f1 --- /dev/null +++ b/keyboards/bm43a/readme.md @@ -0,0 +1,16 @@ +# bm43a + +A 40% mechanical keyboard. + +This firmware was originally taken from a kbfirmware.json and converted through [kbf_qmk_converter](https://noroadsleft.github.io/kbf_qmk_converter/). You may find the original `.json` files [here](https://drive.google.com/drive/folders/11DowBYrFN_uCNa9Q9bXwuMn91vmZYBcG). + + +Keyboard Maintainer: [MechMerlin](/~https://github.com/mechmerlin) +Hardware Supported: bm43a PCB +Hardware Availability: [KPRepublic](https://kprepublic.com/products/bm43a-bm43-43-keys-40-custom-mechanical-keyboard-pcb-programmed-numpad-layouts-qmk-firmware-with-rgb-bottom-underglow-alps-mx) + +Make example for this keyboard (after setting up your build environment): + + make bm43a:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/bm43a/rules.mk b/keyboards/bm43a/rules.mk new file mode 100644 index 000000000000..66a778b6c231 --- /dev/null +++ b/keyboards/bm43a/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # 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 +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) From bb43010170a955053868376d5dcfd3abba5b16c9 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Fri, 11 Oct 2019 22:04:00 -0700 Subject: [PATCH 098/316] Fix broken link to ps2avrgb flashing instructions (#7011) --- quantum/template/ps2avrgb/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quantum/template/ps2avrgb/readme.md b/quantum/template/ps2avrgb/readme.md index 9d3ca0006fbf..3dce0e950570 100644 --- a/quantum/template/ps2avrgb/readme.md +++ b/quantum/template/ps2avrgb/readme.md @@ -12,7 +12,7 @@ Make example for this keyboard (after setting up your build environment): make %KEYBOARD%:default -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](flashing_bootloadhid.md)) +Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) make %KEYBOARD%:default:flash From 23178d73fc94d28c10029171f205d4815e516270 Mon Sep 17 00:00:00 2001 From: Leo Batyuk Date: Sat, 12 Oct 2019 07:08:03 +0200 Subject: [PATCH 099/316] [Keymap] Add soundmonster's keymap for crkbd (#6964) * Add soundmonster's layout for crkbd * Incorporate feedback from review * Remove unneeded base layer-related code --- .../crkbd/keymaps/soundmonster/README.md | 13 + keyboards/crkbd/keymaps/soundmonster/config.h | 110 +++++ .../crkbd/keymaps/soundmonster/glcdfont.c | 241 +++++++++++ keyboards/crkbd/keymaps/soundmonster/keymap.c | 393 ++++++++++++++++++ keyboards/crkbd/keymaps/soundmonster/rules.mk | 6 + 5 files changed, 763 insertions(+) create mode 100644 keyboards/crkbd/keymaps/soundmonster/README.md create mode 100644 keyboards/crkbd/keymaps/soundmonster/config.h create mode 100644 keyboards/crkbd/keymaps/soundmonster/glcdfont.c create mode 100644 keyboards/crkbd/keymaps/soundmonster/keymap.c create mode 100644 keyboards/crkbd/keymaps/soundmonster/rules.mk diff --git a/keyboards/crkbd/keymaps/soundmonster/README.md b/keyboards/crkbd/keymaps/soundmonster/README.md new file mode 100644 index 000000000000..8b271cbbbadc --- /dev/null +++ b/keyboards/crkbd/keymaps/soundmonster/README.md @@ -0,0 +1,13 @@ +# Soundmonster's layout for Corne + +Features: + +* Modern OLED support (many thanks to @drashna): + * Proper orientation + * Graphic layer indicator ↑ ↓ + * Graphic modifier indicator ⌘ ⇧ ⌥ ⌃ +* Similar enough to the default keymap so you can easily port your custom keymap to it +* Mac-friendly (Command and Option on the thumbs) +* Vim-friendly (Esc, `:` and Ctrl on the thumbs) +* Full per-key RGB Matrix support out of the box (you still have to go through the nightmare of soldering yourself though 😉) + diff --git a/keyboards/crkbd/keymaps/soundmonster/config.h b/keyboards/crkbd/keymaps/soundmonster/config.h new file mode 100644 index 000000000000..1e58af3abec7 --- /dev/null +++ b/keyboards/crkbd/keymaps/soundmonster/config.h @@ -0,0 +1,110 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + +//#define USE_MATRIX_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +// #define SSD1306OLED +#undef USE_I2C +#undef SSD1306OLED + +#define USE_SERIAL_PD2 + +// #define TAPPING_FORCE_HOLD +#define TAPPING_TERM 150 +#define RETRO_TAPPING +#define IGNORE_MOD_TAP_INTERRUPT + +#ifdef RGBLIGHT_ENABLE + #undef RGBLED_NUM + #define RGBLED_NUM 27 + #define RGBLIGHT_ANIMATIONS + #define RGBLIGHT_SLEEP + #define RGBLIGHT_SPLIT + #define RGBLIGHT_LIMIT_VAL 120 + #define RGBLIGHT_HUE_STEP 10 + #define RGBLIGHT_SAT_STEP 17 + #define RGBLIGHT_VAL_STEP 17 +#endif + +#define OLED_FONT_H "keyboards/crkbd/keymaps/soundmonster/glcdfont.c" +// #define OLED_FONT_WIDTH 5 +// #define OLED_FONT_HEIGHT 7 + +#ifdef RGB_MATRIX_ENABLE +# define RGB_MATRIX_KEYPRESSES // reacts to keypresses +// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) +// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects +# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_MATRIX_FRAMEBUFFER_EFFECTS +# define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) +# define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. +# define RGB_MATRIX_HUE_STEP 8 +# define RGB_MATRIX_SAT_STEP 8 +# define RGB_MATRIX_VAL_STEP 8 +# define RGB_MATRIX_SPD_STEP 10 + +/* Disable the animations you don't want/need. You will need to disable a good number of these * + * because they take up a lot of space. Disable until you can successfully compile your firmware. */ +// # define DISABLE_RGB_MATRIX_ALPHAS_MODS +# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define DISABLE_RGB_MATRIX_BREATHING +// # define DISABLE_RGB_MATRIX_BAND_SAT +# define DISABLE_RGB_MATRIX_BAND_VAL +# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define DISABLE_RGB_MATRIX_CYCLE_ALL +# define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN +# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +// # define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define DISABLE_RGB_MATRIX_DUAL_BEACON +# define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define DISABLE_RGB_MATRIX_CYCLE_SPIRAL +# define DISABLE_RGB_MATRIX_RAINBOW_BEACON +# define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS +// # define DISABLE_RGB_MATRIX_RAINDROPS +# define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +// # define DISABLE_RGB_MATRIX_TYPING_HEATMAP +// # define DISABLE_RGB_MATRIX_DIGITAL_RAIN +# define DISABLE_RGB_MATRIX_SOLID_REACTIVE +# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define DISABLE_RGB_MATRIX_SPLASH +// # define DISABLE_RGB_MATRIX_MULTISPLASH +# define DISABLE_RGB_MATRIX_SOLID_SPLASH +# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +#endif diff --git a/keyboards/crkbd/keymaps/soundmonster/glcdfont.c b/keyboards/crkbd/keymaps/soundmonster/glcdfont.c new file mode 100644 index 000000000000..291445b5e3df --- /dev/null +++ b/keyboards/crkbd/keymaps/soundmonster/glcdfont.c @@ -0,0 +1,241 @@ +#pragma once + +#ifdef __AVR__ + #include + #include +#elif defined(ESP8266) + #include +#else + #define PROGMEM +#endif + +// Corne 8x6 font with QMK Firmware Logo +// Online editor: https://helixfonteditor.netlify.com/ +// See also: /~https://github.com/soundmonster/glcdfont_converter + +const unsigned char font[] PROGMEM = { +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00, +0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00, +0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00, +0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00, +0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00, +0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00, +0x00, 0x18, 0x3C, 0x18, 0x00, 0x00, +0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, +0x00, 0x18, 0x24, 0x18, 0x00, 0x00, +0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00, +0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00, +0x26, 0x29, 0x79, 0x29, 0x26, 0x00, +0x40, 0x7F, 0x05, 0x05, 0x07, 0x00, +0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00, +0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00, +0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00, +0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00, +0x14, 0x22, 0x7F, 0x22, 0x14, 0x00, +0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00, +0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, +0x00, 0x66, 0x89, 0x95, 0x6A, 0x00, +0x60, 0x60, 0x60, 0x60, 0x60, 0x00, +0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00, +0x08, 0x04, 0x7E, 0x04, 0x08, 0x00, +0x10, 0x20, 0x7E, 0x20, 0x10, 0x00, +0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00, +0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00, +0x1E, 0x10, 0x10, 0x10, 0x10, 0x00, +0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00, +0x30, 0x38, 0x3E, 0x38, 0x30, 0x00, +0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, +0x00, 0x07, 0x00, 0x07, 0x00, 0x00, +0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00, +0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00, +0x23, 0x13, 0x08, 0x64, 0x62, 0x00, +0x36, 0x49, 0x56, 0x20, 0x50, 0x00, +0x00, 0x08, 0x07, 0x03, 0x00, 0x00, +0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, +0x00, 0x41, 0x22, 0x1C, 0x00, 0x00, +0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00, +0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, +0x00, 0x80, 0x70, 0x30, 0x00, 0x00, +0x08, 0x08, 0x08, 0x08, 0x08, 0x00, +0x00, 0x00, 0x60, 0x60, 0x00, 0x00, +0x20, 0x10, 0x08, 0x04, 0x02, 0x00, +0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, +0x00, 0x42, 0x7F, 0x40, 0x00, 0x00, +0x72, 0x49, 0x49, 0x49, 0x46, 0x00, +0x21, 0x41, 0x49, 0x4D, 0x33, 0x00, +0x18, 0x14, 0x12, 0x7F, 0x10, 0x00, +0x27, 0x45, 0x45, 0x45, 0x39, 0x00, +0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00, +0x41, 0x21, 0x11, 0x09, 0x07, 0x00, +0x36, 0x49, 0x49, 0x49, 0x36, 0x00, +0x46, 0x49, 0x49, 0x29, 0x1E, 0x00, +0x00, 0x00, 0x14, 0x00, 0x00, 0x00, +0x00, 0x40, 0x34, 0x00, 0x00, 0x00, +0x00, 0x08, 0x14, 0x22, 0x41, 0x00, +0x14, 0x14, 0x14, 0x14, 0x14, 0x00, +0x00, 0x41, 0x22, 0x14, 0x08, 0x00, +0x02, 0x01, 0x59, 0x09, 0x06, 0x00, +0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00, +0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00, +0x7F, 0x49, 0x49, 0x49, 0x36, 0x00, +0x3E, 0x41, 0x41, 0x41, 0x22, 0x00, +0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00, +0x7F, 0x49, 0x49, 0x49, 0x41, 0x00, +0x7F, 0x09, 0x09, 0x09, 0x01, 0x00, +0x3E, 0x41, 0x41, 0x51, 0x73, 0x00, +0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, +0x00, 0x41, 0x7F, 0x41, 0x00, 0x00, +0x20, 0x40, 0x41, 0x3F, 0x01, 0x00, +0x7F, 0x08, 0x14, 0x22, 0x41, 0x00, +0x7F, 0x40, 0x40, 0x40, 0x40, 0x00, +0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00, +0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00, +0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00, +0x7F, 0x09, 0x09, 0x09, 0x06, 0x00, +0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00, +0x7F, 0x09, 0x19, 0x29, 0x46, 0x00, +0x26, 0x49, 0x49, 0x49, 0x32, 0x00, +0x03, 0x01, 0x7F, 0x01, 0x03, 0x00, +0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00, +0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00, +0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00, +0x63, 0x14, 0x08, 0x14, 0x63, 0x00, +0x03, 0x04, 0x78, 0x04, 0x03, 0x00, +0x61, 0x59, 0x49, 0x4D, 0x43, 0x00, +0x00, 0x7F, 0x41, 0x41, 0x41, 0x00, +0x02, 0x04, 0x08, 0x10, 0x20, 0x00, +0x00, 0x41, 0x41, 0x41, 0x7F, 0x00, +0x04, 0x02, 0x01, 0x02, 0x04, 0x00, +0x40, 0x40, 0x40, 0x40, 0x40, 0x00, +0x00, 0x03, 0x07, 0x08, 0x00, 0x00, +0x20, 0x54, 0x54, 0x78, 0x40, 0x00, +0x7F, 0x28, 0x44, 0x44, 0x38, 0x00, +0x38, 0x44, 0x44, 0x44, 0x28, 0x00, +0x38, 0x44, 0x44, 0x28, 0x7F, 0x00, +0x38, 0x54, 0x54, 0x54, 0x18, 0x00, +0x00, 0x08, 0x7E, 0x09, 0x02, 0x00, +0x18, 0x24, 0x24, 0x1C, 0x78, 0x00, +0x7F, 0x08, 0x04, 0x04, 0x78, 0x00, +0x00, 0x44, 0x7D, 0x40, 0x00, 0x00, +0x20, 0x40, 0x40, 0x3D, 0x00, 0x00, +0x7F, 0x10, 0x28, 0x44, 0x00, 0x00, +0x00, 0x41, 0x7F, 0x40, 0x00, 0x00, +0x7C, 0x04, 0x78, 0x04, 0x78, 0x00, +0x7C, 0x08, 0x04, 0x04, 0x78, 0x00, +0x38, 0x44, 0x44, 0x44, 0x38, 0x00, +0x7C, 0x18, 0x24, 0x24, 0x18, 0x00, +0x18, 0x24, 0x24, 0x18, 0x7C, 0x00, +0x7C, 0x08, 0x04, 0x04, 0x08, 0x00, +0x48, 0x54, 0x54, 0x54, 0x24, 0x00, +0x04, 0x04, 0x3F, 0x44, 0x24, 0x00, +0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00, +0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00, +0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00, +0x44, 0x28, 0x10, 0x28, 0x44, 0x00, +0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00, +0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, +0x00, 0x08, 0x36, 0x41, 0x00, 0x00, +0x00, 0x00, 0x77, 0x00, 0x00, 0x00, +0x00, 0x41, 0x36, 0x08, 0x00, 0x00, +0x02, 0x01, 0x02, 0x04, 0x02, 0x00, +0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, +0xF8, 0x18, 0x00, 0xC0, 0xF0, 0xFC, +0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0x7E, 0x00, 0x00, 0x00, +0x00, 0xF8, 0x04, 0x22, 0x52, 0xE2, +0x42, 0x42, 0x42, 0xE2, 0x52, 0x22, +0x22, 0x22, 0x42, 0x82, 0x02, 0x02, +0x22, 0x22, 0x02, 0x04, 0xF8, 0x00, +0x00, 0xF8, 0x04, 0x02, 0x02, 0x82, +0x42, 0x22, 0x42, 0x82, 0x02, 0x02, +0x02, 0x82, 0x42, 0x22, 0x12, 0x22, +0x42, 0x82, 0x02, 0x04, 0xF8, 0x00, +0x00, 0xF8, 0xFC, 0xDE, 0xAE, 0x1E, +0xBE, 0xBE, 0xBE, 0x1E, 0xAE, 0xDE, +0xDE, 0xDE, 0xBE, 0x7E, 0xFE, 0xFE, +0xDE, 0xDE, 0xFE, 0xFC, 0xF8, 0x00, +0x00, 0xF8, 0xFC, 0xFE, 0xFE, 0x7E, +0xBE, 0xDE, 0xBE, 0x7E, 0xFE, 0xFE, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x80, 0x80, 0x40, 0x40, 0x20, 0x20, +0x10, 0x10, 0x08, 0x08, 0x10, 0x10, +0x20, 0x20, 0x40, 0x40, 0x80, 0x80, +0x80, 0x80, 0xC0, 0xC0, 0xE0, 0xE0, +0xF0, 0xF0, 0xF8, 0xF8, 0xF0, 0xF0, +0xE0, 0xE0, 0xC0, 0xC0, 0x80, 0x80, +0x80, 0x80, 0x40, 0x40, 0x20, 0x20, +0x10, 0x10, 0x08, 0x08, 0x10, 0x10, +0x20, 0x20, 0x40, 0x40, 0x80, 0x80, +0x80, 0x80, 0x40, 0xC0, 0x60, 0xA0, +0x50, 0xB0, 0x58, 0xA8, 0x50, 0xB0, +0x60, 0xA0, 0x40, 0xC0, 0x80, 0x80, +0x00, 0xF8, 0xFC, 0xFE, 0xFF, 0xE0, +0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, +0x07, 0x01, 0x00, 0x00, 0x00, 0x00, +0x00, 0x1F, 0x20, 0x44, 0x4A, 0x47, +0x42, 0x42, 0x42, 0x47, 0x4A, 0x44, +0x40, 0x40, 0x40, 0x40, 0x41, 0x42, +0x44, 0x44, 0x40, 0x20, 0x1F, 0x00, +0x00, 0x1F, 0x20, 0x40, 0x41, 0x40, +0x40, 0x40, 0x40, 0x40, 0x41, 0x40, +0x41, 0x41, 0x4F, 0x48, 0x48, 0x48, +0x4F, 0x41, 0x41, 0x20, 0x1F, 0x00, +0x00, 0x1F, 0x3F, 0x7B, 0x75, 0x78, +0x7D, 0x7D, 0x7D, 0x78, 0x75, 0x7B, +0x7F, 0x7F, 0x7F, 0x7F, 0x7E, 0x7D, +0x7B, 0x7B, 0x7F, 0x3F, 0x1F, 0x00, +0x00, 0x1F, 0x3F, 0x7F, 0x7E, 0x7F, +0x7F, 0x7F, 0x7F, 0x7F, 0x7E, 0x7F, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x88, 0x88, 0x5D, 0x5D, 0x3E, 0x3E, +0x7C, 0x7C, 0xF8, 0xF8, 0x7C, 0x7C, +0x3E, 0x3E, 0x5D, 0x5D, 0x88, 0x88, +0x88, 0x88, 0x55, 0x55, 0x23, 0x23, +0x47, 0x47, 0x8F, 0x8F, 0x47, 0x47, +0x23, 0x23, 0x55, 0x55, 0x88, 0x88, +0x88, 0x88, 0xD5, 0xD5, 0xE2, 0xE2, +0xC4, 0xC4, 0x88, 0x88, 0xC4, 0xC4, +0xE2, 0xE2, 0xD5, 0xD5, 0x88, 0x88, +0x88, 0x88, 0x5D, 0xD5, 0x6B, 0xB6, +0x6D, 0xD6, 0xAD, 0xDA, 0x6D, 0xD6, +0x6B, 0xB6, 0x5D, 0xD5, 0x88, 0x88, +0x00, 0x03, 0x0F, 0x1F, 0x3F, 0x3F, +0x3F, 0x3F, 0x1F, 0x1F, 0x3F, 0x3F, +0x7F, 0x7F, 0x7F, 0x3F, 0x3F, 0x1F, +0x3F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7C, +0x78, 0x78, 0x38, 0x1C, 0x0F, 0x00, +0x04, 0xF8, 0x00, 0x00, 0xF8, 0x04, +0x20, 0x1F, 0x00, 0x00, 0x1F, 0x20, +0xFC, 0xF8, 0x00, 0x00, 0xF8, 0x04, +0x3F, 0x1F, 0x00, 0x00, 0x1F, 0x20, +0x04, 0xF8, 0x00, 0x00, 0xF8, 0xFC, +0x20, 0x1F, 0x00, 0x00, 0x1F, 0x3F, +0xFC, 0xF8, 0x00, 0x00, 0xF8, 0xFC, +0x3F, 0x1F, 0x00, 0x00, 0x1F, 0x3F, +0xFE, 0x7E, 0xBE, 0xDE, 0xEE, 0xDE, +0xBE, 0x7E, 0xFE, 0xFC, 0xF8, 0x00, +0x7E, 0x7E, 0x70, 0x77, 0x77, 0x77, +0x70, 0x7E, 0x7E, 0x3F, 0x1F, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x01, 0x01, 0x02, 0x02, +0x04, 0x04, 0x08, 0x08, 0x04, 0x04, +0x02, 0x02, 0x01, 0x01, 0x00, 0x00, +0x00, 0x00, 0x01, 0x01, 0x02, 0x02, +0x04, 0x04, 0x08, 0x08, 0x04, 0x04, +0x02, 0x02, 0x01, 0x01, 0x00, 0x00, +0x00, 0x00, 0x01, 0x01, 0x03, 0x03, +0x07, 0x07, 0x0F, 0x0F, 0x07, 0x07, +0x03, 0x03, 0x01, 0x01, 0x00, 0x00, +0x00, 0x00, 0x01, 0x01, 0x03, 0x02, +0x05, 0x06, 0x0D, 0x0A, 0x05, 0x06, +0x03, 0x02, 0x01, 0x01, 0x00, 0x00 +}; diff --git a/keyboards/crkbd/keymaps/soundmonster/keymap.c b/keyboards/crkbd/keymaps/soundmonster/keymap.c new file mode 100644 index 000000000000..28b3e19d1396 --- /dev/null +++ b/keyboards/crkbd/keymaps/soundmonster/keymap.c @@ -0,0 +1,393 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +#ifdef OLED_DRIVER_ENABLE +static uint32_t oled_timer = 0; +#endif + +extern uint8_t is_master; + +// 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. +enum layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST +}; + +// Custom keycodes for layer keys +// Dual function escape with left command +#define KC_LGESC LGUI_T(KC_ESC) + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ADJUST, + RGBRST, + KC_RACL // right alt / colon +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT( + //,-----------------------------------------. ,---------------------------------------------. + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + //|------+------+------+------+------+------| |------+------+-------+------+-------+--------| + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, + //|------+------+------+------+------+------| |------+------+-------+------+-------+--------| + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M,KC_COMM,KC_DOT,KC_SLSH,KC_RSPC, + //|------+------+------+------+------+------+------| |------+------+------+-------+------+-------+--------| + KC_LGESC,LOWER, KC_SPC, RCTL_T(KC_ENT), RAISE, KC_RACL + //`--------------------' `--------------------' + ), + + [_LOWER] = LAYOUT( + //,---------------------------------------------. ,-----------------------------------------. + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + //|------+------+-------+-------+-------+-------| |------+------+------+------+------+------| + KC_LCTL, KC_NO,KC_MS_L,KC_MS_D,KC_MS_U,KC_MS_R, KC_LEFT,KC_DOWN,KC_UP,KC_RIGHT,KC_NO,KC_NO, + //|------+------+-------+-------+-------+-------| |------+------+------+------+------+------| + KC_LSFT, KC_NO,KC_BTN2,KC_WH_D,KC_WH_U,KC_BTN1, KC_HOME,KC_PGDN,KC_PGUP,KC_END,KC_NO,KC_NO, + //|------+------+-------+-------+-------+-------+------| |------+------+------+------+------+------+------| + KC_LGUI, LOWER,KC_SPC, KC_ENT, RAISE,KC_RALT + //`--------------------' `--------------------' + ), + + [_RAISE] = LAYOUT( + //,-----------------------------------------. ,-----------------------------------------. + KC_ESC,KC_EXLM,KC_AT,KC_HASH,KC_DLR,KC_PERC, KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,KC_BSPC, + //|------+------+------+------+------+------| |------+------+------+------+------+------| + KC_LCTL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_MINS,KC_EQL,KC_LCBR,KC_RCBR,KC_PIPE,KC_GRV, + //|------+------+------+------+------+------| |------+------+------+------+------+------| + KC_LSFT, KC_F6, KC_F7, KC_F8, KC_F9,KC_F10, KC_UNDS,KC_PLUS,KC_LBRC,KC_RBRC,KC_BSLS,KC_TILD, + //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + KC_LGUI, LOWER,KC_SPC, KC_ENT, RAISE,KC_RALT + //`--------------------' `--------------------' + ), + + [_ADJUST] = LAYOUT( + //,-----------------------------------------. ,-----------------------------------------. + RESET,RGBRST, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,KC__MUTE, KC_NO, KC_NO, KC_NO, KC_NO, + //|------+------+------+------+------+------| |------+------+------+------+------+------| + RGB_TOG,RGB_HUI,RGB_SAI,RGB_VAI,RGB_SPI,KC_NO, KC_PAUSE,KC__VOLUP, KC_NO, KC_NO, KC_NO, KC_NO, + //|------+------+------+------+------+------| |------+------+------+------+------+------| + RGB_MOD,RGB_HUD,RGB_SAD,RGB_VAD,RGB_SPD,KC_NO, KC_SCROLLLOCK,KC__VOLDOWN, KC_NO, KC_NO, KC_NO, RGB_RMOD, + //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + KC_LGUI, LOWER,KC_SPC, KC_ENT, RAISE,KC_RALT + //`--------------------' `--------------------' + ) +}; + +int RGB_current_mode; + +// Setting ADJUST layer RGB back to default +void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { + if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) { + layer_on(layer3); + } else { + layer_off(layer3); + } +} + +void matrix_init_user(void) { + #ifdef RGBLIGHT_ENABLE + RGB_current_mode = rgblight_config.mode; + #endif +} + +#ifdef OLED_DRIVER_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; } + +void render_space(void) { + oled_write_P(PSTR(" "), false); +} + +void render_mod_status_gui_alt(uint8_t modifiers) { + static const char PROGMEM gui_off_1[] = {0x85, 0x86, 0}; + static const char PROGMEM gui_off_2[] = {0xa5, 0xa6, 0}; + static const char PROGMEM gui_on_1[] = {0x8d, 0x8e, 0}; + static const char PROGMEM gui_on_2[] = {0xad, 0xae, 0}; + + static const char PROGMEM alt_off_1[] = {0x87, 0x88, 0}; + static const char PROGMEM alt_off_2[] = {0xa7, 0xa8, 0}; + static const char PROGMEM alt_on_1[] = {0x8f, 0x90, 0}; + static const char PROGMEM alt_on_2[] = {0xaf, 0xb0, 0}; + + // fillers between the modifier icons bleed into the icon frames + static const char PROGMEM off_off_1[] = {0xc5, 0}; + static const char PROGMEM off_off_2[] = {0xc6, 0}; + static const char PROGMEM on_off_1[] = {0xc7, 0}; + static const char PROGMEM on_off_2[] = {0xc8, 0}; + static const char PROGMEM off_on_1[] = {0xc9, 0}; + static const char PROGMEM off_on_2[] = {0xca, 0}; + static const char PROGMEM on_on_1[] = {0xcb, 0}; + static const char PROGMEM on_on_2[] = {0xcc, 0}; + + if(modifiers & MOD_MASK_GUI) { + oled_write_P(gui_on_1, false); + } else { + oled_write_P(gui_off_1, false); + } + + if ((modifiers & MOD_MASK_GUI) && (modifiers & MOD_MASK_ALT)) { + oled_write_P(on_on_1, false); + } else if(modifiers & MOD_MASK_GUI) { + oled_write_P(on_off_1, false); + } else if(modifiers & MOD_MASK_ALT) { + oled_write_P(off_on_1, false); + } else { + oled_write_P(off_off_1, false); + } + + if(modifiers & MOD_MASK_ALT) { + oled_write_P(alt_on_1, false); + } else { + oled_write_P(alt_off_1, false); + } + + if(modifiers & MOD_MASK_GUI) { + oled_write_P(gui_on_2, false); + } else { + oled_write_P(gui_off_2, false); + } + + if (modifiers & MOD_MASK_GUI & MOD_MASK_ALT) { + oled_write_P(on_on_2, false); + } else if(modifiers & MOD_MASK_GUI) { + oled_write_P(on_off_2, false); + } else if(modifiers & MOD_MASK_ALT) { + oled_write_P(off_on_2, false); + } else { + oled_write_P(off_off_2, false); + } + + if(modifiers & MOD_MASK_ALT) { + oled_write_P(alt_on_2, false); + } else { + oled_write_P(alt_off_2, false); + } +} + +void render_mod_status_ctrl_shift(uint8_t modifiers) { + static const char PROGMEM ctrl_off_1[] = {0x89, 0x8a, 0}; + static const char PROGMEM ctrl_off_2[] = {0xa9, 0xaa, 0}; + static const char PROGMEM ctrl_on_1[] = {0x91, 0x92, 0}; + static const char PROGMEM ctrl_on_2[] = {0xb1, 0xb2, 0}; + + static const char PROGMEM shift_off_1[] = {0x8b, 0x8c, 0}; + static const char PROGMEM shift_off_2[] = {0xab, 0xac, 0}; + static const char PROGMEM shift_on_1[] = {0xcd, 0xce, 0}; + static const char PROGMEM shift_on_2[] = {0xcf, 0xd0, 0}; + + // fillers between the modifier icons bleed into the icon frames + static const char PROGMEM off_off_1[] = {0xc5, 0}; + static const char PROGMEM off_off_2[] = {0xc6, 0}; + static const char PROGMEM on_off_1[] = {0xc7, 0}; + static const char PROGMEM on_off_2[] = {0xc8, 0}; + static const char PROGMEM off_on_1[] = {0xc9, 0}; + static const char PROGMEM off_on_2[] = {0xca, 0}; + static const char PROGMEM on_on_1[] = {0xcb, 0}; + static const char PROGMEM on_on_2[] = {0xcc, 0}; + + if(modifiers & MOD_MASK_CTRL) { + oled_write_P(ctrl_on_1, false); + } else { + oled_write_P(ctrl_off_1, false); + } + + if ((modifiers & MOD_MASK_CTRL) && (modifiers & MOD_MASK_SHIFT)) { + oled_write_P(on_on_1, false); + } else if(modifiers & MOD_MASK_CTRL) { + oled_write_P(on_off_1, false); + } else if(modifiers & MOD_MASK_SHIFT) { + oled_write_P(off_on_1, false); + } else { + oled_write_P(off_off_1, false); + } + + if(modifiers & MOD_MASK_SHIFT) { + oled_write_P(shift_on_1, false); + } else { + oled_write_P(shift_off_1, false); + } + + if(modifiers & MOD_MASK_CTRL) { + oled_write_P(ctrl_on_2, false); + } else { + oled_write_P(ctrl_off_2, false); + } + + if (modifiers & MOD_MASK_CTRL & MOD_MASK_SHIFT) { + oled_write_P(on_on_2, false); + } else if(modifiers & MOD_MASK_CTRL) { + oled_write_P(on_off_2, false); + } else if(modifiers & MOD_MASK_SHIFT) { + oled_write_P(off_on_2, false); + } else { + oled_write_P(off_off_2, false); + } + + if(modifiers & MOD_MASK_SHIFT) { + oled_write_P(shift_on_2, false); + } else { + oled_write_P(shift_off_2, false); + } +} + +void render_logo(void) { + static const char PROGMEM corne_logo[] = { + 0x80, 0x81, 0x82, 0x83, 0x84, + 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, + 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0}; + oled_write_P(corne_logo, false); + oled_write_P(PSTR("corne"), false); +} + +void render_layer_state(void) { + static const char PROGMEM default_layer[] = { + 0x20, 0x94, 0x95, 0x96, 0x20, + 0x20, 0xb4, 0xb5, 0xb6, 0x20, + 0x20, 0xd4, 0xd5, 0xd6, 0x20, 0}; + static const char PROGMEM raise_layer[] = { + 0x20, 0x97, 0x98, 0x99, 0x20, + 0x20, 0xb7, 0xb8, 0xb9, 0x20, + 0x20, 0xd7, 0xd8, 0xd9, 0x20, 0}; + static const char PROGMEM lower_layer[] = { + 0x20, 0x9a, 0x9b, 0x9c, 0x20, + 0x20, 0xba, 0xbb, 0xbc, 0x20, + 0x20, 0xda, 0xdb, 0xdc, 0x20, 0}; + static const char PROGMEM adjust_layer[] = { + 0x20, 0x9d, 0x9e, 0x9f, 0x20, + 0x20, 0xbd, 0xbe, 0xbf, 0x20, + 0x20, 0xdd, 0xde, 0xdf, 0x20, 0}; + if(layer_state_is(_ADJUST)) { + oled_write_P(adjust_layer, false); + } else if(layer_state_is(_LOWER)) { + oled_write_P(lower_layer, false); + } else if(layer_state_is(_RAISE)) { + oled_write_P(raise_layer, false); + } else { + oled_write_P(default_layer, false); + } +} + +void render_status_main(void) { + render_logo(); + render_space(); + render_layer_state(); + render_space(); + render_mod_status_gui_alt(get_mods()|get_oneshot_mods()); + render_mod_status_ctrl_shift(get_mods()|get_oneshot_mods()); +} + +void render_status_secondary(void) { + render_logo(); + render_space(); + render_layer_state(); + render_space(); + render_mod_status_gui_alt(get_mods()|get_oneshot_mods()); + render_mod_status_ctrl_shift(get_mods()|get_oneshot_mods()); +} + +void oled_task_user(void) { + if (timer_elapsed32(oled_timer) > 30000) { + oled_off(); + return; + } +#ifndef SPLIT_KEYBOARD + else { oled_on(); } +#endif + + if (is_master) { + render_status_main(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) + } else { + render_status_secondary(); + } +} + +#endif +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { +#ifdef OLED_DRIVER_ENABLE + oled_timer = timer_read32(); +#endif + // set_timelog(); + } + static uint16_t my_colon_timer; + + switch (keycode) { + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } + return false; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } + return false; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + case KC_RACL: + if (record->event.pressed) { + my_colon_timer = timer_read(); + register_code(KC_RALT); + } else { + unregister_code(KC_RALT); + if (timer_elapsed(my_colon_timer) < TAPPING_TERM) { + SEND_STRING(":"); // Change the character(s) to be sent on tap here + } + } + return false; + case RGBRST: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + #endif + #ifdef RGB_MATRIX_ENABLE + if (record->event.pressed) { + eeconfig_update_rgb_matrix_default(); + rgb_matrix_enable(); + } + #endif + break; + } + return true; +} + +#ifdef RGB_MATRIX_ENABLE + +void suspend_power_down_keymap(void) { + rgb_matrix_set_suspend_state(true); +} + +void suspend_wakeup_init_keymap(void) { + rgb_matrix_set_suspend_state(false); +} + +#endif diff --git a/keyboards/crkbd/keymaps/soundmonster/rules.mk b/keyboards/crkbd/keymaps/soundmonster/rules.mk new file mode 100644 index 000000000000..bf7a84eb1f86 --- /dev/null +++ b/keyboards/crkbd/keymaps/soundmonster/rules.mk @@ -0,0 +1,6 @@ +RGBLIGHT_ENABLE = no +RGB_MATRIX_ENABLE = WS2812 +MOUSEKEY_ENABLE = no +NKRO_ENABLE = yes +OLED_DRIVER_ENABLE = yes + From a48468590ab83e808191c0e20c236d7eb6c13f0d Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sat, 12 Oct 2019 23:23:36 +0100 Subject: [PATCH 100/316] Remove i2c logic for STM32F103xB in favour of USE_I2CV1 (#6926) * Remove i2c logic for STM32F103xB in favour of USE_I2CV1 * Remove i2c logic for STM32F103xB in favour of USE_I2CV1 --- drivers/arm/i2c_master.c | 14 ++------------ keyboards/ergodox_stm32/config.h | 4 ++++ 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/drivers/arm/i2c_master.c b/drivers/arm/i2c_master.c index fcfe85b5617a..2a43ba23931c 100644 --- a/drivers/arm/i2c_master.c +++ b/drivers/arm/i2c_master.c @@ -32,27 +32,17 @@ static uint8_t i2c_address; -// ChibiOS uses two initialization structure for v1 and v2/v3 i2c APIs. -// The F1 series uses the v1 api, which have to initialized this way. -#ifdef STM32F103xB -static const I2CConfig i2cconfig = { - OPMODE_I2C, - 400000, - FAST_DUTY_CYCLE_2, -}; -#else -// This configures the I2C clock to 400khz assuming a 72Mhz clock -// For more info : https://www.st.com/en/embedded-software/stsw-stm32126.html static const I2CConfig i2cconfig = { #ifdef USE_I2CV1 I2C1_OPMODE, I2C1_CLOCK_SPEED, I2C1_DUTY_CYCLE, #else + // This configures the I2C clock to 400khz assuming a 72Mhz clock + // For more info : https://www.st.com/en/embedded-software/stsw-stm32126.html STM32_TIMINGR_PRESC(I2C1_TIMINGR_PRESC) | STM32_TIMINGR_SCLDEL(I2C1_TIMINGR_SCLDEL) | STM32_TIMINGR_SDADEL(I2C1_TIMINGR_SDADEL) | STM32_TIMINGR_SCLH(I2C1_TIMINGR_SCLH) | STM32_TIMINGR_SCLL(I2C1_TIMINGR_SCLL), 0, 0 #endif }; -#endif static i2c_status_t chibios_to_qmk(const msg_t* status) { switch (*status) { diff --git a/keyboards/ergodox_stm32/config.h b/keyboards/ergodox_stm32/config.h index 5305655214a4..e1b3d7b14e64 100644 --- a/keyboards/ergodox_stm32/config.h +++ b/keyboards/ergodox_stm32/config.h @@ -33,3 +33,7 @@ along with this program. If not, see . keyboard_report->mods == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) || \ keyboard_report->mods == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \ ) + +// i2c_master driver config +#define I2C1_CLOCK_SPEED 400000 +#define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2 From 2e7cd98c0644dc0f7f2a5cab5da7b0e019bd0810 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Sun, 13 Oct 2019 09:57:57 +1100 Subject: [PATCH 101/316] Cleanup rules.mk for 32U4 keyboards, G (#6971) * Cleanup rules.mk for 32U4 keyboards, G * Update keyboards/gray_studio/cod67/rules.mk --- keyboards/angel17/alpha/rules.mk | 15 +------ keyboards/angel17/rev1/rules.mk | 15 +------ keyboards/clueboard/card/rules.mk | 1 - keyboards/duck/orion/v3/rules.mk | 3 +- keyboards/fc660c/rules.mk | 1 - keyboards/geekboards/tester/rules.mk | 52 ++++--------------------- keyboards/georgi/rules.mk | 26 ++++++------- keyboards/gergo/rules.mk | 25 ++++++------ keyboards/gh60/revc/rules.mk | 54 +++++--------------------- keyboards/gh60/satan/rules.mk | 51 +++++------------------- keyboards/gh80_3000/rules.mk | 48 +++++------------------ keyboards/gonnerd/rules.mk | 53 +++++-------------------- keyboards/gray_studio/cod67/rules.mk | 54 +++++--------------------- keyboards/gray_studio/space65/rules.mk | 53 ++----------------------- keyboards/grid600/press/rules.mk | 51 +----------------------- keyboards/gskt00/rules.mk | 43 ++++---------------- 16 files changed, 97 insertions(+), 448 deletions(-) diff --git a/keyboards/angel17/alpha/rules.mk b/keyboards/angel17/alpha/rules.mk index 423ebddc5147..5a26a2e0bee1 100644 --- a/keyboards/angel17/alpha/rules.mk +++ b/keyboards/angel17/alpha/rules.mk @@ -1,27 +1,16 @@ # MCU name MCU = atmega32u4 - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/angel17/rev1/rules.mk b/keyboards/angel17/rev1/rules.mk index fe22b3ab86f7..c76c0244a85e 100644 --- a/keyboards/angel17/rev1/rules.mk +++ b/keyboards/angel17/rev1/rules.mk @@ -1,27 +1,16 @@ # MCU name MCU = atmega32u4 - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/clueboard/card/rules.mk b/keyboards/clueboard/card/rules.mk index 2162b25de124..9e3f19dc0c96 100644 --- a/keyboards/clueboard/card/rules.mk +++ b/keyboards/clueboard/card/rules.mk @@ -11,7 +11,6 @@ MCU = atmega32u4 # ATmega328P USBasp BOOTLOADER = atmel-dfu - # Build Options BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = yes # Mouse keys(+4700) diff --git a/keyboards/duck/orion/v3/rules.mk b/keyboards/duck/orion/v3/rules.mk index a57b3d60c955..c46cb7544836 100644 --- a/keyboards/duck/orion/v3/rules.mk +++ b/keyboards/duck/orion/v3/rules.mk @@ -11,7 +11,6 @@ MCU = atmega32u4 # ATmega328P USBasp BOOTLOADER = atmel-dfu - # Build Options # change yes to no to disable # @@ -36,4 +35,4 @@ CUSTOM_MATRIX = yes SRC += indicator_leds.c \ matrix.c duck_led/duck_led.c -LAYOUTS = tkl_ansi \ No newline at end of file +LAYOUTS = tkl_ansi diff --git a/keyboards/fc660c/rules.mk b/keyboards/fc660c/rules.mk index 18613a591712..b817b404fd80 100644 --- a/keyboards/fc660c/rules.mk +++ b/keyboards/fc660c/rules.mk @@ -11,7 +11,6 @@ MCU = atmega32u4 # ATmega328P USBasp BOOTLOADER = atmel-dfu - # Build Options # comment out to disable the options. # diff --git a/keyboards/geekboards/tester/rules.mk b/keyboards/geekboards/tester/rules.mk index 7e8d595fb712..1ca57f6d09c4 100644 --- a/keyboards/geekboards/tester/rules.mk +++ b/keyboards/geekboards/tester/rules.mk @@ -1,52 +1,16 @@ # MCU name MCU = atmega32u4 -# project specific files -#SRC = - -# 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 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = qmk-dfu -# Do not put the microcontroller into power saving mode -# when we get USB suspend event. We want it to keep updating -# backlight effects. - # Build Options # change yes to no to disable # diff --git a/keyboards/georgi/rules.mk b/keyboards/georgi/rules.mk index a87b448e3494..412a318f0cc1 100644 --- a/keyboards/georgi/rules.mk +++ b/keyboards/georgi/rules.mk @@ -1,18 +1,15 @@ -#---------------------------------------------------------------------------- -# make georgi:default:dfu -# Make sure you have dfu-programmer installed! -# Do not edit this file! Make a copy of keymaps/default and modify that! -#---------------------------------------------------------------------------- -# Source includes -SRC += matrix.c i2c_master.c sten.c - -# Hardware info +# MCU name MCU = atmega32u4 -F_CPU = 16000000 -ARCH = AVR8 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu -F_USB = $(F_CPU) -EXTRAFLAGS += -flto CUSTOM_MATRIX = yes MOUSEKEY_ENABLE = no @@ -21,3 +18,6 @@ EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = yes COMMAND_ENABLE = no NKRO_ENABLE = yes + +EXTRAFLAGS += -flto +SRC += matrix.c i2c_master.c sten.c diff --git a/keyboards/gergo/rules.mk b/keyboards/gergo/rules.mk index 2b5d62988ea2..41f201a45839 100644 --- a/keyboards/gergo/rules.mk +++ b/keyboards/gergo/rules.mk @@ -1,18 +1,15 @@ -#---------------------------------------------------------------------------- -# make gergo:germ:dfu -# Make sure you have dfu-programmer installed! -# Do not edit this file! Make a copy of keymaps/default and modify that! -#---------------------------------------------------------------------------- -# Source includes -SRC += matrix.c -QUANTUM_LIB_SRC += i2c_master.c - -# Hardware info +# MCU name MCU = atmega32u4 -F_CPU = 16000000 -ARCH = AVR8 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu -F_USB = $(F_CPU) CUSTOM_MATRIX = yes EXTRAKEY_ENABLE = yes @@ -21,3 +18,5 @@ COMMAND_ENABLE = yes BOOTMAGIC_ENABLE = lite DEBOUNCE_TYPE = eager_pr +SRC += matrix.c +QUANTUM_LIB_SRC += i2c_master.c diff --git a/keyboards/gh60/revc/rules.mk b/keyboards/gh60/revc/rules.mk index bf7ea514d6e6..c9362b334b4a 100644 --- a/keyboards/gh60/revc/rules.mk +++ b/keyboards/gh60/revc/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. diff --git a/keyboards/gh60/satan/rules.mk b/keyboards/gh60/satan/rules.mk index b6bb68391ff6..9bd667535d25 100644 --- a/keyboards/gh60/satan/rules.mk +++ b/keyboards/gh60/satan/rules.mk @@ -1,48 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. diff --git a/keyboards/gh80_3000/rules.mk b/keyboards/gh80_3000/rules.mk index 9e4bc3f0d2bc..0da2d6a2fd96 100644 --- a/keyboards/gh80_3000/rules.mk +++ b/keyboards/gh80_3000/rules.mk @@ -1,45 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. diff --git a/keyboards/gonnerd/rules.mk b/keyboards/gonnerd/rules.mk index ebea1005bac7..d4858ff13097 100644 --- a/keyboards/gonnerd/rules.mk +++ b/keyboards/gonnerd/rules.mk @@ -1,51 +1,18 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. +# Processor frequency F_CPU = 8000000 - -# -# 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 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable diff --git a/keyboards/gray_studio/cod67/rules.mk b/keyboards/gray_studio/cod67/rules.mk index 6cba6b6b8696..1df4615eb9b9 100644 --- a/keyboards/gray_studio/cod67/rules.mk +++ b/keyboards/gray_studio/cod67/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = lufa-ms # Build Options # change yes to no to disable diff --git a/keyboards/gray_studio/space65/rules.mk b/keyboards/gray_studio/space65/rules.mk index 261569206aa3..ced89eac045d 100644 --- a/keyboards/gray_studio/space65/rules.mk +++ b/keyboards/gray_studio/space65/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # @@ -79,4 +32,4 @@ AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) -LAYOUTS = 65_ansi_blocker \ No newline at end of file +LAYOUTS = 65_ansi_blocker diff --git a/keyboards/grid600/press/rules.mk b/keyboards/grid600/press/rules.mk index 1fcf3841bec3..fb575b3abc18 100644 --- a/keyboards/grid600/press/rules.mk +++ b/keyboards/grid600/press/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/gskt00/rules.mk b/keyboards/gskt00/rules.mk index 338384e3e86c..2acbeaa90152 100755 --- a/keyboards/gskt00/rules.mk +++ b/keyboards/gskt00/rules.mk @@ -1,41 +1,14 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu # Build Options From e796d7b49ebe8d0398853abb0d2dfa86396aa630 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Mon, 14 Oct 2019 00:05:41 +0100 Subject: [PATCH 102/316] Update splittest/teensy_2 to use SPLIT_USB_DETECT (#7028) --- keyboards/handwired/splittest/teensy_2/config.h | 2 ++ keyboards/handwired/splittest/teensy_2/teensy_2.c | 14 -------------- 2 files changed, 2 insertions(+), 14 deletions(-) delete mode 100644 keyboards/handwired/splittest/teensy_2/teensy_2.c diff --git a/keyboards/handwired/splittest/teensy_2/config.h b/keyboards/handwired/splittest/teensy_2/config.h index 3d0b0346edf0..2b5bcf8e9272 100644 --- a/keyboards/handwired/splittest/teensy_2/config.h +++ b/keyboards/handwired/splittest/teensy_2/config.h @@ -27,5 +27,7 @@ /* ws2812 RGB LED */ #define RGB_DI_PIN D3 +// teensy has vbus detection issues - use usb detection instead +#define SPLIT_USB_DETECT // required for teensy slave otherwise it "locks up" during startup #define NO_USB_STARTUP_CHECK diff --git a/keyboards/handwired/splittest/teensy_2/teensy_2.c b/keyboards/handwired/splittest/teensy_2/teensy_2.c deleted file mode 100644 index bcc2a437bdc8..000000000000 --- a/keyboards/handwired/splittest/teensy_2/teensy_2.c +++ /dev/null @@ -1,14 +0,0 @@ -#include QMK_KEYBOARD_H - -bool is_keyboard_master(void) { - // TODO: replace this override once USB host detection is implemented - // SPLIT_HAND_PIN Combined with MASTER_LEFT or MASTER_RIGHT, gives a crude - // way to force teensy to run as slave/master - setPinInput(SPLIT_HAND_PIN); - -#if defined(MASTER_RIGHT) - return !readPin(SPLIT_HAND_PIN); -#else - return readPin(SPLIT_HAND_PIN); -#endif -} From 6560dffc05131c05655f8e0d74cc65c5918894fa Mon Sep 17 00:00:00 2001 From: makenova Date: Sun, 13 Oct 2019 19:26:03 -0500 Subject: [PATCH 103/316] update one shot keys link (#7020) --- docs/feature_key_lock.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/feature_key_lock.md b/docs/feature_key_lock.md index 718d9c5bd19c..46935adda067 100644 --- a/docs/feature_key_lock.md +++ b/docs/feature_key_lock.md @@ -16,7 +16,7 @@ First, enable Key Lock by setting `KEY_LOCK_ENABLE = yes` in your `rules.mk`. Th ## Caveats -Key Lock is only able to hold standard action keys and [One Shot modifier](quantum_keycodes.md#one-shot-keys) keys (for example, if you have your Shift defined as `OSM(KC_LSFT)`). +Key Lock is only able to hold standard action keys and [One Shot modifier](feature_advanced_keycodes.md#one-shot-keys) keys (for example, if you have your Shift defined as `OSM(KC_LSFT)`). This does not include any of the QMK special functions (except One Shot modifiers), or shifted versions of keys such as `KC_LPRN`. If it's in the [Basic Keycodes](keycodes_basic.md) list, it can be held. Switching layers will not cancel the Key Lock. From e1de0d74a6f6c4bdc762b32fb78e449aed0fcecb Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Mon, 14 Oct 2019 17:57:53 +0100 Subject: [PATCH 104/316] Move running pytest to travis_test (#7005) --- util/travis_build.sh | 10 +--------- util/travis_test.sh | 36 ++++++++++++++++++++++++++---------- 2 files changed, 27 insertions(+), 19 deletions(-) diff --git a/util/travis_build.sh b/util/travis_build.sh index 2bc1ccd62f19..225c8548f525 100755 --- a/util/travis_build.sh +++ b/util/travis_build.sh @@ -1,6 +1,6 @@ #!/bin/bash -# if docker is installed - call make within the qmk docker image +# if docker is installed - patch calls to within the qmk docker image if command -v docker >/dev/null; then function make() { docker run --rm -e MAKEFLAGS="$MAKEFLAGS" -w /qmk_firmware/ -v "$PWD":/qmk_firmware --user $(id -u):$(id -g) qmkfm/base_container make "$@" @@ -52,14 +52,6 @@ if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then fi done fi - # Check and run python tests if necessary - PFM=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -E -e '^(lib/python/)' -e '^(bin/qmk)' | wc -l) - if [ $PFM -gt 0 -o "$BRANCH" = "master" ]; then - echo - echo "Running python tests." - docker run --rm -w /qmk_firmware/ -v "$PWD":/qmk_firmware --user $(id -u):$(id -g) qmkfm/base_container 'bin/qmk pytest' - : $((exit_code = $exit_code + $?)) - fi fi exit $exit_code fi diff --git a/util/travis_test.sh b/util/travis_test.sh index e6a50ac1658e..9b7402c28241 100644 --- a/util/travis_test.sh +++ b/util/travis_test.sh @@ -1,29 +1,45 @@ #!/bin/bash +# if docker is installed - patch calls to within the qmk docker image +if command -v docker >/dev/null; then + function make() { + docker run --rm -e MAKEFLAGS="$MAKEFLAGS" -w /qmk_firmware/ -v "$PWD":/qmk_firmware --user $(id -u):$(id -g) qmkfm/base_container make "$@" + } + function qmk() { + docker run --rm -w /qmk_firmware/ -v "$PWD":/qmk_firmware --user $(id -u):$(id -g) qmkfm/base_container bin/qmk "$@" + } +fi + TRAVIS_COMMIT_MESSAGE="${TRAVIS_COMMIT_MESSAGE:-none}" TRAVIS_COMMIT_RANGE="${TRAVIS_COMMIT_RANGE:-HEAD~1..HEAD}" # test force push #TRAVIS_COMMIT_RANGE="c287f1bfc5c8...81f62atc4c1d" -NUM_IMPACTING_CHANGES=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -Ecv '^(docs/)') BRANCH=$(git rev-parse --abbrev-ref HEAD) +CHANGES=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE}) + +NUM_CORE_CHANGES=$(echo "$CHANGES" | grep -Ecv -e '^(docs/)' -e '^(keyboards/)' -e '^(layouts/)') +NUM_PY_CHANGES=$(echo "$CHANGES" | grep -Ec -e '^(lib/python/)' -e '^(bin/qmk)') if [[ "$TRAVIS_COMMIT_MESSAGE" == *"[skip test]"* ]]; then echo "Skipping due to commit message" exit 0 fi -if [ "$BRANCH" != "master" ] && [ "$NUM_IMPACTING_CHANGES" == "0" ]; then - echo "Skipping due to changes not impacting tests" - exit 0 +exit_code=0 + +if [ "$BRANCH" == "master" ] || [ "$NUM_CORE_CHANGES" != "0" ]; then + echo "Running tests." + make test:all + : $((exit_code = $exit_code + $?)) + fi -# if docker is installed - call make within the qmk docker image -if command -v docker >/dev/null; then - function make() { - docker run --rm -e MAKEFLAGS="$MAKEFLAGS" -w /qmk_firmware/ -v "$PWD":/qmk_firmware --user $(id -u):$(id -g) qmkfm/base_container make "$@" - } +if [ "$BRANCH" == "master" ] || [ "$NUM_PY_CHANGES" != "0" ]; then + echo "Running python tests." + qmk pytest + : $((exit_code = $exit_code + $?)) fi -make test:all +exit $exit_code From cc5edb9eeb2d30400dee278a6f20991389f68afe Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Tue, 15 Oct 2019 13:32:52 +0100 Subject: [PATCH 105/316] Port DEBUG_MATRIX_SCAN_RATE to core (#7029) * Port DEBUG_MATRIX_SCAN_RATE to core * Remove duplicate DEBUG_MATRIX_SCAN_RATE implementations * Remove duplicate DEBUG_MATRIX_SCAN_RATE implementation from handwired/xealous * Add console logic from ergodox_ez --- keyboards/ergodone/matrix.c | 35 ----------------- keyboards/ergodox_ez/matrix.c | 37 ------------------ keyboards/ergodox_stm32/matrix.c | 7 ---- keyboards/ergotaco/matrix.c | 31 --------------- keyboards/georgi/matrix.c | 32 --------------- keyboards/gergo/matrix.c | 33 ---------------- keyboards/handwired/dactyl/matrix.c | 24 ------------ keyboards/handwired/frenchdev/matrix.c | 35 ----------------- keyboards/handwired/xealous/matrix.c | 12 ------ keyboards/handwired/xealous/matrix_scanrate.c | 39 ------------------- keyboards/handwired/xealous/matrix_scanrate.h | 4 -- keyboards/handwired/xealous/rules.mk | 2 +- keyboards/hotdox/matrix.c | 34 ---------------- tmk_core/common/keyboard.c | 24 ++++++++++++ 14 files changed, 25 insertions(+), 324 deletions(-) delete mode 100644 keyboards/handwired/xealous/matrix_scanrate.c delete mode 100644 keyboards/handwired/xealous/matrix_scanrate.h diff --git a/keyboards/ergodone/matrix.c b/keyboards/ergodone/matrix.c index 4a8230aa81d7..456f73c954d5 100644 --- a/keyboards/ergodone/matrix.c +++ b/keyboards/ergodone/matrix.c @@ -9,9 +9,6 @@ #include "matrix.h" #include "ergodone.h" #include "expander.h" -#ifdef DEBUG_MATRIX_SCAN_RATE -#include "timer.h" -#endif /* * This constant define not debouncing time in msecs, but amount of matrix @@ -41,12 +38,6 @@ static void init_cols(void); static void unselect_rows(void); static void select_row(uint8_t row); -#ifdef DEBUG_MATRIX_SCAN_RATE -uint32_t matrix_timer; -uint32_t matrix_scan_count; -#endif - - __attribute__ ((weak)) void matrix_init_user(void) {} @@ -88,13 +79,7 @@ void matrix_init(void) } } -#ifdef DEBUG_MATRIX_SCAN_RATE - matrix_timer = timer_read32(); - matrix_scan_count = 0; -#endif - matrix_init_quantum(); - } void matrix_power_up(void) { @@ -105,11 +90,6 @@ void matrix_power_up(void) { for (uint8_t i=0; i < MATRIX_ROWS; i++) { matrix[i] = 0; } - -#ifdef DEBUG_MATRIX_SCAN_RATE - matrix_timer = timer_read32(); - matrix_scan_count = 0; -#endif } // Returns a matrix_row_t whose bits are set if the corresponding key should be @@ -140,21 +120,6 @@ uint8_t matrix_scan(void) { expander_scan(); -#ifdef DEBUG_MATRIX_SCAN_RATE - matrix_scan_count++; - - uint32_t timer_now = timer_read32(); - if (TIMER_DIFF_32(timer_now, matrix_timer)>1000) { - print("matrix scan frequency: "); - pdec(matrix_scan_count); - print("\n"); - matrix_print(); - - matrix_timer = timer_now; - matrix_scan_count = 0; - } -#endif - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { select_row(i); wait_us(30); // without this wait read unstable value. diff --git a/keyboards/ergodox_ez/matrix.c b/keyboards/ergodox_ez/matrix.c index 3c9a2f43a7c6..4f11a0ad521a 100644 --- a/keyboards/ergodox_ez/matrix.c +++ b/keyboards/ergodox_ez/matrix.c @@ -32,15 +32,6 @@ along with this program. If not, see . #include "debounce.h" #include QMK_KEYBOARD_H -// Only enable this if console is enabled to print to -#if defined(DEBUG_MATRIX_SCAN_RATE) && !defined(CONSOLE_ENABLE) -# undef DEBUG_MATRIX_SCAN_RATE -#endif - -#ifdef DEBUG_MATRIX_SCAN_RATE -# include "timer.h" -#endif - /* * This constant define not debouncing time in msecs, assuming eager_pr. * @@ -65,11 +56,6 @@ static void select_row(uint8_t row); static uint8_t mcp23018_reset_loop; // static uint16_t mcp23018_reset_loop; -#ifdef DEBUG_MATRIX_SCAN_RATE -uint32_t matrix_timer; -uint32_t matrix_scan_count; -#endif - __attribute__((weak)) void matrix_init_user(void) {} __attribute__((weak)) void matrix_scan_user(void) {} @@ -96,10 +82,6 @@ void matrix_init(void) { raw_matrix[i] = 0; } -#ifdef DEBUG_MATRIX_SCAN_RATE - matrix_timer = timer_read32(); - matrix_scan_count = 0; -#endif debounce_init(MATRIX_ROWS); matrix_init_quantum(); } @@ -114,11 +96,6 @@ void matrix_power_up(void) { for (uint8_t i = 0; i < MATRIX_ROWS; i++) { matrix[i] = 0; } - -#ifdef DEBUG_MATRIX_SCAN_RATE - matrix_timer = timer_read32(); - matrix_scan_count = 0; -#endif } // Reads and stores a row, returning @@ -149,20 +126,6 @@ uint8_t matrix_scan(void) { } } -#ifdef DEBUG_MATRIX_SCAN_RATE - matrix_scan_count++; - - uint32_t timer_now = timer_read32(); - if (TIMER_DIFF_32(timer_now, matrix_timer) > 1000) { - print("matrix scan frequency: "); - pdec(matrix_scan_count); - print("\n"); - - matrix_timer = timer_now; - matrix_scan_count = 0; - } -#endif - #ifdef LEFT_LEDS mcp23018_status = ergodox_left_leds_update(); #endif // LEFT_LEDS diff --git a/keyboards/ergodox_stm32/matrix.c b/keyboards/ergodox_stm32/matrix.c index 5a280ee17dd5..383bf9790a5b 100644 --- a/keyboards/ergodox_stm32/matrix.c +++ b/keyboards/ergodox_stm32/matrix.c @@ -13,13 +13,6 @@ #define DEBOUNCE 10 #endif -//#define DEBUG_MATRIX_SCAN_RATE - -//#ifdef DEBUG_MATRIX_SCAN_RATE -//uint32_t matrix_timer; -//uint32_t matrix_scan_count; -//#endif - static uint8_t mcp23017_reset_loop = 0; volatile matrix_row_t matrix[MATRIX_ROWS]; diff --git a/keyboards/ergotaco/matrix.c b/keyboards/ergotaco/matrix.c index f7ceb194ad61..e28f754e67ee 100644 --- a/keyboards/ergotaco/matrix.c +++ b/keyboards/ergotaco/matrix.c @@ -26,9 +26,6 @@ along with this program. If not, see . #include "debug.h" #include "util.h" #include QMK_KEYBOARD_H -#ifdef DEBUG_MATRIX_SCAN_RATE -#include "timer.h" -#endif #ifndef DEBOUNCE # define DEBOUNCE 5 @@ -70,12 +67,6 @@ static void select_row(uint8_t row); static uint8_t mcp23018_reset_loop; // static uint16_t mcp23018_reset_loop; -#ifdef DEBUG_MATRIX_SCAN_RATE -uint32_t matrix_timer; -uint32_t matrix_scan_count; -#endif - - __attribute__ ((weak)) void matrix_init_user(void) {} @@ -121,10 +112,6 @@ void matrix_init(void) } } -#ifdef DEBUG_MATRIX_SCAN_RATE - matrix_timer = timer_read32(); - matrix_scan_count = 0; -#endif matrix_init_quantum(); } @@ -138,12 +125,6 @@ void matrix_power_up(void) { for (uint8_t i=0; i < MATRIX_ROWS; i++) { matrix[i] = 0; } - -#ifdef DEBUG_MATRIX_SCAN_RATE - matrix_timer = timer_read32(); - matrix_scan_count = 0; -#endif - } // Returns a matrix_row_t whose bits are set if the corresponding key should be @@ -192,18 +173,6 @@ uint8_t matrix_scan(void) } } -#ifdef DEBUG_MATRIX_SCAN_RATE - matrix_scan_count++; - uint32_t timer_now = timer_read32(); - if (TIMER_DIFF_32(timer_now, matrix_timer)>1000) { - print("matrix scan frequency: "); - pdec(matrix_scan_count); - print("\n"); - - matrix_timer = timer_now; - matrix_scan_count = 0; - } -#endif for (uint8_t i = 0; i < MATRIX_ROWS_PER_SIDE; i++) { select_row(i); // and select on left hand diff --git a/keyboards/georgi/matrix.c b/keyboards/georgi/matrix.c index 58f0776c4252..f0b69c841abb 100644 --- a/keyboards/georgi/matrix.c +++ b/keyboards/georgi/matrix.c @@ -27,10 +27,6 @@ along with this program. If not, see . #include "util.h" #include "keymap_steno.h" #include QMK_KEYBOARD_H -#ifdef DEBUG_MATRIX_SCAN_RATE -#include "timer.h" -#endif - #ifndef DEBOUNCE # define DEBOUNCE 5 @@ -92,12 +88,6 @@ static void select_row(uint8_t row); static uint8_t mcp23018_reset_loop; // static uint16_t mcp23018_reset_loop; -#ifdef DEBUG_MATRIX_SCAN_RATE -uint32_t matrix_timer; -uint32_t matrix_scan_count; -#endif - - __attribute__ ((weak)) void matrix_init_user(void) {} @@ -143,10 +133,6 @@ void matrix_init(void) } } -#ifdef DEBUG_MATRIX_SCAN_RATE - matrix_timer = timer_read32(); - matrix_scan_count = 0; -#endif matrix_init_quantum(); } @@ -160,12 +146,6 @@ void matrix_power_up(void) { for (uint8_t i=0; i < MATRIX_ROWS; i++) { matrix[i] = 0; } - -#ifdef DEBUG_MATRIX_SCAN_RATE - matrix_timer = timer_read32(); - matrix_scan_count = 0; -#endif - } // Returns a matrix_row_t whose bits are set if the corresponding key should be @@ -214,18 +194,6 @@ uint8_t matrix_scan(void) } } -#ifdef DEBUG_MATRIX_SCAN_RATE - matrix_scan_count++; - uint32_t timer_now = timer_read32(); - if (TIMER_DIFF_32(timer_now, matrix_timer)>1000) { - print("matrix scan frequency: "); - pdec(matrix_scan_count); - print("\n"); - - matrix_timer = timer_now; - matrix_scan_count = 0; - } -#endif for (uint8_t i = 0; i < MATRIX_ROWS_PER_SIDE; i++) { select_row(i); // and select on left hand diff --git a/keyboards/gergo/matrix.c b/keyboards/gergo/matrix.c index 9ef1f6b5cfa9..f659ed52c256 100644 --- a/keyboards/gergo/matrix.c +++ b/keyboards/gergo/matrix.c @@ -27,9 +27,6 @@ along with this program. If not, see . #include "util.h" #include "debounce.h" #include QMK_KEYBOARD_H -#ifdef DEBUG_MATRIX_SCAN_RATE -# include "timer.h" -#endif #ifdef BALLER #include @@ -124,12 +121,6 @@ static void enableInterrupts(void); static uint8_t mcp23018_reset_loop; // static uint16_t mcp23018_reset_loop; -#ifdef DEBUG_MATRIX_SCAN_RATE -uint32_t matrix_timer; -uint32_t matrix_scan_count; -#endif - - __attribute__ ((weak)) void matrix_init_user(void) {} __attribute__ ((weak)) void matrix_scan_user(void) {} @@ -161,10 +152,6 @@ void matrix_init(void) { raw_matrix[i] = 0; } -#ifdef DEBUG_MATRIX_SCAN_RATE - matrix_timer = timer_read32(); - matrix_scan_count = 0; -#endif debounce_init(MATRIX_ROWS); matrix_init_quantum(); } @@ -179,12 +166,6 @@ void matrix_power_up(void) { for (uint8_t i=0; i < MATRIX_ROWS; i++) { matrix[i] = 0; } - -#ifdef DEBUG_MATRIX_SCAN_RATE - matrix_timer = timer_read32(); - matrix_scan_count = 0; -#endif - } // Reads and stores a row, returning @@ -261,20 +242,6 @@ uint8_t matrix_scan(void) { } } -#ifdef DEBUG_MATRIX_SCAN_RATE - matrix_scan_count++; - - uint32_t timer_now = timer_read32(); - if (TIMER_DIFF_32(timer_now, matrix_timer) > 1000) { - print("matrix scan frequency: "); - pdec(matrix_scan_count); - print("\n"); - - matrix_timer = timer_now; - matrix_scan_count = 0; - } -#endif - bool changed = false; for (uint8_t i = 0; i < MATRIX_ROWS_PER_SIDE; i++) { // select rows from left and right hands diff --git a/keyboards/handwired/dactyl/matrix.c b/keyboards/handwired/dactyl/matrix.c index 28cf37522b0e..faa5c19cf259 100644 --- a/keyboards/handwired/dactyl/matrix.c +++ b/keyboards/handwired/dactyl/matrix.c @@ -76,11 +76,6 @@ uint8_t expander_status; uint8_t expander_input_pin_mask; bool i2c_initialized = false; -#ifdef DEBUG_MATRIX_SCAN_RATE -uint32_t matrix_timer; -uint32_t matrix_scan_count; -#endif - #define ROW_SHIFTER ((matrix_row_t)1) __attribute__ ((weak)) @@ -129,11 +124,6 @@ void matrix_init(void) matrix_debouncing[i] = 0; } -#ifdef DEBUG_MATRIX_SCAN_RATE - matrix_timer = timer_read32(); - matrix_scan_count = 0; -#endif - matrix_init_quantum(); } @@ -236,20 +226,6 @@ uint8_t matrix_scan(void) } } -#ifdef DEBUG_MATRIX_SCAN_RATE - matrix_scan_count++; - - uint32_t timer_now = timer_read32(); - if (TIMER_DIFF_32(timer_now, matrix_timer)>1000) { - print("matrix scan frequency: "); - pdec(matrix_scan_count); - print("\n"); - - matrix_timer = timer_now; - matrix_scan_count = 0; - } -#endif - #if (DIODE_DIRECTION == COL2ROW) for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { # if (DEBOUNCE > 0) diff --git a/keyboards/handwired/frenchdev/matrix.c b/keyboards/handwired/frenchdev/matrix.c index 26c2b312609e..c9c7e94aea76 100644 --- a/keyboards/handwired/frenchdev/matrix.c +++ b/keyboards/handwired/frenchdev/matrix.c @@ -35,9 +35,6 @@ along with this program. If not, see . #include "util.h" #include "matrix.h" #include "frenchdev.h" -#ifdef DEBUG_MATRIX_SCAN_RATE -#include "timer.h" -#endif /* * This constant define not debouncing time in msecs, but amount of matrix @@ -66,12 +63,6 @@ static void select_row(uint8_t row); static uint8_t mcp23018_reset_loop; -#ifdef DEBUG_MATRIX_SCAN_RATE -uint32_t matrix_timer; -uint32_t matrix_scan_count; -#endif - - __attribute__ ((weak)) void matrix_init_user(void) {} @@ -120,13 +111,7 @@ void matrix_init(void) matrix_debouncing[i] = 0; } -#ifdef DEBUG_MATRIX_SCAN_RATE - matrix_timer = timer_read32(); - matrix_scan_count = 0; -#endif - matrix_init_quantum(); - } void matrix_power_up(void) { @@ -140,12 +125,6 @@ void matrix_power_up(void) { matrix[i] = 0; matrix_debouncing[i] = 0; } - -#ifdef DEBUG_MATRIX_SCAN_RATE - matrix_timer = timer_read32(); - matrix_scan_count = 0; -#endif - } uint8_t matrix_scan(void) @@ -165,20 +144,6 @@ uint8_t matrix_scan(void) } } -#ifdef DEBUG_MATRIX_SCAN_RATE - matrix_scan_count++; - - uint32_t timer_now = timer_read32(); - if (TIMER_DIFF_32(timer_now, matrix_timer)>1000) { - print("matrix scan frequency: "); - pdec(matrix_scan_count); - print("\n"); - - matrix_timer = timer_now; - matrix_scan_count = 0; - } -#endif - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { select_row(i); wait_us(30); // without this wait read unstable value. diff --git a/keyboards/handwired/xealous/matrix.c b/keyboards/handwired/xealous/matrix.c index e2d21993917a..6d43db4d9135 100644 --- a/keyboards/handwired/xealous/matrix.c +++ b/keyboards/handwired/xealous/matrix.c @@ -30,18 +30,6 @@ along with this program. If not, see . #include "pro_micro.h" #include "config.h" #include "timer.h" -#ifdef DEBUG_MATRIX_SCAN_RATE - #include "matrix_scanrate.h" -#endif - -void matrix_scan_user(void) -{ -#ifdef DEBUG_MATRIX_SCAN_RATE - matrix_check_scan_rate(); - matrix_time_between_scans(); -#endif - -} // Copy this code to split_common/matrix.c, // and call it instead of the unoptimized col_reader. Scan-rate jumps from 1200->1920 diff --git a/keyboards/handwired/xealous/matrix_scanrate.c b/keyboards/handwired/xealous/matrix_scanrate.c deleted file mode 100644 index f2c7cbe6e36c..000000000000 --- a/keyboards/handwired/xealous/matrix_scanrate.c +++ /dev/null @@ -1,39 +0,0 @@ -#include -#include -#include -#include "wait.h" -#include "print.h" -#include "debug.h" -#include "util.h" -#include "matrix.h" -#include "timer.h" - -#ifdef CONSOLE_ENABLE -static uint16_t matrix_scan_count = 0; -static uint32_t matrix_timer = 0; -void matrix_check_scan_rate(void) { - matrix_scan_count++; - if (matrix_scan_count > 1000) { - uint32_t timer_now = timer_read32(); - uint16_t ms_per_thousand = TIMER_DIFF_32(timer_now, matrix_timer); - uint16_t rate_per_second = 1000000UL / ms_per_thousand; - print("scan_rate: "); - pdec(rate_per_second); - print("\n"); - matrix_timer = timer_now; - matrix_scan_count = 0; - } -} - -static uint32_t last_scan_time = 0; -void matrix_time_between_scans(void) { - if (timer_elapsed(last_scan_time) > 1) - { - print(">1ms elapsed since last scan: "); - pdec(timer_elapsed(last_scan_time)); - print("\n"); - } - last_scan_time = timer_read(); - -} -#endif diff --git a/keyboards/handwired/xealous/matrix_scanrate.h b/keyboards/handwired/xealous/matrix_scanrate.h deleted file mode 100644 index 18d56cd5b4b6..000000000000 --- a/keyboards/handwired/xealous/matrix_scanrate.h +++ /dev/null @@ -1,4 +0,0 @@ -__attribute__((weak)) -void matrix_check_scan_rate(void) {} -__attribute__((weak)) -void matrix_time_between_scans(void) {} diff --git a/keyboards/handwired/xealous/rules.mk b/keyboards/handwired/xealous/rules.mk index ef3357982ea4..adbbf1e103b2 100644 --- a/keyboards/handwired/xealous/rules.mk +++ b/keyboards/handwired/xealous/rules.mk @@ -1,4 +1,4 @@ -SRC += matrix_scanrate.c matrix.c +SRC += matrix.c # MCU name MCU = atmega32u4 diff --git a/keyboards/hotdox/matrix.c b/keyboards/hotdox/matrix.c index 11a1142d41a9..605be30220e6 100644 --- a/keyboards/hotdox/matrix.c +++ b/keyboards/hotdox/matrix.c @@ -9,9 +9,6 @@ #include "matrix.h" #include "hotdox.h" #include "left.h" -#ifdef DEBUG_MATRIX_SCAN_RATE -#include "timer.h" -#endif /* * This constant define not debouncing time in msecs, but amount of matrix @@ -41,12 +38,6 @@ static void init_cols(void); static void unselect_rows(void); static void select_row(uint8_t row); -#ifdef DEBUG_MATRIX_SCAN_RATE -uint32_t matrix_timer; -uint32_t matrix_scan_count; -#endif - - __attribute__ ((weak)) void matrix_init_user(void) {} @@ -90,13 +81,7 @@ void matrix_init(void) } } -#ifdef DEBUG_MATRIX_SCAN_RATE - matrix_timer = timer_read32(); - matrix_scan_count = 0; -#endif - matrix_init_quantum(); - } void matrix_power_up(void) { @@ -107,11 +92,6 @@ void matrix_power_up(void) { for (uint8_t i=0; i < MATRIX_ROWS; i++) { matrix[i] = 0; } - -#ifdef DEBUG_MATRIX_SCAN_RATE - matrix_timer = timer_read32(); - matrix_scan_count = 0; -#endif } // Returns a matrix_row_t whose bits are set if the corresponding key should be @@ -142,20 +122,6 @@ uint8_t matrix_scan(void) { left_scan(); -#ifdef DEBUG_MATRIX_SCAN_RATE - matrix_scan_count++; - - uint32_t timer_now = timer_read32(); - if (TIMER_DIFF_32(timer_now, matrix_timer)>1000) { - print("matrix scan frequency: "); - pdec(matrix_scan_count); - print("\n"); - matrix_print(); - - matrix_timer = timer_now; - matrix_scan_count = 0; - } -#endif for (uint8_t i = 0; i < MATRIX_ROWS; i++) { select_row(i); wait_us(30); // without this wait read unstable value. diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c index f4d2cd73893c..9806b5015f98 100644 --- a/tmk_core/common/keyboard.c +++ b/tmk_core/common/keyboard.c @@ -82,6 +82,26 @@ along with this program. If not, see . # include "velocikey.h" #endif +// Only enable this if console is enabled to print to +#if defined(DEBUG_MATRIX_SCAN_RATE) && defined(CONSOLE_ENABLE) +static uint32_t matrix_timer = 0; +static uint32_t matrix_scan_count = 0; + +void matrix_scan_perf_task(void) { + matrix_scan_count++; + + uint32_t timer_now = timer_read32(); + if (TIMER_DIFF_32(timer_now, matrix_timer) > 1000) { + dprintf("matrix scan frequency: %d\n", matrix_scan_count); + + matrix_timer = timer_now; + matrix_scan_count = 0; + } +} +#else +# define matrix_scan_perf_task() +#endif + #ifdef MATRIX_HAS_GHOST extern const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS]; static matrix_row_t get_real_keys(uint8_t row, matrix_row_t rowdata) { @@ -301,6 +321,10 @@ void keyboard_task(void) { MATRIX_LOOP_END: +#ifdef DEBUG_MATRIX_SCAN_RATE + matrix_scan_perf_task(); +#endif + #ifdef QWIIC_ENABLE qwiic_task(); #endif From 2ac4197b73221a49cfb7c9a44c4674d757ad7aba Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Tue, 15 Oct 2019 13:33:06 +0100 Subject: [PATCH 106/316] Add binary support to tinyprintf (#7024) --- tmk_core/common/chibios/printf.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tmk_core/common/chibios/printf.c b/tmk_core/common/chibios/printf.c index dbd059448c17..dcf33f35f8ab 100644 --- a/tmk_core/common/chibios/printf.c +++ b/tmk_core/common/chibios/printf.c @@ -186,6 +186,15 @@ void tfp_format(void* putp, putcf putf, char* fmt, va_list va) { case 's': putchw(putp, putf, w, 0, va_arg(va, char*)); break; + case 'b': +#ifdef PRINTF_LONG_SUPPORT + if (lng) + uli2a(va_arg(va, unsigned long int), 2, 0, bf); + else +#endif + ui2a(va_arg(va, unsigned int), 2, 0, bf); + putchw(putp, putf, w, lz, bf); + break; case '%': putf(putp, ch); default: From eac6ccff98f0c9793d459a7f45b5e7fbf8462343 Mon Sep 17 00:00:00 2001 From: Deckweiss Date: Wed, 16 Oct 2019 00:10:23 +0200 Subject: [PATCH 107/316] Added uart config for using rn42 with at90usb1286 (#6582) * Added uart config for using rn42 with at90usb1286 * Updated quantum/config_common.h Co-Authored-By: fauxpark * Update quantum/config_common.h Co-Authored-By: fauxpark * Update quantum/config_common.h Co-Authored-By: fauxpark --- quantum/config_common.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/quantum/config_common.h b/quantum/config_common.h index 80715f2fcd2e..f42df6357d67 100644 --- a/quantum/config_common.h +++ b/quantum/config_common.h @@ -303,6 +303,25 @@ UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); \ sei(); \ } while (0) +# elif (defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB1286__)) +# define SERIAL_UART_BAUD 115200 +# define SERIAL_UART_DATA UDR1 + /* UBRR should result in ~16 and set UCSR1A = _BV(U2X1) as per rn42 documentation. HC05 needs baudrate configured accordingly */ +# define SERIAL_UART_UBRR (F_CPU / (8UL * SERIAL_UART_BAUD) - 1) +# define SERIAL_UART_RXD_VECT USART1_RX_vect +# define SERIAL_UART_TXD_READY (UCSR1A & _BV(UDRE1)) +# define SERIAL_UART_INIT() do { \ + UCSR1A = _BV(U2X1); \ + /* baud rate */ \ + UBRR1L = SERIAL_UART_UBRR; \ + /* baud rate */ \ + UBRR1H = SERIAL_UART_UBRR >> 8; \ + /* enable TX */ \ + UCSR1B = _BV(TXEN1); \ + /* 8-bit data */ \ + UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); \ + sei(); \ + } while(0) # else # error "USART configuration is needed." # endif From 5a3aefed8d7fa2d86ff3d292915b42a3444048d0 Mon Sep 17 00:00:00 2001 From: theVDude Date: Tue, 15 Oct 2019 18:13:13 -0400 Subject: [PATCH 108/316] Fix small hiccup in snake animation (#6858) --- quantum/rgblight.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/quantum/rgblight.c b/quantum/rgblight.c index a094863fe9b4..1c197827f293 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c @@ -910,6 +910,9 @@ void rgblight_effect_snake(animation_status_t *anim) { ledp->b = 0; for (j = 0; j < RGBLIGHT_EFFECT_SNAKE_LENGTH; j++) { k = pos + j * increment; + if (k > RGBLED_NUM) { + k = k % RGBLED_NUM; + } if (k < 0) { k = k + effect_num_leds; } From feb116c4f33d1c4f451f3eecbf3d8f80be80e557 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Tue, 15 Oct 2019 15:21:05 -0700 Subject: [PATCH 109/316] [Docs] Replace Switch Hitter link with Wayback Machine link (#7009) * [Docs] Replace Switch Hitter link with Wayback Machine link * Add QMK Configurator link as well To appease yan --- docs/fr-FR/newbs_testing_debugging.md | 3 ++- docs/newbs_testing_debugging.md | 3 ++- docs/zh-cn/newbs_testing_debugging.md | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/fr-FR/newbs_testing_debugging.md b/docs/fr-FR/newbs_testing_debugging.md index 4b03ae3ed255..bc6aec668da6 100644 --- a/docs/fr-FR/newbs_testing_debugging.md +++ b/docs/fr-FR/newbs_testing_debugging.md @@ -8,7 +8,8 @@ Tester votre clavier est normalement assez simple. Appuyez chaque touche de votr Note: ces programmes ne sont ni fournis ni approuvés par QMK. -* [Switch Hitter](https://elitekeyboards.com/switchhitter.php) (Windows seulement) +* [QMK Configurator](https://config.qmk.fm/#/test/) (Web) +* [Switch Hitter](https://web.archive.org/web/20190413233743/https://elitekeyboards.com/switchhitter.php) (Windows seulement) * [Keyboard Viewer](https://www.imore.com/how-use-keyboard-viewer-your-mac) (Mac seulement) * [Keyboard Tester](http://www.keyboardtester.com) (Web) * [Keyboard Checker](http://keyboardchecker.com) (Web) diff --git a/docs/newbs_testing_debugging.md b/docs/newbs_testing_debugging.md index 771846b40991..4756a29bec36 100644 --- a/docs/newbs_testing_debugging.md +++ b/docs/newbs_testing_debugging.md @@ -8,7 +8,8 @@ Testing your keyboard is usually pretty straightforward. Press every single key Note: These programs are not provided by or endorsed by QMK. -* [Switch Hitter](https://elitekeyboards.com/switchhitter.php) (Windows Only) +* [QMK Configurator](https://config.qmk.fm/#/test/) (Web Based) +* [Switch Hitter](https://web.archive.org/web/20190413233743/https://elitekeyboards.com/switchhitter.php) (Windows Only) * [Keyboard Viewer](https://www.imore.com/how-use-keyboard-viewer-your-mac) (Mac Only) * [Keyboard Tester](http://www.keyboardtester.com) (Web Based) * [Keyboard Checker](http://keyboardchecker.com) (Web Based) diff --git a/docs/zh-cn/newbs_testing_debugging.md b/docs/zh-cn/newbs_testing_debugging.md index 824f94b906f7..4edceee41a0c 100644 --- a/docs/zh-cn/newbs_testing_debugging.md +++ b/docs/zh-cn/newbs_testing_debugging.md @@ -8,7 +8,8 @@ 注意:这些程序不是由QMK提供或认可的。 -* [Switch Hitter](https://elitekeyboards.com/switchhitter.php) (仅Windows) +* [QMK Configurator](https://config.qmk.fm/#/test/) (网页版) +* [Switch Hitter](https://web.archive.org/web/20190413233743/https://elitekeyboards.com/switchhitter.php) (仅Windows) * [Keyboard Viewer](https://www.imore.com/how-use-keyboard-viewer-your-mac) (仅Mac) * [Keyboard Tester](http://www.keyboardtester.com) (网页版) * [Keyboard Checker](http://keyboardchecker.com) (网页版) From 45225190794b438129d5b27d4fe5b756fdf2efc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Catriel=20M=C3=BCller?= Date: Tue, 15 Oct 2019 19:29:33 -0300 Subject: [PATCH 110/316] Milk 2% - Unicode Keymap Fix and Improvements (#7013) * - Enabled Unicode Feature to fix the build - Added TapDance Feature to improve the functionality of the Keyboard - Added the ability to switch between the Unicodes Modes - Added more Emojis thanks to the tap dance feature * Fix Format --- keyboards/2_milk/keymaps/emoji/config.h | 2 + keyboards/2_milk/keymaps/emoji/keymap.c | 70 ++++++++++++++++-------- keyboards/2_milk/keymaps/emoji/readme.md | 37 +++++++++++++ keyboards/2_milk/keymaps/emoji/rules.mk | 2 + 4 files changed, 87 insertions(+), 24 deletions(-) create mode 100644 keyboards/2_milk/keymaps/emoji/config.h create mode 100644 keyboards/2_milk/keymaps/emoji/rules.mk diff --git a/keyboards/2_milk/keymaps/emoji/config.h b/keyboards/2_milk/keymaps/emoji/config.h new file mode 100644 index 000000000000..90e4d631023e --- /dev/null +++ b/keyboards/2_milk/keymaps/emoji/config.h @@ -0,0 +1,2 @@ +#define UNICODE_SELECTED_MODES UC_LNX, UC_OSX, UC_WIN, UC_WINC +#define TAPPING_TERM 300 \ No newline at end of file diff --git a/keyboards/2_milk/keymaps/emoji/keymap.c b/keyboards/2_milk/keymaps/emoji/keymap.c index 9b84df5c2c5c..024a6a054b2a 100644 --- a/keyboards/2_milk/keymaps/emoji/keymap.c +++ b/keyboards/2_milk/keymaps/emoji/keymap.c @@ -1,31 +1,53 @@ #include QMK_KEYBOARD_H -enum custom_keycodes { - DISSA, - SHRUG +enum tapdance_keycodes { + TD_KEY_1, + TD_KEY_2, }; -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT( - SHRUG, - DISSA - ) +void dance_key_one (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + send_unicode_hex_string("00AF 005C 005F 0028 30C4 0029 005F 002F 00AF"); // ¯\_(ツ)_/¯ + SEND_STRING(SS_TAP(X_ENTER)); + reset_tap_dance (state); + } else if (state->count == 2) { + cycle_unicode_input_mode(+1); + reset_tap_dance (state); + } +} + +void dance_key_two (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + send_unicode_hex_string("0CA0 005F 0CA0"); // ಠ_ಠ + SEND_STRING(SS_TAP(X_ENTER)); + reset_tap_dance (state); + } else if (state->count == 2) { + send_unicode_hex_string("0028 30CE 0CA0 75CA 0CA0 0029 30CE 5F61 253B 2501 253B"); // (ノಠ痊ಠ)ノ彡┻━┻ + SEND_STRING(SS_TAP(X_ENTER)); + reset_tap_dance (state); + } else if (state->count == 3) { + send_unicode_hex_string("256D 2229 256E 0028 002D 005F 002D 0029 256D 2229 256E"); // ╭∩╮(-_-)╭∩╮ + SEND_STRING(SS_TAP(X_ENTER)); + reset_tap_dance (state); + } else if (state->count == 4) { + send_unicode_hex_string("0028 3065 FFE3 0020 00B3 FFE3 0029 3065"); // (づ ̄ ³ ̄)づ + SEND_STRING(SS_TAP(X_ENTER)); + reset_tap_dance (state); + } else if (state->count == 5) { + send_unicode_hex_string("0028 FE3A FE39 FE3A 0029"); // (︺︹︺) + SEND_STRING(SS_TAP(X_ENTER)); + reset_tap_dance (state); + } +} + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_KEY_1] = ACTION_TAP_DANCE_FN(dance_key_one), + [TD_KEY_2] = ACTION_TAP_DANCE_FN(dance_key_two), }; -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case SHRUG: - if (record->event.pressed) { - send_unicode_hex_string("00AF 005C 005F 0028 30C4 0029 005F 002F 00AF"); - } else { - } - break; - case DISSA: - if (record->event.pressed) { - send_unicode_hex_string("0CA0 005F 0CA0"); - } else { - } - break; - } - return true; +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + TD(TD_KEY_1), + TD(TD_KEY_2) + ), }; diff --git a/keyboards/2_milk/keymaps/emoji/readme.md b/keyboards/2_milk/keymaps/emoji/readme.md index 980be7dd5c3f..1d5a08730dc8 100644 --- a/keyboards/2_milk/keymaps/emoji/readme.md +++ b/keyboards/2_milk/keymaps/emoji/readme.md @@ -1,2 +1,39 @@ # Emoji Keymap ![Picture](https://i.imgur.com/1zEZ9Lq.png) + +# Unicode Setup + +Unicode input in QMK works by inputting a sequence of characters to the +OS, sort of like a macro. Unfortunately, the way this is done differs +for each platform. Specifically, each platform requires a different +combination of keys to trigger Unicode input. Therefore, a +corresponding input mode has to be set in QMK. + +Documentation: [Feature Unicode](https://beta.docs.qmk.fm/features/feature_unicode#input-modes) + +On this keymap the default unicode mode it's `UC_LNX`. +You can change it permanently tapping 2 times the KeyOne to select the next mode. + +## Unicode Mode List +- UC_LNX +- UC_OSX +- UC_WIN +- UC_WINC + +# Keymap +To add more functionality to this Minimal Keyboard, +it's implemented the tap dance feature, so pressing the same key +multiples times will produce different emojis. + +## Key One + +- 1 Tap: `¯\_(ツ)_/¯` +- 2 Taps: Switch Unicode Input Type + +## Key Two + +- 1 Tap: `ಠ_ಠ` +- 2 Taps: `(ノಠ痊ಠ)ノ彡┻━┻` +- 3 Taps: `╭∩╮(-_-)╭∩╮` +- 4 Taps: `(づ ̄ ³ ̄)づ` +- 5 Taps: `(︺︹︺)` \ No newline at end of file diff --git a/keyboards/2_milk/keymaps/emoji/rules.mk b/keyboards/2_milk/keymaps/emoji/rules.mk new file mode 100644 index 000000000000..7a64eb9023ef --- /dev/null +++ b/keyboards/2_milk/keymaps/emoji/rules.mk @@ -0,0 +1,2 @@ +UNICODE_ENABLE = yes # Unicode +TAP_DANCE_ENABLE = yes # Tap Dance \ No newline at end of file From 63f4806d7a67100fdf37b5f557ceb9d0982c0775 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Wed, 16 Oct 2019 10:02:09 +1100 Subject: [PATCH 111/316] Fix bug in `do_code16()` (#6935) * Fix bug in `do_code16()` * Remove qk_ mods functions --- quantum/quantum.c | 50 ++++++++++++++-------------------------- tmk_core/common/action.c | 30 ++++++++++++++++++++---- tmk_core/common/action.h | 2 ++ 3 files changed, 45 insertions(+), 37 deletions(-) diff --git a/quantum/quantum.c b/quantum/quantum.c index f4999456e337..e615cfc0fef5 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -85,44 +85,28 @@ static void do_code16(uint16_t code, void (*f)(uint8_t)) { return; } - if (code & QK_LCTL) f(KC_LCTL); - if (code & QK_LSFT) f(KC_LSFT); - if (code & QK_LALT) f(KC_LALT); - if (code & QK_LGUI) f(KC_LGUI); + uint8_t mods_to_send = 0; - if (code < QK_RMODS_MIN) return; - - if (code & QK_RCTL) f(KC_RCTL); - if (code & QK_RSFT) f(KC_RSFT); - if (code & QK_RALT) f(KC_RALT); - if (code & QK_RGUI) f(KC_RGUI); -} - -static inline void qk_register_weak_mods(uint8_t kc) { - add_weak_mods(MOD_BIT(kc)); - send_keyboard_report(); -} - -static inline void qk_unregister_weak_mods(uint8_t kc) { - del_weak_mods(MOD_BIT(kc)); - send_keyboard_report(); -} - -static inline void qk_register_mods(uint8_t kc) { - add_weak_mods(MOD_BIT(kc)); - send_keyboard_report(); -} + if (code & QK_RMODS_MIN) { // Right mod flag is set + if (code & QK_LCTL) mods_to_send |= MOD_BIT(KC_RCTL); + if (code & QK_LSFT) mods_to_send |= MOD_BIT(KC_RSFT); + if (code & QK_LALT) mods_to_send |= MOD_BIT(KC_RALT); + if (code & QK_LGUI) mods_to_send |= MOD_BIT(KC_RGUI); + } else { + if (code & QK_LCTL) mods_to_send |= MOD_BIT(KC_LCTL); + if (code & QK_LSFT) mods_to_send |= MOD_BIT(KC_LSFT); + if (code & QK_LALT) mods_to_send |= MOD_BIT(KC_LALT); + if (code & QK_LGUI) mods_to_send |= MOD_BIT(KC_LGUI); + } -static inline void qk_unregister_mods(uint8_t kc) { - del_weak_mods(MOD_BIT(kc)); - send_keyboard_report(); + f(mods_to_send); } void register_code16(uint16_t code) { if (IS_MOD(code) || code == KC_NO) { - do_code16(code, qk_register_mods); + do_code16(code, register_mods); } else { - do_code16(code, qk_register_weak_mods); + do_code16(code, register_weak_mods); } register_code(code); } @@ -130,9 +114,9 @@ void register_code16(uint16_t code) { void unregister_code16(uint16_t code) { unregister_code(code); if (IS_MOD(code) || code == KC_NO) { - do_code16(code, qk_unregister_mods); + do_code16(code, unregister_mods); } else { - do_code16(code, qk_unregister_weak_mods); + do_code16(code, unregister_weak_mods); } } diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c index 1ba38a285ed8..44b19d368e8b 100644 --- a/tmk_core/common/action.c +++ b/tmk_core/common/action.c @@ -868,9 +868,9 @@ void tap_code(uint8_t code) { unregister_code(code); } -/** \brief Utilities for actions. (FIXME: Needs better description) +/** \brief Adds the given physically pressed modifiers and sends a keyboard report immediately. * - * FIXME: Needs documentation. + * \param mods A bitfield of modifiers to unregister. */ void register_mods(uint8_t mods) { if (mods) { @@ -879,9 +879,9 @@ void register_mods(uint8_t mods) { } } -/** \brief Utilities for actions. (FIXME: Needs better description) +/** \brief Removes the given physically pressed modifiers and sends a keyboard report immediately. * - * FIXME: Needs documentation. + * \param mods A bitfield of modifiers to unregister. */ void unregister_mods(uint8_t mods) { if (mods) { @@ -890,6 +890,28 @@ void unregister_mods(uint8_t mods) { } } +/** \brief Adds the given weak modifiers and sends a keyboard report immediately. + * + * \param mods A bitfield of modifiers to register. + */ +void register_weak_mods(uint8_t mods) { + if (mods) { + add_weak_mods(mods); + send_keyboard_report(); + } +} + +/** \brief Removes the given weak modifiers and sends a keyboard report immediately. + * + * \param mods A bitfield of modifiers to unregister. + */ +void unregister_weak_mods(uint8_t mods) { + if (mods) { + del_weak_mods(mods); + send_keyboard_report(); + } +} + /** \brief Utilities for actions. (FIXME: Needs better description) * * FIXME: Needs documentation. diff --git a/tmk_core/common/action.h b/tmk_core/common/action.h index 633cedb06bbb..15f4ce15c041 100644 --- a/tmk_core/common/action.h +++ b/tmk_core/common/action.h @@ -90,6 +90,8 @@ void unregister_code(uint8_t code); void tap_code(uint8_t code); void register_mods(uint8_t mods); void unregister_mods(uint8_t mods); +void register_weak_mods(uint8_t mods); +void unregister_weak_mods(uint8_t mods); // void set_mods(uint8_t mods); void clear_keyboard(void); void clear_keyboard_but_mods(void); From 2fc3494fd967bb2d8ffba3dcd33fa4a7ef1066ed Mon Sep 17 00:00:00 2001 From: Duncan Elliot <42836473+dmelliot@users.noreply.github.com> Date: Wed, 16 Oct 2019 19:22:28 +1100 Subject: [PATCH 112/316] [Keyboard] Update formatting of README for usb_usb (#7037) Minor updates to make the README a little more readable. --- keyboards/converter/usb_usb/README.md | 48 +++++++++++---------------- 1 file changed, 19 insertions(+), 29 deletions(-) diff --git a/keyboards/converter/usb_usb/README.md b/keyboards/converter/usb_usb/README.md index 64334a85fba9..594a9be877e4 100644 --- a/keyboards/converter/usb_usb/README.md +++ b/keyboards/converter/usb_usb/README.md @@ -36,18 +36,18 @@ https://geekhack.org/index.php?topic=69169.0 ### Build one yourself using Arduino Leonardo + Circuit@Home USB Host Shield 2.0 Buying Arduino Leonardo and USB Host Shield 2.0(from Circuit@home) will be better, you won't need even soldering iron. -http://arduino.cc/en/Main/ArduinoBoardLeonardo -https://www.circuitsathome.com/arduino_usb_host_shield_projects/ +- http://arduino.cc/en/Main/ArduinoBoardLeonardo +- https://www.circuitsathome.com/arduino_usb_host_shield_projects/ Other compatible boards like Arduino's Shield will also work well but I think Sparkfun's needs to be modified. -http://arduino.cc/en/Main/ArduinoUSBHostShield -https://www.sparkfun.com/products/9947 +- http://arduino.cc/en/Main/ArduinoUSBHostShield +- https://www.sparkfun.com/products/9947 Also Pro Micro 3.3V(not Mini) or Teensy with mini host shield will work with some fixes on signal/power routing. -[Build guide](https://geekhack.org/index.php?topic=80421.0) -https://www.circuitsathome.com/arduino_usb_host_shield_projects/ -https://www.sparkfun.com/products/12587 -https://www.pjrc.com/teensy/td_libs_USBHostShield.html +- [Build guide](https://geekhack.org/index.php?topic=80421.0) +- https://www.circuitsathome.com/arduino_usb_host_shield_projects/ +- https://www.sparkfun.com/products/12587 +- https://www.pjrc.com/teensy/td_libs_USBHostShield.html Limitations ---------- @@ -56,24 +56,14 @@ Note that the converter can host only USB "boot protocol" keyboard(6KRO), not NK Resources -------- -Hasu's main thread for the converter - https://geekhack.org/index.php?topic=69169.0 -Build guide for the Pro Micro variant - https://geekhack.org/index.php?topic=80421.0 -Original TMK version of the converter - /~https://github.com/tmk/tmk_keyboard/tree/master/converter/usb_usb -USB Host Shield 2.0 - https://www.circuitsathome.com/arduino_usb_host_shield_projects/ -USB Host Shield 2.0 source - /~https://github.com/felis/USB_Host_Shield_2.0 -Arduino USB Host Shield (with bootst converter) - http://arduino.cc/en/Main/ArduinoUSBHostShield -Arduino source - /~https://github.com/arduino/Arduino -Initial release of TMK USB-USB converter - https://geekhack.org/index.php?topic=33057.msg653549#msg653549 - http://deskthority.net/workshop-f7/is-remapping-a-usb-keyboard-using-teensy-possible-t2841-30.html#p74854 -Arduino-based hardware keyboard remapper - Colemak forum - http://forum.colemak.com/viewtopic.php?id=1561 -Teensy + Host Shield - http://www.pjrc.com/teensy/td_libs_USBHostShield.html +- [Hasu's main thread for the converter](https://geekhack.org/index.php?topic=69169.0) +- [Build guide for the Pro Micro variant](https://geekhack.org/index.php?topic=80421.0) +- [Original TMK version of the converter](/~https://github.com/tmk/tmk_keyboard/tree/master/converter/usb_usb) +- [USB Host Shield 2.0](https://www.circuitsathome.com/arduino_usb_host_shield_projects/) +- [USB Host Shield 2.0 source](/~https://github.com/felis/USB_Host_Shield_2.0) +- [Arduino USB Host Shield (with bootst converter)](http://arduino.cc/en/Main/ArduinoUSBHostShield) +- [Arduino source](/~https://github.com/arduino/Arduino) +- [Initial release of TMK USB-USB converter](https://geekhack.org/index.php?topic=33057.msg653549#msg653549) +- [Teensy/Arduino + Host Shield](http://deskthority.net/workshop-f7/is-remapping-a-usb-keyboard-using-teensy-possible-t2841-30.html#p74854) +- [Arduino-based hardware keyboard remapper - Colemak forum](http://forum.colemak.com/viewtopic.php?id=1561) +- [Teensy + Host Shield](http://www.pjrc.com/teensy/td_libs_USBHostShield.html) From f360c27f9302b1f916985dc32f68657ec22b3b9c Mon Sep 17 00:00:00 2001 From: Salicylic-acid3 <46864619+Salicylic-acid3@users.noreply.github.com> Date: Thu, 17 Oct 2019 02:26:43 +0900 Subject: [PATCH 113/316] [Keyboard] Add keyboard Naked60 (#6527) * Add Naked60 * readme Update * Update keyboards/naked60/rules.mk Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Updated keymaps Changed the alias. * updated rule.mk Unnecessary part was deleted and explanation was added to the boot loader. * Update keyboards/naked60/rules.mk Co-Authored-By: fauxpark * Update keyboards/naked60/rules.mk Co-Authored-By: fauxpark * Update keyboards/naked60/rev1/rev1.h Co-Authored-By: fauxpark * Update keyboards/naked60/rev1/rev1.h Co-Authored-By: fauxpark * Update keyboards/naked60/rev1/config.h Co-Authored-By: fauxpark * Update keyboards/naked60/rev1/config.h Co-Authored-By: fauxpark * Updated keymaps rules.mk. Cleaned up declarations in rules.mk. * Updated keymap Changed remaining aliases. * Update rev1.c Cleaned up declarations in rev1.c. * Update readme The appearance has been adjusted. * Update keyboards/naked60/keymaps/default/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/naked60/keymaps/default_with_nafuda/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/naked60/keymaps/default_with_nafuda/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/naked60/keymaps/salicylic/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/naked60/keymaps/salicylic/rules.mk Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/naked60/keymaps/salicylic_with_nafuda/rules.mk Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/naked60/keymaps/salicylic_with_nafuda/rules.mk Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/naked60/keymaps/salicylic_with_setta21/rules.mk Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/naked60/keymaps/salicylic_with_setta21/rules.mk Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/naked60/rev1/rev1.c Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/naked60/rules.mk Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/naked60/rules.mk Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/naked60/keymaps/default_with_nafuda/rules.mk Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/naked60/keymaps/salicylic/rules.mk Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/naked60/keymaps/default_with_nafuda/rules.mk Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/naked60/keymaps/default_with_setta21/rules.mk Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/naked60/keymaps/default_with_setta21/rules.mk Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Updated keymaps The appearance has been adjusted. Unnecessary rules.mk was deleted. * Update keyboards/naked60/readme.md Co-Authored-By: fauxpark * Update readme Changed to markdown format. * Update keyboards/naked60/keymaps/default/readme.md Co-Authored-By: fauxpark * Update keyboards/naked60/keymaps/salicylic/readme.md Co-Authored-By: fauxpark * Update keyboards/naked60/keymaps/salicylic/readme.md Co-Authored-By: fauxpark --- keyboards/naked60/config.h | 43 ++ keyboards/naked60/info.json | 312 +++++++++ keyboards/naked60/keymaps/default/config.h | 51 ++ keyboards/naked60/keymaps/default/keymap.c | 139 +++++ keyboards/naked60/keymaps/default/readme.md | 53 ++ .../keymaps/default_with_nafuda/config.h | 90 +++ .../keymaps/default_with_nafuda/keymap.c | 212 +++++++ .../keymaps/default_with_nafuda/readme.md | 31 + .../keymaps/default_with_nafuda/rules.mk | 10 + .../keymaps/default_with_setta21/config.h | 90 +++ .../keymaps/default_with_setta21/keymap.c | 207 ++++++ .../keymaps/default_with_setta21/readme.md | 44 ++ .../keymaps/default_with_setta21/rules.mk | 9 + keyboards/naked60/keymaps/salicylic/config.h | 51 ++ keyboards/naked60/keymaps/salicylic/keymap.c | 147 +++++ keyboards/naked60/keymaps/salicylic/readme.md | 53 ++ .../keymaps/salicylic_with_nafuda/config.h | 90 +++ .../keymaps/salicylic_with_nafuda/keymap.c | 207 ++++++ .../keymaps/salicylic_with_nafuda/readme.md | 32 + .../keymaps/salicylic_with_nafuda/rules.mk | 9 + .../keymaps/salicylic_with_setta21/config.h | 90 +++ .../keymaps/salicylic_with_setta21/keymap.c | 207 ++++++ .../keymaps/salicylic_with_setta21/readme.md | 44 ++ .../keymaps/salicylic_with_setta21/rules.mk | 10 + keyboards/naked60/naked60.c | 1 + keyboards/naked60/naked60.h | 12 + keyboards/naked60/readme.md | 18 + keyboards/naked60/rev1/config.h | 119 ++++ keyboards/naked60/rev1/matrix.c | 357 +++++++++++ keyboards/naked60/rev1/rev1.c | 1 + keyboards/naked60/rev1/rev1.h | 97 +++ keyboards/naked60/rev1/rules.mk | 3 + keyboards/naked60/rev1/serial_config.h | 8 + .../naked60/rev1/serial_config_simpleapi.h | 8 + keyboards/naked60/rev1/split_scomm.c | 92 +++ keyboards/naked60/rev1/split_scomm.h | 22 + keyboards/naked60/rev1/split_util.c | 70 +++ keyboards/naked60/rev1/split_util.h | 16 + keyboards/naked60/rules.mk | 40 ++ keyboards/naked60/serial.c | 590 ++++++++++++++++++ keyboards/naked60/serial.h | 86 +++ 41 files changed, 3771 insertions(+) create mode 100644 keyboards/naked60/config.h create mode 100644 keyboards/naked60/info.json create mode 100644 keyboards/naked60/keymaps/default/config.h create mode 100644 keyboards/naked60/keymaps/default/keymap.c create mode 100644 keyboards/naked60/keymaps/default/readme.md create mode 100644 keyboards/naked60/keymaps/default_with_nafuda/config.h create mode 100644 keyboards/naked60/keymaps/default_with_nafuda/keymap.c create mode 100644 keyboards/naked60/keymaps/default_with_nafuda/readme.md create mode 100644 keyboards/naked60/keymaps/default_with_nafuda/rules.mk create mode 100644 keyboards/naked60/keymaps/default_with_setta21/config.h create mode 100644 keyboards/naked60/keymaps/default_with_setta21/keymap.c create mode 100644 keyboards/naked60/keymaps/default_with_setta21/readme.md create mode 100644 keyboards/naked60/keymaps/default_with_setta21/rules.mk create mode 100644 keyboards/naked60/keymaps/salicylic/config.h create mode 100644 keyboards/naked60/keymaps/salicylic/keymap.c create mode 100644 keyboards/naked60/keymaps/salicylic/readme.md create mode 100644 keyboards/naked60/keymaps/salicylic_with_nafuda/config.h create mode 100644 keyboards/naked60/keymaps/salicylic_with_nafuda/keymap.c create mode 100644 keyboards/naked60/keymaps/salicylic_with_nafuda/readme.md create mode 100644 keyboards/naked60/keymaps/salicylic_with_nafuda/rules.mk create mode 100644 keyboards/naked60/keymaps/salicylic_with_setta21/config.h create mode 100644 keyboards/naked60/keymaps/salicylic_with_setta21/keymap.c create mode 100644 keyboards/naked60/keymaps/salicylic_with_setta21/readme.md create mode 100644 keyboards/naked60/keymaps/salicylic_with_setta21/rules.mk create mode 100644 keyboards/naked60/naked60.c create mode 100644 keyboards/naked60/naked60.h create mode 100644 keyboards/naked60/readme.md create mode 100644 keyboards/naked60/rev1/config.h create mode 100644 keyboards/naked60/rev1/matrix.c create mode 100644 keyboards/naked60/rev1/rev1.c create mode 100644 keyboards/naked60/rev1/rev1.h create mode 100644 keyboards/naked60/rev1/rules.mk create mode 100644 keyboards/naked60/rev1/serial_config.h create mode 100644 keyboards/naked60/rev1/serial_config_simpleapi.h create mode 100644 keyboards/naked60/rev1/split_scomm.c create mode 100644 keyboards/naked60/rev1/split_scomm.h create mode 100644 keyboards/naked60/rev1/split_util.c create mode 100644 keyboards/naked60/rev1/split_util.h create mode 100644 keyboards/naked60/rules.mk create mode 100644 keyboards/naked60/serial.c create mode 100644 keyboards/naked60/serial.h diff --git a/keyboards/naked60/config.h b/keyboards/naked60/config.h new file mode 100644 index 000000000000..47f2a9aacf38 --- /dev/null +++ b/keyboards/naked60/config.h @@ -0,0 +1,43 @@ +/* +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + +#include "config_common.h" + +// GCC include 'config.h" sequence in qmk_firmware/keyboards/naked60/ +// -include keyboards/naked60/config.h +// -include keyboards/naked60/rev?/config.h +// -include keyboards/naked60/rev?/keymaps/MAPNAME/config.h +// XXXX.c + +#include + +// GCC include search path in qmk_firmare/keyboards/naked60/ +// #include "..." search starts here: +// #include <...> search starts here: +// keyboards/naked60/rev?/keymaps/MAPNAME +// keyboards/naked60 +// keyboards/naked60/rev? +// . +// ./tmk_core +// ...... + +// MACRO and FUNCTION are features that are depreciated. +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/naked60/info.json b/keyboards/naked60/info.json new file mode 100644 index 000000000000..bc353f659a0f --- /dev/null +++ b/keyboards/naked60/info.json @@ -0,0 +1,312 @@ +{ + "keyboard_name": "Naked60", + "url": "https://salicylic-acid3.hatenablog.com/", + "maintainer": "Salicylic_acid3", + "width": 14, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [ + { + "label":"ESC", + "x":0, + "y":0 + }, + { + "label":"1", + "x":1, + "y":0 + }, + { + "label":"2", + "x":2, + "y":0 + }, + { + "label":"3", + "x":3, + "y":0 + }, + { + "label":"4", + "x":4, + "y":0 + }, + { + "label":"5", + "x":5, + "y":0 + }, + { + "label":"6", + "x":8, + "y":0 + }, + { + "label":"7", + "x":9, + "y":0 + }, + { + "label":"8", + "x":10, + "y":0 + }, + { + "label":"9", + "x":11, + "y":0 + }, + { + "label":"0", + "x":12, + "y":0 + }, + { + "label":"Back Space", + "x":13, + "y":0 + }, + { + "label":"Tab", + "x":0, + "y":1 + }, + { + "label":"Q", + "x":1, + "y":1 + }, + { + "label":"W", + "x":2, + "y":1, + }, + { + "label":"E", + "x":3, + "y":1, + }, + { + "label":"R", + "x":4, + "y":1, + }, + { + "label":"T", + "x":5, + "y":1, + }, + { + "label":"Y", + "x":8, + "y":1, + }, + { + "label":"U", + "x":9, + "y":1, + }, + { + "label":"I", + "x":10, + "y":1, + }, + { + "label":"O", + "x":11, + "y":1, + }, + { + "label":"P", + "x":12, + "y":1, + }, + { + "label":"\\", + "x":13, + "y":1, + }, + { + "label":"Esc", + "x":0, + "y":2, + }, + { + "label":"A", + "x":1, + "y":2, + }, + { + "label":"S", + "x":2, + "y":2, + }, + { + "label":"D", + "x":3, + "y":2, + }, + { + "label":"F", + "x":4, + "y":2, + }, + { + "label":"G", + "x":5, + "y":2, + }, + { + "label":"H", + "x":8, + "y":2, + }, + { + "label":"J", + "x":9, + "y":2, + }, + { + "label":"K", + "x":10, + "y":2, + }, + { + "label":"L", + "x":11, + "y":2, + }, + { + "label":";", + "x":12, + "y":2, + }, + { + "label":"'", + "x":13, + "y":2, + }, + { + "label":"Shift", + "x":0, + "y":3, + }, + { + "label":"Z", + "x":1, + "y":3, + }, + { + "label":"X", + "x":2, + "y":3, + }, + { + "label":"C", + "x":3, + "y":3, + }, + { + "label":"V", + "x":4, + "y":3, + }, + { + "label":"B", + "x":5, + "y":3, + }, + { + "label":"N", + "x":8, + "y":3, + }, + { + "label":"M", + "x":9, + "y":3, + }, + { + "label":", + ", + "x":10, + "y":3, + }, + { + "label":".", + "x":11, + "y":3, + }, + { + "label":"/", + "x":12, + "y":3, + }, + { + "label":"Enter", + "x":13, + "y":3, + }, + { + "label":"Adjust", + "x":1, + "y":4, + }, + { + "label":"Ctrl", + "x":2, + "y":4, + }, + { + "label":"Alt", + "x":3, + "y":4, + }, + { + "label":"GUI", + "x":4, + "y":4, + }, + { + "label":"⇓", + "x":5, + "y":4, + }, + { + "x":6, + "y":4, + }, + { + "x":7, + "y":4, + }, + { + "label":"⇑", + "x":8, + "y":4, + }, + { + "label":"←", + "x":9, + "y":4, + }, + { + "label":"↓", + "x":10, + "y":4, + }, + { + "label":"↑", + "x":11, + "y":4, + }, + { + "label":"→", + "x":12, + "y":4, + } + ] + } + } +} \ No newline at end of file diff --git a/keyboards/naked60/keymaps/default/config.h b/keyboards/naked60/keymaps/default/config.h new file mode 100644 index 000000000000..140a79c772c8 --- /dev/null +++ b/keyboards/naked60/keymaps/default/config.h @@ -0,0 +1,51 @@ +/* Copyright 2018 Salicylic_acid3 + * + * 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 . + */ + +#pragma once + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#define USE_SERIAL_PD2 + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 180 + +#define MK_3_SPEED + +#undef MOUSEKEY_INTERVAL +#define MOUSEKEY_INTERVAL 0 + +#undef MOUSEKEY_TIME_TO_MAX +#define MOUSEKEY_TIME_TO_MAX 150 + +#undef MOUSEKEY_MAX_SPEED +#define MOUSEKEY_MAX_SPEED 3 + +#undef MOUSEKEY_MOVE_DELTA +#define MOUSEKEY_MOVE_DELTA 5 + +#undef MOUSEKEY_DELAY +#define MOUSEKEY_DELAY 0 + +#undef MOUSEKEY_WHEEL_MAX_SPEED +#define MOUSEKEY_WHEEL_MAX_SPEED 1 + +#undef MOUSEKEY_WHEEL_TIME_TO_MAX +#define MOUSEKEY_WHEEL_TIME_TO_MAX 0 diff --git a/keyboards/naked60/keymaps/default/keymap.c b/keyboards/naked60/keymaps/default/keymap.c new file mode 100644 index 000000000000..4b15e969de5e --- /dev/null +++ b/keyboards/naked60/keymaps/default/keymap.c @@ -0,0 +1,139 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +extern uint8_t is_master; + +// 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. +enum layer_number { + _QWERTY = 0, + _FLOCK, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + FLOCK = SAFE_RANGE, + ADJUST, + RGBRST +}; + +enum tapdances{ + TD_ESFL = 0, + TD_ESQW, +}; + +// Layer Mode aliases + +#define KC_SNUBS S(KC_NUBS) +#define KC_SNUHS S(KC_NUHS) + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_ESFL] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _FLOCK), + [TD_ESQW] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _QWERTY), +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT( + //,-----------------------------------------------------| |-----------------------------------------------------. + TD(TD_ESFL), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LCTRL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + ADJUST,KC_LCTRL, KC_LALT, KC_LGUI,MO(_LOWER),KC_SPC, KC_SPC,MO(_RAISE),KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT + //`------------------------------------------------------------------------------------------------------------' + ), + + + [_FLOCK] = LAYOUT( + //,-----------------------------------------------------| |-----------------------------------------------------. + TD(TD_ESQW), KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //`------------------------------------------------------------------------------------------------------------' + ), + + + [_LOWER] = LAYOUT( + //,-----------------------------------------------------| |-----------------------------------------------------. + KC_ESC, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR,KC_LPRN, KC_RPRN, KC_DEL, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,KC_SNUHS,KC_SNUBS, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + //`------------------------------------------------------------------------------------------------------------' + ), + + + [_RAISE] = LAYOUT( + //,-----------------------------------------------------| |-----------------------------------------------------. + KC_ESC, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_TILD, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //`------------------------------------------------------------------------------------------------------------' + ), + + + [_ADJUST] = LAYOUT( /* Base */ + //,-----------------------------------------------------| |-----------------------------------------------------. + KC_ESC, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BTN1, KC_MS_U, KC_BTN2, XXXXXXX,LALT(KC_PSCR), + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_R, XXXXXXX, KC_PSCR, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,LCA(KC_DEL), + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //`------------------------------------------------------------------------------------------------------------' + ) +}; + +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +int RGB_current_mode; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + bool result = false; + switch (keycode) { + case ADJUST: + update_tri_layer_state(record->event.pressed, _ADJUST, _RAISE, _LOWER); + break; + default: + result = true; + break; + } + + return result; +} \ No newline at end of file diff --git a/keyboards/naked60/keymaps/default/readme.md b/keyboards/naked60/keymaps/default/readme.md new file mode 100644 index 000000000000..87ce8b3a29b1 --- /dev/null +++ b/keyboards/naked60/keymaps/default/readme.md @@ -0,0 +1,53 @@ +# The default keymap for naked60 + +## Default +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +| ESC(FLock) | 1| 2| 3| 4| 5| | | 6| 7| 8| 9| 0| BSPC| +| TAB | Q| W| E| R| T| | | Y| U| I| O| P| \ | +| LSFT | A| S| D| F| G| | | H| J| K| L| ;| '| +|LCTRL | Z| X| C| V| B| | | N| M| ,| .| /| ENT| +| |ADJUST| LCTRL| LALT| LGUI| LOWER| SPC| SPC| RAISE| LEFT| DOWN| UP| RIGHT| | + + + +## FLock +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +| ESC(FLock)| F2| F3| F4| F5| F6| | | F7| F8| F9| F10| F11| BSPC| +| TAB | Q| W| E| R| T| | | Y| U| I| O| P| BSLS| +| LSFT | A| S| D| F| G| | | H| J| K| L| SCLN| QUOT| +|LCTRL | Z| X| C| V| B| | | N| M| COMM| DOT| SLSH| ENT| +| |ADJUST| LCTRL| LALT| LGUI| LOWER| SPC| SPC| RAISE| LEFT| DOWN| UP| RIGHT| | + + +## Lower +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +| ESC| F2| F3| F4| F5| F6| | | F7| F8| F9| F10| F11| F12| +| ~| !| @| #| $| %| | | ^| &| *| (| )| DEL| +| _____| F1| F2| F3| F4| F5| | | F6| _| +| {| }| PIPE| +| _____| F7| F8| F9| F10| F11| | | F12| SNUHS| SNUBS| ,| .| _____| +| |ADJUST| LCTRL| LALT| LGUI| LOWER| SPC| SPC| RAISE| MNXT| VOLD| VOLU| MPLY| | + + +## Raise +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +| ESC| F2| F3| F4| F5| F6| | | F7| F8| F9| F10| F11| F12| +| ~| 1| 2| 3| 4| 5| | | 6| 7| 8| 9| 0| DEL| +| _____| F1| F2| F3| F4| F5| | | F6| -| =| [| ]| BSLS| +| _____| F7| F8| F9| F10| F11| | | F12| NUHS| NUBS| ,| .| _____| +| |ADJUST| LCTRL| LALT| LGUI| LOWER| SPC| SPC| RAISE| MNXT| VOLD| VOLU| MPLY| | + + + +## Adjust +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +| ESC| F2| F3| F4| F5| F6| | | F7| F8| F9| F10| F11| F12| +| TILD| RST| XXXXX| XXXXX| XXXXX| XXXXX| | | XXXXX| BTN1| MS_U| BTN2| XXXXX|Alt+PSCR| +| LSFT| XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| | | XXXXX| MS_L| MS_D| MS_R| XXXXX| PSCR| +| LCTRL| XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| | | XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| C+A+D| +| |ADJUST| LCTRL| LALT| LGUI| LOWER| SPC| SPC| RAISE| MNXT| VOLD| VOLU| MPLY| | + diff --git a/keyboards/naked60/keymaps/default_with_nafuda/config.h b/keyboards/naked60/keymaps/default_with_nafuda/config.h new file mode 100644 index 000000000000..e188262cf92c --- /dev/null +++ b/keyboards/naked60/keymaps/default_with_nafuda/config.h @@ -0,0 +1,90 @@ +/* Copyright 2018 Salicylic_acid3 + * + * 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 . + */ + +#pragma once + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#define USE_SERIAL_PD2 + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 180 + +#define RGBLED_NUM 7 + +#ifndef IOS_DEVICE_ENABLE + #define RGBLIGHT_LIMIT_VAL 180 + #define RGBLIGHT_VAL_STEP 17 +#else + #define RGBLIGHT_LIMIT_VAL 50 + #define RGBLIGHT_VAL_STEP 4 +#endif +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 + +#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE) +// USB_MAX_POWER_CONSUMPTION value for naked48 keyboard +// 120 RGBoff, OLEDoff +// 120 OLED +// 330 RGB 6 +// 300 RGB 32 +// 310 OLED & RGB 32 + #define USB_MAX_POWER_CONSUMPTION 400 +#else + // fix iPhone and iPad power adapter issue + // iOS device need lessthan 100 + #define USB_MAX_POWER_CONSUMPTION 100 +#endif + +// Selection of RGBLIGHT MODE to use. +#if defined(LED_ANIMATIONS) + //#define RGBLIGHT_EFFECT_BREATHING + #define RGBLIGHT_EFFECT_RAINBOW_MOOD + #define RGBLIGHT_EFFECT_RAINBOW_SWIRL + //#define RGBLIGHT_EFFECT_SNAKE + #define RGBLIGHT_EFFECT_KNIGHT + //#define RGBLIGHT_EFFECT_CHRISTMAS + #define RGBLIGHT_EFFECT_STATIC_GRADIENT + //#define RGBLIGHT_EFFECT_RGB_TEST + //#define RGBLIGHT_EFFECT_ALTERNATING +#endif + +#define MK_3_SPEED + +#undef MOUSEKEY_INTERVAL +#define MOUSEKEY_INTERVAL 0 + +#undef MOUSEKEY_TIME_TO_MAX +#define MOUSEKEY_TIME_TO_MAX 150 + +#undef MOUSEKEY_MAX_SPEED +#define MOUSEKEY_MAX_SPEED 3 + +#undef MOUSEKEY_MOVE_DELTA +#define MOUSEKEY_MOVE_DELTA 5 + +#undef MOUSEKEY_DELAY +#define MOUSEKEY_DELAY 0 + +#undef MOUSEKEY_WHEEL_MAX_SPEED +#define MOUSEKEY_WHEEL_MAX_SPEED 1 + +#undef MOUSEKEY_WHEEL_TIME_TO_MAX +#define MOUSEKEY_WHEEL_TIME_TO_MAX 0 diff --git a/keyboards/naked60/keymaps/default_with_nafuda/keymap.c b/keyboards/naked60/keymaps/default_with_nafuda/keymap.c new file mode 100644 index 000000000000..d50af530dae6 --- /dev/null +++ b/keyboards/naked60/keymaps/default_with_nafuda/keymap.c @@ -0,0 +1,212 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +extern uint8_t is_master; + +// 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. +enum layer_number { + _QWERTY = 0, + _FLOCK, + _MOUSE, + _BROWSER, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + FLOCK = SAFE_RANGE, + MOUSE, + BROWSER, + LOWER, + RAISE, + ADJUST, + RGBRST +}; + +enum tapdances{ + TD_ESFL = 0, + TD_ESQW, +}; + +// Fillers to make layering more clear + +#define KC_CAD LCA(KC_DEL) +#define KC_APSCR LALT(KC_PSCR) + +#define KC_SNUBS S(KC_NUBS) +#define KC_SNUHS S(KC_NUHS) + +#define KC_RTAB LCTL(KC_TAB) +#define KC_LTAB LCTL(LSFT(KC_TAB)) +#define KC_CTAB LCTL(KC_W) +#define KC_RETAB LCTL(LSFT(KC_T)) + +#define KC_TGMO TG(_MOUSE) +#define KC_TGBR TG(_BROWSER) +#define KC_BSAD LT(_ADJUST, KC_BSPC) + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_ESFL] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _FLOCK), + [TD_ESQW] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _QWERTY), +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_with_nafuda( + //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| + TD(TD_ESFL), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, KC_TGMO, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_BSAD, KC_UP, KC_TGBR, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_LEFT, KC_DOWN,KC_RIGHT, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------------------------| + KC_LCTRL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + ADJUST,KC_LCTRL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT + //`------------------------------------------------------------------------------------------------------------' + ), + + [_FLOCK] = LAYOUT_with_nafuda( + //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| + TD(TD_ESQW), KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------------------------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //`------------------------------------------------------------------------------------------------------------' + ), + + [_MOUSE] = LAYOUT_with_nafuda( + //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| + TD(TD_ESFL), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, KC_TGMO, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BTN1, KC_MS_U, KC_BTN2, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------------------------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //`------------------------------------------------------------------------------------------------------------' + ), + + [_BROWSER] = LAYOUT_with_nafuda( + //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_CTAB, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RETAB, KC_WH_U, KC_TGBR, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LTAB, KC_WH_D, KC_RTAB, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------------------------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //`------------------------------------------------------------------------------------------------------------' + ), + + [_LOWER] = LAYOUT_with_nafuda( + //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| + KC_ESC, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TGMO, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR,KC_LPRN, KC_RPRN, KC_DEL, KC_BSAD, KC_UP, KC_TGBR, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, KC_LEFT, KC_DOWN,KC_RIGHT, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------------------------| + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,KC_SNUHS,KC_SNUBS, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + //`------------------------------------------------------------------------------------------------------------' + ), + + [_RAISE] = LAYOUT_with_nafuda( + //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| + KC_ESC, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TGMO, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + KC_TILD, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, KC_BSAD, KC_UP, KC_TGBR, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_LEFT, KC_DOWN,KC_RIGHT, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------------------------| + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //`------------------------------------------------------------------------------------------------------------' + ), + + [_ADJUST] = LAYOUT_with_nafuda( /* Base */ + //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| + KC_ESC, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, RGB_VAD, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + _______, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BTN1, KC_MS_U, KC_BTN2, XXXXXXX,LALT(KC_PSCR), ADJUST, RGB_SAD, RGB_VAI, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_R, XXXXXXX, KC_PSCR, RGB_MOD, RGB_TOG, RGB_SAI, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------------------------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,LCA(KC_DEL), + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //`------------------------------------------------------------------------------------------------------------' + ) +}; + +static inline void update_change_layer(bool pressed, uint8_t layer1, uint8_t layer2, uint8_t layer3) { + + pressed ? layer_on(layer1) : layer_off(layer1); + IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2) ? layer_on(layer3) : layer_off(layer3); +} + +int RGB_current_mode; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + bool result = false; + switch (keycode) { + case LOWER: + update_change_layer(record->event.pressed, _LOWER, _RAISE, _ADJUST); + break; + case RAISE: + update_change_layer(record->event.pressed, _RAISE, _LOWER, _ADJUST); + break; + case ADJUST: + update_change_layer(record->event.pressed, _ADJUST, _RAISE, _LOWER); + break; + #ifdef RGBLIGHT_ENABLE + case RGB_MOD: + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + break; + case RGBRST: + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + break; + #endif + default: + result = true; + break; + } + + return result; +} + +void matrix_init_user(void) { + #ifdef RGBLIGHT_ENABLE + RGB_current_mode = rgblight_config.mode; + #endif +} diff --git a/keyboards/naked60/keymaps/default_with_nafuda/readme.md b/keyboards/naked60/keymaps/default_with_nafuda/readme.md new file mode 100644 index 000000000000..574f90ffbda7 --- /dev/null +++ b/keyboards/naked60/keymaps/default_with_nafuda/readme.md @@ -0,0 +1,31 @@ +# The default_with_nafuda keymap for naked60 + +Add Nafuda maps to the default layout. + +## Default +| 1 | 2 | 3 | +|:----:|:----:|:----:| +| | MOUSE| | +| BS+Ad| UP|Browser| +| LEFT| DOWN| RIGHT| + +## Mouse +| 1 | 2 | 3 | +|:----:|:----:|:----:| +| |Default| | +| BTN1| MS_U| BTN2| +| MS_L| MS_D| MS_R| + +## Browser +| 1 | 2 | 3 | +|:----:|:----:|:----:| +| |CloseTAB| | +|ReOpenTAB|WH_U|Default| +| LTAB| WH_D| RTAB| + +## Adjust +| 1 | 2 | 3 | +|:----:|:----:|:----:| +| |LED_VAD| | +|Default|LED_HUD|LED_VAI| +|LED_MOD|LED_ON/Off|LED_HUI| diff --git a/keyboards/naked60/keymaps/default_with_nafuda/rules.mk b/keyboards/naked60/keymaps/default_with_nafuda/rules.mk new file mode 100644 index 000000000000..15a887e78131 --- /dev/null +++ b/keyboards/naked60/keymaps/default_with_nafuda/rules.mk @@ -0,0 +1,10 @@ +RGBLIGHT_ENABLE = yes + +# If your custom naked60 pcb, you can rewrite to yes. +LED_ANIMATIONS = yes # LED animations + +ifeq ($(strip $(LED_ANIMATIONS)), yes) + # OPT_DEFS += -DRGBLIGHT_ANIMATIONS + OPT_DEFS += -DLED_ANIMATIONS +endif + diff --git a/keyboards/naked60/keymaps/default_with_setta21/config.h b/keyboards/naked60/keymaps/default_with_setta21/config.h new file mode 100644 index 000000000000..fe162510d0ba --- /dev/null +++ b/keyboards/naked60/keymaps/default_with_setta21/config.h @@ -0,0 +1,90 @@ +/* Copyright 2018 Salicylic_acid3 + * + * 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 . + */ + +#pragma once + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#define USE_SERIAL_PD2 + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 180 + +#define RGBLED_NUM 21 + +#ifndef IOS_DEVICE_ENABLE + #define RGBLIGHT_LIMIT_VAL 180 + #define RGBLIGHT_VAL_STEP 17 +#else + #define RGBLIGHT_LIMIT_VAL 50 + #define RGBLIGHT_VAL_STEP 4 +#endif +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 + +#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE) +// USB_MAX_POWER_CONSUMPTION value for naked48 keyboard +// 120 RGBoff, OLEDoff +// 120 OLED +// 330 RGB 6 +// 300 RGB 32 +// 310 OLED & RGB 32 + #define USB_MAX_POWER_CONSUMPTION 400 +#else + // fix iPhone and iPad power adapter issue + // iOS device need lessthan 100 + #define USB_MAX_POWER_CONSUMPTION 100 +#endif + +// Selection of RGBLIGHT MODE to use. +#if defined(LED_ANIMATIONS) + //#define RGBLIGHT_EFFECT_BREATHING + #define RGBLIGHT_EFFECT_RAINBOW_MOOD + #define RGBLIGHT_EFFECT_RAINBOW_SWIRL + //#define RGBLIGHT_EFFECT_SNAKE + #define RGBLIGHT_EFFECT_KNIGHT + //#define RGBLIGHT_EFFECT_CHRISTMAS + #define RGBLIGHT_EFFECT_STATIC_GRADIENT + //#define RGBLIGHT_EFFECT_RGB_TEST + //#define RGBLIGHT_EFFECT_ALTERNATING +#endif + +#define MK_3_SPEED + +#undef MOUSEKEY_INTERVAL +#define MOUSEKEY_INTERVAL 0 + +#undef MOUSEKEY_TIME_TO_MAX +#define MOUSEKEY_TIME_TO_MAX 150 + +#undef MOUSEKEY_MAX_SPEED +#define MOUSEKEY_MAX_SPEED 3 + +#undef MOUSEKEY_MOVE_DELTA +#define MOUSEKEY_MOVE_DELTA 5 + +#undef MOUSEKEY_DELAY +#define MOUSEKEY_DELAY 0 + +#undef MOUSEKEY_WHEEL_MAX_SPEED +#define MOUSEKEY_WHEEL_MAX_SPEED 1 + +#undef MOUSEKEY_WHEEL_TIME_TO_MAX +#define MOUSEKEY_WHEEL_TIME_TO_MAX 0 diff --git a/keyboards/naked60/keymaps/default_with_setta21/keymap.c b/keyboards/naked60/keymaps/default_with_setta21/keymap.c new file mode 100644 index 000000000000..06ea56501a1f --- /dev/null +++ b/keyboards/naked60/keymaps/default_with_setta21/keymap.c @@ -0,0 +1,207 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +extern uint8_t is_master; + +// 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. +enum layer_number { + _QWERTY = 0, + _FLOCK, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + FLOCK = SAFE_RANGE, + LOWER, + RAISE, + ADJUST, + KANJI, + RGBRST, + SEND_SUM, + SEND_AVERAGE, + SEND_COUNTIF, + SEND_MAX, + SEND_MIN +}; + +enum tapdances{ + TD_ESFL = 0, + TD_ESQW, +}; + +// Fillers to make layering more clear +#define KC_SNUBS S(KC_NUBS) +#define KC_SNUHS S(KC_NUHS) + +#define KC_SSUM SEND_SUM +#define KC_SAVE SEND_AVERAGE +#define KC_SCOU SEND_COUNTIF +#define KC_SMAX SEND_MAX +#define KC_SMIN SEND_MIN + +#define KC_RADO LT(_RAISE, KC_PDOT) +#define KC_LOP0 LT(_LOWER, KC_P0) +#define KC_ADNL LT(_ADJUST, KC_NLCK) + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_ESFL] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _FLOCK), + [TD_ESQW] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _QWERTY), +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_with_setta21( + //,-----------------------------------------------------| |-----------------------------------------------------. |-----------------------------------------------| + TD(TD_ESFL), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, KC_LOP0, KC_P1, KC_P4, KC_P7,KC_ADNL, KC_ESC, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_P2, KC_P5, KC_P8,KC_PSLS, KC_F2, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_RADO, KC_P3, KC_P6, KC_P9,KC_PAST, KC_EQL, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| + KC_LCTRL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, KC_PENT, KC_PPLS,KC_PMNS, KC_DEL, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |-----------------------------------------------| + ADJUST,KC_LCTRL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT + //`------------------------------------------------------------------------------------------------------------' + ), + + [_FLOCK] = LAYOUT_with_setta21( + //,-----------------------------------------------------| |-----------------------------------------------------. |-----------------------------------------------| + TD(TD_ESQW), KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, _______,_______,_______,_______,_______,_______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,_______,_______,_______,_______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,_______,_______,_______,_______,_______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,_______,_______, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |-----------------------------------------------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //`------------------------------------------------------------------------------------------------------------' + ), + + [_LOWER] = LAYOUT_with_setta21( + //,-----------------------------------------------------| |-----------------------------------------------------. |-----------------------------------------------| + KC_ESC, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, LOWER,XXXXXXX,KC_LEFT,XXXXXXX,XXXXXXX, KC_ESC, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR,KC_LPRN, KC_RPRN, KC_DEL, KC_DOWN,KC_DOWN, KC_UP,KC_PSLS, KC_F2, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, RAISE,XXXXXXX,KC_RIGHT,XXXXXXX,KC_PAST, KC_EQL, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,KC_SNUHS,KC_SNUBS, _______, _______, _______, KC_PENT, KC_PPLS,KC_PMNS, KC_DEL, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |-----------------------------------------------| + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + //`------------------------------------------------------------------------------------------------------------' + ), + + [_RAISE] = LAYOUT_with_setta21( + //,-----------------------------------------------------| |-----------------------------------------------------. |-----------------------------------------------| + KC_ESC, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, LOWER, KC_F11, KC_F4, KC_F7,KC_SMIN, KC_ESC, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + KC_TILD, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, KC_F12, KC_F5, KC_F8,KC_SMAX, KC_F2, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, RAISE, KC_F3, KC_F6, KC_F9,KC_SCOU, KC_EQL, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, KC_RPRN, KC_SSUM,KC_SAVE, KC_DEL, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |-----------------------------------------------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //`------------------------------------------------------------------------------------------------------------' + ), + + [_ADJUST] = LAYOUT_with_setta21( /* Base */ + //,-----------------------------------------------------| |-----------------------------------------------------. |-----------------------------------------------| + KC_ESC, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, LOWER,RGB_VAD,RGB_HUD,RGB_SAD, ADJUST,RGB_TOG, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + _______, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BTN1, KC_MS_U, KC_BTN2, XXXXXXX,LALT(KC_PSCR), RGB_VAI,RGB_HUI,RGB_SAI,XXXXXXX,_______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_R, XXXXXXX, KC_PSCR, RAISE,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,_______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,LCA(KC_DEL), RGB_MOD, _______,_______,_______, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |-----------------------------------------------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //`------------------------------------------------------------------------------------------------------------' + ) +}; + +static inline void update_change_layer(bool pressed, uint8_t layer1, uint8_t layer2, uint8_t layer3) { + + pressed ? layer_on(layer1) : layer_off(layer1); + IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2) ? layer_on(layer3) : layer_off(layer3); +} + +int RGB_current_mode; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + bool result = false; + switch (keycode) { + case LOWER: + update_change_layer(record->event.pressed, _LOWER, _RAISE, _ADJUST); + break; + case RAISE: + update_change_layer(record->event.pressed, _RAISE, _LOWER, _ADJUST); + break; + case ADJUST: + update_change_layer(record->event.pressed, _ADJUST, _RAISE, _LOWER); + break; + case SEND_SUM: + if (record->event.pressed) { + SEND_STRING("=SUM("); + } + break; + case SEND_AVERAGE: + if (record->event.pressed) { + SEND_STRING("=AVERAGE("); + } + break; + case SEND_COUNTIF: + if (record->event.pressed) { + SEND_STRING("=COUNTIF("); + } + break; + case SEND_MAX: + if (record->event.pressed) { + SEND_STRING("=MAX("); + } + break; + case SEND_MIN: + if (record->event.pressed) { + SEND_STRING("=MIN("); + } + break; + #ifdef RGBLIGHT_ENABLE + case RGB_MOD: + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + break; + case RGBRST: + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + break; + #endif + default: + result = true; + break; + } + + return result; +} + +void matrix_init_user(void) { + #ifdef RGBLIGHT_ENABLE + RGB_current_mode = rgblight_config.mode; + #endif +} diff --git a/keyboards/naked60/keymaps/default_with_setta21/readme.md b/keyboards/naked60/keymaps/default_with_setta21/readme.md new file mode 100644 index 000000000000..750a8b3508e7 --- /dev/null +++ b/keyboards/naked60/keymaps/default_with_setta21/readme.md @@ -0,0 +1,44 @@ +# The default_with_setta21 keymap for naked60 + +Add Setta21 maps to the default layout. + +## Default +| 1 | 2 | 3 | 4 | +|:----:|:----:|:----:|:----:| +| ESC| F2| =| DEL| +|Ad+Num| /| *| -| +| 7| 8| 9| | +| 4| 5| 6| +| +| 1| 2| 3| | +| Rai+0| | LOW + .| ENT| + +## Lower +| 1 | 2 | 3 | 4 | +|:----:|:----:|:----:|:----:| +| ESC| F2| =| DEL| +| =MIN(| =MAX(|=COUNTIF(|=AVERAGE(| +| F7| F8| F9| | +| F4| F5| F6| =SUM(| +| F11| F12| F3| | +| RAISE| | LOWER| )| + +## Raise +| 1 | 2 | 3 | 4 | +|:----:|:----:|:----:|:----:| +| ESC| F2| =| DEL| +| XXXXX| /| *| -| +| XXXXX| UP| XXXXX| | +| LEFT| DOWN| RIGHT| +| +| XXXXX| DOWN| XXXXX| | +| RAISE| | LOWER| ENT| + +## Adjust +| 1 | 2 | 3 | 4 | +|:----:|:----:|:----:|:----:| +| ESC| F2| =| DEL| +|ADJUST| XXXXX| XXXXX| -| +|LED_SAD|LED_SAI| XXXXX| | +|LED_HUD|LED_HUI| XXXXX| +| +|LED_VAD|LED_VAI| XXXXX| | +|LED_ON/Off| | XXXXX|LED_MOD| + diff --git a/keyboards/naked60/keymaps/default_with_setta21/rules.mk b/keyboards/naked60/keymaps/default_with_setta21/rules.mk new file mode 100644 index 000000000000..b714c8f51f6e --- /dev/null +++ b/keyboards/naked60/keymaps/default_with_setta21/rules.mk @@ -0,0 +1,9 @@ +RGBLIGHT_ENABLE = yes + +# If your custom naked60 pcb, you can rewrite to yes. +LED_ANIMATIONS = yes # LED animations + +ifeq ($(strip $(LED_ANIMATIONS)), yes) + # OPT_DEFS += -DRGBLIGHT_ANIMATIONS + OPT_DEFS += -DLED_ANIMATIONS +endif diff --git a/keyboards/naked60/keymaps/salicylic/config.h b/keyboards/naked60/keymaps/salicylic/config.h new file mode 100644 index 000000000000..140a79c772c8 --- /dev/null +++ b/keyboards/naked60/keymaps/salicylic/config.h @@ -0,0 +1,51 @@ +/* Copyright 2018 Salicylic_acid3 + * + * 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 . + */ + +#pragma once + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#define USE_SERIAL_PD2 + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 180 + +#define MK_3_SPEED + +#undef MOUSEKEY_INTERVAL +#define MOUSEKEY_INTERVAL 0 + +#undef MOUSEKEY_TIME_TO_MAX +#define MOUSEKEY_TIME_TO_MAX 150 + +#undef MOUSEKEY_MAX_SPEED +#define MOUSEKEY_MAX_SPEED 3 + +#undef MOUSEKEY_MOVE_DELTA +#define MOUSEKEY_MOVE_DELTA 5 + +#undef MOUSEKEY_DELAY +#define MOUSEKEY_DELAY 0 + +#undef MOUSEKEY_WHEEL_MAX_SPEED +#define MOUSEKEY_WHEEL_MAX_SPEED 1 + +#undef MOUSEKEY_WHEEL_TIME_TO_MAX +#define MOUSEKEY_WHEEL_TIME_TO_MAX 0 diff --git a/keyboards/naked60/keymaps/salicylic/keymap.c b/keyboards/naked60/keymaps/salicylic/keymap.c new file mode 100644 index 000000000000..11d2e143105a --- /dev/null +++ b/keyboards/naked60/keymaps/salicylic/keymap.c @@ -0,0 +1,147 @@ +#include QMK_KEYBOARD_H +#include "keymap_jp.h" + +extern keymap_config_t keymap_config; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +extern uint8_t is_master; + +// 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. +enum layer_number { + _QWERTY = 0, + _FLOCK, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + FLOCK = SAFE_RANGE, + LOWER, + RAISE, + ADJUST, + RGBRST +}; + +enum tapdances{ + TD_ESFL = 0, + TD_ESQW, +}; + +// Fillers to make layering more clear +#define KC_CT11 LCTL_T(KC_F11) +#define KC_SF12 SFT_T(KC_F12) +#define KC_LOEN LT(_LOWER, KC_ENT) +#define KC_RASP LT(_RAISE, KC_SPC) + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_ESFL] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _FLOCK), + [TD_ESQW] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _QWERTY), +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT( + //,-----------------------------------------------------| |-----------------------------------------------------. + TD(TD_ESFL), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_LBRC, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, JP_MINS, JP_RBRC, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, JP_COMM, JP_DOT, JP_SLSH, JP_BSLS, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + KC_LEFT,KC_RIGHT, KC_LGUI, KC_MHEN, KC_LOEN, KC_BSPC, KC_DEL, KC_RASP, KC_HENK, KC_LALT, KC_DOWN, KC_UP + //`------------------------------------------------------------------------------------------------------------' + ), + + + [_FLOCK] = LAYOUT( + //,-----------------------------------------------------| |-----------------------------------------------------. + TD(TD_ESQW), KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //`------------------------------------------------------------------------------------------------------------' + ), + + + [_LOWER] = LAYOUT( + //,-----------------------------------------------------| |-----------------------------------------------------. + KC_ESC, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + JP_COLN, JP_EXLM, JP_QUES, JP_LBRC, JP_RBRC, JP_TILD, KC_6, KC_7, KC_8, KC_9, JP_ASTR, JP_SLSH, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + JP_QUOT, JP_HASH, JP_DQT, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_4, KC_5, KC_6, JP_MINS, JP_EQL, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + JP_CIRC, JP_PERC, JP_AMPR, JP_SCLN, JP_COLN, JP_PIPE, KC_0, KC_1, KC_2, KC_3, JP_PLUS, KC_ENT, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, KC_ZKHK, LOWER, _______, _______, RAISE, KC_0, JP_DOT, _______, _______ + //`------------------------------------------------------------------------------------------------------------' + ), + + + [_RAISE] = LAYOUT( + //,-----------------------------------------------------| |-----------------------------------------------------. + KC_ESC, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, XXXXXXX, KC_UP, XXXXXXX, KC_PGUP, KC_DEL, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_CT11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, KC_LEFT, KC_DOWN,KC_RIGHT, KC_LSFT, KC_ENT, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_SF12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGDN, XXXXXXX, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //`------------------------------------------------------------------------------------------------------------' + ), + + [_ADJUST] = LAYOUT( /* Base */ + //,-----------------------------------------------------| |-----------------------------------------------------. + KC_ESC, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BTN1, KC_MS_U, KC_BTN2, XXXXXXX,LALT(KC_PSCR), + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LCTRL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_R, XXXXXXX, KC_PSCR, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,LCA(KC_DEL), + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //`------------------------------------------------------------------------------------------------------------' + ) +}; + +static inline void update_change_layer(bool pressed, uint8_t layer1, uint8_t layer2, uint8_t layer3) { + + pressed ? layer_on(layer1) : layer_off(layer1); + IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2) ? layer_on(layer3) : layer_off(layer3); +} + +int RGB_current_mode; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + bool result = false; + switch (keycode) { + case LOWER: + update_change_layer(record->event.pressed, _LOWER, _RAISE, _ADJUST); + break; + case RAISE: + update_change_layer(record->event.pressed, _RAISE, _LOWER, _ADJUST); + break; + default: + result = true; + break; + } + + return result; +} diff --git a/keyboards/naked60/keymaps/salicylic/readme.md b/keyboards/naked60/keymaps/salicylic/readme.md new file mode 100644 index 000000000000..da2126381678 --- /dev/null +++ b/keyboards/naked60/keymaps/salicylic/readme.md @@ -0,0 +1,53 @@ +# The salicylic keymap for naked60 + +## Default +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +| ESC(FLock) | 1| 2| 3| 4| 5| | | 6| 7| 8| 9| 0| BSPC| +| TAB | Q| W| E| R| T| | | Y| U| I| O| P| [| +|LCTRL | A| S| D| F| G| | | H| J| K| L| -| ]| +| LSFT | Z| X| C| V| B| | | N| M| ,| .| /| \ | +| | LEFT| RIGHT| LGUI| MHEN|Low+Ent| BSPC| DEL|Rai+SPC| HENK| LALT| UP| DOWN| | + + + +## FLock +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +| ESC(FLock)|F2| F3| F4| F5| F6| | | F7| F8| F9| F10| F11| _____| +| TAB | Q| W| E| R| T| | | Y| U| I| O| P| [| +|LCTRL | A| S| D| F| G| | | H| J| K| L| -| ]| +| LSFT | Z| X| C| V| B| | | N| M| ,| .| /| \ | +| | LEFT| RIGHT| LGUI| MHEN|Low+Ent| BSPC| DEL|Rai+SPC| HENK| LALT| UP| DOWN| | + + +## Lower +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +| ESC| F2| F3| F4| F5| F6| | | F7| F8| F9| F10| F11| F12| +| :| !| ?| [| ]| ~| | | 6| 7| 8| 9| *| /| +| '| #| "| (| )| @| | | XXXXX| 4| 5| 6| -| =| +| ^| %| &| ;| :| PIPE| | | 0| 1| 2| 3| +| ENT| +| | LEFT| RIGHT| LGUI| ZKHK| LOWER| BSPC| DEL| RAISE| 0| .| UP| DOWN| | + + +## Raise +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +| ESC| F2| F3| F4| F5| F6| | | F7| F8| F9| F10| F11| F12| +| ESC| 1| 2| 3| 4| 5| | | XXXXX| XXXXX| UP| XXXXX| PGUP| BSPC| +|CtrlF11| F1| F2| F3| F4| F5| | | XXXXX| LEFT| DOWN| RIGHT| LSFT| ENT| +|ShiftF12| F6| F7| F8| F9| F10| | | XXXXX| XXXXX| XXXXX| XXXXX| PGDN| XXXXX| +| | LEFT| RIGHT| LGUI| ZKHK| LOWER| BSPC| DEL| RAISE| HENK| LALT| UP| DOWN| | + + + +## Adjust +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +| ESC| F2| F3| F4| F5| | | F6| F7| F8| F9| F10| F11| F12| +| ESC| RST| XXXXX| XXXXX| XXXXX| XXXXX| | | XXXXX| BTN1| MS_U| BTN2| XXXXX|Alt+PSCR| +| LCTRL| XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| | | XXXXX| MS_L| MS_D| MS_R| XXXXX| PSCR| +| LSFT| XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| | | XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| C+A+D| +| | LEFT| RIGHT| LGUI| ZKHK| LOWER| BSPC| DEL| RAISE| HENK| LALT| UP| DOWN| | + diff --git a/keyboards/naked60/keymaps/salicylic_with_nafuda/config.h b/keyboards/naked60/keymaps/salicylic_with_nafuda/config.h new file mode 100644 index 000000000000..e188262cf92c --- /dev/null +++ b/keyboards/naked60/keymaps/salicylic_with_nafuda/config.h @@ -0,0 +1,90 @@ +/* Copyright 2018 Salicylic_acid3 + * + * 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 . + */ + +#pragma once + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#define USE_SERIAL_PD2 + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 180 + +#define RGBLED_NUM 7 + +#ifndef IOS_DEVICE_ENABLE + #define RGBLIGHT_LIMIT_VAL 180 + #define RGBLIGHT_VAL_STEP 17 +#else + #define RGBLIGHT_LIMIT_VAL 50 + #define RGBLIGHT_VAL_STEP 4 +#endif +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 + +#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE) +// USB_MAX_POWER_CONSUMPTION value for naked48 keyboard +// 120 RGBoff, OLEDoff +// 120 OLED +// 330 RGB 6 +// 300 RGB 32 +// 310 OLED & RGB 32 + #define USB_MAX_POWER_CONSUMPTION 400 +#else + // fix iPhone and iPad power adapter issue + // iOS device need lessthan 100 + #define USB_MAX_POWER_CONSUMPTION 100 +#endif + +// Selection of RGBLIGHT MODE to use. +#if defined(LED_ANIMATIONS) + //#define RGBLIGHT_EFFECT_BREATHING + #define RGBLIGHT_EFFECT_RAINBOW_MOOD + #define RGBLIGHT_EFFECT_RAINBOW_SWIRL + //#define RGBLIGHT_EFFECT_SNAKE + #define RGBLIGHT_EFFECT_KNIGHT + //#define RGBLIGHT_EFFECT_CHRISTMAS + #define RGBLIGHT_EFFECT_STATIC_GRADIENT + //#define RGBLIGHT_EFFECT_RGB_TEST + //#define RGBLIGHT_EFFECT_ALTERNATING +#endif + +#define MK_3_SPEED + +#undef MOUSEKEY_INTERVAL +#define MOUSEKEY_INTERVAL 0 + +#undef MOUSEKEY_TIME_TO_MAX +#define MOUSEKEY_TIME_TO_MAX 150 + +#undef MOUSEKEY_MAX_SPEED +#define MOUSEKEY_MAX_SPEED 3 + +#undef MOUSEKEY_MOVE_DELTA +#define MOUSEKEY_MOVE_DELTA 5 + +#undef MOUSEKEY_DELAY +#define MOUSEKEY_DELAY 0 + +#undef MOUSEKEY_WHEEL_MAX_SPEED +#define MOUSEKEY_WHEEL_MAX_SPEED 1 + +#undef MOUSEKEY_WHEEL_TIME_TO_MAX +#define MOUSEKEY_WHEEL_TIME_TO_MAX 0 diff --git a/keyboards/naked60/keymaps/salicylic_with_nafuda/keymap.c b/keyboards/naked60/keymaps/salicylic_with_nafuda/keymap.c new file mode 100644 index 000000000000..33ccdf603fb5 --- /dev/null +++ b/keyboards/naked60/keymaps/salicylic_with_nafuda/keymap.c @@ -0,0 +1,207 @@ +#include QMK_KEYBOARD_H +#include "keymap_jp.h" + +extern keymap_config_t keymap_config; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +extern uint8_t is_master; + +// 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. +enum layer_number { + _QWERTY = 0, + _FLOCK, + _MOUSE, + _BROWSER, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + FLOCK = SAFE_RANGE, + MOUSE, + BROWSER, + LOWER, + RAISE, + ADJUST, + RGBRST +}; + +enum tapdances{ + TD_ESFL = 0, + TD_ESQW, +}; + +// Fillers to make layering more clear +#define KC_CT11 LCTL_T(KC_F11) +#define KC_SF12 SFT_T(KC_F12) +#define KC_LOEN LT(_LOWER, KC_ENT) +#define KC_RASP LT(_RAISE, KC_SPC) + +#define KC_RTAB LCTL(KC_TAB) +#define KC_LTAB LCTL(LSFT(KC_TAB)) +#define KC_CTAB LCTL(KC_W) +#define KC_RETAB LCTL(LSFT(KC_T)) + +#define KC_TGMO TG(_MOUSE) +#define KC_TGBR TG(_BROWSER) +#define KC_BSAD LT(_ADJUST, KC_BSPC) + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_ESFL] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _FLOCK), + [TD_ESQW] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _QWERTY), +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_with_nafuda( + //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| + TD(TD_ESFL), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, KC_TGMO, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_LBRC, KC_BSAD, KC_UP, KC_TGBR, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, JP_MINS, JP_RBRC, KC_LEFT, KC_DOWN,KC_RIGHT, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------------------------| + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, JP_COMM, JP_DOT, JP_SLSH, JP_BSLS, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + KC_LEFT,KC_RIGHT, KC_LGUI, KC_MHEN, KC_LOEN, KC_BSPC, KC_DEL, KC_RASP, KC_HENK, KC_LALT, KC_DOWN, KC_UP + //`------------------------------------------------------------------------------------------------------------' + ), + + [_FLOCK] = LAYOUT_with_nafuda( + //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| + TD(TD_ESQW), KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------------------------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //`------------------------------------------------------------------------------------------------------------' + ), + + [_MOUSE] = LAYOUT_with_nafuda( + //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| + TD(TD_ESFL), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, KC_TGMO, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BTN1, KC_MS_U, KC_BTN2, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------------------------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //`------------------------------------------------------------------------------------------------------------' + ), + + [_BROWSER] = LAYOUT_with_nafuda( + //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_CTAB, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RETAB, KC_WH_U, KC_TGBR, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LTAB, KC_WH_D, KC_RTAB, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------------------------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //`------------------------------------------------------------------------------------------------------------' + ), + + [_LOWER] = LAYOUT_with_nafuda( + //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| + KC_ESC, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TGMO, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + JP_COLN, JP_EXLM, JP_QUES, JP_LBRC, JP_RBRC, JP_TILD, KC_6, KC_7, KC_8, KC_9, JP_ASTR, JP_SLSH, KC_BSAD, KC_UP, KC_TGBR, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + JP_QUOT, JP_HASH, JP_DQT, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_4, KC_5, KC_6, JP_MINS, JP_EQL, KC_LEFT, KC_DOWN,KC_RIGHT, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------------------------| + JP_CIRC, JP_PERC, JP_AMPR, JP_SCLN, JP_COLN, JP_PIPE, KC_0, KC_1, KC_2, KC_3, JP_PLUS, KC_ENT, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, KC_ZKHK, LOWER, _______, _______, RAISE, KC_0, JP_DOT, _______, _______ + //`------------------------------------------------------------------------------------------------------------' + ), + + [_RAISE] = LAYOUT_with_nafuda( + //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| + KC_ESC, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TGMO, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, XXXXXXX, KC_UP, XXXXXXX, KC_PGUP, KC_DEL, KC_BSAD, KC_UP, KC_TGBR, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + KC_CT11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, KC_LEFT, KC_DOWN,KC_RIGHT, KC_LSFT, KC_ENT, KC_LEFT, KC_DOWN,KC_RIGHT, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------------------------| + KC_SF12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGDN, XXXXXXX, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //`------------------------------------------------------------------------------------------------------------' + ), + + [_ADJUST] = LAYOUT_with_nafuda( /* Base */ + //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| + KC_ESC, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, RGB_VAD, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + _______, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BTN1, KC_MS_U, KC_BTN2, XXXXXXX,LALT(KC_PSCR), ADJUST, RGB_SAD, RGB_VAI, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| + KC_LCTRL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_R, XXXXXXX, KC_PSCR, RGB_MOD, RGB_TOG, RGB_SAI, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------------------------| + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,LCA(KC_DEL), + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //`------------------------------------------------------------------------------------------------------------' + ) +}; + +static inline void update_change_layer(bool pressed, uint8_t layer1, uint8_t layer2, uint8_t layer3) { + + pressed ? layer_on(layer1) : layer_off(layer1); + IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2) ? layer_on(layer3) : layer_off(layer3); +} + +int RGB_current_mode; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + bool result = false; + switch (keycode) { + case LOWER: + update_change_layer(record->event.pressed, _LOWER, _RAISE, _ADJUST); + break; + case RAISE: + update_change_layer(record->event.pressed, _RAISE, _LOWER, _ADJUST); + break; + #ifdef RGBLIGHT_ENABLE + case RGB_MOD: + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + break; + case RGBRST: + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + break; + #endif + default: + result = true; + break; + } + + return result; +} + +void matrix_init_user(void) { + #ifdef RGBLIGHT_ENABLE + RGB_current_mode = rgblight_config.mode; + #endif +} diff --git a/keyboards/naked60/keymaps/salicylic_with_nafuda/readme.md b/keyboards/naked60/keymaps/salicylic_with_nafuda/readme.md new file mode 100644 index 000000000000..8c83f7ea3637 --- /dev/null +++ b/keyboards/naked60/keymaps/salicylic_with_nafuda/readme.md @@ -0,0 +1,32 @@ +# The salicylic_with_nafuda keymap for naked60 + +Add Nafuda maps to the salicylic layout. + +## Default +| 1 | 2 | 3 | +|:----:|:----:|:----:| +| | MOUSE| | +| BS+Ad| UP|Browser| +| LEFT| DOWN| RIGHT| + +## Mouse +| 1 | 2 | 3 | +|:----:|:----:|:----:| +| |Default| | +| BTN1| MS_U| BTN2| +| MS_L| MS_D| MS_R| + +## Browser +| 1 | 2 | 3 | +|:----:|:----:|:----:| +| |CloseTAB| | +|ReOpenTAB|WH_U|Default| +| LTAB| WH_D| RTAB| + +## Adjust +| 1 | 2 | 3 | +|:----:|:----:|:----:| +| |LED_VAD| | +|Default|LED_HUD|LED_VAI| +|LED_MOD|LED_ON/Off|LED_HUI| + diff --git a/keyboards/naked60/keymaps/salicylic_with_nafuda/rules.mk b/keyboards/naked60/keymaps/salicylic_with_nafuda/rules.mk new file mode 100644 index 000000000000..b714c8f51f6e --- /dev/null +++ b/keyboards/naked60/keymaps/salicylic_with_nafuda/rules.mk @@ -0,0 +1,9 @@ +RGBLIGHT_ENABLE = yes + +# If your custom naked60 pcb, you can rewrite to yes. +LED_ANIMATIONS = yes # LED animations + +ifeq ($(strip $(LED_ANIMATIONS)), yes) + # OPT_DEFS += -DRGBLIGHT_ANIMATIONS + OPT_DEFS += -DLED_ANIMATIONS +endif diff --git a/keyboards/naked60/keymaps/salicylic_with_setta21/config.h b/keyboards/naked60/keymaps/salicylic_with_setta21/config.h new file mode 100644 index 000000000000..fe162510d0ba --- /dev/null +++ b/keyboards/naked60/keymaps/salicylic_with_setta21/config.h @@ -0,0 +1,90 @@ +/* Copyright 2018 Salicylic_acid3 + * + * 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 . + */ + +#pragma once + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#define USE_SERIAL_PD2 + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 180 + +#define RGBLED_NUM 21 + +#ifndef IOS_DEVICE_ENABLE + #define RGBLIGHT_LIMIT_VAL 180 + #define RGBLIGHT_VAL_STEP 17 +#else + #define RGBLIGHT_LIMIT_VAL 50 + #define RGBLIGHT_VAL_STEP 4 +#endif +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 + +#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE) +// USB_MAX_POWER_CONSUMPTION value for naked48 keyboard +// 120 RGBoff, OLEDoff +// 120 OLED +// 330 RGB 6 +// 300 RGB 32 +// 310 OLED & RGB 32 + #define USB_MAX_POWER_CONSUMPTION 400 +#else + // fix iPhone and iPad power adapter issue + // iOS device need lessthan 100 + #define USB_MAX_POWER_CONSUMPTION 100 +#endif + +// Selection of RGBLIGHT MODE to use. +#if defined(LED_ANIMATIONS) + //#define RGBLIGHT_EFFECT_BREATHING + #define RGBLIGHT_EFFECT_RAINBOW_MOOD + #define RGBLIGHT_EFFECT_RAINBOW_SWIRL + //#define RGBLIGHT_EFFECT_SNAKE + #define RGBLIGHT_EFFECT_KNIGHT + //#define RGBLIGHT_EFFECT_CHRISTMAS + #define RGBLIGHT_EFFECT_STATIC_GRADIENT + //#define RGBLIGHT_EFFECT_RGB_TEST + //#define RGBLIGHT_EFFECT_ALTERNATING +#endif + +#define MK_3_SPEED + +#undef MOUSEKEY_INTERVAL +#define MOUSEKEY_INTERVAL 0 + +#undef MOUSEKEY_TIME_TO_MAX +#define MOUSEKEY_TIME_TO_MAX 150 + +#undef MOUSEKEY_MAX_SPEED +#define MOUSEKEY_MAX_SPEED 3 + +#undef MOUSEKEY_MOVE_DELTA +#define MOUSEKEY_MOVE_DELTA 5 + +#undef MOUSEKEY_DELAY +#define MOUSEKEY_DELAY 0 + +#undef MOUSEKEY_WHEEL_MAX_SPEED +#define MOUSEKEY_WHEEL_MAX_SPEED 1 + +#undef MOUSEKEY_WHEEL_TIME_TO_MAX +#define MOUSEKEY_WHEEL_TIME_TO_MAX 0 diff --git a/keyboards/naked60/keymaps/salicylic_with_setta21/keymap.c b/keyboards/naked60/keymaps/salicylic_with_setta21/keymap.c new file mode 100644 index 000000000000..4d2618c52db1 --- /dev/null +++ b/keyboards/naked60/keymaps/salicylic_with_setta21/keymap.c @@ -0,0 +1,207 @@ +#include QMK_KEYBOARD_H +#include "keymap_jp.h" + +extern keymap_config_t keymap_config; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +extern uint8_t is_master; + +// 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. +enum layer_number { + _QWERTY = 0, + _FLOCK, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + FLOCK = SAFE_RANGE, + LOWER, + RAISE, + ADJUST, + KANJI, + RGBRST, + SEND_SUM, + SEND_AVERAGE, + SEND_COUNTIF, + SEND_MAX, + SEND_MIN +}; + +enum tapdances{ + TD_ESFL = 0, + TD_ESQW, +}; + +// Fillers to make layering more clear +#define KC_CT11 LCTL_T(KC_F11) +#define KC_SF12 SFT_T(KC_F12) +#define KC_LOEN LT(_LOWER, KC_ENT) +#define KC_RASP LT(_RAISE, KC_SPC) + +#define KC_SSUM SEND_SUM +#define KC_SAVE SEND_AVERAGE +#define KC_SCOU SEND_COUNTIF +#define KC_SMAX SEND_MAX +#define KC_SMIN SEND_MIN + +#define KC_RADO LT(_RAISE, KC_PDOT) +#define KC_LOP0 LT(_LOWER, KC_P0) +#define KC_ADNL LT(_ADJUST, KC_NLCK) + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_ESFL] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _FLOCK), + [TD_ESQW] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _QWERTY), +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_with_setta21( + //,-----------------------------------------------------| |-----------------------------------------------------. |-----------------------------------------------| + TD(TD_ESFL), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, KC_LOP0, KC_P1, KC_P4, KC_P7,KC_ADNL, KC_ESC, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_LBRC, KC_P2, KC_P5, KC_P8,KC_PSLS, KC_F2, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, JP_MINS, JP_RBRC, KC_RADO, KC_P3, KC_P6, KC_P9,KC_PAST, JP_EQL, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, JP_COMM, JP_DOT, JP_SLSH, JP_BSLS, KC_PENT, KC_PPLS,KC_PMNS, KC_DEL, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |-----------------------------------------------| + KC_LEFT,KC_RIGHT, KC_LGUI, KC_MHEN, KC_LOEN, KC_BSPC, KC_DEL, KC_RASP, KC_HENK, KC_LALT, KC_DOWN, KC_UP + //`------------------------------------------------------------------------------------------------------------' + ), + + [_FLOCK] = LAYOUT_with_setta21( + //,-----------------------------------------------------| |-----------------------------------------------------. |-----------------------------------------------| + TD(TD_ESQW), KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,_______,_______,_______,_______,_______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,_______,_______,_______,_______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,_______,_______,_______,_______,_______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,_______,_______, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |-----------------------------------------------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //`------------------------------------------------------------------------------------------------------------' + ), + + [_LOWER] = LAYOUT_with_setta21( + //,-----------------------------------------------------| |-----------------------------------------------------. |-----------------------------------------------| + KC_ESC, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, LOWER,XXXXXXX,KC_LEFT,XXXXXXX,XXXXXXX, KC_ESC, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + JP_COLN, JP_EXLM, JP_QUES, JP_LBRC, JP_RBRC, JP_TILD, KC_6, KC_7, KC_8, KC_9, JP_ASTR, JP_SLSH, KC_DOWN,KC_DOWN, KC_UP,KC_PSLS, KC_F2, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + JP_QUOT, JP_HASH, JP_DQT, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_4, KC_5, KC_6, JP_MINS, JP_EQL, RAISE,XXXXXXX,KC_RIGHT,XXXXXXX,KC_PAST, JP_EQL, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| + JP_CIRC, JP_PERC, JP_AMPR, JP_SCLN, JP_COLN, JP_PIPE, KC_0, KC_1, KC_2, KC_3, JP_PLUS, KC_ENT, KC_PENT, KC_PPLS,KC_PMNS, KC_DEL, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |-----------------------------------------------| + _______, _______, _______, KC_ZKHK, LOWER, _______, _______, RAISE, KC_0, JP_DOT, _______, _______ + //`------------------------------------------------------------------------------------------------------------' + ), + + [_RAISE] = LAYOUT_with_setta21( + //,-----------------------------------------------------| |-----------------------------------------------------. |-----------------------------------------------| + KC_ESC, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, LOWER, KC_F11, KC_F4, KC_F7,KC_SMIN, KC_ESC, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, XXXXXXX, KC_UP, XXXXXXX, KC_PGUP, KC_DEL, KC_F12, KC_F5, KC_F8,KC_SMAX, KC_F2, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + KC_CT11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, KC_LEFT, KC_DOWN,KC_RIGHT, KC_LSFT, KC_ENT, RAISE, KC_F3, KC_F6, KC_F9,KC_SCOU, JP_EQL, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| + KC_SF12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGDN, XXXXXXX, JP_RPRN, KC_SSUM,KC_SAVE, KC_DEL, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |-----------------------------------------------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //`------------------------------------------------------------------------------------------------------------' + ), + + [_ADJUST] = LAYOUT_with_setta21( /* Base */ + //,-----------------------------------------------------| |-----------------------------------------------------. |-----------------------------------------------| + KC_ESC, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, LOWER,RGB_VAD,RGB_HUD,RGB_SAD, ADJUST,RGB_TOG, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + _______, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BTN1, KC_MS_U, KC_BTN2, XXXXXXX,LALT(KC_PSCR), RGB_VAI,RGB_HUI,RGB_SAI,XXXXXXX,_______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + KC_LCTRL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_R, XXXXXXX, KC_PSCR, RAISE,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,_______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,LCA(KC_DEL), RGB_MOD, _______,_______,_______, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |-----------------------------------------------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //`------------------------------------------------------------------------------------------------------------' + ) +}; + +static inline void update_change_layer(bool pressed, uint8_t layer1, uint8_t layer2, uint8_t layer3) { + + pressed ? layer_on(layer1) : layer_off(layer1); + IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2) ? layer_on(layer3) : layer_off(layer3); +} + +int RGB_current_mode; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + bool result = false; + switch (keycode) { + case LOWER: + update_change_layer(record->event.pressed, _LOWER, _RAISE, _ADJUST); + break; + case RAISE: + update_change_layer(record->event.pressed, _RAISE, _LOWER, _ADJUST); + break; + case SEND_SUM: + if (record->event.pressed) { + SEND_STRING("_SUM*"); + } + break; + case SEND_AVERAGE: + if (record->event.pressed) { + SEND_STRING("_AVERAGE*"); + } + break; + case SEND_COUNTIF: + if (record->event.pressed) { + SEND_STRING("_COUNTIF*"); + } + break; + case SEND_MAX: + if (record->event.pressed) { + SEND_STRING("_MAX*"); + } + break; + case SEND_MIN: + if (record->event.pressed) { + SEND_STRING("_MIN*"); + } + break; + #ifdef RGBLIGHT_ENABLE + case RGB_MOD: + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + break; + case RGBRST: + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + break; + #endif + default: + result = true; + break; + } + + return result; +} + +void matrix_init_user(void) { + #ifdef RGBLIGHT_ENABLE + RGB_current_mode = rgblight_config.mode; + #endif +} diff --git a/keyboards/naked60/keymaps/salicylic_with_setta21/readme.md b/keyboards/naked60/keymaps/salicylic_with_setta21/readme.md new file mode 100644 index 000000000000..0912d5431a0f --- /dev/null +++ b/keyboards/naked60/keymaps/salicylic_with_setta21/readme.md @@ -0,0 +1,44 @@ +# The salicylic_with_setta21 keymap for naked60 + +Add Setta21 maps to the salicylic layout. + +## Default +| 1 | 2 | 3 | 4 | +|:----:|:----:|:----:|:----:| +| ESC| F2| =| DEL| +|Ad+Num| /| *| -| +| 7| 8| 9| | +| 4| 5| 6| +| +| 1| 2| 3| | +| Rai+0| | LOW + .| ENT| + +## Lower +| 1 | 2 | 3 | 4 | +|:----:|:----:|:----:|:----:| +| ESC| F2| =| DEL| +| =MIN(| =MAX(|=COUNTIF(|=AVERAGE(| +| F7| F8| F9| | +| F4| F5| F6| =SUM(| +| F11| F12| F3| | +| RAISE| | LOWER| )| + +## Raise +| 1 | 2 | 3 | 4 | +|:----:|:----:|:----:|:----:| +| ESC| F2| =| DEL| +| XXXXX| /| *| -| +| XXXXX| UP| XXXXX| | +| LEFT| DOWN| RIGHT| +| +| XXXXX| DOWN| XXXXX| | +| RAISE| | LOWER| ENT| + +## Adjust +| 1 | 2 | 3 | 4 | +|:----:|:----:|:----:|:----:| +| ESC| F2| =| DEL| +|ADJUST| XXXXX| XXXXX| -| +|LED_SAD|LED_SAI| XXXXX| | +|LED_HUD|LED_HUI| XXXXX| +| +|LED_VAD|LED_VAI| XXXXX| | +|LED_ON/Off| | XXXXX|LED_MOD| + diff --git a/keyboards/naked60/keymaps/salicylic_with_setta21/rules.mk b/keyboards/naked60/keymaps/salicylic_with_setta21/rules.mk new file mode 100644 index 000000000000..15a887e78131 --- /dev/null +++ b/keyboards/naked60/keymaps/salicylic_with_setta21/rules.mk @@ -0,0 +1,10 @@ +RGBLIGHT_ENABLE = yes + +# If your custom naked60 pcb, you can rewrite to yes. +LED_ANIMATIONS = yes # LED animations + +ifeq ($(strip $(LED_ANIMATIONS)), yes) + # OPT_DEFS += -DRGBLIGHT_ANIMATIONS + OPT_DEFS += -DLED_ANIMATIONS +endif + diff --git a/keyboards/naked60/naked60.c b/keyboards/naked60/naked60.c new file mode 100644 index 000000000000..1ff159cdb413 --- /dev/null +++ b/keyboards/naked60/naked60.c @@ -0,0 +1 @@ +#include "naked60.h" diff --git a/keyboards/naked60/naked60.h b/keyboards/naked60/naked60.h new file mode 100644 index 000000000000..fde791c5ef82 --- /dev/null +++ b/keyboards/naked60/naked60.h @@ -0,0 +1,12 @@ +#pragma once + +#ifdef KEYBOARD_naked60_rev1 + #include "rev1.h" +#endif + +#include "quantum.h" + +#ifdef PROTOCOL_LUFA +#include "lufa.h" +#include "split_util.h" +#endif diff --git a/keyboards/naked60/readme.md b/keyboards/naked60/readme.md new file mode 100644 index 000000000000..60bb1643772f --- /dev/null +++ b/keyboards/naked60/readme.md @@ -0,0 +1,18 @@ +# naked60 + +![naked60](https://cdn-ak.f.st-hatena.com/images/fotolife/S/Salicylic_acid3/20190530/20190530040355.jpg) + +This is 60 keys modification Ortholinear keyboard. + +Keyboard Maintainer: [Salicylic_acid3](/~https://github.com/Salicylic-acid3) +Hardware Supported: Naked60BMP PCB, Pro Micro +Hardware Availability: [PCB & Case Data](/~https://github.com/Salicylic-acid3/PCB_Data), [Booth Shop](https://salicylic-acid3.booth.pm/items/1360780) + +Make example for this keyboard (after setting up your build environment): + + make naked60:default:avrdude + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +[Build guide](https://salicylic-acid3.hatenablog.com/entry/naked60bmp-build-guide) +[Firmware](/~https://github.com/Salicylic-acid3/qmk_firmware/tree/master/keyboards/naked60) diff --git a/keyboards/naked60/rev1/config.h b/keyboards/naked60/rev1/config.h new file mode 100644 index 000000000000..1724ef060afb --- /dev/null +++ b/keyboards/naked60/rev1/config.h @@ -0,0 +1,119 @@ +/* +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x3060 +#define DEVICE_VER 0x0002 +#define MANUFACTURER Salicylic_Acid +#define PRODUCT naked60 +#define DESCRIPTION Ortholinear 60 Keys Keyboard + +/* Use I2C or Serial */ +//#define USE_I2C +#define USE_SERIAL +//#define USE_MATRIX_I2C + +/* Select hand configuration */ +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +// OLED support +// see ./rules.mk: OLED_ENABLE=yes or no +#ifdef OLED_ENABLE + #define SSD1306OLED +#endif + +/* key matrix size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 14 + +// Rows are doubled-up +#define MATRIX_ROW_PINS { B6, D1, D0, D4, C6 } + +// wiring of each half +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, D7, E6, B4, B5, D3 } +// #define MATRIX_COL_PINS { D3, B5, B4, E6, D7, B2, B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +// #define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 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 + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 +#define RGBLIGHT_TIMER + +// naked60 keyboard RGB LED support +//#define RGBLIGHT_ANIMATIONS : see ./rules.mk: LED_ANIMATIONS = yes or no +// see ./rules.mk: LED_BACK_ENABLE or LED_UNDERGLOW_ENABLE set yes +//#define RGBLED_NUM 21 + +#ifndef IOS_DEVICE_ENABLE + #define RGBLIGHT_LIMIT_VAL 180 + #define RGBLIGHT_VAL_STEP 17 +#else + #define RGBLIGHT_LIMIT_VAL 50 + #define RGBLIGHT_VAL_STEP 4 +#endif +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 + +#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE) +// USB_MAX_POWER_CONSUMPTION value for naked60 keyboard +// 120 RGBoff, OLEDoff +// 120 OLED +// 330 RGB 6 +// 300 RGB 32 +// 310 OLED & RGB 32 + #define USB_MAX_POWER_CONSUMPTION 400 +#else + // fix iPhone and iPad power adapter issue + // iOS device need lessthan 100 + #define USB_MAX_POWER_CONSUMPTION 100 +#endif + +/* + * 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 diff --git a/keyboards/naked60/rev1/matrix.c b/keyboards/naked60/rev1/matrix.c new file mode 100644 index 000000000000..8685a8125e49 --- /dev/null +++ b/keyboards/naked60/rev1/matrix.c @@ -0,0 +1,357 @@ +/* +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 . +*/ + +/* + * scan matrix + */ +#include +#include +#include +#include +#include +#include +#include +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "split_util.h" +#include "pro_micro.h" + +#ifdef USE_MATRIX_I2C +# include "i2c.h" +#else // USE_SERIAL +# include "split_scomm.h" +#endif + +#ifndef DEBOUNCE +# define DEBOUNCE 5 +#endif + +#define ERROR_DISCONNECT_COUNT 5 + +static uint8_t debouncing = DEBOUNCE; +static const int ROWS_PER_HAND = MATRIX_ROWS/2; +static uint8_t error_count = 0; +uint8_t is_master = 0 ; + +static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; +static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; + +/* matrix state(1:on, 0:off) */ +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); +static uint8_t matrix_master_scan(void); + + +__attribute__ ((weak)) +void matrix_init_kb(void) { + matrix_init_user(); +} + +__attribute__ ((weak)) +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +__attribute__ ((weak)) +void matrix_init_user(void) { +} + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + +inline +uint8_t matrix_rows(void) +{ + return MATRIX_ROWS; +} + +inline +uint8_t matrix_cols(void) +{ + return MATRIX_COLS; +} + +void matrix_init(void) +{ + debug_enable = true; + debug_matrix = true; + debug_mouse = true; + // initialize row and col + unselect_rows(); + init_cols(); + + TX_RX_LED_INIT; + TXLED0; + RXLED0; + + // initialize matrix state: all keys off + for (uint8_t i=0; i < MATRIX_ROWS; i++) { + matrix[i] = 0; + matrix_debouncing[i] = 0; + } + + is_master = has_usb(); + + 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); + + 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(); + } + + if (debouncing) { + if (--debouncing) { + _delay_ms(1); + } else { + for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { + matrix[i+offset] = matrix_debouncing[i+offset]; + } + } + } + + return 1; +} + +#ifdef USE_MATRIX_I2C + +// Get rows from other half over i2c +int i2c_transaction(void) { + int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; + + int err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE); + if (err) goto i2c_error; + + // start of matrix stored at 0x00 + err = i2c_master_write(0x00); + if (err) goto i2c_error; + + // Start read + err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ); + if (err) goto i2c_error; + + if (!err) { + int i; + for (i = 0; i < ROWS_PER_HAND-1; ++i) { + matrix[slaveOffset+i] = i2c_master_read(I2C_ACK); + } + matrix[slaveOffset+i] = i2c_master_read(I2C_NACK); + i2c_master_stop(); + } else { +i2c_error: // the cable is disconnceted, or something else went wrong + i2c_reset_state(); + return err; + } + + return 0; +} + +#else // USE_SERIAL + +int serial_transaction(int master_changed) { + int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; +#ifdef SERIAL_USE_MULTI_TRANSACTION + int ret=serial_update_buffers(master_changed); +#else + int ret=serial_update_buffers(); +#endif + if (ret ) { + if(ret==2) RXLED1; + return 1; + } + RXLED0; + memcpy(&matrix[slaveOffset], + (void *)serial_slave_buffer, sizeof(serial_slave_buffer)); + return 0; +} +#endif + +uint8_t matrix_scan(void) +{ + if (is_master) { + matrix_master_scan(); + }else{ + matrix_slave_scan(); + int offset = (isLeftHand) ? ROWS_PER_HAND : 0; + memcpy(&matrix[offset], + (void *)serial_master_buffer, sizeof(serial_master_buffer)); + matrix_scan_quantum(); + } + return 1; +} + + +uint8_t matrix_master_scan(void) { + + int ret = _matrix_scan(); + int mchanged = 1; + + int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; + +#ifdef USE_MATRIX_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 + #ifdef SERIAL_USE_MULTI_TRANSACTION + mchanged = memcmp((void *)serial_master_buffer, + &matrix[offset], sizeof(serial_master_buffer)); + #endif + memcpy((void *)serial_master_buffer, + &matrix[offset], sizeof(serial_master_buffer)); +#endif + +#ifdef USE_MATRIX_I2C + if( i2c_transaction() ) { +#else // USE_SERIAL + if( serial_transaction(mchanged) ) { +#endif + // turn on the indicator led when halves are disconnected + TXLED1; + + error_count++; + + if (error_count > ERROR_DISCONNECT_COUNT) { + // reset other half if disconnected + int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; + for (int i = 0; i < ROWS_PER_HAND; ++i) { + matrix[slaveOffset+i] = 0; + } + } + } else { + // turn off the indicator led on no error + TXLED0; + error_count = 0; + } + matrix_scan_quantum(); + return ret; +} + +void matrix_slave_scan(void) { + _matrix_scan(); + + int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; + +#ifdef USE_MATRIX_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 + #ifdef SERIAL_USE_MULTI_TRANSACTION + int change = 0; + #endif + for (int i = 0; i < ROWS_PER_HAND; ++i) { + #ifdef SERIAL_USE_MULTI_TRANSACTION + if( serial_slave_buffer[i] != matrix[offset+i] ) + change = 1; + #endif + serial_slave_buffer[i] = matrix[offset+i]; + } + #ifdef SERIAL_USE_MULTI_TRANSACTION + slave_buffer_change_count += change; + #endif +#endif +} + +bool matrix_is_modified(void) +{ + if (debouncing) return false; + return true; +} + +inline +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & ((matrix_row_t)1<> 4) + 1) &= ~_BV(col_pins[x] & 0xF); + _SFR_IO8((col_pins[x] >> 4) + 2) |= _BV(col_pins[x] & 0xF); + } +} + +static matrix_row_t read_cols(void) +{ + 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); + } + return result; +} + +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); + } +} + +static void select_row(uint8_t row) +{ + _SFR_IO8((row_pins[row] >> 4) + 1) |= _BV(row_pins[row] & 0xF); + _SFR_IO8((row_pins[row] >> 4) + 2) &= ~_BV(row_pins[row] & 0xF); +} diff --git a/keyboards/naked60/rev1/rev1.c b/keyboards/naked60/rev1/rev1.c new file mode 100644 index 000000000000..520a869e57ba --- /dev/null +++ b/keyboards/naked60/rev1/rev1.c @@ -0,0 +1 @@ +#include "rev1.h" diff --git a/keyboards/naked60/rev1/rev1.h b/keyboards/naked60/rev1/rev1.h new file mode 100644 index 000000000000..38e355cfcf05 --- /dev/null +++ b/keyboards/naked60/rev1/rev1.h @@ -0,0 +1,97 @@ +#pragma once + +#include "naked60.h" + +#include "quantum.h" + +#ifdef RGBLIGHT_ENABLE +//rgb led driver +#include "ws2812.h" +#endif + + +////////////////////////////////////////////////////////////////////////////// +// When only use naked60. +////////////////////////////////////////////////////////////////////////////// +/* + * ,------------------------------------ ------------------------------------. + * | L00 | L01 | L02 | L03 | L04 | L05 | | L06 | L07 | L08 | L09 | L0A | L0B | + * |------------------------------------ ------------------------------------+ + * | L10 | L11 | L12 | L13 | L14 | L15 | | L16 | L17 | L18 | L19 | L1A | L1B | + * |------------------------------------ ------------------------------------+ + * | L20 | L21 | L22 | L23 | L24 | L25 | | L26 | L17 | L28 | L29 | L2A | L2B | + * |------------------------------------ ------------------------------------+ + * | L30 | L31 | L32 | L33 | L34 | L35 | | L36 | L37 | L38 | L39 | L3A | L3B | + * |-----------------------------------------------------------------------' + * | L40 | L41 | L42 | L43 | L44 | L45 | L46 | L47 | L48 | L49 | L4A | L4B | + * |-----------------------------------------------------------------------' + */ + +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, L06, L07, L08, L09, L0A, L0B, \ + L10, L11, L12, L13, L14, L15, L16, L17, L18, L19, L1A, L1B, \ + L20, L21, L22, L23, L24, L25, L26, L27, L28, L29, L2A, L2B, \ + L30, L31, L32, L33, L34, L35, L36, L37, L38, L39, L3A, L3B, \ + L40, L41, L42, L43, L44, L45, L46, L47, L48, L49, L4A, L4B \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05, L06, L07, L08, L09, L0A, L0B }, \ + { L10, L11, L12, L13, L14, L15, L16, L17, L18, L19, L1A, L1B }, \ + { L20, L21, L22, L23, L24, L25, L26, L27, L28, L29, L2A, L2B }, \ + { L30, L31, L32, L33, L34, L35, L36, L37, L38, L39, L3A, L3B }, \ + { L40, L41, L42, L43, L44, L45, L46, L47, L48, L49, L4A, L4B }, \ + {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO } \ + } + +////////////////////////////////////////////////////////////////////////////// +// When connecting Setta21 to naked60. +////////////////////////////////////////////////////////////////////////////// + +#define LAYOUT_with_setta21( \ + L00, L01, L02, L03, L04, L05, L06, L07, L08, L09, L0A, L0B, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, L16, L17, L18, L19, L1A, L1B, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, L26, L27, L28, L29, L2A, L2B, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, L35, L36, L37, L38, L39, L3A, L3B, R30, R32, R34, R35, \ + L40, L41, L42, L43, L44, L45, L46, L47, L48, L49, L4A, L4B \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05, L06, L07, L08, L09, L0A, L0B,KC_NO,KC_NO }, \ + { L10, L11, L12, L13, L14, L15, L16, L17, L18, L19, L1A, L1B,KC_NO,KC_NO }, \ + { L20, L21, L22, L23, L24, L25, L26, L27, L28, L29, L2A, L2B,KC_NO,KC_NO }, \ + { L30, L31, L32, L33, L34, L35, L36, L37, L38, L39, L3A, L3B,KC_NO,KC_NO }, \ + { L40, L41, L42, L43, L44, L45, L46, L47, L48, L49, L4A, L4B,KC_NO,KC_NO }, \ + { R00, R01, R02, R03, R04, R05,KC_NO,KC_NO,KC_NO, R11, R12, R13, R14, R15 }, \ + { R20, R21, R22, R23, R24, R25,KC_NO,KC_NO, R30,KC_NO, R32,KC_NO, R34, R35 }, \ + {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO } \ + } + +////////////////////////////////////////////////////////////////////////////// +// When connecting Nafuda to naked60. +////////////////////////////////////////////////////////////////////////////// + +#define LAYOUT_with_nafuda( \ + L00, L01, L02, L03, L04, L05, L06, L07, L08, L09, L0A, L0B, R01, \ + L10, L11, L12, L13, L14, L15, L16, L17, L18, L19, L1A, L1B, R10, R11, R12, \ + L20, L21, L22, L23, L24, L25, L26, L27, L28, L29, L2A, L2B, R20, R21, R22, \ + L30, L31, L32, L33, L34, L35, L36, L37, L38, L39, L3A, L3B, \ + L40, L41, L42, L43, L44, L45, L46, L47, L48, L49, L4A, L4B \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05, L06, L07, L08, L09, L0A, L0B,KC_NO,KC_NO }, \ + { L10, L11, L12, L13, L14, L15, L16, L17, L18, L19, L1A, L1B,KC_NO,KC_NO }, \ + { L20, L21, L22, L23, L24, L25, L26, L27, L28, L29, L2A, L2B,KC_NO,KC_NO }, \ + { L30, L31, L32, L33, L34, L35, L36, L37, L38, L39, L3A, L3B,KC_NO,KC_NO }, \ + { L40, L41, L42, L43, L44, L45, L46, L47, L48, L49, L4A, L4B,KC_NO,KC_NO }, \ + {KC_NO, R01,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, R10, R11, R12,KC_NO,KC_NO,KC_NO }, \ + { R20, R21, R22,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO } \ + } + diff --git a/keyboards/naked60/rev1/rules.mk b/keyboards/naked60/rev1/rules.mk new file mode 100644 index 000000000000..a71181033383 --- /dev/null +++ b/keyboards/naked60/rev1/rules.mk @@ -0,0 +1,3 @@ +SRC += matrix.c \ + split_util.c \ + split_scomm.c diff --git a/keyboards/naked60/rev1/serial_config.h b/keyboards/naked60/rev1/serial_config.h new file mode 100644 index 000000000000..37135213d55f --- /dev/null +++ b/keyboards/naked60/rev1/serial_config.h @@ -0,0 +1,8 @@ +//// #error rev2 serial config + +#ifndef SOFT_SERIAL_PIN +/* Soft Serial defines */ +#define SOFT_SERIAL_PIN D2 + +#define SERIAL_USE_MULTI_TRANSACTION +#endif diff --git a/keyboards/naked60/rev1/serial_config_simpleapi.h b/keyboards/naked60/rev1/serial_config_simpleapi.h new file mode 100644 index 000000000000..e2d22a41e7bc --- /dev/null +++ b/keyboards/naked60/rev1/serial_config_simpleapi.h @@ -0,0 +1,8 @@ +#ifndef SERIAL_CONFIG_SIMPLEAPI_H +#define SERIAL_CONFIG_SIMPLEAPI_H + +#undef SERIAL_USE_MULTI_TRANSACTION +#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 +#define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2 + +#endif // SERIAL_CONFIG_SIMPLEAPI_H diff --git a/keyboards/naked60/rev1/split_scomm.c b/keyboards/naked60/rev1/split_scomm.c new file mode 100644 index 000000000000..ada7867960b9 --- /dev/null +++ b/keyboards/naked60/rev1/split_scomm.c @@ -0,0 +1,92 @@ +#ifdef USE_SERIAL +#ifdef SERIAL_USE_MULTI_TRANSACTION +/* --- USE flexible API (using multi-type transaction function) --- */ + +#include +#include +#include +#include +#include "serial.h" +#ifdef CONSOLE_ENABLE + #include +#endif + +uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; +uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; +uint8_t volatile status_com = 0; +uint8_t volatile status1 = 0; +uint8_t slave_buffer_change_count = 0; +uint8_t s_change_old = 0xff; +uint8_t s_change_new = 0xff; + +SSTD_t transactions[] = { +#define GET_SLAVE_STATUS 0 + /* master buffer not changed, only recive slave_buffer_change_count */ + { (uint8_t *)&status_com, + 0, NULL, + sizeof(slave_buffer_change_count), &slave_buffer_change_count, + }, +#define PUT_MASTER_GET_SLAVE_STATUS 1 + /* master buffer changed need send, and recive slave_buffer_change_count */ + { (uint8_t *)&status_com, + sizeof(serial_master_buffer), (uint8_t *)serial_master_buffer, + sizeof(slave_buffer_change_count), &slave_buffer_change_count, + }, +#define GET_SLAVE_BUFFER 2 + /* recive serial_slave_buffer */ + { (uint8_t *)&status1, + 0, NULL, + sizeof(serial_slave_buffer), (uint8_t *)serial_slave_buffer + } +}; + +void serial_master_init(void) +{ + soft_serial_initiator_init(transactions, TID_LIMIT(transactions)); +} + +void serial_slave_init(void) +{ + soft_serial_target_init(transactions, TID_LIMIT(transactions)); +} + +// 0 => no error +// 1 => slave did not respond +// 2 => checksum error +int serial_update_buffers(int master_update) +{ + int status, smatstatus; + static int need_retry = 0; + + if( s_change_old != s_change_new ) { + smatstatus = soft_serial_transaction(GET_SLAVE_BUFFER); + if( smatstatus == TRANSACTION_END ) { + s_change_old = s_change_new; +#ifdef CONSOLE_ENABLE + uprintf("slave matrix = %b %b %b %b %b\n", + serial_slave_buffer[0], serial_slave_buffer[1], + serial_slave_buffer[2], serial_slave_buffer[3], + serial_slave_buffer[4] ); +#endif + } + } else { + // serial_slave_buffer dosen't change + smatstatus = TRANSACTION_END; // dummy status + } + + if( !master_update && !need_retry) { + status = soft_serial_transaction(GET_SLAVE_STATUS); + } else { + status = soft_serial_transaction(PUT_MASTER_GET_SLAVE_STATUS); + } + if( status == TRANSACTION_END ) { + s_change_new = slave_buffer_change_count; + need_retry = 0; + } else { + need_retry = 1; + } + return smatstatus; +} + +#endif // SERIAL_USE_MULTI_TRANSACTION +#endif /* USE_SERIAL */ diff --git a/keyboards/naked60/rev1/split_scomm.h b/keyboards/naked60/rev1/split_scomm.h new file mode 100644 index 000000000000..537ec4080828 --- /dev/null +++ b/keyboards/naked60/rev1/split_scomm.h @@ -0,0 +1,22 @@ +#pragma once + +#ifndef SERIAL_USE_MULTI_TRANSACTION +/* --- USE Simple API (OLD API, compatible with let's split serial.c) --- */ +#include "serial.h" + +#else +/* --- USE flexible API (using multi-type transaction function) --- */ +// Buffers for master - slave communication +#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 +#define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2 + +extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; +extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; +extern uint8_t slave_buffer_change_count; + +void serial_master_init(void); +void serial_slave_init(void); +int serial_update_buffers(int master_changed); + +#endif + diff --git a/keyboards/naked60/rev1/split_util.c b/keyboards/naked60/rev1/split_util.c new file mode 100644 index 000000000000..e1ff8b4379dc --- /dev/null +++ b/keyboards/naked60/rev1/split_util.c @@ -0,0 +1,70 @@ +#include +#include +#include +#include +#include +#include +#include "split_util.h" +#include "matrix.h" +#include "keyboard.h" + +#ifdef USE_MATRIX_I2C +# include "i2c.h" +#else +# include "split_scomm.h" +#endif + +volatile bool isLeftHand = true; + +static void setup_handedness(void) { + #ifdef EE_HANDS + isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS); + #else + // I2C_MASTER_RIGHT is deprecated, use MASTER_RIGHT instead, since this works for both serial and i2c + #if defined(I2C_MASTER_RIGHT) || defined(MASTER_RIGHT) + isLeftHand = !has_usb(); + #else + isLeftHand = has_usb(); + #endif + #endif +} + +static void keyboard_master_setup(void) { + +#ifdef USE_MATRIX_I2C + i2c_master_init(); +#else + serial_master_init(); +#endif +} + +static void keyboard_slave_setup(void) { + +#ifdef USE_MATRIX_I2C + i2c_slave_init(SLAVE_I2C_ADDRESS); +#else + serial_slave_init(); +#endif +} + +bool has_usb(void) { + USBCON |= (1 << OTGPADE); //enables VBUS pad + _delay_us(5); + return (USBSTA & (1< +#include "eeconfig.h" + +#define SLAVE_I2C_ADDRESS 0x32 + +extern volatile bool isLeftHand; + +// slave version of matix scan, defined in matrix.c +void matrix_slave_scan(void); + +void split_keyboard_setup(void); +bool has_usb(void); + +void matrix_master_OLED_init (void); diff --git a/keyboards/naked60/rules.mk b/keyboards/naked60/rules.mk new file mode 100644 index 000000000000..fc2fe3032049 --- /dev/null +++ b/keyboards/naked60/rules.mk @@ -0,0 +1,40 @@ +QUANTUM_LIB_SRC += serial.c + +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +TAP_DANCE_ENABLE = yes +SUBPROJECT_rev1 = no +USE_I2C = no +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +CUSTOM_MATRIX = yes + +DEFAULT_FOLDER = naked60/rev1 diff --git a/keyboards/naked60/serial.c b/keyboards/naked60/serial.c new file mode 100644 index 000000000000..6006ebf1bdb2 --- /dev/null +++ b/keyboards/naked60/serial.c @@ -0,0 +1,590 @@ +/* + * WARNING: be careful changing this code, it is very timing dependent + * + * 2018-10-28 checked + * avr-gcc 4.9.2 + * avr-gcc 5.4.0 + * avr-gcc 7.3.0 + */ + +#ifndef F_CPU +#define F_CPU 16000000 +#endif + +#include +#include +#include +#include +#include +#include "serial.h" +//#include + +#ifdef SOFT_SERIAL_PIN + +#ifdef __AVR_ATmega32U4__ + // if using ATmega32U4 I2C, can not use PD0 and PD1 in soft serial. + #ifdef USE_I2C + #if SOFT_SERIAL_PIN == D0 || SOFT_SERIAL_PIN == D1 + #error Using ATmega32U4 I2C, so can not use PD0, PD1 + #endif + #endif + + #if SOFT_SERIAL_PIN >= D0 && SOFT_SERIAL_PIN <= D3 + #define SERIAL_PIN_DDR DDRD + #define SERIAL_PIN_PORT PORTD + #define SERIAL_PIN_INPUT PIND + #if SOFT_SERIAL_PIN == D0 + #define SERIAL_PIN_MASK _BV(PD0) + #define EIMSK_BIT _BV(INT0) + #define EICRx_BIT (~(_BV(ISC00) | _BV(ISC01))) + #define SERIAL_PIN_INTERRUPT INT0_vect + #elif SOFT_SERIAL_PIN == D1 + #define SERIAL_PIN_MASK _BV(PD1) + #define EIMSK_BIT _BV(INT1) + #define EICRx_BIT (~(_BV(ISC10) | _BV(ISC11))) + #define SERIAL_PIN_INTERRUPT INT1_vect + #elif SOFT_SERIAL_PIN == D2 + #define SERIAL_PIN_MASK _BV(PD2) + #define EIMSK_BIT _BV(INT2) + #define EICRx_BIT (~(_BV(ISC20) | _BV(ISC21))) + #define SERIAL_PIN_INTERRUPT INT2_vect + #elif SOFT_SERIAL_PIN == D3 + #define SERIAL_PIN_MASK _BV(PD3) + #define EIMSK_BIT _BV(INT3) + #define EICRx_BIT (~(_BV(ISC30) | _BV(ISC31))) + #define SERIAL_PIN_INTERRUPT INT3_vect + #endif + #elif SOFT_SERIAL_PIN == E6 + #define SERIAL_PIN_DDR DDRE + #define SERIAL_PIN_PORT PORTE + #define SERIAL_PIN_INPUT PINE + #define SERIAL_PIN_MASK _BV(PE6) + #define EIMSK_BIT _BV(INT6) + #define EICRx_BIT (~(_BV(ISC60) | _BV(ISC61))) + #define SERIAL_PIN_INTERRUPT INT6_vect + #else + #error invalid SOFT_SERIAL_PIN value + #endif + +#else + #error serial.c now support ATmega32U4 only +#endif + +//////////////// for backward compatibility //////////////////////////////// +#if !defined(SERIAL_USE_SINGLE_TRANSACTION) && !defined(SERIAL_USE_MULTI_TRANSACTION) +/* --- USE OLD API (compatible with let's split serial.c) */ + #if SERIAL_SLAVE_BUFFER_LENGTH > 0 + uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; + #endif + #if SERIAL_MASTER_BUFFER_LENGTH > 0 + uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; + #endif + uint8_t volatile status0 = 0; + +SSTD_t transactions[] = { + { (uint8_t *)&status0, + #if SERIAL_MASTER_BUFFER_LENGTH > 0 + sizeof(serial_master_buffer), (uint8_t *)serial_master_buffer, + #else + 0, (uint8_t *)NULL, + #endif + #if SERIAL_SLAVE_BUFFER_LENGTH > 0 + sizeof(serial_slave_buffer), (uint8_t *)serial_slave_buffer + #else + 0, (uint8_t *)NULL, + #endif + } +}; + +void serial_master_init(void) +{ soft_serial_initiator_init(transactions, TID_LIMIT(transactions)); } + +void serial_slave_init(void) +{ soft_serial_target_init(transactions, TID_LIMIT(transactions)); } + +// 0 => no error +// 1 => slave did not respond +// 2 => checksum error +int serial_update_buffers() +{ + int result; + result = soft_serial_transaction(); + return result; +} + +#endif // end of OLD API (compatible with let's split serial.c) +//////////////////////////////////////////////////////////////////////////// + +#define ALWAYS_INLINE __attribute__((always_inline)) +#define NO_INLINE __attribute__((noinline)) +#define _delay_sub_us(x) __builtin_avr_delay_cycles(x) + +// parity check +#define ODD_PARITY 1 +#define EVEN_PARITY 0 +#define PARITY EVEN_PARITY + +#ifdef SERIAL_DELAY + // custom setup in config.h + // #define TID_SEND_ADJUST 2 + // #define SERIAL_DELAY 6 // micro sec + // #define READ_WRITE_START_ADJUST 30 // cycles + // #define READ_WRITE_WIDTH_ADJUST 8 // cycles +#else +// ============ Standard setups ============ + +#ifndef SELECT_SOFT_SERIAL_SPEED +#define SELECT_SOFT_SERIAL_SPEED 1 +// 0: about 189kbps +// 1: about 137kbps (default) +// 2: about 75kbps +// 3: about 39kbps +// 4: about 26kbps +// 5: about 20kbps +#endif + +#if __GNUC__ < 6 + #define TID_SEND_ADJUST 14 +#else + #define TID_SEND_ADJUST 2 +#endif + +#if SELECT_SOFT_SERIAL_SPEED == 0 + // Very High speed + #define SERIAL_DELAY 4 // micro sec + #if __GNUC__ < 6 + #define READ_WRITE_START_ADJUST 33 // cycles + #define READ_WRITE_WIDTH_ADJUST 3 // cycles + #else + #define READ_WRITE_START_ADJUST 34 // cycles + #define READ_WRITE_WIDTH_ADJUST 7 // cycles + #endif +#elif SELECT_SOFT_SERIAL_SPEED == 1 + // High speed + #define SERIAL_DELAY 6 // micro sec + #if __GNUC__ < 6 + #define READ_WRITE_START_ADJUST 30 // cycles + #define READ_WRITE_WIDTH_ADJUST 3 // cycles + #else + #define READ_WRITE_START_ADJUST 33 // cycles + #define READ_WRITE_WIDTH_ADJUST 7 // cycles + #endif +#elif SELECT_SOFT_SERIAL_SPEED == 2 + // Middle speed + #define SERIAL_DELAY 12 // micro sec + #define READ_WRITE_START_ADJUST 30 // cycles + #if __GNUC__ < 6 + #define READ_WRITE_WIDTH_ADJUST 3 // cycles + #else + #define READ_WRITE_WIDTH_ADJUST 7 // cycles + #endif +#elif SELECT_SOFT_SERIAL_SPEED == 3 + // Low speed + #define SERIAL_DELAY 24 // micro sec + #define READ_WRITE_START_ADJUST 30 // cycles + #if __GNUC__ < 6 + #define READ_WRITE_WIDTH_ADJUST 3 // cycles + #else + #define READ_WRITE_WIDTH_ADJUST 7 // cycles + #endif +#elif SELECT_SOFT_SERIAL_SPEED == 4 + // Very Low speed + #define SERIAL_DELAY 36 // micro sec + #define READ_WRITE_START_ADJUST 30 // cycles + #if __GNUC__ < 6 + #define READ_WRITE_WIDTH_ADJUST 3 // cycles + #else + #define READ_WRITE_WIDTH_ADJUST 7 // cycles + #endif +#elif SELECT_SOFT_SERIAL_SPEED == 5 + // Ultra Low speed + #define SERIAL_DELAY 48 // micro sec + #define READ_WRITE_START_ADJUST 30 // cycles + #if __GNUC__ < 6 + #define READ_WRITE_WIDTH_ADJUST 3 // cycles + #else + #define READ_WRITE_WIDTH_ADJUST 7 // cycles + #endif +#else +#error invalid SELECT_SOFT_SERIAL_SPEED value +#endif /* SELECT_SOFT_SERIAL_SPEED */ +#endif /* SERIAL_DELAY */ + +#define SERIAL_DELAY_HALF1 (SERIAL_DELAY/2) +#define SERIAL_DELAY_HALF2 (SERIAL_DELAY - SERIAL_DELAY/2) + +#define SLAVE_INT_WIDTH_US 1 +#ifndef SERIAL_USE_MULTI_TRANSACTION + #define SLAVE_INT_RESPONSE_TIME SERIAL_DELAY +#else + #define SLAVE_INT_ACK_WIDTH_UNIT 2 + #define SLAVE_INT_ACK_WIDTH 4 +#endif + +static SSTD_t *Transaction_table = NULL; +static uint8_t Transaction_table_size = 0; + +inline static void serial_delay(void) ALWAYS_INLINE; +inline static +void serial_delay(void) { + _delay_us(SERIAL_DELAY); +} + +inline static void serial_delay_half1(void) ALWAYS_INLINE; +inline static +void serial_delay_half1(void) { + _delay_us(SERIAL_DELAY_HALF1); +} + +inline static void serial_delay_half2(void) ALWAYS_INLINE; +inline static +void serial_delay_half2(void) { + _delay_us(SERIAL_DELAY_HALF2); +} + +inline static void serial_output(void) ALWAYS_INLINE; +inline static +void serial_output(void) { + SERIAL_PIN_DDR |= SERIAL_PIN_MASK; +} + +// make the serial pin an input with pull-up resistor +inline static void serial_input_with_pullup(void) ALWAYS_INLINE; +inline static +void serial_input_with_pullup(void) { + SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK; + SERIAL_PIN_PORT |= SERIAL_PIN_MASK; +} + +inline static uint8_t serial_read_pin(void) ALWAYS_INLINE; +inline static +uint8_t serial_read_pin(void) { + return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK); +} + +inline static void serial_low(void) ALWAYS_INLINE; +inline static +void serial_low(void) { + SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK; +} + +inline static void serial_high(void) ALWAYS_INLINE; +inline static +void serial_high(void) { + SERIAL_PIN_PORT |= SERIAL_PIN_MASK; +} + +void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size) +{ + Transaction_table = sstd_table; + Transaction_table_size = (uint8_t)sstd_table_size; + serial_output(); + serial_high(); +} + +void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size) +{ + Transaction_table = sstd_table; + Transaction_table_size = (uint8_t)sstd_table_size; + serial_input_with_pullup(); + + // Enable INT0-INT3,INT6 + EIMSK |= EIMSK_BIT; +#if SERIAL_PIN_MASK == _BV(PE6) + // Trigger on falling edge of INT6 + EICRB &= EICRx_BIT; +#else + // Trigger on falling edge of INT0-INT3 + EICRA &= EICRx_BIT; +#endif +} + +// Used by the sender to synchronize timing with the reciver. +static void sync_recv(void) NO_INLINE; +static +void sync_recv(void) { + for (uint8_t i = 0; i < SERIAL_DELAY*5 && serial_read_pin(); i++ ) { + } + // This shouldn't hang if the target disconnects because the + // serial line will float to high if the target does disconnect. + while (!serial_read_pin()); +} + +// Used by the reciver to send a synchronization signal to the sender. +static void sync_send(void) NO_INLINE; +static +void sync_send(void) { + serial_low(); + serial_delay(); + serial_high(); +} + +// Reads a byte from the serial line +static uint8_t serial_read_chunk(uint8_t *pterrcount, uint8_t bit) NO_INLINE; +static uint8_t serial_read_chunk(uint8_t *pterrcount, uint8_t bit) { + uint8_t byte, i, p, pb; + + _delay_sub_us(READ_WRITE_START_ADJUST); + for( i = 0, byte = 0, p = PARITY; i < bit; i++ ) { + serial_delay_half1(); // read the middle of pulses + if( serial_read_pin() ) { + byte = (byte << 1) | 1; p ^= 1; + } else { + byte = (byte << 1) | 0; p ^= 0; + } + _delay_sub_us(READ_WRITE_WIDTH_ADJUST); + serial_delay_half2(); + } + /* recive parity bit */ + serial_delay_half1(); // read the middle of pulses + pb = serial_read_pin(); + _delay_sub_us(READ_WRITE_WIDTH_ADJUST); + serial_delay_half2(); + + *pterrcount += (p != pb)? 1 : 0; + + return byte; +} + +// Sends a byte with MSB ordering +void serial_write_chunk(uint8_t data, uint8_t bit) NO_INLINE; +void serial_write_chunk(uint8_t data, uint8_t bit) { + uint8_t b, p; + for( p = PARITY, b = 1<<(bit-1); b ; b >>= 1) { + if(data & b) { + serial_high(); p ^= 1; + } else { + serial_low(); p ^= 0; + } + serial_delay(); + } + /* send parity bit */ + if(p & 1) { serial_high(); } + else { serial_low(); } + serial_delay(); + + serial_low(); // sync_send() / senc_recv() need raise edge +} + +static void serial_send_packet(uint8_t *buffer, uint8_t size) NO_INLINE; +static +void serial_send_packet(uint8_t *buffer, uint8_t size) { + for (uint8_t i = 0; i < size; ++i) { + uint8_t data; + data = buffer[i]; + sync_send(); + serial_write_chunk(data,8); + } +} + +static uint8_t serial_recive_packet(uint8_t *buffer, uint8_t size) NO_INLINE; +static +uint8_t serial_recive_packet(uint8_t *buffer, uint8_t size) { + uint8_t pecount = 0; + for (uint8_t i = 0; i < size; ++i) { + uint8_t data; + sync_recv(); + data = serial_read_chunk(&pecount, 8); + buffer[i] = data; + } + return pecount == 0; +} + +inline static +void change_sender2reciver(void) { + sync_send(); //0 + serial_delay_half1(); //1 + serial_low(); //2 + serial_input_with_pullup(); //2 + serial_delay_half1(); //3 +} + +inline static +void change_reciver2sender(void) { + sync_recv(); //0 + serial_delay(); //1 + serial_low(); //3 + serial_output(); //3 + serial_delay_half1(); //4 +} + +static inline uint8_t nibble_bits_count(uint8_t bits) +{ + bits = (bits & 0x5) + (bits >> 1 & 0x5); + bits = (bits & 0x3) + (bits >> 2 & 0x3); + return bits; +} + +// interrupt handle to be used by the target device +ISR(SERIAL_PIN_INTERRUPT) { + +#ifndef SERIAL_USE_MULTI_TRANSACTION + serial_low(); + serial_output(); + SSTD_t *trans = Transaction_table; +#else + // recive transaction table index + uint8_t tid, bits; + uint8_t pecount = 0; + sync_recv(); + bits = serial_read_chunk(&pecount,7); + tid = bits>>3; + bits = (bits&7) != nibble_bits_count(tid); + if( bits || pecount> 0 || tid > Transaction_table_size ) { + return; + } + serial_delay_half1(); + + serial_high(); // response step1 low->high + serial_output(); + _delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT*SLAVE_INT_ACK_WIDTH); + SSTD_t *trans = &Transaction_table[tid]; + serial_low(); // response step2 ack high->low +#endif + + // target send phase + if( trans->target2initiator_buffer_size > 0 ) + serial_send_packet((uint8_t *)trans->target2initiator_buffer, + trans->target2initiator_buffer_size); + // target switch to input + change_sender2reciver(); + + // target recive phase + if( trans->initiator2target_buffer_size > 0 ) { + if (serial_recive_packet((uint8_t *)trans->initiator2target_buffer, + trans->initiator2target_buffer_size) ) { + *trans->status = TRANSACTION_ACCEPTED; + } else { + *trans->status = TRANSACTION_DATA_ERROR; + } + } else { + *trans->status = TRANSACTION_ACCEPTED; + } + + sync_recv(); //weit initiator output to high +} + +///////// +// start transaction by initiator +// +// int soft_serial_transaction(int sstd_index) +// +// Returns: +// TRANSACTION_END +// TRANSACTION_NO_RESPONSE +// TRANSACTION_DATA_ERROR +// this code is very time dependent, so we need to disable interrupts +#ifndef SERIAL_USE_MULTI_TRANSACTION +int soft_serial_transaction(void) { + SSTD_t *trans = Transaction_table; +#else +int soft_serial_transaction(int sstd_index) { + if( sstd_index > Transaction_table_size ) + return TRANSACTION_TYPE_ERROR; + SSTD_t *trans = &Transaction_table[sstd_index]; +#endif + cli(); + + // signal to the target that we want to start a transaction + serial_output(); + serial_low(); + _delay_us(SLAVE_INT_WIDTH_US); + +#ifndef SERIAL_USE_MULTI_TRANSACTION + // wait for the target response + serial_input_with_pullup(); + _delay_us(SLAVE_INT_RESPONSE_TIME); + + // check if the target is present + if (serial_read_pin()) { + // target failed to pull the line low, assume not present + serial_output(); + serial_high(); + *trans->status = TRANSACTION_NO_RESPONSE; + sei(); + return TRANSACTION_NO_RESPONSE; + } + +#else + // send transaction table index + int tid = (sstd_index<<3) | (7 & nibble_bits_count(sstd_index)); + sync_send(); + _delay_sub_us(TID_SEND_ADJUST); + serial_write_chunk(tid, 7); + serial_delay_half1(); + + // wait for the target response (step1 low->high) + serial_input_with_pullup(); + while( !serial_read_pin() ) { + _delay_sub_us(2); + } + + // check if the target is present (step2 high->low) + for( int i = 0; serial_read_pin(); i++ ) { + if (i > SLAVE_INT_ACK_WIDTH + 1) { + // slave failed to pull the line low, assume not present + serial_output(); + serial_high(); + *trans->status = TRANSACTION_NO_RESPONSE; + sei(); + return TRANSACTION_NO_RESPONSE; + } + _delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT); + } +#endif + + // initiator recive phase + // if the target is present syncronize with it + if( trans->target2initiator_buffer_size > 0 ) { + if (!serial_recive_packet((uint8_t *)trans->target2initiator_buffer, + trans->target2initiator_buffer_size) ) { + serial_output(); + serial_high(); + *trans->status = TRANSACTION_DATA_ERROR; + sei(); + return TRANSACTION_DATA_ERROR; + } + } + + // initiator switch to output + change_reciver2sender(); + + // initiator send phase + if( trans->initiator2target_buffer_size > 0 ) { + serial_send_packet((uint8_t *)trans->initiator2target_buffer, + trans->initiator2target_buffer_size); + } + + // always, release the line when not in use + sync_send(); + + *trans->status = TRANSACTION_END; + sei(); + return TRANSACTION_END; +} + +#ifdef SERIAL_USE_MULTI_TRANSACTION +int soft_serial_get_and_clean_status(int sstd_index) { + SSTD_t *trans = &Transaction_table[sstd_index]; + cli(); + int retval = *trans->status; + *trans->status = 0;; + sei(); + return retval; +} +#endif + +#endif + +// Helix serial.c history +// 2018-1-29 fork from let's split and add PD2, modify sync_recv() (#2308, bceffdefc) +// 2018-6-28 bug fix master to slave comm and speed up (#3255, 1038bbef4) +// (adjusted with avr-gcc 4.9.2) +// 2018-7-13 remove USE_SERIAL_PD2 macro (#3374, f30d6dd78) +// (adjusted with avr-gcc 4.9.2) +// 2018-8-11 add support multi-type transaction (#3608, feb5e4aae) +// (adjusted with avr-gcc 4.9.2) +// 2018-10-21 fix serial and RGB animation conflict (#4191, 4665e4fff) +// (adjusted with avr-gcc 7.3.0) +// 2018-10-28 re-adjust compiler depend value of delay (#4269, 8517f8a66) +// (adjusted with avr-gcc 5.4.0, 7.3.0) diff --git a/keyboards/naked60/serial.h b/keyboards/naked60/serial.h new file mode 100644 index 000000000000..5deaf789e30c --- /dev/null +++ b/keyboards/naked60/serial.h @@ -0,0 +1,86 @@ +#pragma once + +#include + +// ///////////////////////////////////////////////////////////////// +// Need Soft Serial defines in config.h +// ///////////////////////////////////////////////////////////////// +// ex. +// #define SOFT_SERIAL_PIN ?? // ?? = D0,D1,D2,D3,E6 +// OPTIONAL: #define SELECT_SOFT_SERIAL_SPEED ? // ? = 1,2,3,4,5 +// // 1: about 137kbps (default) +// // 2: about 75kbps +// // 3: about 39kbps +// // 4: about 26kbps +// // 5: about 20kbps +// +// //// USE OLD API (compatible with let's split serial.c) +// ex. +// #define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 +// #define SERIAL_MASTER_BUFFER_LENGTH 1 +// +// //// USE NEW API +// //// USE simple API (using signle-type transaction function) +// #define SERIAL_USE_SINGLE_TRANSACTION +// //// USE flexible API (using multi-type transaction function) +// #define SERIAL_USE_MULTI_TRANSACTION +// +// ///////////////////////////////////////////////////////////////// + + +//////////////// for backward compatibility //////////////////////////////// +#if !defined(SERIAL_USE_SINGLE_TRANSACTION) && !defined(SERIAL_USE_MULTI_TRANSACTION) +/* --- USE OLD API (compatible with let's split serial.c) */ + #if SERIAL_SLAVE_BUFFER_LENGTH > 0 + extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; + #endif + #if SERIAL_MASTER_BUFFER_LENGTH > 0 + extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; + #endif + + void serial_master_init(void); + void serial_slave_init(void); + int serial_update_buffers(void); + +#endif // end of USE OLD API +//////////////////////////////////////////////////////////////////////////// + +// Soft Serial Transaction Descriptor +typedef struct _SSTD_t { + uint8_t *status; + uint8_t initiator2target_buffer_size; + uint8_t *initiator2target_buffer; + uint8_t target2initiator_buffer_size; + uint8_t *target2initiator_buffer; +} SSTD_t; +#define TID_LIMIT( table ) (sizeof(table) / sizeof(SSTD_t)) + +// initiator is transaction start side +void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size); +// target is interrupt accept side +void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size); + +// initiator resullt +#define TRANSACTION_END 0 +#define TRANSACTION_NO_RESPONSE 0x1 +#define TRANSACTION_DATA_ERROR 0x2 +#define TRANSACTION_TYPE_ERROR 0x4 +#ifndef SERIAL_USE_MULTI_TRANSACTION +int soft_serial_transaction(void); +#else +int soft_serial_transaction(int sstd_index); +#endif + +// target status +// *SSTD_t.status has +// initiator: +// TRANSACTION_END +// or TRANSACTION_NO_RESPONSE +// or TRANSACTION_DATA_ERROR +// target: +// TRANSACTION_DATA_ERROR +// or TRANSACTION_ACCEPTED +#define TRANSACTION_ACCEPTED 0x8 +#ifdef SERIAL_USE_MULTI_TRANSACTION +int soft_serial_get_and_clean_status(int sstd_index); +#endif From 9b07098dbd63fcd7b69eadfa91b5b01724e80e78 Mon Sep 17 00:00:00 2001 From: nrtkbb Date: Thu, 17 Oct 2019 02:42:06 +0900 Subject: [PATCH 114/316] [Keyboard] Add uzu42 keyboard (#6842) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * initial commit * OLEDに表示するロゴをuzuのものに差し替えた * delete undefault keymaps * delete info.json * delete pro_micro.h * remove USE_Link_Time_Optimization check * Moved constant defined for each keymap.c to rev1.h * update layer_state_reader.c * Rename Uzu42 to uzu42 * remove bootloader.h include * LAYOUT_kc to LAYOUT * delete keymap level rules.mk * update readme.md * remove persistent_default_layer_set function. * try refactor to use split_common and use OLED driver * Revert "try refactor to use split_common and use OLED driver" This reverts commit 5a9afceacb450ca9eca8a146b64c24d0e0925dd8. * Update keyboards/uzu42/rev1/config.h Co-Authored-By: fauxpark * Update keyboards/uzu42/rev1/rev1.h Co-Authored-By: fauxpark * Update keyboards/uzu42/rev1/rev1.h Co-Authored-By: fauxpark * Update keyboards/uzu42/rules.mk Co-Authored-By: fauxpark * Remove lines already defined in QMK * Update keyboards/uzu42/rules.mk Co-Authored-By: fauxpark * Update keyboards/uzu42/rules.mk Co-Authored-By: fauxpark * Update keyboards/uzu42/rules.mk Co-Authored-By: fauxpark * replaced comment block * Update keyboards/uzu42/config.h Co-Authored-By: Drashna Jaelre * Revert "Revert "try refactor to use split_common and use OLED driver"" This reverts commit a7849216f49a411558d4cfdcfbf3e202defe892a. * fix setting for RGBLED * The default of OLED_DRIVER_ENABLE has been changed to no. * Delete unuse block. * Remove unnecessary keycode definitions. * Remove unuse custom keycode. * Remove not needed code. * Remove not called code. * Remove code overwritten by the core. * Remove LAYOUT_kc macro. * Moved the definition of the layer block to keymap.c. * Removed unuse variable. * Remove code overwritten by the core too. * incorporate layer changes * Moved src rule to keymap from rev1. * Removed rgb_state_reader.c from lib folder and the code move to the keymap.c * Removed layer_state_reader.c from lib folder and the code move to the keymap.c * Removed logo_reader.c from lib folder and the code move to the keymap.c * Removed keylogger.c from lib folder and the code move to the keymap.c * Moved glcdfont_uzu42.c from lib folder to the default keymaps folder. * Removed unused files. --- keyboards/uzu42/config.h | 29 ++ keyboards/uzu42/keymaps/default/config.h | 47 +++ .../uzu42/keymaps/default/glcdfont_uzu42.c | 243 +++++++++++++++ keyboards/uzu42/keymaps/default/keymap.c | 292 ++++++++++++++++++ keyboards/uzu42/readme.md | 15 + keyboards/uzu42/rev1/config.h | 77 +++++ keyboards/uzu42/rev1/rev1.c | 2 + keyboards/uzu42/rev1/rev1.h | 36 +++ keyboards/uzu42/rev1/rules.mk | 20 ++ keyboards/uzu42/rev1/serial_config.h | 4 + .../uzu42/rev1/serial_config_simpleapi.h | 5 + keyboards/uzu42/rules.mk | 40 +++ keyboards/uzu42/uzu42.c | 5 + keyboards/uzu42/uzu42.h | 5 + 14 files changed, 820 insertions(+) create mode 100644 keyboards/uzu42/config.h create mode 100644 keyboards/uzu42/keymaps/default/config.h create mode 100644 keyboards/uzu42/keymaps/default/glcdfont_uzu42.c create mode 100644 keyboards/uzu42/keymaps/default/keymap.c create mode 100644 keyboards/uzu42/readme.md create mode 100644 keyboards/uzu42/rev1/config.h create mode 100644 keyboards/uzu42/rev1/rev1.c create mode 100644 keyboards/uzu42/rev1/rev1.h create mode 100644 keyboards/uzu42/rev1/rules.mk create mode 100644 keyboards/uzu42/rev1/serial_config.h create mode 100644 keyboards/uzu42/rev1/serial_config_simpleapi.h create mode 100644 keyboards/uzu42/rules.mk create mode 100644 keyboards/uzu42/uzu42.c create mode 100644 keyboards/uzu42/uzu42.h diff --git a/keyboards/uzu42/config.h b/keyboards/uzu42/config.h new file mode 100644 index 000000000000..45f497d78215 --- /dev/null +++ b/keyboards/uzu42/config.h @@ -0,0 +1,29 @@ +/* +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + +#include "config_common.h" + +#ifndef SOFT_SERIAL_PIN +#define SOFT_SERIAL_PIN D2 +#define SERIAL_USE_MULTI_TRANSACTION +#endif + +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/uzu42/keymaps/default/config.h b/keyboards/uzu42/keymaps/default/config.h new file mode 100644 index 000000000000..bc7897f50108 --- /dev/null +++ b/keyboards/uzu42/keymaps/default/config.h @@ -0,0 +1,47 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + +//#define USE_MATRIX_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#define SSD1306OLED + +#define USE_SERIAL_PD2 + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 200 + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 54 +#define RGBLIGHT_LIMIT_VAL 120 +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + +// Use the lily version to get the uzu42 logo instead of the qmk logo +#define OLED_FONT_H "keymaps/default/glcdfont_uzu42.c" diff --git a/keyboards/uzu42/keymaps/default/glcdfont_uzu42.c b/keyboards/uzu42/keymaps/default/glcdfont_uzu42.c new file mode 100644 index 000000000000..f5524ec73710 --- /dev/null +++ b/keyboards/uzu42/keymaps/default/glcdfont_uzu42.c @@ -0,0 +1,243 @@ +// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. +// See gfxfont.h for newer custom bitmap font info. + +#ifndef FONT5X7_H +#define FONT5X7_H + +#ifdef __AVR__ + #include + #include +#elif defined(ESP8266) + #include +#else + #define PROGMEM +#endif + +// Standard ASCII 5x7 font +const unsigned char font[] PROGMEM = { +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00, +0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00, +0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00, +0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00, +0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00, +0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00, +0x00, 0x18, 0x3C, 0x18, 0x00, 0x00, +0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, +0x00, 0x18, 0x24, 0x18, 0x00, 0x00, +0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00, +0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00, +0x26, 0x29, 0x79, 0x29, 0x26, 0x00, +0x40, 0x7F, 0x05, 0x05, 0x07, 0x00, +0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00, +0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00, +0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00, +0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00, +0x14, 0x22, 0x7F, 0x22, 0x14, 0x00, +0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00, +0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, +0x00, 0x66, 0x89, 0x95, 0x6A, 0x00, +0x60, 0x60, 0x60, 0x60, 0x60, 0x00, +0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00, +0x08, 0x04, 0x7E, 0x04, 0x08, 0x00, +0x10, 0x20, 0x7E, 0x20, 0x10, 0x00, +0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00, +0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00, +0x1E, 0x10, 0x10, 0x10, 0x10, 0x00, +0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00, +0x30, 0x38, 0x3E, 0x38, 0x30, 0x00, +0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, +0x00, 0x07, 0x00, 0x07, 0x00, 0x00, +0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00, +0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00, +0x23, 0x13, 0x08, 0x64, 0x62, 0x00, +0x36, 0x49, 0x56, 0x20, 0x50, 0x00, +0x00, 0x08, 0x07, 0x03, 0x00, 0x00, +0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, +0x00, 0x41, 0x22, 0x1C, 0x00, 0x00, +0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00, +0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, +0x00, 0x80, 0x70, 0x30, 0x00, 0x00, +0x08, 0x08, 0x08, 0x08, 0x08, 0x00, +0x00, 0x00, 0x60, 0x60, 0x00, 0x00, +0x20, 0x10, 0x08, 0x04, 0x02, 0x00, +0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, +0x00, 0x42, 0x7F, 0x40, 0x00, 0x00, +0x72, 0x49, 0x49, 0x49, 0x46, 0x00, +0x21, 0x41, 0x49, 0x4D, 0x33, 0x00, +0x18, 0x14, 0x12, 0x7F, 0x10, 0x00, +0x27, 0x45, 0x45, 0x45, 0x39, 0x00, +0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00, +0x41, 0x21, 0x11, 0x09, 0x07, 0x00, +0x36, 0x49, 0x49, 0x49, 0x36, 0x00, +0x46, 0x49, 0x49, 0x29, 0x1E, 0x00, +0x00, 0x00, 0x14, 0x00, 0x00, 0x00, +0x00, 0x40, 0x34, 0x00, 0x00, 0x00, +0x00, 0x08, 0x14, 0x22, 0x41, 0x00, +0x14, 0x14, 0x14, 0x14, 0x14, 0x00, +0x00, 0x41, 0x22, 0x14, 0x08, 0x00, +0x02, 0x01, 0x59, 0x09, 0x06, 0x00, +0x00, 0x41, 0x5D, 0x59, 0x4E, 0x00, +0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00, +0x7F, 0x49, 0x49, 0x49, 0x36, 0x00, +0x3E, 0x41, 0x41, 0x41, 0x22, 0x00, +0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00, +0x7F, 0x49, 0x49, 0x49, 0x41, 0x00, +0x7F, 0x09, 0x09, 0x09, 0x01, 0x00, +0x3E, 0x41, 0x41, 0x51, 0x73, 0x00, +0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, +0x00, 0x41, 0x7F, 0x41, 0x00, 0x00, +0x20, 0x40, 0x41, 0x3F, 0x01, 0x00, +0x7F, 0x08, 0x14, 0x22, 0x41, 0x00, +0x7F, 0x40, 0x40, 0x40, 0x40, 0x00, +0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00, +0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00, +0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00, +0x7F, 0x09, 0x09, 0x09, 0x06, 0x00, +0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00, +0x7F, 0x09, 0x19, 0x29, 0x46, 0x00, +0x26, 0x49, 0x49, 0x49, 0x32, 0x00, +0x03, 0x01, 0x7F, 0x01, 0x03, 0x00, +0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00, +0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00, +0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00, +0x63, 0x14, 0x08, 0x14, 0x63, 0x00, +0x03, 0x04, 0x78, 0x04, 0x03, 0x00, +0x61, 0x59, 0x49, 0x4D, 0x43, 0x00, +0x00, 0x7F, 0x41, 0x41, 0x41, 0x00, +0x02, 0x04, 0x08, 0x10, 0x20, 0x00, +0x00, 0x41, 0x41, 0x41, 0x7F, 0x00, +0x04, 0x02, 0x01, 0x02, 0x04, 0x00, +0x40, 0x40, 0x40, 0x40, 0x40, 0x00, +0x00, 0x03, 0x07, 0x08, 0x00, 0x00, +0x20, 0x54, 0x54, 0x78, 0x40, 0x00, +0x7F, 0x28, 0x44, 0x44, 0x38, 0x00, +0x38, 0x44, 0x44, 0x44, 0x28, 0x00, +0x38, 0x44, 0x44, 0x28, 0x7F, 0x00, +0x38, 0x54, 0x54, 0x54, 0x18, 0x00, +0x00, 0x08, 0x7E, 0x09, 0x02, 0x00, +0x18, 0x24, 0x24, 0x1C, 0x78, 0x00, +0x7F, 0x08, 0x04, 0x04, 0x78, 0x00, +0x00, 0x44, 0x7D, 0x40, 0x00, 0x00, +0x20, 0x40, 0x40, 0x3D, 0x00, 0x00, +0x7F, 0x10, 0x28, 0x44, 0x00, 0x00, +0x00, 0x41, 0x7F, 0x40, 0x00, 0x00, +0x7C, 0x04, 0x78, 0x04, 0x78, 0x00, +0x7C, 0x08, 0x04, 0x04, 0x78, 0x00, +0x38, 0x44, 0x44, 0x44, 0x38, 0x00, +0x7C, 0x18, 0x24, 0x24, 0x18, 0x00, +0x18, 0x24, 0x24, 0x18, 0x7C, 0x00, +0x7C, 0x08, 0x04, 0x04, 0x08, 0x00, +0x48, 0x54, 0x54, 0x54, 0x24, 0x00, +0x04, 0x04, 0x3F, 0x44, 0x24, 0x00, +0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00, +0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00, +0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00, +0x44, 0x28, 0x10, 0x28, 0x44, 0x00, +0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00, +0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, +0x00, 0x08, 0x36, 0x41, 0x00, 0x00, +0x00, 0x00, 0x77, 0x00, 0x00, 0x00, +0x00, 0x41, 0x36, 0x08, 0x00, 0x00, +0x02, 0x01, 0x02, 0x04, 0x02, 0x00, +0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0xC0, 0xE0, 0x70, +0x38, 0x18, 0x18, 0x0C, 0x0C, 0x0C, +0x0E, 0x06, 0x06, 0x06, 0x06, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x80, 0x80, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0xC0, 0xC0, 0xC0, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0xC0, 0xC0, 0xC0, 0x00, 0x00, +0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, +0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, +0x00, 0x00, 0xC0, 0xC0, 0xC0, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xC0, 0xC0, 0xC0, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xE0, 0xF0, 0xF0, 0xF0, 0xE0, 0xEC, +0xEE, 0xF7, 0xF3, 0x70, 0x20, 0x00, +0x7C, 0x7C, 0x7C, 0x7E, 0x00, 0x7E, +0x7E, 0x7E, 0x7F, 0x7F, 0x7F, 0x00, +0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B, +0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00, +0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE, +0xDE, 0xD7, 0xDC, 0x00, 0xC0, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x03, 0x07, 0x2E, +0x6C, 0xD8, 0xD8, 0xF8, 0xB0, 0xB0, +0xB0, 0xB0, 0xB0, 0xB0, 0xB0, 0xB0, +0xB0, 0xB0, 0xF8, 0xD8, 0xD8, 0x6C, +0x2E, 0x07, 0x03, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, +0x80, 0x00, 0x00, 0x00, 0x00, 0x00, +0x80, 0xFF, 0xFF, 0xFF, 0x00, 0x00, +0x01, 0x01, 0x81, 0xC1, 0xE1, 0x79, +0x3D, 0x0F, 0x07, 0x03, 0x01, 0x00, +0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x80, +0x00, 0x00, 0x00, 0x00, 0x00, 0x80, +0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F, +0x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00, +0x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F, +0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00, +0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20, +0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00, +0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F, +0x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x02, 0x06, 0x17, 0x3D, +0x6D, 0x6D, 0x6D, 0x6D, 0x6D, 0x6D, +0x3D, 0x17, 0x06, 0x02, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x01, 0x03, +0x07, 0x07, 0x07, 0x07, 0x07, 0x07, +0x07, 0x03, 0x01, 0x00, 0x00, 0x00, +0x06, 0x07, 0x07, 0x07, 0x07, 0x07, +0x07, 0x07, 0x07, 0x07, 0x07, 0x07, +0x00, 0x00, 0x00, 0x01, 0x03, 0x07, +0x07, 0x07, 0x07, 0x07, 0x07, 0x07, +0x03, 0x01, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +}; +#endif // FONT5X7_H diff --git a/keyboards/uzu42/keymaps/default/keymap.c b/keyboards/uzu42/keymaps/default/keymap.c new file mode 100644 index 000000000000..bb439971dc55 --- /dev/null +++ b/keyboards/uzu42/keymaps/default/keymap.c @@ -0,0 +1,292 @@ +#include QMK_KEYBOARD_H +#include "uzu42.h" +#ifdef PROTOCOL_LUFA + #include "lufa.h" + #include "split_util.h" +#endif +#ifdef SSD1306OLED + #include "ssd1306.h" +#endif + +extern keymap_config_t keymap_config; + +#ifdef RGBLIGHT_ENABLE +#include +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +// 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. +enum layer_number { + _QWERTY = 0, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ADJUST, + RGBRST +}; + +#define KC_CTES CTL_T(KC_ESC) +#define KC_SFSP SFT_T(KC_SPC) +#define KC_ALBS ALT_T(KC_BSPC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT( \ + //,---------------------------------------. ,---------------------------------------. + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,\ + //|-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------| + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT,\ + //|-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------| + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M,KC_COMM, KC_DOT,KC_SLSH,\ + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + KC_LSFT, KC_SPC,KC_LALT,KC_LGUI, LOWER,KC_CTES, KC_SFSP, RAISE,KC_ALBS,KC_RCTL,KC_LGUI,XXXXXXX \ + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + ), + + [_LOWER] = LAYOUT( \ + //,---------------------------------------. ,---------------------------------------. + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,\ + //|-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------| + KC_TAB,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, KC_LEFT,KC_DOWN, KC_UP,KC_RGHT, KC_ENT,\ + //|-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------| + KC_LCTL, KC_SPC,KC_LSFT,KC_LALT, KC_DEL, KC_BSPC,KC_HOME, KC_END,XXXXXXX,XXXXXXX,\ + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______ \ + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + ), + + [_RAISE] = LAYOUT( \ + //,---------------------------------------. ,---------------------------------------. + KC_EXLM, KC_AT,KC_HASH, KC_DLR,KC_PERC, KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,\ + //|-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------| + KC_TAB,KC_UNDS,KC_PLUS,KC_PIPE,KC_TILD, KC_COLN,KC_DQUO, KC_GT,KC_LCBR,KC_RCBR,\ + //|-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------| + KC_LCTL,KC_MINS, KC_EQL,KC_BSLS, KC_GRV, KC_SCLN,KC_QUOT, KC_LT,KC_LBRC,KC_RBRC,\ + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______ \ + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + ), + + [_ADJUST] = LAYOUT( \ + //,---------------------------------------. ,---------------------------------------. + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10,\ + //|-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------| + KC_F11, KC_F12, RESET,KC_PSCR, KC_INS, RGB_TOG,RGB_HUI,RGB_SAI,RGB_VAI,XXXXXXX,\ + //|-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------| + XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, RGB_MOD,RGB_HUD,RGB_SAD,RGB_VAD,RGBRST,\ + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______ \ + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + ) +}; + +int RGB_current_mode; + +// Setting ADJUST layer RGB back to default +void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { + if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) { + layer_on(layer3); + } else { + layer_off(layer3); + } +} + +void matrix_init_user(void) { + #ifdef RGBLIGHT_ENABLE + RGB_current_mode = rgblight_config.mode; + #endif +} + +//SSD1306 OLED update loop, make sure to enable OLED_DRIVER_ENABLE=yes in rules.mk +#ifdef OLED_DRIVER_ENABLE + +#define L_BASE 0 +#define L_LOWER (1 << 1) +#define L_RAISE (1 << 2) +#define L_ADJUST (1 << 3) +#define L_ADJUST_TRI (L_ADJUST | L_RAISE | L_LOWER) + +char layer_state_str[24]; + +const char *read_layer_state(void) { + switch (layer_state) + { + case L_BASE: + snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Default"); + break; + case L_RAISE: + snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Raise"); + break; + case L_LOWER: + snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Lower"); + break; + case L_ADJUST: + case L_ADJUST_TRI: + snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Adjust"); + break; + default: + snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Undef-%ld", layer_state); + } + + return layer_state_str; +} + +const char *read_logo(void) { + static char logo[] = { + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, + 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, + 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, + 0}; + return logo; +} + +char keylog_str[24] = {}; +char keylogs_str[21] = {}; +int keylogs_str_idx = 0; + +const char code_to_name[60] = { + ' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', + 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', + 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', + '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', + 'R', 'E', 'B', 'T', ' ', ' ', ' ', ' ', ' ', ' ', + ' ', ';', '\'', ' ', ',', '.', '/', ' ', ' ', ' '}; + +void set_keylog(uint16_t keycode, keyrecord_t *record) { + char name = ' '; + if (keycode < 60) { + name = code_to_name[keycode]; + } + + // update keylog + snprintf(keylog_str, sizeof(keylog_str), "%dx%d, k%2d : %c", + record->event.key.row, record->event.key.col, + keycode, name); + + // update keylogs + if (keylogs_str_idx == sizeof(keylogs_str) - 1) { + keylogs_str_idx = 0; + for (int i = 0; i < sizeof(keylogs_str) - 1; i++) { + keylogs_str[i] = ' '; + } + } + + keylogs_str[keylogs_str_idx] = name; + keylogs_str_idx++; +} + +const char *read_keylog(void) { + return keylog_str; +} + +const char *read_keylogs(void) { + return keylogs_str; +} + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + if (!is_keyboard_master()) + return OLED_ROTATION_180; // flips the display 180 degrees if offhand + return rotation; +} + +void oled_task_user(void) { + if (is_keyboard_master()) { + // If you want to change the display of OLED, you need to change here + oled_write_ln(read_layer_state(), false); + oled_write_ln(read_keylog(), false); + oled_write_ln(read_keylogs(), false); + //oled_write_ln(read_mode_icon(keymap_config.swap_lalt_lgui), false); + //oled_write_ln(read_host_led_state(), false); + //oled_write_ln(read_timelog(), false); + } else { + oled_write(read_logo(), false); + } +} +#endif // OLED_DRIVER_ENABLE + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { +#ifdef OLED_DRIVER_ENABLE + set_keylog(keycode, record); +#endif + // set_timelog(); + } + + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + case RGB_MOD: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + #endif + return false; + break; + case RGBRST: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + #endif + break; + } + return true; +} + +#ifdef RGBLIGHT_ENABLE + +char rbf_info_str[24]; +const char *read_rgb_info(void) { + + snprintf(rbf_info_str, sizeof(rbf_info_str), "%s %2d h%3d s%3d v%3d", + rgblight_config.enable ? "on" : "- ", rgblight_config.mode, + rgblight_config.hue, rgblight_config.sat, rgblight_config.val); + return rbf_info_str; +} +#endif diff --git a/keyboards/uzu42/readme.md b/keyboards/uzu42/readme.md new file mode 100644 index 000000000000..9e287931b9bb --- /dev/null +++ b/keyboards/uzu42/readme.md @@ -0,0 +1,15 @@ +# uzu42 + +[![uzu42](https://i.imgur.com/CQTfebZ.jpg)](https://imgur.com/gallery/aKOKBgq) + +A split keyboard with 4x5 vertically staggered keys and 1 thumb keys. + +Keyboard Maintainer: [nrtkbb](/~https://github.com/nrtkbb/) [@nrtkbb](https://twitter.com/nrtkbb) +Hardware Supported: uzu42 PCB, Pro Micro +Hardware Availability: https://nrtkbb.booth.pm/ + +Make example for this keyboard (after setting up your build environment): + + make uzu42:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/uzu42/rev1/config.h b/keyboards/uzu42/rev1/config.h new file mode 100644 index 000000000000..8f86d22bf15d --- /dev/null +++ b/keyboards/uzu42/rev1/config.h @@ -0,0 +1,77 @@ +/* +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x3060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER nrtkbb +#define PRODUCT uzu42 +#define DESCRIPTION A split keyboard with 4x5 vertically staggered keys and 1 thumb keys + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 8 +#define MATRIX_COLS 6 +#define MATRIX_ROW_PINS { D4, C6, D7, E6 } + +// wiring of each half +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 } +// #define MATRIX_COL_PINS { B2, B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +// #define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 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 + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 + +#ifdef RGBLIGHT_ENABLE +# define RGBLED_NUM 54 // Number of LEDs +# define RGBLED_SPLIT { 27, 27 } +#endif + +/* + * 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 diff --git a/keyboards/uzu42/rev1/rev1.c b/keyboards/uzu42/rev1/rev1.c new file mode 100644 index 000000000000..0bfac6bd9351 --- /dev/null +++ b/keyboards/uzu42/rev1/rev1.c @@ -0,0 +1,2 @@ +#include "uzu42.h" + diff --git a/keyboards/uzu42/rev1/rev1.h b/keyboards/uzu42/rev1/rev1.h new file mode 100644 index 000000000000..7b9c7d59911e --- /dev/null +++ b/keyboards/uzu42/rev1/rev1.h @@ -0,0 +1,36 @@ +#pragma once + +#include "../uzu42.h" + +#include "quantum.h" + +#ifdef RGBLIGHT_ENABLE +//rgb led driver +#include "ws2812.h" +#endif + +#ifdef USE_I2C +#include +#ifdef __AVR__ + #include + #include +#endif +#endif + +#define LAYOUT( \ + L00, L01, L02, L03, L04, R00, R01, R02, R03, R04, \ + L10, L11, L12, L13, L14, R10, R11, R12, R13, R14, \ + L20, L21, L22, L23, L24, R20, R21, R22, R23, R24, \ + L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \ + ) \ + { \ + { L00, L01, L02, L03, L04 }, \ + { L10, L11, L12, L13, L14 }, \ + { L20, L21, L22, L23, L24 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { R04, R03, R02, R01, R00 }, \ + { R14, R13, R12, R11, R10 }, \ + { R24, R23, R22, R21, R20 }, \ + { R35, R34, R33, R32, R31, R30 } \ + } + diff --git a/keyboards/uzu42/rev1/rules.mk b/keyboards/uzu42/rev1/rules.mk new file mode 100644 index 000000000000..9d0da7e0f86d --- /dev/null +++ b/keyboards/uzu42/rev1/rules.mk @@ -0,0 +1,20 @@ +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +SWAP_HANDS_ENABLE = no # Enable one-hand typing + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/uzu42/rev1/serial_config.h b/keyboards/uzu42/rev1/serial_config.h new file mode 100644 index 000000000000..4fab8e8ddfcf --- /dev/null +++ b/keyboards/uzu42/rev1/serial_config.h @@ -0,0 +1,4 @@ +#ifndef SOFT_SERIAL_PIN +#define SOFT_SERIAL_PIN D2 +#define SERIAL_USE_MULTI_TRANSACTION +#endif diff --git a/keyboards/uzu42/rev1/serial_config_simpleapi.h b/keyboards/uzu42/rev1/serial_config_simpleapi.h new file mode 100644 index 000000000000..0e1dd9e4acb2 --- /dev/null +++ b/keyboards/uzu42/rev1/serial_config_simpleapi.h @@ -0,0 +1,5 @@ +#pragma once + +#undef SERIAL_USE_MULTI_TRANSACTION +#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 +#define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2 diff --git a/keyboards/uzu42/rules.mk b/keyboards/uzu42/rules.mk new file mode 100644 index 000000000000..ff69431d439a --- /dev/null +++ b/keyboards/uzu42/rules.mk @@ -0,0 +1,40 @@ +# if firmware size over limit, try this option +# CFLAGS += -flto + +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Use split_common libraries +SPLIT_KEYBOARD = yes + +DEFAULT_FOLDER = uzu42/rev1 + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +OLED_DRIVER_ENABLE = no # OLED display diff --git a/keyboards/uzu42/uzu42.c b/keyboards/uzu42/uzu42.c new file mode 100644 index 000000000000..0eb8c5f3aa35 --- /dev/null +++ b/keyboards/uzu42/uzu42.c @@ -0,0 +1,5 @@ +#include "uzu42.h" + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + return process_record_user(keycode, record); +} diff --git a/keyboards/uzu42/uzu42.h b/keyboards/uzu42/uzu42.h new file mode 100644 index 000000000000..dd944e37506f --- /dev/null +++ b/keyboards/uzu42/uzu42.h @@ -0,0 +1,5 @@ +#pragma once + +#ifdef KEYBOARD_uzu42_rev1 + #include "rev1.h" +#endif From 162dd3fe19a9c3bf15d63013bf51a49877de0bc9 Mon Sep 17 00:00:00 2001 From: hvp <32483282+hvpkod@users.noreply.github.com> Date: Wed, 16 Oct 2019 19:44:43 +0200 Subject: [PATCH 115/316] [Keymap] Corne keyap with tap dance Swedish support (#6857) * Adding profile for Corne with tap dance Swedish support. * Remove extern keymap_config_t keymap_config as no longer needed * Changed to use tap_code over register_code * Removed persistent_default_layer_set * Moved macros to hvp user space ink tap dance code * Removed not used functions * Moved to an ifbased include statement * Removed not needed characters --- keyboards/crkbd/keymaps/hvp/config.h | 50 +++++++ keyboards/crkbd/keymaps/hvp/keymap.c | 183 ++++++++++++++++++++++++++ keyboards/crkbd/keymaps/hvp/readme.md | 5 + keyboards/crkbd/keymaps/hvp/rules.mk | 14 ++ users/hvp/hvp.c | 2 + users/hvp/hvp.h | 6 + users/hvp/readme.md | 1 + users/hvp/rules.mk | 4 + users/hvp/tap_dances.c | 75 +++++++++++ users/hvp/tap_dances.h | 10 ++ 10 files changed, 350 insertions(+) create mode 100644 keyboards/crkbd/keymaps/hvp/config.h create mode 100644 keyboards/crkbd/keymaps/hvp/keymap.c create mode 100644 keyboards/crkbd/keymaps/hvp/readme.md create mode 100644 keyboards/crkbd/keymaps/hvp/rules.mk create mode 100644 users/hvp/hvp.c create mode 100644 users/hvp/hvp.h create mode 100644 users/hvp/readme.md create mode 100644 users/hvp/rules.mk create mode 100644 users/hvp/tap_dances.c create mode 100644 users/hvp/tap_dances.h diff --git a/keyboards/crkbd/keymaps/hvp/config.h b/keyboards/crkbd/keymaps/hvp/config.h new file mode 100644 index 000000000000..c5c6d1cba88e --- /dev/null +++ b/keyboards/crkbd/keymaps/hvp/config.h @@ -0,0 +1,50 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + +//#define USE_MATRIX_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#define SSD1306OLED + +#define USE_SERIAL_PD2 + +//#define TAPPING_FORCE_HOLD +//#define TAPPING_TERM 100 + +#define TAPPING_TERM 150 +#define PERMISSIVE_HOLD +#define IGNORE_MOD_TAP_INTERRUPT + +#ifdef RGBLIGHT_ENABLE +# undef RGBLED_NUM +# define RGBLIGHT_ANIMATIONS +# define RGBLED_NUM 27 +# define RGBLIGHT_LIMIT_VAL 120 +# define RGBLIGHT_HUE_STEP 10 +# define RGBLIGHT_SAT_STEP 17 +# define RGBLIGHT_VAL_STEP 17 +#endif diff --git a/keyboards/crkbd/keymaps/hvp/keymap.c b/keyboards/crkbd/keymaps/hvp/keymap.c new file mode 100644 index 000000000000..b66c360e188a --- /dev/null +++ b/keyboards/crkbd/keymaps/hvp/keymap.c @@ -0,0 +1,183 @@ +#include QMK_KEYBOARD_H +#include "hvp.c" + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +extern uint8_t is_master; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _QWERTY 0 +#define _LOWER 1 +#define _RAISE 2 +#define _ADJUST 3 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ADJUST +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT( \ + //,-----------------------------------------. ,-----------------------------------------. + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,KC_BSPC,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + LT(_ADJUST, KC_ESC), KC_A, KC_S, KC_D, LT(_RAISE,KC_F), MT(MOD_LCTL,KC_G), KC_H, KC_J, KC_K, KC_L,TD(TD1),TD(TD2),\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M,KC_COMM,KC_DOT,TD(TD3),KC_SFTENT,\ + //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + KC_LGUI, LOWER,MT(MOD_LSFT, KC_SPC), LT(_RAISE,KC_ENT), RAISE,KC_LALT \ + //`--------------------' `--------------------' + ), + + [_RAISE] = LAYOUT( \ + //,-----------------------------------------. ,-----------------------------------------. + KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,KC_BSPC,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + KC_ESC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT,KC_DOWN,KC_UP, KC_RIGHT,KC_NO, KC_DEL,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + KC_LCTL, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_NO, KC_NO,\ + //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + KC_LGUI, LOWER,MT(MOD_LSFT, KC_SPC), LT(_RAISE,KC_ENT), RAISE,KC_LALT \ + //`--------------------' `--------------------' + ), + + [_LOWER] = LAYOUT( \ + //,-----------------------------------------. ,-----------------------------------------. + KC_TAB,KC_EXLM,KC_AT,KC_HASH,KC_DLR,KC_PERC, KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,KC_BSPC,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + KC_ESC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MINS,KC_EQL,KC_LCBR,KC_RCBR,KC_PIPE,KC_GRV,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + KC_LCTL, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_UNDS,KC_PLUS,KC_LBRC,KC_RBRC,KC_BSLS,KC_TILD,\ + //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + KC_LGUI, LOWER,MT(MOD_LSFT, KC_SPC), LT(_RAISE,KC_ENT), RAISE,KC_LALT \ + //`--------------------' `--------------------' + ), + + [_ADJUST] = LAYOUT( \ + //,-----------------------------------------. ,-----------------------------------------. + 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_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + RESET,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, KC_MPLY, KC_MNXT, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,\ + //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + KC_LGUI, LOWER,MT(MOD_LSFT, KC_SPC), LT(_RAISE,KC_ENT), RAISE,KC_LALT \ + //`--------------------' `--------------------' + ) +}; + +int RGB_current_mode; + +// Setting ADJUST layer RGB back to default +void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { + if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) { + layer_on(layer3); + } else { + layer_off(layer3); + } +} + +void matrix_init_user(void) { + #ifdef RGBLIGHT_ENABLE + RGB_current_mode = rgblight_config.mode; + #endif + //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h + #ifdef SSD1306OLED + iota_gfx_init(!has_usb()); // turns on the display + #endif +} + +//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h +#ifdef SSD1306OLED + +// When add source files to SRC in rules.mk, you can use functions. +const char *read_layer_state(void); +const char *read_logo(void); +void set_keylog(uint16_t keycode, keyrecord_t *record); +const char *read_keylog(void); +const char *read_keylogs(void); + +// const char *read_mode_icon(bool swap); +// const char *read_host_led_state(void); +// void set_timelog(void); +// const char *read_timelog(void); + +void matrix_scan_user(void) { + iota_gfx_task(); +} + +void matrix_render_user(struct CharacterMatrix *matrix) { + if (is_master) { + // If you want to change the display of OLED, you need to change here + matrix_write_ln(matrix, read_layer_state()); + matrix_write_ln(matrix, read_keylog()); + //matrix_write_ln(matrix, read_keylogs()); + //matrix_write_ln(matrix, read_mode_icon(keymap_config.swap_lalt_lgui)); + //matrix_write_ln(matrix, read_host_led_state()); + //matrix_write_ln(matrix, read_timelog()); + } else { + matrix_write(matrix, read_logo()); + } +} + +void matrix_update(struct CharacterMatrix *dest, const struct CharacterMatrix *source) { + if (memcmp(dest->display, source->display, sizeof(dest->display))) { + memcpy(dest->display, source->display, sizeof(dest->display)); + dest->dirty = true; + } +} + +void iota_gfx_task_user(void) { + struct CharacterMatrix matrix; + matrix_clear(&matrix); + matrix_render_user(&matrix); + matrix_update(&display, &matrix); +} +#endif//SSD1306OLED + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { +#ifdef SSD1306OLED + set_keylog(keycode, record); +#endif + // set_timelog(); + } + + switch (keycode) { + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } + return false; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } + return false; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + } + return true; +} \ No newline at end of file diff --git a/keyboards/crkbd/keymaps/hvp/readme.md b/keyboards/crkbd/keymaps/hvp/readme.md new file mode 100644 index 000000000000..33bb83b83f9d --- /dev/null +++ b/keyboards/crkbd/keymaps/hvp/readme.md @@ -0,0 +1,5 @@ +Keymap to be used with Eurkey for easy access to swedish characters on first layer. + +Links: + +- https://eurkey.steffen.bruentjen.eu/ \ No newline at end of file diff --git a/keyboards/crkbd/keymaps/hvp/rules.mk b/keyboards/crkbd/keymaps/hvp/rules.mk new file mode 100644 index 000000000000..a651e528cf4b --- /dev/null +++ b/keyboards/crkbd/keymaps/hvp/rules.mk @@ -0,0 +1,14 @@ + +# If you want to change the display of OLED, you need to change here +SRC += ./lib/glcdfont.c \ + ./lib/rgb_state_reader.c \ + ./lib/layer_state_reader.c \ + ./lib/logo_reader.c \ + ./lib/keylogger.c \ + # ./lib/mode_icon_reader.c \ + # ./lib/host_led_state_reader.c \ + # ./lib/timelogger.c \ + +TAP_DANCE_ENABLE = yes +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +# LOCAL_GLCDFONT = yes \ No newline at end of file diff --git a/users/hvp/hvp.c b/users/hvp/hvp.c new file mode 100644 index 000000000000..7e484535c871 --- /dev/null +++ b/users/hvp/hvp.c @@ -0,0 +1,2 @@ + +#include "hvp.h" diff --git a/users/hvp/hvp.h b/users/hvp/hvp.h new file mode 100644 index 000000000000..2b2210f873f4 --- /dev/null +++ b/users/hvp/hvp.h @@ -0,0 +1,6 @@ +#pragma once + +#ifdef TAP_DANCE_ENABLE +# include "tap_dances.h" +#endif +#include "quantum.h" diff --git a/users/hvp/readme.md b/users/hvp/readme.md new file mode 100644 index 000000000000..2d8f9d859771 --- /dev/null +++ b/users/hvp/readme.md @@ -0,0 +1 @@ +Personal user space for hvpcode / cablegore at discord diff --git a/users/hvp/rules.mk b/users/hvp/rules.mk new file mode 100644 index 000000000000..0a7e679631d8 --- /dev/null +++ b/users/hvp/rules.mk @@ -0,0 +1,4 @@ +SRC += hvp.c +ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) + SRC += tap_dances.c +endif \ No newline at end of file diff --git a/users/hvp/tap_dances.c b/users/hvp/tap_dances.c new file mode 100644 index 000000000000..bb102b30abf8 --- /dev/null +++ b/users/hvp/tap_dances.c @@ -0,0 +1,75 @@ +#include "tap_dances.h" + +// Tap dance function for enable swedish characters on first layer. Unregister to not let tap bleed over to next keypress. +// Tap dance 1 +void dance_1_finished(qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 2) { + tap_code(KC_SCLN); + } else { + register_code(KC_RALT); + register_code(KC_O); + unregister_code(KC_RALT); + unregister_code(KC_O); + } +} + +void dance_1_reset(qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 2) { + unregister_code(KC_SCLN); + } else { + unregister_code(KC_RALT); + unregister_code(KC_O); + } +} + +// Tap dance 2 +void dance_2_finished(qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 2) { + tap_code(KC_QUOT); + } else { + register_code(KC_RALT); + register_code(KC_A); + unregister_code(KC_RALT); + unregister_code(KC_A); + } +} + +void dance_2_reset(qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 2) { + unregister_code(KC_QUOT); + } else { + unregister_code(KC_RALT); + unregister_code(KC_A); + } +} + +// Tap dance 3 +void dance_3_finished(qk_tap_dance_state_t *state, void *user_data) { + // if (state->count == 2) + if (state->count == 2) { + tap_code(KC_SLSH); + } else { + register_code(KC_RALT); + register_code(KC_W); + unregister_code(KC_RALT); + unregister_code(KC_W); + } +} + +void dance_3_reset(qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 2) { + unregister_code(KC_SLSH); + } else { + unregister_code(KC_RALT); + unregister_code(KC_W); + } +} + +// Tap Dance Definitions +qk_tap_dance_action_t tap_dance_actions[] = { + // simple tap dance + [TD1] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_1_finished, dance_1_reset), + + [TD2] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_2_finished, dance_2_reset), + + [TD3] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_3_finished, dance_3_reset)}; \ No newline at end of file diff --git a/users/hvp/tap_dances.h b/users/hvp/tap_dances.h new file mode 100644 index 000000000000..705985faac52 --- /dev/null +++ b/users/hvp/tap_dances.h @@ -0,0 +1,10 @@ +#pragma once +#include "hvp.h" + +// Tap Dance Declarations +enum tapdance_id +{ + TD1 = 0, + TD2, + TD3 +}; From 7677e8adde5a47a112a3b84fbd526133106b2d88 Mon Sep 17 00:00:00 2001 From: Endemoniada Date: Wed, 16 Oct 2019 19:48:00 +0200 Subject: [PATCH 116/316] [Keymap] Add Endemoniada keymaps (#6875) * Add dz60 keymap * Add my TADA68 layout * Fix descriptions and formatting * Formatting fixes * Add readme file * Formatting * move caps lock to correct key, add F-keys to both layers * Add readme for dz60 * First draft of custom Let's Split layout * Some more keys * Finalized keymap * Added a bunch of custom shortcuts to make layout easier to read * Add PERMISSIVE_HOLD option to modtap behavior * Add lock and sleep shortcuts, formatting * Minor fixes and adjustments * Add PERMISSIVE_HOLD option, add sleep/lock shortcuts, minor fixes * Add sleep/lock shortcuts, minor fixes * fixups * Major simplification of lets_split layout into more standard raise/lower/special layers * Remove layer songs, add to readme * Formatting * Switch a few keys around for reachability * Add windows/mac specific layers * simplify layers * Update README * Fix legends * Invert numpad and put Del in upper right corner * Disable arrow keys on Raise, add build instructions * Move dz60 keymap to its own branch * Remove redundant configuration * Change volume and sleep keycodes to standard * Removing empty rules.mk * Changing layer defines to enum * Adding comment to explain reason for swapping KC_TRNS and KC_NO fillers --- .../lets_split/keymaps/mekberg/README.md | 65 +++++ keyboards/lets_split/keymaps/mekberg/config.h | 34 +++ keyboards/lets_split/keymaps/mekberg/keymap.c | 228 ++++++++++++++++++ keyboards/tada68/keymaps/mekberg/config.h | 5 + keyboards/tada68/keymaps/mekberg/keymap.c | 100 ++++++++ keyboards/tada68/keymaps/mekberg/readme.md | 58 +++++ keyboards/tada68/keymaps/mekberg/rules.mk | 5 + 7 files changed, 495 insertions(+) create mode 100644 keyboards/lets_split/keymaps/mekberg/README.md create mode 100644 keyboards/lets_split/keymaps/mekberg/config.h create mode 100644 keyboards/lets_split/keymaps/mekberg/keymap.c create mode 100644 keyboards/tada68/keymaps/mekberg/config.h create mode 100755 keyboards/tada68/keymaps/mekberg/keymap.c create mode 100644 keyboards/tada68/keymaps/mekberg/readme.md create mode 100644 keyboards/tada68/keymaps/mekberg/rules.mk diff --git a/keyboards/lets_split/keymaps/mekberg/README.md b/keyboards/lets_split/keymaps/mekberg/README.md new file mode 100644 index 000000000000..5202ec83667d --- /dev/null +++ b/keyboards/lets_split/keymaps/mekberg/README.md @@ -0,0 +1,65 @@ +# Let's Mekberg! + +This is my take on a Swedish 40% layout in a split format. The priority is to have the most highly used keys opposite the modifier to make chording simpler. In other words, if the layer modifier is on the left half, the most used keys should be bound on the right half. + +## Layers + +### Default + +The default layer has normal alpha layout with the addition of Swedish letters, causing Enter to move down one key and backspace to take the place of the right space. The enter key also doubles as Shift when held. + +2nd row left modifier has been bound to both Ctrl and Tab with modtap (hold for Ctrl, tap for Tab). + +Delete is available on all non-default layers, positioned on the upper right corner key. + +### Raise + +The raised layer has all the symbols and special characters predefined. As much as possible, there should be no need to use additional modifiers. + +Arrow keys have been disabled on this layer to avoid accidental misclicks when pressing the Raise key. + +#### macOS / Windows variants + +Because macOS and Windows expect quite different keycodes to produce the same special characters (for example '{' or '|'), there are two different layers, one for each OS. To toggle either macOS (default) and Windows layouts within the RAISE layer, press SPECIAL + W for Windows or SPECIAL + M for macOS. + +### Lower + +The lower layer focuses on numbers, with a numpad-like layout on the right and F-keys in a homerow-centric layout on the left. + +### Special + +The special layer has Reset and EEP Reset keys on the left half, along with media and volume controls. On the right half it has movement keys starting in the IJKL cluster. Additionally, custom macOS Sleep and Lock Screen keys can be found on the right half on this layer. + +## Configuration + +### PERMISSIVE_HOLD + +This option is used because otherwise modtap functions would fail to trigger. This increases reliability for me. + +### USE_SERIAL + +N/A + +### EE_HANDS + +Prepared for EEPROM settings and different keymaps depending on USB port connected, but default master side remains left regardless. + +## Building + +Clean the build environment: + +```shell +make clean +``` + +Build and flash left side: + +```shell +make lets_split/rev2:mekberg:avrdude-split-left +``` + +Then do the same for the right side: + +```shell +make lets_split/rev2:mekberg:avrdude-split-right +``` diff --git a/keyboards/lets_split/keymaps/mekberg/config.h b/keyboards/lets_split/keymaps/mekberg/config.h new file mode 100644 index 000000000000..5523ecb5a3c4 --- /dev/null +++ b/keyboards/lets_split/keymaps/mekberg/config.h @@ -0,0 +1,34 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + +// Define some configuration for modtap behavior +// #define TAPPING_TERM 150 +#define PERMISSIVE_HOLD + +/* Use I2C or Serial, not both */ +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ +//#define MASTER_LEFT +// #define MASTER_RIGHT +#define EE_HANDS diff --git a/keyboards/lets_split/keymaps/mekberg/keymap.c b/keyboards/lets_split/keymaps/mekberg/keymap.c new file mode 100644 index 000000000000..e530623f1dd4 --- /dev/null +++ b/keyboards/lets_split/keymaps/mekberg/keymap.c @@ -0,0 +1,228 @@ +#include QMK_KEYBOARD_H + +/* +Let's Split physical layout +1u == 8chars +* == Homing keys + LEFT RIGHT + ,-----------------------------------------------------. ,-----------------------------------------------------. + | | | | | | | | | | | | | | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + | | | | | * | | | | * | | | | | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + | | | | | | | | | | | | | | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + | | | | | | | | | | | | | | + `-----------------------------------------------------´ `-----------------------------------------------------' +*/ + +// Layers +enum layer_names { + _DEFAULT, + _DEFAULT_MAC, + _DEFAULT_WIN, + _RAISE_MAC, + _RAISE_WIN, + _LOWER, + _SPECIAL, +}; + +#define TO_MAC TO(_DEFAULT) +#define TO_WIN TO(_DEFAULT_WIN) + +#define RAISE_M MO(_RAISE_MAC) +#define RAISE_W MO(_RAISE_WIN) +#define LOWER MO(_LOWER) +#define SPECIAL MO(_SPECIAL) + +// Modifiers +#define SFTENT KC_SFTENT // Enter => Shift when held +#define CTLTAB LCTL_T(KC_TAB) // Tab => Ctrl when held + +// ISO keycodes with Swedish layout names +#define SE_PLUS KC_MINS // + +#define SE_QSTM S(SE_PLUS) // Question mark +#define SE_TCK KC_EQL // Fronttick (´) +#define SE_BTCK S(SE_TCK) // Backtick (`) +#define SE_UML KC_RBRC // Umlaut (¨) +#define SE_TAK S(SE_UML) // Caret (^) +#define SE_TILD RALT(SE_UML) // Tilde (~) +#define SE_QUT KC_NUHS // Singlequote (') +#define SE_DQUT S(KC_2) // Doublequote (") +#define SE_AST S(SE_QUT) // Asterisk +#define SE_AUML KC_QUOT // Ä +#define SE_ARNG KC_LBRC // Å +#define SE_OUML KC_SCLN // Ö +#define SE_LT KC_NUBS // < +#define SE_GT S(SE_LT) // > +#define SE_DASH KC_SLSH // - +#define SE_USCR S(SE_DASH) // _ +#define SE_AT RALT(KC_2) // @ +#define SE_EXCL S(KC_1) // ! +#define SE_HASH S(KC_3) // # +#define SE_USD RALT(KC_4) // $ +#define SE_PCNT S(KC_5) // % +#define SE_AMP S(KC_6) // & +#define SE_EQLS S(KC_0) // = + +// Apple-specific layout keys +#define AP_SLS S(KC_7) // / +#define AP_PIPE LALT(KC_7) // | +#define AP_BSLS A(AP_SLS) // Backslash +#define AP_LCBR A(AP_LPAR) // { +#define AP_RCBR A(AP_RPAR) // } +#define AP_LBR A(KC_8) // [ +#define AP_RBR A(KC_9) // ] +#define AP_LPAR S(KC_8) // ( +#define AP_RPAR S(KC_9) // ) + +// Windows-specific layout keys +#define MS_SLS S(KC_7) // / +#define MS_PIPE RALT(SE_LT) // | +#define MS_BSLS RALT(SE_PLUS) // Backslash +#define MS_LCBR RALT(KC_7) // { +#define MS_RCBR RALT(KC_0) // } +#define MS_LBR RALT(KC_8) // [ +#define MS_RBR RALT(KC_9) // ] +#define MS_LPAR S(KC_8) // ( +#define MS_RPAR S(KC_9) // ) + +// My common shortcuts +#define MY_PREV KC_MRWD // Media: Previous +#define MY_NEXT KC_MFFD // Media: Next +#define MY_PLAY KC_MPLY // Media: Play/Pause +#define MY_LOCK C(A(KC_L)) // Mac: Lock + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* +DEFAULT + Main layout for alphas and modifiers + Tab => Ctrl when held + Esc => MOVEMENT layer when held + Enter => Shift when held + LEFT RIGHT + ,-----------------------------------------------------. ,-----------------------------------------------------. + | Esc | Q | W | E | R | T | | Y | U | I | O | P | Å | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + |Ctrl/Tab| A | S | D | F *| G | | H |* J | K | L | Ö | Ä | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + | Shift | Z | X | C | V | B | | N | M | , | . | - | Enter | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + | SPECIAL| Ctrl | Alt | Cmd | LOWER | Space | | Backspc| RAISE | Left | Down | Up | Right | + `-----------------------------------------------------´ `-----------------------------------------------------' +*/ +[_DEFAULT] = LAYOUT_ortho_4x12( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, SE_ARNG, + CTLTAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, SE_OUML, SE_AUML, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, SE_DASH, SFTENT, + SPECIAL, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_BSPC, RAISE_M, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* +DEFAULT - Windows + LEFT RIGHT + ,-----------------------------------------------------. ,-----------------------------------------------------. + | | | | | | | | | | | | | | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + | | | | | * | | | | * | | | | | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + | | | | | | | | | | | | | | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + | | | | | | | | | RAISE | | | | | + `-----------------------------------------------------´ `-----------------------------------------------------' +*/ +[_DEFAULT_WIN] = LAYOUT_ortho_4x12( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, RAISE_W, _______, _______, _______, _______ +), + +/* +RAISE - Mac + This layer focuses on symbols and special characters. + + LEFT RIGHT + ,-----------------------------------------------------. ,-----------------------------------------------------. + | | ! | ? | { | } | & | | ^ | | | ` | ´ | | Del | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + | | # | $ | ( | ) *| " | | ~ |* / | \ | ¨ | | | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + | | @ | % | [ | ] | ' | | | < | > | | | | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + | | | | | | | | |XXXXXXXX| | | | | + `-----------------------------------------------------´ `-----------------------------------------------------' +*/ +[_RAISE_MAC] = LAYOUT_ortho_4x12( + _______, SE_EXCL, SE_QSTM, AP_LCBR, AP_RCBR, SE_AMP, SE_TAK, AP_PIPE, SE_BTCK, SE_TCK, _______, KC_DEL, + _______, SE_HASH, SE_USD, AP_LPAR, AP_RPAR, SE_DQUT, SE_TILD, AP_SLS, AP_BSLS, SE_UML, _______, _______, + _______, SE_AT, SE_PCNT, AP_LBR, AP_RBR, SE_QUT, _______, SE_LT, SE_GT, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +), + +/* +RAISE - Windows + This layer focuses on symbols and special characters. + + LEFT RIGHT + ,-----------------------------------------------------. ,-----------------------------------------------------. + | | ! | ? | { | } | & | | ^ | | | ` | ´ | | Del | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + | | # | $ | ( | ) *| " | | ~ |* / | \ | ¨ | | | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + | | @ | % | [ | ] | ' | | | < | > | | | | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + | | | | | | | | |XXXXXXXX| | | | | + `-----------------------------------------------------´ `-----------------------------------------------------' +*/ +[_RAISE_WIN] = LAYOUT_ortho_4x12( + _______, SE_EXCL, SE_QSTM, MS_LCBR, MS_RCBR, SE_AMP, SE_TAK, MS_PIPE, SE_BTCK, SE_TCK, _______, KC_DEL, + _______, SE_HASH, SE_USD, MS_LPAR, MS_RPAR, SE_DQUT, SE_TILD, MS_SLS, MS_BSLS, SE_UML, _______, _______, + _______, SE_AT, SE_PCNT, MS_LBR, MS_RBR, SE_QUT, _______, SE_LT, SE_GT, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +), + +/* +LOWER + This layer focuses on numbers and math. + LEFT RIGHT + ,-----------------------------------------------------. ,-----------------------------------------------------. + | | F1 | F2 | F3 | F4 | | | * | 7 | 8 | 9 | - | Del | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + | | F5 | F6 | F7 | F8 *| | | / |* 4 | 5 | 6 | + | | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + | | F9 | F10 | F11 | F12 | | | / | 1 | 2 | 3 | = | | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + | | | | |XXXXXXXX| | | | | 0 | . | | | + `-----------------------------------------------------´ `-----------------------------------------------------' +*/ +[_LOWER] = LAYOUT_ortho_4x12( + _______, KC_F1, KC_F2, KC_F3, KC_F4, _______, SE_AST, KC_7, KC_8, KC_9, SE_DASH, KC_DEL, + _______, KC_F5, KC_F6, KC_F7, KC_F8, _______, AP_SLS, KC_4, KC_5, KC_6, SE_PLUS, _______, + _______, KC_F9, KC_F10, KC_F11, KC_F12, _______, MS_SLS, KC_1, KC_2, KC_3, SE_EQLS, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_0, KC_DOT, _______, _______ +), + +/* +SPECIAL + This layer focuses on special functions, media controls and movement keys. + LEFT RIGHT + ,-----------------------------------------------------. ,-----------------------------------------------------. + | Reset | | WIN | VolUp | | | | Ins | Home | Up | End | PgUp | Del | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + |EEPReset| | Prev | VolDn | Next *| | | |* Left | Down | Right | PgDn | | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + | | | | Mute | | | | Lock | MAC | | | | | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + |XXXXXXXX| | | | | Play | | | | | | | Sleep | + `-----------------------------------------------------´ `-----------------------------------------------------' +*/ +[_SPECIAL] = LAYOUT_ortho_4x12( + RESET, _______, TO_WIN, KC_VOLU, _______, _______, KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_DEL, + EEP_RST, _______, MY_PREV, KC_VOLD, MY_NEXT, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, + _______, _______, _______, KC_MUTE, _______, _______, MY_LOCK, TO_MAC, _______, _______, _______, _______, + _______, _______, _______, _______, _______, MY_PLAY, _______, _______, _______, _______, _______, KC_SLEP +) + +}; diff --git a/keyboards/tada68/keymaps/mekberg/config.h b/keyboards/tada68/keymaps/mekberg/config.h new file mode 100644 index 000000000000..d29180a5affc --- /dev/null +++ b/keyboards/tada68/keymaps/mekberg/config.h @@ -0,0 +1,5 @@ +#pragma once + +// Define some configuration for modtap behavior +// #define TAPPING_TERM 150 +#define PERMISSIVE_HOLD diff --git a/keyboards/tada68/keymaps/mekberg/keymap.c b/keyboards/tada68/keymaps/mekberg/keymap.c new file mode 100755 index 000000000000..1acbf2c48a0c --- /dev/null +++ b/keyboards/tada68/keymaps/mekberg/keymap.c @@ -0,0 +1,100 @@ +#include QMK_KEYBOARD_H + +// Fillers to make layering more clear +// The default names have been swapped to make the keymap more readable. +#define XXXXXX KC_TRNS +#define ______ KC_NO + +// ISO keycodes with Swedish layout names +#define SE_PLUS KC_MINS // + +#define SE_TCK KC_EQL // Fronttick (´) +#define SE_DASH KC_SLSH // - +#define SE_UML KC_RBRC // Umlaut (¨) +#define SE_QUT KC_NUHS // Singlequote (') +#define SE_AUML KC_QUOT // Ä +#define SE_ARNG KC_LBRC // Å +#define SE_OUML KC_SCLN // Ö +#define SE_LT KC_NUBS // < + +// My common shortcuts +#define MY_PREV KC_MRWD // Media: Previous +#define MY_NEXT KC_MFFD // Media: Next +#define MY_PLAY KC_MPLY // Media: Play/Pause +#define MY_LOCK C(A(KC_L)) // Mac: Lock + + +/* +TADA68 ISO physical layout +1u == 8chars +,----------------------------------------------------------------------------------------------------------------------------------------------. +| | | | | | | | | | | | | | 2u | | +|----------------------------------------------------------------------------------------------------------------------------------------------| +| 1,5u | | | | | | | | | | | | | 1,5u | | +|--------------------------------------------------------------------------------------------------------------------------| |--------| +| 1,75u | | | | | | | | | | | | | 1,25u | | +|----------------------------------------------------------------------------------------------------------------------------------------------| +| 1,25u | | | | | | | | | | | | 1,75u | | | +|----------------------------------------------------------------------------------------------------------------------------------------------| +| 1,25u | 1,25u | 1,25u | | | | | | | | +`----------------------------------------------------------------------------------------------------------------------------------------------' +*/ + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_iso( +// ,----------------------------------------------------------------------------------------------------------------------------------------------. +// | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | + | ´ | Backspace | Home | + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, SE_PLUS, SE_TCK, KC_BSPC, KC_HOME, +// |----------------------------------------------------------------------------------------------------------------------------------------------| +// | Tab | Q | W | E | R | T | Y | U | I | O | P | Å | ¨ | | End | + LT(2,KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, SE_ARNG, SE_UML, KC_END, +// |--------------------------------------------------------------------------------------------------------------------------| |--------| +// | LCtrl | A | S | D | F | G | H | J | K | L | Ö | Ä | ' | Enter | PgUp | + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, SE_OUML, SE_AUML, SE_QUT, KC_ENT, KC_PGUP, +// |----------------------------------------------------------------------------------------------------------------------------------------------| +// | LShift | <> | Z | X | C | V | B | N | M | , | . | - | RShift | Up | PgDn | + KC_LSFT, SE_LT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, SE_DASH, KC_RSFT, KC_UP, KC_PGDN, +// |----------------------------------------------------------------------------------------------------------------------------------------------| +// | LCtrl | LAlt | Command | Space |Command | RAlt | Fn | Left | Down | Right | + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_LGUI, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT +// `----------------------------------------------------------------------------------------------------------------------------------------------' + ), + + [1] = LAYOUT_iso( +// ,----------------------------------------------------------------------------------------------------------------------------------------------. +// | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Delete | Ins | + 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_DEL, KC_INS, +// |----------------------------------------------------------------------------------------------------------------------------------------------| +// | | | Up | | | | | | | | | | | | Mute | + ______, ______, KC_UP, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC__MUTE, +// |--------------------------------------------------------------------------------------------------------------------------| Lock |--------| +// | Caps Lock | Left | Down | Right | BLight | | | | | | | | | Screen | VolUp | + KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, BL_BRTG, ______, ______, ______, ______, ______, ______, ______, ______, MY_LOCK, KC_VOLU, +// |----------------------------------------------------------------------------------------------------------------------------------------------| +// | | | | | Bl- |BLtoggle | Bl+ | | | | | | | Stop | VolDn | + ______, ______, ______, ______, BL_DEC, BL_TOGG, BL_INC, ______, ______, ______, ______, ______, ______, KC_MSTP, KC_VOLD, +// |----------------------------------------------------------------------------------------------------------------------------------------------| +// | | | | Sleep | | | | Prev | Play | Fwd | + ______, ______, ______, KC_SLEP, ______, ______, XXXXXX, MY_PREV, MY_PLAY, MY_NEXT +// `----------------------------------------------------------------------------------------------------------------------------------------------' + ), + + [2] = LAYOUT_iso( +// ,----------------------------------------------------------------------------------------------------------------------------------------------. +// | Esc | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Delete | | + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, ______, +// |----------------------------------------------------------------------------------------------------------------------------------------------| +// | | | Up | | | | | | | | | | | | Mute | + XXXXXX, ______, KC_UP, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC__MUTE, +// |--------------------------------------------------------------------------------------------------------------------------| |--------| +// | | Left | Down | Right | | | Left | Down | Up | Right | | | | | VolUp | + ______, KC_LEFT, KC_DOWN, KC_RGHT, ______, ______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, ______, ______, ______, ______, KC_VOLU, +// |----------------------------------------------------------------------------------------------------------------------------------------------| +// | | | | | | | | | | | | | | Stop | VolDn | + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_MSTP, KC_VOLD, +// |----------------------------------------------------------------------------------------------------------------------------------------------| +// | | | | | | | | Prev | Play | Fwd | + ______, ______, ______, ______, ______, ______, ______, MY_PREV, MY_PLAY, MY_NEXT +// `----------------------------------------------------------------------------------------------------------------------------------------------' + ) +}; diff --git a/keyboards/tada68/keymaps/mekberg/readme.md b/keyboards/tada68/keymaps/mekberg/readme.md new file mode 100644 index 000000000000..be578e957261 --- /dev/null +++ b/keyboards/tada68/keymaps/mekberg/readme.md @@ -0,0 +1,58 @@ +# Mekberg's TADA68 layout + +More or less a standard Swedish ISO layout, with Mac-centric key positions. All keys not assigned on non-default layers are set to KC_NO +as I don't want them to pass through when activating a layer. + +# Layers + +### Base Layer + +``` +,----------------------------------------------------------------------------------------------------------------------------------------------. +| Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | + | ´ | Backspace | Home | +|----------------------------------------------------------------------------------------------------------------------------------------------| +| Tab | Q | W | E | R | T | Y | U | I | O | P | Å | ¨ | | End | +|--------------------------------------------------------------------------------------------------------------------------| |--------| +| LCtrl | A | S | D | F | G | H | J | K | L | Ö | Ä | ' | Enter | PgUp | +|----------------------------------------------------------------------------------------------------------------------------------------------| +| LShift | <> | Z | X | C | V | B | N | M | , | . | - | RShift | Up | PgDn | +|----------------------------------------------------------------------------------------------------------------------------------------------| +| LCtrl | LAlt | Command | Space |Command | RAlt | Fn | Left | Down | Right | +`----------------------------------------------------------------------------------------------------------------------------------------------' +``` + +### Fn Layer (layer 1) + +``` +,----------------------------------------------------------------------------------------------------------------------------------------------. +| | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Delete | Ins | +|----------------------------------------------------------------------------------------------------------------------------------------------| +| | | Up | | | | | | | | | | | | Mute | +|--------------------------------------------------------------------------------------------------------------------------| |--------| +| Caps Lock | Left | Down | Right | BLight | | | | | | | | | | VolUp | +|----------------------------------------------------------------------------------------------------------------------------------------------| +| | | | | Bl- |BLtoggle | Bl+ | | | | | | | Stop | VolDn | +|----------------------------------------------------------------------------------------------------------------------------------------------| +| | | | | | | | Prev | Play | Fwd | +`----------------------------------------------------------------------------------------------------------------------------------------------' +``` + +Mainly used for media keys and F-keys, as well as a nav cluster on WASD. Also has backlight keys, that are rarely used. + +### Modtap Tab Layer (layer 2) + +``` +,----------------------------------------------------------------------------------------------------------------------------------------------. +| Esc | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Delete | | +|----------------------------------------------------------------------------------------------------------------------------------------------| +| | | Up | | | | | | | | | | | | Mute | +|--------------------------------------------------------------------------------------------------------------------------| |--------| +| | Left | Down | Right | | | Left | Down | Up | Right | | | | | VolUp | +|----------------------------------------------------------------------------------------------------------------------------------------------| +| | | | | | | | | | | | | | Stop | VolDn | +|----------------------------------------------------------------------------------------------------------------------------------------------| +| | | | | | | | Prev | Play | Fwd | +`----------------------------------------------------------------------------------------------------------------------------------------------' +``` + +Tab acts as Tab when tapped, and as Layer 2 when held. Used for HJKL nav keys and Delete. diff --git a/keyboards/tada68/keymaps/mekberg/rules.mk b/keyboards/tada68/keymaps/mekberg/rules.mk new file mode 100644 index 000000000000..dbaa9045e7b1 --- /dev/null +++ b/keyboards/tada68/keymaps/mekberg/rules.mk @@ -0,0 +1,5 @@ +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +CONSOLE_ENABLE = no # Console for debug(+400) From 81f36ab74dca703c46e1d94e6d5b63365449e9d7 Mon Sep 17 00:00:00 2001 From: "Manassarn \"Noom\" Manoonchai" Date: Thu, 17 Oct 2019 00:48:37 +0700 Subject: [PATCH 117/316] [Keymap] Add narze keymap for usb-usb converter (#6881) * Revert raise/backspace mod tap to just backspace * Initialize usb_usb/narze * Modify keys * Add readme * Support Right shift to ) * Add Dev layer * Use Dev layer on holding z key * Add Dev layer for Ergodox * Update keyboards/converter/usb_usb/keymaps/narze/README.md Fix the command & close the code block as suggested Co-Authored-By: Drashna Jaelre * Reduce rules --- .../converter/usb_usb/keymaps/narze/README.md | 10 ++ .../converter/usb_usb/keymaps/narze/config.h | 48 +++++ .../converter/usb_usb/keymaps/narze/keymap.c | 167 ++++++++++++++++++ .../converter/usb_usb/keymaps/narze/rules.mk | 3 + 4 files changed, 228 insertions(+) create mode 100644 keyboards/converter/usb_usb/keymaps/narze/README.md create mode 100644 keyboards/converter/usb_usb/keymaps/narze/config.h create mode 100644 keyboards/converter/usb_usb/keymaps/narze/keymap.c create mode 100644 keyboards/converter/usb_usb/keymaps/narze/rules.mk diff --git a/keyboards/converter/usb_usb/keymaps/narze/README.md b/keyboards/converter/usb_usb/keymaps/narze/README.md new file mode 100644 index 000000000000..a089568d2cfa --- /dev/null +++ b/keyboards/converter/usb_usb/keymaps/narze/README.md @@ -0,0 +1,10 @@ +# narze's layout for usb-usb converter + +## Key features +- Qwerty + [Colemak](https://colemak.com) layouts, and you can type Qwerty on software-level Colemak as well. Very useful for gaming or when your friend wanna type something but don't use Colemak. +- [(S)uper (D)uper Mode](/~https://github.com/jasonrudolph/keyboard#super-duper-mode) inspired by [jasonrudolph](/~https://github.com/jasonrudolph), with [some extensions](https://gist.github.com/narze/861e2167784842d38771) such as backspace & forward delete. + +## Build instructions +- `cd /path/to/qmk_firmware` +- Ensure latest libraries are loaded `make git-submodule` +- Build & flash : `make converter/usb_usb:narze:flash` diff --git a/keyboards/converter/usb_usb/keymaps/narze/config.h b/keyboards/converter/usb_usb/keymaps/narze/config.h new file mode 100644 index 000000000000..cbdb7d94e356 --- /dev/null +++ b/keyboards/converter/usb_usb/keymaps/narze/config.h @@ -0,0 +1,48 @@ +#pragma once + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +#undef TAPPING_TERM +#define TAPPING_TERM 100 + +#define COMBO_TERM 20 +#define COMBO_COUNT 1 + +#define IGNORE_MOD_TAP_INTERRUPT +#define PERMISSIVE_HOLD + +#define SUPER_DUPER_SOUND S__NOTE(_B1) + +#define MOUSEKEY_DELAY 100 + +#define USB_POLLING_INTERVAL_MS 1 + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PLANCK_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +#endif diff --git a/keyboards/converter/usb_usb/keymaps/narze/keymap.c b/keyboards/converter/usb_usb/keymaps/narze/keymap.c new file mode 100644 index 000000000000..b5938fa359f4 --- /dev/null +++ b/keyboards/converter/usb_usb/keymaps/narze/keymap.c @@ -0,0 +1,167 @@ +#include QMK_KEYBOARD_H +#include "narze.h" +#include "keymap_colemak.h" + +enum usb_usb_layers { + _QWERTY, + _COLEMAK, + _QWOC, + _SUPERDUPER, +}; + +enum usb_usb_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + QWOC, + SUPERDUPER, + SDTOGG, // Toggle SuperDuper + GUI_UNDS, + LSFT_LPRN, + RSFT_RPRN, +}; + +#define HPR_ESC ALL_T(KC_ESC) +#define SFT_ENT SFT_T(KC_ENT) +#define BRWS_L S(LGUI(KC_LBRC)) +#define BRWS_R S(LGUI(KC_RBRC)) + +enum process_combo_event { + CB_SUPERDUPER, +}; + +const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] PROGMEM = { + /* 0: plain Qwerty without layer switching + * ,---------------. ,---------------. ,---------------. + * |F13|F14|F15|F16| |F17|F18|F19|F20| |F21|F22|F23|F24| + * ,---. |---------------| |---------------| |---------------| ,-----------. ,---------------. ,-------. + * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| |VDn|VUp|Mut|Pwr| | Help | + * `---' `---------------' `---------------' `---------------' `-----------' `---------------' `-------' + * ,-----------------------------------------------------------. ,-----------. ,---------------. ,-------. + * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|JPY|Bsp| |Ins|Hom|PgU| |NmL| /| *| -| |Stp|Agn| + * |-----------------------------------------------------------| |-----------| |---------------| |-------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | |Del|End|PgD| | 7| 8| 9| +| |Mnu|Und| + * |-----------------------------------------------------------| `-----------' |---------------| |-------| + * |CapsL | A| S| D| F| G| H| J| K| L| ;| :| #|Retn| | 4| 5| 6|KP,| |Sel|Cpy| + * |-----------------------------------------------------------| ,---. |---------------| |-------| + * |Shft| <| Z| X| C| V| B| N| M| ,| ,| /| RO|Shift | |Up | | 1| 2| 3|KP=| |Exe|Pst| + * |-----------------------------------------------------------| ,-----------. |---------------| |-------| + * |Ctl|Gui|Alt|MHEN|HNJ| Space |H/E|HENK|KANA|Alt|Gui|App|Ctl| |Lef|Dow|Rig| | 0 | .|Ent| |Fnd|Cut| + * `-----------------------------------------------------------' `-----------' `---------------' `-------' + */ + [_QWERTY] = LAYOUT_all( + KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, KC_VOLD, KC_VOLU, KC_MUTE, KC_PWR, KC_HELP, + 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_JYEN, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_STOP, KC_AGIN, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_MENU, KC_UNDO, + HPR_ESC, 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_PCMM, KC_SLCT, KC_COPY, + LSFT_LPRN,KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, RSFT_RPRN, KC_UP, KC_P1, KC_P2, KC_P3, KC_PEQL, KC_EXEC, KC_PSTE, + KC_LCTL, KC_LALT, GUI_UNDS,KC_MHEN, KC_HANJ, KC_SPC, KC_HAEN, KC_HENK, KC_KANA, KC_BSPC, KC_RALT, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT, KC_FIND, KC_CUT + ), + [_COLEMAK] = LAYOUT_all( + KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, KC_VOLD, KC_VOLU, KC_MUTE, KC_PWR, KC_HELP, + 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_JYEN, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_STOP, KC_AGIN, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_MENU, KC_UNDO, + HPR_ESC, 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_PCMM, KC_SLCT, KC_COPY, + LSFT_LPRN,KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, RSFT_RPRN, KC_UP, KC_P1, KC_P2, KC_P3, KC_PEQL, KC_EXEC, KC_PSTE, + KC_LCTL, KC_LALT, GUI_UNDS,KC_MHEN, KC_HANJ, KC_SPC, KC_HAEN, KC_HENK, KC_KANA, KC_BSPC, KC_RALT, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT, KC_FIND, KC_CUT + ), + [_QWOC] = LAYOUT_all( + KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, KC_VOLD, KC_VOLU, KC_MUTE, KC_PWR, KC_HELP, + 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_JYEN, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_STOP, KC_AGIN, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_MENU, KC_UNDO, + HPR_ESC, 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_PCMM, KC_SLCT, KC_COPY, + LSFT_LPRN,KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, RSFT_RPRN, KC_UP, KC_P1, KC_P2, KC_P3, KC_PEQL, KC_EXEC, KC_PSTE, + KC_LCTL, KC_LALT, GUI_UNDS,KC_MHEN, KC_HANJ, KC_SPC, KC_HAEN, KC_HENK, KC_KANA, KC_BSPC, KC_RALT, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT, KC_FIND, KC_CUT + ), + [_SUPERDUPER] = LAYOUT_all( + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, + RESET, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,______,______, ______,______,______,______, ______, + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,______,______, ______,______,______,______, ______,______, + ______, ______, ______, ______, ______, ______, ______, ______, BRWS_L, BRWS_R, ______, ______, ______, ______, ______,______,______, ______,______,______,______, ______,______, + KC_SPC, KC_LALT, _______, _______, KC_BSPC,KC_LGUI,KC_LEFT, KC_DOWN, KC_UP,KC_RGHT, KC_DEL, ______, ______, ______, ______,______,______,______, ______,______, + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,______,______,______, ______,______, + ______, ______, ______, ______, ______, KC_LSFT, ______, ______, ______, ______, ______, ______, ______, ______,______,______, ______, ______,______, ______,______ + ), +}; + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + + set_superduper_key_combo_layer(_QWERTY); + } + return false; + + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + + set_superduper_key_combo_layer(_COLEMAK); + } + return false; + + case QWOC: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWOC); + + set_superduper_key_combo_layer(_QWOC); + } + return false; + + case SDTOGG: + if (record->event.pressed) { + toggle_superduper_mode(); + } + return false; + + // Macros + + // 1. Hold for LGUI, tap for Underscore + case GUI_UNDS: + perform_space_cadet(record, KC_LGUI, KC_LSFT, KC_MINS); + return false; + + // 2. Hold for LSHIFT, tap for Parens open + case LSFT_LPRN: + perform_space_cadet(record, KC_LSFT, KC_LSFT, KC_9); + return false; + + // 3. Hold for RSHIFT, tap for Parens close + case RSFT_RPRN: + perform_space_cadet(record, KC_RSFT, KC_RSFT, KC_0); + return false; + + default: + return true; + } + return true; +} + +void matrix_setup(void) { + set_superduper_key_combos(); +} + +void process_combo_event(uint8_t combo_index, bool pressed) { + if (pressed) { + switch(combo_index) { + case CB_SUPERDUPER: + layer_on(_SUPERDUPER); + break; + } + } else { + layer_off(_SUPERDUPER); + unregister_mods(MOD_BIT(KC_LGUI) | MOD_BIT(KC_LCTL) | MOD_BIT(KC_LALT)); // Sometimes mods are held, unregister them + } +} diff --git a/keyboards/converter/usb_usb/keymaps/narze/rules.mk b/keyboards/converter/usb_usb/keymaps/narze/rules.mk new file mode 100644 index 000000000000..657773e84ee2 --- /dev/null +++ b/keyboards/converter/usb_usb/keymaps/narze/rules.mk @@ -0,0 +1,3 @@ +EXTRAKEY_ENABLE = no +NKRO_ENABLE = yes +COMBO_ENABLE = yes From 881f27b461189e6a02ecbaee0b5bcb3d85fc2b76 Mon Sep 17 00:00:00 2001 From: MakotoKurauchi Date: Thu, 17 Oct 2019 03:01:49 +0900 Subject: [PATCH 118/316] [Keyboard] Cleanup helix rules options (#6952) * add temporary test shell-spript * Use LINK_TIME_OPTIMIZATION_ENABLE instead of Link_Time_Optimization No change in build result. * Helix config.h use '#pragma once' No change in build result. * Helix helix.h,rev?/rev?.h,pico/pico.h use '#pragma once' No change in build result. * Use drivers/avr/pro_micro.h instead of keyboards/helix/pro_micro.h No change in build result. * remove keyboards/helix/{rev2|pico}/serial_config.h No change in build result. * 'HELIX_ROWS' macro is now referenced only in rev1/config.h and rev2/config.h. No change in build result. * The contents of helix/rules.mk were distributed to subdirectories. This is a preparation to create a new subdirectory for helix code using split_common. No change in build result. remove 'USE_I2C = yes', 'SUBPROJECT_rev1 = no' from keyboards/helix/rules.mk. follow code move from keyboards/helix/rules.mk to keyboards/helix/{rev1,rev2,pico}/rules.mk. ---- SRC += i2c.c SRC += serial.c SRC += ssd1306.c CUSTOM_MATRIX = yes --- * helix/{i2c.[ch], serial.[ch], ssd1306.[ch]} move into helix/local_drivers/ No change in build result. * Simplified 'helix/pico/keymap/*/rules.mk' using KEYBOARD_LOCAL_FEATURES_MK. No change in build result. * add keyboards/helix/pico/local_features.mk * add 'KEYBOARD_LOCAL_FEATURES_MK := $(dir $(lastword $(MAKEFILE_LIST)))local_features.mk' into keyboards/helix/pico/rules.mk * remove HELIX_CUSTOMISE_MSG from keyboards/helix/pico/keymaps/*/rules.mk * remove HELIX= process from keyboards/helix/pico/keymaps/*/rules.mk * remove convert code(helix to standaerd) from keyboards/helix/pico/keymaps/*/rules.mk * add 'include $(strip $(KEYBOARD_LOCAL_FEATURES_MK))' into keyboards/helix/pico/keymaps/*/rules.mk * Simplified 'helix/rev2/keymap/*/rules.mk' using KEYBOARD_LOCAL_FEATURES_MK. No change in build result. * add keyboards/helix/rev2/local_features.mk * add 'KEYBOARD_LOCAL_FEATURES_MK := $(dir $(lastword $(MAKEFILE_LIST)))local_features.mk' into keyboards/helix/rev2/rules.mk * remove HELIX_CUSTOMISE_MSG from keyboards/helix/rev2/keymaps/*/rules.mk * remove HELIX= process from keyboards/helix/rev2/keymaps/*/rules.mk * remove convert code(helix to standaerd) from keyboards/helix/rev2/keymaps/*/rules.mk * add 'include $(strip $(KEYBOARD_LOCAL_FEATURES_MK))' into keyboards/helix/rev2/keymaps/*/rules.mk * Added helix keyboard build NEW method. No change in build result. ## Helix build $ make helix:default ## no oled, no backlight, no underglow $ make helix/rev2/back:default ## no oled, with backlight, no underglow $ make helix/rev2/under:default ## no oled, no backlight, with underglow $ make helix/rev2/oled:default ## with oled, no backlight, not underglow $ make helix/rev2/oled/back:default ## with oled, with backlight, no underglow $ make helix/rev2/back/oled:default ## with oled, with backlight, no underglow $ make helix/rev2/oled/under:default ## with oled, no backlight, with underglow $ make helix/rev2/under/oled:default ## with oled, no backlight, with underglow ## Helix pico build $ make helix/pico:default ## no oled, no backlight, no underglow $ make helix/pico/back:default ## no oled, with backlight, no underglow $ make helix/pico/under:default ## no oled, no backlight, with underglow $ make helix/pico/oled:default ## with oled, no backlight, not underglow * add temporary test shell-spript * test end remove test script. Revert "add temporary test shell-spript" This reverts commit 5dac20cd0f8b4bc192edb2313652c1635f829657. * test end remove test script. Revert "add temporary test shell-spript" This reverts commit ec49f63b2dc0f2b3fe8c1c36ffa615cee2f7e3ed. * Extended the 'HELIX=' option. add keyword 'verbose', 'no_ani'. No change in build result. * update keyboards/helix/{rev2,pico}/keymaps/default/readme.md * rename KEYBOARD_TOP_DIR to HELIX_TOP_DIR in rules.mk * update keyboards/helix/{rev2,pico}/keymaps/default/readme_jp.md * rm keyboards/helix/pico/oled/rules.mk * update helix's readmes. All the ':avrdude' was replaced with ':flash'. * remove F_CPU, ARCH, F_USB, INTERRUPT_CONTROL_ENDPOINT from helix/rules.mk No change in build result. --- keyboards/helix/config.h | 16 +- keyboards/helix/helix.h | 5 +- keyboards/helix/{ => local_drivers}/i2c.c | 0 keyboards/helix/{ => local_drivers}/i2c.h | 0 keyboards/helix/{ => local_drivers}/serial.c | 0 keyboards/helix/{ => local_drivers}/serial.h | 0 keyboards/helix/{ => local_drivers}/ssd1306.c | 0 keyboards/helix/{ => local_drivers}/ssd1306.h | 0 keyboards/helix/pico/back/rules.mk | 1 + keyboards/helix/pico/config.h | 10 +- keyboards/helix/pico/keymaps/biacco/rules.mk | 139 +------ .../helix/pico/keymaps/default/readme.md | 28 +- .../helix/pico/keymaps/default/readme_jp.md | 81 ++-- keyboards/helix/pico/keymaps/default/rules.mk | 141 +------ keyboards/helix/pico/keymaps/mtei/rules.mk | 141 +------ keyboards/helix/pico/local_features.mk | 100 +++++ keyboards/helix/pico/pico.h | 6 +- keyboards/helix/pico/rules.mk | 17 + keyboards/helix/pico/serial_config.h | 9 - keyboards/helix/pico/under/rules.mk | 1 + keyboards/helix/pro_micro.h | 362 ------------------ keyboards/helix/rev1/config.h | 11 +- .../helix/rev1/keymaps/OLED_sample/keymap.c | 4 +- keyboards/helix/rev1/keymaps/default/keymap.c | 4 +- keyboards/helix/rev1/rev1.h | 14 +- keyboards/helix/rev1/rules.mk | 7 + keyboards/helix/rev2/back/oled/rules.mk | 1 + keyboards/helix/rev2/back/rules.mk | 1 + keyboards/helix/rev2/config.h | 14 +- keyboards/helix/rev2/keymaps/default/keymap.c | 4 +- .../helix/rev2/keymaps/default/readme.md | 36 +- .../helix/rev2/keymaps/default/readme_jp.md | 98 +++-- keyboards/helix/rev2/keymaps/default/rules.mk | 141 +------ .../helix/rev2/keymaps/edvorakjp/rules.mk | 130 +------ .../helix/rev2/keymaps/five_rows/keymap.c | 2 +- .../helix/rev2/keymaps/five_rows/rules.mk | 144 ++----- .../helix/rev2/keymaps/five_rows_jis/keymap.c | 2 +- .../helix/rev2/keymaps/five_rows_jis/rules.mk | 137 +------ keyboards/helix/rev2/keymaps/froggy/keymap.c | 2 +- keyboards/helix/rev2/keymaps/froggy/rules.mk | 131 +------ .../helix/rev2/keymaps/led_test/README.md | 2 +- .../helix/rev2/keymaps/led_test/rules.mk | 131 +------ keyboards/helix/rev2/keymaps/yshrsmz/keymap.c | 4 +- keyboards/helix/rev2/keymaps/yshrsmz/rules.mk | 129 +------ keyboards/helix/rev2/local_features.mk | 98 +++++ keyboards/helix/rev2/oled/back/rules.mk | 1 + keyboards/helix/rev2/oled/rules.mk | 1 + keyboards/helix/rev2/oled/under/rules.mk | 1 + keyboards/helix/rev2/rev2.h | 9 +- keyboards/helix/rev2/rules.mk | 18 + keyboards/helix/rev2/serial_config.h | 8 - keyboards/helix/rev2/under/oled/rules.mk | 1 + keyboards/helix/rev2/under/rules.mk | 1 + keyboards/helix/rules.mk | 76 +--- 54 files changed, 646 insertions(+), 1774 deletions(-) rename keyboards/helix/{ => local_drivers}/i2c.c (100%) rename keyboards/helix/{ => local_drivers}/i2c.h (100%) rename keyboards/helix/{ => local_drivers}/serial.c (100%) rename keyboards/helix/{ => local_drivers}/serial.h (100%) rename keyboards/helix/{ => local_drivers}/ssd1306.c (100%) rename keyboards/helix/{ => local_drivers}/ssd1306.h (100%) create mode 100644 keyboards/helix/pico/back/rules.mk create mode 100644 keyboards/helix/pico/local_features.mk delete mode 100644 keyboards/helix/pico/serial_config.h create mode 100644 keyboards/helix/pico/under/rules.mk delete mode 100644 keyboards/helix/pro_micro.h create mode 100644 keyboards/helix/rev2/back/oled/rules.mk create mode 100644 keyboards/helix/rev2/back/rules.mk create mode 100644 keyboards/helix/rev2/local_features.mk create mode 100644 keyboards/helix/rev2/oled/back/rules.mk create mode 100644 keyboards/helix/rev2/oled/rules.mk create mode 100644 keyboards/helix/rev2/oled/under/rules.mk delete mode 100644 keyboards/helix/rev2/serial_config.h create mode 100644 keyboards/helix/rev2/under/oled/rules.mk create mode 100644 keyboards/helix/rev2/under/rules.mk diff --git a/keyboards/helix/config.h b/keyboards/helix/config.h index fbfbd3280434..875312f0c35c 100644 --- a/keyboards/helix/config.h +++ b/keyboards/helix/config.h @@ -16,8 +16,7 @@ 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 +#pragma once #include "config_common.h" @@ -27,8 +26,6 @@ along with this program. If not, see . // -include keyboards/helix/rev?/keymaps/MAPNAME/config.h // XXXX.c -#include - // GCC include search path in qmk_firmare/keyboards/helix/ // #include "..." search starts here: // #include <...> search starts here: @@ -38,14 +35,3 @@ along with this program. If not, see . // . // ./tmk_core // ...... - -#ifdef USE_Link_Time_Optimization - // LTO has issues with macros (action_get_macro) and "functions" (fn_actions), - // so just disable them - #define NO_ACTION_MACRO - #define NO_ACTION_FUNCTION - - #define DISABLE_LEADER -#endif // USE_Link_Time_Optimization - -#endif /* CONFIG_H */ diff --git a/keyboards/helix/helix.h b/keyboards/helix/helix.h index d73feb6bbf84..7dac2455deba 100644 --- a/keyboards/helix/helix.h +++ b/keyboards/helix/helix.h @@ -1,5 +1,4 @@ -#ifndef HELIX_H -#define HELIX_H +#pragma once #ifdef KEYBOARD_helix_rev1 #include "rev1.h" @@ -12,5 +11,3 @@ #endif #include "quantum.h" - -#endif diff --git a/keyboards/helix/i2c.c b/keyboards/helix/local_drivers/i2c.c similarity index 100% rename from keyboards/helix/i2c.c rename to keyboards/helix/local_drivers/i2c.c diff --git a/keyboards/helix/i2c.h b/keyboards/helix/local_drivers/i2c.h similarity index 100% rename from keyboards/helix/i2c.h rename to keyboards/helix/local_drivers/i2c.h diff --git a/keyboards/helix/serial.c b/keyboards/helix/local_drivers/serial.c similarity index 100% rename from keyboards/helix/serial.c rename to keyboards/helix/local_drivers/serial.c diff --git a/keyboards/helix/serial.h b/keyboards/helix/local_drivers/serial.h similarity index 100% rename from keyboards/helix/serial.h rename to keyboards/helix/local_drivers/serial.h diff --git a/keyboards/helix/ssd1306.c b/keyboards/helix/local_drivers/ssd1306.c similarity index 100% rename from keyboards/helix/ssd1306.c rename to keyboards/helix/local_drivers/ssd1306.c diff --git a/keyboards/helix/ssd1306.h b/keyboards/helix/local_drivers/ssd1306.h similarity index 100% rename from keyboards/helix/ssd1306.h rename to keyboards/helix/local_drivers/ssd1306.h diff --git a/keyboards/helix/pico/back/rules.mk b/keyboards/helix/pico/back/rules.mk new file mode 100644 index 000000000000..066fffb74af2 --- /dev/null +++ b/keyboards/helix/pico/back/rules.mk @@ -0,0 +1 @@ +LED_BACK_ENABLE = yes diff --git a/keyboards/helix/pico/config.h b/keyboards/helix/pico/config.h index b377332efa1a..260560f556f8 100644 --- a/keyboards/helix/pico/config.h +++ b/keyboards/helix/pico/config.h @@ -16,8 +16,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef PICO_CONFIG_H -#define PICO_CONFIG_H +#pragma once /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED @@ -35,6 +34,11 @@ along with this program. If not, see . #define USE_SERIAL //#define USE_MATRIX_I2C +/* Soft Serial defines */ +#define SOFT_SERIAL_PIN D2 +#define SERIAL_SLAVE_BUFFER_LENGTH ((MATRIX_ROWS)/2) +#define SERIAL_MASTER_BUFFER_LENGTH ((MATRIX_ROWS)/2) + /* Select hand configuration */ #define MASTER_LEFT // #define MASTER_RIGHT @@ -138,5 +142,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/helix/pico/keymaps/biacco/rules.mk b/keyboards/helix/pico/keymaps/biacco/rules.mk index d6b36580e119..0c60c40f64dc 100644 --- a/keyboards/helix/pico/keymaps/biacco/rules.mk +++ b/keyboards/helix/pico/keymaps/biacco/rules.mk @@ -1,125 +1,24 @@ - -# Build Options +# QMK Standard Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) +# See TOP/keyboards/helix/rules.mk for a list of options that can be set. +# See TOP/docs/config_options.md for more information. +# EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = yes # Audio output on port B5 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -SWAP_HANDS_ENABLE = no # Enable one-hand typing - -define HELIX_CUSTOMISE_MSG - $(info Helix customize) - $(info - OLED_ENABLE=$(OLED_ENABLE)) - $(info - LED_BACK_ENABLE=$(LED_BACK_ENABLE)) - $(info - LED_UNDERGLOW_ENABLE=$(LED_UNDERGLOW_ENABLE)) - $(info - LED_ANIMATION=$(LED_ANIMATIONS)) - $(info - IOS_DEVICE_ENABLE=$(IOS_DEVICE_ENABLE)) -endef - -# Helix keyboard customize -# you can edit follows 6 Variables -# jp: 以下の6つの変数を必要に応じて編集します。 -OLED_ENABLE = no # OLED_ENABLE -LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c" -LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) -LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) -LED_ANIMATIONS = no # LED animations -IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) -Link_Time_Optimization = no # if firmware size over limit, try this option - -#### LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE. -#### Do not enable these with audio at the same time. - -### Helix keyboard 'default' keymap: convenient command line option -## make HELIX= helix:defualt -## option= oled | back | under | na | ios -## ex. -## make HELIX=oled helix:defualt -## make HELIX=oled,back helix:defualt -## make HELIX=oled,under helix:defualt -## make HELIX=oled,back,na helix:defualt -## make HELIX=oled,back,ios helix:defualt -## -ifneq ($(strip $(HELIX)),) - ifeq ($(findstring oled,$(HELIX)), oled) - OLED_ENABLE = yes - endif - ifeq ($(findstring back,$(HELIX)), back) - LED_BACK_ENABLE = yes - else ifeq ($(findstring under,$(HELIX)), under) - LED_UNDERGLOW_ENABLE = yes - endif - ifeq ($(findstring na,$(HELIX)), na) - LED_ANIMATIONS = no - endif - ifeq ($(findstring ios,$(HELIX)), ios) - IOS_DEVICE_ENABLE = yes - endif - $(eval $(call HELIX_CUSTOMISE_MSG)) - $(info ) -endif - -# Uncomment these for checking -# jp: コンパイル時にカスタマイズの状態を表示したい時はコメントをはずします。 -# $(eval $(call HELIX_CUSTOMISE_MSG)) -# $(info ) - -ifeq ($(strip $(LED_BACK_ENABLE)), yes) - RGBLIGHT_ENABLE = yes - OPT_DEFS += -DRGBLED_BACK - ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) - $(eval $(call HELIX_CUSTOMISE_MSG)) - $(error LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE both 'yes') - endif -else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) - RGBLIGHT_ENABLE = yes -else - RGBLIGHT_ENABLE = no -endif - -ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) - OPT_DEFS += -DIOS_DEVICE_ENABLE -endif - -ifeq ($(strip $(LED_ANIMATIONS)), yes) - OPT_DEFS += -DLED_ANIMATIONS -endif - -ifeq ($(strip $(OLED_ENABLE)), yes) - OPT_DEFS += -DOLED_ENABLE -endif - -ifeq ($(strip $(LOCAL_GLCDFONT)), yes) - OPT_DEFS += -DLOCAL_GLCDFONT -endif - -ifeq ($(strip $(AUDIO_ENABLE)),yes) - ifeq ($(strip $(RGBLIGHT_ENABLE)),yes) - Link_Time_Optimization = yes - endif - ifeq ($(strip $(OLED_ENABLE)),yes) - Link_Time_Optimization = yes - endif -endif - -ifeq ($(strip $(Link_Time_Optimization)),yes) - EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization -endif - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -# Uncomment these for debugging -# $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) -# $(info -- OPT_DEFS=$(OPT_DEFS)) -# $(info ) +LINK_TIME_OPTIMIZATION_ENABLE = no # if firmware size over limit, try this option + +# Helix Spacific Build Options +# you can uncomment and edit follows 6 Variables +# jp: 以下の6つの変数を必要に応じて編集し、コメントアウトをはずします。 +# OLED_ENABLE = no # OLED_ENABLE +# LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c" +# LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) +# LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) +LED_ANIMATIONS = no # LED animations +# IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) + +# convert Helix-specific options (that represent combinations of standard options) +# into QMK standard options. +include $(strip $(KEYBOARD_LOCAL_FEATURES_MK)) diff --git a/keyboards/helix/pico/keymaps/default/readme.md b/keyboards/helix/pico/keymaps/default/readme.md index 13948cf620f3..9013e312878d 100644 --- a/keyboards/helix/pico/keymaps/default/readme.md +++ b/keyboards/helix/pico/keymaps/default/readme.md @@ -95,16 +95,15 @@ see `qmk_firmware/keyboards/helix/pico/keymaps/default/rules.mk` ``` -# Helix keyboard customize -# you can edit follows 6 Variables -# jp: 以下の6つの変数を必要に応じて編集します。 -OLED_ENABLE = no # OLED_ENABLE -LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c" -LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) -LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) -LED_ANIMATIONS = yes # LED animations -IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) - +# Helix Spacific Build Options +# you can uncomment and edit follows 6 Variables +# jp: 以下の6つの変数を必要に応じて編集し、コメントアウトをはずします。 +# OLED_ENABLE = no # OLED_ENABLE +# LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c" +# LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) +# LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) +# LED_ANIMATIONS = yes # LED animations +# IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) ``` ## Compile @@ -116,11 +115,18 @@ $ cd qmk_firmware build ``` $ make helix/pico:default +$ make helix/pico/back:default # with backlight +$ make HELIX=no_ani helix/pico/back:default # with backlight without animation +$ make helix/pico/under:default # with underglow ``` flash to keyboard ``` -$ make helix/pico:default:avrdude +$ make helix/pico:default:flash +$ make helix/pico/back:default:flash # with backlight +$ make HELIX=no_ani helix/pico/back:default:flash # with backlight without animation +$ make helix/pico/under:default:flash # with underglow + ``` ## Link diff --git a/keyboards/helix/pico/keymaps/default/readme_jp.md b/keyboards/helix/pico/keymaps/default/readme_jp.md index 1e272f9e6a49..28594dafcbe8 100644 --- a/keyboards/helix/pico/keymaps/default/readme_jp.md +++ b/keyboards/helix/pico/keymaps/default/readme_jp.md @@ -56,31 +56,6 @@ 他の配列(Colemak,Dvorak)は、[readme.md](readme.md) を参照 -## コンパイルの仕方 - -コンパイルは、qmk_firmware のトップディレクトリで行います。 - -``` -$ cd qmk_firmware -``` -qmk_firmwareでは各キーボードのコンパイルは、`<キーボード名>:<キーマップ名>`という指定で行います。 - -``` -$ make helix/pico:default -``` - -キーボードへの書き込みまで同時に行うには下記のように`:avrdude`を付けます。 - -``` -$ make helix/pico:default:avrdude -``` - -コンパイル結果と中間生成物を消去したい場合は以下のようにします。 - -``` -$ make helix/pico:default:clean -``` - ## カスタマイズ オプションの OLED をつけたり、 @@ -88,16 +63,15 @@ RGB バックライトまたは、RGB Underglow をつけた場合は、 `qmk_firmware/keyboards/helix/pico/keymaps/default/rules.mk` の以下の部分を編集して機能を有効化してください。 ``` -# Helix keyboard customize -# you can edit follows 6 Variables -# jp: 以下の6つの変数を必要に応じて編集します。 -OLED_ENABLE = no # OLED_ENABLE -LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c" -LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) -LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) -LED_ANIMATIONS = yes # LED animations -IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) - +# Helix Spacific Build Options +# you can uncomment and edit follows 6 Variables +# jp: 以下の6つの変数を必要に応じて編集し、コメントアウトをはずします。 +# OLED_ENABLE = no # OLED_ENABLE +# LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c" +# LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) +# LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) +# LED_ANIMATIONS = yes # LED animations +# IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) ``` ## RGB バックライトを有効にする @@ -131,6 +105,43 @@ RBG Underglow や RGBバックライトの輝度を抑えて、iPad, iPhone に IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) ``` +## コンパイルの仕方 + +コンパイルは、qmk_firmware のトップディレクトリで行います。 + +``` +$ cd qmk_firmware +``` +qmk_firmwareでは各キーボードのコンパイルは、`<キーボード名>:<キーマップ名>`という指定で行います。 + +``` +$ make helix/pico:default +``` + +キーボードへの書き込みまで同時に行うには下記のように`:flash`を付けます。 + +``` +$ make helix/pico:default:flash +``` + +コンパイル結果と中間生成物を消去したい場合は以下のようにします。 + +``` +$ make helix/pico:default:clean +``` + +上記の、rules.mk によるカスタマイズ項目の一部は下記のようにコマンド上で直接指定することも可能です。 + +RGB バックライトを有効にしてコンパイルしてキーボードへ書き込む。 +``` +$ make helix/pico/back:default:flash +``` + +RGB Underglow を有効にしてコンパイルしてキーボードへ書き込む。 +``` +$ make helix/pico/under:default:flash +``` + ## リンク * さらに詳細は、[こちら helix/Doc/firmware_jp.md](/~https://github.com/MakotoKurauchi/helix/blob/master/Doc/firmware_jp.md)をご覧ください。 diff --git a/keyboards/helix/pico/keymaps/default/rules.mk b/keyboards/helix/pico/keymaps/default/rules.mk index 3b518ff88136..764b073007be 100644 --- a/keyboards/helix/pico/keymaps/default/rules.mk +++ b/keyboards/helix/pico/keymaps/default/rules.mk @@ -1,125 +1,24 @@ - -# Build Options +# QMK Standard Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) +# See TOP/keyboards/helix/rules.mk for a list of options that can be set. +# See TOP/docs/config_options.md for more information. +# EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = yes # Audio output on port B5 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -SWAP_HANDS_ENABLE = no # Enable one-hand typing - -define HELIX_CUSTOMISE_MSG - $(info Helix customize) - $(info - OLED_ENABLE=$(OLED_ENABLE)) - $(info - LED_BACK_ENABLE=$(LED_BACK_ENABLE)) - $(info - LED_UNDERGLOW_ENABLE=$(LED_UNDERGLOW_ENABLE)) - $(info - LED_ANIMATION=$(LED_ANIMATIONS)) - $(info - IOS_DEVICE_ENABLE=$(IOS_DEVICE_ENABLE)) -endef - -# Helix keyboard customize -# you can edit follows 6 Variables -# jp: 以下の6つの変数を必要に応じて編集します。 -OLED_ENABLE = no # OLED_ENABLE -LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c" -LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) -LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) -LED_ANIMATIONS = yes # LED animations -IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) -Link_Time_Optimization = no # if firmware size over limit, try this option - -#### LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE. -#### Do not enable these with audio at the same time. - -### Helix keyboard 'default' keymap: convenient command line option -## make HELIX= helix:defualt -## option= oled | back | under | na | ios -## ex. -## make HELIX=oled helix:defualt -## make HELIX=oled,back helix:defualt -## make HELIX=oled,under helix:defualt -## make HELIX=oled,back,na helix:defualt -## make HELIX=oled,back,ios helix:defualt -## -ifneq ($(strip $(HELIX)),) - ifeq ($(findstring oled,$(HELIX)), oled) - OLED_ENABLE = yes - endif - ifeq ($(findstring back,$(HELIX)), back) - LED_BACK_ENABLE = yes - else ifeq ($(findstring under,$(HELIX)), under) - LED_UNDERGLOW_ENABLE = yes - endif - ifeq ($(findstring na,$(HELIX)), na) - LED_ANIMATIONS = no - endif - ifeq ($(findstring ios,$(HELIX)), ios) - IOS_DEVICE_ENABLE = yes - endif - $(eval $(call HELIX_CUSTOMISE_MSG)) - $(info ) -endif - -# Uncomment these for checking -# jp: コンパイル時にカスタマイズの状態を表示したい時はコメントをはずします。 -# $(eval $(call HELIX_CUSTOMISE_MSG)) -# $(info ) - -ifeq ($(strip $(LED_BACK_ENABLE)), yes) - RGBLIGHT_ENABLE = yes - OPT_DEFS += -DRGBLED_BACK - ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) - $(eval $(call HELIX_CUSTOMISE_MSG)) - $(error LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE both 'yes') - endif -else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) - RGBLIGHT_ENABLE = yes -else - RGBLIGHT_ENABLE = no -endif - -ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) - OPT_DEFS += -DIOS_DEVICE_ENABLE -endif - -ifeq ($(strip $(LED_ANIMATIONS)), yes) - OPT_DEFS += -DLED_ANIMATIONS -endif - -ifeq ($(strip $(OLED_ENABLE)), yes) - OPT_DEFS += -DOLED_ENABLE -endif - -ifeq ($(strip $(LOCAL_GLCDFONT)), yes) - OPT_DEFS += -DLOCAL_GLCDFONT -endif - -ifeq ($(strip $(AUDIO_ENABLE)),yes) - ifeq ($(strip $(RGBLIGHT_ENABLE)),yes) - Link_Time_Optimization = yes - endif - ifeq ($(strip $(OLED_ENABLE)),yes) - Link_Time_Optimization = yes - endif -endif - -ifeq ($(strip $(Link_Time_Optimization)),yes) - EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization -endif - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -# Uncomment these for debugging -# $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) -# $(info -- OPT_DEFS=$(OPT_DEFS)) -# $(info ) +AUDIO_ENABLE = yes # Audio output on port B5 +LINK_TIME_OPTIMIZATION_ENABLE = no # if firmware size over limit, try this option + +# Helix Spacific Build Options +# you can uncomment and edit follows 6 Variables +# jp: 以下の6つの変数を必要に応じて編集し、コメントアウトをはずします。 +# OLED_ENABLE = no # OLED_ENABLE +# LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c" +# LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) +# LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) +# LED_ANIMATIONS = yes # LED animations +# IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) + +# convert Helix-specific options (that represent combinations of standard options) +# into QMK standard options. +include $(strip $(KEYBOARD_LOCAL_FEATURES_MK)) diff --git a/keyboards/helix/pico/keymaps/mtei/rules.mk b/keyboards/helix/pico/keymaps/mtei/rules.mk index 3b518ff88136..764b073007be 100644 --- a/keyboards/helix/pico/keymaps/mtei/rules.mk +++ b/keyboards/helix/pico/keymaps/mtei/rules.mk @@ -1,125 +1,24 @@ - -# Build Options +# QMK Standard Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) +# See TOP/keyboards/helix/rules.mk for a list of options that can be set. +# See TOP/docs/config_options.md for more information. +# EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = yes # Audio output on port B5 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -SWAP_HANDS_ENABLE = no # Enable one-hand typing - -define HELIX_CUSTOMISE_MSG - $(info Helix customize) - $(info - OLED_ENABLE=$(OLED_ENABLE)) - $(info - LED_BACK_ENABLE=$(LED_BACK_ENABLE)) - $(info - LED_UNDERGLOW_ENABLE=$(LED_UNDERGLOW_ENABLE)) - $(info - LED_ANIMATION=$(LED_ANIMATIONS)) - $(info - IOS_DEVICE_ENABLE=$(IOS_DEVICE_ENABLE)) -endef - -# Helix keyboard customize -# you can edit follows 6 Variables -# jp: 以下の6つの変数を必要に応じて編集します。 -OLED_ENABLE = no # OLED_ENABLE -LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c" -LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) -LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) -LED_ANIMATIONS = yes # LED animations -IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) -Link_Time_Optimization = no # if firmware size over limit, try this option - -#### LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE. -#### Do not enable these with audio at the same time. - -### Helix keyboard 'default' keymap: convenient command line option -## make HELIX= helix:defualt -## option= oled | back | under | na | ios -## ex. -## make HELIX=oled helix:defualt -## make HELIX=oled,back helix:defualt -## make HELIX=oled,under helix:defualt -## make HELIX=oled,back,na helix:defualt -## make HELIX=oled,back,ios helix:defualt -## -ifneq ($(strip $(HELIX)),) - ifeq ($(findstring oled,$(HELIX)), oled) - OLED_ENABLE = yes - endif - ifeq ($(findstring back,$(HELIX)), back) - LED_BACK_ENABLE = yes - else ifeq ($(findstring under,$(HELIX)), under) - LED_UNDERGLOW_ENABLE = yes - endif - ifeq ($(findstring na,$(HELIX)), na) - LED_ANIMATIONS = no - endif - ifeq ($(findstring ios,$(HELIX)), ios) - IOS_DEVICE_ENABLE = yes - endif - $(eval $(call HELIX_CUSTOMISE_MSG)) - $(info ) -endif - -# Uncomment these for checking -# jp: コンパイル時にカスタマイズの状態を表示したい時はコメントをはずします。 -# $(eval $(call HELIX_CUSTOMISE_MSG)) -# $(info ) - -ifeq ($(strip $(LED_BACK_ENABLE)), yes) - RGBLIGHT_ENABLE = yes - OPT_DEFS += -DRGBLED_BACK - ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) - $(eval $(call HELIX_CUSTOMISE_MSG)) - $(error LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE both 'yes') - endif -else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) - RGBLIGHT_ENABLE = yes -else - RGBLIGHT_ENABLE = no -endif - -ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) - OPT_DEFS += -DIOS_DEVICE_ENABLE -endif - -ifeq ($(strip $(LED_ANIMATIONS)), yes) - OPT_DEFS += -DLED_ANIMATIONS -endif - -ifeq ($(strip $(OLED_ENABLE)), yes) - OPT_DEFS += -DOLED_ENABLE -endif - -ifeq ($(strip $(LOCAL_GLCDFONT)), yes) - OPT_DEFS += -DLOCAL_GLCDFONT -endif - -ifeq ($(strip $(AUDIO_ENABLE)),yes) - ifeq ($(strip $(RGBLIGHT_ENABLE)),yes) - Link_Time_Optimization = yes - endif - ifeq ($(strip $(OLED_ENABLE)),yes) - Link_Time_Optimization = yes - endif -endif - -ifeq ($(strip $(Link_Time_Optimization)),yes) - EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization -endif - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -# Uncomment these for debugging -# $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) -# $(info -- OPT_DEFS=$(OPT_DEFS)) -# $(info ) +AUDIO_ENABLE = yes # Audio output on port B5 +LINK_TIME_OPTIMIZATION_ENABLE = no # if firmware size over limit, try this option + +# Helix Spacific Build Options +# you can uncomment and edit follows 6 Variables +# jp: 以下の6つの変数を必要に応じて編集し、コメントアウトをはずします。 +# OLED_ENABLE = no # OLED_ENABLE +# LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c" +# LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) +# LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) +# LED_ANIMATIONS = yes # LED animations +# IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) + +# convert Helix-specific options (that represent combinations of standard options) +# into QMK standard options. +include $(strip $(KEYBOARD_LOCAL_FEATURES_MK)) diff --git a/keyboards/helix/pico/local_features.mk b/keyboards/helix/pico/local_features.mk new file mode 100644 index 000000000000..47b928647b22 --- /dev/null +++ b/keyboards/helix/pico/local_features.mk @@ -0,0 +1,100 @@ +# +# local_features.mk contains post-processing rules for the Helix keyboard. +# +# Post-processing rules convert keyboard-specific shortcuts (that represent +# combinations of standard options) into QMK standard options. +# + +define HELIX_CUSTOMISE_MSG + $(info Helix Spacific Build Options) + $(info - OLED_ENABLE = $(OLED_ENABLE)) + $(info - LED_BACK_ENABLE = $(LED_BACK_ENABLE)) + $(info - LED_UNDERGLOW_ENABLE = $(LED_UNDERGLOW_ENABLE)) + $(info - LED_ANIMATION = $(LED_ANIMATIONS)) + $(info - IOS_DEVICE_ENABLE = $(IOS_DEVICE_ENABLE)) + $(info ) +endef + + ifneq ($(strip $(HELIX)),) + ### Helix keyboard keymap: convenient command line option + ## make HELIX= helix/pico: + ## option= oled | back | under | no_ani | na | ios | verbose + ## ex. + ## make HELIX=oled helix/pico: + ## make HELIX=oled,back helix/pico: + ## make HELIX=oled,under helix/pico: + ## make HELIX=oled,back,na helix/pico: + ## make HELIX=oled,back,ios helix/pico: + ## + ifeq ($(findstring oled,$(HELIX)), oled) + OLED_ENABLE = yes + endif + ifeq ($(findstring back,$(HELIX)), back) + LED_BACK_ENABLE = yes + else ifeq ($(findstring under,$(HELIX)), under) + LED_UNDERGLOW_ENABLE = yes + endif + ifeq ($(findstring na,$(HELIX)), na) + LED_ANIMATIONS = no + endif + ifeq ($(findstring no_ani,$(HELIX)), no_ani) + LED_ANIMATIONS = no + endif + ifeq ($(findstring ios,$(HELIX)), ios) + IOS_DEVICE_ENABLE = yes + endif + ifeq ($(findstring verbose,$(HELIX)), verbose) + SHOW_VERBOSE_INFO = yes + endif + SHOW_HELIX_OPTIONS = yes + endif + +######## +# convert Helix-specific options (that represent combinations of standard options) +# into QMK standard options. + +ifeq ($(strip $(LED_BACK_ENABLE)), yes) + RGBLIGHT_ENABLE = yes + OPT_DEFS += -DRGBLED_BACK + ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) + $(eval $(call HELIX_CUSTOMISE_MSG)) + $(error LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE both 'yes') + endif +else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) + RGBLIGHT_ENABLE = yes +endif + +ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) + OPT_DEFS += -DIOS_DEVICE_ENABLE +endif + +ifeq ($(strip $(LED_ANIMATIONS)), yes) + OPT_DEFS += -DLED_ANIMATIONS +endif + +ifeq ($(strip $(OLED_ENABLE)), yes) + OPT_DEFS += -DOLED_ENABLE +endif + +ifeq ($(strip $(LOCAL_GLCDFONT)), yes) + OPT_DEFS += -DLOCAL_GLCDFONT +endif + +ifeq ($(strip $(AUDIO_ENABLE)),yes) + ifeq ($(strip $(RGBLIGHT_ENABLE)),yes) + LINK_TIME_OPTIMIZATION_ENABLE = yes + endif + ifeq ($(strip $(OLED_ENABLE)),yes) + LINK_TIME_OPTIMIZATION_ENABLE = yes + endif +endif + +ifneq ($(strip $(SHOW_HELIX_OPTIONS)),) + $(eval $(call HELIX_CUSTOMISE_MSG)) + ifneq ($(strip $(SHOW_VERBOSE_INFO)),) + $(info -- RGBLIGHT_ENABLE = $(RGBLIGHT_ENABLE)) + $(info -- OPT_DEFS = $(OPT_DEFS)) + $(info -- LINK_TIME_OPTIMIZATION_ENABLE = $(LINK_TIME_OPTIMIZATION_ENABLE)) + $(info ) + endif +endif diff --git a/keyboards/helix/pico/pico.h b/keyboards/helix/pico/pico.h index d9c57206c619..4360be2a9c1f 100644 --- a/keyboards/helix/pico/pico.h +++ b/keyboards/helix/pico/pico.h @@ -1,5 +1,4 @@ -#ifndef PICO_H -#define PICO_CONFIG_H +#pragma once #include "../helix.h" @@ -70,6 +69,3 @@ KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \ KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L36, KC_##R36, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35 \ ) - - -#endif diff --git a/keyboards/helix/pico/rules.mk b/keyboards/helix/pico/rules.mk index 75bf0a5ef8c4..e916f25f4502 100644 --- a/keyboards/helix/pico/rules.mk +++ b/keyboards/helix/pico/rules.mk @@ -1,2 +1,19 @@ +KEYBOARD_LOCAL_FEATURES_MK := $(dir $(lastword $(MAKEFILE_LIST)))local_features.mk + +SRC += local_drivers/i2c.c +SRC += local_drivers/serial.c +SRC += local_drivers/ssd1306.c +KEYBOARD_PATHS += $(HELIX_TOP_DIR)/local_drivers + +CUSTOM_MATRIX = yes + SRC += pico/matrix.c SRC += pico/split_util.c + +# Helix Spacific Build Options default values +OLED_ENABLE = no # OLED_ENABLE +LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c" +LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) +LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) +LED_ANIMATIONS = yes # LED animations +IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) diff --git a/keyboards/helix/pico/serial_config.h b/keyboards/helix/pico/serial_config.h deleted file mode 100644 index fc8736d4729e..000000000000 --- a/keyboards/helix/pico/serial_config.h +++ /dev/null @@ -1,9 +0,0 @@ -//// #error rev2 serial config - -#ifndef SOFT_SERIAL_PIN -/* Soft Serial defines */ -#define SOFT_SERIAL_PIN D2 - -#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 -#define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2 -#endif diff --git a/keyboards/helix/pico/under/rules.mk b/keyboards/helix/pico/under/rules.mk new file mode 100644 index 000000000000..a37aa6fab370 --- /dev/null +++ b/keyboards/helix/pico/under/rules.mk @@ -0,0 +1 @@ +LED_UNDERGLOW_ENABLE = yes diff --git a/keyboards/helix/pro_micro.h b/keyboards/helix/pro_micro.h deleted file mode 100644 index f9e7ed75d9d5..000000000000 --- a/keyboards/helix/pro_micro.h +++ /dev/null @@ -1,362 +0,0 @@ -/* - pins_arduino.h - Pin definition functions for Arduino - Part of Arduino - http://www.arduino.cc/ - - Copyright (c) 2007 David A. Mellis - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General - Public License along with this library; if not, write to the - Free Software Foundation, Inc., 59 Temple Place, Suite 330, - Boston, MA 02111-1307 USA - - $Id: wiring.h 249 2007-02-03 16:52:51Z mellis $ -*/ - -#ifndef Pins_Arduino_h -#define Pins_Arduino_h - -#include - -// Workaround for wrong definitions in "iom32u4.h". -// This should be fixed in the AVR toolchain. -#undef UHCON -#undef UHINT -#undef UHIEN -#undef UHADDR -#undef UHFNUM -#undef UHFNUML -#undef UHFNUMH -#undef UHFLEN -#undef UPINRQX -#undef UPINTX -#undef UPNUM -#undef UPRST -#undef UPCONX -#undef UPCFG0X -#undef UPCFG1X -#undef UPSTAX -#undef UPCFG2X -#undef UPIENX -#undef UPDATX -#undef TCCR2A -#undef WGM20 -#undef WGM21 -#undef COM2B0 -#undef COM2B1 -#undef COM2A0 -#undef COM2A1 -#undef TCCR2B -#undef CS20 -#undef CS21 -#undef CS22 -#undef WGM22 -#undef FOC2B -#undef FOC2A -#undef TCNT2 -#undef TCNT2_0 -#undef TCNT2_1 -#undef TCNT2_2 -#undef TCNT2_3 -#undef TCNT2_4 -#undef TCNT2_5 -#undef TCNT2_6 -#undef TCNT2_7 -#undef OCR2A -#undef OCR2_0 -#undef OCR2_1 -#undef OCR2_2 -#undef OCR2_3 -#undef OCR2_4 -#undef OCR2_5 -#undef OCR2_6 -#undef OCR2_7 -#undef OCR2B -#undef OCR2_0 -#undef OCR2_1 -#undef OCR2_2 -#undef OCR2_3 -#undef OCR2_4 -#undef OCR2_5 -#undef OCR2_6 -#undef OCR2_7 - -#define NUM_DIGITAL_PINS 30 -#define NUM_ANALOG_INPUTS 12 - -#define TX_RX_LED_INIT DDRD |= (1<<5), DDRB |= (1<<0) -#define TXLED0 PORTD |= (1<<5) -#define TXLED1 PORTD &= ~(1<<5) -#define RXLED0 PORTB |= (1<<0) -#define RXLED1 PORTB &= ~(1<<0) - -static const uint8_t SDA = 2; -static const uint8_t SCL = 3; -#define LED_BUILTIN 13 - -// Map SPI port to 'new' pins D14..D17 -static const uint8_t SS = 17; -static const uint8_t MOSI = 16; -static const uint8_t MISO = 14; -static const uint8_t SCK = 15; - -// Mapping of analog pins as digital I/O -// A6-A11 share with digital pins -static const uint8_t ADC0 = 18; -static const uint8_t ADC1 = 19; -static const uint8_t ADC2 = 20; -static const uint8_t ADC3 = 21; -static const uint8_t ADC4 = 22; -static const uint8_t ADC5 = 23; -static const uint8_t ADC6 = 24; // D4 -static const uint8_t ADC7 = 25; // D6 -static const uint8_t ADC8 = 26; // D8 -static const uint8_t ADC9 = 27; // D9 -static const uint8_t ADC10 = 28; // D10 -static const uint8_t ADC11 = 29; // D12 - -#define digitalPinToPCICR(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCICR) : ((uint8_t *)0)) -#define digitalPinToPCICRbit(p) 0 -#define digitalPinToPCMSK(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCMSK0) : ((uint8_t *)0)) -#define digitalPinToPCMSKbit(p) ( ((p) >= 8 && (p) <= 11) ? (p) - 4 : ((p) == 14 ? 3 : ((p) == 15 ? 1 : ((p) == 16 ? 2 : ((p) == 17 ? 0 : (p - A8 + 4)))))) - -// __AVR_ATmega32U4__ has an unusual mapping of pins to channels -extern const uint8_t PROGMEM analog_pin_to_channel_PGM[]; -#define analogPinToChannel(P) ( pgm_read_byte( analog_pin_to_channel_PGM + (P) ) ) - -#define digitalPinToInterrupt(p) ((p) == 0 ? 2 : ((p) == 1 ? 3 : ((p) == 2 ? 1 : ((p) == 3 ? 0 : ((p) == 7 ? 4 : NOT_AN_INTERRUPT))))) - -#ifdef ARDUINO_MAIN - -// On the Arduino board, digital pins are also used -// for the analog output (software PWM). Analog input -// pins are a separate set. - -// ATMEL ATMEGA32U4 / ARDUINO LEONARDO -// -// D0 PD2 RXD1/INT2 -// D1 PD3 TXD1/INT3 -// D2 PD1 SDA SDA/INT1 -// D3# PD0 PWM8/SCL OC0B/SCL/INT0 -// D4 A6 PD4 ADC8 -// D5# PC6 ??? OC3A/#OC4A -// D6# A7 PD7 FastPWM #OC4D/ADC10 -// D7 PE6 INT6/AIN0 -// -// D8 A8 PB4 ADC11/PCINT4 -// D9# A9 PB5 PWM16 OC1A/#OC4B/ADC12/PCINT5 -// D10# A10 PB6 PWM16 OC1B/0c4B/ADC13/PCINT6 -// D11# PB7 PWM8/16 0C0A/OC1C/#RTS/PCINT7 -// D12 A11 PD6 T1/#OC4D/ADC9 -// D13# PC7 PWM10 CLK0/OC4A -// -// A0 D18 PF7 ADC7 -// A1 D19 PF6 ADC6 -// A2 D20 PF5 ADC5 -// A3 D21 PF4 ADC4 -// A4 D22 PF1 ADC1 -// A5 D23 PF0 ADC0 -// -// New pins D14..D17 to map SPI port to digital pins -// -// MISO D14 PB3 MISO,PCINT3 -// SCK D15 PB1 SCK,PCINT1 -// MOSI D16 PB2 MOSI,PCINT2 -// SS D17 PB0 RXLED,SS/PCINT0 -// -// Connected LEDs on board for TX and RX -// TXLED D24 PD5 XCK1 -// RXLED D17 PB0 -// HWB PE2 HWB - -// these arrays map port names (e.g. port B) to the -// appropriate addresses for various functions (e.g. reading -// and writing) -const uint16_t PROGMEM port_to_mode_PGM[] = { - NOT_A_PORT, - NOT_A_PORT, - (uint16_t) &DDRB, - (uint16_t) &DDRC, - (uint16_t) &DDRD, - (uint16_t) &DDRE, - (uint16_t) &DDRF, -}; - -const uint16_t PROGMEM port_to_output_PGM[] = { - NOT_A_PORT, - NOT_A_PORT, - (uint16_t) &PORTB, - (uint16_t) &PORTC, - (uint16_t) &PORTD, - (uint16_t) &PORTE, - (uint16_t) &PORTF, -}; - -const uint16_t PROGMEM port_to_input_PGM[] = { - NOT_A_PORT, - NOT_A_PORT, - (uint16_t) &PINB, - (uint16_t) &PINC, - (uint16_t) &PIND, - (uint16_t) &PINE, - (uint16_t) &PINF, -}; - -const uint8_t PROGMEM digital_pin_to_port_PGM[] = { - PD, // D0 - PD2 - PD, // D1 - PD3 - PD, // D2 - PD1 - PD, // D3 - PD0 - PD, // D4 - PD4 - PC, // D5 - PC6 - PD, // D6 - PD7 - PE, // D7 - PE6 - - PB, // D8 - PB4 - PB, // D9 - PB5 - PB, // D10 - PB6 - PB, // D11 - PB7 - PD, // D12 - PD6 - PC, // D13 - PC7 - - PB, // D14 - MISO - PB3 - PB, // D15 - SCK - PB1 - PB, // D16 - MOSI - PB2 - PB, // D17 - SS - PB0 - - PF, // D18 - A0 - PF7 - PF, // D19 - A1 - PF6 - PF, // D20 - A2 - PF5 - PF, // D21 - A3 - PF4 - PF, // D22 - A4 - PF1 - PF, // D23 - A5 - PF0 - - PD, // D24 - PD5 - PD, // D25 / D6 - A7 - PD7 - PB, // D26 / D8 - A8 - PB4 - PB, // D27 / D9 - A9 - PB5 - PB, // D28 / D10 - A10 - PB6 - PD, // D29 / D12 - A11 - PD6 -}; - -const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] = { - _BV(2), // D0 - PD2 - _BV(3), // D1 - PD3 - _BV(1), // D2 - PD1 - _BV(0), // D3 - PD0 - _BV(4), // D4 - PD4 - _BV(6), // D5 - PC6 - _BV(7), // D6 - PD7 - _BV(6), // D7 - PE6 - - _BV(4), // D8 - PB4 - _BV(5), // D9 - PB5 - _BV(6), // D10 - PB6 - _BV(7), // D11 - PB7 - _BV(6), // D12 - PD6 - _BV(7), // D13 - PC7 - - _BV(3), // D14 - MISO - PB3 - _BV(1), // D15 - SCK - PB1 - _BV(2), // D16 - MOSI - PB2 - _BV(0), // D17 - SS - PB0 - - _BV(7), // D18 - A0 - PF7 - _BV(6), // D19 - A1 - PF6 - _BV(5), // D20 - A2 - PF5 - _BV(4), // D21 - A3 - PF4 - _BV(1), // D22 - A4 - PF1 - _BV(0), // D23 - A5 - PF0 - - _BV(5), // D24 - PD5 - _BV(7), // D25 / D6 - A7 - PD7 - _BV(4), // D26 / D8 - A8 - PB4 - _BV(5), // D27 / D9 - A9 - PB5 - _BV(6), // D28 / D10 - A10 - PB6 - _BV(6), // D29 / D12 - A11 - PD6 -}; - -const uint8_t PROGMEM digital_pin_to_timer_PGM[] = { - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - TIMER0B, /* 3 */ - NOT_ON_TIMER, - TIMER3A, /* 5 */ - TIMER4D, /* 6 */ - NOT_ON_TIMER, - - NOT_ON_TIMER, - TIMER1A, /* 9 */ - TIMER1B, /* 10 */ - TIMER0A, /* 11 */ - - NOT_ON_TIMER, - TIMER4A, /* 13 */ - - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, -}; - -const uint8_t PROGMEM analog_pin_to_channel_PGM[] = { - 7, // A0 PF7 ADC7 - 6, // A1 PF6 ADC6 - 5, // A2 PF5 ADC5 - 4, // A3 PF4 ADC4 - 1, // A4 PF1 ADC1 - 0, // A5 PF0 ADC0 - 8, // A6 D4 PD4 ADC8 - 10, // A7 D6 PD7 ADC10 - 11, // A8 D8 PB4 ADC11 - 12, // A9 D9 PB5 ADC12 - 13, // A10 D10 PB6 ADC13 - 9 // A11 D12 PD6 ADC9 -}; - -#endif /* ARDUINO_MAIN */ - -// These serial port names are intended to allow libraries and architecture-neutral -// sketches to automatically default to the correct port name for a particular type -// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN, -// the first hardware serial port whose RX/TX pins are not dedicated to another use. -// -// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor -// -// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial -// -// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library -// -// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins. -// -// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX -// pins are NOT connected to anything by default. -#define SERIAL_PORT_MONITOR Serial -#define SERIAL_PORT_USBVIRTUAL Serial -#define SERIAL_PORT_HARDWARE Serial1 -#define SERIAL_PORT_HARDWARE_OPEN Serial1 - -#endif /* Pins_Arduino_h */ diff --git a/keyboards/helix/rev1/config.h b/keyboards/helix/rev1/config.h index 61fe744728b1..1a5a2666411e 100644 --- a/keyboards/helix/rev1/config.h +++ b/keyboards/helix/rev1/config.h @@ -16,8 +16,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef REV1_CONFIG_H -#define REV1_CONFIG_H +#pragma once /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED @@ -27,25 +26,25 @@ along with this program. If not, see . #define PRODUCT Helix Alpha #define DESCRIPTION A split keyboard for the cheap makers +#include + #define HELIX_ROWS 5 /* key matrix size */ // Rows are doubled-up #if HELIX_ROWS == 3 #define MATRIX_ROWS 6 - #define MATRIX_COLS 6 #define MATRIX_ROW_PINS { D7, E6, B4 } #elif HELIX_ROWS == 4 #define MATRIX_ROWS 8 - #define MATRIX_COLS 6 #define MATRIX_ROW_PINS { D7, E6, B4, B5 } #elif HELIX_ROWS == 5 #define MATRIX_ROWS 10 - #define MATRIX_COLS 6 #define MATRIX_ROW_PINS { D7, E6, B4, B5, D4 } #else #error "expected HELIX_ROWS 3 or 4 or 5" #endif +#define MATRIX_COLS 6 // wiring of each half #define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 } @@ -86,5 +85,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/helix/rev1/keymaps/OLED_sample/keymap.c b/keyboards/helix/rev1/keymaps/OLED_sample/keymap.c index 6bee91786c32..cc73e36fb630 100644 --- a/keyboards/helix/rev1/keymaps/OLED_sample/keymap.c +++ b/keyboards/helix/rev1/keymaps/OLED_sample/keymap.c @@ -44,7 +44,7 @@ enum custom_keycodes { M_SAMPLE }; -#if HELIX_ROWS == 5 +#if MATRIX_ROWS == 10 // HELIX_ROWS == 5 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty @@ -174,7 +174,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -#elif HELIX_ROWS == 4 +#elif MATRIX_ROWS == 8 // HELIX_ROWS == 4 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/helix/rev1/keymaps/default/keymap.c b/keyboards/helix/rev1/keymaps/default/keymap.c index 43928a4185b3..299840e3dbc6 100644 --- a/keyboards/helix/rev1/keymaps/default/keymap.c +++ b/keyboards/helix/rev1/keymaps/default/keymap.c @@ -22,7 +22,7 @@ enum custom_keycodes { ADJUST, }; -#if HELIX_ROWS == 5 +#if MATRIX_ROWS == 10 // HELIX_ROWS == 5 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty @@ -152,7 +152,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -#elif HELIX_ROWS == 4 +#elif MATRIX_ROWS == 8 // HELIX_ROWS == 4 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/helix/rev1/rev1.h b/keyboards/helix/rev1/rev1.h index a8d6ff050748..b505845ada9e 100644 --- a/keyboards/helix/rev1/rev1.h +++ b/keyboards/helix/rev1/rev1.h @@ -1,5 +1,4 @@ -#ifndef REV1_H -#define REV1_CONFIG_H +#pragma once #include "../helix.h" @@ -13,7 +12,7 @@ #endif #endif -#if HELIX_ROWS == 3 +#if MATRIX_ROWS == 6 // HELIX_ROWS == 3 #ifndef FLIP_HALF // Standard Keymap // (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left) @@ -47,7 +46,7 @@ { R20, R21, R22, R23, R24, R25 }, \ } #endif -#elif HELIX_ROWS == 4 +#elif MATRIX_ROWS == 8 // HELIX_ROWS == 4 #ifndef FLIP_HALF // Standard Keymap // (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left) @@ -87,7 +86,7 @@ { R30, R31, R32, R33, R34, R35 } \ } #endif -#elif HELIX_ROWS == 5 +#elif MATRIX_ROWS == 10 // HELIX_ROWS == 5 #ifndef FLIP_HALF // Standard Keymap // (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left) @@ -138,7 +137,7 @@ #endif // Used to create a keymap using only KC_ prefixed keys -#if HELIX_ROWS == 3 +#if MATRIX_ROWS == 6 // HELIX_ROWS == 3 #define LAYOUT_kc( \ L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ @@ -149,7 +148,7 @@ KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \ KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25 \ ) -#elif HELIX_ROWS == 4 +#elif MATRIX_ROWS == 8 // HELIX_ROWS == 4 #define LAYOUT_kc( \ L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ @@ -179,4 +178,3 @@ ) #endif -#endif diff --git a/keyboards/helix/rev1/rules.mk b/keyboards/helix/rev1/rules.mk index 13834f5da10e..1418f017861a 100644 --- a/keyboards/helix/rev1/rules.mk +++ b/keyboards/helix/rev1/rules.mk @@ -1,3 +1,10 @@ +SRC += local_drivers/i2c.c +SRC += local_drivers/serial.c +SRC += local_drivers/ssd1306.c +KEYBOARD_PATHS += $(HELIX_TOP_DIR)/local_drivers + +CUSTOM_MATRIX = yes + SRC += rev1/matrix.c SRC += rev1/split_util.c diff --git a/keyboards/helix/rev2/back/oled/rules.mk b/keyboards/helix/rev2/back/oled/rules.mk new file mode 100644 index 000000000000..dd68e9d3b090 --- /dev/null +++ b/keyboards/helix/rev2/back/oled/rules.mk @@ -0,0 +1 @@ +OLED_ENABLE = yes diff --git a/keyboards/helix/rev2/back/rules.mk b/keyboards/helix/rev2/back/rules.mk new file mode 100644 index 000000000000..066fffb74af2 --- /dev/null +++ b/keyboards/helix/rev2/back/rules.mk @@ -0,0 +1 @@ +LED_BACK_ENABLE = yes diff --git a/keyboards/helix/rev2/config.h b/keyboards/helix/rev2/config.h index ec7445859478..fe82ce140fb8 100644 --- a/keyboards/helix/rev2/config.h +++ b/keyboards/helix/rev2/config.h @@ -16,8 +16,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef REV2_CONFIG_H -#define REV2_CONFIG_H +#pragma once /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED @@ -35,6 +34,10 @@ along with this program. If not, see . #define USE_SERIAL //#define USE_MATRIX_I2C +/* Soft Serial defines */ +#define SOFT_SERIAL_PIN D2 +#define SERIAL_USE_MULTI_TRANSACTION + /* Select hand configuration */ #define MASTER_LEFT // #define MASTER_RIGHT @@ -88,7 +91,7 @@ along with this program. If not, see . //#define RGBLIGHT_ANIMATIONS : see ./rules.mk: LED_ANIMATIONS = yes or no // see ./rules.mk: LED_BACK_ENABLE or LED_UNDERGLOW_ENABLE set yes #ifdef RGBLED_BACK - #if HELIX_ROWS == 4 + #if MATRIX_ROWS == 8 // HELIX_ROWS == 4 #define RGBLED_NUM 25 #else #define RGBLED_NUM 32 @@ -101,7 +104,7 @@ along with this program. If not, see . #if RGBLED_NUM <= 6 #define RGBLIGHT_LIMIT_VAL 255 #else - #if HELIX_ROWS == 4 + #if MATRIX_ROWS == 8 // HELIX_ROWS == 4 #define RGBLIGHT_LIMIT_VAL 130 #else #define RGBLIGHT_LIMIT_VAL 120 @@ -112,7 +115,7 @@ along with this program. If not, see . #if RGBLED_NUM <= 6 #define RGBLIGHT_LIMIT_VAL 90 #else - #if HELIX_ROWS == 4 + #if MATRIX_ROWS == 8 // HELIX_ROWS == 4 #define RGBLIGHT_LIMIT_VAL 45 #else #define RGBLIGHT_LIMIT_VAL 35 @@ -155,4 +158,3 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -#endif diff --git a/keyboards/helix/rev2/keymaps/default/keymap.c b/keyboards/helix/rev2/keymaps/default/keymap.c index a64eed3e72cb..2f4736add82f 100644 --- a/keyboards/helix/rev2/keymaps/default/keymap.c +++ b/keyboards/helix/rev2/keymaps/default/keymap.c @@ -53,7 +53,7 @@ enum macro_keycodes { //Macros #define M_SAMPLE M(KC_SAMPLEMACRO) -#if HELIX_ROWS == 5 +#if MATRIX_ROWS == 10 // HELIX_ROWS == 5 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty @@ -183,7 +183,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -#elif HELIX_ROWS == 4 +#elif MATRIX_ROWS == 8 // HELIX_ROWS == 4 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/helix/rev2/keymaps/default/readme.md b/keyboards/helix/rev2/keymaps/default/readme.md index 2cdc5506ca0b..c618c475251f 100644 --- a/keyboards/helix/rev2/keymaps/default/readme.md +++ b/keyboards/helix/rev2/keymaps/default/readme.md @@ -108,17 +108,16 @@ see `qmk_firmware/keyboards/helix/rev2/keymaps/default/rules.mk` ``` -# Helix keyboard customize -# you can edit follows 7 Variables -# jp: 以下の7つの変数を必要に応じて編集します。 -HELIX_ROWS = 5 # Helix Rows is 4 or 5 -OLED_ENABLE = no # OLED_ENABLE -LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c" -LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) -LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) -LED_ANIMATIONS = yes # LED animations -IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) - +# Helix Spacific Build Options +# you can uncomment and edit follows 7 Variables +# jp: 以下の7つの変数を必要に応じて編集し、コメントアウトをはずします。 +# HELIX_ROWS = 5 # Helix Rows is 4 or 5 +# OLED_ENABLE = no # OLED_ENABLE +# LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c" +# LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) +# LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) +# LED_ANIMATIONS = yes # LED animations +# IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) ``` ## Compile @@ -130,11 +129,24 @@ $ cd qmk_firmware build ``` $ make helix:default +$ make helix/rev2/back:default # with backlight +$ make HELIX=no_ani helix/rev2/back:default # with backlight without animation +$ make helix/rev2/under:default # with underglow +$ make helix/rev2/oled:default # with oled +$ make helix/rev2/oled/back:default # with oled and backlight +$ make helix/rev2/oled/under:default # with oled and underglow ``` flash to keyboard ``` -$ make helix:default:avrdude +$ make helix:default:flash +$ make helix/rev2/back:default:flash # with backlight +$ make HELIX=no_ani helix/rev2/back:default:flash # with backlight without animation +$ make helix/rev2/under:default:flash # with underglow +$ make helix/rev2/oled:default:flash # with oled +$ make helix/rev2/oled/back:default:flash # with oled and backlight +$ make helix/rev2/oled/under:default:flash # with oled and underglow + ``` ## Link diff --git a/keyboards/helix/rev2/keymaps/default/readme_jp.md b/keyboards/helix/rev2/keymaps/default/readme_jp.md index 3eaeab48ecf8..2dfab351b0c6 100644 --- a/keyboards/helix/rev2/keymaps/default/readme_jp.md +++ b/keyboards/helix/rev2/keymaps/default/readme_jp.md @@ -19,31 +19,6 @@ 他の配列(Colemak,Dvorak)は、[readme.md](readme.md) を参照 -## コンパイルの仕方 - -コンパイルは、qmk_firmware のトップディレクトリで行います。 - -``` -$ cd qmk_firmware -``` -qmk_firmwareでは各キーボードのコンパイルは、`<キーボード名>:<キーマップ名>`という指定で行います。 - -``` -$ make helix:default -``` - -キーボードへの書き込みまで同時に行うには下記のように`:avrdude`を付けます。 - -``` -$ make helix:default:avrdude -``` - -コンパイル結果と中間生成物を消去したい場合は以下のようにします。 - -``` -$ make helix:default:clean -``` - ## カスタマイズ Helix キーボードを4行版として製作したり、オプションの OLED をつけたり、 @@ -51,17 +26,16 @@ RGB バックライトまたは、RGB Underglow をつけた場合は、 `qmk_firmware/keyboards/helix/rev2/keymaps/default/rules.mk` の以下の部分を編集して機能を有効化してください。 ``` -# Helix keyboard customize -# you can edit follows 7 Variables -# jp: 以下の7つの変数を必要に応じて編集します。 -HELIX_ROWS = 5 # Helix Rows is 4 or 5 -OLED_ENABLE = no # OLED_ENABLE -LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c" -LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) -LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) -LED_ANIMATIONS = yes # LED animations -IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) - +# Helix Spacific Build Options +# you can uncomment and edit follows 7 Variables +# jp: 以下の7つの変数を必要に応じて編集し、コメントアウトをはずします。 +# HELIX_ROWS = 5 # Helix Rows is 4 or 5 +# OLED_ENABLE = no # OLED_ENABLE +# LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c" +# LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) +# LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) +# LED_ANIMATIONS = yes # LED animations +# IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) ``` ## 4行版Helix に対応する @@ -103,6 +77,58 @@ RBG Underglow や RGBバックライトの輝度を抑えて、iPad, iPhone に IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) ``` +## コンパイルの仕方 + +コンパイルは、qmk_firmware のトップディレクトリで行います。 + +``` +$ cd qmk_firmware +``` +qmk_firmwareでは各キーボードのコンパイルは、`<キーボード名>:<キーマップ名>`という指定で行います。 + +``` +$ make helix:default +``` + +キーボードへの書き込みまで同時に行うには下記のように`:flash`を付けます。 + +``` +$ make helix:default:flash +``` + +コンパイル結果と中間生成物を消去したい場合は以下のようにします。 + +``` +$ make helix:default:clean +``` + +上記の、rules.mk によるカスタマイズ項目の一部は下記のようにコマンド上で直接指定することも可能です。 + +OLED を有効にしてコンパイルしてキーボードへの書き込む。 +``` +$ make helix/rev2/oled:default:flash +``` + +RGB バックライトを有効にしてコンパイルしてキーボードへ書き込む。 +``` +$ make helix/rev2/back:default:flash +``` + +RGB Underglow を有効にしてコンパイルしてキーボードへ書き込む。 +``` +$ make helix/rev2/under:default:flash +``` + +OLED とRGB バックライトを有効にしてコンパイルしてキーボードへ書き込む。 +``` +$ make helix/rev2/oled/back:default:flash +``` + +OLED とRGB Underglowを有効にしてコンパイルしてキーボードへ書き込む。 +``` +$ make helix/rev2/oled/under:default:flash +``` + ## リンク * さらに詳細は、[こちら helix/Doc/firmware_jp.md](/~https://github.com/MakotoKurauchi/helix/blob/master/Doc/firmware_jp.md)をご覧ください。 diff --git a/keyboards/helix/rev2/keymaps/default/rules.mk b/keyboards/helix/rev2/keymaps/default/rules.mk index 37ef8632dee6..6a42fcf73fc1 100644 --- a/keyboards/helix/rev2/keymaps/default/rules.mk +++ b/keyboards/helix/rev2/keymaps/default/rules.mk @@ -1,124 +1,23 @@ - -# Build Options +# QMK Standard Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -SWAP_HANDS_ENABLE = no # Enable one-hand typing - -define HELIX_CUSTOMISE_MSG - $(info Helix customize) - $(info - OLED_ENABLE=$(OLED_ENABLE)) - $(info - LED_BACK_ENABLE=$(LED_BACK_ENABLE)) - $(info - LED_UNDERGLOW_ENABLE=$(LED_UNDERGLOW_ENABLE)) - $(info - LED_ANIMATION=$(LED_ANIMATIONS)) - $(info - IOS_DEVICE_ENABLE=$(IOS_DEVICE_ENABLE)) -endef - -# Helix keyboard customize -# you can edit follows 7 Variables -# jp: 以下の7つの変数を必要に応じて編集します。 -HELIX_ROWS = 5 # Helix Rows is 4 or 5 -OLED_ENABLE = no # OLED_ENABLE -LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c" -LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) -LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) -LED_ANIMATIONS = yes # LED animations -IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) -Link_Time_Optimization = no # if firmware size over limit, try this option - -#### LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE. -#### Do not enable these with audio at the same time. - -### Helix keyboard 'default' keymap: convenient command line option -## make HELIX= helix:defualt -## option= oled | back | under | na | ios -## ex. -## make HELIX=oled helix:defualt -## make HELIX=oled,back helix:defualt -## make HELIX=oled,under helix:defualt -## make HELIX=oled,back,na helix:defualt -## make HELIX=oled,back,ios helix:defualt -## -ifneq ($(strip $(HELIX)),) - ifeq ($(findstring oled,$(HELIX)), oled) - OLED_ENABLE = yes - endif - ifeq ($(findstring back,$(HELIX)), back) - LED_BACK_ENABLE = yes - else ifeq ($(findstring under,$(HELIX)), under) - LED_UNDERGLOW_ENABLE = yes - endif - ifeq ($(findstring na,$(HELIX)), na) - LED_ANIMATIONS = no - endif - ifeq ($(findstring ios,$(HELIX)), ios) - IOS_DEVICE_ENABLE = yes - endif - $(eval $(call HELIX_CUSTOMISE_MSG)) - $(info ) -endif - -# Uncomment these for checking -# jp: コンパイル時にカスタマイズの状態を表示したい時はコメントをはずします。 -# $(eval $(call HELIX_CUSTOMISE_MSG)) -# $(info ) - -ifneq ($(strip $(HELIX_ROWS)), 4) - ifneq ($(strip $(HELIX_ROWS)), 5) - $(error HELIX_ROWS = $(strip $(HELIX_ROWS)) is unexpected value) - endif -endif -OPT_DEFS += -DHELIX_ROWS=$(strip $(HELIX_ROWS)) - -ifeq ($(strip $(LED_BACK_ENABLE)), yes) - RGBLIGHT_ENABLE = yes - OPT_DEFS += -DRGBLED_BACK - ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) - $(eval $(call HELIX_CUSTOMISE_MSG)) - $(error LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE both 'yes') - endif -else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) - RGBLIGHT_ENABLE = yes -else - RGBLIGHT_ENABLE = no -endif - -ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) - OPT_DEFS += -DIOS_DEVICE_ENABLE -endif - -ifeq ($(strip $(LED_ANIMATIONS)), yes) - OPT_DEFS += -DLED_ANIMATIONS -endif - -ifeq ($(strip $(OLED_ENABLE)), yes) - OPT_DEFS += -DOLED_ENABLE -endif - -ifeq ($(strip $(LOCAL_GLCDFONT)), yes) - OPT_DEFS += -DLOCAL_GLCDFONT -endif - -ifeq ($(strip $(Link_Time_Optimization)),yes) - EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization -endif - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -# Uncomment these for debugging -# $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) -# $(info -- OPT_DEFS=$(OPT_DEFS)) -# $(info ) +# See TOP/keyboards/helix/rules.mk for a list of options that can be set. +# See TOP/docs/config_options.md for more information. +# +LINK_TIME_OPTIMIZATION_ENABLE = no # if firmware size over limit, try this option + +# Helix Spacific Build Options +# you can uncomment and edit follows 7 Variables +# jp: 以下の7つの変数を必要に応じて編集し、コメントアウトをはずします。 +# HELIX_ROWS = 5 # Helix Rows is 4 or 5 +# OLED_ENABLE = no # OLED_ENABLE +# LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c" +# LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) +# LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) +# LED_ANIMATIONS = yes # LED animations +# IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) + +# convert Helix-specific options (that represent combinations of standard options) +# into QMK standard options. +include $(strip $(KEYBOARD_LOCAL_FEATURES_MK)) diff --git a/keyboards/helix/rev2/keymaps/edvorakjp/rules.mk b/keyboards/helix/rev2/keymaps/edvorakjp/rules.mk index 4a96517eb98e..e30690029bb8 100644 --- a/keyboards/helix/rev2/keymaps/edvorakjp/rules.mk +++ b/keyboards/helix/rev2/keymaps/edvorakjp/rules.mk @@ -1,128 +1,38 @@ -# Build Options +# QMK Standard Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -SWAP_HANDS_ENABLE = no # Enable one-hand typing +# See TOP/keyboards/helix/rules.mk for a list of options that can be set. +# See TOP/docs/config_options.md for more information. +# +LINK_TIME_OPTIMIZATION_ENABLE = no # if firmware size over limit, try this option TAP_DANCE_ENABLE = yes -define HELIX_CUSTOMISE_MSG - $(info Helix customize) - $(info - OLED_ENABLE=$(OLED_ENABLE)) - $(info - LED_BACK_ENABLE=$(LED_BACK_ENABLE)) - $(info - LED_UNDERGLOW_ENABLE=$(LED_UNDERGLOW_ENABLE)) - $(info - LED_ANIMATION=$(LED_ANIMATIONS)) - $(info - IOS_DEVICE_ENABLE=$(IOS_DEVICE_ENABLE)) -endef - -# Helix keyboard customize -# you can edit follows 7 Variables -# jp: 以下の7つの変数を必要に応じて編集します。 -HELIX_ROWS = 5 # Helix Rows is 4 or 5 -OLED_ENABLE = no # OLED_ENABLE -LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" instead of "common/glcdfont.c" -LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) -LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) -LED_ANIMATIONS = yes # LED animations -IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) -Link_Time_Optimization = no # if firmware size over limit, try this option - -#### LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE. -#### Do not enable these with audio at the same time. - -### Helix keyboard 'edvorakjp' keymap: convenient command line option -## make HELIX= helix:edvorakjp -## option= oled | back | under | na | ios -## ex. -## make HELIX=oled helix:edvorakjp -## make HELIX=oled,back helix:edvorakjp -## make HELIX=oled,under helix:edvorakjp -## make HELIX=oled,back,na helix:edvorakjp -## make HELIX=oled,back,ios helix:edvorakjp -## -ifneq ($(strip $(HELIX)),) - ifeq ($(findstring oled,$(HELIX)), oled) - OLED_ENABLE = yes - endif - ifeq ($(findstring back,$(HELIX)), back) - LED_BACK_ENABLE = yes - else ifeq ($(findstring under,$(HELIX)), under) - LED_UNDERGLOW_ENABLE = yes - endif - ifeq ($(findstring na,$(HELIX)), na) - LED_ANIMATIONS = no - endif - ifeq ($(findstring ios,$(HELIX)), ios) - IOS_DEVICE_ENABLE = yes - endif - $(eval $(call HELIX_CUSTOMISE_MSG)) - $(info ) -endif - -# Uncomment these for checking -# jp: コンパイル時にカスタマイズの状態を表示したい時はコメントをはずします。 -# $(eval $(call HELIX_CUSTOMISE_MSG)) -# $(info ) +# Helix Spacific Build Options +# you can uncomment and edit follows 7 Variables +# jp: 以下の7つの変数を必要に応じて編集し、コメントアウトをはずします。 +# HELIX_ROWS = 5 # Helix Rows is 4 or 5 +# OLED_ENABLE = no # OLED_ENABLE +# LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" instead of "common/glcdfont.c" +# LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) +# LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) +# LED_ANIMATIONS = yes # LED animations +# IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) + +# convert Helix-specific options (that represent combinations of standard options) +# into QMK standard options. +include $(strip $(KEYBOARD_LOCAL_FEATURES_MK)) ifeq ($(strip $(HELIX_ROWS)), 4) SRC += keymap_4rows.c else ifeq ($(strip $(HELIX_ROWS)), 5) SRC += keymap_5rows.c -else - $(error HELIX_ROWS = $(strip $(HELIX_ROWS)) is unexpected value) endif -OPT_DEFS += -DHELIX_ROWS=$(strip $(HELIX_ROWS)) -ifeq ($(strip $(LED_BACK_ENABLE)), yes) - RGBLIGHT_ENABLE = yes - OPT_DEFS += -DRGBLED_BACK - ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) - $(eval $(call HELIX_CUSTOMISE_MSG)) - $(error LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE both 'yes') - endif -else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) - RGBLIGHT_ENABLE = yes +ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) OPT_DEFS += -DRGBLED_BACK -else - RGBLIGHT_ENABLE = no -endif - -ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) - OPT_DEFS += -DIOS_DEVICE_ENABLE -endif - -ifeq ($(strip $(LED_ANIMATIONS)), yes) - OPT_DEFS += -DLED_ANIMATIONS endif ifeq ($(strip $(OLED_ENABLE)), yes) - OPT_DEFS += -DOLED_ENABLE SRC += oled.c endif - -ifeq ($(strip $(LOCAL_GLCDFONT)), yes) - OPT_DEFS += -DLOCAL_GLCDFONT -endif - -ifeq ($(strip $(Link_Time_Optimization)),yes) - EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization -endif - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -# Uncomment these for debugging -# $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) -# $(info -- OPT_DEFS=$(OPT_DEFS)) -# $(info ) diff --git a/keyboards/helix/rev2/keymaps/five_rows/keymap.c b/keyboards/helix/rev2/keymaps/five_rows/keymap.c index 7b7d573d6a4a..eb73881c6ba9 100644 --- a/keyboards/helix/rev2/keymaps/five_rows/keymap.c +++ b/keyboards/helix/rev2/keymaps/five_rows/keymap.c @@ -67,7 +67,7 @@ enum custom_keycodes { #define KC_LSLB LSFT(KC_LBRC) #define ___ _______ -#if HELIX_ROWS == 5 +#if MATRIX_ROWS == 10 // HELIX_ROWS == 5 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/helix/rev2/keymaps/five_rows/rules.mk b/keyboards/helix/rev2/keymaps/five_rows/rules.mk index a0bf21917b15..fb564b6e0424 100644 --- a/keyboards/helix/rev2/keymaps/five_rows/rules.mk +++ b/keyboards/helix/rev2/keymaps/five_rows/rules.mk @@ -1,131 +1,35 @@ - -# Build Options +# QMK Standard Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -# CONSOLE_ENABLE and COMMAND_ENABLE -# yes, no +1500 -# yes, yes +3200 -# no, yes +400 -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -SWAP_HANDS_ENABLE = no # Enable one-hand typing - -define HELIX_CUSTOMISE_MSG - $(info Helix customize) - $(info - OLED_ENABLE=$(OLED_ENABLE)) - $(info - LED_BACK_ENABLE=$(LED_BACK_ENABLE)) - $(info - LED_UNDERGLOW_ENABLE=$(LED_UNDERGLOW_ENABLE)) - $(info - LED_ANIMATION=$(LED_ANIMATIONS)) - $(info - IOS_DEVICE_ENABLE=$(IOS_DEVICE_ENABLE)) -endef - -# Helix keyboard customize -# you can edit follows 7 Variables -# jp: 以下の7つの変数を必要に応じて編集します。 +# See TOP/keyboards/helix/rules.mk for a list of options that can be set. +# See TOP/docs/config_options.md for more information. +# + CONSOLE_ENABLE = no # Console for debug + COMMAND_ENABLE = no # Commands for debug and configuration + # CONSOLE_ENABLE and COMMAND_ENABLE + # yes, no +1500 + # yes, yes +3200 + # no, yes +400 +LINK_TIME_OPTIMIZATION_ENABLE = no # if firmware size over limit, try this option + +# Helix Spacific Build Options +# you can uncomment and edit follows 7 Variables +# jp: 以下の7つの変数を必要に応じて編集し、コメントアウトをはずします。 HELIX_ROWS = 5 # Helix Rows is 4 or 5 -OLED_ENABLE = no # OLED_ENABLE -LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c" -LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) -LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) -LED_ANIMATIONS = yes # LED animations -IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) -Link_Time_Optimization = no # if firmware size over limit, try this option +# OLED_ENABLE = no # OLED_ENABLE +# LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c" +# LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) +# LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) +# LED_ANIMATIONS = yes # LED animations +# IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) -#### LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE. -#### Do not enable these with audio at the same time. - -### Helix keyboard 'five_rows' keymap: convenient command line option -## make HELIX= helix:five_rows -## option= oled | back | under | na | ios -## ex. -## make HELIX=oled helix:five_rows -## make HELIX=oled,back helix:five_rows -## make HELIX=oled,under helix:five_rows -## make HELIX=oled,back,na helix:five_rows -## make HELIX=oled,back,ios helix:five_rows -## ifneq ($(strip $(HELIX)),) - ifeq ($(findstring oled,$(HELIX)), oled) - OLED_ENABLE = yes - endif - ifeq ($(findstring back,$(HELIX)), back) - LED_BACK_ENABLE = yes - else ifeq ($(findstring under,$(HELIX)), under) - LED_UNDERGLOW_ENABLE = yes - endif - ifeq ($(findstring na,$(HELIX)), na) - LED_ANIMATIONS = no - endif - ifeq ($(findstring ios,$(HELIX)), ios) - IOS_DEVICE_ENABLE = yes - endif ifeq ($(findstring console,$(HELIX)), console) CONSOLE_ENABLE = yes endif - $(eval $(call HELIX_CUSTOMISE_MSG)) - $(info ) endif -# Uncomment these for checking -# jp: コンパイル時にカスタマイズの状態を表示したい時はコメントをはずします。 -# $(eval $(call HELIX_CUSTOMISE_MSG)) -# $(info ) - -ifneq ($(strip $(HELIX_ROWS)), 4) -ifneq ($(strip $(HELIX_ROWS)), 5) -$(error HELIX_ROWS = $(strip $(HELIX_ROWS)) is unexpected value) -endif -endif -OPT_DEFS += -DHELIX_ROWS=$(strip $(HELIX_ROWS)) - -ifeq ($(strip $(LED_BACK_ENABLE)), yes) - RGBLIGHT_ENABLE = yes - OPT_DEFS += -DRGBLED_BACK - ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) - $(eval $(call HELIX_CUSTOMISE_MSG)) - $(error LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE both 'yes') - endif -else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) - RGBLIGHT_ENABLE = yes -else - RGBLIGHT_ENABLE = no -endif - -ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) - OPT_DEFS += -DIOS_DEVICE_ENABLE -endif - -ifeq ($(strip $(LED_ANIMATIONS)), yes) - OPT_DEFS += -DLED_ANIMATIONS -endif - -ifeq ($(strip $(OLED_ENABLE)), yes) - OPT_DEFS += -DOLED_ENABLE -endif - -ifeq ($(strip $(LOCAL_GLCDFONT)), yes) - OPT_DEFS += -DLOCAL_GLCDFONT -endif - -ifeq ($(strip $(Link_Time_Optimization)),yes) - EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization -endif - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -# Uncomment these for debugging -# $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) -# $(info -- OPT_DEFS=$(OPT_DEFS)) -# $(info ) +# convert Helix-specific options (that represent combinations of standard options) +# into QMK standard options. +include $(strip $(KEYBOARD_LOCAL_FEATURES_MK)) diff --git a/keyboards/helix/rev2/keymaps/five_rows_jis/keymap.c b/keyboards/helix/rev2/keymaps/five_rows_jis/keymap.c index be76dffbe401..0dae2524d844 100644 --- a/keyboards/helix/rev2/keymaps/five_rows_jis/keymap.c +++ b/keyboards/helix/rev2/keymaps/five_rows_jis/keymap.c @@ -55,7 +55,7 @@ enum custom_keycodes { #define ML_RAIE MO(_RAI_E) #define ML_ADJ MO(_ADJUST) -#if HELIX_ROWS == 5 +#if MATRIX_ROWS == 10 // HELIX_ROWS == 5 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty JIS Normal * ,-----------------------------------------. ,-----------------------------------------. diff --git a/keyboards/helix/rev2/keymaps/five_rows_jis/rules.mk b/keyboards/helix/rev2/keymaps/five_rows_jis/rules.mk index 37ef8632dee6..6c2057cfd6fa 100644 --- a/keyboards/helix/rev2/keymaps/five_rows_jis/rules.mk +++ b/keyboards/helix/rev2/keymaps/five_rows_jis/rules.mk @@ -1,124 +1,23 @@ - -# Build Options +# QMK Standard Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -SWAP_HANDS_ENABLE = no # Enable one-hand typing - -define HELIX_CUSTOMISE_MSG - $(info Helix customize) - $(info - OLED_ENABLE=$(OLED_ENABLE)) - $(info - LED_BACK_ENABLE=$(LED_BACK_ENABLE)) - $(info - LED_UNDERGLOW_ENABLE=$(LED_UNDERGLOW_ENABLE)) - $(info - LED_ANIMATION=$(LED_ANIMATIONS)) - $(info - IOS_DEVICE_ENABLE=$(IOS_DEVICE_ENABLE)) -endef +# See TOP/keyboards/helix/rules.mk for a list of options that can be set. +# See TOP/docs/config_options.md for more information. +# +LINK_TIME_OPTIMIZATION_ENABLE = no # if firmware size over limit, try this option -# Helix keyboard customize -# you can edit follows 7 Variables -# jp: 以下の7つの変数を必要に応じて編集します。 +# Helix Spacific Build Options +# you can uncomment and edit follows 7 Variables +# jp: 以下の7つの変数を必要に応じて編集し、コメントアウトをはずします。 HELIX_ROWS = 5 # Helix Rows is 4 or 5 -OLED_ENABLE = no # OLED_ENABLE -LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c" -LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) -LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) -LED_ANIMATIONS = yes # LED animations -IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) -Link_Time_Optimization = no # if firmware size over limit, try this option - -#### LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE. -#### Do not enable these with audio at the same time. - -### Helix keyboard 'default' keymap: convenient command line option -## make HELIX= helix:defualt -## option= oled | back | under | na | ios -## ex. -## make HELIX=oled helix:defualt -## make HELIX=oled,back helix:defualt -## make HELIX=oled,under helix:defualt -## make HELIX=oled,back,na helix:defualt -## make HELIX=oled,back,ios helix:defualt -## -ifneq ($(strip $(HELIX)),) - ifeq ($(findstring oled,$(HELIX)), oled) - OLED_ENABLE = yes - endif - ifeq ($(findstring back,$(HELIX)), back) - LED_BACK_ENABLE = yes - else ifeq ($(findstring under,$(HELIX)), under) - LED_UNDERGLOW_ENABLE = yes - endif - ifeq ($(findstring na,$(HELIX)), na) - LED_ANIMATIONS = no - endif - ifeq ($(findstring ios,$(HELIX)), ios) - IOS_DEVICE_ENABLE = yes - endif - $(eval $(call HELIX_CUSTOMISE_MSG)) - $(info ) -endif - -# Uncomment these for checking -# jp: コンパイル時にカスタマイズの状態を表示したい時はコメントをはずします。 -# $(eval $(call HELIX_CUSTOMISE_MSG)) -# $(info ) - -ifneq ($(strip $(HELIX_ROWS)), 4) - ifneq ($(strip $(HELIX_ROWS)), 5) - $(error HELIX_ROWS = $(strip $(HELIX_ROWS)) is unexpected value) - endif -endif -OPT_DEFS += -DHELIX_ROWS=$(strip $(HELIX_ROWS)) - -ifeq ($(strip $(LED_BACK_ENABLE)), yes) - RGBLIGHT_ENABLE = yes - OPT_DEFS += -DRGBLED_BACK - ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) - $(eval $(call HELIX_CUSTOMISE_MSG)) - $(error LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE both 'yes') - endif -else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) - RGBLIGHT_ENABLE = yes -else - RGBLIGHT_ENABLE = no -endif - -ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) - OPT_DEFS += -DIOS_DEVICE_ENABLE -endif - -ifeq ($(strip $(LED_ANIMATIONS)), yes) - OPT_DEFS += -DLED_ANIMATIONS -endif - -ifeq ($(strip $(OLED_ENABLE)), yes) - OPT_DEFS += -DOLED_ENABLE -endif - -ifeq ($(strip $(LOCAL_GLCDFONT)), yes) - OPT_DEFS += -DLOCAL_GLCDFONT -endif - -ifeq ($(strip $(Link_Time_Optimization)),yes) - EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization -endif - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -# Uncomment these for debugging -# $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) -# $(info -- OPT_DEFS=$(OPT_DEFS)) -# $(info ) +# OLED_ENABLE = no # OLED_ENABLE +# LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c" +# LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) +# LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) +# LED_ANIMATIONS = yes # LED animations +# IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) + +# convert Helix-specific options (that represent combinations of standard options) +# into QMK standard options. +include $(strip $(KEYBOARD_LOCAL_FEATURES_MK)) diff --git a/keyboards/helix/rev2/keymaps/froggy/keymap.c b/keyboards/helix/rev2/keymaps/froggy/keymap.c index c27c1320c4e8..15fe1afb0cb9 100644 --- a/keyboards/helix/rev2/keymaps/froggy/keymap.c +++ b/keyboards/helix/rev2/keymaps/froggy/keymap.c @@ -64,7 +64,7 @@ enum macro_keycodes { //Macros #define M_SAMPLE M(KC_SAMPLEMACRO) -#if HELIX_ROWS == 5 +#if MATRIX_ROWS == 10 // HELIX_ROWS == 5 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Base diff --git a/keyboards/helix/rev2/keymaps/froggy/rules.mk b/keyboards/helix/rev2/keymaps/froggy/rules.mk index 8cd0efdd4d9d..bea059ca16d5 100644 --- a/keyboards/helix/rev2/keymaps/froggy/rules.mk +++ b/keyboards/helix/rev2/keymaps/froggy/rules.mk @@ -1,124 +1,23 @@ - -# Build Options +# QMK Standard Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -SWAP_HANDS_ENABLE = no # Enable one-hand typing - -define HELIX_CUSTOMISE_MSG - $(info Helix customize) - $(info - OLED_ENABLE=$(OLED_ENABLE)) - $(info - LED_BACK_ENABLE=$(LED_BACK_ENABLE)) - $(info - LED_UNDERGLOW_ENABLE=$(LED_UNDERGLOW_ENABLE)) - $(info - LED_ANIMATION=$(LED_ANIMATIONS)) - $(info - IOS_DEVICE_ENABLE=$(IOS_DEVICE_ENABLE)) -endef +# See TOP/keyboards/helix/rules.mk for a list of options that can be set. +# See TOP/docs/config_options.md for more information. +# +LINK_TIME_OPTIMIZATION_ENABLE = no # if firmware size over limit, try this option -# Helix keyboard customize -# you can edit follows 7 Variables -# jp: 以下の7つの変数を必要に応じて編集します。 +# Helix Spacific Build Options +# you can uncomment and edit follows 7 Variables +# jp: 以下の7つの変数を必要に応じて編集し、コメントアウトをはずします。 HELIX_ROWS = 5 # Helix Rows is 4 or 5 -OLED_ENABLE = yes # OLED_ENABLE -LOCAL_GLCDFONT = yes # use each keymaps "helixfont.h" insted of "common/glcdfont.c" -LED_BACK_ENABLE = yes # LED backlight (Enable WS2812 RGB underlight.) +OLED_ENABLE = yes # OLED_ENABLE +LOCAL_GLCDFONT = yes # use each keymaps "helixfont.h" insted of "common/glcdfont.c" +LED_BACK_ENABLE = yes # LED backlight (Enable WS2812 RGB underlight.) LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) LED_ANIMATIONS = yes # LED animations -IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) -Link_Time_Optimization = no # if firmware size over limit, try this option - -#### LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE. -#### Do not enable these with audio at the same time. - -### Helix keyboard 'default' keymap: convenient command line option -## make HELIX= helix:defualt -## option= oled | back | under | na | ios -## ex. -## make HELIX=oled helix:defualt -## make HELIX=oled,back helix:defualt -## make HELIX=oled,under helix:defualt -## make HELIX=oled,back,na helix:defualt -## make HELIX=oled,back,ios helix:defualt -## -ifneq ($(strip $(HELIX)),) - ifeq ($(findstring oled,$(HELIX)), oled) - OLED_ENABLE = yes - endif - ifeq ($(findstring back,$(HELIX)), back) - LED_BACK_ENABLE = yes - else ifeq ($(findstring under,$(HELIX)), under) - LED_UNDERGLOW_ENABLE = yes - endif - ifeq ($(findstring na,$(HELIX)), na) - LED_ANIMATIONS = no - endif - ifeq ($(findstring ios,$(HELIX)), ios) - IOS_DEVICE_ENABLE = yes - endif - $(eval $(call HELIX_CUSTOMISE_MSG)) - $(info ) -endif - -# Uncomment these for checking -# jp: コンパイル時にカスタマイズの状態を表示したい時はコメントをはずします。 -# $(eval $(call HELIX_CUSTOMISE_MSG)) -# $(info ) - -ifneq ($(strip $(HELIX_ROWS)), 4) - ifneq ($(strip $(HELIX_ROWS)), 5) - $(error HELIX_ROWS = $(strip $(HELIX_ROWS)) is unexpected value) - endif -endif -OPT_DEFS += -DHELIX_ROWS=$(strip $(HELIX_ROWS)) - -ifeq ($(strip $(LED_BACK_ENABLE)), yes) - RGBLIGHT_ENABLE = yes - OPT_DEFS += -DRGBLED_BACK - ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) - $(eval $(call HELIX_CUSTOMISE_MSG)) - $(error LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE both 'yes') - endif -else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) - RGBLIGHT_ENABLE = yes -else - RGBLIGHT_ENABLE = no -endif - -ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) - OPT_DEFS += -DIOS_DEVICE_ENABLE -endif - -ifeq ($(strip $(LED_ANIMATIONS)), yes) - OPT_DEFS += -DLED_ANIMATIONS -endif - -ifeq ($(strip $(OLED_ENABLE)), yes) - OPT_DEFS += -DOLED_ENABLE -endif - -ifeq ($(strip $(LOCAL_GLCDFONT)), yes) - OPT_DEFS += -DLOCAL_GLCDFONT -endif - -ifeq ($(strip $(Link_Time_Optimization)),yes) - EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization -endif - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) -# Uncomment these for debugging -# $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) -# $(info -- OPT_DEFS=$(OPT_DEFS)) -# $(info ) +# convert Helix-specific options (that represent combinations of standard options) +# into QMK standard options. +include $(strip $(KEYBOARD_LOCAL_FEATURES_MK)) diff --git a/keyboards/helix/rev2/keymaps/led_test/README.md b/keyboards/helix/rev2/keymaps/led_test/README.md index a25f3f36fe76..2fe670645277 100644 --- a/keyboards/helix/rev2/keymaps/led_test/README.md +++ b/keyboards/helix/rev2/keymaps/led_test/README.md @@ -23,5 +23,5 @@ $ make helix:led_test Execute the 'make' command and press the reset switch on the keyboard. ``` -$ make helix:led_test:avrdude +$ make helix:led_test:flash ``` diff --git a/keyboards/helix/rev2/keymaps/led_test/rules.mk b/keyboards/helix/rev2/keymaps/led_test/rules.mk index 2062d348d1f1..fb0b5a547622 100644 --- a/keyboards/helix/rev2/keymaps/led_test/rules.mk +++ b/keyboards/helix/rev2/keymaps/led_test/rules.mk @@ -1,126 +1,25 @@ - -# Build Options +# QMK Standard Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -SWAP_HANDS_ENABLE = no # Enable one-hand typing - -define HELIX_CUSTOMISE_MSG - $(info Helix customize) - $(info - OLED_ENABLE=$(OLED_ENABLE)) - $(info - LED_BACK_ENABLE=$(LED_BACK_ENABLE)) - $(info - LED_UNDERGLOW_ENABLE=$(LED_UNDERGLOW_ENABLE)) - $(info - LED_ANIMATION=$(LED_ANIMATIONS)) - $(info - IOS_DEVICE_ENABLE=$(IOS_DEVICE_ENABLE)) -endef +# See TOP/keyboards/helix/rules.mk for a list of options that can be set. +# See TOP/docs/config_options.md for more information. +# +LINK_TIME_OPTIMIZATION_ENABLE = no # if firmware size over limit, try this option -# Helix keyboard customize -# you can edit follows 7 Variables -# jp: 以下の7つの変数を必要に応じて編集します。 -HELIX_ROWS = 5 # Helix Rows is 4 or 5 +# Helix Spacific Build Options +# you can uncomment and edit follows 7 Variables +# jp: 以下の7つの変数を必要に応じて編集し、コメントアウトをはずします。 +# HELIX_ROWS = 5 # Helix Rows is 4 or 5 OLED_ENABLE = yes # OLED_ENABLE -LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c" +# LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c" LED_BACK_ENABLE = yes # LED backlight (Enable WS2812 RGB underlight.) -LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) +# LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) LED_ANIMATIONS = yes # LED animations -IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) -Link_Time_Optimization = no # if firmware size over limit, try this option - -#### LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE. -#### Do not enable these with audio at the same time. - -### Helix keyboard 'default' keymap: convenient command line option -## make HELIX= helix:defualt -## option= oled | back | under | na | ios -## ex. -## make HELIX=oled helix:defualt -## make HELIX=oled,back helix:defualt -## make HELIX=oled,under helix:defualt -## make HELIX=oled,back,na helix:defualt -## make HELIX=oled,back,ios helix:defualt -## -ifneq ($(strip $(HELIX)),) - ifeq ($(findstring oled,$(HELIX)), oled) - OLED_ENABLE = yes - endif - ifeq ($(findstring back,$(HELIX)), back) - LED_BACK_ENABLE = yes - else ifeq ($(findstring under,$(HELIX)), under) - LED_UNDERGLOW_ENABLE = yes - endif - ifeq ($(findstring na,$(HELIX)), na) - LED_ANIMATIONS = no - endif - ifeq ($(findstring ios,$(HELIX)), ios) - IOS_DEVICE_ENABLE = yes - endif - $(eval $(call HELIX_CUSTOMISE_MSG)) - $(info ) -endif - -# Uncomment these for checking -# jp: コンパイル時にカスタマイズの状態を表示したい時はコメントをはずします。 -# $(eval $(call HELIX_CUSTOMISE_MSG)) -# $(info ) - -ifneq ($(strip $(HELIX_ROWS)), 4) - ifneq ($(strip $(HELIX_ROWS)), 5) - $(error HELIX_ROWS = $(strip $(HELIX_ROWS)) is unexpected value) - endif -endif -OPT_DEFS += -DHELIX_ROWS=$(strip $(HELIX_ROWS)) - -ifeq ($(strip $(LED_BACK_ENABLE)), yes) - RGBLIGHT_ENABLE = yes - OPT_DEFS += -DRGBLED_BACK - ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) - $(eval $(call HELIX_CUSTOMISE_MSG)) - $(error LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE both 'yes') - endif -else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) - RGBLIGHT_ENABLE = yes -else - RGBLIGHT_ENABLE = no -endif - -ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) - OPT_DEFS += -DIOS_DEVICE_ENABLE -endif - -ifeq ($(strip $(LED_ANIMATIONS)), yes) - OPT_DEFS += -DLED_ANIMATIONS -endif - -ifeq ($(strip $(OLED_ENABLE)), yes) - OPT_DEFS += -DOLED_ENABLE -endif - -ifeq ($(strip $(LOCAL_GLCDFONT)), yes) - OPT_DEFS += -DLOCAL_GLCDFONT -endif - -ifeq ($(strip $(Link_Time_Optimization)),yes) - EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization -endif +# IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) SRC += led_test_init.c -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -# Uncomment these for debugging -# $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) -# $(info -- OPT_DEFS=$(OPT_DEFS)) -# $(info ) +# convert Helix-specific options (that represent combinations of standard options) +# into QMK standard options. +include $(strip $(KEYBOARD_LOCAL_FEATURES_MK)) diff --git a/keyboards/helix/rev2/keymaps/yshrsmz/keymap.c b/keyboards/helix/rev2/keymaps/yshrsmz/keymap.c index 5240ac800cbe..e5b5f57d970c 100644 --- a/keyboards/helix/rev2/keymaps/yshrsmz/keymap.c +++ b/keyboards/helix/rev2/keymaps/yshrsmz/keymap.c @@ -49,7 +49,7 @@ enum macro_keycodes { //Macros #define M_SAMPLE M(KC_SAMPLEMACRO) -#if HELIX_ROWS == 5 +#if MATRIX_ROWS == 10 // HELIX_ROWS == 5 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty @@ -158,7 +158,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -#elif HELIX_ROWS == 4 +#elif MATRIX_ROWS == 8 // HELIX_ROWS == 4 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/helix/rev2/keymaps/yshrsmz/rules.mk b/keyboards/helix/rev2/keymaps/yshrsmz/rules.mk index 3f390b48f86f..bc823e5e12f0 100644 --- a/keyboards/helix/rev2/keymaps/yshrsmz/rules.mk +++ b/keyboards/helix/rev2/keymaps/yshrsmz/rules.mk @@ -1,121 +1,24 @@ - -# Build Options +# QMK Standard Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -SWAP_HANDS_ENABLE = no # Enable one-hand typing - -define HELIX_CUSTOMISE_MSG - $(info Helix customize) - $(info - OLED_ENABLE=$(OLED_ENABLE)) - $(info - LED_BACK_ENABLE=$(LED_BACK_ENABLE)) - $(info - LED_UNDERGLOW_ENABLE=$(LED_UNDERGLOW_ENABLE)) - $(info - LED_ANIMATION=$(LED_ANIMATIONS)) - $(info - IOS_DEVICE_ENABLE=$(IOS_DEVICE_ENABLE)) -endef +# See TOP/keyboards/helix/rules.mk for a list of options that can be set. +# See TOP/docs/config_options.md for more information. +# +LINK_TIME_OPTIMIZATION_ENABLE = no # if firmware size over limit, try this option +AUTO_SHIFT_ENABLE = yes -# Helix keyboard customize -# you can edit follows 7 Variables -# jp: 以下の7つの変数を必要に応じて編集します。 +# Helix Spacific Build Options +# you can uncomment and edit follows 7 Variables +# jp: 以下の7つの変数を必要に応じて編集し、コメントアウトをはずします。 HELIX_ROWS = 4 # Helix Rows is 4 or 5 OLED_ENABLE = yes # OLED_ENABLE -LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c" -LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) -LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) +# LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c" +# LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) +# LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) LED_ANIMATIONS = no # LED animations -IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) - -#### LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE. -#### Do not enable these with audio at the same time. - -### Helix keyboard 'default' keymap: convenient command line option -## make HELIX= helix:defualt -## option= oled | back | under | na | ios -## ex. -## make HELIX=oled helix:defualt -## make HELIX=oled,back helix:defualt -## make HELIX=oled,under helix:defualt -## make HELIX=oled,back,na helix:defualt -## make HELIX=oled,back,ios helix:defualt -## -ifneq ($(strip $(HELIX)),) - ifeq ($(findstring oled,$(HELIX)), oled) - OLED_ENABLE = yes - endif - ifeq ($(findstring back,$(HELIX)), back) - LED_BACK_ENABLE = yes - else ifeq ($(findstring under,$(HELIX)), under) - LED_UNDERGLOW_ENABLE = yes - endif - ifeq ($(findstring na,$(HELIX)), na) - LED_ANIMATIONS = no - endif - ifeq ($(findstring ios,$(HELIX)), ios) - IOS_DEVICE_ENABLE = yes - endif - $(eval $(call HELIX_CUSTOMISE_MSG)) - $(info ) -endif - -# Uncomment these for checking -# jp: コンパイル時にカスタマイズの状態を表示したい時はコメントをはずします。 -# $(eval $(call HELIX_CUSTOMISE_MSG)) -# $(info ) - -ifneq ($(strip $(HELIX_ROWS)), 4) - ifneq ($(strip $(HELIX_ROWS)), 5) - $(error HELIX_ROWS = $(strip $(HELIX_ROWS)) is unexpected value) - endif -endif -OPT_DEFS += -DHELIX_ROWS=$(strip $(HELIX_ROWS)) - -ifeq ($(strip $(LED_BACK_ENABLE)), yes) - RGBLIGHT_ENABLE = yes - OPT_DEFS += -DRGBLED_BACK - ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) - $(eval $(call HELIX_CUSTOMISE_MSG)) - $(error LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE both 'yes') - endif -else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) - RGBLIGHT_ENABLE = yes -else - RGBLIGHT_ENABLE = no -endif - -ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) - OPT_DEFS += -DIOS_DEVICE_ENABLE -endif - -ifeq ($(strip $(LED_ANIMATIONS)), yes) - OPT_DEFS += -DLED_ANIMATIONS -endif - -ifeq ($(strip $(OLED_ENABLE)), yes) - OPT_DEFS += -DOLED_ENABLE -endif - -ifeq ($(strip $(LOCAL_GLCDFONT)), yes) - OPT_DEFS += -DLOCAL_GLCDFONT -endif - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -AUTO_SHIFT_ENABLE = yes +# IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) -# Uncomment these for debugging -# $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) -# $(info -- OPT_DEFS=$(OPT_DEFS)) -# $(info ) +# convert Helix-specific options (that represent combinations of standard options) +# into QMK standard options. +include $(strip $(KEYBOARD_LOCAL_FEATURES_MK)) diff --git a/keyboards/helix/rev2/local_features.mk b/keyboards/helix/rev2/local_features.mk new file mode 100644 index 000000000000..0f4285eea952 --- /dev/null +++ b/keyboards/helix/rev2/local_features.mk @@ -0,0 +1,98 @@ +# +# local_features.mk contains post-processing rules for the Helix keyboard. +# +# Post-processing rules convert keyboard-specific shortcuts (that represent +# combinations of standard options) into QMK standard options. +# + +define HELIX_CUSTOMISE_MSG + $(info Helix Spacific Build Options) + $(info - OLED_ENABLE = $(OLED_ENABLE)) + $(info - LED_BACK_ENABLE = $(LED_BACK_ENABLE)) + $(info - LED_UNDERGLOW_ENABLE = $(LED_UNDERGLOW_ENABLE)) + $(info - LED_ANIMATION = $(LED_ANIMATIONS)) + $(info - IOS_DEVICE_ENABLE = $(IOS_DEVICE_ENABLE)) + $(info ) +endef + + ifneq ($(strip $(HELIX)),) + ### Helix keyboard keymap: convenient command line option + ## make HELIX= helix: + ## option= oled | back | under | na | ios + ## ex. + ## make HELIX=oled helix: + ## make HELIX=oled,back helix: + ## make HELIX=oled,under helix: + ## make HELIX=oled,back,na helix: + ## make HELIX=oled,back,ios helix: + ## + ifeq ($(findstring oled,$(HELIX)), oled) + OLED_ENABLE = yes + endif + ifeq ($(findstring back,$(HELIX)), back) + LED_BACK_ENABLE = yes + else ifeq ($(findstring under,$(HELIX)), under) + LED_UNDERGLOW_ENABLE = yes + endif + ifeq ($(findstring na,$(HELIX)), na) + LED_ANIMATIONS = no + endif + ifeq ($(findstring no_ani,$(HELIX)), no_ani) + LED_ANIMATIONS = no + endif + ifeq ($(findstring ios,$(HELIX)), ios) + IOS_DEVICE_ENABLE = yes + endif + ifeq ($(findstring verbose,$(HELIX)), verbose) + SHOW_VERBOSE_INFO = yes + endif + SHOW_HELIX_OPTIONS = yes + endif + +######## +# convert Helix-specific options (that represent combinations of standard options) +# into QMK standard options. + +ifneq ($(strip $(HELIX_ROWS)), 4) + ifneq ($(strip $(HELIX_ROWS)), 5) + $(error HELIX_ROWS = $(strip $(HELIX_ROWS)) is unexpected value) + endif +endif +OPT_DEFS += -DHELIX_ROWS=$(strip $(HELIX_ROWS)) + +ifeq ($(strip $(LED_BACK_ENABLE)), yes) + RGBLIGHT_ENABLE = yes + OPT_DEFS += -DRGBLED_BACK + ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) + $(eval $(call HELIX_CUSTOMISE_MSG)) + $(error LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE both 'yes') + endif +else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) + RGBLIGHT_ENABLE = yes +endif + +ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) + OPT_DEFS += -DIOS_DEVICE_ENABLE +endif + +ifeq ($(strip $(LED_ANIMATIONS)), yes) + OPT_DEFS += -DLED_ANIMATIONS +endif + +ifeq ($(strip $(OLED_ENABLE)), yes) + OPT_DEFS += -DOLED_ENABLE +endif + +ifeq ($(strip $(LOCAL_GLCDFONT)), yes) + OPT_DEFS += -DLOCAL_GLCDFONT +endif + +ifneq ($(strip $(SHOW_HELIX_OPTIONS)),) + $(eval $(call HELIX_CUSTOMISE_MSG)) + ifneq ($(strip $(SHOW_VERBOSE_INFO)),) + $(info -- RGBLIGHT_ENABLE = $(RGBLIGHT_ENABLE)) + $(info -- OPT_DEFS = $(OPT_DEFS)) + $(info -- LINK_TIME_OPTIMIZATION_ENABLE = $(LINK_TIME_OPTIMIZATION_ENABLE)) + $(info ) + endif +endif diff --git a/keyboards/helix/rev2/oled/back/rules.mk b/keyboards/helix/rev2/oled/back/rules.mk new file mode 100644 index 000000000000..066fffb74af2 --- /dev/null +++ b/keyboards/helix/rev2/oled/back/rules.mk @@ -0,0 +1 @@ +LED_BACK_ENABLE = yes diff --git a/keyboards/helix/rev2/oled/rules.mk b/keyboards/helix/rev2/oled/rules.mk new file mode 100644 index 000000000000..dd68e9d3b090 --- /dev/null +++ b/keyboards/helix/rev2/oled/rules.mk @@ -0,0 +1 @@ +OLED_ENABLE = yes diff --git a/keyboards/helix/rev2/oled/under/rules.mk b/keyboards/helix/rev2/oled/under/rules.mk new file mode 100644 index 000000000000..a37aa6fab370 --- /dev/null +++ b/keyboards/helix/rev2/oled/under/rules.mk @@ -0,0 +1 @@ +LED_UNDERGLOW_ENABLE = yes diff --git a/keyboards/helix/rev2/rev2.h b/keyboards/helix/rev2/rev2.h index f4929998381c..4e69daef509c 100644 --- a/keyboards/helix/rev2/rev2.h +++ b/keyboards/helix/rev2/rev2.h @@ -1,5 +1,4 @@ -#ifndef REV2_H -#define REV2_CONFIG_H +#pragma once #include "../helix.h" @@ -18,7 +17,7 @@ #endif #endif -#if HELIX_ROWS == 4 +#if MATRIX_ROWS == 8 // HELIX_ROWS == 4 #ifndef FLIP_HALF // Standard Keymap // (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left) @@ -107,7 +106,7 @@ #endif // Used to create a keymap using only KC_ prefixed keys -#if HELIX_ROWS == 4 +#if MATRIX_ROWS == 8 // HELIX_ROWS == 4 #define LAYOUT_kc( \ L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ @@ -136,5 +135,3 @@ KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, KC_##L46, KC_##R46, KC_##R40, KC_##R41, KC_##R42, KC_##R43, KC_##R44, KC_##R45 \ ) #endif - -#endif diff --git a/keyboards/helix/rev2/rules.mk b/keyboards/helix/rev2/rules.mk index 5582a0f9c40f..4db8f7da9495 100644 --- a/keyboards/helix/rev2/rules.mk +++ b/keyboards/helix/rev2/rules.mk @@ -1,3 +1,21 @@ +KEYBOARD_LOCAL_FEATURES_MK := $(dir $(lastword $(MAKEFILE_LIST)))local_features.mk + +SRC += local_drivers/i2c.c +SRC += local_drivers/serial.c +SRC += local_drivers/ssd1306.c +KEYBOARD_PATHS += $(HELIX_TOP_DIR)/local_drivers + +CUSTOM_MATRIX = yes + SRC += rev2/matrix.c SRC += rev2/split_util.c SRC += rev2/split_scomm.c + +# Helix Spacific Build Options default values +HELIX_ROWS = 5 # Helix Rows is 4 or 5 +OLED_ENABLE = no # OLED_ENABLE +LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c" +LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) +LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) +LED_ANIMATIONS = yes # LED animations +IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) diff --git a/keyboards/helix/rev2/serial_config.h b/keyboards/helix/rev2/serial_config.h deleted file mode 100644 index 37135213d55f..000000000000 --- a/keyboards/helix/rev2/serial_config.h +++ /dev/null @@ -1,8 +0,0 @@ -//// #error rev2 serial config - -#ifndef SOFT_SERIAL_PIN -/* Soft Serial defines */ -#define SOFT_SERIAL_PIN D2 - -#define SERIAL_USE_MULTI_TRANSACTION -#endif diff --git a/keyboards/helix/rev2/under/oled/rules.mk b/keyboards/helix/rev2/under/oled/rules.mk new file mode 100644 index 000000000000..dd68e9d3b090 --- /dev/null +++ b/keyboards/helix/rev2/under/oled/rules.mk @@ -0,0 +1 @@ +OLED_ENABLE = yes diff --git a/keyboards/helix/rev2/under/rules.mk b/keyboards/helix/rev2/under/rules.mk new file mode 100644 index 000000000000..a37aa6fab370 --- /dev/null +++ b/keyboards/helix/rev2/under/rules.mk @@ -0,0 +1 @@ +LED_UNDERGLOW_ENABLE = yes diff --git a/keyboards/helix/rules.mk b/keyboards/helix/rules.mk index 245bff70fa9a..cf23434d8033 100644 --- a/keyboards/helix/rules.mk +++ b/keyboards/helix/rules.mk @@ -1,75 +1,37 @@ -SRC += i2c.c -SRC += serial.c -SRC += ssd1306.c - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT +HELIX_TOP_DIR := $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST)))) -# Build Options +# QMK Standard Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -SUBPROJECT_rev1 = no -USE_I2C = yes +# See TOP/docs/config_options.md for more information. +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -CUSTOM_MATRIX = yes +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend DEFAULT_FOLDER = helix/rev2 From 7662ee71f0d1df7cee03a563f52dba21854fd0be Mon Sep 17 00:00:00 2001 From: Jonathan Rascher Date: Wed, 16 Oct 2019 14:08:45 -0500 Subject: [PATCH 119/316] [Keymap] Various improvements to my Lily58 keymap (#7045) * Fix off-by-one error in Lily58 function keys * Swap number and symbol layers * Move grave/tilde to the left of brackets/braces * Add KLE links * Move function keys to Raise layer * Move symbols nearer to home row * Add readme for Lily58 layout --- keyboards/lily58/keymaps/bcat/keymap.c | 18 +++++--- keyboards/lily58/keymaps/bcat/readme.md | 59 +++++++++++++++++++++++++ 2 files changed, 70 insertions(+), 7 deletions(-) create mode 100644 keyboards/lily58/keymaps/bcat/readme.md diff --git a/keyboards/lily58/keymaps/bcat/keymap.c b/keyboards/lily58/keymaps/bcat/keymap.c index 562aad3fd047..110ba0d4bac5 100644 --- a/keyboards/lily58/keymaps/bcat/keymap.c +++ b/keyboards/lily58/keymaps/bcat/keymap.c @@ -13,30 +13,34 @@ enum layer { #define KY_CESC LCTL_T(KC_ESC) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Default layer: http://www.keyboard-layout-editor.com/#/gists/e0eb3af65961e9fd612dcff3ddd88e4f */ [LAYER_DEFAULT] = LAYOUT( - KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KY_CESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC, KC_RBRC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_LCTL, KC_LALT, LY_LWR, KC_SPC, KC_ENT, LY_RSE, KC_RGUI, KC_APP ), + /* Lower layer: http://www.keyboard-layout-editor.com/#/gists/19ad0d3b5d745fbb2818db09740f5a11 */ [LAYER_LOWER] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, - _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, KC_F12, KC_INS, KC_DEL, _______, _______, - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, _______, KC_LBRC, KC_RBRC, KC_GRV, KC_BSLS, _______, _______, + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, _______, _______, _______, _______, _______, KC_PIPE, KC_LCBR, KC_RCBR, KC_UNDS, KC_PLUS, _______, + _______, _______, KC_CAPS, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, KC_BSLS, KC_LBRC, KC_RBRC, KC_MINS, KC_EQL, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), + /* Raise layer: http://www.keyboard-layout-editor.com/#/gists/912be7955f781cdaf692cc4d4c0b5823 */ [LAYER_RAISE] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - KC_PLUS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_UNDS, - _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_HOME, KC_PGUP, - _______, _______, KC_CAPS, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, KC_LCBR, KC_RCBR, KC_TILD, KC_PIPE, KC_END, KC_PGDN, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_HOME, KC_PGUP, + _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, KC_F11, KC_F12, KC_INS, KC_DEL, KC_END, KC_PGDN, _______, _______, _______, _______, _______, _______, _______, _______ ), + /* Adjust layer: http://www.keyboard-layout-editor.com/#/gists/8f6a3f08350a9bbe1d414b22bca4e6c7 */ [LAYER_ADJUST] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_VOLU, KC_MSTP, _______, _______, EEP_RST, RESET, _______, _______, _______, _______, diff --git a/keyboards/lily58/keymaps/bcat/readme.md b/keyboards/lily58/keymaps/bcat/readme.md new file mode 100644 index 000000000000..4b269706a709 --- /dev/null +++ b/keyboards/lily58/keymaps/bcat/readme.md @@ -0,0 +1,59 @@ +# bcat's Lily58 layout + +This split ergo layout is standard QWERTY on the default layer, with symbols on +the lower layer, numbers/navigation on the raise layer, and media keys centered +around the WASD cluster in the adjust (raise + lower) layer. A few general +principles went into this layout: + +* The number row is optional, as are the outermost bottom row keys and the +"extra" keys on the innnermost columns below the controllers. This will enable +easy translation to a Crkbd or similar 40% ortho if I go that route. + +* Space and Enter are on the big thumb keys so they're easy to press +(particularly with G20 or other low-profile keycaps there). + +* There are two shift keys because really, Right Shift is important. + +* Arrow keys are on VIM-style HJKL keys. + +* Home/End and Page Up/Page Down are easy to reach and in a square kind of like +on the HHKB. + +* Escape is easy to reach because Vim. + +* Since most of the modifiers are on the left half, keys frequently pressed +together with mods (e.g., numbers, function keys, etc.) are on the Raise layer +activated by the right thumb. + +* Every key on a TKL has a binding. + +* Backspace is bound in the same place on every layer to avoid having to let go +of layer-shift keys to fix a mistake. + +* Brackets and braces are on or near the home row for quick access when coding. + +* Other than Right Shift (sorry), modifiers aren't rebound on layers. + +## Default layer + +![Default layer layout](https://i.imgur.com/NjIp4Qr.png) + +([KLE](http://www.keyboard-layout-editor.com/#/gists/e0eb3af65961e9fd612dcff3ddd88e4f)) + +## Lower layer + +![Lower layer layout](https://i.imgur.com/FyioHWW.png) + +([KLE](http://www.keyboard-layout-editor.com/#/gists/19ad0d3b5d745fbb2818db09740f5a11)) + +## Raise layer + +![Raise layer layout](https://i.imgur.com/8Mrz4FF.png) + +([KLE](http://www.keyboard-layout-editor.com/#/gists/912be7955f781cdaf692cc4d4c0b5823)) + +## Adjust layer + +![Adjust layer layout](https://i.imgur.com/FRKNqZp.png) + +([KLE](http://www.keyboard-layout-editor.com/#/gists/8f6a3f08350a9bbe1d414b22bca4e6c7)) From e3a21348c3879c11072c7c42d3b4d04b022f4fe2 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Wed, 16 Oct 2019 13:11:22 -0700 Subject: [PATCH 120/316] [Keymap] Drashna's Hardware Features Experimentations (#6920) * Change RGBLight pin for Planck Light Move it to A0, so that the SPI? pins are available for BT hackery * Add QMK DFU bootloader info * Add Solenoid * Disable annoying white LED on bottom * Enable Solenoid on Corne * Remove bounds for animations * Increase debounce for Ergodox EZ to reduce repeat key issues * Set swap hands key to be a hold-tap key This way, it's not ANNOYING and doesn't swap the hands inteniontally * Move MT Alt in Corne keymap * Re-Add fine tuned control of secrets * Squash mods to single row * Add LRA settings to haptic feedback settings for Rev6 * Fix issue with non-Planck EZ keymaps * Add 40 Percent Nano with Analog Joystick * Add Collide39 keymap * Fix OLED printing to be more flavorful * Fix up Iris GamePad and come cleanup * Expand OLED char map further * Add modded characters to keylogger * Here be dragons Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Fix up rules for community layouts * Some more OLED tweaks * Add mod mask check function * Change QMK DFU Audio pin to be correct * Use manual STM config instead of CTPC for Collide 39 --- .../nano/keymaps/drashna/keymap.c | 111 ++++++++++++++++++ .../nano/keymaps/drashna/rules.mk | 5 + keyboards/c39/keymaps/drashna/config.h | 7 ++ keyboards/c39/keymaps/drashna/keymap.c | 45 +++++++ keyboards/c39/keymaps/drashna/readme.md | 3 + keyboards/c39/keymaps/drashna/rules.mk | 18 +++ keyboards/crkbd/keymaps/drashna/config.h | 10 +- keyboards/crkbd/keymaps/drashna/keymap.c | 51 +++++--- keyboards/crkbd/keymaps/drashna/rules.mk | 1 + .../keebio/iris/keymaps/drashna/keymap.c | 4 +- .../keebio/iris/keymaps/drashna_lp/config.h | 13 +- layouts/community/ergodox/drashna/config.h | 2 +- layouts/community/ergodox/drashna/rules.mk | 6 +- .../community/ergodox/drashna_glow/config.h | 3 + .../community/ergodox/drashna_glow/rules.mk | 6 +- layouts/community/ortho_4x12/drashna/config.h | 65 +++++++++- layouts/community/ortho_4x12/drashna/keymap.c | 7 +- layouts/community/ortho_4x12/drashna/rules.mk | 39 +++--- layouts/community/ortho_5x12/drashna/rules.mk | 12 +- users/drashna/drashna.c | 7 ++ users/drashna/drashna.h | 1 + users/drashna/process_records.h | 38 +++--- users/drashna/rules.mk | 13 +- 23 files changed, 382 insertions(+), 85 deletions(-) create mode 100644 keyboards/40percentclub/nano/keymaps/drashna/keymap.c create mode 100644 keyboards/40percentclub/nano/keymaps/drashna/rules.mk create mode 100755 keyboards/c39/keymaps/drashna/config.h create mode 100755 keyboards/c39/keymaps/drashna/keymap.c create mode 100755 keyboards/c39/keymaps/drashna/readme.md create mode 100644 keyboards/c39/keymaps/drashna/rules.mk diff --git a/keyboards/40percentclub/nano/keymaps/drashna/keymap.c b/keyboards/40percentclub/nano/keymaps/drashna/keymap.c new file mode 100644 index 000000000000..6c5b97457208 --- /dev/null +++ b/keyboards/40percentclub/nano/keymaps/drashna/keymap.c @@ -0,0 +1,111 @@ +#include QMK_KEYBOARD_H +#include "drashna.h" +#include "analog.c" +#include "pointing_device.h" +#include "pincontrol.h" + + +#define KC_X0 LT(_FN, KC_ESC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT( + KC_VOLU, KC_MPLY, KC_MPRV, RESET, + KC_VOLD, KC_MUTE, KC_MNXT, RESET + ), + +}; + +// Joystick +// Set Pins +uint8_t xPin = 8; // VRx / /B4 +uint8_t yPin = 7; // VRy // B5 +uint8_t swPin = E6; // SW + +// Set Parameters +uint16_t minAxisValue = 0; +uint16_t maxAxisValue = 1023; + +uint8_t maxCursorSpeed = 2; +uint8_t precisionSpeed = 1; +uint8_t speedRegulator = 20; // Lower Values Create Faster Movement + +int8_t xPolarity = 1; +int8_t yPolarity = 1; + +uint8_t cursorTimeout = 10; + +int16_t xOrigin, yOrigin; + +uint16_t lastCursor = 0; + +int16_t axisCoordinate(uint8_t pin, uint16_t origin) { + int8_t direction; + int16_t distanceFromOrigin; + int16_t range; + + int16_t position = analogRead(pin); + + if (origin == position) { + return 0; + } else if (origin > position) { + distanceFromOrigin = origin - position; + range = origin - minAxisValue; + direction = -1; + } else { + distanceFromOrigin = position - origin; + range = maxAxisValue - origin; + direction = 1; + } + + float percent = (float)distanceFromOrigin / range; + int16_t coordinate = (int16_t)(percent * 100); + if (coordinate < 0) { + return 0; + } else if (coordinate > 100) { + return 100 * direction; + } else { + return coordinate * direction; + } +} + +int8_t axisToMouseComponent(uint8_t pin, int16_t origin, uint8_t maxSpeed, int8_t polarity) { + int coordinate = axisCoordinate(pin, origin); + if (coordinate == 0) { + return 0; + } else { + float percent = (float)coordinate / 100; + if (keyboard_report->mods & MOD_BIT(KC_LSFT)) { + return percent * precisionSpeed * polarity * (abs(coordinate) / speedRegulator); + } else { + return percent * maxCursorSpeed * polarity * (abs(coordinate) / speedRegulator); + } + } +} + +void pointing_device_task(void) { + report_mouse_t report = pointing_device_get_report(); + + // todo read as one vector + if (timer_elapsed(lastCursor) > cursorTimeout) { + lastCursor = timer_read(); + report.x = axisToMouseComponent(xPin, xOrigin, maxCursorSpeed, xPolarity); + report.y = axisToMouseComponent(yPin, yOrigin, maxCursorSpeed, yPolarity); + } + // + if (!readPin(swPin)) { + report.buttons |= MOUSE_BTN1; + } else { + report.buttons &= ~MOUSE_BTN1; + } + + pointing_device_set_report(report); + pointing_device_send(); +} + +void matrix_init_keymap(void) { + // init pin? Is needed? + setPinInputHigh(swPin); + // Account for drift + xOrigin = analogRead(xPin); + yOrigin = analogRead(yPin); +} diff --git a/keyboards/40percentclub/nano/keymaps/drashna/rules.mk b/keyboards/40percentclub/nano/keymaps/drashna/rules.mk new file mode 100644 index 000000000000..06110a0a2e29 --- /dev/null +++ b/keyboards/40percentclub/nano/keymaps/drashna/rules.mk @@ -0,0 +1,5 @@ +POINTING_DEVICE_ENABLE = yes +RGBLIGHT_ENABLE = no +CONSOLE_ENABLE = no + +BOOTLOADER = qmk-dfu diff --git a/keyboards/c39/keymaps/drashna/config.h b/keyboards/c39/keymaps/drashna/config.h new file mode 100755 index 000000000000..361f68a78ea5 --- /dev/null +++ b/keyboards/c39/keymaps/drashna/config.h @@ -0,0 +1,7 @@ +#pragma once + +// place overrides here +#undef MATRIX_COL_PINS +#define MATRIX_COL_PINS { A3, A2, A1, A0, B13, B14, B15, B9, B3, B2, B4, A10, A9 } +#undef MATRIX_ROW_PINS +#define MATRIX_ROW_PINS { B7, B1, B0 } diff --git a/keyboards/c39/keymaps/drashna/keymap.c b/keyboards/c39/keymaps/drashna/keymap.c new file mode 100755 index 000000000000..9de75190d030 --- /dev/null +++ b/keyboards/c39/keymaps/drashna/keymap.c @@ -0,0 +1,45 @@ +#include QMK_KEYBOARD_H + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _QWERTY 0 +#define _FN1 1 + +// Defines for task manager and such +#define CALTDEL LCTL(LALT(KC_DEL)) +#define TSKMGR LCTL(LSFT(KC_ESC)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,----------------------------------------------------------------------------. ,-------------. + * | Q | W | E | R | T | Bksp | Y | U | I | O | P | | M1 | M2 | + * |------+------+------+------+------+------+------+------+------+------+------+ |------+------| + * | A | S | D | F | G | Enter| H | J | K | L | ; | | M3 | M4 | + * |------+------+------+------+------+------+------+------+------+------+------+ |------+------| + * | Z | X | C | V | B | FN1 | N | M | , | . | / | | M5 | M6 | + * `----------------------------------------------------------------------------' `-------------' + */ +[_QWERTY] = LAYOUT( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_BSPC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_1, KC_2, + KC_A, KC_S, KC_D, KC_F, KC_G, MT(MOD_LSFT, KC_ENT), KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_3, KC_4, + KC_Z, KC_X, KC_C, KC_V, KC_B, LT(_FN1, KC_SPC), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_5, KC_6 +), + +/* FN1 + * ,----------------------------------------------------------------------------. ,-------------. + * | 1 | 2 | 3 | 4 | 5 | Bksp | 6 | 7 | 8 | 9 | 0 | | M1 | M2 | + * |------+------+------+------+------+------+------+------+------+------+------+ |------+------| + * | 4 | 5 | 6 | + | | Enter| | | | | | | M3 | M4 | + * |------+------+------+------+------+------+------+------+------+------+------+ |------+------| + * | 7 | 8 | 9 | 0 | | FN1 | | | | | | | M5 | M6 | + * `----------------------------------------------------------------------------' `-------------' + */ +[_FN1] = LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_BSPC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_1, KC_2, + KC_4, KC_5, KC_6, KC_PLUS, _______, KC_ENT, _______, _______, _______, _______, _______, KC_3, KC_4, + KC_7, KC_8, KC_9, KC_0, _______, _______, _______, _______, _______, _______, _______, KC_5, KC_6 +), +}; diff --git a/keyboards/c39/keymaps/drashna/readme.md b/keyboards/c39/keymaps/drashna/readme.md new file mode 100755 index 000000000000..a8efbaa5fe5a --- /dev/null +++ b/keyboards/c39/keymaps/drashna/readme.md @@ -0,0 +1,3 @@ +# @drashna's keymap for the C39 + +HERE BE DRAGONS diff --git a/keyboards/c39/keymaps/drashna/rules.mk b/keyboards/c39/keymaps/drashna/rules.mk new file mode 100644 index 000000000000..ae0cc9efee6e --- /dev/null +++ b/keyboards/c39/keymaps/drashna/rules.mk @@ -0,0 +1,18 @@ +MCU = STM32F303 +BOOTLOADER = + +BOOTMAGIC_ENABLE = lite # 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 +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI controls +UNICODE_ENABLE = yes # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = yes # Audio output on port C6 +RGBLIGHT_ENABLE = no # RGB Enable / Disable diff --git a/keyboards/crkbd/keymaps/drashna/config.h b/keyboards/crkbd/keymaps/drashna/config.h index d35f723dac77..26af029573bc 100644 --- a/keyboards/crkbd/keymaps/drashna/config.h +++ b/keyboards/crkbd/keymaps/drashna/config.h @@ -41,7 +41,7 @@ along with this program. If not, see . # define RGBLIGHT_HUE_STEP 8 # define RGBLIGHT_SAT_STEP 8 # define RGBLIGHT_VAL_STEP 5 -# define RGBLIGHT_LIMIT_VAL 150 +# define RGBLIGHT_LIMIT_VAL 120 #endif #ifdef RGB_MATRIX_ENABLE @@ -51,7 +51,7 @@ along with this program. If not, see . # define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended // # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) // # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) -# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 120 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 # define RGB_MATRIX_HUE_STEP 8 # define RGB_MATRIX_SAT_STEP 8 # define RGB_MATRIX_VAL_STEP 5 @@ -60,7 +60,11 @@ along with this program. If not, see . #ifdef AUDIO_ENABLE # define B6_AUDIO -// #define NO_MUSIC_MODE +# define NO_MUSIC_MODE +#endif + +#ifdef HAPTIC_ENABLE +# define SOLENOID_PIN B7 #endif #undef PRODUCT diff --git a/keyboards/crkbd/keymaps/drashna/keymap.c b/keyboards/crkbd/keymaps/drashna/keymap.c index 36a5f5dd3379..cd84f0d91923 100644 --- a/keyboards/crkbd/keymaps/drashna/keymap.c +++ b/keyboards/crkbd/keymaps/drashna/keymap.c @@ -12,7 +12,25 @@ extern rgblight_config_t rgblight_config; static uint32_t oled_timer = 0; static char keylog_str[6] = {}; static uint16_t log_timer = 0; -static const char code_to_name[60] = {' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', 'R', 'E', 'B', 'T', '_', '-', '=', '[', ']', '\\', '#', ';', '\'', '`', ',', '.', '/', ' ', ' ', ' '}; +static const char PROGMEM code_to_name[0xFF] = { +// 0 1 2 3 4 5 6 7 8 9 A B c D E F + ' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', // 0x + 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '1', '2', // 1x + '3', '4', '5', '6', '7', '8', '9', '0', 20, 19, 27, 26, 22, '-', '=', '[', // 2x + ']','\\', '#', ';','\'', '`', ',', '.', '/', 128, ' ', ' ', ' ', ' ', ' ', ' ', // 3x + ' ', ' ', ' ', ' ', ' ', ' ', 'P', 'S', ' ', ' ', ' ', ' ', 16, ' ', ' ', ' ', // 4x + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 5x + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 6x + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 7x + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 8x + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 9x + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Ax + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Bx + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Cx + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Dx + 'C', 'S', 'A', 'C', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Ex + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' // Fx +}; void add_keylog(uint16_t keycode); #endif @@ -27,7 +45,7 @@ enum crkbd_keycodes { RGBRST = NEW_SAFE_RANGE }; ) \ LAYOUT_wrapper( \ KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_MINS, \ - KC_TAB, ALT_T(K11), K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \ + ALT_T(KC_TAB), K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \ OS_LSFT, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \ KC_GRV, KC_SPC, BK_LWER, DL_RAIS, KC_ENT, OS_RGUI \ ) @@ -107,7 +125,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RESET, VRSN, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, EEP_RST, MG_NKRO, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, RGB_IDL, - _______, KC_NUKE, _______, _______, TG_MODS, _______ + HPT_TOG, KC_NUKE, _______, _______, TG_MODS, HPT_FBK ) }; // clang-format on @@ -131,16 +149,18 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; } void add_keylog(uint16_t keycode) { - if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) { + if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX) || (keycode >= QK_MODS && keycode <= QK_MODS_MAX)) { keycode = keycode & 0xFF; + } else if (keycode > 0xFF) { + keycode = 0; } for (uint8_t i = 4; i > 0; --i) { keylog_str[i] = keylog_str[i - 1]; } - if (keycode < 60) { - keylog_str[0] = code_to_name[keycode]; + if (keycode < (sizeof(code_to_name) / sizeof(char))) { + keylog_str[0] = pgm_read_byte(&code_to_name[keycode]); } log_timer = timer_read(); @@ -148,7 +168,7 @@ void add_keylog(uint16_t keycode) { void update_log(void) { if (timer_elapsed(log_timer) > 750) { - add_keylog(0); + //add_keylog(0); } } @@ -197,19 +217,18 @@ void render_layer_state(void) { void render_keylock_status(uint8_t led_usb_state) { oled_write_P(PSTR("Lock:"), false); oled_write_P(PSTR(" "), false); - oled_write_P(PSTR("NUM "), led_usb_state & (1 << USB_LED_NUM_LOCK)); - oled_write_P(PSTR(" "), false); - oled_write_P(PSTR("CAPS"), led_usb_state & (1 << USB_LED_CAPS_LOCK)); - oled_write_P(PSTR(" "), false); - oled_write_P(PSTR("SCRL"), led_usb_state & (1 << USB_LED_SCROLL_LOCK)); + oled_write_P(PSTR("N"), led_usb_state & (1 << USB_LED_NUM_LOCK)); + oled_write_P(PSTR("C"), led_usb_state & (1 << USB_LED_CAPS_LOCK)); + oled_write_ln_P(PSTR("S"), led_usb_state & (1 << USB_LED_SCROLL_LOCK)); } void render_mod_status(uint8_t modifiers) { oled_write_P(PSTR("Mods:"), false); - oled_write_P(PSTR(" SHFT"), (modifiers & MOD_MASK_SHIFT)); - oled_write_P(PSTR(" CTRL"), (modifiers & MOD_MASK_CTRL)); - oled_write_P(PSTR(" ALT "), (modifiers & MOD_MASK_ALT)); - oled_write_P(PSTR(" GUI "), (modifiers & MOD_MASK_GUI)); + oled_write_P(PSTR(" "), false); + oled_write_P(PSTR("S"), (modifiers & MOD_MASK_SHIFT)); + oled_write_P(PSTR("C"), (modifiers & MOD_MASK_CTRL)); + oled_write_P(PSTR("A"), (modifiers & MOD_MASK_ALT)); + oled_write_P(PSTR("G"), (modifiers & MOD_MASK_GUI)); } void render_bootmagic_status(void) { diff --git a/keyboards/crkbd/keymaps/drashna/rules.mk b/keyboards/crkbd/keymaps/drashna/rules.mk index af340459716e..492c17e20fe0 100644 --- a/keyboards/crkbd/keymaps/drashna/rules.mk +++ b/keyboards/crkbd/keymaps/drashna/rules.mk @@ -18,6 +18,7 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SWAP_HANDS_ENABLE = no # Enable one-hand typing RGB_MATRIX_ENABLE = WS2812 +HAPTIC_ENABLE = SOLENOID # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/keebio/iris/keymaps/drashna/keymap.c b/keyboards/keebio/iris/keymaps/drashna/keymap.c index 28783dd8af5a..de19f7ca08c9 100644 --- a/keyboards/keebio/iris/keymaps/drashna/keymap.c +++ b/keyboards/keebio/iris/keymaps/drashna/keymap.c @@ -77,11 +77,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [_GAMEPAD] = LAYOUT_wrapper( - KC_ESC, KC_NO, KC_1, KC_2, KC_3, KC_P, _______, _______, _______, _______, _______, _______, + KC_ESC, KC_NO, KC_1, KC_2, KC_3, KC_4, _______, _______, _______, _______, _______, _______, KC_F1, KC_K, KC_Q, KC_W, KC_E, KC_R, _______, _______, _______, _______, _______, _______, KC_TAB, KC_G, KC_A, KC_S, KC_D, KC_F, _______, _______, _______, _______, _______, _______, KC_LCTL, KC_LSFT, KC_Z, KC_X, KC_C, KC_H, TG_GAME, _______, _______, _______, _______, _______, _______, _______, - LOWER, KC_V, KC_SPC, _______, _______, _______ + KC_GRV, KC_V, KC_SPC, _______, _______, _______ ), diff --git a/keyboards/keebio/iris/keymaps/drashna_lp/config.h b/keyboards/keebio/iris/keymaps/drashna_lp/config.h index d59890b46a39..5370d88ed4b9 100644 --- a/keyboards/keebio/iris/keymaps/drashna_lp/config.h +++ b/keyboards/keebio/iris/keymaps/drashna_lp/config.h @@ -21,15 +21,16 @@ along with this program. If not, see . #include "../drashna/config.h" #ifdef RGBLIGHT_ENABLE -# undef RGBLED_NUM -# define RGBLED_NUM 16 // Number of LEDs -# undef RGBLED_SPLIT -# define RGBLED_SPLIT { 8, 8 } +# undef RGBLED_NUM +# define RGBLED_NUM 16 // Number of LEDs +# undef RGBLED_SPLIT +# define RGBLED_SPLIT \ + { 8, 8 } #endif #undef PRODUCT #ifdef KEYBOARD_keebio_iris_rev2 -# define PRODUCT Drashna Hacked Iris LP Rev.2 (Backlit) +# define PRODUCT Drashna Hacked Iris LP Rev .2(Backlit) #endif #undef SHFT_LED1 @@ -46,3 +47,5 @@ along with this program. If not, see . #define ALT_LED1 7 #undef GUI_LED1 #define GUI_LED1 8 + +#define DRASHNA_LP diff --git a/layouts/community/ergodox/drashna/config.h b/layouts/community/ergodox/drashna/config.h index 0ccf10c31c2e..4943832990e0 100644 --- a/layouts/community/ergodox/drashna/config.h +++ b/layouts/community/ergodox/drashna/config.h @@ -13,6 +13,6 @@ #define PRODUCT DrashnaDox - Hacked ErgoDox EZ Shine #undef DEBOUNCE -#define DEBOUNCE 15 +#define DEBOUNCE 30 #define TAPPING_TERM_PER_KEY diff --git a/layouts/community/ergodox/drashna/rules.mk b/layouts/community/ergodox/drashna/rules.mk index f14353f4c6ae..f9f9ea2bab6c 100644 --- a/layouts/community/ergodox/drashna/rules.mk +++ b/layouts/community/ergodox/drashna/rules.mk @@ -2,9 +2,9 @@ TAP_DANCE_ENABLE = yes SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend COMMAND_ENABLE = no # Commands for debug and configuration SPACE_CADET_ENABLE = no -ifneq (,$(findstring ergodox_ez,$(KEYBOARD))) - RGBLIGHT_ENABLE = yes - RGB_MATRIX_ENABLE = no +ifeq ($(strip $(KEYBOARD)), ergodox_ez) + RGBLIGHT_ENABLE = yes + RGB_MATRIX_ENABLE = no endif CONSOLE_ENABLE = no BOOTMAGIC_ENABLE = yes diff --git a/layouts/community/ergodox/drashna_glow/config.h b/layouts/community/ergodox/drashna_glow/config.h index 28bed20e0871..6431cb4ff8d6 100644 --- a/layouts/community/ergodox/drashna_glow/config.h +++ b/layouts/community/ergodox/drashna_glow/config.h @@ -4,3 +4,6 @@ #undef PRODUCT #define PRODUCT DrashnaDox - Hacked ErgoDox EZ Glow + +#undef RGB_MATRIX_LED_PROCESS_LIMIT +#undef RGB_MATRIX_LED_FLUSH_LIMIT diff --git a/layouts/community/ergodox/drashna_glow/rules.mk b/layouts/community/ergodox/drashna_glow/rules.mk index e1da86443fa6..45addc7c224c 100644 --- a/layouts/community/ergodox/drashna_glow/rules.mk +++ b/layouts/community/ergodox/drashna_glow/rules.mk @@ -6,8 +6,8 @@ SRC += $(CORRECTED_LAYOUT)/keymap.c -include $(CORRECTED_LAYOUT)/rules.mk -ifneq (,$(findstring ergodox_ez,$(KEYBOARD))) - RGBLIGHT_ENABLE = no - RGB_MATRIX_ENABLE = yes +ifeq ($(strip $(KEYBOARD)), ergodox_ez) + RGBLIGHT_ENABLE = no + RGB_MATRIX_ENABLE = yes # TAP_DANCE_ENABLE = no endif diff --git a/layouts/community/ortho_4x12/drashna/config.h b/layouts/community/ortho_4x12/drashna/config.h index 9f3d2b82d6ce..d8ac5e6d1156 100644 --- a/layouts/community/ortho_4x12/drashna/config.h +++ b/layouts/community/ortho_4x12/drashna/config.h @@ -1,7 +1,7 @@ #pragma once #if defined(RGBLIGHT_ENABLE) && !defined(RGBLED_NUM) -# define RGB_DI_PIN B3 +# define RGB_DI_PIN A0 # define RGBLED_NUM 13 // Number of LEDs # define RGBLIGHT_ANIMATIONS # define RGBLIGHT_HUE_STEP 12 @@ -17,10 +17,12 @@ #ifdef RGB_MATRIX_ENABLE # define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot) // #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (not recommened) -# define RGB_MATRIX_FRAMEBUFFER_EFFECTS +# define RGB_MATRIX_FRAMEBUFFER_EFFECTS // #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects // #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 # define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# undef RGB_MATRIX_LED_PROCESS_LIMIT +# undef RGB_MATRIX_LED_FLUSH_LIMIT #endif #if defined(KEYBOARD_lets_split_rev2) @@ -32,7 +34,17 @@ #if !defined(KEYBOARD_planck_light) # ifdef RGBLIGHT_ENABLE # define NO_MUSIC_MODE -# endif // RGBLIGHT_ENABLE +# endif // RGBLIGHT_ENABLE +#else +# undef QMK_ESC_OUTPUT +# define QMK_ESC_OUTPUT E6 // usually COL +# undef QMK_ESC_INPUT +# define QMK_ESC_INPUT B0 // usually ROW +# undef QMK_LED +# define QMK_LED D6 +# undef QMK_SPEAKER +# define QMK_SPEAKER B5 +# define SOLENOID_PIN A1 #endif // KEYBOARD_planck_light #if defined(KEYBOARD_planck) @@ -69,3 +81,50 @@ /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 2 + +#define FB_ERM_LRA 1 /* For ERM:0 or LRA:1*/ +#define FB_BRAKEFACTOR 6 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */ +#define FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */ + +/* default 3V ERM vibration motor voltage and library*/ +#if FB_ERM_LRA == 0 +#define RATED_VOLTAGE 3 +#define V_RMS 2.3 +#define V_PEAK 3.30 +/* Library Selection */ +#define LIB_SELECTION 4 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */ + +/* default 2V LRA voltage and library */ +#elif FB_ERM_LRA == 1 +#define RATED_VOLTAGE 2 +#define V_RMS 2.0 +#define V_PEAK 2.85 +#define F_LRA 200 +/* Library Selection */ +#define LIB_SELECTION 6 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */ + +#endif + +/* Control 1 register settings */ +#define DRIVE_TIME 25 +#define AC_COUPLE 0 +#define STARTUP_BOOST 1 + +/* Control 2 Settings */ +#define BIDIR_INPUT 1 +#define BRAKE_STAB 1 /* Loopgain is reduced when braking is almost complete to improve stability */ +#define SAMPLE_TIME 3 +#define BLANKING_TIME 1 +#define IDISS_TIME 1 + +/* Control 3 settings */ +#define NG_THRESH 2 +#define ERM_OPEN_LOOP 1 +#define SUPPLY_COMP_DIS 0 +#define DATA_FORMAT_RTO 0 +#define LRA_DRIVE_MODE 0 +#define N_PWM_ANALOG 0 +#define LRA_OPEN_LOOP 0 +/* Control 4 settings */ +#define ZC_DET_TIME 0 +#define AUTO_CAL_TIME 3 diff --git a/layouts/community/ortho_4x12/drashna/keymap.c b/layouts/community/ortho_4x12/drashna/keymap.c index 26f611c08898..1c894c7649c2 100644 --- a/layouts/community/ortho_4x12/drashna/keymap.c +++ b/layouts/community/ortho_4x12/drashna/keymap.c @@ -24,7 +24,9 @@ extern rgblight_config_t rgblight_config; #ifdef BACKLIGHT_ENABLE enum planck_keycodes { BACKLIT = NEW_SAFE_RANGE, + TH_LVL, }; + #else # define BACKLIT OSM(MOD_LSFT) enum planck_keycodes { @@ -134,7 +136,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RST, VRSN, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, EEP_RST, TH_LVL, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, RGB_IDL, - _______, _______, _______, _______, _______, KC_NUKE, _______, _______, _______, _______, _______, TG_MODS + HPT_TOG, _______, _______, _______, _______, KC_NUKE, _______, _______, _______, _______, _______, TG_MODS ) }; @@ -298,6 +300,9 @@ void rgb_matrix_indicators_user(void) { } void matrix_init_keymap(void) { +# ifdef KEYBOARD_planck_light + writePinLow(D6); +# endif // rgblight_mode(RGB_MATRIX_MULTISPLASH); } #else // RGB_MATRIX_INIT diff --git a/layouts/community/ortho_4x12/drashna/rules.mk b/layouts/community/ortho_4x12/drashna/rules.mk index 55f3acd70ecf..d4726b7a84da 100644 --- a/layouts/community/ortho_4x12/drashna/rules.mk +++ b/layouts/community/ortho_4x12/drashna/rules.mk @@ -7,29 +7,30 @@ TAP_DANCE_ENABLE = no AUDIO_ENABLE = yes SPACE_CADET_ENABLE = no -ifeq (,$(findstring planck/rev6,$(KEYBOARD))) # Make sure it's NOT the Planck Rev6 - RGBLIGHT_ENABLE = yes - INDICATOR_LIGHTS = yes - RGBLIGHT_TWINKLE = yes - RGBLIGHT_STARTUP_ANIMATION = yes +ifneq ($(strip $(KEYBOARD)), planck/rev6) + RGBLIGHT_ENABLE = yes + INDICATOR_LIGHTS = yes + RGBLIGHT_TWINKLE = yes + RGBLIGHT_STARTUP_ANIMATION = yes endif -ifneq (,$(findstring planck/light,$(KEYBOARD))) # Make sure it IS the Planck Light - RGB_MATRIX_ENABLE = yes - RGBLIGHT_ENABLE = no - RGBLIGHT_STARTUP_ANIMATION = no +ifeq ($(strip $(KEYBOARD)), planck/light) + RGB_MATRIX_ENABLE = yes + RGBLIGHT_ENABLE = no + RGBLIGHT_STARTUP_ANIMATION = no + HAPTIC_ENABLE += SOLENOID endif -ifneq (,$(findstring planck/ez,$(KEYBOARD))) # Make sure it IS the Planck Light - RGBLIGHT_ENABLE = no - # SERIAL_LINK_ENABLE = yes - ENCODER_ENABLE = yes - RGB_MATRIX_ENABLE = IS31FL3737 - INDICATOR_LIGHTS = yes - RGBLIGHT_TWINKLE = yes - RGBLIGHT_STARTUP_ANIMATION = yes +ifeq ($(strip $(KEYBOARD)), planck/ez) + RGBLIGHT_ENABLE = no + # SERIAL_LINK_ENABLE = yes + ENCODER_ENABLE = yes + RGB_MATRIX_ENABLE = IS31FL3737 + INDICATOR_LIGHTS = yes + RGBLIGHT_TWINKLE = yes + RGBLIGHT_STARTUP_ANIMATION = yes endif ifeq ($(strip $(PROTOCOL)), VUSB) -NKRO_ENABLE = no + NKRO_ENABLE = no else -NKRO_ENABLE = yes + NKRO_ENABLE = yes endif diff --git a/layouts/community/ortho_5x12/drashna/rules.mk b/layouts/community/ortho_5x12/drashna/rules.mk index 0606f3e5225f..75affedd1209 100644 --- a/layouts/community/ortho_5x12/drashna/rules.mk +++ b/layouts/community/ortho_5x12/drashna/rules.mk @@ -5,12 +5,12 @@ CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = no # Commands for debug and configuration TAP_DANCE_ENABLE = no AUDIO_ENABLE = yes -ifneq (,$(findstring fractal,$(KEYBOARD))) # Make sure it IS the Planck Light - RGB_MATRIX_ENABLE = no - AUDIO_ENABLE = yes - RGBLIGHT_ENABLE = yes - RGBLIGHT_TWINKLE = yes - BOOTLOADER = qmk-dfu +ifeq ($(strip $(KEYBOARD)), fractal) + RGB_MATRIX_ENABLE = no + AUDIO_ENABLE = yes + RGBLIGHT_ENABLE = yes + RGBLIGHT_TWINKLE = yes + BOOTLOADER = qmk-dfu endif ifeq ($(strip $(PROTOCOL)), VUSB) diff --git a/users/drashna/drashna.c b/users/drashna/drashna.c index 6a436e0af0ee..b48d837d00d2 100644 --- a/users/drashna/drashna.c +++ b/users/drashna/drashna.c @@ -219,3 +219,10 @@ void eeconfig_init_user(void) { eeconfig_init_keymap(); keyboard_init(); } + +bool hasAllBitsInMask(uint8_t value, uint8_t mask) { + value &= 0xF; + mask &= 0xF; + + return (value & mask) == mask; +} diff --git a/users/drashna/drashna.h b/users/drashna/drashna.h index e3edf8112417..0ccb7614fa1f 100644 --- a/users/drashna/drashna.h +++ b/users/drashna/drashna.h @@ -60,6 +60,7 @@ layer_state_t layer_state_set_keymap(layer_state_t state); layer_state_t default_layer_state_set_keymap(layer_state_t state); void led_set_keymap(uint8_t usb_led); void eeconfig_init_keymap(void); +bool hasAllBitsInMask(uint8_t value, uint8_t mask); typedef union { uint32_t raw; diff --git a/users/drashna/process_records.h b/users/drashna/process_records.h index 0ae468a04ed5..cb7ec3ec401d 100644 --- a/users/drashna/process_records.h +++ b/users/drashna/process_records.h @@ -14,21 +14,21 @@ enum userspace_custom_keycodes { KC_DVORAK, // Sets default layer to DVORAK KC_WORKMAN, // Sets default layer to WORKMAN KC_DIABLO_CLEAR, // Clears all Diablo Timers - KC_MAKE, // Run keyboard's customized make command - KC_RGB_T, // Toggles RGB Layer Indication mode - RGB_IDL, // RGB Idling animations - KC_SECRET_1, // test1 - KC_SECRET_2, // test2 - KC_SECRET_3, // test3 - KC_SECRET_4, // test4 - KC_SECRET_5, // test5 - KC_CCCV, // Hold to copy, tap to paste - KC_NUKE, // NUCLEAR LAUNCH DETECTED!!! - UC_FLIP, // (ಠ痊ಠ)┻━┻ - UC_TABL, // ┬─┬ノ( º _ ºノ) - UC_SHRG, // ¯\_(ツ)_/¯ - UC_DISA, // ಠ_ಠ - NEW_SAFE_RANGE // use "NEWPLACEHOLDER for keymap specific codes + KC_MAKE, // Run keyboard's customized make command + KC_RGB_T, // Toggles RGB Layer Indication mode + RGB_IDL, // RGB Idling animations + KC_SECRET_1, // test1 + KC_SECRET_2, // test2 + KC_SECRET_3, // test3 + KC_SECRET_4, // test4 + KC_SECRET_5, // test5 + KC_CCCV, // Hold to copy, tap to paste + KC_NUKE, // NUCLEAR LAUNCH DETECTED!!! + UC_FLIP, // (ಠ痊ಠ)┻━┻ + UC_TABL, // ┬─┬ノ( º _ ºノ) + UC_SHRG, // ¯\_(ツ)_/¯ + UC_DISA, // ಠ_ಠ + NEW_SAFE_RANGE // use "NEWPLACEHOLDER for keymap specific codes }; bool process_record_secrets(uint16_t keycode, keyrecord_t *record); @@ -57,9 +57,11 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record); #define KC_RST KC_RESET #ifdef SWAP_HANDS_ENABLE -# define KC_C1R3 SH_TT +# define KC_C1R3 SH_T(KC_TAB) +#elif defined(DRASHNA_LP) +# define KC_C1R3 TG(_GAMEPAD) #else // SWAP_HANDS_ENABLE -# define KC_C1R3 KC_BSPC +# define KC_C1R3 KC_TAB #endif // SWAP_HANDS_ENABLE #define BK_LWER LT(_LOWER, KC_BSPC) @@ -79,7 +81,7 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record); #define OS_RCTL OSM(MOD_RCTL) #define OS_LALT OSM(MOD_LALT) #define OS_RALT OSM(MOD_RALT) -#define OS_MEH OSM(MOD_MEH) +#define OS_MEH OSM(MOD_MEH) #define OS_HYPR OSM(MOD_HYPR) #define ALT_APP ALT_T(KC_APP) diff --git a/users/drashna/rules.mk b/users/drashna/rules.mk index 7b77a51d963c..1b5a86385027 100644 --- a/users/drashna/rules.mk +++ b/users/drashna/rules.mk @@ -4,8 +4,13 @@ SRC += drashna.c \ LINK_TIME_OPTIMIZATION_ENABLE = yes SPACE_CADET_ENABLE = no -ifneq ("$(wildcard $(USER_PATH)/secrets.c)","") - SRC += secrets.c +ifneq ($(strip $(NO_SECRETS)), yes) + ifneq ("$(wildcard $(USER_PATH)/secrets.c)","") + SRC += secrets.c + endif + ifeq ($(strip $(NO_SECRETS)), lite) + OPT_DEFS += -DNO_SECRETS + endif endif ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) @@ -14,9 +19,7 @@ endif -ifeq ($(strip $(NO_SECRETS)), yes) - OPT_DEFS += -DNO_SECRETS -endif + ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) SRC += rgb_stuff.c From abfd6ed9613013d3c9f15da8b575a902d9bcf274 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Thu, 17 Oct 2019 17:48:58 +0100 Subject: [PATCH 121/316] Move tmk_core/common/backlight to quantum/backlight (#6710) * Move tmk_core/common/backlight to quantum/backlight * Add guards to backlight inclusion * Add guards to backlight inclusion * Update backlight guards on clueboard/60 * Use full paths to avoid vpath issues --- common_features.mk | 5 + keyboards/clueboard/60/led.c | 10 +- quantum/backlight/backlight.c | 194 +++++++++++++++++- .../common => quantum/backlight}/backlight.h | 0 quantum/keymap_common.c | 5 +- quantum/quantum.c | 6 +- tmk_core/common.mk | 5 - tmk_core/common/action.c | 5 +- tmk_core/common/avr/suspend.c | 5 +- tmk_core/common/backlight.c | 193 ----------------- tmk_core/common/chibios/suspend.c | 5 +- tmk_core/common/command.c | 5 +- tmk_core/common/keyboard.c | 4 +- 13 files changed, 230 insertions(+), 212 deletions(-) rename {tmk_core/common => quantum/backlight}/backlight.h (100%) delete mode 100644 tmk_core/common/backlight.c diff --git a/common_features.mk b/common_features.mk index 05a99fc63c84..83b2b51aed8d 100644 --- a/common_features.mk +++ b/common_features.mk @@ -246,6 +246,11 @@ ifneq ($(strip $(BACKLIGHT_ENABLE)), no) CIE1931_CURVE = yes endif + + COMMON_VPATH += $(QUANTUM_DIR)/backlight + SRC += $(QUANTUM_DIR)/backlight/backlight.c + OPT_DEFS += -DBACKLIGHT_ENABLE + ifeq ($(strip $(BACKLIGHT_ENABLE)), custom) OPT_DEFS += -DBACKLIGHT_CUSTOM_DRIVER endif diff --git a/keyboards/clueboard/60/led.c b/keyboards/clueboard/60/led.c index 350696736bea..91a2c537dc1e 100644 --- a/keyboards/clueboard/60/led.c +++ b/keyboards/clueboard/60/led.c @@ -16,21 +16,21 @@ */ #include "hal.h" -#include "backlight.h" #include "led.h" #include "printf.h" +#ifdef BACKLIGHT_ENABLE +#include "backlight.h" + void backlight_init_ports(void) { printf("backlight_init_ports()\n"); - #ifdef BACKLIGHT_ENABLE + palSetPadMode(GPIOB, 8, PAL_MODE_OUTPUT_PUSHPULL); palSetPad(GPIOB, 8); - #endif } void backlight_set(uint8_t level) { printf("backlight_set(%d)\n", level); - #ifdef BACKLIGHT_ENABLE if (level == 0) { // Turn backlight off palSetPad(GPIOB, 8); @@ -38,8 +38,8 @@ void backlight_set(uint8_t level) { // Turn backlight on palClearPad(GPIOB, 8); } - #endif } +#endif void led_set_kb(uint8_t usb_led) { printf("led_set_kb(%d)\n", usb_led); diff --git a/quantum/backlight/backlight.c b/quantum/backlight/backlight.c index e26de86bf95c..708022f68f66 100644 --- a/quantum/backlight/backlight.c +++ b/quantum/backlight/backlight.c @@ -1 +1,193 @@ -// TODO: Add common code here, for example cie_lightness implementation +/* +Copyright 2013 Mathias Andersson + +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 . +*/ + +#include "backlight.h" +#include "eeconfig.h" +#include "debug.h" + +backlight_config_t backlight_config; + +/** \brief Backlight initialization + * + * FIXME: needs doc + */ +void backlight_init(void) { + /* check signature */ + if (!eeconfig_is_enabled()) { + eeconfig_init(); + } + backlight_config.raw = eeconfig_read_backlight(); + if (backlight_config.level > BACKLIGHT_LEVELS) { + backlight_config.level = BACKLIGHT_LEVELS; + } + backlight_set(backlight_config.enable ? backlight_config.level : 0); +} + +/** \brief Backlight increase + * + * FIXME: needs doc + */ +void backlight_increase(void) { + if (backlight_config.level < BACKLIGHT_LEVELS) { + backlight_config.level++; + } + backlight_config.enable = 1; + eeconfig_update_backlight(backlight_config.raw); + dprintf("backlight increase: %u\n", backlight_config.level); + backlight_set(backlight_config.level); +} + +/** \brief Backlight decrease + * + * FIXME: needs doc + */ +void backlight_decrease(void) { + if (backlight_config.level > 0) { + backlight_config.level--; + backlight_config.enable = !!backlight_config.level; + eeconfig_update_backlight(backlight_config.raw); + } + dprintf("backlight decrease: %u\n", backlight_config.level); + backlight_set(backlight_config.level); +} + +/** \brief Backlight toggle + * + * FIXME: needs doc + */ +void backlight_toggle(void) { + bool enabled = backlight_config.enable; + dprintf("backlight toggle: %u\n", enabled); + if (enabled) + backlight_disable(); + else + backlight_enable(); +} + +/** \brief Enable backlight + * + * FIXME: needs doc + */ +void backlight_enable(void) { + if (backlight_config.enable) return; // do nothing if backlight is already on + + backlight_config.enable = true; + if (backlight_config.raw == 1) // enabled but level == 0 + backlight_config.level = 1; + eeconfig_update_backlight(backlight_config.raw); + dprintf("backlight enable\n"); + backlight_set(backlight_config.level); +} + +/** \brief Disable backlight + * + * FIXME: needs doc + */ +void backlight_disable(void) { + if (!backlight_config.enable) return; // do nothing if backlight is already off + + backlight_config.enable = false; + eeconfig_update_backlight(backlight_config.raw); + dprintf("backlight disable\n"); + backlight_set(0); +} + +/** /brief Get the backlight status + * + * FIXME: needs doc + */ +bool is_backlight_enabled(void) { return backlight_config.enable; } + +/** \brief Backlight step through levels + * + * FIXME: needs doc + */ +void backlight_step(void) { + backlight_config.level++; + if (backlight_config.level > BACKLIGHT_LEVELS) { + backlight_config.level = 0; + } + backlight_config.enable = !!backlight_config.level; + eeconfig_update_backlight(backlight_config.raw); + dprintf("backlight step: %u\n", backlight_config.level); + backlight_set(backlight_config.level); +} + +/** \brief Backlight set level + * + * FIXME: needs doc + */ +void backlight_level(uint8_t level) { + if (level > BACKLIGHT_LEVELS) level = BACKLIGHT_LEVELS; + backlight_config.level = level; + backlight_config.enable = !!backlight_config.level; + eeconfig_update_backlight(backlight_config.raw); + backlight_set(backlight_config.level); +} + +/** \brief Get backlight level + * + * FIXME: needs doc + */ +uint8_t get_backlight_level(void) { return backlight_config.level; } + +#ifdef BACKLIGHT_BREATHING +/** \brief Backlight breathing toggle + * + * FIXME: needs doc + */ +void backlight_toggle_breathing(void) { + bool breathing = backlight_config.breathing; + dprintf("backlight breathing toggle: %u\n", breathing); + if (breathing) + backlight_disable_breathing(); + else + backlight_enable_breathing(); +} + +/** \brief Enable backlight breathing + * + * FIXME: needs doc + */ +void backlight_enable_breathing(void) { + if (backlight_config.breathing) return; // do nothing if breathing is already on + + backlight_config.breathing = true; + eeconfig_update_backlight(backlight_config.raw); + dprintf("backlight breathing enable\n"); + breathing_enable(); +} + +/** \brief Disable backlight breathing + * + * FIXME: needs doc + */ +void backlight_disable_breathing(void) { + if (!backlight_config.breathing) return; // do nothing if breathing is already off + + backlight_config.breathing = false; + eeconfig_update_backlight(backlight_config.raw); + dprintf("backlight breathing disable\n"); + breathing_disable(); +} + +/** \brief Get the backlight breathing status + * + * FIXME: needs doc + */ +bool is_backlight_breathing(void) { return backlight_config.breathing; } +#endif diff --git a/tmk_core/common/backlight.h b/quantum/backlight/backlight.h similarity index 100% rename from tmk_core/common/backlight.h rename to quantum/backlight/backlight.h diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c index 9af9510081e2..4fa45ac37b26 100644 --- a/quantum/keymap_common.c +++ b/quantum/keymap_common.c @@ -26,9 +26,12 @@ along with this program. If not, see . #include "action.h" #include "action_macro.h" #include "debug.h" -#include "backlight.h" #include "quantum.h" +#ifdef BACKLIGHT_ENABLE +# include "backlight.h" +#endif + #ifdef MIDI_ENABLE # include "process_midi.h" #endif diff --git a/quantum/quantum.c b/quantum/quantum.c index e615cfc0fef5..2020770ea5c7 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -24,8 +24,10 @@ # include "outputselect.h" #endif -#include "backlight.h" -extern backlight_config_t backlight_config; +#ifdef BACKLIGHT_ENABLE +# include "backlight.h" + extern backlight_config_t backlight_config; +#endif #ifdef FAUXCLICKY_ENABLE # include "fauxclicky.h" diff --git a/tmk_core/common.mk b/tmk_core/common.mk index 221688755518..db553534652b 100644 --- a/tmk_core/common.mk +++ b/tmk_core/common.mk @@ -153,11 +153,6 @@ ifeq ($(strip $(NO_SUSPEND_POWER_DOWN)), yes) TMK_COMMON_DEFS += -DNO_SUSPEND_POWER_DOWN endif -ifeq ($(strip $(BACKLIGHT_ENABLE)), yes) - TMK_COMMON_SRC += $(COMMON_DIR)/backlight.c - TMK_COMMON_DEFS += -DBACKLIGHT_ENABLE -endif - ifeq ($(strip $(BLUETOOTH_ENABLE)), yes) TMK_COMMON_DEFS += -DBLUETOOTH_ENABLE TMK_COMMON_DEFS += -DNO_USB_STARTUP_CHECK diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c index 44b19d368e8b..bd6aeba4f84e 100644 --- a/tmk_core/common/action.c +++ b/tmk_core/common/action.c @@ -20,7 +20,6 @@ along with this program. If not, see . #include "mousekey.h" #include "command.h" #include "led.h" -#include "backlight.h" #include "action_layer.h" #include "action_tapping.h" #include "action_macro.h" @@ -28,6 +27,10 @@ along with this program. If not, see . #include "action.h" #include "wait.h" +#ifdef BACKLIGHT_ENABLE +# include "backlight.h" +#endif + #ifdef DEBUG_ACTION # include "debug.h" #else diff --git a/tmk_core/common/avr/suspend.c b/tmk_core/common/avr/suspend.c index 574000fcd8f9..c59c19688005 100644 --- a/tmk_core/common/avr/suspend.c +++ b/tmk_core/common/avr/suspend.c @@ -4,7 +4,6 @@ #include #include "matrix.h" #include "action.h" -#include "backlight.h" #include "suspend_avr.h" #include "suspend.h" #include "timer.h" @@ -16,6 +15,10 @@ # include "lufa.h" #endif +#ifdef BACKLIGHT_ENABLE +# include "backlight.h" +#endif + #ifdef AUDIO_ENABLE # include "audio.h" #endif /* AUDIO_ENABLE */ diff --git a/tmk_core/common/backlight.c b/tmk_core/common/backlight.c deleted file mode 100644 index 708022f68f66..000000000000 --- a/tmk_core/common/backlight.c +++ /dev/null @@ -1,193 +0,0 @@ -/* -Copyright 2013 Mathias Andersson - -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 . -*/ - -#include "backlight.h" -#include "eeconfig.h" -#include "debug.h" - -backlight_config_t backlight_config; - -/** \brief Backlight initialization - * - * FIXME: needs doc - */ -void backlight_init(void) { - /* check signature */ - if (!eeconfig_is_enabled()) { - eeconfig_init(); - } - backlight_config.raw = eeconfig_read_backlight(); - if (backlight_config.level > BACKLIGHT_LEVELS) { - backlight_config.level = BACKLIGHT_LEVELS; - } - backlight_set(backlight_config.enable ? backlight_config.level : 0); -} - -/** \brief Backlight increase - * - * FIXME: needs doc - */ -void backlight_increase(void) { - if (backlight_config.level < BACKLIGHT_LEVELS) { - backlight_config.level++; - } - backlight_config.enable = 1; - eeconfig_update_backlight(backlight_config.raw); - dprintf("backlight increase: %u\n", backlight_config.level); - backlight_set(backlight_config.level); -} - -/** \brief Backlight decrease - * - * FIXME: needs doc - */ -void backlight_decrease(void) { - if (backlight_config.level > 0) { - backlight_config.level--; - backlight_config.enable = !!backlight_config.level; - eeconfig_update_backlight(backlight_config.raw); - } - dprintf("backlight decrease: %u\n", backlight_config.level); - backlight_set(backlight_config.level); -} - -/** \brief Backlight toggle - * - * FIXME: needs doc - */ -void backlight_toggle(void) { - bool enabled = backlight_config.enable; - dprintf("backlight toggle: %u\n", enabled); - if (enabled) - backlight_disable(); - else - backlight_enable(); -} - -/** \brief Enable backlight - * - * FIXME: needs doc - */ -void backlight_enable(void) { - if (backlight_config.enable) return; // do nothing if backlight is already on - - backlight_config.enable = true; - if (backlight_config.raw == 1) // enabled but level == 0 - backlight_config.level = 1; - eeconfig_update_backlight(backlight_config.raw); - dprintf("backlight enable\n"); - backlight_set(backlight_config.level); -} - -/** \brief Disable backlight - * - * FIXME: needs doc - */ -void backlight_disable(void) { - if (!backlight_config.enable) return; // do nothing if backlight is already off - - backlight_config.enable = false; - eeconfig_update_backlight(backlight_config.raw); - dprintf("backlight disable\n"); - backlight_set(0); -} - -/** /brief Get the backlight status - * - * FIXME: needs doc - */ -bool is_backlight_enabled(void) { return backlight_config.enable; } - -/** \brief Backlight step through levels - * - * FIXME: needs doc - */ -void backlight_step(void) { - backlight_config.level++; - if (backlight_config.level > BACKLIGHT_LEVELS) { - backlight_config.level = 0; - } - backlight_config.enable = !!backlight_config.level; - eeconfig_update_backlight(backlight_config.raw); - dprintf("backlight step: %u\n", backlight_config.level); - backlight_set(backlight_config.level); -} - -/** \brief Backlight set level - * - * FIXME: needs doc - */ -void backlight_level(uint8_t level) { - if (level > BACKLIGHT_LEVELS) level = BACKLIGHT_LEVELS; - backlight_config.level = level; - backlight_config.enable = !!backlight_config.level; - eeconfig_update_backlight(backlight_config.raw); - backlight_set(backlight_config.level); -} - -/** \brief Get backlight level - * - * FIXME: needs doc - */ -uint8_t get_backlight_level(void) { return backlight_config.level; } - -#ifdef BACKLIGHT_BREATHING -/** \brief Backlight breathing toggle - * - * FIXME: needs doc - */ -void backlight_toggle_breathing(void) { - bool breathing = backlight_config.breathing; - dprintf("backlight breathing toggle: %u\n", breathing); - if (breathing) - backlight_disable_breathing(); - else - backlight_enable_breathing(); -} - -/** \brief Enable backlight breathing - * - * FIXME: needs doc - */ -void backlight_enable_breathing(void) { - if (backlight_config.breathing) return; // do nothing if breathing is already on - - backlight_config.breathing = true; - eeconfig_update_backlight(backlight_config.raw); - dprintf("backlight breathing enable\n"); - breathing_enable(); -} - -/** \brief Disable backlight breathing - * - * FIXME: needs doc - */ -void backlight_disable_breathing(void) { - if (!backlight_config.breathing) return; // do nothing if breathing is already off - - backlight_config.breathing = false; - eeconfig_update_backlight(backlight_config.raw); - dprintf("backlight breathing disable\n"); - breathing_disable(); -} - -/** \brief Get the backlight breathing status - * - * FIXME: needs doc - */ -bool is_backlight_breathing(void) { return backlight_config.breathing; } -#endif diff --git a/tmk_core/common/chibios/suspend.c b/tmk_core/common/chibios/suspend.c index ae1c6f53e2ec..c0f9c28d443d 100644 --- a/tmk_core/common/chibios/suspend.c +++ b/tmk_core/common/chibios/suspend.c @@ -8,10 +8,13 @@ #include "action_util.h" #include "mousekey.h" #include "host.h" -#include "backlight.h" #include "suspend.h" #include "wait.h" +#ifdef BACKLIGHT_ENABLE +# include "backlight.h" +#endif + /** \brief suspend idle * * FIXME: needs doc diff --git a/tmk_core/common/command.c b/tmk_core/common/command.c index 8bf72ef25820..82cd80609134 100644 --- a/tmk_core/common/command.c +++ b/tmk_core/common/command.c @@ -32,10 +32,13 @@ along with this program. If not, see . #include "sleep_led.h" #include "led.h" #include "command.h" -#include "backlight.h" #include "quantum.h" #include "version.h" +#ifdef BACKLIGHT_ENABLE +# include "backlight.h" +#endif + #ifdef MOUSEKEY_ENABLE # include "mousekey.h" #endif diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c index 9806b5015f98..63ace9793cfa 100644 --- a/tmk_core/common/keyboard.c +++ b/tmk_core/common/keyboard.c @@ -29,8 +29,10 @@ along with this program. If not, see . #include "util.h" #include "sendchar.h" #include "eeconfig.h" -#include "backlight.h" #include "action_layer.h" +#ifdef BACKLIGHT_ENABLE +# include "backlight.h" +#endif #ifdef BOOTMAGIC_ENABLE # include "bootmagic.h" #else From 550435c1c9766e143a054a3943dfcac1d92ac408 Mon Sep 17 00:00:00 2001 From: Mikkel Jeppesen <2756925+Duckle29@users.noreply.github.com> Date: Thu, 17 Oct 2019 19:53:06 +0200 Subject: [PATCH 122/316] [Keyboard] Move vitamins included rev1 to split_common (#7052) * Initial work to move to split_common * Fixed serial pin --- keyboards/vitamins_included/i2c.c | 163 ------- keyboards/vitamins_included/i2c.h | 50 --- keyboards/vitamins_included/matrix.c | 503 ---------------------- keyboards/vitamins_included/rev1/config.h | 4 + keyboards/vitamins_included/rev1/rules.mk | 9 +- keyboards/vitamins_included/serial.c | 229 ---------- keyboards/vitamins_included/serial.h | 25 -- keyboards/vitamins_included/split_util.c | 28 -- keyboards/vitamins_included/split_util.h | 16 - 9 files changed, 5 insertions(+), 1022 deletions(-) delete mode 100644 keyboards/vitamins_included/i2c.c delete mode 100644 keyboards/vitamins_included/i2c.h delete mode 100644 keyboards/vitamins_included/matrix.c delete mode 100644 keyboards/vitamins_included/serial.c delete mode 100644 keyboards/vitamins_included/serial.h delete mode 100644 keyboards/vitamins_included/split_util.c delete mode 100644 keyboards/vitamins_included/split_util.h diff --git a/keyboards/vitamins_included/i2c.c b/keyboards/vitamins_included/i2c.c deleted file mode 100644 index 49ada2143362..000000000000 --- a/keyboards/vitamins_included/i2c.c +++ /dev/null @@ -1,163 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include "i2c.h" - -#ifdef USE_I2C - -// Limits the amount of we wait for any one i2c transaction. -// Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is -// 9 bits, a single transaction will take around 90μs to complete. -// -// (F_CPU/SCL_CLOCK) => # of μC cycles to transfer a bit -// poll loop takes at least 8 clock cycles to execute -#define I2C_LOOP_TIMEOUT (9+1)*(F_CPU/SCL_CLOCK)/8 - -#define BUFFER_POS_INC() (slave_buffer_pos = (slave_buffer_pos+1)%SLAVE_BUFFER_SIZE) - -volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; - -static volatile uint8_t slave_buffer_pos; -static volatile bool slave_has_register_set = false; - -// Wait for an i2c operation to finish -inline static -void i2c_delay(void) { - uint16_t lim = 0; - while(!(TWCR & (1<10. - // Check datasheets for more info. - TWBR = ((F_CPU/SCL_CLOCK)-16)/2; -} - -// Start a transaction with the given i2c slave address. The direction of the -// transfer is set with I2C_READ and I2C_WRITE. -// returns: 0 => success -// 1 => error -uint8_t i2c_master_start(uint8_t address) { - TWCR = (1< slave ACK -// 1 => slave NACK -uint8_t i2c_master_write(uint8_t data) { - TWDR = data; - TWCR = (1<= SLAVE_BUFFER_SIZE ) { - ack = 0; - slave_buffer_pos = 0; - } - slave_has_register_set = true; - } else { - i2c_slave_buffer[slave_buffer_pos] = TWDR; - BUFFER_POS_INC(); - } - break; - - case TW_ST_SLA_ACK: - case TW_ST_DATA_ACK: - // master has addressed this device as a slave transmitter and is - // requesting data. - TWDR = i2c_slave_buffer[slave_buffer_pos]; - BUFFER_POS_INC(); - break; - - case TW_BUS_ERROR: // something went wrong, reset twi state - TWCR = 0; - default: - break; - } - // Reset everything, so we are ready for the next TWI interrupt - TWCR |= (1< -#include "split_util.h" - -#ifndef F_CPU -#define F_CPU 16000000UL -#endif - -#define I2C_READ 1 -#define I2C_WRITE 0 - -#define I2C_ACK 1 -#define I2C_NACK 0 - -#define SLAVE_BUFFER_SIZE 0x10 - -// i2c SCL clock frequency -#define SCL_CLOCK 100000UL - -extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; - -void i2c_master_init(void); -uint8_t i2c_master_start(uint8_t address); -void i2c_master_stop(void); -uint8_t i2c_master_write(uint8_t data); -uint8_t i2c_master_read(int); -void i2c_reset_state(void); -void i2c_slave_init(uint8_t address); - - -static inline unsigned char i2c_start_read(unsigned char addr) { - return i2c_master_start((addr << 1) | I2C_READ); -} - -static inline unsigned char i2c_start_write(unsigned char addr) { - return i2c_master_start((addr << 1) | I2C_WRITE); -} - -// from SSD1306 scrips -extern unsigned char i2c_rep_start(unsigned char addr); -extern void i2c_start_wait(unsigned char addr); -extern unsigned char i2c_readAck(void); -extern unsigned char i2c_readNak(void); -extern unsigned char i2c_read(unsigned char ack); - -#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); - -#endif diff --git a/keyboards/vitamins_included/matrix.c b/keyboards/vitamins_included/matrix.c deleted file mode 100644 index df3e86985bb3..000000000000 --- a/keyboards/vitamins_included/matrix.c +++ /dev/null @@ -1,503 +0,0 @@ -/* -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 . -*/ - -/* - * scan matrix - */ -#include -#include -#include -#include -#include -#include "wait.h" -#include "print.h" -#include "debug.h" -#include "util.h" -#include "matrix.h" -#include "split_util.h" -#include "pro_micro.h" -#include "config.h" -#include "timer.h" -#include - -#if (defined(RGB_MIDI) | defined(RGBLIGHT_ANIMATIONS)) & defined(RGBLIGHT_ENABLE) - #include "rgblight.h" -#endif - - -#ifdef USE_I2C -# include "i2c.h" -#else // USE_SERIAL -# include "serial.h" -#endif - -#ifndef DEBOUNCE -# define DEBOUNCE 5 -#endif - -#if (DEBOUNCE > 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 - -#define ROWS_PER_HAND (MATRIX_ROWS/2) - -static uint8_t error_count = 0; - -static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; -static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; - -/* 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 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(); -} - -__attribute__ ((weak)) -void matrix_scan_quantum(void) { - matrix_scan_kb(); -} - -__attribute__ ((weak)) -void matrix_init_kb(void) { - matrix_init_user(); -} - -__attribute__ ((weak)) -void matrix_scan_kb(void) { - matrix_scan_user(); -} - -__attribute__ ((weak)) -void matrix_init_user(void) { -} - -__attribute__ ((weak)) -void matrix_scan_user(void) { -} - -inline -uint8_t matrix_rows(void) { - return MATRIX_ROWS; -} - -inline -uint8_t matrix_cols(void) { - return MATRIX_COLS; -} - -bool has_usb(void) { - return UDADDR & _BV(ADDEN); // This will return true if a USB connection has been established -} - -void matrix_init(void) -{ - // initialize row and col -#if (DIODE_DIRECTION == COL2ROW) - unselect_rows(); - init_cols(); -#elif (DIODE_DIRECTION == ROW2COL) - unselect_cols(); - init_rows(); -#endif - - TX_RX_LED_INIT; - - // initialize matrix state: all keys off - for (uint8_t i=0; i < MATRIX_ROWS; i++) { - matrix[i] = 0; - matrix_debouncing[i] = 0; - } - - #ifdef RGBLIGHT_ENABLE - rgblight_init(); - #endif - - timer_init(); - #ifdef USE_I2C - i2c_slave_init(SLAVE_I2C_ADDRESS); - #else - serial_slave_init(); - #endif - - sei(); - - matrix_init_quantum(); - while(!has_usb() || contacted_by_master){ - matrix_slave_scan(); - } - - // Set up as master - #ifdef USE_I2C - i2c_reset_state(); - i2c_master_init(); - #else - serial_master_init(); - #endif -} - -uint8_t _matrix_scan(void) -{ - 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 (DEBOUNCE > 0) - bool matrix_changed = read_cols_on_row(matrix_debouncing+offset, current_row); - - if (matrix_changed) { - debouncing = true; - debouncing_time = timer_read(); - } - -# 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 (DEBOUNCE > 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 - - } -#endif - -# if (DEBOUNCE > 0) - if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCE)) { - for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { - matrix[i+offset] = matrix_debouncing[i+offset]; - } - debouncing = false; - } -# endif - - return 1; -} - -#ifdef USE_I2C - -// Get rows from other half over i2c -int i2c_transaction(void) { - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; - - int err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE); - if (err) goto i2c_error; - - // start of matrix stored at 0x00 - err = i2c_master_write(0x00); - if (err) goto i2c_error; - - // Start read - err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ); - if (err) goto i2c_error; - - if (!err) { - int i; - for (i = 0; i < ROWS_PER_HAND-1; ++i) { - matrix[slaveOffset+i] = i2c_master_read(I2C_ACK); - } - matrix[slaveOffset+i] = i2c_master_read(I2C_NACK); - i2c_master_stop(); - } else { -i2c_error: // the cable is disconnceted, or something else went wrong - i2c_reset_state(); - return err; - } - - return 0; -} - -#else // USE_SERIAL - -int serial_transaction(void) { - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; - - if (serial_update_buffers()) { - return 1; - } - - for (int i = 0; i < ROWS_PER_HAND; ++i) { - matrix[slaveOffset+i] = serial_slave_buffer[i]; - } - return 0; -} -#endif - -uint8_t matrix_scan(void) -{ - uint8_t ret = _matrix_scan(); - -#ifdef USE_I2C - if( i2c_transaction() ) { -#else // USE_SERIAL - if( serial_transaction() ) { -#endif - // turn on the indicator led when halves are disconnected - TXLED1; - - error_count++; - - if (error_count > ERROR_DISCONNECT_COUNT) { - // reset other half if disconnected - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; - for (int i = 0; i < ROWS_PER_HAND; ++i) { - matrix[slaveOffset+i] = 0; - } - } - } else { - // turn off the indicator led on no error - TXLED0; - error_count = 0; - } - matrix_scan_quantum(); - return ret; -} - -void matrix_slave_scan(void) { - #if defined(RGBLIGHT_ANIMATIONS) & defined(RGBLIGHT_ENABLE) - rgblight_task(); - #endif - _matrix_scan(); - - 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]; - } -#else // USE_SERIAL - for (int i = 0; i < ROWS_PER_HAND; ++i) { - serial_slave_buffer[i] = matrix[offset+i]; - } -#endif -} - -bool matrix_is_modified(void) -{ - if (debouncing) return false; - return true; -} - -inline -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & ((matrix_row_t)1<> 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 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); - } - - // 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(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 - } -} - -#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) -{ - 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/vitamins_included/rev1/config.h b/keyboards/vitamins_included/rev1/config.h index 39b6a9ff4011..a6f9c95fba11 100644 --- a/keyboards/vitamins_included/rev1/config.h +++ b/keyboards/vitamins_included/rev1/config.h @@ -20,7 +20,11 @@ along with this program. If not, see . #include "config_common.h" +#define SPLIT_USB_DETECT +#define NO_USB_STARTUP_CHECK + #define EE_HANDS +#define SOFT_SERIAL_PIN D0 /* USB Device descriptor parameters */ #define DEVICE_VER 0x0001 diff --git a/keyboards/vitamins_included/rev1/rules.mk b/keyboards/vitamins_included/rev1/rules.mk index b500c8f278b9..4b1454e1550d 100644 --- a/keyboards/vitamins_included/rev1/rules.mk +++ b/keyboards/vitamins_included/rev1/rules.mk @@ -1,9 +1,2 @@ -SRC += matrix.c \ - split_util.c \ - ssd1306.c - -QUANTUM_LIB_SRC += i2c.c \ - serial.c \ - -CUSTOM_MATRIX = yes +SPLIT_KEYBOARD = yes BOOTLOADER = caterina diff --git a/keyboards/vitamins_included/serial.c b/keyboards/vitamins_included/serial.c deleted file mode 100644 index 4d37eeb8d307..000000000000 --- a/keyboards/vitamins_included/serial.c +++ /dev/null @@ -1,229 +0,0 @@ -/* - * WARNING: be careful changing this code, it is very timing dependent - */ - -#ifndef F_CPU -#define F_CPU 16000000 -#endif - -#include -#include -#include -#include -#include "serial.h" - -#ifndef USE_I2C - -// Serial pulse period in microseconds. Its probably a bad idea to lower this -// value. -#define SERIAL_DELAY 24 - -uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; -uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; - -#define SLAVE_DATA_CORRUPT (1<<0) -volatile uint8_t status = 0; - -inline static -void serial_delay(void) { - _delay_us(SERIAL_DELAY); -} - -inline static -void serial_output(void) { - SERIAL_PIN_DDR |= SERIAL_PIN_MASK; -} - -// make the serial pin an input with pull-up resistor -inline static -void serial_input(void) { - SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK; - SERIAL_PIN_PORT |= SERIAL_PIN_MASK; -} - -inline static -uint8_t serial_read_pin(void) { - return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK); -} - -inline static -void serial_low(void) { - SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK; -} - -inline static -void serial_high(void) { - SERIAL_PIN_PORT |= SERIAL_PIN_MASK; -} - -void serial_master_init(void) { - serial_output(); - serial_high(); -} - -void serial_slave_init(void) { - serial_input(); - - // Enable INT0 - EIMSK |= _BV(INT0); - // Trigger on falling edge of INT0 - EICRA &= ~(_BV(ISC00) | _BV(ISC01)); -} - -// Used by the master to synchronize timing with the slave. -static -void sync_recv(void) { - serial_input(); - // This shouldn't hang if the slave disconnects because the - // serial line will float to high if the slave does disconnect. - while (!serial_read_pin()); - serial_delay(); -} - -// Used by the slave to send a synchronization signal to the master. -static -void sync_send(void) { - serial_output(); - - serial_low(); - serial_delay(); - - serial_high(); -} - -// Reads a byte from the serial line -static -uint8_t serial_read_byte(void) { - uint8_t byte = 0; - serial_input(); - for ( uint8_t i = 0; i < 8; ++i) { - byte = (byte << 1) | serial_read_pin(); - serial_delay(); - _delay_us(1); - } - - return byte; -} - -// Sends a byte with MSB ordering -static -void serial_write_byte(uint8_t data) { - uint8_t b = 8; - serial_output(); - while( b-- ) { - if(data & (1 << b)) { - serial_high(); - } else { - serial_low(); - } - serial_delay(); - } -} - -// interrupt handle to be used by the slave device -ISR(SERIAL_PIN_INTERRUPT) { - sync_send(); - - uint8_t checksum = 0; - for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) { - serial_write_byte(serial_slave_buffer[i]); - sync_send(); - checksum += serial_slave_buffer[i]; - } - serial_write_byte(checksum); - sync_send(); - - // wait for the sync to finish sending - serial_delay(); - - // read the middle of pulses - _delay_us(SERIAL_DELAY/2); - - uint8_t checksum_computed = 0; - for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) { - serial_master_buffer[i] = serial_read_byte(); - sync_send(); - checksum_computed += serial_master_buffer[i]; - } - uint8_t checksum_received = serial_read_byte(); - sync_send(); - - serial_input(); // end transaction - - if ( checksum_computed != checksum_received ) { - status |= SLAVE_DATA_CORRUPT; - } else { - status &= ~SLAVE_DATA_CORRUPT; - } - contacted_by_master = true; -} - -inline -bool serial_slave_DATA_CORRUPT(void) { - return status & SLAVE_DATA_CORRUPT; -} - -// Copies the serial_slave_buffer to the master and sends the -// serial_master_buffer to the slave. -// -// Returns: -// 0 => no error -// 1 => slave did not respond -int serial_update_buffers(void) { - // this code is very time dependent, so we need to disable interrupts - cli(); - - // signal to the slave that we want to start a transaction - serial_output(); - serial_low(); - _delay_us(1); - - // wait for the slaves response - serial_input(); - serial_high(); - _delay_us(SERIAL_DELAY); - - // check if the slave is present - if (serial_read_pin()) { - // slave failed to pull the line low, assume not present - sei(); - return 1; - } - - // if the slave is present syncronize with it - sync_recv(); - - uint8_t checksum_computed = 0; - // receive data from the slave - for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) { - serial_slave_buffer[i] = serial_read_byte(); - sync_recv(); - checksum_computed += serial_slave_buffer[i]; - } - uint8_t checksum_received = serial_read_byte(); - sync_recv(); - - if (checksum_computed != checksum_received) { - sei(); - return 1; - } - - uint8_t checksum = 0; - // send data to the slave - for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) { - serial_write_byte(serial_master_buffer[i]); - sync_recv(); - checksum += serial_master_buffer[i]; - } - serial_write_byte(checksum); - sync_recv(); - - // always, release the line when not in use - serial_output(); - serial_high(); - - sei(); - return 0; -} - -#endif diff --git a/keyboards/vitamins_included/serial.h b/keyboards/vitamins_included/serial.h deleted file mode 100644 index 53b3a3bf0bfa..000000000000 --- a/keyboards/vitamins_included/serial.h +++ /dev/null @@ -1,25 +0,0 @@ -#pragma once - -#include "config.h" -#include -#include "split_util.h" - -/* TODO: some defines for interrupt setup */ -#define SERIAL_PIN_DDR DDRD -#define SERIAL_PIN_PORT PORTD -#define SERIAL_PIN_INPUT PIND -#define SERIAL_PIN_MASK _BV(PD0) -#define SERIAL_PIN_INTERRUPT INT0_vect - -#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 -#define SERIAL_MASTER_BUFFER_LENGTH 1 - -// Buffers for master - slave communication -extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; -extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; - -void serial_master_init(void); -void serial_slave_init(void); -int serial_update_buffers(void); -bool serial_slave_data_corrupt(void); - diff --git a/keyboards/vitamins_included/split_util.c b/keyboards/vitamins_included/split_util.c deleted file mode 100644 index 4a898cd7ba73..000000000000 --- a/keyboards/vitamins_included/split_util.c +++ /dev/null @@ -1,28 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include "split_util.h" -#include "matrix.h" -#include "keyboard.h" -#include "config.h" -#include "timer.h" -#include "debug.h" - -volatile bool isLeftHand = true; -volatile bool contacted_by_master = false; - -bool is_rev2(void) // Input with pullup, if rev2, pin is pulled down with 220R resistor. -{ - setPinInputHigh(B5); - bool rev2 = !readPin(B5); - setPinInput(B5); - return rev2; -} - -// this code runs before the usb and keyboard is initialized -void matrix_setup(void) { - isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS); -} diff --git a/keyboards/vitamins_included/split_util.h b/keyboards/vitamins_included/split_util.h deleted file mode 100644 index da7be515596e..000000000000 --- a/keyboards/vitamins_included/split_util.h +++ /dev/null @@ -1,16 +0,0 @@ -#pragma once - -#include -#include "eeconfig.h" -#include "quantum.h" - -#define SLAVE_I2C_ADDRESS 0x32 - -extern volatile bool isLeftHand; -extern volatile bool contacted_by_master; - -bool has_usb(void); -bool is_rev2(void); - -// slave version of matix scan, defined in matrix.c -void matrix_slave_scan(void); From 5dc91ddc60f0fd1f277345ccf20e17a8ab684cca Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Thu, 17 Oct 2019 23:37:37 +0100 Subject: [PATCH 123/316] SPLIT - Remove NO_USB_STARTUP_CHECK requirement for usb detection (#7053) * Avoid NO_USB_STARTUP_CHECK - Disable USB as checks seem to enable it somehow * Update quantum/split_common/split_util.c Co-Authored-By: fauxpark * Also remove NO_USB_STARTUP_CHECK from vitamins_included/rev1 --- keyboards/handwired/splittest/teensy_2/config.h | 2 -- keyboards/vitamins_included/rev1/config.h | 1 - quantum/split_common/split_util.c | 6 ++++++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/keyboards/handwired/splittest/teensy_2/config.h b/keyboards/handwired/splittest/teensy_2/config.h index 2b5bcf8e9272..7c092db30710 100644 --- a/keyboards/handwired/splittest/teensy_2/config.h +++ b/keyboards/handwired/splittest/teensy_2/config.h @@ -29,5 +29,3 @@ // teensy has vbus detection issues - use usb detection instead #define SPLIT_USB_DETECT -// required for teensy slave otherwise it "locks up" during startup -#define NO_USB_STARTUP_CHECK diff --git a/keyboards/vitamins_included/rev1/config.h b/keyboards/vitamins_included/rev1/config.h index a6f9c95fba11..c4881db01b31 100644 --- a/keyboards/vitamins_included/rev1/config.h +++ b/keyboards/vitamins_included/rev1/config.h @@ -21,7 +21,6 @@ along with this program. If not, see . #include "config_common.h" #define SPLIT_USB_DETECT -#define NO_USB_STARTUP_CHECK #define EE_HANDS #define SOFT_SERIAL_PIN D0 diff --git a/quantum/split_common/split_util.c b/quantum/split_common/split_util.c index 8983861bcce6..5c548de059e8 100644 --- a/quantum/split_common/split_util.c +++ b/quantum/split_common/split_util.c @@ -32,6 +32,12 @@ bool waitForUsb(void) { } wait_ms(100); } + +#if defined(__AVR__) + // Avoid NO_USB_STARTUP_CHECK - Disable USB as the previous checks seem to enable it somehow + (USBCON &= ~(_BV(USBE) | _BV(OTGPADE))); +#endif + return false; } From f66b2b1f2742e7d782302c5da0b5ee09312c3dc6 Mon Sep 17 00:00:00 2001 From: Yan-Fa Li Date: Fri, 18 Oct 2019 07:18:40 -0700 Subject: [PATCH 124/316] Add a via compatible keymap (#7062) * Add a via compatible keymap * Disable VIA on default for configurator - use the via keymap if you want via support * Move wilba dep to keymap avoid breaking community - moves via specific includes into the _via keymap - fixes configurator builds --- .../maartenwut/plain60/keymaps/via/keymap.c | 17 +++++++++++++++++ .../maartenwut/plain60/keymaps/via/rules.mk | 6 ++++++ keyboards/maartenwut/plain60/rules.mk | 4 +--- 3 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 keyboards/maartenwut/plain60/keymaps/via/keymap.c create mode 100644 keyboards/maartenwut/plain60/keymaps/via/rules.mk diff --git a/keyboards/maartenwut/plain60/keymaps/via/keymap.c b/keyboards/maartenwut/plain60/keymaps/via/keymap.c new file mode 100644 index 000000000000..7e8cfff3541c --- /dev/null +++ b/keyboards/maartenwut/plain60/keymaps/via/keymap.c @@ -0,0 +1,17 @@ +#include QMK_KEYBOARD_H + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _MA 0 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_MA] = LAYOUT( + 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_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_BSLS, KC_ENT, \ + 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_UP, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTRL) +}; diff --git a/keyboards/maartenwut/plain60/keymaps/via/rules.mk b/keyboards/maartenwut/plain60/keymaps/via/rules.mk new file mode 100644 index 000000000000..0ccefbb1194f --- /dev/null +++ b/keyboards/maartenwut/plain60/keymaps/via/rules.mk @@ -0,0 +1,6 @@ +# rules.mk overrides to enable VIA +SRC += keyboards/wilba_tech/wt_main.c + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes + diff --git a/keyboards/maartenwut/plain60/rules.mk b/keyboards/maartenwut/plain60/rules.mk index d91b0255b362..aad5598464bb 100644 --- a/keyboards/maartenwut/plain60/rules.mk +++ b/keyboards/maartenwut/plain60/rules.mk @@ -1,4 +1,3 @@ -SRC += keyboards/wilba_tech/wt_main.c # MCU name MCU = atmega32u4 @@ -62,7 +61,6 @@ MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes LAYOUTS = 60_ansi 60_ansi_split_bs_rshift 60_hhkb 60_iso 60_tsangan_hhkb + From de5cadd63669119a6ba83757780dc66bb8f2816c Mon Sep 17 00:00:00 2001 From: Yan-Fa Li Date: Fri, 18 Oct 2019 10:32:43 -0700 Subject: [PATCH 125/316] Caps lock indicator moved from keymap (#7070) - to keyboard so it works in configurator --- keyboards/dztech/dz65rgb/dz65rgb.c | 9 +++++++++ keyboards/dztech/dz65rgb/keymaps/default/keymap.c | 8 -------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/keyboards/dztech/dz65rgb/dz65rgb.c b/keyboards/dztech/dz65rgb/dz65rgb.c index 932d3f68b6ca..766aea26c413 100644 --- a/keyboards/dztech/dz65rgb/dz65rgb.c +++ b/keyboards/dztech/dz65rgb/dz65rgb.c @@ -114,3 +114,12 @@ void suspend_wakeup_init_kb(void) rgb_matrix_set_suspend_state(false); suspend_wakeup_init_user(); } + +__attribute__ ((weak)) +void rgb_matrix_indicators_user(void) +{ + if (IS_LED_ON(host_keyboard_leds(), USB_LED_CAPS_LOCK)) + { + rgb_matrix_set_color(8, 0xFF, 0xFF, 0xFF); + } +} diff --git a/keyboards/dztech/dz65rgb/keymaps/default/keymap.c b/keyboards/dztech/dz65rgb/keymaps/default/keymap.c index dae08a48c674..90f25c0e46a2 100644 --- a/keyboards/dztech/dz65rgb/keymaps/default/keymap.c +++ b/keyboards/dztech/dz65rgb/keymaps/default/keymap.c @@ -16,14 +16,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT), }; -void rgb_matrix_indicators_user(void) -{ - if (IS_LED_ON(host_keyboard_leds(), USB_LED_CAPS_LOCK)) - { - rgb_matrix_set_color(8, 0xFF, 0xFF, 0xFF); - } -} - void matrix_init_user(void) { //user initialization From 22cc56bc975a8fde45fd08a7ed20897cf3a465c8 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Fri, 18 Oct 2019 16:59:03 -0700 Subject: [PATCH 126/316] [Docs] Fix incorrect spacing on Coding Conventions page (#7058) --- docs/coding_conventions_c.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/coding_conventions_c.md b/docs/coding_conventions_c.md index cbddedf8b0f3..08994bfbb746 100644 --- a/docs/coding_conventions_c.md +++ b/docs/coding_conventions_c.md @@ -31,17 +31,17 @@ Here is an example for easy reference: ```c /* Enums for foo */ enum foo_state { - FOO_BAR, - FOO_BAZ, + FOO_BAR, + FOO_BAZ, }; /* Returns a value */ int foo(void) { - if (some_condition) { - return FOO_BAR; - } else { - return -1; - } + if (some_condition) { + return FOO_BAR; + } else { + return -1; + } } ``` From 5b311965f86a0f833bfe9149436b98d640fa4eef Mon Sep 17 00:00:00 2001 From: Andy Smith Date: Sat, 19 Oct 2019 01:21:40 +0100 Subject: [PATCH 127/316] [Keymap] Custom Planck layout for the Planck (#7036) * Version 1 of keymappings * Adding updated keymappings * Adding hash/pound symbol to layer * Removing broken macros * Adding to readme. Amending value of pound sign * Changing language in readme * Addressing PR comments. Removing unneeded code, corrected syntax * Removing commented out code and fixing white space issues * Small clean up to readme --- keyboards/planck/keymaps/smittey/config.h | 16 + keyboards/planck/keymaps/smittey/keymap.c | 375 +++++++++++++++++++++ keyboards/planck/keymaps/smittey/readme.md | 28 ++ keyboards/planck/keymaps/smittey/rules.mk | 1 + 4 files changed, 420 insertions(+) create mode 100644 keyboards/planck/keymaps/smittey/config.h create mode 100644 keyboards/planck/keymaps/smittey/keymap.c create mode 100644 keyboards/planck/keymaps/smittey/readme.md create mode 100644 keyboards/planck/keymaps/smittey/rules.mk diff --git a/keyboards/planck/keymaps/smittey/config.h b/keyboards/planck/keymaps/smittey/config.h new file mode 100644 index 000000000000..17ffcca383d0 --- /dev/null +++ b/keyboards/planck/keymaps/smittey/config.h @@ -0,0 +1,16 @@ +#pragma once + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PLANCK_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +#endif + +#define MIDI_BASIC + +// Most tactile encoders have detents every 4 stages +#define ENCODER_RESOLUTION 4 diff --git a/keyboards/planck/keymaps/smittey/keymap.c b/keyboards/planck/keymaps/smittey/keymap.c new file mode 100644 index 000000000000..fd5e91fb913e --- /dev/null +++ b/keyboards/planck/keymaps/smittey/keymap.c @@ -0,0 +1,375 @@ +/* Copyright 2015-2017 Jack Humbert + * + * 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 . + */ + +#include QMK_KEYBOARD_H +#include "muse.h" + +extern keymap_config_t keymap_config; + +enum planck_layers { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _PLOVER, + _ADJUST, + _FN, + _SPACE_FN +}; + +enum planck_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + PLOVER, + BACKLIT, + EXT_PLV +}; + +// Fillers to make layering more clear +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define FN MO(_FN) +#define SPACE_FN LT(_SPACE_FN, KC_SPC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | FN | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ + [_QWERTY] = LAYOUT_planck_grid( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT(MOD_LSFT, KC_ENT), + KC_LCTL, FN, KC_LALT, KC_LGUI, LOWER, SPACE_FN, SPACE_FN, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + + + /* Lower + * ,-----------------------------------------------------------------------------------. + * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | * | 4 | 5 | 6 | - | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | / | 1 | 2 | 3 | + |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | Space | | 0 | . | = | | + * `-----------------------------------------------------------------------------------' + */ + [_LOWER] = LAYOUT_planck_grid( + XXXXXXX, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_ASTR, KC_4, KC_5, KC_6, KC_MINS, XXXXXXX, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLSH, KC_1, KC_2, KC_3, KC_PLUS, MT(MOD_LSFT, KC_ENT), + _______, XXXXXXX, _______, _______, _______, KC_SPC, KC_SPC, _______, KC_0, KC_DOT, KC_EQL, XXXXXXX + ), + + /* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | ! | " | £ | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | ~ | # | / | { | [ | ] | } | \ | - | = | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | _ | + |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | Space | | Home | PgDn | PgUp | End | + * `-----------------------------------------------------------------------------------' + */ + [_RAISE] = LAYOUT_planck_grid( + KC_GRV, KC_EXLM, KC_DQUO, LALT(KC_4), KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, + XXXXXXX, KC_TILD, KC_NUHS, KC_SLSH, KC_LCBR, KC_LBRC, KC_RBRC, KC_RCBR, KC_BSLS, KC_MINS, KC_EQL, KC_PIPE, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDS, KC_PLUS, MT(MOD_LSFT, KC_ENT), + _______, XXXXXXX, _______, _______, _______, KC_SPC, KC_SPC, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END + ), + + + /* fn + * ,-----------------------------------------------------------------------------------. + * |DelWrd| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | F11 | F12 | | | | | | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | Enter| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | Space | | | | | | + * `-----------------------------------------------------------------------------------' + */ + [_FN] = LAYOUT_planck_grid( + LALT(KC_BSPC), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL, + XXXXXXX, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, KC_SPC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ), + + + /* Space fn + * ,-----------------------------------------------------------------------------------. + * |PRNT SC| | UP | | | | | | | | |SLEEP | + * |-------+------+------+------+------+-------------+------+------+------+------+------| + * | | LEFT | DOWN | RIGHT| | | | LEFT | DOWN | UP | RIGHT| | + * |-------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |-------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | MUTE |VOLDWN|VOL UP| | + * `-----------------------------------------------------------------------------------' + */ + [_SPACE_FN] = LAYOUT_planck_grid( + KC_PSCR, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLEP, + XXXXXXX, KC_LEFT, KC_DOWN, KC_RIGHT, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, KC__MUTE, KC__VOLDOWN, KC__VOLUP, XXXXXXX + ), + + + /* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | Reset|Qwerty| | | | | | | |MIDIof|MIDIon| Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Dvorak| |AGnorm|AGswap| | |Audoff|Aud on| | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | |Colemk| | | | | |Musoff|Mus on| | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Plover| | | | | | | |Voice-|Voice+| | + * `-----------------------------------------------------------------------------------' + */ + [_ADJUST] = LAYOUT_planck_grid( + RESET, QWERTY, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MI_OFF, MI_ON, KC_DEL, + XXXXXXX, XXXXXXX, XXXXXXX, DVORAK, XXXXXXX, AG_NORM, AG_SWAP, XXXXXXX, XXXXXXX, AU_OFF, AU_ON, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, COLEMAK, XXXXXXX, XXXXXXX, XXXXXXX, TERM_ON, TERM_OFF, MU_OFF, MU_ON, XXXXXXX, + PLOVER, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, MUV_DE, MUV_IN, XXXXXXX + ), + + + /* Colemak + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ + [_COLEMAK] = LAYOUT_planck_grid( + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, + KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT(MOD_LSFT, KC_ENT), + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + + + /* Dvorak + * ,-----------------------------------------------------------------------------------. + * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ + [_DVORAK] = LAYOUT_planck_grid( + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, MT(MOD_LSFT, KC_ENT), + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + + + /* Plover layer (http://opensteno.org) + * ,-----------------------------------------------------------------------------------. + * | # | # | # | # | # | # | # | # | # | # | # | # | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | S | T | P | H | * | * | F | P | L | T | D | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | S | K | W | R | * | * | R | B | G | S | Z | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Exit | | | A | O | | E | U | | | | + * `-----------------------------------------------------------------------------------' + */ + + [_PLOVER] = LAYOUT_planck_grid( + KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, + XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX + ), +}; + +#ifdef AUDIO_ENABLE + float plover_song[][2] = SONG(PLOVER_SOUND); + float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); +#endif + +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return true; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return true; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return true; + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + #ifdef KEYBOARD_planck_rev5 + writePinLow(E6); + #endif + } else { + unregister_code(KC_RSFT); + #ifdef KEYBOARD_planck_rev5 + writePinHigh(E6); + #endif + } + return true; + case PLOVER: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + stop_all_notes(); + PLAY_SONG(plover_song); + #endif + layer_off(_RAISE); + layer_off(_LOWER); + layer_off(_ADJUST); + layer_on(_PLOVER); + if (!eeconfig_is_enabled()) { + eeconfig_init(); + } + keymap_config.raw = eeconfig_read_keymap(); + keymap_config.nkro = 1; + eeconfig_update_keymap(keymap_config.raw); + } + return true; + case EXT_PLV: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(plover_gb_song); + #endif + layer_off(_PLOVER); + } + return true; + } + return true; +} + +bool muse_mode = false; +uint8_t last_muse_note = 0; +uint16_t muse_counter = 0; +uint8_t muse_offset = 70; +uint16_t muse_tempo = 50; + +void encoder_update(bool clockwise) { + if (muse_mode) { + if (IS_LAYER_ON(_RAISE)) { + if (clockwise) { + muse_offset++; + } else { + muse_offset--; + } + } else { + if (clockwise) { + muse_tempo+=1; + } else { + muse_tempo-=1; + } + } + } else { + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } +} + +void dip_update(uint8_t index, bool active) { + switch (index) { + case 0: + if (active) { + #ifdef AUDIO_ENABLE + PLAY_SONG(plover_song); + #endif + layer_on(_ADJUST); + } else { + #ifdef AUDIO_ENABLE + PLAY_SONG(plover_gb_song); + #endif + layer_off(_ADJUST); + } + break; + case 1: + if (active) { + muse_mode = true; + } else { + muse_mode = false; + #ifdef AUDIO_ENABLE + stop_all_notes(); + #endif + } + } +} + +void matrix_scan_user(void) { + #ifdef AUDIO_ENABLE + if (muse_mode) { + if (muse_counter == 0) { + uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()]; + if (muse_note != last_muse_note) { + stop_note(compute_freq_for_midi_note(last_muse_note)); + play_note(compute_freq_for_midi_note(muse_note), 0xF); + last_muse_note = muse_note; + } + } + muse_counter = (muse_counter + 1) % muse_tempo; + } + #endif +} + +bool music_mask_user(uint16_t keycode) { + switch (keycode) { + case RAISE: + case LOWER: + return false; + default: + return true; + } +} diff --git a/keyboards/planck/keymaps/smittey/readme.md b/keyboards/planck/keymaps/smittey/readme.md new file mode 100644 index 000000000000..280847655097 --- /dev/null +++ b/keyboards/planck/keymaps/smittey/readme.md @@ -0,0 +1,28 @@ +# Planck Layout created by [Smittey](/~https://github.com/smittey) + +A layout with a focus around coding, utilising the home row for symbols. There is an additional FN layer and Space function layer + +Main - Qwerty with ctrl swapped around and enter changed to be shift on hold +Lower - Numbers and calculations +Raise - Symbols +Adjust - Keyboard settings and layout changers +FN - Function keys +Space FN - Navigation and media + +## Main +![Main layer layout](https://i.imgur.com/jRbqGUN.png) + +## Lower +![Lower layer layout](https://i.imgur.com/YmdM1q5.png) + +## Raise +![Raise layer layout](https://i.imgur.com/BXxOK1S.png) + +## Adjust +![Adjust layer layout](https://i.imgur.com/M6qBaXO.png) + +## FN +![FN layer layout](https://i.imgur.com/1eiUOH1.png) + +## Space Function +![Space function layer layout](https://i.imgur.com/RJMFEdy.png) \ No newline at end of file diff --git a/keyboards/planck/keymaps/smittey/rules.mk b/keyboards/planck/keymaps/smittey/rules.mk new file mode 100644 index 000000000000..acf0896a321b --- /dev/null +++ b/keyboards/planck/keymaps/smittey/rules.mk @@ -0,0 +1 @@ +SRC += muse.c \ No newline at end of file From 5c1b7fb5021646d05014a89ec1b8ccf458e4f50e Mon Sep 17 00:00:00 2001 From: Yang Li Date: Sat, 19 Oct 2019 08:22:54 +0800 Subject: [PATCH 128/316] Add python-pip as package dependency for archlinux (#7041) --- util/linux_install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/util/linux_install.sh b/util/linux_install.sh index dca0110a5de0..c54a8062341c 100755 --- a/util/linux_install.sh +++ b/util/linux_install.sh @@ -77,6 +77,7 @@ elif grep ID /etc/os-release | grep -q 'arch\|manjaro'; then gcc \ git \ python \ + python-pip \ unzip \ wget \ zip @@ -213,4 +214,4 @@ else fi # Global install tasks -pip3 install -r ${util_dir}/../requirements.txt +pip3 install --user -r ${util_dir}/../requirements.txt From d263579781bd550e0ef21a5a102f790afd588c7c Mon Sep 17 00:00:00 2001 From: KL1RL Date: Fri, 18 Oct 2019 16:36:22 -0800 Subject: [PATCH 129/316] [Keymap] Initial commit of KL1RL keyboard layout (#7060) * Inital commit * Add changes suggest by fauxpark. Tested for normal function --- keyboards/redox/keymaps/KL1RL/config.h | 34 ++++++++++ keyboards/redox/keymaps/KL1RL/keymap.c | 90 +++++++++++++++++++++++++ keyboards/redox/keymaps/KL1RL/readme.md | 22 ++++++ keyboards/redox/keymaps/KL1RL/rules.mk | 2 + 4 files changed, 148 insertions(+) create mode 100644 keyboards/redox/keymaps/KL1RL/config.h create mode 100644 keyboards/redox/keymaps/KL1RL/keymap.c create mode 100644 keyboards/redox/keymaps/KL1RL/readme.md create mode 100644 keyboards/redox/keymaps/KL1RL/rules.mk diff --git a/keyboards/redox/keymaps/KL1RL/config.h b/keyboards/redox/keymaps/KL1RL/config.h new file mode 100644 index 000000000000..ea7525b388f2 --- /dev/null +++ b/keyboards/redox/keymaps/KL1RL/config.h @@ -0,0 +1,34 @@ +/* +Copyright 2018 Mattia Dal Ben + +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 . +*/ + +#pragma once + +/* Use I2C or Serial, not both */ +// #define USE_SERIAL +#define USE_I2C + +/* Select hand configuration */ +//#define MASTER_LEFT +//#define MASTER_RIGHT +#define EE_HANDS + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 14 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 diff --git a/keyboards/redox/keymaps/KL1RL/keymap.c b/keyboards/redox/keymaps/KL1RL/keymap.c new file mode 100644 index 000000000000..2986a51ceb1d --- /dev/null +++ b/keyboards/redox/keymaps/KL1RL/keymap.c @@ -0,0 +1,90 @@ +#include QMK_KEYBOARD_H + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _QWERTY 0 +#define _SYMB 1 +#define _NAV 2 +#define _ADJUST 3 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + SYMB, + NAV, + ADJUST, +}; + +// Shortcut to make keymap more readable +#define SYM_L MO(_SYMB) + +#define KC_ALAS LALT_T(KC_PAST) +#define KC_CTES LCTL_T(KC_ESC) +#define KC_CTQU RCTL_T(KC_QUOT) + +#define KC_NAGR LT(_NAV, KC_GRV) +#define KC_NAMI LT(_NAV, KC_MINS) + +#define KC_ADEN LT(_ADJUST, KC_END) +#define KC_ADPU LT(_ADJUST, KC_PGUP) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + KC_NAGR ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_NAMI , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,SYM_L , SYM_L ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_EQL , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_CTES ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_LBRC , KC_RBRC ,KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,KC_QUOTE , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_ADPU ,KC_PGDN , KC_HOME ,KC_ADEN ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSFT , + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + KC_BSLS ,KC_PPLS ,KC_PMNS ,KC_ALAS , KC_LGUI , KC_BSPC ,KC_DEL , KC_ENT ,KC_SPC , KC_RALT , KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + ), + + [_SYMB] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + _______ ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F8 ,KC_F9 ,KC_F10 ,KC_F11 ,KC_F12 ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_EXLM ,KC_AT ,KC_LCBR ,KC_RCBR ,KC_PIPE ,KC_F6 , KC_F7 ,XXXXXXX ,KC_KP_7 ,KC_KP_8 ,KC_KP_9 ,XXXXXXX ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_HASH ,KC_DLR ,KC_LBRC ,KC_RBRC ,KC_GRV ,_______ , _______ ,XXXXXXX ,KC_KP_4 ,KC_KP_5 ,KC_KP_6 ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_PERC ,KC_CIRC ,KC_LPRN ,KC_RPRN ,KC_TILD ,_______ ,_______ , _______ ,_______ ,XXXXXXX ,KC_KP_1 ,KC_KP_2 ,KC_KP_3 ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ , _______ , _______ ,_______ , _______ ,_______ , KC_KP_0 , KC_KP_0 ,KC_PDOT ,XXXXXXX ,XXXXXXX + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + ), + + [_NAV] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,_______ ,_______ ,_______ ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ , _______ ,XXXXXXX ,XXXXXXX ,KC_WH_U ,XXXXXXX ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ , _______ ,KC_MS_L ,KC_MS_D ,KC_MS_U ,KC_MS_R ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ ,_______ , _______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,KC_WH_D ,XXXXXXX ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , KC_BTN1 , KC_BTN2 ,KC_BTN3 , KC_BTN3 ,KC_BTN2 , KC_BTN1 , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + ), + + [_ADJUST] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + XXXXXXX ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_F11 , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,RESET ,RGB_M_P ,RGB_TOG ,RGB_MOD ,RGB_HUD ,RGB_HUI , RGB_SAD ,RGB_SAI ,RGB_VAD ,RGB_VAI ,XXXXXXX ,XXXXXXX ,KC_F12 , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ ,XXXXXXX , XXXXXXX ,_______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , KC_MUTE , KC_VOLD ,KC_VOLU , KC_BRID ,KC_BRIU , XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + ) + +}; diff --git a/keyboards/redox/keymaps/KL1RL/readme.md b/keyboards/redox/keymaps/KL1RL/readme.md new file mode 100644 index 000000000000..520d00481310 --- /dev/null +++ b/keyboards/redox/keymaps/KL1RL/readme.md @@ -0,0 +1,22 @@ +# A tweaked keymap for Redox + +I copied fculpo's layout and made a few modifcations more suited for my own needs. In general it seems to be a fairly straight foward adaptation +of a standard QWERTY full size keyboard. At least for me. + +![fculpo Layout Image](https://i.imgur.com/OXT8boJ.png) + +## Changes to the default keymap + +Keymap changes from the default keymap are: + +- Move `GUI` (`SUPER`) key to where default left `CTRL` is +- Move `/?` into usual location next to right `SHIFT` - the default flash from Falbatech put `\|` here (might not be the Redox default?), which felt unintuitive +- Put `\|` into bottom-left spot where `GUI` (`SUPER`) was - had to go somewhere and this bottom-left placement sort of balances with the almost bottom-right `/?` +- Change default `ESC` into `ESC` on tap, `CTRL` on hold - for the love of the UNIX-ey `CTRL` key location and to keep `ESC` in the original position +- Add `F11` and `F12` keys to two layers - needed on macOS if you want to control volume up and down from your keyboard (not shown, on a different layer)S +- Access ADJUST layer by holding either `END` or `PAGEUP` off default layer. + +Changes by KL1RL are: +- Remove the right hand `CTRL` combo key, it was bugging me. +- Add Brightness Up and Brightness Down on the right hand thumb cluster on the ADJUST layer. +- Add Mute, Vol Down and Vol Up on LH thumb cluster also on the ADJUST layer. diff --git a/keyboards/redox/keymaps/KL1RL/rules.mk b/keyboards/redox/keymaps/KL1RL/rules.mk new file mode 100644 index 000000000000..a81250cdf6d9 --- /dev/null +++ b/keyboards/redox/keymaps/KL1RL/rules.mk @@ -0,0 +1,2 @@ +RGBLIGHT_ENABLE = yes + From 1b1e0977e020b3b381f874144aed31d0664d88d2 Mon Sep 17 00:00:00 2001 From: Endemoniada Date: Sat, 19 Oct 2019 02:37:16 +0200 Subject: [PATCH 130/316] [Keymap] Mekberg kbd6x keymap (#7061) * First draft of my layout * Improved layout and cleanup of files * Update keymap and add rules * Add keymap.h with permissive_hold setting * Rename keymap.h to correct name config.h * Add next/prev and special lock key to Fn layer * Use correct modifier in MY_LOCK command * Removed unnecessary filler defines * Add build instructions to README * Move RGB controls to more logical up/down key positions, move next/prev controls, remove del from Fn layer * Fix wrong placeholders and fix up formatting * Remove unused code * Clarify comments on custom defines * Update keyboards/kbdfans/kbd6x/keymaps/mekberg/rules.mk Co-Authored-By: fauxpark --- .../kbdfans/kbd6x/keymaps/mekberg/config.h | 5 + .../kbdfans/kbd6x/keymaps/mekberg/keymap.c | 98 +++++++++++++++++++ .../kbdfans/kbd6x/keymaps/mekberg/readme.md | 14 +++ .../kbdfans/kbd6x/keymaps/mekberg/rules.mk | 2 + 4 files changed, 119 insertions(+) create mode 100644 keyboards/kbdfans/kbd6x/keymaps/mekberg/config.h create mode 100644 keyboards/kbdfans/kbd6x/keymaps/mekberg/keymap.c create mode 100644 keyboards/kbdfans/kbd6x/keymaps/mekberg/readme.md create mode 100644 keyboards/kbdfans/kbd6x/keymaps/mekberg/rules.mk diff --git a/keyboards/kbdfans/kbd6x/keymaps/mekberg/config.h b/keyboards/kbdfans/kbd6x/keymaps/mekberg/config.h new file mode 100644 index 000000000000..d29180a5affc --- /dev/null +++ b/keyboards/kbdfans/kbd6x/keymaps/mekberg/config.h @@ -0,0 +1,5 @@ +#pragma once + +// Define some configuration for modtap behavior +// #define TAPPING_TERM 150 +#define PERMISSIVE_HOLD diff --git a/keyboards/kbdfans/kbd6x/keymaps/mekberg/keymap.c b/keyboards/kbdfans/kbd6x/keymaps/mekberg/keymap.c new file mode 100644 index 000000000000..f3be99263960 --- /dev/null +++ b/keyboards/kbdfans/kbd6x/keymaps/mekberg/keymap.c @@ -0,0 +1,98 @@ +/* Copyright 2018 MechMerlin + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// #define MY_LOCK C(A(KC_L)) // Mac: Custom lock hotkey in BTT +#define MY_LOCK C(LCMD(KC_L)) // Mac: Custom lock hotkey in BTT (when Alt/Command have been swapped in macOS) + +/* +KBD6x ANSI physical layout +1u == 8chars + ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ + | | | | | | | | | | | | | | | | + |─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────| + | 1,5u | | | | | | | | | | | | | 1,5u | + |─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────| + | 1,75u | | | | | | | | | | | | 1,25u | + |─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────| + | 2,25u | | | | | | | | | | | 1,75u | | + └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ + | | 1,25u | | 1,25u | | + └────────────────────────────────────────────────────────────────────────────────────────────────────┘ +*/ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( +// ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ +// | | | | | | | | | | | | | | | | + 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_NUBS,KC_NUHS, +// |─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────| +// | 1,5u | | | | | | | | | | | | | 1,5u | + LT(2,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, +// |─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────| +// | 1,75u | | | | | | | | | | | | 1,25u | + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, +// |─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────| +// | 1,25u | | | | | | | | | | | 1,75u | | + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), +// └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +// | | 1,25u | | 1,25u | | + XXXXXXX, KC_LGUI, KC_LALT, KC_SPACE, KC_RALT, KC_RGUI, XXXXXXX +// └────────────────────────────────────────────────────────────────────────────────────────────────────┘ + ), + +// Fn layer, left hand free +// F-keys, RGB controls, media controls, Keyboard functions + [1] = LAYOUT( +// ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ +// | | | | | | | | | | | | | | | | + 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, _______, RESET, +// |─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────| +// | 1,5u | | | | | | | | | | | | | 1,5u | + _______, _______, _______, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, +// |─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────| +// | 1,75u | | | | | | | | | | | | 1,25u | + KC_RCTL, KC_VOLD, KC_VOLU, KC_MUTE, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, MY_LOCK, +// |─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────| +// | 1,25u | | | | | | | | | | | 1,75u | | + _______, BL_TOGG, BL_INC, BL_DEC, BL_STEP, _______, _______, _______, KC_MRWD, KC_MFFD, _______, _______, _______, +// └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +// | | 1,25u | | 1,25u | | + XXXXXXX, _______, _______, KC_MPLY, _______, _______, XXXXXXX +// └────────────────────────────────────────────────────────────────────────────────────────────────────┘ + ), + +// Left Tab-Hold layer, right hand free +// Nav-keys + [2] = LAYOUT( +// ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ +// | | | | | | | | | | | | | | | | + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_BSPC, +// |─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────| +// | 1,5u | | | | | | | | | | | | | 1,5u | + _______, _______, _______, _______, _______, _______, KC_END, KC_PGDN, KC_UP, KC_PGUP, KC_HOME, _______, _______, KC_DEL, +// |─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────| +// | 1,75u | | | | | | | | | | | | 1,25u | + _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, +// |─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────| +// | 1,25u | | | | | | | | | | | 1,75u | | + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +// | | 1,25u | | 1,25u | | + XXXXXXX, _______, _______, _______, _______, _______, XXXXXXX +// └────────────────────────────────────────────────────────────────────────────────────────────────────┘ + ), +}; diff --git a/keyboards/kbdfans/kbd6x/keymaps/mekberg/readme.md b/keyboards/kbdfans/kbd6x/keymaps/mekberg/readme.md new file mode 100644 index 000000000000..febe2e1d68a1 --- /dev/null +++ b/keyboards/kbdfans/kbd6x/keymaps/mekberg/readme.md @@ -0,0 +1,14 @@ +# General Information + +This is more or less a HHKB base layout, but with completely different Fn layers. I don't use most of the HHKB secondary key positions because, honestly, they make no sense to me at all. + +Fn key layer is focused mostly on keyboard firmware features (like RGB) as well as some of the necessary alternate functions. It also hold media controls, F-keys and Reset. + +Left Tab-Hold layer is focused on nav cluster functionality, and turns Backspace into Delete (and moves Backspace up into the top right 1u position). + + +# Build instructions + +To simply build the firmware file: `make clean && make kbdfans/kbd6x:mekberg` + +To build and immediately flash: `make clean && make kbdfans/kbd6x:mekberg:dfu` diff --git a/keyboards/kbdfans/kbd6x/keymaps/mekberg/rules.mk b/keyboards/kbdfans/kbd6x/keymaps/mekberg/rules.mk new file mode 100644 index 000000000000..257214607e2f --- /dev/null +++ b/keyboards/kbdfans/kbd6x/keymaps/mekberg/rules.mk @@ -0,0 +1,2 @@ +NKRO_ENABLE = yes # USB Nkey Rollover +CONSOLE_ENABLE = no # Console for debug From b23f6011c34dcb471c312655f7af37c0a0f5f779 Mon Sep 17 00:00:00 2001 From: Amber Holly Date: Sat, 19 Oct 2019 02:14:49 +0100 Subject: [PATCH 131/316] Remove build option firmware size impacts (#6947) * Update rules.mk template to remove build option size impacts * Add rules.mk cleaning script * Update all rules.mk files to remove build option firmware size impact messages * Remove references to feature filesize in documentation * Revert "Update all rules.mk files to remove build option firmware size impact messages" This reverts commit 7cfe70976bcc223bf47c960b2e6af8596df80a32. * Fix regex in cleanup script and exclude keymaps/ directories * Update quantum/template/avr/rules.mk Fixed missing tabs/spaces. Co-Authored-By: fauxpark --- docs/config_options.md | 10 ++++---- docs/feature_hd44780.md | 8 +++--- docs/feature_terminal.md | 4 +-- docs/getting_started_make_guide.md | 8 +----- quantum/template/avr/rules.mk | 13 +++++----- util/rules_cleaner.sh | 40 ++++++++++++++++++++++++++++++ 6 files changed, 58 insertions(+), 25 deletions(-) create mode 100755 util/rules_cleaner.sh diff --git a/docs/config_options.md b/docs/config_options.md index ec3d1a1c8ab2..abd98ec8a802 100644 --- a/docs/config_options.md +++ b/docs/config_options.md @@ -310,13 +310,13 @@ This is a [make](https://www.gnu.org/software/make/manual/make.html) file that i Use these to enable or disable building certain features. The more you have enabled the bigger your firmware will be, and you run the risk of building a firmware too large for your MCU. * `BOOTMAGIC_ENABLE` - * Virtual DIP switch configuration(+1000) + * Virtual DIP switch configuration * `MOUSEKEY_ENABLE` - * Mouse keys(+4700) + * Mouse keys * `EXTRAKEY_ENABLE` - * Audio control and System control(+450) + * Audio control and System control * `CONSOLE_ENABLE` - * Console for debug(+400) + * Console for debug * `COMMAND_ENABLE` * Commands for debug and configuration * `COMBO_ENABLE` @@ -348,7 +348,7 @@ Use these to enable or disable building certain features. The more you have enab * `NO_USB_STARTUP_CHECK` * Disables usb suspend check after keyboard startup. Usually the keyboard waits for the host to wake it up before any tasks are performed. This is useful for split keyboards as one half will not get a wakeup call but must send commands to the master. * `LINK_TIME_OPTIMIZATION_ENABLE` - = Enables Link Time Optimization (`LTO`) when compiling the keyboard. This makes the process take longer, but can significantly reduce the compiled size (and since the firmware is small, the added time is not noticable). However, this will automatically disable the old Macros and Functions features automatically, as these break when `LTO` is enabled. It does this by automatically defining `NO_ACTION_MACRO` and `NO_ACTION_FUNCTION` + = Enables Link Time Optimization (`LTO`) when compiling the keyboard. This makes the process take longer, but can significantly reduce the compiled size (and since the firmware is small, the added time is not noticable). However, this will automatically disable the old Macros and Functions features automatically, as these break when `LTO` is enabled. It does this by automatically defining `NO_ACTION_MACRO` and `NO_ACTION_FUNCTION` ## USB Endpoint Limitations diff --git a/docs/feature_hd44780.md b/docs/feature_hd44780.md index e0838948a2bd..0a174035be8d 100644 --- a/docs/feature_hd44780.md +++ b/docs/feature_hd44780.md @@ -2,7 +2,7 @@ This is an integration of Peter Fleury's LCD library. This page will explain the basics. [For in depth documentation visit his page.](http://homepage.hispeed.ch/peterfleury/doxygen/avr-gcc-libraries/group__pfleury__lcd.html) -You can enable support for HD44780 Displays by setting the `HD44780_ENABLE` flag in your keyboards `rules.mk` to yes. This will use about 400 KB of extra space. +You can enable support for HD44780 Displays by setting the `HD44780_ENABLE` flag in your keyboards `rules.mk` to yes. ## Configuration @@ -26,7 +26,7 @@ Uncomment the section labled HD44780 and change the parameters as needed. #define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 #define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 #define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 -#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 #define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 #define LCD_RS_PORT LCD_PORT //< port for RS line #define LCD_RS_PIN 3 //< pin for RS line @@ -39,14 +39,14 @@ Uncomment the section labled HD44780 and change the parameters as needed. Should you need to configure other properties you can copy them from `quantum/hd44780.h` and set them in your `config.h` -## Usage +## Usage To initialize your display, call `lcd_init()` with one of these parameters: ```` LCD_DISP_OFF : display off LCD_DISP_ON : display on, cursor off LCD_DISP_ON_CURSOR : display on, cursor on -LCD_DISP_ON_CURSOR_BLINK : display on, cursor on flashing +LCD_DISP_ON_CURSOR_BLINK : display on, cursor on flashing ```` This is best done in your keyboards `matrix_init_kb` or your keymaps `matrix_init_user`. It is advised to clear the display before use. diff --git a/docs/feature_terminal.md b/docs/feature_terminal.md index 1863599f8440..f85062216543 100644 --- a/docs/feature_terminal.md +++ b/docs/feature_terminal.md @@ -1,6 +1,6 @@ # Terminal -> This feature is currently *huge* at 4400 bytes, and should probably only be put on boards with a lot of memory, or for fun. +> This feature is currently *huge*, and should probably only be put on boards with a lot of memory, or for fun. The terminal feature is a command-line-like interface designed to communicate through a text editor with keystrokes. It's beneficial to turn off auto-indent features in your editor. @@ -56,7 +56,7 @@ Outputs the last 5 commands entered 1. help 2. about 3. keymap 0 -4. help +4. help 5. flush-buffer ``` diff --git a/docs/getting_started_make_guide.md b/docs/getting_started_make_guide.md index 71e9d33f25f4..d1ecf6f5a641 100644 --- a/docs/getting_started_make_guide.md +++ b/docs/getting_started_make_guide.md @@ -41,8 +41,6 @@ Set these variables to `no` to disable them, and `yes` to enable them. This allows you to hold a key and the salt key (space by default) and have access to a various EEPROM settings that persist over power loss. It's advised you keep this disabled, as the settings are often changed by accident, and produce confusing results that makes it difficult to debug. It's one of the more common problems encountered in help sessions. -Consumes about 1000 bytes. - `MOUSEKEY_ENABLE` This gives you control over cursor movements and clicks via keycodes/custom functions. @@ -67,8 +65,6 @@ To see the text, open `hid_listen` and enjoy looking at your printed messages. **NOTE:** Do not include *uprint* messages in anything other than your keymap code. It must not be used within the QMK system framework. Otherwise, you will bloat other people's .hex files. -Consumes about 400 bytes. - `COMMAND_ENABLE` This enables magic commands, typically fired with the default magic key combo `LSHIFT+RSHIFT+KEY`. Magic commands include turning on debugging messages (`MAGIC+D`) or temporarily toggling NKRO (`MAGIC+N`). @@ -125,11 +121,9 @@ Use this to debug changes to variable values, see the [tracing variables](unit_t This enables using the Quantum SYSEX API to send strings (somewhere?) -This consumes about 5390 bytes. - `KEY_LOCK_ENABLE` -This enables [key lock](feature_key_lock.md). This consumes an additional 260 bytes. +This enables [key lock](feature_key_lock.md). `SPLIT_KEYBOARD` diff --git a/quantum/template/avr/rules.mk b/quantum/template/avr/rules.mk index 0ed05e71b548..bb2bd14f9fa6 100644 --- a/quantum/template/avr/rules.mk +++ b/quantum/template/avr/rules.mk @@ -23,10 +23,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -34,9 +34,8 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) -UNICODE_ENABLE = no # Unicode +MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/util/rules_cleaner.sh b/util/rules_cleaner.sh new file mode 100755 index 000000000000..ac27c2b09ba5 --- /dev/null +++ b/util/rules_cleaner.sh @@ -0,0 +1,40 @@ +#!/bin/bash + +# This script finds all rules.mk files in keyboards/ subdirectories, +# and deletes the build option filesize impacts from them. + +# Print an error message with the word "ERROR" in red. +echo_error() { + echo -e "[\033[0;91mERROR\033[m]: $1" +} + +# If we've been started from util/, we want to be in qmk_firmware/ +[[ "$PWD" == *util ]] && cd .. + +# The root qmk_firmware/ directory should have a subdirectory called quantum/ +if [ ! -d "quantum" ]; then + echo_error "Could not detect the QMK firmware directory!" + echo_error "Are you sure you're in the right place?" + exit 1 +fi + +# Set the inplace editing parameter for sed. +# macOS/BSD sed expects a file extension immediately following -i. +set_sed_i() { + sed_i=(-i) + + case $(uname -a) in + *Darwin*) sed_i=(-i "") + esac +} +set_sed_i + +# Exclude keyamps/ directories +files=$(find keyboards -type f -name 'rules.mk' -not \( -path '*/keymaps*' -prune \)) + +# Edit rules.mk files +for file in $files; do + sed "${sed_i[@]}" -e "s/(+[0-9].*)$//g" "$file" +done + +echo "Cleaned up rules.mk files." From c26faed2b60e59293f631e041619567f23a93406 Mon Sep 17 00:00:00 2001 From: tominabox1 Date: Fri, 18 Oct 2019 20:15:57 -0500 Subject: [PATCH 132/316] [Keymap] Tominabox1 userspace creation (#7014) * rebaselined the whole fork and added cool matrix animations * Updated dfu bootloader rules, oleds working on test map * Moving test branch into main moving my _test branch files into the main since the repo is now in the dev branch, don't see any reason to keep separate folders. * Update keymap.c Adding DOT to number layer * added LED sleeping * working on getting matrix rgb to sleep upon usb suspend uploading to github for qmk staff help * Added master sleep on usb suspend Unfortunately the sleep function does not work on the slave side so will probably revert this change later * bringing hhkb config up to current with other tominabox1 configs * Update config.h since master side is the only one that sleeps, going to disable this for now. * testing oled stuff * Update rules.mk * tinkering with oled still * Finally fixed custom image with corne doug * Adding keymap to dimple instead of screwing up the upstream references. * Changed oled image to peepo ggers * working on oled sleep * Update keymap.c * fixes oled wake/sleep issues * Adding :b: and BEPIS macros * Update .gitignore * Cleaning up and improving documentation * Update keymap.c * Adding my minivan keymap * Fixed error on keymap * fixed OLEDs not turning on and moved tapping term to the keymap file * Changed tapping term from 200 to 250 * Revised Fkey layers, arrows, question mark locations * Update keymap.c * tweaked tapping term and types on CRKBD, revised layout on HHKB * Update keymap.c * general code cleanup, keymap displays * Set up userspace for common keymap elements * tapping term stuff for shift * testing * Fixed new tapdance for accessing number and fkey layers * Update tominabox1.h * stuff * fixing function calls for userspace * cleaning up crkbd config and moving stuff to userspace * finally fixed oled lightup issues * cleaning up a few maps and rules * Removing permissive hold and returning spacefn to all boards. * Settting up wrapper keymaps for Dimple, Minivan, and Corne Wrappers * small tweaks * Update wrappers.h * finishing wrappers on Minivan and Dimple * Revised tapping term definition Providing additional tapping term config for CRKBD only. * Code cleanup and documentation * Update readme.md * Update readme.md * Wrapers and continued code cleanup and documentation * moved oled py scripts to user folder * completed wrapper implementation of CRKBD * added matrix startup mode - not working yet pending upstream changes * removed unused code in tominabox1.c * Fixing custom keycodes and tap dance indices fixed custom keycodes and tap dance indices Adding beginning of dimple RGB matrix definition changed oled on corne to scrolling matrix thing Added copy pasta * Secondary layer tweaks Swapping hands of numbers and symbols as well as tweaking tapping terms accordingly * Update tominabox1.c Continued refinement of tapping term to support better right hand symbol access. * Fixes from pr 7014 Removed gitignore data from qmk master Reverted changes to Drashna's crkbd keymap Accepted changes to crkbd keymap Added ignore to hhkb keymap - I think I need this because Teensy. Will revisit another time * Removing hhkb keymap for rework * Adding back hhkb keymap Re-adding hhkb folder with ignores * Reverting changes to Dimple default totally did not intend to modify these * Update keymap.c Reverting changes to Drashna's corne map * Accepting recommended changes * Reduced tap hold caps delay moved bootmagic enable to general usage Revised tapping terms Removed unused keycode defs * bootmagic * Update rules.mk * Fixed permissions (support 7014) and bootmagic addition Fixed permissions on Drashna's keymap and Dimple default keymap files. Adding bootmagic to my crkbd config. * Fixing permissions --- keyboards/crkbd/keymaps/tominabox1/keymap.c | 46 ++ keyboards/hhkb/keymaps/tominabox1/.gitignore | 3 + keyboards/hhkb/keymaps/tominabox1/keymap.c | 12 + .../dimple/keymaps/tominabox1/keymap.c | 109 +++++ .../minivan/keymaps/tominabox1/keymap.c | 74 +++ users/tominabox1/.gitignore | 2 + users/tominabox1/config.h | 80 ++++ users/tominabox1/dimple_rgb.c | 433 ++++++++++++++++++ users/tominabox1/doug.c | 243 ++++++++++ users/tominabox1/readme.md | 5 + users/tominabox1/rules.mk | 26 ++ users/tominabox1/tominabox1.c | 281 ++++++++++++ users/tominabox1/tominabox1.h | 56 +++ users/tominabox1/wrappers.h | 142 ++++++ 14 files changed, 1512 insertions(+) create mode 100755 keyboards/crkbd/keymaps/tominabox1/keymap.c create mode 100644 keyboards/hhkb/keymaps/tominabox1/.gitignore create mode 100644 keyboards/hhkb/keymaps/tominabox1/keymap.c create mode 100644 keyboards/lazydesigners/dimple/keymaps/tominabox1/keymap.c create mode 100644 keyboards/thevankeyboards/minivan/keymaps/tominabox1/keymap.c create mode 100644 users/tominabox1/.gitignore create mode 100644 users/tominabox1/config.h create mode 100644 users/tominabox1/dimple_rgb.c create mode 100644 users/tominabox1/doug.c create mode 100644 users/tominabox1/readme.md create mode 100644 users/tominabox1/rules.mk create mode 100644 users/tominabox1/tominabox1.c create mode 100644 users/tominabox1/tominabox1.h create mode 100644 users/tominabox1/wrappers.h diff --git a/keyboards/crkbd/keymaps/tominabox1/keymap.c b/keyboards/crkbd/keymaps/tominabox1/keymap.c new file mode 100755 index 000000000000..d58911194eea --- /dev/null +++ b/keyboards/crkbd/keymaps/tominabox1/keymap.c @@ -0,0 +1,46 @@ +#include QMK_KEYBOARD_H +#include "tominabox1.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_wrapper( + ___________________CRKBD1__________________, + ___________________CRKBD2__________________, + ___________________CRKBD3__________________, + ___________________CRKBD4__________________ + ), + + [_RAISE] = LAYOUT_wrapper( + ___________________RAISE1__________________, + ___________________RAISE2__________________, + ___________________CRKBD_RAISE3____________, + ___________________CRKBD_RAISE4____________ + ), + + [_LOWER] = LAYOUT_wrapper( + _________________LOWER_1___________________, + _________________LOWER_2___________________, + ___________________CRKBD_LOW3______________, + ___________________CRKBD_LOW4______________ + ), + + [_ADJUST] = LAYOUT_wrapper( + ___________________ADJST1__________________, + ___________________CRKBD_ADJST2____________, + ___________________CRKBD_ADJST3____________, + ___________________CRKBD_ADJST4____________ + ), + + [_ARROW] = LAYOUT_wrapper( + ___________________ARROW1__________________, + ___________________ARROW2__________________, + ___________________ARROW3__________________, + ___________________ARROW4__________________ + ), + [_FKEY] = LAYOUT_wrapper( + ___________________FKEY1___________________, + ___________________FKEY2___________________, + ___________________CRKBD_FKEY3_____________, + ___________________CRKBD_FKEY4_____________ + ) + +}; diff --git a/keyboards/hhkb/keymaps/tominabox1/.gitignore b/keyboards/hhkb/keymaps/tominabox1/.gitignore new file mode 100644 index 000000000000..4b8c99bfb86f --- /dev/null +++ b/keyboards/hhkb/keymaps/tominabox1/.gitignore @@ -0,0 +1,3 @@ +*.h +matrix.c +rules.mk diff --git a/keyboards/hhkb/keymaps/tominabox1/keymap.c b/keyboards/hhkb/keymaps/tominabox1/keymap.c new file mode 100644 index 000000000000..d7aea9773687 --- /dev/null +++ b/keyboards/hhkb/keymaps/tominabox1/keymap.c @@ -0,0 +1,12 @@ +#include QMK_KEYBOARD_H +#include "tominabox1.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT(KC_GESC, 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_DEL, KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSPC, KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, TD(TD_SFT_CPS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(2)), + + [1] = LAYOUT(KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, KC_CAPS, KC_MFFD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC__MUTE, KC__VOLDOWN, KC__VOLUP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + [2] = LAYOUT(KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS), + + [3] = LAYOUT(KC_GESC, KC_EXLM, KC_EML, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PGDN, KC_UP, KC_PGUP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_TRNS) +}; diff --git a/keyboards/lazydesigners/dimple/keymaps/tominabox1/keymap.c b/keyboards/lazydesigners/dimple/keymaps/tominabox1/keymap.c new file mode 100644 index 000000000000..cdaade987f17 --- /dev/null +++ b/keyboards/lazydesigners/dimple/keymaps/tominabox1/keymap.c @@ -0,0 +1,109 @@ +#include QMK_KEYBOARD_H +#include "tominabox1.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Base COLEMAK layer + * ,---------------------------------------------------------------. + * |GEsc| Q | W | F | P | G | J | L | U | Y | : | Bspc | + * |---------------------------------------------------------------| + * |Tab-Ctl| A | R | S | T | D | H | N | E | I | O |Quote| + * |---------------------------------------------------------------| + * |Shft/Cap| Z | X | C | V | B | K | M | , | Up | . | + * |---------------------------------------------------------------| + * |Ctrl|Gui |Alt | Spc/Lwr | Spc/Rse |Left|Down|Rght| + * `-----------------------------------------------------' + */ + + [_BASE] = LAYOUT_wrapper( + __________________DIMPLE1__________________, + __________________DIMPLE2__________________, + __________________DIMPLE3L_________________,__________________DIMPLE3R_________________, + __________________DIMPLE4__________________ + ), + +/* Lower Symbol Layer + * ,---------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |---------------------------------------------------------------| + * | Del | | | | | | | _ | + | { | } | | | + * |---------------------------------------------------------------| + * | | | | | | | | | ; |PgUp| ? | + * |---------------------------------------------------------------| + * | | | | | |Home|PgDn|End | + * `-----------------------------------------------------' + */ + + [_LOWER] = LAYOUT_wrapper( + _________________LOWER_1___________________, + _________________LOWER_2___________________, + _________________LOWER_3___________________, + _________________LOWER_4___________________ + ), + +/* Raise Number Layer + * ,---------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bspc | + * |---------------------------------------------------------------| + * | Ins | | | | | | | - | = | [ | ] | \ | + * |---------------------------------------------------------------| + * | | | | | | | | | | . | / | + * |---------------------------------------------------------------| + * |VolD|Mute|VolU| | | | | | + * `-----------------------------------------------------' + */ + + [_RAISE] = LAYOUT_wrapper( + ___________________RAISE1__________________, + ___________________RAISE2__________________, + ___________________RAISE3__________________, + ___________________RAISE4__________________ + + ), + +/* Adjust Layer + * ,---------------------------------------------------------------. + * |RST |EEP | | | | | | | | | | | + * |---------------------------------------------------------------| + * | MP | | | | | | | | | | | | + * |---------------------------------------------------------------| + * | MODE | HUI| HUD|M_SN| | | | | | | | + * |---------------------------------------------------------------| + * |RGB-|RGB |RGB+| | | | | | + * `-----------------------------------------------------' + */ + + [_ADJUST] = LAYOUT_wrapper( + ___________________ADJST1__________________, + ___________________ADJST2__________________, + ___________________ADJST3__________________, + ___________________ADJST4__________________ + + ), +/* Fkey Layer +* ,---------------------------------------------------------------. +* | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10| | +* |---------------------------------------------------------------| +* | | | | | | | | | | F11| F12| | +* |---------------------------------------------------------------| +* | | | | | | | | | | | | +* |---------------------------------------------------------------| +* | | | | | |FKEY| | | +* `-----------------------------------------------------' +*/ + + [_FKEY] = LAYOUT_wrapper( + ___________________FKEY1___________________, + ___________________FKEY2___________________, + ___________________FKEY3___________________, + ___________________FKEY4___________________ + ), +}; + +void led_set_user(uint8_t usb_led) { +if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinLow(E6); + } else { + writePinHigh(E6); + } +} diff --git a/keyboards/thevankeyboards/minivan/keymaps/tominabox1/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/tominabox1/keymap.c new file mode 100644 index 000000000000..a465da3bdfd2 --- /dev/null +++ b/keyboards/thevankeyboards/minivan/keymaps/tominabox1/keymap.c @@ -0,0 +1,74 @@ +#include QMK_KEYBOARD_H +#include "tominabox1.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * |GESC| Q | W | F | P | G | J | L | U | Y | ; | BSPC | + * | TAB | A | R | S | T | D | H | N | E | I | O | ' | + * |SHIFT | Z | X | C | V | B | K | M | , | UP | . | / | + * |CTRL | WIN | ALT | ENTR | SPACE | LFT |DOWN|RGHT|FKEY| + */ + + [_BASE] = LAYOUT_arrow_wrapper( + __________________MINIVAN1_________________, + __________________MINIVAN2_________________, + __________________MINIVAN3_________________, + __________________MINIVAN4_________________ + ), + + /* + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | DEL | + * | | | | | | | | _ | + | { | } | PIPE| + * |SHIFT | | | | | | | |PGDN| UP | ? | / | + * |CTRL | WIN | ALT | ENTR | SPACE | LFT |DOWN|RGHT|FKEY| + */ + + [_LOWER] = LAYOUT_arrow_wrapper( + _________________LOWER_1___________________, + _________________LOWER_2___________________, + __________________MININUM3_________________, + __________________MININUM4_________________ + ), + + /* + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | BSPC | + * | INS | | | | | | | - | = | [ | ] | \ | + * | | | | | | | | | | | / | | + * |CTRL | WIN | ALT | ENTR | SPACE | LFT |DOWN|RGHT|FKEY| + */ + + [_RAISE] = LAYOUT_arrow_wrapper( + ___________________RAISE1__________________, + ___________________RAISE2__________________, + ___________________RVAN_3__________________, + ___________________RVAN_4__________________ + ), + + /* + * |REST|EERS| | | | | | | | | | | + * | | | | | | | | | | | | | + * | | | | | | | | | | | | | + * | | | | ENTR | SPACE | | | | | + */ + + [_ADJUST] = LAYOUT_arrow_wrapper( + ___________________ADJST1__________________, + ___________________ADJST2__________________, + ___________________ADJVAN3_________________, + ___________________ADJVAN4_________________ + ), + + /* + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10| | + * | | | | | | | | | |F11 | F12| | + * | | | | | | | | | | | | | + * | | | | | | FKEY | | | | + */ + + [_FKEY] = LAYOUT_arrow_wrapper( + ___________________FKEY1___________________, + ___________________FKEY2___________________, + ___________________FVAN_3__________________, + ___________________FVAN_4__________________ + ), + }; diff --git a/users/tominabox1/.gitignore b/users/tominabox1/.gitignore new file mode 100644 index 000000000000..62a866698227 --- /dev/null +++ b/users/tominabox1/.gitignore @@ -0,0 +1,2 @@ +*.bmp +*.py diff --git a/users/tominabox1/config.h b/users/tominabox1/config.h new file mode 100644 index 000000000000..2a8c1e943db2 --- /dev/null +++ b/users/tominabox1/config.h @@ -0,0 +1,80 @@ +#pragma once + +// Tapping term settings +#define TAPPING_TERM_PER_KEY +#define TAP_HOLD_CAPS_DELAY 350 +#define BOOTMAGIC_KEY_SALT KC_BSPACE +#define BOOTMAGIC_KEY_EEPROM_CLEAR KC_Q + +// OLED settings +#define OLED_FONT_H "users/tominabox1/doug.c" +#define OLED_DISABLE_TIMEOUT + +#define DEBOUNCE 5 + +// Setup RGB settings for the Dimple. +#ifdef KEYBOARD_lazydesigners_dimple + #ifdef RGBLIGHT_ENABLE + #undef RGBLED_NUM + #define RGBLED_NUM 50 + #define RGBLIGHT_ANIMATIONS + #define RGBLIGHT_SLEEP + #endif // RGBLIGHT_ENABLE + + #ifdef RGB_MATRIX_ENABLE + #undef RGBLED_NUM + #define RGBLED_NUM 50 + #define DRIVER_LED_TOTAL RGBLED_NUM + #endif // RGBL_MATRIX_ENABLE +#endif // KEYBOARD_lazydesigners_dimple + +// RGB_Matrix settings +#ifdef RGB_MATRIX_ENABLE + #define RGB_MATRIX_KEYPRESSES // reacts to keypresses + #define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended + #define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) + #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. + #define RGB_MATRIX_HUE_STEP 8 + #define RGB_MATRIX_SAT_STEP 8 + #define RGB_MATRIX_VAL_STEP 8 + #define RGB_MATRIX_SPD_STEP 10 + #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT + /* Disable the animations you don't want/need. You will need to disable a good number of these + because they take up a lot of space. Disable until you can successfully compile your firmware. */ + // #define DISABLE_RGB_MATRIX_ALPHAS_MODS + // #define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN + #define DISABLE_RGB_MATRIX_BREATHING + // #define DISABLE_RGB_MATRIX_CYCLE_ALL + // #define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT + // #define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN + // #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN + // #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL + #define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON + #define DISABLE_RGB_MATRIX_DUAL_BEACON + #define DISABLE_RGB_MATRIX_RAINBOW_BEACON + #define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS + // #define DISABLE_RGB_MATRIX_RAINDROPS + #define DISABLE_RGB_MATRIX_JELLYBEN_RAINDROPS + // # define DISABLE_RGB_MATRIX_TYPING_HEATMAP + #define DISABLE_RGB_MATRIX_DIGITAL_RAIN + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE + // #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE + // #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS + // #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS + #define DISABLE_RGB_MATRIX_SPLASH + #define DISABLE_RGB_MATRIX_MULTISPLASH + #define DISABLE_RGB_MATRIX_SOLID_SPLASH + #define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +#endif //RGB_MATRIX_ENABLE + +// Hex size reduction options +#ifndef NO_DEBUG + #define NO_DEBUG +#endif // !NO_DEBUG +#if !defined(NO_PRINT) && !defined(CONSOLE_ENABLE) + #define NO_PRINT +#endif // !NO_PRINT +#define NO_ACTION_ONESHOT diff --git a/users/tominabox1/dimple_rgb.c b/users/tominabox1/dimple_rgb.c new file mode 100644 index 000000000000..49d95eb43a97 --- /dev/null +++ b/users/tominabox1/dimple_rgb.c @@ -0,0 +1,433 @@ +#include "dz60rgb.h" +#include "config.h" +#if defined (dzrgb60_iso) +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { + {0, K_14, J_14, L_14}, + {0, K_13, J_13, L_13}, + {0, K_12, J_12, L_12}, + {0, K_11, J_11, L_11}, + {0, K_10, J_10, L_10}, + {0, K_9, J_9, L_9}, + {0, K_8, J_8, L_8}, + {0, K_7, J_7, L_7}, + {0, K_6, J_6, L_6}, + {0, K_5, J_5, L_5}, + {0, K_4, J_4, L_4}, + {0, K_3, J_3, L_3}, + {0, K_2, J_2, L_2}, + {0, K_1, J_1, L_1}, + {0, H_15, G_15, I_15}, + {0, H_13, G_13, I_13}, + {0, H_12, G_12, I_12}, + {0, H_11, G_11, I_11}, + {0, H_10, G_10, I_10}, + {0, H_9, G_9, I_9}, + {0, H_8, G_8, I_8}, + {0, H_7, G_7, I_7}, + {0, H_6, G_6, I_6}, + {0, H_5, G_5, I_5}, + {0, H_4, G_4, I_4}, + {0, H_3, G_3, I_3}, + {0, H_2, G_2, I_2}, + {0, H_1, G_1, I_1}, + {0, B_14, A_14, C_14}, + {0, E_12, D_12, F_12}, + {0, E_11, D_11, F_11}, + {0, E_10, D_10, F_10}, + {0, E_9, D_9, F_9}, + {0, E_8, D_8, F_8}, + {0, E_7, D_7, F_7}, + {0, E_6, D_6, F_6}, + {0, E_5, D_5, F_5}, + {0, E_4, D_4, F_4}, + {0, E_3, D_3, F_3}, + {0, E_2, D_2, F_2}, + {0, E_1, D_1, F_1}, + {0, B_13, A_13, C_13}, + {0, B_11, A_11, C_11}, + {0, B_10, A_10, C_10}, + {0, B_9, A_9, C_9}, + {0, B_8, A_8, C_8}, + {0, B_7, A_7, C_7}, + {0, B_6, A_6, C_6}, + {0, B_5, A_5, C_5}, + {0, B_4, A_4, C_4}, + {0, B_3, A_3, C_3}, + {0, B_2, A_2, C_2}, + {0, B_1, A_1, C_1}, + {0, B_15, A_15, C_15}, + {0, E_13, D_13, F_13}, + {0, B_12, A_12, C_12}, + {0, E_15, D_15, F_15}, + {0, B_16, A_16, C_16}, + {0, E_16, D_16, F_16}, + {0, H_16, G_16, I_16}, + {0, K_16, J_16, L_16}, +}; + +led_config_t g_led_config = { { + { 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }, + { 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 28 }, + { 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, NO_LED, 14 }, + { 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, NO_LED, NO_LED }, + { 60, 59, 58, NO_LED, NO_LED, 57, NO_LED, NO_LED, NO_LED, 56, 55, 54, NO_LED, 53 } +}, { + { 216, 0 }, { 192, 0 }, { 176, 0 }, { 160, 0 }, { 144, 0 }, { 128, 0 }, { 112, 0 }, { 96, 0 }, { 80, 0 }, { 64, 0 }, { 48, 0 }, { 32, 0 }, { 16, 0 }, { 0, 0 }, + { 220, 24 }, { 200, 16 }, { 184, 16 }, { 168, 16 }, { 152, 16 }, { 136, 16 }, { 120, 16 }, { 104, 16 }, { 88, 16 }, { 72, 16 }, { 56, 16 }, { 40, 16 }, { 24, 16 }, { 4, 16 }, + { 204, 32 }, { 188, 32 }, { 172, 32 }, { 156, 32 }, { 140, 32 }, { 124, 32 }, { 108, 32 }, { 92, 32 }, { 76, 32 }, { 60, 32 }, { 44, 32 }, { 28, 32 }, { 6, 32 }, { 210, 48 }, + { 180, 48 }, { 164, 48 }, { 148, 48 }, { 132, 48 }, { 116, 48 }, { 100, 48 }, { 84, 48 }, { 68, 48 }, { 52, 48 }, { 20, 48 }, { 10, 48 }, { 222, 64 }, { 202, 64 }, { 182, 64 }, + { 162, 64 }, { 102, 64 }, { 42, 64 }, { 22, 64 }, { 2, 64 } +}, { + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1, + 1, 4, 1, 1, 1 +} }; + +#elif defined (dzrgb60_hhkb) +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { + {0, H_15, G_15, I_15}, + {0, K_14, J_14, L_14}, + {0, K_13, J_13, L_13}, + {0, K_12, J_12, L_12}, + {0, K_11, J_11, L_11}, + {0, K_10, J_10, L_10}, + {0, K_9, J_9, L_9}, + {0, K_8, J_8, L_8}, + {0, K_7, J_7, L_7}, + {0, K_6, J_6, L_6}, + {0, K_5, J_5, L_5}, + {0, K_4, J_4, L_4}, + {0, K_3, J_3, L_3}, + {0, K_2, J_2, L_2}, + {0, K_1, J_1, L_1}, + {0, H_14, G_14, I_14}, + {0, H_13, G_13, I_13}, + {0, H_12, G_12, I_12}, + {0, H_11, G_11, I_11}, + {0, H_10, G_10, I_10}, + {0, H_9, G_9, I_9}, + {0, H_8, G_8, I_8}, + {0, H_7, G_7, I_7}, + {0, H_6, G_6, I_6}, + {0, H_5, G_5, I_5}, + {0, H_4, G_4, I_4}, + {0, H_3, G_3, I_3}, + {0, H_2, G_2, I_2}, + {0, H_1, G_1, I_1}, + {0, E_14, D_14, F_14}, + {0, E_12, D_12, F_12}, + {0, E_11, D_11, F_11}, + {0, E_10, D_10, F_10}, + {0, E_9, D_9, F_9}, + {0, E_8, D_8, F_8}, + {0, E_7, D_7, F_7}, + {0, E_6, D_6, F_6}, + {0, E_5, D_5, F_5}, + {0, E_4, D_4, F_4}, + {0, E_3, D_3, F_3}, + {0, E_2, D_2, F_2}, + {0, E_1, D_1, F_1}, + {0, B_14, A_14, C_14}, + {0, B_13, A_13, C_13}, + {0, B_11, A_11, C_11}, + {0, B_10, A_10, C_10}, + {0, B_9, A_9, C_9}, + {0, B_8, A_8, C_8}, + {0, B_7, A_7, C_7}, + {0, B_6, A_6, C_6}, + {0, B_5, A_5, C_5}, + {0, B_4, A_4, C_4}, + {0, B_3, A_3, C_3}, + {0, B_2, A_2, C_2}, + {0, B_1, A_1, C_1}, + {0, B_15, A_15, C_15}, + {0, E_13, D_13, F_13}, + {0, B_12, A_12, C_12}, + {0, B_16, A_16, C_16}, + {0, E_16, D_16, F_16}, + {0, H_16, G_16, I_16}, + {0, K_16, J_16, L_16}, +}; + +led_config_t g_led_config = { { + { 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 }, + { 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15 }, + { 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 0, 29 }, + { 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, NO_LED, 42 }, + { 61, 60, 59, NO_LED, NO_LED, 58, NO_LED, NO_LED, NO_LED, NO_LED, 57, 56, NO_LED, 55 } +}, { + { 224, 0 }, { 208, 0 }, { 192, 0 }, { 176, 0 }, { 160, 0 }, { 144, 0 }, { 128, 0 }, { 112, 0 }, { 96, 0 }, { 80, 0 }, { 64, 0 }, { 48, 0 }, { 32, 0 }, { 16, 0 }, + { 0, 0 }, { 220, 16 }, { 200, 16 }, { 184, 16 }, { 168, 16 }, { 152, 16 }, { 136, 16 }, { 120, 16 }, { 104, 16 }, { 88, 16 }, { 72, 16 }, { 56, 16 }, { 40, 16 }, { 24, 16 }, + { 4, 16 }, { 204, 32 }, { 188, 32 }, { 172, 32 }, { 156, 32 }, { 140, 32 }, { 124, 32 }, { 108, 32 }, { 92, 32 }, { 76, 32 }, { 60, 32 }, { 44, 32 }, { 28, 32 }, { 6, 32 }, + { 224, 48 }, { 202, 48 }, { 180, 48 }, { 164, 48 }, { 148, 48 }, { 132, 48 }, { 116, 48 }, { 100, 48 }, { 84, 48 }, { 68, 48 }, { 52, 48 }, { 20, 48 }, { 10, 48 }, { 218, 64 }, + { 198, 64 }, { 178, 64 }, { 112, 64 }, { 46, 64 }, { 26, 64 }, { 6, 64 } +}, { + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, + 1, 1, 4, 1, 1, 1 +} }; + +#elif defined (dzrgb60_hhkb_iso) +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { + {0, H_15, G_15, I_15}, + {0, K_14, J_14, L_14}, + {0, K_13, J_13, L_13}, + {0, K_12, J_12, L_12}, + {0, K_11, J_11, L_11}, + {0, K_10, J_10, L_10}, + {0, K_9, J_9, L_9}, + {0, K_8, J_8, L_8}, + {0, K_7, J_7, L_7}, + {0, K_6, J_6, L_6}, + {0, K_5, J_5, L_5}, + {0, K_4, J_4, L_4}, + {0, K_3, J_3, L_3}, + {0, K_2, J_2, L_2}, + {0, K_1, J_1, L_1}, + {0, K_15, J_15, L_15}, + {0, H_13, G_13, I_13}, + {0, H_12, G_12, I_12}, + {0, H_11, G_11, I_11}, + {0, H_10, G_10, I_10}, + {0, H_9, G_9, I_9}, + {0, H_8, G_8, I_8}, + {0, H_7, G_7, I_7}, + {0, H_6, G_6, I_6}, + {0, H_5, G_5, I_5}, + {0, H_4, G_4, I_4}, + {0, H_3, G_3, I_3}, + {0, H_2, G_2, I_2}, + {0, H_1, G_1, I_1}, + {0, E_15, D_15, F_15}, + {0, E_12, D_12, F_12}, + {0, E_11, D_11, F_11}, + {0, E_10, D_10, F_10}, + {0, E_9, D_9, F_9}, + {0, E_8, D_8, F_8}, + {0, E_7, D_7, F_7}, + {0, E_6, D_6, F_6}, + {0, E_5, D_5, F_5}, + {0, E_4, D_4, F_4}, + {0, E_3, D_3, F_3}, + {0, E_2, D_2, F_2}, + {0, E_1, D_1, F_1}, + {0, B_14, A_14, C_14}, + {0, B_13, A_13, C_13}, + {0, B_11, A_11, C_11}, + {0, B_10, A_10, C_10}, + {0, B_9, A_9, C_9}, + {0, B_8, A_8, C_8}, + {0, B_7, A_7, C_7}, + {0, B_6, A_6, C_6}, + {0, B_5, A_5, C_5}, + {0, B_4, A_4, C_4}, + {0, B_3, A_3, C_3}, + {0, B_2, A_2, C_2}, + {0, B_1, A_1, C_1}, + {0, B_15, A_15, C_15}, + {0, E_13, D_13, F_13}, + {0, B_12, A_12, C_12}, + {0, B_16, A_16, C_16}, + {0, E_16, D_16, F_16}, + {0, H_16, G_16, I_16}, + {0, K_16, J_16, L_16}, +}; + +led_config_t g_led_config = { { + { 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 }, + { 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 29 }, + { 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 0, 15 }, + { 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, NO_LED, 42 }, + { 61, 60, 59, NO_LED, NO_LED, 58, NO_LED, NO_LED, NO_LED, NO_LED, 57, 56, NO_LED, 55 } +}, { + { 224, 0 }, { 208, 0 }, { 192, 0 }, { 176, 0 }, { 160, 0 }, { 144, 0 }, { 128, 0 }, { 112, 0 }, { 96, 0 }, { 80, 0 }, { 64, 0 }, { 48, 0 }, { 32, 0 }, { 16, 0 }, + { 0, 0 }, { 220, 24 }, { 200, 16 }, { 184, 16 }, { 168, 16 }, { 152, 16 }, { 136, 16 }, { 120, 16 }, { 104, 16 }, { 88, 16 }, { 72, 16 }, { 56, 16 }, { 40, 16 }, { 24, 16 }, + { 4, 16 }, { 204, 32 }, { 188, 32 }, { 172, 32 }, { 156, 32 }, { 140, 32 }, { 124, 32 }, { 108, 32 }, { 92, 32 }, { 76, 32 }, { 60, 32 }, { 44, 32 }, { 28, 32 }, { 6, 32 }, + { 224, 48 }, { 202, 48 }, { 180, 48 }, { 164, 48 }, { 148, 48 }, { 132, 48 }, { 116, 48 }, { 100, 48 }, { 84, 48 }, { 68, 48 }, { 52, 48 }, { 20, 48 }, { 10, 48 }, { 218, 64 }, + { 198, 64 }, { 178, 64 }, { 112, 64 }, { 46, 64 }, { 26, 64 }, { 6, 64 } +}, { + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, + 1, 1, 4, 1, 1, 1 +} }; + +#elif defined (dzrgb60_ansi) +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { + {0, K_14, J_14, L_14}, + {0, K_13, J_13, L_13}, + {0, K_12, J_12, L_12}, + {0, K_11, J_11, L_11}, + {0, K_10, J_10, L_10}, + {0, K_9, J_9, L_9}, + {0, K_8, J_8, L_8}, + {0, K_7, J_7, L_7}, + {0, K_6, J_6, L_6}, + {0, K_5, J_5, L_5}, + {0, K_4, J_4, L_4}, + {0, K_3, J_3, L_3}, + {0, K_2, J_2, L_2}, + {0, K_1, J_1, L_1}, + {0, H_14, G_14, I_14}, + {0, H_13, G_13, I_13}, + {0, H_12, G_12, I_12}, + {0, H_11, G_11, I_11}, + {0, H_10, G_10, I_10}, + {0, H_9, G_9, I_9}, + {0, H_8, G_8, I_8}, + {0, H_7, G_7, I_7}, + {0, H_6, G_6, I_6}, + {0, H_5, G_5, I_5}, + {0, H_4, G_4, I_4}, + {0, H_3, G_3, I_3}, + {0, H_2, G_2, I_2}, + {0, H_1, G_1, I_1}, + {0, E_14, D_14, F_14}, + {0, E_12, D_12, F_12}, + {0, E_11, D_11, F_11}, + {0, E_10, D_10, F_10}, + {0, E_9, D_9, F_9}, + {0, E_8, D_8, F_8}, + {0, E_7, D_7, F_7}, + {0, E_6, D_6, F_6}, + {0, E_5, D_5, F_5}, + {0, E_4, D_4, F_4}, + {0, E_3, D_3, F_3}, + {0, E_2, D_2, F_2}, + {0, E_1, D_1, F_1}, + {0, B_13, A_13, C_13}, + {0, B_11, A_11, C_11}, + {0, B_10, A_10, C_10}, + {0, B_9, A_9, C_9}, + {0, B_8, A_8, C_8}, + {0, B_7, A_7, C_7}, + {0, B_6, A_6, C_6}, + {0, B_5, A_5, C_5}, + {0, B_4, A_4, C_4}, + {0, B_3, A_3, C_3}, + {0, B_2, A_2, C_2}, + {0, B_1, A_1, C_1}, + {0, B_15, A_15, C_15}, + {0, E_13, D_13, F_13}, + {0, B_12, A_12, C_12}, + {0, E_15, D_15, F_15}, + {0, B_16, A_16, C_16}, + {0, E_16, D_16, F_16}, + {0, H_16, G_16, I_16}, + {0, K_16, J_16, L_16}, +}; + +led_config_t g_led_config = { { + { 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }, + { 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14 }, + { 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, NO_LED, 28 }, + { 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, NO_LED, NO_LED }, + { 60, 59, 58, NO_LED, NO_LED, 57, NO_LED, NO_LED, NO_LED, 56, 55, 54, NO_LED, 53 } +}, { + { 216, 0 }, { 192, 0 }, { 176, 0 }, { 160, 0 }, { 144, 0 }, { 128, 0 }, { 112, 0 }, { 96, 0 }, { 80, 0 }, { 64, 0 }, { 48, 0 }, { 32, 0 }, { 16, 0 }, { 0, 0 }, + { 220, 16 }, { 200, 16 }, { 184, 16 }, { 168, 16 }, { 152, 16 }, { 136, 16 }, { 120, 16 }, { 104, 16 }, { 88, 16 }, { 72, 16 }, { 56, 16 }, { 40, 16 }, { 24, 16 }, { 4, 16 }, + { 214, 24 }, { 188, 32 }, { 172, 32 }, { 156, 32 }, { 140, 32 }, { 124, 32 }, { 108, 32 }, { 92, 32 }, { 76, 32 }, { 60, 32 }, { 44, 32 }, { 28, 32 }, { 6, 32 }, { 210, 48 }, + { 180, 48 }, { 164, 48 }, { 148, 48 }, { 132, 48 }, { 116, 48 }, { 100, 48 }, { 84, 48 }, { 68, 48 }, { 52, 48 }, { 20, 48 }, { 10, 48 }, { 222, 64 }, { 202, 64 }, { 182, 64 }, + { 162, 64 }, { 102, 64 }, { 42, 64 }, { 22, 64 }, { 2, 64 } +}, { + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1, + 1, 4, 1, 1, 1 +} }; + +#else +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { + {0, K_14, J_14, L_14}, + {0, K_13, J_13, L_13}, + {0, K_12, J_12, L_12}, + {0, K_11, J_11, L_11}, + {0, K_10, J_10, L_10}, + {0, K_9, J_9, L_9}, + {0, K_8, J_8, L_8}, + {0, K_7, J_7, L_7}, + {0, K_6, J_6, L_6}, + {0, K_5, J_5, L_5}, + {0, K_4, J_4, L_4}, + {0, K_3, J_3, L_3}, + {0, K_2, J_2, L_2}, + {0, K_1, J_1, L_1}, + {0, H_14, G_14, I_14}, + {0, H_13, G_13, I_13}, + {0, H_12, G_12, I_12}, + {0, H_11, G_11, I_11}, + {0, H_10, G_10, I_10}, + {0, H_9, G_9, I_9}, + {0, H_8, G_8, I_8}, + {0, H_7, G_7, I_7}, + {0, H_6, G_6, I_6}, + {0, H_5, G_5, I_5}, + {0, H_4, G_4, I_4}, + {0, H_3, G_3, I_3}, + {0, H_2, G_2, I_2}, + {0, H_1, G_1, I_1}, + {0, E_14, D_14, F_14}, + {0, E_12, D_12, F_12}, + {0, E_11, D_11, F_11}, + {0, E_10, D_10, F_10}, + {0, E_9, D_9, F_9}, + {0, E_8, D_8, F_8}, + {0, E_7, D_7, F_7}, + {0, E_6, D_6, F_6}, + {0, E_5, D_5, F_5}, + {0, E_4, D_4, F_4}, + {0, E_3, D_3, F_3}, + {0, E_2, D_2, F_2}, + {0, E_1, D_1, F_1}, + {0, B_14, A_14, C_14}, + {0, B_13, A_13, C_13}, + {0, B_11, A_11, C_11}, + {0, B_10, A_10, C_10}, + {0, B_9, A_9, C_9}, + {0, B_8, A_8, C_8}, + {0, B_7, A_7, C_7}, + {0, B_6, A_6, C_6}, + {0, B_5, A_5, C_5}, + {0, B_4, A_4, C_4}, + {0, B_3, A_3, C_3}, + {0, B_2, A_2, C_2}, + {0, B_1, A_1, C_1}, + {0, B_15, A_15, C_15}, + {0, E_13, D_13, F_13}, + {0, B_12, A_12, C_12}, + {0, E_15, D_15, F_15}, + {0, H_15, G_15, I_15}, + {0, B_16, A_16, C_16}, + {0, E_16, D_16, F_16}, + {0, H_16, G_16, I_16}, + {0, K_16, J_16, L_16}, +}; + +led_config_t g_led_config = { { + { 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }, + { 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14 }, + { 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, NO_LED, 28 }, + { 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, NO_LED, 41 }, + { 62, 61, 60, NO_LED, NO_LED, 59, NO_LED, NO_LED, 58, 57, 56, 55, NO_LED, 54 } +}, { + { 216, 0 }, { 192, 0 }, { 176, 0 }, { 160, 0 }, { 144, 0 }, { 128, 0 }, { 112, 0 }, { 96, 0 }, { 80, 0 }, { 64, 0 }, { 48, 0 }, { 32, 0 }, { 16, 0 }, { 0, 0 }, + { 220, 16 }, { 200, 16 }, { 184, 16 }, { 168, 16 }, { 152, 16 }, { 136, 16 }, { 120, 16 }, { 104, 16 }, { 88, 16 }, { 72, 16 }, { 56, 16 }, { 40, 16 }, { 24, 16 }, { 4, 16 }, + { 214, 32 }, { 188, 32 }, { 172, 32 }, { 156, 32 }, { 140, 32 }, { 124, 32 }, { 108, 32 }, { 92, 32 }, { 76, 32 }, { 60, 32 }, { 44, 32 }, { 28, 32 }, { 6, 32 }, { 224, 48 }, + { 208, 48 }, { 186, 48 }, { 164, 48 }, { 148, 48 }, { 132, 48 }, { 116, 48 }, { 100, 48 }, { 84, 48 }, { 68, 48 }, { 52, 48 }, { 36, 48 }, { 9, 48 }, { 224, 64 }, { 208, 64 }, + { 192, 64 }, { 176, 64 }, { 160, 64 }, { 102, 64 }, { 42, 64 }, { 22, 64 }, { 2, 64 } +}, { + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, + 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, + 1, 1, 1, 4, 1, 1, 1 +} }; + + +#endif diff --git a/users/tominabox1/doug.c b/users/tominabox1/doug.c new file mode 100644 index 000000000000..d1f92ecf30f8 --- /dev/null +++ b/users/tominabox1/doug.c @@ -0,0 +1,243 @@ +// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. +// See gfxfont.h for newer custom bitmap font info. + +#ifndef FONT5X7_H +#define FONT5X7_H + +#ifdef __AVR__ + #include + #include +#elif defined(ESP8266) + #include +#else + #define PROGMEM +#endif + +// Standard ASCII 5x7 font +const unsigned char font[] PROGMEM = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00, +0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00, +0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00, +0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00, +0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00, +0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00, +0x00, 0x18, 0x3C, 0x18, 0x00, 0x00, +0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, +0x00, 0x18, 0x24, 0x18, 0x00, 0x00, +0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00, +0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00, +0x26, 0x29, 0x79, 0x29, 0x26, 0x00, +0x40, 0x7F, 0x05, 0x05, 0x07, 0x00, +0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00, +0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00, +0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00, +0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00, +0x14, 0x22, 0x7F, 0x22, 0x14, 0x00, +0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00, +0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, +0x00, 0x66, 0x89, 0x95, 0x6A, 0x00, +0x60, 0x60, 0x60, 0x60, 0x60, 0x00, +0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00, +0x08, 0x04, 0x7E, 0x04, 0x08, 0x00, +0x10, 0x20, 0x7E, 0x20, 0x10, 0x00, +0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00, +0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00, +0x1E, 0x10, 0x10, 0x10, 0x10, 0x00, +0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00, +0x30, 0x38, 0x3E, 0x38, 0x30, 0x00, +0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, +0x00, 0x07, 0x00, 0x07, 0x00, 0x00, +0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00, +0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00, +0x23, 0x13, 0x08, 0x64, 0x62, 0x00, +0x36, 0x49, 0x56, 0x20, 0x50, 0x00, +0x00, 0x08, 0x07, 0x03, 0x00, 0x00, +0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, +0x00, 0x41, 0x22, 0x1C, 0x00, 0x00, +0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00, +0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, +0x00, 0x80, 0x70, 0x30, 0x00, 0x00, +0x08, 0x08, 0x08, 0x08, 0x08, 0x00, +0x00, 0x00, 0x60, 0x60, 0x00, 0x00, +0x20, 0x10, 0x08, 0x04, 0x02, 0x00, +0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, +0x00, 0x42, 0x7F, 0x40, 0x00, 0x00, +0x72, 0x49, 0x49, 0x49, 0x46, 0x00, +0x21, 0x41, 0x49, 0x4D, 0x33, 0x00, +0x18, 0x14, 0x12, 0x7F, 0x10, 0x00, +0x27, 0x45, 0x45, 0x45, 0x39, 0x00, +0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00, +0x41, 0x21, 0x11, 0x09, 0x07, 0x00, +0x36, 0x49, 0x49, 0x49, 0x36, 0x00, +0x46, 0x49, 0x49, 0x29, 0x1E, 0x00, +0x00, 0x00, 0x14, 0x00, 0x00, 0x00, +0x00, 0x40, 0x34, 0x00, 0x00, 0x00, +0x00, 0x08, 0x14, 0x22, 0x41, 0x00, +0x14, 0x14, 0x14, 0x14, 0x14, 0x00, +0x00, 0x41, 0x22, 0x14, 0x08, 0x00, +0x02, 0x01, 0x59, 0x09, 0x06, 0x00, +0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00, +0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00, +0x7F, 0x49, 0x49, 0x49, 0x36, 0x00, +0x3E, 0x41, 0x41, 0x41, 0x22, 0x00, +0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00, +0x7F, 0x49, 0x49, 0x49, 0x41, 0x00, +0x7F, 0x09, 0x09, 0x09, 0x01, 0x00, +0x3E, 0x41, 0x41, 0x51, 0x73, 0x00, +0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, +0x00, 0x41, 0x7F, 0x41, 0x00, 0x00, +0x20, 0x40, 0x41, 0x3F, 0x01, 0x00, +0x7F, 0x08, 0x14, 0x22, 0x41, 0x00, +0x7F, 0x40, 0x40, 0x40, 0x40, 0x00, +0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00, +0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00, +0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00, +0x7F, 0x09, 0x09, 0x09, 0x06, 0x00, +0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00, +0x7F, 0x09, 0x19, 0x29, 0x46, 0x00, +0x26, 0x49, 0x49, 0x49, 0x32, 0x00, +0x03, 0x01, 0x7F, 0x01, 0x03, 0x00, +0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00, +0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00, +0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00, +0x63, 0x14, 0x08, 0x14, 0x63, 0x00, +0x03, 0x04, 0x78, 0x04, 0x03, 0x00, +0x61, 0x59, 0x49, 0x4D, 0x43, 0x00, +0x00, 0x7F, 0x41, 0x41, 0x41, 0x00, +0x02, 0x04, 0x08, 0x10, 0x20, 0x00, +0x00, 0x41, 0x41, 0x41, 0x7F, 0x00, +0x04, 0x02, 0x01, 0x02, 0x04, 0x00, +0x40, 0x40, 0x40, 0x40, 0x40, 0x00, +0x00, 0x03, 0x07, 0x08, 0x00, 0x00, +0x20, 0x54, 0x54, 0x78, 0x40, 0x00, +0x7F, 0x28, 0x44, 0x44, 0x38, 0x00, +0x38, 0x44, 0x44, 0x44, 0x28, 0x00, +0x38, 0x44, 0x44, 0x28, 0x7F, 0x00, +0x38, 0x54, 0x54, 0x54, 0x18, 0x00, +0x00, 0x08, 0x7E, 0x09, 0x02, 0x00, +0x18, 0xA4, 0xA4, 0x9C, 0x78, 0x00, +0x7F, 0x08, 0x04, 0x04, 0x78, 0x00, +0x00, 0x44, 0x7D, 0x40, 0x00, 0x00, +0x20, 0x40, 0x40, 0x3D, 0x00, 0x00, +0x7F, 0x10, 0x28, 0x44, 0x00, 0x00, +0x00, 0x41, 0x7F, 0x40, 0x00, 0x00, +0x7C, 0x04, 0x78, 0x04, 0x78, 0x00, +0x7C, 0x08, 0x04, 0x04, 0x78, 0x00, +0x38, 0x44, 0x44, 0x44, 0x38, 0x00, +0xFC, 0x18, 0x24, 0x24, 0x18, 0x00, +0x18, 0x24, 0x24, 0x18, 0xFC, 0x00, +0x7C, 0x08, 0x04, 0x04, 0x08, 0x00, +0x48, 0x54, 0x54, 0x54, 0x24, 0x00, +0x04, 0x04, 0x3F, 0x44, 0x24, 0x00, +0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00, +0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00, +0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00, +0x44, 0x28, 0x10, 0x28, 0x44, 0x00, +0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00, +0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, +0x00, 0x08, 0x36, 0x41, 0x00, 0x00, +0x00, 0x00, 0x77, 0x00, 0x00, 0x00, +0x00, 0x41, 0x36, 0x08, 0x00, 0x00, +0x02, 0x01, 0x02, 0x04, 0x02, 0x00, +0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00, +0x00, 0x2C, 0x2C, 0x2C, 0x34, 0x34, +0x34, 0x24, 0x2C, 0x2C, 0x2C, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x18, 0x14, +0x14, 0x3C, 0x20, 0x00, 0x00, 0x04, +0x0C, 0x00, 0x00, 0x20, 0x00, 0xC0, +0x00, 0x00, 0x00, 0xA0, 0x20, 0x30, +0x7C, 0x78, 0x0C, 0x0C, 0x18, 0x18, +0x18, 0x14, 0x14, 0x14, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x80, 0x5C, 0x5C, 0x24, 0x20, +0xA0, 0xA0, 0xA0, 0x20, 0x60, 0x20, +0xBC, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x14, 0x94, 0x94, +0x14, 0x94, 0x94, 0x94, 0x94, 0x14, +0x1C, 0x1C, 0x1C, 0x88, 0x08, 0x00, +0x00, 0x00, 0x00, 0x00, 0x18, 0x08, +0x84, 0x84, 0x84, 0x84, 0x80, 0x98, +0x80, 0x9C, 0x9C, 0x90, 0x80, 0x00, +0x10, 0x1C, 0x1C, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x10, 0x10, 0x00, +0xE0, 0xF0, 0xF0, 0xF0, 0xE0, 0xEC, +0xEE, 0xF7, 0xF3, 0x70, 0x20, 0x00, +0x7C, 0x7C, 0x7C, 0x7E, 0x00, 0x7E, +0x7E, 0x7E, 0x7F, 0x7F, 0x7F, 0x00, +0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B, +0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00, +0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE, +0xDE, 0xD7, 0xDC, 0x00, 0xC0, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x80, 0x80, 0x40, 0x00, 0x80, 0x80, +0x00, 0x00, 0x00, 0x00, 0x80, 0x80, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x50, 0xA0, 0x40, 0x80, 0x80, 0x40, +0xA0, 0x50, 0x00, 0x00, 0xF0, 0x00, +0x01, 0x08, 0x08, 0x88, 0x08, 0x08, +0x00, 0x00, 0x00, 0x00, 0x0A, 0x0C, +0x0E, 0x0A, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x02, 0x82, 0x80, 0x80, +0x00, 0x00, 0x80, 0x80, 0x00, 0x00, +0x00, 0xC0, 0x00, 0x00, 0x00, 0x01, +0x00, 0x00, 0x00, 0x40, 0x00, 0x40, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x03, 0x00, +0x01, 0x01, 0x01, 0x60, 0x60, 0x40, +0xF1, 0xB3, 0x03, 0x00, 0x00, 0x00, +0x00, 0x00, 0x90, 0x90, 0xD0, 0xC0, +0xE0, 0xE0, 0x00, 0x00, 0x00, 0x01, +0x00, 0x90, 0xA0, 0xA0, 0x63, 0x60, +0x40, 0x40, 0xC0, 0x00, 0x00, 0x00, +0x00, 0x02, 0x02, 0x02, 0x03, 0x00, +0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F, +0x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00, +0x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F, +0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00, +0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20, +0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00, +0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F, +0x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x07, 0x06, 0x00, 0x70, 0x10, 0x10, +0x31, 0x11, 0x16, 0x06, 0x07, 0x01, +0x00, 0x08, 0x08, 0x08, 0x70, 0x70, +0x40, 0x40, 0x41, 0x46, 0x46, 0x41, +0x40, 0x40, 0x00, 0x00, 0x07, 0x00, +0x00, 0x00, 0x00, 0x75, 0x75, 0x15, +0x77, 0x77, 0x35, 0x15, 0x75, 0x75, +0x75, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x70, 0x70, 0x56, 0x56, 0x56, +0x51, 0x11, 0x26, 0x00, 0x00, 0x00, +0x00, 0x17, 0x10, 0x10, 0x70, 0x00, +0x00, 0x00, 0x30, 0x20, 0x27, 0x77, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xE0, 0xE0, 0xA0, 0xA0, 0xA0, 0xA0, +0xA0, 0xA0, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x90, 0x90, 0x90, 0x90, +0x90, 0xF0, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x20, 0x40, +0xF0, 0x30, 0x10, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +}; +#endif // FONT5X7_H diff --git a/users/tominabox1/readme.md b/users/tominabox1/readme.md new file mode 100644 index 000000000000..99a3542bc30d --- /dev/null +++ b/users/tominabox1/readme.md @@ -0,0 +1,5 @@ +# Overview + +My user-space code covers the [Minivan](../../keyboards/thevankeyboards/minivan/keymaps/tominabox1/keymap.c), [Dimple](../../keyboards/lazydesigners/dimple/keymaps/tominabox1/keymap.c), [CRKBD](../../keyboards/crkbd/keymaps/tominabox1/keymap.c), and [Teensy based HHKB converter](../../keyboards/hhkb/keymaps/tominabox1/). My code makes extensive use of @Drashna's code and much love and praise goes to him for figuring a lot of this stuff out! + +My usercode utilizes the layout wrappers contained in [wrappers.h](wrappers.h). All of the keymaps are derivative of the Dimple keymap and utilize its wrappers in the definition of additional wrappers. diff --git a/users/tominabox1/rules.mk b/users/tominabox1/rules.mk new file mode 100644 index 000000000000..b70b128cf3e5 --- /dev/null +++ b/users/tominabox1/rules.mk @@ -0,0 +1,26 @@ +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +CONSOLE_ENABLE = no +TAP_DANCE_ENABLE = yes +NKRO_ENABLE = yes +BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration + +ifeq ($(strip $(KEYBOARD)), crkbd/rev1) +RGB_MATRIX_ENABLE = WS2812 +EXTRAFLAGS += -flto +BOOTLOADER = qmk-dfu +OLED_DRIVER_ENABLE = yes +endif + +ifeq ($(strip $(KEYBOARD)), lazydesigners/dimple) +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +# RGB_MATRIX_ENABLE = WS2812 +endif + + +SRC += tominabox1.c diff --git a/users/tominabox1/tominabox1.c b/users/tominabox1/tominabox1.c new file mode 100644 index 000000000000..95e6ee780332 --- /dev/null +++ b/users/tominabox1/tominabox1.c @@ -0,0 +1,281 @@ +#include "tominabox1.h" + +#ifdef KEYBOARD_lazydesigners_dimple +#ifdef RGBLIGHT_ENABLE +__attribute__ ((weak)) +void keyboard_post_init_keymap(void) {} + +void keyboard_post_init_user(void) { // sets the backlighting to come on upon successful load then turn off + rgblight_enable_noeeprom(); + rgblight_sethsv_noeeprom(RGB_RED); + rgblight_mode_noeeprom(0); + wait_ms(700); + rgblight_disable_noeeprom(); +} +#endif // RGBLIGHT +#endif // Dimple + + +#ifdef RGB_MATRIX_ENABLE +void rgb_matrix_layer_helper(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode, uint8_t speed, uint8_t led_type); +static bool is_suspended; +static bool rgb_matrix_enabled; + +__attribute__ ((weak)) +void suspend_power_down_keymap(void) {} + +void suspend_power_down_user(void) { + rgb_matrix_set_suspend_state(true); + if (!is_suspended) { + is_suspended = true; + rgb_matrix_enabled = (bool)rgb_matrix_config.enable; + rgb_matrix_disable_noeeprom(); + } +} + +__attribute__ ((weak)) +void suspend_wakeup_init_keymap(void) {} + +void suspend_wakeup_init_user(void) { + rgb_matrix_set_suspend_state(false); + is_suspended = false; + if (rgb_matrix_enabled) { + rgb_matrix_enable_noeeprom(); + } +} + +# include "lib/lib8tion/lib8tion.h" +extern led_config_t g_led_config; +void rgb_matrix_layer_helper(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode, uint8_t speed, uint8_t led_type) { + HSV hsv = {hue, sat, val}; + if (hsv.v > rgb_matrix_config.hsv.v) { + hsv.v = rgb_matrix_config.hsv.v; + } + + switch (mode) { + case 1: // breathing + { + uint16_t time = scale16by8(g_rgb_counters.tick, speed / 8); + hsv.v = scale8(abs8(sin8(time) - 128) * 2, hsv.v); + RGB rgb = hsv_to_rgb(hsv); + for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) { + if (HAS_FLAGS(g_led_config.flags[i], led_type)) { + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + } + break; + } + default: // Solid Color + { + RGB rgb = hsv_to_rgb(hsv); + for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) { + if (HAS_FLAGS(g_led_config.flags[i], led_type)) { + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + } + break; + } + } +} +#endif //RGB_MATRIX_ENABLE + +void dance_cln_finished (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + register_code16(S(KC_2)); + } else { + SEND_STRING("tom.campie@gmail.com"); + } +} + +void dance_cln_reset (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + unregister_code16(S(KC_2)); + } else { + } +} + +qk_tap_dance_action_t tap_dance_actions[] = { + [KC_EMAIL] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, dance_cln_finished, dance_cln_reset), + [TD_SFT_CPS] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPS), +}; + +#define TAPPING_TERM 200 +#define IGNORE_MOD_TAP_INTERRUPT + +#ifdef KEYBOARD_crkbd_rev1 + +#endif // CRKBD + +uint16_t get_tapping_term(uint16_t keycode) { + switch (keycode) { + case LSFT_T(KC_CAPS): + return 250; + case KC_ENT_LOW: + return 150; + case KC_SPC_RSE: + return(250); + case LCTL_T(KC_TAB): + return 300; + default: + return TAPPING_TERM; + } +}; + +__attribute__ ((weak)) +layer_state_t layer_state_set_keymap (layer_state_t state) { + return state; +} + +uint32_t layer_state_set_user(uint32_t state) { + state = update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); + switch (biton32(state)) { + case _LOWER: + break; + case _RAISE: + break; + case _ADJUST: + break; + default: + break; + } + return state; +} + +#ifdef KEYBOARD_crkbd_rev1 + +__attribute__((weak)) +void matrix_scan_keymap(void) {} + +extern bool oled_initialized; +void matrix_scan_user(void) { + if(!oled_initialized) { + wait_ms(200); + oled_init(0); + return; + } + matrix_scan_keymap(); + } + +extern uint8_t is_master; +#endif // CRKBD + +uint16_t oled_timer; + +__attribute__ ((weak)) +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + return true; +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + #ifdef CONSOLE_ENABLE + uprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed); + #endif + + if (record->event.pressed) { + #ifdef OLED_DRIVER_ENABLE + oled_timer = timer_read(); + oled_on(); + #endif // OLED_DRIVER_ENABLE + switch (keycode) { + case KC_BBB: + if (record->event.pressed) { + SEND_STRING(":b:"); + } else {} + break; + case KC_BEPIS: + if (record->event.pressed) { + SEND_STRING("BEPIS"); + } else {} + break; + } + } + return true; + +} +#ifdef KEYBOARD_crkbd_rev1 +#ifdef OLED_DRIVER_ENABLE +void render_logo(void) { + static const char PROGMEM logo[] = { + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, + 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, + 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, + 0}; + oled_write_P(logo, false); +} + +void render_status_main(void) { + // Host Keyboard USB Status + oled_write_P(PSTR("USB: "), false); + switch (USB_DeviceState) { + case DEVICE_STATE_Unattached: + oled_write_P(PSTR("Unattached\n"), false); + break; + case DEVICE_STATE_Suspended: + oled_write_P(PSTR("Suspended\n"), false); + break; + case DEVICE_STATE_Configured: + oled_write_P(PSTR("Connected\n"), false); + break; + case DEVICE_STATE_Powered: + oled_write_P(PSTR("Powered\n"), false); + break; + case DEVICE_STATE_Default: + oled_write_P(PSTR("Default\n"), false); + break; + case DEVICE_STATE_Addressed: + oled_write_P(PSTR("Addressed\n"), false); + break; + default: + oled_write_P(PSTR("Invalid\n"), false); + } + + // Host Keyboard Layer Status + oled_write_P(PSTR("Layer: "), false); + switch (biton32(layer_state)) { + case _BASE: + oled_write_P(PSTR("Colemak\n"), false); + break; + case _RAISE: + oled_write_P(PSTR("Numbers\n"), false); + break; + case _LOWER: + oled_write_P(PSTR("Symbols\n"), false); + break; + case _ADJUST: + oled_write_P(PSTR("Adjust\n"), false); + break; + case _ARROW: + oled_write_P(PSTR("Navigation\n"), false); + break; + case _FKEY: + oled_write_P(PSTR("Function\n"), false); + break; + default: + // Or use the write_ln shortcut over adding '\n' to the end of your string + oled_write_ln_P(PSTR("Undefined"), false); + } + + // Host Keyboard LED Status + + oled_write_ln_P(IS_HOST_LED_ON(USB_LED_CAPS_LOCK) ? PSTR("Caps Lock\n") : PSTR(" \n"), false); +} +__attribute__ ((weak)) +void oled_task_keymap(void) {} + +void oled_task_user(void) { + + if (timer_elapsed(oled_timer) > 20000) { + oled_off(); + return; + } + if (is_master) { + render_status_main(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) + } else { + render_logo(); + oled_scroll_left(); + } + oled_task_keymap(); + } + +#endif // OLED_Driver +#endif // crkbd diff --git a/users/tominabox1/tominabox1.h b/users/tominabox1/tominabox1.h new file mode 100644 index 000000000000..00f8e65162d6 --- /dev/null +++ b/users/tominabox1/tominabox1.h @@ -0,0 +1,56 @@ +#pragma once +#include "quantum.h" +#include "action.h" +#include "version.h" +#include "wrappers.h" + +// #define KC_SFT_CPS MT(MOD_LSFT, KC_CAPS) // Act as Shift on hold and as CapsLock on tap +#define SPC_LOW LT(_LOWER, KC_ENT) // Left space on tap, LOWER on hold +#define SPC_UPR LT(_RAISE, KC_SPC) // Left space on tap, UPPER on hold + +extern keymap_config_t keymap_config; + +enum layers { + _BASE, + _LOWER, + _RAISE, + _ADJUST, + _ARROW, + _FKEY +}; + +enum custom_keycodes { + BASE = SAFE_RANGE, + KC_BEPIS, + KC_BBB, + LOWER, + RAISE, + ADJUST, + ARROW, + FKEY, + KC_LFT_NUM_F, + RGBRST, + KC_PASTA +}; + +enum tap_dance_indexes { + KC_EMAIL, + TD_SFT_CPS, +}; + +#define KC_ARROW MO(4) +#define KC_LTOG RGB_TOG +#define KC_LHUI RGB_HUI +#define KC_LHUD RGB_HUD +#define KC_LSAI RGB_SAI +#define KC_LSAD RGB_SAD +#define KC_LVAI RGB_VAI +#define KC_LVAD RGB_VAD +#define KC_LMOD RGB_MOD +#define KC_CTLTB CTL_T(KC_TAB) // Tab on tap, ctrl on hold +#define KC_SFT_CPS TD(TD_SFT_CPS) // Hold for shift, double tap for caps +#define KC_ENT_LOW LT(_LOWER, KC_ENT) // Return on tap, Lower on hold +#define KC_SPC_RSE LT(_RAISE, KC_SPC) // Space on tap, raise on hold +#define KC_EML TD(KC_EMAIL) // Double tap @ for email macro +#define KC_FKEY LT(_FKEY, KC_ENT) // Return on tap, Fkey on hold +#define KC_NUMF TD(KC_LFT_NUM_F) diff --git a/users/tominabox1/wrappers.h b/users/tominabox1/wrappers.h new file mode 100644 index 000000000000..032fad273f5a --- /dev/null +++ b/users/tominabox1/wrappers.h @@ -0,0 +1,142 @@ +#pragma once +#include "tominabox1.h" +/* +Since our quirky block definitions are basically a list of comma separated +arguments, we need a wrapper in order for these definitions to be +expanded before being used as arguments to the LAYOUT_xxx macro. +*/ +#if (!defined(LAYOUT) && defined(KEYMAP)) +# define LAYOUT KEYMAP +#endif + +// clang-format off +#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__) +#define LAYOUT_arrow_wrapper(...) LAYOUT_arrow(__VA_ARGS__) + +/* + _____ _ _ + | __ \(_) | | + | | | |_ _ __ ___ _ __ | | ___ + | | | | | '_ ` _ \| '_ \| |/ _ \ + | |__| | | | | | | | |_) | | __/ + |_____/|_|_| |_| |_| .__/|_|\___| + | | + |_| +*/ +// Dimple Base layer +#define __________________DIMPLE1__________________ KC_GESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC +#define __________________DIMPLE2__________________ LCTL_T(KC_TAB), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT +#define __________________DIMPLE3L_________________ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B +#define __________________DIMPLE3R_________________ KC_K, KC_M, KC_COMM, KC_UP, LT(_FKEY,KC_DOT) +#define __________________DIMPLE4__________________ KC_LCTL, KC_LGUI, KC_LALT, KC_ENT_LOW, KC_SPC_RSE, KC_LEFT, KC_DOWN, KC_RGHT + +// Dimple Symbol Layer +#define _________________LOWER_1___________________ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC +#define _________________LOWER_2___________________ KC_DEL, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE +#define _________________LOWER_3___________________ KC_CAPS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PGUP, KC_QUES +#define _________________LOWER_4___________________ LCA(KC_DEL), KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_END + +// Dimple Number layer +#define ___________________RAISE1__________________ KC_TILD, KC_EXLM, TD(KC_EMAIL), KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL +#define ___________________RAISE2__________________ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS +#define ___________________RAISE3__________________ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DOT, KC_SLSH +#define ___________________RAISE4__________________ KC_VOLD, KC_MUTE, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO + +// Dimple F-key layer +#define ___________________FKEY1___________________ KC_PASTA, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_NO +#define ___________________FKEY2___________________ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F11, KC_F12, KC_NO +#define ___________________FKEY3___________________ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO +#define ___________________FKEY4___________________ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO + +// Dimple Adjust layer +#define ___________________ADJST1__________________ RESET,RGBRST, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO +#define ___________________ADJST2__________________ RGB_M_P, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO +#define ___________________ADJST3__________________ RGB_MOD, RGB_HUI, RGB_HUD, RGB_M_SN, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO +#define ___________________ADJST4__________________ RGB_VAD, RGB_TOG, RGB_VAI, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO + +/* +__ __ _ _ +| \/ (_) (_) +| \ / |_ _ __ ___ ____ _ _ __ +| |\/| | | '_ \| \ \ / / _` | '_ \ +| | | | | | | | |\ V / (_| | | | | +|_| |_|_|_| |_|_| \_/ \__,_|_| |_| +*/ + + +// Minivan Base Layer +#define __________________MINIVAN1_________________ __________________DIMPLE1__________________ +#define __________________MINIVAN2_________________ __________________DIMPLE2__________________ +#define __________________MINIVAN3_________________ __________________DIMPLE3L_________________, __________________DIMPLE3R_________________, KC_RSFT +#define __________________MINIVAN4_________________ KC_LCTL, KC_LGUI, KC_LALT, KC_ENT_LOW, KC_SPC_RSE, KC_LEFT, KC_DOWN, KC_RGHT, MO(_FKEY) + +/* Minivan Symbol Layer +#define _________________LOWER_1___________________ +#define _________________LOWER_2___________________ */ +#define __________________MININUM3_________________ _________________LOWER_3___________________, KC_SLSH +#define __________________MININUM4_________________ _________________LOWER_4___________________, KC_END + +/* Minvian Number Layer +#define ___________________RAISE1__________________ +#define ___________________RAISE2__________________ */ +#define ___________________RVAN_3__________________ ___________________RAISE3__________________, KC_NO +#define ___________________RVAN_4__________________ ___________________RAISE4__________________, KC_NO + +/* Minvian F-key layer +#define ___________________FKEY1___________________ +#define ___________________FKEY2___________________ */ +#define ___________________FVAN_3__________________ ___________________FKEY3___________________, KC_NO +#define ___________________FVAN_4__________________ ___________________FKEY4___________________, KC_TRNS + +/* Minivan Adjust Layer +#define ___________________ADJST1__________________ +#define ___________________ADJST2__________________ */ +#define ___________________ADJVAN3_________________ ___________________ADJST3__________________, KC_NO +#define ___________________ADJVAN4_________________ ___________________ADJST4__________________, KC_TRNS + +/* + _____ _____ _ ______ _____ + / ____| __ \| |/ / _ \| __ \ +| | | |__) | ' /| |_) | | | | +| | | _ /| < | _ <| | | | +| |____| | \ \| . \| |_) | |__| | + \_____|_| \_\_|\_\____/|_____/ +*/ + +// CRKBD Base Layer +#define ___________________CRKBD1__________________ __________________DIMPLE1__________________ +#define ___________________CRKBD2__________________ __________________DIMPLE2__________________ +#define ___________________CRKBD3__________________ __________________DIMPLE3L_________________, KC_K, KC_M,KC_COMM, KC_DOT, KC_SLSH, KC_BBB +#define ___________________CRKBD4__________________ KC_LGUI, KC_LALT,KC_ENT_LOW, KC_SPC_RSE, KC_ARROW, KC_FKEY + +/* CRKBD Number layer +#define ___________________RAISE1__________________ +#define ___________________RAISE1__________________ */ +#define ___________________CRKBD_RAISE3____________ ___________________RVAN_3__________________ +#define ___________________CRKBD_RAISE4____________ ___________________CRKBD4__________________ + +/* CRKBD Symbol Layer +#define _________________LOWER_1___________________ +#define _________________LOWER_2___________________ */ +#define ___________________CRKBD_LOW3______________ __________________MININUM3_________________ +#define ___________________CRKBD_LOW4______________ ___________________CRKBD4__________________ + +/* CRKBD F-key layer +#define ___________________FKEY1___________________ +#define ___________________FKEY2___________________ */ +#define ___________________CRKBD_FKEY3_____________ ___________________FVAN_3__________________ +#define ___________________CRKBD_FKEY4_____________ ___________________CRKBD4__________________ + +/* CRKBD adjust layer +#define ___________________ADJST1__________________ */ +#define ___________________CRKBD_ADJST2____________ KC_LTOG,KC_LHUI,KC_LSAI,KC_LVAI,KC_NO,KC_NO,KC_NO,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO +#define ___________________CRKBD_ADJST3____________ KC_LMOD, KC_LHUD, KC_LSAD, KC_LVAD, KC_NO, KC_NO,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO +#define ___________________CRKBD_ADJST4____________ ___________________CRKBD4__________________ + +// CRKBD arrow layer +#define ___________________ARROW1__________________ KC_NO, KC_NO, KC_UP, KC_NO, KC_NO, KC_NO, KC_NO, KC_PGDN, KC_UP, KC_PGUP, KC_NO, KC_NO +#define ___________________ARROW2__________________ KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT, KC_NO, KC_NO,KC_NO, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NO +#define ___________________ARROW3__________________ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO +#define ___________________ARROW4__________________ ___________________CRKBD4__________________ + +// clang-format on From 9bfacc7c76237600ac0a05003fd87ae98e0b0221 Mon Sep 17 00:00:00 2001 From: vuhopkep Date: Sat, 19 Oct 2019 08:18:39 +0700 Subject: [PATCH 133/316] [Keyboard] update encoder function, info.json data (#7035) * update encoder function, info.json data * Update rules.mk --- keyboards/handwired/hnah108/hnah108.h | 8 ++++---- keyboards/handwired/hnah108/info.json | 6 +++--- .../handwired/hnah108/keymaps/default/keymap.c | 13 ++++++++----- keyboards/handwired/hnah108/rules.mk | 5 +---- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/keyboards/handwired/hnah108/hnah108.h b/keyboards/handwired/hnah108/hnah108.h index 64695a416452..9ea34b83adaa 100644 --- a/keyboards/handwired/hnah108/hnah108.h +++ b/keyboards/handwired/hnah108/hnah108.h @@ -40,14 +40,14 @@ } #define LAYOUT_fullsize_iso( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k60, k61, k62, k63, k64, \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k60, k61, k62, k63, k64, k65, k66, k67, k68, \ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k70, k71, k72, k73, k74, k75, k76, k77, k78, k69, \ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k80, k81, k83, k84, k85, k86, k87, k79, k6A, \ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k91, k93, k94, k96, k97, k88, \ k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k90, k92, k95, k98, k99, k89, k7A, \ k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k9A, k8A \ ) LAYOUT_all( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k60, k61, k62, k63, k64, KC_NO, KC_NO, KC_NO, KC_NO, \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k60, k61, k62, k63, k64, k65, k66, k67, k68, \ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k70, k71, k72, k73, k74, k75, k76, k77, k78, k69, \ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k80, k81, KC_NO, k83, k84, k85, k86, k87, k79, k6A, \ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k91, k93, k94, k96, k97, k88, \ @@ -56,14 +56,14 @@ ) #define LAYOUT_fullsize_ansi( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k60, k61, k62, k63, k64, \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k60, k61, k62, k63, k64, k65, k66, k67, k68, \ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k70, k71, k72, k73, k74, k75, k76, k77, k78, k69, \ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k80, k81, k82, k83, k84, k85, k86, k87, k79, k6A, \ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k91, k94, k96, k97, k88, \ k40, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k90, k92, k95, k98, k99, k89, k7A, \ k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k9A, k8A \ ) LAYOUT_all( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k60, k61, k62, k63, k64, KC_NO, KC_NO, KC_NO, KC_NO, \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k60, k61, k62, k63, k64, k65, k66, k67, k68, \ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k70, k71, k72, k73, k74, k75, k76, k77, k78, k69, \ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k80, k81, k82, k83, k84, k85, k86, k87, k79, k6A, \ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k91,KC_NO,k94, k96, k97, k88, \ diff --git a/keyboards/handwired/hnah108/info.json b/keyboards/handwired/hnah108/info.json index 2a99c4891a06..a8671a870cc9 100644 --- a/keyboards/handwired/hnah108/info.json +++ b/keyboards/handwired/hnah108/info.json @@ -6,13 +6,13 @@ "height": 6.25, "layouts": { "LAYOUT_all": { - "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":2, "y":0}, {"label":"F2", "x":3, "y":0}, {"label":"F3", "x":4, "y":0}, {"label":"F4", "x":5, "y":0}, {"label":"F5", "x":6.5, "y":0}, {"label":"F6", "x":7.5, "y":0}, {"label":"F7", "x":8.5, "y":0}, {"label":"F8", "x":9.5, "y":0}, {"label":"F9", "x":11, "y":0}, {"label":"F10", "x":12, "y":0}, {"label":"F11", "x":13, "y":0}, {"label":"F12", "x":14, "y":0}, {"label":"PrtSc", "x":15.25, "y":0}, {"label":"Scroll Lock", "x":16.25, "y":0}, {"label":"Pause", "x":17.25, "y":0}, {"x":18.5, "y":0}, {"x":19.5, "y":0}, {"x":20.5, "y":0}, {"x":21.5, "y":0}, {"label":"~", "x":0, "y":1.25}, {"label":"!", "x":1, "y":1.25}, {"label":"@", "x":2, "y":1.25}, {"label":"#", "x":3, "y":1.25}, {"label":"$", "x":4, "y":1.25}, {"label":"%", "x":5, "y":1.25}, {"label":"^", "x":6, "y":1.25}, {"label":"&", "x":7, "y":1.25}, {"label":"*", "x":8, "y":1.25}, {"label":"(", "x":9, "y":1.25}, {"label":")", "x":10, "y":1.25}, {"label":"_", "x":11, "y":1.25}, {"label":"+", "x":12, "y":1.25}, {"label":"Backspace", "x":13, "y":1.25, "w":2}, {"label":"Insert", "x":15.25, "y":1.25}, {"label":"Home", "x":16.25, "y":1.25}, {"label":"PgUp", "x":17.25, "y":1.25}, {"label":"Num Lock", "x":18.5, "y":1.25}, {"label":"/", "x":19.5, "y":1.25}, {"label":"*", "x":20.5, "y":1.25}, {"label":"-", "x":21.5, "y":1.25}, {"label":"Tab", "x":0, "y":2.25, "w":1.5}, {"label":"Q", "x":1.5, "y":2.25}, {"label":"W", "x":2.5, "y":2.25}, {"label":"E", "x":3.5, "y":2.25}, {"label":"R", "x":4.5, "y":2.25}, {"label":"T", "x":5.5, "y":2.25}, {"label":"Y", "x":6.5, "y":2.25}, {"label":"U", "x":7.5, "y":2.25}, {"label":"I", "x":8.5, "y":2.25}, {"label":"O", "x":9.5, "y":2.25}, {"label":"P", "x":10.5, "y":2.25}, {"label":"{", "x":11.5, "y":2.25}, {"label":"}", "x":12.5, "y":2.25}, {"label":"Enter", "x":13.75, "y":2.25, "w":1.25, "h":2}, {"label":"Delete", "x":15.25, "y":2.25}, {"label":"End", "x":16.25, "y":2.25}, {"label":"PgDn", "x":17.25, "y":2.25}, {"label":"7", "x":18.5, "y":2.25}, {"label":"8", "x":19.5, "y":2.25}, {"label":"9", "x":20.5, "y":2.25}, {"label":"+", "x":21.5, "y":2.25, "h":2}, {"label":"Caps Lock", "x":0, "y":3.25, "w":1.75}, {"label":"A", "x":1.75, "y":3.25}, {"label":"S", "x":2.75, "y":3.25}, {"label":"D", "x":3.75, "y":3.25}, {"label":"F", "x":4.75, "y":3.25}, {"label":"G", "x":5.75, "y":3.25}, {"label":"H", "x":6.75, "y":3.25}, {"label":"J", "x":7.75, "y":3.25}, {"label":"K", "x":8.75, "y":3.25}, {"label":"L", "x":9.75, "y":3.25}, {"label":":", "x":10.75, "y":3.25}, {"label":"@", "x":11.75, "y":3.25}, {"label":"~", "x":12.75, "y":3.25}, {"label":"4", "x":18.5, "y":3.25}, {"label":"5", "x":19.5, "y":3.25}, {"label":"6", "x":20.5, "y":3.25}, {"label":"Shift", "x":0, "y":4.25, "w":1.25}, {"label":"|", "x":1.25, "y":4.25}, {"label":"Z", "x":2.25, "y":4.25}, {"label":"X", "x":3.25, "y":4.25}, {"label":"C", "x":4.25, "y":4.25}, {"label":"V", "x":5.25, "y":4.25}, {"label":"B", "x":6.25, "y":4.25}, {"label":"N", "x":7.25, "y":4.25}, {"label":"M", "x":8.25, "y":4.25}, {"label":"<", "x":9.25, "y":4.25}, {"label":">", "x":10.25, "y":4.25}, {"label":"?", "x":11.25, "y":4.25}, {"label":"Shift", "x":12.25, "y":4.25, "w":2.75}, {"label":"\u2191", "x":16.25, "y":4.25}, {"label":"1", "x":18.5, "y":4.25}, {"label":"2", "x":19.5, "y":4.25}, {"label":"3", "x":20.5, "y":4.25}, {"label":"Enter", "x":21.5, "y":4.25, "h":2}, {"label":"Ctrl", "x":0, "y":5.25, "w":1.25}, {"label":"Win", "x":1.25, "y":5.25, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.25, "w":1.25}, {"x":3.75, "y":5.25, "w":6.25}, {"label":"Alt", "x":10, "y":5.25, "w":1.25}, {"label":"Win", "x":11.25, "y":5.25, "w":1.25}, {"label":"Menu", "x":12.5, "y":5.25, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":5.25, "w":1.25}, {"label":"\u2190", "x":15.25, "y":5.25}, {"label":"\u2193", "x":16.25, "y":5.25}, {"label":"\u2192", "x":17.25, "y":5.25}, {"label":"0", "x":18.5, "y":5.25, "w":2}, {"label":".", "x":20.5, "y":5.25}] + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":2, "y":0}, {"label":"F2", "x":3, "y":0}, {"label":"F3", "x":4, "y":0}, {"label":"F4", "x":5, "y":0}, {"label":"F5", "x":6.5, "y":0}, {"label":"F6", "x":7.5, "y":0}, {"label":"F7", "x":8.5, "y":0}, {"label":"F8", "x":9.5, "y":0}, {"label":"F9", "x":11, "y":0}, {"label":"F10", "x":12, "y":0}, {"label":"F11", "x":13, "y":0}, {"label":"F12", "x":14, "y":0}, {"label":"PrtSc", "x":15.25, "y":0}, {"label":"Scroll Lock", "x":16.25, "y":0}, {"label":"Pause", "x":17.25, "y":0}, {"x":18.5, "y":0}, {"x":19.5, "y":0}, {"x":20.5, "y":0}, {"x":21.5, "y":0}, {"label":"~", "x":0, "y":1.25}, {"label":"!", "x":1, "y":1.25}, {"label":"@", "x":2, "y":1.25}, {"label":"#", "x":3, "y":1.25}, {"label":"$", "x":4, "y":1.25}, {"label":"%", "x":5, "y":1.25}, {"label":"^", "x":6, "y":1.25}, {"label":"&", "x":7, "y":1.25}, {"label":"*", "x":8, "y":1.25}, {"label":"(", "x":9, "y":1.25}, {"label":")", "x":10, "y":1.25}, {"label":"_", "x":11, "y":1.25}, {"label":"+", "x":12, "y":1.25}, {"label":"Backspace", "x":13, "y":1.25, "w":2}, {"label":"Insert", "x":15.25, "y":1.25}, {"label":"Home", "x":16.25, "y":1.25}, {"label":"PgUp", "x":17.25, "y":1.25}, {"label":"Num Lock", "x":18.5, "y":1.25}, {"label":"/", "x":19.5, "y":1.25}, {"label":"*", "x":20.5, "y":1.25}, {"label":"-", "x":21.5, "y":1.25}, {"label":"Tab", "x":0, "y":2.25, "w":1.5}, {"label":"Q", "x":1.5, "y":2.25}, {"label":"W", "x":2.5, "y":2.25}, {"label":"E", "x":3.5, "y":2.25}, {"label":"R", "x":4.5, "y":2.25}, {"label":"T", "x":5.5, "y":2.25}, {"label":"Y", "x":6.5, "y":2.25}, {"label":"U", "x":7.5, "y":2.25}, {"label":"I", "x":8.5, "y":2.25}, {"label":"O", "x":9.5, "y":2.25}, {"label":"P", "x":10.5, "y":2.25}, {"label":"{", "x":11.5, "y":2.25}, {"label":"}", "x":12.5, "y":2.25}, {"label":"|", "x":13.5, "y":2.25, "w":1.5}, {"label":"Delete", "x":15.25, "y":2.25}, {"label":"End", "x":16.25, "y":2.25}, {"label":"PgDn", "x":17.25, "y":2.25}, {"label":"7", "x":18.5, "y":2.25}, {"label":"8", "x":19.5, "y":2.25}, {"label":"9", "x":20.5, "y":2.25}, {"label":"+", "x":21.5, "y":2.25, "h":2}, {"label":"Caps Lock", "x":0, "y":3.25, "w":1.75}, {"label":"A", "x":1.75, "y":3.25}, {"label":"S", "x":2.75, "y":3.25}, {"label":"D", "x":3.75, "y":3.25}, {"label":"F", "x":4.75, "y":3.25}, {"label":"G", "x":5.75, "y":3.25}, {"label":"H", "x":6.75, "y":3.25}, {"label":"J", "x":7.75, "y":3.25}, {"label":"K", "x":8.75, "y":3.25}, {"label":"L", "x":9.75, "y":3.25}, {"label":":", "x":10.75, "y":3.25}, {"label":"@", "x":11.75, "y":3.25}, {"label":"~", "x":12.75, "y":3.25}, {"label":"Enter", "x":13.75, "y":3.25, "w":1.25}, {"label":"4", "x":18.5, "y":3.25}, {"label":"5", "x":19.5, "y":3.25}, {"label":"6", "x":20.5, "y":3.25}, {"label":"Shift", "x":0, "y":4.25, "w":1.25}, {"label":"|", "x":1.25, "y":4.25}, {"label":"Z", "x":2.25, "y":4.25}, {"label":"X", "x":3.25, "y":4.25}, {"label":"C", "x":4.25, "y":4.25}, {"label":"V", "x":5.25, "y":4.25}, {"label":"B", "x":6.25, "y":4.25}, {"label":"N", "x":7.25, "y":4.25}, {"label":"M", "x":8.25, "y":4.25}, {"label":"<", "x":9.25, "y":4.25}, {"label":">", "x":10.25, "y":4.25}, {"label":"?", "x":11.25, "y":4.25}, {"label":"Shift", "x":12.25, "y":4.25, "w":2.75}, {"label":"\u2191", "x":16.25, "y":4.25}, {"label":"1", "x":18.5, "y":4.25}, {"label":"2", "x":19.5, "y":4.25}, {"label":"3", "x":20.5, "y":4.25}, {"label":"Enter", "x":21.5, "y":4.25, "h":2}, {"label":"Ctrl", "x":0, "y":5.25, "w":1.25}, {"label":"Win", "x":1.25, "y":5.25, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.25, "w":1.25}, {"x":3.75, "y":5.25, "w":6.25}, {"label":"Alt", "x":10, "y":5.25, "w":1.25}, {"label":"Win", "x":11.25, "y":5.25, "w":1.25}, {"label":"Menu", "x":12.5, "y":5.25, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":5.25, "w":1.25}, {"label":"\u2190", "x":15.25, "y":5.25}, {"label":"\u2193", "x":16.25, "y":5.25}, {"label":"\u2192", "x":17.25, "y":5.25}, {"label":"0", "x":18.5, "y":5.25, "w":2}, {"label":".", "x":20.5, "y":5.25}] }, "LAYOUT_fullsize_iso": { - "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":2, "y":0}, {"label":"F2", "x":3, "y":0}, {"label":"F3", "x":4, "y":0}, {"label":"F4", "x":5, "y":0}, {"label":"F5", "x":6.5, "y":0}, {"label":"F6", "x":7.5, "y":0}, {"label":"F7", "x":8.5, "y":0}, {"label":"F8", "x":9.5, "y":0}, {"label":"F9", "x":11, "y":0}, {"label":"F10", "x":12, "y":0}, {"label":"F11", "x":13, "y":0}, {"label":"F12", "x":14, "y":0}, {"label":"PrtSc", "x":15.25, "y":0}, {"label":"Scroll Lock", "x":16.25, "y":0}, {"label":"Pause", "x":17.25, "y":0}, {"label":"~", "x":0, "y":1.25}, {"label":"!", "x":1, "y":1.25}, {"label":"@", "x":2, "y":1.25}, {"label":"#", "x":3, "y":1.25}, {"label":"$", "x":4, "y":1.25}, {"label":"%", "x":5, "y":1.25}, {"label":"^", "x":6, "y":1.25}, {"label":"&", "x":7, "y":1.25}, {"label":"*", "x":8, "y":1.25}, {"label":"(", "x":9, "y":1.25}, {"label":")", "x":10, "y":1.25}, {"label":"_", "x":11, "y":1.25}, {"label":"+", "x":12, "y":1.25}, {"label":"Backspace", "x":13, "y":1.25, "w":2}, {"label":"Insert", "x":15.25, "y":1.25}, {"label":"Home", "x":16.25, "y":1.25}, {"label":"PgUp", "x":17.25, "y":1.25}, {"label":"Num Lock", "x":18.5, "y":1.25}, {"label":"/", "x":19.5, "y":1.25}, {"label":"*", "x":20.5, "y":1.25}, {"label":"-", "x":21.5, "y":1.25}, {"label":"Tab", "x":0, "y":2.25, "w":1.5}, {"label":"Q", "x":1.5, "y":2.25}, {"label":"W", "x":2.5, "y":2.25}, {"label":"E", "x":3.5, "y":2.25}, {"label":"R", "x":4.5, "y":2.25}, {"label":"T", "x":5.5, "y":2.25}, {"label":"Y", "x":6.5, "y":2.25}, {"label":"U", "x":7.5, "y":2.25}, {"label":"I", "x":8.5, "y":2.25}, {"label":"O", "x":9.5, "y":2.25}, {"label":"P", "x":10.5, "y":2.25}, {"label":"{", "x":11.5, "y":2.25}, {"label":"}", "x":12.5, "y":2.25}, {"label":"Enter", "x":13.75, "y":2.25, "w":1.25, "h":2}, {"label":"Delete", "x":15.25, "y":2.25}, {"label":"End", "x":16.25, "y":2.25}, {"label":"PgDn", "x":17.25, "y":2.25}, {"label":"7", "x":18.5, "y":2.25}, {"label":"8", "x":19.5, "y":2.25}, {"label":"9", "x":20.5, "y":2.25}, {"label":"+", "x":21.5, "y":2.25, "h":2}, {"label":"Caps Lock", "x":0, "y":3.25, "w":1.75}, {"label":"A", "x":1.75, "y":3.25}, {"label":"S", "x":2.75, "y":3.25}, {"label":"D", "x":3.75, "y":3.25}, {"label":"F", "x":4.75, "y":3.25}, {"label":"G", "x":5.75, "y":3.25}, {"label":"H", "x":6.75, "y":3.25}, {"label":"J", "x":7.75, "y":3.25}, {"label":"K", "x":8.75, "y":3.25}, {"label":"L", "x":9.75, "y":3.25}, {"label":":", "x":10.75, "y":3.25}, {"label":"@", "x":11.75, "y":3.25}, {"label":"~", "x":12.75, "y":3.25}, {"label":"4", "x":18.5, "y":3.25}, {"label":"5", "x":19.5, "y":3.25}, {"label":"6", "x":20.5, "y":3.25}, {"label":"Shift", "x":0, "y":4.25, "w":1.25}, {"label":"|", "x":1.25, "y":4.25}, {"label":"Z", "x":2.25, "y":4.25}, {"label":"X", "x":3.25, "y":4.25}, {"label":"C", "x":4.25, "y":4.25}, {"label":"V", "x":5.25, "y":4.25}, {"label":"B", "x":6.25, "y":4.25}, {"label":"N", "x":7.25, "y":4.25}, {"label":"M", "x":8.25, "y":4.25}, {"label":"<", "x":9.25, "y":4.25}, {"label":">", "x":10.25, "y":4.25}, {"label":"?", "x":11.25, "y":4.25}, {"label":"Shift", "x":12.25, "y":4.25, "w":2.75}, {"label":"\u2191", "x":16.25, "y":4.25}, {"label":"1", "x":18.5, "y":4.25}, {"label":"2", "x":19.5, "y":4.25}, {"label":"3", "x":20.5, "y":4.25}, {"label":"Enter", "x":21.5, "y":4.25, "h":2}, {"label":"Ctrl", "x":0, "y":5.25, "w":1.25}, {"label":"Win", "x":1.25, "y":5.25, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.25, "w":1.25}, {"x":3.75, "y":5.25, "w":6.25}, {"label":"Alt", "x":10, "y":5.25, "w":1.25}, {"label":"Win", "x":11.25, "y":5.25, "w":1.25}, {"label":"Menu", "x":12.5, "y":5.25, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":5.25, "w":1.25}, {"label":"\u2190", "x":15.25, "y":5.25}, {"label":"\u2193", "x":16.25, "y":5.25}, {"label":"\u2192", "x":17.25, "y":5.25}, {"label":"0", "x":18.5, "y":5.25, "w":2}, {"label":".", "x":20.5, "y":5.25}] + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":2, "y":0}, {"label":"F2", "x":3, "y":0}, {"label":"F3", "x":4, "y":0}, {"label":"F4", "x":5, "y":0}, {"label":"F5", "x":6.5, "y":0}, {"label":"F6", "x":7.5, "y":0}, {"label":"F7", "x":8.5, "y":0}, {"label":"F8", "x":9.5, "y":0}, {"label":"F9", "x":11, "y":0}, {"label":"F10", "x":12, "y":0}, {"label":"F11", "x":13, "y":0}, {"label":"F12", "x":14, "y":0}, {"label":"PrtSc", "x":15.25, "y":0}, {"label":"Scroll Lock", "x":16.25, "y":0}, {"label":"Pause", "x":17.25, "y":0}, {"x":18.5, "y":0}, {"x":19.5, "y":0}, {"x":20.5, "y":0}, {"x":21.5, "y":0}, {"label":"~", "x":0, "y":1.25}, {"label":"!", "x":1, "y":1.25}, {"label":"@", "x":2, "y":1.25}, {"label":"#", "x":3, "y":1.25}, {"label":"$", "x":4, "y":1.25}, {"label":"%", "x":5, "y":1.25}, {"label":"^", "x":6, "y":1.25}, {"label":"&", "x":7, "y":1.25}, {"label":"*", "x":8, "y":1.25}, {"label":"(", "x":9, "y":1.25}, {"label":")", "x":10, "y":1.25}, {"label":"_", "x":11, "y":1.25}, {"label":"+", "x":12, "y":1.25}, {"label":"Backspace", "x":13, "y":1.25, "w":2}, {"label":"Insert", "x":15.25, "y":1.25}, {"label":"Home", "x":16.25, "y":1.25}, {"label":"PgUp", "x":17.25, "y":1.25}, {"label":"Num Lock", "x":18.5, "y":1.25}, {"label":"/", "x":19.5, "y":1.25}, {"label":"*", "x":20.5, "y":1.25}, {"label":"-", "x":21.5, "y":1.25}, {"label":"Tab", "x":0, "y":2.25, "w":1.5}, {"label":"Q", "x":1.5, "y":2.25}, {"label":"W", "x":2.5, "y":2.25}, {"label":"E", "x":3.5, "y":2.25}, {"label":"R", "x":4.5, "y":2.25}, {"label":"T", "x":5.5, "y":2.25}, {"label":"Y", "x":6.5, "y":2.25}, {"label":"U", "x":7.5, "y":2.25}, {"label":"I", "x":8.5, "y":2.25}, {"label":"O", "x":9.5, "y":2.25}, {"label":"P", "x":10.5, "y":2.25}, {"label":"{", "x":11.5, "y":2.25}, {"label":"}", "x":12.5, "y":2.25}, {"label":"Enter", "x":13.75, "y":2.25, "w":1.25, "h":2}, {"label":"Delete", "x":15.25, "y":2.25}, {"label":"End", "x":16.25, "y":2.25}, {"label":"PgDn", "x":17.25, "y":2.25}, {"label":"7", "x":18.5, "y":2.25}, {"label":"8", "x":19.5, "y":2.25}, {"label":"9", "x":20.5, "y":2.25}, {"label":"+", "x":21.5, "y":2.25, "h":2}, {"label":"Caps Lock", "x":0, "y":3.25, "w":1.75}, {"label":"A", "x":1.75, "y":3.25}, {"label":"S", "x":2.75, "y":3.25}, {"label":"D", "x":3.75, "y":3.25}, {"label":"F", "x":4.75, "y":3.25}, {"label":"G", "x":5.75, "y":3.25}, {"label":"H", "x":6.75, "y":3.25}, {"label":"J", "x":7.75, "y":3.25}, {"label":"K", "x":8.75, "y":3.25}, {"label":"L", "x":9.75, "y":3.25}, {"label":":", "x":10.75, "y":3.25}, {"label":"@", "x":11.75, "y":3.25}, {"label":"~", "x":12.75, "y":3.25}, {"label":"4", "x":18.5, "y":3.25}, {"label":"5", "x":19.5, "y":3.25}, {"label":"6", "x":20.5, "y":3.25}, {"label":"Shift", "x":0, "y":4.25, "w":1.25}, {"label":"|", "x":1.25, "y":4.25}, {"label":"Z", "x":2.25, "y":4.25}, {"label":"X", "x":3.25, "y":4.25}, {"label":"C", "x":4.25, "y":4.25}, {"label":"V", "x":5.25, "y":4.25}, {"label":"B", "x":6.25, "y":4.25}, {"label":"N", "x":7.25, "y":4.25}, {"label":"M", "x":8.25, "y":4.25}, {"label":"<", "x":9.25, "y":4.25}, {"label":">", "x":10.25, "y":4.25}, {"label":"?", "x":11.25, "y":4.25}, {"label":"Shift", "x":12.25, "y":4.25, "w":2.75}, {"label":"\u2191", "x":16.25, "y":4.25}, {"label":"1", "x":18.5, "y":4.25}, {"label":"2", "x":19.5, "y":4.25}, {"label":"3", "x":20.5, "y":4.25}, {"label":"Enter", "x":21.5, "y":4.25, "h":2}, {"label":"Ctrl", "x":0, "y":5.25, "w":1.25}, {"label":"Win", "x":1.25, "y":5.25, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.25, "w":1.25}, {"x":3.75, "y":5.25, "w":6.25}, {"label":"Alt", "x":10, "y":5.25, "w":1.25}, {"label":"Win", "x":11.25, "y":5.25, "w":1.25}, {"label":"Menu", "x":12.5, "y":5.25, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":5.25, "w":1.25}, {"label":"\u2190", "x":15.25, "y":5.25}, {"label":"\u2193", "x":16.25, "y":5.25}, {"label":"\u2192", "x":17.25, "y":5.25}, {"label":"0", "x":18.5, "y":5.25, "w":2}, {"label":".", "x":20.5, "y":5.25}] }, "LAYOUT_fullsize_ansi": { - "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":2, "y":0}, {"label":"F2", "x":3, "y":0}, {"label":"F3", "x":4, "y":0}, {"label":"F4", "x":5, "y":0}, {"label":"F5", "x":6.5, "y":0}, {"label":"F6", "x":7.5, "y":0}, {"label":"F7", "x":8.5, "y":0}, {"label":"F8", "x":9.5, "y":0}, {"label":"F9", "x":11, "y":0}, {"label":"F10", "x":12, "y":0}, {"label":"F11", "x":13, "y":0}, {"label":"F12", "x":14, "y":0}, {"label":"PrtSc", "x":15.25, "y":0}, {"label":"Scroll Lock", "x":16.25, "y":0}, {"label":"Pause", "x":17.25, "y":0}, {"label":"~", "x":0, "y":1.25}, {"label":"!", "x":1, "y":1.25}, {"label":"@", "x":2, "y":1.25}, {"label":"#", "x":3, "y":1.25}, {"label":"$", "x":4, "y":1.25}, {"label":"%", "x":5, "y":1.25}, {"label":"^", "x":6, "y":1.25}, {"label":"&", "x":7, "y":1.25}, {"label":"*", "x":8, "y":1.25}, {"label":"(", "x":9, "y":1.25}, {"label":")", "x":10, "y":1.25}, {"label":"_", "x":11, "y":1.25}, {"label":"+", "x":12, "y":1.25}, {"label":"Backspace", "x":13, "y":1.25, "w":2}, {"label":"Insert", "x":15.25, "y":1.25}, {"label":"Home", "x":16.25, "y":1.25}, {"label":"PgUp", "x":17.25, "y":1.25}, {"label":"Num Lock", "x":18.5, "y":1.25}, {"label":"/", "x":19.5, "y":1.25}, {"label":"*", "x":20.5, "y":1.25}, {"label":"-", "x":21.5, "y":1.25}, {"label":"Tab", "x":0, "y":2.25, "w":1.5}, {"label":"Q", "x":1.5, "y":2.25}, {"label":"W", "x":2.5, "y":2.25}, {"label":"E", "x":3.5, "y":2.25}, {"label":"R", "x":4.5, "y":2.25}, {"label":"T", "x":5.5, "y":2.25}, {"label":"Y", "x":6.5, "y":2.25}, {"label":"U", "x":7.5, "y":2.25}, {"label":"I", "x":8.5, "y":2.25}, {"label":"O", "x":9.5, "y":2.25}, {"label":"P", "x":10.5, "y":2.25}, {"label":"{", "x":11.5, "y":2.25}, {"label":"}", "x":12.5, "y":2.25}, {"label":"|", "x":13.5, "y":2.25, "w":1.5}, {"label":"Delete", "x":15.25, "y":2.25}, {"label":"End", "x":16.25, "y":2.25}, {"label":"PgDn", "x":17.25, "y":2.25}, {"label":"7", "x":18.5, "y":2.25}, {"label":"8", "x":19.5, "y":2.25}, {"label":"9", "x":20.5, "y":2.25}, {"label":"+", "x":21.5, "y":2.25, "h":2}, {"label":"Caps Lock", "x":0, "y":3.25, "w":1.75}, {"label":"A", "x":1.75, "y":3.25}, {"label":"S", "x":2.75, "y":3.25}, {"label":"D", "x":3.75, "y":3.25}, {"label":"F", "x":4.75, "y":3.25}, {"label":"G", "x":5.75, "y":3.25}, {"label":"H", "x":6.75, "y":3.25}, {"label":"J", "x":7.75, "y":3.25}, {"label":"K", "x":8.75, "y":3.25}, {"label":"L", "x":9.75, "y":3.25}, {"label":":", "x":10.75, "y":3.25}, {"label":"@", "x":11.75, "y":3.25}, {"label":"Enter", "x":12.75, "y":3.25, "w":2.25}, {"label":"4", "x":18.5, "y":3.25}, {"label":"5", "x":19.5, "y":3.25}, {"label":"6", "x":20.5, "y":3.25}, {"label":"Shift", "x":0, "y":4.25, "w":2.25}, {"label":"Z", "x":2.25, "y":4.25}, {"label":"X", "x":3.25, "y":4.25}, {"label":"C", "x":4.25, "y":4.25}, {"label":"V", "x":5.25, "y":4.25}, {"label":"B", "x":6.25, "y":4.25}, {"label":"N", "x":7.25, "y":4.25}, {"label":"M", "x":8.25, "y":4.25}, {"label":"<", "x":9.25, "y":4.25}, {"label":">", "x":10.25, "y":4.25}, {"label":"?", "x":11.25, "y":4.25}, {"label":"Shift", "x":12.25, "y":4.25, "w":2.75}, {"label":"\u2191", "x":16.25, "y":4.25}, {"label":"1", "x":18.5, "y":4.25}, {"label":"2", "x":19.5, "y":4.25}, {"label":"3", "x":20.5, "y":4.25}, {"label":"Enter", "x":21.5, "y":4.25, "h":2}, {"label":"Ctrl", "x":0, "y":5.25, "w":1.25}, {"label":"Win", "x":1.25, "y":5.25, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.25, "w":1.25}, {"x":3.75, "y":5.25, "w":6.25}, {"label":"Alt", "x":10, "y":5.25, "w":1.25}, {"label":"Win", "x":11.25, "y":5.25, "w":1.25}, {"label":"Menu", "x":12.5, "y":5.25, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":5.25, "w":1.25}, {"label":"\u2190", "x":15.25, "y":5.25}, {"label":"\u2193", "x":16.25, "y":5.25}, {"label":"\u2192", "x":17.25, "y":5.25}, {"label":"0", "x":18.5, "y":5.25, "w":2}, {"label":".", "x":20.5, "y":5.25}] + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":2, "y":0}, {"label":"F2", "x":3, "y":0}, {"label":"F3", "x":4, "y":0}, {"label":"F4", "x":5, "y":0}, {"label":"F5", "x":6.5, "y":0}, {"label":"F6", "x":7.5, "y":0}, {"label":"F7", "x":8.5, "y":0}, {"label":"F8", "x":9.5, "y":0}, {"label":"F9", "x":11, "y":0}, {"label":"F10", "x":12, "y":0}, {"label":"F11", "x":13, "y":0}, {"label":"F12", "x":14, "y":0}, {"label":"PrtSc", "x":15.25, "y":0}, {"label":"Scroll Lock", "x":16.25, "y":0}, {"label":"Pause", "x":17.25, "y":0}, {"x":18.5, "y":0}, {"x":19.5, "y":0}, {"x":20.5, "y":0}, {"x":21.5, "y":0}, {"label":"~", "x":0, "y":1.25}, {"label":"!", "x":1, "y":1.25}, {"label":"@", "x":2, "y":1.25}, {"label":"#", "x":3, "y":1.25}, {"label":"$", "x":4, "y":1.25}, {"label":"%", "x":5, "y":1.25}, {"label":"^", "x":6, "y":1.25}, {"label":"&", "x":7, "y":1.25}, {"label":"*", "x":8, "y":1.25}, {"label":"(", "x":9, "y":1.25}, {"label":")", "x":10, "y":1.25}, {"label":"_", "x":11, "y":1.25}, {"label":"+", "x":12, "y":1.25}, {"label":"Backspace", "x":13, "y":1.25, "w":2}, {"label":"Insert", "x":15.25, "y":1.25}, {"label":"Home", "x":16.25, "y":1.25}, {"label":"PgUp", "x":17.25, "y":1.25}, {"label":"Num Lock", "x":18.5, "y":1.25}, {"label":"/", "x":19.5, "y":1.25}, {"label":"*", "x":20.5, "y":1.25}, {"label":"-", "x":21.5, "y":1.25}, {"label":"Tab", "x":0, "y":2.25, "w":1.5}, {"label":"Q", "x":1.5, "y":2.25}, {"label":"W", "x":2.5, "y":2.25}, {"label":"E", "x":3.5, "y":2.25}, {"label":"R", "x":4.5, "y":2.25}, {"label":"T", "x":5.5, "y":2.25}, {"label":"Y", "x":6.5, "y":2.25}, {"label":"U", "x":7.5, "y":2.25}, {"label":"I", "x":8.5, "y":2.25}, {"label":"O", "x":9.5, "y":2.25}, {"label":"P", "x":10.5, "y":2.25}, {"label":"{", "x":11.5, "y":2.25}, {"label":"}", "x":12.5, "y":2.25}, {"label":"|", "x":13.5, "y":2.25, "w":1.5}, {"label":"Delete", "x":15.25, "y":2.25}, {"label":"End", "x":16.25, "y":2.25}, {"label":"PgDn", "x":17.25, "y":2.25}, {"label":"7", "x":18.5, "y":2.25}, {"label":"8", "x":19.5, "y":2.25}, {"label":"9", "x":20.5, "y":2.25}, {"label":"+", "x":21.5, "y":2.25, "h":2}, {"label":"Caps Lock", "x":0, "y":3.25, "w":1.75}, {"label":"A", "x":1.75, "y":3.25}, {"label":"S", "x":2.75, "y":3.25}, {"label":"D", "x":3.75, "y":3.25}, {"label":"F", "x":4.75, "y":3.25}, {"label":"G", "x":5.75, "y":3.25}, {"label":"H", "x":6.75, "y":3.25}, {"label":"J", "x":7.75, "y":3.25}, {"label":"K", "x":8.75, "y":3.25}, {"label":"L", "x":9.75, "y":3.25}, {"label":":", "x":10.75, "y":3.25}, {"label":"\"", "x":11.75, "y":3.25}, {"label":"Enter", "x":12.75, "y":3.25, "w":2.25}, {"label":"4", "x":18.5, "y":3.25}, {"label":"5", "x":19.5, "y":3.25}, {"label":"6", "x":20.5, "y":3.25}, {"label":"Shift", "x":0, "y":4.25, "w":2.25}, {"label":"Z", "x":2.25, "y":4.25}, {"label":"X", "x":3.25, "y":4.25}, {"label":"C", "x":4.25, "y":4.25}, {"label":"V", "x":5.25, "y":4.25}, {"label":"B", "x":6.25, "y":4.25}, {"label":"N", "x":7.25, "y":4.25}, {"label":"M", "x":8.25, "y":4.25}, {"label":"<", "x":9.25, "y":4.25}, {"label":">", "x":10.25, "y":4.25}, {"label":"?", "x":11.25, "y":4.25}, {"label":"Shift", "x":12.25, "y":4.25, "w":2.75}, {"label":"\u2191", "x":16.25, "y":4.25}, {"label":"1", "x":18.5, "y":4.25}, {"label":"2", "x":19.5, "y":4.25}, {"label":"3", "x":20.5, "y":4.25}, {"label":"Enter", "x":21.5, "y":4.25, "h":2}, {"label":"Ctrl", "x":0, "y":5.25, "w":1.25}, {"label":"Win", "x":1.25, "y":5.25, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.25, "w":1.25}, {"x":3.75, "y":5.25, "w":6.25}, {"label":"Alt", "x":10, "y":5.25, "w":1.25}, {"label":"Win", "x":11.25, "y":5.25, "w":1.25}, {"label":"Menu", "x":12.5, "y":5.25, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":5.25, "w":1.25}, {"label":"\u2190", "x":15.25, "y":5.25}, {"label":"\u2193", "x":16.25, "y":5.25}, {"label":"\u2192", "x":17.25, "y":5.25}, {"label":"0", "x":18.5, "y":5.25, "w":2}, {"label":".", "x":20.5, "y":5.25}] } } } \ No newline at end of file diff --git a/keyboards/handwired/hnah108/keymaps/default/keymap.c b/keyboards/handwired/hnah108/keymaps/default/keymap.c index a0f06fe1fdf3..6d8fe072c180 100644 --- a/keyboards/handwired/hnah108/keymaps/default/keymap.c +++ b/keyboards/handwired/hnah108/keymaps/default/keymap.c @@ -44,17 +44,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; void encoder_update_user(uint8_t index, bool clockwise) { - if (IS_LAYER_ON(_FN)) { /* First encoder */ + if (index == 0) { + if (IS_LAYER_ON(_FN)) { if (clockwise) { - rgb_matrix_step(); + tap_code(KC_BRIU); } else { - rgb_matrix_step_reverse(); + tap_code(KC_BRID); } } else { if (clockwise) { - rgb_matrix_increase_speed(); + tap_code(KC_VOLU); + } else { - rgb_matrix_decrease_speed(); + tap_code(KC_VOLD); + } } } } diff --git a/keyboards/handwired/hnah108/rules.mk b/keyboards/handwired/hnah108/rules.mk index f881a08bfe28..80f59561d802 100644 --- a/keyboards/handwired/hnah108/rules.mk +++ b/keyboards/handwired/hnah108/rules.mk @@ -27,7 +27,7 @@ BOOTLOADER = atmel-dfu # BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE @@ -44,6 +44,3 @@ FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) ENCODER_ENABLE = yes RGB_MATRIX_ENABLE = WS2812 - -# Supported layouts -LAYOUTS = fullsize_ansi fullsize_iso From 8baed70ed10fadd480511425d0f1b0bbf2d2f109 Mon Sep 17 00:00:00 2001 From: Alan Berndt Date: Sat, 19 Oct 2019 06:56:03 -0700 Subject: [PATCH 134/316] Add pok3r-like keymap for dz60. (#7078) * Add pok3r-like keymap for dz60. * Replace KC_TRNS with underscores --- keyboards/dz60/keymaps/pok3r/keymap.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 keyboards/dz60/keymaps/pok3r/keymap.c diff --git a/keyboards/dz60/keymaps/pok3r/keymap.c b/keyboards/dz60/keymaps/pok3r/keymap.c new file mode 100644 index 000000000000..614cb0069c15 --- /dev/null +++ b/keyboards/dz60/keymaps/pok3r/keymap.c @@ -0,0 +1,25 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT( + KC_GESC, 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_NO, 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, + MO(1), 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_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_NO, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_NO, MO(2), KC_RCTL), + + LAYOUT( + 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_DEL, + _______, KC_MPRV, KC_MPLY, KC_MNXT, RESET, _______, KC_CALC, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, _______, + KC_CAPS, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, KC_DEL, _______, + _______, KC_APP, _______, _______, _______, _______, KC_END, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + LAYOUT( + RGB_TOG, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, RGB_M_T, _______, RGB_RMOD, RGB_MOD, _______, _______, + _______, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), +}; From f64d9b06215bb08d7f77aeba126c0804fffd0064 Mon Sep 17 00:00:00 2001 From: Harry Wada Date: Sun, 20 Oct 2019 09:33:58 -0500 Subject: [PATCH 135/316] Fix detection of ModemManager (#7076) --- lib/python/qmk/cli/doctor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/python/qmk/cli/doctor.py b/lib/python/qmk/cli/doctor.py index 2b6a03e443ae..309de0c6712a 100755 --- a/lib/python/qmk/cli/doctor.py +++ b/lib/python/qmk/cli/doctor.py @@ -52,10 +52,10 @@ def doctor(cli): if shutil.which('systemctl'): mm_check = subprocess.run(['systemctl', 'list-unit-files'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=10, universal_newlines=True) if mm_check.returncode == 0: - mm = True + mm = False for line in mm_check.stdout.split('\n'): if 'ModemManager' in line and 'enabled' in line: - mm = False + mm = True if mm: cli.log.warn("{bg_yellow}Detected ModemManager. Please disable it if you are using a Pro-Micro.") From 3d53ea439c277e49cd4149a6caea727304f41ace Mon Sep 17 00:00:00 2001 From: Yet Another Developer <50936645+yet-another-developer@users.noreply.github.com> Date: Mon, 21 Oct 2019 02:07:57 +0800 Subject: [PATCH 136/316] [Keymap] Ergodash keymap for yet-another-developer (#7046) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Initialize ergodash rev 1 keymap ./util/new_keymap.sh ergodash/rev1 yet-another-developer * Add user space configurations referenced from drashna * Start community layout for ergodash in ortho_5x14 * Remove unused layers * Add userspace layers * Add Userspace gitignore Hide Secrets * Remove userspace unused drashna features * Scrap default keymap and follow drashna's template * Add code referenced from kuchosauronad0 * Make sure that the author is named Developer * Replace middle keys del and bksp with curly brace * Reduce ONESHOT_TIMEOUT from 3sec to 2sec * Remove adjust key AG_SWAP * Disable UNICODEMAP_ENABLE, remove code causing build fail * Increase TAPPING_TERM to 240 Reason: Because Space is also LOWER, space sometimes not registering. PS: I dont want to #define RETRO_TAPPING yet * Update KC_MAKE to use :flash * Remove TAP_ONCE, use tap_code Signed-off-by: Developer * Remove redundant code implementation of keyboard_post_init_user /~https://github.com/qmk/qmk_firmware/pull/7046 users/yet-another-developer/leader.c ``` static bool has_ran_yet; if (!has_ran_yet) { has_ran_yet = true; startup_user(); ``` Comment for lines +11 – +14 @drashna: Not needed anymore. You can use keyboard_post_init_user now. Signed-off-by: Developer --- .../keymaps/yet-another-developer/config.h | 67 ++++++ .../keymaps/yet-another-developer/keymap.c | 157 +++++++++++++ .../keymaps/yet-another-developer/rules.mk | 23 ++ .../ortho_5x14/yet-another-developer/config.h | 22 ++ .../ortho_5x14/yet-another-developer/keymap.c | 208 ++++++++++++++++++ .../ortho_5x14/yet-another-developer/rules.mk | 1 + users/yet-another-developer/.gitignore | 2 + users/yet-another-developer/README.md | 7 + users/yet-another-developer/combo.c | 27 +++ users/yet-another-developer/combo.h | 21 ++ users/yet-another-developer/config.h | 56 +++++ users/yet-another-developer/leader.c | 46 ++++ users/yet-another-developer/leader.h | 6 + users/yet-another-developer/process_records.c | 193 ++++++++++++++++ users/yet-another-developer/process_records.h | 109 +++++++++ users/yet-another-developer/rules.mk | 50 +++++ users/yet-another-developer/tap_dances.c | 55 +++++ users/yet-another-developer/tap_dances.h | 26 +++ users/yet-another-developer/unicode.c | 62 ++++++ users/yet-another-developer/unicode.h | 67 ++++++ users/yet-another-developer/wrappers.h | 166 ++++++++++++++ .../yet-another-developer.c | 160 ++++++++++++++ .../yet-another-developer.h | 87 ++++++++ 23 files changed, 1618 insertions(+) create mode 100644 keyboards/ergodash/rev1/keymaps/yet-another-developer/config.h create mode 100644 keyboards/ergodash/rev1/keymaps/yet-another-developer/keymap.c create mode 100644 keyboards/ergodash/rev1/keymaps/yet-another-developer/rules.mk create mode 100644 layouts/community/ortho_5x14/yet-another-developer/config.h create mode 100644 layouts/community/ortho_5x14/yet-another-developer/keymap.c create mode 100644 layouts/community/ortho_5x14/yet-another-developer/rules.mk create mode 100644 users/yet-another-developer/.gitignore create mode 100644 users/yet-another-developer/README.md create mode 100644 users/yet-another-developer/combo.c create mode 100644 users/yet-another-developer/combo.h create mode 100644 users/yet-another-developer/config.h create mode 100644 users/yet-another-developer/leader.c create mode 100644 users/yet-another-developer/leader.h create mode 100644 users/yet-another-developer/process_records.c create mode 100644 users/yet-another-developer/process_records.h create mode 100644 users/yet-another-developer/rules.mk create mode 100644 users/yet-another-developer/tap_dances.c create mode 100644 users/yet-another-developer/tap_dances.h create mode 100644 users/yet-another-developer/unicode.c create mode 100644 users/yet-another-developer/unicode.h create mode 100644 users/yet-another-developer/wrappers.h create mode 100644 users/yet-another-developer/yet-another-developer.c create mode 100644 users/yet-another-developer/yet-another-developer.h diff --git a/keyboards/ergodash/rev1/keymaps/yet-another-developer/config.h b/keyboards/ergodash/rev1/keymaps/yet-another-developer/config.h new file mode 100644 index 000000000000..1005c480467e --- /dev/null +++ b/keyboards/ergodash/rev1/keymaps/yet-another-developer/config.h @@ -0,0 +1,67 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + + +/* Use I2C or Serial, not both */ +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +//#define MASTER_LEFT +#define MASTER_RIGHT /* Cable connected to the right split keyboard */ +// #define EE_HANDS + +#define AUTO_SHIFT_TIMEOUT 210 + +#define TAPPING_TERM_PER_KEY + +// https://beta.docs.qmk.fm/features/feature_leader_key +//#define LEADER_PER_KEY_TIMING +//#define LEADER_TIMEOUT 280 + +// https://docs.qmk.fm/#/feature_mouse_keys +#define MK_3_SPEED // Constant Speed Mode + +#define MOUSEKEY_DELAY 300 +#define MOUSEKEY_INTERVAL 16 +#define MOUSEKEY_MAX_SPEED 3 +#define MOUSEKEY_TIME_TO_MAX 60 +#define MK_C_OFFSET_0 4 +#define MK_C_INTERVAL_0 28 +#define MK_C_OFFSET_1 8 +#define MK_C_INTERVAL_1 16 +#define MK_C_OFFSET_2 20 +#define MK_C_INTERVAL_2 16 + +#define MOUSEKEY_WHEEL_MAX_SPEED 4 +#define MOUSEKEY_WHEEL_TIME_TO_MAX 40 + +#define MK_W_OFFSET_0 1 +#define MK_W_INTERVAL_0 120 +#define MK_W_OFFSET_1 1 +#define MK_W_INTERVAL_1 100 +#define MK_W_OFFSET_2 1 +#define MK_W_INTERVAL_2 60 + +//#define STARTUP_RESET_EEPROM // EMERGENCY + diff --git a/keyboards/ergodash/rev1/keymaps/yet-another-developer/keymap.c b/keyboards/ergodash/rev1/keymaps/yet-another-developer/keymap.c new file mode 100644 index 000000000000..1d51227ccf98 --- /dev/null +++ b/keyboards/ergodash/rev1/keymaps/yet-another-developer/keymap.c @@ -0,0 +1,157 @@ +#include QMK_KEYBOARD_H +#include "yet-another-developer.h" + +#ifndef UNICODE_ENABLE +# define UC(x) KC_NO +#endif + +extern keymap_config_t keymap_config; + +#define EISU LALT(KC_GRV) + +#define LAYOUT_ergodash_pretty_wrapper(...) LAYOUT_ergodash_pretty(__VA_ARGS__) + + /* Keymap: BASE layer + * + * ,----------------------------------------------------. ,----------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | [ | | ] | 6 | 7 | 8 | 9 | 0 | Pscree | + * |--------+--------+------+------+------+-------------| |------+------+------+------+------+--------+--------| + * | ` | K01 | K02 | K03 | K04 | K05 | - | | = | K06 | K07 | K08 | K09 | K0A | \ | + * |--------+--------+------+------+------+------|------| |------|------+------+------+------+--------+--------| + * | Tab | K11 | K12 | K13 | K14 | K15 | { | | } | K16 | K17 | K18 | K19 | K1A | " | + * |--------+--------+------+------+------+------|------' `------|------+------+------+------+--------+--------| + * | LShift | K21 | K22 | K23 | K24 | K25 | | K26 | K27 | K28 | K29 | K2A | RShift | + * |--------+--------+------+------+------+------' `------+------+------+------+--------+--------| + * | LCtrl | GUI | Alt | Alt | | LEFT | DOWN | UP | RIGHT | + * `-------------------------------' `-------------------------------' + * ,--------------. ,--------------. + * | Lower| | | | Raise | + * ,-------| / | Del | | Bksp + / +-------. + * |CMD/Spc| Space| | | | Enter |CMD/Spc| + * `----------------------' `----------------------' + */ +#define LAYOUT_ergodash_pretty_base( \ + K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ + K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ + K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \ + ) \ + LAYOUT_ergodash_pretty_wrapper( \ + KC_ESC, ________________NUMBER_LEFT________________, KC_LBRC, KC_RBRC, ________________NUMBER_RIGHT_______________, KC_PSCR, \ + KC_GRV, K01, K02, K03, K04, K05, KC_MINS, KC_EQL, K06, K07, K08, K09, K0A, KC_BSLS, \ + KC_TAB, K11, K12, K13, K14, K15, KC_LCBR, KC_RCBR, K16, K17, K18, K19, K1A, KC_QUOT, \ + OS_LSFT, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, OS_RSFT, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_LALT, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, \ + LT(_LOWER, KC_SPC), LT(_RAISE, KC_ENT), \ + OS_LGUI,LT(_LOWER, KC_SPC),KC_DEL, KC_BSPC, LT(_RAISE, KC_ENT), OS_RGUI \ + ) + +#define LAYOUT_ergodash_pretty_base_wrapper(...) LAYOUT_ergodash_pretty_base(__VA_ARGS__) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT_ergodash_pretty_base_wrapper( + _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, + _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, + _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ + ), + +/* Keymap: COLEMAK layer + * + * ,----------------------------------------------------. ,----------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | [ | | ] | 6 | 7 | 8 | 9 | 0 | - | + * |--------+--------+------+------+------+-------------| |------+------+------+------+------+--------+--------| + * | ` | Q | W | F | P | G | - | | = | J | L | U | Y | ; | \ | + * |--------+--------+------+------+------+------|------| |------|------+------+------+------+--------+--------| + * | Tab | A | R | S | T | D | Del | | Bksp | H | N | E | I | O | ' | + * |--------+--------+------+------+------+------|------' `------|------+------+------+------+--------+--------| + * | LShift | Z | X | C | V | B | | K | M | , < | . > | / | RShift | + * |--------+--------+------+------+------+------' `------+------+------+------+--------+--------| + * | Ctrl | GUI | Alt | EISU | | LEFT | DOWN | UP | RIGHT | + * `-------------------------------' `-------------------------------' + * ,--------------. ,--------------. + * | Lower| | | | Raise | + * ,-------| / | Del | | Bksp + / +-------. + * |CMD/Spc| Space| | | | Enter |CMD/Spc| + * `----------------------' `----------------------' + */ + + +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* + [_COLEMAK] = LAYOUT_ergodash_pretty_base_wrapper( + _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, + _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, + _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ + ), + + [_DVORAK] = LAYOUT_ergodash_pretty_base_wrapper( + _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, + _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, + _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ + ), + + [_WORKMAN] = LAYOUT_ergodash_pretty_base_wrapper( + _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, + _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, + _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ + ), + +#ifdef UNICODEMAP_ENABLE + [_UNICODE] = LAYOUT_ergodash_pretty_base_wrapper( + _______________UNICODE_L1__________________, _______________UNICODE_R1__________________, + _______________UNICODE_L2__________________, _______________UNICODE_R2__________________, + _______________UNICODE_L3__________________, _______________UNICODE_R3__________________ + ), +#endif + + [_LOWER] = LAYOUT_ergodash_pretty_wrapper( + KC_F11, _________________FUNC_LEFT_________________, KC_RST , KC_RST , _________________FUNC_RIGHT________________, KC_F12, + KC_TILD, _________________LOWER_L1__________________, _______, _______, _________________LOWER_R1__________________, KC_PIPE, + _______, _________________LOWER_L2__________________, _______, _______, _________________LOWER_R2__________________, KC_DQUO, + _______, _________________LOWER_L3__________________, _________________LOWER_R3__________________, KC_PSCR, + _______, _______, _______, _______, _______, _______, _______, KC_PAUS, + _______, _______, + _______, _______, _______, _______, _______, _______ + ), + + [_RAISE] = LAYOUT_ergodash_pretty_wrapper( + KC_F12, _________________FUNC_LEFT_________________, KC_RST, KC_RST , _________________FUNC_RIGHT________________, KC_F11, + KC_GRV, _________________RAISE_L1__________________, _______, _______, _________________RAISE_R1__________________, KC_BSLS, + _______, _________________RAISE_L2__________________, _______, _______, _________________RAISE_R2__________________, KC_QUOT, + _______, _________________RAISE_L3__________________, _________________RAISE_R3__________________, KC_PSCR, + _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, + _______, _______, + _______, _______, _______, _______, _______, _______ + ), + + [_ADJUST] = LAYOUT_ergodash_pretty_wrapper( + KC_MAKE, _______, _______, _______, _______, _______, _______, KC_NUKE, _______, _______, _______, _______, _______, KC_RST, + VRSN, _________________ADJUST_L1_________________, _______, _______, _________________ADJUST_R1_________________, EEP_RST, + _______, _________________ADJUST_L2_________________, _______, _______, _________________ADJUST_R2_________________, _______, + _______, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, _______, + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, + _______, _______, _______, _______, _______, _______ + ), +}; + +#ifdef AUDIO_ENABLE +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +#endif + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + return true; +} +void matrix_init_keymap(void) { +#ifdef STARTUP_RESET_EEPROM + eeconfig_init(); +#endif +} + +// diff --git a/keyboards/ergodash/rev1/keymaps/yet-another-developer/rules.mk b/keyboards/ergodash/rev1/keymaps/yet-another-developer/rules.mk new file mode 100644 index 000000000000..6ba6c5b2211f --- /dev/null +++ b/keyboards/ergodash/rev1/keymaps/yet-another-developer/rules.mk @@ -0,0 +1,23 @@ +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) + +# Device +AUDIO_ENABLE = no + +RGBLIGHT_ENABLE = no +BACKLIGHT_ENABLE = no +INDICATOR_LIGHTS = no + +# QMK Features +AUTO_SHIFT_ENABLE = no +MOUSEKEY_ENABLE = no +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +LEADER_ENABLE = yes # default is yes +TAP_DANCE_ENABLE = no #(+1254) +UNICODE_ENABLE = no #(+1134) +UNICODEMAP_ENABLE = no +NKRO_ENABLE = no +MACROS_ENABLED = no + +# User Defined Features +NO_SECRETS = no diff --git a/layouts/community/ortho_5x14/yet-another-developer/config.h b/layouts/community/ortho_5x14/yet-another-developer/config.h new file mode 100644 index 000000000000..7504338fff4c --- /dev/null +++ b/layouts/community/ortho_5x14/yet-another-developer/config.h @@ -0,0 +1,22 @@ +#pragma once + +/* ws2812 RGB LED */ +#if defined(KEYBOARD_fractal) +# define RGB_DI_PIN D2 +# undef RGBLED_NUM +# define RGBLIGHT_ANIMATIONS +# define RGBLED_NUM 29 // Number of LEDs +# undef RGBLIGHT_HUE_STEP +# define RGBLIGHT_HUE_STEP 8 +# undef RGBLIGHT_SAT_STEP +# define RGBLIGHT_SAT_STEP 8 +# undef RGBLIGHT_VAL_STEP +# define RGBLIGHT_VAL_STEP 8 +# define RGBLIGHT_LIMIT_VAL 175 +# define RGBLIGHT_SLEEP + +# define RGBLIGHT_EFFECT_KNIGHT_OFFSET 3 +# define RGBLIGHT_EFFECT_KNIGHT_LED_NUM 14 +# define B7_AUDIO +# define NO_MUSIC_MODE +#endif diff --git a/layouts/community/ortho_5x14/yet-another-developer/keymap.c b/layouts/community/ortho_5x14/yet-another-developer/keymap.c new file mode 100644 index 000000000000..aea50508d3ff --- /dev/null +++ b/layouts/community/ortho_5x14/yet-another-developer/keymap.c @@ -0,0 +1,208 @@ +#include QMK_KEYBOARD_H +#include "yet-another-developer.h" + +// clang-format off + +/* ---------- LEFT HAND ----------- ---------- RIGHT HAND ---------- */ +#define LAYOUT_ergodash_pretty( \ + L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ + L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ + L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ + L30, L31, L32, L33, L34, L35, R31, R32, R33, R34, R35, R36, \ + L40, L41, L42, L43, R43, R44, R45, R46 \ + L36, R30, \ + L44, L45, L46, R40, R41, R42, \ + ) \ + /* matrix positions */ \ + { \ + { L00, L01, L02, L03, L04, L05, L06 }, \ + { L10, L11, L12, L13, L14, L15, L16 }, \ + { L20, L21, L22, L23, L24, L25, L26 }, \ + { L30, L31, L32, L33, L34, L35, L36 }, \ + { L40, L41, L42, L43, L44, L45, L46 }, \ + { R06, R05, R04, R03, R02, R01, R00 }, \ + { R16, R15, R14, R13, R12, R11, R10 }, \ + { R26, R25, R24, R23, R22, R21, R20 }, \ + { R36, R35, R34, R33, R32, R31, R30 }, \ + { R46, R45, R44, R43, R42, R41, R40 } \ + } + +#define LAYOUT_ergodash_pretty_wrapper(...) LAYOUT_ergodash_pretty(__VA_ARGS__) + +#define LAYOUT_ergodash_pretty_base( \ + K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ + K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ + K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \ + ) \ + LAYOUT_ergodox_pretty_wrapper( \ + KC_ESC, ________________NUMBER_LEFT________________, KC_LBRC, KC_RBRC, ________________NUMBER_RIGHT_______________, KC_PSCR, \ + KC_GRV, K01, K02, K03, K04, K05, KC_MINS, KC_EQL, K06, K07, K08, K09, K0A, KC_BSLS, \ + KC_TAB, ALT_T(K11), K12, K13, K14, K15, KC_DEL, KC_BSPC, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \ + KC_LSFT, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A), KC_MRSF, \ + KC_LCTL, KC_LGUI, KC_LALT, EISU, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + LT(_LOWER, KC_SPC), LT(_RAISE, KC_ENT), \ + OS_LGUI,LT(_LOWER, KC_SPC),KC_DEL, KC_BSPC, LT(_RAISE, KC_ENT), OS_RGUI \ + ) + +#define LAYOUT_ergodash_pretty_base_wrapper(...) LAYOUT_ergodash_pretty_base(__VA_ARGS__) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: QWERTY Layer + * + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | = + | 1 ! | 2 @ | 3 # | 4 $ | 5 % | TG(4)| | TG(4)| 6 ^ | 7 & | 8 * | 9 ( | 0 ) | - _ | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | TAB | Q | W | E | R | T | TG(3)| |TG(3) | Y | U | I | O | P | \ | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Bksp | A | S | D | F | G |------| |------| H | J | K | L | ; | ' " | + * |--------+------+------+------+------+------| TG(2)| | TG(2)|------+------+------+------+------+--------| + * | Shift | Z | X | C | V | B | | | | N | M | , < | . > | ? / | Shift | + * |--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------| + * | `/SYM | MEH | LGUI | [ { | | LEFT | DOWN | UP |RIGHT | SYMB | + * `-----------------------------' `------------------------------------' + * ,--------------. ,--------------. + * |Alt/Ap| Win | | Alt |Ctl/Esc| + * ,------|------|-------| |------+-------+------. + * | | | Home | | PgUp | | | + * `---------------------' `---------------------' + */ + [_QWERTY] = LAYOUT_ergodash_pretty_base_wrapper( + _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, + _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, + _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ + ), +/* Keymap 0: COLEMAK layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Del | Q | W | F | P | G | L1 | | L1 | J | L | U | Y | ; | \ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | BkSp | A | R | S | T | D |------| |------| H | N | E | I |O / L2| ' | + * |--------+------+------+------+------+------| OVER | | Meh |------+------+------+------+------+--------| + * | LShift |Z/Ctrl| X | C | V | B | | | | K | M | , | . |//Ctrl| RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | `/SYM | MEH | LGUI | [ { | | LEFT | DOWN | UP |RIGHT | SYMB | + * `-----------------------------' `------------------------------------' + * ,--------------. ,--------------. + * |Alt/Ap| Win | | Alt |Ctl/Esc| + * ,------|------|-------| |------+-------+------. + * | | | Home | | PgUp | | | + * `---------------------' `---------------------' + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* + [_COLEMAK] = LAYOUT_ergodash_pretty_base_wrapper( + _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, + _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, + _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ + ), + +// Reverts OSM(Shift) to normal Shifts. However, may not need since we fixed the issue with RDP (LOCAL RESOURCES) + [_MODS] = LAYOUT_ergodash_pretty_wrapper( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RSFT, + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ + ), + + +/* Keymap 4: Customized Overwatch Layout + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ESC | | | | | | | | | F9 | F10 | F11 | F12 | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | F1 | K | Q | W | E | R | T | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | TAB | G | A | S | D | F |------| |------| | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | LCTR | LSHFT| Z | X | C | V | | | | N | M | | | | | + * |--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------| + * | `/SYM | MEH | LGUI | [ { | | LEFT | DOWN | UP |RIGHT | SYMB | + * `-----------------------------' `------------------------------------' + * ,--------------. ,--------------. + * |Alt/Ap| Win | | Alt |Ctl/Esc| + * ,------|------|-------| |------+-------+------. + * | | | Home | | PgUp | | | + * `---------------------' `---------------------' + */ + [_GAMEPAD] = LAYOUT_ergodash_pretty_wrapper( + KC_ESC, KC_NO, KC_1, KC_2, KC_3, HYPR(KC_Q), HYPR(KC_GRV), KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, + KC_F1, KC_K, KC_Q, KC_W, KC_E, KC_R, KC_T, UC_SHRG, UC_DISA, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_TAB, KC_G, KC_A, KC_S, KC_D, KC_F, KC_I, KC_O, KC_NO, KC_NO, KC_NO, KC_NO, + KC_LCTL, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_TRNS, TG(_GAMEPAD), KC_N, KC_M, KC_NO, KC_NO, KC_NO, KC_NO, + KC_GRV, KC_U, KC_I, KC_Y, KC_T, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_NO, + KC_O, KC_P, MAGIC_TOGGLE_NKRO, LALT(KC_PSCR), + KC_LGUI, KC_HYPR, + KC_V, KC_SPC, KC_H, KC_NO, KC_NO, KC_SWAP_NUM + ), + +/* Keymap 3: + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ESC | V | D | ALT | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | TAB | S | I | F | M | T | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Q | 1 | 2 | 3 | 4 | G |------| |------| | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | NUMLOCK| NUM1 | NUM2 | NUM3 | NUM4 | Z | | | | | | | | | | + * |--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | `/SYM | MEH | LGUI | [ { | | LEFT | DOWN | UP |RIGHT | SYMB | + * `-----------------------------' `------------------------------------' + * ,--------------. ,--------------. + * |Alt/Ap| Win | | Alt |Ctl/Esc| + * ,------|------|-------| |------+-------+------. + * | | | Home | | PgUp | | | + * `---------------------' `---------------------' + */ + [_DIABLO] = LAYOUT_ergodash_pretty_wrapper( + KC_ESC, KC_V, KC_D, KC_LALT, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, + KC_TAB, KC_S, KC_I, KC_F, KC_M, KC_T, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_Q, KC_1, KC_2, KC_3, KC_4, KC_G, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_LCTL, KC_D3_1, KC_D3_2, KC_D3_3, KC_D3_4, KC_Z, KC_NO, KC_NO, KC_N, KC_M, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_L, KC_J, KC_NO, KC_NO, + KC_F, KC_NO, + SFT_T(KC_SPACE), ALT_T(KC_Q), KC_DIABLO_CLEAR, KC_PGDN, KC_DEL, KC_ENT + ), + + [_LOWER] = LAYOUT_ergodash_pretty_wrapper( + KC_F12, _________________FUNC_LEFT_________________, _______, _______, _________________FUNC_RIGHT________________, KC_F11, + KC_TILD, _________________LOWER_L1__________________, _______, _______, _________________LOWER_R1__________________, KC_PIPE, + _______, ___________________BLANK___________________, _________________LOWER_R2__________________, KC_DQUO, + _______, ___________________BLANK___________________, _______, _______, _________________LOWER_R3__________________, KC_PSCR, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PAUS, + _______, _______, _______, _______, + _______, _______, + _______, _______, _______, _______, _______, _______ + ), + + [_RAISE] = LAYOUT_ergodash_pretty_wrapper( + KC_F12, _________________FUNC_LEFT_________________, _______, _______, _________________FUNC_RIGHT________________, KC_F11, + KC_GRV, _________________RAISE_L1__________________, _______, _______, _________________RAISE_R1__________________, KC_BSLS, + _______, _________________RAISE_L2__________________, _________________RAISE_R2__________________, KC_QUOT, + _______, _________________RAISE_L3__________________, _______, _______, _________________RAISE_R3__________________, KC_PSCR, + _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_SLCK, + _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ + ), + + [_ADJUST] = LAYOUT_ergodash_pretty_wrapper( + KC_MAKE, _______, _______, _______, _______, _______, _______, KC_NUKE, _________________ADJUST_R1_________________, KC_RST, + VRSN, _________________ADJUST_L1_________________, _______, _______, _______, _______, _______, _______, _______, EEP_RST, + _______, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, RGB_IDL, + _______, _________________ADJUST_L3_________________, _______, _______, _________________ADJUST_R3_________________, TG(_MODS), + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, + _______, _______, _______, _______, _______, _______ + ), + +}; +// clang-format on diff --git a/layouts/community/ortho_5x14/yet-another-developer/rules.mk b/layouts/community/ortho_5x14/yet-another-developer/rules.mk new file mode 100644 index 000000000000..8b137891791f --- /dev/null +++ b/layouts/community/ortho_5x14/yet-another-developer/rules.mk @@ -0,0 +1 @@ + diff --git a/users/yet-another-developer/.gitignore b/users/yet-another-developer/.gitignore new file mode 100644 index 000000000000..d815569141ff --- /dev/null +++ b/users/yet-another-developer/.gitignore @@ -0,0 +1,2 @@ +secrets.c +secrets.h \ No newline at end of file diff --git a/users/yet-another-developer/README.md b/users/yet-another-developer/README.md new file mode 100644 index 000000000000..3e528bcf5d3d --- /dev/null +++ b/users/yet-another-developer/README.md @@ -0,0 +1,7 @@ +# User Space for yet-another-developer + + +## Reference / Inspiration + - /u/kuchosauronad0 + - /u/drashna + - /u/not-quite-neo \ No newline at end of file diff --git a/users/yet-another-developer/combo.c b/users/yet-another-developer/combo.c new file mode 100644 index 000000000000..b4e8e84ae51a --- /dev/null +++ b/users/yet-another-developer/combo.c @@ -0,0 +1,27 @@ +#include "combo.h" + +void process_combo_event(uint8_t combo_index, bool pressed){ + switch(combo_index) { + case ZV_COPY: + if (pressed) { + tap_code16(LCTL(KC_C)); + } + break; + case XV_CUT: + if (pressed) { + tap_code16(LCTL(KC_X)); + } + break; + + case CV_PASTE: + if (pressed) { + tap_code16(LCTL(KC_V)); + } + break; + case QP_SLEEP: + if (pressed) { + tap_code16(KC_SYSTEM_SLEEP); + } + break; + } +} diff --git a/users/yet-another-developer/combo.h b/users/yet-another-developer/combo.h new file mode 100644 index 000000000000..e2ff09ab5a06 --- /dev/null +++ b/users/yet-another-developer/combo.h @@ -0,0 +1,21 @@ +#pragma once +#include "quantum.h" +enum combo_events { + ZV_COPY, + XV_CUT, + CV_PASTE, + QP_SLEEP +}; + +const uint16_t PROGMEM copy_combo[] = {KC_Z, KC_V, COMBO_END}; +const uint16_t PROGMEM cut_combo[] = {KC_X, KC_V, COMBO_END}; +const uint16_t PROGMEM paste_combo[] = {KC_C, KC_V, COMBO_END}; +const uint16_t PROGMEM sleep_combo[] = {KC_Q, KC_P, COMBO_END}; + +combo_t key_combos[COMBO_COUNT] = { + [ZV_COPY] = COMBO_ACTION(copy_combo), + [XV_CUT] = COMBO_ACTION(cut_combo), + [CV_PASTE] = COMBO_ACTION(paste_combo), + [QP_SLEEP] = COMBO_ACTION(sleep_combo), +}; + diff --git a/users/yet-another-developer/config.h b/users/yet-another-developer/config.h new file mode 100644 index 000000000000..d46d487fe32c --- /dev/null +++ b/users/yet-another-developer/config.h @@ -0,0 +1,56 @@ +#pragma once + +/* Set Polling rate to 1000Hz */ +#define USB_POLLING_INTERVAL_MS 1 + +#ifndef ONESHOT_TAP_TOGGLE + #define ONESHOT_TAP_TOGGLE 2 +#endif // !ONESHOT_TAP_TOGGLE + +#ifndef ONESHOT_TIMEOUT + #define ONESHOT_TIMEOUT 2000 +#endif // !ONESHOT_TIMEOUT + +#ifndef QMK_KEYS_PER_SCAN + #define QMK_KEYS_PER_SCAN 4 +#endif // !QMK_KEYS_PER_SCAN + +#if defined(LEADER_ENABLE) + #define LEADER_PER_KEY_TIMING + #define LEADER_TIMEOUT 250 +#endif // !LEADER_ENABLE + +#if defined(COMBO_ENABLE) + #define COMBO_COUNT 4 + #define COMBO_TERM 150 +#endif // !COMBO_ENABLE + +#if defined(NKRO_ENABLE) + #define FORCE_NKRO +#endif // !NKRO_ENABLE + +// 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.) +#define IGNORE_MOD_TAP_INTERRUPT +#undef PERMISSIVE_HOLD +//#define TAPPING_FORCE_HOLD +//#define RETRO_TAPPING + +#ifndef TAPPING_TOGGLE + #define TAPPING_TOGGLE 1 +#endif + +#ifdef TAPPING_TERM +# undef TAPPING_TERM +#endif // !TAPPING_TERM +#if defined(KEYBOARD_ergodash) + #define TAPPING_TERM 240 +#else + #define TAPPING_TERM 200 +#endif + +#define TAP_CODE_DELAY 5 //DEFAULT: 100 + +#define MACRO_TIMER 5 diff --git a/users/yet-another-developer/leader.c b/users/yet-another-developer/leader.c new file mode 100644 index 000000000000..3cbbf8d70ee8 --- /dev/null +++ b/users/yet-another-developer/leader.c @@ -0,0 +1,46 @@ +#include "leader.h" + +LEADER_EXTERNS(); + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void){ + +#ifdef TAP_DANCE_ENABLE // Run Diablo 3 macro checking code. +// run_diablo_macro_check(); +#endif // TAP_DANCE_ENABLE + +#ifdef RGBLIGHT_ENABLE + matrix_scan_rgb(); +#endif // RGBLIGHT_ENABLE + + LEADER_DICTIONARY() { + leading = false; + leader_end(); + + SEQ_TWO_KEYS(KC_V, KC_Z){ + // vim: Zoom pane + tap_code16(LCTL(KC_W)); + tap_code16(LSFT(KC_BSLS)); + } + + SEQ_TWO_KEYS(KC_V, KC_R) { + // vim: Substitute and place cursor + SEND_STRING(":%s///g" SS_TAP(X_LEFT)); + tap_code(KC_LEFT); + tap_code(KC_LEFT); + } + + SEQ_TWO_KEYS(KC_V, KC_T) { + // vim: move current pane to new tab + tap_code16(LCTL(KC_W)); + tap_code16(LSFT(KC_T)); + } + + SEQ_THREE_KEYS(KC_BSPC, KC_BSPC, KC_BSPC){ + // Reset the keyboard + reset_keyboard(); + } + } + + matrix_scan_keymap(); +} diff --git a/users/yet-another-developer/leader.h b/users/yet-another-developer/leader.h new file mode 100644 index 000000000000..7ed6c8a82c56 --- /dev/null +++ b/users/yet-another-developer/leader.h @@ -0,0 +1,6 @@ +#pragma once +#include "yet-another-developer.h" + +#include "leader.h" + +void matrix_scan_user(void); diff --git a/users/yet-another-developer/process_records.c b/users/yet-another-developer/process_records.c new file mode 100644 index 000000000000..c7dbd704a0ae --- /dev/null +++ b/users/yet-another-developer/process_records.c @@ -0,0 +1,193 @@ +#include "yet-another-developer.h" + +uint16_t copy_paste_timer; + +__attribute__ ((weak)) +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + return true; +} + +__attribute__ ((weak)) +bool process_record_secrets(uint16_t keycode, keyrecord_t *record) { + return true; +} + +// Defines actions for my global custom keycodes. Defined in yet-another-developer.h file +// Then runs the _keymap's record handier if not processed here +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + // If console is enabled, it will print the matrix position and status of each key pressed +#ifdef KEYLOGGER_ENABLE + #if defined(KEYBOARD_ergodox_ez) || defined(KEYBOARD_keebio_iris_rev2) + xprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.row, record->event.key.col, record->event.pressed); + #else + xprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed); + #endif +#endif //KEYLOGGER_ENABLE + + switch (keycode) { + case KC_QWERTY ... KC_UNICODE: + if (record->event.pressed) { + set_single_persistent_default_layer(keycode - KC_QWERTY); + } + break; + + case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader + if (!record->event.pressed) { + clear_mods(); + clear_oneshot_mods(); + send_string_with_delay_P(PSTR("make " QMK_KEYBOARD ":" QMK_KEYMAP), TAP_CODE_DELAY); + { + send_string_with_delay_P(PSTR(":flash"), TAP_CODE_DELAY); + } + } + break; + + /* Tap Dance */ + case MC_QT1: // "" + if(record->event.pressed){ + SEND_STRING("\"\""); + tap_code(KC_LEFT); + } + break; + case MC_QT2: // '' + if(record->event.pressed){ + SEND_STRING("''"); + tap_code(KC_LEFT); + } + break; + case MC_QT3: // `' + if(record->event.pressed){ + SEND_STRING("`'"); + tap_code(KC_LEFT); + } + break; + case MC_PAR: // Parenthesis + if(record->event.pressed){ + SEND_STRING("()"); + tap_code(KC_LEFT); + } + break; + case MC_CUR: // Curly bracket + if(record->event.pressed){ + SEND_STRING("{}"); + tap_code(KC_LEFT); + } + break; + case MC_SQR: // Square bracket + if(record->event.pressed){ + SEND_STRING("[]"); + tap_code(KC_LEFT); + } + break; + case MC_ABR: // Angle bracket + if(record->event.pressed){ + SEND_STRING("<>"); + tap_code(KC_LEFT); + } + break; + case MCT_NEW: // New Tmux Session + if(record->event.pressed){ + SEND_STRING(":neww"); + tap_code(KC_ENT); + } + break; + case MCT_SH: // Tmux horizontal split + if(record->event.pressed){ + SEND_STRING("%"); + } + break; + case MCT_SV: // Tmux vertical split + if(record->event.pressed){ + SEND_STRING("\""); + } + break; + case MCT_ZM: // Tmux zoom + if(record->event.pressed){ + tap_code(KC_Z); + } + break; + case MCT_SCR: // Tmux scroll mode + if(record->event.pressed){ + tap_code(KC_PGUP); + } + break; + case MCT_UP: // Tmux up + break; + case MCT_DW: // Tmux down + break; + case MCT_LFT: // Tmux left + break; + case MCT_RGT: // Tmux right + tap_code(KC_RIGHT); + break; + case MCV_B: // Vim begin of line + if(record->event.pressed){ + tap_code(KC_0); + } + break; + case MCV_E: // Vim end of line + if(record->event.pressed){ + SEND_STRING(":vsplit"); + tap_code(KC_ENT); + } + break; + case MCT_F: // Vim for loop + if(record->event.pressed){ + SEND_STRING(":help"); + tap_code(KC_ENT); + } + break; + + case VRSN: // Prints firmware version + if (record->event.pressed) { + send_string_with_delay_P(PSTR(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION ", Built on: " QMK_BUILDDATE), TAP_CODE_DELAY); + } + break; + + + case KC_CCCV: // One key copy/paste + if (record->event.pressed) { + copy_paste_timer = timer_read(); + } else { + if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { // Hold, copy + register_code(KC_LCTL); + tap_code(KC_C); + unregister_code(KC_LCTL); + } else { // Tap, paste + register_code(KC_LCTL); + tap_code(KC_V); + unregister_code(KC_LCTL); + } + } + break; +#ifdef UNICODE_ENABLE + case UC_FLIP: // (ノಠ痊ಠ)ノ彡┻━┻ + if (record->event.pressed) { + send_unicode_hex_string("0028 30CE 0CA0 75CA 0CA0 0029 30CE 5F61 253B 2501 253B"); + } + break; + case UC_TABL: // ┬─┬ノ( º _ ºノ) + if (record->event.pressed) { + send_unicode_hex_string("252C 2500 252C 30CE 0028 0020 00BA 0020 005F 0020 00BA 30CE 0029"); + } + break; + case UC_SHRG: // ¯\_(ツ)_/¯ + if (record->event.pressed) { + send_unicode_hex_string("00AF 005C 005F 0028 30C4 0029 005F 002F 00AF"); + } + break; + case UC_DISA: // ಠ_ಠ + if (record->event.pressed) { + send_unicode_hex_string("0CA0 005F 0CA0"); + } + break; +#endif // UNICODE_ENABLE + } + + return process_record_keymap(keycode, record) && +#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) + process_record_user_rgb(keycode, record) && +#endif // RGBLIGHT_ENABLE + process_record_secrets(keycode, record); +} diff --git a/users/yet-another-developer/process_records.h b/users/yet-another-developer/process_records.h new file mode 100644 index 000000000000..d4576f541e09 --- /dev/null +++ b/users/yet-another-developer/process_records.h @@ -0,0 +1,109 @@ +#pragma once +#include "yet-another-developer.h" + +#if defined(KEYMAP_SAFE_RANGE) +# define PLACEHOLDER_SAFE_RANGE KEYMAP_SAFE_RANGE +#else +# define PLACEHOLDER_SAFE_RANGE SAFE_RANGE +#endif + +enum userspace_custom_keycodes { + VRSN = PLACEHOLDER_SAFE_RANGE, // Prints QMK Firmware and board info + KC_QWERTY, // Sets default layer to QWERTY + KC_COLEMAK, // Sets default layer to COLEMAK + KC_DVORAK, // Sets default layer to DVORAK + KC_WORKMAN, // Sets default layer to WORKMAN + KC_UNICODE, // Sets default layer to UNICOD + + KC_MAKE, // Run keyboard's customized make command + KC_SECRET_1, // test1 + KC_SECRET_2, // test2 + KC_SECRET_3, // test3 + KC_SECRET_4, // test4 + KC_SECRET_5, // test5 + KC_CCCV, // Hold to copy, tap to paste + KC_NUKE, // NUCLEAR LAUNCH DETECTED!!! + UC_FLIP, // (ಠ痊ಠ)┻━┻ + UC_TABL, // ┬─┬ノ( º _ ºノ) + UC_SHRG, // ¯\_(ツ)_/¯ + UC_DISA, // ಠ_ಠ + + MC_QT1, // "" + MC_QT2, // '' + MC_QT3, // `' + MC_PAR, // Parenthesis + MC_CUR, // Curly bracket + MC_SQR, // Square bracket + MC_ABR, // Angle bracket + MCT_NEW, // New Tmux Session + MCT_SH, // Tmux horizontal split + MCT_SV, // Tmux vertical split + MCT_ZM, // Tmux zoom + MCT_SCR, // Tmux scroll mode + MCT_UP, // Tmux up + MCT_DW, // Tmux down + MCT_LFT, // Tmux left + MCT_RGT, // Tmux right + MCV_B, // Vim begin of line + MCV_E, // Vim end of line + MCT_F, // Vim for loop + MCG_A, // Git add + MCG_C, // Git commit + MCG_P, // Git push + MCG_R, // Git revert + MCG_L, // Git log + MCG_S, // Git status + + NEW_SAFE_RANGE // use "NEWPLACEHOLDER for keymap specific codes +}; + +bool process_record_secrets(uint16_t keycode, keyrecord_t *record); +bool process_record_keymap( uint16_t keycode, keyrecord_t *record); + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define ADJUST MO(_ADJUST) +#define TG_MODS TG(_MODS) +#define OS_LWR OSL(_LOWER) +#define OS_RSE OSL(_RAISE) +#define OS_UNI OSL(_UNICODE) + +#define KC_SEC1 KC_SECRET_1 +#define KC_SEC2 KC_SECRET_2 +#define KC_SEC3 KC_SECRET_3 +#define KC_SEC4 KC_SECRET_4 +#define KC_SEC5 KC_SECRET_5 + +#define QWERTY KC_QWERTY +#define DVORAK KC_DVORAK +#define COLEMAK KC_COLEMAK +#define WORKMAN KC_WORKMAN +#define UNICODE KC_UNICODE + +#define KC_RESET RESET +#define KC_RST KC_RESET + +#define BK_LWER LT(_LOWER, KC_BSPC) +#define SP_LWER LT(_LOWER, KC_SPC) +#define DL_RAIS LT(_RAISE, KC_DEL) +#define ET_RAIS LT(_RAISE, KC_ENTER) + +/* OSM keycodes, to keep things clean and easy to change */ +#define KC_MLSF OSM(MOD_LSFT) +#define KC_MRSF OSM(MOD_RSFT) + +#define OS_LGUI OSM(MOD_LGUI) +#define OS_RGUI OSM(MOD_RGUI) +#define OS_LSFT OSM(MOD_LSFT) +#define OS_RSFT OSM(MOD_RSFT) +#define OS_LCTL OSM(MOD_LCTL) +#define OS_RCTL OSM(MOD_RCTL) +#define OS_LALT OSM(MOD_LALT) +#define OS_RALT OSM(MOD_RALT) +#define OS_MEH OSM(MOD_MEH) +#define OS_HYPR OSM(MOD_HYPR) + +#define ALT_APP ALT_T(KC_APP) + +#define UC_IRNY UC(0x2E2E) +#define UC_CLUE UC(0x203D) diff --git a/users/yet-another-developer/rules.mk b/users/yet-another-developer/rules.mk new file mode 100644 index 000000000000..597df6d0b93c --- /dev/null +++ b/users/yet-another-developer/rules.mk @@ -0,0 +1,50 @@ +SRC += yet-another-developer.c \ + process_records.c + +LINK_TIME_OPTIMIZATION_ENABLE = yes +SPACE_CADET_ENABLE = no + +ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) + SRC += tap_dances.c +endif + +ifeq ($(strip $(COMBO_ENABLE)), yes) + SRC += combo.c +endif + + +ifeq ($(strip $(LEADER_ENABLE)), yes) + SRC += leader.c +endif + + +ifneq ("$(wildcard $(USER_PATH)/secrets.c)","") + SRC += secrets.c +endif + + +ifeq ($(strip $(NO_SECRETS)), yes) + OPT_DEFS += -DNO_SECRETS +endif + + +ifeq ($(strip $(UNICODEMAP_ENABLE)), yes) + SRC += unicode.c +endif + + +ifeq ($(strip $(MACROS_ENABLED)), yes) + OPT_DEFS += -DMACROS_ENABLED +endif + + +ifdef CONSOLE_ENABLE + ifeq ($(strip $(KEYLOGGER_ENABLE)), yes) + OPT_DEFS += -DKEYLOGGER_ENABLE + endif +endif + + +ifeq ($(strip $(MAKE_BOOTLOADER)), yes) + OPT_DEFS += -DMAKE_BOOTLOADER +endif diff --git a/users/yet-another-developer/tap_dances.c b/users/yet-another-developer/tap_dances.c new file mode 100644 index 000000000000..66dcc60fa5bd --- /dev/null +++ b/users/yet-another-developer/tap_dances.c @@ -0,0 +1,55 @@ +#include "tap_dances.h" + +void td_parenthesis (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { +// SEND_STRING ("\("); + tap_code(KC_QUOT); + reset_tap_dance (state); + } + else if (state->count == 2) { + SEND_STRING("()" SS_TAP(X_LEFT)); + reset_tap_dance (state); + } + else if (state->count == 3) { + SEND_STRING("[]" SS_TAP(X_LEFT)); + reset_tap_dance (state); + } + else if (state->count == 4) { + SEND_STRING("{}" SS_TAP(X_LEFT)); + reset_tap_dance (state); + } + else if (state->count >= 5) { + SEND_STRING("<>" SS_TAP(X_LEFT)); + reset_tap_dance (state); + } +} + +void safe_reset(qk_tap_dance_state_t *state, void *user_data) { + if (state->count >= 3) { + // Reset the keyboard if you tap the key more than three times + reset_keyboard(); + reset_tap_dance(state); + } +} + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_RESET] = ACTION_TAP_DANCE_FN(safe_reset), + [TD_NUM1] = ACTION_TAP_DANCE_DOUBLE(KC_1, KC_4), + [TD_NUM2] = ACTION_TAP_DANCE_DOUBLE(KC_2, KC_5), + [TD_NUM3] = ACTION_TAP_DANCE_DOUBLE(KC_3, KC_6), + [TD_QT1] = ACTION_TAP_DANCE_DOUBLE(KC_QUOT, MC_QT1), + [TD_QT2] = ACTION_TAP_DANCE_DOUBLE(LSFT(KC_QUOT), MC_QT2), + [TD_QT3] = ACTION_TAP_DANCE_DOUBLE(KC_GRV, MC_QT3), + + [TD_EOL] = ACTION_TAP_DANCE_DOUBLE(KC_E, MC_EOL), // end of line + [TD_BOL] = ACTION_TAP_DANCE_DOUBLE(KC_A, MC_BOL), // beginning of line + [TD_NW] = ACTION_TAP_DANCE_DOUBLE(KC_F, MC_NW), // next word + [TD_PW] = ACTION_TAP_DANCE_DOUBLE(KC_B, MC_PW), // pevious word + [TD_DW] = ACTION_TAP_DANCE_DOUBLE(KC_W, MC_DW), // pevious word + + [TD_SPC] = ACTION_TAP_DANCE_FN(td_parenthesis), // \(, (), [], {}, <> + [TD_PAR] = ACTION_TAP_DANCE_DOUBLE(KC_LPRN, MC_PAR), // () + [TD_SQR] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, MC_SQR), // [] + [TD_CUR] = ACTION_TAP_DANCE_DOUBLE(LSFT(KC_LCBR), MC_CUR),// {} + [TD_ABR] = ACTION_TAP_DANCE_DOUBLE(LSFT(KC_COMM), MC_ABR),// +}; diff --git a/users/yet-another-developer/tap_dances.h b/users/yet-another-developer/tap_dances.h new file mode 100644 index 000000000000..8afda817cb41 --- /dev/null +++ b/users/yet-another-developer/tap_dances.h @@ -0,0 +1,26 @@ +#pragma once +#include "yet-another-developer.h" + +#ifdef TAP_DANCE_ENABLE +enum { + TD_RESET = 0, + TD_SPC, // for special function td_parenthesis testing + TD_NUM1, // compact gaming numpad + TD_NUM2, // + TD_NUM3, // + TD_TMX, // tmux control sequence + TD_EOL, // end of line + TD_BOL, // beginning of line + TD_NW, // next word + TD_PW, // pevious word + TD_DW, // delete word + TD_QT1, // single double quote for ' + TD_QT2, // single double quote for " + TD_QT3, // single double quote for ` + TD_PAR, // single double parenthesis + TD_CUR, // single double curly braces + TD_SQR, // single double square brackets + TD_ABR // single double angle brackets +}; +#endif // TAP_DANCE_ENABLE +void td_parenthesis (qk_tap_dance_state_t *state, void *user_data); diff --git a/users/yet-another-developer/unicode.c b/users/yet-another-developer/unicode.c new file mode 100644 index 000000000000..8b312deb6613 --- /dev/null +++ b/users/yet-another-developer/unicode.c @@ -0,0 +1,62 @@ +#include "unicode.h" + +//#ifdef UNICODEMAP_ENABLE +const uint32_t PROGMEM unicode_map[] = { + [BANG] = 0x0203D,// ‽ + [IRONY] = 0x02E2E,// ⸮ + [DEGREE] = 0x000B0,// ° + [THINK] = 0x1F914,// 🤔 + [GRIN] = 0x1F600,// � + [MONOCL] = 0x1F9D0,// 🧐 + [DRUG0] = 0x1F92A,// 🤪 + [DRUG1] = 0x1F974,// 🥴 + [CLOWN] = 0x1F921,// 🤡 + [MNDBLWN] = 0x1F92F,// 🤯 + [MONEY] = 0x1F911,// 🤑 + [SHTUP] = 0x1F910,// 🤐 + [PARTY] = 0x1F973,// 🥳 + [SMRK] = 0x1F60F,// 😏 + [WEARY] = 0x1F629,// 😩 + [UNAMU] = 0x1F612,// 😒 + [SPY] = 0x1F575,//🕵 + [DAFUQ] = 0x1F47A,// 👺 + [FIST0] = 0x1F91B,// 🤛 + [FIST1] = 0x1F91C,// 🤜 + [FIST2] = 0x270A, // ✊ + [FIST3] = 0x1F44A,// 👊 + [WIFIHAND] = 0x1F44B,// 👋 + [OKOK] = 0x1F44C,// 👌 + [EFFU] = 0x1F595,// 🖕 + [SPOCK] = 0x1F596,// 🖖 + [INUP] = 0x1F446,// 👆 + [THDN] = 0x1F44E,// 👎 + [THUP] = 0x1F44D,// 👍 + [TUMBLER] = 0x1F943,// 🥃 + [DRAGON0] = 0x1F409,// 🐉 + [DRAGON1] = 0x1F432,// 🐲 + [TIGER0] = 0x1F405,// 🐅 + [TIGER1] = 0x1F42F,// 🐯 + [COOL] = 0x1F192,// 🆒 + [UCHART] = 0x1F4C8,// 📈 + [DCHART] = 0x1F4C9,// 📉 + [BCHART] = 0x1F4CA,// 📊 + [NOPRCY] = 0x1F572,// 🕲 + [PRCY] = 0x1F571,// 🕱 + [BBB] = 0x1F171,// 🅱 + [POO] = 0x1F4A9,// 💩 + [HUNDR] = 0x1F4AF,// 💯 + [EGGPL] = 0x1F346,// 🍆 + [WATER] = 0x1F4A6,// 💦 + [LIT] = 0x1F525,// 🔥 + [SNEK] = 0x1F40D,// 🐍 + [PENGUIN] = 0x1F427,// 🐧 + [BOAR] = 0x1F417,// 🐗 + [MONKEY] = 0x1F412,// 🐒 + [CHICK] = 0x1F425,// 🐥 + [DASH] = 0x1F4A8,// 💨 + [DIZZY] = 0x1F4AB,// 💫 + [KEEB] = 0x1F5AE,// 🖮 + [HOLE] = 0x1F573,// 🕳 + [SAUCER] = 0x1F6F8// 🛸 + }; +//#endif // UNICODEMAP_ENABLE diff --git a/users/yet-another-developer/unicode.h b/users/yet-another-developer/unicode.h new file mode 100644 index 000000000000..cb550243eea7 --- /dev/null +++ b/users/yet-another-developer/unicode.h @@ -0,0 +1,67 @@ +#pragma once + +#include "quantum.h" + +void send_unicode_hex_string(const char* str); + +/* use X(n) to call the */ +#ifdef UNICODEMAP_ENABLE +enum unicode_name { +OKOK, // +BANG, // ‽ +IRONY, // ⸮ +DEGREE, // ° +THINK, // 🤔 +GRIN, // � +MONOCL, // 🧐 +DRUG0, // 🤪 +DRUG1, // 🥴 +CLOWN, // 🤡 +MNDBLWN, // 🤯 +MONEY, // 🤑 +SHTUP, // 🤐 +PARTY, // 🥳 +SMRK, // 😏 +WEARY, // 😩 +UNAMU, // 😒 +SPY, // 🕵 +DAFUQ, // 👺 +FIST0, // 🤛 +FIST1, // 🤜 +FIST2, // ✊ +FIST3, // 👊 +WIFIHAND, // 👌 +EFFU, // 🖕 +SPOCK, // 🖖 +INUP, // 👆 +THDN, // 👎 +THUP, // 👍 +TUMBLER, // 🥃 +DRAGON0, // 🐉 +DRAGON1, // 🐅 +TIGER0, // 🐅 +TIGER1, // 🐯 +COOL, // 🆒 +UCHART, // 📈 +DCHART, // 📉 +BCHART, // 📊 +NOPRCY, // 🕲 +PRCY, // 🕱 +BBB, // 🅱 +POO, // 💩 +HUNDR, // 💯 +EGGPL, // 🍆 +WATER, // 💦 +LIT, // 🔥 +SNEK, // 🐍 +PENGUIN, // 🐧 +BOAR, // 🐗 +MONKEY, // 🐒 +CHICK, // 🐥 +DASH, // 💨 +DIZZY, // 💫 +KEEB, // 🖮 +HOLE, // 🕳 +SAUCER // 🛸 +}; +#endif diff --git a/users/yet-another-developer/wrappers.h b/users/yet-another-developer/wrappers.h new file mode 100644 index 000000000000..cd21032a4ecc --- /dev/null +++ b/users/yet-another-developer/wrappers.h @@ -0,0 +1,166 @@ +#pragma once +#include "yet-another-developer.h" + +/* +Since our quirky block definitions are basically a list of comma separated +arguments, we need a wrapper in order for these definitions to be +expanded before being used as arguments to the LAYOUT_xxx macro. +*/ +#if (!defined(LAYOUT) && defined(KEYMAP)) +# define LAYOUT KEYMAP +#endif + +// clang-format off + +#define KEYMAP_wrapper(...) LAYOUT(__VA_ARGS__) +#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__) +#define LAYOUT_ortho_5x14_wrapper(...) LAYOUT_ortho_5x14(__VA_ARGS__) + +/* ---------- LEFT HAND ----------- ---------- RIGHT HAND ---------- */ +#define LAYOUT_ergodash_pretty( \ + L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ + L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ + L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ + L30, L31, L32, L33, L34, L35, R31, R32, R33, R34, R35, R36, \ + L40, L41, L42, L43, R43, R44, R45, R46, \ + L36, R30, \ + L44, L45, L46, R40, R41, R42 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05, L06 }, \ + { L10, L11, L12, L13, L14, L15, L16 }, \ + { L20, L21, L22, L23, L24, L25, L26 }, \ + { L30, L31, L32, L33, L34, L35, L36 }, \ + { L40, L41, L42, L43, L44, L45, L46 }, \ + { R06, R05, R04, R03, R02, R01, R00 }, \ + { R16, R15, R14, R13, R12, R11, R10 }, \ + { R26, R25, R24, R23, R22, R21, R20 }, \ + { R36, R35, R34, R33, R32, R31, R30 }, \ + { R46, R45, R44, R43, R42, R41, R40 } \ + } + +/* +Blocks for each of the four major keyboard layouts +Organized so we can quickly adapt and modify all of them +at once, rather than for each keyboard, one at a time. +And this allows for much cleaner blocks in the keymaps. +For instance Tap/Hold for Control on all of the layouts + +NOTE: These are all the same length. If you do a search/replace + then you need to add/remove underscores to keep the + lengths consistent. +*/ + +#define _________________QWERTY_L1_________________ KC_Q, KC_W, KC_E, KC_R, KC_T +#define _________________QWERTY_L2_________________ KC_A, KC_S, KC_D, KC_F, KC_G +#define _________________QWERTY_L3_________________ KC_Z, KC_X, KC_C, KC_V, KC_B + +#define _________________QWERTY_R1_________________ KC_Y, KC_U, KC_I, KC_O, KC_P +#define _________________QWERTY_R2_________________ KC_H, KC_J, KC_K, KC_L, KC_SCLN +#define _________________QWERTY_R3_________________ KC_N, KC_M, KC_COMM, KC_DOT, KC_SLASH + + +#ifdef TAP_DANCE_ENABLE + #define _________________COLEMAK_L1________________ KC_Q, KC_W, KC_F, KC_P, KC_G + #define _________________COLEMAK_L2________________ KC_BOL, KC_R, KC_S, KC_T, KC_D + #define _________________COLEMAK_L3________________ KC_Z, KC_X, KC_C, KC_V, KC_B + + #define _________________COLEMAK_R1________________ KC_J, KC_L, KC_U, KC_Y, KC_SCLN + #define _________________COLEMAK_R2________________ KC_H, KC_N, KC_E, KC_I, KC_O + #define _________________COLEMAK_R3________________ KC_K, KC_M, KC_COMM, KC_DOT, KC_SLASH +#else + #define _________________COLEMAK_L1________________ KC_Q, KC_W, KC_F, KC_P, KC_G + #define _________________COLEMAK_L2________________ KC_A, KC_R, KC_S, KC_T, KC_D + #define _________________COLEMAK_L3________________ KC_Z, KC_X, KC_C, KC_V, KC_B + + #define _________________COLEMAK_R1________________ KC_J, KC_L, KC_U, KC_Y, KC_SCLN + #define _________________COLEMAK_R2________________ KC_H, KC_N, KC_E, KC_I, KC_O + #define _________________COLEMAK_R3________________ KC_K, KC_M, KC_COMM, KC_DOT, KC_SLASH +#endif + + + + +#define _________________DVORAK_L1_________________ KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y +#define _________________DVORAK_L2_________________ KC_A, KC_O, KC_E, KC_U, KC_I +#define _________________DVORAK_L3_________________ KC_SCLN, KC_Q, KC_J, KC_K, KC_X + +#define _________________DVORAK_R1_________________ KC_F, KC_G, KC_C, KC_R, KC_L +#define _________________DVORAK_R2_________________ KC_D, KC_H, KC_T, KC_N, KC_S +#define _________________DVORAK_R3_________________ KC_B, KC_M, KC_W, KC_V, KC_Z + + +#define _________________WORKMAN_L1________________ KC_Q, KC_D, KC_R, KC_W, KC_B +#define _________________WORKMAN_L2________________ KC_A, KC_S, KC_H, KC_T, KC_G +#define _________________WORKMAN_L3________________ KC_Z, KC_X, KC_M, KC_C, KC_V + +#define _________________WORKMAN_R1________________ KC_J, KC_F, KC_U, KC_P, KC_SCLN +#define _________________WORKMAN_R2________________ KC_Y, KC_N, KC_E, KC_O, KC_I +#define _________________WORKMAN_R3________________ KC_K, KC_L, KC_COMM, KC_DOT, KC_SLASH + +// #define _________________WHITE_R1__________________ KC_V, KC_Y, KC_D, KC_COMM, KC_QUOT +// #define _________________WHITE_R2__________________ KC_A, KC_T, KC_H, KC_E, KC_B +// #define _________________WHITE_R3__________________ KC_P, KC_K, KC_G, KC_W, KC_Q + +// #define _________________WHITE_L1__________________ KC_INT1, KC_J, KC_M, KC_L, KC_U +// #define _________________WHITE_L2__________________ KC_MINS, KC_C, KC_S, KC_N, KC_O // KC_I +// #define _________________WHITE_L3__________________ KC_X, KC_R, KC_F, KC_DOT, KC_Z + + +#ifdef UNICODE_ENABLE +#define _______________UNICODE_L1__________________ UC_DISA,UC_DISA, UC_DISA, UC_DISA, UC_DISA +#define _______________UNICODE_L2__________________ UC_DISA,UC_DISA, UC_DISA, UC_DISA, UC_DISA +#define _______________UNICODE_L3__________________ UC_DISA,UC_DISA, UC_DISA, UC_DISA, UC_DISA + +#define _______________UNICODE_R1__________________ UC_SHRG, UC_SHRG, UC_SHRG, UC_SHRG, UC_SHRG +#define _______________UNICODE_R2__________________ UC_SHRG, UC_SHRG, UC_SHRG, UC_SHRG, UC_SHRG +#define _______________UNICODE_R3__________________ UC_SHRG, UC_SHRG, UC_SHRG, UC_SHRG, UC_SHRG +#endif + +#ifdef UNICODEMAP_ENABLE +#define _______________UNICODE_L1__________________ X(SMRK), X(THINK), X(CLOWN), X(HUNDR), X(BANG) +#define _______________UNICODE_L2__________________ X(GRIN), X(MONKEY), X(OKOK), X(EGGPL), X(LIT) +#define _______________UNICODE_L3__________________ X(WEARY), X(UNAMU), X(EFFU), X(MONOCL), X(IRONY) + +#define _______________UNICODE_R1__________________ X(DRUG0), X(THUP), X(INUP), X(DIZZY), X(COOL) +#define _______________UNICODE_R2__________________ X(FIST0), X(FIST2),X(FIST3),X(FIST1), X(OKOK) +#define _______________UNICODE_R3__________________ X(MNDBLWN), X(THDN), X(SPOCK),X(HOLE), X(DASH) +#endif + +#define ________________NUMBER_LEFT________________ KC_1, KC_2, KC_3, KC_4, KC_5 +#define ________________NUMBER_RIGHT_______________ KC_6, KC_7, KC_8, KC_9, KC_0 +#define _________________FUNC_LEFT_________________ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5 +#define _________________FUNC_RIGHT________________ KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 + +#define ___________________BLANK___________________ _______, _______, _______, _______, _______ + + +#define _________________LOWER_L1__________________ KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC +#define _________________LOWER_L2__________________ _________________FUNC_LEFT_________________ +#define _________________LOWER_L3__________________ _________________FUNC_RIGHT________________ + +#define _________________LOWER_R1__________________ KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN +#define _________________LOWER_R2__________________ OS_UNI, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR +#define _________________LOWER_R3__________________ _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + + + +#define _________________RAISE_L1__________________ ________________NUMBER_LEFT________________ +#define _________________RAISE_L2__________________ ___________________BLANK___________________ +#define _________________RAISE_L3__________________ ___________________BLANK___________________ + +#define _________________RAISE_R1__________________ ________________NUMBER_RIGHT_______________ +#define _________________RAISE_R2__________________ _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC +#define _________________RAISE_R3__________________ _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END + + + +#define _________________ADJUST_L1_________________ ___________________BLANK___________________ +#define _________________ADJUST_L2_________________ _________________FUNC_LEFT_________________ +#define _________________ADJUST_L3_________________ _______, QWERTY, COLEMAK, DVORAK, WORKMAN + +#define _________________ADJUST_R1_________________ KC_SEC1, KC_SEC2, KC_SEC3, KC_SEC4, KC_SEC5 +#define _________________ADJUST_R2_________________ _________________FUNC_RIGHT________________ +#define _________________ADJUST_R3_________________ KC_MUTE, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT + +// clang-format on diff --git a/users/yet-another-developer/yet-another-developer.c b/users/yet-another-developer/yet-another-developer.c new file mode 100644 index 000000000000..b729c0621943 --- /dev/null +++ b/users/yet-another-developer/yet-another-developer.c @@ -0,0 +1,160 @@ +#include "quantum.h" +#include "yet-another-developer.h" + +userspace_config_t userspace_config; + +#if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE)) + #define YAD_UNICODE_MODE UC_WIN +#else +// set to 2 for UC_WIN, set to 4 for UC_WINC + #define YAD_UNICODE_MODE 2 +#endif + + +bool mod_key_press_timer(uint16_t code, uint16_t mod_code, bool pressed) { + static uint16_t this_timer; + if (pressed) { + this_timer = timer_read(); + } else { + if (timer_elapsed(this_timer) < TAPPING_TERM) { + tap_code(code); + } else { + register_code(mod_code); + tap_code(code); + unregister_code(mod_code); + } + } + return false; +} + +bool mod_key_press(uint16_t code, uint16_t mod_code, bool pressed, uint16_t this_timer) { + if (pressed) { + this_timer = timer_read(); + } else { + if (timer_elapsed(this_timer) < TAPPING_TERM) { + tap_code(code); + } else { + register_code(mod_code); + tap_code(code); + unregister_code(mod_code); + } + } + return false; +} + +// Add reconfigurable functions here, for keymap customization +// This allows for a global, userspace functions, and continued +// customization of the keymap. Use _keymap instead of _user +// functions in the keymaps +__attribute__ ((weak)) +void matrix_init_keymap(void) {} + +// Call user matrix init, set default RGB colors and then +// call the keymap's init function +void matrix_init_user(void) { + userspace_config.raw = eeconfig_read_user(); + + #if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE)) + set_unicode_input_mode(YAD_UNICODE_MODE); + get_unicode_input_mode(); + #endif //UNICODE_ENABLE + + matrix_init_keymap(); +} + +__attribute__((weak)) +void keyboard_post_init_keymap(void) {} + +void keyboard_post_init_user(void) { +#ifdef RGBLIGHT_ENABLE + keyboard_post_init_rgb(); +#endif + keyboard_post_init_keymap(); +} + +__attribute__((weak)) +void suspend_power_down_keymap(void) {} + +void suspend_power_down_user(void) { + suspend_power_down_keymap(); +} + +__attribute__((weak)) +void suspend_wakeup_init_keymap(void) {} + +void suspend_wakeup_init_user(void) { + suspend_wakeup_init_keymap(); +} + +__attribute__((weak)) +void matrix_scan_keymap(void) {} + +__attribute__ ((weak)) +void matrix_scan_user(void){ + +#ifdef TAP_DANCE_ENABLE // Run Diablo 3 macro checking code. +// run_diablo_macro_check(); +#endif // TAP_DANCE_ENABLE + +#ifdef RGBLIGHT_ENABLE + matrix_scan_rgb(); +#endif // RGBLIGHT_ENABLE + + matrix_scan_keymap(); +} + +__attribute__((weak)) +layer_state_t layer_state_set_keymap(layer_state_t state) { + return state; +} + +// on layer change, no matter where the change was initiated +// Then runs keymap's layer change check +layer_state_t layer_state_set_user(layer_state_t state) { + state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); +#ifdef RGBLIGHT_ENABLE + state = layer_state_set_rgb(state); +#endif // RGBLIGHT_ENABLE + return layer_state_set_keymap(state); +} + +__attribute__((weak)) +layer_state_t default_layer_state_set_keymap(layer_state_t state) { + return state; +} + +// Runs state check and changes underglow color and animation +layer_state_t default_layer_state_set_user(layer_state_t state) { + state = default_layer_state_set_keymap(state); +#if 0 +#ifdef RGBLIGHT_ENABLE + state = default_layer_state_set_rgb(state); +#endif // RGBLIGHT_ENABLE +#endif + return state; +} + +__attribute__ ((weak)) +void led_set_keymap(uint8_t usb_led) {} + +// Any custom LED code goes here. +// So far, I only have keyboard specific code, +// So nothing goes here. +void led_set_user(uint8_t usb_led) { + led_set_keymap(usb_led); +} + +__attribute__ ((weak)) +void eeconfig_init_keymap(void) {} + +void eeconfig_init_user(void) { + userspace_config.raw = 0; + userspace_config.rgb_layer_change = true; + eeconfig_update_user(userspace_config.raw); + #if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE)) + set_unicode_input_mode(YAD_UNICODE_MODE); + get_unicode_input_mode(); + #else + eeprom_update_byte(EECONFIG_UNICODEMODE, YAD_UNICODE_MODE); + #endif +} diff --git a/users/yet-another-developer/yet-another-developer.h b/users/yet-another-developer/yet-another-developer.h new file mode 100644 index 000000000000..e0d02f707f95 --- /dev/null +++ b/users/yet-another-developer/yet-another-developer.h @@ -0,0 +1,87 @@ +#pragma once +#include "quantum.h" +#include "version.h" +#include "eeprom.h" +#include "wrappers.h" +#include "process_records.h" + +#ifdef TAP_DANCE_ENABLE + #include "tap_dances.h" + #define KC_TMX TD(TD_TMX) // tap1: 't' tap2: +b + #define KC_EOL TD(TD_EOL) // tap1: 'e' tap2: +e + #define KC_BOL TD(TD_BOL) // tap1: 'a' tap2: +a + #define KC_NW TD(TD_NW) // tap1: 'f' tap2: +f + #define KC_PW TD(TD_PW) // tap1: 'b' tap2: +b + #define KC_DW TD(TD_DW) // tap1: 'w' tap2: +w +#endif //!TAP_DANCE_ENABLE +#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) + #include "rgb_stuff.h" +#endif +#if defined(UNICODEMAP_ENABLE) || defined(UNICODE_ENABLE) + #include "unicode.h" +#endif //!UNICODE_ENABLE + +#define MC_BOL LCTL(KC_A) // jump to beginning of line +#define MC_EOL LCTL(KC_E) // jump to end of line +#define MC_NW LALT(KC_F) // next word +#define MC_PW LALT(KC_B) // previous word +#define MC_DW LCTL(KC_W) // delete word + +/* Define layer names */ +enum userspace_layers { + _QWERTY = 0, + _NUMLOCK = 0, + _COLEMAK, + _DVORAK, + _WORKMAN, + _UNICODE, + _MODS, /* layer 8 */ + _MACROS, + _MEDIA, + _LOWER, + _RAISE, + _ADJUST, +}; + +bool mod_key_press_timer(uint16_t code, uint16_t mod_code, bool pressed); +bool mod_key_press(uint16_t code, uint16_t mod_code, bool pressed, uint16_t this_timer); +void matrix_init_keymap(void); +void suspend_power_down_keymap(void); +void suspend_wakeup_init_keymap(void); +void matrix_scan_keymap(void); +layer_state_t layer_state_set_keymap(layer_state_t state); +layer_state_t default_layer_state_set_keymap(layer_state_t state); +void led_set_keymap(uint8_t usb_led); +void eeconfig_init_keymap(void); + +typedef union { + uint32_t raw; + struct { + bool rgb_layer_change :1; + bool is_overwatch :1; + bool nuke_switch :1; + uint8_t unicode_mod :4; + bool swapped_numbers :1; + }; +} userspace_config_t; + +extern userspace_config_t userspace_config; + +/* +Custom Keycodes for Diablo 3 layer +But since TD() doesn't work when tap dance is disabled +We use custom codes here, so we can substitute the right stuff +*/ +#ifdef TAP_DANCE_ENABLE +#define KC_D3_1 TD(TD_D3_1) +#define KC_D3_2 TD(TD_D3_2) +#define KC_D3_3 TD(TD_D3_3) +#define KC_D3_4 TD(TD_D3_4) +#else // TAP_DANCE_ENABLE +#define KC_D3_1 KC_1 +#define KC_D3_2 KC_2 +#define KC_D3_3 KC_3 +#define KC_D3_4 KC_4 +#endif // TAP_DANCE_ENABLE + + From 4c90277236395e076afa57bb11b83c80fdbf381e Mon Sep 17 00:00:00 2001 From: Reid Sox-Harris Date: Sun, 20 Oct 2019 11:12:23 -0700 Subject: [PATCH 137/316] [Keymap] add iris/eosti keymap (#7056) --- keyboards/keebio/iris/keymaps/eosti/config.h | 28 +++++ keyboards/keebio/iris/keymaps/eosti/keymap.c | 101 ++++++++++++++++++ keyboards/keebio/iris/keymaps/eosti/readme.md | 11 ++ keyboards/keebio/iris/keymaps/eosti/rules.mk | 2 + 4 files changed, 142 insertions(+) create mode 100644 keyboards/keebio/iris/keymaps/eosti/config.h create mode 100644 keyboards/keebio/iris/keymaps/eosti/keymap.c create mode 100644 keyboards/keebio/iris/keymaps/eosti/readme.md create mode 100644 keyboards/keebio/iris/keymaps/eosti/rules.mk diff --git a/keyboards/keebio/iris/keymaps/eosti/config.h b/keyboards/keebio/iris/keymaps/eosti/config.h new file mode 100644 index 000000000000..01bb31a6e14a --- /dev/null +++ b/keyboards/keebio/iris/keymaps/eosti/config.h @@ -0,0 +1,28 @@ +/* +Copyright 2017 Danny Nguyen + +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 . +*/ + +#pragma once + +// #define USE_I2C +#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 diff --git a/keyboards/keebio/iris/keymaps/eosti/keymap.c b/keyboards/keebio/iris/keymaps/eosti/keymap.c new file mode 100644 index 000000000000..34f75120270a --- /dev/null +++ b/keyboards/keebio/iris/keymaps/eosti/keymap.c @@ -0,0 +1,101 @@ +#include QMK_KEYBOARD_H + +enum layer_names { + _QWERTY, + _GAME, + _UPPER, + _LOWER +}; + +enum custom_keycodes { + TMUX_WN = SAFE_RANGE, + TMUX_WL +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case TMUX_WN: + if (record->event.pressed) { + SEND_STRING(SS_LCTRL("a") "n"); + } + break; + + case TMUX_WL: + if (record->event.pressed) { + SEND_STRING(SS_LCTRL("a") "l"); + } + break; + + } + return true; +}; + +#define UPPER MO(_UPPER) +#define LOWER MO(_LOWER) +#define GAME TG(_GAME) + +#define WM_R LCTL(KC_RGHT) +#define WM_L LCTL(KC_LEFT) +#define WM_MC LCTL(KC_UP) +#define WEB_R LGUI(KC_RCBR) +#define WEB_L LGUI(KC_LCBR) +#define TMUX_ESC LCTL(KC_A) +#define TMUX_U RALT(KC_UP) +#define TMUX_D RALT(KC_DOWN) +#define TMUX_R RALT(KC_RGHT) +#define TMUX_L RALT(KC_LEFT) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + KC_GRV , KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LCTL, KC_RALT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_BSPC, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + KC_LGUI, UPPER, KC_ENT, KC_SPC, LOWER, KC_NO + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ), + [_GAME] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + _______, _______, KC_SPC, KC_ENT, _______, _______ + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ), + [_UPPER] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + KC_TILD, KC_EXLM, KC_AT , KC_HASH, KC_DLR , KC_PERC, KC_CIRC , KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PLUS, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + TMUX_ESC, KC_NO, KC_NO, KC_NO, WEB_L, WEB_R, TMUX_L, TMUX_D, TMUX_U, TMUX_R, KC_NO, KC_BSLS, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, KC_NO, KC_VOLU, WM_MC, WM_L, WM_R, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_PGUP, KC_NO, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______, KC_MUTE, KC_VOLD, KC_LBRC, KC_LPRN, KC_LCBR,_______, _______, KC_RCBR, KC_RPRN, KC_RBRC, KC_NO, KC_PGDN,_______, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + _______, _______, _______, _______, KC_NO, _______ + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ), + [_LOWER] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, KC_NO, KC_INS, KC_HOME, KC_PGUP, KC_NO, GAME, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, KC_SLEP, KC_DEL, KC_END, KC_PGDN, KC_NO, KC_NO, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______, TMUX_WL, TMUX_WN,_______, KC_LBRC, KC_LPRN, KC_LCBR, _______, KC_RCBR, KC_RPRN, KC_RBRC, KC_NO, KC_NO, _______, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + _______, KC_NO, _______, _______, _______, _______ + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ) +}; diff --git a/keyboards/keebio/iris/keymaps/eosti/readme.md b/keyboards/keebio/iris/keymaps/eosti/readme.md new file mode 100644 index 000000000000..0fc61a443c25 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/eosti/readme.md @@ -0,0 +1,11 @@ +# EosTi's Iris Layout + +## Features + +- QWERTY base layer with right thumb space and left thumb enter +- Gaming layer to swap enter and space so that WASD and space can all be on the same hand +- MacOS navigation keys for switching windows and entering Mission Control +- Google Chrome navigation keys for cycling tabs +- HJKL arrow keys +- tmux navigation keys for switching focus, panes, and the leader key +- Probably other stuff too? diff --git a/keyboards/keebio/iris/keymaps/eosti/rules.mk b/keyboards/keebio/iris/keymaps/eosti/rules.mk new file mode 100644 index 000000000000..d7463419b4fe --- /dev/null +++ b/keyboards/keebio/iris/keymaps/eosti/rules.mk @@ -0,0 +1,2 @@ +RGBLIGHT_ENABLE = yes +BACKLIGHT_ENABLE = yes From a4c008fe90940169abb653eb17558be205a645a9 Mon Sep 17 00:00:00 2001 From: Romain Gehrig Date: Sun, 20 Oct 2019 20:20:01 +0200 Subject: [PATCH 138/316] [Keymap] Romain's Preonic layout (#7067) * Add customized preonic layout * Add a README detailing a bit the differences from the default preonic layout * Apply suggestions from code review Co-Authored-By: fauxpark * Remove unnecessary end-of-line backslashes * Import fix for startup sound (thanks @drashna) * Remove unnecessary layers and keycodes * Bring back the _QWERTY layer code Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> --- keyboards/preonic/keymaps/cranium/config.h | 38 ++++ keyboards/preonic/keymaps/cranium/keymap.c | 224 ++++++++++++++++++++ keyboards/preonic/keymaps/cranium/readme.md | 72 +++++++ keyboards/preonic/keymaps/cranium/rules.mk | 1 + 4 files changed, 335 insertions(+) create mode 100644 keyboards/preonic/keymaps/cranium/config.h create mode 100644 keyboards/preonic/keymaps/cranium/keymap.c create mode 100644 keyboards/preonic/keymaps/cranium/readme.md create mode 100644 keyboards/preonic/keymaps/cranium/rules.mk diff --git a/keyboards/preonic/keymaps/cranium/config.h b/keyboards/preonic/keymaps/cranium/config.h new file mode 100644 index 000000000000..6d73958adf85 --- /dev/null +++ b/keyboards/preonic/keymaps/cranium/config.h @@ -0,0 +1,38 @@ +#pragma once + + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PREONIC_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +#endif + +#define MUSIC_MASK (keycode != KC_NO) + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ + +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 diff --git a/keyboards/preonic/keymaps/cranium/keymap.c b/keyboards/preonic/keymaps/cranium/keymap.c new file mode 100644 index 000000000000..d640ff849430 --- /dev/null +++ b/keyboards/preonic/keymaps/cranium/keymap.c @@ -0,0 +1,224 @@ +/* Copyright 2015-2017 Jack Humbert + * + * 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 . + */ + +#include QMK_KEYBOARD_H +#include "muse.h" + +enum preonic_layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST +}; + +enum preonic_keycodes { + LOWER = SAFE_RANGE, + RAISE, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty (base layer) + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Esc | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Esc | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Bksp | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | F12 | GUI | Alt |Lower | Space |Raise |AltGr | [ | ] |Enter | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_preonic_grid( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_ESC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ESC, + KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_BSLS, + KC_LCTL, KC_F12, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_RALT, KC_LBRC, KC_RBRC, KC_ENT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | + | = | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | LGUI | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | 4 | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | _ | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_preonic_grid( + KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_PLUS, KC_EQL, _______, _______, + KC_LGUI, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_1, KC_2, KC_3, KC_4, _______, + _______, _______, _______, _______, _______, KC_UNDS, KC_UNDS, _______, _______, _______, _______, _______ +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | Up | Down | Left |Right | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | Home | End | | | Shift| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | _ | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_preonic_grid( + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UP, KC_DOWN, KC_LEFT, KC_RIGHT,_______, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_HOME, KC_END, _______, _______, KC_RSFT, + _______, _______, _______, _______, _______, KC_UNDS, KC_UNDS, _______, _______, _______, _______, _______ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | Sleep| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Reset| Debug| | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|AudOff|AGnorm|AGswap| Vol+ | Vol- | Prev | Next | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | Play | | | | | PrScr| + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_preonic_grid( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_SLEP, + _______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, _______, + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, KC_VOLU, KC_VOLD, KC_MPRV, KC_MNXT, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, KC_MPLY, KC_MPLY, _______, _______, _______, _______, KC_PSCR +) + + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + } + return true; +}; + +bool muse_mode = false; +uint8_t last_muse_note = 0; +uint16_t muse_counter = 0; +uint8_t muse_offset = 70; +uint16_t muse_tempo = 50; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (muse_mode) { + if (IS_LAYER_ON(_RAISE)) { + if (clockwise) { + muse_offset++; + } else { + muse_offset--; + } + } else { + if (clockwise) { + muse_tempo+=1; + } else { + muse_tempo-=1; + } + } + } else { + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } +} + +void dip_update(uint8_t index, bool active) { + switch (index) { + case 0: + if (active) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + break; + case 1: + if (active) { + muse_mode = true; + } else { + muse_mode = false; + } + } +} + +void matrix_scan_user(void) { + #ifdef AUDIO_ENABLE + if (muse_mode) { + if (muse_counter == 0) { + uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()]; + if (muse_note != last_muse_note) { + stop_note(compute_freq_for_midi_note(last_muse_note)); + play_note(compute_freq_for_midi_note(muse_note), 0xF); + last_muse_note = muse_note; + } + } + muse_counter = (muse_counter + 1) % muse_tempo; + } else { + if (muse_counter) { + stop_all_notes(); + muse_counter = 0; + } + } + #endif +} + +bool music_mask_user(uint16_t keycode) { + switch (keycode) { + case RAISE: + case LOWER: + return false; + default: + return true; + } +} diff --git a/keyboards/preonic/keymaps/cranium/readme.md b/keyboards/preonic/keymaps/cranium/readme.md new file mode 100644 index 000000000000..0f1d99598c98 --- /dev/null +++ b/keyboards/preonic/keymaps/cranium/readme.md @@ -0,0 +1,72 @@ +# Cranium's Preonic layout + +This layout is based on the Preonic default with some changes I find interesting to share. + +## Default layer +``` + ,-----------------------------------------------------------------------------------. + | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Esc | + |------|------|------|------|------|------|------|------|------|------|------|------| + | Tab | Q | W | E | R | T | Y | U | I | O | P | Esc | + |------|------|------|------|------|-------------|------|------|------|------|------| + | Bksp | A | S | D | F | G | H | J | K | L | ; | " | + |------|------|------|------|------|------|------|------|------|------|------|------| + | Shift| Z | X | C | V | B | N | M | , | . | / | | | + |------|------|------|------|------|------|------|------|------|------|------|------| + | Ctrl | F12 | GUI | Alt |Lower | Space |Raise |AltGr | [ | ] |Enter | + `-----------------------------------------------------------------------------------' +``` +- As a Colemak user, Capslock was rebound to Backspace. +- Escape was moved to the top-right of the keyboard +- Enter was moved to the bottom-right of the keyboard. It's now easy to hit and can even be activated with the palm. +- An F12 was put next to the left CTRL => it's the shortcut I use to toggle the Guake terminal. +- I don't really use the key below my Escape (top-right, 2nd row), so I'll consider any ideas for the moment. + + +## Lower +``` + ,-----------------------------------------------------------------------------------. + | ~ | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | + |------|------|------|------|------|-------------|------|------|------|------|------| + | | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + |------|------|------|------|------|-------------|------|------|------|------|------| + | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | + | = | | | + |------|------|------|------|------|------|------|------|------|------|------|------| + | LGUI | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | 4 | | + |------|------|------|------|------|------|------|------|------|------|------|------| + | | | | | | _ | | | | | | + `-----------------------------------------------------------------------------------' +``` +- Not much changes here + +## Raise +``` + ,-----------------------------------------------------------------------------------. + | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | + |------|------|------|------|------|------|------|------|------|------|------|------| + | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | + |------|------|------|------|------|-------------|------|------|------|------|------| + | Del | F1 | F2 | F3 | F4 | F5 | F6 | Up | Down | Left |Right | | + |------|------|------|------|------|------|------|------|------|------|------|------| + | | F7 | F8 | F9 | F10 | F11 | F12 | Home | End | | | Shift| + |------|------|------|------|------|------|------|------|------|------|------|------| + | | | | | | _ | | | | | | + `-----------------------------------------------------------------------------------' +``` +- Perhaps one of the most interesting change: the arrow keys were moved to the right-hand home row, activated with the Raise layer. It means I can use the arrow keys without moving my hand from the home row, by activating the Raise layer with my thumb. It took a while to adapt but it was totally worth it. To note, I also put Home/End on the same layer but one row below, with I also find really useful. + +## Adjust +``` + ,-----------------------------------------------------------------------------------. + | | | | | | | | | | | | Sleep| + |------|------|------|------|------|------|------|------|------|------|------|------| + | | Reset| Debug| | | | | | | | | | + |------|------|------|------|------|-------------|------|------|------|------|------| + | | | |Aud on|AudOff|AGnorm|AGswap| Vol+ | Vol- | Prev | Next | | + |------|------|------|------|------|------|------|------|------|------|------|------| + | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | + |------|------|------|------|------|------|------|------|------|------|------|------| + | | | | | | Play | | | | | PrScr| + `-----------------------------------------------------------------------------------' +``` +- The "arrow" keys act as Vol+/Vol-/Previous/Next on the Adjust layer (which is quite a natural mapping for these media keys). diff --git a/keyboards/preonic/keymaps/cranium/rules.mk b/keyboards/preonic/keymaps/cranium/rules.mk new file mode 100644 index 000000000000..dcf16bef3994 --- /dev/null +++ b/keyboards/preonic/keymaps/cranium/rules.mk @@ -0,0 +1 @@ +SRC += muse.c From a41066beedebefc12245c3eee4bb90116c11f7cd Mon Sep 17 00:00:00 2001 From: Jonathan Rascher Date: Sun, 20 Oct 2019 13:41:36 -0500 Subject: [PATCH 139/316] [Keymap] Assorted personal keymap and layout updates (#7082) * Enable PERMISSIVE_HOLD and TAPPING_FORCE_HOLD * Fix indentation in userspace * Shuffle around more Lily58 symbol keys * Reformat KBD67 keymap and KLE images * Fix Lily58 lower layer image * Reformat Quefrency keymap and KLE images * Fix KBD67 KLE images... again * Add KLE links for Quefrency * Reformat 60% layouts and KLE images * Move Super key back to right half of Lily58 * Move Lily58 ins/del out of the way of numbers * Fix bottom row of Lily58 KLE image --- .../kbd67/hotswap/keymaps/bcat/keymap.c | 17 ++- .../kbd67/hotswap/keymaps/bcat/readme.md | 8 +- .../keebio/quefrency/keymaps/bcat/keymap.c | 17 ++- .../keebio/quefrency/keymaps/bcat/readme.md | 6 +- keyboards/lily58/keymaps/bcat/keymap.c | 14 +-- keyboards/lily58/keymaps/bcat/readme.md | 17 ++- .../60_ansi_split_bs_rshift/bcat/keymap.c | 21 ++-- .../60_ansi_split_bs_rshift/bcat/readme.md | 8 +- .../community/60_tsangan_hhkb/bcat/keymap.c | 21 ++-- .../community/60_tsangan_hhkb/bcat/readme.md | 10 +- users/bcat/config.h | 106 ++++++++++-------- 11 files changed, 140 insertions(+), 105 deletions(-) diff --git a/keyboards/kbdfans/kbd67/hotswap/keymaps/bcat/keymap.c b/keyboards/kbdfans/kbd67/hotswap/keymaps/bcat/keymap.c index 4db53ab0875b..879c97ba7e8a 100644 --- a/keyboards/kbdfans/kbd67/hotswap/keymaps/bcat/keymap.c +++ b/keyboards/kbdfans/kbd67/hotswap/keymaps/bcat/keymap.c @@ -5,25 +5,24 @@ enum layer { LAYER_FUNCTION, }; -/* Switch to function layer when held; send menu key when tappped. */ #define LY_FUNC LT(LAYER_FUNCTION, KC_APP) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Default layer: http://www.keyboard-layout-editor.com/#/gists/dd675b40cc4df2c7bb78847ac29f5988 */ [LAYER_DEFAULT] = LAYOUT( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_HOME, - 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_PGUP, - KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, - 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_UP, KC_END, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, LY_FUNC, KC_LEFT, KC_DOWN, KC_RGHT + 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_PGUP, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + 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_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, LY_FUNC, KC_LEFT, KC_DOWN, KC_RGHT ), /* Function layer: http://www.keyboard-layout-editor.com/#/gists/f29128427f674c43777f045e363d1b44 */ [LAYER_FUNCTION] = LAYOUT( _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, _______, - KC_CAPS, KC_MPLY, KC_VOLU, KC_MSTP, _______, _______, EEP_RST, RESET, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, _______, - _______, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______ + KC_CAPS, KC_MPLY, KC_VOLU, KC_MSTP, _______, _______, EEP_RST, RESET, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, _______, + _______, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ ), }; diff --git a/keyboards/kbdfans/kbd67/hotswap/keymaps/bcat/readme.md b/keyboards/kbdfans/kbd67/hotswap/keymaps/bcat/readme.md index 4f20c24aecbf..f07cf8c1c636 100644 --- a/keyboards/kbdfans/kbd67/hotswap/keymaps/bcat/readme.md +++ b/keyboards/kbdfans/kbd67/hotswap/keymaps/bcat/readme.md @@ -6,8 +6,12 @@ cluster. ## Default layer -![Default layer layout](https://i.imgur.com/iJsG6Z8.png) +![Default layer layout](https://i.imgur.com/QNJ0HhY.png) + +([KLE](http://www.keyboard-layout-editor.com/#/gists/dd675b40cc4df2c7bb78847ac29f5988)) ## Function layer -![Function layer layout](https://i.imgur.com/eRKdeph.png) +![Function layer layout](https://i.imgur.com/VQF5RBy.png) + +([KLE](http://www.keyboard-layout-editor.com/#/gists/f29128427f674c43777f045e363d1b44)) diff --git a/keyboards/keebio/quefrency/keymaps/bcat/keymap.c b/keyboards/keebio/quefrency/keymaps/bcat/keymap.c index 1f3daa85e3e8..7c9699def9d5 100644 --- a/keyboards/keebio/quefrency/keymaps/bcat/keymap.c +++ b/keyboards/keebio/quefrency/keymaps/bcat/keymap.c @@ -5,25 +5,24 @@ enum layer { LAYER_FUNCTION, }; -/* Switch to function layer when held. */ #define LY_FUNC MO(LAYER_FUNCTION) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Default layer: http://www.keyboard-layout-editor.com/#/gists/60a262432bb340b37d364a4424f3037b */ [LAYER_DEFAULT] = LAYOUT_65( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_HOME, - 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_PGUP, - KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, - 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_UP, KC_END, - KC_LCTL, KC_LGUI, KC_LALT, LY_FUNC, KC_SPC, KC_SPC, XXXXXXX, KC_RALT, LY_FUNC, KC_APP, KC_LEFT, KC_DOWN, KC_RGHT + 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_PGUP, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + 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_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, LY_FUNC, KC_SPC, KC_SPC, XXXXXXX, KC_RALT, LY_FUNC, KC_APP, KC_LEFT, KC_DOWN, KC_RGHT ), /* Function layer: http://www.keyboard-layout-editor.com/#/gists/59636898946da51f91fb290f8e078b4d */ [LAYER_FUNCTION] = LAYOUT_65( _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, RGB_HUI, - KC_CAPS, KC_MPLY, KC_VOLU, KC_MSTP, _______, _______, EEP_RST, RESET, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, RGB_SAI, - _______, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_SAD, - _______, _______, KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, RGB_HUD, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_RMOD, RGB_VAD, RGB_MOD + KC_CAPS, KC_MPLY, KC_VOLU, KC_MSTP, _______, _______, EEP_RST, RESET, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, RGB_SAI, + _______, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_SAD, + _______, _______, KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, RGB_HUD, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_RMOD, RGB_VAD, RGB_MOD ), }; diff --git a/keyboards/keebio/quefrency/keymaps/bcat/readme.md b/keyboards/keebio/quefrency/keymaps/bcat/readme.md index 0149d179bd35..3976bb858933 100644 --- a/keyboards/keebio/quefrency/keymaps/bcat/readme.md +++ b/keyboards/keebio/quefrency/keymaps/bcat/readme.md @@ -8,6 +8,10 @@ cluster, and RGB controls in the function layer on the arrow/nav keys. ![Default layer layout](https://i.imgur.com/CU2fxDg.png) +([KLE](http://www.keyboard-layout-editor.com/#/gists/60a262432bb340b37d364a4424f3037b)) + ## Function layer -![Function layer layout](https://i.imgur.com/0mvzXHG.png) +![Function layer layout](https://i.imgur.com/PGCbgtS.png) + +([KLE](http://www.keyboard-layout-editor.com/#/gists/59636898946da51f91fb290f8e078b4d)) diff --git a/keyboards/lily58/keymaps/bcat/keymap.c b/keyboards/lily58/keymaps/bcat/keymap.c index 110ba0d4bac5..67aa3a41438c 100644 --- a/keyboards/lily58/keymaps/bcat/keymap.c +++ b/keyboards/lily58/keymaps/bcat/keymap.c @@ -15,7 +15,7 @@ enum layer { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Default layer: http://www.keyboard-layout-editor.com/#/gists/e0eb3af65961e9fd612dcff3ddd88e4f */ [LAYER_DEFAULT] = LAYOUT( - 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_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KY_CESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC, KC_RBRC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, @@ -25,25 +25,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Lower layer: http://www.keyboard-layout-editor.com/#/gists/19ad0d3b5d745fbb2818db09740f5a11 */ [LAYER_LOWER] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, - _______, _______, _______, _______, _______, _______, KC_PIPE, KC_LCBR, KC_RCBR, KC_UNDS, KC_PLUS, _______, - _______, _______, KC_CAPS, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, KC_BSLS, KC_LBRC, KC_RBRC, KC_MINS, KC_EQL, _______, + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, _______, _______, _______, KC_DEL, _______, KC_TILD, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, _______, _______, _______, KC_INS, _______, _______, _______, KC_GRV, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, _______, _______, _______, _______, _______, _______, _______, _______ ), /* Raise layer: http://www.keyboard-layout-editor.com/#/gists/912be7955f781cdaf692cc4d4c0b5823 */ [LAYER_RAISE] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_HOME, KC_PGUP, - _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, KC_F11, KC_F12, KC_INS, KC_DEL, KC_END, KC_PGDN, + _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, KC_F11, KC_F12, _______, _______, KC_END, KC_PGDN, _______, _______, _______, _______, _______, _______, _______, _______ ), /* Adjust layer: http://www.keyboard-layout-editor.com/#/gists/8f6a3f08350a9bbe1d414b22bca4e6c7 */ [LAYER_ADJUST] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, KC_MPLY, KC_VOLU, KC_MSTP, _______, _______, EEP_RST, RESET, _______, _______, _______, _______, + KC_CAPS, KC_MPLY, KC_VOLU, KC_MSTP, _______, _______, EEP_RST, RESET, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ diff --git a/keyboards/lily58/keymaps/bcat/readme.md b/keyboards/lily58/keymaps/bcat/readme.md index 4b269706a709..ac475c67603c 100644 --- a/keyboards/lily58/keymaps/bcat/readme.md +++ b/keyboards/lily58/keymaps/bcat/readme.md @@ -19,6 +19,11 @@ easy translation to a Crkbd or similar 40% ortho if I go that route. * Home/End and Page Up/Page Down are easy to reach and in a square kind of like on the HHKB. +* Navigation should be usable with just the right hand, to enable left-handed +mousing at the same time. Additionally, Web page scrolling (Space, Shift+Space) +should be possible with just the left hand, for writing at the same time as +scrolling. + * Escape is easy to reach because Vim. * Since most of the modifiers are on the left half, keys frequently pressed @@ -30,30 +35,34 @@ activated by the right thumb. * Backspace is bound in the same place on every layer to avoid having to let go of layer-shift keys to fix a mistake. +* Likewise, the comma and period keys are not rebound on the raise layer to +allow typing numbers with thousand separators and decimal points without +releasing the layer key. + * Brackets and braces are on or near the home row for quick access when coding. * Other than Right Shift (sorry), modifiers aren't rebound on layers. ## Default layer -![Default layer layout](https://i.imgur.com/NjIp4Qr.png) +![Default layer layout](https://i.imgur.com/KlzNei7.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/e0eb3af65961e9fd612dcff3ddd88e4f)) ## Lower layer -![Lower layer layout](https://i.imgur.com/FyioHWW.png) +![Lower layer layout](https://i.imgur.com/zjYwqtv.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/19ad0d3b5d745fbb2818db09740f5a11)) ## Raise layer -![Raise layer layout](https://i.imgur.com/8Mrz4FF.png) +![Raise layer layout](https://i.imgur.com/S7S29G6.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/912be7955f781cdaf692cc4d4c0b5823)) ## Adjust layer -![Adjust layer layout](https://i.imgur.com/FRKNqZp.png) +![Adjust layer layout](https://i.imgur.com/tU72bSZ.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/8f6a3f08350a9bbe1d414b22bca4e6c7)) diff --git a/layouts/community/60_ansi_split_bs_rshift/bcat/keymap.c b/layouts/community/60_ansi_split_bs_rshift/bcat/keymap.c index 0029401e81ab..cd13f6262508 100644 --- a/layouts/community/60_ansi_split_bs_rshift/bcat/keymap.c +++ b/layouts/community/60_ansi_split_bs_rshift/bcat/keymap.c @@ -6,10 +6,7 @@ enum layer { LAYER_ADJUST, }; -/* Switch to function layer when held. */ #define LY_FUNC MO(LAYER_FUNCTION) - -/* Switch to adjust layer when held. */ #define LY_ADJST MO(LAYER_ADJUST) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -17,26 +14,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [LAYER_DEFAULT] = LAYOUT_60_ansi_split_bs_rshift( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, - KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, LY_FUNC, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, LY_ADJST, KC_APP, KC_RCTL + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, LY_FUNC, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, LY_ADJST, KC_APP, KC_RCTL ), /* Function layer: http://www.keyboard-layout-editor.com/#/gists/c7a55e75285d474b6301140eaf53f915 */ [LAYER_FUNCTION] = LAYOUT_60_ansi_split_bs_rshift( _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, KC_CAPS, KC_MPLY, KC_VOLU, KC_MSTP, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, _______, - _______, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, - _______, _______, KC_MUTE, _______, _______, _______, _______, _______, KC_END, KC_PGDN, KC_DOWN, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______ + _______, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, + _______, _______, KC_MUTE, _______, _______, _______, _______, _______, KC_END, KC_PGDN, KC_DOWN, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ ), /* Adjust layer: http://www.keyboard-layout-editor.com/#/gists/6e1068e4f91bbacccaf5ac0acbeec79c */ [LAYER_ADJUST] = LAYOUT_60_ansi_split_bs_rshift( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST, RESET, _______, _______, _______, RGB_VAI, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI, RGB_SAI, RGB_RMOD, RGB_MOD, RGB_TOG, - _______, _______, _______, _______, _______, BL_BRTG, BL_DEC, BL_INC, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______ + _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI, RGB_SAI, RGB_RMOD, RGB_MOD, RGB_TOG, + _______, _______, _______, _______, _______, BL_BRTG, BL_DEC, BL_INC, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ ), }; diff --git a/layouts/community/60_ansi_split_bs_rshift/bcat/readme.md b/layouts/community/60_ansi_split_bs_rshift/bcat/readme.md index 7a5dea7c4b57..f0db6417c074 100644 --- a/layouts/community/60_ansi_split_bs_rshift/bcat/readme.md +++ b/layouts/community/60_ansi_split_bs_rshift/bcat/readme.md @@ -11,10 +11,16 @@ key on the bottom row activates an adjust layer to control RGB underglow. ![Default layer layout](https://i.imgur.com/HM0115k.png) +([KLE](http://www.keyboard-layout-editor.com/#/gists/327b41b5a933b3d44bf60ca9822e85dc)) + ## Function layer -![Function layer layout](https://i.imgur.com/fmvSJJy.png) +![Function layer layout](https://i.imgur.com/XT3AtDl.png) + +([KLE](http://www.keyboard-layout-editor.com/#/gists/c7a55e75285d474b6301140eaf53f915)) ## Adjust layer ![Adjust layer layout](https://i.imgur.com/KxCtI50.png) + +([KLE](http://www.keyboard-layout-editor.com/#/gists/6e1068e4f91bbacccaf5ac0acbeec79c)) diff --git a/layouts/community/60_tsangan_hhkb/bcat/keymap.c b/layouts/community/60_tsangan_hhkb/bcat/keymap.c index 778a2ee54cea..bcc76292ea48 100644 --- a/layouts/community/60_tsangan_hhkb/bcat/keymap.c +++ b/layouts/community/60_tsangan_hhkb/bcat/keymap.c @@ -6,10 +6,7 @@ enum layer { LAYER_ADJUST, }; -/* Switch to function layer when held. */ #define LY_FUNC MO(LAYER_FUNCTION) - -/* Switch to adjust layer when held; send menu key when tapped. */ #define LY_ADJST LT(LAYER_ADJUST, KC_APP) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -17,26 +14,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [LAYER_DEFAULT] = LAYOUT_60_tsangan_hhkb( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, - KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, LY_FUNC, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, LY_ADJST, KC_RCTL + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, LY_FUNC, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, LY_ADJST, KC_RCTL ), /* Function layer: http://www.keyboard-layout-editor.com/#/gists/f6311fd7e315de781143b80eb040a551 */ [LAYER_FUNCTION] = LAYOUT_60_tsangan_hhkb( _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, KC_CAPS, KC_MPLY, KC_VOLU, KC_MSTP, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, _______, - _______, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, - _______, _______, KC_MUTE, _______, _______, _______, _______, _______, KC_END, KC_PGDN, KC_DOWN, _______, _______, - _______, _______, _______, _______, _______, _______, _______ + _______, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, + _______, _______, KC_MUTE, _______, _______, _______, _______, _______, KC_END, KC_PGDN, KC_DOWN, _______, _______, + _______, _______, _______, _______, _______, _______, _______ ), /* Adjust layer: http://www.keyboard-layout-editor.com/#/gists/65ac939caec878401603bc36290852d4 */ [LAYER_ADJUST] = LAYOUT_60_tsangan_hhkb( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST, RESET, _______, _______, _______, RGB_VAI, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI, RGB_SAI, RGB_RMOD, RGB_MOD, RGB_TOG, - _______, _______, _______, _______, _______, BL_BRTG, BL_DEC, BL_INC, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, - _______, _______, _______, _______, _______, _______, _______ + _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI, RGB_SAI, RGB_RMOD, RGB_MOD, RGB_TOG, + _______, _______, _______, _______, _______, BL_BRTG, BL_DEC, BL_INC, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, + _______, _______, _______, _______, _______, _______, _______ ), }; diff --git a/layouts/community/60_tsangan_hhkb/bcat/readme.md b/layouts/community/60_tsangan_hhkb/bcat/readme.md index 75f0dd550f42..2c1979365def 100644 --- a/layouts/community/60_tsangan_hhkb/bcat/readme.md +++ b/layouts/community/60_tsangan_hhkb/bcat/readme.md @@ -7,12 +7,18 @@ key on the bottom row actives an adjust layer to control RGB underglow. ## Default layer -![Default layer layout](https://i.imgur.com/cBYvCOh.png) +![Default layer layout](https://i.imgur.com/et26km2.png) + +([KLE](http://www.keyboard-layout-editor.com/#/gists/86b33d75aa6f56d8781ab3d8475f4e77)) ## Function layer -![Function layer layout](https://i.imgur.com/wZnTnvF.png) +![Function layer layout](https://i.imgur.com/SwUddUV.png) + +([KLE](http://www.keyboard-layout-editor.com/#/gists/f6311fd7e315de781143b80eb040a551)) ## Adjust layer ![Adjust layer layout](https://i.imgur.com/Z6YIxdP.png) + +([KLE](http://www.keyboard-layout-editor.com/#/gists/65ac939caec878401603bc36290852d4)) diff --git a/users/bcat/config.h b/users/bcat/config.h index a0942e9f4f5b..5f49a4ed376a 100644 --- a/users/bcat/config.h +++ b/users/bcat/config.h @@ -8,64 +8,78 @@ #define TAPPING_TERM 250 +/* + * Treat mod-tap keys as holds even if the mod-tap key and the key being + * modified are both relased within TAPPING_TERM. This assumes the mod-tap key + * isn't usually pressed in quick succession with other tapped keys, which is + * good when the tap keycode is something like KC_ESC rather than a letter. + */ +#define PERMISSIVE_HOLD + +/* + * Turn off key repeat support of the tap keycode for tap-hold keys, enabling + * holds to work correctly in quick succession after taps. + */ +#define TAPPING_FORCE_HOLD + #if defined(RGBLIGHT_ENABLE) - /* Turn off RGB underglow when the host goes to sleep. */ - #define RGBLIGHT_SLEEP + /* Turn off RGB underglow when the host goes to sleep. */ + #define RGBLIGHT_SLEEP - /* Keep RGB underglow level increments consistent across keyboards. */ - #undef RGBLIGHT_HUE_STEP - #undef RGBLIGHT_SAT_STEP - #undef RGBLIGHT_VAL_STEP + /* Keep RGB underglow level increments consistent across keyboards. */ + #undef RGBLIGHT_HUE_STEP + #undef RGBLIGHT_SAT_STEP + #undef RGBLIGHT_VAL_STEP - #define RGBLIGHT_HUE_STEP 8 - #define RGBLIGHT_SAT_STEP 17 - #define RGBLIGHT_VAL_STEP 17 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 17 + #define RGBLIGHT_VAL_STEP 17 #endif #if defined(BACKLIGHT_ENABLE) - /* Enable backlight breathing across the board. */ - #define BACKLIGHT_BREATHING + /* Enable backlight breathing across the board. */ + #define BACKLIGHT_BREATHING - /* Keep backlight level increments consistent across keyboards. */ - #undef BACKLIGHT_LEVELS + /* Keep backlight level increments consistent across keyboards. */ + #undef BACKLIGHT_LEVELS - #define BACKLIGHT_LEVELS 7 + #define BACKLIGHT_LEVELS 7 #endif #if defined(MOUSEKEY_ENABLE) - /* Make mouse operation smoother. */ - #undef MOUSEKEY_DELAY - #undef MOUSEKEY_INTERVAL - - #define MOUSEKEY_DELAY 0 - #define MOUSEKEY_INTERVAL 16 - - /* Lower mouse speed to adjust for reduced MOUSEKEY_INTERVAL. */ - #undef MOUSEKEY_MAX_SPEED - #undef MOUSEKEY_TIME_TO_MAX - #undef MOUSEKEY_WHEEL_MAX_SPEED - #undef MOUSEKEY_WHEEL_TIME_TO_MAX - - #define MOUSEKEY_MAX_SPEED 7 - #define MOUSEKEY_TIME_TO_MAX 150 - #define MOUSEKEY_WHEEL_MAX_SPEED 3 - #define MOUSEKEY_WHEEL_TIME_TO_MAX 150 + /* Make mouse operation smoother. */ + #undef MOUSEKEY_DELAY + #undef MOUSEKEY_INTERVAL + + #define MOUSEKEY_DELAY 0 + #define MOUSEKEY_INTERVAL 16 + + /* Lower mouse speed to adjust for reduced MOUSEKEY_INTERVAL. */ + #undef MOUSEKEY_MAX_SPEED + #undef MOUSEKEY_TIME_TO_MAX + #undef MOUSEKEY_WHEEL_MAX_SPEED + #undef MOUSEKEY_WHEEL_TIME_TO_MAX + + #define MOUSEKEY_MAX_SPEED 7 + #define MOUSEKEY_TIME_TO_MAX 150 + #define MOUSEKEY_WHEEL_MAX_SPEED 3 + #define MOUSEKEY_WHEEL_TIME_TO_MAX 150 #endif #if defined(KEYBOARD_cannonkeys_instant60) - /* - * Work around EEPROM incompatibility with VIA: - * /~https://github.com/qmk/qmk_firmware/issues/6589#issuecomment-524042457. - */ - #undef EEPROM_MAGIC_ADDR - #undef EEPROM_VERSION_ADDR - #undef DYNAMIC_KEYMAP_EEPROM_ADDR - #undef EEPROM_CUSTOM_BACKLIGHT - #undef DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR - - #define EEPROM_MAGIC_ADDR 34 - #define EEPROM_VERSION_ADDR 36 - #define DYNAMIC_KEYMAP_EEPROM_ADDR 37 - #define EEPROM_CUSTOM_BACKLIGHT 637 - #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 638 + /* + * Work around EEPROM incompatibility with VIA: + * /~https://github.com/qmk/qmk_firmware/issues/6589#issuecomment-524042457. + */ + #undef EEPROM_MAGIC_ADDR + #undef EEPROM_VERSION_ADDR + #undef DYNAMIC_KEYMAP_EEPROM_ADDR + #undef EEPROM_CUSTOM_BACKLIGHT + #undef DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR + + #define EEPROM_MAGIC_ADDR 34 + #define EEPROM_VERSION_ADDR 36 + #define DYNAMIC_KEYMAP_EEPROM_ADDR 37 + #define EEPROM_CUSTOM_BACKLIGHT 637 + #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 638 #endif From 233a1e9bcd3328b28b6fc303a70da84e35342d0b Mon Sep 17 00:00:00 2001 From: Salicylic-acid3 <46864619+Salicylic-acid3@users.noreply.github.com> Date: Mon, 21 Oct 2019 04:03:46 +0900 Subject: [PATCH 140/316] [Keyboard] Keyboard Naked48 Update (#7085) * Keyboard Naked48 Update Support for SPLIT_KEYBOARD Readme updates Keymap updates Support for RGB matrix (salicylic keymap) * Keymap Update Change KC_NO to KC_TRANSPARENT. Update the old part. --- keyboards/naked48/config.h | 22 - keyboards/naked48/keymaps/default/config.h | 17 +- keyboards/naked48/keymaps/default/keymap.c | 49 +- keyboards/naked48/keymaps/default/readme.md | 78 ++- keyboards/naked48/keymaps/default/rules.mk | 29 - .../keymaps/default_with_nafuda/config.h | 38 +- .../keymaps/default_with_nafuda/keymap.c | 82 +-- .../keymaps/default_with_nafuda/readme.md | 56 +- .../keymaps/default_with_nafuda/rules.mk | 28 - .../keymaps/default_with_setta21/config.h | 16 +- .../keymaps/default_with_setta21/keymap.c | 91 +-- .../keymaps/default_with_setta21/readme.md | 77 ++- .../keymaps/default_with_setta21/rules.mk | 29 - keyboards/naked48/keymaps/salicylic/config.h | 35 +- keyboards/naked48/keymaps/salicylic/keymap.c | 64 +- keyboards/naked48/keymaps/salicylic/rules.mk | 30 +- .../keymaps/salicylic_with_nafuda/config.h | 37 +- .../keymaps/salicylic_with_nafuda/keymap.c | 84 +-- .../keymaps/salicylic_with_nafuda/readme.md | 57 +- .../keymaps/salicylic_with_nafuda/rules.mk | 28 - .../keymaps/salicylic_with_setta21/config.h | 16 +- .../keymaps/salicylic_with_setta21/keymap.c | 81 +-- .../keymaps/salicylic_with_setta21/rules.mk | 29 - keyboards/naked48/naked48.c | 5 + keyboards/naked48/naked48.h | 9 +- keyboards/naked48/readme.md | 4 +- keyboards/naked48/rev1/config.h | 81 +-- keyboards/naked48/rev1/matrix.c | 357 ----------- keyboards/naked48/rev1/rev1.c | 35 +- keyboards/naked48/rev1/rev1.h | 41 +- keyboards/naked48/rev1/rules.mk | 3 - keyboards/naked48/rev1/serial_config.h | 8 - .../naked48/rev1/serial_config_simpleapi.h | 8 - keyboards/naked48/rev1/split_scomm.c | 92 --- keyboards/naked48/rev1/split_scomm.h | 22 - keyboards/naked48/rev1/split_util.c | 70 --- keyboards/naked48/rev1/split_util.h | 16 - keyboards/naked48/rules.mk | 66 +- keyboards/naked48/serial.c | 590 ------------------ keyboards/naked48/serial.h | 86 --- 40 files changed, 394 insertions(+), 2172 deletions(-) delete mode 100644 keyboards/naked48/rev1/matrix.c delete mode 100644 keyboards/naked48/rev1/serial_config.h delete mode 100644 keyboards/naked48/rev1/serial_config_simpleapi.h delete mode 100644 keyboards/naked48/rev1/split_scomm.c delete mode 100644 keyboards/naked48/rev1/split_scomm.h delete mode 100644 keyboards/naked48/rev1/split_util.c delete mode 100644 keyboards/naked48/rev1/split_util.h delete mode 100644 keyboards/naked48/serial.c delete mode 100644 keyboards/naked48/serial.h diff --git a/keyboards/naked48/config.h b/keyboards/naked48/config.h index b37d10221101..cfb6bf4ffccd 100644 --- a/keyboards/naked48/config.h +++ b/keyboards/naked48/config.h @@ -19,25 +19,3 @@ along with this program. If not, see . #pragma once #include "config_common.h" - -// GCC include 'config.h" sequence in qmk_firmware/keyboards/naked48/ -// -include keyboards/naked48/config.h -// -include keyboards/naked48/rev?/config.h -// -include keyboards/naked48/rev?/keymaps/MAPNAME/config.h -// XXXX.c - -#include - -// GCC include search path in qmk_firmare/keyboards/naked48/ -// #include "..." search starts here: -// #include <...> search starts here: -// keyboards/naked48/rev?/keymaps/MAPNAME -// keyboards/naked48 -// keyboards/naked48/rev? -// . -// ./tmk_core -// ...... - -// MACRO and FUNCTION are features that are depreciated. -#define NO_ACTION_MACRO -#define NO_ACTION_FUNCTION diff --git a/keyboards/naked48/keymaps/default/config.h b/keyboards/naked48/keymaps/default/config.h index ad417f7f0264..a568a5f12829 100644 --- a/keyboards/naked48/keymaps/default/config.h +++ b/keyboards/naked48/keymaps/default/config.h @@ -18,24 +18,13 @@ /* Select hand configuration */ -#define MASTER_LEFT +//#define MASTER_LEFT // #define MASTER_RIGHT // #define EE_HANDS -#define USE_SERIAL_PD2 +//#define USE_SERIAL #define TAPPING_FORCE_HOLD #define TAPPING_TERM 180 -// Selection of RGBLIGHT MODE to use. -#if defined(LED_ANIMATIONS) - //#define RGBLIGHT_EFFECT_BREATHING - #define RGBLIGHT_EFFECT_RAINBOW_MOOD - #define RGBLIGHT_EFFECT_RAINBOW_SWIRL - //#define RGBLIGHT_EFFECT_SNAKE - #define RGBLIGHT_EFFECT_KNIGHT - //#define RGBLIGHT_EFFECT_CHRISTMAS - #define RGBLIGHT_EFFECT_STATIC_GRADIENT - //#define RGBLIGHT_EFFECT_RGB_TEST - //#define RGBLIGHT_EFFECT_ALTERNATING -#endif \ No newline at end of file +#define RGBLED_NUM 48 // Number of LEDs \ No newline at end of file diff --git a/keyboards/naked48/keymaps/default/keymap.c b/keyboards/naked48/keymaps/default/keymap.c index 3229f74ecaf7..91c61b5f4369 100644 --- a/keyboards/naked48/keymaps/default/keymap.c +++ b/keyboards/naked48/keymaps/default/keymap.c @@ -21,16 +21,10 @@ enum layer_number { }; enum custom_keycodes { - LOWER = SAFE_RANGE, - RAISE, - ADJUST, - RGBRST + RGB_RST = SAFE_RANGE }; // Layer Mode aliases -#define _____ KC_TRNS -#define XXXXX KC_NO - #define KC_SNUBS S(KC_NUBS) #define KC_SNUHS S(KC_NUHS) @@ -43,7 +37,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - ADJUST,KC_LCTRL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT + MO(_ADJUST),KC_LCTRL, KC_LALT, KC_LGUI,MO(_LOWER),KC_SPC,KC_SPC,MO(_RAISE), KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT //`------------------------------------------------------------------------------------------------------------' ), @@ -52,11 +46,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //,-----------------------------------------------------| |-----------------------------------------------------. KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR,KC_LPRN, KC_RPRN, KC_DEL, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - _____, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,KC_SNUHS,KC_SNUBS, _____, _____, _____, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,KC_SNUHS,KC_SNUBS, _______, _______, _______, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - _____, _____, _____, _____, _____, _____, _____, _____, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY //`------------------------------------------------------------------------------------------------------------' ), @@ -65,45 +59,33 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //,-----------------------------------------------------| |-----------------------------------------------------. KC_TILD, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - _____, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _____, _____, _____, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ //`------------------------------------------------------------------------------------------------------------' ), [_ADJUST] = LAYOUT( /* Base */ //,-----------------------------------------------------| |-----------------------------------------------------. - _____, RESET, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, _____, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_RST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - _____, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, RGB_TOG, RGB_MOD, XXXXX,LCA(KC_DEL),LALT(KC_PSCR),KC_PSCR, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, RGB_MOD, XXXXXXX,LCA(KC_DEL),LALT(KC_PSCR),KC_PSCR, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - _____, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, RGB_VAD, RGB_VAI, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_VAD, RGB_VAI, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____ + _______, _______, _______, _______, _______, RESET, RESET, _______, _______, _______, _______, _______ //`------------------------------------------------------------------------------------------------------------' ) }; -static inline void update_change_layer(bool pressed, uint8_t layer1, uint8_t layer2, uint8_t layer3) { - - pressed ? layer_on(layer1) : layer_off(layer1); - IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2) ? layer_on(layer3) : layer_off(layer3); -} - int RGB_current_mode; bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool result = false; switch (keycode) { - case LOWER: - update_change_layer(record->event.pressed, _LOWER, _RAISE, _ADJUST); - break; - case RAISE: - update_change_layer(record->event.pressed, _RAISE, _LOWER, _ADJUST); - break; #ifdef RGBLIGHT_ENABLE case RGB_MOD: if (record->event.pressed) { @@ -112,7 +94,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { RGB_current_mode = rgblight_config.mode; } break; - case RGBRST: + case RGB_RST: if (record->event.pressed) { eeconfig_update_rgblight_default(); rgblight_enable(); @@ -129,7 +111,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } void matrix_init_user(void) { - #ifdef RGBLIGHT_ENABLE - RGB_current_mode = rgblight_config.mode; - #endif + } + diff --git a/keyboards/naked48/keymaps/default/readme.md b/keyboards/naked48/keymaps/default/readme.md index 431a57340efb..a28ad8c52c8b 100644 --- a/keyboards/naked48/keymaps/default/readme.md +++ b/keyboards/naked48/keymaps/default/readme.md @@ -1,45 +1,37 @@ # The default keymap for naked48 -Default - //,-----------------------------------------| |-----------------------------------------. - TAB, Q, W, E, R, T, Y, U, I, O, P, BSPC, - //|------+------+------+------+------+------| |------+------+------+------+------+------| - ESC, A, S, D, F, G, H, J, K, L, ;, :, - //|------+------+------+------+------+------| |------+------+------+------+------+------| - LSFT, Z, X, C, V, B, N, M, ,, ., /, ENT, - //|------+------+------+------+------+------|------+------+------+------+------+------+------| - ADJUST, LCTRL, LALT, LGUI, LOWER, SPC, SPC, RAISE, LEFT, DOWN, UP, RIGHT - //`----------------------------------------------------------------------------------' - -Lower - //,-----------------------------------------| |-----------------------------------------. - ~, !, @, #, $, %, ^, &, *, (, ), DEL, - //|------+------+------+------+------+------| |------+------+------+------+------+------| - DEL, F1, F2, F3, F4, F5, F6, _, +, {, }, |, - //|------+------+------+------+------+------| |------+------+------+------+------+------| - LSFT, F7, F8, F9, F10, F11, F12, ~, |, ,, ., ENT, - //|------+------+------+------+------+------|------+------+------+------+------+------+------| - ADJUST, LCTRL, LALT, LGUI, LOWER, SPC, SPC, RAISE, MNXT, VOLD, VOLU, MPLY - //`----------------------------------------------------------------------------------' - -Raise - //,-----------------------------------------| |-----------------------------------------. - ~, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, DEL, - //|------+------+------+------+------+------| |------+------+------+------+------+------| - DEL, F1, F2, F3, F4, F5, F6, -, =, [, ], BSLS, - //|------+------+------+------+------+------| |------+------+------+------+------+------| - LSFT, F7, F8, F9, F10, F11, F12, #, \, ,, ., ENT, - //|------+------+------+------+------+------|------+------+------+------+------+------+------| - ADJUST, LCTRL, LALT, LGUI, LOWER, SPC, SPC, RAISE, MNXT, VOLD, VOLU, MPLY - //`----------------------------------------------------------------------------------' - -Adjust - //,-----------------------------------------| |----------------------------------------------. - ~, RST, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, DEL, - //|------+------+------+------+------+------| |------+-------+-------+-------+-------+-------| - DEL, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, LED ON/Off,LED MOD, XXXXX, C+A+D,Alt+PSCR, PSCR, - //|------+------+------+------+------+------| |------+-------+-------+-------+-------+-------| - LSFT, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, LED VAD,LED VAI,LED HUD,LED HUI,LED SAD,LED SAI, - //|------+------+------+------+------+------|------+------+------+-------+-------+-------+-------+-------| - ADJUST, LCTRL, LALT, LGUI, LOWER, SPC, SPC, RAISE, MNXT, VOLD, VOLU, MPLY - //`--------------------------------------------------------------------------------------' \ No newline at end of file +## Default +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +| TAB | Q| W| E| R| T| | | Y| U| I| O| P| BSPC| +| ESC | A| S| D| F| G| | | H| J| K| L| ;| '| +| LSFT | Z| X| C| V| B| | | N| M| ,| .| /| ENT| +| |ADJUST| LCTRL| LALT| LGUI| LOWER| SPC| SPC| RAISE| LEFT| DOWN| UP| RIGHT| | + + +## Lower +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +| ~| !| @| #| $| %| | | ^| &| *| (| )| DEL| +| ESC| F1| F2| F3| F4| F5| | | F6| _| +| {| }| PIPE| +| LSFT| F7| F8| F9| F10| F11| | | F12| SNUHS| SNUBS| ,| .| ENT| +| |ADJUST| LCTRL| LALT| LGUI| LOWER| SPC| SPC| RAISE| MNXT| VOLD| VOLU| MPLY| | + + +## Raise +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +| ~| 1| 2| 3| 4| 5| | | 6| 7| 8| 9| 0| DEL| +| DEL| F1| F2| F3| F4| F5| | | F6| -| =| [| ]| BSLS| +| LSFT| F7| F8| F9| F10| F11| | | F12| NUHS| NUBS| ,| .| ENT| +| |ADJUST| LCTRL| LALT| LGUI| LOWER| SPC| SPC| RAISE| MNXT| VOLD| VOLU| MPLY| | + + +## Adjust +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:------:|:------:|:------:|:------:|:-------:|:------:| +| ~| XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| | | RGB_RST| XXXXX| XXXXX| XXXXX| XXXXX| DEL| +| ESC| XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| | | RGB_TOG| RGB_MOD| XXXXX| C+A+D| Alt+PSCR| PSCR| +| LSFT| XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| | | RGB_VAD| RGB_VAI| RGB_HUD| RGB_HUI| RGB_SAD| RGB_SAI| +| |ADJUST| LCTRL| LALT| LGUI| LOWER| RESET| RESET| RAISE| MNXT| VOLD| VOLU| MPLY| | + diff --git a/keyboards/naked48/keymaps/default/rules.mk b/keyboards/naked48/keymaps/default/rules.mk index ee538432e908..e69de29bb2d1 100644 --- a/keyboards/naked48/keymaps/default/rules.mk +++ b/keyboards/naked48/keymaps/default/rules.mk @@ -1,29 +0,0 @@ - -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -SWAP_HANDS_ENABLE = no # Enable one-hand typing - -# If your custom naked48 pcb, you can rewrite to yes. -LED_ANIMATIONS = yes # LED animations - -ifeq ($(strip $(LED_ANIMATIONS)), yes) - # OPT_DEFS += -DRGBLIGHT_ANIMATIONS - OPT_DEFS += -DLED_ANIMATIONS -endif - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/naked48/keymaps/default_with_nafuda/config.h b/keyboards/naked48/keymaps/default_with_nafuda/config.h index a55856b24038..264ad08776d3 100644 --- a/keyboards/naked48/keymaps/default_with_nafuda/config.h +++ b/keyboards/naked48/keymaps/default_with_nafuda/config.h @@ -21,44 +21,12 @@ #define MASTER_LEFT // #define MASTER_RIGHT // #define EE_HANDS - #define USE_SERIAL_PD2 #define TAPPING_FORCE_HOLD #define TAPPING_TERM 180 -// Selection of RGBLIGHT MODE to use. -#if defined(LED_ANIMATIONS) - //#define RGBLIGHT_EFFECT_BREATHING - #define RGBLIGHT_EFFECT_RAINBOW_MOOD - #define RGBLIGHT_EFFECT_RAINBOW_SWIRL - //#define RGBLIGHT_EFFECT_SNAKE - #define RGBLIGHT_EFFECT_KNIGHT - //#define RGBLIGHT_EFFECT_CHRISTMAS - #define RGBLIGHT_EFFECT_STATIC_GRADIENT - //#define RGBLIGHT_EFFECT_RGB_TEST - //#define RGBLIGHT_EFFECT_ALTERNATING -#endif - -#define MK_3_SPEED - -#undef MOUSEKEY_INTERVAL -#define MOUSEKEY_INTERVAL 0 - -#undef MOUSEKEY_TIME_TO_MAX -#define MOUSEKEY_TIME_TO_MAX 150 - -#undef MOUSEKEY_MAX_SPEED -#define MOUSEKEY_MAX_SPEED 3 - -#undef MOUSEKEY_MOVE_DELTA -#define MOUSEKEY_MOVE_DELTA 5 - -#undef MOUSEKEY_DELAY -#define MOUSEKEY_DELAY 0 - -#undef MOUSEKEY_WHEEL_MAX_SPEED -#define MOUSEKEY_WHEEL_MAX_SPEED 1 +#define RGBLED_NUM 55 // Number of LEDs +#define RGBLIGHT_SPLIT +#define RGBLED_SPLIT { 48, 7 } -#undef MOUSEKEY_WHEEL_TIME_TO_MAX -#define MOUSEKEY_WHEEL_TIME_TO_MAX 0 diff --git a/keyboards/naked48/keymaps/default_with_nafuda/keymap.c b/keyboards/naked48/keymaps/default_with_nafuda/keymap.c index c1a9056a98a6..e4b616e70cac 100644 --- a/keyboards/naked48/keymaps/default_with_nafuda/keymap.c +++ b/keyboards/naked48/keymaps/default_with_nafuda/keymap.c @@ -23,125 +23,94 @@ enum layer_number { }; enum custom_keycodes { - MOUSE = SAFE_RANGE, - BROWSER, - LOWER, - RAISE, - ADJUST, - RGBRST + RGB_RST = SAFE_RANGE }; // Fillers to make layering more clear -#define _____ KC_TRNS -#define XXXXX KC_NO - -#define KC_CAD LCA(KC_DEL) -#define KC_APSCR LALT(KC_PSCR) - #define KC_SNUBS S(KC_NUBS) #define KC_SNUHS S(KC_NUHS) -#define KC_RTAB LCTL(KC_TAB) -#define KC_LTAB LCTL(LSFT(KC_TAB)) -#define KC_CTAB LCTL(KC_W) -#define KC_RETAB LCTL(LSFT(KC_T)) - -#define KC_TGMO TG(_MOUSE) -#define KC_TGBR TG(_BROWSER) #define KC_BSAD LT(_ADJUST, KC_BSPC) - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT_with_nafuda( //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_TGMO, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, TG(_MOUSE), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| - 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_BSAD, KC_UP, KC_TGBR, + 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_BSAD, KC_UP,TG(_BROWSER), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, KC_LEFT, KC_DOWN,KC_RIGHT, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------------------------| - ADJUST,KC_LCTRL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT + MO(_ADJUST),KC_LCTRL, KC_LALT, KC_LGUI,MO(_LOWER),KC_SPC,KC_SPC,MO(_RAISE), KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT //`------------------------------------------------------------------------------------------------------------' ), [_MOUSE] = LAYOUT_with_nafuda( //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_TGMO, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, TG(_MOUSE), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| 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_BTN1, KC_MS_U, KC_BTN2, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, KC_MS_L, KC_MS_D, KC_MS_R, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------------------------| - ADJUST,KC_LCTRL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT + MO(_ADJUST),KC_LCTRL, KC_LALT, KC_LGUI,MO(_LOWER),KC_SPC,KC_SPC,MO(_RAISE), KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT //`------------------------------------------------------------------------------------------------------------' ), [_BROWSER] = LAYOUT_with_nafuda( //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_CTAB, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, LCTL(KC_W), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| - 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_RETAB, KC_WH_U, KC_TGBR, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,LCTL(LSFT(KC_T)),KC_WH_U,TG(_BROWSER), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, KC_LTAB, KC_WH_D, KC_RTAB, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,LCTL(LSFT(KC_TAB)), KC_WH_D,LCTL(KC_TAB), //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------------------------| - ADJUST,KC_LCTRL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT + MO(_ADJUST),KC_LCTRL, KC_LALT, KC_LGUI,MO(_LOWER),KC_SPC,KC_SPC,MO(_RAISE), KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT //`------------------------------------------------------------------------------------------------------------' ), [_LOWER] = LAYOUT_with_nafuda( //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR,KC_LPRN, KC_RPRN, KC_DEL, KC_TGMO, + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR,KC_LPRN, KC_RPRN, KC_DEL, TG(_MOUSE), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| - KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, KC_BSAD, KC_UP, KC_TGBR, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, KC_BSAD, KC_UP,TG(_MOUSE), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| - _____, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,KC_SNUHS,KC_SNUBS, _____, _____, _____, KC_LEFT, KC_DOWN,KC_RIGHT, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,KC_SNUHS,KC_SNUBS, _______, _______, _______, KC_LEFT, KC_DOWN,KC_RIGHT, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------------------------| - _____, _____, _____, _____, _____, _____, _____, _____, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY //`------------------------------------------------------------------------------------------------------------' ), [_RAISE] = LAYOUT_with_nafuda( //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| - KC_TILD, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, KC_TGMO, + KC_TILD, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, TG(_MOUSE), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| - KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_BSAD, KC_UP, KC_TGBR, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_BSAD, KC_UP,TG(_MOUSE), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| - _____, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _____, _____, _____, KC_LEFT, KC_DOWN,KC_RIGHT, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, KC_LEFT, KC_DOWN,KC_RIGHT, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------------------------| - _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ //`------------------------------------------------------------------------------------------------------------' ), [_ADJUST] = LAYOUT_with_nafuda( /* Base */ //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| - _____, RESET, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, _____, RGB_VAD, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, RGB_VAD, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| - _____, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, RGB_TOG, RGB_MOD, XXXXX,LCA(KC_DEL),LALT(KC_PSCR),KC_PSCR, ADJUST, RGB_SAD, RGB_VAI, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, RGB_MOD, XXXXXXX,LCA(KC_DEL),LALT(KC_PSCR),KC_PSCR, _ADJUST, RGB_SAD, RGB_VAI, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| - _____, _____, _____, _____, _____, _____, RGB_VAD, RGB_VAI, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_MOD, RGB_TOG, RGB_SAI, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_VAD, RGB_VAI, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_MOD, RGB_TOG, RGB_SAI, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------------------------| - _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____ + _______, _______, _______, _______, _______, RESET, RESET, _______, _______, _______, _______, _______ //`------------------------------------------------------------------------------------------------------------' ) }; -static inline void update_change_layer(bool pressed, uint8_t layer1, uint8_t layer2, uint8_t layer3) { - - pressed ? layer_on(layer1) : layer_off(layer1); - IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2) ? layer_on(layer3) : layer_off(layer3); -} - int RGB_current_mode; bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool result = false; switch (keycode) { - case LOWER: - update_change_layer(record->event.pressed, _LOWER, _RAISE, _ADJUST); - break; - case RAISE: - update_change_layer(record->event.pressed, _RAISE, _LOWER, _ADJUST); - break; #ifdef RGBLIGHT_ENABLE case RGB_MOD: if (record->event.pressed) { @@ -150,7 +119,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { RGB_current_mode = rgblight_config.mode; } break; - case RGBRST: + case RGB_RST: if (record->event.pressed) { eeconfig_update_rgblight_default(); rgblight_enable(); @@ -167,7 +136,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } void matrix_init_user(void) { - #ifdef RGBLIGHT_ENABLE - RGB_current_mode = rgblight_config.mode; - #endif + } + diff --git a/keyboards/naked48/keymaps/default_with_nafuda/readme.md b/keyboards/naked48/keymaps/default_with_nafuda/readme.md index 780481be2e26..417b44133b26 100644 --- a/keyboards/naked48/keymaps/default_with_nafuda/readme.md +++ b/keyboards/naked48/keymaps/default_with_nafuda/readme.md @@ -2,38 +2,30 @@ Add Nafuda maps to the default layout. -Default - //|--------------------| - Mouse, - //|------+------+------| - BS + Ad, UP,Browser, - //|------+------+------| - LEFT, DOWN, RIGHT - //|--------------------| +## Default +| 1 | 2 | 3 | +|:----:|:----:|:----:| +| | MOUSE| | +| BS+Ad| UP|Browser| +| LEFT| DOWN| RIGHT| -Mouse - //|--------------------| - Default, - //|------+------+------| - BTN1, MS_U, BTN2, - //|------+------+------| - MS_L, MS_D, MS_R - //|--------------------| +## Mouse +| 1 | 2 | 3 | +|:----:|:----:|:----:| +| |Default| | +| BTN1| MS_U| BTN2| +| MS_L| MS_D| MS_R| -Browser - //|--------------------| - CloseTAB, - //|------+------+------| - ReOpenTAB, WH_U,Default, - //|------+------+------| - LTAB, WH_D, RTAB - //|--------------------| +## Browser +| 1 | 2 | 3 | +|:----:|:----:|:----:| +| |CloseTAB| | +|ReOpenTAB|WH_U|Default| +| LTAB| WH_D| RTAB| -Adjust - //|------------------------| - LED VAD, - //|------+----------+------| - Default, LED HUD,LED VAI, - //|------+----------+------| - LED MOD,LED ON/Off,LED HUI - //|------------------------| +## Adjust +| 1 | 2 | 3 | +|:----:|:----:|:----:| +| |LED_VAD| | +|Default|LED_HUD|LED_VAI| +|LED_MOD|LED_ON/Off|LED_HUI| diff --git a/keyboards/naked48/keymaps/default_with_nafuda/rules.mk b/keyboards/naked48/keymaps/default_with_nafuda/rules.mk index dd471767a7f1..f76b955efde2 100644 --- a/keyboards/naked48/keymaps/default_with_nafuda/rules.mk +++ b/keyboards/naked48/keymaps/default_with_nafuda/rules.mk @@ -1,29 +1 @@ - -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -SWAP_HANDS_ENABLE = no # Enable one-hand typing - -# If your custom naked48 pcb, you can rewrite to yes. -LED_ANIMATIONS = yes # LED animations - -ifeq ($(strip $(LED_ANIMATIONS)), yes) - # OPT_DEFS += -DRGBLIGHT_ANIMATIONS - OPT_DEFS += -DLED_ANIMATIONS -endif - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/naked48/keymaps/default_with_setta21/config.h b/keyboards/naked48/keymaps/default_with_setta21/config.h index ad417f7f0264..1e86c6bb729d 100644 --- a/keyboards/naked48/keymaps/default_with_setta21/config.h +++ b/keyboards/naked48/keymaps/default_with_setta21/config.h @@ -21,21 +21,11 @@ #define MASTER_LEFT // #define MASTER_RIGHT // #define EE_HANDS - #define USE_SERIAL_PD2 #define TAPPING_FORCE_HOLD #define TAPPING_TERM 180 -// Selection of RGBLIGHT MODE to use. -#if defined(LED_ANIMATIONS) - //#define RGBLIGHT_EFFECT_BREATHING - #define RGBLIGHT_EFFECT_RAINBOW_MOOD - #define RGBLIGHT_EFFECT_RAINBOW_SWIRL - //#define RGBLIGHT_EFFECT_SNAKE - #define RGBLIGHT_EFFECT_KNIGHT - //#define RGBLIGHT_EFFECT_CHRISTMAS - #define RGBLIGHT_EFFECT_STATIC_GRADIENT - //#define RGBLIGHT_EFFECT_RGB_TEST - //#define RGBLIGHT_EFFECT_ALTERNATING -#endif \ No newline at end of file +#define RGBLED_NUM 69 // Number of LEDs +#define RGBLIGHT_SPLIT +#define RGBLED_SPLIT { 48, 21 } diff --git a/keyboards/naked48/keymaps/default_with_setta21/keymap.c b/keyboards/naked48/keymaps/default_with_setta21/keymap.c index 32d56a508d49..26278b79b8d6 100644 --- a/keyboards/naked48/keymaps/default_with_setta21/keymap.c +++ b/keyboards/naked48/keymaps/default_with_setta21/keymap.c @@ -21,114 +21,87 @@ enum layer_number { }; enum custom_keycodes { - LOWER = SAFE_RANGE, - RAISE, - ADJUST, - KANJI, - RGBRST, + RGB_RST = SAFE_RANGE, SEND_SUM, - SEND_AVERAGE, - SEND_COUNTIF, + SEND_AVE, + SEND_CIF, SEND_MAX, SEND_MIN }; // Fillers to make layering more clear -#define _____ KC_TRNS -#define XXXXX KC_NO - #define KC_SNUBS S(KC_NUBS) #define KC_SNUHS S(KC_NUHS) -#define KC_SSUM SEND_SUM -#define KC_SAVE SEND_AVERAGE -#define KC_SCOU SEND_COUNTIF -#define KC_SMAX SEND_MAX -#define KC_SMIN SEND_MIN - #define KC_RADO LT(_RAISE, KC_PDOT) #define KC_LOP0 LT(_LOWER, KC_P0) -#define KC_ADNL LT(_ADJUST, KC_NLCK) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT_with_setta21( //,-----------------------------------------------------| |-----------------------------------------------------. |-----------------------------------------------| - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_LOP0, KC_P1, KC_P4, KC_P7,KC_ADNL, KC_ESC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_LOP0, KC_P1, KC_P4, KC_P7,KC_NLCK, KC_ESC, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| 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_P2, KC_P5, KC_P8,KC_PSLS, KC_F2, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, KC_RADO, KC_P3, KC_P6, KC_P9,KC_PAST, KC_EQL, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| - ADJUST,KC_LCTRL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT, KC_PENT, KC_PPLS,KC_PMNS, KC_DEL + MO(_ADJUST),KC_LCTRL, KC_LALT, KC_LGUI,MO(_LOWER), KC_SPC, KC_SPC,MO(_RAISE), KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT, KC_PENT, KC_PPLS,KC_PMNS, KC_DEL //`------------------------------------------------------------------------------------------------------------' |-----------------------------------------------| ), [_LOWER] = LAYOUT_with_setta21( - //,-----------------------------------------------------| |-----------------------------------------------------. |-----------------------------------------------| - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR,KC_LPRN, KC_RPRN, KC_DEL, LOWER, XXXXX,KC_LEFT, XXXXX, XXXXX, KC_ESC, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| - KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, KC_DOWN,KC_DOWN, KC_UP,KC_PSLS, KC_F2, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| - _____, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,KC_SNUHS,KC_SNUBS, _____, _____, _____, RAISE, XXXXX,KC_RIGHT, XXXXX,KC_PAST, KC_EQL, - //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| - _____, _____, _____, _____, _____, _____, _____, _____, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, KC_PENT, KC_PPLS,KC_PMNS, KC_DEL - //`------------------------------------------------------------------------------------------------------------' |-----------------------------------------------| + //,-----------------------------------------------------| |-----------------------------------------------------. |------------------------------------------------| + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR,KC_LPRN, KC_RPRN, KC_DEL, MO(_LOWER),XXXXXXX,KC_LEFT, XXXXXXX,XXXXXXX, KC_ESC, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+--------+-------+-------| + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, KC_DOWN,KC_DOWN, KC_UP,KC_PSLS, KC_F2, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+--------+-------+-------| + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,KC_SNUHS,KC_SNUBS, _______, _______, _______, MO(_RAISE),XXXXXXX,KC_RIGHT,XXXXXXX,KC_PAST, KC_EQL, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |---------------+----------------+-------+-------| + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, KC_PENT, KC_PPLS,KC_PMNS, KC_DEL + //`------------------------------------------------------------------------------------------------------------' |------------------------------------------------| ), [_RAISE] = LAYOUT_with_setta21( - //,-----------------------------------------------------| |-----------------------------------------------------. |-----------------------------------------------| - KC_TILD, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, LOWER, KC_F11, KC_F4, KC_F7,KC_SMIN, KC_ESC, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| - KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_F12, KC_F5, KC_F8,KC_SMAX, KC_F2, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| - _____, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _____, _____, _____, RAISE, KC_F3, KC_F6, KC_F9,KC_SCOU, KC_EQL, - //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| - _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, KC_RPRN, KC_SSUM,KC_SAVE, KC_DEL - //`------------------------------------------------------------------------------------------------------------' |-----------------------------------------------| + //,-----------------------------------------------------| |-----------------------------------------------------. |------------------------------------------------| + KC_TILD, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, _______, KC_F11, KC_F4, KC_F7,SEND_MIN, KC_ESC, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+--------+-------| + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_F12, KC_F5, KC_F8,SEND_MAX, KC_F2, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+--------+-------| + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, _______, KC_F3, KC_F6, KC_F9,SEND_CIF, KC_EQL, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |---------------+---------------+--------+-------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RPRN, SEND_SUM,SEND_AVE, KC_DEL + //`------------------------------------------------------------------------------------------------------------' |------------------------------------------------| ), [_ADJUST] = LAYOUT_with_setta21( /* Base */ //,-----------------------------------------------------| |-----------------------------------------------------. |-----------------------------------------------| - _____, RESET, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, _____, LOWER,RGB_VAD,RGB_HUD,RGB_SAD, ADJUST,RGB_TOG, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_RST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______,RGB_VAD,RGB_HUD,RGB_SAD,XXXXXXX,_______, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| - _____, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, RGB_TOG, RGB_MOD, XXXXX,LCA(KC_DEL),LALT(KC_PSCR),KC_PSCR, RGB_VAI,RGB_HUI,RGB_SAI, XXXXX, _____, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, RGB_MOD, XXXXXXX,LCA(KC_DEL),LALT(KC_PSCR),KC_PSCR, RGB_VAI,RGB_HUI,RGB_SAI,XXXXXXX,_______, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| - _____, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, RGB_VAD, RGB_VAI, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RAISE, XXXXX, XXXXX, XXXXX, XXXXX, _____, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_VAD, RGB_VAI, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, _______,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,_______, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| - _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, RGB_MOD, _____, _____, _____ + _______, _______, _______, _______, _______, RESET, RESET, _______, _______, _______, _______, _______, RGB_MOD, RGB_TOG,_______,_______ //`------------------------------------------------------------------------------------------------------------' |-----------------------------------------------| ) }; -static inline void update_change_layer(bool pressed, uint8_t layer1, uint8_t layer2, uint8_t layer3) { - - pressed ? layer_on(layer1) : layer_off(layer1); - IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2) ? layer_on(layer3) : layer_off(layer3); -} - int RGB_current_mode; bool process_record_user(uint16_t keycode, keyrecord_t *record) { - bool result = false; switch (keycode) { - case LOWER: - update_change_layer(record->event.pressed, _LOWER, _RAISE, _ADJUST); - break; - case RAISE: - update_change_layer(record->event.pressed, _RAISE, _LOWER, _ADJUST); - break; case SEND_SUM: if (record->event.pressed) { SEND_STRING("=SUM("); } break; - case SEND_AVERAGE: + case SEND_AVE: if (record->event.pressed) { SEND_STRING("=AVERAGE("); } break; - case SEND_COUNTIF: + case SEND_CIF: if (record->event.pressed) { SEND_STRING("=COUNTIF("); } @@ -151,7 +124,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { RGB_current_mode = rgblight_config.mode; } break; - case RGBRST: + case RGB_RST: if (record->event.pressed) { eeconfig_update_rgblight_default(); rgblight_enable(); @@ -168,7 +141,5 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } void matrix_init_user(void) { - #ifdef RGBLIGHT_ENABLE - RGB_current_mode = rgblight_config.mode; - #endif + } diff --git a/keyboards/naked48/keymaps/default_with_setta21/readme.md b/keyboards/naked48/keymaps/default_with_setta21/readme.md index 921c1e495006..365219739f41 100644 --- a/keyboards/naked48/keymaps/default_with_setta21/readme.md +++ b/keyboards/naked48/keymaps/default_with_setta21/readme.md @@ -2,46 +2,43 @@ Add Setta21 maps to the default layout. -Default - //|-----------------------------------------| - Rai+0, 1, 4, 7,Ad+Num, ESC, - //|------+------+------+------+------+------| - 2, 5, 8, /, F2, - //|------+------+------+------+------+------| - Low+., 3, 6, 9, *, =, - //|-------------+-------------+------+------| - ENT, +, -, DEL - //|-----------------------------------------| +## Default +| 1 | 2 | 3 | 4 | +|:----:|:----:|:----:|:----:| +| ESC| F2| =| DEL| +|Ad+Num| /| *| -| +| 7| 8| 9| | +| 4| 5| 6| +| +| 1| 2| 3| | +| Rai+0| | LOW + .| ENT| -Lower - //|-----------------------------------------| - RAISE, F11, F4, F7, "=MIN(", ESC, - //|------+------+------+------+-----------+------| - F12, F5, F8, "=MAX(", F2, - //|------+------+------+------+-----------+------| - LOWER, F3, F6, F9,"=COUNTIF(", =, - //|-------------+-------------+-----------+------| - ), "=SUM(","=AVERAGE(", DEL - //|-----------------------------------------| +## Lower +| 1 | 2 | 3 | 4 | +|:----:|:----:|:----:|:----:| +| ESC| F2| =| DEL| +| =MIN(| =MAX(|=COUNTIF(|=AVERAGE(| +| F7| F8| F9| | +| F4| F5| F6| =SUM(| +| F11| F12| F3| | +| RAISE| | LOWER| )| -Raise - //|-----------------------------------------| - RAISE, XXXXX, LEFT, XXXXX, XXXXX, ESC, - //|------+------+------+------+------+------| - DOWN, DOWN, UP, /, F2, - //|------+------+------+------+------+------| - LOWER, XXXXX, RIGHT, XXXXX, *, =, - //|-------------+-------------+------+------| - ENT, +, -, DEL - //|-----------------------------------------| +## Raise +| 1 | 2 | 3 | 4 | +|:----:|:----:|:----:|:----:| +| ESC| F2| =| DEL| +| XXXXX| /| *| -| +| XXXXX| UP| XXXXX| | +| LEFT| DOWN| RIGHT| +| +| XXXXX| DOWN| XXXXX| | +| RAISE| | LOWER| ENT| + +## Adjust +| 1 | 2 | 3 | 4 | +|:----:|:----:|:----:|:----:| +| ESC| F2| =| DEL| +|ADJUST| XXXXX| XXXXX| -| +|LED_SAD|LED_SAI| XXXXX| | +|LED_HUD|LED_HUI| XXXXX| +| +|LED_VAD|LED_VAI| XXXXX| | +|LED_ON/Off| | XXXXX|LED_MOD| -Adjust - //|------------------------------------------------| - LED ON/Off,LED VAD,LED HUD,LED SAD, ADJUST, ESC, - //|--------+-------+-------+-------+-------+-------| - LED VAI,LED HUI,LED SAI, XXXXX, F2, - //|--------+-------+-------+-------+-------+-------| - XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, =, - //|----------------+---------------+-------+-------| - LED MOD, +, -, DEL - //|------------------------------------------------| diff --git a/keyboards/naked48/keymaps/default_with_setta21/rules.mk b/keyboards/naked48/keymaps/default_with_setta21/rules.mk index ee538432e908..e69de29bb2d1 100644 --- a/keyboards/naked48/keymaps/default_with_setta21/rules.mk +++ b/keyboards/naked48/keymaps/default_with_setta21/rules.mk @@ -1,29 +0,0 @@ - -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -SWAP_HANDS_ENABLE = no # Enable one-hand typing - -# If your custom naked48 pcb, you can rewrite to yes. -LED_ANIMATIONS = yes # LED animations - -ifeq ($(strip $(LED_ANIMATIONS)), yes) - # OPT_DEFS += -DRGBLIGHT_ANIMATIONS - OPT_DEFS += -DLED_ANIMATIONS -endif - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/naked48/keymaps/salicylic/config.h b/keyboards/naked48/keymaps/salicylic/config.h index ad417f7f0264..5eceec73b0c0 100644 --- a/keyboards/naked48/keymaps/salicylic/config.h +++ b/keyboards/naked48/keymaps/salicylic/config.h @@ -18,24 +18,23 @@ /* Select hand configuration */ -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - -#define USE_SERIAL_PD2 - #define TAPPING_FORCE_HOLD #define TAPPING_TERM 180 -// Selection of RGBLIGHT MODE to use. -#if defined(LED_ANIMATIONS) - //#define RGBLIGHT_EFFECT_BREATHING - #define RGBLIGHT_EFFECT_RAINBOW_MOOD - #define RGBLIGHT_EFFECT_RAINBOW_SWIRL - //#define RGBLIGHT_EFFECT_SNAKE - #define RGBLIGHT_EFFECT_KNIGHT - //#define RGBLIGHT_EFFECT_CHRISTMAS - #define RGBLIGHT_EFFECT_STATIC_GRADIENT - //#define RGBLIGHT_EFFECT_RGB_TEST - //#define RGBLIGHT_EFFECT_ALTERNATING -#endif \ No newline at end of file +#define DRIVER_LED_TOTAL 48 + +#ifdef RGB_MATRIX_ENABLE +# define RGB_MATRIX_KEYPRESSES // reacts to keypresses +// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) +// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects +# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +// # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) +// # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) +// # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 +# define RGB_MATRIX_HUE_STEP 8 +# define RGB_MATRIX_SAT_STEP 8 +# define RGB_MATRIX_LIMIT_VAL 50 +# define RGB_MATRIX_VAL_STEP 5 +# define RGB_MATRIX_SPD_STEP 10 +#endif + diff --git a/keyboards/naked48/keymaps/salicylic/keymap.c b/keyboards/naked48/keymaps/salicylic/keymap.c index 99c95cb02152..995e8bd298dc 100644 --- a/keyboards/naked48/keymaps/salicylic/keymap.c +++ b/keyboards/naked48/keymaps/salicylic/keymap.c @@ -3,10 +3,11 @@ extern keymap_config_t keymap_config; -#ifdef RGBLIGHT_ENABLE +//#ifdef RGB_MATRIX_ENABLE //Following line allows macro to read current RGB settings -extern rgblight_config_t rgblight_config; -#endif +//extern rgblight_config_t rgblight_config; + +//#endif extern uint8_t is_master; @@ -22,17 +23,10 @@ enum layer_number { }; enum custom_keycodes { - LOWER = SAFE_RANGE, - RAISE, - ADJUST, - KANJI, - RGBRST + RGB_RST = SAFE_RANGE }; // Fillers to make layering more clear -#define _____ KC_TRNS -#define XXXXX KC_NO - #define KC_CT11 LCTL_T(KC_F11) #define KC_SF12 SFT_T(KC_F12) #define KC_LOEN LT(_LOWER, KC_ENT) @@ -56,44 +50,42 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //,-----------------------------------------------------| |-----------------------------------------------------. KC_ESC, JP_EXLM, JP_QUES, JP_LBRC, JP_RBRC, JP_TILD, KC_6, KC_7, KC_8, KC_9, JP_ASTR, JP_SLSH, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - JP_QUOT, JP_HASH, JP_DQT, JP_LPRN, JP_RPRN, JP_AT, XXXXX, KC_4, KC_5, KC_6, JP_MINS, JP_EQL, + JP_QUOT, JP_HASH, JP_DQT, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_4, KC_5, KC_6, JP_MINS, JP_EQL, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| JP_CIRC, JP_PERC, JP_AMPR, JP_SCLN, JP_COLN, JP_PIPE, KC_0, KC_1, KC_2, KC_3, JP_PLUS, KC_ENT, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - _____, _____, _____, KC_ZKHK, LOWER, _____, _____, RAISE, KC_0, JP_DOT, _____, _____ + _______, _______, _______, KC_ZKHK,MO(_LOWER),_______,_______,MO(_RAISE),JP_DOT, _______, _______, _______ //`------------------------------------------------------------------------------------------------------------' ), [_RAISE] = LAYOUT( //,-----------------------------------------------------| |-----------------------------------------------------. - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, XXXXX, KC_UP, XXXXX, KC_PGUP, KC_DEL, + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, XXXXXXX, KC_UP, XXXXXXX, KC_PGUP, KC_DEL, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - KC_CT11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXX, KC_LEFT, KC_DOWN,KC_RIGHT, KC_LSFT, KC_ENT, + KC_CT11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, KC_LEFT, KC_DOWN,KC_RIGHT, KC_LSFT, KC_ENT, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - KC_SF12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXX, XXXXX, XXXXX, XXXXX, KC_PGDN, XXXXX, + KC_SF12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGDN, XXXXXXX, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ //`------------------------------------------------------------------------------------------------------------' ), [_ADJUST] = LAYOUT( /* Base */ //,-----------------------------------------------------| |-----------------------------------------------------. - _____, _____, _____, _____, _____, _____, _____, KC_7, KC_8, KC_9, KC_0, _____, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_RST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - _____, _____, _____, _____, _____, _____, RGB_TOG, RGB_MOD, XXXXX,LCA(KC_DEL),LALT(KC_PSCR),KC_PSCR, + KC_LCTRL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, RGB_MOD, XXXXXXX,LCA(KC_DEL),LALT(KC_PSCR),KC_PSCR, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - _____, _____, _____, _____, _____, _____, RGB_VAD, RGB_VAI, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_VAD, RGB_VAI, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____ + _______, _______, _______, _______, _______, RESET, RESET, _______, _______, _______, _______, _______ //`------------------------------------------------------------------------------------------------------------' ) }; -static inline void update_change_layer(bool pressed, uint8_t layer1, uint8_t layer2, uint8_t layer3) { - - pressed ? layer_on(layer1) : layer_off(layer1); - IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2) ? layer_on(layer3) : layer_off(layer3); +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } int RGB_current_mode; @@ -101,23 +93,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool result = false; switch (keycode) { - case LOWER: - update_change_layer(record->event.pressed, _LOWER, _RAISE, _ADJUST); - break; - case RAISE: - update_change_layer(record->event.pressed, _RAISE, _LOWER, _ADJUST); - break; - case KANJI: - if (record->event.pressed) { - if (keymap_config.swap_lalt_lgui == false) { - register_code(KC_LANG2); - } else { - SEND_STRING(SS_LALT("`")); - } - } else { - unregister_code(KC_LANG2); - } - break; #ifdef RGBLIGHT_ENABLE case RGB_MOD: if (record->event.pressed) { @@ -143,7 +118,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } void matrix_init_user(void) { - #ifdef RGBLIGHT_ENABLE - RGB_current_mode = rgblight_config.mode; - #endif + } + diff --git a/keyboards/naked48/keymaps/salicylic/rules.mk b/keyboards/naked48/keymaps/salicylic/rules.mk index ee538432e908..be8d10c9a64a 100644 --- a/keyboards/naked48/keymaps/salicylic/rules.mk +++ b/keyboards/naked48/keymaps/salicylic/rules.mk @@ -1,29 +1,3 @@ +RGBLIGHT_ENABLE = no +RGB_MATRIX_ENABLE = WS2812 -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -SWAP_HANDS_ENABLE = no # Enable one-hand typing - -# If your custom naked48 pcb, you can rewrite to yes. -LED_ANIMATIONS = yes # LED animations - -ifeq ($(strip $(LED_ANIMATIONS)), yes) - # OPT_DEFS += -DRGBLIGHT_ANIMATIONS - OPT_DEFS += -DLED_ANIMATIONS -endif - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/naked48/keymaps/salicylic_with_nafuda/config.h b/keyboards/naked48/keymaps/salicylic_with_nafuda/config.h index a55856b24038..a2ce42ea526c 100644 --- a/keyboards/naked48/keymaps/salicylic_with_nafuda/config.h +++ b/keyboards/naked48/keymaps/salicylic_with_nafuda/config.h @@ -27,38 +27,7 @@ #define TAPPING_FORCE_HOLD #define TAPPING_TERM 180 -// Selection of RGBLIGHT MODE to use. -#if defined(LED_ANIMATIONS) - //#define RGBLIGHT_EFFECT_BREATHING - #define RGBLIGHT_EFFECT_RAINBOW_MOOD - #define RGBLIGHT_EFFECT_RAINBOW_SWIRL - //#define RGBLIGHT_EFFECT_SNAKE - #define RGBLIGHT_EFFECT_KNIGHT - //#define RGBLIGHT_EFFECT_CHRISTMAS - #define RGBLIGHT_EFFECT_STATIC_GRADIENT - //#define RGBLIGHT_EFFECT_RGB_TEST - //#define RGBLIGHT_EFFECT_ALTERNATING -#endif +#define RGBLED_NUM 55 // Number of LEDs +#define RGBLIGHT_SPLIT +#define RGBLED_SPLIT { 48, 7 } -#define MK_3_SPEED - -#undef MOUSEKEY_INTERVAL -#define MOUSEKEY_INTERVAL 0 - -#undef MOUSEKEY_TIME_TO_MAX -#define MOUSEKEY_TIME_TO_MAX 150 - -#undef MOUSEKEY_MAX_SPEED -#define MOUSEKEY_MAX_SPEED 3 - -#undef MOUSEKEY_MOVE_DELTA -#define MOUSEKEY_MOVE_DELTA 5 - -#undef MOUSEKEY_DELAY -#define MOUSEKEY_DELAY 0 - -#undef MOUSEKEY_WHEEL_MAX_SPEED -#define MOUSEKEY_WHEEL_MAX_SPEED 1 - -#undef MOUSEKEY_WHEEL_TIME_TO_MAX -#define MOUSEKEY_WHEEL_TIME_TO_MAX 0 diff --git a/keyboards/naked48/keymaps/salicylic_with_nafuda/keymap.c b/keyboards/naked48/keymaps/salicylic_with_nafuda/keymap.c index 1551b82631b3..dbb1797cee2d 100644 --- a/keyboards/naked48/keymaps/salicylic_with_nafuda/keymap.c +++ b/keyboards/naked48/keymaps/salicylic_with_nafuda/keymap.c @@ -24,43 +24,24 @@ enum layer_number { }; enum custom_keycodes { - MOUSE = SAFE_RANGE, - BROWSER, - LOWER, - RAISE, - ADJUST, - KANJI, - RGBRST + RGB_RST = SAFE_RANGE }; // Fillers to make layering more clear -#define _____ KC_TRNS -#define XXXXX KC_NO - #define KC_CT11 LCTL_T(KC_F11) #define KC_SF12 SFT_T(KC_F12) - #define KC_LOEN LT(_LOWER, KC_ENT) #define KC_RASP LT(_RAISE, KC_SPC) -#define KC_CAD LCA(KC_DEL) -#define KC_APSCR LALT(KC_PSCR) -#define KC_RTAB LCTL(KC_TAB) -#define KC_LTAB LCTL(LSFT(KC_TAB)) -#define KC_CTAB LCTL(KC_W) -#define KC_RETAB LCTL(LSFT(KC_T)) - -#define KC_TGMO TG(_MOUSE) -#define KC_TGBR TG(_BROWSER) #define KC_BSAD LT(_ADJUST, KC_BSPC) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT_with_nafuda( //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_LBRC, KC_TGMO, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_LBRC, TG(_MOUSE), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| - KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, JP_MINS, JP_RBRC, KC_BSAD, KC_UP, KC_TGBR, + KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, JP_MINS, JP_RBRC, KC_BSAD, KC_UP,TG(_BROWSER), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, JP_COMM, JP_DOT, JP_SLSH, JP_BSLS, KC_LEFT, KC_DOWN,KC_RIGHT, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------------------------| @@ -70,7 +51,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_MOUSE] = LAYOUT_with_nafuda( //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_LBRC, KC_TGMO, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_LBRC, TG(_MOUSE), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, JP_MINS, JP_RBRC, KC_BTN1, KC_MS_U, KC_BTN2, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| @@ -82,11 +63,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BROWSER] = LAYOUT_with_nafuda( //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_LBRC, KC_CTAB, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_LBRC, LCTL(KC_W), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| - KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, JP_MINS, JP_RBRC, KC_RETAB, KC_WH_U, KC_TGBR, + KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, JP_MINS, JP_RBRC,LCTL(LSFT(KC_T)),KC_WH_U,TG(_BROWSER), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, JP_COMM, JP_DOT, JP_SLSH, JP_BSLS, KC_LTAB, KC_WH_D, KC_RTAB, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, JP_COMM, JP_DOT, JP_SLSH, JP_BSLS,LCTL(LSFT(KC_TAB)), KC_WH_D,LCTL(KC_TAB), //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------------------------| KC_LEFT,KC_RIGHT, KC_LGUI, KC_MHEN, KC_LOEN, KC_BSPC, KC_DEL, KC_RASP, KC_HENK, KC_LALT, KC_DOWN, KC_UP //`------------------------------------------------------------------------------------------------------------' @@ -94,45 +75,43 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_LOWER] = LAYOUT_with_nafuda( //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| - KC_ESC, JP_EXLM, JP_QUES, JP_LBRC, JP_RBRC, JP_TILD, KC_6, KC_7, KC_8, KC_9, JP_ASTR, JP_SLSH, KC_TGMO, + KC_ESC, JP_EXLM, JP_QUES, JP_LBRC, JP_RBRC, JP_TILD, KC_6, KC_7, KC_8, KC_9, JP_ASTR, JP_SLSH, TG(_MOUSE), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| - JP_QUOT, JP_HASH, JP_DQT, JP_LPRN, JP_RPRN, JP_AT, XXXXX, KC_4, KC_5, KC_6, JP_MINS, JP_EQL, KC_BSAD, KC_UP, KC_TGBR, + JP_QUOT, JP_HASH, JP_DQT, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_4, KC_5, KC_6, JP_MINS, JP_EQL, KC_BSAD, KC_UP,TG(_BROWSER), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| JP_CIRC, JP_PERC, JP_AMPR, JP_SCLN, JP_COLN, JP_PIPE, KC_0, KC_1, KC_2, KC_3, JP_PLUS, KC_ENT, KC_LEFT, KC_DOWN,KC_RIGHT, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------------------------| - _____, _____, _____, KC_ZKHK, LOWER, _____, _____, RAISE, KC_0, JP_DOT, _____, _____ + _______, _______, _______, KC_ZKHK,MO(_LOWER),_______,_______,MO(_RAISE),JP_DOT, _______, _______, _______ //`------------------------------------------------------------------------------------------------------------' ), [_RAISE] = LAYOUT_with_nafuda( //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| - KC_ESC, JP_EXLM, JP_QUES, JP_LBRC, JP_RBRC, JP_TILD, KC_6, KC_7, KC_8, KC_9, JP_ASTR, JP_SLSH, KC_TGMO, + KC_ESC, JP_EXLM, JP_QUES, JP_LBRC, JP_RBRC, JP_TILD, KC_6, KC_7, KC_8, KC_9, JP_ASTR, JP_SLSH, TG(_MOUSE), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| - KC_CT11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXX, KC_LEFT, KC_DOWN,KC_RIGHT, KC_LSFT, KC_ENT, KC_BSAD, KC_UP, KC_TGBR, + KC_CT11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, KC_LEFT, KC_DOWN,KC_RIGHT, KC_LSFT, KC_ENT, KC_BSAD, KC_UP,TG(_BROWSER), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| - KC_SF12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXX, XXXXX, XXXXX, XXXXX, KC_PGDN, XXXXX, KC_LEFT, KC_DOWN,KC_RIGHT, + KC_SF12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGDN, XXXXXXX, KC_LEFT, KC_DOWN,KC_RIGHT, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------------------------| - _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ //`------------------------------------------------------------------------------------------------------------' ), [_ADJUST] = LAYOUT_with_nafuda( /* Base */ //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| - _____, _____, _____, _____, _____, _____, _____, KC_7, KC_8, KC_9, KC_0, _____, RGB_VAD, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_RST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, RGB_VAD, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| - _____, _____, _____, _____, _____, _____, RGB_TOG, RGB_MOD, XXXXX,LCA(KC_DEL),LALT(KC_PSCR),KC_PSCR, ADJUST, RGB_SAD, RGB_VAI, + KC_LCTRL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, RGB_MOD, XXXXXXX,LCA(KC_DEL),LALT(KC_PSCR),KC_PSCR, _ADJUST, RGB_SAD, RGB_VAI, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| - _____, _____, _____, _____, _____, _____, RGB_VAD, RGB_VAI, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_MOD, RGB_TOG, RGB_SAI, + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_VAD, RGB_VAI, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_MOD, RGB_TOG, RGB_SAI, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------------------------| - _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____ + _______, _______, _______, _______, _______, RESET, RESET, _______, _______, _______, _______, _______ //`------------------------------------------------------------------------------------------------------------' ) }; -static inline void update_change_layer(bool pressed, uint8_t layer1, uint8_t layer2, uint8_t layer3) { - - pressed ? layer_on(layer1) : layer_off(layer1); - IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2) ? layer_on(layer3) : layer_off(layer3); +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } int RGB_current_mode; @@ -140,23 +119,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool result = false; switch (keycode) { - case LOWER: - update_change_layer(record->event.pressed, _LOWER, _RAISE, _ADJUST); - break; - case RAISE: - update_change_layer(record->event.pressed, _RAISE, _LOWER, _ADJUST); - break; - case KANJI: - if (record->event.pressed) { - if (keymap_config.swap_lalt_lgui == false) { - register_code(KC_LANG2); - } else { - SEND_STRING(SS_LALT("`")); - } - } else { - unregister_code(KC_LANG2); - } - break; #ifdef RGBLIGHT_ENABLE case RGB_MOD: if (record->event.pressed) { @@ -165,7 +127,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { RGB_current_mode = rgblight_config.mode; } break; - case RGBRST: + case RGB_RST: if (record->event.pressed) { eeconfig_update_rgblight_default(); rgblight_enable(); @@ -182,7 +144,5 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } void matrix_init_user(void) { - #ifdef RGBLIGHT_ENABLE - RGB_current_mode = rgblight_config.mode; - #endif + } diff --git a/keyboards/naked48/keymaps/salicylic_with_nafuda/readme.md b/keyboards/naked48/keymaps/salicylic_with_nafuda/readme.md index 2f9f3802df00..15e34e188c71 100644 --- a/keyboards/naked48/keymaps/salicylic_with_nafuda/readme.md +++ b/keyboards/naked48/keymaps/salicylic_with_nafuda/readme.md @@ -2,38 +2,31 @@ Add Nafuda maps to the salicylic layout. -Default - //|--------------------| - Mouse, - //|------+------+------| - BS + Ad, UP,Browser, - //|------+------+------| - LEFT, DOWN, RIGHT - //|--------------------| +## Default +| 1 | 2 | 3 | +|:----:|:----:|:----:| +| | MOUSE| | +| BS+Ad| UP|Browser| +| LEFT| DOWN| RIGHT| -Mouse - //|--------------------| - Default, - //|------+------+------| - BTN1, MS_U, BTN2, - //|------+------+------| - MS_L, MS_D, MS_R - //|--------------------| +## Mouse +| 1 | 2 | 3 | +|:----:|:----:|:----:| +| |Default| | +| BTN1| MS_U| BTN2| +| MS_L| MS_D| MS_R| -Browser - //|--------------------| - CloseTAB, - //|------+------+------| - ReOpenTAB, WH_U,Default, - //|------+------+------| - LTAB, WH_D, RTAB - //|--------------------| +## Browser +| 1 | 2 | 3 | +|:----:|:----:|:----:| +| |CloseTAB| | +|ReOpenTAB|WH_U|Default| +| LTAB| WH_D| RTAB| + +## Adjust +| 1 | 2 | 3 | +|:----:|:----:|:----:| +| |LED_VAD| | +|Default|LED_HUD|LED_VAI| +|LED_MOD|LED_ON/Off|LED_HUI| -Adjust - //|------------------------| - LED VAD, - //|------+----------+------| - Default, LED HUD,LED VAI, - //|------+----------+------| - LED MOD,LED ON/Off,LED HUI - //|------------------------| diff --git a/keyboards/naked48/keymaps/salicylic_with_nafuda/rules.mk b/keyboards/naked48/keymaps/salicylic_with_nafuda/rules.mk index dd471767a7f1..f76b955efde2 100644 --- a/keyboards/naked48/keymaps/salicylic_with_nafuda/rules.mk +++ b/keyboards/naked48/keymaps/salicylic_with_nafuda/rules.mk @@ -1,29 +1 @@ - -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -SWAP_HANDS_ENABLE = no # Enable one-hand typing - -# If your custom naked48 pcb, you can rewrite to yes. -LED_ANIMATIONS = yes # LED animations - -ifeq ($(strip $(LED_ANIMATIONS)), yes) - # OPT_DEFS += -DRGBLIGHT_ANIMATIONS - OPT_DEFS += -DLED_ANIMATIONS -endif - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/naked48/keymaps/salicylic_with_setta21/config.h b/keyboards/naked48/keymaps/salicylic_with_setta21/config.h index ad417f7f0264..1e86c6bb729d 100644 --- a/keyboards/naked48/keymaps/salicylic_with_setta21/config.h +++ b/keyboards/naked48/keymaps/salicylic_with_setta21/config.h @@ -21,21 +21,11 @@ #define MASTER_LEFT // #define MASTER_RIGHT // #define EE_HANDS - #define USE_SERIAL_PD2 #define TAPPING_FORCE_HOLD #define TAPPING_TERM 180 -// Selection of RGBLIGHT MODE to use. -#if defined(LED_ANIMATIONS) - //#define RGBLIGHT_EFFECT_BREATHING - #define RGBLIGHT_EFFECT_RAINBOW_MOOD - #define RGBLIGHT_EFFECT_RAINBOW_SWIRL - //#define RGBLIGHT_EFFECT_SNAKE - #define RGBLIGHT_EFFECT_KNIGHT - //#define RGBLIGHT_EFFECT_CHRISTMAS - #define RGBLIGHT_EFFECT_STATIC_GRADIENT - //#define RGBLIGHT_EFFECT_RGB_TEST - //#define RGBLIGHT_EFFECT_ALTERNATING -#endif \ No newline at end of file +#define RGBLED_NUM 69 // Number of LEDs +#define RGBLIGHT_SPLIT +#define RGBLED_SPLIT { 48, 21 } diff --git a/keyboards/naked48/keymaps/salicylic_with_setta21/keymap.c b/keyboards/naked48/keymaps/salicylic_with_setta21/keymap.c index 18293e63eaef..d04b53d7babd 100644 --- a/keyboards/naked48/keymaps/salicylic_with_setta21/keymap.c +++ b/keyboards/naked48/keymaps/salicylic_with_setta21/keymap.c @@ -22,41 +22,27 @@ enum layer_number { }; enum custom_keycodes { - LOWER = SAFE_RANGE, - RAISE, - ADJUST, - KANJI, - RGBRST, + RGB_RST = SAFE_RANGE, SEND_SUM, - SEND_AVERAGE, - SEND_COUNTIF, + SEND_AVE, + SEND_CIF, SEND_MAX, SEND_MIN }; // Fillers to make layering more clear -#define _____ KC_TRNS -#define XXXXX KC_NO - #define KC_CT11 LCTL_T(KC_F11) #define KC_SF12 SFT_T(KC_F12) #define KC_LOEN LT(_LOWER, KC_ENT) #define KC_RASP LT(_RAISE, KC_SPC) -#define KC_SSUM SEND_SUM -#define KC_SAVE SEND_AVERAGE -#define KC_SCOU SEND_COUNTIF -#define KC_SMAX SEND_MAX -#define KC_SMIN SEND_MIN - #define KC_RADO LT(_RAISE, KC_PDOT) #define KC_LOP0 LT(_LOWER, KC_P0) -#define KC_ADNL LT(_ADJUST, KC_NLCK) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT_with_setta21( //,-----------------------------------------------------| |-----------------------------------------------------. |-----------------------------------------------| - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_LBRC, KC_LOP0, KC_P1, KC_P4, KC_P7,KC_ADNL, KC_ESC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_LBRC, KC_LOP0, KC_P1, KC_P4, KC_P7,KC_NLCK, KC_ESC, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, JP_MINS, JP_RBRC, KC_P2, KC_P5, KC_P8,KC_PSLS, KC_F2, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| @@ -68,80 +54,60 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_LOWER] = LAYOUT_with_setta21( //,-----------------------------------------------------| |-----------------------------------------------------. |-----------------------------------------------| - KC_ESC, JP_EXLM, JP_QUES, JP_LBRC, JP_RBRC, JP_TILD, KC_6, KC_7, KC_8, KC_9, JP_ASTR, JP_SLSH, LOWER, XXXXX,KC_LEFT, XXXXX, XXXXX, KC_ESC, + KC_ESC, JP_EXLM, JP_QUES, JP_LBRC, JP_RBRC, JP_TILD, KC_6, KC_7, KC_8, KC_9, JP_ASTR, JP_SLSH, MO(_LOWER),XXXXXXX,KC_LEFT,XXXXXXX,XXXXXXX, KC_ESC, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| - JP_QUOT, JP_HASH, JP_DQT, JP_LPRN, JP_RPRN, JP_AT, XXXXX, KC_4, KC_5, KC_6, JP_MINS, JP_EQL, KC_DOWN,KC_DOWN, KC_UP,KC_PSLS, KC_F2, + JP_QUOT, JP_HASH, JP_DQT, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_4, KC_5, KC_6, JP_MINS, JP_EQL, KC_DOWN,KC_DOWN, KC_UP,KC_PSLS, KC_F2, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| - JP_CIRC, JP_PERC, JP_AMPR, JP_SCLN, JP_COLN, JP_PIPE, KC_0, KC_1, KC_2, KC_3, JP_PLUS, KC_ENT, RAISE, XXXXX,KC_RIGHT, XXXXX,KC_PAST, JP_EQL, + JP_CIRC, JP_PERC, JP_AMPR, JP_SCLN, JP_COLN, JP_PIPE, KC_0, KC_1, KC_2, KC_3, JP_PLUS, KC_ENT, MO(_RAISE),XXXXXXX,KC_RIGHT,XXXXXXX,KC_PAST, JP_EQL, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| - _____, _____, _____, KC_ZKHK, LOWER, _____, _____, RAISE, KC_0, JP_DOT, _____, _____, KC_PENT, KC_PPLS,KC_PMNS, KC_DEL + _______, _______, _______, KC_ZKHK,MO(_LOWER),_______,_______,MO(_RAISE),JP_DOT, _______, _______, _______, KC_PENT, KC_PPLS,KC_PMNS, KC_DEL //`------------------------------------------------------------------------------------------------------------' |-----------------------------------------------| ), [_RAISE] = LAYOUT_with_setta21( //,-----------------------------------------------------| |-----------------------------------------------------. |-----------------------------------------------| - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, XXXXX, KC_UP, XXXXX, KC_PGUP, KC_DEL, LOWER, KC_F11, KC_F4, KC_F7,KC_SMIN, KC_ESC, + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, XXXXXXX, KC_UP, XXXXXXX, KC_PGUP, KC_DEL, _______, KC_F11, KC_F4, KC_F7,SEND_MIN, KC_ESC, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| - KC_CT11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXX, KC_LEFT, KC_DOWN,KC_RIGHT, KC_LSFT, KC_ENT, KC_F12, KC_F5, KC_F8,KC_SMAX, KC_F2, + KC_CT11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, KC_LEFT, KC_DOWN,KC_RIGHT, KC_LSFT, KC_ENT, KC_F12, KC_F5, KC_F8,SEND_MAX, KC_F2, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| - KC_SF12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXX, XXXXX, XXXXX, XXXXX, KC_PGDN, XXXXX, RAISE, KC_F3, KC_F6, KC_F9,KC_SCOU, JP_EQL, + KC_SF12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGDN, XXXXXXX, _______, KC_F3, KC_F6, KC_F9,SEND_CIF, JP_EQL, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| - _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, JP_RPRN, KC_SSUM,KC_SAVE, KC_DEL + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, JP_RPRN, SEND_SUM,SEND_AVE, KC_DEL //`------------------------------------------------------------------------------------------------------------' |-----------------------------------------------| ), [_ADJUST] = LAYOUT_with_setta21( /* Base */ //,-----------------------------------------------------| |-----------------------------------------------------. |-----------------------------------------------| - _____, _____, _____, _____, _____, _____, _____, KC_7, KC_8, KC_9, KC_0, _____, LOWER,RGB_VAD,RGB_HUD,RGB_SAD, ADJUST,RGB_TOG, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_RST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______,RGB_VAD,RGB_HUD,RGB_SAD,XXXXXXX,_______, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| - _____, _____, _____, _____, _____, _____, RGB_TOG, RGB_MOD, XXXXX,LCA(KC_DEL),LALT(KC_PSCR),KC_PSCR, RGB_VAI,RGB_HUI,RGB_SAI, XXXXX, _____, + KC_LCTRL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, RGB_MOD, XXXXXXX,LCA(KC_DEL),LALT(KC_PSCR),KC_PSCR, RGB_VAI,RGB_HUI,RGB_SAI,XXXXXXX,_______, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| - _____, _____, _____, _____, _____, _____, RGB_VAD, RGB_VAI, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RAISE, XXXXX, XXXXX, XXXXX, XXXXX, _____, + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_VAD, RGB_VAI, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, _______,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,_______, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| - _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, RGB_MOD, _____, _____, _____ + _______, _______, _______, _______, _______, RESET, RESET, _______, _______, _______, _______, _______, RGB_MOD, RGB_TOG,_______,_______ //`------------------------------------------------------------------------------------------------------------' |-----------------------------------------------| ) }; -static inline void update_change_layer(bool pressed, uint8_t layer1, uint8_t layer2, uint8_t layer3) { - - pressed ? layer_on(layer1) : layer_off(layer1); - IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2) ? layer_on(layer3) : layer_off(layer3); +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } int RGB_current_mode; bool process_record_user(uint16_t keycode, keyrecord_t *record) { - bool result = false; switch (keycode) { - case LOWER: - update_change_layer(record->event.pressed, _LOWER, _RAISE, _ADJUST); - break; - case RAISE: - update_change_layer(record->event.pressed, _RAISE, _LOWER, _ADJUST); - break; - case KANJI: - if (record->event.pressed) { - if (keymap_config.swap_lalt_lgui == false) { - register_code(KC_LANG2); - } else { - SEND_STRING(SS_LALT("`")); - } - } else { - unregister_code(KC_LANG2); - } - break; case SEND_SUM: if (record->event.pressed) { SEND_STRING("_SUM*"); } break; - case SEND_AVERAGE: + case SEND_AVE: if (record->event.pressed) { SEND_STRING("_AVERAGE*"); } break; - case SEND_COUNTIF: + case SEND_CIF: if (record->event.pressed) { SEND_STRING("_COUNTIF*"); } @@ -164,7 +130,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { RGB_current_mode = rgblight_config.mode; } break; - case RGBRST: + case RGB_RST: if (record->event.pressed) { eeconfig_update_rgblight_default(); rgblight_enable(); @@ -181,7 +147,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } void matrix_init_user(void) { - #ifdef RGBLIGHT_ENABLE - RGB_current_mode = rgblight_config.mode; - #endif + } + diff --git a/keyboards/naked48/keymaps/salicylic_with_setta21/rules.mk b/keyboards/naked48/keymaps/salicylic_with_setta21/rules.mk index ee538432e908..e69de29bb2d1 100644 --- a/keyboards/naked48/keymaps/salicylic_with_setta21/rules.mk +++ b/keyboards/naked48/keymaps/salicylic_with_setta21/rules.mk @@ -1,29 +0,0 @@ - -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -SWAP_HANDS_ENABLE = no # Enable one-hand typing - -# If your custom naked48 pcb, you can rewrite to yes. -LED_ANIMATIONS = yes # LED animations - -ifeq ($(strip $(LED_ANIMATIONS)), yes) - # OPT_DEFS += -DRGBLIGHT_ANIMATIONS - OPT_DEFS += -DLED_ANIMATIONS -endif - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/naked48/naked48.c b/keyboards/naked48/naked48.c index dbb77f21d619..dc516e98f4ee 100644 --- a/keyboards/naked48/naked48.c +++ b/keyboards/naked48/naked48.c @@ -1 +1,6 @@ #include "naked48.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + diff --git a/keyboards/naked48/naked48.h b/keyboards/naked48/naked48.h index 891f9301ee96..1c715eb24a2d 100644 --- a/keyboards/naked48/naked48.h +++ b/keyboards/naked48/naked48.h @@ -1,12 +1,7 @@ #pragma once -#ifdef KEYBOARD_naked48_rev1 - #include "rev1.h" -#endif - #include "quantum.h" -#ifdef PROTOCOL_LUFA -#include "lufa.h" -#include "split_util.h" +#ifdef KEYBOARD_naked48_rev1 + #include "rev1.h" #endif diff --git a/keyboards/naked48/readme.md b/keyboards/naked48/readme.md index a6946d9093fe..bb16571efde3 100644 --- a/keyboards/naked48/readme.md +++ b/keyboards/naked48/readme.md @@ -5,8 +5,8 @@ This is 48 keys modification Ortholinear keyboard. Keyboard Maintainer: [Salicylic_acid3](/~https://github.com/Salicylic-acid3) -Hardware Supported: The PCBs, controllers supported -Hardware Availability: links to where you can find this hardware +Hardware Supported: Naked60BMP PCB, Pro Micro +Hardware Availability: [PCB & Case Data](/~https://github.com/Salicylic-acid3/PCB_Data), [Booth Shop](https://salicylic-acid3.booth.pm/items/1271568) Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/naked48/rev1/config.h b/keyboards/naked48/rev1/config.h index 5d1c28d090b3..9afa87511b7f 100644 --- a/keyboards/naked48/rev1/config.h +++ b/keyboards/naked48/rev1/config.h @@ -18,6 +18,8 @@ along with this program. If not, see . #pragma once +#include QMK_KEYBOARD_CONFIG_H + /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x3060 @@ -26,57 +28,31 @@ along with this program. If not, see . #define PRODUCT naked48 #define DESCRIPTION Ortholinear 48 Keys Keyboard -/* Use I2C or Serial */ -//#define USE_I2C -#define USE_SERIAL -//#define USE_MATRIX_I2C - -/* Select hand configuration */ -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - -// OLED support -// see ./rules.mk: OLED_ENABLE=yes or no -#ifdef OLED_ENABLE - #define SSD1306OLED -#endif - /* key matrix size */ #define MATRIX_ROWS 8 -#define MATRIX_COLS 14 - -// Rows are doubled-up -#define MATRIX_ROW_PINS { D1, D0, D4, C6 } +#define MATRIX_COLS 12 // wiring of each half +#define MATRIX_ROW_PINS { D1, D0, D4, C6 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6, D7, E6, B4, B5 } -// #define MATRIX_COL_PINS { B5, B4, E6, D7, D6, B2, B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order - -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST - -/* number of backlight levels */ -// #define BACKLIGHT_LEVELS 3 +// When using Nafuda, comment out MATRIX_ROW_PINS_RIGHT and MATRIX_COL_PINS_RIGHT. +#define MATRIX_ROW_PINS_RIGHT { D4, C6, D7, E6 } +#define MATRIX_COL_PINS_RIGHT { F4, F5, F6, F7, B1, B3, B2, B6, B4, B5, B2, B2 } /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 +/* serial.c configuration for split keyboard */ +#define SOFT_SERIAL_PIN D2 + /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -//#define LOCKING_SUPPORT_ENABLE +#define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ -//#define LOCKING_RESYNC_ENABLE +#define LOCKING_RESYNC_ENABLE /* ws2812 RGB LED */ #define RGB_DI_PIN D3 -#define RGBLIGHT_TIMER -#define ws2812_PORTREG PORTD -#define ws2812_DDRREG DDRD - -// naked48 keyboard RGB LED support -//#define RGBLIGHT_ANIMATIONS : see ./rules.mk: LED_ANIMATIONS = yes or no -// see ./rules.mk: LED_BACK_ENABLE or LED_UNDERGLOW_ENABLE set yes -#define RGBLED_NUM 48 +#define RGBLIGHT_ANIMATIONS #ifndef IOS_DEVICE_ENABLE #define RGBLIGHT_LIMIT_VAL 180 @@ -88,6 +64,19 @@ along with this program. If not, see . #define RGBLIGHT_HUE_STEP 10 #define RGBLIGHT_SAT_STEP 17 +// Selection of RGBLIGHT MODE to use. +#if defined(LED_ANIMATIONS) + //#define RGBLIGHT_EFFECT_BREATHING + #define RGBLIGHT_EFFECT_RAINBOW_MOOD + #define RGBLIGHT_EFFECT_RAINBOW_SWIRL + //#define RGBLIGHT_EFFECT_SNAKE + #define RGBLIGHT_EFFECT_KNIGHT + //#define RGBLIGHT_EFFECT_CHRISTMAS + #define RGBLIGHT_EFFECT_STATIC_GRADIENT + //#define RGBLIGHT_EFFECT_RGB_TEST + //#define RGBLIGHT_EFFECT_ALTERNATING +#endif + #if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE) // USB_MAX_POWER_CONSUMPTION value for naked48 keyboard // 120 RGBoff, OLEDoff @@ -101,21 +90,3 @@ along with this program. If not, see . // iOS device need lessthan 100 #define USB_MAX_POWER_CONSUMPTION 100 #endif - -/* - * 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 diff --git a/keyboards/naked48/rev1/matrix.c b/keyboards/naked48/rev1/matrix.c deleted file mode 100644 index 8685a8125e49..000000000000 --- a/keyboards/naked48/rev1/matrix.c +++ /dev/null @@ -1,357 +0,0 @@ -/* -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 . -*/ - -/* - * scan matrix - */ -#include -#include -#include -#include -#include -#include -#include -#include "print.h" -#include "debug.h" -#include "util.h" -#include "matrix.h" -#include "split_util.h" -#include "pro_micro.h" - -#ifdef USE_MATRIX_I2C -# include "i2c.h" -#else // USE_SERIAL -# include "split_scomm.h" -#endif - -#ifndef DEBOUNCE -# define DEBOUNCE 5 -#endif - -#define ERROR_DISCONNECT_COUNT 5 - -static uint8_t debouncing = DEBOUNCE; -static const int ROWS_PER_HAND = MATRIX_ROWS/2; -static uint8_t error_count = 0; -uint8_t is_master = 0 ; - -static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; -static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; - -/* matrix state(1:on, 0:off) */ -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); -static uint8_t matrix_master_scan(void); - - -__attribute__ ((weak)) -void matrix_init_kb(void) { - matrix_init_user(); -} - -__attribute__ ((weak)) -void matrix_scan_kb(void) { - matrix_scan_user(); -} - -__attribute__ ((weak)) -void matrix_init_user(void) { -} - -__attribute__ ((weak)) -void matrix_scan_user(void) { -} - -inline -uint8_t matrix_rows(void) -{ - return MATRIX_ROWS; -} - -inline -uint8_t matrix_cols(void) -{ - return MATRIX_COLS; -} - -void matrix_init(void) -{ - debug_enable = true; - debug_matrix = true; - debug_mouse = true; - // initialize row and col - unselect_rows(); - init_cols(); - - TX_RX_LED_INIT; - TXLED0; - RXLED0; - - // initialize matrix state: all keys off - for (uint8_t i=0; i < MATRIX_ROWS; i++) { - matrix[i] = 0; - matrix_debouncing[i] = 0; - } - - is_master = has_usb(); - - 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); - - 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(); - } - - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { - for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { - matrix[i+offset] = matrix_debouncing[i+offset]; - } - } - } - - return 1; -} - -#ifdef USE_MATRIX_I2C - -// Get rows from other half over i2c -int i2c_transaction(void) { - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; - - int err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE); - if (err) goto i2c_error; - - // start of matrix stored at 0x00 - err = i2c_master_write(0x00); - if (err) goto i2c_error; - - // Start read - err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ); - if (err) goto i2c_error; - - if (!err) { - int i; - for (i = 0; i < ROWS_PER_HAND-1; ++i) { - matrix[slaveOffset+i] = i2c_master_read(I2C_ACK); - } - matrix[slaveOffset+i] = i2c_master_read(I2C_NACK); - i2c_master_stop(); - } else { -i2c_error: // the cable is disconnceted, or something else went wrong - i2c_reset_state(); - return err; - } - - return 0; -} - -#else // USE_SERIAL - -int serial_transaction(int master_changed) { - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; -#ifdef SERIAL_USE_MULTI_TRANSACTION - int ret=serial_update_buffers(master_changed); -#else - int ret=serial_update_buffers(); -#endif - if (ret ) { - if(ret==2) RXLED1; - return 1; - } - RXLED0; - memcpy(&matrix[slaveOffset], - (void *)serial_slave_buffer, sizeof(serial_slave_buffer)); - return 0; -} -#endif - -uint8_t matrix_scan(void) -{ - if (is_master) { - matrix_master_scan(); - }else{ - matrix_slave_scan(); - int offset = (isLeftHand) ? ROWS_PER_HAND : 0; - memcpy(&matrix[offset], - (void *)serial_master_buffer, sizeof(serial_master_buffer)); - matrix_scan_quantum(); - } - return 1; -} - - -uint8_t matrix_master_scan(void) { - - int ret = _matrix_scan(); - int mchanged = 1; - - int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; - -#ifdef USE_MATRIX_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 - #ifdef SERIAL_USE_MULTI_TRANSACTION - mchanged = memcmp((void *)serial_master_buffer, - &matrix[offset], sizeof(serial_master_buffer)); - #endif - memcpy((void *)serial_master_buffer, - &matrix[offset], sizeof(serial_master_buffer)); -#endif - -#ifdef USE_MATRIX_I2C - if( i2c_transaction() ) { -#else // USE_SERIAL - if( serial_transaction(mchanged) ) { -#endif - // turn on the indicator led when halves are disconnected - TXLED1; - - error_count++; - - if (error_count > ERROR_DISCONNECT_COUNT) { - // reset other half if disconnected - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; - for (int i = 0; i < ROWS_PER_HAND; ++i) { - matrix[slaveOffset+i] = 0; - } - } - } else { - // turn off the indicator led on no error - TXLED0; - error_count = 0; - } - matrix_scan_quantum(); - return ret; -} - -void matrix_slave_scan(void) { - _matrix_scan(); - - int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; - -#ifdef USE_MATRIX_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 - #ifdef SERIAL_USE_MULTI_TRANSACTION - int change = 0; - #endif - for (int i = 0; i < ROWS_PER_HAND; ++i) { - #ifdef SERIAL_USE_MULTI_TRANSACTION - if( serial_slave_buffer[i] != matrix[offset+i] ) - change = 1; - #endif - serial_slave_buffer[i] = matrix[offset+i]; - } - #ifdef SERIAL_USE_MULTI_TRANSACTION - slave_buffer_change_count += change; - #endif -#endif -} - -bool matrix_is_modified(void) -{ - if (debouncing) return false; - return true; -} - -inline -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & ((matrix_row_t)1<> 4) + 1) &= ~_BV(col_pins[x] & 0xF); - _SFR_IO8((col_pins[x] >> 4) + 2) |= _BV(col_pins[x] & 0xF); - } -} - -static matrix_row_t read_cols(void) -{ - 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); - } - return result; -} - -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); - } -} - -static void select_row(uint8_t row) -{ - _SFR_IO8((row_pins[row] >> 4) + 1) |= _BV(row_pins[row] & 0xF); - _SFR_IO8((row_pins[row] >> 4) + 2) &= ~_BV(row_pins[row] & 0xF); -} diff --git a/keyboards/naked48/rev1/rev1.c b/keyboards/naked48/rev1/rev1.c index b5f6532b2e6a..e127232d80e6 100644 --- a/keyboards/naked48/rev1/rev1.c +++ b/keyboards/naked48/rev1/rev1.c @@ -1,15 +1,36 @@ #include "naked48.h" - -#ifdef SSD1306OLED +/*#ifdef SSD1306OLED 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); + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + //led_set_user(usb_led); } +#endif*/ + +#ifdef RGB_MATRIX_ENABLE + led_config_t g_led_config = { { + // Key Matrix to LED Index + { 0,47,42,41,36,35,30,29,24,23,18,17 }, + { 1,46,43,40,37,34,31,28,25,22,19,16 }, + { 2,45,44,39,38,33,32,27,26,21,20,15 }, + { 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14 } + }, { + // LED Index to Physical Position + { 0, 0 }, { 0, 21 }, { 0, 43 }, { 17, 64 }, { 34, 64 },{ 52, 64 }, { 69, 64 }, { 86, 64 }, { 103, 64 }, { 121, 64 }, + { 138, 64 }, { 155, 64 }, { 172, 64 }, { 190, 64 }, { 207, 64 },{ 224, 43 }, { 224, 21 }, { 224, 0 }, { 207, 0 }, { 207, 21 }, + { 207, 43 }, { 190, 43 }, { 190, 21 }, { 190, 0 }, { 172, 0 },{ 172, 21 }, { 172, 43 }, { 155, 43 }, { 155, 21 }, { 155, 0 }, + { 138, 0 }, { 138, 21 }, { 138, 43 }, { 86, 43 }, { 86, 21 },{ 86, 0 }, { 69, 0 }, { 69, 21 }, { 69, 43 }, { 52, 43 }, + { 52, 21 }, { 52, 0 }, { 34, 0 }, { 34, 21 }, { 34, 43 },{ 17, 43 }, { 17, 21 }, { 17, 0 } + }, { + // LED Index to Flag + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4 +} }; #endif void matrix_init_kb(void) { - matrix_init_user(); -}; - +}; \ No newline at end of file diff --git a/keyboards/naked48/rev1/rev1.h b/keyboards/naked48/rev1/rev1.h index 914459a8a583..de58f8f924fe 100644 --- a/keyboards/naked48/rev1/rev1.h +++ b/keyboards/naked48/rev1/rev1.h @@ -3,12 +3,19 @@ #include "naked48.h" #include "quantum.h" - #ifdef RGBLIGHT_ENABLE //rgb led driver #include "ws2812.h" #endif +#ifdef USE_I2C +#include +#ifdef __AVR__ + #include + #include +#endif +#endif + ////////////////////////////////////////////////////////////////////////////// // When only use Naked48. ////////////////////////////////////////////////////////////////////////////// @@ -52,14 +59,14 @@ L30, L31, L32, L33, L34, L35, L36, L37, L38, L39, L3A, L3B, R30, R32, R34, R35 \ ) \ { \ - { L00, L01, L02, L03, L04, L05, L06, L07, L08, L09, L0A, L0B,KC_NO,KC_NO }, \ - { L10, L11, L12, L13, L14, L15, L16, L17, L18, L19, L1A, L1B,KC_NO,KC_NO }, \ - { L20, L21, L22, L23, L24, L25, L26, L27, L28, L29, L2A, L2B,KC_NO,KC_NO }, \ - { L30, L31, L32, L33, L34, L35, L36, L37, L38, L39, L3A, L3B,KC_NO,KC_NO }, \ - { R00, R01, R02, R03, R04, R05,KC_NO,KC_NO,KC_NO, R11, R12, R13, R14, R15 }, \ - { R20, R21, R22, R23, R24, R25,KC_NO,KC_NO, R30,KC_NO, R32,KC_NO, R34, R35 }, \ - {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ - {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO } \ + { L00, L01, L02, L03, L04, L05, L06, L07, L08, L09, L0A, L0B }, \ + { L10, L11, L12, L13, L14, L15, L16, L17, L18, L19, L1A, L1B }, \ + { L20, L21, L22, L23, L24, L25, L26, L27, L28, L29, L2A, L2B }, \ + { L30, L31, L32, L33, L34, L35, L36, L37, L38, L39, L3A, L3B }, \ + { R00, R01, R02, R03, R04, R05,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + {KC_NO, R11, R12, R13, R14, R15,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + { R20, R21, R22, R23, R24, R25,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + { R30,KC_NO, R32,KC_NO, R34, R35,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO } \ } ////////////////////////////////////////////////////////////////////////////// @@ -73,13 +80,13 @@ L30, L31, L32, L33, L34, L35, L36, L37, L38, L39, L3A, L3B \ ) \ { \ - { L00, L01, L02, L03, L04, L05, L06, L07, L08, L09, L0A, L0B,KC_NO,KC_NO }, \ - { L10, L11, L12, L13, L14, L15, L16, L17, L18, L19, L1A, L1B,KC_NO,KC_NO }, \ - { L20, L21, L22, L23, L24, L25, L26, L27, L28, L29, L2A, L2B,KC_NO,KC_NO }, \ - { L30, L31, L32, L33, L34, L35, L36, L37, L38, L39, L3A, L3B,KC_NO,KC_NO }, \ - {KC_NO, R01,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, R10, R11, R12,KC_NO,KC_NO,KC_NO }, \ - { R20, R21, R22,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ - {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ - {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO } \ + { L00, L01, L02, L03, L04, L05, L06, L07, L08, L09, L0A, L0B }, \ + { L10, L11, L12, L13, L14, L15, L16, L17, L18, L19, L1A, L1B }, \ + { L20, L21, L22, L23, L24, L25, L26, L27, L28, L29, L2A, L2B }, \ + { L30, L31, L32, L33, L34, L35, L36, L37, L38, L39, L3A, L3B }, \ + {KC_NO, R01,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + { R10, R11, R12,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + { R20, R21, R22,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO } \ } diff --git a/keyboards/naked48/rev1/rules.mk b/keyboards/naked48/rev1/rules.mk index a71181033383..e69de29bb2d1 100644 --- a/keyboards/naked48/rev1/rules.mk +++ b/keyboards/naked48/rev1/rules.mk @@ -1,3 +0,0 @@ -SRC += matrix.c \ - split_util.c \ - split_scomm.c diff --git a/keyboards/naked48/rev1/serial_config.h b/keyboards/naked48/rev1/serial_config.h deleted file mode 100644 index 37135213d55f..000000000000 --- a/keyboards/naked48/rev1/serial_config.h +++ /dev/null @@ -1,8 +0,0 @@ -//// #error rev2 serial config - -#ifndef SOFT_SERIAL_PIN -/* Soft Serial defines */ -#define SOFT_SERIAL_PIN D2 - -#define SERIAL_USE_MULTI_TRANSACTION -#endif diff --git a/keyboards/naked48/rev1/serial_config_simpleapi.h b/keyboards/naked48/rev1/serial_config_simpleapi.h deleted file mode 100644 index e2d22a41e7bc..000000000000 --- a/keyboards/naked48/rev1/serial_config_simpleapi.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef SERIAL_CONFIG_SIMPLEAPI_H -#define SERIAL_CONFIG_SIMPLEAPI_H - -#undef SERIAL_USE_MULTI_TRANSACTION -#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 -#define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2 - -#endif // SERIAL_CONFIG_SIMPLEAPI_H diff --git a/keyboards/naked48/rev1/split_scomm.c b/keyboards/naked48/rev1/split_scomm.c deleted file mode 100644 index ada7867960b9..000000000000 --- a/keyboards/naked48/rev1/split_scomm.c +++ /dev/null @@ -1,92 +0,0 @@ -#ifdef USE_SERIAL -#ifdef SERIAL_USE_MULTI_TRANSACTION -/* --- USE flexible API (using multi-type transaction function) --- */ - -#include -#include -#include -#include -#include "serial.h" -#ifdef CONSOLE_ENABLE - #include -#endif - -uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; -uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; -uint8_t volatile status_com = 0; -uint8_t volatile status1 = 0; -uint8_t slave_buffer_change_count = 0; -uint8_t s_change_old = 0xff; -uint8_t s_change_new = 0xff; - -SSTD_t transactions[] = { -#define GET_SLAVE_STATUS 0 - /* master buffer not changed, only recive slave_buffer_change_count */ - { (uint8_t *)&status_com, - 0, NULL, - sizeof(slave_buffer_change_count), &slave_buffer_change_count, - }, -#define PUT_MASTER_GET_SLAVE_STATUS 1 - /* master buffer changed need send, and recive slave_buffer_change_count */ - { (uint8_t *)&status_com, - sizeof(serial_master_buffer), (uint8_t *)serial_master_buffer, - sizeof(slave_buffer_change_count), &slave_buffer_change_count, - }, -#define GET_SLAVE_BUFFER 2 - /* recive serial_slave_buffer */ - { (uint8_t *)&status1, - 0, NULL, - sizeof(serial_slave_buffer), (uint8_t *)serial_slave_buffer - } -}; - -void serial_master_init(void) -{ - soft_serial_initiator_init(transactions, TID_LIMIT(transactions)); -} - -void serial_slave_init(void) -{ - soft_serial_target_init(transactions, TID_LIMIT(transactions)); -} - -// 0 => no error -// 1 => slave did not respond -// 2 => checksum error -int serial_update_buffers(int master_update) -{ - int status, smatstatus; - static int need_retry = 0; - - if( s_change_old != s_change_new ) { - smatstatus = soft_serial_transaction(GET_SLAVE_BUFFER); - if( smatstatus == TRANSACTION_END ) { - s_change_old = s_change_new; -#ifdef CONSOLE_ENABLE - uprintf("slave matrix = %b %b %b %b %b\n", - serial_slave_buffer[0], serial_slave_buffer[1], - serial_slave_buffer[2], serial_slave_buffer[3], - serial_slave_buffer[4] ); -#endif - } - } else { - // serial_slave_buffer dosen't change - smatstatus = TRANSACTION_END; // dummy status - } - - if( !master_update && !need_retry) { - status = soft_serial_transaction(GET_SLAVE_STATUS); - } else { - status = soft_serial_transaction(PUT_MASTER_GET_SLAVE_STATUS); - } - if( status == TRANSACTION_END ) { - s_change_new = slave_buffer_change_count; - need_retry = 0; - } else { - need_retry = 1; - } - return smatstatus; -} - -#endif // SERIAL_USE_MULTI_TRANSACTION -#endif /* USE_SERIAL */ diff --git a/keyboards/naked48/rev1/split_scomm.h b/keyboards/naked48/rev1/split_scomm.h deleted file mode 100644 index 537ec4080828..000000000000 --- a/keyboards/naked48/rev1/split_scomm.h +++ /dev/null @@ -1,22 +0,0 @@ -#pragma once - -#ifndef SERIAL_USE_MULTI_TRANSACTION -/* --- USE Simple API (OLD API, compatible with let's split serial.c) --- */ -#include "serial.h" - -#else -/* --- USE flexible API (using multi-type transaction function) --- */ -// Buffers for master - slave communication -#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 -#define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2 - -extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; -extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; -extern uint8_t slave_buffer_change_count; - -void serial_master_init(void); -void serial_slave_init(void); -int serial_update_buffers(int master_changed); - -#endif - diff --git a/keyboards/naked48/rev1/split_util.c b/keyboards/naked48/rev1/split_util.c deleted file mode 100644 index e1ff8b4379dc..000000000000 --- a/keyboards/naked48/rev1/split_util.c +++ /dev/null @@ -1,70 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include "split_util.h" -#include "matrix.h" -#include "keyboard.h" - -#ifdef USE_MATRIX_I2C -# include "i2c.h" -#else -# include "split_scomm.h" -#endif - -volatile bool isLeftHand = true; - -static void setup_handedness(void) { - #ifdef EE_HANDS - isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS); - #else - // I2C_MASTER_RIGHT is deprecated, use MASTER_RIGHT instead, since this works for both serial and i2c - #if defined(I2C_MASTER_RIGHT) || defined(MASTER_RIGHT) - isLeftHand = !has_usb(); - #else - isLeftHand = has_usb(); - #endif - #endif -} - -static void keyboard_master_setup(void) { - -#ifdef USE_MATRIX_I2C - i2c_master_init(); -#else - serial_master_init(); -#endif -} - -static void keyboard_slave_setup(void) { - -#ifdef USE_MATRIX_I2C - i2c_slave_init(SLAVE_I2C_ADDRESS); -#else - serial_slave_init(); -#endif -} - -bool has_usb(void) { - USBCON |= (1 << OTGPADE); //enables VBUS pad - _delay_us(5); - return (USBSTA & (1< -#include "eeconfig.h" - -#define SLAVE_I2C_ADDRESS 0x32 - -extern volatile bool isLeftHand; - -// slave version of matix scan, defined in matrix.c -void matrix_slave_scan(void); - -void split_keyboard_setup(void); -bool has_usb(void); - -void matrix_master_OLED_init (void); diff --git a/keyboards/naked48/rules.mk b/keyboards/naked48/rules.mk index 53e2dfc21cc5..4427284e7f3a 100644 --- a/keyboards/naked48/rules.mk +++ b/keyboards/naked48/rules.mk @@ -1,46 +1,14 @@ -# SRC += i2c.c -QUANTUM_LIB_SRC += serial.c -# SRC += ssd1306.c - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina # Interrupt driven control endpoint task(+60) @@ -51,22 +19,22 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT # the appropriate keymap folder that will get included automatically # BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) +MOUSEKEY_ENABLE = no # 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 +COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -SUBPROJECT_rev1 = no -USE_I2C = no +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +OLED_DRIVER_ENABLE = no +# USE_I2C = yes # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -CUSTOM_MATRIX = yes +SPLIT_KEYBOARD = yes DEFAULT_FOLDER = naked48/rev1 diff --git a/keyboards/naked48/serial.c b/keyboards/naked48/serial.c deleted file mode 100644 index 6006ebf1bdb2..000000000000 --- a/keyboards/naked48/serial.c +++ /dev/null @@ -1,590 +0,0 @@ -/* - * WARNING: be careful changing this code, it is very timing dependent - * - * 2018-10-28 checked - * avr-gcc 4.9.2 - * avr-gcc 5.4.0 - * avr-gcc 7.3.0 - */ - -#ifndef F_CPU -#define F_CPU 16000000 -#endif - -#include -#include -#include -#include -#include -#include "serial.h" -//#include - -#ifdef SOFT_SERIAL_PIN - -#ifdef __AVR_ATmega32U4__ - // if using ATmega32U4 I2C, can not use PD0 and PD1 in soft serial. - #ifdef USE_I2C - #if SOFT_SERIAL_PIN == D0 || SOFT_SERIAL_PIN == D1 - #error Using ATmega32U4 I2C, so can not use PD0, PD1 - #endif - #endif - - #if SOFT_SERIAL_PIN >= D0 && SOFT_SERIAL_PIN <= D3 - #define SERIAL_PIN_DDR DDRD - #define SERIAL_PIN_PORT PORTD - #define SERIAL_PIN_INPUT PIND - #if SOFT_SERIAL_PIN == D0 - #define SERIAL_PIN_MASK _BV(PD0) - #define EIMSK_BIT _BV(INT0) - #define EICRx_BIT (~(_BV(ISC00) | _BV(ISC01))) - #define SERIAL_PIN_INTERRUPT INT0_vect - #elif SOFT_SERIAL_PIN == D1 - #define SERIAL_PIN_MASK _BV(PD1) - #define EIMSK_BIT _BV(INT1) - #define EICRx_BIT (~(_BV(ISC10) | _BV(ISC11))) - #define SERIAL_PIN_INTERRUPT INT1_vect - #elif SOFT_SERIAL_PIN == D2 - #define SERIAL_PIN_MASK _BV(PD2) - #define EIMSK_BIT _BV(INT2) - #define EICRx_BIT (~(_BV(ISC20) | _BV(ISC21))) - #define SERIAL_PIN_INTERRUPT INT2_vect - #elif SOFT_SERIAL_PIN == D3 - #define SERIAL_PIN_MASK _BV(PD3) - #define EIMSK_BIT _BV(INT3) - #define EICRx_BIT (~(_BV(ISC30) | _BV(ISC31))) - #define SERIAL_PIN_INTERRUPT INT3_vect - #endif - #elif SOFT_SERIAL_PIN == E6 - #define SERIAL_PIN_DDR DDRE - #define SERIAL_PIN_PORT PORTE - #define SERIAL_PIN_INPUT PINE - #define SERIAL_PIN_MASK _BV(PE6) - #define EIMSK_BIT _BV(INT6) - #define EICRx_BIT (~(_BV(ISC60) | _BV(ISC61))) - #define SERIAL_PIN_INTERRUPT INT6_vect - #else - #error invalid SOFT_SERIAL_PIN value - #endif - -#else - #error serial.c now support ATmega32U4 only -#endif - -//////////////// for backward compatibility //////////////////////////////// -#if !defined(SERIAL_USE_SINGLE_TRANSACTION) && !defined(SERIAL_USE_MULTI_TRANSACTION) -/* --- USE OLD API (compatible with let's split serial.c) */ - #if SERIAL_SLAVE_BUFFER_LENGTH > 0 - uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; - #endif - #if SERIAL_MASTER_BUFFER_LENGTH > 0 - uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; - #endif - uint8_t volatile status0 = 0; - -SSTD_t transactions[] = { - { (uint8_t *)&status0, - #if SERIAL_MASTER_BUFFER_LENGTH > 0 - sizeof(serial_master_buffer), (uint8_t *)serial_master_buffer, - #else - 0, (uint8_t *)NULL, - #endif - #if SERIAL_SLAVE_BUFFER_LENGTH > 0 - sizeof(serial_slave_buffer), (uint8_t *)serial_slave_buffer - #else - 0, (uint8_t *)NULL, - #endif - } -}; - -void serial_master_init(void) -{ soft_serial_initiator_init(transactions, TID_LIMIT(transactions)); } - -void serial_slave_init(void) -{ soft_serial_target_init(transactions, TID_LIMIT(transactions)); } - -// 0 => no error -// 1 => slave did not respond -// 2 => checksum error -int serial_update_buffers() -{ - int result; - result = soft_serial_transaction(); - return result; -} - -#endif // end of OLD API (compatible with let's split serial.c) -//////////////////////////////////////////////////////////////////////////// - -#define ALWAYS_INLINE __attribute__((always_inline)) -#define NO_INLINE __attribute__((noinline)) -#define _delay_sub_us(x) __builtin_avr_delay_cycles(x) - -// parity check -#define ODD_PARITY 1 -#define EVEN_PARITY 0 -#define PARITY EVEN_PARITY - -#ifdef SERIAL_DELAY - // custom setup in config.h - // #define TID_SEND_ADJUST 2 - // #define SERIAL_DELAY 6 // micro sec - // #define READ_WRITE_START_ADJUST 30 // cycles - // #define READ_WRITE_WIDTH_ADJUST 8 // cycles -#else -// ============ Standard setups ============ - -#ifndef SELECT_SOFT_SERIAL_SPEED -#define SELECT_SOFT_SERIAL_SPEED 1 -// 0: about 189kbps -// 1: about 137kbps (default) -// 2: about 75kbps -// 3: about 39kbps -// 4: about 26kbps -// 5: about 20kbps -#endif - -#if __GNUC__ < 6 - #define TID_SEND_ADJUST 14 -#else - #define TID_SEND_ADJUST 2 -#endif - -#if SELECT_SOFT_SERIAL_SPEED == 0 - // Very High speed - #define SERIAL_DELAY 4 // micro sec - #if __GNUC__ < 6 - #define READ_WRITE_START_ADJUST 33 // cycles - #define READ_WRITE_WIDTH_ADJUST 3 // cycles - #else - #define READ_WRITE_START_ADJUST 34 // cycles - #define READ_WRITE_WIDTH_ADJUST 7 // cycles - #endif -#elif SELECT_SOFT_SERIAL_SPEED == 1 - // High speed - #define SERIAL_DELAY 6 // micro sec - #if __GNUC__ < 6 - #define READ_WRITE_START_ADJUST 30 // cycles - #define READ_WRITE_WIDTH_ADJUST 3 // cycles - #else - #define READ_WRITE_START_ADJUST 33 // cycles - #define READ_WRITE_WIDTH_ADJUST 7 // cycles - #endif -#elif SELECT_SOFT_SERIAL_SPEED == 2 - // Middle speed - #define SERIAL_DELAY 12 // micro sec - #define READ_WRITE_START_ADJUST 30 // cycles - #if __GNUC__ < 6 - #define READ_WRITE_WIDTH_ADJUST 3 // cycles - #else - #define READ_WRITE_WIDTH_ADJUST 7 // cycles - #endif -#elif SELECT_SOFT_SERIAL_SPEED == 3 - // Low speed - #define SERIAL_DELAY 24 // micro sec - #define READ_WRITE_START_ADJUST 30 // cycles - #if __GNUC__ < 6 - #define READ_WRITE_WIDTH_ADJUST 3 // cycles - #else - #define READ_WRITE_WIDTH_ADJUST 7 // cycles - #endif -#elif SELECT_SOFT_SERIAL_SPEED == 4 - // Very Low speed - #define SERIAL_DELAY 36 // micro sec - #define READ_WRITE_START_ADJUST 30 // cycles - #if __GNUC__ < 6 - #define READ_WRITE_WIDTH_ADJUST 3 // cycles - #else - #define READ_WRITE_WIDTH_ADJUST 7 // cycles - #endif -#elif SELECT_SOFT_SERIAL_SPEED == 5 - // Ultra Low speed - #define SERIAL_DELAY 48 // micro sec - #define READ_WRITE_START_ADJUST 30 // cycles - #if __GNUC__ < 6 - #define READ_WRITE_WIDTH_ADJUST 3 // cycles - #else - #define READ_WRITE_WIDTH_ADJUST 7 // cycles - #endif -#else -#error invalid SELECT_SOFT_SERIAL_SPEED value -#endif /* SELECT_SOFT_SERIAL_SPEED */ -#endif /* SERIAL_DELAY */ - -#define SERIAL_DELAY_HALF1 (SERIAL_DELAY/2) -#define SERIAL_DELAY_HALF2 (SERIAL_DELAY - SERIAL_DELAY/2) - -#define SLAVE_INT_WIDTH_US 1 -#ifndef SERIAL_USE_MULTI_TRANSACTION - #define SLAVE_INT_RESPONSE_TIME SERIAL_DELAY -#else - #define SLAVE_INT_ACK_WIDTH_UNIT 2 - #define SLAVE_INT_ACK_WIDTH 4 -#endif - -static SSTD_t *Transaction_table = NULL; -static uint8_t Transaction_table_size = 0; - -inline static void serial_delay(void) ALWAYS_INLINE; -inline static -void serial_delay(void) { - _delay_us(SERIAL_DELAY); -} - -inline static void serial_delay_half1(void) ALWAYS_INLINE; -inline static -void serial_delay_half1(void) { - _delay_us(SERIAL_DELAY_HALF1); -} - -inline static void serial_delay_half2(void) ALWAYS_INLINE; -inline static -void serial_delay_half2(void) { - _delay_us(SERIAL_DELAY_HALF2); -} - -inline static void serial_output(void) ALWAYS_INLINE; -inline static -void serial_output(void) { - SERIAL_PIN_DDR |= SERIAL_PIN_MASK; -} - -// make the serial pin an input with pull-up resistor -inline static void serial_input_with_pullup(void) ALWAYS_INLINE; -inline static -void serial_input_with_pullup(void) { - SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK; - SERIAL_PIN_PORT |= SERIAL_PIN_MASK; -} - -inline static uint8_t serial_read_pin(void) ALWAYS_INLINE; -inline static -uint8_t serial_read_pin(void) { - return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK); -} - -inline static void serial_low(void) ALWAYS_INLINE; -inline static -void serial_low(void) { - SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK; -} - -inline static void serial_high(void) ALWAYS_INLINE; -inline static -void serial_high(void) { - SERIAL_PIN_PORT |= SERIAL_PIN_MASK; -} - -void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size) -{ - Transaction_table = sstd_table; - Transaction_table_size = (uint8_t)sstd_table_size; - serial_output(); - serial_high(); -} - -void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size) -{ - Transaction_table = sstd_table; - Transaction_table_size = (uint8_t)sstd_table_size; - serial_input_with_pullup(); - - // Enable INT0-INT3,INT6 - EIMSK |= EIMSK_BIT; -#if SERIAL_PIN_MASK == _BV(PE6) - // Trigger on falling edge of INT6 - EICRB &= EICRx_BIT; -#else - // Trigger on falling edge of INT0-INT3 - EICRA &= EICRx_BIT; -#endif -} - -// Used by the sender to synchronize timing with the reciver. -static void sync_recv(void) NO_INLINE; -static -void sync_recv(void) { - for (uint8_t i = 0; i < SERIAL_DELAY*5 && serial_read_pin(); i++ ) { - } - // This shouldn't hang if the target disconnects because the - // serial line will float to high if the target does disconnect. - while (!serial_read_pin()); -} - -// Used by the reciver to send a synchronization signal to the sender. -static void sync_send(void) NO_INLINE; -static -void sync_send(void) { - serial_low(); - serial_delay(); - serial_high(); -} - -// Reads a byte from the serial line -static uint8_t serial_read_chunk(uint8_t *pterrcount, uint8_t bit) NO_INLINE; -static uint8_t serial_read_chunk(uint8_t *pterrcount, uint8_t bit) { - uint8_t byte, i, p, pb; - - _delay_sub_us(READ_WRITE_START_ADJUST); - for( i = 0, byte = 0, p = PARITY; i < bit; i++ ) { - serial_delay_half1(); // read the middle of pulses - if( serial_read_pin() ) { - byte = (byte << 1) | 1; p ^= 1; - } else { - byte = (byte << 1) | 0; p ^= 0; - } - _delay_sub_us(READ_WRITE_WIDTH_ADJUST); - serial_delay_half2(); - } - /* recive parity bit */ - serial_delay_half1(); // read the middle of pulses - pb = serial_read_pin(); - _delay_sub_us(READ_WRITE_WIDTH_ADJUST); - serial_delay_half2(); - - *pterrcount += (p != pb)? 1 : 0; - - return byte; -} - -// Sends a byte with MSB ordering -void serial_write_chunk(uint8_t data, uint8_t bit) NO_INLINE; -void serial_write_chunk(uint8_t data, uint8_t bit) { - uint8_t b, p; - for( p = PARITY, b = 1<<(bit-1); b ; b >>= 1) { - if(data & b) { - serial_high(); p ^= 1; - } else { - serial_low(); p ^= 0; - } - serial_delay(); - } - /* send parity bit */ - if(p & 1) { serial_high(); } - else { serial_low(); } - serial_delay(); - - serial_low(); // sync_send() / senc_recv() need raise edge -} - -static void serial_send_packet(uint8_t *buffer, uint8_t size) NO_INLINE; -static -void serial_send_packet(uint8_t *buffer, uint8_t size) { - for (uint8_t i = 0; i < size; ++i) { - uint8_t data; - data = buffer[i]; - sync_send(); - serial_write_chunk(data,8); - } -} - -static uint8_t serial_recive_packet(uint8_t *buffer, uint8_t size) NO_INLINE; -static -uint8_t serial_recive_packet(uint8_t *buffer, uint8_t size) { - uint8_t pecount = 0; - for (uint8_t i = 0; i < size; ++i) { - uint8_t data; - sync_recv(); - data = serial_read_chunk(&pecount, 8); - buffer[i] = data; - } - return pecount == 0; -} - -inline static -void change_sender2reciver(void) { - sync_send(); //0 - serial_delay_half1(); //1 - serial_low(); //2 - serial_input_with_pullup(); //2 - serial_delay_half1(); //3 -} - -inline static -void change_reciver2sender(void) { - sync_recv(); //0 - serial_delay(); //1 - serial_low(); //3 - serial_output(); //3 - serial_delay_half1(); //4 -} - -static inline uint8_t nibble_bits_count(uint8_t bits) -{ - bits = (bits & 0x5) + (bits >> 1 & 0x5); - bits = (bits & 0x3) + (bits >> 2 & 0x3); - return bits; -} - -// interrupt handle to be used by the target device -ISR(SERIAL_PIN_INTERRUPT) { - -#ifndef SERIAL_USE_MULTI_TRANSACTION - serial_low(); - serial_output(); - SSTD_t *trans = Transaction_table; -#else - // recive transaction table index - uint8_t tid, bits; - uint8_t pecount = 0; - sync_recv(); - bits = serial_read_chunk(&pecount,7); - tid = bits>>3; - bits = (bits&7) != nibble_bits_count(tid); - if( bits || pecount> 0 || tid > Transaction_table_size ) { - return; - } - serial_delay_half1(); - - serial_high(); // response step1 low->high - serial_output(); - _delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT*SLAVE_INT_ACK_WIDTH); - SSTD_t *trans = &Transaction_table[tid]; - serial_low(); // response step2 ack high->low -#endif - - // target send phase - if( trans->target2initiator_buffer_size > 0 ) - serial_send_packet((uint8_t *)trans->target2initiator_buffer, - trans->target2initiator_buffer_size); - // target switch to input - change_sender2reciver(); - - // target recive phase - if( trans->initiator2target_buffer_size > 0 ) { - if (serial_recive_packet((uint8_t *)trans->initiator2target_buffer, - trans->initiator2target_buffer_size) ) { - *trans->status = TRANSACTION_ACCEPTED; - } else { - *trans->status = TRANSACTION_DATA_ERROR; - } - } else { - *trans->status = TRANSACTION_ACCEPTED; - } - - sync_recv(); //weit initiator output to high -} - -///////// -// start transaction by initiator -// -// int soft_serial_transaction(int sstd_index) -// -// Returns: -// TRANSACTION_END -// TRANSACTION_NO_RESPONSE -// TRANSACTION_DATA_ERROR -// this code is very time dependent, so we need to disable interrupts -#ifndef SERIAL_USE_MULTI_TRANSACTION -int soft_serial_transaction(void) { - SSTD_t *trans = Transaction_table; -#else -int soft_serial_transaction(int sstd_index) { - if( sstd_index > Transaction_table_size ) - return TRANSACTION_TYPE_ERROR; - SSTD_t *trans = &Transaction_table[sstd_index]; -#endif - cli(); - - // signal to the target that we want to start a transaction - serial_output(); - serial_low(); - _delay_us(SLAVE_INT_WIDTH_US); - -#ifndef SERIAL_USE_MULTI_TRANSACTION - // wait for the target response - serial_input_with_pullup(); - _delay_us(SLAVE_INT_RESPONSE_TIME); - - // check if the target is present - if (serial_read_pin()) { - // target failed to pull the line low, assume not present - serial_output(); - serial_high(); - *trans->status = TRANSACTION_NO_RESPONSE; - sei(); - return TRANSACTION_NO_RESPONSE; - } - -#else - // send transaction table index - int tid = (sstd_index<<3) | (7 & nibble_bits_count(sstd_index)); - sync_send(); - _delay_sub_us(TID_SEND_ADJUST); - serial_write_chunk(tid, 7); - serial_delay_half1(); - - // wait for the target response (step1 low->high) - serial_input_with_pullup(); - while( !serial_read_pin() ) { - _delay_sub_us(2); - } - - // check if the target is present (step2 high->low) - for( int i = 0; serial_read_pin(); i++ ) { - if (i > SLAVE_INT_ACK_WIDTH + 1) { - // slave failed to pull the line low, assume not present - serial_output(); - serial_high(); - *trans->status = TRANSACTION_NO_RESPONSE; - sei(); - return TRANSACTION_NO_RESPONSE; - } - _delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT); - } -#endif - - // initiator recive phase - // if the target is present syncronize with it - if( trans->target2initiator_buffer_size > 0 ) { - if (!serial_recive_packet((uint8_t *)trans->target2initiator_buffer, - trans->target2initiator_buffer_size) ) { - serial_output(); - serial_high(); - *trans->status = TRANSACTION_DATA_ERROR; - sei(); - return TRANSACTION_DATA_ERROR; - } - } - - // initiator switch to output - change_reciver2sender(); - - // initiator send phase - if( trans->initiator2target_buffer_size > 0 ) { - serial_send_packet((uint8_t *)trans->initiator2target_buffer, - trans->initiator2target_buffer_size); - } - - // always, release the line when not in use - sync_send(); - - *trans->status = TRANSACTION_END; - sei(); - return TRANSACTION_END; -} - -#ifdef SERIAL_USE_MULTI_TRANSACTION -int soft_serial_get_and_clean_status(int sstd_index) { - SSTD_t *trans = &Transaction_table[sstd_index]; - cli(); - int retval = *trans->status; - *trans->status = 0;; - sei(); - return retval; -} -#endif - -#endif - -// Helix serial.c history -// 2018-1-29 fork from let's split and add PD2, modify sync_recv() (#2308, bceffdefc) -// 2018-6-28 bug fix master to slave comm and speed up (#3255, 1038bbef4) -// (adjusted with avr-gcc 4.9.2) -// 2018-7-13 remove USE_SERIAL_PD2 macro (#3374, f30d6dd78) -// (adjusted with avr-gcc 4.9.2) -// 2018-8-11 add support multi-type transaction (#3608, feb5e4aae) -// (adjusted with avr-gcc 4.9.2) -// 2018-10-21 fix serial and RGB animation conflict (#4191, 4665e4fff) -// (adjusted with avr-gcc 7.3.0) -// 2018-10-28 re-adjust compiler depend value of delay (#4269, 8517f8a66) -// (adjusted with avr-gcc 5.4.0, 7.3.0) diff --git a/keyboards/naked48/serial.h b/keyboards/naked48/serial.h deleted file mode 100644 index 5deaf789e30c..000000000000 --- a/keyboards/naked48/serial.h +++ /dev/null @@ -1,86 +0,0 @@ -#pragma once - -#include - -// ///////////////////////////////////////////////////////////////// -// Need Soft Serial defines in config.h -// ///////////////////////////////////////////////////////////////// -// ex. -// #define SOFT_SERIAL_PIN ?? // ?? = D0,D1,D2,D3,E6 -// OPTIONAL: #define SELECT_SOFT_SERIAL_SPEED ? // ? = 1,2,3,4,5 -// // 1: about 137kbps (default) -// // 2: about 75kbps -// // 3: about 39kbps -// // 4: about 26kbps -// // 5: about 20kbps -// -// //// USE OLD API (compatible with let's split serial.c) -// ex. -// #define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 -// #define SERIAL_MASTER_BUFFER_LENGTH 1 -// -// //// USE NEW API -// //// USE simple API (using signle-type transaction function) -// #define SERIAL_USE_SINGLE_TRANSACTION -// //// USE flexible API (using multi-type transaction function) -// #define SERIAL_USE_MULTI_TRANSACTION -// -// ///////////////////////////////////////////////////////////////// - - -//////////////// for backward compatibility //////////////////////////////// -#if !defined(SERIAL_USE_SINGLE_TRANSACTION) && !defined(SERIAL_USE_MULTI_TRANSACTION) -/* --- USE OLD API (compatible with let's split serial.c) */ - #if SERIAL_SLAVE_BUFFER_LENGTH > 0 - extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; - #endif - #if SERIAL_MASTER_BUFFER_LENGTH > 0 - extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; - #endif - - void serial_master_init(void); - void serial_slave_init(void); - int serial_update_buffers(void); - -#endif // end of USE OLD API -//////////////////////////////////////////////////////////////////////////// - -// Soft Serial Transaction Descriptor -typedef struct _SSTD_t { - uint8_t *status; - uint8_t initiator2target_buffer_size; - uint8_t *initiator2target_buffer; - uint8_t target2initiator_buffer_size; - uint8_t *target2initiator_buffer; -} SSTD_t; -#define TID_LIMIT( table ) (sizeof(table) / sizeof(SSTD_t)) - -// initiator is transaction start side -void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size); -// target is interrupt accept side -void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size); - -// initiator resullt -#define TRANSACTION_END 0 -#define TRANSACTION_NO_RESPONSE 0x1 -#define TRANSACTION_DATA_ERROR 0x2 -#define TRANSACTION_TYPE_ERROR 0x4 -#ifndef SERIAL_USE_MULTI_TRANSACTION -int soft_serial_transaction(void); -#else -int soft_serial_transaction(int sstd_index); -#endif - -// target status -// *SSTD_t.status has -// initiator: -// TRANSACTION_END -// or TRANSACTION_NO_RESPONSE -// or TRANSACTION_DATA_ERROR -// target: -// TRANSACTION_DATA_ERROR -// or TRANSACTION_ACCEPTED -#define TRANSACTION_ACCEPTED 0x8 -#ifdef SERIAL_USE_MULTI_TRANSACTION -int soft_serial_get_and_clean_status(int sstd_index); -#endif From bc073b817a155a3148fbc95f982877a623e5f28e Mon Sep 17 00:00:00 2001 From: Sid Carter Date: Sun, 20 Oct 2019 15:26:41 -0400 Subject: [PATCH 141/316] [Keymap] updates to madhatter keymap - project keyboard alice pcb (#7092) * change arrows keys around * move arrows and layer tap * mouse keys and other mods * add readme and add media keys too --- .../alice/keymaps/madhatter/keymap.c | 38 ++++++++++++------- .../alice/keymaps/madhatter/readme.md | 8 ++++ 2 files changed, 33 insertions(+), 13 deletions(-) create mode 100644 keyboards/projectkb/alice/keymaps/madhatter/readme.md diff --git a/keyboards/projectkb/alice/keymaps/madhatter/keymap.c b/keyboards/projectkb/alice/keymaps/madhatter/keymap.c index 0f63a607abe8..bac44f0b3e49 100644 --- a/keyboards/projectkb/alice/keymaps/madhatter/keymap.c +++ b/keyboards/projectkb/alice/keymaps/madhatter/keymap.c @@ -16,28 +16,40 @@ along with this program. If not, see . */ #include QMK_KEYBOARD_H -enum layer_names { +enum my_layers { _QWERTY, - _FNM + _FNMS, + _NAVMED }; -#define FNM MO(_FNM) +#define FNMS MO(_FNMS) +#define SPCNAV LT(_NAVMED, KC_SPC) +#define CAPSTL CTL_T(KC_CAPS) +#define CMDENT CMD_T(KC_ENT) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT_default( - KC_ESC, KC_GESC, 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_DEL, KC_BSPC, + KC_GESC, 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_DEL, KC_BSPC, KC_PGUP, 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_PGDN, KC_GRV, 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_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, FNM, - KC_LCTL, KC_LCMD, KC_ENT, FNM, KC_SPC, KC_RCMD, KC_RCTL + KC_PGDN, CAPSTL, 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_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, FNMS, + KC_LCTL, KC_LALT, CMDENT, FNMS, SPCNAV, KC_RALT, KC_RCTL ), - [_FNM] = LAYOUT_default( - RGB_TOG, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, - RGB_MOD, _______, _______, _______, _______, _______, _______, RGB_SAI, RGB_HUI, RGB_VAI, RGB_SAD, RGB_HUD, RGB_VAD, _______, RESET, - VLK_TOG, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, EEP_RST, - _______, BL_INC, BL_DEC, BL_TOGG, BL_BRTG, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______ + [_FNMS] = LAYOUT_default( + RGB_TOG, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, + RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, KC_MS_U, _______, _______, _______, _______, RESET, + VLK_TOG, _______, _______, _______, _______, _______, _______, KC_BTN1, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN2, _______, _______, + _______, BL_INC, BL_DEC, BL_TOGG, BL_BRTG, _______, RGB_SAI, RGB_HUI, RGB_VAI, RGB_SAD, RGB_HUD, RGB_VAD, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ), + + [_NAVMED] = LAYOUT_default( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MSTP, _______, KC_UP, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, KC_VOLU, KC_VOLD, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, EEP_RST, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ ) }; diff --git a/keyboards/projectkb/alice/keymaps/madhatter/readme.md b/keyboards/projectkb/alice/keymaps/madhatter/readme.md new file mode 100644 index 000000000000..03c20e2fb055 --- /dev/null +++ b/keyboards/projectkb/alice/keymaps/madhatter/readme.md @@ -0,0 +1,8 @@ +# The madhatter keymap + +- A layer for all functions and mouse keys +- A layer for arrows and media +- Arrows on IJKL +- Caps and control on caps lock - wonderful +- Velocikey on the map +- Things to reduce my finger travel just about everywhere From 3dbf08b655ac1f14bc7a5ae2b8cd8ae385063640 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Mon, 21 Oct 2019 06:51:37 +1100 Subject: [PATCH 142/316] Cleanup rules.mk for 32U4 keyboards, H (#7030) * Cleanup rules.mk for 32U4 keyboards, H * Change some boards incorrectly assumed to be halfkay --- keyboards/hadron/ver2/rules.mk | 50 ++---------- keyboards/halberd/rules.mk | 51 +----------- keyboards/handwired/2x5keypad/rules.mk | 10 +++ keyboards/handwired/412_64/rules.mk | 55 ++----------- keyboards/handwired/arrow_pad/rules.mk | 54 +++---------- keyboards/handwired/atreus50/rules.mk | 52 +++---------- keyboards/handwired/cmd60/rules.mk | 57 +++----------- keyboards/handwired/co60/rev1/rules.mk | 39 +--------- keyboards/handwired/dactyl/rules.mk | 78 ++++--------------- .../4x5/keymaps/default/rules.mk | 0 .../4x5/keymaps/dvorak/rules.mk | 0 keyboards/handwired/dactyl_manuform/rules.mk | 47 ++--------- keyboards/handwired/dactyl_promicro/rules.mk | 47 ++--------- keyboards/handwired/fivethirteen/rules.mk | 55 +++---------- keyboards/handwired/frenchdev/rules.mk | 77 ++++-------------- keyboards/handwired/gamenum/rules.mk | 57 +++----------- keyboards/handwired/hexon38/rules.mk | 42 +--------- keyboards/handwired/hnah108/rules.mk | 15 +--- keyboards/handwired/jn68m/rules.mk | 51 +----------- keyboards/handwired/jopr/rules.mk | 40 +--------- keyboards/handwired/jot50/rules.mk | 47 ++--------- keyboards/handwired/jotanck/rules.mk | 47 ++--------- keyboards/handwired/jotpad16/rules.mk | 47 ++--------- keyboards/handwired/kbod/rules.mk | 54 +++---------- keyboards/handwired/lovelive9/rules.mk | 50 ++---------- keyboards/handwired/maartenwut/rules.mk | 55 +++---------- keyboards/handwired/magicforce68/rules.mk | 55 +++---------- .../handwired/mechboards_micropad/rules.mk | 51 +----------- keyboards/handwired/minorca/rules.mk | 52 +++---------- keyboards/handwired/nicekey/rules.mk | 58 +++----------- keyboards/handwired/not_so_minidox/rules.mk | 56 +++---------- keyboards/handwired/numbrero/rules.mk | 49 ++---------- keyboards/handwired/numpad20/rules.mk | 57 +++----------- keyboards/handwired/onekey/elite_c/rules.mk | 50 +----------- keyboards/handwired/onekey/promicro/rules.mk | 50 +----------- keyboards/handwired/onekey/teensy_2/rules.mk | 50 +----------- keyboards/handwired/ortho5x13/rules.mk | 55 +++---------- keyboards/handwired/pilcrow/rules.mk | 54 +++---------- keyboards/handwired/prime_exl/rules.mk | 51 +----------- keyboards/handwired/promethium/rules.mk | 51 +++--------- keyboards/handwired/pteron/rules.mk | 49 +++--------- keyboards/handwired/qc60/rules.mk | 47 ++--------- keyboards/handwired/reddot/rules.mk | 53 +++---------- keyboards/handwired/retro_refit/rules.mk | 54 +++---------- keyboards/handwired/rs60/rules.mk | 51 +++--------- keyboards/handwired/space_oddity/rules.mk | 47 ++--------- .../handwired/splittest/promicro/rules.mk | 50 +----------- .../handwired/splittest/teensy_2/rules.mk | 50 +----------- keyboards/handwired/tennie/rules.mk | 51 +----------- .../terminus_mini/keymaps/default/rules.mk | 16 ---- keyboards/handwired/terminus_mini/rules.mk | 54 +++---------- keyboards/handwired/trackpoint/rules.mk | 19 +++-- keyboards/handwired/tradestation/rules.mk | 42 +--------- keyboards/handwired/traveller/rules.mk | 64 +++------------ keyboards/handwired/tritium_numpad/rules.mk | 47 ++--------- .../woodpad/keymaps/default/rules.mk | 17 ---- keyboards/handwired/woodpad/rules.mk | 61 ++------------- keyboards/handwired/xealous/rules.mk | 50 +++--------- keyboards/handwired/xealousbrown/rules.mk | 48 +++--------- keyboards/hecomi/alpha/rules.mk | 51 +----------- keyboards/hecomi/rules.mk | 56 +------------ .../helix/rev1/keymaps/OLED_sample/rules.mk | 24 +----- keyboards/helix/rev1/keymaps/default/rules.mk | 0 keyboards/helix/rules.mk | 4 +- keyboards/hhkb/rules.mk | 64 +++------------ keyboards/hid_liber/keymaps/default/rules.mk | 34 +------- keyboards/hid_liber/rules.mk | 60 +++----------- keyboards/hifumi/rules.mk | 47 ++--------- keyboards/hineybush/h87a/rules.mk | 54 +++---------- keyboards/hineybush/hineyg80/rules.mk | 51 +----------- keyboards/honeycomb/rules.mk | 51 +++--------- keyboards/hotdox/rules.mk | 70 ++++------------- keyboards/hs60/v1/rules.mk | 48 ++---------- 73 files changed, 486 insertions(+), 2914 deletions(-) delete mode 100644 keyboards/handwired/dactyl_manuform/4x5/keymaps/default/rules.mk delete mode 100644 keyboards/handwired/dactyl_manuform/4x5/keymaps/dvorak/rules.mk delete mode 100644 keyboards/helix/rev1/keymaps/default/rules.mk diff --git a/keyboards/hadron/ver2/rules.mk b/keyboards/hadron/ver2/rules.mk index 7af5d1847169..3d48d88e7c5e 100644 --- a/keyboards/hadron/ver2/rules.mk +++ b/keyboards/hadron/ver2/rules.mk @@ -1,48 +1,14 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = halfkay # Build Options diff --git a/keyboards/halberd/rules.mk b/keyboards/halberd/rules.mk index ed4e6bde3259..35c693379b9d 100644 --- a/keyboards/halberd/rules.mk +++ b/keyboards/halberd/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/handwired/2x5keypad/rules.mk b/keyboards/handwired/2x5keypad/rules.mk index fd999de2c268..b7027cd9e9da 100644 --- a/keyboards/handwired/2x5keypad/rules.mk +++ b/keyboards/handwired/2x5keypad/rules.mk @@ -1,4 +1,14 @@ +# MCU name MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration diff --git a/keyboards/handwired/412_64/rules.mk b/keyboards/handwired/412_64/rules.mk index 9e74da5d9834..c7dfa8705b7e 100644 --- a/keyboards/handwired/412_64/rules.mk +++ b/keyboards/handwired/412_64/rules.mk @@ -1,53 +1,14 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu # Build Options diff --git a/keyboards/handwired/arrow_pad/rules.mk b/keyboards/handwired/arrow_pad/rules.mk index 7e68eb5990e2..65fc42a062ef 100644 --- a/keyboards/handwired/arrow_pad/rules.mk +++ b/keyboards/handwired/arrow_pad/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=512 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = halfkay # Build Options # change yes to no to disable diff --git a/keyboards/handwired/atreus50/rules.mk b/keyboards/handwired/atreus50/rules.mk index 1db2bfa92809..e8b551fbb736 100644 --- a/keyboards/handwired/atreus50/rules.mk +++ b/keyboards/handwired/atreus50/rules.mk @@ -1,49 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina # Build Options # change to "no" to disable the options, or define them in the Makefile in diff --git a/keyboards/handwired/cmd60/rules.mk b/keyboards/handwired/cmd60/rules.mk index d980716eaefd..b5e96d74bf53 100644 --- a/keyboards/handwired/cmd60/rules.mk +++ b/keyboards/handwired/cmd60/rules.mk @@ -1,52 +1,15 @@ - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=512 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = halfkay # Build Options # change yes to no to disable @@ -65,5 +28,3 @@ MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 - - diff --git a/keyboards/handwired/co60/rev1/rules.mk b/keyboards/handwired/co60/rev1/rules.mk index 31ce6cbe41a5..56b5aed0a392 100644 --- a/keyboards/handwired/co60/rev1/rules.mk +++ b/keyboards/handwired/co60/rev1/rules.mk @@ -1,49 +1,14 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu # Build Options diff --git a/keyboards/handwired/dactyl/rules.mk b/keyboards/handwired/dactyl/rules.mk index dc25f9c3fb76..2e740e38474d 100644 --- a/keyboards/handwired/dactyl/rules.mk +++ b/keyboards/handwired/dactyl/rules.mk @@ -1,71 +1,15 @@ -#---------------------------------------------------------------------------- -# On command line: -# -# make = Make software. -# -# make clean = Clean out built project files. -# -# That's pretty much all you need. To compile, always go make clean, -# followed by make. -# -# For advanced users only: -# make teensy = Download the hex file to the device, using teensy_loader_cli. -# (must have teensy_loader_cli installed). -# -#---------------------------------------------------------------------------- - -# # project specific files -SRC = twimaster.c \ - matrix.c - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=512 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = halfkay # Build Options # comment out to disable the options. @@ -84,3 +28,7 @@ SWAP_HANDS_ENABLE = yes # Allow swapping hands of keyboard SLEEP_LED_ENABLE = no API_SYSEX_ENABLE = no RGBLIGHT_ENABLE = no + +# project specific files +SRC = twimaster.c \ + matrix.c diff --git a/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/rules.mk b/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/rules.mk deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/keyboards/handwired/dactyl_manuform/4x5/keymaps/dvorak/rules.mk b/keyboards/handwired/dactyl_manuform/4x5/keymaps/dvorak/rules.mk deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/keyboards/handwired/dactyl_manuform/rules.mk b/keyboards/handwired/dactyl_manuform/rules.mk index 37806fa16478..1ba5f5a09343 100644 --- a/keyboards/handwired/dactyl_manuform/rules.mk +++ b/keyboards/handwired/dactyl_manuform/rules.mk @@ -1,47 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically diff --git a/keyboards/handwired/dactyl_promicro/rules.mk b/keyboards/handwired/dactyl_promicro/rules.mk index 37806fa16478..1ba5f5a09343 100644 --- a/keyboards/handwired/dactyl_promicro/rules.mk +++ b/keyboards/handwired/dactyl_promicro/rules.mk @@ -1,47 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically diff --git a/keyboards/handwired/fivethirteen/rules.mk b/keyboards/handwired/fivethirteen/rules.mk index c8dd19ef7b3d..64d566cb17bc 100644 --- a/keyboards/handwired/fivethirteen/rules.mk +++ b/keyboards/handwired/fivethirteen/rules.mk @@ -1,52 +1,15 @@ - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=512 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = halfkay # Build Options # change yes to no to disable diff --git a/keyboards/handwired/frenchdev/rules.mk b/keyboards/handwired/frenchdev/rules.mk index 69a12b68d774..abf4e62c4b30 100644 --- a/keyboards/handwired/frenchdev/rules.mk +++ b/keyboards/handwired/frenchdev/rules.mk @@ -1,70 +1,15 @@ -#---------------------------------------------------------------------------- -# On command line: -# -# make = Make software. -# -# make clean = Clean out built project files. -# -# That's pretty much all you need. To compile, always go make clean, -# followed by make. -# -# For advanced users only: -# make teensy = Download the hex file to the device, using teensy_loader_cli. -# (must have teensy_loader_cli installed). -# -#---------------------------------------------------------------------------- - -# # project specific files -SRC = i2c_master.c \ - matrix.c - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -BOOTLOADER = halfKay +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = halfkay # Build Options # comment out to disable the options. @@ -85,3 +30,7 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 RGBLIGHT_ENABLE = no API_SYSEX_ENABLE = no + +# project specific files +SRC = i2c_master.c \ + matrix.c diff --git a/keyboards/handwired/gamenum/rules.mk b/keyboards/handwired/gamenum/rules.mk index d980716eaefd..3989329835e6 100644 --- a/keyboards/handwired/gamenum/rules.mk +++ b/keyboards/handwired/gamenum/rules.mk @@ -1,52 +1,15 @@ - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=512 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina # Build Options # change yes to no to disable @@ -65,5 +28,3 @@ MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 - - diff --git a/keyboards/handwired/hexon38/rules.mk b/keyboards/handwired/hexon38/rules.mk index 2b6f17afc288..fb5e1b0c9b5b 100644 --- a/keyboards/handwired/hexon38/rules.mk +++ b/keyboards/handwired/hexon38/rules.mk @@ -1,54 +1,16 @@ -# see /~https://github.com/pepaslabs/hexon38 - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = halfkay - # Enabled build options: BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = yes # Mouse keys(+4700) diff --git a/keyboards/handwired/hnah108/rules.mk b/keyboards/handwired/hnah108/rules.mk index 80f59561d802..8e486c594b2d 100644 --- a/keyboards/handwired/hnah108/rules.mk +++ b/keyboards/handwired/hnah108/rules.mk @@ -1,27 +1,16 @@ # MCU name MCU = atmega32u4 - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/handwired/jn68m/rules.mk b/keyboards/handwired/jn68m/rules.mk index fa95254d8ae7..80b59d628d97 100644 --- a/keyboards/handwired/jn68m/rules.mk +++ b/keyboards/handwired/jn68m/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/handwired/jopr/rules.mk b/keyboards/handwired/jopr/rules.mk index de83252c38a5..ae10be0d26cb 100644 --- a/keyboards/handwired/jopr/rules.mk +++ b/keyboards/handwired/jopr/rules.mk @@ -1,52 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - # Build Options # comment out to disable the options. # diff --git a/keyboards/handwired/jot50/rules.mk b/keyboards/handwired/jot50/rules.mk index 36a100c9631f..d01dfefa5e76 100644 --- a/keyboards/handwired/jot50/rules.mk +++ b/keyboards/handwired/jot50/rules.mk @@ -1,47 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically diff --git a/keyboards/handwired/jotanck/rules.mk b/keyboards/handwired/jotanck/rules.mk index fa2881413340..2a233cccd02a 100644 --- a/keyboards/handwired/jotanck/rules.mk +++ b/keyboards/handwired/jotanck/rules.mk @@ -1,47 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically diff --git a/keyboards/handwired/jotpad16/rules.mk b/keyboards/handwired/jotpad16/rules.mk index 8105f800cb9a..0c9370f1c1d3 100644 --- a/keyboards/handwired/jotpad16/rules.mk +++ b/keyboards/handwired/jotpad16/rules.mk @@ -1,47 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically diff --git a/keyboards/handwired/kbod/rules.mk b/keyboards/handwired/kbod/rules.mk index 55ab9f350a47..0c8409863304 100644 --- a/keyboards/handwired/kbod/rules.mk +++ b/keyboards/handwired/kbod/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina # Build Options # change yes to no to disable diff --git a/keyboards/handwired/lovelive9/rules.mk b/keyboards/handwired/lovelive9/rules.mk index 8ec4ed3d6594..4799b5ec9258 100644 --- a/keyboards/handwired/lovelive9/rules.mk +++ b/keyboards/handwired/lovelive9/rules.mk @@ -1,48 +1,14 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina # Build Options diff --git a/keyboards/handwired/maartenwut/rules.mk b/keyboards/handwired/maartenwut/rules.mk index 7ed63c65ecdb..5f50d6b52a87 100755 --- a/keyboards/handwired/maartenwut/rules.mk +++ b/keyboards/handwired/maartenwut/rules.mk @@ -1,52 +1,15 @@ - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable diff --git a/keyboards/handwired/magicforce68/rules.mk b/keyboards/handwired/magicforce68/rules.mk index fe01b544c803..3989329835e6 100644 --- a/keyboards/handwired/magicforce68/rules.mk +++ b/keyboards/handwired/magicforce68/rules.mk @@ -1,52 +1,15 @@ - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=512 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina # Build Options # change yes to no to disable diff --git a/keyboards/handwired/mechboards_micropad/rules.mk b/keyboards/handwired/mechboards_micropad/rules.mk index 033ccaf84f84..a61b3b3d834f 100644 --- a/keyboards/handwired/mechboards_micropad/rules.mk +++ b/keyboards/handwired/mechboards_micropad/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/handwired/minorca/rules.mk b/keyboards/handwired/minorca/rules.mk index 3e8d8285614d..5c29c0c93e97 100644 --- a/keyboards/handwired/minorca/rules.mk +++ b/keyboards/handwired/minorca/rules.mk @@ -1,49 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=512 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = halfkay # Build Options # change to "no" to disable the options, or define them in the Makefile in diff --git a/keyboards/handwired/nicekey/rules.mk b/keyboards/handwired/nicekey/rules.mk index cfa693a73b90..61c1fa79aa5c 100644 --- a/keyboards/handwired/nicekey/rules.mk +++ b/keyboards/handwired/nicekey/rules.mk @@ -1,53 +1,15 @@ - - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina # Build Options # comment out to disable the options. @@ -58,4 +20,4 @@ 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 \ No newline at end of file +#NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA diff --git a/keyboards/handwired/not_so_minidox/rules.mk b/keyboards/handwired/not_so_minidox/rules.mk index d8735651942e..ae5cb83b7bf9 100644 --- a/keyboards/handwired/not_so_minidox/rules.mk +++ b/keyboards/handwired/not_so_minidox/rules.mk @@ -1,52 +1,16 @@ -SRC += matrix.c \ - i2c.c \ - split_util.c \ - serial.c - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically @@ -68,3 +32,7 @@ USE_I2C ?= no SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend CUSTOM_MATRIX = yes +SRC += matrix.c \ + i2c.c \ + split_util.c \ + serial.c diff --git a/keyboards/handwired/numbrero/rules.mk b/keyboards/handwired/numbrero/rules.mk index bda6c866e215..969dd0b507aa 100644 --- a/keyboards/handwired/numbrero/rules.mk +++ b/keyboards/handwired/numbrero/rules.mk @@ -1,49 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - -#Bootloder -#Pro Micro = caterina +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Boot Section Size in *bytes* -#OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # comment out to disable the options. # diff --git a/keyboards/handwired/numpad20/rules.mk b/keyboards/handwired/numpad20/rules.mk index 361b2e93af1b..b5e96d74bf53 100644 --- a/keyboards/handwired/numpad20/rules.mk +++ b/keyboards/handwired/numpad20/rules.mk @@ -1,52 +1,15 @@ - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=512 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = halfkay # Build Options # change yes to no to disable @@ -64,4 +27,4 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by d MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 \ No newline at end of file +AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/handwired/onekey/elite_c/rules.mk b/keyboards/handwired/onekey/elite_c/rules.mk index eb7c443951db..2f20507d4ddd 100644 --- a/keyboards/handwired/onekey/elite_c/rules.mk +++ b/keyboards/handwired/onekey/elite_c/rules.mk @@ -1,58 +1,12 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 diff --git a/keyboards/handwired/onekey/promicro/rules.mk b/keyboards/handwired/onekey/promicro/rules.mk index dc6f19623730..e6fef517279c 100644 --- a/keyboards/handwired/onekey/promicro/rules.mk +++ b/keyboards/handwired/onekey/promicro/rules.mk @@ -1,58 +1,12 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 diff --git a/keyboards/handwired/onekey/teensy_2/rules.mk b/keyboards/handwired/onekey/teensy_2/rules.mk index 3fb7c7e5a7e4..ae398e2588c7 100644 --- a/keyboards/handwired/onekey/teensy_2/rules.mk +++ b/keyboards/handwired/onekey/teensy_2/rules.mk @@ -1,58 +1,12 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = halfkay - - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 diff --git a/keyboards/handwired/ortho5x13/rules.mk b/keyboards/handwired/ortho5x13/rules.mk index fe01b544c803..b5e96d74bf53 100644 --- a/keyboards/handwired/ortho5x13/rules.mk +++ b/keyboards/handwired/ortho5x13/rules.mk @@ -1,52 +1,15 @@ - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=512 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = halfkay # Build Options # change yes to no to disable diff --git a/keyboards/handwired/pilcrow/rules.mk b/keyboards/handwired/pilcrow/rules.mk index 762ae481ecc2..b5e96d74bf53 100644 --- a/keyboards/handwired/pilcrow/rules.mk +++ b/keyboards/handwired/pilcrow/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=512 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = halfkay # Build Options # change yes to no to disable diff --git a/keyboards/handwired/prime_exl/rules.mk b/keyboards/handwired/prime_exl/rules.mk index 5cce4e8113d9..d7aca43dfc90 100644 --- a/keyboards/handwired/prime_exl/rules.mk +++ b/keyboards/handwired/prime_exl/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/handwired/promethium/rules.mk b/keyboards/handwired/promethium/rules.mk index 172264300289..19d20ee03fb2 100644 --- a/keyboards/handwired/promethium/rules.mk +++ b/keyboards/handwired/promethium/rules.mk @@ -1,49 +1,18 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. +# Processor frequency F_CPU = 8000000 -# -# 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 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina # Build Options # change to "no" to disable the options, or define them in the Makefile in diff --git a/keyboards/handwired/pteron/rules.mk b/keyboards/handwired/pteron/rules.mk index 10218020e6e2..648387460ba2 100644 --- a/keyboards/handwired/pteron/rules.mk +++ b/keyboards/handwired/pteron/rules.mk @@ -1,45 +1,14 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina # Build Options @@ -55,4 +24,4 @@ NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https:/ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no UNICODE_ENABLE = no -UNICODEMAP_ENABLE = no \ No newline at end of file +UNICODEMAP_ENABLE = no diff --git a/keyboards/handwired/qc60/rules.mk b/keyboards/handwired/qc60/rules.mk index b487dd96ecd9..8859f5012d33 100644 --- a/keyboards/handwired/qc60/rules.mk +++ b/keyboards/handwired/qc60/rules.mk @@ -1,47 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically diff --git a/keyboards/handwired/reddot/rules.mk b/keyboards/handwired/reddot/rules.mk index 8afe6fc63e85..4400decaac12 100755 --- a/keyboards/handwired/reddot/rules.mk +++ b/keyboards/handwired/reddot/rules.mk @@ -1,44 +1,14 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# for avr upload -USB = /dev/cu.usbmodem1421 -# -# 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) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp ifdef TEENSY2 BOOTLOADER = halfkay OPT_DEFS += -DATREUS_TEENSY2 @@ -50,11 +20,6 @@ else avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB) endif -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - - # Build Options # change yes to no to disable # @@ -76,3 +41,5 @@ AUDIO_ENABLE = no # Audio output on port C6 # upload: build # $(ATREUS_UPLOAD_COMMAND) +# for avr upload +USB = /dev/cu.usbmodem1421 diff --git a/keyboards/handwired/retro_refit/rules.mk b/keyboards/handwired/retro_refit/rules.mk index 2884ef2cb099..04db510d138c 100644 --- a/keyboards/handwired/retro_refit/rules.mk +++ b/keyboards/handwired/retro_refit/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=512 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = halfkay # Build Options # comment out to disable the options. diff --git a/keyboards/handwired/rs60/rules.mk b/keyboards/handwired/rs60/rules.mk index 7b4ec69d0d35..ee10944c67bf 100644 --- a/keyboards/handwired/rs60/rules.mk +++ b/keyboards/handwired/rs60/rules.mk @@ -1,50 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = qmk-dfu -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - -LAYOUTS = ortho_5x12 - -# Boot Section Size in *bytes* -#OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # comment out to disable the options. # @@ -59,3 +25,4 @@ BACKLIGHT_ENABLE = no # Custom backlighting code is used, so this should not b AUDIO_ENABLE = no # This can be enabled if a speaker is connected to the expansion port. Not compatible with RGBLIGHT below RGBLIGHT_ENABLE = no # This can be enabled if a ws2812 strip is connected to the expansion port. +LAYOUTS = ortho_5x12 diff --git a/keyboards/handwired/space_oddity/rules.mk b/keyboards/handwired/space_oddity/rules.mk index b597ef2b0951..43fc1f34a3dc 100644 --- a/keyboards/handwired/space_oddity/rules.mk +++ b/keyboards/handwired/space_oddity/rules.mk @@ -1,47 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # comment out to disable the options. # diff --git a/keyboards/handwired/splittest/promicro/rules.mk b/keyboards/handwired/splittest/promicro/rules.mk index dc6f19623730..e6fef517279c 100644 --- a/keyboards/handwired/splittest/promicro/rules.mk +++ b/keyboards/handwired/splittest/promicro/rules.mk @@ -1,58 +1,12 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 diff --git a/keyboards/handwired/splittest/teensy_2/rules.mk b/keyboards/handwired/splittest/teensy_2/rules.mk index 3fb7c7e5a7e4..ae398e2588c7 100644 --- a/keyboards/handwired/splittest/teensy_2/rules.mk +++ b/keyboards/handwired/splittest/teensy_2/rules.mk @@ -1,58 +1,12 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = halfkay - - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 diff --git a/keyboards/handwired/tennie/rules.mk b/keyboards/handwired/tennie/rules.mk index 0119dc6fb2fd..b41b736a71a3 100644 --- a/keyboards/handwired/tennie/rules.mk +++ b/keyboards/handwired/tennie/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/handwired/terminus_mini/keymaps/default/rules.mk b/keyboards/handwired/terminus_mini/keymaps/default/rules.mk index 42ab51f15077..a0c29684b1b0 100644 --- a/keyboards/handwired/terminus_mini/keymaps/default/rules.mk +++ b/keyboards/handwired/terminus_mini/keymaps/default/rules.mk @@ -1,19 +1,3 @@ -# Copyright 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 . - - # QMK Build Options # change to "no" to disable the options, or define them in the rules.mk in # the appropriate keymap folder that will get included automatically diff --git a/keyboards/handwired/terminus_mini/rules.mk b/keyboards/handwired/terminus_mini/rules.mk index 1093901c098f..684da4cbb9ee 100644 --- a/keyboards/handwired/terminus_mini/rules.mk +++ b/keyboards/handwired/terminus_mini/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=512 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = halfkay # Build Options # change yes to no to disable diff --git a/keyboards/handwired/trackpoint/rules.mk b/keyboards/handwired/trackpoint/rules.mk index 47dace8a22f5..668b3bb1ffe9 100644 --- a/keyboards/handwired/trackpoint/rules.mk +++ b/keyboards/handwired/trackpoint/rules.mk @@ -1,9 +1,17 @@ +# MCU name MCU = atmega32u4 -F_CPU = 16000000 -ARCH = AVR8 -F_USB = $(F_CPU) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT -OPT_DEFS += -DBOOTLOADER_SIZE=512 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = halfkay + + BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) @@ -19,4 +27,3 @@ AUDIO_ENABLE = no # Audio output on port C6 PS2_MOUSE_ENABLE = yes PS2_USE_USART = yes - diff --git a/keyboards/handwired/tradestation/rules.mk b/keyboards/handwired/tradestation/rules.mk index 649b63babf93..d3612c3c296f 100644 --- a/keyboards/handwired/tradestation/rules.mk +++ b/keyboards/handwired/tradestation/rules.mk @@ -1,54 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Boot Section Size in *bytes* -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # comment out to disable the options. # diff --git a/keyboards/handwired/traveller/rules.mk b/keyboards/handwired/traveller/rules.mk index 03673fdd1946..0758e5934096 100644 --- a/keyboards/handwired/traveller/rules.mk +++ b/keyboards/handwired/traveller/rules.mk @@ -1,45 +1,14 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# for avr upload -USB = /dev/cu.usbmodem1421 -# -# 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) - - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp ifdef TEENSY2 BOOTLOADER = halfkay OPT_DEFS += -DATREUS_TEENSY2 @@ -51,21 +20,6 @@ else avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB) endif - - -# 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 # change yes to no to disable # @@ -85,3 +39,5 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 RGBLIGHT_ENABLE = yes +# for avr upload +USB = /dev/cu.usbmodem1421 diff --git a/keyboards/handwired/tritium_numpad/rules.mk b/keyboards/handwired/tritium_numpad/rules.mk index c990a6ab14d0..42dfc5cbece4 100644 --- a/keyboards/handwired/tritium_numpad/rules.mk +++ b/keyboards/handwired/tritium_numpad/rules.mk @@ -1,47 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # comment out to disable the options. # diff --git a/keyboards/handwired/woodpad/keymaps/default/rules.mk b/keyboards/handwired/woodpad/keymaps/default/rules.mk index fce19bfaa8f1..394bc0271fc4 100644 --- a/keyboards/handwired/woodpad/keymaps/default/rules.mk +++ b/keyboards/handwired/woodpad/keymaps/default/rules.mk @@ -1,19 +1,3 @@ -# Copyright 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 . - - # QMK Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically @@ -31,4 +15,3 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - diff --git a/keyboards/handwired/woodpad/rules.mk b/keyboards/handwired/woodpad/rules.mk index 4bdc561a6327..7725131978e4 100644 --- a/keyboards/handwired/woodpad/rules.mk +++ b/keyboards/handwired/woodpad/rules.mk @@ -1,49 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Build Options # change yes to no to disable # @@ -63,15 +30,3 @@ BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE ?= no # Audio output on port C6 FAUXCLICKY_ENABLE ?= no # Use buzzer to emulate clicky switches RGBLIGHT_ENABLE ?= no - -#avrdude: build -# ls /dev/tty* > /tmp/1; \ -# echo "Reset your Pro Micro now"; \ -# while [ -z $$USB ]; do \ -# sleep 1; \ -# ls /dev/tty* > /tmp/2; \ -# USB=`diff /tmp/1 /tmp/2 | $(GREP) -o '/dev/tty.*'`; \ -# done; \ -# avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex -# -#.PHONY: avrdude diff --git a/keyboards/handwired/xealous/rules.mk b/keyboards/handwired/xealous/rules.mk index adbbf1e103b2..2d816ab7cee7 100644 --- a/keyboards/handwired/xealous/rules.mk +++ b/keyboards/handwired/xealous/rules.mk @@ -1,49 +1,16 @@ -SRC += matrix.c - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically @@ -66,6 +33,7 @@ SUBPROJECT_rev1 = yes # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +SRC += matrix.c DEBOUNCE_TYPE = eager_pk LAYOUTS = split60 diff --git a/keyboards/handwired/xealousbrown/rules.mk b/keyboards/handwired/xealousbrown/rules.mk index 2bad9a1c6ec1..c346ef6c988a 100644 --- a/keyboards/handwired/xealousbrown/rules.mk +++ b/keyboards/handwired/xealousbrown/rules.mk @@ -1,44 +1,16 @@ - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina + # Build Options # change yes to no to disable # @@ -56,5 +28,3 @@ MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 - - diff --git a/keyboards/hecomi/alpha/rules.mk b/keyboards/hecomi/alpha/rules.mk index 06434e9621f9..83afff3261f7 100644 --- a/keyboards/hecomi/alpha/rules.mk +++ b/keyboards/hecomi/alpha/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/hecomi/rules.mk b/keyboards/hecomi/rules.mk index 5fddc13959f2..28febe217b44 100644 --- a/keyboards/hecomi/rules.mk +++ b/keyboards/hecomi/rules.mk @@ -1,66 +1,16 @@ -DEFAULT_FOLDER=hecomi/alpha -# -# # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # @@ -82,3 +32,5 @@ AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) SPLIT_KEYBOARD = yes + +DEFAULT_FOLDER = hecomi/alpha diff --git a/keyboards/helix/rev1/keymaps/OLED_sample/rules.mk b/keyboards/helix/rev1/keymaps/OLED_sample/rules.mk index 1347d3a7daf0..69170e35c3b8 100644 --- a/keyboards/helix/rev1/keymaps/OLED_sample/rules.mk +++ b/keyboards/helix/rev1/keymaps/OLED_sample/rules.mk @@ -1,20 +1,4 @@ -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # 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 -NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -SWAP_HANDS_ENABLE = no # Enable one-hand typing - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +EXTRAKEY_ENABLE = yes +NKRO_ENABLE = yes +RGBLIGHT_ENABLE = yes +SWAP_HANDS_ENABLE = no diff --git a/keyboards/helix/rev1/keymaps/default/rules.mk b/keyboards/helix/rev1/keymaps/default/rules.mk deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/keyboards/helix/rules.mk b/keyboards/helix/rules.mk index cf23434d8033..579262fe7c54 100644 --- a/keyboards/helix/rules.mk +++ b/keyboards/helix/rules.mk @@ -11,8 +11,6 @@ MCU = atmega32u4 # ATmega328P USBasp BOOTLOADER = caterina -HELIX_TOP_DIR := $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST)))) - # QMK Standard Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically @@ -35,3 +33,5 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend DEFAULT_FOLDER = helix/rev2 + +HELIX_TOP_DIR := $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST)))) diff --git a/keyboards/hhkb/rules.mk b/keyboards/hhkb/rules.mk index 0483a2a87844..a7a40aa6383e 100644 --- a/keyboards/hhkb/rules.mk +++ b/keyboards/hhkb/rules.mk @@ -1,58 +1,15 @@ - - -# project specific files -SRC = matrix.c - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -#OPT_DEFS += -DBOOTLOADER_SIZE=4096 - -# as per original hasu settings -OPT_DEFS += -DBOOTLOADER_SIZE=4096 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. @@ -81,6 +38,9 @@ CUSTOM_MATRIX = yes # Custom matrix file for the HHKB # make hhkb-keymap-clean # make hhkb-keymap-dfu HHKB_RN42_ENABLE=yes +# project specific files +SRC = matrix.c + ifeq ($(strip $(HHKB_RN42_ENABLE)), yes) OPT_DEFS += -DHHKB_RN42_ENABLE diff --git a/keyboards/hid_liber/keymaps/default/rules.mk b/keyboards/hid_liber/keymaps/default/rules.mk index 0f131bce9b29..15b7f725b26d 100755 --- a/keyboards/hid_liber/keymaps/default/rules.mk +++ b/keyboards/hid_liber/keymaps/default/rules.mk @@ -1,33 +1 @@ -# Copyright 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 . - - -# QMK Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE = 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 -NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend \ No newline at end of file +CONSOLE_ENABLE = yes diff --git a/keyboards/hid_liber/rules.mk b/keyboards/hid_liber/rules.mk index 8d43488494b5..3642d80742da 100755 --- a/keyboards/hid_liber/rules.mk +++ b/keyboards/hid_liber/rules.mk @@ -1,54 +1,15 @@ -# Project specific files -SRC = matrix.c - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable @@ -70,3 +31,6 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches + +# Project specific files +SRC = matrix.c diff --git a/keyboards/hifumi/rules.mk b/keyboards/hifumi/rules.mk index 53be9fb8abfa..33c8d61784ef 100644 --- a/keyboards/hifumi/rules.mk +++ b/keyboards/hifumi/rules.mk @@ -1,47 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically diff --git a/keyboards/hineybush/h87a/rules.mk b/keyboards/hineybush/h87a/rules.mk index 50aac07ada8f..653ec1f9a232 100644 --- a/keyboards/hineybush/h87a/rules.mk +++ b/keyboards/hineybush/h87a/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable diff --git a/keyboards/hineybush/hineyg80/rules.mk b/keyboards/hineybush/hineyg80/rules.mk index bc370be0397c..7218e1e1bf18 100644 --- a/keyboards/hineybush/hineyg80/rules.mk +++ b/keyboards/hineybush/hineyg80/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/honeycomb/rules.mk b/keyboards/honeycomb/rules.mk index 73a6fb6f74b2..05a3cff00d64 100755 --- a/keyboards/honeycomb/rules.mk +++ b/keyboards/honeycomb/rules.mk @@ -1,46 +1,14 @@ -# # project specific files -SRC += matrix.c - - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina # Build Options @@ -61,6 +29,9 @@ NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA UNICODE_ENABLE = YES # Unicode # BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID +# # project specific files +SRC += matrix.c + USB = /dev/ttyACM0 #upload: build diff --git a/keyboards/hotdox/rules.mk b/keyboards/hotdox/rules.mk index f785cdd06016..be21552055cc 100644 --- a/keyboards/hotdox/rules.mk +++ b/keyboards/hotdox/rules.mk @@ -1,63 +1,14 @@ -#---------------------------------------------------------------------------- -# On command line: -# -# make = Make software. -# -# make clean = Clean out built project files. -# -# That's pretty much all you need. To compile, always go make clean, -# followed by make. -# -# For advanced users only: -# make teensy = Download the hex file to the device, using teensy_loader_cli. -# (must have teensy_loader_cli installed). -# -#---------------------------------------------------------------------------- - -# # project specific files -SRC = matrix.c \ - i2c_master.c \ - left.c - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - -# Boot Section +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu # Build Options @@ -79,4 +30,9 @@ SWAP_HANDS_ENABLE = no # Disable Onehand RGBLIGHT_ENABLE = no MIDI_ENABLE = no +# project specific files +SRC = matrix.c \ + i2c_master.c \ + left.c + LAYOUTS = ergodox diff --git a/keyboards/hs60/v1/rules.mk b/keyboards/hs60/v1/rules.mk index f5bcb2b0a178..13f65b6ee4fe 100644 --- a/keyboards/hs60/v1/rules.mk +++ b/keyboards/hs60/v1/rules.mk @@ -1,46 +1,14 @@ # MCU name MCU = atmega32u4 -# project specific files -#SRC = - -# 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 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = qmk-dfu # Do not put the microcontroller into power saving mode From 1533483bb2d1278d2c2528cf289392aa2a4f15e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Catriel=20M=C3=BCller?= Date: Sun, 20 Oct 2019 16:55:36 -0300 Subject: [PATCH 143/316] [Keymap] catrielmuller keymap for the dztech/dz65rgb (#7015) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Catriel Müller - Dz65rgb personal keymap * - Removed backslashes - Changed IS_LED_ON to IS_HOST_LED_ON - Removed empty unused hooks --- .../dz65rgb/keymaps/catrielmuller/config.h | 3 + .../dz65rgb/keymaps/catrielmuller/keymap.c | 242 ++++++++++++++++++ .../dz65rgb/keymaps/catrielmuller/rules.mk | 2 + 3 files changed, 247 insertions(+) create mode 100644 keyboards/dztech/dz65rgb/keymaps/catrielmuller/config.h create mode 100644 keyboards/dztech/dz65rgb/keymaps/catrielmuller/keymap.c create mode 100644 keyboards/dztech/dz65rgb/keymaps/catrielmuller/rules.mk diff --git a/keyboards/dztech/dz65rgb/keymaps/catrielmuller/config.h b/keyboards/dztech/dz65rgb/keymaps/catrielmuller/config.h new file mode 100644 index 000000000000..f57ac640416a --- /dev/null +++ b/keyboards/dztech/dz65rgb/keymaps/catrielmuller/config.h @@ -0,0 +1,3 @@ +#define LEADER_TIMEOUT 300 +#define FORCE_NKRO +#define UNICODE_SELECTED_MODES UC_LNX, UC_OSX, UC_WIN, UC_WINC \ No newline at end of file diff --git a/keyboards/dztech/dz65rgb/keymaps/catrielmuller/keymap.c b/keyboards/dztech/dz65rgb/keymaps/catrielmuller/keymap.c new file mode 100644 index 000000000000..597f6530d8ba --- /dev/null +++ b/keyboards/dztech/dz65rgb/keymaps/catrielmuller/keymap.c @@ -0,0 +1,242 @@ +#include QMK_KEYBOARD_H + +// Config +const uint8_t MAIN_COLOR[3] = {0xFF, 0x00, 0x00}; + +// layers, ordering is important! +enum layers { + _MAIN, + _INDEX, + _FN, + _MULTIMEDIA, + _EMOJI, + _EXT1, + _EXT2, + _EXT3, + _EXT4, + _EXT5, + _EXT6, + _RGB, + _CONFIG, +} + +const layers_leds_map[] = { + [_MAIN] = 17, + [_INDEX] = 16, + [_FN] = 15, + [_MULTIMEDIA] = 14, + [_EMOJI] = 13, + [_EXT1] = 12, + [_EXT2] = 11, + [_EXT3] = 10, + [_EXT4] = 9, + [_EXT5] = 18, + [_EXT6] = 19, + [_RGB] = 20, + [_CONFIG] = 21, +}; + +enum unicode_names { + UC_GRINNING_FACE, // 😃 + UC_BEAMING_FACE, // 😁 + UC_GRINNING_FACE_WITH_SWEAT, // 😅 + UC_ROLLING_LAUGHING, // 🤣 + UC_FACE_TEARS_JOY, // 😂 + UC_WINKING_FACE, // 😉 + UC_SMILING_FACE_HALO, // 😇 + UC_SMILING_FACE_HEARTS, // 🥰 + UC_SMILING_FACE_HEART_EYES, // 😍 + UC_FACE_BLOWING_KISS, // 😘 + UC_FACE_SAVORING_FOOD, // 😋 + UC_ZANY_FACE, // 🤪 + UC_HUGGING_FACE, // 🤗 + UC_SHUSHING_FACE, // 🤫 + UC_THINKING_FACE, // 🤔 + UC_FACE_RAISED_EYEBROW, // 🤨 + UC_NEUTRAL_FACE, // 😐 + UC_SMIRKING_FACE, // 😏 + UC_FACE_ROLLING_EYES, // 🙄 + UC_PENSIVE_FACE, // 😔 + UC_FACE_VOMITING, // 🤮 + UC_WOOZY_FACE, // 🥴 + UC_PLEADING_FACE, // 🥺 + UC_LOUDLY_CRYING_FACE, // 😭 + UC_DISAPPOINTED_FACE, // 😞 + UC_FACE_SYMBOLS_MOUTH, // 🤬 + UC_SMILING_FACE_HORNS, // 😈 + UC_SKULL, // 💀 + UC_PILE_POO, // 💩 + UC_GHOST, // 👻 + UC_ALIEN_MONSTER, // 👾 + UC_RED_HEART, // ❤ + UC_BOMB, // 💣 + UC_WAVING_HAND, // 👋 + UC_OK_HAND, // 👌 + UC_CLAPPING_HANDS, // 👏 + UC_EYES, // 👀 + UC_MAN_FACEPALMING, // 🤦 + UC_TURTLE, // 🐢 + UC_SNAKE, // 🐍 + UC_SPOUTING_WHALE, // 🐳 + UC_DRAGON, // 🐉 + UC_TREX, // 🦖 + UC_ARGENTINA_A, // 🇦 + UC_ARGENTINA_R, // 🇷 + UC_THUMBSDOWN, // 👍 + UC_THUMBSUP, // 👎 +}; + +const uint32_t PROGMEM unicode_map[] = { + [UC_GRINNING_FACE] = 0x1F603, + [UC_BEAMING_FACE] = 0x1F601, + [UC_GRINNING_FACE_WITH_SWEAT] = 0x1F605, + [UC_ROLLING_LAUGHING] = 0x1F923, + [UC_FACE_TEARS_JOY] = 0x1F602, + [UC_WINKING_FACE] = 0x1F609, + [UC_SMILING_FACE_HALO] = 0x1F607, + [UC_SMILING_FACE_HEARTS] = 0x1F970, + [UC_SMILING_FACE_HEART_EYES] = 0x1F60D, + [UC_FACE_BLOWING_KISS] = 0x1F618, + [UC_FACE_SAVORING_FOOD] = 0x1F60B, + [UC_ZANY_FACE] = 0x1F92A, + [UC_HUGGING_FACE] = 0x1F917, + [UC_SHUSHING_FACE] = 0x1F92B, + [UC_THINKING_FACE] = 0x1F914, + [UC_FACE_RAISED_EYEBROW] = 0x1F928, + [UC_NEUTRAL_FACE] = 0x1F610, + [UC_SMIRKING_FACE] = 0x1F60F, + [UC_FACE_ROLLING_EYES] = 0x1F644, + [UC_PENSIVE_FACE] = 0x1F614, + [UC_FACE_VOMITING] = 0x1F92E, + [UC_WOOZY_FACE] = 0x1F974, + [UC_PLEADING_FACE] = 0x1F97A, + [UC_LOUDLY_CRYING_FACE] = 0x1F62D, + [UC_DISAPPOINTED_FACE] = 0x1F61E, + [UC_FACE_SYMBOLS_MOUTH] = 0x1F92C, + [UC_SMILING_FACE_HORNS] = 0x1F608, + [UC_SKULL] = 0x1F480, + [UC_PILE_POO] = 0x1F4A9, + [UC_GHOST] = 0x1F47B, + [UC_ALIEN_MONSTER] = 0x1F47E, + [UC_RED_HEART] = 0x2764, + [UC_BOMB] = 0x1F4A3, + [UC_WAVING_HAND] = 0x1F44B, + [UC_OK_HAND] = 0x1F44C, + [UC_CLAPPING_HANDS] = 0x1F44F, + [UC_EYES] = 0x1F440, + [UC_MAN_FACEPALMING] = 0x1F926, + [UC_TURTLE] = 0x1F422, + [UC_SNAKE] = 0x1F40D, + [UC_SPOUTING_WHALE] = 0x1F433, + [UC_DRAGON] = 0x1F409, + [UC_TREX] = 0x1F996, + [UC_ARGENTINA_A] = 0x1F1E6, + [UC_ARGENTINA_R] = 0x1F1F7, + [UC_THUMBSDOWN] = 0x1F44E, + [UC_THUMBSUP] = 0x1F44D, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_MAIN] = LAYOUT_65_ansi( + KC_GESC, 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_HOME, + 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_END, + 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_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RSFT_T(KC_APP), KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LEAD, TO(_INDEX), MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT + ), + [_INDEX] = LAYOUT_65_ansi( + TO(_MAIN), TO(_INDEX), TO(_FN), TO(_MULTIMEDIA), TO(_EMOJI), TO(_EXT1), TO(_EXT2), TO(_EXT3), TO(_EXT4), TO(_EXT5), TO(_EXT6), TO(_RGB), TO(_CONFIG), TO(_MAIN), KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, TO(_INDEX), TO(_FN), KC_NO, KC_NO, KC_NO + ), + [_FN] = LAYOUT_65_ansi( + 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_DEL, KC_PSCR, + KC_TAB, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, KC_INS, KC_SLCK, + KC_APP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PAUS, + KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BTN1, KC_MS_U, KC_BTN2, + KC_LCTL, KC_LGUI, KC_LALT, KC_NO, KC_NO, TO(_INDEX), KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R + ), + [_MULTIMEDIA] = LAYOUT_65_ansi( + TO(_MAIN), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MPLY, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MSTP, KC_VOLU, KC_MUTE, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, TO(_INDEX), KC_NO, KC_MPRV, KC_VOLD, KC_MNXT + ), + [_EMOJI] = LAYOUT_65_ansi( + TO(_MAIN), X(UC_GRINNING_FACE), X(UC_BEAMING_FACE), X(UC_GRINNING_FACE_WITH_SWEAT), X(UC_ROLLING_LAUGHING), X(UC_FACE_TEARS_JOY), X(UC_WINKING_FACE), X(UC_SMILING_FACE_HALO), X(UC_SMILING_FACE_HEARTS), X(UC_SMILING_FACE_HEART_EYES), X(UC_FACE_BLOWING_KISS), X(UC_FACE_SAVORING_FOOD), X(UC_ZANY_FACE), KC_BSPC, KC_HOME, + KC_TAB, X(UC_HUGGING_FACE), X(UC_SHUSHING_FACE), X(UC_THINKING_FACE), X(UC_FACE_RAISED_EYEBROW), X(UC_NEUTRAL_FACE), X(UC_SMIRKING_FACE), X(UC_FACE_ROLLING_EYES), X(UC_PENSIVE_FACE), X(UC_FACE_VOMITING), X(UC_WOOZY_FACE), X(UC_PLEADING_FACE), X(UC_LOUDLY_CRYING_FACE), X(UC_THUMBSUP), KC_END, + KC_APP, X(UC_DISAPPOINTED_FACE), X(UC_FACE_SYMBOLS_MOUTH), X(UC_SMILING_FACE_HORNS), X(UC_SKULL), X(UC_PILE_POO), X(UC_GHOST), X(UC_ALIEN_MONSTER), X(UC_RED_HEART), X(UC_BOMB), X(UC_WAVING_HAND), X(UC_OK_HAND), KC_ENT, KC_PGUP, + KC_LSFT, X(UC_CLAPPING_HANDS), X(UC_EYES), X(UC_MAN_FACEPALMING), X(UC_TURTLE), X(UC_SNAKE), X(UC_SPOUTING_WHALE), X(UC_DRAGON), X(UC_TREX), X(UC_ARGENTINA_A), X(UC_ARGENTINA_R), X(UC_THUMBSDOWN), KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LEAD, TO(_INDEX), TO(_MAIN), KC_LEFT, KC_DOWN, KC_RGHT + ), + [_EXT1] = LAYOUT_65_ansi( + TO(_MAIN), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, TO(_INDEX), KC_NO, KC_NO, KC_NO, KC_NO + ), + [_EXT2] = LAYOUT_65_ansi( + TO(_MAIN), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, TO(_INDEX), KC_NO, KC_NO, KC_NO, KC_NO + ), + [_EXT3] = LAYOUT_65_ansi( + TO(_MAIN), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, TO(_INDEX), KC_NO, KC_NO, KC_NO, KC_NO + ), + [_EXT4] = LAYOUT_65_ansi( + TO(_MAIN), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, TO(_INDEX), KC_NO, KC_NO, KC_NO, KC_NO + ), + [_EXT5] = LAYOUT_65_ansi( + TO(_MAIN), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, TO(_INDEX), KC_NO, KC_NO, KC_NO, KC_NO + ), + [_EXT6] = LAYOUT_65_ansi( + TO(_MAIN), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, TO(_INDEX), KC_NO, KC_NO, KC_NO, KC_NO + ), + [_RGB] = LAYOUT_65_ansi( + TO(_MAIN), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, RGB_TOG, RGB_RMOD, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, RGB_SPD, RGB_SPI, KC_NO, KC_NO, KC_NO, + KC_NO, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, TO(_INDEX), KC_NO, KC_NO, KC_NO, KC_NO + ), + [_CONFIG] = LAYOUT_65_ansi( + TO(_MAIN), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_ACL2, + KC_NO, KC_PWR, KC_SLEP, KC_WAKE, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RESET, DEBUG, EEP_RST, KC_NO, KC_ACL1, + KC_NO, UC_RMOD, UC_MOD, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_ACL0, + KC_NO, MAGIC_TOGGLE_NKRO, MAGIC_UNHOST_NKRO, MAGIC_HOST_NKRO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, TO(_INDEX), KC_NO, KC_NO, KC_NO, KC_NO + ), +}; + +void rgb_matrix_indicators_user(void) { + + // CapsLock Light + if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) { + rgb_matrix_set_color(8, MAIN_COLOR[0], MAIN_COLOR[1], MAIN_COLOR[2]); + } + + // Show Selected Layer + rgb_matrix_set_color(layers_leds_map[biton32(layer_state)], MAIN_COLOR[0], MAIN_COLOR[1], MAIN_COLOR[2]); +} \ No newline at end of file diff --git a/keyboards/dztech/dz65rgb/keymaps/catrielmuller/rules.mk b/keyboards/dztech/dz65rgb/keymaps/catrielmuller/rules.mk new file mode 100644 index 000000000000..1bd58cf79cda --- /dev/null +++ b/keyboards/dztech/dz65rgb/keymaps/catrielmuller/rules.mk @@ -0,0 +1,2 @@ +LEADER_ENABLE = yes +UNICODEMAP_ENABLE = yes \ No newline at end of file From 97b8ade1aa7dd96027d10dc92da2a2ccbde61b8c Mon Sep 17 00:00:00 2001 From: fauxpark Date: Mon, 21 Oct 2019 16:38:22 +1100 Subject: [PATCH 144/316] [Keyboard] Use GPIO macros for E6 LED in Planck and Preonic default keymaps (#7098) --- keyboards/planck/keymaps/default/keymap.c | 4 ++-- keyboards/planck/planck.c | 6 +++--- keyboards/preonic/keymaps/default/keymap.c | 4 ++-- keyboards/preonic/rev1/rev1.c | 4 ++-- keyboards/preonic/rev2/rev2.c | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/keyboards/planck/keymaps/default/keymap.c b/keyboards/planck/keymaps/default/keymap.c index f0ba47b2a9b4..47394378c587 100644 --- a/keyboards/planck/keymaps/default/keymap.c +++ b/keyboards/planck/keymaps/default/keymap.c @@ -209,12 +209,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { backlight_step(); #endif #ifdef KEYBOARD_planck_rev5 - PORTE &= ~(1<<6); + writePinLow(E6); #endif } else { unregister_code(KC_RSFT); #ifdef KEYBOARD_planck_rev5 - PORTE |= (1<<6); + writePinHigh(E6); #endif } return false; diff --git a/keyboards/planck/planck.c b/keyboards/planck/planck.c index d9e3f00f2b8f..5a65d5e5f3e4 100644 --- a/keyboards/planck/planck.c +++ b/keyboards/planck/planck.c @@ -14,8 +14,8 @@ __attribute__ ((weak)) void matrix_init_kb(void) { // Turn status LED on #ifdef __AVR__ - DDRE |= (1<<6); - PORTE |= (1<<6); + setPinOutput(E6); + writePinHigh(E6); #endif matrix_init_user(); @@ -26,4 +26,4 @@ const uint8_t music_map[MATRIX_ROWS][MATRIX_COLS] = LAYOUT_planck_grid( 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 -); \ No newline at end of file +); diff --git a/keyboards/preonic/keymaps/default/keymap.c b/keyboards/preonic/keymaps/default/keymap.c index 49cc64dc959b..d8bb2d5f7541 100644 --- a/keyboards/preonic/keymaps/default/keymap.c +++ b/keyboards/preonic/keymaps/default/keymap.c @@ -213,12 +213,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { backlight_step(); #endif #ifdef __AVR__ - PORTE &= ~(1<<6); + writePinLow(E6); #endif } else { unregister_code(KC_RSFT); #ifdef __AVR__ - PORTE |= (1<<6); + writePinHigh(E6); #endif } return false; diff --git a/keyboards/preonic/rev1/rev1.c b/keyboards/preonic/rev1/rev1.c index 4e877960811d..fd09d7f2d849 100644 --- a/keyboards/preonic/rev1/rev1.c +++ b/keyboards/preonic/rev1/rev1.c @@ -18,8 +18,8 @@ void matrix_init_kb(void) { // Turn status LED on - DDRE |= (1<<6); - PORTE |= (1<<6); + setPinOutput(E6); + writePinHigh(E6); matrix_init_user(); }; diff --git a/keyboards/preonic/rev2/rev2.c b/keyboards/preonic/rev2/rev2.c index 30e3110e46e5..785ac3310b98 100644 --- a/keyboards/preonic/rev2/rev2.c +++ b/keyboards/preonic/rev2/rev2.c @@ -18,8 +18,8 @@ void matrix_init_kb(void) { // Turn status LED on - DDRE |= (1<<6); - PORTE |= (1<<6); + setPinOutput(E6); + writePinHigh(E6); matrix_init_user(); }; From 165020a670b44ecb8f173d1fba7167952cbd0a4b Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Mon, 21 Oct 2019 16:34:37 -0700 Subject: [PATCH 145/316] Naked60 Configurator bugfix (#7108) * remove extra commas * fix label for comma key * switch to debug linting (one key per line) --- keyboards/naked60/info.json | 361 ++++++------------------------------ 1 file changed, 61 insertions(+), 300 deletions(-) diff --git a/keyboards/naked60/info.json b/keyboards/naked60/info.json index bc353f659a0f..a16bfe24d9f1 100644 --- a/keyboards/naked60/info.json +++ b/keyboards/naked60/info.json @@ -7,306 +7,67 @@ "layouts": { "LAYOUT": { "layout": [ - { - "label":"ESC", - "x":0, - "y":0 - }, - { - "label":"1", - "x":1, - "y":0 - }, - { - "label":"2", - "x":2, - "y":0 - }, - { - "label":"3", - "x":3, - "y":0 - }, - { - "label":"4", - "x":4, - "y":0 - }, - { - "label":"5", - "x":5, - "y":0 - }, - { - "label":"6", - "x":8, - "y":0 - }, - { - "label":"7", - "x":9, - "y":0 - }, - { - "label":"8", - "x":10, - "y":0 - }, - { - "label":"9", - "x":11, - "y":0 - }, - { - "label":"0", - "x":12, - "y":0 - }, - { - "label":"Back Space", - "x":13, - "y":0 - }, - { - "label":"Tab", - "x":0, - "y":1 - }, - { - "label":"Q", - "x":1, - "y":1 - }, - { - "label":"W", - "x":2, - "y":1, - }, - { - "label":"E", - "x":3, - "y":1, - }, - { - "label":"R", - "x":4, - "y":1, - }, - { - "label":"T", - "x":5, - "y":1, - }, - { - "label":"Y", - "x":8, - "y":1, - }, - { - "label":"U", - "x":9, - "y":1, - }, - { - "label":"I", - "x":10, - "y":1, - }, - { - "label":"O", - "x":11, - "y":1, - }, - { - "label":"P", - "x":12, - "y":1, - }, - { - "label":"\\", - "x":13, - "y":1, - }, - { - "label":"Esc", - "x":0, - "y":2, - }, - { - "label":"A", - "x":1, - "y":2, - }, - { - "label":"S", - "x":2, - "y":2, - }, - { - "label":"D", - "x":3, - "y":2, - }, - { - "label":"F", - "x":4, - "y":2, - }, - { - "label":"G", - "x":5, - "y":2, - }, - { - "label":"H", - "x":8, - "y":2, - }, - { - "label":"J", - "x":9, - "y":2, - }, - { - "label":"K", - "x":10, - "y":2, - }, - { - "label":"L", - "x":11, - "y":2, - }, - { - "label":";", - "x":12, - "y":2, - }, - { - "label":"'", - "x":13, - "y":2, - }, - { - "label":"Shift", - "x":0, - "y":3, - }, - { - "label":"Z", - "x":1, - "y":3, - }, - { - "label":"X", - "x":2, - "y":3, - }, - { - "label":"C", - "x":3, - "y":3, - }, - { - "label":"V", - "x":4, - "y":3, - }, - { - "label":"B", - "x":5, - "y":3, - }, - { - "label":"N", - "x":8, - "y":3, - }, - { - "label":"M", - "x":9, - "y":3, - }, - { - "label":", - ", - "x":10, - "y":3, - }, - { - "label":".", - "x":11, - "y":3, - }, - { - "label":"/", - "x":12, - "y":3, - }, - { - "label":"Enter", - "x":13, - "y":3, - }, - { - "label":"Adjust", - "x":1, - "y":4, - }, - { - "label":"Ctrl", - "x":2, - "y":4, - }, - { - "label":"Alt", - "x":3, - "y":4, - }, - { - "label":"GUI", - "x":4, - "y":4, - }, - { - "label":"⇓", - "x":5, - "y":4, - }, - { - "x":6, - "y":4, - }, - { - "x":7, - "y":4, - }, - { - "label":"⇑", - "x":8, - "y":4, - }, - { - "label":"←", - "x":9, - "y":4, - }, - { - "label":"↓", - "x":10, - "y":4, - }, - { - "label":"↑", - "x":11, - "y":4, - }, - { - "label":"→", - "x":12, - "y":4, - } + {"label":"ESC", "x":0, "y":0}, + {"label":"1", "x":1, "y":0}, + {"label":"2", "x":2, "y":0}, + {"label":"3", "x":3, "y":0}, + {"label":"4", "x":4, "y":0}, + {"label":"5", "x":5, "y":0}, + {"label":"6", "x":8, "y":0}, + {"label":"7", "x":9, "y":0}, + {"label":"8", "x":10, "y":0}, + {"label":"9", "x":11, "y":0}, + {"label":"0", "x":12, "y":0}, + {"label":"Back Space", "x":13, "y":0}, + {"label":"Tab", "x":0, "y":1}, + {"label":"Q", "x":1, "y":1}, + {"label":"W", "x":2, "y":1}, + {"label":"E", "x":3, "y":1}, + {"label":"R", "x":4, "y":1}, + {"label":"T", "x":5, "y":1}, + {"label":"Y", "x":8, "y":1}, + {"label":"U", "x":9, "y":1}, + {"label":"I", "x":10, "y":1}, + {"label":"O", "x":11, "y":1}, + {"label":"P", "x":12, "y":1}, + {"label":"\\", "x":13, "y":1}, + {"label":"Esc", "x":0, "y":2}, + {"label":"A", "x":1, "y":2}, + {"label":"S", "x":2, "y":2}, + {"label":"D", "x":3, "y":2}, + {"label":"F", "x":4, "y":2}, + {"label":"G", "x":5, "y":2}, + {"label":"H", "x":8, "y":2}, + {"label":"J", "x":9, "y":2}, + {"label":"K", "x":10, "y":2}, + {"label":"L", "x":11, "y":2}, + {"label":";", "x":12, "y":2}, + {"label":"'", "x":13, "y":2}, + {"label":"Shift", "x":0, "y":3}, + {"label":"Z", "x":1, "y":3}, + {"label":"X", "x":2, "y":3}, + {"label":"C", "x":3, "y":3}, + {"label":"V", "x":4, "y":3}, + {"label":"B", "x":5, "y":3}, + {"label":"N", "x":8, "y":3}, + {"label":"M", "x":9, "y":3}, + {"label":",", "x":10, "y":3}, + {"label":".", "x":11, "y":3}, + {"label":"/", "x":12, "y":3}, + {"label":"Enter", "x":13, "y":3}, + {"label":"Adjust", "x":1, "y":4}, + {"label":"Ctrl", "x":2, "y":4}, + {"label":"Alt", "x":3, "y":4}, + {"label":"GUI", "x":4, "y":4}, + {"label":"⇓", "x":5, "y":4}, + {"x":6, "y":4}, + {"x":7, "y":4}, + {"label":"⇑", "x":8, "y":4}, + {"label":"←", "x":9, "y":4}, + {"label":"↓", "x":10, "y":4}, + {"label":"↑", "x":11, "y":4}, + {"label":"→", "x":12, "y":4} ] } } -} \ No newline at end of file +} From af03c5f7faa93a59d602ffad368868fc361f25e1 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Tue, 22 Oct 2019 12:01:03 +1100 Subject: [PATCH 146/316] Change V60 Polestar RGB timer to 3 (#7099) --- keyboards/v60_type_r/v60_type_r.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/keyboards/v60_type_r/v60_type_r.c b/keyboards/v60_type_r/v60_type_r.c index 41eb75807d08..5caa149b45d1 100644 --- a/keyboards/v60_type_r/v60_type_r.c +++ b/keyboards/v60_type_r/v60_type_r.c @@ -106,35 +106,35 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { void rgb_timer_init(void) { - /* Timer1 setup */ + /* Timer3 setup */ /* CTC mode */ - TCCR1B |= (1<> 8) & 0xff; - OCR1AL = SOFTPWM_LED_TIMER_TOP & 0xff; + OCR3AH = (SOFTPWM_LED_TIMER_TOP >> 8) & 0xFF; + OCR3AL = SOFTPWM_LED_TIMER_TOP & 0xFF; SREG = sreg; - // Enable the compare match interrupt on timer 1 - TIMSK1 |= (1< Date: Tue, 22 Oct 2019 02:48:45 +0100 Subject: [PATCH 147/316] [Keymap] Personal layout for the Wonderland (#7095) --- .../wonderland/keymaps/rys/keymap.c | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 keyboards/maartenwut/wonderland/keymaps/rys/keymap.c diff --git a/keyboards/maartenwut/wonderland/keymaps/rys/keymap.c b/keyboards/maartenwut/wonderland/keymaps/rys/keymap.c new file mode 100755 index 000000000000..4ce022dd9171 --- /dev/null +++ b/keyboards/maartenwut/wonderland/keymaps/rys/keymap.c @@ -0,0 +1,24 @@ +#include QMK_KEYBOARD_H + +enum layers { + _BASE, + _FUNC +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_BASE] = LAYOUT( + KC_ESC, 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, XXXXXXX, KC_BSPC, \ + KC_PGUP, 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_DEL, \ + KC_PGDN, 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, MO(1), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), \ + KC_LCTL, KC_LGUI, KC_NUBS, KC_LALT, KC_SPC, KC_NUHS, KC_RCTRL \ + ), +[_FUNC] = LAYOUT( + RGB_TOG, VLK_TOG, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, RESET, \ + RGB_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ +RGB_RMOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, \ + RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN,KC_RIGHT, XXXXXXX, \ + _______, KC_LALT, _______, _______, _______, KC_RALT, _______ \ + ) +}; From f033d8113d627c6950dc87936dfdb70e2b1ebf5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arda=20K=C4=B1l=C4=B1=C3=A7da=C4=9F=C4=B1?= Date: Tue, 22 Oct 2019 05:27:26 +0300 Subject: [PATCH 148/316] [Keyboard] 40percentclub 4 pack macropad keyboard (#7088) * 4 pack macropad layout added * Update keyboards/40percentclub/4pack/keymaps/default/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/40percentclub/4pack/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/40percentclub/4pack/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/40percentclub/4pack/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/40percentclub/4pack/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * remove unnecessary comments, remove firmware impact numbers, align comments * remove unnecessary readme paragraphs * pinout changed with direct pins instead of matrix * typo fixed on led method name * leds are now handled by backlight feture, led.c removed, info.json added, flash instructions updated --- keyboards/40percentclub/4pack/4pack.c | 54 ++++ keyboards/40percentclub/4pack/4pack.h | 33 +++ keyboards/40percentclub/4pack/config.h | 257 ++++++++++++++++++ keyboards/40percentclub/4pack/info.json | 12 + .../4pack/keymaps/default/config.h | 19 ++ .../4pack/keymaps/default/keymap.c | 26 ++ .../4pack/keymaps/default/readme.md | 1 + keyboards/40percentclub/4pack/readme.md | 17 ++ keyboards/40percentclub/4pack/rules.mk | 33 +++ 9 files changed, 452 insertions(+) create mode 100644 keyboards/40percentclub/4pack/4pack.c create mode 100644 keyboards/40percentclub/4pack/4pack.h create mode 100644 keyboards/40percentclub/4pack/config.h create mode 100644 keyboards/40percentclub/4pack/info.json create mode 100644 keyboards/40percentclub/4pack/keymaps/default/config.h create mode 100644 keyboards/40percentclub/4pack/keymaps/default/keymap.c create mode 100644 keyboards/40percentclub/4pack/keymaps/default/readme.md create mode 100644 keyboards/40percentclub/4pack/readme.md create mode 100644 keyboards/40percentclub/4pack/rules.mk diff --git a/keyboards/40percentclub/4pack/4pack.c b/keyboards/40percentclub/4pack/4pack.c new file mode 100644 index 000000000000..98f22a65a5c8 --- /dev/null +++ b/keyboards/40percentclub/4pack/4pack.c @@ -0,0 +1,54 @@ +/* Copyright 2019 Arda Kilicdagi + * + * 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 . + */ +#include "4pack.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + setPinOutput(F4); // cathodes + setPinOutput(F5); // cathodes + + // Do the rest + 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/40percentclub/4pack/4pack.h b/keyboards/40percentclub/4pack/4pack.h new file mode 100644 index 000000000000..1340300ace63 --- /dev/null +++ b/keyboards/40percentclub/4pack/4pack.h @@ -0,0 +1,33 @@ +/* Copyright 2019 Arda Kilicdagi + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + k00, k01, k02, k03 \ +) \ +{ \ + { k00, k01, k02, k03 }, \ +} diff --git a/keyboards/40percentclub/4pack/config.h b/keyboards/40percentclub/4pack/config.h new file mode 100644 index 000000000000..33b5df6d5874 --- /dev/null +++ b/keyboards/40percentclub/4pack/config.h @@ -0,0 +1,257 @@ +/* +Copyright 2019 Arda Kilicdagi + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER 40percentclub +#define PRODUCT 4pack +#define DESCRIPTION A 1x4 custom macropad + +/* key matrix size */ +#define MATRIX_ROWS 1 +#define MATRIX_COLS 4 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +// #define MATRIX_ROW_PINS { B0 } // B0 equivalents the ground pin +// #define MATRIX_COL_PINS { E6, D7, C6, D4 } +#define DIRECT_PINS { \ + { E6, D7, C6, D4 } \ +} +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +// #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 +#define BACKLIGHT_LED_COUNT 2 +#undef BACKLIGHT_PIN +#define BACKLIGHT_PINS { F6, F7 } + + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * 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 + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/40percentclub/4pack/info.json b/keyboards/40percentclub/4pack/info.json new file mode 100644 index 000000000000..8dd164e4b2b2 --- /dev/null +++ b/keyboards/40percentclub/4pack/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "4pack", + "url": "", + "maintainer": "qmk", + "width": 4, + "height": 1, + "layouts": { + "LAYOUT": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}] + } + } +} \ No newline at end of file diff --git a/keyboards/40percentclub/4pack/keymaps/default/config.h b/keyboards/40percentclub/4pack/keymaps/default/config.h new file mode 100644 index 000000000000..c76819ce5e99 --- /dev/null +++ b/keyboards/40percentclub/4pack/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 Arda Kilicdagi + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/40percentclub/4pack/keymaps/default/keymap.c b/keyboards/40percentclub/4pack/keymaps/default/keymap.c new file mode 100644 index 000000000000..19264651b6ee --- /dev/null +++ b/keyboards/40percentclub/4pack/keymaps/default/keymap.c @@ -0,0 +1,26 @@ +/* Copyright 2019 Arda Kilicdagi + * + * 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 . + */ +#include QMK_KEYBOARD_H + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* Base */ + KC_A, KC_S, KC_D, KC_F + ), +}; + + +void matrix_init_user(void) { } diff --git a/keyboards/40percentclub/4pack/keymaps/default/readme.md b/keyboards/40percentclub/4pack/keymaps/default/readme.md new file mode 100644 index 000000000000..00bf43cb990f --- /dev/null +++ b/keyboards/40percentclub/4pack/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for 4pack diff --git a/keyboards/40percentclub/4pack/readme.md b/keyboards/40percentclub/4pack/readme.md new file mode 100644 index 000000000000..5fcfbf892dc9 --- /dev/null +++ b/keyboards/40percentclub/4pack/readme.md @@ -0,0 +1,17 @@ +# 4 Pack + +![4pack](https://i.imgur.com/rioXXq5l.jpg) + +A 4-key macropad PCB with its switch and LED pins wired directly to microcontroller IO pins. + +You can find the main blog post about this macropad [here](http://www.40percent.club/2017/07/4-pack.html), also the Gerber files and other documentation is located [here](https://git.40percent.club/di0ib/Misc/src/branch/master/4pack). + +Keyboard Maintainer: [Arda Kilicdagi](http://github.com/ardakilic), [The QMK Community](/~https://github.com/qmk) +Hardware Supported: 4 Pack PCB, Pro Micro +Hardware Availability: [40percent.club](https://git.40percent.club/di0ib/Misc/src/branch/master/4pack) + +Make example for this macropad (after setting up your build environment): + + make 40percentclub/4pack:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/40percentclub/4pack/rules.mk b/keyboards/40percentclub/4pack/rules.mk new file mode 100644 index 000000000000..a0c9d34f5487 --- /dev/null +++ b/keyboards/40percentclub/4pack/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +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 +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs From 80ded60cad8d7ec8b46f5e3acd7948275ead5f2e Mon Sep 17 00:00:00 2001 From: kuchosauronad0 <22005492+kuchosauronad0@users.noreply.github.com> Date: Mon, 21 Oct 2019 20:05:33 -0700 Subject: [PATCH 149/316] Add a short explanation to Zadig the troubleshooting section (#7110) * Add a short explanation to the troubleshooting section While translating I noticed that the troubleshooting section could use a little bit more explanation. @Yanfali was so kind to chime in on this on discord and explained that this was ment for people who accidently forget to put their board in bootloader mode, so I added this as a possible common mistake. Also fixed the spelling of Msys2 to MSYS2 and Halfkay to HalfKay as these are the official spellings they use themselves. * Update driver_installation_zadig.md * Update driver_installation_zadig.md English is hard. * Update docs/driver_installation_zadig.md Co-Authored-By: fauxpark * Update docs/driver_installation_zadig.md Co-Authored-By: fauxpark --- docs/driver_installation_zadig.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/driver_installation_zadig.md b/docs/driver_installation_zadig.md index 71e4cc440f86..b04a6fbef1b9 100644 --- a/docs/driver_installation_zadig.md +++ b/docs/driver_installation_zadig.md @@ -2,9 +2,9 @@ QMK presents itself to the host as a regular HID keyboard device, and as such requires no special drivers. However, in order to flash your keyboard on Windows, the bootloader device that appears when you reset the board often *does*. -There are two notable exceptions: the Caterina bootloader, usually seen on Pro Micros, and the Halfkay bootloader shipped with PJRC Teensys, appear as a serial port and a generic HID device respectively, and so do not require a driver. +There are two notable exceptions: the Caterina bootloader, usually seen on Pro Micros, and the HalfKay bootloader shipped with PJRC Teensys, appear as a serial port and a generic HID device respectively, and so do not require a driver. -We recommend the use of the [Zadig](https://zadig.akeo.ie/) utility. If you have set up the development environment with Msys2 or WSL, the `qmk_install.sh` script will have asked if you want it to install the drivers for you. +We recommend the use of the [Zadig](https://zadig.akeo.ie/) utility. If you have set up the development environment with MSYS2 or WSL, the `qmk_install.sh` script will have asked if you want it to install the drivers for you. ## Installation @@ -31,7 +31,7 @@ Finally, unplug and replug the keyboard to make sure the new driver has been loa ## Recovering from Installation to Wrong Device -If you find that you can no longer type with the keyboard, you may have installed the driver onto the keyboard itself instead of the bootloader. You can easily confirm this in Zadig - a healthy keyboard has the `HidUsb` driver installed on all of its interfaces: +If you find that you can no longer type with the keyboard, you may have accidentally replaced the driver for the keyboard itself instead of for the bootloader. This can happen when the keyboard is not in the bootloader mode. You can easily confirm this in Zadig - a healthy keyboard has the `HidUsb` driver installed on all of its interfaces: ![A healthy keyboard as seen by Zadig](https://i.imgur.com/Hx0E5kC.png) @@ -44,3 +44,5 @@ Right-click it and hit **Uninstall device**. Make sure to tick **Delete the driv ![The Device Uninstall dialog, with the "delete driver" checkbox ticked](https://i.imgur.com/aEs2RuA.png) Click **Action → Scan for hardware changes**. At this point, you should be able to type again. Double check in Zadig that the keyboard device(s) are using the `HidUsb` driver. If so, you're all done, and your board should be functional again! + +?> A full reboot of your computer may sometimes be necessary at this point, to get Windows to pick up the new driver. From 0ab8edb5237ef5a6aeab18c57643e01c7bf2da0a Mon Sep 17 00:00:00 2001 From: Adam Perlman Date: Mon, 21 Oct 2019 23:37:33 -0400 Subject: [PATCH 150/316] [Keymap] Ergodox EZ and dactyl-manuform keymaps for rishka (#7051) * Setup keymaps and userspace for Rishka * Creates a keymap for Ergodox Ez, bdn9 and Dactyl Manuform 5x6 * Update bdn9 config with suggested change * Add pragma to other header files * Apply suggestions from code review Co-Authored-By: fauxpark * Updates from review from fauxpark * Updates from review Swap to keyboard_post_init, layer_state_t and use layer state for encoder * Updates from review Swap to keyboard_post_init, layer_state_t and use layer state for encoder * Add missing change from review --- keyboards/ergodox_ez/keymaps/rishka/config.h | 17 ++ keyboards/ergodox_ez/keymaps/rishka/keymap.c | 210 ++++++++++++++++++ keyboards/ergodox_ez/keymaps/rishka/rules.mk | 2 + .../5x6/keymaps/rishka/config.h | 41 ++++ .../5x6/keymaps/rishka/keymap.c | 61 +++++ .../5x6/keymaps/rishka/rules.mk | 3 + keyboards/keebio/bdn9/keymaps/rishka/config.h | 5 + keyboards/keebio/bdn9/keymaps/rishka/keymap.c | 66 ++++++ keyboards/keebio/bdn9/keymaps/rishka/rules.mk | 1 + users/rishka/rishka.c | 1 + users/rishka/rishka.h | 74 ++++++ users/rishka/rules.mk | 1 + 12 files changed, 482 insertions(+) create mode 100644 keyboards/ergodox_ez/keymaps/rishka/config.h create mode 100644 keyboards/ergodox_ez/keymaps/rishka/keymap.c create mode 100644 keyboards/ergodox_ez/keymaps/rishka/rules.mk create mode 100644 keyboards/handwired/dactyl_manuform/5x6/keymaps/rishka/config.h create mode 100644 keyboards/handwired/dactyl_manuform/5x6/keymaps/rishka/keymap.c create mode 100644 keyboards/handwired/dactyl_manuform/5x6/keymaps/rishka/rules.mk create mode 100644 keyboards/keebio/bdn9/keymaps/rishka/config.h create mode 100644 keyboards/keebio/bdn9/keymaps/rishka/keymap.c create mode 100644 keyboards/keebio/bdn9/keymaps/rishka/rules.mk create mode 100644 users/rishka/rishka.c create mode 100644 users/rishka/rishka.h create mode 100644 users/rishka/rules.mk diff --git a/keyboards/ergodox_ez/keymaps/rishka/config.h b/keyboards/ergodox_ez/keymaps/rishka/config.h new file mode 100644 index 000000000000..c8f8180bcc15 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/rishka/config.h @@ -0,0 +1,17 @@ +#pragma once + +#define PERMISSIVE_HOLD + +#undef MOUSEKEY_TIME_TO_MAX +#define MOUSEKEY_TIME_TO_MAX 0 + +#undef MOUSEKEY_WHEEL_MAX_SPEED +#undef MOUSEKEY_WHEEL_TIME_TO_MAX + +#define MOUSEKEY_WHEEL_MAX_SPEED 1 +#define MOUSEKEY_WHEEL_TIME_TO_MAX 0 + +#define MK_C_OFFSET_1 20 +#define MK_C_OFFSET_2 30 + +#undef MK_MOMENTARY_ACCEL diff --git a/keyboards/ergodox_ez/keymaps/rishka/keymap.c b/keyboards/ergodox_ez/keymaps/rishka/keymap.c new file mode 100644 index 000000000000..102803e512de --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/rishka/keymap.c @@ -0,0 +1,210 @@ + +#include QMK_KEYBOARD_H +#include "version.h" +#include "rishka.h" +enum layers { + BASE, // default layer + WIN, // Switch keys that are needed in windows + SYMB, // symbols + MDIA, // media keys + GAME, // Gamepad setup + FIRMWARE // Layer to trigger reset/refresh +}; +enum custom_keycodes { + VRSN = SAFE_RANGE, + RGB_SLD +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[BASE] = LAYOUT_ergodox_pretty_wrapper( + KC_EQL, ________________NUMBERS_L__________________, TG(WIN), OSX_LOCK, ________________NUMBERS_R__________________, KC_MINS, + KC_DELT, _________________QWERTY_L1_________________, TG(SYMB), TG(SYMB), _________________QWERTY_R1_________________, KC_BSLS, + KC_BSPC, _____________MOD_QWERTY_L2_________________, _____________MOD_QWERTY_R2_________________, LT(MDIA, KC_QUOT), + OS_LSFT, _________________QWERTY_L3_________________, ALL_T(KC_NO), TG(MDIA), _________________QWERTY_R3_________________, OS_RSFT, + LT(SYMB,KC_GRV), KC_QUOT, LALT(KC_LSFT), KC_LEFT, KC_RGHT, KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, OSL(SYMB), + ALT_T(KC_APP), TG(GAME), KC_LALT, CTL_T(KC_ESC), + LT(FIRMWARE, KC_HOME), KC_PGUP, + KC_SPC, GUI_T(KC_BSPC), ALT_T(KC_END), GUI_T(KC_PGDN), CTL_T(KC_TAB), ALT_T(KC_ENT) +), + +[WIN] = LAYOUT_ergodox_pretty_wrapper( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_F1, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_TAB, _________________QWERTY_L2_________________, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, KC_LGUI, _______, _______, _______, _______, _______, _______, _______, + KC_LCTL, _______, KC_LALT, _______, _______, _______, _______, _______, _______, _______, + _______, KC_ESC, _______, _______, + _______, _______, + _______, KC_BSPC, KC_LALT, KC_PGDN, CTL_T(KC_TAB), _______ +), + +[SYMB] = LAYOUT_ergodox_pretty_wrapper( +VRSN, ______________________F_L__________________, KC_F11, KC_F12 , ______________________F_R__________________, KC_NLCK, +_______, _________________SYMBOL_L1_________________, _______, _______, _________________SYMBOL_R1_________________, _______, +_______, _________________SYMBOL_L2_________________, _________________SYMBOL_R2_________________, _______, +_______, _________________SYMBOL_L3_________________, _______, _______, _________________SYMBOL_R3_________________, _______, +_______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_PSLS, _______, + RGB_MOD, RGB_VAI, RGB_HUI, RGB_SLD, + RGB_VAD, RGB_HUD, + _______, _______, _______, RGB_TOG, _______, _______ +), + +[MDIA] = LAYOUT_ergodox( + // left hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_MS_U, _______, KC_WH_U, _______, + _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_BTN1, KC_BTN2, + _______, KC_BTN5, + KC_BTN4, + KC_BTN1, KC_BTN2, KC_BTN3, + // right hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_WH_U, _______, _______, _______, + _______, KC_WH_L, KC_WH_D, KC_WH_R, _______, KC_MPLY, + _______, _______, _______, KC_MPRV, KC_MNXT, _______, _______, + KC_VOLU, KC_VOLD, KC_MUTE, _______, _______, + _______, _______, + _______, + KC_ACL2, KC_ACL1, KC_ACL0 +), + +[GAME] = LAYOUT_ergodox( + // left hand + KC_ESCAPE, KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, + KC_F1, KC_Y, KC_Q, KC_W, KC_E, KC_R, KC_T, + KC_TAB, KC_LSHIFT, KC_A, KC_S, KC_D, KC_F, + KC_LCTRL, KC_B, KC_Z, KC_X, KC_C, KC_V, KC_G, + LT(BASE, KC_L), KC_J, KC_I, KC_O, KC_M, + KC_ESCAPE, _______, + KC_ENTER, + KC_SPACE, KC_LCTRL, KC_LALT, + // right hand + KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + TG(SYMB), 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), + MEH_T(KC_NO), 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_LALT, CTL_T(KC_ESC), + KC_PGUP, + KC_PGDN, KC_TAB, KC_ENT +), + +[FIRMWARE] = LAYOUT_ergodox( + // left hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + RESET, _______, _______, + // right hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______, _______, EEP_RST +), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch (keycode) { + case VRSN: + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + return false; + #ifdef RGBLIGHT_ENABLE + case RGB_SLD: + rgblight_mode(1); + return false; + #endif + } + } + return true; +} + +// Runs just one time when the keyboard initializes. +void keyboard_post_init_user(void) { +#ifdef RGBLIGHT_COLOR_LAYER_0 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_0); +#endif +}; + +// Runs whenever there is a layer state change. +uint32_t layer_state_set_user(layer_state_t state) { + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + + uint8_t layer = get_highest_layer(state); + switch (layer) { + case 0: + #ifdef RGBLIGHT_COLOR_LAYER_0 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_0); + #else + #ifdef RGBLIGHT_ENABLE + rgblight_init(); + #endif + #endif + break; + case 1: + ergodox_right_led_1_on(); + #ifdef RGBLIGHT_COLOR_LAYER_1 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_1); + #endif + break; + case 2: + ergodox_right_led_2_on(); + #ifdef RGBLIGHT_COLOR_LAYER_2 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_2); + #endif + break; + case 3: + ergodox_right_led_3_on(); + #ifdef RGBLIGHT_COLOR_LAYER_3 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_3); + #endif + break; + case 4: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + #ifdef RGBLIGHT_COLOR_LAYER_4 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_4); + #endif + break; + case 5: + ergodox_right_led_1_on(); + ergodox_right_led_3_on(); + #ifdef RGBLIGHT_COLOR_LAYER_5 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_5); + #endif + break; + case 6: + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + #ifdef RGBLIGHT_COLOR_LAYER_6 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_6); + #endif + break; + case 7: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + #ifdef RGBLIGHT_COLOR_LAYER_7 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_7); + #endif + break; + default: + break; + } + + return state; +}; diff --git a/keyboards/ergodox_ez/keymaps/rishka/rules.mk b/keyboards/ergodox_ez/keymaps/rishka/rules.mk new file mode 100644 index 000000000000..c867f89718f2 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/rishka/rules.mk @@ -0,0 +1,2 @@ +# TAP_DANCE_ENABLE = yes +MOUSEKEY_ENABLE = yes diff --git a/keyboards/handwired/dactyl_manuform/5x6/keymaps/rishka/config.h b/keyboards/handwired/dactyl_manuform/5x6/keymaps/rishka/config.h new file mode 100644 index 000000000000..98dc76003163 --- /dev/null +++ b/keyboards/handwired/dactyl_manuform/5x6/keymaps/rishka/config.h @@ -0,0 +1,41 @@ +/* +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 . +*/ + + +#pragma once + + +// #define USE_SERIAL +#define USE_I2C +// #define MASTER_LEFT +// #define MASTER_RIGHT +#define EE_HANDS +// Rows are doubled-up +// #define DEBOUNCE 5 +#define TAPPING_TOGGLE 3 +#define ONESHOT_TAP_TOGGLE 3 +#define PERMISSIVE_HOLD +#define IGNORE_MOD_TAP_INTERRUPT +#define TAPPING_TERM 300 +#ifdef RGBLED_NUM +# undef RGBLED_NUM +#endif +#define RGBLED_NUM 54 +#define RGBLIGHT_LIMIT_VAL 200 +#define RGBLIGHT_ANIMATIONS +// #define RGBLIGHT_LED_MAP { 11,10,9,8,7,6,5,4,3,2,1,0,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26 } +#define RGBLIGHT_SPLIT 27 diff --git a/keyboards/handwired/dactyl_manuform/5x6/keymaps/rishka/keymap.c b/keyboards/handwired/dactyl_manuform/5x6/keymaps/rishka/keymap.c new file mode 100644 index 000000000000..71a91cfd2a7d --- /dev/null +++ b/keyboards/handwired/dactyl_manuform/5x6/keymaps/rishka/keymap.c @@ -0,0 +1,61 @@ +/* A standard layout for the Dactyl Manuform 5x6 Keyboard */ + +#include QMK_KEYBOARD_H +#include "rishka.h" + +enum layers { + BASE, // default layer + WIN, // Switch keys that are needed in windows + SYMB, // symbols + MDIA // media keys +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [BASE] = LAYOUT_5x6_wrapper( + KC_EQL , ________________NUMBERS_L__________________, ________________NUMBERS_R__________________, KC_MINS, + KC_ESC , _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, KC_BSLS, + KC_F1 , _____________MOD_QWERTY_L2_________________, _____________MOD_QWERTY_R2_________________, KC_QUOT, + OS_LSFT, _________________QWERTY_L3_________________, _________________QWERTY_R3_________________, OS_RSFT, + KC_LEFT,KC_RGHT, KC_UP, KC_DOWN, + KC_BSPC, KC_SPC, KC_TAB, KC_ENT, + KC_LGUI, MO(SYMB), MO(SYMB), TT(MDIA), + KC_DEL, KC_GRV, TT(WIN), KC_LALT + ), + [WIN] = LAYOUT_5x6_wrapper( + + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _________________QWERTY_L2_________________, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + KC_LCTL, _______, _______, _______, + _______, _______, _______, _______ + ), + + [SYMB] = LAYOUT_5x6_wrapper( + KC_F12 , ______________________F_L__________________, ______________________F_R__________________, KC_F11, + _______, _________________SYMBOL_L1_________________, _________________SYMBOL_R1_________________, KC_NLCK, + _______, _________________SYMBOL_L2_________________, _________________SYMBOL_R2_________________, _______, + _______, _________________SYMBOL_L3_________________, _________________SYMBOL_R3_________________, _______, + _______, _______, KC_P0 , KC_PDOT, + _______, _______, _______, _______, + RESET , _______, _______, _______, + RGB_TOG, _______, _______, _______ + ), + [MDIA] = LAYOUT_5x6_wrapper( + + RGB_MOD, RGB_HUI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_M_SN, RGB_HUD, _______, KC_MS_U, _______, KC_WH_U, _______, _______, KC_WH_U, _______, _______, _______, + RGB_VAI, RGB_SAI, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, _______, MOUSE_L, KC_WH_D, MOUSE_R, _______, _______, + RGB_VAD, RGB_SAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, + KC_BTN1, KC_BTN2, _______, _______, + KC_BTN3, KC_BTN4, _______, _______, + KC_BTN5, _______, _______, _______ + + ), +}; + + diff --git a/keyboards/handwired/dactyl_manuform/5x6/keymaps/rishka/rules.mk b/keyboards/handwired/dactyl_manuform/5x6/keymaps/rishka/rules.mk new file mode 100644 index 000000000000..7084862d136c --- /dev/null +++ b/keyboards/handwired/dactyl_manuform/5x6/keymaps/rishka/rules.mk @@ -0,0 +1,3 @@ +BOOTLOADER=qmk-dfu +RGBLIGHT_ENABLE = yes + diff --git a/keyboards/keebio/bdn9/keymaps/rishka/config.h b/keyboards/keebio/bdn9/keymaps/rishka/config.h new file mode 100644 index 000000000000..05f1bada9922 --- /dev/null +++ b/keyboards/keebio/bdn9/keymaps/rishka/config.h @@ -0,0 +1,5 @@ +#pragma once + +#define QMK_ESC_OUTPUT B4 +#define QMK_ESC_INPUT F7 +#define QMK_LED B0 diff --git a/keyboards/keebio/bdn9/keymaps/rishka/keymap.c b/keyboards/keebio/bdn9/keymaps/rishka/keymap.c new file mode 100644 index 000000000000..dec371d173bf --- /dev/null +++ b/keyboards/keebio/bdn9/keymaps/rishka/keymap.c @@ -0,0 +1,66 @@ +/* Copyright 2019 Danny Nguyen + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + | Knob 1: Vol Dn/Up | | Knob 2: Page Dn/Up | + | Press: Mute | Home | Press: Play/Pause | + | Hold: Layer 2 | Up | RGB Mode | + | Left | Down | Right | + */ + [0] = LAYOUT( + KC_MUTE, KC_UP, TO(0), + KC_F12 , _______ , KC_F1, + KC_LEFT, KC_DOWN, KC_RGHT + ), + /* + | RESET | N/A | Media Stop | + | Held: Layer 2 | Home | RGB Mode | + | Media Previous | End | Media Next | + */ + [1] = LAYOUT( + RESET , KC_HOME, _______, + _______, _______, _______, + KC_MPRV, KC_END , KC_MNXT + ), +}; +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + if (clockwise) { + tap_code(KC_VOLD); + } else { + tap_code(KC_VOLU); + } + } + else if (index == 1) { + int mod = 0; + if (clockwise) { + mod = 1; + } else { + mod = -1; + } + int n = 2; //sizeof(PROGMEM); + int new_layer = ((layer_state + mod) % n + n) % n; + uprintf("new: %d\n", new_layer); + layer_on(new_layer); + for(int i=0; i < n; i++) { + if (new_layer != i) { + layer_off(i); + } + } + } +} diff --git a/keyboards/keebio/bdn9/keymaps/rishka/rules.mk b/keyboards/keebio/bdn9/keymaps/rishka/rules.mk new file mode 100644 index 000000000000..0613ea8667c0 --- /dev/null +++ b/keyboards/keebio/bdn9/keymaps/rishka/rules.mk @@ -0,0 +1 @@ +BOOTLOADER = qmk-dfu diff --git a/users/rishka/rishka.c b/users/rishka/rishka.c new file mode 100644 index 000000000000..c988072d63a3 --- /dev/null +++ b/users/rishka/rishka.c @@ -0,0 +1 @@ +#include "rishka.h" diff --git a/users/rishka/rishka.h b/users/rishka/rishka.h new file mode 100644 index 000000000000..96915993dc8b --- /dev/null +++ b/users/rishka/rishka.h @@ -0,0 +1,74 @@ +#pragma once + +#if (!defined(LAYOUT) && defined(KEYMAP)) +# define LAYOUT KEYMAP +#endif + +#undef MK_MOMENTARY_ACCEL +#define MK_3_SPEED 1 + +#define LAYOUT_ergodox_pretty_wrapper(...) LAYOUT_ergodox_pretty(__VA_ARGS__) +#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__) +#define LAYOUT_5x6_wrapper(...) LAYOUT_5x6(__VA_ARGS__) +#define KC_MLSF OSM(MOD_LSFT) +#define KC_MRSF OSM(MOD_RSFT) + +#define OS_LGUI OSM(MOD_LGUI) +#define OS_RGUI OSM(MOD_RGUI) +#define OS_LSFT OSM(MOD_LSFT) +#define OS_RSFT OSM(MOD_RSFT) +#define OS_LCTL OSM(MOD_LCTL) +#define OS_RCTL OSM(MOD_RCTL) +#define OS_LALT OSM(MOD_LALT) +#define OS_RALT OSM(MOD_RALT) +#define OS_MEH OSM(MOD_MEH) +#define OS_HYPR OSM(MOD_HYPR) +#define MOUSE_L LSFT(KC_WH_D) +#define MOUSE_R LSFT(KC_WH_U) +#define OSX_LOCK LCTL(LGUI(KC_Q)) + +// layout parts for easy reuse between keyboard keymaps +// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, +// | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | +// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, +#define ________________NUMBERS_L__________________ KC_1, KC_2, KC_3, KC_4, KC_5 +#define ________________NUMBERS_R__________________ KC_6, KC_7, KC_8, KC_9, KC_0 + +// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, +// | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | +// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, +#define ______________________F_L__________________ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5 +#define ______________________F_R__________________ KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 + +// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, +// | Q | W | E | R | T | | Y | U | I | O | P | +// ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----, +// | A | S | D | F | G | | H | J | K | L | ; | +// ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----, +// | Z | X | C | V | B | | N | M | , | . | / | +// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, +#define _________________QWERTY_L1_________________ KC_Q , KC_W , KC_E , KC_R , KC_T +#define _________________QWERTY_L2_________________ KC_A , KC_S , KC_D , KC_F , KC_G +#define _________________QWERTY_L3_________________ KC_Z , KC_X , KC_C , KC_V , KC_B + +#define _________________QWERTY_R1_________________ KC_Y , KC_U , KC_I , KC_O , KC_P +#define _________________QWERTY_R2_________________ KC_H , KC_J , KC_K , KC_L , KC_SCLN +#define _________________QWERTY_R3_________________ KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH + +#define _____________MOD_QWERTY_L2_________________ CTL_T(KC_A), SFT_T(KC_S), GUI_T(KC_D), ALT_T(KC_F), KC_G +#define _____________MOD_QWERTY_R2_________________ KC_H , ALT_T(KC_J), GUI_T(KC_K), SFT_T(KC_L), CTL_T(KC_SCLN) + +// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, +// | ! | @ | { | } | _ | | \ | 7 | 8 | 9 | | +// ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----, +// | # | $ | ( | ) | - | | = | 4 | 5 | 6 | | | +// ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----, +// | % | ^ | [ | ] | + | | * | 1 | 2 | 3 | / | +// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, +#define _________________SYMBOL_L1_________________ KC_EXLM, KC_AT , KC_LCBR, KC_RCBR, KC_UNDS +#define _________________SYMBOL_L2_________________ KC_HASH, KC_DLR , KC_LPRN, KC_RPRN, KC_MINS +#define _________________SYMBOL_L3_________________ KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_PLUS + +#define _________________SYMBOL_R1_________________ KC_BSLS, KC_P7, KC_P8 , KC_P9, KC_PAST +#define _________________SYMBOL_R2_________________ KC_EQL , KC_P4, KC_P5, KC_P6, KC_PPLS +#define _________________SYMBOL_R3_________________ KC_ASTR, KC_P1, KC_P2, KC_P3, KC_PMNS diff --git a/users/rishka/rules.mk b/users/rishka/rules.mk new file mode 100644 index 000000000000..a0b8e584709e --- /dev/null +++ b/users/rishka/rules.mk @@ -0,0 +1 @@ +SRC += rishka.c From 4b47abc737359a5f9c7cb8d22e33427698812e03 Mon Sep 17 00:00:00 2001 From: halvves Date: Mon, 21 Oct 2019 20:38:53 -0700 Subject: [PATCH 151/316] [Keymap] add halvves let's split keymap (#7063) * add halvves let's split keymap * [cr] - review requests from @fauxpark * cleanup spacing, add transparent for spaces in util layer * [cr] - use new core funcs / @fauxpark & @drashna * enable EE_HANDS * [cr] - switch to definable mask for layer state (@drashna) --- keyboards/lets_split/keymaps/halvves/config.h | 37 ++++ keyboards/lets_split/keymaps/halvves/keymap.c | 196 ++++++++++++++++++ keyboards/lets_split/keymaps/halvves/rules.mk | 1 + 3 files changed, 234 insertions(+) create mode 100644 keyboards/lets_split/keymaps/halvves/config.h create mode 100644 keyboards/lets_split/keymaps/halvves/keymap.c create mode 100644 keyboards/lets_split/keymaps/halvves/rules.mk diff --git a/keyboards/lets_split/keymaps/halvves/config.h b/keyboards/lets_split/keymaps/halvves/config.h new file mode 100644 index 000000000000..70f6d13c7ba3 --- /dev/null +++ b/keyboards/lets_split/keymaps/halvves/config.h @@ -0,0 +1,37 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + +/* Use I2C or Serial, not both */ +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ +// #define MASTER_LEFT +// #define MASTER_RIGHT +#define EE_HANDS + +// smooth mousekeys (copied from the ergo ez config) +#define MOUSEKEY_INTERVAL 16 +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_TIME_TO_MAX 60 +#define MOUSEKEY_MAX_SPEED 7 +#define MOUSEKEY_WHEEL_DELAY 0 diff --git a/keyboards/lets_split/keymaps/halvves/keymap.c b/keyboards/lets_split/keymaps/halvves/keymap.c new file mode 100644 index 000000000000..6fbd6465198b --- /dev/null +++ b/keyboards/lets_split/keymaps/halvves/keymap.c @@ -0,0 +1,196 @@ +#include QMK_KEYBOARD_H + +enum layer_names { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _UTIL, + _MOUSE, + _ADJUST, +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define UTIL MO(_UTIL) +#define MOUSE MO(_MOUSE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Util | Ctrl | Alt | GUI |Lower | Space |Raise | Mouse| Mouse| | Util | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_ortho_4x12( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , + UTIL, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, MOUSE, MOUSE, XXXXXXX, UTIL +), + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | ' | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Util | Ctrl | Alt | GUI |Lower |Space |Space |Raise | Mouse| Mouse| | | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = LAYOUT_ortho_4x12( + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, + KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , + UTIL, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, MOUSE, MOUSE, XXXXXXX, XXXXXXX +), + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | Tab | ' | , | . | P | Y | F | G | C | R | L | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Util | Ctrl | Alt | GUI |Lower |Space |Space |Raise | Mouse| Mouse| | | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = LAYOUT_ortho_4x12( + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , + UTIL, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, MOUSE, MOUSE, XXXXXXX, XXXXXXX +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_ortho_4x12( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_ortho_4x12( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Util + * ,-----------------------------------------------------------------------------------. + * | | | | | | Reset|Reset | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | LEFT | DOWN | UP | RGHT | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_UTIL] = LAYOUT_ortho_4x12( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, XXXXXXX, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +), + +/* Mouse + * ,-----------------------------------------------------------------------------------. + * | | | M Up | | | | | | |L Clk |R Clk | W Up | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | |M Left|M Down|M Rght| | | | | | | |W Down| + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_MOUSE] = LAYOUT_ortho_4x12( + XXXXXXX, XXXXXXX, KC_MS_U, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BTN1, KC_BTN2, KC_WH_U, + XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_R, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_WH_D, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_ortho_4x12( + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + + +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + } + return true; +} diff --git a/keyboards/lets_split/keymaps/halvves/rules.mk b/keyboards/lets_split/keymaps/halvves/rules.mk new file mode 100644 index 000000000000..6c605daecf53 --- /dev/null +++ b/keyboards/lets_split/keymaps/halvves/rules.mk @@ -0,0 +1 @@ +MOUSEKEY_ENABLE = yes From c44aff5f18b287bae718c934a9943eae97585cba Mon Sep 17 00:00:00 2001 From: Deckweiss Date: Tue, 22 Oct 2019 06:34:43 +0200 Subject: [PATCH 152/316] [Keyboard] Added layout, configured bluetooth (Hacked Motospeed handwired) (#7084) * Added more intuitive layout with bluetooth commands --- keyboards/handwired/hacked_motospeed/config.h | 3 +-- .../hacked_motospeed/keymaps/german/keymap.c | 10 ++++++++++ .../hacked_motospeed/keymaps/german/layers.json | 1 + .../hacked_motospeed/keymaps/german/readme.md | 13 +++++++++++++ keyboards/handwired/hacked_motospeed/rules.mk | 4 +++- 5 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 keyboards/handwired/hacked_motospeed/keymaps/german/keymap.c create mode 100644 keyboards/handwired/hacked_motospeed/keymaps/german/layers.json create mode 100755 keyboards/handwired/hacked_motospeed/keymaps/german/readme.md diff --git a/keyboards/handwired/hacked_motospeed/config.h b/keyboards/handwired/hacked_motospeed/config.h index 1a341c0f4eb9..d4bf11f235cd 100644 --- a/keyboards/handwired/hacked_motospeed/config.h +++ b/keyboards/handwired/hacked_motospeed/config.h @@ -43,7 +43,7 @@ along with this program. If not, see . */ // WR XR YR ZR VR ZL YL XL WL VL -#define MATRIX_ROW_PINS { B3, B5, F1, B4, B6, D5, D4, D6, D7, C4} +#define MATRIX_ROW_PINS { B3, B4, F1, B5, B6, D5, D4, D6, D7, C4} // ER DR CR BR AR FR FL AL BL CL DL EL #define MATRIX_COL_PINS { F7, F6, F5, F4, F3, F2, E0, E1, C0, C1, C2, C3 } @@ -120,7 +120,6 @@ along with this program. If not, see . * power-up. * */ -#define FORCE_NKRO /* * Magic Key Options diff --git a/keyboards/handwired/hacked_motospeed/keymaps/german/keymap.c b/keyboards/handwired/hacked_motospeed/keymaps/german/keymap.c new file mode 100644 index 000000000000..23c076680f5b --- /dev/null +++ b/keyboards/handwired/hacked_motospeed/keymaps/german/keymap.c @@ -0,0 +1,10 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT(KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LSFT(KC_8), LSFT(KC_9), KC_PEQL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, LSFT(KC_MINS), MO(2), MO(6), KC_TAB, KC_BSPC, KC_SPC, MO(1), KC_LCTL, KC_LALT, MO(4), KC_LGUI, MO(2)), +[1] = LAYOUT(LALT(KC_F4), LSFT(KC_Q), LSFT(KC_W), LSFT(KC_E), LSFT(KC_R), LSFT(KC_T), LSFT(KC_Y), LSFT(KC_U), LSFT(KC_I), LSFT(KC_O), LSFT(KC_P), LSFT(KC_A), LSFT(KC_S), LSFT(KC_D), LSFT(KC_F), LSFT(KC_G), LSFT(KC_H), LSFT(KC_J), LSFT(KC_K), LSFT(KC_L), RALT(KC_7), RALT(KC_0), KC_NUHS, LSFT(KC_Z), LSFT(KC_X), LSFT(KC_C), LSFT(KC_V), LSFT(KC_B), LSFT(KC_N), LSFT(KC_M), LSFT(KC_COMM), LSFT(KC_DOT), LSFT(KC_1), MO(3), TG(6), LSFT(KC_TAB), KC_DEL, KC_ENT, KC_TRNS, LSFT(KC_LCTL), LSFT(KC_LALT), LSFT(KC_RALT), LSFT(KC_LGUI), MO(3)), +[2] = LAYOUT(LSFT(KC_GRV), RALT(KC_Q), KC_JYEN, RALT(KC_E), LSFT(KC_4), LSFT(KC_5), LSFT(KC_6), KC_LBRC, KC_UP, KC_SCLN, KC_PSCR, KC_QUOT, KC_MINS, LSFT(KC_7), LSFT(KC_2), LSFT(KC_NUHS), LSFT(KC_3), KC_LEFT, KC_DOWN, KC_RGHT, KC_NUBS, LSFT(KC_NUBS), RALT(KC_RBRC), KC_GRV, LSFT(KC_RBRC), KC_SLSH, KC_RBRC, RALT(KC_NUBS), KC_HOME, KC_PGDN, KC_PGUP, KC_END, RALT(KC_6), KC_TRNS, KC_CAPS, KC_TAB, KC_DEL, KC_ENT, MO(3), OUT_BT, OUT_USB, OUT_AUTO, BL_STEP, KC_TRNS), +[3] = LAYOUT(LSFT(KC_GRV), RALT(KC_Q), KC_JYEN, RALT(KC_E), LSFT(KC_4), LSFT(KC_5), LSFT(KC_6), LSFT(KC_LBRC), KC_UP, LSFT(KC_SCLN), KC_PSCR, LSFT(KC_QUOT), KC_MINS, RALT(KC_MINS), LSFT(KC_EQL), KC_EQL, LSFT(KC_3), KC_LEFT, KC_DOWN, KC_RGHT, RALT(KC_8), RALT(KC_9), RALT(KC_RBRC), KC_GRV, LSFT(KC_RBRC), LSFT(KC_SLSH), KC_RBRC, RALT(KC_NUBS), KC_HOME, KC_PGDN, KC_PGUP, KC_END, RALT(KC_6), KC_TRNS, KC_CAPS, LSFT(KC_TAB), LSFT(KC_DEL), LSFT(KC_ENT), KC_TRNS, RSFT(KC_RCTL), RSFT(KC_LALT), RSFT(KC_RALT), RSFT(KC_RGUI), KC_TRNS), +[4] = LAYOUT(RALT(KC_ESC), RALT(KC_Q), RALT(KC_W), RALT(KC_E), RALT(KC_R), RALT(KC_T), RALT(KC_Y), RALT(KC_U), RALT(KC_I), RALT(KC_O), RALT(KC_P), RALT(KC_A), RALT(KC_S), RALT(KC_D), RALT(KC_F), RALT(KC_G), RALT(KC_H), RALT(KC_J), RALT(KC_K), RALT(KC_L), RALT(KC_8), RALT(KC_9), LSFT(KC_0), RALT(KC_Z), RALT(KC_X), RALT(KC_C), RALT(KC_V), RALT(KC_B), RALT(KC_N), RALT(KC_M), RALT(KC_COMM), RALT(KC_DOT), RALT(KC_6), KC_NO, RALT(KC_ENT), RALT(KC_TAB), RALT(KC_DEL), RALT(KC_SPC), RALT(KC_LSFT), RALT(KC_LCTL), RALT(KC_LALT), KC_TRNS, RALT(KC_LGUI), KC_NO), +[5] = LAYOUT(KC_0, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_NO, KC_TRNS, KC_TAB, KC_BSPC, KC_SPC, KC_LSFT, KC_LCTL, KC_LALT, KC_RALT, KC_LGUI, KC_NO) +}; diff --git a/keyboards/handwired/hacked_motospeed/keymaps/german/layers.json b/keyboards/handwired/hacked_motospeed/keymaps/german/layers.json new file mode 100644 index 000000000000..d2ff7c5b4632 --- /dev/null +++ b/keyboards/handwired/hacked_motospeed/keymaps/german/layers.json @@ -0,0 +1 @@ +[["KC_ESC", "KC_Q", "KC_W", "KC_E", "KC_R", "KC_T", "KC_Y", "KC_U", "KC_I", "KC_O", "KC_P", "KC_A", "KC_S", "KC_D", "KC_F", "KC_G", "KC_H", "KC_J", "KC_K", "KC_L", "LSFT(KC_8)", "LSFT(KC_9)", "KC_PEQL", "KC_Z", "KC_X", "KC_C", "KC_V", "KC_B", "KC_N", "KC_M", "KC_COMM", "KC_DOT", "LSFT(KC_MINS)", "MO(2)", "MO(6)", "KC_TAB", "KC_BSPC", "KC_SPC", "MO(1)", "KC_LCTL", "KC_LALT", "MO(4)", "KC_LGUI", "MO(2)"], ["LALT(KC_F4)", "LSFT(KC_Q)", "LSFT(KC_W)", "LSFT(KC_E)", "LSFT(KC_R)", "LSFT(KC_T)", "LSFT(KC_Y)", "LSFT(KC_U)", "LSFT(KC_I)", "LSFT(KC_O)", "LSFT(KC_P)", "LSFT(KC_A)", "LSFT(KC_S)", "LSFT(KC_D)", "LSFT(KC_F)", "LSFT(KC_G)", "LSFT(KC_H)", "LSFT(KC_J)", "LSFT(KC_K)", "LSFT(KC_L)", "RALT(KC_7)", "RALT(KC_0)", "KC_NUHS", "LSFT(KC_Z)", "LSFT(KC_X)", "LSFT(KC_C)", "LSFT(KC_V)", "LSFT(KC_B)", "LSFT(KC_N)", "LSFT(KC_M)", "LSFT(KC_COMM)", "LSFT(KC_DOT)", "LSFT(KC_1)", "MO(3)", "TG(6)", "LSFT(KC_TAB)", "KC_DEL", "KC_ENT", "KC_TRNS", "LSFT(KC_LCTL)", "LSFT(KC_LALT)", "LSFT(KC_RALT)", "LSFT(KC_LGUI)", "MO(3)"], ["LSFT(KC_GRV)", "RALT(KC_Q)", "KC_JYEN", "RALT(KC_E)", "LSFT(KC_4)", "LSFT(KC_5)", "LSFT(KC_6)", "KC_LBRC", "KC_UP", "KC_SCLN", "KC_PSCR", "KC_QUOT", "KC_MINS", "LSFT(KC_7)", "LSFT(KC_2)", "LSFT(KC_NUHS)", "LSFT(KC_3)", "KC_LEFT", "KC_DOWN", "KC_RGHT", "KC_NUBS", "LSFT(KC_NUBS)", "RALT(KC_RBRC)", "KC_GRV", "LSFT(KC_RBRC)", "KC_SLSH", "KC_RBRC", "RALT(KC_NUBS)", "KC_HOME", "KC_PGDN", "KC_PGUP", "KC_END", "RALT(KC_6)", "KC_TRNS", "KC_CAPS", "KC_TAB", "KC_DEL", "KC_ENT", "MO(3)", "OUT_BT", "OUT_USB", "OUT_AUTO", "BL_STEP", "KC_TRNS"], ["LSFT(KC_GRV)", "RALT(KC_Q)", "KC_JYEN", "RALT(KC_E)", "LSFT(KC_4)", "LSFT(KC_5)", "LSFT(KC_6)", "LSFT(KC_LBRC)", "KC_UP", "LSFT(KC_SCLN)", "KC_PSCR", "LSFT(KC_QUOT)", "KC_MINS", "RALT(KC_MINS)", "LSFT(KC_EQL)", "KC_EQL", "LSFT(KC_3)", "KC_LEFT", "KC_DOWN", "KC_RGHT", "RALT(KC_8)", "RALT(KC_9)", "RALT(KC_RBRC)", "KC_GRV", "LSFT(KC_RBRC)", "LSFT(KC_SLSH)", "KC_RBRC", "RALT(KC_NUBS)", "KC_HOME", "KC_PGDN", "KC_PGUP", "KC_END", "RALT(KC_6)", "KC_TRNS", "KC_CAPS", "LSFT(KC_TAB)", "LSFT(KC_DEL)", "LSFT(KC_ENT)", "KC_TRNS", "RSFT(KC_RCTL)", "RSFT(KC_LALT)", "RSFT(KC_RALT)", "RSFT(KC_RGUI)", "KC_TRNS"], ["RALT(KC_ESC)", "RALT(KC_Q)", "RALT(KC_W)", "RALT(KC_E)", "RALT(KC_R)", "RALT(KC_T)", "RALT(KC_Y)", "RALT(KC_U)", "RALT(KC_I)", "RALT(KC_O)", "RALT(KC_P)", "RALT(KC_A)", "RALT(KC_S)", "RALT(KC_D)", "RALT(KC_F)", "RALT(KC_G)", "RALT(KC_H)", "RALT(KC_J)", "RALT(KC_K)", "RALT(KC_L)", "RALT(KC_8)", "RALT(KC_9)", "LSFT(KC_0)", "RALT(KC_Z)", "RALT(KC_X)", "RALT(KC_C)", "RALT(KC_V)", "RALT(KC_B)", "RALT(KC_N)", "RALT(KC_M)", "RALT(KC_COMM)", "RALT(KC_DOT)", "RALT(KC_6)", "KC_NO", "RALT(KC_ENT)", "RALT(KC_TAB)", "RALT(KC_DEL)", "RALT(KC_SPC)", "RALT(KC_LSFT)", "RALT(KC_LCTL)", "RALT(KC_LALT)", "KC_TRNS", "RALT(KC_LGUI)", "KC_NO"], ["KC_0", "KC_F1", "KC_F2", "KC_F3", "KC_F4", "KC_F5", "KC_F6", "KC_F7", "KC_F8", "KC_F9", "KC_F10", "KC_1", "KC_2", "KC_3", "KC_4", "KC_5", "KC_6", "KC_7", "KC_8", "KC_9", "KC_F11", "KC_F12", "KC_F13", "KC_F14", "KC_F15", "KC_F16", "KC_F17", "KC_F18", "KC_F19", "KC_F20", "KC_F21", "KC_F22", "KC_F23", "KC_NO", "KC_TRNS", "KC_TAB", "KC_BSPC", "KC_SPC", "KC_LSFT", "KC_LCTL", "KC_LALT", "KC_RALT", "KC_LGUI", "KC_NO"]] \ No newline at end of file diff --git a/keyboards/handwired/hacked_motospeed/keymaps/german/readme.md b/keyboards/handwired/hacked_motospeed/keymaps/german/readme.md new file mode 100755 index 000000000000..fd07b155fb77 --- /dev/null +++ b/keyboards/handwired/hacked_motospeed/keymaps/german/readme.md @@ -0,0 +1,13 @@ +# Generated Keymap Layout + +This layout was generated by the QMK API. You can find the JSON data used to +generate this keymap in the file layers.json. + +To make use of this file you will need follow the following steps: + +* Download or Clone QMK Firmware: +* Extract QMK Firmware to a location on your hard drive +* Copy this folder into %s +* You are now ready to compile or use your keymap with the source + +More information can be found in the QMK docs: \ No newline at end of file diff --git a/keyboards/handwired/hacked_motospeed/rules.mk b/keyboards/handwired/hacked_motospeed/rules.mk index a2ad5adc07c0..7cb9e914ec23 100644 --- a/keyboards/handwired/hacked_motospeed/rules.mk +++ b/keyboards/handwired/hacked_motospeed/rules.mk @@ -22,7 +22,7 @@ COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = yes # USB Nkey Rollover +NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) @@ -31,3 +31,5 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +NO_USB_STARTUP_CHECK = yes # Disable initialization only when usb is plugged in +BLUETOOTH = RN42 From 2ee961c9e873d577e711431ae0960aa21629525e Mon Sep 17 00:00:00 2001 From: fauxpark Date: Tue, 22 Oct 2019 15:43:18 +1100 Subject: [PATCH 153/316] Cleanup rules.mk for 32U4 keyboards, I-K (#7097) * Cleanup rules.mk for 32U4 keyboards, I-K * Clean up ivy rules.mk --- keyboards/idobo/keymaps/default75/rules.mk | 14 ----- keyboards/idobo/rules.mk | 51 +--------------- keyboards/ivy/keymaps/default/rules.mk | 22 ------- keyboards/ivy/rev1/rules.mk | 3 - keyboards/ivy/rules.mk | 51 ++++------------ keyboards/jc65/v32u4/keymaps/default/rules.mk | 0 keyboards/jc65/v32u4/rules.mk | 54 +++-------------- keyboards/jd40/rules.mk | 54 +++-------------- keyboards/jd45/rules.mk | 54 +++-------------- keyboards/jnao/rules.mk | 15 +---- keyboards/kagamidget/rules.mk | 51 +--------------- keyboards/katana60/rules.mk | 54 +++-------------- keyboards/kbdfans/kbd19x/rules.mk | 51 +--------------- keyboards/kbdfans/kbd4x/rules.mk | 51 +--------------- keyboards/kbdfans/kbd66/rules.mk | 54 +++-------------- keyboards/kbdfans/kbd67/hotswap/rules.mk | 51 +--------------- keyboards/kbdfans/kbd67/rev1/rules.mk | 51 +--------------- keyboards/kbdfans/kbd67/rev2/rules.mk | 51 +--------------- keyboards/kbdfans/kbd6x/rules.mk | 54 +++-------------- keyboards/kbdfans/kbd75/rev1/rules.mk | 8 ++- keyboards/kbdfans/kbd75/rev2/rules.mk | 8 ++- .../keymaps/default_backlighting/rules.mk | 1 - keyboards/kbdfans/kbd8x/rules.mk | 52 +++------------- keyboards/kbdfans/kbd8x_mk2/rules.mk | 51 +--------------- keyboards/kc60/rules.mk | 54 +++-------------- keyboards/kc60se/rules.mk | 53 +++-------------- keyboards/keebio/bdn9/rules.mk | 22 +------ keyboards/keebio/bfo9000/rules.mk | 47 +++------------ .../keebio/chocopad/keymaps/default/rules.mk | 2 - keyboards/keebio/chocopad/rules.mk | 48 +++------------ keyboards/keebio/dilly/rules.mk | 48 +++------------ keyboards/keebio/ergodicity/rules.mk | 51 +--------------- .../keebio/fourier/keymaps/default/rules.mk | 0 keyboards/keebio/fourier/rules.mk | 47 +++------------ keyboards/keebio/iris/rules.mk | 19 +++--- .../keebio/laplace/keymaps/default/rules.mk | 0 keyboards/keebio/laplace/rules.mk | 52 +++------------- keyboards/keebio/levinson/rules.mk | 16 +++-- keyboards/keebio/nyquist/rules.mk | 47 +++------------ .../keebio/quefrency/keymaps/default/rules.mk | 0 .../quefrency/keymaps/default65/rules.mk | 0 keyboards/keebio/quefrency/rules.mk | 16 +++-- keyboards/keebio/rorschach/rules.mk | 13 ++-- keyboards/keebio/tragicforce68/rules.mk | 16 +++-- keyboards/keebio/tukey/rules.mk | 15 +---- keyboards/keebio/viterbi/rules.mk | 16 +++-- keyboards/keebio/wavelet/rules.mk | 16 +++-- keyboards/keycapsss/o4l_5x12/rules.mk | 50 +--------------- keyboards/keyhive/maypad/rules.mk | 51 +--------------- keyboards/kinesis/alvicstep/rules.mk | 6 -- keyboards/kinesis/stapelberg/rules.mk | 5 -- keyboards/kingly_keys/little_foot/rules.mk | 3 +- keyboards/kingly_keys/romac/rules.mk | 3 +- keyboards/kingly_keys/romac_plus/rules.mk | 9 +++ keyboards/kingly_keys/ropro/rules.mk | 2 - keyboards/kingly_keys/soap/rules.mk | 1 - keyboards/kira75/rules.mk | 54 +++-------------- keyboards/kmac/rules.mk | 52 +++------------- keyboards/kmini/rules.mk | 59 ++++--------------- keyboards/knops/mini/rules.mk | 54 +++-------------- keyboards/kona_classic/rules.mk | 55 +++-------------- keyboards/kudox/keymaps/default/rules.mk | 0 keyboards/kudox/rules.mk | 41 +------------ keyboards/kudox_game/keymaps/default/rules.mk | 0 keyboards/kudox_game/rules.mk | 40 +------------ 65 files changed, 317 insertions(+), 1672 deletions(-) delete mode 100644 keyboards/idobo/keymaps/default75/rules.mk delete mode 100644 keyboards/ivy/keymaps/default/rules.mk delete mode 100644 keyboards/jc65/v32u4/keymaps/default/rules.mk delete mode 100644 keyboards/kbdfans/kbd8x/keymaps/default_backlighting/rules.mk delete mode 100644 keyboards/keebio/chocopad/keymaps/default/rules.mk delete mode 100644 keyboards/keebio/fourier/keymaps/default/rules.mk delete mode 100644 keyboards/keebio/laplace/keymaps/default/rules.mk delete mode 100644 keyboards/keebio/quefrency/keymaps/default/rules.mk delete mode 100644 keyboards/keebio/quefrency/keymaps/default65/rules.mk delete mode 100644 keyboards/kudox/keymaps/default/rules.mk delete mode 100644 keyboards/kudox_game/keymaps/default/rules.mk diff --git a/keyboards/idobo/keymaps/default75/rules.mk b/keyboards/idobo/keymaps/default75/rules.mk deleted file mode 100644 index 7efceba50a84..000000000000 --- a/keyboards/idobo/keymaps/default75/rules.mk +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright 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 . diff --git a/keyboards/idobo/rules.mk b/keyboards/idobo/rules.mk index a5a86cc6a12c..421a4eaae35a 100644 --- a/keyboards/idobo/rules.mk +++ b/keyboards/idobo/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/ivy/keymaps/default/rules.mk b/keyboards/ivy/keymaps/default/rules.mk deleted file mode 100644 index cd169fbfd254..000000000000 --- a/keyboards/ivy/keymaps/default/rules.mk +++ /dev/null @@ -1,22 +0,0 @@ - - -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # 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 -NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - diff --git a/keyboards/ivy/rev1/rules.mk b/keyboards/ivy/rev1/rules.mk index f4043e2b799e..e69de29bb2d1 100644 --- a/keyboards/ivy/rev1/rules.mk +++ b/keyboards/ivy/rev1/rules.mk @@ -1,3 +0,0 @@ -BACKLIGHT_ENABLE = yes -RGBLIGHT_ENABLE = no -AUDIO_ENABLE = no \ No newline at end of file diff --git a/keyboards/ivy/rules.mk b/keyboards/ivy/rules.mk index b27739644f29..ae94bd3fb8eb 100644 --- a/keyboards/ivy/rules.mk +++ b/keyboards/ivy/rules.mk @@ -1,47 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically @@ -50,9 +19,9 @@ BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration +COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode diff --git a/keyboards/jc65/v32u4/keymaps/default/rules.mk b/keyboards/jc65/v32u4/keymaps/default/rules.mk deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/keyboards/jc65/v32u4/rules.mk b/keyboards/jc65/v32u4/rules.mk index cc905fb185be..e1498325cc42 100644 --- a/keyboards/jc65/v32u4/rules.mk +++ b/keyboards/jc65/v32u4/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable diff --git a/keyboards/jd40/rules.mk b/keyboards/jd40/rules.mk index 5fc0a45e4dbb..439f885fea2a 100644 --- a/keyboards/jd40/rules.mk +++ b/keyboards/jd40/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. diff --git a/keyboards/jd45/rules.mk b/keyboards/jd45/rules.mk index e7ccb6325278..9ec5048aec52 100644 --- a/keyboards/jd45/rules.mk +++ b/keyboards/jd45/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. diff --git a/keyboards/jnao/rules.mk b/keyboards/jnao/rules.mk index 396983bc0e38..913ba4d1eef2 100644 --- a/keyboards/jnao/rules.mk +++ b/keyboards/jnao/rules.mk @@ -1,27 +1,16 @@ # MCU name MCU = atmega32u4 - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/kagamidget/rules.mk b/keyboards/kagamidget/rules.mk index e7445a6faf6f..93c64e7357e3 100644 --- a/keyboards/kagamidget/rules.mk +++ b/keyboards/kagamidget/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/katana60/rules.mk b/keyboards/katana60/rules.mk index d4ed1d08de64..ef5ef06851bf 100644 --- a/keyboards/katana60/rules.mk +++ b/keyboards/katana60/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable diff --git a/keyboards/kbdfans/kbd19x/rules.mk b/keyboards/kbdfans/kbd19x/rules.mk index b7a08f241c86..0f6a80f8cb77 100644 --- a/keyboards/kbdfans/kbd19x/rules.mk +++ b/keyboards/kbdfans/kbd19x/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/kbdfans/kbd4x/rules.mk b/keyboards/kbdfans/kbd4x/rules.mk index 7e9ea791270f..c5a10bce88a3 100644 --- a/keyboards/kbdfans/kbd4x/rules.mk +++ b/keyboards/kbdfans/kbd4x/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/kbdfans/kbd66/rules.mk b/keyboards/kbdfans/kbd66/rules.mk index ffefc4bc87ee..7484ca9e77a6 100644 --- a/keyboards/kbdfans/kbd66/rules.mk +++ b/keyboards/kbdfans/kbd66/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable diff --git a/keyboards/kbdfans/kbd67/hotswap/rules.mk b/keyboards/kbdfans/kbd67/hotswap/rules.mk index f8667d280f45..4b51619da11c 100644 --- a/keyboards/kbdfans/kbd67/hotswap/rules.mk +++ b/keyboards/kbdfans/kbd67/hotswap/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/kbdfans/kbd67/rev1/rules.mk b/keyboards/kbdfans/kbd67/rev1/rules.mk index 0d7c14ad4531..d71446caf330 100644 --- a/keyboards/kbdfans/kbd67/rev1/rules.mk +++ b/keyboards/kbdfans/kbd67/rev1/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/kbdfans/kbd67/rev2/rules.mk b/keyboards/kbdfans/kbd67/rev2/rules.mk index 5e874a041a38..431ff194ec40 100644 --- a/keyboards/kbdfans/kbd67/rev2/rules.mk +++ b/keyboards/kbdfans/kbd67/rev2/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/kbdfans/kbd6x/rules.mk b/keyboards/kbdfans/kbd6x/rules.mk index 72c52d3c6e60..efdbdbb531cc 100644 --- a/keyboards/kbdfans/kbd6x/rules.mk +++ b/keyboards/kbdfans/kbd6x/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable diff --git a/keyboards/kbdfans/kbd75/rev1/rules.mk b/keyboards/kbdfans/kbd75/rev1/rules.mk index 421894a387bd..de0af62b87c7 100644 --- a/keyboards/kbdfans/kbd75/rev1/rules.mk +++ b/keyboards/kbdfans/kbd75/rev1/rules.mk @@ -2,9 +2,15 @@ MCU = atmega32u4 # Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - # Build Options # comment out to disable the options. # diff --git a/keyboards/kbdfans/kbd75/rev2/rules.mk b/keyboards/kbdfans/kbd75/rev2/rules.mk index 421894a387bd..de0af62b87c7 100644 --- a/keyboards/kbdfans/kbd75/rev2/rules.mk +++ b/keyboards/kbdfans/kbd75/rev2/rules.mk @@ -2,9 +2,15 @@ MCU = atmega32u4 # Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - # Build Options # comment out to disable the options. # diff --git a/keyboards/kbdfans/kbd8x/keymaps/default_backlighting/rules.mk b/keyboards/kbdfans/kbd8x/keymaps/default_backlighting/rules.mk deleted file mode 100644 index d98bb1cb1778..000000000000 --- a/keyboards/kbdfans/kbd8x/keymaps/default_backlighting/rules.mk +++ /dev/null @@ -1 +0,0 @@ -#Build Options diff --git a/keyboards/kbdfans/kbd8x/rules.mk b/keyboards/kbdfans/kbd8x/rules.mk index f6ed7729c3b2..f0a4689fe4b8 100644 --- a/keyboards/kbdfans/kbd8x/rules.mk +++ b/keyboards/kbdfans/kbd8x/rules.mk @@ -1,52 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - # Build Options # change yes to no to disable # diff --git a/keyboards/kbdfans/kbd8x_mk2/rules.mk b/keyboards/kbdfans/kbd8x_mk2/rules.mk index 43e0dcf40f08..ba8b8ee875aa 100644 --- a/keyboards/kbdfans/kbd8x_mk2/rules.mk +++ b/keyboards/kbdfans/kbd8x_mk2/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/kc60/rules.mk b/keyboards/kc60/rules.mk index 05cfe88daa35..3e7e4797c603 100644 --- a/keyboards/kc60/rules.mk +++ b/keyboards/kc60/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable diff --git a/keyboards/kc60se/rules.mk b/keyboards/kc60se/rules.mk index f090f3ecbf13..1685cb742340 100644 --- a/keyboards/kc60se/rules.mk +++ b/keyboards/kc60se/rules.mk @@ -1,52 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - # Build Options # change yes to no to disable diff --git a/keyboards/keebio/bdn9/rules.mk b/keyboards/keebio/bdn9/rules.mk index 3ab84910890b..8b4bb334eb2f 100644 --- a/keyboards/keebio/bdn9/rules.mk +++ b/keyboards/keebio/bdn9/rules.mk @@ -1,11 +1,5 @@ +# MCU name MCU = atmega32u4 -F_CPU = 16000000 -ARCH = AVR8 -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Bootloader selection # Teensy halfkay @@ -13,20 +7,10 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/keebio/bfo9000/rules.mk b/keyboards/keebio/bfo9000/rules.mk index 931a0f5e9576..c0f4ed42ddd1 100644 --- a/keyboards/keebio/bfo9000/rules.mk +++ b/keyboards/keebio/bfo9000/rules.mk @@ -1,47 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically diff --git a/keyboards/keebio/chocopad/keymaps/default/rules.mk b/keyboards/keebio/chocopad/keymaps/default/rules.mk deleted file mode 100644 index a81250cdf6d9..000000000000 --- a/keyboards/keebio/chocopad/keymaps/default/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -RGBLIGHT_ENABLE = yes - diff --git a/keyboards/keebio/chocopad/rules.mk b/keyboards/keebio/chocopad/rules.mk index 39ce38e100e7..ac68b66523c0 100644 --- a/keyboards/keebio/chocopad/rules.mk +++ b/keyboards/keebio/chocopad/rules.mk @@ -1,45 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina # Build Options # comment out to disable the options. diff --git a/keyboards/keebio/dilly/rules.mk b/keyboards/keebio/dilly/rules.mk index 812362567e8d..14f62bd8f795 100644 --- a/keyboards/keebio/dilly/rules.mk +++ b/keyboards/keebio/dilly/rules.mk @@ -1,45 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina # Build Options # comment out to disable the options. diff --git a/keyboards/keebio/ergodicity/rules.mk b/keyboards/keebio/ergodicity/rules.mk index 974f75afdf2f..0c794fb7511f 100644 --- a/keyboards/keebio/ergodicity/rules.mk +++ b/keyboards/keebio/ergodicity/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/keebio/fourier/keymaps/default/rules.mk b/keyboards/keebio/fourier/keymaps/default/rules.mk deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/keyboards/keebio/fourier/rules.mk b/keyboards/keebio/fourier/rules.mk index 9512c0f64827..9bd9e1dccce5 100644 --- a/keyboards/keebio/fourier/rules.mk +++ b/keyboards/keebio/fourier/rules.mk @@ -1,47 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically diff --git a/keyboards/keebio/iris/rules.mk b/keyboards/keebio/iris/rules.mk index 83b13b160312..ed730b02b225 100644 --- a/keyboards/keebio/iris/rules.mk +++ b/keyboards/keebio/iris/rules.mk @@ -1,12 +1,14 @@ +# MCU name MCU = atmega32u4 -F_CPU = 16000000 -ARCH = AVR8 -F_USB = $(F_CPU) -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp ifneq (, $(findstring rev3, $(KEYBOARD))) BOOTLOADER = qmk-dfu else ifneq (, $(findstring rev4, $(KEYBOARD))) @@ -15,9 +17,6 @@ else BOOTLOADER = caterina endif -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically diff --git a/keyboards/keebio/laplace/keymaps/default/rules.mk b/keyboards/keebio/laplace/keymaps/default/rules.mk deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/keyboards/keebio/laplace/rules.mk b/keyboards/keebio/laplace/rules.mk index 7f896e1bd5b1..01efe96f6582 100644 --- a/keyboards/keebio/laplace/rules.mk +++ b/keyboards/keebio/laplace/rules.mk @@ -1,49 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina # Build Options # change to "no" to disable the options, or define them in the Makefile in diff --git a/keyboards/keebio/levinson/rules.mk b/keyboards/keebio/levinson/rules.mk index cdaef48890f6..c7446445f35d 100644 --- a/keyboards/keebio/levinson/rules.mk +++ b/keyboards/keebio/levinson/rules.mk @@ -1,11 +1,15 @@ +# MCU name MCU = atmega32u4 -F_CPU = 16000000 -ARCH = AVR8 -F_USB = $(F_CPU) -BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina # Build Options # change to "no" to disable the options, or define them in the Makefile in diff --git a/keyboards/keebio/nyquist/rules.mk b/keyboards/keebio/nyquist/rules.mk index ea4053763cf5..bf3b6762198e 100644 --- a/keyboards/keebio/nyquist/rules.mk +++ b/keyboards/keebio/nyquist/rules.mk @@ -1,51 +1,20 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp ifneq (, $(findstring rev3, $(KEYBOARD))) BOOTLOADER = qmk-dfu else BOOTLOADER = caterina endif -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically diff --git a/keyboards/keebio/quefrency/keymaps/default/rules.mk b/keyboards/keebio/quefrency/keymaps/default/rules.mk deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/keyboards/keebio/quefrency/keymaps/default65/rules.mk b/keyboards/keebio/quefrency/keymaps/default65/rules.mk deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/keyboards/keebio/quefrency/rules.mk b/keyboards/keebio/quefrency/rules.mk index c28696c08e66..284a0def3245 100644 --- a/keyboards/keebio/quefrency/rules.mk +++ b/keyboards/keebio/quefrency/rules.mk @@ -1,11 +1,15 @@ +# MCU name MCU = atmega32u4 -F_CPU = 16000000 -ARCH = AVR8 -F_USB = $(F_CPU) -BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina # Build Options # change to "no" to disable the options, or define them in the Makefile in diff --git a/keyboards/keebio/rorschach/rules.mk b/keyboards/keebio/rorschach/rules.mk index b50074052279..f6007e442256 100644 --- a/keyboards/keebio/rorschach/rules.mk +++ b/keyboards/keebio/rorschach/rules.mk @@ -1,10 +1,15 @@ # MCU name MCU = atmega32u4 -F_CPU = 16000000 -ARCH = AVR8 -F_USB = $(F_CPU) + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = yes # Mouse keys(+4700) diff --git a/keyboards/keebio/tragicforce68/rules.mk b/keyboards/keebio/tragicforce68/rules.mk index a652f1fac60e..2118d3fc27ff 100644 --- a/keyboards/keebio/tragicforce68/rules.mk +++ b/keyboards/keebio/tragicforce68/rules.mk @@ -1,11 +1,15 @@ +# MCU name MCU = atmega32u4 -F_CPU = 16000000 -ARCH = AVR8 -F_USB = $(F_CPU) -BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina # Build Options # change yes to no to disable diff --git a/keyboards/keebio/tukey/rules.mk b/keyboards/keebio/tukey/rules.mk index ab860459daa9..c74f16996170 100644 --- a/keyboards/keebio/tukey/rules.mk +++ b/keyboards/keebio/tukey/rules.mk @@ -1,27 +1,16 @@ # MCU name MCU = atmega32u4 - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/keebio/viterbi/rules.mk b/keyboards/keebio/viterbi/rules.mk index 811f57fdbcb0..0759ab925e88 100644 --- a/keyboards/keebio/viterbi/rules.mk +++ b/keyboards/keebio/viterbi/rules.mk @@ -1,11 +1,15 @@ +# MCU name MCU = atmega32u4 -F_CPU = 16000000 -ARCH = AVR8 -F_USB = $(F_CPU) -BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina # Build Options # change to "no" to disable the options, or define them in the Makefile in diff --git a/keyboards/keebio/wavelet/rules.mk b/keyboards/keebio/wavelet/rules.mk index cfff50a41d25..f924db62b8ad 100644 --- a/keyboards/keebio/wavelet/rules.mk +++ b/keyboards/keebio/wavelet/rules.mk @@ -1,11 +1,15 @@ +# MCU name MCU = atmega32u4 -F_CPU = 16000000 -ARCH = AVR8 -F_USB = $(F_CPU) -BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina # Build Options # change to "no" to disable the options, or define them in the Makefile in diff --git a/keyboards/keycapsss/o4l_5x12/rules.mk b/keyboards/keycapsss/o4l_5x12/rules.mk index 36c30f309f25..0703535375d9 100644 --- a/keyboards/keycapsss/o4l_5x12/rules.mk +++ b/keyboards/keycapsss/o4l_5x12/rules.mk @@ -1,62 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) diff --git a/keyboards/keyhive/maypad/rules.mk b/keyboards/keyhive/maypad/rules.mk index d34236a16ec5..f76179af65bd 100644 --- a/keyboards/keyhive/maypad/rules.mk +++ b/keyboards/keyhive/maypad/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/kinesis/alvicstep/rules.mk b/keyboards/kinesis/alvicstep/rules.mk index 76e69d027850..e69de29bb2d1 100644 --- a/keyboards/kinesis/alvicstep/rules.mk +++ b/keyboards/kinesis/alvicstep/rules.mk @@ -1,6 +0,0 @@ -# just silently stop, since we need to upload with teensy uploader -# upload: build - - - - diff --git a/keyboards/kinesis/stapelberg/rules.mk b/keyboards/kinesis/stapelberg/rules.mk index 3f2ff2d6cc8f..e69de29bb2d1 100644 --- a/keyboards/kinesis/stapelberg/rules.mk +++ b/keyboards/kinesis/stapelberg/rules.mk @@ -1,5 +0,0 @@ - - - - - diff --git a/keyboards/kingly_keys/little_foot/rules.mk b/keyboards/kingly_keys/little_foot/rules.mk index 0c3011db9da9..d360340c5604 100644 --- a/keyboards/kingly_keys/little_foot/rules.mk +++ b/keyboards/kingly_keys/little_foot/rules.mk @@ -7,7 +7,8 @@ MCU = atmega32u4 # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina # Build Options diff --git a/keyboards/kingly_keys/romac/rules.mk b/keyboards/kingly_keys/romac/rules.mk index 1dd9bd658b0c..a3da8aa83474 100644 --- a/keyboards/kingly_keys/romac/rules.mk +++ b/keyboards/kingly_keys/romac/rules.mk @@ -7,7 +7,8 @@ MCU = atmega32u4 # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina # Build Options diff --git a/keyboards/kingly_keys/romac_plus/rules.mk b/keyboards/kingly_keys/romac_plus/rules.mk index d0aab2dd186a..ce00f6166ca7 100644 --- a/keyboards/kingly_keys/romac_plus/rules.mk +++ b/keyboards/kingly_keys/romac_plus/rules.mk @@ -1,5 +1,14 @@ +# MCU name MCU = atmega32u4 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina # Build Options diff --git a/keyboards/kingly_keys/ropro/rules.mk b/keyboards/kingly_keys/ropro/rules.mk index 0819dbafadb7..69774ec351f2 100644 --- a/keyboards/kingly_keys/ropro/rules.mk +++ b/keyboards/kingly_keys/ropro/rules.mk @@ -1,7 +1,6 @@ # MCU name MCU = atmega32u4 - # Bootloader selection # Teensy halfkay # Pro Micro caterina @@ -12,7 +11,6 @@ MCU = atmega32u4 # ATmega328P USBasp BOOTLOADER = caterina - # Build Options # change yes to no to disable # diff --git a/keyboards/kingly_keys/soap/rules.mk b/keyboards/kingly_keys/soap/rules.mk index 7e98ab6eb491..27e315847913 100644 --- a/keyboards/kingly_keys/soap/rules.mk +++ b/keyboards/kingly_keys/soap/rules.mk @@ -11,7 +11,6 @@ MCU = atmega32u4 # ATmega328P USBasp BOOTLOADER = atmel-dfu - # Build Options # change yes to no to disable # diff --git a/keyboards/kira75/rules.mk b/keyboards/kira75/rules.mk index 21822109225e..0f29718cc8b4 100644 --- a/keyboards/kira75/rules.mk +++ b/keyboards/kira75/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable diff --git a/keyboards/kmac/rules.mk b/keyboards/kmac/rules.mk index 33e5e43f7a23..8f53f26cd7d3 100644 --- a/keyboards/kmac/rules.mk +++ b/keyboards/kmac/rules.mk @@ -1,59 +1,19 @@ -# Project specific files -SRC += matrix.c - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. +# Processor frequency F_CPU = 8000000 - -# -# 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 - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# Supported layouts -LAYOUTS = tkl_ansi - # Build Options # change yes to no to disable # @@ -73,3 +33,9 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches + +# Project specific files +SRC += matrix.c + +# Supported layouts +LAYOUTS = tkl_ansi diff --git a/keyboards/kmini/rules.mk b/keyboards/kmini/rules.mk index a4183870cabf..0406c323268f 100755 --- a/keyboards/kmini/rules.mk +++ b/keyboards/kmini/rules.mk @@ -1,54 +1,18 @@ -# Project specific files -SRC = matrix.c - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. +# Processor frequency F_CPU = 8000000 - -# -# 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 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable @@ -69,3 +33,6 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches + +# Project specific files +SRC = matrix.c diff --git a/keyboards/knops/mini/rules.mk b/keyboards/knops/mini/rules.mk index d4ed1d08de64..ef5ef06851bf 100644 --- a/keyboards/knops/mini/rules.mk +++ b/keyboards/knops/mini/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable diff --git a/keyboards/kona_classic/rules.mk b/keyboards/kona_classic/rules.mk index 8b4179e395a5..0a7df029c49b 100644 --- a/keyboards/kona_classic/rules.mk +++ b/keyboards/kona_classic/rules.mk @@ -1,52 +1,15 @@ - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=512 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = halfkay # Build Options # change yes to no to disable diff --git a/keyboards/kudox/keymaps/default/rules.mk b/keyboards/kudox/keymaps/default/rules.mk deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/keyboards/kudox/rules.mk b/keyboards/kudox/rules.mk index ca954bec3bd5..68a434feb12c 100644 --- a/keyboards/kudox/rules.mk +++ b/keyboards/kudox/rules.mk @@ -1,53 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - # Build Options # change yes to no to disable # diff --git a/keyboards/kudox_game/keymaps/default/rules.mk b/keyboards/kudox_game/keymaps/default/rules.mk deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/keyboards/kudox_game/rules.mk b/keyboards/kudox_game/rules.mk index d564eddf9027..71d7cf270229 100644 --- a/keyboards/kudox_game/rules.mk +++ b/keyboards/kudox_game/rules.mk @@ -1,50 +1,14 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina # Build Options From f87908228ab0bcd5302feb5701443b8af708d947 Mon Sep 17 00:00:00 2001 From: Max Rumpf Date: Tue, 22 Oct 2019 14:47:43 +0200 Subject: [PATCH 154/316] Remove apostrophe from various abbreviations' plural forms (#7050) While this was historically a valid possibility, nowadays, it reads kinda weird, and the [Oxford Dictionaries Online suggests to avoid it](https://english.stackexchange.com/a/56010). Thus, I removed it everywhere I found it. --- docs/hardware_avr.md | 2 +- docs/hardware_drivers.md | 2 +- docs/reference_glossary.md | 8 ++++---- docs/understanding_qmk.md | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/hardware_avr.md b/docs/hardware_avr.md index 0c1b31bb26a1..697c55d2a8b5 100644 --- a/docs/hardware_avr.md +++ b/docs/hardware_avr.md @@ -1,6 +1,6 @@ # Keyboards with AVR Processors -This page describes the support for for AVR processors in QMK. AVR processors include the atmega32u4, atmega32u2, at90usb1286, and other processors from Atmel Corporation. AVR processors are 8-bit MCU's that are designed to be easy to work with. The most common AVR processors in keyboards have on-board USB and plenty of GPIO for supporting large keyboard matrices. They are the most popular MCU for use in keyboards today. +This page describes the support for for AVR processors in QMK. AVR processors include the atmega32u4, atmega32u2, at90usb1286, and other processors from Atmel Corporation. AVR processors are 8-bit MCUs that are designed to be easy to work with. The most common AVR processors in keyboards have on-board USB and plenty of GPIO for supporting large keyboard matrices. They are the most popular MCU for use in keyboards today. If you have not yet you should read the [Keyboard Guidelines](hardware_keyboard_guidelines.md) to get a sense of how keyboards fit into QMK. diff --git a/docs/hardware_drivers.md b/docs/hardware_drivers.md index 023e92982cbd..321ba2a4bcb5 100644 --- a/docs/hardware_drivers.md +++ b/docs/hardware_drivers.md @@ -20,7 +20,7 @@ Support for SSD1306 based OLED displays. For more information see the [OLED Driv ## uGFX -You can make use of uGFX within QMK to drive character and graphic LCD's, LED arrays, OLED, TFT, and other display technologies. This needs to be better documented, if you are trying to do this and reading the code doesn't help please [open an issue](/~https://github.com/qmk/qmk_firmware/issues/new) and we can help you through the process. +You can make use of uGFX within QMK to drive character and graphic LCDs, LED arrays, OLED, TFT, and other display technologies. This needs to be better documented, if you are trying to do this and reading the code doesn't help please [open an issue](/~https://github.com/qmk/qmk_firmware/issues/new) and we can help you through the process. ## WS2812 (AVR Only) diff --git a/docs/reference_glossary.md b/docs/reference_glossary.md index 422abb2ece6f..08a22050cf8c 100644 --- a/docs/reference_glossary.md +++ b/docs/reference_glossary.md @@ -1,16 +1,16 @@ # Glossary of QMK Terms ## ARM -A line of 32-bit MCU's produced by a number of companies, such as Atmel, Cypress, Kinetis, NXP, ST, and TI. +A line of 32-bit MCUs produced by a number of companies, such as Atmel, Cypress, Kinetis, NXP, ST, and TI. ## AVR -A line of 8-bit MCU's produced by [Atmel](http://www.microchip.com/). AVR was the original platform that TMK supported. +A line of 8-bit MCUs produced by [Atmel](http://www.microchip.com/). AVR was the original platform that TMK supported. ## AZERTY The standard Français (French) keyboard layout. Named for the first 6 keys on the keyboard. ## Backlight -A generic term for lighting on a keyboard. The backlight is typically, but not always, an array of LED's that shine through keycaps and/or switches. +A generic term for lighting on a keyboard. The backlight is typically, but not always, an array of LEDs that shine through keycaps and/or switches. ## Bluetooth A short range peer to peer wireless protocol. Most common wireless protocol for a keyboard. @@ -147,7 +147,7 @@ A feature that lets you assign multiple keycodes to the same key based on how ma A low-cost AVR development board that is commonly used for hand-wired builds. A teensy is often chosen despite costing a few dollars more due to its halfkay bootloader, which makes flashing very simple. ## Underlight -A generic term for LEDs that light the underside of the board. These LED's typically shine away from the bottom of the PCB and towards the surface the keyboard rests on. +A generic term for LEDs that light the underside of the board. These LEDs typically shine away from the bottom of the PCB and towards the surface the keyboard rests on. ## Unicode In the larger computer world Unicode is a set of encoding schemes for representing characters in any language. As it relates to QMK it means using various OS schemes to send unicode codepoints instead of scancodes. diff --git a/docs/understanding_qmk.md b/docs/understanding_qmk.md index a94c9c3191e7..81cedfcf53b1 100644 --- a/docs/understanding_qmk.md +++ b/docs/understanding_qmk.md @@ -22,7 +22,7 @@ This section of code is called "The Main Loop" because it's responsible for loop keyboard_task(); ``` -This is where all the keyboard specific functionality is dispatched. The source code for `keyboard_task()` can be found in [tmk_core/common/keyboard.c](/~https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/tmk_core/common/keyboard.c#L216), and it is responsible for detecting changes in the matrix and turning status LED's on and off. +This is where all the keyboard specific functionality is dispatched. The source code for `keyboard_task()` can be found in [tmk_core/common/keyboard.c](/~https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/tmk_core/common/keyboard.c#L216), and it is responsible for detecting changes in the matrix and turning status LEDs on and off. Within `keyboard_task()` you'll find code to handle: @@ -30,7 +30,7 @@ Within `keyboard_task()` you'll find code to handle: * Mouse Handling * Serial Link(s) * Visualizer -* Keyboard status LED's (Caps Lock, Num Lock, Scroll Lock) +* Keyboard status LEDs (Caps Lock, Num Lock, Scroll Lock) #### Matrix Scanning @@ -175,7 +175,7 @@ FIXME: This needs to be written FIXME: This needs to be written -#### Keyboard state LED's (Caps Lock, Num Lock, Scroll Lock) +#### Keyboard state LEDs (Caps Lock, Num Lock, Scroll Lock) FIXME: This needs to be written From 454c99d128af8b21d3d54d3c376eb684db73faa0 Mon Sep 17 00:00:00 2001 From: Reid Sox-Harris Date: Tue, 22 Oct 2019 06:37:29 -0700 Subject: [PATCH 155/316] add bdn9/eosti keymap (#7105) --- keyboards/keebio/bdn9/keymaps/eosti/config.h | 1 + keyboards/keebio/bdn9/keymaps/eosti/keymap.c | 161 ++++++++++++++++++ keyboards/keebio/bdn9/keymaps/eosti/readme.md | 9 + keyboards/keebio/bdn9/keymaps/eosti/rules.mk | 1 + 4 files changed, 172 insertions(+) create mode 100644 keyboards/keebio/bdn9/keymaps/eosti/config.h create mode 100644 keyboards/keebio/bdn9/keymaps/eosti/keymap.c create mode 100644 keyboards/keebio/bdn9/keymaps/eosti/readme.md create mode 100644 keyboards/keebio/bdn9/keymaps/eosti/rules.mk diff --git a/keyboards/keebio/bdn9/keymaps/eosti/config.h b/keyboards/keebio/bdn9/keymaps/eosti/config.h new file mode 100644 index 000000000000..4ba28f26a865 --- /dev/null +++ b/keyboards/keebio/bdn9/keymaps/eosti/config.h @@ -0,0 +1 @@ +#define TAPPING_TERM 175 diff --git a/keyboards/keebio/bdn9/keymaps/eosti/keymap.c b/keyboards/keebio/bdn9/keymaps/eosti/keymap.c new file mode 100644 index 000000000000..adec3984bc33 --- /dev/null +++ b/keyboards/keebio/bdn9/keymaps/eosti/keymap.c @@ -0,0 +1,161 @@ +#include QMK_KEYBOARD_H + +enum layer_names { + _BASE, + _MACRO, + _MOD +}; + +enum custom_keycodes { + M801 = SAFE_RANGE, + M802, + M803, + M804, + M805, + M806, + MAIL_C +}; + +// tapdance keycodes +enum td_keycodes { + LAY // Our example key: `LALT` when held, `(` when tapped. Add additional keycodes for each tapdance. +}; + +// define a type containing as many tapdance states as you need +typedef enum { + SINGLE_TAP, + SINGLE_HOLD, +} td_state_t; + +// create a global instance of the tapdance state type +static td_state_t td_state; + +// declare your tapdance functions: + +// function to determine the current tapdance state +int cur_dance (qk_tap_dance_state_t *state); + +// `finished` and `reset` functions for each tapdance keycode +void altlp_finished (qk_tap_dance_state_t *state, void *user_data); +void altlp_reset (qk_tap_dance_state_t *state, void *user_data); + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case M801: + if (record->event.pressed) { + SEND_STRING("M801" SS_TAP(X_ENTER)); + } + break; + case M802: + if (record->event.pressed) { + SEND_STRING("M802" SS_TAP(X_ENTER)); + } + break; + case M803: + if (record->event.pressed) { + SEND_STRING("M803" SS_TAP(X_ENTER)); + } + break; + case M804: + if (record->event.pressed) { + SEND_STRING("M804" SS_TAP(X_ENTER)); + } + break; + case M805: + if (record->event.pressed) { + SEND_STRING("M805" SS_TAP(X_ENTER)); + } + break; + case M806: + if (record->event.pressed) { + SEND_STRING("M806" SS_TAP(X_ENTER)); + } + break; + case MAIL_C: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_ENTER) SS_TAP(X_DOWN) SS_TAP(X_DOWN) SS_TAP(X_ENTER)); + } + break; + } + + return true; +}; + +#define EX_ARR LCTL(LSFT(KC_ENTER)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT( + // ┌────────┬────────┬────────┐ + KC_MUTE, KC_UP, TD(LAY), + // ├────────┼────────┼────────┤ + KC_LEFT, KC_DOWN, KC_RGHT, + // ├────────┼────────┼────────┤ + KC_NO, KC_NO, KC_NO + // └────────┴────────┴────────┘ + ), + [_MACRO] = LAYOUT( + // ┌────────┬────────┬────────┐ + _______, KC_SPC, TG(_MACRO), + // ├────────┼────────┼────────┤ + M801, M802, M803, + // ├────────┼────────┼────────┤ + MAIL_C, KC_NO, EX_ARR + // └────────┴────────┴────────┘ + ), + [_MOD] = LAYOUT( + // ┌────────┬────────┬────────┐ + _______, BL_STEP,TG(_MOD), + // ├────────┼────────┼────────┤ + KC_NO, RGB_MOD, KC_NO, + // ├────────┼────────┼────────┤ + KC_NO, KC_NO, KC_NO + // └────────┴────────┴────────┘ + ) +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + if (clockwise) { + tap_code(KC_VOLD); + } else { + tap_code(KC_VOLU); + } + } +} + +// determine the tapdance state to return +int cur_dance (qk_tap_dance_state_t *state) { + if (state->count == 1) { + if (state->interrupted || !state->pressed) { return SINGLE_TAP; } + else { return SINGLE_HOLD; } + } else { return 3; } // any number higher than the maximum state value you return above +} + +// handle the possible states for each tapdance keycode you define: + +void altlp_finished (qk_tap_dance_state_t *state, void *user_data) { + td_state = cur_dance(state); + switch (td_state) { + case SINGLE_TAP: + layer_on(_MACRO); + break; + case SINGLE_HOLD: + layer_on(_MOD); + break; + } +} + +void altlp_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (td_state) { + case SINGLE_TAP: + break; + case SINGLE_HOLD: + layer_off(_MOD); + break; + } +} + +// define `ACTION_TAP_DANCE_FN_ADVANCED()` for each tapdance keycode, passing in `finished` and `reset` functions +qk_tap_dance_action_t tap_dance_actions[] = { + [LAY] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, altlp_finished, altlp_reset) +}; diff --git a/keyboards/keebio/bdn9/keymaps/eosti/readme.md b/keyboards/keebio/bdn9/keymaps/eosti/readme.md new file mode 100644 index 000000000000..d93ce1e5f474 --- /dev/null +++ b/keyboards/keebio/bdn9/keymaps/eosti/readme.md @@ -0,0 +1,9 @@ +# EosTi's BDN9 Macropad Layout + +## Features + +- Single encoder in the top left to control volume, push to mute +- Arrow keys on home layer +- Tap upper right to toggle to macro layer +- Hold upper right to change keyboard functions (aka RGB) +- 520 entire bytes free! diff --git a/keyboards/keebio/bdn9/keymaps/eosti/rules.mk b/keyboards/keebio/bdn9/keymaps/eosti/rules.mk new file mode 100644 index 000000000000..31e0fcf29339 --- /dev/null +++ b/keyboards/keebio/bdn9/keymaps/eosti/rules.mk @@ -0,0 +1 @@ +TAP_DANCE_ENABLE=yes From d60b193932d86a01230679905106d9ae016e7a24 Mon Sep 17 00:00:00 2001 From: Josh Hinnebusch Date: Tue, 22 Oct 2019 09:39:15 -0400 Subject: [PATCH 156/316] update VID and PID for h87a (#7100) --- keyboards/hineybush/h87a/config.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/keyboards/hineybush/h87a/config.h b/keyboards/hineybush/h87a/config.h index 245e6eda8352..5a1e6d366cd9 100644 --- a/keyboards/hineybush/h87a/config.h +++ b/keyboards/hineybush/h87a/config.h @@ -16,10 +16,10 @@ along with this program. If not, see . */ /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x0000 +#define VENDOR_ID 0x04D8 +#define PRODUCT_ID 0xECE9 #define DEVICE_VER 0x0001 -#define MANUFACTURER hineybush +#define MANUFACTURER hineybush keyboards #define PRODUCT h87a #define DESCRIPTION QMK-programmable TKL PCB for custom keyboards From e214f2826e6cbb03f988916eeed10f250b77408c Mon Sep 17 00:00:00 2001 From: fauxpark Date: Wed, 23 Oct 2019 00:44:50 +1100 Subject: [PATCH 157/316] Add ISO layout macro for KBD67 rev2 (#7113) --- keyboards/kbdfans/kbd67/rev2/info.json | 254 +++++++++++++++++++++++-- keyboards/kbdfans/kbd67/rev2/rev2.h | 14 ++ keyboards/kbdfans/kbd67/rev2/rules.mk | 2 +- 3 files changed, 255 insertions(+), 15 deletions(-) diff --git a/keyboards/kbdfans/kbd67/rev2/info.json b/keyboards/kbdfans/kbd67/rev2/info.json index 4b7b5e8b3f74..8cf2d3915102 100644 --- a/keyboards/kbdfans/kbd67/rev2/info.json +++ b/keyboards/kbdfans/kbd67/rev2/info.json @@ -1,16 +1,242 @@ { - "keyboard_name": "kbd67v2", - "url": "", - "maintainer": "qmk", - "width": 16, - "height": 5, - "layouts": { - "LAYOUT_all": { - "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":15, "y":1}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":15, "y":2}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":2.75}, {"x":6.5, "y":4, "w":1.25}, {"x":7.75, "y":4, "w":2.25}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] - }, - - "LAYOUT_65_ansi": { - "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0, "w":2}, {"x":15, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":15, "y":1}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":15, "y":2}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] - } - } + "keyboard_name": "kbd67v2", + "url": "", + "maintainer": "qmk", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0}, + {"x":14, "y":0}, + {"x":15, "y":0}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":13.5, "y":1, "w":1.5}, + {"x":15, "y":1}, + + {"x":0, "y":2, "w":1.75}, + {"x":1.75, "y":2}, + {"x":2.75, "y":2}, + {"x":3.75, "y":2}, + {"x":4.75, "y":2}, + {"x":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2, "w":2.25}, + {"x":15, "y":2}, + + {"x":0, "y":3, "w":1.25}, + {"x":1.25, "y":3}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":1.75}, + {"x":14, "y":3}, + {"x":15, "y":3}, + + {"x":0, "y":4, "w":1.25}, + {"x":1.25, "y":4, "w":1.25}, + {"x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":2.75}, + {"x":6.5, "y":4, "w":1.25}, + {"x":7.75, "y":4, "w":2.25}, + {"x":10, "y":4}, + {"x":11, "y":4}, + {"x":12, "y":4}, + {"x":13, "y":4}, + {"x":14, "y":4}, + {"x":15, "y":4} + ] + }, + "LAYOUT_65_ansi": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0, "w":2}, + {"x":15, "y":0}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":13.5, "y":1, "w":1.5}, + {"x":15, "y":1}, + + {"x":0, "y":2, "w":1.75}, + {"x":1.75, "y":2}, + {"x":2.75, "y":2}, + {"x":3.75, "y":2}, + {"x":4.75, "y":2}, + {"x":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2, "w":2.25}, + {"x":15, "y":2}, + + {"x":0, "y":3, "w":2.25}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":1.75}, + {"x":14, "y":3}, + {"x":15, "y":3}, + + {"x":0, "y":4, "w":1.25}, + {"x":1.25, "y":4, "w":1.25}, + {"x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":6.25}, + {"x":10, "y":4}, + {"x":11, "y":4}, + {"x":12, "y":4}, + {"x":13, "y":4}, + {"x":14, "y":4}, + {"x":15, "y":4} + ] + }, + "LAYOUT_65_iso": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0, "w":2}, + {"x":15, "y":0}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":15, "y":1}, + + {"x":0, "y":2, "w":1.75}, + {"x":1.75, "y":2}, + {"x":2.75, "y":2}, + {"x":3.75, "y":2}, + {"x":4.75, "y":2}, + {"x":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2}, + {"x":13.75, "y":1, "w":1.25, "h":2}, + {"x":15, "y":2}, + + {"x":0, "y":3, "w":1.25}, + {"x":1.25, "y":3}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":1.75}, + {"x":14, "y":3}, + {"x":15, "y":3}, + + {"x":0, "y":4, "w":1.25}, + {"x":1.25, "y":4, "w":1.25}, + {"x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":6.25}, + {"x":10, "y":4}, + {"x":11, "y":4}, + {"x":12, "y":4}, + {"x":13, "y":4}, + {"x":14, "y":4}, + {"x":15, "y":4} + ] + } + } } diff --git a/keyboards/kbdfans/kbd67/rev2/rev2.h b/keyboards/kbdfans/kbd67/rev2/rev2.h index f27a00191a2b..4f68e810aa86 100644 --- a/keyboards/kbdfans/kbd67/rev2/rev2.h +++ b/keyboards/kbdfans/kbd67/rev2/rev2.h @@ -55,3 +55,17 @@ { K40, K41, KC_NO, K43, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D, K4E, K4F }, \ } +#define LAYOUT_65_iso( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0E, K0F, \ + K10, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, K1F, \ + K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K1D, K2D, K2F, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, K3F, \ + K40, K41, K43, K46, K4A, K4B, K4C, K4D, K4E, K4F \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KC_NO, K0E, K0F }, \ + { K10, KC_NO, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \ + { K20, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO, K2F }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, K3E, K3F }, \ + { K40, K41, KC_NO, K43, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D, K4E, K4F }, \ +} diff --git a/keyboards/kbdfans/kbd67/rev2/rules.mk b/keyboards/kbdfans/kbd67/rev2/rules.mk index 431ff194ec40..46e623fd539a 100644 --- a/keyboards/kbdfans/kbd67/rev2/rules.mk +++ b/keyboards/kbdfans/kbd67/rev2/rules.mk @@ -32,4 +32,4 @@ AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) -LAYOUTS = 65_ansi +LAYOUTS = 65_ansi 65_iso From d99f6e95e15075ecab28090e1361e2581b70a517 Mon Sep 17 00:00:00 2001 From: Michael Guterl Date: Tue, 22 Oct 2019 10:41:14 -0700 Subject: [PATCH 158/316] [Keymap] Add userspace and personal keymaps (#7093) * Add Planck keymap and custom keycodes to userspace * Add Preonic keymap and extract common ortho layers and keycodes * Add Leaf60 WKL keymap * Add M60-A keymap * Add Levinson keymap * Fix links in personal readmes * Use flash target * Remove duplicate definition Co-Authored-By: fauxpark * Remove superfluous line endings * Planck and preonic encoder should have the same behavior * Use higher level API Co-Authored-By: fauxpark * Use layouts to reduce planck/levinson duplication * Update flash instructions for levinson --- .../leaf60/universal/keymaps/mguterl/config.h | 19 + .../leaf60/universal/keymaps/mguterl/keymap.c | 43 +++ .../universal/keymaps/mguterl/readme.md | 11 + keyboards/preonic/keymaps/mguterl/config.h | 37 ++ keyboards/preonic/keymaps/mguterl/keymap.c | 323 ++++++++++++++++ keyboards/preonic/keymaps/mguterl/readme.md | 18 + keyboards/preonic/keymaps/mguterl/rules.mk | 1 + .../rama_works_m60_a/keymaps/mguterl/keymap.c | 82 ++++ .../keymaps/mguterl/readme.md | 15 + .../rama_works_m60_a/keymaps/mguterl/rules.mk | 1 + layouts/community/ortho_4x12/mguterl/config.h | 39 ++ layouts/community/ortho_4x12/mguterl/keymap.c | 352 ++++++++++++++++++ .../community/ortho_4x12/mguterl/readme.md | 20 + layouts/community/ortho_4x12/mguterl/rules.mk | 1 + users/mguterl/config.h | 0 users/mguterl/mguterl.c | 1 + users/mguterl/mguterl.h | 67 ++++ users/mguterl/readme.md | 14 + users/mguterl/rules.mk | 1 + 19 files changed, 1045 insertions(+) create mode 100644 keyboards/foxlab/leaf60/universal/keymaps/mguterl/config.h create mode 100644 keyboards/foxlab/leaf60/universal/keymaps/mguterl/keymap.c create mode 100644 keyboards/foxlab/leaf60/universal/keymaps/mguterl/readme.md create mode 100644 keyboards/preonic/keymaps/mguterl/config.h create mode 100644 keyboards/preonic/keymaps/mguterl/keymap.c create mode 100644 keyboards/preonic/keymaps/mguterl/readme.md create mode 100644 keyboards/preonic/keymaps/mguterl/rules.mk create mode 100644 keyboards/wilba_tech/rama_works_m60_a/keymaps/mguterl/keymap.c create mode 100644 keyboards/wilba_tech/rama_works_m60_a/keymaps/mguterl/readme.md create mode 100644 keyboards/wilba_tech/rama_works_m60_a/keymaps/mguterl/rules.mk create mode 100644 layouts/community/ortho_4x12/mguterl/config.h create mode 100644 layouts/community/ortho_4x12/mguterl/keymap.c create mode 100644 layouts/community/ortho_4x12/mguterl/readme.md create mode 100644 layouts/community/ortho_4x12/mguterl/rules.mk create mode 100644 users/mguterl/config.h create mode 100644 users/mguterl/mguterl.c create mode 100644 users/mguterl/mguterl.h create mode 100644 users/mguterl/readme.md create mode 100644 users/mguterl/rules.mk diff --git a/keyboards/foxlab/leaf60/universal/keymaps/mguterl/config.h b/keyboards/foxlab/leaf60/universal/keymaps/mguterl/config.h new file mode 100644 index 000000000000..d8f6533c6ba9 --- /dev/null +++ b/keyboards/foxlab/leaf60/universal/keymaps/mguterl/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 Fox Lab + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/foxlab/leaf60/universal/keymaps/mguterl/keymap.c b/keyboards/foxlab/leaf60/universal/keymaps/mguterl/keymap.c new file mode 100644 index 000000000000..158bdde89cfd --- /dev/null +++ b/keyboards/foxlab/leaf60/universal/keymaps/mguterl/keymap.c @@ -0,0 +1,43 @@ +/* Copyright 2019 Fox Lab + * + * 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 . + */ +#include QMK_KEYBOARD_H +#include "mguterl.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT_all( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, + HPR_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, + ESC_CTL, 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_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(UTIL), + KC_LALT, KC_LALT, KC_LGUI, SPC_UTL, SPC_UTL, SPC_UTL, KC_RALT, MO(1), KC_RGUI, KC_RCTL), + + [_GAMING] = LAYOUT_all( + KC_ESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_TAB, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, KC_SPC, _______, _______, _______, _______, _______), + + [_UTIL] = LAYOUT_all( + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, + TG_GAME, KC_MPLY, KC_MPRV, KC_MNXT, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______, _______, _______, + _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______) + + +}; diff --git a/keyboards/foxlab/leaf60/universal/keymaps/mguterl/readme.md b/keyboards/foxlab/leaf60/universal/keymaps/mguterl/readme.md new file mode 100644 index 000000000000..7f1d982bce97 --- /dev/null +++ b/keyboards/foxlab/leaf60/universal/keymaps/mguterl/readme.md @@ -0,0 +1,11 @@ +# Michael Guterl's Leaf60 WKL Layout + +Check out my [userspace](/users/mguterl) for the custom keycodes that are used +in keymap.c. + +This is a pretty standard 60% WKL layout. I add a couple of layers to add +some conveniences and add vimkeys for navigation. + +```sh +make foxlab/leaf60/universal:mguterl:flash +``` diff --git a/keyboards/preonic/keymaps/mguterl/config.h b/keyboards/preonic/keymaps/mguterl/config.h new file mode 100644 index 000000000000..40a9524b469d --- /dev/null +++ b/keyboards/preonic/keymaps/mguterl/config.h @@ -0,0 +1,37 @@ +#pragma once + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PREONIC_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +#endif + +#define MUSIC_MASK (keycode != KC_NO) + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ + +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 diff --git a/keyboards/preonic/keymaps/mguterl/keymap.c b/keyboards/preonic/keymaps/mguterl/keymap.c new file mode 100644 index 000000000000..ecaf26b8da3a --- /dev/null +++ b/keyboards/preonic/keymaps/mguterl/keymap.c @@ -0,0 +1,323 @@ +/* Copyright 2015-2017 Jack Humbert + * + * 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 . + */ + +#include QMK_KEYBOARD_H +#include "muse.h" +#include "mguterl.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |HypTab| Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |EscCtl| A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | GESC | Ctrl | Alt | GUI |Lower |SpcUtl|SpcUtl|Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_preonic_grid( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + ESC_CTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, + KC_GESC, KC_LCTL, KC_LALT, KC_LGUI, LOWER, SPC_UTL, SPC_UTL, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* + * Gaming is very similar to Qwerty. Certain features from Qwerty are disable + * for better gaming experience. + */ +[_GAMING] = LAYOUT_preonic_grid( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_TAB, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_ESC, _______, _______, _______, _______, KC_SPC, KC_SPC, _______, _______, _______, _______, _______ +), + +/* + * Util is accessed by holding Space. The Util layer contains vimkeys and + * shortcuts that I find myself needing often. + */ +[_UTIL] = LAYOUT_preonic_grid( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, GUI_1, GUI_2, GUI_3, GUI_4, GUI_5, GUI_6, GUI_7, GUI_8, GUI_9, GUI_0, _______, + _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, + _______, _______, _______, _______, _______, _______, _______, GO_BACK, GO_FWD, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = LAYOUT_preonic_grid( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL, + KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | " | , | . | P | Y | F | G | C | R | L | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = LAYOUT_preonic_grid( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL, + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT, + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | - | = | [ | ] | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_preonic_grid( \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | |Pg Up |Pg Dn | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_preonic_grid( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_DEL, 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_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |ToGame| Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_preonic_grid( \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + TG_GAME, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL, + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + #ifdef __AVR__ + writePinLow(E6); + #endif + } else { + unregister_code(KC_RSFT); + #ifdef __AVR__ + writePinHigh(E6); + #endif + } + return false; + break; + } + return true; +}; + +bool muse_mode = false; +uint8_t last_muse_note = 0; +uint16_t muse_counter = 0; +uint8_t muse_offset = 70; +uint16_t muse_tempo = 50; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (muse_mode) { + if (IS_LAYER_ON(_RAISE)) { + if (clockwise) { + muse_offset++; + } else { + muse_offset--; + } + } else { + if (clockwise) { + muse_tempo+=1; + } else { + muse_tempo-=1; + } + } + } else { + if (clockwise) { + #ifdef MOUSEKEY_ENABLE + tap_code(KC_MS_WH_DOWN); + #else + tap_code(KC_PGDN); + #endif + } else { + #ifdef MOUSEKEY_ENABLE + tap_code(KC_MS_WH_UP); + #else + tap_code(KC_PGUP); + #endif + } + } +} + +void dip_switch_update_user(uint8_t index, bool active) { + switch (index) { + case 0: + if (active) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + break; + case 1: + if (active) { + muse_mode = true; + } else { + muse_mode = false; + } + } +} + + +void matrix_scan_user(void) { +#ifdef AUDIO_ENABLE + if (muse_mode) { + if (muse_counter == 0) { + uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()]; + if (muse_note != last_muse_note) { + stop_note(compute_freq_for_midi_note(last_muse_note)); + play_note(compute_freq_for_midi_note(muse_note), 0xF); + last_muse_note = muse_note; + } + } + muse_counter = (muse_counter + 1) % muse_tempo; + } else { + if (muse_counter) { + stop_all_notes(); + muse_counter = 0; + } + } +#endif +} + +bool music_mask_user(uint16_t keycode) { + switch (keycode) { + case RAISE: + case LOWER: + return false; + default: + return true; + } +} diff --git a/keyboards/preonic/keymaps/mguterl/readme.md b/keyboards/preonic/keymaps/mguterl/readme.md new file mode 100644 index 000000000000..f90997601177 --- /dev/null +++ b/keyboards/preonic/keymaps/mguterl/readme.md @@ -0,0 +1,18 @@ +# Michael Guterl's Preonic Layout + +I have a very similar [keymap](/keyboards/planck/keymaps/mguterl) for my +Planck. + +Check out my [userspace](/users/mguterl) for the custom keycodes that are used +in keymap.c. + +At a very high level I use 4 layers: + +* Qwerty - Letters +* Util - Vimkeys for navigation and other convenient things +* Raise - Numbers and F keys +* Lower - Symbols + +```sh +make preonic/rev3:mguterl:flash +``` diff --git a/keyboards/preonic/keymaps/mguterl/rules.mk b/keyboards/preonic/keymaps/mguterl/rules.mk new file mode 100644 index 000000000000..dcf16bef3994 --- /dev/null +++ b/keyboards/preonic/keymaps/mguterl/rules.mk @@ -0,0 +1 @@ +SRC += muse.c diff --git a/keyboards/wilba_tech/rama_works_m60_a/keymaps/mguterl/keymap.c b/keyboards/wilba_tech/rama_works_m60_a/keymaps/mguterl/keymap.c new file mode 100644 index 000000000000..fc81220e41f7 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m60_a/keymaps/mguterl/keymap.c @@ -0,0 +1,82 @@ +#include QMK_KEYBOARD_H + + +#define QWER 0 +#define GAMING 1 +#define HHKB 2 +#define UTIL 3 +#define LIGHTING 4 +#define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Shift+Alt) +#define TG_GAME TG(GAMING) + +enum custom_keycodes { + FN_HHKB = SAFE_RANGE, + FN_UTIL +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) +{ + switch(keycode) { + case FN_HHKB: + if (record->event.pressed) { + layer_on(2); + update_tri_layer(2, 3, 4); + } else { + layer_off(2); + update_tri_layer(2, 3, 4); + } + return false; + break; + case FN_UTIL: + if (record->event.pressed) { + layer_on(3); + update_tri_layer(2, 3, 4); + } else { + layer_off(3); + update_tri_layer(2, 3, 4); + } + return false; + break; + default: + return true; + } +} + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[QWER] = LAYOUT_60_hhkb( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, + HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, FN_HHKB, + KC_LALT, KC_LGUI, LT(UTIL, KC_SPC), KC_RGUI, FN_UTIL), + +[GAMING] = LAYOUT_60_hhkb( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_TAB, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_SPC, _______, _______), + +[HHKB] = LAYOUT_60_hhkb( + 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_INS, KC_DEL, + KC_CAPS, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, _______, + _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, + _______, _______, _______, _______, _______, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, + _______, _______, _______, _______, _______), + +[UTIL] = LAYOUT_60_hhkb( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_MPLY, KC_MPRV, KC_MNXT, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______, _______, _______, + _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______), + +[LIGHTING] = LAYOUT_60_hhkb( + RESET, EF_DEC, EF_INC, H1_DEC, H1_INC, H2_DEC, H2_INC, _______, _______, _______, _______, BR_DEC, BR_INC, _______, _______, + TG_GAME, _______, _______, S1_DEC, S1_INC, S2_DEC, S2_INC, _______, _______, _______, _______, ES_DEC, ES_INC, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______), + +}; diff --git a/keyboards/wilba_tech/rama_works_m60_a/keymaps/mguterl/readme.md b/keyboards/wilba_tech/rama_works_m60_a/keymaps/mguterl/readme.md new file mode 100644 index 000000000000..dc03b1491ece --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m60_a/keymaps/mguterl/readme.md @@ -0,0 +1,15 @@ +# Michael Guterl's M60-A Layout + +Check out my [userspace](/users/mguterl) for the custom keycodes that are used +in keymap.c. + +This is a pretty standard HHKB layout. I add a couple of layers to add +some conveniences and add vimkeys for navigation. + +If you flash a layout without RESET then you can unplug the keyboard, hold +spacebar and escape, and then plug the keyboard back. This sequence of +actions will allow you to flash the keyboard. + +```sh +make wilba_tech/rama_works_m60a:mguterl:flash +``` diff --git a/keyboards/wilba_tech/rama_works_m60_a/keymaps/mguterl/rules.mk b/keyboards/wilba_tech/rama_works_m60_a/keymaps/mguterl/rules.mk new file mode 100644 index 000000000000..800d917f2841 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m60_a/keymaps/mguterl/rules.mk @@ -0,0 +1 @@ +DYNAMIC_KEYMAP_ENABLE = no diff --git a/layouts/community/ortho_4x12/mguterl/config.h b/layouts/community/ortho_4x12/mguterl/config.h new file mode 100644 index 000000000000..6fa31cc8a76f --- /dev/null +++ b/layouts/community/ortho_4x12/mguterl/config.h @@ -0,0 +1,39 @@ +#pragma once + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PLANCK_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +#endif + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ + +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +// Most tactile encoders have detents every 4 stages +#define ENCODER_RESOLUTION 4 + diff --git a/layouts/community/ortho_4x12/mguterl/keymap.c b/layouts/community/ortho_4x12/mguterl/keymap.c new file mode 100644 index 000000000000..2be2d449e34e --- /dev/null +++ b/layouts/community/ortho_4x12/mguterl/keymap.c @@ -0,0 +1,352 @@ +/* Copyright 2015-2017 Jack Humbert + * + * 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 . + */ + +#include QMK_KEYBOARD_H +#include "muse.h" +#include "mguterl.h" + +extern keymap_config_t keymap_config; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * |HypTab| Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |EscCtl| A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | GESC | Ctrl | Alt | GUI |Lower |SpcUtl|SpcUtl|Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_ortho_4x12( + HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + ESC_CTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, + KC_GESC, KC_LCTL, KC_LALT, KC_LGUI, LOWER, SPC_UTL, SPC_UTL, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* + * Gaming is very similar to Qwerty. Certain features from Qwerty are disable + * for better gaming experience. + */ +[_GAMING] = LAYOUT_ortho_4x12( + KC_TAB, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_ESC, _______, _______, _______, _______, KC_SPC, KC_SPC, _______, _______, _______, _______, _______ +), + +/* + * Util is accessed by holding Space. The Util layer contains vimkeys and + * shortcuts that I find myself needing often. + */ +[_UTIL] = LAYOUT_ortho_4x12( \ + _______, GUI_1, GUI_2, GUI_3, GUI_4, GUI_5, GUI_6, GUI_7, GUI_8, GUI_9, GUI_0, _______, + _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, + _______, _______, _______, _______, _______, _______, _______, GO_BACK, GO_FWD, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = LAYOUT_ortho_4x12( + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, + KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = LAYOUT_ortho_4x12( + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | - | = | [ | ] | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_ortho_4x12( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | |Pg Up |Pg Dn | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_ortho_4x12( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_DEL, 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_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Plover layer (http://opensteno.org) + * ,-----------------------------------------------------------------------------------. + * | # | # | # | # | # | # | # | # | # | # | # | # | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | S | T | P | H | * | * | F | P | L | T | D | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | S | K | W | R | * | * | R | B | G | S | Z | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Exit | | | A | O | | E | U | | | | + * `-----------------------------------------------------------------------------------' + */ +[_PLOVER] = LAYOUT_ortho_4x12( + KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 , + XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX +), + +/* Adjust (Lower + Raise) + * v------------------------RGB CONTROL--------------------v + * ,-----------------------------------------------------------------------------------. + * |ToGame| Reset|Debug | RGB |RGBMOD| HUE+ | HUE- | SAT+ | SAT- |BRGTH+|BRGTH-| Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | |MUSmod|Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof|TermOn|TermOf| | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_ortho_4x12( + TG_GAME, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL , + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + +#ifdef AUDIO_ENABLE + float plover_song[][2] = SONG(PLOVER_SOUND); + float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); +#endif + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + print("mode just switched to qwerty and this is a huge string\n"); + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + break; + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + #ifdef KEYBOARD_planck_rev5 + writePinLow(E6); + #endif + } else { + unregister_code(KC_RSFT); + #ifdef KEYBOARD_planck_rev5 + writePinHigh(E6); + #endif + } + return false; + break; + case PLOVER: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + stop_all_notes(); + PLAY_SONG(plover_song); + #endif + layer_off(_RAISE); + layer_off(_LOWER); + layer_off(_ADJUST); + layer_on(_PLOVER); + if (!eeconfig_is_enabled()) { + eeconfig_init(); + } + keymap_config.raw = eeconfig_read_keymap(); + keymap_config.nkro = 1; + eeconfig_update_keymap(keymap_config.raw); + } + return false; + break; + case EXT_PLV: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(plover_gb_song); + #endif + layer_off(_PLOVER); + } + return false; + break; + } + return true; +} + +bool muse_mode = false; +uint8_t last_muse_note = 0; +uint16_t muse_counter = 0; +uint8_t muse_offset = 70; +uint16_t muse_tempo = 50; + +void encoder_update(bool clockwise) { + if (muse_mode) { + if (IS_LAYER_ON(_RAISE)) { + if (clockwise) { + muse_offset++; + } else { + muse_offset--; + } + } else { + if (clockwise) { + muse_tempo+=1; + } else { + muse_tempo-=1; + } + } + } else { + if (clockwise) { + #ifdef MOUSEKEY_ENABLE + tap_code(KC_MS_WH_DOWN); + #else + tap_code(KC_PGDN); + #endif + } else { + #ifdef MOUSEKEY_ENABLE + tap_code(KC_MS_WH_UP); + #else + tap_code(KC_PGUP); + #endif + } + } +} + +void dip_switch_update_user(uint8_t index, bool active) { + switch (index) { + case 0: { +#ifdef AUDIO_ENABLE + static bool play_sound = false; +#endif + if (active) { +#ifdef AUDIO_ENABLE + if (play_sound) { PLAY_SONG(plover_song); } +#endif + layer_on(_ADJUST); + } else { +#ifdef AUDIO_ENABLE + if (play_sound) { PLAY_SONG(plover_gb_song); } +#endif + layer_off(_ADJUST); + } +#ifdef AUDIO_ENABLE + play_sound = true; +#endif + break; + } + case 1: + if (active) { + muse_mode = true; + } else { + muse_mode = false; + } + } +} + +void matrix_scan_user(void) { +#ifdef AUDIO_ENABLE + if (muse_mode) { + if (muse_counter == 0) { + uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()]; + if (muse_note != last_muse_note) { + stop_note(compute_freq_for_midi_note(last_muse_note)); + play_note(compute_freq_for_midi_note(muse_note), 0xF); + last_muse_note = muse_note; + } + } + muse_counter = (muse_counter + 1) % muse_tempo; + } else { + if (muse_counter) { + stop_all_notes(); + muse_counter = 0; + } + } +#endif +} + +bool music_mask_user(uint16_t keycode) { + switch (keycode) { + case RAISE: + case LOWER: + return false; + default: + return true; + } +} diff --git a/layouts/community/ortho_4x12/mguterl/readme.md b/layouts/community/ortho_4x12/mguterl/readme.md new file mode 100644 index 000000000000..d1328c9aa5a7 --- /dev/null +++ b/layouts/community/ortho_4x12/mguterl/readme.md @@ -0,0 +1,20 @@ +# Michael Guterl's Ortho 4x12 Layout + +I use this layout for both my Planck and Levinson. I also have a very similar +[keymap](/keyboards/preonic/keymaps/mguterl) for my Preonic. + +Check out my [userspace](/users/mguterl) for the custom keycodes that are used +in keymap.c. + +At a very high level I use 4 layers: + +* Qwerty - Letters +* Util - Vimkeys for navigation and other convenient things +* Raise - Numbers and F keys +* Lower - Symbols + +```sh +make planck/rev5:mguterl:flash # For Planck rev5 or earlier and Planck Light +make planck/rev6:mguterl:flash # For Planck rev6 +make keebio/levinson/rev2:mguterl:dfu # For Levinson rev2 +``` diff --git a/layouts/community/ortho_4x12/mguterl/rules.mk b/layouts/community/ortho_4x12/mguterl/rules.mk new file mode 100644 index 000000000000..dcf16bef3994 --- /dev/null +++ b/layouts/community/ortho_4x12/mguterl/rules.mk @@ -0,0 +1 @@ +SRC += muse.c diff --git a/users/mguterl/config.h b/users/mguterl/config.h new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/users/mguterl/mguterl.c b/users/mguterl/mguterl.c new file mode 100644 index 000000000000..479c8d15d0bd --- /dev/null +++ b/users/mguterl/mguterl.c @@ -0,0 +1 @@ +#include "mguterl.h" diff --git a/users/mguterl/mguterl.h b/users/mguterl/mguterl.h new file mode 100644 index 000000000000..0b2f3938b90f --- /dev/null +++ b/users/mguterl/mguterl.h @@ -0,0 +1,67 @@ +#pragma once +#include "quantum.h" + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +/* Tap for Tab, hold for Hyper (Super+Ctrl+Shift+Alt) */ +#define HPR_TAB ALL_T(KC_TAB) + +/* Shift when held, Enter when tapped */ +#define SFT_ENT MT(MOD_RSFT, KC_ENT) + +/* Activate util layer while holding space */ +#define SPC_UTL LT(_UTIL, KC_SPC) + +/* Control when held, Escape when tapped */ +#define ESC_CTL MT(MOD_LCTL, KC_ESC) + +/* Toggle gaming layer */ +#define TG_GAME TG(_GAMING) + +/* + * Make it easy to navigate back and forward in Chrome. + */ +#define GO_BACK LGUI(KC_LBRC) +#define GO_FWD LGUI(KC_RBRC) + +/* + * When using a 40% layout, these keycodes make it easy to change tabs in apps + * like Chrome and VSCode. + */ +#define GUI_1 LGUI(KC_1) +#define GUI_2 LGUI(KC_2) +#define GUI_3 LGUI(KC_3) +#define GUI_4 LGUI(KC_4) +#define GUI_5 LGUI(KC_5) +#define GUI_6 LGUI(KC_6) +#define GUI_7 LGUI(KC_7) +#define GUI_8 LGUI(KC_8) +#define GUI_9 LGUI(KC_9) +#define GUI_0 LGUI(KC_0) + +/* + * Common layers and keycodes that are shared between Planck and Preonic + */ +enum ortho_layers { + _QWERTY, + _GAMING, + _UTIL, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _PLOVER, + _ADJUST +}; + +enum ortho_keycodes { + QWERTY = SAFE_RANGE, + GAMING, + UTIL, + COLEMAK, + DVORAK, + PLOVER, + BACKLIT, + EXT_PLV +}; diff --git a/users/mguterl/readme.md b/users/mguterl/readme.md new file mode 100644 index 000000000000..9dc1a7ebbd2d --- /dev/null +++ b/users/mguterl/readme.md @@ -0,0 +1,14 @@ +Copyright 2019 Michael Guterl michael@diminishing.org @mguterl + +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 . diff --git a/users/mguterl/rules.mk b/users/mguterl/rules.mk new file mode 100644 index 000000000000..4ed89c987dc2 --- /dev/null +++ b/users/mguterl/rules.mk @@ -0,0 +1 @@ +SRC += mguterl.c From 737bca8e5134086dd52eb4ec6ca5ca034e9c5bd9 Mon Sep 17 00:00:00 2001 From: Salicylic-acid3 <46864619+Salicylic-acid3@users.noreply.github.com> Date: Wed, 23 Oct 2019 02:54:53 +0900 Subject: [PATCH 159/316] [Keyboard] Keyboard Naked60 Update (#7106) * [Keyboard] Keyboard Naked60 Update Support for SPLIT_KEYBOARD Keymap updates * Update keyboards/naked60/readme.md Co-Authored-By: Joel Challis * Update keyboards/naked60/rev1/config.h Co-Authored-By: Joel Challis * Update keyboards/naked60/rev1/rev1.h Co-Authored-By: Joel Challis * Update keyboards/naked60/rev1/rev1.h Co-Authored-By: Joel Challis --- keyboards/naked60/config.h | 22 - keyboards/naked60/keymaps/default/config.h | 29 - keyboards/naked60/keymaps/default/keymap.c | 44 +- keyboards/naked60/keymaps/default/readme.md | 4 +- .../keymaps/default_with_nafuda/config.h | 63 -- .../keymaps/default_with_nafuda/keymap.c | 80 +-- .../keymaps/default_with_nafuda/readme.md | 56 +- .../keymaps/default_with_nafuda/rules.mk | 10 - .../keymaps/default_with_setta21/config.h | 63 -- .../keymaps/default_with_setta21/keymap.c | 90 +-- .../keymaps/default_with_setta21/rules.mk | 9 - keyboards/naked60/keymaps/salicylic/config.h | 29 - keyboards/naked60/keymaps/salicylic/keymap.c | 56 +- keyboards/naked60/keymaps/salicylic/readme.md | 32 +- .../keymaps/salicylic_with_nafuda/config.h | 62 -- .../keymaps/salicylic_with_nafuda/keymap.c | 73 +-- .../keymaps/salicylic_with_nafuda/readme.md | 57 +- .../keymaps/salicylic_with_nafuda/rules.mk | 9 - .../keymaps/salicylic_with_setta21/config.h | 63 -- .../keymaps/salicylic_with_setta21/keymap.c | 95 +-- .../keymaps/salicylic_with_setta21/readme.md | 4 +- .../keymaps/salicylic_with_setta21/rules.mk | 10 - keyboards/naked60/naked60.h | 9 +- keyboards/naked60/rev1/config.h | 92 +-- keyboards/naked60/rev1/matrix.c | 357 ----------- keyboards/naked60/rev1/rev1.c | 6 +- keyboards/naked60/rev1/rev1.h | 45 +- keyboards/naked60/rev1/rules.mk | 3 - keyboards/naked60/rev1/serial_config.h | 8 - .../naked60/rev1/serial_config_simpleapi.h | 8 - keyboards/naked60/rev1/split_scomm.c | 92 --- keyboards/naked60/rev1/split_scomm.h | 22 - keyboards/naked60/rev1/split_util.c | 70 --- keyboards/naked60/rev1/split_util.h | 16 - keyboards/naked60/rules.mk | 10 +- keyboards/naked60/serial.c | 590 ------------------ keyboards/naked60/serial.h | 86 --- 37 files changed, 237 insertions(+), 2137 deletions(-) delete mode 100644 keyboards/naked60/rev1/matrix.c delete mode 100644 keyboards/naked60/rev1/serial_config.h delete mode 100644 keyboards/naked60/rev1/serial_config_simpleapi.h delete mode 100644 keyboards/naked60/rev1/split_scomm.c delete mode 100644 keyboards/naked60/rev1/split_scomm.h delete mode 100644 keyboards/naked60/rev1/split_util.c delete mode 100644 keyboards/naked60/rev1/split_util.h delete mode 100644 keyboards/naked60/serial.c delete mode 100644 keyboards/naked60/serial.h diff --git a/keyboards/naked60/config.h b/keyboards/naked60/config.h index 47f2a9aacf38..cfb6bf4ffccd 100644 --- a/keyboards/naked60/config.h +++ b/keyboards/naked60/config.h @@ -19,25 +19,3 @@ along with this program. If not, see . #pragma once #include "config_common.h" - -// GCC include 'config.h" sequence in qmk_firmware/keyboards/naked60/ -// -include keyboards/naked60/config.h -// -include keyboards/naked60/rev?/config.h -// -include keyboards/naked60/rev?/keymaps/MAPNAME/config.h -// XXXX.c - -#include - -// GCC include search path in qmk_firmare/keyboards/naked60/ -// #include "..." search starts here: -// #include <...> search starts here: -// keyboards/naked60/rev?/keymaps/MAPNAME -// keyboards/naked60 -// keyboards/naked60/rev? -// . -// ./tmk_core -// ...... - -// MACRO and FUNCTION are features that are depreciated. -#define NO_ACTION_MACRO -#define NO_ACTION_FUNCTION diff --git a/keyboards/naked60/keymaps/default/config.h b/keyboards/naked60/keymaps/default/config.h index 140a79c772c8..4b3496d85693 100644 --- a/keyboards/naked60/keymaps/default/config.h +++ b/keyboards/naked60/keymaps/default/config.h @@ -18,34 +18,5 @@ /* Select hand configuration */ -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - -#define USE_SERIAL_PD2 - #define TAPPING_FORCE_HOLD #define TAPPING_TERM 180 - -#define MK_3_SPEED - -#undef MOUSEKEY_INTERVAL -#define MOUSEKEY_INTERVAL 0 - -#undef MOUSEKEY_TIME_TO_MAX -#define MOUSEKEY_TIME_TO_MAX 150 - -#undef MOUSEKEY_MAX_SPEED -#define MOUSEKEY_MAX_SPEED 3 - -#undef MOUSEKEY_MOVE_DELTA -#define MOUSEKEY_MOVE_DELTA 5 - -#undef MOUSEKEY_DELAY -#define MOUSEKEY_DELAY 0 - -#undef MOUSEKEY_WHEEL_MAX_SPEED -#define MOUSEKEY_WHEEL_MAX_SPEED 1 - -#undef MOUSEKEY_WHEEL_TIME_TO_MAX -#define MOUSEKEY_WHEEL_TIME_TO_MAX 0 diff --git a/keyboards/naked60/keymaps/default/keymap.c b/keyboards/naked60/keymaps/default/keymap.c index 4b15e969de5e..b8812090cab7 100644 --- a/keyboards/naked60/keymaps/default/keymap.c +++ b/keyboards/naked60/keymaps/default/keymap.c @@ -2,11 +2,6 @@ extern keymap_config_t keymap_config; -#ifdef RGBLIGHT_ENABLE -//Following line allows macro to read current RGB settings -extern rgblight_config_t rgblight_config; -#endif - extern uint8_t is_master; // Each layer gets a name for readability, which is then used in the keymap matrix below. @@ -21,22 +16,11 @@ enum layer_number { _ADJUST, }; -enum custom_keycodes { - FLOCK = SAFE_RANGE, - ADJUST, - RGBRST -}; - enum tapdances{ TD_ESFL = 0, TD_ESQW, }; -// Layer Mode aliases - -#define KC_SNUBS S(KC_NUBS) -#define KC_SNUHS S(KC_NUHS) - qk_tap_dance_action_t tap_dance_actions[] = { [TD_ESFL] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _FLOCK), [TD_ESQW] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _QWERTY), @@ -53,7 +37,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| KC_LCTRL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - ADJUST,KC_LCTRL, KC_LALT, KC_LGUI,MO(_LOWER),KC_SPC, KC_SPC,MO(_RAISE),KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT + MO(_ADJUST),KC_LCTRL, KC_LALT, KC_LGUI,MO(_LOWER),KC_SPC, KC_SPC,MO(_RAISE),KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT //`------------------------------------------------------------------------------------------------------------' ), @@ -81,7 +65,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,KC_SNUHS,KC_SNUBS, _______, _______, _______, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS), _______, _______, _______, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY //`------------------------------------------------------------------------------------------------------------' @@ -107,33 +91,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //,-----------------------------------------------------| |-----------------------------------------------------. KC_ESC, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - _______, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BTN1, KC_MS_U, KC_BTN2, XXXXXXX,LALT(KC_PSCR), + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BTN1, KC_MS_U, KC_BTN2, XXXXXXX,LALT(KC_PSCR), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_R, XXXXXXX, KC_PSCR, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,LCA(KC_DEL), //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, _______, _______, _______, _______, RESET, RESET, _______, _______, _______, _______, _______ //`------------------------------------------------------------------------------------------------------------' ) }; -uint32_t layer_state_set_user(uint32_t state) { - return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); -} +void matrix_init_user(void) { -int RGB_current_mode; -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - - bool result = false; - switch (keycode) { - case ADJUST: - update_tri_layer_state(record->event.pressed, _ADJUST, _RAISE, _LOWER); - break; - default: - result = true; - break; - } - - return result; -} \ No newline at end of file +} diff --git a/keyboards/naked60/keymaps/default/readme.md b/keyboards/naked60/keymaps/default/readme.md index 87ce8b3a29b1..b5959919ac7a 100644 --- a/keyboards/naked60/keymaps/default/readme.md +++ b/keyboards/naked60/keymaps/default/readme.md @@ -46,8 +46,8 @@ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | |:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| | ESC| F2| F3| F4| F5| F6| | | F7| F8| F9| F10| F11| F12| -| TILD| RST| XXXXX| XXXXX| XXXXX| XXXXX| | | XXXXX| BTN1| MS_U| BTN2| XXXXX|Alt+PSCR| +| TILD| XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| | | XXXXX| BTN1| MS_U| BTN2| XXXXX|Alt+PSCR| | LSFT| XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| | | XXXXX| MS_L| MS_D| MS_R| XXXXX| PSCR| | LCTRL| XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| | | XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| C+A+D| -| |ADJUST| LCTRL| LALT| LGUI| LOWER| SPC| SPC| RAISE| MNXT| VOLD| VOLU| MPLY| | +| |ADJUST| LCTRL| LALT| LGUI| LOWER| RESET| RESET| RAISE| MNXT| VOLD| VOLU| MPLY| | diff --git a/keyboards/naked60/keymaps/default_with_nafuda/config.h b/keyboards/naked60/keymaps/default_with_nafuda/config.h index e188262cf92c..0761e5b6d3b5 100644 --- a/keyboards/naked60/keymaps/default_with_nafuda/config.h +++ b/keyboards/naked60/keymaps/default_with_nafuda/config.h @@ -21,70 +21,7 @@ #define MASTER_LEFT // #define MASTER_RIGHT // #define EE_HANDS - #define USE_SERIAL_PD2 #define TAPPING_FORCE_HOLD #define TAPPING_TERM 180 - -#define RGBLED_NUM 7 - -#ifndef IOS_DEVICE_ENABLE - #define RGBLIGHT_LIMIT_VAL 180 - #define RGBLIGHT_VAL_STEP 17 -#else - #define RGBLIGHT_LIMIT_VAL 50 - #define RGBLIGHT_VAL_STEP 4 -#endif -#define RGBLIGHT_HUE_STEP 10 -#define RGBLIGHT_SAT_STEP 17 - -#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE) -// USB_MAX_POWER_CONSUMPTION value for naked48 keyboard -// 120 RGBoff, OLEDoff -// 120 OLED -// 330 RGB 6 -// 300 RGB 32 -// 310 OLED & RGB 32 - #define USB_MAX_POWER_CONSUMPTION 400 -#else - // fix iPhone and iPad power adapter issue - // iOS device need lessthan 100 - #define USB_MAX_POWER_CONSUMPTION 100 -#endif - -// Selection of RGBLIGHT MODE to use. -#if defined(LED_ANIMATIONS) - //#define RGBLIGHT_EFFECT_BREATHING - #define RGBLIGHT_EFFECT_RAINBOW_MOOD - #define RGBLIGHT_EFFECT_RAINBOW_SWIRL - //#define RGBLIGHT_EFFECT_SNAKE - #define RGBLIGHT_EFFECT_KNIGHT - //#define RGBLIGHT_EFFECT_CHRISTMAS - #define RGBLIGHT_EFFECT_STATIC_GRADIENT - //#define RGBLIGHT_EFFECT_RGB_TEST - //#define RGBLIGHT_EFFECT_ALTERNATING -#endif - -#define MK_3_SPEED - -#undef MOUSEKEY_INTERVAL -#define MOUSEKEY_INTERVAL 0 - -#undef MOUSEKEY_TIME_TO_MAX -#define MOUSEKEY_TIME_TO_MAX 150 - -#undef MOUSEKEY_MAX_SPEED -#define MOUSEKEY_MAX_SPEED 3 - -#undef MOUSEKEY_MOVE_DELTA -#define MOUSEKEY_MOVE_DELTA 5 - -#undef MOUSEKEY_DELAY -#define MOUSEKEY_DELAY 0 - -#undef MOUSEKEY_WHEEL_MAX_SPEED -#define MOUSEKEY_WHEEL_MAX_SPEED 1 - -#undef MOUSEKEY_WHEEL_TIME_TO_MAX -#define MOUSEKEY_WHEEL_TIME_TO_MAX 0 diff --git a/keyboards/naked60/keymaps/default_with_nafuda/keymap.c b/keyboards/naked60/keymaps/default_with_nafuda/keymap.c index d50af530dae6..4738ef36ef66 100644 --- a/keyboards/naked60/keymaps/default_with_nafuda/keymap.c +++ b/keyboards/naked60/keymaps/default_with_nafuda/keymap.c @@ -2,11 +2,6 @@ extern keymap_config_t keymap_config; -#ifdef RGBLIGHT_ENABLE -//Following line allows macro to read current RGB settings -extern rgblight_config_t rgblight_config; -#endif - extern uint8_t is_master; // Each layer gets a name for readability, which is then used in the keymap matrix below. @@ -24,13 +19,7 @@ enum layer_number { }; enum custom_keycodes { - FLOCK = SAFE_RANGE, - MOUSE, - BROWSER, - LOWER, - RAISE, - ADJUST, - RGBRST + RGB_RST = SAFE_RANGE }; enum tapdances{ @@ -38,41 +27,23 @@ enum tapdances{ TD_ESQW, }; -// Fillers to make layering more clear - -#define KC_CAD LCA(KC_DEL) -#define KC_APSCR LALT(KC_PSCR) - -#define KC_SNUBS S(KC_NUBS) -#define KC_SNUHS S(KC_NUHS) - -#define KC_RTAB LCTL(KC_TAB) -#define KC_LTAB LCTL(LSFT(KC_TAB)) -#define KC_CTAB LCTL(KC_W) -#define KC_RETAB LCTL(LSFT(KC_T)) - -#define KC_TGMO TG(_MOUSE) -#define KC_TGBR TG(_BROWSER) -#define KC_BSAD LT(_ADJUST, KC_BSPC) - qk_tap_dance_action_t tap_dance_actions[] = { [TD_ESFL] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _FLOCK), [TD_ESQW] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _QWERTY), }; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT_with_nafuda( //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| - TD(TD_ESFL), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, KC_TGMO, + TD(TD_ESFL), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, TG(_MOUSE), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_BSAD, KC_UP, KC_TGBR, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,LT(_ADJUST, KC_BSPC),KC_UP,TG(_BROWSER), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_LEFT, KC_DOWN,KC_RIGHT, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------------------------| KC_LCTRL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - ADJUST,KC_LCTRL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT + MO(_ADJUST),KC_LCTRL, KC_LALT, KC_LGUI,MO(_LOWER),KC_SPC,KC_SPC,MO(_RAISE), KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT //`------------------------------------------------------------------------------------------------------------' ), @@ -92,7 +63,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_MOUSE] = LAYOUT_with_nafuda( //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| - TD(TD_ESFL), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, KC_TGMO, + TD(TD_ESFL), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, TG(_MOUSE), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BTN1, KC_MS_U, KC_BTN2, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| @@ -106,11 +77,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BROWSER] = LAYOUT_with_nafuda( //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_CTAB, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, LCTL(KC_W), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RETAB, KC_WH_U, KC_TGBR, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,LCTL(LSFT(KC_T)),KC_WH_U,TG(_BROWSER), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LTAB, KC_WH_D, KC_RTAB, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,LCTL(LSFT(KC_TAB)), KC_WH_D,LCTL(KC_TAB), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------------------------| _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| @@ -120,13 +91,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_LOWER] = LAYOUT_with_nafuda( //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| - KC_ESC, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TGMO, + KC_ESC, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, TG(_MOUSE), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR,KC_LPRN, KC_RPRN, KC_DEL, KC_BSAD, KC_UP, KC_TGBR, + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR,KC_LPRN, KC_RPRN, KC_DEL,LT(_ADJUST, KC_BSPC), KC_UP,TG(_MOUSE), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, KC_LEFT, KC_DOWN,KC_RIGHT, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------------------------| - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,KC_SNUHS,KC_SNUBS, _______, _______, _______, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______,_______,_______, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY //`------------------------------------------------------------------------------------------------------------' @@ -134,9 +105,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_RAISE] = LAYOUT_with_nafuda( //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| - KC_ESC, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TGMO, + KC_ESC, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, TG(_MOUSE), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| - KC_TILD, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, KC_BSAD, KC_UP, KC_TGBR, + KC_TILD, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,LT(_ADJUST, KC_BSPC), KC_UP,TG(_MOUSE), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_LEFT, KC_DOWN,KC_RIGHT, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------------------------| @@ -150,37 +121,22 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| KC_ESC, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, RGB_VAD, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| - _______, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BTN1, KC_MS_U, KC_BTN2, XXXXXXX,LALT(KC_PSCR), ADJUST, RGB_SAD, RGB_VAI, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BTN1, KC_MS_U, KC_BTN2, XXXXXXX,LALT(KC_PSCR), _ADJUST, RGB_SAD, RGB_VAI, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_R, XXXXXXX, KC_PSCR, RGB_MOD, RGB_TOG, RGB_SAI, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------------------------| _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,LCA(KC_DEL), //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, _______, _______, _______, _______, RESET, RESET, _______, _______, _______, _______, _______ //`------------------------------------------------------------------------------------------------------------' ) }; -static inline void update_change_layer(bool pressed, uint8_t layer1, uint8_t layer2, uint8_t layer3) { - - pressed ? layer_on(layer1) : layer_off(layer1); - IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2) ? layer_on(layer3) : layer_off(layer3); -} - int RGB_current_mode; bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool result = false; switch (keycode) { - case LOWER: - update_change_layer(record->event.pressed, _LOWER, _RAISE, _ADJUST); - break; - case RAISE: - update_change_layer(record->event.pressed, _RAISE, _LOWER, _ADJUST); - break; - case ADJUST: - update_change_layer(record->event.pressed, _ADJUST, _RAISE, _LOWER); - break; #ifdef RGBLIGHT_ENABLE case RGB_MOD: if (record->event.pressed) { @@ -189,7 +145,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { RGB_current_mode = rgblight_config.mode; } break; - case RGBRST: + case RGB_RST: if (record->event.pressed) { eeconfig_update_rgblight_default(); rgblight_enable(); @@ -206,7 +162,5 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } void matrix_init_user(void) { - #ifdef RGBLIGHT_ENABLE - RGB_current_mode = rgblight_config.mode; - #endif + } diff --git a/keyboards/naked60/keymaps/default_with_nafuda/readme.md b/keyboards/naked60/keymaps/default_with_nafuda/readme.md index 574f90ffbda7..27201090dfca 100644 --- a/keyboards/naked60/keymaps/default_with_nafuda/readme.md +++ b/keyboards/naked60/keymaps/default_with_nafuda/readme.md @@ -2,30 +2,38 @@ Add Nafuda maps to the default layout. -## Default -| 1 | 2 | 3 | -|:----:|:----:|:----:| -| | MOUSE| | -| BS+Ad| UP|Browser| -| LEFT| DOWN| RIGHT| +Default + //|--------------------| + Mouse, + //|------+------+------| + BS + Ad, UP,Browser, + //|------+------+------| + LEFT, DOWN, RIGHT + //|--------------------| -## Mouse -| 1 | 2 | 3 | -|:----:|:----:|:----:| -| |Default| | -| BTN1| MS_U| BTN2| -| MS_L| MS_D| MS_R| +Mouse + //|--------------------| + Default, + //|------+------+------| + BTN1, MS_U, BTN2, + //|------+------+------| + MS_L, MS_D, MS_R + //|--------------------| -## Browser -| 1 | 2 | 3 | -|:----:|:----:|:----:| -| |CloseTAB| | -|ReOpenTAB|WH_U|Default| -| LTAB| WH_D| RTAB| +Browser + //|--------------------| + CloseTAB, + //|------+------+------| + ReOpenTAB, WH_U,Default, + //|------+------+------| + LTAB, WH_D, RTAB + //|--------------------| -## Adjust -| 1 | 2 | 3 | -|:----:|:----:|:----:| -| |LED_VAD| | -|Default|LED_HUD|LED_VAI| -|LED_MOD|LED_ON/Off|LED_HUI| +Adjust + //|------------------------| + LED VAD, + //|------+----------+------| + Default, LED HUD,LED VAI, + //|------+----------+------| + LED MOD,LED ON/Off,LED HUI + //|------------------------| diff --git a/keyboards/naked60/keymaps/default_with_nafuda/rules.mk b/keyboards/naked60/keymaps/default_with_nafuda/rules.mk index 15a887e78131..e69de29bb2d1 100644 --- a/keyboards/naked60/keymaps/default_with_nafuda/rules.mk +++ b/keyboards/naked60/keymaps/default_with_nafuda/rules.mk @@ -1,10 +0,0 @@ -RGBLIGHT_ENABLE = yes - -# If your custom naked60 pcb, you can rewrite to yes. -LED_ANIMATIONS = yes # LED animations - -ifeq ($(strip $(LED_ANIMATIONS)), yes) - # OPT_DEFS += -DRGBLIGHT_ANIMATIONS - OPT_DEFS += -DLED_ANIMATIONS -endif - diff --git a/keyboards/naked60/keymaps/default_with_setta21/config.h b/keyboards/naked60/keymaps/default_with_setta21/config.h index fe162510d0ba..0761e5b6d3b5 100644 --- a/keyboards/naked60/keymaps/default_with_setta21/config.h +++ b/keyboards/naked60/keymaps/default_with_setta21/config.h @@ -21,70 +21,7 @@ #define MASTER_LEFT // #define MASTER_RIGHT // #define EE_HANDS - #define USE_SERIAL_PD2 #define TAPPING_FORCE_HOLD #define TAPPING_TERM 180 - -#define RGBLED_NUM 21 - -#ifndef IOS_DEVICE_ENABLE - #define RGBLIGHT_LIMIT_VAL 180 - #define RGBLIGHT_VAL_STEP 17 -#else - #define RGBLIGHT_LIMIT_VAL 50 - #define RGBLIGHT_VAL_STEP 4 -#endif -#define RGBLIGHT_HUE_STEP 10 -#define RGBLIGHT_SAT_STEP 17 - -#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE) -// USB_MAX_POWER_CONSUMPTION value for naked48 keyboard -// 120 RGBoff, OLEDoff -// 120 OLED -// 330 RGB 6 -// 300 RGB 32 -// 310 OLED & RGB 32 - #define USB_MAX_POWER_CONSUMPTION 400 -#else - // fix iPhone and iPad power adapter issue - // iOS device need lessthan 100 - #define USB_MAX_POWER_CONSUMPTION 100 -#endif - -// Selection of RGBLIGHT MODE to use. -#if defined(LED_ANIMATIONS) - //#define RGBLIGHT_EFFECT_BREATHING - #define RGBLIGHT_EFFECT_RAINBOW_MOOD - #define RGBLIGHT_EFFECT_RAINBOW_SWIRL - //#define RGBLIGHT_EFFECT_SNAKE - #define RGBLIGHT_EFFECT_KNIGHT - //#define RGBLIGHT_EFFECT_CHRISTMAS - #define RGBLIGHT_EFFECT_STATIC_GRADIENT - //#define RGBLIGHT_EFFECT_RGB_TEST - //#define RGBLIGHT_EFFECT_ALTERNATING -#endif - -#define MK_3_SPEED - -#undef MOUSEKEY_INTERVAL -#define MOUSEKEY_INTERVAL 0 - -#undef MOUSEKEY_TIME_TO_MAX -#define MOUSEKEY_TIME_TO_MAX 150 - -#undef MOUSEKEY_MAX_SPEED -#define MOUSEKEY_MAX_SPEED 3 - -#undef MOUSEKEY_MOVE_DELTA -#define MOUSEKEY_MOVE_DELTA 5 - -#undef MOUSEKEY_DELAY -#define MOUSEKEY_DELAY 0 - -#undef MOUSEKEY_WHEEL_MAX_SPEED -#define MOUSEKEY_WHEEL_MAX_SPEED 1 - -#undef MOUSEKEY_WHEEL_TIME_TO_MAX -#define MOUSEKEY_WHEEL_TIME_TO_MAX 0 diff --git a/keyboards/naked60/keymaps/default_with_setta21/keymap.c b/keyboards/naked60/keymaps/default_with_setta21/keymap.c index 06ea56501a1f..0717d3c3f621 100644 --- a/keyboards/naked60/keymaps/default_with_setta21/keymap.c +++ b/keyboards/naked60/keymaps/default_with_setta21/keymap.c @@ -22,15 +22,10 @@ enum layer_number { }; enum custom_keycodes { - FLOCK = SAFE_RANGE, - LOWER, - RAISE, - ADJUST, - KANJI, - RGBRST, + RGB_RST = SAFE_RANGE, SEND_SUM, - SEND_AVERAGE, - SEND_COUNTIF, + SEND_AVE, + SEND_CIF, SEND_MAX, SEND_MIN }; @@ -40,20 +35,6 @@ enum tapdances{ TD_ESQW, }; -// Fillers to make layering more clear -#define KC_SNUBS S(KC_NUBS) -#define KC_SNUHS S(KC_NUHS) - -#define KC_SSUM SEND_SUM -#define KC_SAVE SEND_AVERAGE -#define KC_SCOU SEND_COUNTIF -#define KC_SMAX SEND_MAX -#define KC_SMIN SEND_MIN - -#define KC_RADO LT(_RAISE, KC_PDOT) -#define KC_LOP0 LT(_LOWER, KC_P0) -#define KC_ADNL LT(_ADJUST, KC_NLCK) - qk_tap_dance_action_t tap_dance_actions[] = { [TD_ESFL] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _FLOCK), [TD_ESQW] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _QWERTY), @@ -62,15 +43,15 @@ qk_tap_dance_action_t tap_dance_actions[] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT_with_setta21( //,-----------------------------------------------------| |-----------------------------------------------------. |-----------------------------------------------| - TD(TD_ESFL), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, KC_LOP0, KC_P1, KC_P4, KC_P7,KC_ADNL, KC_ESC, + TD(TD_ESFL), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,LT(_LOWER, KC_P0),KC_P1, KC_P4, KC_P7,KC_NLCK, KC_ESC, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_P2, KC_P5, KC_P8,KC_PSLS, KC_F2, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| - KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_RADO, KC_P3, KC_P6, KC_P9,KC_PAST, KC_EQL, + KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,LT(_RAISE, KC_PDOT),KC_P3,KC_P6, KC_P9,KC_PAST, KC_EQL, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| KC_LCTRL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, KC_PENT, KC_PPLS,KC_PMNS, KC_DEL, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |-----------------------------------------------| - ADJUST,KC_LCTRL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT + MO(_ADJUST),KC_LCTRL, KC_LALT, KC_LGUI,MO(_LOWER), KC_SPC, KC_SPC,MO(_RAISE),KC_LEFT,KC_DOWN, KC_UP,KC_RIGHT //`------------------------------------------------------------------------------------------------------------' ), @@ -90,78 +71,63 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_LOWER] = LAYOUT_with_setta21( //,-----------------------------------------------------| |-----------------------------------------------------. |-----------------------------------------------| - KC_ESC, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, LOWER,XXXXXXX,KC_LEFT,XXXXXXX,XXXXXXX, KC_ESC, + KC_ESC, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, MO(_LOWER),XXXXXXX,KC_LEFT,XXXXXXX,XXXXXXX, KC_ESC, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR,KC_LPRN, KC_RPRN, KC_DEL, KC_DOWN,KC_DOWN, KC_UP,KC_PSLS, KC_F2, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| - _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, RAISE,XXXXXXX,KC_RIGHT,XXXXXXX,KC_PAST, KC_EQL, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, MO(_RAISE),XXXXXXX,KC_RIGHT,XXXXXXX,KC_PAST,KC_EQL, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,KC_SNUHS,KC_SNUBS, _______, _______, _______, KC_PENT, KC_PPLS,KC_PMNS, KC_DEL, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______,_______,_______, KC_PENT, KC_PPLS,KC_PMNS, KC_DEL, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |-----------------------------------------------| _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY //`------------------------------------------------------------------------------------------------------------' ), [_RAISE] = LAYOUT_with_setta21( - //,-----------------------------------------------------| |-----------------------------------------------------. |-----------------------------------------------| - KC_ESC, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, LOWER, KC_F11, KC_F4, KC_F7,KC_SMIN, KC_ESC, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| - KC_TILD, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, KC_F12, KC_F5, KC_F8,KC_SMAX, KC_F2, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| - KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, RAISE, KC_F3, KC_F6, KC_F9,KC_SCOU, KC_EQL, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, KC_RPRN, KC_SSUM,KC_SAVE, KC_DEL, - //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |-----------------------------------------------| + //,-----------------------------------------------------| |-----------------------------------------------------. |------------------------------------------------| + KC_ESC, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_F11, KC_F4, KC_F7,SEND_MIN, KC_ESC, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+--------+-------| + KC_TILD, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, KC_F12, KC_F5, KC_F8,SEND_MAX, KC_F2, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+--------+-------| + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, _______, KC_F3, KC_F6, KC_F9,SEND_CIF, KC_EQL, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |---------------+---------------+--------+-------| + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, KC_RPRN, SEND_SUM,SEND_AVE, KC_DEL, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |------------------------------------------------| _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ //`------------------------------------------------------------------------------------------------------------' ), [_ADJUST] = LAYOUT_with_setta21( /* Base */ //,-----------------------------------------------------| |-----------------------------------------------------. |-----------------------------------------------| - KC_ESC, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, LOWER,RGB_VAD,RGB_HUD,RGB_SAD, ADJUST,RGB_TOG, + KC_ESC, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,RGB_VAD,RGB_HUD,RGB_SAD,XXXXXXX,_______, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| - _______, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BTN1, KC_MS_U, KC_BTN2, XXXXXXX,LALT(KC_PSCR), RGB_VAI,RGB_HUI,RGB_SAI,XXXXXXX,_______, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BTN1, KC_MS_U, KC_BTN2, XXXXXXX,LALT(KC_PSCR), RGB_VAI,RGB_HUI,RGB_SAI,XXXXXXX,_______, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| - _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_R, XXXXXXX, KC_PSCR, RAISE,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,_______, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_R, XXXXXXX, KC_PSCR, _______,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,_______, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| - _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,LCA(KC_DEL), RGB_MOD, _______,_______,_______, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,LCA(KC_DEL), RGB_MOD, RGB_TOG,_______,_______, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |-----------------------------------------------| - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, _______, _______, _______, _______, RESET, RESET, _______, _______, _______, _______, _______ //`------------------------------------------------------------------------------------------------------------' ) }; -static inline void update_change_layer(bool pressed, uint8_t layer1, uint8_t layer2, uint8_t layer3) { - - pressed ? layer_on(layer1) : layer_off(layer1); - IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2) ? layer_on(layer3) : layer_off(layer3); -} - int RGB_current_mode; bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool result = false; switch (keycode) { - case LOWER: - update_change_layer(record->event.pressed, _LOWER, _RAISE, _ADJUST); - break; - case RAISE: - update_change_layer(record->event.pressed, _RAISE, _LOWER, _ADJUST); - break; - case ADJUST: - update_change_layer(record->event.pressed, _ADJUST, _RAISE, _LOWER); - break; case SEND_SUM: if (record->event.pressed) { SEND_STRING("=SUM("); } break; - case SEND_AVERAGE: + case SEND_AVE: if (record->event.pressed) { SEND_STRING("=AVERAGE("); } break; - case SEND_COUNTIF: + case SEND_CIF: if (record->event.pressed) { SEND_STRING("=COUNTIF("); } @@ -184,7 +150,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { RGB_current_mode = rgblight_config.mode; } break; - case RGBRST: + case RGB_RST: if (record->event.pressed) { eeconfig_update_rgblight_default(); rgblight_enable(); @@ -201,7 +167,5 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } void matrix_init_user(void) { - #ifdef RGBLIGHT_ENABLE - RGB_current_mode = rgblight_config.mode; - #endif + } diff --git a/keyboards/naked60/keymaps/default_with_setta21/rules.mk b/keyboards/naked60/keymaps/default_with_setta21/rules.mk index b714c8f51f6e..e69de29bb2d1 100644 --- a/keyboards/naked60/keymaps/default_with_setta21/rules.mk +++ b/keyboards/naked60/keymaps/default_with_setta21/rules.mk @@ -1,9 +0,0 @@ -RGBLIGHT_ENABLE = yes - -# If your custom naked60 pcb, you can rewrite to yes. -LED_ANIMATIONS = yes # LED animations - -ifeq ($(strip $(LED_ANIMATIONS)), yes) - # OPT_DEFS += -DRGBLIGHT_ANIMATIONS - OPT_DEFS += -DLED_ANIMATIONS -endif diff --git a/keyboards/naked60/keymaps/salicylic/config.h b/keyboards/naked60/keymaps/salicylic/config.h index 140a79c772c8..4b3496d85693 100644 --- a/keyboards/naked60/keymaps/salicylic/config.h +++ b/keyboards/naked60/keymaps/salicylic/config.h @@ -18,34 +18,5 @@ /* Select hand configuration */ -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - -#define USE_SERIAL_PD2 - #define TAPPING_FORCE_HOLD #define TAPPING_TERM 180 - -#define MK_3_SPEED - -#undef MOUSEKEY_INTERVAL -#define MOUSEKEY_INTERVAL 0 - -#undef MOUSEKEY_TIME_TO_MAX -#define MOUSEKEY_TIME_TO_MAX 150 - -#undef MOUSEKEY_MAX_SPEED -#define MOUSEKEY_MAX_SPEED 3 - -#undef MOUSEKEY_MOVE_DELTA -#define MOUSEKEY_MOVE_DELTA 5 - -#undef MOUSEKEY_DELAY -#define MOUSEKEY_DELAY 0 - -#undef MOUSEKEY_WHEEL_MAX_SPEED -#define MOUSEKEY_WHEEL_MAX_SPEED 1 - -#undef MOUSEKEY_WHEEL_TIME_TO_MAX -#define MOUSEKEY_WHEEL_TIME_TO_MAX 0 diff --git a/keyboards/naked60/keymaps/salicylic/keymap.c b/keyboards/naked60/keymaps/salicylic/keymap.c index 11d2e143105a..17172f77b97d 100644 --- a/keyboards/naked60/keymaps/salicylic/keymap.c +++ b/keyboards/naked60/keymaps/salicylic/keymap.c @@ -3,11 +3,6 @@ extern keymap_config_t keymap_config; -#ifdef RGBLIGHT_ENABLE -//Following line allows macro to read current RGB settings -extern rgblight_config_t rgblight_config; -#endif - extern uint8_t is_master; // Each layer gets a name for readability, which is then used in the keymap matrix below. @@ -22,25 +17,11 @@ enum layer_number { _ADJUST, }; -enum custom_keycodes { - FLOCK = SAFE_RANGE, - LOWER, - RAISE, - ADJUST, - RGBRST -}; - enum tapdances{ TD_ESFL = 0, TD_ESQW, }; -// Fillers to make layering more clear -#define KC_CT11 LCTL_T(KC_F11) -#define KC_SF12 SFT_T(KC_F12) -#define KC_LOEN LT(_LOWER, KC_ENT) -#define KC_RASP LT(_RAISE, KC_SPC) - qk_tap_dance_action_t tap_dance_actions[] = { [TD_ESFL] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _FLOCK), [TD_ESQW] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _QWERTY), @@ -57,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, JP_COMM, JP_DOT, JP_SLSH, JP_BSLS, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - KC_LEFT,KC_RIGHT, KC_LGUI, KC_MHEN, KC_LOEN, KC_BSPC, KC_DEL, KC_RASP, KC_HENK, KC_LALT, KC_DOWN, KC_UP + KC_LEFT,KC_RIGHT, KC_LGUI, KC_MHEN, LT(_LOWER,KC_ENT),KC_BSPC, KC_DEL,LT(_RAISE,KC_SPC), KC_HENK, KC_LALT, KC_DOWN, KC_UP //`------------------------------------------------------------------------------------------------------------' ), @@ -87,7 +68,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| JP_CIRC, JP_PERC, JP_AMPR, JP_SCLN, JP_COLN, JP_PIPE, KC_0, KC_1, KC_2, KC_3, JP_PLUS, KC_ENT, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - _______, _______, _______, KC_ZKHK, LOWER, _______, _______, RAISE, KC_0, JP_DOT, _______, _______ + _______, _______, _______, KC_ZKHK,MO(_LOWER),_______,_______,MO(_RAISE),JP_DOT, _______, _______, _______ //`------------------------------------------------------------------------------------------------------------' ), @@ -98,9 +79,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, XXXXXXX, KC_UP, XXXXXXX, KC_PGUP, KC_DEL, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - KC_CT11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, KC_LEFT, KC_DOWN,KC_RIGHT, KC_LSFT, KC_ENT, +LCTL_T(KC_F11), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, KC_LEFT, KC_DOWN,KC_RIGHT, KC_LSFT, KC_ENT, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - KC_SF12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGDN, XXXXXXX, +SFT_T(KC_F12), KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGDN, XXXXXXX, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ //`------------------------------------------------------------------------------------------------------------' @@ -110,38 +91,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //,-----------------------------------------------------| |-----------------------------------------------------. KC_ESC, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - _______, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BTN1, KC_MS_U, KC_BTN2, XXXXXXX,LALT(KC_PSCR), + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BTN1, KC_MS_U, KC_BTN2, XXXXXXX,LALT(KC_PSCR), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| KC_LCTRL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_R, XXXXXXX, KC_PSCR, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,LCA(KC_DEL), //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, _______, _______, _______, _______, RESET, RESET, _______, _______, _______, _______, _______ //`------------------------------------------------------------------------------------------------------------' ) }; -static inline void update_change_layer(bool pressed, uint8_t layer1, uint8_t layer2, uint8_t layer3) { - - pressed ? layer_on(layer1) : layer_off(layer1); - IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2) ? layer_on(layer3) : layer_off(layer3); +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } -int RGB_current_mode; -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - - bool result = false; - switch (keycode) { - case LOWER: - update_change_layer(record->event.pressed, _LOWER, _RAISE, _ADJUST); - break; - case RAISE: - update_change_layer(record->event.pressed, _RAISE, _LOWER, _ADJUST); - break; - default: - result = true; - break; - } - - return result; +void matrix_init_user(void) { + } diff --git a/keyboards/naked60/keymaps/salicylic/readme.md b/keyboards/naked60/keymaps/salicylic/readme.md index da2126381678..2901dbf7fab6 100644 --- a/keyboards/naked60/keymaps/salicylic/readme.md +++ b/keyboards/naked60/keymaps/salicylic/readme.md @@ -6,19 +6,18 @@ | ESC(FLock) | 1| 2| 3| 4| 5| | | 6| 7| 8| 9| 0| BSPC| | TAB | Q| W| E| R| T| | | Y| U| I| O| P| [| |LCTRL | A| S| D| F| G| | | H| J| K| L| -| ]| -| LSFT | Z| X| C| V| B| | | N| M| ,| .| /| \ | -| | LEFT| RIGHT| LGUI| MHEN|Low+Ent| BSPC| DEL|Rai+SPC| HENK| LALT| UP| DOWN| | - +| LSFT | Z| X| C| V| B| | | N| M| ,| .| /| \| +| | LEFT| RIGHT| LGUI| MHEN|LOWER, ENT|BSPC|DEL|RAISE,SPC|HENK| LALT| DOWN| UP| | ## FLock | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | |:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| -| ESC(FLock)|F2| F3| F4| F5| F6| | | F7| F8| F9| F10| F11| _____| +| ESC(FLock)| F2| F3| F4| F5| F6| | | F7| F8| F9| F10| F11| BSPC| | TAB | Q| W| E| R| T| | | Y| U| I| O| P| [| |LCTRL | A| S| D| F| G| | | H| J| K| L| -| ]| -| LSFT | Z| X| C| V| B| | | N| M| ,| .| /| \ | -| | LEFT| RIGHT| LGUI| MHEN|Low+Ent| BSPC| DEL|Rai+SPC| HENK| LALT| UP| DOWN| | +| LSFT | Z| X| C| V| B| | | N| M| ,| .| /| \| +| | LEFT| RIGHT| LGUI| MHEN|LOWER, ENT|BSPC|DEL|RAISE,SPC|HENK| LALT| DOWN| UP| | ## Lower @@ -28,26 +27,25 @@ | :| !| ?| [| ]| ~| | | 6| 7| 8| 9| *| /| | '| #| "| (| )| @| | | XXXXX| 4| 5| 6| -| =| | ^| %| &| ;| :| PIPE| | | 0| 1| 2| 3| +| ENT| -| | LEFT| RIGHT| LGUI| ZKHK| LOWER| BSPC| DEL| RAISE| 0| .| UP| DOWN| | +| | LEFT| RIGHT| LGUI| ZKHK| LOWER| BSPC| DEL| RAISE| HENK| LALT| DOWN| UP| | ## Raise | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | |:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| | ESC| F2| F3| F4| F5| F6| | | F7| F8| F9| F10| F11| F12| -| ESC| 1| 2| 3| 4| 5| | | XXXXX| XXXXX| UP| XXXXX| PGUP| BSPC| -|CtrlF11| F1| F2| F3| F4| F5| | | XXXXX| LEFT| DOWN| RIGHT| LSFT| ENT| -|ShiftF12| F6| F7| F8| F9| F10| | | XXXXX| XXXXX| XXXXX| XXXXX| PGDN| XXXXX| -| | LEFT| RIGHT| LGUI| ZKHK| LOWER| BSPC| DEL| RAISE| HENK| LALT| UP| DOWN| | - +| ESC| 1| 2| 3| 4| 5| | | 6| XXXXX| UP| XXXXX| PGUP| DEL| +|F11,LCTRL| F1| F2| F3| F4| F5| | | XXXXX| LEFT| DOWN| RIGHT| LSFT| ENT| +|F12,LSFT| F6| F7| F8| F9| F10| | | XXXXX| XXXXX| XXXXX| XXXXX| PGDN| XXXXX| +| | LEFT| RIGHT| LGUI| MHEN| LOWER| BSPC| DEL| RAISE| HENK| LALT| DOWN| UP| | ## Adjust -| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| -| ESC| F2| F3| F4| F5| | | F6| F7| F8| F9| F10| F11| F12| -| ESC| RST| XXXXX| XXXXX| XXXXX| XXXXX| | | XXXXX| BTN1| MS_U| BTN2| XXXXX|Alt+PSCR| +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:-----:|:----:| +| ESC| F2| F3| F4| F5| F6| | | F7| F8| F9| F10| F11| F12| +| ESC| XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| | | XXXXX| BTN1| MS_U| BTN2| XXXXX|Alt+PSCR| | LCTRL| XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| | | XXXXX| MS_L| MS_D| MS_R| XXXXX| PSCR| | LSFT| XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| | | XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| C+A+D| -| | LEFT| RIGHT| LGUI| ZKHK| LOWER| BSPC| DEL| RAISE| HENK| LALT| UP| DOWN| | +| |ADJUST| LCTRL| LALT| LGUI| LOWER| RESET| RESET| RAISE| HENK| LALT| DOWN| UP| | diff --git a/keyboards/naked60/keymaps/salicylic_with_nafuda/config.h b/keyboards/naked60/keymaps/salicylic_with_nafuda/config.h index e188262cf92c..47da6d44187c 100644 --- a/keyboards/naked60/keymaps/salicylic_with_nafuda/config.h +++ b/keyboards/naked60/keymaps/salicylic_with_nafuda/config.h @@ -26,65 +26,3 @@ #define TAPPING_FORCE_HOLD #define TAPPING_TERM 180 - -#define RGBLED_NUM 7 - -#ifndef IOS_DEVICE_ENABLE - #define RGBLIGHT_LIMIT_VAL 180 - #define RGBLIGHT_VAL_STEP 17 -#else - #define RGBLIGHT_LIMIT_VAL 50 - #define RGBLIGHT_VAL_STEP 4 -#endif -#define RGBLIGHT_HUE_STEP 10 -#define RGBLIGHT_SAT_STEP 17 - -#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE) -// USB_MAX_POWER_CONSUMPTION value for naked48 keyboard -// 120 RGBoff, OLEDoff -// 120 OLED -// 330 RGB 6 -// 300 RGB 32 -// 310 OLED & RGB 32 - #define USB_MAX_POWER_CONSUMPTION 400 -#else - // fix iPhone and iPad power adapter issue - // iOS device need lessthan 100 - #define USB_MAX_POWER_CONSUMPTION 100 -#endif - -// Selection of RGBLIGHT MODE to use. -#if defined(LED_ANIMATIONS) - //#define RGBLIGHT_EFFECT_BREATHING - #define RGBLIGHT_EFFECT_RAINBOW_MOOD - #define RGBLIGHT_EFFECT_RAINBOW_SWIRL - //#define RGBLIGHT_EFFECT_SNAKE - #define RGBLIGHT_EFFECT_KNIGHT - //#define RGBLIGHT_EFFECT_CHRISTMAS - #define RGBLIGHT_EFFECT_STATIC_GRADIENT - //#define RGBLIGHT_EFFECT_RGB_TEST - //#define RGBLIGHT_EFFECT_ALTERNATING -#endif - -#define MK_3_SPEED - -#undef MOUSEKEY_INTERVAL -#define MOUSEKEY_INTERVAL 0 - -#undef MOUSEKEY_TIME_TO_MAX -#define MOUSEKEY_TIME_TO_MAX 150 - -#undef MOUSEKEY_MAX_SPEED -#define MOUSEKEY_MAX_SPEED 3 - -#undef MOUSEKEY_MOVE_DELTA -#define MOUSEKEY_MOVE_DELTA 5 - -#undef MOUSEKEY_DELAY -#define MOUSEKEY_DELAY 0 - -#undef MOUSEKEY_WHEEL_MAX_SPEED -#define MOUSEKEY_WHEEL_MAX_SPEED 1 - -#undef MOUSEKEY_WHEEL_TIME_TO_MAX -#define MOUSEKEY_WHEEL_TIME_TO_MAX 0 diff --git a/keyboards/naked60/keymaps/salicylic_with_nafuda/keymap.c b/keyboards/naked60/keymaps/salicylic_with_nafuda/keymap.c index 33ccdf603fb5..3a2cd9eb8580 100644 --- a/keyboards/naked60/keymaps/salicylic_with_nafuda/keymap.c +++ b/keyboards/naked60/keymaps/salicylic_with_nafuda/keymap.c @@ -25,13 +25,7 @@ enum layer_number { }; enum custom_keycodes { - FLOCK = SAFE_RANGE, - MOUSE, - BROWSER, - LOWER, - RAISE, - ADJUST, - RGBRST + RGB_RST = SAFE_RANGE }; enum tapdances{ @@ -39,21 +33,6 @@ enum tapdances{ TD_ESQW, }; -// Fillers to make layering more clear -#define KC_CT11 LCTL_T(KC_F11) -#define KC_SF12 SFT_T(KC_F12) -#define KC_LOEN LT(_LOWER, KC_ENT) -#define KC_RASP LT(_RAISE, KC_SPC) - -#define KC_RTAB LCTL(KC_TAB) -#define KC_LTAB LCTL(LSFT(KC_TAB)) -#define KC_CTAB LCTL(KC_W) -#define KC_RETAB LCTL(LSFT(KC_T)) - -#define KC_TGMO TG(_MOUSE) -#define KC_TGBR TG(_BROWSER) -#define KC_BSAD LT(_ADJUST, KC_BSPC) - qk_tap_dance_action_t tap_dance_actions[] = { [TD_ESFL] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _FLOCK), [TD_ESQW] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _QWERTY), @@ -62,15 +41,15 @@ qk_tap_dance_action_t tap_dance_actions[] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT_with_nafuda( //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| - TD(TD_ESFL), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, KC_TGMO, + TD(TD_ESFL), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, TG(_MOUSE), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_LBRC, KC_BSAD, KC_UP, KC_TGBR, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_LBRC,LT(_ADJUST, KC_BSPC),KC_UP,TG(_BROWSER), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, JP_MINS, JP_RBRC, KC_LEFT, KC_DOWN,KC_RIGHT, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------------------------| KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, JP_COMM, JP_DOT, JP_SLSH, JP_BSLS, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - KC_LEFT,KC_RIGHT, KC_LGUI, KC_MHEN, KC_LOEN, KC_BSPC, KC_DEL, KC_RASP, KC_HENK, KC_LALT, KC_DOWN, KC_UP + KC_LEFT,KC_RIGHT, KC_LGUI, KC_MHEN,LT(_LOWER, KC_ENT), KC_BSPC, KC_DEL,LT(_RAISE, KC_SPC), KC_HENK, KC_LALT, KC_DOWN, KC_UP //`------------------------------------------------------------------------------------------------------------' ), @@ -90,7 +69,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_MOUSE] = LAYOUT_with_nafuda( //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| - TD(TD_ESFL), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, KC_TGMO, + TD(TD_ESFL), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, TG(_MOUSE), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BTN1, KC_MS_U, KC_BTN2, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| @@ -104,11 +83,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BROWSER] = LAYOUT_with_nafuda( //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_CTAB, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, LCTL(KC_W), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RETAB, KC_WH_U, KC_TGBR, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,LCTL(LSFT(KC_T)),KC_WH_U,TG(_BROWSER), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LTAB, KC_WH_D, KC_RTAB, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,LCTL(LSFT(KC_TAB)), KC_WH_D,LCTL(KC_TAB), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------------------------| _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| @@ -118,27 +97,27 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_LOWER] = LAYOUT_with_nafuda( //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| - KC_ESC, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TGMO, + KC_ESC, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, TG(_MOUSE), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| - JP_COLN, JP_EXLM, JP_QUES, JP_LBRC, JP_RBRC, JP_TILD, KC_6, KC_7, KC_8, KC_9, JP_ASTR, JP_SLSH, KC_BSAD, KC_UP, KC_TGBR, + JP_COLN, JP_EXLM, JP_QUES, JP_LBRC, JP_RBRC, JP_TILD, KC_6, KC_7, KC_8, KC_9, JP_ASTR, JP_SLSH,LT(_ADJUST, KC_BSPC),KC_UP,TG(_BROWSER), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| JP_QUOT, JP_HASH, JP_DQT, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_4, KC_5, KC_6, JP_MINS, JP_EQL, KC_LEFT, KC_DOWN,KC_RIGHT, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------------------------| JP_CIRC, JP_PERC, JP_AMPR, JP_SCLN, JP_COLN, JP_PIPE, KC_0, KC_1, KC_2, KC_3, JP_PLUS, KC_ENT, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - _______, _______, _______, KC_ZKHK, LOWER, _______, _______, RAISE, KC_0, JP_DOT, _______, _______ + _______, _______, _______, KC_ZKHK,MO(_LOWER),_______,_______,MO(_RAISE), JP_DOT,_______, _______, _______ //`------------------------------------------------------------------------------------------------------------' ), [_RAISE] = LAYOUT_with_nafuda( //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| - KC_ESC, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TGMO, + KC_ESC, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, TG(_MOUSE), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, XXXXXXX, KC_UP, XXXXXXX, KC_PGUP, KC_DEL, KC_BSAD, KC_UP, KC_TGBR, + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, XXXXXXX, KC_UP, XXXXXXX, KC_PGUP, KC_DEL,LT(_ADJUST, KC_BSPC),KC_UP,TG(_BROWSER), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| - KC_CT11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, KC_LEFT, KC_DOWN,KC_RIGHT, KC_LSFT, KC_ENT, KC_LEFT, KC_DOWN,KC_RIGHT, +LCTL_T(KC_F11), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, KC_LEFT, KC_DOWN,KC_RIGHT, KC_LSFT, KC_ENT, KC_LEFT, KC_DOWN,KC_RIGHT, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------------------------| - KC_SF12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGDN, XXXXXXX, +SFT_T(KC_F12), KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGDN, XXXXXXX, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ //`------------------------------------------------------------------------------------------------------------' @@ -148,21 +127,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| KC_ESC, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, RGB_VAD, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| - _______, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BTN1, KC_MS_U, KC_BTN2, XXXXXXX,LALT(KC_PSCR), ADJUST, RGB_SAD, RGB_VAI, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BTN1, KC_MS_U, KC_BTN2, XXXXXXX,LALT(KC_PSCR), _ADJUST, RGB_SAD, RGB_VAI, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| KC_LCTRL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_R, XXXXXXX, KC_PSCR, RGB_MOD, RGB_TOG, RGB_SAI, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------------------------| KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,LCA(KC_DEL), //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, _______, _______, _______, _______, RESET, RESET, _______, _______, _______, _______, _______ //`------------------------------------------------------------------------------------------------------------' ) }; -static inline void update_change_layer(bool pressed, uint8_t layer1, uint8_t layer2, uint8_t layer3) { - - pressed ? layer_on(layer1) : layer_off(layer1); - IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2) ? layer_on(layer3) : layer_off(layer3); +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } int RGB_current_mode; @@ -170,12 +147,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool result = false; switch (keycode) { - case LOWER: - update_change_layer(record->event.pressed, _LOWER, _RAISE, _ADJUST); - break; - case RAISE: - update_change_layer(record->event.pressed, _RAISE, _LOWER, _ADJUST); - break; #ifdef RGBLIGHT_ENABLE case RGB_MOD: if (record->event.pressed) { @@ -184,7 +155,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { RGB_current_mode = rgblight_config.mode; } break; - case RGBRST: + case RGB_RST: if (record->event.pressed) { eeconfig_update_rgblight_default(); rgblight_enable(); @@ -201,7 +172,5 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } void matrix_init_user(void) { - #ifdef RGBLIGHT_ENABLE - RGB_current_mode = rgblight_config.mode; - #endif + } diff --git a/keyboards/naked60/keymaps/salicylic_with_nafuda/readme.md b/keyboards/naked60/keymaps/salicylic_with_nafuda/readme.md index 8c83f7ea3637..17b973b73a32 100644 --- a/keyboards/naked60/keymaps/salicylic_with_nafuda/readme.md +++ b/keyboards/naked60/keymaps/salicylic_with_nafuda/readme.md @@ -2,31 +2,38 @@ Add Nafuda maps to the salicylic layout. -## Default -| 1 | 2 | 3 | -|:----:|:----:|:----:| -| | MOUSE| | -| BS+Ad| UP|Browser| -| LEFT| DOWN| RIGHT| +Default + //|--------------------| + Mouse, + //|------+------+------| + BS + Ad, UP,Browser, + //|------+------+------| + LEFT, DOWN, RIGHT + //|--------------------| -## Mouse -| 1 | 2 | 3 | -|:----:|:----:|:----:| -| |Default| | -| BTN1| MS_U| BTN2| -| MS_L| MS_D| MS_R| +Mouse + //|--------------------| + Default, + //|------+------+------| + BTN1, MS_U, BTN2, + //|------+------+------| + MS_L, MS_D, MS_R + //|--------------------| -## Browser -| 1 | 2 | 3 | -|:----:|:----:|:----:| -| |CloseTAB| | -|ReOpenTAB|WH_U|Default| -| LTAB| WH_D| RTAB| - -## Adjust -| 1 | 2 | 3 | -|:----:|:----:|:----:| -| |LED_VAD| | -|Default|LED_HUD|LED_VAI| -|LED_MOD|LED_ON/Off|LED_HUI| +Browser + //|--------------------| + CloseTAB, + //|------+------+------| + ReOpenTAB, WH_U,Default, + //|------+------+------| + LTAB, WH_D, RTAB + //|--------------------| +Adjust + //|------------------------| + LED VAD, + //|------+----------+------| + Default, LED HUD,LED VAI, + //|------+----------+------| + LED MOD,LED ON/Off,LED HUI + //|------------------------| diff --git a/keyboards/naked60/keymaps/salicylic_with_nafuda/rules.mk b/keyboards/naked60/keymaps/salicylic_with_nafuda/rules.mk index b714c8f51f6e..e69de29bb2d1 100644 --- a/keyboards/naked60/keymaps/salicylic_with_nafuda/rules.mk +++ b/keyboards/naked60/keymaps/salicylic_with_nafuda/rules.mk @@ -1,9 +0,0 @@ -RGBLIGHT_ENABLE = yes - -# If your custom naked60 pcb, you can rewrite to yes. -LED_ANIMATIONS = yes # LED animations - -ifeq ($(strip $(LED_ANIMATIONS)), yes) - # OPT_DEFS += -DRGBLIGHT_ANIMATIONS - OPT_DEFS += -DLED_ANIMATIONS -endif diff --git a/keyboards/naked60/keymaps/salicylic_with_setta21/config.h b/keyboards/naked60/keymaps/salicylic_with_setta21/config.h index fe162510d0ba..0761e5b6d3b5 100644 --- a/keyboards/naked60/keymaps/salicylic_with_setta21/config.h +++ b/keyboards/naked60/keymaps/salicylic_with_setta21/config.h @@ -21,70 +21,7 @@ #define MASTER_LEFT // #define MASTER_RIGHT // #define EE_HANDS - #define USE_SERIAL_PD2 #define TAPPING_FORCE_HOLD #define TAPPING_TERM 180 - -#define RGBLED_NUM 21 - -#ifndef IOS_DEVICE_ENABLE - #define RGBLIGHT_LIMIT_VAL 180 - #define RGBLIGHT_VAL_STEP 17 -#else - #define RGBLIGHT_LIMIT_VAL 50 - #define RGBLIGHT_VAL_STEP 4 -#endif -#define RGBLIGHT_HUE_STEP 10 -#define RGBLIGHT_SAT_STEP 17 - -#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE) -// USB_MAX_POWER_CONSUMPTION value for naked48 keyboard -// 120 RGBoff, OLEDoff -// 120 OLED -// 330 RGB 6 -// 300 RGB 32 -// 310 OLED & RGB 32 - #define USB_MAX_POWER_CONSUMPTION 400 -#else - // fix iPhone and iPad power adapter issue - // iOS device need lessthan 100 - #define USB_MAX_POWER_CONSUMPTION 100 -#endif - -// Selection of RGBLIGHT MODE to use. -#if defined(LED_ANIMATIONS) - //#define RGBLIGHT_EFFECT_BREATHING - #define RGBLIGHT_EFFECT_RAINBOW_MOOD - #define RGBLIGHT_EFFECT_RAINBOW_SWIRL - //#define RGBLIGHT_EFFECT_SNAKE - #define RGBLIGHT_EFFECT_KNIGHT - //#define RGBLIGHT_EFFECT_CHRISTMAS - #define RGBLIGHT_EFFECT_STATIC_GRADIENT - //#define RGBLIGHT_EFFECT_RGB_TEST - //#define RGBLIGHT_EFFECT_ALTERNATING -#endif - -#define MK_3_SPEED - -#undef MOUSEKEY_INTERVAL -#define MOUSEKEY_INTERVAL 0 - -#undef MOUSEKEY_TIME_TO_MAX -#define MOUSEKEY_TIME_TO_MAX 150 - -#undef MOUSEKEY_MAX_SPEED -#define MOUSEKEY_MAX_SPEED 3 - -#undef MOUSEKEY_MOVE_DELTA -#define MOUSEKEY_MOVE_DELTA 5 - -#undef MOUSEKEY_DELAY -#define MOUSEKEY_DELAY 0 - -#undef MOUSEKEY_WHEEL_MAX_SPEED -#define MOUSEKEY_WHEEL_MAX_SPEED 1 - -#undef MOUSEKEY_WHEEL_TIME_TO_MAX -#define MOUSEKEY_WHEEL_TIME_TO_MAX 0 diff --git a/keyboards/naked60/keymaps/salicylic_with_setta21/keymap.c b/keyboards/naked60/keymaps/salicylic_with_setta21/keymap.c index 4d2618c52db1..a1f5a6e21a64 100644 --- a/keyboards/naked60/keymaps/salicylic_with_setta21/keymap.c +++ b/keyboards/naked60/keymaps/salicylic_with_setta21/keymap.c @@ -3,11 +3,6 @@ extern keymap_config_t keymap_config; -#ifdef RGBLIGHT_ENABLE -//Following line allows macro to read current RGB settings -extern rgblight_config_t rgblight_config; -#endif - extern uint8_t is_master; // Each layer gets a name for readability, which is then used in the keymap matrix below. @@ -23,15 +18,10 @@ enum layer_number { }; enum custom_keycodes { - FLOCK = SAFE_RANGE, - LOWER, - RAISE, - ADJUST, - KANJI, - RGBRST, + RGB_RST = SAFE_RANGE, SEND_SUM, - SEND_AVERAGE, - SEND_COUNTIF, + SEND_AVE, + SEND_CIF, SEND_MAX, SEND_MIN }; @@ -41,22 +31,6 @@ enum tapdances{ TD_ESQW, }; -// Fillers to make layering more clear -#define KC_CT11 LCTL_T(KC_F11) -#define KC_SF12 SFT_T(KC_F12) -#define KC_LOEN LT(_LOWER, KC_ENT) -#define KC_RASP LT(_RAISE, KC_SPC) - -#define KC_SSUM SEND_SUM -#define KC_SAVE SEND_AVERAGE -#define KC_SCOU SEND_COUNTIF -#define KC_SMAX SEND_MAX -#define KC_SMIN SEND_MIN - -#define KC_RADO LT(_RAISE, KC_PDOT) -#define KC_LOP0 LT(_LOWER, KC_P0) -#define KC_ADNL LT(_ADJUST, KC_NLCK) - qk_tap_dance_action_t tap_dance_actions[] = { [TD_ESFL] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _FLOCK), [TD_ESQW] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _QWERTY), @@ -65,15 +39,15 @@ qk_tap_dance_action_t tap_dance_actions[] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT_with_setta21( //,-----------------------------------------------------| |-----------------------------------------------------. |-----------------------------------------------| - TD(TD_ESFL), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, KC_LOP0, KC_P1, KC_P4, KC_P7,KC_ADNL, KC_ESC, + TD(TD_ESFL), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,LT(_LOWER, KC_P0),KC_P1, KC_P4, KC_P7,KC_NLCK, KC_ESC, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_LBRC, KC_P2, KC_P5, KC_P8,KC_PSLS, KC_F2, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| - KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, JP_MINS, JP_RBRC, KC_RADO, KC_P3, KC_P6, KC_P9,KC_PAST, JP_EQL, + KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, JP_MINS, JP_RBRC,LT(_RAISE, KC_PDOT),KC_P3,KC_P6, KC_P9,KC_PAST, JP_EQL, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, JP_COMM, JP_DOT, JP_SLSH, JP_BSLS, KC_PENT, KC_PPLS,KC_PMNS, KC_DEL, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |-----------------------------------------------| - KC_LEFT,KC_RIGHT, KC_LGUI, KC_MHEN, KC_LOEN, KC_BSPC, KC_DEL, KC_RASP, KC_HENK, KC_LALT, KC_DOWN, KC_UP + KC_LEFT,KC_RIGHT, KC_LGUI, KC_MHEN, LT(_LOWER,KC_ENT),KC_BSPC, KC_DEL,LT(_RAISE,KC_SPC), KC_HENK, KC_LALT, KC_DOWN, KC_UP //`------------------------------------------------------------------------------------------------------------' ), @@ -93,75 +67,66 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_LOWER] = LAYOUT_with_setta21( //,-----------------------------------------------------| |-----------------------------------------------------. |-----------------------------------------------| - KC_ESC, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, LOWER,XXXXXXX,KC_LEFT,XXXXXXX,XXXXXXX, KC_ESC, + KC_ESC, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, MO(_LOWER),XXXXXXX,KC_LEFT,XXXXXXX,XXXXXXX, KC_ESC, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| JP_COLN, JP_EXLM, JP_QUES, JP_LBRC, JP_RBRC, JP_TILD, KC_6, KC_7, KC_8, KC_9, JP_ASTR, JP_SLSH, KC_DOWN,KC_DOWN, KC_UP,KC_PSLS, KC_F2, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| - JP_QUOT, JP_HASH, JP_DQT, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_4, KC_5, KC_6, JP_MINS, JP_EQL, RAISE,XXXXXXX,KC_RIGHT,XXXXXXX,KC_PAST, JP_EQL, + JP_QUOT, JP_HASH, JP_DQT, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_4, KC_5, KC_6, JP_MINS, JP_EQL, MO(_RAISE),XXXXXXX,KC_RIGHT,XXXXXXX,KC_PAST, JP_EQL, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| JP_CIRC, JP_PERC, JP_AMPR, JP_SCLN, JP_COLN, JP_PIPE, KC_0, KC_1, KC_2, KC_3, JP_PLUS, KC_ENT, KC_PENT, KC_PPLS,KC_PMNS, KC_DEL, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |-----------------------------------------------| - _______, _______, _______, KC_ZKHK, LOWER, _______, _______, RAISE, KC_0, JP_DOT, _______, _______ + _______, _______, _______, KC_ZKHK,MO(_LOWER),_______,_______,MO(_RAISE), JP_DOT,_______, _______, _______ //`------------------------------------------------------------------------------------------------------------' ), [_RAISE] = LAYOUT_with_setta21( - //,-----------------------------------------------------| |-----------------------------------------------------. |-----------------------------------------------| - KC_ESC, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, LOWER, KC_F11, KC_F4, KC_F7,KC_SMIN, KC_ESC, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, XXXXXXX, KC_UP, XXXXXXX, KC_PGUP, KC_DEL, KC_F12, KC_F5, KC_F8,KC_SMAX, KC_F2, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| - KC_CT11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, KC_LEFT, KC_DOWN,KC_RIGHT, KC_LSFT, KC_ENT, RAISE, KC_F3, KC_F6, KC_F9,KC_SCOU, JP_EQL, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| - KC_SF12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGDN, XXXXXXX, JP_RPRN, KC_SSUM,KC_SAVE, KC_DEL, - //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |-----------------------------------------------| + //,-----------------------------------------------------| |-----------------------------------------------------. |------------------------------------------------| + KC_ESC, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_F11, KC_F4, KC_F7,SEND_MIN, KC_ESC, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+--------+-------| + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, XXXXXXX, KC_UP, XXXXXXX, KC_PGUP, KC_DEL, KC_F12, KC_F5, KC_F8,SEND_MAX, KC_F2, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+--------+-------| +LCTL_T(KC_F11), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, KC_LEFT, KC_DOWN,KC_RIGHT, KC_LSFT, KC_ENT, _______, KC_F3, KC_F6, KC_F9,SEND_CIF, JP_EQL, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |---------------+---------------+--------+-------| +SFT_T(KC_F12), KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGDN, XXXXXXX, JP_RPRN, SEND_SUM,SEND_AVE, KC_DEL, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |------------------------------------------------| _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ //`------------------------------------------------------------------------------------------------------------' ), [_ADJUST] = LAYOUT_with_setta21( /* Base */ //,-----------------------------------------------------| |-----------------------------------------------------. |-----------------------------------------------| - KC_ESC, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, LOWER,RGB_VAD,RGB_HUD,RGB_SAD, ADJUST,RGB_TOG, + KC_ESC, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,RGB_VAD,RGB_HUD,RGB_SAD,XXXXXXX,_______, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| - _______, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BTN1, KC_MS_U, KC_BTN2, XXXXXXX,LALT(KC_PSCR), RGB_VAI,RGB_HUI,RGB_SAI,XXXXXXX,_______, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BTN1, KC_MS_U, KC_BTN2, XXXXXXX,LALT(KC_PSCR), RGB_VAI,RGB_HUI,RGB_SAI,XXXXXXX,_______, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| - KC_LCTRL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_R, XXXXXXX, KC_PSCR, RAISE,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,_______, + KC_LCTRL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_R, XXXXXXX, KC_PSCR, _______,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,_______, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| - KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,LCA(KC_DEL), RGB_MOD, _______,_______,_______, + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,LCA(KC_DEL), RGB_MOD, RGB_TOG,_______,_______, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |-----------------------------------------------| - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, _______, _______, _______, _______, RESET, RESET, _______, _______, _______, _______, _______ //`------------------------------------------------------------------------------------------------------------' ) }; -static inline void update_change_layer(bool pressed, uint8_t layer1, uint8_t layer2, uint8_t layer3) { - - pressed ? layer_on(layer1) : layer_off(layer1); - IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2) ? layer_on(layer3) : layer_off(layer3); +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } int RGB_current_mode; bool process_record_user(uint16_t keycode, keyrecord_t *record) { - bool result = false; switch (keycode) { - case LOWER: - update_change_layer(record->event.pressed, _LOWER, _RAISE, _ADJUST); - break; - case RAISE: - update_change_layer(record->event.pressed, _RAISE, _LOWER, _ADJUST); - break; case SEND_SUM: if (record->event.pressed) { SEND_STRING("_SUM*"); } break; - case SEND_AVERAGE: + case SEND_AVE: if (record->event.pressed) { SEND_STRING("_AVERAGE*"); } break; - case SEND_COUNTIF: + case SEND_CIF: if (record->event.pressed) { SEND_STRING("_COUNTIF*"); } @@ -184,7 +149,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { RGB_current_mode = rgblight_config.mode; } break; - case RGBRST: + case RGB_RST: if (record->event.pressed) { eeconfig_update_rgblight_default(); rgblight_enable(); @@ -201,7 +166,5 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } void matrix_init_user(void) { - #ifdef RGBLIGHT_ENABLE - RGB_current_mode = rgblight_config.mode; - #endif + } diff --git a/keyboards/naked60/keymaps/salicylic_with_setta21/readme.md b/keyboards/naked60/keymaps/salicylic_with_setta21/readme.md index 0912d5431a0f..1baa36703a49 100644 --- a/keyboards/naked60/keymaps/salicylic_with_setta21/readme.md +++ b/keyboards/naked60/keymaps/salicylic_with_setta21/readme.md @@ -6,7 +6,7 @@ Add Setta21 maps to the salicylic layout. | 1 | 2 | 3 | 4 | |:----:|:----:|:----:|:----:| | ESC| F2| =| DEL| -|Ad+Num| /| *| -| +| Num| /| *| -| | 7| 8| 9| | | 4| 5| 6| +| | 1| 2| 3| | @@ -36,7 +36,7 @@ Add Setta21 maps to the salicylic layout. | 1 | 2 | 3 | 4 | |:----:|:----:|:----:|:----:| | ESC| F2| =| DEL| -|ADJUST| XXXXX| XXXXX| -| +| XXXXX| XXXXX| XXXXX| -| |LED_SAD|LED_SAI| XXXXX| | |LED_HUD|LED_HUI| XXXXX| +| |LED_VAD|LED_VAI| XXXXX| | diff --git a/keyboards/naked60/keymaps/salicylic_with_setta21/rules.mk b/keyboards/naked60/keymaps/salicylic_with_setta21/rules.mk index 15a887e78131..e69de29bb2d1 100644 --- a/keyboards/naked60/keymaps/salicylic_with_setta21/rules.mk +++ b/keyboards/naked60/keymaps/salicylic_with_setta21/rules.mk @@ -1,10 +0,0 @@ -RGBLIGHT_ENABLE = yes - -# If your custom naked60 pcb, you can rewrite to yes. -LED_ANIMATIONS = yes # LED animations - -ifeq ($(strip $(LED_ANIMATIONS)), yes) - # OPT_DEFS += -DRGBLIGHT_ANIMATIONS - OPT_DEFS += -DLED_ANIMATIONS -endif - diff --git a/keyboards/naked60/naked60.h b/keyboards/naked60/naked60.h index fde791c5ef82..1b736feec0b7 100644 --- a/keyboards/naked60/naked60.h +++ b/keyboards/naked60/naked60.h @@ -1,12 +1,7 @@ #pragma once -#ifdef KEYBOARD_naked60_rev1 - #include "rev1.h" -#endif - #include "quantum.h" -#ifdef PROTOCOL_LUFA -#include "lufa.h" -#include "split_util.h" +#ifdef KEYBOARD_naked60_rev1 + #include "rev1.h" #endif diff --git a/keyboards/naked60/rev1/config.h b/keyboards/naked60/rev1/config.h index 1724ef060afb..ac0c0ab2fca1 100644 --- a/keyboards/naked60/rev1/config.h +++ b/keyboards/naked60/rev1/config.h @@ -18,6 +18,7 @@ along with this program. If not, see . #pragma once + /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x3060 @@ -26,94 +27,27 @@ along with this program. If not, see . #define PRODUCT naked60 #define DESCRIPTION Ortholinear 60 Keys Keyboard -/* Use I2C or Serial */ -//#define USE_I2C -#define USE_SERIAL -//#define USE_MATRIX_I2C - -/* Select hand configuration */ -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - -// OLED support -// see ./rules.mk: OLED_ENABLE=yes or no -#ifdef OLED_ENABLE - #define SSD1306OLED -#endif - /* key matrix size */ #define MATRIX_ROWS 10 -#define MATRIX_COLS 14 +#define MATRIX_COLS 12 // Rows are doubled-up #define MATRIX_ROW_PINS { B6, D1, D0, D4, C6 } - -// wiring of each half #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, D7, E6, B4, B5, D3 } -// #define MATRIX_COL_PINS { D3, B5, B4, E6, D7, B2, B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order - -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST - -/* number of backlight levels */ -// #define BACKLIGHT_LEVELS 3 +// When using Setta21 +#define MATRIX_ROW_PINS_RIGHT { D4, C6, D7, E6, B2 } +#define MATRIX_COL_PINS_RIGHT { F4, F5, F6, F7, B1, B3, B2, B6, B4, B5, B2, B2 } +// When using Nafuda +//#define MATRIX_ROW_PINS_RIGHT { D1, D0, D4, C6, B6 } +//#define MATRIX_COL_PINS_RIGHT { F4, F5, F6, F7, B1, B3, B2, D7, E6, B4, B5, D3 } /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 +/* serial.c configuration for split keyboard */ +#define SOFT_SERIAL_PIN D2 + /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -//#define LOCKING_SUPPORT_ENABLE +#define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ -//#define LOCKING_RESYNC_ENABLE - -/* ws2812 RGB LED */ -#define RGB_DI_PIN D3 -#define RGBLIGHT_TIMER - -// naked60 keyboard RGB LED support -//#define RGBLIGHT_ANIMATIONS : see ./rules.mk: LED_ANIMATIONS = yes or no -// see ./rules.mk: LED_BACK_ENABLE or LED_UNDERGLOW_ENABLE set yes -//#define RGBLED_NUM 21 - -#ifndef IOS_DEVICE_ENABLE - #define RGBLIGHT_LIMIT_VAL 180 - #define RGBLIGHT_VAL_STEP 17 -#else - #define RGBLIGHT_LIMIT_VAL 50 - #define RGBLIGHT_VAL_STEP 4 -#endif -#define RGBLIGHT_HUE_STEP 10 -#define RGBLIGHT_SAT_STEP 17 - -#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE) -// USB_MAX_POWER_CONSUMPTION value for naked60 keyboard -// 120 RGBoff, OLEDoff -// 120 OLED -// 330 RGB 6 -// 300 RGB 32 -// 310 OLED & RGB 32 - #define USB_MAX_POWER_CONSUMPTION 400 -#else - // fix iPhone and iPad power adapter issue - // iOS device need lessthan 100 - #define USB_MAX_POWER_CONSUMPTION 100 -#endif - -/* - * 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 +#define LOCKING_RESYNC_ENABLE diff --git a/keyboards/naked60/rev1/matrix.c b/keyboards/naked60/rev1/matrix.c deleted file mode 100644 index 8685a8125e49..000000000000 --- a/keyboards/naked60/rev1/matrix.c +++ /dev/null @@ -1,357 +0,0 @@ -/* -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 . -*/ - -/* - * scan matrix - */ -#include -#include -#include -#include -#include -#include -#include -#include "print.h" -#include "debug.h" -#include "util.h" -#include "matrix.h" -#include "split_util.h" -#include "pro_micro.h" - -#ifdef USE_MATRIX_I2C -# include "i2c.h" -#else // USE_SERIAL -# include "split_scomm.h" -#endif - -#ifndef DEBOUNCE -# define DEBOUNCE 5 -#endif - -#define ERROR_DISCONNECT_COUNT 5 - -static uint8_t debouncing = DEBOUNCE; -static const int ROWS_PER_HAND = MATRIX_ROWS/2; -static uint8_t error_count = 0; -uint8_t is_master = 0 ; - -static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; -static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; - -/* matrix state(1:on, 0:off) */ -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); -static uint8_t matrix_master_scan(void); - - -__attribute__ ((weak)) -void matrix_init_kb(void) { - matrix_init_user(); -} - -__attribute__ ((weak)) -void matrix_scan_kb(void) { - matrix_scan_user(); -} - -__attribute__ ((weak)) -void matrix_init_user(void) { -} - -__attribute__ ((weak)) -void matrix_scan_user(void) { -} - -inline -uint8_t matrix_rows(void) -{ - return MATRIX_ROWS; -} - -inline -uint8_t matrix_cols(void) -{ - return MATRIX_COLS; -} - -void matrix_init(void) -{ - debug_enable = true; - debug_matrix = true; - debug_mouse = true; - // initialize row and col - unselect_rows(); - init_cols(); - - TX_RX_LED_INIT; - TXLED0; - RXLED0; - - // initialize matrix state: all keys off - for (uint8_t i=0; i < MATRIX_ROWS; i++) { - matrix[i] = 0; - matrix_debouncing[i] = 0; - } - - is_master = has_usb(); - - 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); - - 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(); - } - - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { - for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { - matrix[i+offset] = matrix_debouncing[i+offset]; - } - } - } - - return 1; -} - -#ifdef USE_MATRIX_I2C - -// Get rows from other half over i2c -int i2c_transaction(void) { - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; - - int err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE); - if (err) goto i2c_error; - - // start of matrix stored at 0x00 - err = i2c_master_write(0x00); - if (err) goto i2c_error; - - // Start read - err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ); - if (err) goto i2c_error; - - if (!err) { - int i; - for (i = 0; i < ROWS_PER_HAND-1; ++i) { - matrix[slaveOffset+i] = i2c_master_read(I2C_ACK); - } - matrix[slaveOffset+i] = i2c_master_read(I2C_NACK); - i2c_master_stop(); - } else { -i2c_error: // the cable is disconnceted, or something else went wrong - i2c_reset_state(); - return err; - } - - return 0; -} - -#else // USE_SERIAL - -int serial_transaction(int master_changed) { - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; -#ifdef SERIAL_USE_MULTI_TRANSACTION - int ret=serial_update_buffers(master_changed); -#else - int ret=serial_update_buffers(); -#endif - if (ret ) { - if(ret==2) RXLED1; - return 1; - } - RXLED0; - memcpy(&matrix[slaveOffset], - (void *)serial_slave_buffer, sizeof(serial_slave_buffer)); - return 0; -} -#endif - -uint8_t matrix_scan(void) -{ - if (is_master) { - matrix_master_scan(); - }else{ - matrix_slave_scan(); - int offset = (isLeftHand) ? ROWS_PER_HAND : 0; - memcpy(&matrix[offset], - (void *)serial_master_buffer, sizeof(serial_master_buffer)); - matrix_scan_quantum(); - } - return 1; -} - - -uint8_t matrix_master_scan(void) { - - int ret = _matrix_scan(); - int mchanged = 1; - - int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; - -#ifdef USE_MATRIX_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 - #ifdef SERIAL_USE_MULTI_TRANSACTION - mchanged = memcmp((void *)serial_master_buffer, - &matrix[offset], sizeof(serial_master_buffer)); - #endif - memcpy((void *)serial_master_buffer, - &matrix[offset], sizeof(serial_master_buffer)); -#endif - -#ifdef USE_MATRIX_I2C - if( i2c_transaction() ) { -#else // USE_SERIAL - if( serial_transaction(mchanged) ) { -#endif - // turn on the indicator led when halves are disconnected - TXLED1; - - error_count++; - - if (error_count > ERROR_DISCONNECT_COUNT) { - // reset other half if disconnected - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; - for (int i = 0; i < ROWS_PER_HAND; ++i) { - matrix[slaveOffset+i] = 0; - } - } - } else { - // turn off the indicator led on no error - TXLED0; - error_count = 0; - } - matrix_scan_quantum(); - return ret; -} - -void matrix_slave_scan(void) { - _matrix_scan(); - - int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; - -#ifdef USE_MATRIX_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 - #ifdef SERIAL_USE_MULTI_TRANSACTION - int change = 0; - #endif - for (int i = 0; i < ROWS_PER_HAND; ++i) { - #ifdef SERIAL_USE_MULTI_TRANSACTION - if( serial_slave_buffer[i] != matrix[offset+i] ) - change = 1; - #endif - serial_slave_buffer[i] = matrix[offset+i]; - } - #ifdef SERIAL_USE_MULTI_TRANSACTION - slave_buffer_change_count += change; - #endif -#endif -} - -bool matrix_is_modified(void) -{ - if (debouncing) return false; - return true; -} - -inline -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & ((matrix_row_t)1<> 4) + 1) &= ~_BV(col_pins[x] & 0xF); - _SFR_IO8((col_pins[x] >> 4) + 2) |= _BV(col_pins[x] & 0xF); - } -} - -static matrix_row_t read_cols(void) -{ - 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); - } - return result; -} - -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); - } -} - -static void select_row(uint8_t row) -{ - _SFR_IO8((row_pins[row] >> 4) + 1) |= _BV(row_pins[row] & 0xF); - _SFR_IO8((row_pins[row] >> 4) + 2) &= ~_BV(row_pins[row] & 0xF); -} diff --git a/keyboards/naked60/rev1/rev1.c b/keyboards/naked60/rev1/rev1.c index 520a869e57ba..bce48f89c30c 100644 --- a/keyboards/naked60/rev1/rev1.c +++ b/keyboards/naked60/rev1/rev1.c @@ -1 +1,5 @@ -#include "rev1.h" +#include "naked60.h" + +void matrix_init_kb(void) { + matrix_init_user(); +}; diff --git a/keyboards/naked60/rev1/rev1.h b/keyboards/naked60/rev1/rev1.h index 38e355cfcf05..d8ee83c47055 100644 --- a/keyboards/naked60/rev1/rev1.h +++ b/keyboards/naked60/rev1/rev1.h @@ -4,11 +4,6 @@ #include "quantum.h" -#ifdef RGBLIGHT_ENABLE -//rgb led driver -#include "ws2812.h" -#endif - ////////////////////////////////////////////////////////////////////////////// // When only use naked60. @@ -59,16 +54,16 @@ L40, L41, L42, L43, L44, L45, L46, L47, L48, L49, L4A, L4B \ ) \ { \ - { L00, L01, L02, L03, L04, L05, L06, L07, L08, L09, L0A, L0B,KC_NO,KC_NO }, \ - { L10, L11, L12, L13, L14, L15, L16, L17, L18, L19, L1A, L1B,KC_NO,KC_NO }, \ - { L20, L21, L22, L23, L24, L25, L26, L27, L28, L29, L2A, L2B,KC_NO,KC_NO }, \ - { L30, L31, L32, L33, L34, L35, L36, L37, L38, L39, L3A, L3B,KC_NO,KC_NO }, \ - { L40, L41, L42, L43, L44, L45, L46, L47, L48, L49, L4A, L4B,KC_NO,KC_NO }, \ - { R00, R01, R02, R03, R04, R05,KC_NO,KC_NO,KC_NO, R11, R12, R13, R14, R15 }, \ - { R20, R21, R22, R23, R24, R25,KC_NO,KC_NO, R30,KC_NO, R32,KC_NO, R34, R35 }, \ - {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ - {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ - {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO } \ + { L00, L01, L02, L03, L04, L05, L06, L07, L08, L09, L0A, L0B }, \ + { L10, L11, L12, L13, L14, L15, L16, L17, L18, L19, L1A, L1B }, \ + { L20, L21, L22, L23, L24, L25, L26, L27, L28, L29, L2A, L2B }, \ + { L30, L31, L32, L33, L34, L35, L36, L37, L38, L39, L3A, L3B }, \ + { L40, L41, L42, L43, L44, L45, L46, L47, L48, L49, L4A, L4B }, \ + { R00, R01, R02, R03, R04, R05,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + {KC_NO, R11, R12, R13, R14, R15,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + { R20, R21, R22, R23, R24, R25,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + { R30,KC_NO, R32,KC_NO, R34, R35,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO } \ } ////////////////////////////////////////////////////////////////////////////// @@ -83,15 +78,15 @@ L40, L41, L42, L43, L44, L45, L46, L47, L48, L49, L4A, L4B \ ) \ { \ - { L00, L01, L02, L03, L04, L05, L06, L07, L08, L09, L0A, L0B,KC_NO,KC_NO }, \ - { L10, L11, L12, L13, L14, L15, L16, L17, L18, L19, L1A, L1B,KC_NO,KC_NO }, \ - { L20, L21, L22, L23, L24, L25, L26, L27, L28, L29, L2A, L2B,KC_NO,KC_NO }, \ - { L30, L31, L32, L33, L34, L35, L36, L37, L38, L39, L3A, L3B,KC_NO,KC_NO }, \ - { L40, L41, L42, L43, L44, L45, L46, L47, L48, L49, L4A, L4B,KC_NO,KC_NO }, \ - {KC_NO, R01,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, R10, R11, R12,KC_NO,KC_NO,KC_NO }, \ - { R20, R21, R22,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ - {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ - {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ - {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO } \ + { L00, L01, L02, L03, L04, L05, L06, L07, L08, L09, L0A, L0B }, \ + { L10, L11, L12, L13, L14, L15, L16, L17, L18, L19, L1A, L1B }, \ + { L20, L21, L22, L23, L24, L25, L26, L27, L28, L29, L2A, L2B }, \ + { L30, L31, L32, L33, L34, L35, L36, L37, L38, L39, L3A, L3B }, \ + { L40, L41, L42, L43, L44, L45, L46, L47, L48, L49, L4A, L4B }, \ + {KC_NO, R01,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + { R10, R11, R12,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + { R20, R21, R22,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO } \ } diff --git a/keyboards/naked60/rev1/rules.mk b/keyboards/naked60/rev1/rules.mk index a71181033383..e69de29bb2d1 100644 --- a/keyboards/naked60/rev1/rules.mk +++ b/keyboards/naked60/rev1/rules.mk @@ -1,3 +0,0 @@ -SRC += matrix.c \ - split_util.c \ - split_scomm.c diff --git a/keyboards/naked60/rev1/serial_config.h b/keyboards/naked60/rev1/serial_config.h deleted file mode 100644 index 37135213d55f..000000000000 --- a/keyboards/naked60/rev1/serial_config.h +++ /dev/null @@ -1,8 +0,0 @@ -//// #error rev2 serial config - -#ifndef SOFT_SERIAL_PIN -/* Soft Serial defines */ -#define SOFT_SERIAL_PIN D2 - -#define SERIAL_USE_MULTI_TRANSACTION -#endif diff --git a/keyboards/naked60/rev1/serial_config_simpleapi.h b/keyboards/naked60/rev1/serial_config_simpleapi.h deleted file mode 100644 index e2d22a41e7bc..000000000000 --- a/keyboards/naked60/rev1/serial_config_simpleapi.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef SERIAL_CONFIG_SIMPLEAPI_H -#define SERIAL_CONFIG_SIMPLEAPI_H - -#undef SERIAL_USE_MULTI_TRANSACTION -#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 -#define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2 - -#endif // SERIAL_CONFIG_SIMPLEAPI_H diff --git a/keyboards/naked60/rev1/split_scomm.c b/keyboards/naked60/rev1/split_scomm.c deleted file mode 100644 index ada7867960b9..000000000000 --- a/keyboards/naked60/rev1/split_scomm.c +++ /dev/null @@ -1,92 +0,0 @@ -#ifdef USE_SERIAL -#ifdef SERIAL_USE_MULTI_TRANSACTION -/* --- USE flexible API (using multi-type transaction function) --- */ - -#include -#include -#include -#include -#include "serial.h" -#ifdef CONSOLE_ENABLE - #include -#endif - -uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; -uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; -uint8_t volatile status_com = 0; -uint8_t volatile status1 = 0; -uint8_t slave_buffer_change_count = 0; -uint8_t s_change_old = 0xff; -uint8_t s_change_new = 0xff; - -SSTD_t transactions[] = { -#define GET_SLAVE_STATUS 0 - /* master buffer not changed, only recive slave_buffer_change_count */ - { (uint8_t *)&status_com, - 0, NULL, - sizeof(slave_buffer_change_count), &slave_buffer_change_count, - }, -#define PUT_MASTER_GET_SLAVE_STATUS 1 - /* master buffer changed need send, and recive slave_buffer_change_count */ - { (uint8_t *)&status_com, - sizeof(serial_master_buffer), (uint8_t *)serial_master_buffer, - sizeof(slave_buffer_change_count), &slave_buffer_change_count, - }, -#define GET_SLAVE_BUFFER 2 - /* recive serial_slave_buffer */ - { (uint8_t *)&status1, - 0, NULL, - sizeof(serial_slave_buffer), (uint8_t *)serial_slave_buffer - } -}; - -void serial_master_init(void) -{ - soft_serial_initiator_init(transactions, TID_LIMIT(transactions)); -} - -void serial_slave_init(void) -{ - soft_serial_target_init(transactions, TID_LIMIT(transactions)); -} - -// 0 => no error -// 1 => slave did not respond -// 2 => checksum error -int serial_update_buffers(int master_update) -{ - int status, smatstatus; - static int need_retry = 0; - - if( s_change_old != s_change_new ) { - smatstatus = soft_serial_transaction(GET_SLAVE_BUFFER); - if( smatstatus == TRANSACTION_END ) { - s_change_old = s_change_new; -#ifdef CONSOLE_ENABLE - uprintf("slave matrix = %b %b %b %b %b\n", - serial_slave_buffer[0], serial_slave_buffer[1], - serial_slave_buffer[2], serial_slave_buffer[3], - serial_slave_buffer[4] ); -#endif - } - } else { - // serial_slave_buffer dosen't change - smatstatus = TRANSACTION_END; // dummy status - } - - if( !master_update && !need_retry) { - status = soft_serial_transaction(GET_SLAVE_STATUS); - } else { - status = soft_serial_transaction(PUT_MASTER_GET_SLAVE_STATUS); - } - if( status == TRANSACTION_END ) { - s_change_new = slave_buffer_change_count; - need_retry = 0; - } else { - need_retry = 1; - } - return smatstatus; -} - -#endif // SERIAL_USE_MULTI_TRANSACTION -#endif /* USE_SERIAL */ diff --git a/keyboards/naked60/rev1/split_scomm.h b/keyboards/naked60/rev1/split_scomm.h deleted file mode 100644 index 537ec4080828..000000000000 --- a/keyboards/naked60/rev1/split_scomm.h +++ /dev/null @@ -1,22 +0,0 @@ -#pragma once - -#ifndef SERIAL_USE_MULTI_TRANSACTION -/* --- USE Simple API (OLD API, compatible with let's split serial.c) --- */ -#include "serial.h" - -#else -/* --- USE flexible API (using multi-type transaction function) --- */ -// Buffers for master - slave communication -#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 -#define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2 - -extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; -extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; -extern uint8_t slave_buffer_change_count; - -void serial_master_init(void); -void serial_slave_init(void); -int serial_update_buffers(int master_changed); - -#endif - diff --git a/keyboards/naked60/rev1/split_util.c b/keyboards/naked60/rev1/split_util.c deleted file mode 100644 index e1ff8b4379dc..000000000000 --- a/keyboards/naked60/rev1/split_util.c +++ /dev/null @@ -1,70 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include "split_util.h" -#include "matrix.h" -#include "keyboard.h" - -#ifdef USE_MATRIX_I2C -# include "i2c.h" -#else -# include "split_scomm.h" -#endif - -volatile bool isLeftHand = true; - -static void setup_handedness(void) { - #ifdef EE_HANDS - isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS); - #else - // I2C_MASTER_RIGHT is deprecated, use MASTER_RIGHT instead, since this works for both serial and i2c - #if defined(I2C_MASTER_RIGHT) || defined(MASTER_RIGHT) - isLeftHand = !has_usb(); - #else - isLeftHand = has_usb(); - #endif - #endif -} - -static void keyboard_master_setup(void) { - -#ifdef USE_MATRIX_I2C - i2c_master_init(); -#else - serial_master_init(); -#endif -} - -static void keyboard_slave_setup(void) { - -#ifdef USE_MATRIX_I2C - i2c_slave_init(SLAVE_I2C_ADDRESS); -#else - serial_slave_init(); -#endif -} - -bool has_usb(void) { - USBCON |= (1 << OTGPADE); //enables VBUS pad - _delay_us(5); - return (USBSTA & (1< -#include "eeconfig.h" - -#define SLAVE_I2C_ADDRESS 0x32 - -extern volatile bool isLeftHand; - -// slave version of matix scan, defined in matrix.c -void matrix_slave_scan(void); - -void split_keyboard_setup(void); -bool has_usb(void); - -void matrix_master_OLED_init (void); diff --git a/keyboards/naked60/rules.mk b/keyboards/naked60/rules.mk index fc2fe3032049..22dbd509ba6a 100644 --- a/keyboards/naked60/rules.mk +++ b/keyboards/naked60/rules.mk @@ -1,5 +1,3 @@ -QUANTUM_LIB_SRC += serial.c - # MCU name MCU = atmega32u4 @@ -19,9 +17,9 @@ BOOTLOADER = caterina # BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration +COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls @@ -30,11 +28,11 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. TAP_DANCE_ENABLE = yes -SUBPROJECT_rev1 = no +OLED_DRIVER_ENABLE = no USE_I2C = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -CUSTOM_MATRIX = yes +SPLIT_KEYBOARD = yes DEFAULT_FOLDER = naked60/rev1 diff --git a/keyboards/naked60/serial.c b/keyboards/naked60/serial.c deleted file mode 100644 index 6006ebf1bdb2..000000000000 --- a/keyboards/naked60/serial.c +++ /dev/null @@ -1,590 +0,0 @@ -/* - * WARNING: be careful changing this code, it is very timing dependent - * - * 2018-10-28 checked - * avr-gcc 4.9.2 - * avr-gcc 5.4.0 - * avr-gcc 7.3.0 - */ - -#ifndef F_CPU -#define F_CPU 16000000 -#endif - -#include -#include -#include -#include -#include -#include "serial.h" -//#include - -#ifdef SOFT_SERIAL_PIN - -#ifdef __AVR_ATmega32U4__ - // if using ATmega32U4 I2C, can not use PD0 and PD1 in soft serial. - #ifdef USE_I2C - #if SOFT_SERIAL_PIN == D0 || SOFT_SERIAL_PIN == D1 - #error Using ATmega32U4 I2C, so can not use PD0, PD1 - #endif - #endif - - #if SOFT_SERIAL_PIN >= D0 && SOFT_SERIAL_PIN <= D3 - #define SERIAL_PIN_DDR DDRD - #define SERIAL_PIN_PORT PORTD - #define SERIAL_PIN_INPUT PIND - #if SOFT_SERIAL_PIN == D0 - #define SERIAL_PIN_MASK _BV(PD0) - #define EIMSK_BIT _BV(INT0) - #define EICRx_BIT (~(_BV(ISC00) | _BV(ISC01))) - #define SERIAL_PIN_INTERRUPT INT0_vect - #elif SOFT_SERIAL_PIN == D1 - #define SERIAL_PIN_MASK _BV(PD1) - #define EIMSK_BIT _BV(INT1) - #define EICRx_BIT (~(_BV(ISC10) | _BV(ISC11))) - #define SERIAL_PIN_INTERRUPT INT1_vect - #elif SOFT_SERIAL_PIN == D2 - #define SERIAL_PIN_MASK _BV(PD2) - #define EIMSK_BIT _BV(INT2) - #define EICRx_BIT (~(_BV(ISC20) | _BV(ISC21))) - #define SERIAL_PIN_INTERRUPT INT2_vect - #elif SOFT_SERIAL_PIN == D3 - #define SERIAL_PIN_MASK _BV(PD3) - #define EIMSK_BIT _BV(INT3) - #define EICRx_BIT (~(_BV(ISC30) | _BV(ISC31))) - #define SERIAL_PIN_INTERRUPT INT3_vect - #endif - #elif SOFT_SERIAL_PIN == E6 - #define SERIAL_PIN_DDR DDRE - #define SERIAL_PIN_PORT PORTE - #define SERIAL_PIN_INPUT PINE - #define SERIAL_PIN_MASK _BV(PE6) - #define EIMSK_BIT _BV(INT6) - #define EICRx_BIT (~(_BV(ISC60) | _BV(ISC61))) - #define SERIAL_PIN_INTERRUPT INT6_vect - #else - #error invalid SOFT_SERIAL_PIN value - #endif - -#else - #error serial.c now support ATmega32U4 only -#endif - -//////////////// for backward compatibility //////////////////////////////// -#if !defined(SERIAL_USE_SINGLE_TRANSACTION) && !defined(SERIAL_USE_MULTI_TRANSACTION) -/* --- USE OLD API (compatible with let's split serial.c) */ - #if SERIAL_SLAVE_BUFFER_LENGTH > 0 - uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; - #endif - #if SERIAL_MASTER_BUFFER_LENGTH > 0 - uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; - #endif - uint8_t volatile status0 = 0; - -SSTD_t transactions[] = { - { (uint8_t *)&status0, - #if SERIAL_MASTER_BUFFER_LENGTH > 0 - sizeof(serial_master_buffer), (uint8_t *)serial_master_buffer, - #else - 0, (uint8_t *)NULL, - #endif - #if SERIAL_SLAVE_BUFFER_LENGTH > 0 - sizeof(serial_slave_buffer), (uint8_t *)serial_slave_buffer - #else - 0, (uint8_t *)NULL, - #endif - } -}; - -void serial_master_init(void) -{ soft_serial_initiator_init(transactions, TID_LIMIT(transactions)); } - -void serial_slave_init(void) -{ soft_serial_target_init(transactions, TID_LIMIT(transactions)); } - -// 0 => no error -// 1 => slave did not respond -// 2 => checksum error -int serial_update_buffers() -{ - int result; - result = soft_serial_transaction(); - return result; -} - -#endif // end of OLD API (compatible with let's split serial.c) -//////////////////////////////////////////////////////////////////////////// - -#define ALWAYS_INLINE __attribute__((always_inline)) -#define NO_INLINE __attribute__((noinline)) -#define _delay_sub_us(x) __builtin_avr_delay_cycles(x) - -// parity check -#define ODD_PARITY 1 -#define EVEN_PARITY 0 -#define PARITY EVEN_PARITY - -#ifdef SERIAL_DELAY - // custom setup in config.h - // #define TID_SEND_ADJUST 2 - // #define SERIAL_DELAY 6 // micro sec - // #define READ_WRITE_START_ADJUST 30 // cycles - // #define READ_WRITE_WIDTH_ADJUST 8 // cycles -#else -// ============ Standard setups ============ - -#ifndef SELECT_SOFT_SERIAL_SPEED -#define SELECT_SOFT_SERIAL_SPEED 1 -// 0: about 189kbps -// 1: about 137kbps (default) -// 2: about 75kbps -// 3: about 39kbps -// 4: about 26kbps -// 5: about 20kbps -#endif - -#if __GNUC__ < 6 - #define TID_SEND_ADJUST 14 -#else - #define TID_SEND_ADJUST 2 -#endif - -#if SELECT_SOFT_SERIAL_SPEED == 0 - // Very High speed - #define SERIAL_DELAY 4 // micro sec - #if __GNUC__ < 6 - #define READ_WRITE_START_ADJUST 33 // cycles - #define READ_WRITE_WIDTH_ADJUST 3 // cycles - #else - #define READ_WRITE_START_ADJUST 34 // cycles - #define READ_WRITE_WIDTH_ADJUST 7 // cycles - #endif -#elif SELECT_SOFT_SERIAL_SPEED == 1 - // High speed - #define SERIAL_DELAY 6 // micro sec - #if __GNUC__ < 6 - #define READ_WRITE_START_ADJUST 30 // cycles - #define READ_WRITE_WIDTH_ADJUST 3 // cycles - #else - #define READ_WRITE_START_ADJUST 33 // cycles - #define READ_WRITE_WIDTH_ADJUST 7 // cycles - #endif -#elif SELECT_SOFT_SERIAL_SPEED == 2 - // Middle speed - #define SERIAL_DELAY 12 // micro sec - #define READ_WRITE_START_ADJUST 30 // cycles - #if __GNUC__ < 6 - #define READ_WRITE_WIDTH_ADJUST 3 // cycles - #else - #define READ_WRITE_WIDTH_ADJUST 7 // cycles - #endif -#elif SELECT_SOFT_SERIAL_SPEED == 3 - // Low speed - #define SERIAL_DELAY 24 // micro sec - #define READ_WRITE_START_ADJUST 30 // cycles - #if __GNUC__ < 6 - #define READ_WRITE_WIDTH_ADJUST 3 // cycles - #else - #define READ_WRITE_WIDTH_ADJUST 7 // cycles - #endif -#elif SELECT_SOFT_SERIAL_SPEED == 4 - // Very Low speed - #define SERIAL_DELAY 36 // micro sec - #define READ_WRITE_START_ADJUST 30 // cycles - #if __GNUC__ < 6 - #define READ_WRITE_WIDTH_ADJUST 3 // cycles - #else - #define READ_WRITE_WIDTH_ADJUST 7 // cycles - #endif -#elif SELECT_SOFT_SERIAL_SPEED == 5 - // Ultra Low speed - #define SERIAL_DELAY 48 // micro sec - #define READ_WRITE_START_ADJUST 30 // cycles - #if __GNUC__ < 6 - #define READ_WRITE_WIDTH_ADJUST 3 // cycles - #else - #define READ_WRITE_WIDTH_ADJUST 7 // cycles - #endif -#else -#error invalid SELECT_SOFT_SERIAL_SPEED value -#endif /* SELECT_SOFT_SERIAL_SPEED */ -#endif /* SERIAL_DELAY */ - -#define SERIAL_DELAY_HALF1 (SERIAL_DELAY/2) -#define SERIAL_DELAY_HALF2 (SERIAL_DELAY - SERIAL_DELAY/2) - -#define SLAVE_INT_WIDTH_US 1 -#ifndef SERIAL_USE_MULTI_TRANSACTION - #define SLAVE_INT_RESPONSE_TIME SERIAL_DELAY -#else - #define SLAVE_INT_ACK_WIDTH_UNIT 2 - #define SLAVE_INT_ACK_WIDTH 4 -#endif - -static SSTD_t *Transaction_table = NULL; -static uint8_t Transaction_table_size = 0; - -inline static void serial_delay(void) ALWAYS_INLINE; -inline static -void serial_delay(void) { - _delay_us(SERIAL_DELAY); -} - -inline static void serial_delay_half1(void) ALWAYS_INLINE; -inline static -void serial_delay_half1(void) { - _delay_us(SERIAL_DELAY_HALF1); -} - -inline static void serial_delay_half2(void) ALWAYS_INLINE; -inline static -void serial_delay_half2(void) { - _delay_us(SERIAL_DELAY_HALF2); -} - -inline static void serial_output(void) ALWAYS_INLINE; -inline static -void serial_output(void) { - SERIAL_PIN_DDR |= SERIAL_PIN_MASK; -} - -// make the serial pin an input with pull-up resistor -inline static void serial_input_with_pullup(void) ALWAYS_INLINE; -inline static -void serial_input_with_pullup(void) { - SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK; - SERIAL_PIN_PORT |= SERIAL_PIN_MASK; -} - -inline static uint8_t serial_read_pin(void) ALWAYS_INLINE; -inline static -uint8_t serial_read_pin(void) { - return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK); -} - -inline static void serial_low(void) ALWAYS_INLINE; -inline static -void serial_low(void) { - SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK; -} - -inline static void serial_high(void) ALWAYS_INLINE; -inline static -void serial_high(void) { - SERIAL_PIN_PORT |= SERIAL_PIN_MASK; -} - -void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size) -{ - Transaction_table = sstd_table; - Transaction_table_size = (uint8_t)sstd_table_size; - serial_output(); - serial_high(); -} - -void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size) -{ - Transaction_table = sstd_table; - Transaction_table_size = (uint8_t)sstd_table_size; - serial_input_with_pullup(); - - // Enable INT0-INT3,INT6 - EIMSK |= EIMSK_BIT; -#if SERIAL_PIN_MASK == _BV(PE6) - // Trigger on falling edge of INT6 - EICRB &= EICRx_BIT; -#else - // Trigger on falling edge of INT0-INT3 - EICRA &= EICRx_BIT; -#endif -} - -// Used by the sender to synchronize timing with the reciver. -static void sync_recv(void) NO_INLINE; -static -void sync_recv(void) { - for (uint8_t i = 0; i < SERIAL_DELAY*5 && serial_read_pin(); i++ ) { - } - // This shouldn't hang if the target disconnects because the - // serial line will float to high if the target does disconnect. - while (!serial_read_pin()); -} - -// Used by the reciver to send a synchronization signal to the sender. -static void sync_send(void) NO_INLINE; -static -void sync_send(void) { - serial_low(); - serial_delay(); - serial_high(); -} - -// Reads a byte from the serial line -static uint8_t serial_read_chunk(uint8_t *pterrcount, uint8_t bit) NO_INLINE; -static uint8_t serial_read_chunk(uint8_t *pterrcount, uint8_t bit) { - uint8_t byte, i, p, pb; - - _delay_sub_us(READ_WRITE_START_ADJUST); - for( i = 0, byte = 0, p = PARITY; i < bit; i++ ) { - serial_delay_half1(); // read the middle of pulses - if( serial_read_pin() ) { - byte = (byte << 1) | 1; p ^= 1; - } else { - byte = (byte << 1) | 0; p ^= 0; - } - _delay_sub_us(READ_WRITE_WIDTH_ADJUST); - serial_delay_half2(); - } - /* recive parity bit */ - serial_delay_half1(); // read the middle of pulses - pb = serial_read_pin(); - _delay_sub_us(READ_WRITE_WIDTH_ADJUST); - serial_delay_half2(); - - *pterrcount += (p != pb)? 1 : 0; - - return byte; -} - -// Sends a byte with MSB ordering -void serial_write_chunk(uint8_t data, uint8_t bit) NO_INLINE; -void serial_write_chunk(uint8_t data, uint8_t bit) { - uint8_t b, p; - for( p = PARITY, b = 1<<(bit-1); b ; b >>= 1) { - if(data & b) { - serial_high(); p ^= 1; - } else { - serial_low(); p ^= 0; - } - serial_delay(); - } - /* send parity bit */ - if(p & 1) { serial_high(); } - else { serial_low(); } - serial_delay(); - - serial_low(); // sync_send() / senc_recv() need raise edge -} - -static void serial_send_packet(uint8_t *buffer, uint8_t size) NO_INLINE; -static -void serial_send_packet(uint8_t *buffer, uint8_t size) { - for (uint8_t i = 0; i < size; ++i) { - uint8_t data; - data = buffer[i]; - sync_send(); - serial_write_chunk(data,8); - } -} - -static uint8_t serial_recive_packet(uint8_t *buffer, uint8_t size) NO_INLINE; -static -uint8_t serial_recive_packet(uint8_t *buffer, uint8_t size) { - uint8_t pecount = 0; - for (uint8_t i = 0; i < size; ++i) { - uint8_t data; - sync_recv(); - data = serial_read_chunk(&pecount, 8); - buffer[i] = data; - } - return pecount == 0; -} - -inline static -void change_sender2reciver(void) { - sync_send(); //0 - serial_delay_half1(); //1 - serial_low(); //2 - serial_input_with_pullup(); //2 - serial_delay_half1(); //3 -} - -inline static -void change_reciver2sender(void) { - sync_recv(); //0 - serial_delay(); //1 - serial_low(); //3 - serial_output(); //3 - serial_delay_half1(); //4 -} - -static inline uint8_t nibble_bits_count(uint8_t bits) -{ - bits = (bits & 0x5) + (bits >> 1 & 0x5); - bits = (bits & 0x3) + (bits >> 2 & 0x3); - return bits; -} - -// interrupt handle to be used by the target device -ISR(SERIAL_PIN_INTERRUPT) { - -#ifndef SERIAL_USE_MULTI_TRANSACTION - serial_low(); - serial_output(); - SSTD_t *trans = Transaction_table; -#else - // recive transaction table index - uint8_t tid, bits; - uint8_t pecount = 0; - sync_recv(); - bits = serial_read_chunk(&pecount,7); - tid = bits>>3; - bits = (bits&7) != nibble_bits_count(tid); - if( bits || pecount> 0 || tid > Transaction_table_size ) { - return; - } - serial_delay_half1(); - - serial_high(); // response step1 low->high - serial_output(); - _delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT*SLAVE_INT_ACK_WIDTH); - SSTD_t *trans = &Transaction_table[tid]; - serial_low(); // response step2 ack high->low -#endif - - // target send phase - if( trans->target2initiator_buffer_size > 0 ) - serial_send_packet((uint8_t *)trans->target2initiator_buffer, - trans->target2initiator_buffer_size); - // target switch to input - change_sender2reciver(); - - // target recive phase - if( trans->initiator2target_buffer_size > 0 ) { - if (serial_recive_packet((uint8_t *)trans->initiator2target_buffer, - trans->initiator2target_buffer_size) ) { - *trans->status = TRANSACTION_ACCEPTED; - } else { - *trans->status = TRANSACTION_DATA_ERROR; - } - } else { - *trans->status = TRANSACTION_ACCEPTED; - } - - sync_recv(); //weit initiator output to high -} - -///////// -// start transaction by initiator -// -// int soft_serial_transaction(int sstd_index) -// -// Returns: -// TRANSACTION_END -// TRANSACTION_NO_RESPONSE -// TRANSACTION_DATA_ERROR -// this code is very time dependent, so we need to disable interrupts -#ifndef SERIAL_USE_MULTI_TRANSACTION -int soft_serial_transaction(void) { - SSTD_t *trans = Transaction_table; -#else -int soft_serial_transaction(int sstd_index) { - if( sstd_index > Transaction_table_size ) - return TRANSACTION_TYPE_ERROR; - SSTD_t *trans = &Transaction_table[sstd_index]; -#endif - cli(); - - // signal to the target that we want to start a transaction - serial_output(); - serial_low(); - _delay_us(SLAVE_INT_WIDTH_US); - -#ifndef SERIAL_USE_MULTI_TRANSACTION - // wait for the target response - serial_input_with_pullup(); - _delay_us(SLAVE_INT_RESPONSE_TIME); - - // check if the target is present - if (serial_read_pin()) { - // target failed to pull the line low, assume not present - serial_output(); - serial_high(); - *trans->status = TRANSACTION_NO_RESPONSE; - sei(); - return TRANSACTION_NO_RESPONSE; - } - -#else - // send transaction table index - int tid = (sstd_index<<3) | (7 & nibble_bits_count(sstd_index)); - sync_send(); - _delay_sub_us(TID_SEND_ADJUST); - serial_write_chunk(tid, 7); - serial_delay_half1(); - - // wait for the target response (step1 low->high) - serial_input_with_pullup(); - while( !serial_read_pin() ) { - _delay_sub_us(2); - } - - // check if the target is present (step2 high->low) - for( int i = 0; serial_read_pin(); i++ ) { - if (i > SLAVE_INT_ACK_WIDTH + 1) { - // slave failed to pull the line low, assume not present - serial_output(); - serial_high(); - *trans->status = TRANSACTION_NO_RESPONSE; - sei(); - return TRANSACTION_NO_RESPONSE; - } - _delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT); - } -#endif - - // initiator recive phase - // if the target is present syncronize with it - if( trans->target2initiator_buffer_size > 0 ) { - if (!serial_recive_packet((uint8_t *)trans->target2initiator_buffer, - trans->target2initiator_buffer_size) ) { - serial_output(); - serial_high(); - *trans->status = TRANSACTION_DATA_ERROR; - sei(); - return TRANSACTION_DATA_ERROR; - } - } - - // initiator switch to output - change_reciver2sender(); - - // initiator send phase - if( trans->initiator2target_buffer_size > 0 ) { - serial_send_packet((uint8_t *)trans->initiator2target_buffer, - trans->initiator2target_buffer_size); - } - - // always, release the line when not in use - sync_send(); - - *trans->status = TRANSACTION_END; - sei(); - return TRANSACTION_END; -} - -#ifdef SERIAL_USE_MULTI_TRANSACTION -int soft_serial_get_and_clean_status(int sstd_index) { - SSTD_t *trans = &Transaction_table[sstd_index]; - cli(); - int retval = *trans->status; - *trans->status = 0;; - sei(); - return retval; -} -#endif - -#endif - -// Helix serial.c history -// 2018-1-29 fork from let's split and add PD2, modify sync_recv() (#2308, bceffdefc) -// 2018-6-28 bug fix master to slave comm and speed up (#3255, 1038bbef4) -// (adjusted with avr-gcc 4.9.2) -// 2018-7-13 remove USE_SERIAL_PD2 macro (#3374, f30d6dd78) -// (adjusted with avr-gcc 4.9.2) -// 2018-8-11 add support multi-type transaction (#3608, feb5e4aae) -// (adjusted with avr-gcc 4.9.2) -// 2018-10-21 fix serial and RGB animation conflict (#4191, 4665e4fff) -// (adjusted with avr-gcc 7.3.0) -// 2018-10-28 re-adjust compiler depend value of delay (#4269, 8517f8a66) -// (adjusted with avr-gcc 5.4.0, 7.3.0) diff --git a/keyboards/naked60/serial.h b/keyboards/naked60/serial.h deleted file mode 100644 index 5deaf789e30c..000000000000 --- a/keyboards/naked60/serial.h +++ /dev/null @@ -1,86 +0,0 @@ -#pragma once - -#include - -// ///////////////////////////////////////////////////////////////// -// Need Soft Serial defines in config.h -// ///////////////////////////////////////////////////////////////// -// ex. -// #define SOFT_SERIAL_PIN ?? // ?? = D0,D1,D2,D3,E6 -// OPTIONAL: #define SELECT_SOFT_SERIAL_SPEED ? // ? = 1,2,3,4,5 -// // 1: about 137kbps (default) -// // 2: about 75kbps -// // 3: about 39kbps -// // 4: about 26kbps -// // 5: about 20kbps -// -// //// USE OLD API (compatible with let's split serial.c) -// ex. -// #define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 -// #define SERIAL_MASTER_BUFFER_LENGTH 1 -// -// //// USE NEW API -// //// USE simple API (using signle-type transaction function) -// #define SERIAL_USE_SINGLE_TRANSACTION -// //// USE flexible API (using multi-type transaction function) -// #define SERIAL_USE_MULTI_TRANSACTION -// -// ///////////////////////////////////////////////////////////////// - - -//////////////// for backward compatibility //////////////////////////////// -#if !defined(SERIAL_USE_SINGLE_TRANSACTION) && !defined(SERIAL_USE_MULTI_TRANSACTION) -/* --- USE OLD API (compatible with let's split serial.c) */ - #if SERIAL_SLAVE_BUFFER_LENGTH > 0 - extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; - #endif - #if SERIAL_MASTER_BUFFER_LENGTH > 0 - extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; - #endif - - void serial_master_init(void); - void serial_slave_init(void); - int serial_update_buffers(void); - -#endif // end of USE OLD API -//////////////////////////////////////////////////////////////////////////// - -// Soft Serial Transaction Descriptor -typedef struct _SSTD_t { - uint8_t *status; - uint8_t initiator2target_buffer_size; - uint8_t *initiator2target_buffer; - uint8_t target2initiator_buffer_size; - uint8_t *target2initiator_buffer; -} SSTD_t; -#define TID_LIMIT( table ) (sizeof(table) / sizeof(SSTD_t)) - -// initiator is transaction start side -void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size); -// target is interrupt accept side -void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size); - -// initiator resullt -#define TRANSACTION_END 0 -#define TRANSACTION_NO_RESPONSE 0x1 -#define TRANSACTION_DATA_ERROR 0x2 -#define TRANSACTION_TYPE_ERROR 0x4 -#ifndef SERIAL_USE_MULTI_TRANSACTION -int soft_serial_transaction(void); -#else -int soft_serial_transaction(int sstd_index); -#endif - -// target status -// *SSTD_t.status has -// initiator: -// TRANSACTION_END -// or TRANSACTION_NO_RESPONSE -// or TRANSACTION_DATA_ERROR -// target: -// TRANSACTION_DATA_ERROR -// or TRANSACTION_ACCEPTED -#define TRANSACTION_ACCEPTED 0x8 -#ifdef SERIAL_USE_MULTI_TRANSACTION -int soft_serial_get_and_clean_status(int sstd_index); -#endif From c8fd0156186ed08f88ff73a73c00a58004bf217a Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Tue, 22 Oct 2019 10:59:56 -0700 Subject: [PATCH 160/316] [Keyboard] Owlet60 Updates (#7103) * Owlet60 updates Co-Authored-By: noroadsleft * fix url in info.json --- keyboards/handwired/owlet60/info.json | 24 ++++-- .../owlet60/keymaps/default/keymap.c | 2 +- .../handwired/owlet60/keymaps/irham/config.h | 19 +++++ .../handwired/owlet60/keymaps/irham/keymap.c | 74 +++++++++++++++++++ .../handwired/owlet60/keymaps/irham/readme.md | 1 + .../owlet60/keymaps/oled_testing/keymap.c | 5 +- keyboards/handwired/owlet60/owlet60.h | 39 +++++++++- 7 files changed, 153 insertions(+), 11 deletions(-) create mode 100644 keyboards/handwired/owlet60/keymaps/irham/config.h create mode 100644 keyboards/handwired/owlet60/keymaps/irham/keymap.c create mode 100644 keyboards/handwired/owlet60/keymaps/irham/readme.md diff --git a/keyboards/handwired/owlet60/info.json b/keyboards/handwired/owlet60/info.json index ea9437ee7c43..6e5345c337cc 100644 --- a/keyboards/handwired/owlet60/info.json +++ b/keyboards/handwired/owlet60/info.json @@ -1,13 +1,25 @@ -{"keyboard_name": "Owlet60", - "url": "https://https://qmk.fm/keyboards/", - "maintainer": "qmk", - "width": 19.5, +{ + "keyboard_name": "Owlet60", + "url": "/~https://github.com/qmk/qmk_firmware/tree/master/keyboards/handwired/owlet60/", + "maintainer": "worthlessowl", + "width": 19, "height": 5, "layouts": { "LAYOUT_owlet60_full_bsp": { + "key_count": 71, + "layout": [{"label":"F1", "x":0.5, "y":0}, {"label":"~", "x":1.75, "y":0}, {"label":"!", "x":2.75, "y":0}, {"label":"@", "x":3.75, "y":0}, {"label":"#", "x":4.75, "y":0}, {"label":"$", "x":5.75, "y":0}, {"label":"%", "x":6.75, "y":0}, {"label":"^", "x":7.75, "y":0}, {"label":"&", "x":9.25, "y":0}, {"label":"*", "x":10.25, "y":0}, {"label":"(", "x":11.25, "y":0}, {"label":")", "x":12.25, "y":0}, {"label":"_", "x":13.25, "y":0}, {"label":"+", "x":14.25, "y":0}, {"label":"Backspace", "x":15.25, "y":0, "w":2}, {"label":"PgUp", "x":17.25, "y":0}, {"label":"F2", "x":0.25, "y":1}, {"label":"Tab", "x":1.5, "y":1, "w":1.5}, {"label":"Q", "x":3, "y":1}, {"label":"W", "x":4, "y":1}, {"label":"E", "x":5, "y":1}, {"label":"R", "x":6, "y":1}, {"label":"T", "x":7, "y":1}, {"label":"Y", "x":9, "y":1}, {"label":"U", "x":10, "y":1}, {"label":"I", "x":11, "y":1}, {"label":"O", "x":12, "y":1}, {"label":"P", "x":13, "y":1}, {"label":"{", "x":14, "y":1}, {"label":"}", "x":15, "y":1}, {"label":"|", "x":16, "y":1, "w":1.5}, {"label":"PgDn", "x":17.5, "y":1}, {"label":"F3", "x":0, "y":2}, {"label":"Caps Lock", "x":1.25, "y":2, "w":1.75}, {"label":"A", "x":3, "y":2}, {"label":"S", "x":4, "y":2}, {"label":"D", "x":5, "y":2}, {"label":"F", "x":6, "y":2}, {"label":"G", "x":7, "y":2}, {"label":"H", "x":9.5, "y":2}, {"label":"J", "x":10.5, "y":2}, {"label":"K", "x":11.5, "y":2}, {"label":"L", "x":12.5, "y":2}, {"label":":", "x":13.5, "y":2}, {"label":"\"", "x":14.5, "y":2}, {"label":"Enter", "x":15.5, "y":2, "w":2.25}, {"label":"Home", "x":17.75, "y":2}, {"label":"Shift", "x":1, "y":3, "w":2.25}, {"label":"Z", "x":3.25, "y":3}, {"label":"X", "x":4.25, "y":3}, {"label":"C", "x":5.25, "y":3}, {"label":"V", "x":6.25, "y":3}, {"label":"B", "x":7.25, "y":3}, {"label":"B", "x":9.25, "y":3}, {"label":"N", "x":10.25, "y":3}, {"label":"M", "x":11.25, "y":3}, {"label":"<", "x":12.25, "y":3}, {"label":">", "x":13.25, "y":3}, {"label":"?", "x":14.25, "y":3}, {"label":"Shift", "x":15.25, "y":3, "w":1.75}, {"label":"Up", "x":17, "y":3}, {"label":"End", "x":18, "y":3}, {"label":"Ctrl", "x":1, "y":4, "w":1.5}, {"label":"Alt", "x":3.5, "y":4, "w":1.5}, {"x":5, "y":4, "w":2.25}, {"label":"Super", "x":7.25, "y":4, "w":1.25}, {"x":9.25, "y":4, "w":2}, {"label":"Alt", "x":11.25, "y":4, "w":1.5}, {"label":"Left", "x":16, "y":4}, {"label":"Down", "x":17, "y":4}, {"label":"Right", "x":18, "y":4}] + }, + "LAYOUT_owlet60_split_bsp": { "key_count": 72, - "layout": [{"label":"1", "x":0.5, "y":0}, {"label":"~", "x":2, "y":0}, {"label":"!", "x":3, "y":0}, {"label":"@", "x":4, "y":0}, {"label":"#", "x":5, "y":0}, {"label":"$", "x":6, "y":0}, {"label":"%", "x":7, "y":0}, {"label":"^", "x":8, "y":0}, {"label":"&", "x":9.75, "y":0}, {"label":"*", "x":10.75, "y":0}, {"label":"(", "x":11.75, "y":0}, {"label":")", "x":12.75, "y":0}, {"label":"_", "x":13.75, "y":0}, {"label":"+", "x":14.75, "y":0}, {"label":"Backspace", "x":15.75, "y":0, "w":2}, {"label":"PgUp", "x":17.75, "y":0}, {"label":"2", "x":0.25, "y":1}, {"label":"Tab", "x":1.75, "y":1, "w":1.5}, {"label":"Q", "x":3.25, "y":1}, {"label":"W", "x":4.25, "y":1}, {"label":"E", "x":5.25, "y":1}, {"label":"R", "x":6.25, "y":1}, {"label":"T", "x":7.25, "y":1}, {"label":"Y", "x":9.5, "y":1}, {"label":"U", "x":10.5, "y":1}, {"label":"I", "x":11.5, "y":1}, {"label":"O", "x":12.5, "y":1}, {"label":"P", "x":13.5, "y":1}, {"label":"{", "x":14.5, "y":1}, {"label":"}", "x":15.5, "y":1}, {"label":"|", "x":16.5, "y":1, "w":1.5}, {"label":"PgDn", "x":18, "y":1}, {"label":"3", "x":0, "y":2}, {"label":"Caps Lock", "x":1.5, "y":2, "w":1.75}, {"label":"A", "x":3.25, "y":2}, {"label":"S", "x":4.25, "y":2}, {"label":"D", "x":5.25, "y":2}, {"label":"F", "x":6.25, "y":2}, {"label":"G", "x":7.25, "y":2}, {"label":"H", "x":10, "y":2}, {"label":"J", "x":11, "y":2}, {"label":"K", "x":12, "y":2}, {"label":"L", "x":13, "y":2}, {"label":":", "x":14, "y":2}, {"label":"\"", "x":15, "y":2}, {"label":"Enter", "x":16, "y":2, "w":2.25}, {"label":"Home", "x":18.25, "y":2}, {"label":"Shift", "x":1.25, "y":3, "w":2.25}, {"label":"Z", "x":3.5, "y":3}, {"label":"X", "x":4.5, "y":3}, {"label":"C", "x":5.5, "y":3}, {"label":"V", "x":6.5, "y":3}, {"label":"B", "x":7.5, "y":3}, {"label":"B", "x":9.75, "y":3}, {"label":"N", "x":10.75, "y":3}, {"label":"M", "x":11.75, "y":3}, {"label":"<", "x":12.75, "y":3}, {"label":">", "x":13.75, "y":3}, {"label":"?", "x":14.75, "y":3}, {"label":"Shift", "x":15.75, "y":3, "w":1.75}, {"label":"Up", "x":17.5, "y":3}, {"label":"End", "x":18.5, "y":3}, {"label":"Ctrl", "x":1.25, "y":4, "w":1.5}, {"label":"Alt", "x":4.5, "y":4, "w":1.5}, {"x":6, "y":4, "w":2}, {"label":"Fn", "x":8, "y":4, "w":1.25}, {"x":9.75, "y":4, "w":2.75}, {"label":"Alt", "x":12.5, "y":4, "w":1.5}, {"label":"Left", "x":16.5, "y":4}, {"label":"Down", "x":17.5, "y":4}, {"label":"Right", "x":18.5, "y":4}] + "layout": [{"label":"F1", "x":0.5, "y":0}, {"label":"~", "x":1.75, "y":0}, {"label":"!", "x":2.75, "y":0}, {"label":"@", "x":3.75, "y":0}, {"label":"#", "x":4.75, "y":0}, {"label":"$", "x":5.75, "y":0}, {"label":"%", "x":6.75, "y":0}, {"label":"^", "x":7.75, "y":0}, {"label":"&", "x":9.25, "y":0}, {"label":"*", "x":10.25, "y":0}, {"label":"(", "x":11.25, "y":0}, {"label":")", "x":12.25, "y":0}, {"label":"_", "x":13.25, "y":0}, {"label":"+", "x":14.25, "y":0}, {"label":"Bsp", "x":15.25, "y":0}, {"label":"Del", "x":16.25, "y":0}, {"label":"PgUp", "x":17.25, "y":0}, {"label":"F2", "x":0.25, "y":1}, {"label":"Tab", "x":1.5, "y":1, "w":1.5}, {"label":"Q", "x":3, "y":1}, {"label":"W", "x":4, "y":1}, {"label":"E", "x":5, "y":1}, {"label":"R", "x":6, "y":1}, {"label":"T", "x":7, "y":1}, {"label":"Y", "x":9, "y":1}, {"label":"U", "x":10, "y":1}, {"label":"I", "x":11, "y":1}, {"label":"O", "x":12, "y":1}, {"label":"P", "x":13, "y":1}, {"label":"{", "x":14, "y":1}, {"label":"}", "x":15, "y":1}, {"label":"|", "x":16, "y":1, "w":1.5}, {"label":"PgDn", "x":17.5, "y":1}, {"label":"F3", "x":0, "y":2}, {"label":"Caps Lock", "x":1.25, "y":2, "w":1.75}, {"label":"A", "x":3, "y":2}, {"label":"S", "x":4, "y":2}, {"label":"D", "x":5, "y":2}, {"label":"F", "x":6, "y":2}, {"label":"G", "x":7, "y":2}, {"label":"H", "x":9.5, "y":2}, {"label":"J", "x":10.5, "y":2}, {"label":"K", "x":11.5, "y":2}, {"label":"L", "x":12.5, "y":2}, {"label":":", "x":13.5, "y":2}, {"label":"\"", "x":14.5, "y":2}, {"label":"Enter", "x":15.5, "y":2, "w":2.25}, {"label":"Home", "x":17.75, "y":2}, {"label":"Shift", "x":1, "y":3, "w":2.25}, {"label":"Z", "x":3.25, "y":3}, {"label":"X", "x":4.25, "y":3}, {"label":"C", "x":5.25, "y":3}, {"label":"V", "x":6.25, "y":3}, {"label":"B", "x":7.25, "y":3}, {"label":"B", "x":9.25, "y":3}, {"label":"N", "x":10.25, "y":3}, {"label":"M", "x":11.25, "y":3}, {"label":"<", "x":12.25, "y":3}, {"label":">", "x":13.25, "y":3}, {"label":"?", "x":14.25, "y":3}, {"label":"Shift", "x":15.25, "y":3, "w":1.75}, {"label":"Up", "x":17, "y":3}, {"label":"End", "x":18, "y":3}, {"label":"Ctrl", "x":1, "y":4, "w":1.5}, {"label":"Alt", "x":3.5, "y":4, "w":1.5}, {"x":5, "y":4, "w":2.25}, {"label":"Super", "x":7.25, "y":4, "w":1.25}, {"x":9.25, "y":4, "w":2}, {"label":"Alt", "x":11.25, "y":4, "w":1.5}, {"label":"Left", "x":16, "y":4}, {"label":"Down", "x":17, "y":4}, {"label":"Right", "x":18, "y":4}] + }, + "LAYOUT_owlet60_60_percent_split_bsp": { + "key_count": 66, + "layout": [{"label":"F1", "x":0.5, "y":0}, {"label":"~", "x":1.75, "y":0}, {"label":"!", "x":2.75, "y":0}, {"label":"@", "x":3.75, "y":0}, {"label":"#", "x":4.75, "y":0}, {"label":"$", "x":5.75, "y":0}, {"label":"%", "x":6.75, "y":0}, {"label":"^", "x":7.75, "y":0}, {"label":"&", "x":9.25, "y":0}, {"label":"*", "x":10.25, "y":0}, {"label":"(", "x":11.25, "y":0}, {"label":")", "x":12.25, "y":0}, {"label":"_", "x":13.25, "y":0}, {"label":"+", "x":14.25, "y":0}, {"label":"Bsp", "x":15.25, "y":0}, {"label":"Del", "x":16.25, "y":0}, {"label":"F2", "x":0.25, "y":1}, {"label":"Tab", "x":1.5, "y":1, "w":1.5}, {"label":"Q", "x":3, "y":1}, {"label":"W", "x":4, "y":1}, {"label":"E", "x":5, "y":1}, {"label":"R", "x":6, "y":1}, {"label":"T", "x":7, "y":1}, {"label":"Y", "x":9, "y":1}, {"label":"U", "x":10, "y":1}, {"label":"I", "x":11, "y":1}, {"label":"O", "x":12, "y":1}, {"label":"P", "x":13, "y":1}, {"label":"{", "x":14, "y":1}, {"label":"}", "x":15, "y":1}, {"label":"|", "x":16, "y":1, "w":1.5}, {"label":"F3", "x":0, "y":2}, {"label":"Caps Lock", "x":1.25, "y":2, "w":1.75}, {"label":"A", "x":3, "y":2}, {"label":"S", "x":4, "y":2}, {"label":"D", "x":5, "y":2}, {"label":"F", "x":6, "y":2}, {"label":"G", "x":7, "y":2}, {"label":"H", "x":9.5, "y":2}, {"label":"J", "x":10.5, "y":2}, {"label":"K", "x":11.5, "y":2}, {"label":"L", "x":12.5, "y":2}, {"label":":", "x":13.5, "y":2}, {"label":"\"", "x":14.5, "y":2}, {"label":"Enter", "x":15.5, "y":2, "w":2.25}, {"label":"Shift", "x":1, "y":3, "w":2.25}, {"label":"Z", "x":3.25, "y":3}, {"label":"X", "x":4.25, "y":3}, {"label":"C", "x":5.25, "y":3}, {"label":"V", "x":6.25, "y":3}, {"label":"B", "x":7.25, "y":3}, {"label":"B", "x":9.25, "y":3}, {"label":"N", "x":10.25, "y":3}, {"label":"M", "x":11.25, "y":3}, {"label":"<", "x":12.25, "y":3}, {"label":">", "x":13.25, "y":3}, {"label":"?", "x":14.25, "y":3}, {"label":"Shift", "x":15.25, "y":3, "w":1.75}, {"label":"Up", "x":17, "y":3}, {"label":"Ctrl", "x":1, "y":4, "w":1.5}, {"label":"Alt", "x":3.5, "y":4, "w":1.5}, {"x":5, "y":4, "w":2.25}, {"label":"Super", "x":7.25, "y":4, "w":1.25}, {"x":9.25, "y":4, "w":2}, {"label":"Alt", "x":11.25, "y":4, "w":1.5}, {"label":"Ctrl", "x":16.25, "y":4, "w":1.5}] + }, + "LAYOUT_owlet60_60_percent_full_bsp": { + "key_count": 65, + "layout": [{"label":"F1", "x":0.5, "y":0}, {"label":"~", "x":1.75, "y":0}, {"label":"!", "x":2.75, "y":0}, {"label":"@", "x":3.75, "y":0}, {"label":"#", "x":4.75, "y":0}, {"label":"$", "x":5.75, "y":0}, {"label":"%", "x":6.75, "y":0}, {"label":"^", "x":7.75, "y":0}, {"label":"&", "x":9.25, "y":0}, {"label":"*", "x":10.25, "y":0}, {"label":"(", "x":11.25, "y":0}, {"label":")", "x":12.25, "y":0}, {"label":"_", "x":13.25, "y":0}, {"label":"+", "x":14.25, "y":0}, {"label":"Bsp", "x":15.25, "y":0, "w":2}, {"label":"F2", "x":0.25, "y":1}, {"label":"Tab", "x":1.5, "y":1, "w":1.5}, {"label":"Q", "x":3, "y":1}, {"label":"W", "x":4, "y":1}, {"label":"E", "x":5, "y":1}, {"label":"R", "x":6, "y":1}, {"label":"T", "x":7, "y":1}, {"label":"Y", "x":9, "y":1}, {"label":"U", "x":10, "y":1}, {"label":"I", "x":11, "y":1}, {"label":"O", "x":12, "y":1}, {"label":"P", "x":13, "y":1}, {"label":"{", "x":14, "y":1}, {"label":"}", "x":15, "y":1}, {"label":"|", "x":16, "y":1, "w":1.5}, {"label":"F3", "x":0, "y":2}, {"label":"Caps Lock", "x":1.25, "y":2, "w":1.75}, {"label":"A", "x":3, "y":2}, {"label":"S", "x":4, "y":2}, {"label":"D", "x":5, "y":2}, {"label":"F", "x":6, "y":2}, {"label":"G", "x":7, "y":2}, {"label":"H", "x":9.5, "y":2}, {"label":"J", "x":10.5, "y":2}, {"label":"K", "x":11.5, "y":2}, {"label":"L", "x":12.5, "y":2}, {"label":":", "x":13.5, "y":2}, {"label":"\"", "x":14.5, "y":2}, {"label":"Enter", "x":15.5, "y":2, "w":2.25}, {"label":"Shift", "x":1, "y":3, "w":2.25}, {"label":"Z", "x":3.25, "y":3}, {"label":"X", "x":4.25, "y":3}, {"label":"C", "x":5.25, "y":3}, {"label":"V", "x":6.25, "y":3}, {"label":"B", "x":7.25, "y":3}, {"label":"B", "x":9.25, "y":3}, {"label":"N", "x":10.25, "y":3}, {"label":"M", "x":11.25, "y":3}, {"label":"<", "x":12.25, "y":3}, {"label":">", "x":13.25, "y":3}, {"label":"?", "x":14.25, "y":3}, {"label":"Shift", "x":15.25, "y":3, "w":1.75}, {"label":"Up", "x":17, "y":3}, {"label":"Ctrl", "x":1, "y":4, "w":1.5}, {"label":"Alt", "x":3.5, "y":4, "w":1.5}, {"x":5, "y":4, "w":2.25}, {"label":"Super", "x":7.25, "y":4, "w":1.25}, {"x":9.25, "y":4, "w":2}, {"label":"Alt", "x":11.25, "y":4, "w":1.5}, {"label":"Ctrl", "x":16.25, "y":4, "w":1.5}] } } } - \ No newline at end of file diff --git a/keyboards/handwired/owlet60/keymaps/default/keymap.c b/keyboards/handwired/owlet60/keymaps/default/keymap.c index c850d1ff77a7..b4d0360db310 100644 --- a/keyboards/handwired/owlet60/keymaps/default/keymap.c +++ b/keyboards/handwired/owlet60/keymaps/default/keymap.c @@ -31,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [1] = LAYOUT_owlet60_full_bsp( - KC_NO, 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_TRNS, RGB_TOG, \ + KC_NO, 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_DEL, RGB_TOG, \ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_MOD, \ KC_NO, KC_NO,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,KC_NO, KC_NO, RGB_VAI, \ KC_TRNS,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_N, KC_NO, KC_NO,KC_NO, KC_NO, KC_NO, KC_TRNS, RGB_VAD, \ diff --git a/keyboards/handwired/owlet60/keymaps/irham/config.h b/keyboards/handwired/owlet60/keymaps/irham/config.h new file mode 100644 index 000000000000..f662fe7c93a9 --- /dev/null +++ b/keyboards/handwired/owlet60/keymaps/irham/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 worthlessowl + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/handwired/owlet60/keymaps/irham/keymap.c b/keyboards/handwired/owlet60/keymaps/irham/keymap.c new file mode 100644 index 000000000000..dc1d34ff22bb --- /dev/null +++ b/keyboards/handwired/owlet60/keymaps/irham/keymap.c @@ -0,0 +1,74 @@ +/* Copyright 2019 worthlessowl + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_owlet60_full_bsp( + KC__VOLUP, 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_HOME, \ + KC__VOLDOWN, 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_PGUP, \ + KC__MUTE, 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_PGDN, \ + KC_LSFT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, KC_UP, MO(1), \ + KC_LCTRL, KC_LALT, KC_SPC, KC_LGUI,KC_SPC, KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT \ + ), + + [1] = LAYOUT_owlet60_full_bsp( + KC_TRNS, 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_DEL, RGB_TOG, \ + KC_TRNS, KC_TRNS, KC_TRNS, 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_MOD, \ + KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_END, \ + KC_TRNS,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_VAI, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAD, KC_TRNS \ + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMKBEST: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + SEND_STRING("QMK is the best thing ever!"); + } else { + // when keycode QMKBEST is released + } + break; + case QMKURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/handwired/owlet60/keymaps/irham/readme.md b/keyboards/handwired/owlet60/keymaps/irham/readme.md new file mode 100644 index 000000000000..1d177ae10298 --- /dev/null +++ b/keyboards/handwired/owlet60/keymaps/irham/readme.md @@ -0,0 +1 @@ +# The default keymap for owlet60 \ No newline at end of file diff --git a/keyboards/handwired/owlet60/keymaps/oled_testing/keymap.c b/keyboards/handwired/owlet60/keymaps/oled_testing/keymap.c index 3493a9d6c5c2..f63ec18933f9 100644 --- a/keyboards/handwired/owlet60/keymaps/oled_testing/keymap.c +++ b/keyboards/handwired/owlet60/keymaps/oled_testing/keymap.c @@ -31,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [1] = LAYOUT_owlet60_full_bsp( - KC_NO, 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_TRNS, RGB_TOG, \ + KC_NO, 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_DEL, RGB_TOG, \ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_MOD, \ KC_NO, KC_NO,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,KC_NO, KC_NO, RGB_VAI, \ KC_TRNS,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_N, KC_NO, KC_NO,KC_NO, KC_NO, KC_NO, KC_TRNS, RGB_VAD, \ @@ -100,7 +100,8 @@ void oled_task_user(void) { static const char PROGMEM qmk_logo[] = { 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, - 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0}; + 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0 + }; oled_write_P(qmk_logo, false); } diff --git a/keyboards/handwired/owlet60/owlet60.h b/keyboards/handwired/owlet60/owlet60.h index 3a21e75d47ea..9db2a789d6b0 100644 --- a/keyboards/handwired/owlet60/owlet60.h +++ b/keyboards/handwired/owlet60/owlet60.h @@ -25,7 +25,7 @@ * The second converts the arguments into a two-dimensional array which * represents the switch matrix. */ -#define LAYOUT_owlet60_all( \ +#define LAYOUT_owlet60_split_bsp( \ k50, k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, \ k51, k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, \ k52, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \ @@ -43,7 +43,6 @@ { k09, k03, k05, k06, k01, k0b, k0d, k0e} \ } -// swap col 1 with col 5, rearrange col 8 #define LAYOUT_owlet60_full_bsp( \ k50, k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0f, \ k51, k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, \ @@ -61,3 +60,39 @@ { k00, k02, k04, k16, k08, k0a, k0c, k0f}, \ { k01, k03, k05, k06, k09, k0b, k0d, KC_NO} \ } + +#define LAYOUT_owlet60_60_percent_split_bsp( \ + k50, k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \ + k51, k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \ + k52, 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, k3d, \ + k40, k41, k42, k43, k44, k45, k47 \ +) { \ + { k07, k11, k13, k15, k50, k19, k1b, k1d}, \ + { k17, k21, k23, k25, k51, k29, k2b, k3d}, \ + { k27, k31, k33, k35, k52, k39, k3b, k47}, \ + { k37, k41, k42, k43, k40, k45, KC_NO, KC_NO}, \ + { k38, k32, k34, k44, k30, k3a, k3c, KC_NO}, \ + { k28, k22, k24, k36, k20, k2a, k2c, KC_NO}, \ + { k18, k12, k14, k26, k10, k1a, k1c, KC_NO}, \ + { k08, k02, k04, k16, k00, k0a, k0c, KC_NO}, \ + { k09, k03, k05, k06, k01, k0b, k0d, k0e} \ +} + +#define LAYOUT_owlet60_60_percent_full_bsp( \ + k50, k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, \ + k51, k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \ + k52, 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, k3d, \ + k40, k41, k42, k43, k44, k45, k47 \ +) { \ + { k07, k11, k13, k15, k50, k19, k1b, k1d}, \ + { k17, k21, k23, k25, k51, k29, k2b, k3d}, \ + { k27, k31, k33, k35, k52, k39, k3b, k47}, \ + { k37, k41, k42, k43, k40, k45, KC_NO, KC_NO}, \ + { k38, k32, k34, k44, k30, k3a, k3c, KC_NO}, \ + { k28, k22, k24, k36, k20, k2a, k2c, KC_NO}, \ + { k18, k12, k14, k26, k10, k1a, k1c, KC_NO}, \ + { k08, k02, k04, k16, k00, k0a, k0c, KC_NO}, \ + { k09, k03, k05, k06, k01, k0b, k0d, KC_NO} \ +} From 51bf3ba3e623d69cf4ad9e9045cf10526e70be15 Mon Sep 17 00:00:00 2001 From: just-another-jxliu Date: Tue, 22 Oct 2019 13:03:39 -0700 Subject: [PATCH 161/316] Fix held key getting stuck when NKRO is toggled (#6570) * Fix held key getting stuck when NKRO is toggled * Updated file to latest qmk version and added fix to cases MAGIC_UNHOST_NKRO & MAGIC_HOST_NKRO as well. * Revert merged quantum.c --- quantum/quantum.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/quantum/quantum.c b/quantum/quantum.c index 2020770ea5c7..d689a9fbfbd9 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -563,6 +563,7 @@ bool process_record_quantum(keyrecord_t *record) { keymap_config.swap_backslash_backspace = true; break; case MAGIC_HOST_NKRO: + clear_keyboard(); // clear first buffer to prevent stuck keys keymap_config.nkro = true; break; case MAGIC_SWAP_ALT_GUI: @@ -605,6 +606,7 @@ bool process_record_quantum(keyrecord_t *record) { keymap_config.swap_backslash_backspace = false; break; case MAGIC_UNHOST_NKRO: + clear_keyboard(); // clear first buffer to prevent stuck keys keymap_config.nkro = false; break; case MAGIC_UNSWAP_ALT_GUI: @@ -642,6 +644,7 @@ bool process_record_quantum(keyrecord_t *record) { #endif break; case MAGIC_TOGGLE_NKRO: + clear_keyboard(); // clear first buffer to prevent stuck keys keymap_config.nkro = !keymap_config.nkro; break; case MAGIC_EE_HANDS_LEFT: From 6799937a3c2a13d3973e635656b22da9699cf462 Mon Sep 17 00:00:00 2001 From: Pentti Laitinen <2406748+cyky@users.noreply.github.com> Date: Wed, 23 Oct 2019 10:54:14 +0300 Subject: [PATCH 162/316] [Keymap] Updating Nordic ergo keymap (#7107) * Update ergodox infinity nordic_ergo keymap - Add missing important keys to base layer. - Move arrow keys around as the original position was not optimal. - Fix some code styling issues. * Fix indentation to 4 spaces * More code style fixes - Formated the methods in the nordic ergo keymap. * Fix QMK code style issues - Change layer defines to enums. - Split enums to multi-line. - Remove non required switch case. --- .../keymaps/nordic_ergo/keymap.c | 259 +++++++++--------- 1 file changed, 125 insertions(+), 134 deletions(-) diff --git a/keyboards/ergodox_infinity/keymaps/nordic_ergo/keymap.c b/keyboards/ergodox_infinity/keymaps/nordic_ergo/keymap.c index 6a66b1d3fdd9..be96f0db086f 100644 --- a/keyboards/ergodox_infinity/keymaps/nordic_ergo/keymap.c +++ b/keyboards/ergodox_infinity/keymaps/nordic_ergo/keymap.c @@ -1,22 +1,18 @@ // Nordic layout for Ergodox infinity - #include QMK_KEYBOARD_H -#include "debug.h" -#include "action_layer.h" #include "version.h" #include "keymap_nordic.h" #include "keymap_german.h" -// Layer names -#define BASE 0 // default layer -#define FUNCL 1 // function layer -#define SYMB 2 // symbol layer -#define MDIA 3 // media keys +enum layer_names { + BASE, + FUNCL, + SYMB, + MDIA +}; enum custom_keycodes { - PLACEHOLDER = SAFE_RANGE, // can always be here - EPRM, - VRSN, + VRSN = SAFE_RANGE, RGB_SLD }; @@ -34,7 +30,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| L2 | | L2 |------+------+------+------+------+--------| * | LShift | Z | X | C | V | B | | | | N | M | , | . | - | RShift | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | Ctrl | ¨^ | <|> | Alt | LGui| | Ctrl | Alt | ´` | + | RGui | + * | Ctrl | ¨^ | <|> | LGui | Alt | | Ctrl | Alt | ´` | + | RGui | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. * | LEFT |RIGHT | | DOWN | UP | @@ -46,69 +42,69 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [BASE] = LAYOUT_ergodox( // layer 0 : default - // left hand - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_GRV, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(1), - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(2), - KC_LCTRL, KC_RBRC, KC_NONUS_BSLASH, KC_LALT, KC_LGUI, - KC_LEFT, KC_RIGHT, - KC_HOME, - KC_SPC,KC_DEL, KC_END, - // right hand - KC_PSCREEN, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, - TG(1), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, - KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, - MO(2), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - KC_RCTRL, KC_RALT, KC_BSLS, KC_EQL, KC_RGUI, - KC_DOWN, KC_UP, - KC_PGUP, - KC_PGDN, KC_ENT, KC_BSPC - ), + // left hand + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(1), + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(2), + KC_LCTRL, MO(3), KC_EQL, KC_LGUI, KC_LALT, + KC_NLCK, KC_SLCK, + KC_HOME, + KC_SPC, KC_DEL, KC_END, + // right hand + KC_BSLS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + TG(1), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, + MO(2), KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_NONUS_BSLASH, + KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_RBRC, + KC_RGUI, KC_RALT, + KC_PGUP, + KC_PGDN, KC_ENT, KC_BSPC +), /* Keymap 1: Basic layer with functions * * * * ,--------------------------------------------------. ,--------------------------------------------------. - * | Esc | F1 | F2 | F3 | F4 | F5 | F11 | | F12 | F6 | F7 | F8 | F9 | 0 | - | + * | | F1 | F2 | F3 | F4 | F5 | F11 | | F12 | F6 | F7 | F8 | F9 | 0 | | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | Tab | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | Å | + * | | | | | | | | | | | | | | | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | Caps | A | S | D | F | G |------| |------| H | J | K | L | Ö | Ä | - * |--------+------+------+------+------+------| L2 | | L2 |------+------+------+------+------+--------| - * | LShift | Z | X | C | V | B | | | | N | M | , | . | - | RShift | + * | | | | | | |------| |------| | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | Ctrl | ¨^ | <|> | Alt | LGui| | Ctrl | Alt | ´` | + | RGui | + * | | ¨ | | | | | | | | | | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. - * | LEFT |RIGHT | | DOWN | UP | + * | | | | | | * ,------+------+------| |------+--------+------. - * | | | Home | | PgUp | | | - * | Space|Del |------| |------| Enter | Bkspc| - * | | | End | | PgDn | | | + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | * `--------------------' `----------------------' */ [FUNCL] = LAYOUT_ergodox( // layer 1 : functions - // left hand - _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, - _______, _______, - _______, - _______,_______,_______, - // right hand - KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, - _______, _______, - _______, - _______, _______, _______ + // left hand + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______, _______, _______, + // right hand + KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______, _______, _______ ), /* Keymap 2: Symbol Layer @@ -134,24 +130,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // SYMBOLS [SYMB] = LAYOUT_ergodox( - // left hand - KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, - KC_TRNS,DE_EXLM,DE_AT, DE_LCBR,DE_RCBR,DE_PIPE,KC_TRNS, - KC_TRNS,DE_HASH,DE_DLR, DE_LPRN,DE_RPRN,DE_GRV, - KC_TRNS,DE_PERC,DE_CIRC,DE_LBRC,DE_RBRC,DE_TILD,KC_TRNS, - KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, - RGB_MOD,BL_TOGG, - BL_INC, - RGB_VAD,RGB_VAI,BL_DEC, - // right hand - KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - KC_TRNS, KC_UP, KC_7, KC_8, KC_9, DE_ASTR, KC_F12, - KC_DOWN, KC_4, KC_5, KC_6, DE_PLUS, KC_TRNS, - KC_TRNS, DE_AMPR, KC_1, KC_2, KC_3, DE_BSLS, KC_TRNS, - KC_TRNS,KC_DOT, KC_0, DE_EQL, KC_TRNS, - RGB_TOG, RGB_SLD, - KC_TRNS, - KC_TRNS, RGB_HUD, RGB_HUI + // left hand + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, + _______, DE_EXLM, DE_AT, DE_LCBR, DE_RCBR, DE_PIPE, _______, + _______, DE_HASH, DE_DLR, DE_LPRN, DE_RPRN, DE_GRV, + _______, DE_PERC, DE_CIRC, DE_LBRC, DE_RBRC, DE_TILD, _______, + _______, _______, _______, _______, _______, + RGB_MOD, BL_TOGG, + BL_INC, + RGB_VAD, RGB_VAI, BL_DEC, + // right hand + KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______, KC_UP, KC_7, KC_8, KC_9, DE_ASTR, _______, + KC_DOWN, KC_4, KC_5, KC_6, DE_PLUS, _______, + _______, DE_AMPR, KC_1, KC_2, KC_3, DE_BSLS, _______, + _______, KC_DOT, KC_0, DE_EQL, _______, + RGB_TOG, RGB_SLD, + _______, + _______, RGB_HUD, RGB_HUI ), /* Keymap 3: Media and mouse keys @@ -175,82 +171,75 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | * `--------------------' `--------------------' */ + // MEDIA AND MOUSE [MDIA] = LAYOUT_ergodox( - RESET, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_TRNS, - KC_TRNS, KC_TRNS, KC_BTN1, KC_MS_U, KC_BTN2, KC_TRNS, KC_TRNS, - KC_TRNS, KC_BTN4, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN5, - KC_TRNS, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, KC_BTN3, KC_TRNS, - KC_TRNS, KC_TRNS, KC_ACL0, KC_ACL1, KC_ACL2, - KC_TRNS, KC_TRNS, - KC_TRNS, - KC_BTN1, KC_BTN2, KC_TRNS, - // right hand - KC_TRNS, KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11, - KC_TRNS, KC_TRNS, KC_VOLD, KC_MUTE, KC_VOLU, KC_TRNS, KC_F12, - KC_TRNS, KC_MPRV, KC_MSTP, KC_MPLY, KC_MNXT, KC_TRNS, - KC_TRNS, KC_WSCH, KC_WBAK, KC_WHOM, KC_WREF, KC_WFWD, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, - KC_TRNS, - KC_TRNS, KC_WBAK, KC_WFWD + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, + _______, _______, KC_BTN1, KC_MS_U, KC_BTN2, _______, _______, + _______, KC_BTN4, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN5, + _______, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, KC_BTN3, _______, + _______, _______, KC_ACL0, KC_ACL1, KC_ACL2, + _______, _______, + _______, + KC_BTN1, KC_BTN2, _______, + // right hand + KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, _______, KC_VOLD, KC_MUTE, KC_VOLU, _______, _______, + _______, KC_MPRV, KC_MSTP, KC_MPLY, KC_MNXT, _______, + _______, KC_WSCH, KC_WBAK, KC_WHOM, KC_WREF, KC_WFWD, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______, KC_WBAK, KC_WFWD ), }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + // MACRODOWN only works in this function + switch (id) { case 0: - if (record->event.pressed) { - SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); - } - break; + if (record->event.pressed) { + SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + break; case 1: - if (record->event.pressed) { // For resetting EEPROM - eeconfig_init(); - } - break; - } + if (record->event.pressed) { // For resetting EEPROM + eeconfig_init(); + } + break; + } return MACRO_NONE; }; bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - // dynamically generate these. - case EPRM: - if (record->event.pressed) { - eeconfig_init(); - } - return false; - break; - case VRSN: - if (record->event.pressed) { - SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); - } - return false; - break; - case RGB_SLD: - if (record->event.pressed) { - #ifdef RGBLIGHT_ENABLE - rgblight_mode(1); - #endif - } - return false; - break; - } - return true; + switch (keycode) { + case VRSN: + if (record->event.pressed) { + SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + return false; + break; + case RGB_SLD: + if (record->event.pressed) { +#ifdef RGBLIGHT_ENABLE + rgblight_mode(1); +#endif + } + return false; + break; + } + return true; } // Runs just one time when the keyboard initializes. -void matrix_init_user(void) { +void matrix_init_user(void){ }; // Runs constantly in the background, in a loop. void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + ergodox_board_led_off(); ergodox_right_led_1_off(); ergodox_right_led_2_off(); @@ -262,8 +251,10 @@ void matrix_scan_user(void) { case 2: ergodox_right_led_2_on(); break; + case 3: + ergodox_right_led_3_on(); + break; default: - // none break; } }; From 6d95082cbf11728bbd035d533ef3efebcf29f933 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Wed, 23 Oct 2019 08:44:20 -0700 Subject: [PATCH 163/316] [Keyboard] 1up60rgb: fix LAYOUT_60_iso json tree (#7126) ISO Enter was out of sequence. --- keyboards/1upkeyboards/1up60rgb/info.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/1upkeyboards/1up60rgb/info.json b/keyboards/1upkeyboards/1up60rgb/info.json index 67f94b7fe15d..2185f0bb1910 100644 --- a/keyboards/1upkeyboards/1up60rgb/info.json +++ b/keyboards/1upkeyboards/1up60rgb/info.json @@ -14,7 +14,7 @@ }, "LAYOUT_60_iso": { - "layout": [{"label":"\u00ac", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"\u00a3", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"@", "x":11.75, "y":2}, {"label":"~", "x":12.75, "y":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"AltGr", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + "layout": [{"label":"\u00ac", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"\u00a3", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"@", "x":11.75, "y":2}, {"label":"~", "x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"AltGr", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] }, "LAYOUT_60_ansi_split_bs_rshift": { From 68cf2725aa30eaa18db9c6149e5e361860db01d7 Mon Sep 17 00:00:00 2001 From: Salicylic-acid3 <46864619+Salicylic-acid3@users.noreply.github.com> Date: Thu, 24 Oct 2019 02:18:59 +0900 Subject: [PATCH 164/316] [Keyboard] Naked48/60 Configurator bugfix (#7131) Support for QMK configurator of keyboard Naked48 / 60. Related: Pull request to configurator [Keyboard] Add keyboard Naked48 / 60 # 549 --- keyboards/naked48/keymaps/default/config.h | 2 - keyboards/naked48/keymaps/default/keymap.c | 6 +- .../keymaps/default_with_nafuda/config.h | 4 + .../keymaps/default_with_nafuda/keymap.c | 16 ++-- .../keymaps/default_with_setta21/config.h | 4 + .../keymaps/default_with_setta21/keymap.c | 13 +-- .../keymaps/default_with_setta21/readme.md | 4 +- keyboards/naked48/keymaps/salicylic/config.h | 4 + keyboards/naked48/keymaps/salicylic/keymap.c | 16 ++-- keyboards/naked48/keymaps/salicylic/readme.md | 79 ++++++++----------- .../keymaps/salicylic_with_nafuda/config.h | 4 + .../keymaps/salicylic_with_nafuda/keymap.c | 27 +++---- .../keymaps/salicylic_with_setta21/config.h | 4 + .../keymaps/salicylic_with_setta21/keymap.c | 21 ++--- .../keymaps/salicylic_with_setta21/readme.md | 77 +++++++++--------- keyboards/naked48/rev1/config.h | 18 ++--- keyboards/naked60/keymaps/default/keymap.c | 16 +--- keyboards/naked60/keymaps/default/readme.md | 6 +- .../keymaps/default_with_nafuda/keymap.c | 22 ++---- .../keymaps/default_with_setta21/keymap.c | 23 +----- keyboards/naked60/keymaps/salicylic/rules.mk | 1 + .../keymaps/salicylic_with_nafuda/rules.mk | 1 + .../keymaps/salicylic_with_setta21/rules.mk | 1 + keyboards/naked60/rules.mk | 1 - 24 files changed, 147 insertions(+), 223 deletions(-) create mode 100644 keyboards/naked60/keymaps/salicylic/rules.mk diff --git a/keyboards/naked48/keymaps/default/config.h b/keyboards/naked48/keymaps/default/config.h index a568a5f12829..0e452bdb4a95 100644 --- a/keyboards/naked48/keymaps/default/config.h +++ b/keyboards/naked48/keymaps/default/config.h @@ -26,5 +26,3 @@ #define TAPPING_FORCE_HOLD #define TAPPING_TERM 180 - -#define RGBLED_NUM 48 // Number of LEDs \ No newline at end of file diff --git a/keyboards/naked48/keymaps/default/keymap.c b/keyboards/naked48/keymaps/default/keymap.c index 91c61b5f4369..686685e26328 100644 --- a/keyboards/naked48/keymaps/default/keymap.c +++ b/keyboards/naked48/keymaps/default/keymap.c @@ -24,10 +24,6 @@ enum custom_keycodes { RGB_RST = SAFE_RANGE }; -// Layer Mode aliases -#define KC_SNUBS S(KC_NUBS) -#define KC_SNUHS S(KC_NUHS) - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT( //,-----------------------------------------------------| |-----------------------------------------------------. @@ -48,7 +44,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,KC_SNUHS,KC_SNUBS, _______, _______, _______, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______,_______,_______, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY //`------------------------------------------------------------------------------------------------------------' diff --git a/keyboards/naked48/keymaps/default_with_nafuda/config.h b/keyboards/naked48/keymaps/default_with_nafuda/config.h index 264ad08776d3..314fe55c3016 100644 --- a/keyboards/naked48/keymaps/default_with_nafuda/config.h +++ b/keyboards/naked48/keymaps/default_with_nafuda/config.h @@ -26,6 +26,10 @@ #define TAPPING_FORCE_HOLD #define TAPPING_TERM 180 +#ifdef RGBLED_NUM + #undef RGBLED_NUM +#endif + #define RGBLED_NUM 55 // Number of LEDs #define RGBLIGHT_SPLIT #define RGBLED_SPLIT { 48, 7 } diff --git a/keyboards/naked48/keymaps/default_with_nafuda/keymap.c b/keyboards/naked48/keymaps/default_with_nafuda/keymap.c index e4b616e70cac..f5d0772aa4e6 100644 --- a/keyboards/naked48/keymaps/default_with_nafuda/keymap.c +++ b/keyboards/naked48/keymaps/default_with_nafuda/keymap.c @@ -26,18 +26,12 @@ enum custom_keycodes { RGB_RST = SAFE_RANGE }; -// Fillers to make layering more clear -#define KC_SNUBS S(KC_NUBS) -#define KC_SNUHS S(KC_NUHS) - -#define KC_BSAD LT(_ADJUST, KC_BSPC) - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT_with_nafuda( //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, TG(_MOUSE), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| - 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_BSAD, KC_UP,TG(_BROWSER), + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,LT(_ADJUST, KC_BSPC),KC_UP,TG(_BROWSER), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, KC_LEFT, KC_DOWN,KC_RIGHT, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------------------------| @@ -73,9 +67,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR,KC_LPRN, KC_RPRN, KC_DEL, TG(_MOUSE), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| - KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, KC_BSAD, KC_UP,TG(_MOUSE), + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,LT(_ADJUST, KC_BSPC),KC_UP,TG(_MOUSE), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,KC_SNUHS,KC_SNUBS, _______, _______, _______, KC_LEFT, KC_DOWN,KC_RIGHT, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______,_______,_______, KC_LEFT, KC_DOWN,KC_RIGHT, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------------------------| _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY //`------------------------------------------------------------------------------------------------------------' @@ -85,7 +79,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| KC_TILD, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, TG(_MOUSE), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| - KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_BSAD, KC_UP,TG(_MOUSE), + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,LT(_ADJUST, KC_BSPC),KC_UP,TG(_MOUSE), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, KC_LEFT, KC_DOWN,KC_RIGHT, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------------------------| @@ -95,7 +89,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_ADJUST] = LAYOUT_with_nafuda( /* Base */ //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| - _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, RGB_VAD, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_RST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, RGB_VAD, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, RGB_MOD, XXXXXXX,LCA(KC_DEL),LALT(KC_PSCR),KC_PSCR, _ADJUST, RGB_SAD, RGB_VAI, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| diff --git a/keyboards/naked48/keymaps/default_with_setta21/config.h b/keyboards/naked48/keymaps/default_with_setta21/config.h index 1e86c6bb729d..2ad4d0adeb57 100644 --- a/keyboards/naked48/keymaps/default_with_setta21/config.h +++ b/keyboards/naked48/keymaps/default_with_setta21/config.h @@ -26,6 +26,10 @@ #define TAPPING_FORCE_HOLD #define TAPPING_TERM 180 +#ifdef RGBLED_NUM + #undef RGBLED_NUM +#endif + #define RGBLED_NUM 69 // Number of LEDs #define RGBLIGHT_SPLIT #define RGBLED_SPLIT { 48, 21 } diff --git a/keyboards/naked48/keymaps/default_with_setta21/keymap.c b/keyboards/naked48/keymaps/default_with_setta21/keymap.c index 26278b79b8d6..f6e460588cc1 100644 --- a/keyboards/naked48/keymaps/default_with_setta21/keymap.c +++ b/keyboards/naked48/keymaps/default_with_setta21/keymap.c @@ -29,21 +29,14 @@ enum custom_keycodes { SEND_MIN }; -// Fillers to make layering more clear -#define KC_SNUBS S(KC_NUBS) -#define KC_SNUHS S(KC_NUHS) - -#define KC_RADO LT(_RAISE, KC_PDOT) -#define KC_LOP0 LT(_LOWER, KC_P0) - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT_with_setta21( //,-----------------------------------------------------| |-----------------------------------------------------. |-----------------------------------------------| - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_LOP0, KC_P1, KC_P4, KC_P7,KC_NLCK, KC_ESC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,LT(_LOWER, KC_P0),KC_P1, KC_P4, KC_P7,KC_NLCK, KC_ESC, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| 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_P2, KC_P5, KC_P8,KC_PSLS, KC_F2, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, KC_RADO, KC_P3, KC_P6, KC_P9,KC_PAST, KC_EQL, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,LT(_RAISE, KC_PDOT),KC_P3,KC_P6, KC_P9,KC_PAST, KC_EQL, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| MO(_ADJUST),KC_LCTRL, KC_LALT, KC_LGUI,MO(_LOWER), KC_SPC, KC_SPC,MO(_RAISE), KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT, KC_PENT, KC_PPLS,KC_PMNS, KC_DEL //`------------------------------------------------------------------------------------------------------------' |-----------------------------------------------| @@ -55,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+--------+-------+-------| KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, KC_DOWN,KC_DOWN, KC_UP,KC_PSLS, KC_F2, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+--------+-------+-------| - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,KC_SNUHS,KC_SNUBS, _______, _______, _______, MO(_RAISE),XXXXXXX,KC_RIGHT,XXXXXXX,KC_PAST, KC_EQL, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______,_______,_______, MO(_RAISE),XXXXXXX,KC_RIGHT,XXXXXXX,KC_PAST, KC_EQL, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |---------------+----------------+-------+-------| _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, KC_PENT, KC_PPLS,KC_PMNS, KC_DEL //`------------------------------------------------------------------------------------------------------------' |------------------------------------------------| diff --git a/keyboards/naked48/keymaps/default_with_setta21/readme.md b/keyboards/naked48/keymaps/default_with_setta21/readme.md index 365219739f41..6e2a3441d23c 100644 --- a/keyboards/naked48/keymaps/default_with_setta21/readme.md +++ b/keyboards/naked48/keymaps/default_with_setta21/readme.md @@ -6,7 +6,7 @@ Add Setta21 maps to the default layout. | 1 | 2 | 3 | 4 | |:----:|:----:|:----:|:----:| | ESC| F2| =| DEL| -|Ad+Num| /| *| -| +| Num| /| *| -| | 7| 8| 9| | | 4| 5| 6| +| | 1| 2| 3| | @@ -36,7 +36,7 @@ Add Setta21 maps to the default layout. | 1 | 2 | 3 | 4 | |:----:|:----:|:----:|:----:| | ESC| F2| =| DEL| -|ADJUST| XXXXX| XXXXX| -| +| XXXXX| XXXXX| XXXXX| -| |LED_SAD|LED_SAI| XXXXX| | |LED_HUD|LED_HUI| XXXXX| +| |LED_VAD|LED_VAI| XXXXX| | diff --git a/keyboards/naked48/keymaps/salicylic/config.h b/keyboards/naked48/keymaps/salicylic/config.h index 5eceec73b0c0..b6372db3b956 100644 --- a/keyboards/naked48/keymaps/salicylic/config.h +++ b/keyboards/naked48/keymaps/salicylic/config.h @@ -21,6 +21,10 @@ #define TAPPING_FORCE_HOLD #define TAPPING_TERM 180 +#ifdef RGBLED_NUM + #undef RGBLED_NUM +#endif + #define DRIVER_LED_TOTAL 48 #ifdef RGB_MATRIX_ENABLE diff --git a/keyboards/naked48/keymaps/salicylic/keymap.c b/keyboards/naked48/keymaps/salicylic/keymap.c index 995e8bd298dc..8b5e15c139c3 100644 --- a/keyboards/naked48/keymaps/salicylic/keymap.c +++ b/keyboards/naked48/keymaps/salicylic/keymap.c @@ -26,12 +26,6 @@ enum custom_keycodes { RGB_RST = SAFE_RANGE }; -// Fillers to make layering more clear -#define KC_CT11 LCTL_T(KC_F11) -#define KC_SF12 SFT_T(KC_F12) -#define KC_LOEN LT(_LOWER, KC_ENT) -#define KC_RASP LT(_RAISE, KC_SPC) - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT( //,-----------------------------------------------------| |-----------------------------------------------------. @@ -41,7 +35,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, JP_COMM, JP_DOT, JP_SLSH, JP_BSLS, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - KC_LEFT,KC_RIGHT, KC_LGUI, KC_MHEN, KC_LOEN, KC_BSPC, KC_DEL, KC_RASP, KC_HENK, KC_LALT, KC_DOWN, KC_UP + KC_LEFT,KC_RIGHT, KC_LGUI, KC_MHEN,LT(_LOWER, KC_ENT), KC_BSPC, KC_DEL,LT(_RAISE, KC_SPC),KC_HENK, KC_LALT, KC_DOWN, KC_UP //`------------------------------------------------------------------------------------------------------------' ), @@ -63,11 +57,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //,-----------------------------------------------------| |-----------------------------------------------------. KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, XXXXXXX, KC_UP, XXXXXXX, KC_PGUP, KC_DEL, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - KC_CT11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, KC_LEFT, KC_DOWN,KC_RIGHT, KC_LSFT, KC_ENT, +LCTL_T(KC_F11), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, KC_LEFT, KC_DOWN,KC_RIGHT, KC_LSFT, KC_ENT, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - KC_SF12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGDN, XXXXXXX, +SFT_T(KC_F12), KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGDN, XXXXXXX, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, _______, _______, KC_MHEN, _______, _______, _______, _______, KC_HENK, _______, _______, _______ //`------------------------------------------------------------------------------------------------------------' ), @@ -101,7 +95,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { RGB_current_mode = rgblight_config.mode; } break; - case RGBRST: + case RGB_RST: if (record->event.pressed) { eeconfig_update_rgblight_default(); rgblight_enable(); diff --git a/keyboards/naked48/keymaps/salicylic/readme.md b/keyboards/naked48/keymaps/salicylic/readme.md index cd5e6e7296fd..6563bb46ff58 100644 --- a/keyboards/naked48/keymaps/salicylic/readme.md +++ b/keyboards/naked48/keymaps/salicylic/readme.md @@ -1,46 +1,37 @@ # The salicylic keymap for naked48 -Default - //,-----------------------------------------| |-----------------------------------------. - TAB, Q, W, E, R, T, Y, U, I, O, P, [, - //|------+------+------+------+------+------| |------+------+------+------+------+------| - LSFT, A, S, D, F, G, H, J, K, L, -, ], - //|------+------+------+------+------+------| |------+------+------+------+------+------| - LCTRL, Z, X, C, V, B, N, M, ,, ., /, \, - //|------+------+------+------+------+-------|------+-----+-------+-----+------+------+------| - LEFT, RIGHT, LGUI, MHEN,Low+Ent, BSPC, DEL,Rai+SPC, HENK, LALT, UP, DOWN - //`----------------------------------------------------------------------------------' - -Lower - //,-----------------------------------------| |-----------------------------------------. - ESC, EXLM, JQUES, JLBRC, JRBRC, JTILD, 6, 7, 8, 9, *, /, - //|------+------+------+------+------+------| |------+------+------+------+------+------| - JQUOT, HASH, JDQUO, JLPRN, JRPRN, JAT, XXXXX, 4, 5, 6, -, =, - //|------+------+------+------+------+------| |------+------+------+------+------+------| - JHAT, PERC, JAMPR, SCLN, JCLON, JPIPE, 0, 1, 2, 3, +, ENT, - //|------+------+------+------+------+------|------+------+------+------+------+------+------| - LEFT, RIGHT, LGUI, ZKHK, LOWER, BSPC, DEL, RAISE, 0, DOT, UP, DOWN - //`----------------------------------------------------------------------------------' - -Raise - //,-----------------------------------------| |-----------------------------------------. - ESC, 1, 2, 3, 4, 5, 6, XXXXX, UP, XXXXX, PGUP, BSPC, - //|------+------+------+------+------+------| |------+------+------+------+------+------| - Ctrl F11, F1, F2, F3, F4, F5, XXXXX, LEFT, DOWN, RIGHT, LSFT, ENT, - //|------+------+------+------+------+------| |------+------+------+------+------+------| - Shift F12, F6, F7, F8, F9, F10, XXXXX, XXXXX, XXXXX, XXXXX, PGDN, XXXXX, - //|------+------+------+------+------+------|------+------+------+------+------+------+------| - LEFT, RIGHT, LGUI, ZKHK, LOWER, BSPC, DEL, RAISE, 0, DOT, UP, DOWN - //`----------------------------------------------------------------------------------' - -Adjust - //,-----------------------------------------| |----------------------------------------------. - ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, DEL, - //|------+------+------+------+------+------| |------+-------+-------+-------+-------+-------| - Ctrl F11, F1, F2, F3, F4, F5, LED ON/Off,LED MOD, XXXXX, C+A+D,Alt+PSCR, PSCR, - //|------+------+------+------+------+------| |------+-------+-------+-------+-------+-------| - Shift F12, F6, F7, F8, F9, F10, LED VAD,LED VAI,LED HUD,LED HUI,LED SAD,LED SAI, - //|------+------+------+------+------+------|------+------+------+-------+-------+-------+-------| - LEFT, RIGHT, LGUI, ZKHK, LOWER, BSPC, DEL, RAISE, 0, DOT, UP, DOWN - //`--------------------------------------------------------------------------------------' - ) \ No newline at end of file +## Default +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +| TAB | Q| W| E| R| T| | | Y| U| I| O| P| [| +|LCTRL | A| S| D| F| G| | | H| J| K| L| -| ]| +| LSFT | Z| X| C| V| B| | | N| M| ,| .| /| \| +| | LEFT| RIGHT| LGUI| MHEN|LOWER, ENT|BSPC|DEL|RAISE,SPC|HENK| LALT| DOWN| UP| | + + +## Lower +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +| ESC| !| ?| [| ]| ~| | | 6| 7| 8| 9| *| /| +| '| #| "| (| )| @| | | XXXXX| 4| 5| 6| -| =| +| ^| %| &| ;| :| PIPE| | | 0| 1| 2| 3| +| ENT| +| | LEFT| RIGHT| LGUI| ZKHK| LOWER| BSPC| DEL| RAISE| HENK| LALT| DOWN| UP| | + + +## Raise +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +| ESC| 1| 2| 3| 4| 5| | | 6| XXXXX| UP| XXXXX| PGUP| DEL| +|F11,LCTRL| F1| F2| F3| F4| F5| | | XXXXX| LEFT| DOWN| RIGHT| LSFT| ENT| +|F12,LSFT| F6| F7| F8| F9| F10| | | XXXXX| XXXXX| XXXXX| XXXXX| PGDN| XXXXX| +| | LEFT| RIGHT| LGUI| MHEN| LOWER| BSPC| DEL| RAISE| HENK| LALT| DOWN| UP| | + + +## Adjust +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:------:|:------:|:------:|:------:|:-------:|:------:| +| ESC| XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| | | RGB_RST| XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| +| LCTRL| XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| | | RGB_TOG| RGB_MOD| XXXXX| C+A+D| Alt+PSCR| PSCR| +| LSFT| XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| | | RGB_VAD| RGB_VAI| RGB_HUD| RGB_HUI| RGB_SAD| RGB_SAI| +| | LEFT| RIGHT| LGUI| MHEN| LOWER| BSPC| DEL| RAISE| HENK| LALT| DOWN| UP| | + diff --git a/keyboards/naked48/keymaps/salicylic_with_nafuda/config.h b/keyboards/naked48/keymaps/salicylic_with_nafuda/config.h index a2ce42ea526c..7ce641601088 100644 --- a/keyboards/naked48/keymaps/salicylic_with_nafuda/config.h +++ b/keyboards/naked48/keymaps/salicylic_with_nafuda/config.h @@ -27,6 +27,10 @@ #define TAPPING_FORCE_HOLD #define TAPPING_TERM 180 +#ifdef RGBLED_NUM + #undef RGBLED_NUM +#endif + #define RGBLED_NUM 55 // Number of LEDs #define RGBLIGHT_SPLIT #define RGBLED_SPLIT { 48, 7 } diff --git a/keyboards/naked48/keymaps/salicylic_with_nafuda/keymap.c b/keyboards/naked48/keymaps/salicylic_with_nafuda/keymap.c index dbb1797cee2d..5a99b8c0adc1 100644 --- a/keyboards/naked48/keymaps/salicylic_with_nafuda/keymap.c +++ b/keyboards/naked48/keymaps/salicylic_with_nafuda/keymap.c @@ -27,25 +27,16 @@ enum custom_keycodes { RGB_RST = SAFE_RANGE }; -// Fillers to make layering more clear -#define KC_CT11 LCTL_T(KC_F11) -#define KC_SF12 SFT_T(KC_F12) -#define KC_LOEN LT(_LOWER, KC_ENT) -#define KC_RASP LT(_RAISE, KC_SPC) - -#define KC_BSAD LT(_ADJUST, KC_BSPC) - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT_with_nafuda( //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_LBRC, TG(_MOUSE), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| - KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, JP_MINS, JP_RBRC, KC_BSAD, KC_UP,TG(_BROWSER), + KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, JP_MINS, JP_RBRC,LT(_ADJUST, KC_BSPC),KC_UP,TG(_BROWSER), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, JP_COMM, JP_DOT, JP_SLSH, JP_BSLS, KC_LEFT, KC_DOWN,KC_RIGHT, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------------------------| - KC_LEFT,KC_RIGHT, KC_LGUI, KC_MHEN, KC_LOEN, KC_BSPC, KC_DEL, KC_RASP, KC_HENK, KC_LALT, KC_DOWN, KC_UP + KC_LEFT,KC_RIGHT, KC_LGUI, KC_MHEN,LT(_LOWER, KC_ENT), KC_BSPC, KC_DEL,LT(_RAISE, KC_SPC),KC_HENK, KC_LALT, KC_DOWN, KC_UP //`------------------------------------------------------------------------------------------------------------' ), @@ -57,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, JP_COMM, JP_DOT, JP_SLSH, JP_BSLS, KC_MS_L, KC_MS_D, KC_MS_R, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------------------------| - KC_LEFT,KC_RIGHT, KC_LGUI, KC_MHEN, KC_LOEN, KC_BSPC, KC_DEL, KC_RASP, KC_HENK, KC_LALT, KC_DOWN, KC_UP + KC_LEFT,KC_RIGHT, KC_LGUI, KC_MHEN,LT(_LOWER, KC_ENT), KC_BSPC, KC_DEL,LT(_RAISE, KC_SPC),KC_HENK, KC_LALT, KC_DOWN, KC_UP //`------------------------------------------------------------------------------------------------------------' ), @@ -69,7 +60,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, JP_COMM, JP_DOT, JP_SLSH, JP_BSLS,LCTL(LSFT(KC_TAB)), KC_WH_D,LCTL(KC_TAB), //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------------------------| - KC_LEFT,KC_RIGHT, KC_LGUI, KC_MHEN, KC_LOEN, KC_BSPC, KC_DEL, KC_RASP, KC_HENK, KC_LALT, KC_DOWN, KC_UP + KC_LEFT,KC_RIGHT, KC_LGUI, KC_MHEN,LT(_LOWER, KC_ENT), KC_BSPC, KC_DEL,LT(_RAISE, KC_SPC),KC_HENK, KC_LALT, KC_DOWN, KC_UP //`------------------------------------------------------------------------------------------------------------' ), @@ -77,7 +68,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| KC_ESC, JP_EXLM, JP_QUES, JP_LBRC, JP_RBRC, JP_TILD, KC_6, KC_7, KC_8, KC_9, JP_ASTR, JP_SLSH, TG(_MOUSE), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| - JP_QUOT, JP_HASH, JP_DQT, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_4, KC_5, KC_6, JP_MINS, JP_EQL, KC_BSAD, KC_UP,TG(_BROWSER), + JP_QUOT, JP_HASH, JP_DQT, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_4, KC_5, KC_6, JP_MINS, JP_EQL,LT(_ADJUST, KC_BSPC),KC_UP,TG(_BROWSER), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| JP_CIRC, JP_PERC, JP_AMPR, JP_SCLN, JP_COLN, JP_PIPE, KC_0, KC_1, KC_2, KC_3, JP_PLUS, KC_ENT, KC_LEFT, KC_DOWN,KC_RIGHT, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------------------------| @@ -89,17 +80,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| KC_ESC, JP_EXLM, JP_QUES, JP_LBRC, JP_RBRC, JP_TILD, KC_6, KC_7, KC_8, KC_9, JP_ASTR, JP_SLSH, TG(_MOUSE), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| - KC_CT11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, KC_LEFT, KC_DOWN,KC_RIGHT, KC_LSFT, KC_ENT, KC_BSAD, KC_UP,TG(_BROWSER), +LCTL_T(KC_F11), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, KC_LEFT, KC_DOWN,KC_RIGHT, KC_LSFT, KC_ENT,LT(_ADJUST, KC_BSPC),KC_UP,TG(_BROWSER), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| - KC_SF12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGDN, XXXXXXX, KC_LEFT, KC_DOWN,KC_RIGHT, +SFT_T(KC_F12), KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGDN, XXXXXXX, KC_LEFT, KC_DOWN,KC_RIGHT, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------------------------| - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, _______, _______, KC_MHEN, _______, _______, _______, _______, KC_HENK, _______, _______, _______ //`------------------------------------------------------------------------------------------------------------' ), [_ADJUST] = LAYOUT_with_nafuda( /* Base */ //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| - _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_RST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, RGB_VAD, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_RST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_VAD, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| KC_LCTRL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, RGB_MOD, XXXXXXX,LCA(KC_DEL),LALT(KC_PSCR),KC_PSCR, _ADJUST, RGB_SAD, RGB_VAI, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| diff --git a/keyboards/naked48/keymaps/salicylic_with_setta21/config.h b/keyboards/naked48/keymaps/salicylic_with_setta21/config.h index 1e86c6bb729d..2ad4d0adeb57 100644 --- a/keyboards/naked48/keymaps/salicylic_with_setta21/config.h +++ b/keyboards/naked48/keymaps/salicylic_with_setta21/config.h @@ -26,6 +26,10 @@ #define TAPPING_FORCE_HOLD #define TAPPING_TERM 180 +#ifdef RGBLED_NUM + #undef RGBLED_NUM +#endif + #define RGBLED_NUM 69 // Number of LEDs #define RGBLIGHT_SPLIT #define RGBLED_SPLIT { 48, 21 } diff --git a/keyboards/naked48/keymaps/salicylic_with_setta21/keymap.c b/keyboards/naked48/keymaps/salicylic_with_setta21/keymap.c index d04b53d7babd..cbe65fe6605d 100644 --- a/keyboards/naked48/keymaps/salicylic_with_setta21/keymap.c +++ b/keyboards/naked48/keymaps/salicylic_with_setta21/keymap.c @@ -30,25 +30,16 @@ enum custom_keycodes { SEND_MIN }; -// Fillers to make layering more clear -#define KC_CT11 LCTL_T(KC_F11) -#define KC_SF12 SFT_T(KC_F12) -#define KC_LOEN LT(_LOWER, KC_ENT) -#define KC_RASP LT(_RAISE, KC_SPC) - -#define KC_RADO LT(_RAISE, KC_PDOT) -#define KC_LOP0 LT(_LOWER, KC_P0) - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT_with_setta21( //,-----------------------------------------------------| |-----------------------------------------------------. |-----------------------------------------------| - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_LBRC, KC_LOP0, KC_P1, KC_P4, KC_P7,KC_NLCK, KC_ESC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_LBRC,LT(_LOWER, KC_P0),KC_P1, KC_P4, KC_P7,KC_NLCK, KC_ESC, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, JP_MINS, JP_RBRC, KC_P2, KC_P5, KC_P8,KC_PSLS, KC_F2, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, JP_COMM, JP_DOT, JP_SLSH, JP_BSLS, KC_RADO, KC_P3, KC_P6, KC_P9,KC_PAST, JP_EQL, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, JP_COMM, JP_DOT, JP_SLSH, JP_BSLS,LT(_RAISE, KC_PDOT),KC_P3,KC_P6, KC_P9,KC_PAST, JP_EQL, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| - KC_LEFT,KC_RIGHT, KC_LGUI, KC_MHEN, KC_LOEN, KC_BSPC, KC_DEL, KC_RASP, KC_HENK, KC_LALT, KC_DOWN, KC_UP, KC_PENT, KC_PPLS,KC_PMNS, KC_DEL + KC_LEFT,KC_RIGHT, KC_LGUI, KC_MHEN,LT(_LOWER, KC_ENT), KC_BSPC, KC_DEL,LT(_RAISE, KC_SPC),KC_HENK, KC_LALT, KC_DOWN, KC_UP, KC_PENT, KC_PPLS,KC_PMNS, KC_DEL //`------------------------------------------------------------------------------------------------------------' |-----------------------------------------------| ), @@ -68,11 +59,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //,-----------------------------------------------------| |-----------------------------------------------------. |-----------------------------------------------| KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, XXXXXXX, KC_UP, XXXXXXX, KC_PGUP, KC_DEL, _______, KC_F11, KC_F4, KC_F7,SEND_MIN, KC_ESC, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| - KC_CT11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, KC_LEFT, KC_DOWN,KC_RIGHT, KC_LSFT, KC_ENT, KC_F12, KC_F5, KC_F8,SEND_MAX, KC_F2, +LCTL_T(KC_F11), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, KC_LEFT, KC_DOWN,KC_RIGHT, KC_LSFT, KC_ENT, KC_F12, KC_F5, KC_F8,SEND_MAX, KC_F2, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| - KC_SF12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGDN, XXXXXXX, _______, KC_F3, KC_F6, KC_F9,SEND_CIF, JP_EQL, +SFT_T(KC_F12), KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGDN, XXXXXXX, _______, KC_F3, KC_F6, KC_F9,SEND_CIF, JP_EQL, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, JP_RPRN, SEND_SUM,SEND_AVE, KC_DEL + _______, _______, _______, KC_MHEN, _______, _______, _______, _______, KC_HENK, _______, _______, _______, JP_RPRN, SEND_SUM,SEND_AVE, KC_DEL //`------------------------------------------------------------------------------------------------------------' |-----------------------------------------------| ), diff --git a/keyboards/naked48/keymaps/salicylic_with_setta21/readme.md b/keyboards/naked48/keymaps/salicylic_with_setta21/readme.md index fa7ece5d9a2b..2c76bc290748 100644 --- a/keyboards/naked48/keymaps/salicylic_with_setta21/readme.md +++ b/keyboards/naked48/keymaps/salicylic_with_setta21/readme.md @@ -2,46 +2,43 @@ Add Setta21 maps to the salicylic layout. -Default - //|-----------------------------------------| - Rai+0, 1, 4, 7,Ad+Num, ESC, - //|------+------+------+------+------+------| - 2, 5, 8, /, F2, - //|------+------+------+------+------+------| - Low+., 3, 6, 9, *, =, - //|-------------+-------------+------+------| - ENT, +, -, DEL - //|-----------------------------------------| +## Default +| 1 | 2 | 3 | 4 | +|:----:|:----:|:----:|:----:| +| ESC| F2| =| DEL| +| Num| /| *| -| +| 7| 8| 9| | +| 4| 5| 6| +| +| 1| 2| 3| | +| Rai+0| | LOW + .| ENT| -Lower - //|-----------------------------------------| - RAISE, F11, F4, F7, "=MIN(", ESC, - //|------+------+------+------+-----------+------| - F12, F5, F8, "=MAX(", F2, - //|------+------+------+------+-----------+------| - LOWER, F3, F6, F9,"=COUNTIF(", =, - //|-------------+-------------+-----------+------| - ), "=SUM(","=AVERAGE(", DEL - //|-----------------------------------------| +## Lower +| 1 | 2 | 3 | 4 | +|:----:|:----:|:----:|:----:| +| ESC| F2| =| DEL| +| =MIN(| =MAX(|=COUNTIF(|=AVERAGE(| +| F7| F8| F9| | +| F4| F5| F6| =SUM(| +| F11| F12| F3| | +| RAISE| | LOWER| )| -Raise - //|-----------------------------------------| - RAISE, XXXXX, LEFT, XXXXX, XXXXX, ESC, - //|------+------+------+------+------+------| - DOWN, DOWN, UP, /, F2, - //|------+------+------+------+------+------| - LOWER, XXXXX, RIGHT, XXXXX, *, =, - //|-------------+-------------+------+------| - ENT, +, -, DEL - //|-----------------------------------------| +## Raise +| 1 | 2 | 3 | 4 | +|:----:|:----:|:----:|:----:| +| ESC| F2| =| DEL| +| XXXXX| /| *| -| +| XXXXX| UP| XXXXX| | +| LEFT| DOWN| RIGHT| +| +| XXXXX| DOWN| XXXXX| | +| RAISE| | LOWER| ENT| + +## Adjust +| 1 | 2 | 3 | 4 | +|:----:|:----:|:----:|:----:| +| ESC| F2| =| DEL| +| XXXXX| XXXXX| XXXXX| -| +|LED_SAD|LED_SAI| XXXXX| | +|LED_HUD|LED_HUI| XXXXX| +| +|LED_VAD|LED_VAI| XXXXX| | +|LED_ON/Off| | XXXXX|LED_MOD| -Adjust - //|------------------------------------------------| - LED ON/Off,LED VAD,LED HUD,LED SAD, ADJUST, ESC, - //|--------+-------+-------+-------+-------+-------| - LED VAI,LED HUI,LED SAI, XXXXX, F2, - //|--------+-------+-------+-------+-------+-------| - XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, =, - //|----------------+---------------+-------+-------| - LED MOD, +, -, DEL - //|------------------------------------------------| diff --git a/keyboards/naked48/rev1/config.h b/keyboards/naked48/rev1/config.h index 9afa87511b7f..0d0390366f27 100644 --- a/keyboards/naked48/rev1/config.h +++ b/keyboards/naked48/rev1/config.h @@ -52,6 +52,11 @@ along with this program. If not, see . /* ws2812 RGB LED */ #define RGB_DI_PIN D3 + +#ifndef RGBLED_NUM + #define RGBLED_NUM 48 +#endif + #define RGBLIGHT_ANIMATIONS #ifndef IOS_DEVICE_ENABLE @@ -64,19 +69,6 @@ along with this program. If not, see . #define RGBLIGHT_HUE_STEP 10 #define RGBLIGHT_SAT_STEP 17 -// Selection of RGBLIGHT MODE to use. -#if defined(LED_ANIMATIONS) - //#define RGBLIGHT_EFFECT_BREATHING - #define RGBLIGHT_EFFECT_RAINBOW_MOOD - #define RGBLIGHT_EFFECT_RAINBOW_SWIRL - //#define RGBLIGHT_EFFECT_SNAKE - #define RGBLIGHT_EFFECT_KNIGHT - //#define RGBLIGHT_EFFECT_CHRISTMAS - #define RGBLIGHT_EFFECT_STATIC_GRADIENT - //#define RGBLIGHT_EFFECT_RGB_TEST - //#define RGBLIGHT_EFFECT_ALTERNATING -#endif - #if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE) // USB_MAX_POWER_CONSUMPTION value for naked48 keyboard // 120 RGBoff, OLEDoff diff --git a/keyboards/naked60/keymaps/default/keymap.c b/keyboards/naked60/keymaps/default/keymap.c index b8812090cab7..e669df61ed77 100644 --- a/keyboards/naked60/keymaps/default/keymap.c +++ b/keyboards/naked60/keymaps/default/keymap.c @@ -16,20 +16,10 @@ enum layer_number { _ADJUST, }; -enum tapdances{ - TD_ESFL = 0, - TD_ESQW, -}; - -qk_tap_dance_action_t tap_dance_actions[] = { - [TD_ESFL] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _FLOCK), - [TD_ESQW] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _QWERTY), -}; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT( //,-----------------------------------------------------| |-----------------------------------------------------. - TD(TD_ESFL), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| @@ -44,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_FLOCK] = LAYOUT( //,-----------------------------------------------------| |-----------------------------------------------------. - TD(TD_ESQW), KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, + TG(_FLOCK), KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| @@ -89,7 +79,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_ADJUST] = LAYOUT( /* Base */ //,-----------------------------------------------------| |-----------------------------------------------------. - KC_ESC, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + TG(_FLOCK), KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BTN1, KC_MS_U, KC_BTN2, XXXXXXX,LALT(KC_PSCR), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| diff --git a/keyboards/naked60/keymaps/default/readme.md b/keyboards/naked60/keymaps/default/readme.md index b5959919ac7a..c6f3342b2195 100644 --- a/keyboards/naked60/keymaps/default/readme.md +++ b/keyboards/naked60/keymaps/default/readme.md @@ -3,7 +3,7 @@ ## Default | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | |:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| -| ESC(FLock) | 1| 2| 3| 4| 5| | | 6| 7| 8| 9| 0| BSPC| +| ESC | 1| 2| 3| 4| 5| | | 6| 7| 8| 9| 0| BSPC| | TAB | Q| W| E| R| T| | | Y| U| I| O| P| \ | | LSFT | A| S| D| F| G| | | H| J| K| L| ;| '| |LCTRL | Z| X| C| V| B| | | N| M| ,| .| /| ENT| @@ -14,7 +14,7 @@ ## FLock | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | |:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| -| ESC(FLock)| F2| F3| F4| F5| F6| | | F7| F8| F9| F10| F11| BSPC| +| FLock| F2| F3| F4| F5| F6| | | F7| F8| F9| F10| F11| BSPC| | TAB | Q| W| E| R| T| | | Y| U| I| O| P| BSLS| | LSFT | A| S| D| F| G| | | H| J| K| L| SCLN| QUOT| |LCTRL | Z| X| C| V| B| | | N| M| COMM| DOT| SLSH| ENT| @@ -45,7 +45,7 @@ ## Adjust | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | |:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| -| ESC| F2| F3| F4| F5| F6| | | F7| F8| F9| F10| F11| F12| +| FLock| F2| F3| F4| F5| F6| | | F7| F8| F9| F10| F11| F12| | TILD| XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| | | XXXXX| BTN1| MS_U| BTN2| XXXXX|Alt+PSCR| | LSFT| XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| | | XXXXX| MS_L| MS_D| MS_R| XXXXX| PSCR| | LCTRL| XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| | | XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| C+A+D| diff --git a/keyboards/naked60/keymaps/default_with_nafuda/keymap.c b/keyboards/naked60/keymaps/default_with_nafuda/keymap.c index 4738ef36ef66..be8c9f3ec959 100644 --- a/keyboards/naked60/keymaps/default_with_nafuda/keymap.c +++ b/keyboards/naked60/keymaps/default_with_nafuda/keymap.c @@ -22,20 +22,10 @@ enum custom_keycodes { RGB_RST = SAFE_RANGE }; -enum tapdances{ - TD_ESFL = 0, - TD_ESQW, -}; - -qk_tap_dance_action_t tap_dance_actions[] = { - [TD_ESFL] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _FLOCK), - [TD_ESQW] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _QWERTY), -}; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT_with_nafuda( //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| - TD(TD_ESFL), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, TG(_MOUSE), + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, TG(_MOUSE), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,LT(_ADJUST, KC_BSPC),KC_UP,TG(_BROWSER), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| @@ -49,7 +39,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_FLOCK] = LAYOUT_with_nafuda( //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| - TD(TD_ESQW), KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, _______, + TG(_FLOCK), KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, _______, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| @@ -63,7 +53,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_MOUSE] = LAYOUT_with_nafuda( //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| - TD(TD_ESFL), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, TG(_MOUSE), + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, TG(_MOUSE), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BTN1, KC_MS_U, KC_BTN2, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| @@ -91,7 +81,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_LOWER] = LAYOUT_with_nafuda( //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| - KC_ESC, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, TG(_MOUSE), + _______, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, TG(_MOUSE), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR,KC_LPRN, KC_RPRN, KC_DEL,LT(_ADJUST, KC_BSPC), KC_UP,TG(_MOUSE), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| @@ -105,7 +95,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_RAISE] = LAYOUT_with_nafuda( //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| - KC_ESC, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, TG(_MOUSE), + _______, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, TG(_MOUSE), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| KC_TILD, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,LT(_ADJUST, KC_BSPC), KC_UP,TG(_MOUSE), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| @@ -119,7 +109,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_ADJUST] = LAYOUT_with_nafuda( /* Base */ //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| - KC_ESC, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, RGB_VAD, + TG(_FLOCK), KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, RGB_VAD, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BTN1, KC_MS_U, KC_BTN2, XXXXXXX,LALT(KC_PSCR), _ADJUST, RGB_SAD, RGB_VAI, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| diff --git a/keyboards/naked60/keymaps/default_with_setta21/keymap.c b/keyboards/naked60/keymaps/default_with_setta21/keymap.c index 0717d3c3f621..95a273a38849 100644 --- a/keyboards/naked60/keymaps/default_with_setta21/keymap.c +++ b/keyboards/naked60/keymaps/default_with_setta21/keymap.c @@ -2,11 +2,6 @@ extern keymap_config_t keymap_config; -#ifdef RGBLIGHT_ENABLE -//Following line allows macro to read current RGB settings -extern rgblight_config_t rgblight_config; -#endif - extern uint8_t is_master; // Each layer gets a name for readability, which is then used in the keymap matrix below. @@ -30,20 +25,10 @@ enum custom_keycodes { SEND_MIN }; -enum tapdances{ - TD_ESFL = 0, - TD_ESQW, -}; - -qk_tap_dance_action_t tap_dance_actions[] = { - [TD_ESFL] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _FLOCK), - [TD_ESQW] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _QWERTY), -}; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT_with_setta21( //,-----------------------------------------------------| |-----------------------------------------------------. |-----------------------------------------------| - TD(TD_ESFL), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,LT(_LOWER, KC_P0),KC_P1, KC_P4, KC_P7,KC_NLCK, KC_ESC, + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,LT(_LOWER, KC_P0),KC_P1, KC_P4, KC_P7,KC_NLCK, KC_ESC, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_P2, KC_P5, KC_P8,KC_PSLS, KC_F2, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| @@ -57,7 +42,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_FLOCK] = LAYOUT_with_setta21( //,-----------------------------------------------------| |-----------------------------------------------------. |-----------------------------------------------| - TD(TD_ESQW), KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, _______,_______,_______,_______,_______,_______, + TG(_FLOCK), KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, _______,_______,_______,_______,_______,_______, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,_______,_______,_______,_______, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| @@ -85,7 +70,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_RAISE] = LAYOUT_with_setta21( //,-----------------------------------------------------| |-----------------------------------------------------. |------------------------------------------------| - KC_ESC, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_F11, KC_F4, KC_F7,SEND_MIN, KC_ESC, + _______, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_F11, KC_F4, KC_F7,SEND_MIN, KC_ESC, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+--------+-------| KC_TILD, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, KC_F12, KC_F5, KC_F8,SEND_MAX, KC_F2, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+--------+-------| @@ -99,7 +84,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_ADJUST] = LAYOUT_with_setta21( /* Base */ //,-----------------------------------------------------| |-----------------------------------------------------. |-----------------------------------------------| - KC_ESC, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,RGB_VAD,RGB_HUD,RGB_SAD,XXXXXXX,_______, + TG(_FLOCK), KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,RGB_VAD,RGB_HUD,RGB_SAD,XXXXXXX,_______, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BTN1, KC_MS_U, KC_BTN2, XXXXXXX,LALT(KC_PSCR), RGB_VAI,RGB_HUI,RGB_SAI,XXXXXXX,_______, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| diff --git a/keyboards/naked60/keymaps/salicylic/rules.mk b/keyboards/naked60/keymaps/salicylic/rules.mk new file mode 100644 index 000000000000..e5ddcae8d927 --- /dev/null +++ b/keyboards/naked60/keymaps/salicylic/rules.mk @@ -0,0 +1 @@ +TAP_DANCE_ENABLE = yes diff --git a/keyboards/naked60/keymaps/salicylic_with_nafuda/rules.mk b/keyboards/naked60/keymaps/salicylic_with_nafuda/rules.mk index e69de29bb2d1..e5ddcae8d927 100644 --- a/keyboards/naked60/keymaps/salicylic_with_nafuda/rules.mk +++ b/keyboards/naked60/keymaps/salicylic_with_nafuda/rules.mk @@ -0,0 +1 @@ +TAP_DANCE_ENABLE = yes diff --git a/keyboards/naked60/keymaps/salicylic_with_setta21/rules.mk b/keyboards/naked60/keymaps/salicylic_with_setta21/rules.mk index e69de29bb2d1..e5ddcae8d927 100644 --- a/keyboards/naked60/keymaps/salicylic_with_setta21/rules.mk +++ b/keyboards/naked60/keymaps/salicylic_with_setta21/rules.mk @@ -0,0 +1 @@ +TAP_DANCE_ENABLE = yes diff --git a/keyboards/naked60/rules.mk b/keyboards/naked60/rules.mk index 22dbd509ba6a..f5bce8d50caf 100644 --- a/keyboards/naked60/rules.mk +++ b/keyboards/naked60/rules.mk @@ -27,7 +27,6 @@ AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -TAP_DANCE_ENABLE = yes OLED_DRIVER_ENABLE = no USE_I2C = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE From b62ee65c6d809bd10b4cd98c835a4a501a39b880 Mon Sep 17 00:00:00 2001 From: skullydazed Date: Wed, 23 Oct 2019 14:18:12 -0700 Subject: [PATCH 165/316] Support for the Clueboard California macropad (#7127) * Support for the Clueboard California macropad * Update keyboards/clueboard/california/config.h Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> --- keyboards/clueboard/california/california.c | 1 + keyboards/clueboard/california/california.h | 21 ++++++++++++++++ keyboards/clueboard/california/config.h | 24 +++++++++++++++++++ keyboards/clueboard/california/info.json | 10 ++++++++ .../california/keymaps/default/keymap.json | 7 ++++++ keyboards/clueboard/california/readme.md | 13 ++++++++++ keyboards/clueboard/california/rules.mk | 10 ++++++++ 7 files changed, 86 insertions(+) create mode 100644 keyboards/clueboard/california/california.c create mode 100644 keyboards/clueboard/california/california.h create mode 100644 keyboards/clueboard/california/config.h create mode 100644 keyboards/clueboard/california/info.json create mode 100644 keyboards/clueboard/california/keymaps/default/keymap.json create mode 100644 keyboards/clueboard/california/readme.md create mode 100644 keyboards/clueboard/california/rules.mk diff --git a/keyboards/clueboard/california/california.c b/keyboards/clueboard/california/california.c new file mode 100644 index 000000000000..342184a1ae9c --- /dev/null +++ b/keyboards/clueboard/california/california.c @@ -0,0 +1 @@ +#include "california.h" diff --git a/keyboards/clueboard/california/california.h b/keyboards/clueboard/california/california.h new file mode 100644 index 000000000000..853b360e2ecf --- /dev/null +++ b/keyboards/clueboard/california/california.h @@ -0,0 +1,21 @@ +#pragma once + +#include "quantum.h" + +// Any changes to the layout names and/or definitions must also be made to info.json + +#define LAYOUT( \ + K00, K01, \ + K10, K11, \ + K21, \ + K30, K31, \ + K40, K41, \ + K51 \ +) { \ + { K00, K01 }, \ + { K10, K11 }, \ + { KC_NO, K21 }, \ + { K30, K31 }, \ + { K40, K41 }, \ + { KC_NO, K51 } \ +} diff --git a/keyboards/clueboard/california/config.h b/keyboards/clueboard/california/config.h new file mode 100644 index 000000000000..b1426cea4f2d --- /dev/null +++ b/keyboards/clueboard/california/config.h @@ -0,0 +1,24 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xC1ED +#define PRODUCT_ID 0x23B0 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Clueboard +#define PRODUCT California Macropad +#define DESCRIPTION A 10-key macropad shaped like California + +/* key matrix pins */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 2 +#define DIRECT_PINS { \ + { A10, A9 }, \ + { A0, B8 }, \ + { NO_PIN, B11 }, \ + { B9, A8 }, \ + { A7, B1 }, \ + { NO_PIN, B2 } \ +} +#define UNUSED_PINS diff --git a/keyboards/clueboard/california/info.json b/keyboards/clueboard/california/info.json new file mode 100644 index 000000000000..2a9ced6e9a55 --- /dev/null +++ b/keyboards/clueboard/california/info.json @@ -0,0 +1,10 @@ +{ + "keyboard_name": "Clueboard California", + "url": "", + "maintainer": "skullydazed", + "layouts": { + "LAYOUT": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":1, "y":2}, {"x":1.25, "y":3}, {"x":2.25, "y":3}, {"x":2, "y":4}, {"x":3, "y":4}, {"x":3.75, "y":5}] + } + } +} diff --git a/keyboards/clueboard/california/keymaps/default/keymap.json b/keyboards/clueboard/california/keymaps/default/keymap.json new file mode 100644 index 000000000000..8e0c297b2d65 --- /dev/null +++ b/keyboards/clueboard/california/keymaps/default/keymap.json @@ -0,0 +1,7 @@ +{ + "keyboard":"clueboard/california", + "layout":"LAYOUT", + "layers":[ + ["KC_1","KC_2","KC_3","KC_4","KC_5","KC_6","KC_7","KC_8","KC_9","BL_STEP"] + ] +} diff --git a/keyboards/clueboard/california/readme.md b/keyboards/clueboard/california/readme.md new file mode 100644 index 000000000000..015d15bc2ac9 --- /dev/null +++ b/keyboards/clueboard/california/readme.md @@ -0,0 +1,13 @@ +# Clueboard California + +A macropad shaped like California + +* Keyboard Maintainer: [Zach White](/~https://github.com/skullydazed) +* Hardware Supported: Clueboard California PCB +* Hardware Availability: 2019 Northern California Meetup + +Make example for this keyboard (after setting up your build environment): + + make clueboard/california:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/clueboard/california/rules.mk b/keyboards/clueboard/california/rules.mk new file mode 100644 index 000000000000..e9362ffb7312 --- /dev/null +++ b/keyboards/clueboard/california/rules.mk @@ -0,0 +1,10 @@ +MCU = STM32F303 + +## Features +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # USB Nkey Rollover +RGBLIGHT_ENABLE = no +AUDIO_ENABLE = yes From e264f0151da0025dbb53dfc5a70bce13105a04d8 Mon Sep 17 00:00:00 2001 From: "Eriq M. Adams" Date: Thu, 24 Oct 2019 06:34:44 +0700 Subject: [PATCH 166/316] [Keyboard] Blackplum a.k.a IMKG68 - new 68% mechanical keyboard (#7122) * Add blackplum firmware blackplum firmware * Delete blackplum.c * Delete blackplum.h * Delete config.h * Delete info.json * Delete rules.mk * Delete keymap.c * Update readme.md * Delete readme.md * Add Blackplum * Add image: blackplum layout * Update readme.md * Update readme.md * remove _WINLCK layer, replaced with custom_keycodes * change #define LAYOUT_68 to #define LAYOUT_68_ansi * change DEBOUNCING_DELAY to DEBOUNCE, remove IS_COMMAND() * change keyboard_name, maintainer, url, width height * change some comments * Update readme * LAYOUTS = 68_ansi * update layout_68_ansi * Change LAYOUT_68 to LAYOUT_68_ansi Co-Authored-By: fauxpark * Fix Bug * remove extern keymap_config_t keymap_config; * Update config.h * Update config.h * Update config.h * Update keyboards/blackplum/rules.mk Co-Authored-By: fauxpark * Update rules.mk * Update rules.mk * Update readme.md * Update readme.md --- keyboards/blackplum/blackplum.c | 1 + keyboards/blackplum/blackplum.h | 22 ++++++++++ keyboards/blackplum/config.h | 39 ++++++++++++++++++ keyboards/blackplum/info.json | 12 ++++++ keyboards/blackplum/keymaps/default/keymap.c | 43 ++++++++++++++++++++ keyboards/blackplum/readme.md | 14 +++++++ keyboards/blackplum/rules.mk | 27 ++++++++++++ 7 files changed, 158 insertions(+) create mode 100644 keyboards/blackplum/blackplum.c create mode 100644 keyboards/blackplum/blackplum.h create mode 100644 keyboards/blackplum/config.h create mode 100644 keyboards/blackplum/info.json create mode 100644 keyboards/blackplum/keymaps/default/keymap.c create mode 100644 keyboards/blackplum/readme.md create mode 100644 keyboards/blackplum/rules.mk diff --git a/keyboards/blackplum/blackplum.c b/keyboards/blackplum/blackplum.c new file mode 100644 index 000000000000..ea8d34e9d968 --- /dev/null +++ b/keyboards/blackplum/blackplum.c @@ -0,0 +1 @@ +#include "blackplum.h" diff --git a/keyboards/blackplum/blackplum.h b/keyboards/blackplum/blackplum.h new file mode 100644 index 000000000000..fbd781473531 --- /dev/null +++ b/keyboards/blackplum/blackplum.h @@ -0,0 +1,22 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT_68_ansi( \ + K00, K10, K01, K11, K02, K12, K03, K13, K04, K14, K05, K15, K06, K16, K07, K17, \ + K20, K30, K21, K31, K22, K32, K23, K33, K24, K34, K25, K35, K26, K36, K27, K37, \ + K40, K50, K41, K51, K42, K52, K43, K53, K44, K54, K45, K55, K46, \ + K60, K70, K61, K71, K62, K72, K63, K73, K64, K74, K65, K75, K66, \ + K80, K81, K82, K83, K84, K85, K86, K76, K67, K77\ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07 }, \ + { K10, K11, K12, K13, K14, K15, K16, K17 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27 }, \ + { K30, K31, K32, K33, K34, K35, K36, K37 }, \ + { K40, K41, K42, K43, K44, K45, K46 }, \ + { K50, K51, K52, K53, K54, K55 }, \ + { K60, K61, K62, K63, K64, K65, K66, K67 }, \ + { K70, K71, K72, K73, K74, K75, K76, K77 }, \ + { K80, K81, K82, K83, K84, K85, K86 } \ +} + diff --git a/keyboards/blackplum/config.h b/keyboards/blackplum/config.h new file mode 100644 index 000000000000..0fd7e21cb6a1 --- /dev/null +++ b/keyboards/blackplum/config.h @@ -0,0 +1,39 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0xFADE +#define DEVICE_VER 0x0001 +#define MANUFACTURER Pixlup +#define PRODUCT Blackplum Keeb +#define DESCRIPTION Blackplum 68 Percent Mechanical Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 9 +#define MATRIX_COLS 8 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { C6, B6, B4, B5, D6, D7, D5, D3, D4 } +#define MATRIX_COL_PINS { D0, D1, D2, F7, F6, F5, F4, F1 } +#define UNUSED_PINS + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 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 + + +/* ws2812 RGB LED */ +#define RGB_DI_PIN C7 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 16 // Number of LEDs +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 10 +#define RGBLIGHT_VAL_STEP 10 +#define RGBLIGHT_SLEEP diff --git a/keyboards/blackplum/info.json b/keyboards/blackplum/info.json new file mode 100644 index 000000000000..8e3efc873842 --- /dev/null +++ b/keyboards/blackplum/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "blackplum", + "url": "www.tokopedia.com/pixlup", + "maintainer": "eriqadams", + "width": 17.25, + "height": 5.25, + "layouts": { + "LAYOUT_68_ansi": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Insert", "x":15.25, "y":0}, {"label":"PgUp", "x":16.25, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Delete", "x":15.25, "y":1}, {"label":"PgDn", "x":16.25, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"\u2191", "x":15.25, "y":3.25}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"OS", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Fn", "x":11.25, "y":4, "w":1.25}, {"label":"Ctrl", "x":12.5, "y":4, "w":1.25}, {"label":"\u2190", "x":14.25, "y":4.25}, {"label":"\u2193", "x":15.25, "y":4.25}, {"label":"\u2192", "x":16.25, "y":4.25}] + } + } +} diff --git a/keyboards/blackplum/keymaps/default/keymap.c b/keyboards/blackplum/keymaps/default/keymap.c new file mode 100644 index 000000000000..5eccfd66b5ad --- /dev/null +++ b/keyboards/blackplum/keymaps/default/keymap.c @@ -0,0 +1,43 @@ +#include QMK_KEYBOARD_H + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _BASE 0 +#define _FN 1 + + + +enum custom_keycodes { + TG_GUI = SAFE_RANGE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_68_ansi( + KC_GESC, 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_INS, KC_PGUP,\ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_PGDOWN,\ + 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, KC_SLSH, KC_RSFT, KC_UP,\ + KC_LCTL , KC_LGUI , KC_LALT , KC_SPC , KC_RALT , MO(_FN) , KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT + ), + + [_FN] = LAYOUT_68_ansi( + 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_MPLY, KC_HOME,\ + _______, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUSE, _______, KC_MUTE, KC_END,\ + _______, RGB_TOG, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______,\ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU,\ + _______, TG_GUI,_______, RESET, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if(record->event.pressed) { + switch(keycode) { + case TG_GUI: + keymap_config.no_gui ^= 1; + return false; + } + } + return true; +} diff --git a/keyboards/blackplum/readme.md b/keyboards/blackplum/readme.md new file mode 100644 index 000000000000..cd506a3421fa --- /dev/null +++ b/keyboards/blackplum/readme.md @@ -0,0 +1,14 @@ +# Blackplum +![Blackplum](https://i.imgur.com/EOUQk4J.png) + +Blackplum a.k.a IMKG68 (which IMKG stands for Indonesian Mechanical Keyboard Group) is an 68% mechanical keyboard with RGB Underglow come with new layout you have never seen before. Recently the pcb and kits only available for purchase in Indonesia. + +Keyboard Maintainer: [eriqadams](/~https://github.com/eriqadams) +Hardware Supported: Blackplum PCB, ATMEGA32u4-au MCU +Hardware Availability: [If you're in Indonesia you can purchase here](https://tokopedia.com/pixlup) + +Make example for this keyboard (after setting up your build environment): + + make blackplum:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/blackplum/rules.mk b/keyboards/blackplum/rules.mk new file mode 100644 index 000000000000..6465dec7f896 --- /dev/null +++ b/keyboards/blackplum/rules.mk @@ -0,0 +1,27 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +BOOTLOADER = qmk-dfu + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +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 = no # Enable keyboard backlight functionality +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = yes + +LAYOUTS = 68_ansi From 23f89ff7cf4bce42d46e99183a977c5c74384c57 Mon Sep 17 00:00:00 2001 From: vuhopkep Date: Thu, 24 Oct 2019 06:38:44 +0700 Subject: [PATCH 167/316] [Keyboard] add new keyboard hnah40rgb (#7083) * add new keyboard hnah40rgb * update * Update hnah40rgb.c * update --- keyboards/handwired/hnah40rgb/config.h | 68 ++++++++++++ keyboards/handwired/hnah40rgb/hnah40rgb.c | 47 ++++++++ keyboards/handwired/hnah40rgb/hnah40rgb.h | 44 ++++++++ keyboards/handwired/hnah40rgb/info.json | 100 ++++++++++++++++++ .../handwired/hnah40rgb/keymaps/ansi/config.h | 18 ++++ .../handwired/hnah40rgb/keymaps/ansi/keymap.c | 67 ++++++++++++ .../hnah40rgb/keymaps/ansi/readme.md | 1 + .../hnah40rgb/keymaps/default/config.h | 17 +++ .../hnah40rgb/keymaps/default/keymap.c | 67 ++++++++++++ .../hnah40rgb/keymaps/default/readme.md | 1 + keyboards/handwired/hnah40rgb/readme.md | 14 +++ keyboards/handwired/hnah40rgb/rules.mk | 33 ++++++ 12 files changed, 477 insertions(+) create mode 100644 keyboards/handwired/hnah40rgb/config.h create mode 100644 keyboards/handwired/hnah40rgb/hnah40rgb.c create mode 100644 keyboards/handwired/hnah40rgb/hnah40rgb.h create mode 100644 keyboards/handwired/hnah40rgb/info.json create mode 100644 keyboards/handwired/hnah40rgb/keymaps/ansi/config.h create mode 100644 keyboards/handwired/hnah40rgb/keymaps/ansi/keymap.c create mode 100644 keyboards/handwired/hnah40rgb/keymaps/ansi/readme.md create mode 100644 keyboards/handwired/hnah40rgb/keymaps/default/config.h create mode 100644 keyboards/handwired/hnah40rgb/keymaps/default/keymap.c create mode 100644 keyboards/handwired/hnah40rgb/keymaps/default/readme.md create mode 100644 keyboards/handwired/hnah40rgb/readme.md create mode 100644 keyboards/handwired/hnah40rgb/rules.mk diff --git a/keyboards/handwired/hnah40rgb/config.h b/keyboards/handwired/hnah40rgb/config.h new file mode 100644 index 000000000000..7741f3965f02 --- /dev/null +++ b/keyboards/handwired/hnah40rgb/config.h @@ -0,0 +1,68 @@ +/* +Copyright 2019 HnahKB + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER HnahKB +#define PRODUCT Hnah40V2 +#define DESCRIPTION A custom rgb keyboard + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 11 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS \ + { B7, D7, F1, F0 } +#define MATRIX_COL_PINS \ + { D5, D6, D3, D2, B6, C6, C7, F7, F6, F5, F4 } + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +#ifdef RGB_MATRIX_ENABLE +#define RGB_DI_PIN E2 +#define DRIVER_LED_TOTAL 50 +#define RGB_MATRIX_KEYPRESSES // reacts to keypresses +#define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) +#define RGB_MATRIX_FRAMEBUFFER_EFFECTS +#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects +#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended +#define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) +#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 +#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_PINWHEEL // Sets the default mode, if none has been set +#endif diff --git a/keyboards/handwired/hnah40rgb/hnah40rgb.c b/keyboards/handwired/hnah40rgb/hnah40rgb.c new file mode 100644 index 000000000000..2bf1373d910d --- /dev/null +++ b/keyboards/handwired/hnah40rgb/hnah40rgb.c @@ -0,0 +1,47 @@ +#include "hnah40rgb.h" +#ifdef RGB_MATRIX_ENABLE +#if defined (ansi) +led_config_t g_led_config = { { + //Key Matrix to LED Index + {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, + {22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12 }, + {23, 24, 25, 26, 27, 28, 29, 30, 31, NO_LED, 34}, + {43, 42, 41, NO_LED, NO_LED, NO_LED, 38, NO_LED, 36, 35, 11} +}, { + //LED Index to Physical Positon + { 0, 0}, { 20, 0}, { 40, 0 }, { 61, 0 }, { 81, 0}, { 101, 0}, { 122, 0}, { 142, 0}, { 162, 0}, { 183, 0}, { 224, 0}, { 224, 0}, + {224, 21}, {183, 21}, {162,21 }, {142, 21}, {122,21}, { 101,21}, { 81 ,21}, { 61 ,21}, { 40 ,21}, { 20 ,21}, { 0 ,21}, + { 0, 42}, { 20, 42}, { 40,42 }, { 61, 42}, { 81,42}, { 101,42}, { 122,42}, { 142,42}, { 162,42}, { 183,42}, { 224,42}, + {224, 64}, {224, 64}, {181,64 }, {162, 64}, {122,64}, {101,64}, { 61,64}, { 40,64}, { 20,64}, { 0,64}, + { 0,64}, { 0,0}, { 224,10}, { 224,18}, { 224,30}, { 224,47}, +}, { + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, +} }; + +#else +led_config_t g_led_config = { { + //Key Matrix to LED Index + {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, + {22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12 }, + {23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 34}, + {43, 42, 41, NO_LED, 40, 39, 38, 37, 36, 35, 11} +}, { + //LED Index to Physical Positon + { 0, 0}, { 20, 0}, { 40, 0 }, { 61, 0 }, { 81, 0}, { 101, 0}, { 122, 0}, { 142, 0}, { 162, 0}, { 183, 0}, { 224, 0}, { 224, 0}, + {224, 21}, {183, 21}, {162,21 }, {142, 21}, {122,21}, { 101,21}, { 81 ,21}, { 61 ,21}, { 40 ,21}, { 20 ,21}, { 0 ,21}, + { 0, 42}, { 20, 42}, { 40,42 }, { 61, 42}, { 81,42}, { 101,42}, { 122,42}, { 142,42}, { 162,42}, { 183,42}, { 224,42}, + {224, 64}, {224, 64}, {181,64 }, {162, 64}, {122,64}, {101,64}, { 61,64}, { 40,64}, { 20,64}, { 0,64}, + { 0,64}, { 0,0}, { 224,10}, { 224,18}, { 224,30}, { 224,47}, +}, { + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, +} }; +#endif +#endif \ No newline at end of file diff --git a/keyboards/handwired/hnah40rgb/hnah40rgb.h b/keyboards/handwired/hnah40rgb/hnah40rgb.h new file mode 100644 index 000000000000..182c68603a3e --- /dev/null +++ b/keyboards/handwired/hnah40rgb/hnah40rgb.h @@ -0,0 +1,44 @@ +/* Copyright 2019 HnahKB + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define LAYOUT_all( \ +k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k41, \ +k11, k12, k13, k14, k15, k16, k17, k18, k19, k20, k21, k22, \ +k23, k24, k25, k26, k27, k28, k29, k30, k31, k32, k33,\ +k34, k35, k36, k37, k38, k39, k40 \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10}, \ + {k11, k12, k13, k14, k15, k16, k17, k18, k19, k20, k21}, \ + {k22, k23, k24, k25, k26, k27, k28, k29, k30, k31, k32}, \ + {k33, k34, k35, KC_NO,k36, KC_NO, k37, k38, k39, k40, k41}, \ +} + +#define LAYOUT_ansi( \ +k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k41, \ +k11, k12, k13, k14, k15, k16, k17, k18, k19, k20, k21, \ +k22, k23, k24, k25, k26, k27, k28, k29, k30, k32,\ +k33, k34, k35, k38, k39, k40 \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10}, \ + {k11, k12, k13, k14, k15, k16, k17, k18, k19, k20, k21}, \ + {k22, k23, k24, k25, k26, k27, k28, k29, k30, KC_NO, k32}, \ + {k33, k34, k35, KC_NO, KC_NO, KC_NO, k38, KC_NO, k39, k40, k41}, \ +} diff --git a/keyboards/handwired/hnah40rgb/info.json b/keyboards/handwired/hnah40rgb/info.json new file mode 100644 index 000000000000..dd1b42325955 --- /dev/null +++ b/keyboards/handwired/hnah40rgb/info.json @@ -0,0 +1,100 @@ +{ + "keyboard_name": "Hnah40", + "url": "", + "maintainer": "HnahKB", + "width": 12, + "height": 4, + "layouts": { + "LAYOUT_all": { + "key_count": 42, + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"Q", "x":1, "y":0}, + {"label":"W", "x":2, "y":0}, + {"label":"E", "x":3, "y":0}, + {"label":"R", "x":4, "y":0}, + {"label":"T", "x":5, "y":0}, + {"label":"Y", "x":6, "y":0}, + {"label":"U", "x":7, "y":0}, + {"label":"I", "x":8, "y":0}, + {"label":"O", "x":9, "y":0}, + {"label":"P", "x":10, "y":0}, + {"label":"BSPC", "x":11, "y":0}, + {"label":"Caps Lock", "x":0, "y":1, "w":1.5}, + {"label":"A", "x":1.5, "y":1}, + {"label":"S", "x":2.5, "y":1}, + {"label":"D", "x":3.5, "y":1}, + {"label":"F", "x":4.5, "y":1}, + {"label":"G", "x":5.5, "y":1}, + {"label":"H", "x":6.5, "y":1}, + {"label":"J", "x":7.5, "y":1}, + {"label":"K", "x":8.5, "y":1}, + {"label":"L", "x":9.5, "y":1}, + {"label":"Enter", "x":10.5, "y":1, "w":1.5}, + {"label":"Shift", "x":0, "y":2, "w":1.75}, + {"label":"Z", "x":1.75, "y":2}, + {"label":"X", "x":2.75, "y":2}, + {"label":"C", "x":3.75, "y":2}, + {"label":"V", "x":4.75, "y":2}, + {"label":"B", "x":5.75, "y":2}, + {"label":"N", "x":6.75, "y":2}, + {"label":"M", "x":7.75, "y":2}, + {"label":",", "x":8.75, "y":2}, + {"label":".", "x":9.75, "y":2}, + {"label":"Shift", "x":10.75, "y":2, "w":1.25}, + {"label":"Ctrl", "x":0, "y":3, "w":1.25}, + {"label":"Win", "x":1.25, "y":3, "w":1}, + {"label":"Alt", "x":2.25, "y":3, "w":1.25}, + {"label":"Space", "x":3.5, "y":3, "w":2.25}, + {"label":"Space", "x":5.75, "y":3, "w":2.75}, + {"label":"App", "x":8.5, "y":3, "w":1.25}, + {"label":"Fn", "x":9.75, "y":3, "w":1}, + {"label":"Ctrl", "x":10.75, "y":3, "w":1.25} + ] + }, + "LAYOUT_ansi": { + "key_count": 39, + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"Q", "x":1, "y":0}, + {"label":"W", "x":2, "y":0}, + {"label":"E", "x":3, "y":0}, + {"label":"R", "x":4, "y":0}, + {"label":"T", "x":5, "y":0}, + {"label":"Y", "x":6, "y":0}, + {"label":"U", "x":7, "y":0}, + {"label":"I", "x":8, "y":0}, + {"label":"O", "x":9, "y":0}, + {"label":"P", "x":10, "y":0}, + {"label":"BSPC", "x":11, "y":0}, + {"label":"Caps Lock", "x":0, "y":1, "w":1.5}, + {"label":"A", "x":1.5, "y":1}, + {"label":"S", "x":2.5, "y":1}, + {"label":"D", "x":3.5, "y":1}, + {"label":"F", "x":4.5, "y":1}, + {"label":"G", "x":5.5, "y":1}, + {"label":"H", "x":6.5, "y":1}, + {"label":"J", "x":7.5, "y":1}, + {"label":"K", "x":8.5, "y":1}, + {"label":"L", "x":9.5, "y":1}, + {"label":"Enter", "x":10.5, "y":1, "w":1.5}, + {"label":"Shift", "x":0, "y":2, "w":1.75}, + {"label":"Z", "x":1.75, "y":2}, + {"label":"X", "x":2.75, "y":2}, + {"label":"C", "x":3.75, "y":2}, + {"label":"V", "x":4.75, "y":2}, + {"label":"B", "x":5.75, "y":2}, + {"label":"N", "x":6.75, "y":2}, + {"label":"M", "x":7.75, "y":2}, + {"label":",", "x":8.75, "y":2}, + {"label":"Shift", "x":9.75, "y":2, "w":2.25}, + {"label":"Ctrl", "x":0, "y":3, "w":1.25}, + {"label":"Win", "x":1.25, "y":3}, + {"label":"Alt", "x":2.25, "y":3, "w":1.25}, + {"label":"Space", "x":3.5, "y":3, "w":6}, + {"label":"App", "x":9.5, "y":3, "w":1.25}, + {"label":"Ctrl", "x":10.75, "y":3, "w":1.25} + ] + } + } +} diff --git a/keyboards/handwired/hnah40rgb/keymaps/ansi/config.h b/keyboards/handwired/hnah40rgb/keymaps/ansi/config.h new file mode 100644 index 000000000000..66cd76a901f0 --- /dev/null +++ b/keyboards/handwired/hnah40rgb/keymaps/ansi/config.h @@ -0,0 +1,18 @@ +/* Copyright 2019 HnahKB + * + * 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 . + */ + +#pragma once +#define ansi \ No newline at end of file diff --git a/keyboards/handwired/hnah40rgb/keymaps/ansi/keymap.c b/keyboards/handwired/hnah40rgb/keymaps/ansi/keymap.c new file mode 100644 index 000000000000..320f7d93e4fa --- /dev/null +++ b/keyboards/handwired/hnah40rgb/keymaps/ansi/keymap.c @@ -0,0 +1,67 @@ +/* Copyright 2019 HnahKB + * + * 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 . + */ +#include QMK_KEYBOARD_H + +enum hnah_layers{ + _BASE, + _L1, + _L2 +}; + +enum hnah_keycodes{ + BASE, + L1, + L2 +}; + +#define L1 MO(_L1) +#define L2 MO(_L2) + +// Defines the keycodes used by our macros in process_record_user + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_ansi(/* Base */ + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + LT(_L2,KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, L1, KC_RCTL ), + [_L1] = LAYOUT_ansi(/* Base */ + RESET, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_SCLN, KC_QUOT, + KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), + [_L2] = LAYOUT_ansi(/* Base */ + RGB_TOG, RGB_RMOD, KC_UP, RGB_MOD, RGB_HUI, RGB_VAI, RGB_SAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, RGB_HUD, RGB_VAD, RGB_SAD, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TAB, KC_TRNS, KC_TRNS ), +}; + +void rgb_matrix_indicators_user(void) +{ + if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) + { + rgb_matrix_set_color(22, 255, 255, 255); + } + if (IS_LAYER_ON(_L1)) + { + rgb_matrix_set_color(46, 255, 255, 255); + } + if (IS_LAYER_ON(_L2)) + { + rgb_matrix_set_color(45, 255, 255, 255); + } +} \ No newline at end of file diff --git a/keyboards/handwired/hnah40rgb/keymaps/ansi/readme.md b/keyboards/handwired/hnah40rgb/keymaps/ansi/readme.md new file mode 100644 index 000000000000..825a57ab07b1 --- /dev/null +++ b/keyboards/handwired/hnah40rgb/keymaps/ansi/readme.md @@ -0,0 +1 @@ +# The ansi keymap for hnah40rgb \ No newline at end of file diff --git a/keyboards/handwired/hnah40rgb/keymaps/default/config.h b/keyboards/handwired/hnah40rgb/keymaps/default/config.h new file mode 100644 index 000000000000..aa9325a59dbf --- /dev/null +++ b/keyboards/handwired/hnah40rgb/keymaps/default/config.h @@ -0,0 +1,17 @@ +/* Copyright 2019 HnahKB + * + * 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 . + */ + +#pragma once diff --git a/keyboards/handwired/hnah40rgb/keymaps/default/keymap.c b/keyboards/handwired/hnah40rgb/keymaps/default/keymap.c new file mode 100644 index 000000000000..2906f8bdbfe2 --- /dev/null +++ b/keyboards/handwired/hnah40rgb/keymaps/default/keymap.c @@ -0,0 +1,67 @@ +/* Copyright 2019 HnahKB + * + * 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 . + */ +#include QMK_KEYBOARD_H + +enum hnah_layers{ + _BASE, + _L1, + _L2 +}; + +enum hnah_keycodes{ + BASE, + L1, + L2 +}; + +#define L1 MO(_L1) +#define L2 MO(_L2) + +// Defines the keycodes used by our macros in process_record_user + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_all(/* Base */ + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + LT(_L2,KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_SPACE, KC_RALT, L1, KC_RCTL ), + [_L1] = LAYOUT_all(/* Base */ + RESET, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_SCLN, KC_QUOT, + KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_SLSH, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), + [_L2] = LAYOUT_all(/* Base */ + RGB_TOG, RGB_RMOD, KC_UP, RGB_MOD, RGB_HUI, RGB_VAI, RGB_SAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, RGB_HUD, RGB_VAD, RGB_SAD, RGB_SPD, KC_TRNS, KC_TRNS, KC_BSLS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TAB, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), +}; + +void rgb_matrix_indicators_user(void) +{ + if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) + { + rgb_matrix_set_color(22, 255, 255, 255); + } + if (IS_LAYER_ON(_L1)) + { + rgb_matrix_set_color(46, 255, 255, 255); + } + if (IS_LAYER_ON(_L2)) + { + rgb_matrix_set_color(45, 255, 255, 255); + } +} \ No newline at end of file diff --git a/keyboards/handwired/hnah40rgb/keymaps/default/readme.md b/keyboards/handwired/hnah40rgb/keymaps/default/readme.md new file mode 100644 index 000000000000..866686644d6c --- /dev/null +++ b/keyboards/handwired/hnah40rgb/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for hnah40rgb \ No newline at end of file diff --git a/keyboards/handwired/hnah40rgb/readme.md b/keyboards/handwired/hnah40rgb/readme.md new file mode 100644 index 000000000000..80876f8da263 --- /dev/null +++ b/keyboards/handwired/hnah40rgb/readme.md @@ -0,0 +1,14 @@ +# hnah40rgb + +![hnah40rgb](https://i.imgur.com/wmqx6oL.jpg) + +A 40 percent keyboard Hnah40v2 rgb version + +Keyboard Maintainer: [HnahKB](/~https://github.com/vuhopkep) +Hardware Availability: Hnah40V2 RGB + +Make example for this keyboard (after setting up your build environment): + + make handwired/hnah40rgb:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/handwired/hnah40rgb/rules.mk b/keyboards/handwired/hnah40rgb/rules.mk new file mode 100644 index 000000000000..5ad9f40c30a6 --- /dev/null +++ b/keyboards/handwired/hnah40rgb/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32A bootloadHID +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs +RGB_MATRIX_ENABLE = WS2812 \ No newline at end of file From 9160405d39d82ba787bac07ab569aa74d86d5082 Mon Sep 17 00:00:00 2001 From: skullydazed Date: Wed, 23 Oct 2019 21:14:00 -0700 Subject: [PATCH 168/316] Support for the upcoming 1UP Keyboards Sweet 16 rev2 (#7125) * Support for the upcoming 1up Keyboards Sweet 16 rev2 * Update keyboards/1upkeyboards/sweet16/rev1/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/1upkeyboards/sweet16/rev1/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/1upkeyboards/sweet16/rev2/promicro/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/1upkeyboards/sweet16/rev2/proton_c/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/1upkeyboards/sweet16/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/1upkeyboards/sweet16/rev1/rev1.c Co-Authored-By: fauxpark * Update keyboards/1upkeyboards/sweet16/rev1/rev1.c Co-Authored-By: fauxpark * Update keyboards/1upkeyboards/sweet16/rev1/rev1.c Co-Authored-By: fauxpark * Update keyboards/1upkeyboards/sweet16/rev1/rev1.c Co-Authored-By: fauxpark * Update keyboards/1upkeyboards/sweet16/rev1/rev1.c Co-Authored-By: fauxpark * Update keyboards/1upkeyboards/sweet16/rev1/rev1.c Co-Authored-By: fauxpark * Update keyboards/1upkeyboards/sweet16/rules.mk Co-Authored-By: fauxpark * Update keyboards/1upkeyboards/sweet16/rules.mk Co-Authored-By: fauxpark * Update keyboards/1upkeyboards/sweet16/rules.mk Co-Authored-By: fauxpark * Update keyboards/1upkeyboards/sweet16/rules.mk Co-Authored-By: fauxpark * Update keyboards/1upkeyboards/sweet16/rev1/rules.mk Co-Authored-By: Drashna Jaelre * Update keyboards/1upkeyboards/sweet16/rev2/promicro/rules.mk Co-Authored-By: Drashna Jaelre * tweak readme wording per @noroadsleft * Change rev to V * remove extraneous info.json files --- keyboards/1upkeyboards/sweet16/config.h | 27 +--------------- keyboards/1upkeyboards/sweet16/info.json | 2 +- .../sweet16/keymaps/default/keymap.c | 28 +++++++---------- keyboards/1upkeyboards/sweet16/readme.md | 17 +++++----- keyboards/1upkeyboards/sweet16/rules.mk | 27 ++++------------ keyboards/1upkeyboards/sweet16/v1/config.h | 28 +++++++++++++++++ keyboards/1upkeyboards/sweet16/v1/readme.md | 13 ++++++++ keyboards/1upkeyboards/sweet16/v1/rules.mk | 5 +++ keyboards/1upkeyboards/sweet16/v1/v1.c | 21 +++++++++++++ keyboards/1upkeyboards/sweet16/v1/v1.h | 30 ++++++++++++++++++ .../1upkeyboards/sweet16/v2/promicro/config.h | 31 +++++++++++++++++++ .../sweet16/v2/promicro/promicro.c | 8 +++++ .../sweet16/v2/promicro/promicro.h | 30 ++++++++++++++++++ .../sweet16/v2/promicro/readme.md | 13 ++++++++ .../1upkeyboards/sweet16/v2/promicro/rules.mk | 10 ++++++ .../1upkeyboards/sweet16/v2/proton_c/config.h | 20 ++++++++++++ .../sweet16/v2/proton_c/proton_c.c | 1 + .../sweet16/v2/proton_c/proton_c.h | 30 ++++++++++++++++++ .../sweet16/v2/proton_c/readme.md | 13 ++++++++ .../1upkeyboards/sweet16/v2/proton_c/rules.mk | 6 ++++ 20 files changed, 286 insertions(+), 74 deletions(-) create mode 100644 keyboards/1upkeyboards/sweet16/v1/config.h create mode 100644 keyboards/1upkeyboards/sweet16/v1/readme.md create mode 100644 keyboards/1upkeyboards/sweet16/v1/rules.mk create mode 100644 keyboards/1upkeyboards/sweet16/v1/v1.c create mode 100644 keyboards/1upkeyboards/sweet16/v1/v1.h create mode 100644 keyboards/1upkeyboards/sweet16/v2/promicro/config.h create mode 100644 keyboards/1upkeyboards/sweet16/v2/promicro/promicro.c create mode 100644 keyboards/1upkeyboards/sweet16/v2/promicro/promicro.h create mode 100644 keyboards/1upkeyboards/sweet16/v2/promicro/readme.md create mode 100644 keyboards/1upkeyboards/sweet16/v2/promicro/rules.mk create mode 100644 keyboards/1upkeyboards/sweet16/v2/proton_c/config.h create mode 100644 keyboards/1upkeyboards/sweet16/v2/proton_c/proton_c.c create mode 100644 keyboards/1upkeyboards/sweet16/v2/proton_c/proton_c.h create mode 100644 keyboards/1upkeyboards/sweet16/v2/proton_c/readme.md create mode 100644 keyboards/1upkeyboards/sweet16/v2/proton_c/rules.mk diff --git a/keyboards/1upkeyboards/sweet16/config.h b/keyboards/1upkeyboards/sweet16/config.h index 23b590c2c1c2..803d9f115139 100644 --- a/keyboards/1upkeyboards/sweet16/config.h +++ b/keyboards/1upkeyboards/sweet16/config.h @@ -4,8 +4,6 @@ /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x2010 -#define DEVICE_VER 0x0001 #define MANUFACTURER 1up Keyboards #define PRODUCT Sweet16 #define DESCRIPTION 4x4 grid @@ -14,34 +12,11 @@ #define MATRIX_ROWS 4 #define MATRIX_COLS 4 -/* key matrix pins */ -#define MATRIX_ROW_PINS { F4, F5, F6, F7 } -#define MATRIX_COL_PINS { D1, D0, D4, C6 } -#define UNUSED_PINS - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - /* number of backlight levels */ - -#ifdef BACKLIGHT_PIN -#define BACKLIGHT_LEVELS 3 -#endif - -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCE 5 +#define BACKLIGHT_LEVELS 10 /* 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 - -#define RGB_DI_PIN B1 -#ifdef RGB_DI_PIN -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 1 -#define RGBLIGHT_HUE_STEP 8 -#define RGBLIGHT_SAT_STEP 8 -#define RGBLIGHT_VAL_STEP 8 -#endif diff --git a/keyboards/1upkeyboards/sweet16/info.json b/keyboards/1upkeyboards/sweet16/info.json index 445a5909ecd7..c292f0364e18 100644 --- a/keyboards/1upkeyboards/sweet16/info.json +++ b/keyboards/1upkeyboards/sweet16/info.json @@ -1,7 +1,7 @@ { "keyboard_name": "Sweet 16", "url": "", - "maintainer": "qmk", + "maintainer": "skullydazed", "width": 4, "height": 4, "layouts": { diff --git a/keyboards/1upkeyboards/sweet16/keymaps/default/keymap.c b/keyboards/1upkeyboards/sweet16/keymaps/default/keymap.c index 4cc754dc164d..4778d2108cc3 100644 --- a/keyboards/1upkeyboards/sweet16/keymaps/default/keymap.c +++ b/keyboards/1upkeyboards/sweet16/keymaps/default/keymap.c @@ -25,21 +25,15 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } -void led_set_user(uint8_t usb_led) { - - #ifndef CONVERT_TO_PROTON_C - /* Map RXLED to USB_LED_NUM_LOCK */ - if (usb_led & (1 << USB_LED_NUM_LOCK)) { - DDRB |= (1 << 0); PORTB &= ~(1 << 0); - } else { - DDRB &= ~(1 << 0); PORTB &= ~(1 << 0); - } - - /* Map TXLED to USB_LED_CAPS_LOCK */ - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - DDRD |= (1 << 5); PORTD &= ~(1 << 5); - } else { - DDRD &= ~(1 << 5); PORTD &= ~(1 << 5); - } - #endif +#ifdef ENCODER_ENABLE +#include "encoder.h" +void encoder_update_user(int8_t index, bool clockwise) { + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } } +#endif diff --git a/keyboards/1upkeyboards/sweet16/readme.md b/keyboards/1upkeyboards/sweet16/readme.md index f096a5fc992a..0e3cbcaa6661 100644 --- a/keyboards/1upkeyboards/sweet16/readme.md +++ b/keyboards/1upkeyboards/sweet16/readme.md @@ -1,13 +1,12 @@ # Sweet 16 Macropad -A 4x4 numpad/macro pad sold by 1up Keyboards - designed by Bishop Keyboards +A 4x4 numpad/macro pad sold by 1up Keyboards. -Keyboard Maintainer: QMK Community -Hardware Supported: Sweet16 Keyboard PCB -Hardware Availability: [1up Keyboards](https://1upkeyboards.com/) +* Keyboard Maintainer: skullydazed +* Hardware Supported: Sweet16 Keyboard PCB +* Hardware Availability: [1up Keyboards](https://1upkeyboards.com/) -Make example for this keyboard (after setting up your build environment): - - make 1upkeyboards/sweet16:default - -See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). +Revisions: +* [v1](./v1/)- The original macropad, designed by Bishop Keyboards +* [v2/promicro](./v2/promicro)- The second macropad built with a Pro Micro, designed by Clueboard +* [v2/proton_c](./v2/proton_c)- The second macropad built with a Proton C, designed by Clueboard diff --git a/keyboards/1upkeyboards/sweet16/rules.mk b/keyboards/1upkeyboards/sweet16/rules.mk index 6e1a5eec9932..d7e57eb33eb5 100644 --- a/keyboards/1upkeyboards/sweet16/rules.mk +++ b/keyboards/1upkeyboards/sweet16/rules.mk @@ -1,27 +1,12 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp -BOOTLOADER = caterina - # 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) +DEFAULT_FOLDER = 1upkeyboards/sweet16/v1 +#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug 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 = no # Enable keyboard backlight functionality AUDIO_ENABLE = no -RGBLIGHT_ENABLE = yes -EXTRAFLAGS += -flto +RGBLIGHT_ENABLE = no diff --git a/keyboards/1upkeyboards/sweet16/v1/config.h b/keyboards/1upkeyboards/sweet16/v1/config.h new file mode 100644 index 000000000000..56fd16650cae --- /dev/null +++ b/keyboards/1upkeyboards/sweet16/v1/config.h @@ -0,0 +1,28 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define PRODUCT_ID 0x2010 +#define DEVICE_VER 0x0001 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { F4, F5, F6, F7 } +#define MATRIX_COL_PINS { D1, D0, D4, C6 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Underglow options */ +#define RGB_DI_PIN B1 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 1 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif diff --git a/keyboards/1upkeyboards/sweet16/v1/readme.md b/keyboards/1upkeyboards/sweet16/v1/readme.md new file mode 100644 index 000000000000..a36197006cfd --- /dev/null +++ b/keyboards/1upkeyboards/sweet16/v1/readme.md @@ -0,0 +1,13 @@ +# Sweet16 V1 + +A 4x4 numpad/macro pad sold by 1up Keyboards - designed by Bishop Keyboards + +* Keyboard Maintainer: QMK Community +* Hardware Supported: Sweet16 V1 PCB +* Hardware Availability: [1up Keyboards](https://1upkeyboards.com/) + +Make example for this keyboard (after setting up your build environment): + + make 1upkeyboards/sweet16/v1:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/1upkeyboards/sweet16/v1/rules.mk b/keyboards/1upkeyboards/sweet16/v1/rules.mk new file mode 100644 index 000000000000..0defba1f19f1 --- /dev/null +++ b/keyboards/1upkeyboards/sweet16/v1/rules.mk @@ -0,0 +1,5 @@ +MCU = atmega32u4 +BOOTLOADER = caterina +LINK_TIME_OPTIMIZATION_ENABLE=yes +RGBLIGHT_ENABLE = yes +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/1upkeyboards/sweet16/v1/v1.c b/keyboards/1upkeyboards/sweet16/v1/v1.c new file mode 100644 index 000000000000..053620d333c0 --- /dev/null +++ b/keyboards/1upkeyboards/sweet16/v1/v1.c @@ -0,0 +1,21 @@ +#include "v1.h" + +void led_set_kb(uint8_t usb_led) { +#ifndef CONVERT_TO_PROTON_C + /* Map RXLED to USB_LED_NUM_LOCK */ + if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { + setPinOutput(B0); + writePinLow(B0); + } else { + setPinInput(B0); + } + + /* Map TXLED to USB_LED_CAPS_LOCK */ + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + setPinOutput(D5); + writePinLow(D5); + } else { + setPinInput(D5); + } +#endif +} diff --git a/keyboards/1upkeyboards/sweet16/v1/v1.h b/keyboards/1upkeyboards/sweet16/v1/v1.h new file mode 100644 index 000000000000..7320ccd9e074 --- /dev/null +++ b/keyboards/1upkeyboards/sweet16/v1/v1.h @@ -0,0 +1,30 @@ +#pragma once + +#include "quantum.h" + +// Any changes to the layout names and/or definitions must also be made to info.json + +#define LAYOUT_ortho_4x4( \ + K00, K01, K02, K03, \ + K10, K11, K12, K13, \ + K20, K21, K22, K23, \ + K30, K31, K32, K33 \ +) { \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, K13 }, \ + { K20, K21, K22, K23 }, \ + { K30, K31, K32, K33 } \ +} + +#define LAYOUT_numpad_4x4( \ + K00, K01, K02, K03, \ + K10, K11, K12, \ + K20, K21, K22, K23, \ + K31, K32 \ +) { \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, KC_NO }, \ + { K20, K21, K22, K23 }, \ + { KC_NO, K31, K32, KC_NO } \ +} + diff --git a/keyboards/1upkeyboards/sweet16/v2/promicro/config.h b/keyboards/1upkeyboards/sweet16/v2/promicro/config.h new file mode 100644 index 000000000000..bd50b69608a5 --- /dev/null +++ b/keyboards/1upkeyboards/sweet16/v2/promicro/config.h @@ -0,0 +1,31 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define PRODUCT_ID 0x2011 +#define DEVICE_VER 0x0001 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { D4, D1, E6, B5 } +#define MATRIX_COL_PINS { F7, F6, D2, D3 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION ROW2COL + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Encoder pins */ +#define ENCODERS_PAD_A { F4 } +#define ENCODERS_PAD_B { F5 } +#define ENCODER_RESOLUTION 4 + +/* Underglow options */ +#define RGB_DI_PIN F4 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 1 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 diff --git a/keyboards/1upkeyboards/sweet16/v2/promicro/promicro.c b/keyboards/1upkeyboards/sweet16/v2/promicro/promicro.c new file mode 100644 index 000000000000..0176dc1a3c18 --- /dev/null +++ b/keyboards/1upkeyboards/sweet16/v2/promicro/promicro.c @@ -0,0 +1,8 @@ +#include "promicro.h" +#include "encoder.h" + +#ifdef ENCODER_ENABLED +void encoder_update_kb(int8_t index, bool clockwise) { + encoder_update_user(index, clockwise); +} +#endif diff --git a/keyboards/1upkeyboards/sweet16/v2/promicro/promicro.h b/keyboards/1upkeyboards/sweet16/v2/promicro/promicro.h new file mode 100644 index 000000000000..7320ccd9e074 --- /dev/null +++ b/keyboards/1upkeyboards/sweet16/v2/promicro/promicro.h @@ -0,0 +1,30 @@ +#pragma once + +#include "quantum.h" + +// Any changes to the layout names and/or definitions must also be made to info.json + +#define LAYOUT_ortho_4x4( \ + K00, K01, K02, K03, \ + K10, K11, K12, K13, \ + K20, K21, K22, K23, \ + K30, K31, K32, K33 \ +) { \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, K13 }, \ + { K20, K21, K22, K23 }, \ + { K30, K31, K32, K33 } \ +} + +#define LAYOUT_numpad_4x4( \ + K00, K01, K02, K03, \ + K10, K11, K12, \ + K20, K21, K22, K23, \ + K31, K32 \ +) { \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, KC_NO }, \ + { K20, K21, K22, K23 }, \ + { KC_NO, K31, K32, KC_NO } \ +} + diff --git a/keyboards/1upkeyboards/sweet16/v2/promicro/readme.md b/keyboards/1upkeyboards/sweet16/v2/promicro/readme.md new file mode 100644 index 000000000000..584b446511d9 --- /dev/null +++ b/keyboards/1upkeyboards/sweet16/v2/promicro/readme.md @@ -0,0 +1,13 @@ +# Sweet16 V2 (Pro Micro) + +A 4x4 numpad/macro pad sold by 1up Keyboards - designed by Clueboard + +* Keyboard Maintainer: skullydazed +* Hardware Supported: Sweet16 V2 PCB, Pro Micro +* Hardware Availability: [1up Keyboards](https://1upkeyboards.com/) + +Make example for this keyboard (after setting up your build environment): + + make 1upkeyboards/sweet16/v2/promicro:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/1upkeyboards/sweet16/v2/promicro/rules.mk b/keyboards/1upkeyboards/sweet16/v2/promicro/rules.mk new file mode 100644 index 000000000000..4b08a7e6b004 --- /dev/null +++ b/keyboards/1upkeyboards/sweet16/v2/promicro/rules.mk @@ -0,0 +1,10 @@ +MCU = atmega32u4 +BOOTLOADER = caterina +LINK_TIME_OPTIMIZATION_ENABLE=yes + +## Features +CONSOLE_ENABLE = yes + +## On a Pro Micro you have to choose between underglow and the rotary encoder. +RGBLIGHT_ENABLE = no +ENCODER_ENABLE = yes diff --git a/keyboards/1upkeyboards/sweet16/v2/proton_c/config.h b/keyboards/1upkeyboards/sweet16/v2/proton_c/config.h new file mode 100644 index 000000000000..6f27f0b623b8 --- /dev/null +++ b/keyboards/1upkeyboards/sweet16/v2/proton_c/config.h @@ -0,0 +1,20 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define PRODUCT_ID 0x2011 +#define DEVICE_VER 0x0001 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { B5, B7, B2, B0 } +#define MATRIX_COL_PINS { B8, A0, A10, A9 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION ROW2COL + +/* Encoder pins */ +#define ENCODERS_PAD_A { A2 } +#define ENCODERS_PAD_B { A1 } +#define ENCODER_RESOLUTION 4 diff --git a/keyboards/1upkeyboards/sweet16/v2/proton_c/proton_c.c b/keyboards/1upkeyboards/sweet16/v2/proton_c/proton_c.c new file mode 100644 index 000000000000..b08e33e81b01 --- /dev/null +++ b/keyboards/1upkeyboards/sweet16/v2/proton_c/proton_c.c @@ -0,0 +1 @@ +#include "proton_c.h" diff --git a/keyboards/1upkeyboards/sweet16/v2/proton_c/proton_c.h b/keyboards/1upkeyboards/sweet16/v2/proton_c/proton_c.h new file mode 100644 index 000000000000..7320ccd9e074 --- /dev/null +++ b/keyboards/1upkeyboards/sweet16/v2/proton_c/proton_c.h @@ -0,0 +1,30 @@ +#pragma once + +#include "quantum.h" + +// Any changes to the layout names and/or definitions must also be made to info.json + +#define LAYOUT_ortho_4x4( \ + K00, K01, K02, K03, \ + K10, K11, K12, K13, \ + K20, K21, K22, K23, \ + K30, K31, K32, K33 \ +) { \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, K13 }, \ + { K20, K21, K22, K23 }, \ + { K30, K31, K32, K33 } \ +} + +#define LAYOUT_numpad_4x4( \ + K00, K01, K02, K03, \ + K10, K11, K12, \ + K20, K21, K22, K23, \ + K31, K32 \ +) { \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, KC_NO }, \ + { K20, K21, K22, K23 }, \ + { KC_NO, K31, K32, KC_NO } \ +} + diff --git a/keyboards/1upkeyboards/sweet16/v2/proton_c/readme.md b/keyboards/1upkeyboards/sweet16/v2/proton_c/readme.md new file mode 100644 index 000000000000..6806cc5739ec --- /dev/null +++ b/keyboards/1upkeyboards/sweet16/v2/proton_c/readme.md @@ -0,0 +1,13 @@ +# Sweet16 V2 (Proton C) + +A 4x4 numpad/macro pad sold by 1up Keyboards - designed by Clueboard + +* Keyboard Maintainer: skullydazed +* Hardware Supported: Sweet16 V2 PCB, Proton C +* Hardware Availability: [1up Keyboards](https://1upkeyboards.com/) + +Make example for this keyboard (after setting up your build environment): + + make 1upkeyboards/sweet16/v2/proton_c:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/1upkeyboards/sweet16/v2/proton_c/rules.mk b/keyboards/1upkeyboards/sweet16/v2/proton_c/rules.mk new file mode 100644 index 000000000000..3bfa1623fd73 --- /dev/null +++ b/keyboards/1upkeyboards/sweet16/v2/proton_c/rules.mk @@ -0,0 +1,6 @@ +MCU = STM32F303 + +## Features +CONSOLE_ENABLE = yes +ENCODER_ENABLE = yes +AUDIO_ENABLE = yes From 4da9d2ef6f3f3a91738a209f8e692d7294ef70d5 Mon Sep 17 00:00:00 2001 From: "J.Flanagan" Date: Wed, 23 Oct 2019 23:36:40 -0500 Subject: [PATCH 169/316] [Keyboard] Add GTM Pad macropad (#7123) * initial commit begin development of Grand Theft Macro Pad (2key2crawl clone) * Minor Changes Changes to readme.md Changes to config.h matrix pins Changes to gtm.h layout Changes to rules.mk * initial commit begin development of Grand Theft Macro Pad (2key2crawl clone) * Minor Changes Changes to readme.md Changes to config.h matrix pins Changes to gtm.h layout Changes to rules.mk * Update keyboards/sck/gtm/readme.md Co-Authored-By: fauxpark * Update keyboards/sck/gtm/readme.md Co-Authored-By: fauxpark * Update keyboards/sck/gtm/rules.mk Co-Authored-By: fauxpark * Update keyboards/sck/gtm/rules.mk Co-Authored-By: fauxpark * Update keyboards/sck/gtm/rules.mk Co-Authored-By: fauxpark * Update keyboards/sck/gtm/rules.mk Co-Authored-By: fauxpark * Update keyboards/sck/gtm/rules.mk Co-Authored-By: fauxpark * Update keyboards/sck/gtm/rules.mk Co-Authored-By: fauxpark * Update keyboards/sck/gtm/rules.mk Co-Authored-By: fauxpark * Update keyboards/sck/gtm/rules.mk Co-Authored-By: fauxpark * Changes to gtm.h Changes to layout to be correct for matrix_cols and matrix_col_pins * Minor Changes Removed rotary encoder index in keymaps per suggestion --- keyboards/sck/gtm/config.h | 44 ++++++++++++++++++++++ keyboards/sck/gtm/gtm.c | 1 + keyboards/sck/gtm/gtm.h | 12 ++++++ keyboards/sck/gtm/keymaps/default/keymap.c | 24 ++++++++++++ keyboards/sck/gtm/keymaps/tabs/keymap.c | 24 ++++++++++++ keyboards/sck/gtm/keymaps/vol/keymap.c | 23 +++++++++++ keyboards/sck/gtm/readme.md | 16 ++++++++ keyboards/sck/gtm/rules.mk | 27 +++++++++++++ 8 files changed, 171 insertions(+) create mode 100644 keyboards/sck/gtm/config.h create mode 100644 keyboards/sck/gtm/gtm.c create mode 100644 keyboards/sck/gtm/gtm.h create mode 100644 keyboards/sck/gtm/keymaps/default/keymap.c create mode 100644 keyboards/sck/gtm/keymaps/tabs/keymap.c create mode 100644 keyboards/sck/gtm/keymaps/vol/keymap.c create mode 100644 keyboards/sck/gtm/readme.md create mode 100644 keyboards/sck/gtm/rules.mk diff --git a/keyboards/sck/gtm/config.h b/keyboards/sck/gtm/config.h new file mode 100644 index 000000000000..952f484bde24 --- /dev/null +++ b/keyboards/sck/gtm/config.h @@ -0,0 +1,44 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6090 +#define DEVICE_VER 0x0002 +#define MANUFACTURER SpaceCityKeyboards +#define PRODUCT GTM Pad +#define DESCRIPTION Grand Theft Macro Pad + +/* key matrix size */ +#define MATRIX_ROWS 3 +#define MATRIX_COLS 6 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { C4, C5, D1 } +#define MATRIX_COL_PINS { B4, B5, B6, B7, C7, D0 } +#define UNUSED_PINS + + +#define ENCODERS_PAD_A { D2 } +#define ENCODERS_PAD_B { D3 } +#define ENCODER_RESOLUTION 1 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 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 + + +#ifdef RGBLIGHT_ENABLE +#define RGB_DI_PIN B0 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 4 +#endif diff --git a/keyboards/sck/gtm/gtm.c b/keyboards/sck/gtm/gtm.c new file mode 100644 index 000000000000..6adb9b39b655 --- /dev/null +++ b/keyboards/sck/gtm/gtm.c @@ -0,0 +1 @@ +#include "gtm.h" diff --git a/keyboards/sck/gtm/gtm.h b/keyboards/sck/gtm/gtm.h new file mode 100644 index 000000000000..47625f417f78 --- /dev/null +++ b/keyboards/sck/gtm/gtm.h @@ -0,0 +1,12 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K00, K01, K02, K03, K04, \ + K10, K11, K12, K13, K14, K25 \ +) { \ + { K00, K01, K02, K03, K04, KC_NO }, \ + { K10, K11, K12, K13, K14, KC_NO }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K25 }, \ +} diff --git a/keyboards/sck/gtm/keymaps/default/keymap.c b/keyboards/sck/gtm/keymaps/default/keymap.c new file mode 100644 index 000000000000..218a1d107e62 --- /dev/null +++ b/keyboards/sck/gtm/keymaps/default/keymap.c @@ -0,0 +1,24 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_5, + KC_6, KC_7, KC_8, KC_9, KC_0, KC_ENTER), + +}; + +void matrix_init_user(void) { + debug_config.matrix = 1; + debug_config.keyboard = 1; + debug_config.enable = 1; +} + +void encoder_update_user(int8_t index, bool clockwise) { + if (clockwise) { + tap_code(KC_PGUP); + } else { + tap_code(KC_PGDN); + } +} + diff --git a/keyboards/sck/gtm/keymaps/tabs/keymap.c b/keyboards/sck/gtm/keymaps/tabs/keymap.c new file mode 100644 index 000000000000..9a60e0f05341 --- /dev/null +++ b/keyboards/sck/gtm/keymaps/tabs/keymap.c @@ -0,0 +1,24 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_5, + KC_6, KC_7, KC_8, KC_9, KC_0, KC_ENTER), + +}; + +void matrix_init_user(void) { + debug_config.matrix = 1; + debug_config.keyboard = 1; + debug_config.enable = 1; +} + +void encoder_update_user(int8_t index, bool clockwise) { + if (clockwise) { + tap_code16(C(KC_T)); + } else { + tap_code16(C(KC_W)); + } +} + diff --git a/keyboards/sck/gtm/keymaps/vol/keymap.c b/keyboards/sck/gtm/keymaps/vol/keymap.c new file mode 100644 index 000000000000..e3d01439d34e --- /dev/null +++ b/keyboards/sck/gtm/keymaps/vol/keymap.c @@ -0,0 +1,23 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_5, + KC_6, KC_7, KC_8, KC_9, KC_0, KC_ENTER), + +}; + +void matrix_init_user(void) { + debug_config.matrix = 1; + debug_config.keyboard = 1; + debug_config.enable = 1; +} + +void encoder_update_user(int8_t index, bool clockwise) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } +} diff --git a/keyboards/sck/gtm/readme.md b/keyboards/sck/gtm/readme.md new file mode 100644 index 000000000000..d46716735e71 --- /dev/null +++ b/keyboards/sck/gtm/readme.md @@ -0,0 +1,16 @@ +# Grand Theft Macro Pad + +![Grand Theft Macropad](https://i.imgur.com/ON7m7RI.jpg) + +A 2x5 macropad/numpad with a rotary encoder, cloned from the 2Key2Crawl macropad that was exclusively available at Austin Keycrawl 2018 (12-01-2018). + +Keyboard Maintainer: jrfhoutx +Keyboard Designer: [jrfhoutx](/~https://github.com/jrfhoutx) +Hardware Supported: GTM Pad +Hardware Availability: Coming Soon + +Make example for this keyboard (after setting up your build environment): + + make sck/gtm:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/sck/gtm/rules.mk b/keyboards/sck/gtm/rules.mk new file mode 100644 index 000000000000..a6320386fa17 --- /dev/null +++ b/keyboards/sck/gtm/rules.mk @@ -0,0 +1,27 @@ +# MCU name +MCU = atmega32u2 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +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 = no # [Crawlpad] Custom backlighting code is used, so this should not be enabled +AUDIO_ENABLE = no # [Crawlpad] This can be enabled if a speaker is connected to the expansion port. Not compatible with RGBLIGHT below +RGBLIGHT_ENABLE = yes # [Crawlpad] This can be enabled if a ws2812 strip is connected to the expansion port. +ENCODER_ENABLE = yes # [2Key2crawl] Make the knobs turn From a5a31a5fc0f14f4f66cf362ee85747be159e364d Mon Sep 17 00:00:00 2001 From: Erovia Date: Sun, 13 Oct 2019 20:23:11 +0200 Subject: [PATCH 170/316] MILC: Use dashes instead of underscores for subcommands The subcommand functions' name follows the Python convention of using snake case, but looks odd on the command line. Fix it by converting underscores to dashes, eg.: list_keyboards -> list-keyboards. --- docs/cli.md | 4 ++-- lib/python/milc.py | 7 ++++--- lib/python/qmk/tests/test_cli_commands.py | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/cli.md b/docs/cli.md index d150ee917de5..0d3703c8cf0f 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -125,14 +125,14 @@ This command examines your environment and alerts you to potential build or flas qmk doctor ``` -## `qmk list_keyboards` +## `qmk list-keyboards` This command lists all the keyboards currently defined in `qmk_firmware` **Usage**: ``` -qmk list_keyboards +qmk list-keyboards ``` ## `qmk new-keymap` diff --git a/lib/python/milc.py b/lib/python/milc.py index 1a29bb25c864..7b130bdea606 100644 --- a/lib/python/milc.py +++ b/lib/python/milc.py @@ -429,11 +429,12 @@ def argument_function(handler): self.arg_only.append(arg_name) del kwargs['arg_only'] + name = handler.__name__.replace("_", "-") if handler is self._entrypoint: self.add_argument(*args, **kwargs) - elif handler.__name__ in self.subcommands: - self.subcommands[handler.__name__].add_argument(*args, **kwargs) + elif name in self.subcommands: + self.subcommands[name].add_argument(*args, **kwargs) else: raise RuntimeError('Decorated function is not entrypoint or subcommand!') @@ -599,7 +600,7 @@ def add_subcommand(self, handler, description, name=None, **kwargs): self.add_subparsers() if not name: - name = handler.__name__ + name = handler.__name__.replace("_", "-") self.acquire_lock() kwargs['help'] = description diff --git a/lib/python/qmk/tests/test_cli_commands.py b/lib/python/qmk/tests/test_cli_commands.py index c9d632517bdc..9a9dc4b958af 100644 --- a/lib/python/qmk/tests/test_cli_commands.py +++ b/lib/python/qmk/tests/test_cli_commands.py @@ -40,7 +40,7 @@ def test_pyformat(): def test_list_keyboards(): - result = check_subcommand('list_keyboards') + result = check_subcommand('list-keyboards') assert result.returncode == 0 # check to see if a known keyboard is returned # this will fail if handwired/onekey/pytest is removed From 335dd0271e344fec1a0f086b34da6f8ae0d8bd60 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Thu, 24 Oct 2019 12:08:29 -0700 Subject: [PATCH 171/316] Fix Tap Dance name for consistency and to match docs (#7136) --- quantum/process_keycode/process_tap_dance.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quantum/process_keycode/process_tap_dance.h b/quantum/process_keycode/process_tap_dance.h index 8d227dfd70fa..8f3f3ff3c607 100644 --- a/quantum/process_keycode/process_tap_dance.h +++ b/quantum/process_keycode/process_tap_dance.h @@ -65,7 +65,7 @@ typedef struct { # define ACTION_TAP_DANCE_DUAL_ROLE(kc, layer) \ { .fn = { qk_tap_dance_dual_role_on_each_tap, qk_tap_dance_dual_role_finished, qk_tap_dance_dual_role_reset }, .user_data = (void *)&((qk_tap_dance_dual_role_t) { kc, layer, layer_move }), } -# define ACTION_TAP_DANCE_TOGGLE_LAYER(kc, layer) \ +# define ACTION_TAP_DANCE_LAYER_TOGGLE(kc, layer) \ { .fn = { NULL, qk_tap_dance_dual_role_finished, qk_tap_dance_dual_role_reset }, .user_data = (void *)&((qk_tap_dance_dual_role_t) { kc, layer, layer_invert }), } # define ACTION_TAP_DANCE_LAYER_MOVE(kc, layer) ACTION_TAP_DANCE_DUAL_ROLE(kc, layer) From e96cac0814995e2a0735708727cbab599d6cf5f1 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Fri, 25 Oct 2019 07:50:13 +1100 Subject: [PATCH 172/316] Cleanup rules.mk for 32U4 keyboards, L-M (#7120) * Cleanup rules.mk for 32U4 keyboards, L-M * Move some stuff to keyboard level --- keyboards/laptreus/rules.mk | 48 +++----------- keyboards/launchpad/keymaps/default/rules.mk | 22 ------- .../launchpad/keymaps/default_rgb/rules.mk | 2 +- keyboards/launchpad/rev1/rules.mk | 3 - keyboards/launchpad/rules.mk | 51 +++------------ keyboards/lazydesigners/dimple/rules.mk | 40 +----------- keyboards/lazydesigners/the50/rules.mk | 43 +++---------- keyboards/lazydesigners/the60/rules.mk | 43 +++---------- keyboards/lets_split/keymaps/default/rules.mk | 0 keyboards/lets_split/rev1/rules.mk | 1 - keyboards/lets_split/rev2/rules.mk | 1 - keyboards/lets_split/rules.mk | 38 +---------- keyboards/lets_split_eh/eh/rules.mk | 2 - .../lets_split_eh/keymaps/default/rules.mk | 0 keyboards/lets_split_eh/rules.mk | 48 +++----------- .../lfk65_hs/keymaps/default/rules.mk | 0 keyboards/lfkeyboards/lfk65_hs/rules.mk | 12 ---- keyboards/lfkeyboards/lfkpad/rules.mk | 20 +++--- keyboards/lily58/rev1/rules.mk | 2 +- keyboards/lily58/rules.mk | 52 +++------------ keyboards/m10a/keymaps/default/rules.mk | 0 keyboards/m10a/rules.mk | 52 +++------------ keyboards/maartenwut/atom47/rev2/rules.mk | 1 - keyboards/maartenwut/atom47/rules.mk | 55 +++------------- .../maartenwut/plain60/keymaps/via/rules.mk | 1 - keyboards/maartenwut/plain60/rules.mk | 54 +++------------- keyboards/maartenwut/ta65/rules.mk | 51 +++------------ keyboards/maartenwut/wasdat/rules.mk | 51 +-------------- keyboards/maartenwut/wonderland/rules.mk | 46 +++----------- keyboards/maxipad/promicro/rules.mk | 50 +-------------- keyboards/maxipad/teensy2/rules.mk | 50 +-------------- .../maxr1998/phoebe/keymaps/default/rules.mk | 0 keyboards/maxr1998/phoebe/rules.mk | 13 ++-- .../maxr1998/pulse4k/keymaps/default/rules.mk | 0 keyboards/maxr1998/pulse4k/rules.mk | 16 ++--- keyboards/mechkeys/mk60/rules.mk | 51 +-------------- keyboards/mechllama/g35/rules.mk | 14 +++-- keyboards/mechmini/v2/rules.mk | 53 +++------------- keyboards/meira/featherble/rules.mk | 4 +- keyboards/meira/promicro/rules.mk | 13 ---- keyboards/meira/rules.mk | 35 +---------- keyboards/meishi/rules.mk | 54 +++------------- keyboards/meishi2/rules.mk | 51 +-------------- keyboards/melody96/rules.mk | 47 +++----------- keyboards/meson/rules.mk | 51 +-------------- keyboards/miniaxe/keymaps/underglow/rules.mk | 3 +- keyboards/miniaxe/rules.mk | 52 +-------------- keyboards/minidox/rev1/rules.mk | 2 +- keyboards/minidox/rules.mk | 56 ++++------------- keyboards/mint60/rules.mk | 63 ++++--------------- keyboards/mitosis/rules.mk | 63 +++++-------------- keyboards/miuni32/keymaps/default/rules.mk | 18 ------ keyboards/miuni32/rules.mk | 59 ++++------------- keyboards/model01/keymaps/default/rules.mk | 2 - keyboards/model01/rules.mk | 53 ++++------------ keyboards/moon/rules.mk | 40 +----------- keyboards/mt980/rules.mk | 44 +++---------- keyboards/mxss/rules.mk | 54 +++------------- 58 files changed, 269 insertions(+), 1481 deletions(-) delete mode 100644 keyboards/launchpad/keymaps/default/rules.mk delete mode 100644 keyboards/lets_split/keymaps/default/rules.mk delete mode 100644 keyboards/lets_split_eh/keymaps/default/rules.mk delete mode 100644 keyboards/lfkeyboards/lfk65_hs/keymaps/default/rules.mk delete mode 100644 keyboards/m10a/keymaps/default/rules.mk delete mode 100644 keyboards/maxr1998/phoebe/keymaps/default/rules.mk delete mode 100644 keyboards/maxr1998/pulse4k/keymaps/default/rules.mk delete mode 100644 keyboards/miuni32/keymaps/default/rules.mk delete mode 100644 keyboards/model01/keymaps/default/rules.mk diff --git a/keyboards/laptreus/rules.mk b/keyboards/laptreus/rules.mk index 01401ab38562..237a6ac8ba7f 100644 --- a/keyboards/laptreus/rules.mk +++ b/keyboards/laptreus/rules.mk @@ -1,46 +1,18 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. +# Processor frequency F_CPU = 8000000 -# -# 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) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. -BOOTLOADER = catarina - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina # Build Options # change to "no" to disable the options, or define them in the Makefile in diff --git a/keyboards/launchpad/keymaps/default/rules.mk b/keyboards/launchpad/keymaps/default/rules.mk deleted file mode 100644 index d1fa27f41efb..000000000000 --- a/keyboards/launchpad/keymaps/default/rules.mk +++ /dev/null @@ -1,22 +0,0 @@ - - -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # 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 -NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - diff --git a/keyboards/launchpad/keymaps/default_rgb/rules.mk b/keyboards/launchpad/keymaps/default_rgb/rules.mk index 164232f3398c..1e3cebb14515 100644 --- a/keyboards/launchpad/keymaps/default_rgb/rules.mk +++ b/keyboards/launchpad/keymaps/default_rgb/rules.mk @@ -1 +1 @@ -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. \ No newline at end of file +RGBLIGHT_ENABLE = yes diff --git a/keyboards/launchpad/rev1/rules.mk b/keyboards/launchpad/rev1/rules.mk index bafce654ada4..e69de29bb2d1 100644 --- a/keyboards/launchpad/rev1/rules.mk +++ b/keyboards/launchpad/rev1/rules.mk @@ -1,3 +0,0 @@ -BACKLIGHT_ENABLE = no -RGBLIGHT_ENABLE = no -AUDIO_ENABLE = no \ No newline at end of file diff --git a/keyboards/launchpad/rules.mk b/keyboards/launchpad/rules.mk index b2c64db7a27b..59b285cf53fa 100644 --- a/keyboards/launchpad/rules.mk +++ b/keyboards/launchpad/rules.mk @@ -1,47 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically @@ -50,8 +19,8 @@ BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/lazydesigners/dimple/rules.mk b/keyboards/lazydesigners/dimple/rules.mk index a818e871c69f..99e4911afaba 100644 --- a/keyboards/lazydesigners/dimple/rules.mk +++ b/keyboards/lazydesigners/dimple/rules.mk @@ -1,50 +1,14 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu # Build Options diff --git a/keyboards/lazydesigners/the50/rules.mk b/keyboards/lazydesigners/the50/rules.mk index ae211ec66e8d..561e38a99791 100644 --- a/keyboards/lazydesigners/the50/rules.mk +++ b/keyboards/lazydesigners/the50/rules.mk @@ -1,41 +1,14 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu # Build Options diff --git a/keyboards/lazydesigners/the60/rules.mk b/keyboards/lazydesigners/the60/rules.mk index 76fb44b2c884..97ea15d34a57 100644 --- a/keyboards/lazydesigners/the60/rules.mk +++ b/keyboards/lazydesigners/the60/rules.mk @@ -1,41 +1,14 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu # Build Options diff --git a/keyboards/lets_split/keymaps/default/rules.mk b/keyboards/lets_split/keymaps/default/rules.mk deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/keyboards/lets_split/rev1/rules.mk b/keyboards/lets_split/rev1/rules.mk index f845616741c2..e69de29bb2d1 100644 --- a/keyboards/lets_split/rev1/rules.mk +++ b/keyboards/lets_split/rev1/rules.mk @@ -1 +0,0 @@ -BACKLIGHT_ENABLE = no \ No newline at end of file diff --git a/keyboards/lets_split/rev2/rules.mk b/keyboards/lets_split/rev2/rules.mk index 7b30c0beff2a..e69de29bb2d1 100644 --- a/keyboards/lets_split/rev2/rules.mk +++ b/keyboards/lets_split/rev2/rules.mk @@ -1 +0,0 @@ -BACKLIGHT_ENABLE = no diff --git a/keyboards/lets_split/rules.mk b/keyboards/lets_split/rules.mk index 4899657357fa..98736310c626 100644 --- a/keyboards/lets_split/rules.mk +++ b/keyboards/lets_split/rules.mk @@ -1,50 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically diff --git a/keyboards/lets_split_eh/eh/rules.mk b/keyboards/lets_split_eh/eh/rules.mk index c0f8760d895a..31077066a364 100644 --- a/keyboards/lets_split_eh/eh/rules.mk +++ b/keyboards/lets_split_eh/eh/rules.mk @@ -1,4 +1,2 @@ -BOOTLOADER = atmel-dfu - BACKLIGHT_ENABLE = yes RGBLIGHT_ENABLE = yes diff --git a/keyboards/lets_split_eh/keymaps/default/rules.mk b/keyboards/lets_split_eh/keymaps/default/rules.mk deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/keyboards/lets_split_eh/rules.mk b/keyboards/lets_split_eh/rules.mk index 27661cebb4e7..2bcd087d8242 100644 --- a/keyboards/lets_split_eh/rules.mk +++ b/keyboards/lets_split_eh/rules.mk @@ -1,48 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically diff --git a/keyboards/lfkeyboards/lfk65_hs/keymaps/default/rules.mk b/keyboards/lfkeyboards/lfk65_hs/keymaps/default/rules.mk deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/keyboards/lfkeyboards/lfk65_hs/rules.mk b/keyboards/lfkeyboards/lfk65_hs/rules.mk index 5118c359778d..bfae80e0c709 100644 --- a/keyboards/lfkeyboards/lfk65_hs/rules.mk +++ b/keyboards/lfkeyboards/lfk65_hs/rules.mk @@ -6,15 +6,3 @@ BOOT_LOADER = BootloaderHID # Extra source files for IS3731 lighting SRC = TWIlib.c issi.c lighting.c - -# Processor frequency. -F_CPU = 16000000 - -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT diff --git a/keyboards/lfkeyboards/lfkpad/rules.mk b/keyboards/lfkeyboards/lfkpad/rules.mk index 83553f64cb35..7ed840ae9fe3 100644 --- a/keyboards/lfkeyboards/lfkpad/rules.mk +++ b/keyboards/lfkeyboards/lfkpad/rules.mk @@ -1,14 +1,15 @@ -SRC = TWIlib.c issi.c lighting.c - +# MCU name MCU = atmega32u4 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 -F_CPU = 16000000 -F_USB = $(F_CPU) -ARCH = AVR8 - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu LAYOUTS = numpad_6x4 @@ -31,6 +32,7 @@ TAP_DANCE_ENABLE = no ISSI_ENABLE = yes # If the I2C pullup resistors aren't install this must be disabled WATCHDOG_ENABLE = no # Resets keyboard if matrix_scan isn't run every 250ms +SRC = TWIlib.c issi.c lighting.c ifeq ($(strip $(ISSI_ENABLE)), yes) TMK_COMMON_DEFS += -DISSI_ENABLE diff --git a/keyboards/lily58/rev1/rules.mk b/keyboards/lily58/rev1/rules.mk index 7fc101bf2b0e..6028b5a5b95a 100644 --- a/keyboards/lily58/rev1/rules.mk +++ b/keyboards/lily58/rev1/rules.mk @@ -1,3 +1,3 @@ SRC += rev1/matrix.c SRC += rev1/split_util.c -SRC += rev1/split_scomm.c \ No newline at end of file +SRC += rev1/split_scomm.c diff --git a/keyboards/lily58/rules.mk b/keyboards/lily58/rules.mk index d13c88ba695a..af25531ecd5f 100644 --- a/keyboards/lily58/rules.mk +++ b/keyboards/lily58/rules.mk @@ -1,57 +1,16 @@ -SRC += i2c.c -SRC += serial.c -SRC += ssd1306.c - -# if firmware size over limit, try this option -# CFLAGS += -flto - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically @@ -73,4 +32,11 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend CUSTOM_MATRIX = yes +SRC += i2c.c +SRC += serial.c +SRC += ssd1306.c + +# if firmware size over limit, try this option +# CFLAGS += -flto + DEFAULT_FOLDER = lily58/rev1 diff --git a/keyboards/m10a/keymaps/default/rules.mk b/keyboards/m10a/keymaps/default/rules.mk deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/keyboards/m10a/rules.mk b/keyboards/m10a/rules.mk index 905babacb998..739e396df30a 100644 --- a/keyboards/m10a/rules.mk +++ b/keyboards/m10a/rules.mk @@ -1,49 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change to "no" to disable the options, or define them in the Makefile in diff --git a/keyboards/maartenwut/atom47/rev2/rules.mk b/keyboards/maartenwut/atom47/rev2/rules.mk index a3a258ed820b..24d1c4199b87 100644 --- a/keyboards/maartenwut/atom47/rev2/rules.mk +++ b/keyboards/maartenwut/atom47/rev2/rules.mk @@ -1,3 +1,2 @@ - NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work RGBLIGHT_ENABLE = no # Enable keyboard underlight functionality (+4870) diff --git a/keyboards/maartenwut/atom47/rules.mk b/keyboards/maartenwut/atom47/rules.mk index 39bfbc2b098c..0728c1a28c51 100644 --- a/keyboards/maartenwut/atom47/rules.mk +++ b/keyboards/maartenwut/atom47/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 -BOOTLOADER= qmk-dfu +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = qmk-dfu # Build Options # comment out to disable the options. @@ -62,4 +26,3 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID DEFAULT_FOLDER = maartenwut/atom47/rev3 - diff --git a/keyboards/maartenwut/plain60/keymaps/via/rules.mk b/keyboards/maartenwut/plain60/keymaps/via/rules.mk index 0ccefbb1194f..2b23b188b474 100644 --- a/keyboards/maartenwut/plain60/keymaps/via/rules.mk +++ b/keyboards/maartenwut/plain60/keymaps/via/rules.mk @@ -3,4 +3,3 @@ SRC += keyboards/wilba_tech/wt_main.c RAW_ENABLE = yes DYNAMIC_KEYMAP_ENABLE = yes - diff --git a/keyboards/maartenwut/plain60/rules.mk b/keyboards/maartenwut/plain60/rules.mk index aad5598464bb..77b5a3eb95f3 100644 --- a/keyboards/maartenwut/plain60/rules.mk +++ b/keyboards/maartenwut/plain60/rules.mk @@ -1,50 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = qmk-dfu # Build Options # comment out to disable the options. @@ -63,4 +28,3 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID LAYOUTS = 60_ansi 60_ansi_split_bs_rshift 60_hhkb 60_iso 60_tsangan_hhkb - diff --git a/keyboards/maartenwut/ta65/rules.mk b/keyboards/maartenwut/ta65/rules.mk index 47207cd46d8b..ecc629698619 100644 --- a/keyboards/maartenwut/ta65/rules.mk +++ b/keyboards/maartenwut/ta65/rules.mk @@ -1,49 +1,14 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = qmk-dfu # Build Options diff --git a/keyboards/maartenwut/wasdat/rules.mk b/keyboards/maartenwut/wasdat/rules.mk index c9deae5c5735..059e84a1a550 100644 --- a/keyboards/maartenwut/wasdat/rules.mk +++ b/keyboards/maartenwut/wasdat/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = qmk-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/maartenwut/wonderland/rules.mk b/keyboards/maartenwut/wonderland/rules.mk index 498076d4ea0d..19c0ea591942 100755 --- a/keyboards/maartenwut/wonderland/rules.mk +++ b/keyboards/maartenwut/wonderland/rules.mk @@ -1,42 +1,14 @@ +# MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = qmk-dfu # Build Options diff --git a/keyboards/maxipad/promicro/rules.mk b/keyboards/maxipad/promicro/rules.mk index dc6f19623730..e6fef517279c 100644 --- a/keyboards/maxipad/promicro/rules.mk +++ b/keyboards/maxipad/promicro/rules.mk @@ -1,58 +1,12 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 diff --git a/keyboards/maxipad/teensy2/rules.mk b/keyboards/maxipad/teensy2/rules.mk index 3fb7c7e5a7e4..ae398e2588c7 100644 --- a/keyboards/maxipad/teensy2/rules.mk +++ b/keyboards/maxipad/teensy2/rules.mk @@ -1,58 +1,12 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = halfkay - - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 diff --git a/keyboards/maxr1998/phoebe/keymaps/default/rules.mk b/keyboards/maxr1998/phoebe/keymaps/default/rules.mk deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/keyboards/maxr1998/phoebe/rules.mk b/keyboards/maxr1998/phoebe/rules.mk index 1f272473792e..b73145d7ff27 100644 --- a/keyboards/maxr1998/phoebe/rules.mk +++ b/keyboards/maxr1998/phoebe/rules.mk @@ -1,10 +1,14 @@ # MCU name MCU = atmega32u4 -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu # Build Options @@ -27,4 +31,3 @@ RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. KEY_LOCK_ENABLE = yes API_SYSEX_ENABLE = no SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - diff --git a/keyboards/maxr1998/pulse4k/keymaps/default/rules.mk b/keyboards/maxr1998/pulse4k/keymaps/default/rules.mk deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/keyboards/maxr1998/pulse4k/rules.mk b/keyboards/maxr1998/pulse4k/rules.mk index 644666221534..cee105352fd1 100644 --- a/keyboards/maxr1998/pulse4k/rules.mk +++ b/keyboards/maxr1998/pulse4k/rules.mk @@ -1,15 +1,16 @@ # MCU name MCU = atmega32u4 -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically @@ -30,4 +31,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. API_SYSEX_ENABLE = no SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - diff --git a/keyboards/mechkeys/mk60/rules.mk b/keyboards/mechkeys/mk60/rules.mk index f1513f2996a3..4f8bd49eff36 100644 --- a/keyboards/mechkeys/mk60/rules.mk +++ b/keyboards/mechkeys/mk60/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/mechllama/g35/rules.mk b/keyboards/mechllama/g35/rules.mk index 1e1487513a79..20fbf160afdc 100644 --- a/keyboards/mechllama/g35/rules.mk +++ b/keyboards/mechllama/g35/rules.mk @@ -1,10 +1,14 @@ +# MCU name MCU = atmega32u4 -F_CPU = 16000000 -ARCH = AVR8 -F_USB = $(F_CPU) - -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu NKRO_ENABLE = yes diff --git a/keyboards/mechmini/v2/rules.mk b/keyboards/mechmini/v2/rules.mk index f9ef6414b1f8..72d307322cec 100755 --- a/keyboards/mechmini/v2/rules.mk +++ b/keyboards/mechmini/v2/rules.mk @@ -1,53 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # comment out to disable the options. # diff --git a/keyboards/meira/featherble/rules.mk b/keyboards/meira/featherble/rules.mk index e27608983f14..b0295ced7779 100644 --- a/keyboards/meira/featherble/rules.mk +++ b/keyboards/meira/featherble/rules.mk @@ -1,3 +1,5 @@ -BLUETOOTH_ENABLE = yes +# Processor frequency F_CPU = 8000000 + +BLUETOOTH_ENABLE = yes BLUETOOTH = AdafruitBLE diff --git a/keyboards/meira/promicro/rules.mk b/keyboards/meira/promicro/rules.mk index 22e49971f1cd..3c81f1b344a1 100644 --- a/keyboards/meira/promicro/rules.mk +++ b/keyboards/meira/promicro/rules.mk @@ -1,14 +1 @@ -# 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 - BLUETOOTH_ENABLE = no diff --git a/keyboards/meira/rules.mk b/keyboards/meira/rules.mk index 7893e6556fc0..8357e780bf09 100644 --- a/keyboards/meira/rules.mk +++ b/keyboards/meira/rules.mk @@ -1,44 +1,14 @@ -SRC += matrix.c TWIlib.c issi.c lighting.c - # MCU name MCU = atmega32u4 - -# -# 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) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. -BOOTLOADER = caterina - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina # Build Options @@ -72,6 +42,7 @@ CUSTOM_MATRIX = yes #ifeq ($(strip $(WATCHDOG_ENABLE)), yes) # TMK_COMMON_DEFS += -DWATCHDOG_ENABLE #endif +SRC += matrix.c TWIlib.c issi.c lighting.c DEFAULT_FOLDER = meira/promicro LAYOUTS = ortho_4x12 diff --git a/keyboards/meishi/rules.mk b/keyboards/meishi/rules.mk index 6cba6b6b8696..571a1c48ce63 100644 --- a/keyboards/meishi/rules.mk +++ b/keyboards/meishi/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina # Build Options # change yes to no to disable diff --git a/keyboards/meishi2/rules.mk b/keyboards/meishi2/rules.mk index bc370be0397c..7218e1e1bf18 100644 --- a/keyboards/meishi2/rules.mk +++ b/keyboards/meishi2/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/melody96/rules.mk b/keyboards/melody96/rules.mk index be0f84b17020..1e6d4bb7cdff 100644 --- a/keyboards/melody96/rules.mk +++ b/keyboards/melody96/rules.mk @@ -1,47 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -OPT_DEFS += -DBOOTLOADER_SIZE=4096 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - # Build Options # comment out to disable the options. # diff --git a/keyboards/meson/rules.mk b/keyboards/meson/rules.mk index 4b585e8291a3..323ec666a9fe 100644 --- a/keyboards/meson/rules.mk +++ b/keyboards/meson/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/miniaxe/keymaps/underglow/rules.mk b/keyboards/miniaxe/keymaps/underglow/rules.mk index 64fa91dedac9..1e3cebb14515 100644 --- a/keyboards/miniaxe/keymaps/underglow/rules.mk +++ b/keyboards/miniaxe/keymaps/underglow/rules.mk @@ -1,2 +1 @@ -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow - +RGBLIGHT_ENABLE = yes diff --git a/keyboards/miniaxe/rules.mk b/keyboards/miniaxe/rules.mk index 3f5f699ff6c9..204aeed76efa 100644 --- a/keyboards/miniaxe/rules.mk +++ b/keyboards/miniaxe/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # @@ -82,4 +35,3 @@ HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) DEBUG_ENABLE = no CUSTOM_MATRIX = no # Use custom matrix code SPLIT_KEYBOARD = yes # Use shared split_common code - diff --git a/keyboards/minidox/rev1/rules.mk b/keyboards/minidox/rev1/rules.mk index f845616741c2..7b30c0beff2a 100644 --- a/keyboards/minidox/rev1/rules.mk +++ b/keyboards/minidox/rev1/rules.mk @@ -1 +1 @@ -BACKLIGHT_ENABLE = no \ No newline at end of file +BACKLIGHT_ENABLE = no diff --git a/keyboards/minidox/rules.mk b/keyboards/minidox/rules.mk index bcd74bcde286..dd2affb3f911 100644 --- a/keyboards/minidox/rules.mk +++ b/keyboards/minidox/rules.mk @@ -1,52 +1,16 @@ -SRC += matrix.c \ - i2c.c \ - split_util.c \ - serial.c - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically @@ -68,5 +32,9 @@ USE_I2C ?= no SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend CUSTOM_MATRIX = yes +SRC += matrix.c \ + i2c.c \ + split_util.c \ + serial.c DEFAULT_FOLDER = minidox/rev1 diff --git a/keyboards/mint60/rules.mk b/keyboards/mint60/rules.mk index 21efa65cf4da..037e81431214 100644 --- a/keyboards/mint60/rules.mk +++ b/keyboards/mint60/rules.mk @@ -1,56 +1,15 @@ -SRC += i2c.c \ - serial.c \ - matrix.c \ - split_util.c \ - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina # Build Options # change yes to no to disable @@ -73,5 +32,9 @@ FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) CUSTOM_MATRIX = yes +SRC += i2c.c \ + serial.c \ + matrix.c \ + split_util.c USE_I2C = yes RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. diff --git a/keyboards/mitosis/rules.mk b/keyboards/mitosis/rules.mk index 34aa7070f3e5..420c49f9b91e 100644 --- a/keyboards/mitosis/rules.mk +++ b/keyboards/mitosis/rules.mk @@ -1,56 +1,16 @@ - -OPT_DEFS += -DMITOSIS_PROMICRO -MITOSIS_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \ - avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB) - -# # project specific files -SRC = matrix.c - - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # comment out to disable the options. # @@ -72,3 +32,10 @@ USB = /dev/ttyACM0 # upload: build # $(MITOSIS_UPLOAD_COMMAND) + +OPT_DEFS += -DMITOSIS_PROMICRO +MITOSIS_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \ + avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB) + +# # project specific files +SRC = matrix.c diff --git a/keyboards/miuni32/keymaps/default/rules.mk b/keyboards/miuni32/keymaps/default/rules.mk deleted file mode 100644 index 3a741d20a7ca..000000000000 --- a/keyboards/miuni32/keymaps/default/rules.mk +++ /dev/null @@ -1,18 +0,0 @@ -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration -NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - diff --git a/keyboards/miuni32/rules.mk b/keyboards/miuni32/rules.mk index 91cb2221ecfc..68622e672a87 100644 --- a/keyboards/miuni32/rules.mk +++ b/keyboards/miuni32/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable @@ -53,14 +17,15 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096 BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = no # USB Nkey Rollover +NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 +RGBLIGHT_ENABLE = yes diff --git a/keyboards/model01/keymaps/default/rules.mk b/keyboards/model01/keymaps/default/rules.mk deleted file mode 100644 index 4d1abd88ad33..000000000000 --- a/keyboards/model01/keymaps/default/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -# used by default keymap -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) diff --git a/keyboards/model01/rules.mk b/keyboards/model01/rules.mk index 4345027f4178..5e3cbaa33210 100644 --- a/keyboards/model01/rules.mk +++ b/keyboards/model01/rules.mk @@ -1,53 +1,21 @@ -QUANTUM_LIB_SRC += i2c_master.c -SRC += leds.c \ - matrix.c - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina # Build Options # change yes to no to disable # BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) COMMAND_ENABLE = no # Commands for debug and configuration @@ -59,6 +27,9 @@ MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) UNICODE_ENABLE = no # Unicode CUSTOM_MATRIX = yes +QUANTUM_LIB_SRC += i2c_master.c +SRC += leds.c \ + matrix.c # You can set RGB_MATRIX_ENABLE = no in your rules.mk to disable this and save the Flash RGB_MATRIX_ENABLE = custom # Enable RGB matrix effects (+10000). diff --git a/keyboards/moon/rules.mk b/keyboards/moon/rules.mk index c8b39e8b7a1a..3c67b3c2873d 100644 --- a/keyboards/moon/rules.mk +++ b/keyboards/moon/rules.mk @@ -1,50 +1,14 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu # Build Options diff --git a/keyboards/mt980/rules.mk b/keyboards/mt980/rules.mk index 9a7718aadba4..b3655bf723ae 100644 --- a/keyboards/mt980/rules.mk +++ b/keyboards/mt980/rules.mk @@ -1,47 +1,19 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # - BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = no # Audio control and System control(+450) diff --git a/keyboards/mxss/rules.mk b/keyboards/mxss/rules.mk index ac7a1ee8f4de..7df8517583d7 100644 --- a/keyboards/mxss/rules.mk +++ b/keyboards/mxss/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable From 323635da064f9b92cf08fd46c1c4a229ca5af0ad Mon Sep 17 00:00:00 2001 From: Erkki Halinen Date: Thu, 24 Oct 2019 23:53:26 +0300 Subject: [PATCH 173/316] [Keyboard] Add support for Sticc14 macropad (#7134) * Push Sticc14 default keymap * Update READMEs to conform to guidelines * Requested changes * Requested changes Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/handwired/sticc14/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/handwired/sticc14/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Remove useless enum and function overrides --- keyboards/handwired/sticc14/config.h | 249 ++++++++++++++++++ keyboards/handwired/sticc14/info.json | 0 .../sticc14/keymaps/default/config.h | 19 ++ .../sticc14/keymaps/default/keymap.c | 32 +++ .../sticc14/keymaps/default/readme.md | 5 + keyboards/handwired/sticc14/readme.md | 15 ++ keyboards/handwired/sticc14/rules.mk | 32 +++ keyboards/handwired/sticc14/sticc14.c | 51 ++++ keyboards/handwired/sticc14/sticc14.h | 40 +++ 9 files changed, 443 insertions(+) create mode 100644 keyboards/handwired/sticc14/config.h create mode 100644 keyboards/handwired/sticc14/info.json create mode 100644 keyboards/handwired/sticc14/keymaps/default/config.h create mode 100644 keyboards/handwired/sticc14/keymaps/default/keymap.c create mode 100644 keyboards/handwired/sticc14/keymaps/default/readme.md create mode 100644 keyboards/handwired/sticc14/readme.md create mode 100644 keyboards/handwired/sticc14/rules.mk create mode 100644 keyboards/handwired/sticc14/sticc14.c create mode 100644 keyboards/handwired/sticc14/sticc14.h diff --git a/keyboards/handwired/sticc14/config.h b/keyboards/handwired/sticc14/config.h new file mode 100644 index 000000000000..22011f07889a --- /dev/null +++ b/keyboards/handwired/sticc14/config.h @@ -0,0 +1,249 @@ +/* +Copyright 2019 ErkHal + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER u/ergorius +#define PRODUCT Sticc14 +#define DESCRIPTION Custom macropad + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 3 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { F4, F5, F6, F7, B1 } +#define MATRIX_COL_PINS { B6, B2, B3 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * 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 + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/handwired/sticc14/info.json b/keyboards/handwired/sticc14/info.json new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/keyboards/handwired/sticc14/keymaps/default/config.h b/keyboards/handwired/sticc14/keymaps/default/config.h new file mode 100644 index 000000000000..0d34db140753 --- /dev/null +++ b/keyboards/handwired/sticc14/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 ErkHal + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/handwired/sticc14/keymaps/default/keymap.c b/keyboards/handwired/sticc14/keymaps/default/keymap.c new file mode 100644 index 000000000000..17364f0a2270 --- /dev/null +++ b/keyboards/handwired/sticc14/keymaps/default/keymap.c @@ -0,0 +1,32 @@ +/* Copyright 2019 ErkHal + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* Base */ + KC_PPLS, KC_PSLS, KC_BSPC, + KC_7, KC_8, KC_9, + KC_4, KC_5, KC_6, + KC_1, KC_2, KC_3, + KC_0, LT(1, KC_ENT)), + + [1] = LAYOUT( + KC_MPRV, KC_MPLY, KC_MNXT, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_MPRV, KC_MPLY, KC_MNXT, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS) +}; diff --git a/keyboards/handwired/sticc14/keymaps/default/readme.md b/keyboards/handwired/sticc14/keymaps/default/readme.md new file mode 100644 index 000000000000..098402e68a22 --- /dev/null +++ b/keyboards/handwired/sticc14/keymaps/default/readme.md @@ -0,0 +1,5 @@ +# Default Sticc14 Layout + +![Sticc14 layout image](https://i.imgur.com/Xmmhmvi.png) + +Second layer has media keys on top-row. (Prev, Play/Pause, Next) diff --git a/keyboards/handwired/sticc14/readme.md b/keyboards/handwired/sticc14/readme.md new file mode 100644 index 000000000000..65f1a2416f11 --- /dev/null +++ b/keyboards/handwired/sticc14/readme.md @@ -0,0 +1,15 @@ +# Sticc14 + +![Sticc14](https://i.imgur.com/blzFw5R.jpg) + +Sticc14 is a simple macropad, designed to be easy to build and affordable. + +Keyboard Maintainer: [ErkHal](/~https://github.com/erkhal) +Hardware Supported: Sticc14 +Hardware Availability: [Ergorius](https://reddit.com/u/ergorius) + +Make example for this keyboard (after setting up your build environment): + + make handwired/sticc14:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/handwired/sticc14/rules.mk b/keyboards/handwired/sticc14/rules.mk new file mode 100644 index 000000000000..7b326cc31948 --- /dev/null +++ b/keyboards/handwired/sticc14/rules.mk @@ -0,0 +1,32 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/handwired/sticc14/sticc14.c b/keyboards/handwired/sticc14/sticc14.c new file mode 100644 index 000000000000..8edd2bda6b92 --- /dev/null +++ b/keyboards/handwired/sticc14/sticc14.c @@ -0,0 +1,51 @@ +/* Copyright 2019 ErkHal + * + * 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 . + */ +#include "sticc14.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* + +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/handwired/sticc14/sticc14.h b/keyboards/handwired/sticc14/sticc14.h new file mode 100644 index 000000000000..1a5f51e41a90 --- /dev/null +++ b/keyboards/handwired/sticc14/sticc14.h @@ -0,0 +1,40 @@ +/* Copyright 2019 ErkHal + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + K00, K01, K02, \ + K10, K11, K12, \ + K20, K21, K22, \ + K30, K31, K32, \ + K40, K41 \ +) { \ + { K00, K01, K02 }, \ + { K10, K11, K12 }, \ + { K20, K21, K22 }, \ + { K30, K31, K32 }, \ + { K40, K41} \ +} From 71d64c85d627fb6a6d3ba04f1de6f3bfe3873ff8 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Thu, 24 Oct 2019 13:55:31 -0700 Subject: [PATCH 174/316] [Keyboard] reviung34: Configurator layout fix (#7138) --- keyboards/reviung34/info.json | 47 +++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/keyboards/reviung34/info.json b/keyboards/reviung34/info.json index e69de29bb2d1..5c49422060fe 100755 --- a/keyboards/reviung34/info.json +++ b/keyboards/reviung34/info.json @@ -0,0 +1,47 @@ +{ + "keyboard_name": "reviung34", + "url": "", + "maintainer": "gtips", + "width": 11, + "height": 4, + "layouts": { + "LAYOUT_reviung34": { + "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":6, "y":0}, + {"label":"K06", "x":7, "y":0}, + {"label":"K07", "x":8, "y":0}, + {"label":"K08", "x":9, "y":0}, + {"label":"K35", "x":10, "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":6, "y":1}, + {"label":"K16", "x":7, "y":1}, + {"label":"K17", "x":8, "y":1}, + {"label":"K18", "x":9, "y":1}, + {"label":"K36", "x":10, "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":6, "y":2}, + {"label":"K26", "x":7, "y":2}, + {"label":"K27", "x":8, "y":2}, + {"label":"K28", "x":9, "y":2}, + {"label":"K37", "x":10, "y":2}, + {"label":"K32", "x":2, "y":3}, + {"label":"K33", "x":3, "y":3}, + {"label":"K34", "x":4, "y":3}, + {"label":"K38", "x":6, "y":3, "w":2} + ] + } + } +} From e8453bbc1218a2cb40d4eac6cb543bd0c45d3de9 Mon Sep 17 00:00:00 2001 From: Theodore S Lindsey Date: Thu, 24 Oct 2019 14:16:24 -0700 Subject: [PATCH 175/316] copied atreus astar to mirrored, set PCBDOWN flag (#7137) * copied atreus astar to mirrored, set PCBDOWN flag * re-pointed include * mirrored layout will always be true here --- .../atreus/astar_mirrored/astar_mirrored.c | 16 ++++++++ .../atreus/astar_mirrored/astar_mirrored.h | 17 +++++++++ keyboards/atreus/astar_mirrored/config.h | 38 +++++++++++++++++++ keyboards/atreus/astar_mirrored/rules.mk | 12 ++++++ keyboards/atreus/atreus.h | 2 + 5 files changed, 85 insertions(+) create mode 100644 keyboards/atreus/astar_mirrored/astar_mirrored.c create mode 100644 keyboards/atreus/astar_mirrored/astar_mirrored.h create mode 100644 keyboards/atreus/astar_mirrored/config.h create mode 100644 keyboards/atreus/astar_mirrored/rules.mk diff --git a/keyboards/atreus/astar_mirrored/astar_mirrored.c b/keyboards/atreus/astar_mirrored/astar_mirrored.c new file mode 100644 index 000000000000..b8eacded63a8 --- /dev/null +++ b/keyboards/atreus/astar_mirrored/astar_mirrored.c @@ -0,0 +1,16 @@ +/* Copyright 2019 + * + * 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 . + */ +#include "astar_mirrored.h" diff --git a/keyboards/atreus/astar_mirrored/astar_mirrored.h b/keyboards/atreus/astar_mirrored/astar_mirrored.h new file mode 100644 index 000000000000..bf74ceb17f4b --- /dev/null +++ b/keyboards/atreus/astar_mirrored/astar_mirrored.h @@ -0,0 +1,17 @@ +/* Copyright 2019 + * + * 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 . + */ + +#pragma once diff --git a/keyboards/atreus/astar_mirrored/config.h b/keyboards/atreus/astar_mirrored/config.h new file mode 100644 index 000000000000..273f23a847bb --- /dev/null +++ b/keyboards/atreus/astar_mirrored/config.h @@ -0,0 +1,38 @@ +/* Copyright 2019 + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define PDBDOWN 1 + +#define MATRIX_ROW_PINS { D0, D1, D3, D2 } +#define MATRIX_COL_PINS { B7, D6, F7, F6, B6, D4, E6, B4, B5, C6, D7 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW diff --git a/keyboards/atreus/astar_mirrored/rules.mk b/keyboards/atreus/astar_mirrored/rules.mk new file mode 100644 index 000000000000..e6fef517279c --- /dev/null +++ b/keyboards/atreus/astar_mirrored/rules.mk @@ -0,0 +1,12 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina diff --git a/keyboards/atreus/atreus.h b/keyboards/atreus/atreus.h index ce08cccf03af..88dd4d9dc8d2 100644 --- a/keyboards/atreus/atreus.h +++ b/keyboards/atreus/atreus.h @@ -20,6 +20,8 @@ #ifdef KEYBOARD_atreus_astar #include "astar.h" +#elif KEYBOARD_atreus_astar_mirrored + #include "astar_mirrored.h" #elif KEYBOARD_atreus_teensy2 #include "teensy2.h" #endif From 23048798dd4e089c6f636a198cb246f41e6aef73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20A=2E=20Volpato?= Date: Fri, 25 Oct 2019 08:27:43 +0200 Subject: [PATCH 176/316] [Keyboard] Add SharkPCB rev Alpha support (#7090) * Add SharkPCB rev Alpha support * Solve PWM pin assignment - Solve PWM pin configuration for the SharkPCB rev.Alpha, which backlight pin is B0 * Update shark.c copyright name * Update shark.h copyright section * Apply suggestions from code review Suggestions from @zvecr and @drashna were accepted and applied for neater code. Also fixed typos and removed unused comments. See [pull request](/~https://github.com/qmk/qmk_firmware/pull/7090/files#diff-70c0a1f44287ae5810170b4180cdaa5d) for more information. Co-Authored-By: Joel Challis Co-Authored-By: Drashna Jaelre * Update PRODUCT_ID into config.h * Update metadata info.json Fields "keyboard_name", "keyboard_folder", "url", "maintainer" were updated --- keyboards/acheron/shark/README.md | 17 ++ keyboards/acheron/shark/config.h | 261 ++++++++++++++++++ keyboards/acheron/shark/info.json | 63 +++++ .../acheron/shark/keymaps/default/keymap.c | 105 +++++++ keyboards/acheron/shark/rules.mk | 25 ++ keyboards/acheron/shark/shark.c | 51 ++++ keyboards/acheron/shark/shark.h | 39 +++ 7 files changed, 561 insertions(+) create mode 100644 keyboards/acheron/shark/README.md create mode 100644 keyboards/acheron/shark/config.h create mode 100644 keyboards/acheron/shark/info.json create mode 100644 keyboards/acheron/shark/keymaps/default/keymap.c create mode 100644 keyboards/acheron/shark/rules.mk create mode 100644 keyboards/acheron/shark/shark.c create mode 100644 keyboards/acheron/shark/shark.h diff --git a/keyboards/acheron/shark/README.md b/keyboards/acheron/shark/README.md new file mode 100644 index 000000000000..fbe9429f1252 --- /dev/null +++ b/keyboards/acheron/shark/README.md @@ -0,0 +1,17 @@ +# Acheron Aχξρων 40-SM-O-MX-TH-WI (Codename "SharkPCB") QMK firmware + +

+ +

+ +This is the QMK firmware repository for the Shark, updated until [revision Alpha](/~https://github.com/Gondolindrim/SharkPCB/releases/tag/Alpha). + +The SharkPCB is an Open-Hardware guidelines compliant PCB which files can be found at [this link](/~https://github.com/Gondolindrim/SharkPCB). Its designer and maintainer is [Gondolindrim](/~https://github.com/Gondolindrim). + +See the [AcheronDocs](https://gondolindrim.github.io/AcheronDocs/shark/intro.html) page for the SharkPCB full documentation. + +Make example for this keyboard (after setting up your build environment): + + make acheron/shark:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/acheron/shark/config.h b/keyboards/acheron/shark/config.h new file mode 100644 index 000000000000..5a46ac5b79e1 --- /dev/null +++ b/keyboards/acheron/shark/config.h @@ -0,0 +1,261 @@ +/* +Copyright 2019 Alvaro Volpato and Steve + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0xAC11 +#define DEVICE_VER 0x0001 +#define MANUFACTURER AcheronProject +#define PRODUCT SharkPCB +#define DESCRIPTION Ortho 40 PCB + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS {B4, A15, B10, B2} +#define MATRIX_COL_PINS {B1, B12, A1, A7, A5, A4, A3, A2, A0, C15, C14, C13} +//{C13, C14, C15, A0,A2,A3,A4,A5,A6, A1,B12,B1} +/* Unused pins, in the default layout, are: +EncA (B6) because it is not used in the default PCB +All Extra pins (A8, B15, B14, B13, B3, B5, B8, B9) , for the same reason; +B0, which is unconnected on the PCB +*/ +//#define UNUSED_PINS { B0, B6, B13, B14, B15, B8, B9, B5, B3 } + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN B0 +#define BACKLIGHT_PWM_DRIVER PWMD3 +#define BACKLIGHT_PWM_CHANNEL 3 + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * 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 + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/acheron/shark/info.json b/keyboards/acheron/shark/info.json new file mode 100644 index 000000000000..a2ea784d96f7 --- /dev/null +++ b/keyboards/acheron/shark/info.json @@ -0,0 +1,63 @@ +{ + "keyboard_name": "SharkPCB", + "keyboard_folder": "acheron/shark", + "url": "https://gondolindrim.github.io/AcheronDocs/shark/intro.html", + "maintainer": "Gondolindrim", + "width": 12, + "height": 4, + "layouts": { + "LAYOUT_ortho_4x12": { + "key_count": 48, + "layout": [ + { "x": 0, "y": 0 }, + { "x": 1, "y": 0 }, + { "x": 2, "y": 0 }, + { "x": 3, "y": 0 }, + { "x": 4, "y": 0 }, + { "x": 5, "y": 0 }, + { "x": 6, "y": 0 }, + { "x": 7, "y": 0 }, + { "x": 8, "y": 0 }, + { "x": 9, "y": 0 }, + { "x": 10, "y": 0 }, + { "x": 11, "y": 0 }, + { "x": 0, "y": 1 }, + { "x": 1, "y": 1 }, + { "x": 2, "y": 1 }, + { "x": 3, "y": 1 }, + { "x": 4, "y": 1 }, + { "x": 5, "y": 1 }, + { "x": 6, "y": 1 }, + { "x": 7, "y": 1 }, + { "x": 8, "y": 1 }, + { "x": 9, "y": 1 }, + { "x": 10, "y": 1 }, + { "x": 11, "y": 1 }, + { "x": 0, "y": 2 }, + { "x": 1, "y": 2 }, + { "x": 2, "y": 2 }, + { "x": 3, "y": 2 }, + { "x": 4, "y": 2 }, + { "x": 5, "y": 2 }, + { "x": 6, "y": 2 }, + { "x": 7, "y": 2 }, + { "x": 8, "y": 2 }, + { "x": 9, "y": 2 }, + { "x": 10, "y": 2 }, + { "x": 11, "y": 2 }, + { "x": 0, "y": 3 }, + { "x": 1, "y": 3 }, + { "x": 2, "y": 3 }, + { "x": 3, "y": 3 }, + { "x": 4, "y": 3 }, + { "x": 5, "y": 3 }, + { "x": 6, "y": 3 }, + { "x": 7, "y": 3 }, + { "x": 8, "y": 3 }, + { "x": 9, "y": 3 }, + { "x": 10, "y": 3 }, + { "x": 11, "y": 3 } + ] + } + } +} diff --git a/keyboards/acheron/shark/keymaps/default/keymap.c b/keyboards/acheron/shark/keymaps/default/keymap.c new file mode 100644 index 000000000000..a661b835b10a --- /dev/null +++ b/keyboards/acheron/shark/keymaps/default/keymap.c @@ -0,0 +1,105 @@ +/* Copyright 2019 + * + * 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 . + */ +#include QMK_KEYBOARD_H + +enum layers { + _QWERTY = 0, + _LOWER, + _RAISE, + _ADJUST, +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define ADJUST MO(_ADJUST) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Alt | GUI | |Lower | Space| Space|Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_ortho_4x12( \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ + KC_LCTL, KC_LALT, KC_LGUI, _______, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | | \ | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_ortho_4x12( \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \ + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, BL_TOGG, BL_INC , BL_DEC , _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_ortho_4x12( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_ortho_4x12( \ + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\ + _______, _______, RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______,\ + _______, BL_TOGG, BL_INC, BL_DEC , _______, _______, _______, _______, _______, _______, _______, _______ \ +) +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} diff --git a/keyboards/acheron/shark/rules.mk b/keyboards/acheron/shark/rules.mk new file mode 100644 index 000000000000..30c4593db226 --- /dev/null +++ b/keyboards/acheron/shark/rules.mk @@ -0,0 +1,25 @@ +# MCU name +MCU = STM32F303 + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs + +LAYOUTS = ortho_4x12 diff --git a/keyboards/acheron/shark/shark.c b/keyboards/acheron/shark/shark.c new file mode 100644 index 000000000000..b15c8a270e67 --- /dev/null +++ b/keyboards/acheron/shark/shark.c @@ -0,0 +1,51 @@ +/* Copyright 2019 Álvaro "Gondolindrim" Volpato + * + * 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 . + */ +#include "shark.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* + +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/acheron/shark/shark.h b/keyboards/acheron/shark/shark.h new file mode 100644 index 000000000000..d58b72548aa6 --- /dev/null +++ b/keyboards/acheron/shark/shark.h @@ -0,0 +1,39 @@ +/* Copyright 2019 Álvaro "Gondolindrim" Volpato + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_ortho_4x12( \ + 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 \ +) \ +{ \ + { 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 } \ +} From 581a8fa0580628d3c2c248bfe966d433f5460ab7 Mon Sep 17 00:00:00 2001 From: QMK Bot Date: Fri, 25 Oct 2019 06:31:02 +0000 Subject: [PATCH 177/316] format code according to conventions [skip ci] --- keyboards/acheron/shark/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/acheron/shark/README.md b/keyboards/acheron/shark/README.md index fbe9429f1252..962a73c6d127 100644 --- a/keyboards/acheron/shark/README.md +++ b/keyboards/acheron/shark/README.md @@ -1,4 +1,4 @@ -# Acheron Aχξρων 40-SM-O-MX-TH-WI (Codename "SharkPCB") QMK firmware +# Acheron Aχξρων 40-SM-O-MX-TH-WI (Codename "SharkPCB") QMK firmware

From 32fdf4805ae8d76649fa821275cc2333c5e8bba9 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Fri, 25 Oct 2019 14:34:54 +0100 Subject: [PATCH 178/316] Initial actions/labeler config (#7091) * Initial actions/labeler config * Initial actions/labeler config - add extra from review --- .github/labeler.yml | 18 ++++++++++++++++++ .github/workflows/labeler.yml | 11 +++++++++++ 2 files changed, 29 insertions(+) create mode 100644 .github/labeler.yml create mode 100644 .github/workflows/labeler.yml diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 000000000000..f4b07765c516 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,18 @@ +core: + - quantum/**/* + - tmk_core/**/* + - drivers/**/* + - tests/**/* + - util/**/* +keymap: + - users/**/* + - layouts/**/* + - keyboards/**/keymap/**/* +cli: + - bin/qmk + - requirements.txt + - lib/python/**/* +python: + - '**/*.py' +documentation: + - docs/**/* diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 000000000000..dcafb97dc984 --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,11 @@ +name: "Pull Request Labeler" +on: +- pull_request + +jobs: + triage: + runs-on: ubuntu-latest + steps: + - uses: actions/labeler@v2 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" From 0f30a4d2ca7a7fa1eea54aa10104b5114d0b3f96 Mon Sep 17 00:00:00 2001 From: Daniel Shields <1530706+shieldsd@users.noreply.github.com> Date: Fri, 25 Oct 2019 19:16:46 +0100 Subject: [PATCH 179/316] Save a few bytes with build options and rgb effect removal. (#7149) --- keyboards/model01/keymaps/dshields/keymap.c | 2 +- users/dshields/config.h | 41 +++++++++++++++++++++ users/dshields/rules.mk | 4 ++ 3 files changed, 46 insertions(+), 1 deletion(-) diff --git a/keyboards/model01/keymaps/dshields/keymap.c b/keyboards/model01/keymaps/dshields/keymap.c index f79ef2c7b04d..485acfd3e29d 100644 --- a/keyboards/model01/keymaps/dshields/keymap.c +++ b/keyboards/model01/keymaps/dshields/keymap.c @@ -8,7 +8,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_GRV , KC_Q , KC_W , KC_E , KC_R , KC_T , RGB_TOG, _______, KC_Y , KC_U , KC_I , KC_O , KC_P , KC_EQL , KC_PGUP, KC_A , KC_S , KC_D , KC_F , KC_G , KC_TAB , KC_ENT , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_PGDN, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_ESC , DM_PLAY, KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_MINS, - OSMLCTL, KC_RCTL, + OSMLCTL, OSMRCTL, KC_BSPC, KC_SPC , KC_LGUI, OSMRALT, OSMLSFT, OSMRSFT, diff --git a/users/dshields/config.h b/users/dshields/config.h index 17eb98bd4f42..d92f787e4173 100644 --- a/users/dshields/config.h +++ b/users/dshields/config.h @@ -13,3 +13,44 @@ #define MOUSEKEY_MAX_SPEED 7 #define MOUSEKEY_WHEEL_DELAY 0 +#define DISABLE_RGB_MATRIX_ALPHAS_MODS +#define DISABLE_RGB_MATRIX_BREATHING +#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#define DISABLE_RGB_MATRIX_BAND_SAT +#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define DISABLE_RGB_MATRIX_BAND_VAL +#define DISABLE_RGB_MATRIX_CYCLE_ALL +#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN +#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define DISABLE_RGB_MATRIX_CYCLE_SPIRAL +#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define DISABLE_RGB_MATRIX_DUAL_BEACON +#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#define DISABLE_RGB_MATRIX_SOLID_SPLASH +#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +#define DISABLE_RGB_MATRIX_SOLID_SPLASH +#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +#define DISABLE_RGB_MATRIX_SPLASH +#define DISABLE_RGB_MATRIX_MULTISPLASH +#define DISABLE_RGB_MATRIX_SPLASH +#define DISABLE_RGB_MATRIX_MULTISPLASH diff --git a/users/dshields/rules.mk b/users/dshields/rules.mk index 06f6e5e9fa76..8a7c82cd449c 100644 --- a/users/dshields/rules.mk +++ b/users/dshields/rules.mk @@ -6,6 +6,10 @@ CONSOLE_ENABLE = no # Console for debug(+400) EXTRAKEY_ENABLE = no SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend API_SYSEX_ENABLE = no +SPACE_CADET_ENABLE = no +LEADER_ENABLE = no + +LINK_TIME_OPTIMIZATION_ENABLE = yes ifeq ($(strip $(KEYBOARD)), planck/rev3) AUDIO_ENABLE = no From 3fd919c53661e53018d9121683c74716af54f43e Mon Sep 17 00:00:00 2001 From: Gouty Date: Fri, 25 Oct 2019 19:48:59 +0100 Subject: [PATCH 180/316] [Docs] Update hand wire guide (#7044) * Reorganised Hand Wire Guide Added some images and put the "Matrix" section in a hidden

section * Actually adding images this time removed .jpg from .gitignore * Hand wire guide updated Incomplete, but started making the guide more general. Will continue to add images (in imgur as requested) * Removed some more images from gitignore * testing image changes (temporary) * Update hand_wire.md * added techniques table * Tweaking the table * Finished soldering guide * Fixed some links, change image scaling * More of the same * resizing images * updated images * Update hand_wire.md * Resizing images * Update hand_wire.md * Update hand_wire.md * Create ribbon_cable.jpg * Minor updates to links * Updated firmware and flashing guidelines * Updated images to imgur links and re-added images to gitignore * Implemented requested changes. Improved wording * Added handwire helpers info and split KB info * Update hand_wire.md * Removed "the" from "the QMK toolbox" * Fixed handwire helper table and image size * Fixed a heading --- .gitignore | 2 +- docs/hand_wire.md | 238 +++++++++++++++++++++++++++++++++++++--------- 2 files changed, 193 insertions(+), 47 deletions(-) diff --git a/.gitignore b/.gitignore index 1f8f9dc74b08..7b15615625c1 100644 --- a/.gitignore +++ b/.gitignore @@ -60,8 +60,8 @@ util/Win_Check_Output.txt # ignore image files *.png -*.jpg *.gif +*.jpg # Do not ignore MiniDox left/right hand eeprom files !keyboards/minidox/*.eep diff --git a/docs/hand_wire.md b/docs/hand_wire.md index 25db9341b886..426afddb9a41 100644 --- a/docs/hand_wire.md +++ b/docs/hand_wire.md @@ -1,19 +1,18 @@ -# Quantum Hand-Wiring Guide +# Hand-Wiring Guide -Parts list: -* *x* keyswitches (MX, Matias, Gateron, etc) -* *x* diodes -* Keyboard plate (metal, plastic, cardboard, etc) -* Wire (strained for wiring to the Teensy, anything for the rows/columns) -* Soldering iron set at 600ºF or 315ºC (if temperature-controlled) -* Rosin-cored solder (leaded or lead-free) -* Adequate ventilation/a fan -* Tweezers (optional) -* Wire cutters/snippers +## Preamble: How a Keyboard Matrix Works (and why we need diodes) + +The collapsible section below covers why keyboards are wired the way they are, as outlined in this guide. It isn't required reading to make your own hand wired keyboard, but provides background information. + +
-## How the Matrix Works (Why We Need Diodes) +Click for details -The microcontroller (in this case, the Teensy 2.0) will be setup up via the firmware to send a logical 1 to the columns, one at a time, and read from the rows, all at once - this process is called matrix scanning. The matrix is a bunch of open switches that, by default, don't allow any current to pass through - the firmware will read this as no keys being pressed. As soon as you press one key down, the logical 1 that was coming from the column the keyswitch is attached to gets passed through the switch and to the corresponding row - check out the following 2x2 example: +Without a matrix circuit each switch would require its own wire directly to the controller. + +Simply put, when the circuit is arranged in rows and columns, if a key is pressed, a column wire makes contact with a row wire and completes a circuit. The keyboard controller detects this closed circuit and registers it as a key press. + +The microcontroller will be setup up via the firmware to send a logical 1 to the columns, one at a time, and read from the rows, all at once - this process is called matrix scanning. The matrix is a bunch of open switches that, by default, don't allow any current to pass through - the firmware will read this as no keys being pressed. As soon as you press one key down, the logical 1 that was coming from the column the keyswitch is attached to gets passed through the switch and to the corresponding row - check out the following 2x2 example: Column 0 being scanned Column 1 being scanned x x @@ -100,30 +99,132 @@ Things act as they should! Which will get us the following data: The firmware can then use this correct data to detect what it should do, and eventually, what signals it needs to send to the OS. -# The Actual Hand-Wiring +Further reading: +- [Wikipedia article](https://en.wikipedia.org/wiki/Keyboard_matrix_circuit) +- [Deskthority article](https://deskthority.net/wiki/Keyboard_matrix) +- [Keyboard Matrix Help by Dave Dribin (2000)](https://www.dribin.org/dave/keyboard/one_html/) +- [How Key Matrices Works by PCBheaven](http://pcbheaven.com/wikipages/How_Key_Matrices_Works/) (animated examples) +- [How keyboards work - QMK documentation](/docs/how_keyboards_work.md) -## Getting Things in Place +
-When starting this, you should have all of your stabilisers and keyswitches already installed (and optionally keycaps). If you're using a Cherry-type stabiliser (plate-mounted only, obviously), you'll need to install that before your keyswitches. If you're using Costar ones, you can installed them afterwards. -To make things easier on yourself, make sure all of the keyswitches are oriented the same way (if they can be - not all layouts support this). Despite this, it's important to remember that the contacts on the keyswitches are completely symmetrical. We'll be using the keyswitch's left side contact for wiring the rows, and the right side one for wiring the columns. +## Parts list -Get your soldering iron heated-up and collect the rest of the materials from the part list at the beginning of the guide. Place your keyboard so that the bottoms of the keyswitches are accessible - it may be a good idea to place it on a cloth to protect your keyswitches/keycaps. +You will need: (where *x* is the number of keys on your planned keyboard) -Before continuing, plan out where you're going to place your Teensy. If you're working with a board that has a large (6.25u) spacebar, it may be a good idea to place it in-between switches against the plate. Otherwise, you may want to trim some of the leads on the keyswitches where you plan on putting it - this will make it a little harder to solder the wire/diodes, but give you more room to place the Teensy. +* QMK compatible microcontroller board (Teensy, Pro-Micro, QMK Proton C etc.) +* *x* keyswitches (MX, Matias, Gateron, etc) +* *x* through hole diodes +* Keyboard plate and plate mount stabilisers +* Wire +* Soldering iron +* Rosin-cored solder +* Adequate ventilation/a fan +* Wire cutters/snippers -## Preparing the Diodes +Optional but useful: -It's a little easier to solder the diodes in place if you bend them at a 90º angle immediately after the black line - this will help to make sure you put them on the right way (direction matters), and in the correct position. The diodes will look like this when bent (with longer leads): +* Wire strippers/a sharp knife +* Tweezers and/or small needle nose pliers +* Soldering station/Helping hands -``` - ┌─────┬─┐ - ───┤ │ ├─┐ - └─────┴─┘ │ - │ -``` +## Starting the build + +There are many ways to hand wire a PCB matrix, this guide will describe the fundamentals as well as some recommended ways to go about it. + +As we are dealing with hand wiring, it is assumed that you already have a plate. If you are planning a completely custom layout, tools such as [ai03 Plate Generator](https://kbplate.ai03.me/) and [Swillkb Plate & Case Builder](http://builder.swillkb.com/) can help when designing one. + +Start by installing the switches and stabilisers in the plate. Depending on the thickness and material this may also involve hot gluing it in place. + +## Planning the matrix + +If you are following a pre-existing handwire guide (e.g. for the keyboards in the [handwire firmware section](/keyboards/handwired/) you can skip this step, just ensure you wire the matrix as described. + +What you want to achieve is one leg from each switch being attached to the corresponding switches next to it (rows) and the other leg being attached to the switches above and below it (columns) and a diode to one of the legs, mosy commonly this will be the leg attached to the rows, and the diode will face away from it (Column to Row) i.e. with the wire furthest from the black line on the diode connected to the switch (as current will only travel in one direction through a diode) + +It is fairly simple to plan for an ortholinear keyboard (like a Planck). + +![Example planck matrix](https://i.imgur.com/FRShcLD.png) +Image from [RoastPotatoes' "How to hand wire a Planck"](https://blog.roastpotatoes.co/guide/2015/11/04/how-to-handwire-a-planck/) + +But the larger and more complicated your keyboard, the more complex the matrix. [Keyboard Firmware Builder](https://kbfirmware.com/) can help you plan your matrix layout (shown here with a basic fullsize ISO keyboard imported from [Keyboard Layout Editor](http://www.keyboard-layout-editor.com). + +![Example ISO matrix](https://i.imgur.com/UlJ4ZDP.png) + + Bear in mind that the number of rows plus the number of columns can not exceed the number of I/O pins on your controller. So the fullsize matrix shown above would be possible on a Proton C or Teensy++, but not on a regular Teensy or Pro Micro + +#### Common Microcontroller Boards + +| Board | Controller | # I/O | Pinout | +| :------------ |:-------------:| ------:| ------ | +| Pro Micro* | ATmega32u4 | 20 | [link](https://learn.sparkfun.com/tutorials/pro-micro--fio-v3-hookup-guide/hardware-overview-pro-micro#Teensy++_2.0) | +| Teensy 2.0 | ATmega32u4 | 25 | [link](https://www.pjrc.com/teensy/pinout.html) | +| [QMK Proton C](https://qmk.fm/proton-c/) | STM32F303xC | 36 | [link 1](https://i.imgur.com/RhtrAlc.png), [2](https://deskthority.net/wiki/QMK_Proton_C) | +| Teensy++ 2.0 | AT90USB1286 | 46 | [link](https://www.pjrc.com/teensy/pinout.html#Teensy_2.0) | + +*Elite C is essentially the same as a pro micro with a USB-C instead of Micro-USB + +There are also a number of boards designed specifically for handwiring that mount directly to a small number of switches and offer pinouts for the rest. Though these are generally more expensive and may be more difficult to get hold of. + +Postage board mini mounted in place + +| Board | Controller | # I/O | +| :------------ |:-------------:| ------:| +| [Swiss helper](https://www.reddit.com/r/MechanicalKeyboards/comments/8jg5d6/hand_wiring_this_might_help/) | ATmega32u4 | 20 | +| [Postage board](/~https://github.com/LifeIsOnTheWire/Postage-Board/)| ATmega32u4| 25 | +| [Postage board mini](https://geekhack.org/index.php?topic=101460.0)| ATmega32u4| 25 | + +## Wiring the matrix + +There is no one right way to do this. What you want to achieve is good connection at all of the joints planned and no unintentional shorts. + +Established materials and techniques include: + +| Technique | Examples | Pros | Cons | Image +| :-----------| :------- | :------ | :--- | :--- +| Lengths of wire with stripped segments | [Sasha Solomon's Dactyl](https://medium.com/@sachee/building-my-first-keyboard-and-you-can-too-512c0f8a4c5f) and [Cribbit's modern hand wire](https://geekhack.org/index.php?topic=87689.0) | Neat and tidy | Some effort in stripping the wire | ![Stripped wire](https://i.imgur.com/0GNIYY0.jpg) +| Short lengths of wire | [u/xicolinguada's ortho build](https://www.reddit.com/r/MechanicalKeyboards/comments/c39k4f/my_first_hand_wired_keyboard_its_not_perfect_but/) | Easier to strip the wire | More difficult to place | ![individual wire lengths](https://i.imgur.com/mBe5vkL.jpg) +| Magnet/Enamelled wire | [Brett Kosinski's handwired alpha](http://blog.b-ark.ca/Blog-2019-01-27) and [fknraiden's custom board](https://geekhack.org/index.php?topic=74223.0) | Can be directly soldered onto (insulation burns off with heat) | Appearance? | ![Magnet wire](https://i.imgur.com/b4b7KDb.jpg) +| Bending the legs of the diodes for the rows | [Matt3o's Brownfox](https://deskthority.net/viewtopic.php?f=7&t=6050) | Fewer solder joints required | Uninsulated | ![Bent diode legs](https://i.imgur.com/aTnG8TV.jpg) +| Using ridid wiring (e.g. brass tube) | [u/d_stilgar's invisible hardline](https://www.reddit.com/r/MechanicalKeyboards/comments/8aw5j2/invisible_hardline_keyboard_progress_update_april/) and [u/jonasfasler's first attempt](https://www.reddit.com/r/MechanicalKeyboards/comments/de1jyv/my_first_attempt_at_handwiring_a_keyboard/) | Very pretty | More difficult. No physical insulation | ![Hardline hand wire](https://i.imgur.com/CnASmPo.jpg) +| Bare wire with insulation added after (e.g. kapton tape) | [Matt3o's 65% on his website](https://matt3o.com/hand-wiring-a-custom-keyboard/) | Easier (no wire stripping required) | Not as attractive | ![Bare wire](https://i.imgur.com/AvXZShD.jpg) +| Copper tape | [ManuForm Dactyl](/~https://github.com/tshort/dactyl-keyboard) | Very easy | Only really works when your plate/case aligns with the bottom of your switches | ![Copper tape](https://i.imgur.com/RFyNMlL.jpg) + + +Note that these methods can be combined. Prepare your lengths of wire before moving on to soldering. + + +### A note on split keyboards + +If you are planning a split keyboard (e.g. Dactyl) each half will require a controller and a means of communicating between them (like a TRRS or hardwired cable). Further information can be found in the [QMK split keyboard documentation.](/docs/feature_split_keyboard.md) -We'll be using the long lead at the bent end to connect it to the elbow (bent part) of the next diode, creating the row. + +### Soldering + +There are a lot of soldering guides and tips available elsewhere but here are some of the most useful and relevant for hand wiring: + +To ensure a strong solder joint you want a good amount of contact between the solder and the 2 peices of metal you are connecting, a good way of doing this (though not required) is looping around pins or twisting wires together before applying solder. + +Looped around rod Looped diode leg + +If your diodes are on a packaging strip and need a bend in them (either the start of a loop or for connecting to its neighbour) this can easily done by bending it over something straight like the edge of a box, table, or ruler. This also helps keep track of the direction of the diode as all the bends will be on the same side. + +Bent diode legs + +If your iron has temperature control, set it to 315ºC (600ºF). + +Once heated, tin your soldering iron - this means melting a small amount of solder on the end of the iron and then quickly wiping it off on a wet sponge or wire cleaning pad, leaving a shiny silvery coating on the end which helps keep oxidisation at bay and helps solder to flow. + +When you come to apply the solder, hold the soldering iron against the two surfaces for a second to heat it, then apply a small amount of solder to join the two pieces together. Heating the surfaces ensures that the solder adheres to it and that it does not cool too quickly. + +Don't hold the iron on the solder/joint longer than necessary. Heat will be conducted through the surfaces and can damage components (melt switch housings etc.). Also, solder contains flux, which aids in ["wetting"](https://en.m.wikipedia.org/wiki/Wetting). The longer heat is applied to the solder the more flux will evaporate meaning you may end up with a bad solder joint with peaks which, apart from looking bad, may also increase the risk of electrical shorts. + +The following collapsible section describes in detail how to solder rows using the bent diode technique and columns using short lengths of wire. + +
+ +Click for details ## Soldering the Diodes @@ -169,34 +270,52 @@ Before beginning to solder, it helps to have your wire pre-bent (if using single If you're not using any insulation, you can try to keep the column wires elevated, and solder them near the tips of the keyswitch contacts - if the wires are sturdy enough, they won't short out to the row wiring an diodes. -## Wiring Things to the Teensy +
+ +# Wiring up the controller + +Now that the matrix itself is complete, it's time to connect what you've done to the microcontroller board. + +Place the microcontroller where you want it to be located, give thought to mounting and case alignment. Bear in mind that the location of the USB socket can be different from the controller by using a short male to female cable if required,. + +Find the pinout/documentation for your microcontroller board ([links here](#common-microcontroller-boards)) and make a note of all the digital I/O pins on it (note that on some controllers, like the teensy, analogue I/O can double as digital) as these are the pins you want to connect your wires to. + +
+ +Specific instructions for the Teensy 2.0 -Now that the matrix itself is complete, it's time to connect what you've done to the Teensy. You'll be needing the number of pins equal to your number of columns + your number of rows. There are some pins on the Teensy that are special, like D6 (the LED on the chip), or some of the UART, SPI, I2C, or PWM channels, but only avoid those if you're planning something in addition to a keyboard. If you're unsure about wanting to add something later, you should have enough pins in total to avoid a couple. + There are some pins on the Teensy that are special, like D6 (the LED on the chip), or some of the UART, SPI, I2C, or PWM channels, but only avoid those if you're planning something in addition to a keyboard. If you're unsure about wanting to add something later, you should have enough pins in total to avoid a couple. -The pins you'll absolutely have to avoid are: GND, VCC, AREF, and RST - all the others are usable and accessible in the firmware. +The pins you'll absolutely have to avoid, as with any controller, are: GND, VCC, AREF, and RST - all the others are usable and accessible in the firmware. -Place the Teensy where you plan to put it - you'll have to cut wires to length in the next step, and you'll want to make sure they reach. +
-Starting with the first column on the right side, measure out how much wire you'll need to connect it to the first pin on the Teensy - it helps to pick a side that you'll be able to work down, to keep the wires from overlapping too much. It may help to leave a little bit of slack so things aren't too tight. Cut the piece of wire, and solder it to the Teensy, and then the column - you can solder it anywhere along the column, but it may be easiest at the keyswitch. Just be sure the wire doesn't separate from the keyswitch when soldering. +Cut wires to the length of the distance from the a point on each column/row to the controller. You can solder anywhere along the row, as long as it's after the diode - soldering before the diode (on the keyswitch side) will cause that row not to work. -As you move from column to column, it'll be helpful to write the locations of the pins down. We'll use this data to setup the matrix in the future. +Ribbon cable can be used to keep this extra tidy. You may also want to consider routing the wires beneath the exisiting columns/rows. -When you're done with the columns, start with the rows in the same process, from top to bottom, and write them all down. Again, you can solder anywhere along the row, as long as it's after the diode - soldering before the diode (on the keyswitch side) will cause that row not to work. +Ribbon Cable -As you move along, be sure that the Teensy is staying in place - recutting and soldering the wires is a pain! +As you solder the wires to the controller make a note of which row/column is going to which pin on the controller as we'll use this data to setup the matrix when we create the firmware. -## Additional guides +As you move along, be sure that the controller is staying in place - recutting and soldering the wires is a pain! -If you're more of a visual learner, or want some additional tips and something more to follow along, these two visual step by step guides may be helpful: -- [BrownFox's step by step guide](https://deskthority.net/viewtopic.php?f=7&t=6050) -- [Cribbit's modern hand wiring guide](https://geekhack.org/index.php?topic=87689.0) # Getting Some Basic Firmware Set Up -From here, you should have a working keyboard once you program a firmware. Before we attach the Teensy permanently to the keyboard, let's quickly get some firmware loaded onto the Teensy so we can test each keyswitch. +From here, you should have a working keyboard once you program a firmware. -To start out, download [the firmware](/~https://github.com/qmk/qmk_firmware/) - we'll be using my (Jack's) fork of TMK called QMK/Quantum. We'll be doing a lot from the Terminal/command prompt, so get that open, along with a decent text editor like [Sublime Text](http://www.sublimetext.com/) (paid) or [Visual Studio Code](https://code.visualstudio.com) (free). +Simple firmware can be created easily using the [Keyboard Firmware Builder](https://kbfirmware.com/) website. Recreate your layout using [Keyboard Layout Editor](http://www.keyboard-layout-editor.com), import it and recreate the matrix (if not already done as part of [planning the matrix](#planning-the-matrix). + +Go through the rest of the tabs, assigning keys until you get to the last one where you can compile and download your firmware. The .hex file can be flashed straight onto your keyboard, and the .zip of source files can be modified for advanced functionality and compiled locally using the method described in the collapsable section below, or using the more comprehensive [getting started guide.](/docs/newbs_getting_started) + + +
+ +Creating and compiling your firmware locally (command line method) + +To start out, download [the firmware](/~https://github.com/qmk/qmk_firmware/) - We'll be doing a lot from the Terminal/command prompt, so get that open, along with a decent text editor like [Sublime Text](http://www.sublimetext.com/) (paid) or [Visual Studio Code](https://code.visualstudio.com) (free). The first thing we're going to do is create a new keyboard. In your terminal, run this command, which will ask you some questions and generate a basic keyboard project: @@ -319,9 +438,22 @@ Once everything is installed, running `make` in the terminal should get you some Once you have your `.hex` file, open up the Teensy loader application, and click the file icon. From here, navigate to your `QMK/keyboards//` folder, and select the `.hex` file. Plug in your keyboard and press the button on the Teensy - you should see the LED on the device turn off once you do. The Teensy Loader app will change a little, and the buttons should be clickable - click the download button (down arrow), and then the reset button (right arrow), and your keyboard should be ready to go! +
+ +## Flashing the Firmware + +Install [QMK toolbox](/~https://github.com/qmk/qmk_toolbox). + +![QMK Toolbox](https://i.imgur.com/86Cz30H.png) + +Under "Local File" navigate to your newly created .hex file. Under "Microcontroller", select the corresponding one for your controller board (common ones available [here](#common-microcontroller-boards)). + +Plug in your keyboard and press the reset button (or short the Reset and Ground pins if there is no button) and click the "Flash" button in QMK toolbox. + + ## Testing Your Firmware -Carefully flip your keyboard over, open up a new text document, and try typing - you should get the characters that you put into your keymap. Test each key, and note the ones that aren't working. Here's a quick trouble-shooting guide for non-working keys: +Use a website such as [keyboard tester](https://www.keyboardtester.com/tester.html)/[keyboard checker](http://keyboardchecker.com/) or just open a text editor and try typing - you should get the characters that you put into your keymap. Test each key, and make a note of the ones that aren't working. Here's a quick trouble-shooting guide for non-working keys: 0. Flip the keyboard back over and short the keyswitch's contacts with a piece wire - this will eliminate the possibility of the keyswitch being bad and needing to be replaced. 1. Check the solder points on the keyswitch - these need to be plump and whole. If you touch it with a moderate amount of force and it comes apart, it's not strong enough. @@ -330,11 +462,25 @@ Carefully flip your keyboard over, open up a new text document, and try typing - 4. Check the solder joints on both sides of the wires going to/from the Teensy - the wires need to be fully soldered and connect to both sides. 5. Check the `.h` file for errors and incorrectly placed `KC_NO`s - if you're unsure where they should be, instead duplicate a k*xy* variable. 6. Check to make sure you actually compiled the firmware and flashed the Teensy correctly. Unless you got error messages in the terminal, or a pop-up during flashing, you probably did everything correctly. +7. Use a multimeter to check that the switch is actually closing when actuated (completing the circuit when pressed down). If you've done all of these things, keep in mind that sometimes you might have had multiple things affecting the keyswitch, so it doesn't hurt to test the keyswitch by shorting it out at the end. -# Securing the Teensy, Finishing Your Hardware, Getting Fancier Firmware +# Finishing up + +Once you have confirmed that the keyboard is working, if you have used a seperate (non handwire specific) controller you will want to secure it in place. This can be done in many different ways e.g. hot glue, double sided sticky tape, 3D printed caddy, electrical tape. + +If you found this fullfilling you could experiment by adding additional features such as [in switch LEDs](https://geekhack.org/index.php?topic=94258.0), [in switch RGB](https://www.reddit.com/r/MechanicalKeyboards/comments/5s1l5u/photoskeyboard_science_i_made_a_handwired_rgb/), [RGB underglow](https://medium.com/@DavidNZ/hand-wired-custom-keyboard-cdd14429c7b3#.7a1ovebsk) or even an [OLED display!](https://www.reddit.com/r/olkb/comments/5zy7og/adding_ssd1306_oled_display_to_your_build/) + +There are a lot of possibilities inside the firmware - explore [docs.qmk.fm](http://docs.qmk.fm) for a full feature list, and dive into the different keyboards to see how people use all of them. You can always stop by [the OLKB subreddit](http://reddit.com/r/olkb) or [QMK Discord](https://discord.gg/Uq7gcHh) for help! + +# Links to other guides: + +- [matt3o's step by step guide (BrownFox build)](https://deskthority.net/viewtopic.php?f=7&t=6050) also his [website](https://matt3o.com/hand-wiring-a-custom-keyboard/) and [video guide](https://www.youtube.com/watch?v=LVzpsjFWPP4) +- [Cribbit's "Modern hand wiring guide - stronger, cleaner, easier"](https://geekhack.org/index.php?topic=87689.0) +- [Sasha Solomon's "Building my first Keyboard"](https://medium.com/@sachee/building-my-first-keyboard-and-you-can-too-512c0f8a4c5f) +- [RoastPotatoes' "How to hand wire a Planck"](https://blog.roastpotatoes.co/guide/2015/11/04/how-to-handwire-a-planck/) +- [Masterzen's "Handwired keyboard build log"](http://www.masterzen.fr/2018/12/16/handwired-keyboard-build-log-part-1/) + -Now that you have a working board, it's time to get things in their permanent positions. I've often used liberal amounts of hot glue to secure and insulate things, so if that's your style, start spreading that stuff like butter. Otherwise, double-sided tape is always an elegant solution, and electrical tape is a distant second. Due to the nature of these builds, a lot of this part is up to you and how you planned (or didn't plan) things out. -There are a lot of possibilities inside the firmware - explore [docs.qmk.fm](http://docs.qmk.fm) for a full feature list, and dive into the different keyboards (Planck, Clueboard, Ergodox EZ, etc) to see how people use all of them. You can always stop by [the OLKB subreddit for help!](http://reddit.com/r/olkb) From b2a63293763d14c7d9192367fa1890885227766e Mon Sep 17 00:00:00 2001 From: Ethan Madden Date: Fri, 25 Oct 2019 15:34:55 -0700 Subject: [PATCH 181/316] [Keymap] Fix some formatting, add blink on lock example (#7145) * Double backspace + changed layer detection * Blink on capslock * updated with feedback from @drashna --- .../prime_e/keymaps/jetpacktuxedo/keymap.c | 83 ++++++++++++++----- 1 file changed, 63 insertions(+), 20 deletions(-) diff --git a/keyboards/primekb/prime_e/keymaps/jetpacktuxedo/keymap.c b/keyboards/primekb/prime_e/keymaps/jetpacktuxedo/keymap.c index 134d09c6befc..cdd1b56430da 100644 --- a/keyboards/primekb/prime_e/keymaps/jetpacktuxedo/keymap.c +++ b/keyboards/primekb/prime_e/keymaps/jetpacktuxedo/keymap.c @@ -15,16 +15,28 @@ */ #include QMK_KEYBOARD_H +#define BLINK_DURATION 512 +#define CAPS_LED_PIN B1 +#define NUM_LED_PIN B2 +#define SCROLL_LED_PIN B3 + +uint8_t CAPS; +uint16_t BLINK_TIMER = 0; +uint8_t CAPS_LED_STATE = 0; + +// Init togg_indicator so the compiler doesn't complain when I declare it last. +static void togg_indicator(uint8_t *state, uint8_t pin); + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( - KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_DEL, + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_BSPC, LT(2, KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, LT(2, KC_ENT), KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, LT(3, KC_B), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_LCTL, KC_LGUI, KC_LALT, LT(1, KC_SPC), LT(1, KC_SPC), KC_RALT, KC_RGUI, KC_RCTL ), [1] = LAYOUT( - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, KC_TRNS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, KC_DEL, KC_TRNS, KC_MINS, KC_EQL, KC_SCLN, KC_QUOT, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_QUOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_BSLS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS @@ -39,7 +51,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [3] = LAYOUT( KC_TRNS, 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ) @@ -47,33 +59,64 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { void matrix_init_user(void) { // set CapsLock LED to output and low - setPinOutput(B1); - writePinLow(B1); + setPinOutput(CAPS_LED_PIN); + writePinLow(CAPS_LED_PIN); // set NumLock LED to output and low - setPinOutput(B2); - writePinLow(B2); + setPinOutput(NUM_LED_PIN); + writePinLow(NUM_LED_PIN); // set ScrollLock LED to output and low - setPinOutput(B3); - writePinLow(B3); + setPinOutput(SCROLL_LED_PIN); + writePinLow(SCROLL_LED_PIN); +} + +void matrix_scan_user(void) { + if (CAPS == 1) { + // Blink the first led when capslock is active + if (BLINK_TIMER >= BLINK_DURATION) { + togg_indicator(&CAPS_LED_STATE, CAPS_LED_PIN); + BLINK_TIMER = 0; + } + BLINK_TIMER++; + } } //function for layer indicator LED -uint32_t layer_state_set_user(uint32_t state) -{ - if (state & (1<<1)) { - writePinHigh(B1); +layer_state_t layer_state_set_user(layer_state_t state) { + if (layer_state_cmp(state, 1)) { + writePinHigh(CAPS_LED_PIN); } else { - writePinLow(B1); + writePinLow(CAPS_LED_PIN); } - if (state & (1<<2)) { - writePinHigh(B2); + if (layer_state_cmp(state, 2)) { + writePinHigh(NUM_LED_PIN); } else { - writePinLow(B2); + writePinLow(NUM_LED_PIN); } - if (state & (1<<3)) { - writePinHigh(B3); + if (layer_state_cmp(state, 3)) { + writePinHigh(SCROLL_LED_PIN); } else { - writePinLow(B3); + writePinLow(SCROLL_LED_PIN); } return state; } + +void led_set_user(uint8_t usb_led) { + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + CAPS = 1; + } + else { + CAPS = 0; + } +} + +void togg_indicator(uint8_t *state, uint8_t pin) { + // Toggles a pin based on the current state + if (*state == 0){ + *state = 1; + writePinHigh(pin); + } + else if (*state == 1){ + *state = 0; + writePinLow(pin); + } +} From ad5ead24c38a5ffe06017bd3f83b67ac65f75714 Mon Sep 17 00:00:00 2001 From: "Michael B. Hix" Date: Fri, 25 Oct 2019 15:48:57 -0700 Subject: [PATCH 182/316] [Keyboard] musl/add-chiron-keyboard (#7146) * Add the Chiron keyboard * Add link to case repo * Update keyboards/handwired/chiron/readme.md Co-Authored-By: fauxpark * Update keyboards/handwired/chiron/keymaps/default/config.h Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/handwired/chiron/rules.mk Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/handwired/chiron/rules.mk Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/handwired/chiron/rules.mk Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/handwired/chiron/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/handwired/chiron/rules.mk Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/handwired/chiron/rules.mk Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Clean up rules.mk for the configurator --- keyboards/handwired/chiron/chiron.c | 16 +++++ keyboards/handwired/chiron/chiron.h | 42 ++++++++++++ keyboards/handwired/chiron/config.h | 57 +++++++++++++++++ keyboards/handwired/chiron/info.json | 0 .../handwired/chiron/keymaps/default/config.h | 52 +++++++++++++++ .../handwired/chiron/keymaps/default/keymap.c | 64 +++++++++++++++++++ .../chiron/keymaps/default/readme.md | 1 + .../handwired/chiron/keymaps/default/rules.mk | 0 keyboards/handwired/chiron/readme.md | 16 +++++ keyboards/handwired/chiron/rules.mk | 38 +++++++++++ 10 files changed, 286 insertions(+) create mode 100644 keyboards/handwired/chiron/chiron.c create mode 100644 keyboards/handwired/chiron/chiron.h create mode 100644 keyboards/handwired/chiron/config.h create mode 100644 keyboards/handwired/chiron/info.json create mode 100644 keyboards/handwired/chiron/keymaps/default/config.h create mode 100644 keyboards/handwired/chiron/keymaps/default/keymap.c create mode 100644 keyboards/handwired/chiron/keymaps/default/readme.md create mode 100644 keyboards/handwired/chiron/keymaps/default/rules.mk create mode 100644 keyboards/handwired/chiron/readme.md create mode 100644 keyboards/handwired/chiron/rules.mk diff --git a/keyboards/handwired/chiron/chiron.c b/keyboards/handwired/chiron/chiron.c new file mode 100644 index 000000000000..997cda6a4d6f --- /dev/null +++ b/keyboards/handwired/chiron/chiron.c @@ -0,0 +1,16 @@ +/* Copyright 2019 Mike Hix + * + * 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 . + */ +#include "chiron.h" diff --git a/keyboards/handwired/chiron/chiron.h b/keyboards/handwired/chiron/chiron.h new file mode 100644 index 000000000000..9d1ab385a523 --- /dev/null +++ b/keyboards/handwired/chiron/chiron.h @@ -0,0 +1,42 @@ +/* Copyright 2019 Mike Hix + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ + L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ + L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ + L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36, \ + L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, R45 \ + ) \ + { \ + /* Left Half */ \ + { L06, L05, L04, L03, L02, L01, L00 }, \ + { L16, L15, L14, L13, L12, L11, L10 }, \ + { L26, L25, L24, L23, L22, L21, L20 }, \ + { L36, L35, L34, L33, L32, L31, L30 }, \ + { L45, L44, L43, KC_NO, L42, L41, L40 }, \ + /* Right Half */ \ + { R06, R05, R04, R03, R02, R01, R00 }, \ + { R16, R15, R14, R13, R12, R11, R10 }, \ + { R26, R25, R24, R23, R22, R21, R20 }, \ + { R36, R35, R34, R33, R32, R31, R30 }, \ + { R45, R44, R43, KC_NO, R42, R41, R40 } \ + } + +#define LAYOUT_chiron LAYOUT diff --git a/keyboards/handwired/chiron/config.h b/keyboards/handwired/chiron/config.h new file mode 100644 index 000000000000..fcc5ae49a6d6 --- /dev/null +++ b/keyboards/handwired/chiron/config.h @@ -0,0 +1,57 @@ +/* +Copyright 2019 Mike Hix + +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 . +*/ + +#pragma once + +#include "config_common.h" + +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Mike Hix +#define PRODUCT chiron +#define DESCRIPTION A custom keyboard + +#define MATRIX_ROWS 10 +#define MATRIX_COLS 7 + +// Pro Micro Pins 4, 6, 7, 8, 9 +#define MATRIX_ROW_PINS { D4, D7, E6, B4, B5 } +// Pro Micro Pins A3, A2, A1, A0, 15, 14, 16 +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 } + +#define UNUSED_PINS + +// Pro Micro Pins RX1 +#define SPLIT_HAND_PIN D2 + +// Pro Micro Pins RX1 +#define SOFT_SERIAL_PIN D0 + +#define DIODE_DIRECTION COL2ROW + +#define DEBOUNCE 5 + +#define LOCKING_SUPPORT_ENABLE +#define LOCKING_RESYNC_ENABLE + +#define RGB_DI_PIN D3 +#define RGBLED_NUM 4 + +#define BACKLIGHT_PIN B6 +#define BACKLIGHT_LEVELS 7 + diff --git a/keyboards/handwired/chiron/info.json b/keyboards/handwired/chiron/info.json new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/keyboards/handwired/chiron/keymaps/default/config.h b/keyboards/handwired/chiron/keymaps/default/config.h new file mode 100644 index 000000000000..08134a720b01 --- /dev/null +++ b/keyboards/handwired/chiron/keymaps/default/config.h @@ -0,0 +1,52 @@ +/* Copyright 2019 Mike Hix + * + * 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 . + */ + +#pragma once + +#define USE_SERIAL +#define MASTER_RIGHT +//#define MASTER_LEFT + +#define IGNORE_MOD_TAP_INTERRUPT +#define PERMISSIVE_HOLD + +#define TAPPING_TERM 200 + +#define MOUSEKEY_DELAY 20 +#define MOUSEKEY_INTERVAL 20 +#define MOUSEKEY_MAX_SPEED 10 +#define MOUSEKEY_TIME_TO_MAX 30 +#define MOUSEKEY_WHEEL_MAX_SPEED 8 +#define MOUSEKEY_WHEEL_TIME_TO_MAX 40 + +#undef RGBLED_NUM +#define RGBLED_NUM 2 +#define RGBLED_SPLIT {1, 1} + +// Don't turn off lights when the host goes to sleep. +#undef RGBLIGHT_SLEEP + +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + +// Selectively enable animations to save on code size. +#undef RGBLIGHT_ANIMATIONS +#define RGBLIGHT_EFFECT_BREATHING +#define RGBLIGHT_EFFECT_BREATHING +#define RGBLIGHT_EFFECT_RAINBOW_MOOD +#define RGBLIGHT_EFFECT_RAINBOW_SWIRL + diff --git a/keyboards/handwired/chiron/keymaps/default/keymap.c b/keyboards/handwired/chiron/keymaps/default/keymap.c new file mode 100644 index 000000000000..53c8edeb0a57 --- /dev/null +++ b/keyboards/handwired/chiron/keymaps/default/keymap.c @@ -0,0 +1,64 @@ +/* Copyright 2019 Mike Hix + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_HOME, KC_END, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_BSPC, KC_DEL, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSLS, + KC_ESC, KC_A, KC_O, LT(1,KC_E), LT(2,KC_U), KC_I, LCTL_T(KC_ENT), RCTL_T(KC_ENT), KC_D, LT(3,KC_H), LT(4,KC_T), KC_N, KC_S, KC_MINS, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_PGUP, KC_PGDN, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, + KC_CAPS, KC_INS, KC_LCTL, /*, */KC_LALT, LGUI_T(KC_SPC), KC_HYPR, KC_HYPR, RGUI_T(KC_SPC), KC_RALT, /*, */KC_LBRC, KC_RBRC, KC_SLSH + ), + [1] = LAYOUT( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_WH_U, XXXXXXX, XXXXXXX, RESET, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLU, KC_WH_L, KC_MS_U, KC_WH_R, XXXXXXX, EEP_RST, + XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, _______, _______, KC_MUTE, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN1, KC_BTN2, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, KC_VOLD, XXXXXXX, KC_WH_D, XXXXXXX, KC_BTN3, KC_BTN4, + XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX + ), + [2] = LAYOUT( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_INS, KC_PSCR, KC_UP, KC_PAUS, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, _______, _______, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, KC_PGDN, XXXXXXX, XXXXXXX, _______, + XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX + ), + [3] = LAYOUT( + XXXXXXX, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, + XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX + ), + [4] = LAYOUT( + RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + EEP_RST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, RGB_HUI, RGB_SAI, RGB_VAI, RGB_MOD, RGB_TOG, _______, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, + _______, RGB_HUD, RGB_SAD, RGB_VAD, RGB_RMOD, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, + XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX + ) + /* + [] = LAYOUT( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, + XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX + ) + */ +}; + diff --git a/keyboards/handwired/chiron/keymaps/default/readme.md b/keyboards/handwired/chiron/keymaps/default/readme.md new file mode 100644 index 000000000000..c95a502f2218 --- /dev/null +++ b/keyboards/handwired/chiron/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for chiron diff --git a/keyboards/handwired/chiron/keymaps/default/rules.mk b/keyboards/handwired/chiron/keymaps/default/rules.mk new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/keyboards/handwired/chiron/readme.md b/keyboards/handwired/chiron/readme.md new file mode 100644 index 000000000000..1e4bcf8b66cd --- /dev/null +++ b/keyboards/handwired/chiron/readme.md @@ -0,0 +1,16 @@ +# Chiron Keyboard + +![chiron](https://i.imgur.com/3XZACfs.jpg) + +This is a custom keyboard meant to be easily and quickly 3D printable on +most FFF/FDM printers. It's inspired by the [Viterbi](https://keeb.io/products/viterbi-keyboard-pcbs-5x7-70-split-ortholinear), [Iris](https://keeb.io/products/iris-keyboard-split-ergonomic-keyboard), and +[Dactyl Manuform](/~https://github.com/adereth/dactyl-keyboard) keyboards. + +Keyboard Maintainer: [Mike Hix](/~https://github.com/musl/) +Case: [/~https://github.com/musl/chiron-keyboard](/~https://github.com/musl/chiron-keyboard) + +Make example for this keyboard (after setting up your build environment): + + make handwired/chiron:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/handwired/chiron/rules.mk b/keyboards/handwired/chiron/rules.mk new file mode 100644 index 000000000000..a5bbb30e18a9 --- /dev/null +++ b/keyboards/handwired/chiron/rules.mk @@ -0,0 +1,38 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu +SPLIT_KEYBOARD = yes + +# Build Options +# change yes to no to disable +# +AUDIO_ENABLE = no +AUTOLOG_ENABLE = no +BACKLIGHT_ENABLE = no +BLUETOOTH_ENABLE = no +BOOTMAGIC_ENABLE = no +COMMAND_ENABLE = no +CONSOLE_ENABLE = no +DEBUG_ENABLE = no +EXTRAKEY_ENABLE = no +FAUXCLICKY_ENABLE = no +HD44780_ENABLE = no +LEADER_ENABLE = no +MIDI_ENABLE = no +MOUSEKEY_ENABLE = yes +NKRO_ENABLE = no +RGBLIGHT_ENABLE = yes +SLEEP_LED_ENABLE = yes +TAP_DANCE_ENABLE = no +UCIS_ENABLE = no +UNICODEMAP_ENABLE = no +UNICODE_ENABLE = no From d03303ab74ab631c95b1da7c2fb67d06ff62bac5 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sat, 26 Oct 2019 00:27:17 +0100 Subject: [PATCH 183/316] Revert "Initial actions/labeler config (#7091)" (#7156) This reverts commit 32fdf4805ae8d76649fa821275cc2333c5e8bba9. --- .github/labeler.yml | 18 ------------------ .github/workflows/labeler.yml | 11 ----------- 2 files changed, 29 deletions(-) delete mode 100644 .github/labeler.yml delete mode 100644 .github/workflows/labeler.yml diff --git a/.github/labeler.yml b/.github/labeler.yml deleted file mode 100644 index f4b07765c516..000000000000 --- a/.github/labeler.yml +++ /dev/null @@ -1,18 +0,0 @@ -core: - - quantum/**/* - - tmk_core/**/* - - drivers/**/* - - tests/**/* - - util/**/* -keymap: - - users/**/* - - layouts/**/* - - keyboards/**/keymap/**/* -cli: - - bin/qmk - - requirements.txt - - lib/python/**/* -python: - - '**/*.py' -documentation: - - docs/**/* diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml deleted file mode 100644 index dcafb97dc984..000000000000 --- a/.github/workflows/labeler.yml +++ /dev/null @@ -1,11 +0,0 @@ -name: "Pull Request Labeler" -on: -- pull_request - -jobs: - triage: - runs-on: ubuntu-latest - steps: - - uses: actions/labeler@v2 - with: - repo-token: "${{ secrets.GITHUB_TOKEN }}" From a30ccc025efe2e84cd4c9b8a0cbb3358b8d4dba8 Mon Sep 17 00:00:00 2001 From: Rys Sommefeldt Date: Sat, 26 Oct 2019 02:07:49 +0100 Subject: [PATCH 184/316] [Keymap] Personal layout for the RAMA M6-A (#7152) --- .../rama_works_m6_a/keymaps/rys/keymap.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 keyboards/wilba_tech/rama_works_m6_a/keymaps/rys/keymap.c diff --git a/keyboards/wilba_tech/rama_works_m6_a/keymaps/rys/keymap.c b/keyboards/wilba_tech/rama_works_m6_a/keymaps/rys/keymap.c new file mode 100644 index 000000000000..f7e35a9efc04 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m6_a/keymaps/rys/keymap.c @@ -0,0 +1,18 @@ +#include QMK_KEYBOARD_H + +enum layers +{ + _LAYER0, + _LAYER1 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_LAYER0] = LAYOUT( + KC_NO, KC_UP, TO(_LAYER1), + KC_LEFT, KC_DOWN, KC_RIGHT + ), + [_LAYER1] = LAYOUT( + KC_NUBS, KC_NUHS, TO(_LAYER0), + LCAG(KC_Z), LCAG(KC_X), LCAG(KC_C) + ) +}; From 50202bc2227e1e0eb2e05b79c226d64d7f7c24a3 Mon Sep 17 00:00:00 2001 From: Rys Sommefeldt Date: Sat, 26 Oct 2019 02:14:21 +0100 Subject: [PATCH 185/316] [Keymap] Align top and bottom layers to make it easier to map between them (#7153) --- .../wonderland/keymaps/rys/keymap.c | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/keyboards/maartenwut/wonderland/keymaps/rys/keymap.c b/keyboards/maartenwut/wonderland/keymaps/rys/keymap.c index 4ce022dd9171..7669df535ec8 100755 --- a/keyboards/maartenwut/wonderland/keymaps/rys/keymap.c +++ b/keyboards/maartenwut/wonderland/keymaps/rys/keymap.c @@ -5,20 +5,19 @@ enum layers { _FUNC }; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BASE] = LAYOUT( - KC_ESC, 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, XXXXXXX, KC_BSPC, \ - KC_PGUP, 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_DEL, \ - KC_PGDN, 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, MO(1), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), \ - KC_LCTL, KC_LGUI, KC_NUBS, KC_LALT, KC_SPC, KC_NUHS, KC_RCTRL \ + KC_ESC, 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, XXXXXXX, KC_BSPC, + KC_PGUP, 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_DEL, + KC_PGDN, 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_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_LCTL, KC_LGUI, KC_NUBS, KC_LALT, KC_SPC, KC_NUHS, KC_RCTRL ), [_FUNC] = LAYOUT( - RGB_TOG, VLK_TOG, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, RESET, \ - RGB_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ -RGB_RMOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, \ - RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN,KC_RIGHT, XXXXXXX, \ - _______, KC_LALT, _______, _______, _______, KC_RALT, _______ \ + RGB_TOG, VLK_TOG, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, RESET, + RGB_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, +RGB_RMOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, + RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RIGHT, XXXXXXX, + _______, KC_LALT, _______, _______, _______, KC_RALT, _______ ) }; From 19f73483d872b43b72374f2dacbb96ff1742624e Mon Sep 17 00:00:00 2001 From: Gouty Date: Sat, 26 Oct 2019 02:16:17 +0100 Subject: [PATCH 186/316] [Docs] Fixed internal links on Handwire page (#7154) Some of the links were not playing nice on docs.qmk.fm, I think this fixes it. --- docs/hand_wire.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/hand_wire.md b/docs/hand_wire.md index 426afddb9a41..0e750f160a98 100644 --- a/docs/hand_wire.md +++ b/docs/hand_wire.md @@ -104,7 +104,7 @@ Further reading: - [Deskthority article](https://deskthority.net/wiki/Keyboard_matrix) - [Keyboard Matrix Help by Dave Dribin (2000)](https://www.dribin.org/dave/keyboard/one_html/) - [How Key Matrices Works by PCBheaven](http://pcbheaven.com/wikipages/How_Key_Matrices_Works/) (animated examples) -- [How keyboards work - QMK documentation](/docs/how_keyboards_work.md) +- [How keyboards work - QMK documentation](how_keyboards_work.md)
@@ -139,7 +139,7 @@ Start by installing the switches and stabilisers in the plate. Depending on the ## Planning the matrix -If you are following a pre-existing handwire guide (e.g. for the keyboards in the [handwire firmware section](/keyboards/handwired/) you can skip this step, just ensure you wire the matrix as described. +If you are following a pre-existing handwire guide (e.g. for the keyboards in the [handwire firmware section](/~https://github.com/qmk/qmk_firmware/tree/master/keyboards/handwired) you can skip this step, just ensure you wire the matrix as described. What you want to achieve is one leg from each switch being attached to the corresponding switches next to it (rows) and the other leg being attached to the switches above and below it (columns) and a diode to one of the legs, mosy commonly this will be the leg attached to the rows, and the diode will face away from it (Column to Row) i.e. with the wire furthest from the black line on the diode connected to the switch (as current will only travel in one direction through a diode) @@ -197,7 +197,7 @@ Note that these methods can be combined. Prepare your lengths of wire before mo ### A note on split keyboards -If you are planning a split keyboard (e.g. Dactyl) each half will require a controller and a means of communicating between them (like a TRRS or hardwired cable). Further information can be found in the [QMK split keyboard documentation.](/docs/feature_split_keyboard.md) +If you are planning a split keyboard (e.g. Dactyl) each half will require a controller and a means of communicating between them (like a TRRS or hardwired cable). Further information can be found in the [QMK split keyboard documentation.](feature_split_keyboard.md) ### Soldering @@ -308,7 +308,7 @@ From here, you should have a working keyboard once you program a firmware. Simple firmware can be created easily using the [Keyboard Firmware Builder](https://kbfirmware.com/) website. Recreate your layout using [Keyboard Layout Editor](http://www.keyboard-layout-editor.com), import it and recreate the matrix (if not already done as part of [planning the matrix](#planning-the-matrix). -Go through the rest of the tabs, assigning keys until you get to the last one where you can compile and download your firmware. The .hex file can be flashed straight onto your keyboard, and the .zip of source files can be modified for advanced functionality and compiled locally using the method described in the collapsable section below, or using the more comprehensive [getting started guide.](/docs/newbs_getting_started) +Go through the rest of the tabs, assigning keys until you get to the last one where you can compile and download your firmware. The .hex file can be flashed straight onto your keyboard, and the .zip of source files can be modified for advanced functionality and compiled locally using the method described in the collapsable section below, or using the more comprehensive [getting started guide.](newbs_getting_started)
From 006ec86786da874938f54e9b1d0f4a5f049de546 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Sat, 26 Oct 2019 12:23:11 +1100 Subject: [PATCH 187/316] [Keyboard] Fix Print Screen key for XT to USB converter (#7039) * Fix Print Screen key for XT to USB converter * While I'm here, get rid of led.c as it does absolutely nothing * Fix info.json too * "]" key is 1.25U and stepped on the Model F XT --- keyboards/converter/xt_usb/info.json | 4 ++-- .../converter/xt_usb/keymaps/default/keymap.c | 4 ++-- keyboards/converter/xt_usb/led.c | 22 ------------------- keyboards/converter/xt_usb/rules.mk | 2 +- keyboards/converter/xt_usb/xt_usb.h | 10 ++++----- 5 files changed, 10 insertions(+), 32 deletions(-) delete mode 100644 keyboards/converter/xt_usb/led.c diff --git a/keyboards/converter/xt_usb/info.json b/keyboards/converter/xt_usb/info.json index 1fde77d1f920..2de390ae0771 100644 --- a/keyboards/converter/xt_usb/info.json +++ b/keyboards/converter/xt_usb/info.json @@ -40,7 +40,7 @@ {"label":"O", "x":11.75, "y":1}, {"label":"P", "x":12.75, "y":1}, {"label":"[", "x":13.75, "y":1}, - {"label":"]", "x":14.75, "y":1}, + {"label":"]", "x":14.75, "y":1, "w": 1.25}, {"label":"7", "x":17, "y":1}, {"label":"8", "x":18, "y":1}, {"label":"9", "x":19, "y":1}, @@ -79,7 +79,7 @@ {"label":".", "x":12.5, "y":3}, {"label":"/", "x":13.5, "y":3}, {"label":"Shift", "x":14.5, "y":3, "w":1.5}, - {"label":"Print Screen", "x":16, "y":3}, + {"label":"*", "x":16, "y":3}, {"label":"1", "x":17, "y":3}, {"label":"2", "x":18, "y":3}, {"label":"3", "x":19, "y":3}, diff --git a/keyboards/converter/xt_usb/keymaps/default/keymap.c b/keyboards/converter/xt_usb/keymaps/default/keymap.c index 3ef6060700bf..b44b946e8f72 100644 --- a/keyboards/converter/xt_usb/keymaps/default/keymap.c +++ b/keyboards/converter/xt_usb/keymaps/default/keymap.c @@ -10,7 +10,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |-------| |------------------------------------------------------|Ent|---------------| * | F5| F6| | Ctrl | A| S| D| F| G| H| J| K| L| ;| '| `| | 4| 5| 6| | * |-------| |----------------------------------------------------------------------| | - * | F7| F8| |Shif| \| Z| X| C| V| B| N| M| ,| .| /|Shift|PrS| 1| 2| 3| +| + * | F7| F8| |Shif| \| Z| X| C| V| B| N| M| ,| .| /|Shift| *| 1| 2| 3| +| * |-------| |----------------------------------------------------------------------| | * | F9|F10| | Alt | Space |CapsLck| 0 | . | | * `-------' `--------------------------------------------------------------------------' @@ -19,7 +19,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_F1, KC_F2, 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_NLCK, KC_SLCK, KC_F3, KC_F4, 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_P7, KC_P8, KC_P9, KC_PMNS, KC_F5, KC_F6, KC_LCTL,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,KC_GRV, KC_ENT, KC_P4, KC_P5, KC_P6, - KC_F7, KC_F8, KC_LSFT,KC_BSLS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT,KC_PSCR,KC_P1, KC_P2, KC_P3, KC_PPLS, + KC_F7, KC_F8, KC_LSFT,KC_BSLS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT,KC_PAST,KC_P1, KC_P2, KC_P3, KC_PPLS, KC_F9, KC_F10, KC_LALT, KC_SPC, KC_CAPS, KC_P0, KC_PDOT ), diff --git a/keyboards/converter/xt_usb/led.c b/keyboards/converter/xt_usb/led.c deleted file mode 100644 index 6fa077032be3..000000000000 --- a/keyboards/converter/xt_usb/led.c +++ /dev/null @@ -1,22 +0,0 @@ -/* -Copyright 2016 Ethan Apodaca - -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 . -*/ - -#include "led.h" - -void led_set(uint8_t usb_led) { - //XT Keyboards do not have LEDs, nothing to do. -} diff --git a/keyboards/converter/xt_usb/rules.mk b/keyboards/converter/xt_usb/rules.mk index 05b70519c7b1..444e5f02df99 100644 --- a/keyboards/converter/xt_usb/rules.mk +++ b/keyboards/converter/xt_usb/rules.mk @@ -23,7 +23,7 @@ NKRO_ENABLE = yes # USB Nkey Rollover XT_ENABLE = yes CUSTOM_MATRIX = yes -SRC = matrix.c led.c +SRC += matrix.c # Optimize size but this may cause error "relocation truncated to fit" #EXTRALDFLAGS = -Wl,--relax diff --git a/keyboards/converter/xt_usb/xt_usb.h b/keyboards/converter/xt_usb/xt_usb.h index 9785158b4c56..88d9f576c826 100644 --- a/keyboards/converter/xt_usb/xt_usb.h +++ b/keyboards/converter/xt_usb/xt_usb.h @@ -26,7 +26,7 @@ along with this program. If not, see . * |-------| |------------------------------------------------------|Ent|---------------| * | F5| F6| | Ctrl | A| S| D| F| G| H| J| K| L| ;| '| `| | 4| 5| 6| | * |-------| |----------------------------------------------------------------------| | - * | F7| F8| |Shif| \| Z| X| C| V| B| N| M| ,| .| /|Shift|PrS| 1| 2| 3| +| + * | F7| F8| |Shif| \| Z| X| C| V| B| N| M| ,| .| /|Shift| *| 1| 2| 3| +| * |-------| |----------------------------------------------------------------------| | * | F9|F10| | Alt | Space |CapsLck| 0 | . | | * `-------' `--------------------------------------------------------------------------' @@ -38,7 +38,7 @@ along with this program. If not, see . * |-------| |------------------------------------------------------| 1C|---------------| * | 3F| 40| | 1D | 1E| 1F| 20| 21| 22| 23| 24| 25| 26| 27| 28| 29| | 4B| 4C| 4D| | * |-------| |----------------------------------------------------------------------| | - * | 41| 42| | 2A | 2B| 2C| 2D| 2E| 2F| 30| 31| 32| 33| 34| 35| 36 |*37| 4F| 50| 51| 4E| + * | 41| 42| | 2A | 2B| 2C| 2D| 2E| 2F| 30| 31| 32| 33| 34| 35| 36 | 37| 4F| 50| 51| 4E| * |-------| |----------------------------------------------------------------------| | * | 43| 44| | 38 | 39 | 3A | 52 | 53 | | * `-------' `--------------------------------------------------------------------------' @@ -47,7 +47,7 @@ along with this program. If not, see . K3B,K3C, K01,K02,K03,K04,K05,K06,K07,K08,K09,K0A,K0B,K0C,K0D,K0E, K45, K46, \ K3D,K3E, K0F,K10,K11,K12,K13,K14,K15,K16,K17,K18,K19,K1A,K1B, K47,K48,K49,K4A, \ K3F,K40, K1D,K1E,K1F,K20,K21,K22,K23,K24,K25,K26,K27,K28,K29,K1C,K4B,K4C,K4D, \ - K41,K42, K2A,K2B,K2C,K2D,K2E,K2F,K30,K31,K32,K33,K34,K35,K36,K54,K4F,K50,K51,K4E, \ + K41,K42, K2A,K2B,K2C,K2D,K2E,K2F,K30,K31,K32,K33,K34,K35,K36,K37,K4F,K50,K51,K4E, \ K43,K44, K38, K39, K3A, K52, K53 \ ) { \ { KC_NO, K01, K02, K03, K04, K05, K06, K07 }, \ @@ -56,11 +56,11 @@ along with this program. If not, see . { K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \ { K20, K21, K22, K23, K24, K25, K26, K27 }, \ { K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, \ - { K30, K31, K32, K33, K34, K35, K36, KC_NO }, \ + { K30, K31, K32, K33, K34, K35, K36, K37 }, \ { K38, K39, K3A, K3B, K3C, K3D, K3E, K3F }, \ { K40, K41, K42, K43, K44, K45, K46, K47 }, \ { K48, K49, K4A, K4B, K4C, K4D, K4E, K4F }, \ - { K50, K51, K52, K53, K54, KC_NO, KC_NO, KC_NO }, \ + { K50, K51, K52, K53, KC_NO, KC_NO, KC_NO, KC_NO }, \ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ From 5d34e70cf773531536dda363fc43c60146e3d97c Mon Sep 17 00:00:00 2001 From: fauxpark Date: Sat, 26 Oct 2019 12:32:18 +1100 Subject: [PATCH 188/316] Cleanup rules.mk for 32U4 keyboards, N-Q (#7147) --- keyboards/naked48/keymaps/default/rules.mk | 0 .../keymaps/default_with_nafuda/rules.mk | 2 +- .../keymaps/default_with_setta21/rules.mk | 0 keyboards/naked48/rules.mk | 3 - .../keymaps/default_with_nafuda/rules.mk | 0 .../keymaps/default_with_setta21/rules.mk | 0 keyboards/namecard2x4/rev1/rules.mk | 80 ------------------- keyboards/namecard2x4/rev2/rules.mk | 80 ------------------- keyboards/namecard2x4/rules.mk | 35 ++++++++ keyboards/nek_type_a/rules.mk | 23 +++--- keyboards/newgame40/rules.mk | 50 ++---------- keyboards/nightmare/rules.mk | 15 +--- keyboards/niu_mini/rules.mk | 14 ++-- keyboards/nomu30/rules.mk | 51 +----------- keyboards/noxary/220/rules.mk | 51 +----------- keyboards/noxary/260/rules.mk | 5 +- keyboards/noxary/268/rules.mk | 50 +++--------- keyboards/noxary/268_2/rules.mk | 43 +--------- keyboards/noxary/280/rules.mk | 51 +----------- keyboards/noxary/x268/rules.mk | 51 +----------- keyboards/ok60/rules.mk | 54 +++---------- keyboards/orange75/rules.mk | 53 +----------- keyboards/org60/rules.mk | 55 +++---------- keyboards/orthodox/keymaps/default/rules.mk | 0 keyboards/orthodox/rev1/rules.mk | 11 ++- keyboards/orthodox/rev3/rules.mk | 11 ++- keyboards/orthodox/rev3_teensy/rules.mk | 11 ++- keyboards/orthodox/rules.mk | 40 ---------- keyboards/otaku_split/rev0/rules.mk | 51 +----------- keyboards/otaku_split/rev1/rules.mk | 51 +----------- keyboards/paladin64/rules.mk | 49 +++--------- keyboards/pancake/feather/rules.mk | 12 ++- keyboards/pancake/promicro/rules.mk | 10 ++- keyboards/pdxkbc/rules.mk | 51 +----------- keyboards/percent/booster/rules.mk | 11 +-- keyboards/phantom/keymaps/default/rules.mk | 35 +------- keyboards/phantom/rules.mk | 54 +++---------- keyboards/pinky/3/keymaps/default/rules.mk | 18 ----- keyboards/pinky/3/rules.mk | 1 - keyboards/pinky/4/keymaps/default/rules.mk | 18 ----- keyboards/pinky/4/rules.mk | 1 - keyboards/pinky/rules.mk | 51 +----------- keyboards/planck/ez/rules.mk | 3 - keyboards/planck/rev1/rules.mk | 11 ++- keyboards/planck/rev2/rules.mk | 11 ++- keyboards/planck/rev3/rules.mk | 15 ++-- keyboards/planck/rev4/rules.mk | 15 ++-- keyboards/planck/rev5/rules.mk | 15 ++-- keyboards/planck/rev6/rules.mk | 3 - keyboards/playkbtw/ca66/rules.mk | 8 ++ keyboards/playkbtw/pk60/rules.mk | 48 +++-------- keyboards/preonic/rev1/rules.mk | 47 ++--------- keyboards/preonic/rev2/rules.mk | 47 ++--------- keyboards/primekb/prime_e/rules.mk | 53 +----------- keyboards/primekb/prime_l/rules.mk | 51 +----------- keyboards/primekb/prime_r/rules.mk | 50 +++--------- keyboards/puck/rules.mk | 52 ++---------- keyboards/quantrik/kyuu/rules.mk | 51 +----------- keyboards/qwertyydox/keymaps/default/rules.mk | 1 - keyboards/qwertyydox/rules.mk | 47 ++--------- 60 files changed, 300 insertions(+), 1480 deletions(-) delete mode 100644 keyboards/naked48/keymaps/default/rules.mk delete mode 100644 keyboards/naked48/keymaps/default_with_setta21/rules.mk delete mode 100644 keyboards/naked60/keymaps/default_with_nafuda/rules.mk delete mode 100644 keyboards/naked60/keymaps/default_with_setta21/rules.mk create mode 100644 keyboards/namecard2x4/rules.mk delete mode 100644 keyboards/orthodox/keymaps/default/rules.mk delete mode 100644 keyboards/pinky/3/keymaps/default/rules.mk delete mode 100644 keyboards/pinky/4/keymaps/default/rules.mk delete mode 100644 keyboards/qwertyydox/keymaps/default/rules.mk diff --git a/keyboards/naked48/keymaps/default/rules.mk b/keyboards/naked48/keymaps/default/rules.mk deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/keyboards/naked48/keymaps/default_with_nafuda/rules.mk b/keyboards/naked48/keymaps/default_with_nafuda/rules.mk index f76b955efde2..6c605daecf53 100644 --- a/keyboards/naked48/keymaps/default_with_nafuda/rules.mk +++ b/keyboards/naked48/keymaps/default_with_nafuda/rules.mk @@ -1 +1 @@ -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +MOUSEKEY_ENABLE = yes diff --git a/keyboards/naked48/keymaps/default_with_setta21/rules.mk b/keyboards/naked48/keymaps/default_with_setta21/rules.mk deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/keyboards/naked48/rules.mk b/keyboards/naked48/rules.mk index 4427284e7f3a..75e073df6d17 100644 --- a/keyboards/naked48/rules.mk +++ b/keyboards/naked48/rules.mk @@ -11,9 +11,6 @@ MCU = atmega32u4 # ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically diff --git a/keyboards/naked60/keymaps/default_with_nafuda/rules.mk b/keyboards/naked60/keymaps/default_with_nafuda/rules.mk deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/keyboards/naked60/keymaps/default_with_setta21/rules.mk b/keyboards/naked60/keymaps/default_with_setta21/rules.mk deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/keyboards/namecard2x4/rev1/rules.mk b/keyboards/namecard2x4/rev1/rules.mk index 407298e90071..e69de29bb2d1 100644 --- a/keyboards/namecard2x4/rev1/rules.mk +++ b/keyboards/namecard2x4/rev1/rules.mk @@ -1,80 +0,0 @@ -# MCU name -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - -# Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# atmega32a bootloadHID -BOOTLOADER = atmel-dfu - - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = no # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 -FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) - -#UNICODEMAP_ENABLE = yes # for emoji user -#RGBLIGHT_ENABLE = yes # uncomment if you want addressable led strips diff --git a/keyboards/namecard2x4/rev2/rules.mk b/keyboards/namecard2x4/rev2/rules.mk index 407298e90071..e69de29bb2d1 100644 --- a/keyboards/namecard2x4/rev2/rules.mk +++ b/keyboards/namecard2x4/rev2/rules.mk @@ -1,80 +0,0 @@ -# MCU name -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - -# Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# atmega32a bootloadHID -BOOTLOADER = atmel-dfu - - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = no # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 -FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) - -#UNICODEMAP_ENABLE = yes # for emoji user -#RGBLIGHT_ENABLE = yes # uncomment if you want addressable led strips diff --git a/keyboards/namecard2x4/rules.mk b/keyboards/namecard2x4/rules.mk new file mode 100644 index 000000000000..d9eff798ced3 --- /dev/null +++ b/keyboards/namecard2x4/rules.mk @@ -0,0 +1,35 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +#UNICODEMAP_ENABLE = yes # for emoji user +#RGBLIGHT_ENABLE = yes # uncomment if you want addressable led strips diff --git a/keyboards/nek_type_a/rules.mk b/keyboards/nek_type_a/rules.mk index 6f172a9cea16..db5b1642c889 100644 --- a/keyboards/nek_type_a/rules.mk +++ b/keyboards/nek_type_a/rules.mk @@ -1,14 +1,17 @@ -SRC = matrix.c mcp23017.c - +# MCU name MCU = atmega32u4 -F_CPU = 8000000 - -ARCH = AVR8 -F_USB = $(F_CPU) -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT +# Processor frequency +F_CPU = 8000000 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) @@ -30,4 +33,6 @@ FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) CUSTOM_MATRIX = yes DEBUG_ENABLE = yes -BLUETOOTH = AdafruitBLE \ No newline at end of file +BLUETOOTH = AdafruitBLE + +SRC += matrix.c mcp23017.c diff --git a/keyboards/newgame40/rules.mk b/keyboards/newgame40/rules.mk index e92cde758afb..ab07dd2b6a29 100644 --- a/keyboards/newgame40/rules.mk +++ b/keyboards/newgame40/rules.mk @@ -1,48 +1,14 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina # Build Options diff --git a/keyboards/nightmare/rules.mk b/keyboards/nightmare/rules.mk index d33c542a5dcb..66a778b6c231 100644 --- a/keyboards/nightmare/rules.mk +++ b/keyboards/nightmare/rules.mk @@ -1,27 +1,16 @@ # MCU name MCU = atmega32u4 - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/niu_mini/rules.mk b/keyboards/niu_mini/rules.mk index 03b02cdde401..67548a448c1a 100644 --- a/keyboards/niu_mini/rules.mk +++ b/keyboards/niu_mini/rules.mk @@ -1,12 +1,14 @@ # MCU name MCU = atmega32u4 -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu # Build Options diff --git a/keyboards/nomu30/rules.mk b/keyboards/nomu30/rules.mk index f51259b2910e..e05730c69e66 100644 --- a/keyboards/nomu30/rules.mk +++ b/keyboards/nomu30/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/noxary/220/rules.mk b/keyboards/noxary/220/rules.mk index af8b7d6839d9..785fb488d415 100644 --- a/keyboards/noxary/220/rules.mk +++ b/keyboards/noxary/220/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/noxary/260/rules.mk b/keyboards/noxary/260/rules.mk index 646d38de366a..4d9977cd3bd9 100644 --- a/keyboards/noxary/260/rules.mk +++ b/keyboards/noxary/260/rules.mk @@ -7,7 +7,8 @@ MCU = atmega32u4 # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu # Build Options @@ -32,4 +33,4 @@ FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) EXTRAFLAGS += -flto -LAYOUTS = 60_ansi 60_iso 60_hhkb 60_tsangan_hhkb \ No newline at end of file +LAYOUTS = 60_ansi 60_iso 60_hhkb 60_tsangan_hhkb diff --git a/keyboards/noxary/268/rules.mk b/keyboards/noxary/268/rules.mk index d0b4ce2b59be..59e6b524cf0f 100644 --- a/keyboards/noxary/268/rules.mk +++ b/keyboards/noxary/268/rules.mk @@ -1,45 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. @@ -53,4 +23,4 @@ SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality AUDIO_ENABLE ?= no -RGBLIGHT_ENABLE ?= no \ No newline at end of file +RGBLIGHT_ENABLE ?= no diff --git a/keyboards/noxary/268_2/rules.mk b/keyboards/noxary/268_2/rules.mk index d1d781ccfa1f..2f9d087656cf 100644 --- a/keyboards/noxary/268_2/rules.mk +++ b/keyboards/noxary/268_2/rules.mk @@ -1,53 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - # Build Options # change yes to no to disable # @@ -69,4 +32,4 @@ AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) -LAYOUTS = 65_ansi_blocker \ No newline at end of file +LAYOUTS = 65_ansi_blocker diff --git a/keyboards/noxary/280/rules.mk b/keyboards/noxary/280/rules.mk index f99ee37b0d8b..7ac7c8f65417 100644 --- a/keyboards/noxary/280/rules.mk +++ b/keyboards/noxary/280/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/noxary/x268/rules.mk b/keyboards/noxary/x268/rules.mk index 3c4a26ad1aa9..8b2d28fcda4f 100644 --- a/keyboards/noxary/x268/rules.mk +++ b/keyboards/noxary/x268/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/ok60/rules.mk b/keyboards/ok60/rules.mk index 03646c485712..6a0b6cfb3528 100644 --- a/keyboards/ok60/rules.mk +++ b/keyboards/ok60/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. diff --git a/keyboards/orange75/rules.mk b/keyboards/orange75/rules.mk index 0f9672a51c81..d5b1f1e10afb 100644 --- a/keyboards/orange75/rules.mk +++ b/keyboards/orange75/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# 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. # @@ -70,4 +23,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality AUDIO_ENABLE = no -RGBLIGHT_ENABLE = no \ No newline at end of file +RGBLIGHT_ENABLE = no diff --git a/keyboards/org60/rules.mk b/keyboards/org60/rules.mk index 53e9a28fe870..3e00a0493733 100644 --- a/keyboards/org60/rules.mk +++ b/keyboards/org60/rules.mk @@ -1,52 +1,15 @@ # MCU name MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# LUFA specific -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/orthodox/keymaps/default/rules.mk b/keyboards/orthodox/keymaps/default/rules.mk deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/keyboards/orthodox/rev1/rules.mk b/keyboards/orthodox/rev1/rules.mk index 7e31822098d3..8daa5f5ecb48 100644 --- a/keyboards/orthodox/rev1/rules.mk +++ b/keyboards/orthodox/rev1/rules.mk @@ -1,2 +1,11 @@ -BACKLIGHT_ENABLE = no +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina + +BACKLIGHT_ENABLE = no diff --git a/keyboards/orthodox/rev3/rules.mk b/keyboards/orthodox/rev3/rules.mk index 7e31822098d3..8daa5f5ecb48 100644 --- a/keyboards/orthodox/rev3/rules.mk +++ b/keyboards/orthodox/rev3/rules.mk @@ -1,2 +1,11 @@ -BACKLIGHT_ENABLE = no +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina + +BACKLIGHT_ENABLE = no diff --git a/keyboards/orthodox/rev3_teensy/rules.mk b/keyboards/orthodox/rev3_teensy/rules.mk index 409061345729..cbd79cccde48 100644 --- a/keyboards/orthodox/rev3_teensy/rules.mk +++ b/keyboards/orthodox/rev3_teensy/rules.mk @@ -1,2 +1,11 @@ -BACKLIGHT_ENABLE = no +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = halfkay + +BACKLIGHT_ENABLE = no diff --git a/keyboards/orthodox/rules.mk b/keyboards/orthodox/rules.mk index 61878ea83c3f..59f039a76d0b 100644 --- a/keyboards/orthodox/rules.mk +++ b/keyboards/orthodox/rules.mk @@ -1,46 +1,6 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically diff --git a/keyboards/otaku_split/rev0/rules.mk b/keyboards/otaku_split/rev0/rules.mk index 04e0aacb1675..8c41bc5a2ed5 100644 --- a/keyboards/otaku_split/rev0/rules.mk +++ b/keyboards/otaku_split/rev0/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/otaku_split/rev1/rules.mk b/keyboards/otaku_split/rev1/rules.mk index 04e0aacb1675..8c41bc5a2ed5 100644 --- a/keyboards/otaku_split/rev1/rules.mk +++ b/keyboards/otaku_split/rev1/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/paladin64/rules.mk b/keyboards/paladin64/rules.mk index 3b79256abe38..558d1855a174 100755 --- a/keyboards/paladin64/rules.mk +++ b/keyboards/paladin64/rules.mk @@ -1,45 +1,14 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu # Build Options @@ -59,4 +28,4 @@ RGBLIGHT_ENABLE ?= yes #PS2_USE_USART ?= yes #PS2_USE_INT ?= yes -LAYOUTS = 60_ansi \ No newline at end of file +LAYOUTS = 60_ansi diff --git a/keyboards/pancake/feather/rules.mk b/keyboards/pancake/feather/rules.mk index 085c87f8d52d..ed10c5faa771 100644 --- a/keyboards/pancake/feather/rules.mk +++ b/keyboards/pancake/feather/rules.mk @@ -1,16 +1,22 @@ # MCU name MCU = atmega32u4 -# Processor frequency. +# Processor frequency F_CPU = 8000000 -# Bootloader +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina # Build Options # comment out to disable the options. # - BLUETOOTH = AdafruitBLE BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = no # Mouse keys(+4700) diff --git a/keyboards/pancake/promicro/rules.mk b/keyboards/pancake/promicro/rules.mk index af964df287bf..3ede4cd34b48 100644 --- a/keyboards/pancake/promicro/rules.mk +++ b/keyboards/pancake/promicro/rules.mk @@ -1,8 +1,16 @@ # MCU name MCU = atmega32u4 -# Bootloader +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina + # Build Options # comment out to disable the options. # diff --git a/keyboards/pdxkbc/rules.mk b/keyboards/pdxkbc/rules.mk index bc370be0397c..7218e1e1bf18 100644 --- a/keyboards/pdxkbc/rules.mk +++ b/keyboards/pdxkbc/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/percent/booster/rules.mk b/keyboards/percent/booster/rules.mk index 30e66537f96d..fb2ca00e7100 100644 --- a/keyboards/percent/booster/rules.mk +++ b/keyboards/percent/booster/rules.mk @@ -1,9 +1,5 @@ +# MCU name MCU = atmega32u4 -F_CPU = 16000000 -ARCH = AVR8 -F_USB = $(F_CPU) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Bootloader selection # Teensy halfkay @@ -11,7 +7,8 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu # Build Options @@ -36,4 +33,4 @@ FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs EXTRAFLAGS += -flto -LAYOUTS = numpad_5x4 \ No newline at end of file +LAYOUTS = numpad_5x4 diff --git a/keyboards/phantom/keymaps/default/rules.mk b/keyboards/phantom/keymaps/default/rules.mk index 597d4046a136..15b7f725b26d 100644 --- a/keyboards/phantom/keymaps/default/rules.mk +++ b/keyboards/phantom/keymaps/default/rules.mk @@ -1,34 +1 @@ -# Copyright 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 . - - -# QMK Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE = 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 -NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - +CONSOLE_ENABLE = yes diff --git a/keyboards/phantom/rules.mk b/keyboards/phantom/rules.mk index c4d5f57592e6..1c8d7b916d16 100644 --- a/keyboards/phantom/rules.mk +++ b/keyboards/phantom/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = halfkay # Build Options # change yes to no to disable diff --git a/keyboards/pinky/3/keymaps/default/rules.mk b/keyboards/pinky/3/keymaps/default/rules.mk deleted file mode 100644 index 176869809356..000000000000 --- a/keyboards/pinky/3/keymaps/default/rules.mk +++ /dev/null @@ -1,18 +0,0 @@ - -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -SWAP_HANDS_ENABLE = no # Enable one-hand typing diff --git a/keyboards/pinky/3/rules.mk b/keyboards/pinky/3/rules.mk index 1bb8bf6d7fd4..e69de29bb2d1 100644 --- a/keyboards/pinky/3/rules.mk +++ b/keyboards/pinky/3/rules.mk @@ -1 +0,0 @@ -# empty diff --git a/keyboards/pinky/4/keymaps/default/rules.mk b/keyboards/pinky/4/keymaps/default/rules.mk deleted file mode 100644 index 176869809356..000000000000 --- a/keyboards/pinky/4/keymaps/default/rules.mk +++ /dev/null @@ -1,18 +0,0 @@ - -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -SWAP_HANDS_ENABLE = no # Enable one-hand typing diff --git a/keyboards/pinky/4/rules.mk b/keyboards/pinky/4/rules.mk index 1bb8bf6d7fd4..e69de29bb2d1 100644 --- a/keyboards/pinky/4/rules.mk +++ b/keyboards/pinky/4/rules.mk @@ -1 +0,0 @@ -# empty diff --git a/keyboards/pinky/rules.mk b/keyboards/pinky/rules.mk index 14af0703abf8..395afeff0e6b 100644 --- a/keyboards/pinky/rules.mk +++ b/keyboards/pinky/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/planck/ez/rules.mk b/keyboards/planck/ez/rules.mk index 4aa431fdaa5c..8e1eeeb99362 100644 --- a/keyboards/planck/ez/rules.mk +++ b/keyboards/planck/ez/rules.mk @@ -1,9 +1,6 @@ # Cortex version MCU = STM32F303 -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically diff --git a/keyboards/planck/rev1/rules.mk b/keyboards/planck/rev1/rules.mk index be03e4515eff..3c85e172be1f 100644 --- a/keyboards/planck/rev1/rules.mk +++ b/keyboards/planck/rev1/rules.mk @@ -1,8 +1,15 @@ # MCU name MCU = atmega32u4 -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change to "no" to disable the options, or define them in the Makefile in diff --git a/keyboards/planck/rev2/rules.mk b/keyboards/planck/rev2/rules.mk index be03e4515eff..3c85e172be1f 100644 --- a/keyboards/planck/rev2/rules.mk +++ b/keyboards/planck/rev2/rules.mk @@ -1,8 +1,15 @@ # MCU name MCU = atmega32u4 -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change to "no" to disable the options, or define them in the Makefile in diff --git a/keyboards/planck/rev3/rules.mk b/keyboards/planck/rev3/rules.mk index 3de40a66c582..3c85e172be1f 100644 --- a/keyboards/planck/rev3/rules.mk +++ b/keyboards/planck/rev3/rules.mk @@ -1,15 +1,16 @@ # MCU name MCU = atmega32u4 -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically diff --git a/keyboards/planck/rev4/rules.mk b/keyboards/planck/rev4/rules.mk index 390f5824948a..299ee4aadcd8 100644 --- a/keyboards/planck/rev4/rules.mk +++ b/keyboards/planck/rev4/rules.mk @@ -1,15 +1,16 @@ # MCU name MCU = atmega32u4 -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically diff --git a/keyboards/planck/rev5/rules.mk b/keyboards/planck/rev5/rules.mk index ca63b39acf54..3c95f132c989 100644 --- a/keyboards/planck/rev5/rules.mk +++ b/keyboards/planck/rev5/rules.mk @@ -1,15 +1,16 @@ # MCU name MCU = atmega32u4 -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = qmk-dfu -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically diff --git a/keyboards/planck/rev6/rules.mk b/keyboards/planck/rev6/rules.mk index ea53c8f91095..9cedb1799429 100644 --- a/keyboards/planck/rev6/rules.mk +++ b/keyboards/planck/rev6/rules.mk @@ -4,9 +4,6 @@ LAYOUTS += ortho_4x12 # Cortex version MCU = STM32F303 -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically diff --git a/keyboards/playkbtw/ca66/rules.mk b/keyboards/playkbtw/ca66/rules.mk index e86f5ec038e1..28cb37adec5b 100644 --- a/keyboards/playkbtw/ca66/rules.mk +++ b/keyboards/playkbtw/ca66/rules.mk @@ -1,6 +1,14 @@ # MCU name MCU = atmega32u4 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu # Build Options diff --git a/keyboards/playkbtw/pk60/rules.mk b/keyboards/playkbtw/pk60/rules.mk index 7e3e373cf1bd..2c812e36589c 100644 --- a/keyboards/playkbtw/pk60/rules.mk +++ b/keyboards/playkbtw/pk60/rules.mk @@ -1,45 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -BOOTLOADER=amtel-dfu - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. diff --git a/keyboards/preonic/rev1/rules.mk b/keyboards/preonic/rev1/rules.mk index db3d644545f0..2d74f3823560 100644 --- a/keyboards/preonic/rev1/rules.mk +++ b/keyboards/preonic/rev1/rules.mk @@ -1,47 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically diff --git a/keyboards/preonic/rev2/rules.mk b/keyboards/preonic/rev2/rules.mk index 47a292e3361a..06315b2c6c25 100644 --- a/keyboards/preonic/rev2/rules.mk +++ b/keyboards/preonic/rev2/rules.mk @@ -1,47 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = qmk-dfu -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically diff --git a/keyboards/primekb/prime_e/rules.mk b/keyboards/primekb/prime_e/rules.mk index 579ddd11eb18..752497265cc1 100644 --- a/keyboards/primekb/prime_e/rules.mk +++ b/keyboards/primekb/prime_e/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # @@ -77,4 +30,4 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) \ No newline at end of file +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/primekb/prime_l/rules.mk b/keyboards/primekb/prime_l/rules.mk index 5cce4e8113d9..d7aca43dfc90 100644 --- a/keyboards/primekb/prime_l/rules.mk +++ b/keyboards/primekb/prime_l/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/primekb/prime_r/rules.mk b/keyboards/primekb/prime_r/rules.mk index 0e7a40727612..505ffe1e639d 100644 --- a/keyboards/primekb/prime_r/rules.mk +++ b/keyboards/primekb/prime_r/rules.mk @@ -1,45 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. @@ -53,4 +23,4 @@ SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality AUDIO_ENABLE ?= no -RGBLIGHT_ENABLE ?= no \ No newline at end of file +RGBLIGHT_ENABLE ?= no diff --git a/keyboards/puck/rules.mk b/keyboards/puck/rules.mk index 48144534d47f..1bd0b8b1dd2d 100644 --- a/keyboards/puck/rules.mk +++ b/keyboards/puck/rules.mk @@ -1,50 +1,14 @@ - - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = halfkay # Build Options diff --git a/keyboards/quantrik/kyuu/rules.mk b/keyboards/quantrik/kyuu/rules.mk index f8667d280f45..4b51619da11c 100644 --- a/keyboards/quantrik/kyuu/rules.mk +++ b/keyboards/quantrik/kyuu/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/qwertyydox/keymaps/default/rules.mk b/keyboards/qwertyydox/keymaps/default/rules.mk deleted file mode 100644 index 8b137891791f..000000000000 --- a/keyboards/qwertyydox/keymaps/default/rules.mk +++ /dev/null @@ -1 +0,0 @@ - diff --git a/keyboards/qwertyydox/rules.mk b/keyboards/qwertyydox/rules.mk index fcd3d708e2d2..4faab2607ba4 100644 --- a/keyboards/qwertyydox/rules.mk +++ b/keyboards/qwertyydox/rules.mk @@ -1,47 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically From 40de65eac4e8d039470b91a678cd1f7fc83fc929 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Sat, 26 Oct 2019 16:10:03 +1100 Subject: [PATCH 189/316] Backslash-escape pipe character in keycode lists (#7157) --- docs/keycodes.md | 52 ++++++++++++++++---------------- docs/keycodes_basic.md | 44 +++++++++++++-------------- docs/keycodes_us_ansi_shifted.md | 46 ++++++++++++++-------------- 3 files changed, 71 insertions(+), 71 deletions(-) diff --git a/docs/keycodes.md b/docs/keycodes.md index dfbab148b877..60f14844c269 100644 --- a/docs/keycodes.md +++ b/docs/keycodes.md @@ -55,7 +55,7 @@ This is a reference only. Each group of keys links to the page documenting their |`KC_EQUAL` |`KC_EQL` |`=` and `+` | |`KC_LBRACKET` |`KC_LBRC` |`[` and `{` | |`KC_RBRACKET` |`KC_RBRC` |`]` and `}` | -|`KC_BSLASH` |`KC_BSLS` |`\` and | | +|`KC_BSLASH` |`KC_BSLS` |`\` and `\|` | |`KC_NONUS_HASH` |`KC_NUHS` |Non-US `#` and `~` | |`KC_SCOLON` |`KC_SCLN` |`;` and `:` | |`KC_QUOTE` |`KC_QUOT` |`'` and `"` | @@ -106,7 +106,7 @@ This is a reference only. Each group of keys links to the page documenting their |`KC_KP_9` |`KC_P9` |Keypad `9` and Page Up | |`KC_KP_0` |`KC_P0` |Keypad `0` and Insert | |`KC_KP_DOT` |`KC_PDOT` |Keypad `.` and Delete | -|`KC_NONUS_BSLASH` |`KC_NUBS` |Non-US `\` and | | +|`KC_NONUS_BSLASH` |`KC_NUBS` |Non-US `\` and `\|` | |`KC_APPLICATION` |`KC_APP` |Application (Windows Menu Key) | |`KC_POWER` | |System Power (macOS) | |`KC_KP_EQUAL` |`KC_PEQL` |Keypad `=` | @@ -143,7 +143,7 @@ This is a reference only. Each group of keys links to the page documenting their |`KC_KP_EQUAL_AS400` | |Keypad `=` on AS/400 keyboards | |`KC_INT1` |`KC_RO` |JIS `\` and `_` | |`KC_INT2` |`KC_KANA` |JIS Katakana/Hiragana | -|`KC_INT3` |`KC_JYEN` |JIS `¥` and | | +|`KC_INT3` |`KC_JYEN` |JIS `¥` and `\|` | |`KC_INT4` |`KC_HENK` |JIS Henkan | |`KC_INT5` |`KC_MHEN` |JIS Muhenkan | |`KC_INT6` | |JIS Numpad `,` | @@ -420,29 +420,29 @@ This is a reference only. Each group of keys links to the page documenting their ## [US ANSI Shifted Symbols](keycodes_us_ansi_shifted.md) -|Key |Aliases |Description | -|------------------------|-------------------|-------------------| -|`KC_TILDE` |`KC_TILD` |`~` | -|`KC_EXCLAIM` |`KC_EXLM` |`!` | -|`KC_AT` | |`@` | -|`KC_HASH` | |`#` | -|`KC_DOLLAR` |`KC_DLR` |`$` | -|`KC_PERCENT` |`KC_PERC` |`%` | -|`KC_CIRCUMFLEX` |`KC_CIRC` |`^` | -|`KC_AMPERSAND` |`KC_AMPR` |`&` | -|`KC_ASTERISK` |`KC_ASTR` |`*` | -|`KC_LEFT_PAREN` |`KC_LPRN` |`(` | -|`KC_RIGHT_PAREN` |`KC_RPRN` |`)` | -|`KC_UNDERSCORE` |`KC_UNDS` |`_` | -|`KC_PLUS` | |`+` | -|`KC_LEFT_CURLY_BRACE` |`KC_LCBR` |`{` | -|`KC_RIGHT_CURLY_BRACE` |`KC_RCBR` |`}` | -|`KC_PIPE` | ||| -|`KC_COLON` |`KC_COLN` |`:` | -|`KC_DOUBLE_QUOTE` |`KC_DQUO`, `KC_DQT`|`"` | -|`KC_LEFT_ANGLE_BRACKET` |`KC_LABK`, `KC_LT` |`<` | -|`KC_RIGHT_ANGLE_BRACKET`|`KC_RABK`, `KC_GT` |`>` | -|`KC_QUESTION` |`KC_QUES` |`?` | +|Key |Aliases |Description| +|------------------------|-------------------|-----------| +|`KC_TILDE` |`KC_TILD` |`~` | +|`KC_EXCLAIM` |`KC_EXLM` |`!` | +|`KC_AT` | |`@` | +|`KC_HASH` | |`#` | +|`KC_DOLLAR` |`KC_DLR` |`$` | +|`KC_PERCENT` |`KC_PERC` |`%` | +|`KC_CIRCUMFLEX` |`KC_CIRC` |`^` | +|`KC_AMPERSAND` |`KC_AMPR` |`&` | +|`KC_ASTERISK` |`KC_ASTR` |`*` | +|`KC_LEFT_PAREN` |`KC_LPRN` |`(` | +|`KC_RIGHT_PAREN` |`KC_RPRN` |`)` | +|`KC_UNDERSCORE` |`KC_UNDS` |`_` | +|`KC_PLUS` | |`+` | +|`KC_LEFT_CURLY_BRACE` |`KC_LCBR` |`{` | +|`KC_RIGHT_CURLY_BRACE` |`KC_RCBR` |`}` | +|`KC_PIPE` | |`\|` | +|`KC_COLON` |`KC_COLN` |`:` | +|`KC_DOUBLE_QUOTE` |`KC_DQUO`, `KC_DQT`|`"` | +|`KC_LEFT_ANGLE_BRACKET` |`KC_LABK`, `KC_LT` |`<` | +|`KC_RIGHT_ANGLE_BRACKET`|`KC_RABK`, `KC_GT` |`>` | +|`KC_QUESTION` |`KC_QUES` |`?` | ## [One Shot Keys](feature_advanced_keycodes.md#one-shot-keys) diff --git a/docs/keycodes_basic.md b/docs/keycodes_basic.md index 6f21cabd2a64..8b1b52e190af 100644 --- a/docs/keycodes_basic.md +++ b/docs/keycodes_basic.md @@ -85,7 +85,7 @@ The basic set of keycodes are based on the [HID Keyboard/Keypad Usage Page (0x07 |`KC_EQUAL` |`KC_EQL` |`=` and `+` | |`KC_LBRACKET` |`KC_LBRC` |`[` and `{` | |`KC_RBRACKET` |`KC_RBRC` |`]` and `}` | -|`KC_BSLASH` |`KC_BSLS` |`\` and | | +|`KC_BSLASH` |`KC_BSLS` |`\` and `\|` | |`KC_NONUS_HASH` |`KC_NUHS` |Non-US `#` and `~` | |`KC_SCOLON` |`KC_SCLN` |`;` and `:` | |`KC_QUOTE` |`KC_QUOT` |`'` and `"` | @@ -93,7 +93,7 @@ The basic set of keycodes are based on the [HID Keyboard/Keypad Usage Page (0x07 |`KC_COMMA` |`KC_COMM` |`,` and `<` | |`KC_DOT` | |`.` and `>` | |`KC_SLASH` |`KC_SLSH` |`/` and `?` | -|`KC_NONUS_BSLASH`|`KC_NUBS` |Non-US `\` and | | +|`KC_NONUS_BSLASH`|`KC_NUBS` |Non-US `\` and `\|` | ## Lock Keys @@ -121,26 +121,26 @@ The basic set of keycodes are based on the [HID Keyboard/Keypad Usage Page (0x07 ## International -|Key |Aliases |Description | -|----------|---------|-------------------------------| -|`KC_INT1` |`KC_RO` |JIS `\` and `_` | -|`KC_INT2` |`KC_KANA`|JIS Katakana/Hiragana | -|`KC_INT3` |`KC_JYEN`|JIS `¥` and || -|`KC_INT4` |`KC_HENK`|JIS Henkan | -|`KC_INT5` |`KC_MHEN`|JIS Muhenkan | -|`KC_INT6` | |JIS Numpad `,` | -|`KC_INT7` | |International 7 | -|`KC_INT8` | |International 8 | -|`KC_INT9` | |International 9 | -|`KC_LANG1`|`KC_HAEN`|Hangul/English | -|`KC_LANG2`|`KC_HANJ`|Hanja | -|`KC_LANG3`| |JIS Katakana | -|`KC_LANG4`| |JIS Hiragana | -|`KC_LANG5`| |JIS Zenkaku/Hankaku | -|`KC_LANG6`| |Language 6 | -|`KC_LANG7`| |Language 7 | -|`KC_LANG8`| |Language 8 | -|`KC_LANG9`| |Language 9 | +|Key |Aliases |Description | +|----------|---------|---------------------| +|`KC_INT1` |`KC_RO` |JIS `\` and `_` | +|`KC_INT2` |`KC_KANA`|JIS Katakana/Hiragana| +|`KC_INT3` |`KC_JYEN`|JIS `¥` and `\|` | +|`KC_INT4` |`KC_HENK`|JIS Henkan | +|`KC_INT5` |`KC_MHEN`|JIS Muhenkan | +|`KC_INT6` | |JIS Numpad `,` | +|`KC_INT7` | |International 7 | +|`KC_INT8` | |International 8 | +|`KC_INT9` | |International 9 | +|`KC_LANG1`|`KC_HAEN`|Hangul/English | +|`KC_LANG2`|`KC_HANJ`|Hanja | +|`KC_LANG3`| |JIS Katakana | +|`KC_LANG4`| |JIS Hiragana | +|`KC_LANG5`| |JIS Zenkaku/Hankaku | +|`KC_LANG6`| |Language 6 | +|`KC_LANG7`| |Language 7 | +|`KC_LANG8`| |Language 8 | +|`KC_LANG9`| |Language 9 | ## Commands diff --git a/docs/keycodes_us_ansi_shifted.md b/docs/keycodes_us_ansi_shifted.md index 41d6035929dc..85dd61759f80 100644 --- a/docs/keycodes_us_ansi_shifted.md +++ b/docs/keycodes_us_ansi_shifted.md @@ -12,26 +12,26 @@ To fix this, open Remote Desktop Connection, click on "Show Options", open the t ## Keycodes -|Key |Aliases |Description | -|------------------------|-------------------|-------------------| -|`KC_TILDE` |`KC_TILD` |`~` | -|`KC_EXCLAIM` |`KC_EXLM` |`!` | -|`KC_AT` | |`@` | -|`KC_HASH` | |`#` | -|`KC_DOLLAR` |`KC_DLR` |`$` | -|`KC_PERCENT` |`KC_PERC` |`%` | -|`KC_CIRCUMFLEX` |`KC_CIRC` |`^` | -|`KC_AMPERSAND` |`KC_AMPR` |`&` | -|`KC_ASTERISK` |`KC_ASTR` |`*` | -|`KC_LEFT_PAREN` |`KC_LPRN` |`(` | -|`KC_RIGHT_PAREN` |`KC_RPRN` |`)` | -|`KC_UNDERSCORE` |`KC_UNDS` |`_` | -|`KC_PLUS` | |`+` | -|`KC_LEFT_CURLY_BRACE` |`KC_LCBR` |`{` | -|`KC_RIGHT_CURLY_BRACE` |`KC_RCBR` |`}` | -|`KC_PIPE` | ||| -|`KC_COLON` |`KC_COLN` |`:` | -|`KC_DOUBLE_QUOTE` |`KC_DQUO`, `KC_DQT`|`"` | -|`KC_LEFT_ANGLE_BRACKET` |`KC_LABK`, `KC_LT` |`<` | -|`KC_RIGHT_ANGLE_BRACKET`|`KC_RABK`, `KC_GT` |`>` | -|`KC_QUESTION` |`KC_QUES` |`?` | +|Key |Aliases |Description| +|------------------------|-------------------|-----------| +|`KC_TILDE` |`KC_TILD` |`~` | +|`KC_EXCLAIM` |`KC_EXLM` |`!` | +|`KC_AT` | |`@` | +|`KC_HASH` | |`#` | +|`KC_DOLLAR` |`KC_DLR` |`$` | +|`KC_PERCENT` |`KC_PERC` |`%` | +|`KC_CIRCUMFLEX` |`KC_CIRC` |`^` | +|`KC_AMPERSAND` |`KC_AMPR` |`&` | +|`KC_ASTERISK` |`KC_ASTR` |`*` | +|`KC_LEFT_PAREN` |`KC_LPRN` |`(` | +|`KC_RIGHT_PAREN` |`KC_RPRN` |`)` | +|`KC_UNDERSCORE` |`KC_UNDS` |`_` | +|`KC_PLUS` | |`+` | +|`KC_LEFT_CURLY_BRACE` |`KC_LCBR` |`{` | +|`KC_RIGHT_CURLY_BRACE` |`KC_RCBR` |`}` | +|`KC_PIPE` | |`\|` | +|`KC_COLON` |`KC_COLN` |`:` | +|`KC_DOUBLE_QUOTE` |`KC_DQUO`, `KC_DQT`|`"` | +|`KC_LEFT_ANGLE_BRACKET` |`KC_LABK`, `KC_LT` |`<` | +|`KC_RIGHT_ANGLE_BRACKET`|`KC_RABK`, `KC_GT` |`>` | +|`KC_QUESTION` |`KC_QUES` |`?` | From 85688f926a19f27e47d9136c1612fbd2f751372e Mon Sep 17 00:00:00 2001 From: Salicylic-acid3 <46864619+Salicylic-acid3@users.noreply.github.com> Date: Sun, 27 Oct 2019 10:10:50 +0900 Subject: [PATCH 190/316] [Keyboard] Add keyboard Naked64 (#7144) * [Keyboard] Add keyboard Naked64 Add Naekd64 keyboard. A 64 keys Ortholinear + Alice Layout keyboard. Salicylic-acid3 * Update keyboards/naked64/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/naked64/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/naked64/rev1/rev1.c Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/naked64/rev1/rev1.h Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/naked64/keymaps/default_with_setta21/keymap.c Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/naked64/keymaps/salicylic_with_setta21/keymap.c Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/naked64/keymaps/salicylic_with_setta21/keymap.c Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/naked64/keymaps/salicylic_with_setta21/keymap.c Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/naked64/keymaps/default/keymap.c Co-Authored-By: Drashna Jaelre * Update keyboards/naked64/keymaps/default/keymap.c Co-Authored-By: Drashna Jaelre * Update keyboards/naked64/keymaps/default_with_setta21/keymap.c Co-Authored-By: Drashna Jaelre * Update keyboards/naked64/keymaps/default/keymap.c Co-Authored-By: Drashna Jaelre * Update keyboards/naked64/keymaps/default_with_setta21/keymap.c Co-Authored-By: Drashna Jaelre * Update keyboards/naked64/keymaps/salicylic/keymap.c Co-Authored-By: Drashna Jaelre * Update keyboards/naked64/keymaps/salicylic/keymap.c Co-Authored-By: Drashna Jaelre * Update keyboards/naked64/keymaps/salicylic_with_setta21/keymap.c Co-Authored-By: Drashna Jaelre * Update keyboards/naked64/keymaps/salicylic_with_setta21/keymap.c Co-Authored-By: Drashna Jaelre * Update keyboards/naked64/keymaps/salicylic_with_setta21/keymap.c Co-Authored-By: Drashna Jaelre * Update keyboards/naked64/keymaps/default_with_setta21/keymap.c Co-Authored-By: Drashna Jaelre * Update keyboards/naked64/rev1/rev1.h Co-Authored-By: fauxpark * Update keyboards/naked64/keymaps/salicylic/keymap.c Co-Authored-By: Drashna Jaelre * Update keyboards/naked64/keymaps/default_with_setta21/keymap.c Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/naked64/keymaps/default_with_setta21/keymap.c Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/naked64/keymaps/default_with_setta21/keymap.c Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/naked64/keymaps/default_with_setta21/keymap.c Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/naked64/keymaps/salicylic_with_setta21/keymap.c Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/naked64/keymaps/salicylic_with_setta21/keymap.c Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/naked64/keymaps/salicylic_with_setta21/keymap.c Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/naked64/keymaps/salicylic_with_setta21/keymap.c Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Modify info.json and rule.mk rule.mk modifies comments. info.json is changed to Layout without angle. * Update info.json Puts the keys in the correct sequence. --- keyboards/naked64/config.h | 21 ++ keyboards/naked64/info.json | 77 ++++++ keyboards/naked64/keymaps/default/config.h | 24 ++ keyboards/naked64/keymaps/default/keymap.c | 156 ++++++++++++ keyboards/naked64/keymaps/default/readme.md | 56 +++++ keyboards/naked64/keymaps/default/rules.mk | 0 .../keymaps/default_with_setta21/config.h | 31 +++ .../keymaps/default_with_setta21/keymap.c | 185 ++++++++++++++ .../keymaps/default_with_setta21/readme.md | 44 ++++ .../keymaps/default_with_setta21/rules.mk | 0 keyboards/naked64/keymaps/salicylic/config.h | 22 ++ keyboards/naked64/keymaps/salicylic/keymap.c | 203 +++++++++++++++ keyboards/naked64/keymaps/salicylic/readme.md | 56 +++++ keyboards/naked64/keymaps/salicylic/rules.mk | 1 + .../keymaps/salicylic_with_setta21/config.h | 27 ++ .../keymaps/salicylic_with_setta21/keymap.c | 234 ++++++++++++++++++ .../keymaps/salicylic_with_setta21/readme.md | 44 ++++ .../keymaps/salicylic_with_setta21/rules.mk | 1 + keyboards/naked64/naked64.c | 1 + keyboards/naked64/naked64.h | 7 + keyboards/naked64/readme.md | 18 ++ keyboards/naked64/rev1/config.h | 82 ++++++ keyboards/naked64/rev1/rev1.c | 5 + keyboards/naked64/rev1/rev1.h | 78 ++++++ keyboards/naked64/rev1/rules.mk | 0 keyboards/naked64/rules.mk | 37 +++ 26 files changed, 1410 insertions(+) create mode 100644 keyboards/naked64/config.h create mode 100644 keyboards/naked64/info.json create mode 100644 keyboards/naked64/keymaps/default/config.h create mode 100644 keyboards/naked64/keymaps/default/keymap.c create mode 100644 keyboards/naked64/keymaps/default/readme.md create mode 100644 keyboards/naked64/keymaps/default/rules.mk create mode 100644 keyboards/naked64/keymaps/default_with_setta21/config.h create mode 100644 keyboards/naked64/keymaps/default_with_setta21/keymap.c create mode 100644 keyboards/naked64/keymaps/default_with_setta21/readme.md create mode 100644 keyboards/naked64/keymaps/default_with_setta21/rules.mk create mode 100644 keyboards/naked64/keymaps/salicylic/config.h create mode 100644 keyboards/naked64/keymaps/salicylic/keymap.c create mode 100644 keyboards/naked64/keymaps/salicylic/readme.md create mode 100644 keyboards/naked64/keymaps/salicylic/rules.mk create mode 100644 keyboards/naked64/keymaps/salicylic_with_setta21/config.h create mode 100644 keyboards/naked64/keymaps/salicylic_with_setta21/keymap.c create mode 100644 keyboards/naked64/keymaps/salicylic_with_setta21/readme.md create mode 100644 keyboards/naked64/keymaps/salicylic_with_setta21/rules.mk create mode 100644 keyboards/naked64/naked64.c create mode 100644 keyboards/naked64/naked64.h create mode 100644 keyboards/naked64/readme.md create mode 100644 keyboards/naked64/rev1/config.h create mode 100644 keyboards/naked64/rev1/rev1.c create mode 100644 keyboards/naked64/rev1/rev1.h create mode 100644 keyboards/naked64/rev1/rules.mk create mode 100644 keyboards/naked64/rules.mk diff --git a/keyboards/naked64/config.h b/keyboards/naked64/config.h new file mode 100644 index 000000000000..cfb6bf4ffccd --- /dev/null +++ b/keyboards/naked64/config.h @@ -0,0 +1,21 @@ +/* +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + +#include "config_common.h" diff --git a/keyboards/naked64/info.json b/keyboards/naked64/info.json new file mode 100644 index 000000000000..60ac6d72764b --- /dev/null +++ b/keyboards/naked64/info.json @@ -0,0 +1,77 @@ +{ + "keyboard_name": "Naked64", + "url": "https://salicylic-acid3.hatenablog.com/", + "maintainer": "Salicylic_acid3", + "width": 16.5, + "height": 5.25, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"pgup", "x":0.25, "y":0}, + {"label":"ESC", "x":1.75, "y":0}, + {"label":"1", "x":2.75, "y":0}, + {"label":"2", "x":4, "y":0}, + {"label":"3", "x":5, "y":0}, + {"label":"4", "x":6, "y":0}, + {"label":"5", "x":7, "y":0}, + {"label":"6", "x":9.25, "y":0}, + {"label":"7", "x":10.25, "y":0}, + {"label":"8", "x":11.25, "y":0}, + {"label":"9", "x":12.25, "y":0}, + {"label":"0", "x":13.5, "y":0}, + {"label":"-", "x":14.5, "y":0}, + {"label":"Back Space", "x":15.5, "y":0}, + {"label":"pgdn", "x":0, "y":1}, + {"label":"Tab", "x":1.25, "y":1, "w":1.5}, + {"label":"Q", "x":2.75, "y":1}, + {"label":"W", "x":4, "y":1}, + {"label":"E", "x":5, "y":1}, + {"label":"R", "x":6, "y":1}, + {"label":"T", "x":7, "y":1}, + {"label":"Y", "x":9.25, "y":1}, + {"label":"U", "x":10.25, "y":1}, + {"label":"I", "x":11.25, "y":1}, + {"label":"O", "x":12.25, "y":1}, + {"label":"P", "x":13.5, "y":1}, + {"label":"[", "x":14.5, "y":1}, + {"label":"]", "x":15.5, "y":1}, + {"label":"Control", "x":1, "y":2, "w":1.75}, + {"label":"A", "x":2.75, "y":2}, + {"label":"S", "x":4, "y":2}, + {"label":"D", "x":5, "y":2}, + {"label":"F", "x":6, "y":2}, + {"label":"G", "x":7, "y":2}, + {"label":"H", "x":9.25, "y":2}, + {"label":"J", "x":10.25, "y":2}, + {"label":"K", "x":11.25, "y":2}, + {"label":"L", "x":12.25, "y":2}, + {"label":";", "x":13.5, "y":2}, + {"label":"'", "x":14.5, "y":2}, + {"label":"Return", "x":15.5, "y":2}, + {"label":"Shift", "x":0.5, "y":3, "w":2.25}, + {"label":"Z", "x":2.75, "y":3}, + {"label":"X", "x":4, "y":3}, + {"label":"C", "x":5, "y":3}, + {"label":"V", "x":6, "y":3}, + {"label":"B", "x":7, "y":3}, + {"label":"N", "x":9.25, "y":3}, + {"label":"M", "x":10.25, "y":3}, + {"label":",", "x":11.25, "y":3}, + {"label":".", "x":12.25, "y":3}, + {"label":"/", "x":13.5, "y":3}, + {"label":"↑", "x":14.5, "y":3}, + {"label":"Shift", "x":15.5, "y":3}, + {"label":"Adjust", "x":1.25, "y":4, "w":1.75}, + {"label":"Alt", "x":3.75, "y":4.25}, + {"x":4.75, "y":4.25, "w":2.25}, + {"label":"⇓", "x":7, "y":4.25}, + {"label":"⇑", "x":9.25, "y":4.25}, + {"x":10.25, "y":4.25, "w":2}, + {"label":"GUI", "x":12.25, "y":4.25}, + {"label":"←", "x":13.5, "y":4}, + {"label":"↓", "x":14.5, "y":4}, + {"label":"→", "x":15.5, "y":4} + ] + } + } +} \ No newline at end of file diff --git a/keyboards/naked64/keymaps/default/config.h b/keyboards/naked64/keymaps/default/config.h new file mode 100644 index 000000000000..8c4e1f512999 --- /dev/null +++ b/keyboards/naked64/keymaps/default/config.h @@ -0,0 +1,24 @@ +/* Copyright 2018 Salicylic_acid3 + * + * 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 . + */ + +#pragma once + +/* Select hand configuration */ + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 180 + + diff --git a/keyboards/naked64/keymaps/default/keymap.c b/keyboards/naked64/keymaps/default/keymap.c new file mode 100644 index 000000000000..4460407dbac0 --- /dev/null +++ b/keyboards/naked64/keymaps/default/keymap.c @@ -0,0 +1,156 @@ +#include QMK_KEYBOARD_H + + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +extern uint8_t is_master; + +// 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. +enum layer_number { + _QWERTY = 0, + _FLOCK, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + RGB_RST = SAFE_RANGE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT( \ + //,--------------------------------------------------------------| |--------------------------------------------------------------. + KC_PGUP, 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_BSPC, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_PGDN, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LCBR, KC_RCBR, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, KC_RSFT, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + MO(_ADJUST), KC_LALT, KC_SPC,MO(_LOWER), MO(_RAISE), KC_SPC, KC_LGUI, KC_LEFT, KC_DOWN,KC_RIGHT \ + //`-----------------------------------------------------------------------------------------------------------------------------------' + ), + + [_FLOCK] = LAYOUT( \ + //,--------------------------------------------------------------| |--------------------------------------------------------------. + TG(_FLOCK), KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + //`-----------------------------------------------------------------------------------------------------------------------------------' + ), + + [_LOWER] = LAYOUT( \ + //,--------------------------------------------------------------| |--------------------------------------------------------------. + _______, KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, _______, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, _______, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______,_______,KC_VOLU,_______, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_MPLY \ + //`-----------------------------------------------------------------------------------------------------------------------------------' + ), + + [_RAISE] = LAYOUT( \ + //,--------------------------------------------------------------| |--------------------------------------------------------------. + _______, KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_BSPC, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, _______, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, _______, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + //`-----------------------------------------------------------------------------------------------------------------------------------' + ), + + [_ADJUST] = LAYOUT( /* Base */ + //,--------------------------------------------------------------| |--------------------------------------------------------------. + TG(_FLOCK), RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_RST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, RGB_MOD, XXXXXXX,LCA(KC_DEL),LALT(KC_PSCR),KC_PSCR,XXXXXXX, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_VAD, RGB_VAI, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, XXXXXXX, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + //`-----------------------------------------------------------------------------------------------------------------------------------' + ) +}; + + +//A description for expressing the layer position in LED mode. +layer_state_t layer_state_set_user(layer_state_t state) { +#ifdef RGBLIGHT_ENABLE + switch (get_highest_layer(state)) { + case _FLOCK: + rgblight_sethsv_range(HSV_YELLOW, 0, 2); + break; + case _LOWER: + rgblight_sethsv_range(HSV_BLUE, 0, 2); + break; + case _RAISE: + rgblight_sethsv_range(HSV_RED, 0, 2); + break; + case _ADJUST: + rgblight_sethsv_range(HSV_PURPLE, 0, 2); + break; + default: // for any other layers, or the default layer + rgblight_sethsv_range( 0, 0, 0, 0, 2); + break; + } + rgblight_set_effect_range( 2, 6); +#endif +return state; +} + +int RGB_current_mode; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + bool result = false; + switch (keycode) { + #ifdef RGBLIGHT_ENABLE + case RGB_MOD: + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + break; + case RGB_RST: + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + break; + #endif + default: + result = true; + break; + } + + return result; +} + +void matrix_init_user(void) { + +} diff --git a/keyboards/naked64/keymaps/default/readme.md b/keyboards/naked64/keymaps/default/readme.md new file mode 100644 index 000000000000..66bb965b2950 --- /dev/null +++ b/keyboards/naked64/keymaps/default/readme.md @@ -0,0 +1,56 @@ +# The default keymap for naked64 + +## Default +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +|:----:|:--------:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +| PgUp |ESC(Flock)| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| BSPC| +| PgDn | Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| +| | Control | A| S| D| F| G| H| J| K| L| ;| '| ENT| +| | Shift | Z| X| C| V| B| N| M| ,| .| /| Up| Shift| +| | ADJUST| | LALT| | SPC| LOWER| RAISE| SPC| | LGUI| Left| Down| Right| + + + +## FLock +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +|:----:|:--------:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +| PgUp |ESC(Flock)| F1| F2| F3| F4| F5| F6| F7| F8| F9| F10| F11| F12| +| PgDn | Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| +| | Control | A| S| D| F| G| H| J| K| L| ;| '| ENT| +| | Shift | Z| X| C| V| B| N| M| ,| .| /| Up| Shift| +| | ADJUST| | LALT| | SPC| LOWER| RAISE| SPC| | LGUI| Left| Down| Right| + + + +## Lower +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +|:----:|:--------:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +| PgUp |ESC(Flock)| F1| F2| F3| F4| F5| F6| F7| F8| F9| F10| F11| F12| +| PgDn | Tab | !| @| #| $| %| ^| &| *| (| )| DEL| ]| +| | Control | F1| F2| F3| F4| F5| F6| _| +| {| }| PIPE| ENT| +| | Shift | F7| F8| F9| F10| F11| F12| SNUHS| SNUBS| ,| .| VoUp| Shift| +| | ADJUST| | LALT| | SPC| LOWER| RAISE| SPC| | ,| MNxt| VoDn| Mply| + + + +## Raise +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +|:----:|:--------:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +| PgUp | ESC | F1| F2| F3| F4| F5| F6| F7| F8| F9| F10| F11| F12| +| PgDn | Tab | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| BSPC| +| | Control | F1| F2| F3| F4| F5| F6| -| =| (| )| \| ENT| +| | Shift | F7| F8| F9| F10| F11| F12| NUHS| NUBS| .| /| VoUp| Shift| +| | ADJUST| | LALT| | SPC| LOWER| RAISE| SPC| | LGUI| MNxt| VoDn| Mply| + + + +## Adjust +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +|:----:|:--------:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +| PgUp | RST | F1| F2| F3| F4| F5| F6| F7| F8| F9| F10| F11| F12| +| PgDn | Tab | XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| LRST| XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| +| | Control | XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| LTOG| LMOD| XXXXX| C+A+D|Alt+PSCR|PSCR| XXXXX| +| | Shift | XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| LVAD| LVAI| LHUD| LHUI| LSAD| LSAI| XXXXX| +| | ADJUST| | LALT| | SPC| LOWER| RAISE| SPC| | LGUI| MNxt| VoDn| Mply| + + diff --git a/keyboards/naked64/keymaps/default/rules.mk b/keyboards/naked64/keymaps/default/rules.mk new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/keyboards/naked64/keymaps/default_with_setta21/config.h b/keyboards/naked64/keymaps/default_with_setta21/config.h new file mode 100644 index 000000000000..c88277da20fb --- /dev/null +++ b/keyboards/naked64/keymaps/default_with_setta21/config.h @@ -0,0 +1,31 @@ +/* Copyright 2018 Salicylic_acid3 + * + * 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 . + */ + +#pragma once + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS +#define USE_SERIAL_PD2 + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 180 + +#define RGBLED_NUM 12 // Number of LEDs +#define RGBLIGHT_LED_MAP { 0, 1, 3, 2, 2, 3, 2, 3, 4, 5, 6, 7 } + diff --git a/keyboards/naked64/keymaps/default_with_setta21/keymap.c b/keyboards/naked64/keymaps/default_with_setta21/keymap.c new file mode 100644 index 000000000000..5e3d8bf64276 --- /dev/null +++ b/keyboards/naked64/keymaps/default_with_setta21/keymap.c @@ -0,0 +1,185 @@ +#include QMK_KEYBOARD_H +#include "keymap_jp.h" + + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +extern uint8_t is_master; + +// 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. +enum layer_number { + _QWERTY = 0, + _FLOCK, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + RGB_RST = SAFE_RANGE, + SEND_SUM, + SEND_AVE, + SEND_CIF, + SEND_MAX, + SEND_MIN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_with_setta21( \ + //,--------------------------------------------------------------| |--------------------------------------------------------------. |-----------------------------------------------| + KC_PGUP, 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_BSPC,LT(_LOWER, KC_P0),KC_P1, KC_P4, KC_P7,KC_NLCK, KC_ESC, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + KC_PGDN, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LCBR, KC_RCBR, KC_P2, KC_P5, KC_P8,KC_PSLS, KC_F2, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,LT(_RAISE, KC_PDOT),KC_P3,KC_P6, KC_P9,KC_PAST, KC_EQL, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, KC_RSFT, KC_PENT, KC_PPLS,KC_PMNS, KC_DEL, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-----------------------------------------------| + MO(_ADJUST), KC_LALT, KC_SPC,MO(_LOWER), MO(_RAISE), KC_SPC, KC_LGUI, KC_LEFT, KC_DOWN,KC_RIGHT \ + //`-----------------------------------------------------------------------------------------------------------------------------------' + ), + + [_FLOCK] = LAYOUT_with_setta21( \ + //,--------------------------------------------------------------| |--------------------------------------------------------------. |-----------------------------------------------| + TG(_FLOCK), KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,_______,_______,_______,_______,_______, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,_______,_______,_______,_______, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,_______,_______,_______,_______,_______, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,_______,_______, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-----------------------------------------------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + //`-----------------------------------------------------------------------------------------------------------------------------------' + ), + + [_LOWER] = LAYOUT_with_setta21( \ + //,--------------------------------------------------------------| |--------------------------------------------------------------. |-----------------------------------------------| + _______, KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, MO(_LOWER),XXXXXXX,KC_LEFT,XXXXXXX,XXXXXXX, KC_ESC, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + _______, KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, _______, KC_DOWN,KC_DOWN, KC_UP,KC_PSLS, KC_F2, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, _______, MO(_RAISE),XXXXXXX,KC_RIGHT,XXXXXXX,KC_PAST,KC_EQL, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______,_______,KC_VOLU,_______, KC_PENT, KC_PPLS,KC_PMNS, KC_DEL, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-----------------------------------------------| + _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_MPLY \ + //`-----------------------------------------------------------------------------------------------------------------------------------' + ), + + [_RAISE] = LAYOUT_with_setta21( \ + //,--------------------------------------------------------------| |--------------------------------------------------------------. |------------------------------------------------| + _______, KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_F11, KC_F4, KC_F7,SEND_MIN, KC_ESC, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+--------+-------| + _______, KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_BSPC, KC_F12, KC_F5, KC_F8,SEND_MAX, KC_F2, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+--------+-------| + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, _______, _______, KC_F3, KC_F6, KC_F9,SEND_CIF, KC_EQL, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |---------------+---------------+--------+-------| + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, _______, KC_RPRN, SEND_SUM,SEND_AVE, KC_DEL, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |------------------------------------------------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + //`-----------------------------------------------------------------------------------------------------------------------------------' + ), + + [_ADJUST] = LAYOUT_with_setta21( /* Base */ + //,--------------------------------------------------------------| |--------------------------------------------------------------. |-----------------------------------------------| + TG(_FLOCK), RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,RGB_VAD,RGB_HUD,RGB_SAD,XXXXXXX,_______, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_RST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, RGB_VAI,RGB_HUI,RGB_SAI,XXXXXXX,_______, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, RGB_MOD, XXXXXXX,LCA(KC_DEL),LALT(KC_PSCR),KC_PSCR,XXXXXXX, _______,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,_______, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_VAD, RGB_VAI, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, XXXXXXX, RGB_MOD, RGB_TOG,_______,_______, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-----------------------------------------------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //`-----------------------------------------------------------------------------------------------------------------------------------' + ) +}; + +layer_state_t layer_state_set_user(layer_state_t state) { +#ifdef RGBLIGHT_ENABLE + switch (get_highest_layer(state)) { + case _FLOCK: + rgblight_sethsv_range(HSV_YELLOW, 0, 2); + break; + case _LOWER: + rgblight_sethsv_range(HSV_BLUE, 0, 2); + break; + case _RAISE: + rgblight_sethsv_range(HSV_RED, 0, 2); + break; + case _ADJUST: + rgblight_sethsv_range(HSV_PURPLE, 0, 2); + break; + default: // for any other layers, or the default layer + rgblight_sethsv_range( 0, 0, 0, 0, 2); + break; + } + rgblight_set_effect_range( 2, 6); +#endif +return state; +} + +int RGB_current_mode; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + bool result = false; + switch (keycode) { + case SEND_SUM: + if (record->event.pressed) { + SEND_STRING("=SUM("); + } + break; + case SEND_AVE: + if (record->event.pressed) { + SEND_STRING("=AVERAGE("); + } + break; + case SEND_CIF: + if (record->event.pressed) { + SEND_STRING("=COUNTIF("); + } + break; + case SEND_MAX: + if (record->event.pressed) { + SEND_STRING("=MAX("); + } + break; + case SEND_MIN: + if (record->event.pressed) { + SEND_STRING("=MIN("); + } + break; + #ifdef RGBLIGHT_ENABLE + case RGB_MOD: + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + break; + case RGB_RST: + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + break; + #endif + default: + result = true; + break; + } + + return result; +} + +void matrix_init_user(void) { + +} diff --git a/keyboards/naked64/keymaps/default_with_setta21/readme.md b/keyboards/naked64/keymaps/default_with_setta21/readme.md new file mode 100644 index 000000000000..6196d68fe063 --- /dev/null +++ b/keyboards/naked64/keymaps/default_with_setta21/readme.md @@ -0,0 +1,44 @@ +# The default_with_setta21 keymap for naked64 + +Add Setta21 maps to the default layout. + +## Default +| 1 | 2 | 3 | 4 | +|:----:|:----:|:----:|:----:| +| ESC| F2| =| DEL| +|Ad+Num| /| *| -| +| 7| 8| 9| | +| 4| 5| 6| +| +| 1| 2| 3| | +| Rai+0| | LOW + .| ENT| + +## Lower +| 1 | 2 | 3 | 4 | +|:----:|:----:|:----:|:----:| +| ESC| F2| =| DEL| +| =MIN(| =MAX(|=COUNTIF(|=AVERAGE(| +| F7| F8| F9| | +| F4| F5| F6| =SUM(| +| F11| F12| F3| | +| RAISE| | LOWER| )| + +## Raise +| 1 | 2 | 3 | 4 | +|:----:|:----:|:----:|:----:| +| ESC| F2| =| DEL| +| XXXXX| /| *| -| +| XXXXX| UP| XXXXX| | +| LEFT| DOWN| RIGHT| +| +| XXXXX| DOWN| XXXXX| | +| RAISE| | LOWER| ENT| + +## Adjust +| 1 | 2 | 3 | 4 | +|:----:|:----:|:----:|:----:| +| ESC| F2| =| DEL| +|ADJUST| XXXXX| XXXXX| -| +|LED_SAD|LED_SAI| XXXXX| | +|LED_HUD|LED_HUI| XXXXX| +| +|LED_VAD|LED_VAI| XXXXX| | +|LED_ON/Off| | XXXXX|LED_MOD| + diff --git a/keyboards/naked64/keymaps/default_with_setta21/rules.mk b/keyboards/naked64/keymaps/default_with_setta21/rules.mk new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/keyboards/naked64/keymaps/salicylic/config.h b/keyboards/naked64/keymaps/salicylic/config.h new file mode 100644 index 000000000000..4b3496d85693 --- /dev/null +++ b/keyboards/naked64/keymaps/salicylic/config.h @@ -0,0 +1,22 @@ +/* Copyright 2018 Salicylic_acid3 + * + * 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 . + */ + +#pragma once + +/* Select hand configuration */ + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 180 diff --git a/keyboards/naked64/keymaps/salicylic/keymap.c b/keyboards/naked64/keymaps/salicylic/keymap.c new file mode 100644 index 000000000000..ca4fbb7550b5 --- /dev/null +++ b/keyboards/naked64/keymaps/salicylic/keymap.c @@ -0,0 +1,203 @@ +#include QMK_KEYBOARD_H +#include "keymap_jp.h" + + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +extern uint8_t is_master; + +// 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. +enum layer_number { + _QWERTY = 0, + _MOUSE, + _BROWSER, + _FLOCK, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + RGB_RST = SAFE_RANGE +}; + +enum tapdances{ + TD_ESFL = 0, + TD_ESQW, +}; + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_ESFL] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _FLOCK), + [TD_ESQW] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _QWERTY), +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT( \ + //,--------------------------------------------------------------| |--------------------------------------------------------------. + TG(_MOUSE),TD(TD_ESFL), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, JP_MINS, KC_BSPC, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + TG(_BROWSER), KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_LBRC, JP_RBRC, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, JP_MINS, JP_BSLS, KC_ENT, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, JP_COMM, JP_DOT, JP_SLSH, KC_UP, KC_RSFT, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_ZKHK, KC_LGUI,LT(_LOWER,KC_ENT), KC_BSPC, KC_DEL,LT(_RAISE,KC_SPC),ALT_T(KC_HENK),KC_LEFT,KC_DOWN,KC_RIGHT \ + //`-----------------------------------------------------------------------------------------------------------------------------------' + ), + + [_MOUSE] = LAYOUT( \ + //,--------------------------------------------------------------| |--------------------------------------------------------------. + TG(_MOUSE), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BTN1, KC_MS_U, KC_BTN2, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R \ + //`-----------------------------------------------------------------------------------------------------------------------------------' + ), + + [_BROWSER] = LAYOUT( \ + //,--------------------------------------------------------------| |--------------------------------------------------------------. + XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + TG(_BROWSER), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGDN, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,LCTL(LSFT(KC_T)),KC_UP,LCTL(KC_W), \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______,LCTL(LSFT(KC_TAB)),KC_DOWN,LCTL(KC_TAB) \ + //`-----------------------------------------------------------------------------------------------------------------------------------' + ), + + [_FLOCK] = LAYOUT( \ + //,--------------------------------------------------------------| |--------------------------------------------------------------. + _______,TD(TD_ESQW),KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + //`-----------------------------------------------------------------------------------------------------------------------------------' + ), + + [_LOWER] = LAYOUT( \ + //,--------------------------------------------------------------| |--------------------------------------------------------------. + _______, KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, JP_QUOT, JP_EXLM, JP_QUES, JP_LBRC, JP_RBRC, JP_TILD, KC_P6, KC_P7, KC_P8, KC_P9, JP_ASTR, JP_SLSH, XXXXXXX, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + JP_QUOT, JP_HASH, JP_DQT, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_P4, KC_P5, KC_P6, JP_MINS, JP_EQL, KC_ENT, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + JP_CIRC, JP_PERC, JP_AMPR, JP_SCLN, JP_COLN, JP_PIPE, KC_P0, KC_P1, KC_P2, KC_P3, JP_PLUS, KC_UP, KC_RSFT, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_ZKHK, _______, MO(_LOWER), _______, _______, MO(_RAISE), JP_DOT, KC_LEFT, KC_DOWN, KC_RIGHT \ + //`-----------------------------------------------------------------------------------------------------------------------------------' + ), + + [_RAISE] = LAYOUT( \ + //,--------------------------------------------------------------| |--------------------------------------------------------------. + _______, KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, KC_PGUP, XXXXXXX, XXXXXXX, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + LCTL_T(KC_F11), XXXXXXX, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, KC_LEFT, KC_DOWN,KC_RIGHT, XXXXXXX, XXXXXXX, _______, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + SFT_T(KC_F12), KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGDN, _______, _______, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + //`-----------------------------------------------------------------------------------------------------------------------------------' + ), + + [_ADJUST] = LAYOUT( /* Base */ + //,--------------------------------------------------------------| |--------------------------------------------------------------. + _______, RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_RST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, RGB_MOD, XXXXXXX,LCA(KC_DEL),LALT(KC_PSCR),KC_PSCR,XXXXXXX, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_VAD, RGB_VAI, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, XXXXXXX, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + //`-----------------------------------------------------------------------------------------------------------------------------------' + ) +}; + +//A description for expressing the layer position in LED mode. +layer_state_t layer_state_set_user(layer_state_t state) { + state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); +#ifdef RGBLIGHT_ENABLE + switch (get_highest_layer(state)) { + case _MOUSE: + rgblight_sethsv_at(HSV_RED, 0); + break; + case _BROWSER: + rgblight_sethsv_at(HSV_RED, 1); + break; + case _FLOCK: + rgblight_sethsv_range(HSV_YELLOW, 0, 2); + break; + case _LOWER: + rgblight_sethsv_range(HSV_BLUE, 0, 2); + break; + case _RAISE: + rgblight_sethsv_range(HSV_RED, 0, 2); + break; + case _ADJUST: + rgblight_sethsv_range(HSV_PURPLE, 0, 2); + break; + default: // for any other layers, or the default layer + rgblight_sethsv_range( 0, 0, 0, 0, 2); + break; + } + rgblight_set_effect_range( 2, 6); +#endif +return state; +} + +int RGB_current_mode; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + bool result = false; + switch (keycode) { + #ifdef RGBLIGHT_ENABLE + case RGB_MOD: + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + break; + case RGB_RST: + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + break; + #endif + default: + result = true; + break; + } + + return result; +} + +void matrix_init_user(void) { + +} diff --git a/keyboards/naked64/keymaps/salicylic/readme.md b/keyboards/naked64/keymaps/salicylic/readme.md new file mode 100644 index 000000000000..8b2d812ea4ae --- /dev/null +++ b/keyboards/naked64/keymaps/salicylic/readme.md @@ -0,0 +1,56 @@ +# The salicylic keymap for naked64 + +## Default +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +|:----:|:--------:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +| PgUp |ESC(Flock)| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| BSPC| +| PgDn | Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| +| | Control | A| S| D| F| G| H| J| K| L| -| \| ENT| +| | Shift | Z| X| C| V| B| N| M| ,| .| /| Up| Shift| +| | ADJUST| | LALT| | SPC| LOWER| RAISE| SPC| | LGUI| Left| Down| Right| + + + +## FLock +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +|:----:|:--------:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +| PgUp |ESC(Flock)| F1| F2| F3| F4| F5| F6| F7| F8| F9| F10| F11| F12| +| PgDn | Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| +| | Control | A| S| D| F| G| H| J| K| L| ;| '| ENT| +| | Shift | Z| X| C| V| B| N| M| ,| .| /| Up| Shift| +| | ADJUST| | LALT| | SPC| LOWER| RAISE| SPC| | LGUI| Left| Down| Right| + + + +## Lower +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +|:----:|:--------:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +| PgUp |ESC(Flock)| F1| F2| F3| F4| F5| F6| F7| F8| F9| F10| F11| F12| +| PgDn | Tab | !| @| #| $| %| ^| &| *| (| )| DEL| ]| +| | Control | F1| F2| F3| F4| F5| F6| _| +| {| }| PIPE| ENT| +| | Shift | F7| F8| F9| F10| F11| F12| SNUHS| SNUBS| ,| .| VoUp| Shift| +| | ADJUST| | LALT| | SPC| LOWER| RAISE| SPC| | ,| MNxt| VoDn| Mply| + + + +## Raise +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +|:----:|:--------:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +| PgUp | ESC | F1| F2| F3| F4| F5| F6| F7| F8| F9| F10| F11| F12| +| PgDn | Tab | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| BSPC| +| | Control | F1| F2| F3| F4| F5| F6| -| =| (| )| \| ENT| +| | Shift | F7| F8| F9| F10| F11| F12| NUHS| NUBS| .| /| VoUp| Shift| +| | ADJUST| | LALT| | SPC| LOWER| RAISE| SPC| | LGUI| MNxt| VoDn| Mply| + + + +## Adjust +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +|:----:|:--------:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| +| PgUp | RST | F1| F2| F3| F4| F5| F6| F7| F8| F9| F10| F11| F12| +| PgDn | Tab | XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| +| | Control | XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| LTOG| LMOD| XXXXX| C+A+D|Alt+PSCR|PSCR| XXXXX| +| | Shift | XXXXX| XXXXX| XXXXX| XXXXX| XXXXX| LVAD| LVAI| LHUD| LHUI| LSAD| LSAI| XXXXX| +| | ADJUST| | LALT| | SPC| LOWER| RAISE| SPC| | LGUI| MNxt| VoDn| Mply| + + diff --git a/keyboards/naked64/keymaps/salicylic/rules.mk b/keyboards/naked64/keymaps/salicylic/rules.mk new file mode 100644 index 000000000000..e5ddcae8d927 --- /dev/null +++ b/keyboards/naked64/keymaps/salicylic/rules.mk @@ -0,0 +1 @@ +TAP_DANCE_ENABLE = yes diff --git a/keyboards/naked64/keymaps/salicylic_with_setta21/config.h b/keyboards/naked64/keymaps/salicylic_with_setta21/config.h new file mode 100644 index 000000000000..0761e5b6d3b5 --- /dev/null +++ b/keyboards/naked64/keymaps/salicylic_with_setta21/config.h @@ -0,0 +1,27 @@ +/* Copyright 2018 Salicylic_acid3 + * + * 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 . + */ + +#pragma once + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS +#define USE_SERIAL_PD2 + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 180 diff --git a/keyboards/naked64/keymaps/salicylic_with_setta21/keymap.c b/keyboards/naked64/keymaps/salicylic_with_setta21/keymap.c new file mode 100644 index 000000000000..0a1acbaa6de2 --- /dev/null +++ b/keyboards/naked64/keymaps/salicylic_with_setta21/keymap.c @@ -0,0 +1,234 @@ +#include QMK_KEYBOARD_H +#include "keymap_jp.h" + + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +extern uint8_t is_master; + +// 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. +enum layer_number { + _QWERTY = 0, + _MOUSE, + _BROWSER, + _FLOCK, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + RGB_RST = SAFE_RANGE, + SEND_SUM, + SEND_AVE, + SEND_CIF, + SEND_MAX, + SEND_MIN +}; + +enum tapdances{ + TD_ESFL = 0, + TD_ESQW, +}; + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_ESFL] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _FLOCK), + [TD_ESQW] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _QWERTY), +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_with_setta21( \ + //,--------------------------------------------------------------| |--------------------------------------------------------------. |-----------------------------------------------| + TG(_MOUSE),TD(TD_ESFL), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, JP_MINS, KC_BSPC,LT(_LOWER, KC_P0),KC_P1, KC_P4, KC_P7,KC_NLCK, KC_ESC, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + TG(_BROWSER), KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_LBRC, JP_RBRC, KC_P2, KC_P5, KC_P8,KC_PSLS, KC_F2, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, JP_MINS, JP_BSLS, KC_ENT,LT(_RAISE, KC_PDOT),KC_P3,KC_P6, KC_P9,KC_PAST, KC_EQL, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, JP_COMM, JP_DOT, JP_SLSH, KC_UP, KC_RSFT, KC_PENT, KC_PPLS,KC_PMNS, KC_DEL, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-----------------------------------------------| + KC_ZKHK, KC_LGUI,LT(_LOWER,KC_ENT), KC_BSPC, KC_DEL,LT(_RAISE,KC_SPC),ALT_T(KC_HENK),KC_LEFT,KC_DOWN,KC_RIGHT \ + //`-----------------------------------------------------------------------------------------------------------------------------------' + ), + + [_MOUSE] = LAYOUT_with_setta21( \ + //,--------------------------------------------------------------| |--------------------------------------------------------------. |-----------------------------------------------| + TG(_MOUSE), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,_______,_______,_______,_______,_______, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,_______,_______,_______,_______, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,_______,_______,_______,_______,_______, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BTN1, KC_MS_U, KC_BTN2, _______, _______,_______,_______, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-----------------------------------------------| + _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R \ + //`-----------------------------------------------------------------------------------------------------------------------------------' + ), + + [_BROWSER] = LAYOUT_with_setta21( \ + //,--------------------------------------------------------------| |--------------------------------------------------------------. |-----------------------------------------------| + XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,_______,_______,_______,_______,_______, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + TG(_BROWSER), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______,_______,_______,_______,_______, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGDN, _______,_______,_______,_______,_______,_______, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,LCTL(LSFT(KC_T)),KC_UP,LCTL(KC_W), _______, _______,_______,_______, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-----------------------------------------------| + _______, _______, _______, _______, _______, _______, _______,LCTL(LSFT(KC_TAB)),KC_DOWN,LCTL(KC_TAB) \ + //`-----------------------------------------------------------------------------------------------------------------------------------' + ), + + [_FLOCK] = LAYOUT_with_setta21( \ + //,--------------------------------------------------------------| |--------------------------------------------------------------. |-----------------------------------------------| + _______,TD(TD_ESQW),KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,_______,_______,_______,_______,_______, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,_______,_______,_______,_______, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,_______,_______,_______,_______,_______, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,_______,_______, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-----------------------------------------------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + //`-----------------------------------------------------------------------------------------------------------------------------------' + ), + + [_LOWER] = LAYOUT_with_setta21( \ + //,--------------------------------------------------------------| |--------------------------------------------------------------. |-----------------------------------------------| + _______, KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, MO(_LOWER),XXXXXXX,KC_LEFT,XXXXXXX,XXXXXXX, KC_ESC, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + _______, JP_QUOT, JP_EXLM, JP_QUES, JP_LBRC, JP_RBRC, JP_TILD, KC_P6, KC_P7, KC_P8, KC_P9, JP_ASTR, JP_SLSH, XXXXXXX, KC_DOWN,KC_DOWN, KC_UP,KC_PSLS, KC_F2, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + JP_QUOT, JP_HASH, JP_DQT, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_P4, KC_P5, KC_P6, JP_MINS, JP_EQL, KC_ENT, MO(_RAISE),XXXXXXX,KC_RIGHT,XXXXXXX,KC_PAST,KC_EQL, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| + JP_CIRC, JP_PERC, JP_AMPR, JP_SCLN, JP_COLN, JP_PIPE, KC_P0, KC_P1, KC_P2, KC_P3, JP_PLUS, KC_UP, KC_RSFT, KC_PENT, KC_PPLS,KC_PMNS, KC_DEL, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-----------------------------------------------| + KC_ZKHK, _______, MO(_LOWER), _______, _______, MO(_RAISE), JP_DOT, KC_LEFT, KC_DOWN, KC_RIGHT \ + //`-----------------------------------------------------------------------------------------------------------------------------------' + ), + + [_RAISE] = LAYOUT_with_setta21( \ + //,--------------------------------------------------------------| |--------------------------------------------------------------. |------------------------------------------------| + _______, KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_F11, KC_F4, KC_F7,SEND_MIN, KC_ESC, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+--------+-------| + _______, KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, KC_PGUP, XXXXXXX, XXXXXXX, KC_F12, KC_F5, KC_F8,SEND_MAX, KC_F2, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+--------+-------| + LCTL_T(KC_F11), XXXXXXX, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, KC_LEFT, KC_DOWN,KC_RIGHT, XXXXXXX, XXXXXXX, _______, _______, KC_F3, KC_F6, KC_F9,SEND_CIF, KC_EQL, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |---------------+---------------+--------+-------| + SFT_T(KC_F12), KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGDN, _______, _______, KC_RPRN, SEND_SUM,SEND_AVE, KC_DEL, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |------------------------------------------------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + //`-----------------------------------------------------------------------------------------------------------------------------------' + ), + + + [_ADJUST] = LAYOUT_with_setta21( /* Base */ + //,--------------------------------------------------------------| |--------------------------------------------------------------. |-----------------------------------------------| + _______, RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,RGB_VAD,RGB_HUD,RGB_SAD,XXXXXXX,_______, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_RST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, RGB_VAI,RGB_HUI,RGB_SAI,XXXXXXX,_______, \ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, RGB_MOD, XXXXXXX,LCA(KC_DEL),LALT(KC_PSCR),KC_PSCR,XXXXXXX, _______,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,_______, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_VAD, RGB_VAI, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, XXXXXXX, RGB_MOD, RGB_TOG,_______,_______, \ + // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |-----------------------------------------------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + //`-----------------------------------------------------------------------------------------------------------------------------------' + ) +}; + +//A description for expressing the layer position in LED mode. +layer_state_t layer_state_set_user(layer_state_t state) { + state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); +#ifdef RGBLIGHT_ENABLE + switch (get_highest_layer(state)) { + case _MOUSE: + rgblight_sethsv_at(HSV_RED, 0); + break; + case _BROWSER: + rgblight_sethsv_at(HSV_RED, 1); + break; + case _FLOCK: + rgblight_sethsv_range(HSV_YELLOW, 0, 2); + break; + case _LOWER: + rgblight_sethsv_range(HSV_BLUE, 0, 2); + break; + case _RAISE: + rgblight_sethsv_range(HSV_RED, 0, 2); + break; + case _ADJUST: + rgblight_sethsv_range(HSV_PURPLE, 0, 2); + break; + default: // for any other layers, or the default layer + rgblight_sethsv_range( 0, 0, 0, 0, 2); + break; + } + rgblight_set_effect_range( 2, 6); +#endif +return state; +} + +int RGB_current_mode; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + bool result = false; + switch (keycode) { + case SEND_SUM: + if (record->event.pressed) { + SEND_STRING("=SUM("); + } + break; + case SEND_AVE: + if (record->event.pressed) { + SEND_STRING("=AVERAGE("); + } + break; + case SEND_CIF: + if (record->event.pressed) { + SEND_STRING("=COUNTIF("); + } + break; + case SEND_MAX: + if (record->event.pressed) { + SEND_STRING("=MAX("); + } + break; + case SEND_MIN: + if (record->event.pressed) { + SEND_STRING("=MIN("); + } + break; + #ifdef RGBLIGHT_ENABLE + case RGB_MOD: + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + break; + case RGB_RST: + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + break; + #endif + default: + result = true; + break; + } + + return result; +} + +void matrix_init_user(void) { + +} diff --git a/keyboards/naked64/keymaps/salicylic_with_setta21/readme.md b/keyboards/naked64/keymaps/salicylic_with_setta21/readme.md new file mode 100644 index 000000000000..cf09c1a74cc5 --- /dev/null +++ b/keyboards/naked64/keymaps/salicylic_with_setta21/readme.md @@ -0,0 +1,44 @@ +# The salicylic_with_setta21 keymap for naked64 + +Add Setta21 maps to the salicylic layout. + +## Default +| 1 | 2 | 3 | 4 | +|:----:|:----:|:----:|:----:| +| ESC| F2| =| DEL| +|Ad+Num| /| *| -| +| 7| 8| 9| | +| 4| 5| 6| +| +| 1| 2| 3| | +| Rai+0| | LOW + .| ENT| + +## Lower +| 1 | 2 | 3 | 4 | +|:----:|:----:|:----:|:----:| +| ESC| F2| =| DEL| +| =MIN(| =MAX(|=COUNTIF(|=AVERAGE(| +| F7| F8| F9| | +| F4| F5| F6| =SUM(| +| F11| F12| F3| | +| RAISE| | LOWER| )| + +## Raise +| 1 | 2 | 3 | 4 | +|:----:|:----:|:----:|:----:| +| ESC| F2| =| DEL| +| XXXXX| /| *| -| +| XXXXX| UP| XXXXX| | +| LEFT| DOWN| RIGHT| +| +| XXXXX| DOWN| XXXXX| | +| RAISE| | LOWER| ENT| + +## Adjust +| 1 | 2 | 3 | 4 | +|:----:|:----:|:----:|:----:| +| ESC| F2| =| DEL| +|ADJUST| XXXXX| XXXXX| -| +|LED_SAD|LED_SAI| XXXXX| | +|LED_HUD|LED_HUI| XXXXX| +| +|LED_VAD|LED_VAI| XXXXX| | +|LED_ON/Off| | XXXXX|LED_MOD| + diff --git a/keyboards/naked64/keymaps/salicylic_with_setta21/rules.mk b/keyboards/naked64/keymaps/salicylic_with_setta21/rules.mk new file mode 100644 index 000000000000..e5ddcae8d927 --- /dev/null +++ b/keyboards/naked64/keymaps/salicylic_with_setta21/rules.mk @@ -0,0 +1 @@ +TAP_DANCE_ENABLE = yes diff --git a/keyboards/naked64/naked64.c b/keyboards/naked64/naked64.c new file mode 100644 index 000000000000..a2863f047734 --- /dev/null +++ b/keyboards/naked64/naked64.c @@ -0,0 +1 @@ +#include "naked64.h" diff --git a/keyboards/naked64/naked64.h b/keyboards/naked64/naked64.h new file mode 100644 index 000000000000..a13144011825 --- /dev/null +++ b/keyboards/naked64/naked64.h @@ -0,0 +1,7 @@ +#pragma once + +#include "quantum.h" + +#ifdef KEYBOARD_naked64_rev1 + #include "rev1.h" +#endif diff --git a/keyboards/naked64/readme.md b/keyboards/naked64/readme.md new file mode 100644 index 000000000000..403e5cf4aeb4 --- /dev/null +++ b/keyboards/naked64/readme.md @@ -0,0 +1,18 @@ +# naked64 + +![naked64](https://cdn-ak.f.st-hatena.com/images/fotolife/S/Salicylic_acid3/20190627/20190627022840.jpg) + +This is 64 keys modification Ortholinear keyboard. + +Keyboard Maintainer: [Salicylic_acid3](/~https://github.com/Salicylic-acid3) +Hardware Supported: Naked64SF PCB, Pro Micro +Hardware Availability: [PCB & Case Data](/~https://github.com/Salicylic-acid3/PCB_Data), [Booth Shop](https://salicylic-acid3.booth.pm/items/1418693) + +Make example for this keyboard (after setting up your build environment): + + make naked64:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +[Build guide](https://salicylic-acid3.hatenablog.com/entry/naked64SF-build-guide) +[Firmware](/~https://github.com/Salicylic-acid3/qmk_firmware/tree/master/keyboards/naked64) diff --git a/keyboards/naked64/rev1/config.h b/keyboards/naked64/rev1/config.h new file mode 100644 index 000000000000..2e48edbc0339 --- /dev/null +++ b/keyboards/naked64/rev1/config.h @@ -0,0 +1,82 @@ +/* +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x3060 +#define DEVICE_VER 0x0003 +#define MANUFACTURER Salicylic_Acid +#define PRODUCT naked64 +#define DESCRIPTION A custom keyboard + +/* key matrix size */ +#define MATRIX_ROWS 16 +#define MATRIX_COLS 8 + +// wiring of each half +#define MATRIX_ROW_PINS { D1, D0, D4, C6, D7, E6, B4, B5 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, D3 } +#define MATRIX_ROW_PINS_RIGHT { D4, C6, D7, E6, B4, B5, B2, B2 } +#define MATRIX_COL_PINS_RIGHT { F4, F5, F6, F7, B1, B3, B2, B6 } + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* serial.c configuration for split keyboard */ +#define SOFT_SERIAL_PIN D2 + +/* 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 + +/* ws2812 RGB LED */ +#define RGB_DI_PIN B6 + +#define RGBLED_NUM 12 // Number of LEDs +#define RGBLIGHT_LED_MAP { 0, 1, 3, 2, 2, 3, 2, 3, 4, 5, 6, 7 } + +#ifndef IOS_DEVICE_ENABLE + #define RGBLIGHT_LIMIT_VAL 180 + #define RGBLIGHT_VAL_STEP 17 +#else + #define RGBLIGHT_LIMIT_VAL 50 + #define RGBLIGHT_VAL_STEP 4 +#endif +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 + +// Selection of RGBLIGHT MODE to use. +#define RGBLIGHT_EFFECT_BREATHING +#define RGBLIGHT_EFFECT_SNAKE + +#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE) +// USB_MAX_POWER_CONSUMPTION value for naked48 keyboard +// 120 RGBoff, OLEDoff +// 120 OLED +// 330 RGB 6 +// 300 RGB 32 +// 310 OLED & RGB 32 + #define USB_MAX_POWER_CONSUMPTION 400 +#else + // fix iPhone and iPad power adapter issue + // iOS device need lessthan 100 + #define USB_MAX_POWER_CONSUMPTION 100 +#endif diff --git a/keyboards/naked64/rev1/rev1.c b/keyboards/naked64/rev1/rev1.c new file mode 100644 index 000000000000..d851f97823e8 --- /dev/null +++ b/keyboards/naked64/rev1/rev1.c @@ -0,0 +1,5 @@ +#include "rev1.h" + +void matrix_init_kb(void) { + matrix_init_user(); +}; diff --git a/keyboards/naked64/rev1/rev1.h b/keyboards/naked64/rev1/rev1.h new file mode 100644 index 000000000000..a0f83749d1a1 --- /dev/null +++ b/keyboards/naked64/rev1/rev1.h @@ -0,0 +1,78 @@ +#pragma once + +#include "naked64.h" + + +////////////////////////////////////////////////////////////////////////////// +// When only use Naked64. +////////////////////////////////////////////////////////////////////////////// +/* + * ,------------------------------------------ -----------------------------------------. + * | L00 | L20 | L70 | L31 | L02 | L52 | L13 | | L63 | L34 | L05 | L45 | L16 | L66 | L37 | + * |------------------------------------------ ------------------------------------------+ + * | L10 | L30 | L01 | L41 | L12 | L62 | L23 | | L73 | L44 | L15 | L55 | L26 | L76 | L47 | + * |------------------------------------------ ------------------------------------------+ + * | L40 | L11 | L51 | L22 | L72 | L33 | | L04 | L54 | L25 | L65 | L36 | L07 | L57 | + * |------------------------------------ ------------------------------------------+ + * | L50 | L21 | L61 | L32 | L03 | L43 | | L14 | L64 | L35 | L75 | L46 | L17 | L67 | + * |------------------------------------ ------------------------------------------+ + * | L60 | | L71 | L42 | | L53 | | L24 | L74 | | L06 | L56 | L27 | L77 | + * |------------------------------------ ------------------------------------------' + */ + +#define LAYOUT( \ + L00, L20, L70, L31, L02, L52, L13, L63, L34, L05, L45, L16, L66, L37, \ + L10, L30, L01, L41, L12, L62, L23, L73, L44, L15, L55, L26, L76, L47, \ + L40, L11, L51, L22, L72, L33, L04, L54, L25, L65, L36, L07, L57, \ + L50, L21, L61, L32, L03, L43, L14, L64, L35, L75, L46, L17, L67, \ + L60, L71, L42, L53, L24, L74, L06, L56, L27, L77 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05, L06, L07 }, \ + { L10, L11, L12, L13, L14, L15, L16, L17 }, \ + { L20, L21, L22, L23, L24, L25, L26, L27 }, \ + { L30, L31, L32, L33, L34, L35, L36, L37 }, \ + { L40, L41, L42, L43, L44, L45, L46, L47 }, \ + { L50, L51, L52, L53, L54, L55, L56, L57 }, \ + { L60, L61, L62, L63, L64, L65, L66, L67 }, \ + { L70, L71, L72, L73, L74, L75, L76, L77 }, \ + {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO } \ + } + +////////////////////////////////////////////////////////////////////////////// +// When connecting Setta21 to Naked64. +////////////////////////////////////////////////////////////////////////////// + +#define LAYOUT_with_setta21( \ + L00, L20, L70, L31, L02, L52, L13, L63, L34, L05, L45, L16, L66, L37, R00, R01, R02, R03, R04, R05, \ + L10, L30, L01, L41, L12, L62, L23, L73, L44, L15, L55, L26, L76, L47, R11, R12, R13, R14, R15, \ + L40, L11, L51, L22, L72, L33, L04, L54, L25, L65, L36, L07, L57, R20, R21, R22, R23, R24, R25, \ + L50, L21, L61, L32, L03, L43, L14, L64, L35, L75, L46, L17, L67, R30, R32, R34, R35, \ + L60, L71, L42, L53, L24, L74, L06, L56, L27, L77 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05, L06, L07 }, \ + { L10, L11, L12, L13, L14, L15, L16, L17 }, \ + { L20, L21, L22, L23, L24, L25, L26, L27 }, \ + { L30, L31, L32, L33, L34, L35, L36, L37 }, \ + { L40, L41, L42, L43, L44, L45, L46, L47 }, \ + { L50, L51, L52, L53, L54, L55, L56, L57 }, \ + { L60, L61, L62, L63, L64, L65, L66, L67 }, \ + { L70, L71, L72, L73, L74, L75, L76, L77 }, \ + { R00, R01, R02, R03, R04, R05,KC_NO,KC_NO }, \ + {KC_NO, R11, R12, R13, R14, R15,KC_NO,KC_NO }, \ + { R20, R21, R22, R23, R24, R25,KC_NO,KC_NO }, \ + { R30,KC_NO, R32,KC_NO, R34, R35,KC_NO,KC_NO }, \ + {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ + {KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO } \ + } + diff --git a/keyboards/naked64/rev1/rules.mk b/keyboards/naked64/rev1/rules.mk new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/keyboards/naked64/rules.mk b/keyboards/naked64/rules.mk new file mode 100644 index 000000000000..864baccc8ff4 --- /dev/null +++ b/keyboards/naked64/rules.mk @@ -0,0 +1,37 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +TAP_DANCE_ENABLE = no +OLED_DRIVER_ENABLE = no +USE_I2C = no +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +SPLIT_KEYBOARD = yes + +DEFAULT_FOLDER = naked64/rev1 From d5316e9714e6bd661ece1bf364dce1e9fd79988c Mon Sep 17 00:00:00 2001 From: Yadunand Prem Date: Mon, 28 Oct 2019 13:41:22 +1100 Subject: [PATCH 191/316] Update URL for `60-keyboard.hwdb` (#7185) --- docs/how_keyboards_work.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/how_keyboards_work.md b/docs/how_keyboards_work.md index bbd22a2788c8..3dcbc6452220 100644 --- a/docs/how_keyboards_work.md +++ b/docs/how_keyboards_work.md @@ -35,7 +35,7 @@ USB for a given key. ## 3. What the Event Input/Kernel Does -The *scancode* is mapped to a *keycode* dependent on the keyboard [60-keyboard.hwdb at Master](/~https://github.com/systemd/systemd/blob/master/hwdb/60-keyboard.hwdb). Without this mapping, the operating system will not receive a valid keycode and will be unable to do anything useful with that key press. +The *scancode* is mapped to a *keycode* dependent on the keyboard [60-keyboard.hwdb at Master](/~https://github.com/systemd/systemd/blob/master/hwdb.d/60-keyboard.hwdb). Without this mapping, the operating system will not receive a valid keycode and will be unable to do anything useful with that key press. ## 4. What the Operating System Does From 92be2439ec280c46c4babb60087a93b96b6e94ab Mon Sep 17 00:00:00 2001 From: Jonathan Rascher Date: Sun, 27 Oct 2019 21:53:49 -0500 Subject: [PATCH 192/316] Couple more minor Lily58 keymap tweaks (#7175) * Move grave/tilde and backslash/pipe to left hand * Shift media keys to be aligned with home row * Update KLE images * Mention new media key location in readme * Turn off a couple more features for explicitness --- keyboards/lily58/keymaps/bcat/keymap.c | 10 +++++----- keyboards/lily58/keymaps/bcat/readme.md | 6 +++--- users/bcat/rules.mk | 11 ++++++++--- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/keyboards/lily58/keymaps/bcat/keymap.c b/keyboards/lily58/keymaps/bcat/keymap.c index 67aa3a41438c..905e4ed76a48 100644 --- a/keyboards/lily58/keymaps/bcat/keymap.c +++ b/keyboards/lily58/keymaps/bcat/keymap.c @@ -26,8 +26,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [LAYER_LOWER] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, - _______, _______, _______, _______, KC_DEL, _______, KC_TILD, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, - _______, _______, _______, _______, KC_INS, _______, _______, _______, KC_GRV, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, _______, _______, KC_PIPE, KC_TILD, KC_DEL, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______, + _______, _______, _______, KC_BSLS, KC_GRV, KC_INS, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), @@ -43,9 +43,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Adjust layer: http://www.keyboard-layout-editor.com/#/gists/8f6a3f08350a9bbe1d414b22bca4e6c7 */ [LAYER_ADJUST] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - KC_CAPS, KC_MPLY, KC_VOLU, KC_MSTP, _______, _______, EEP_RST, RESET, KC_PSCR, KC_SLCK, KC_PAUS, _______, - _______, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_CAPS, _______, KC_MPLY, KC_VOLU, KC_MSTP, _______, EEP_RST, RESET, KC_PSCR, KC_SLCK, KC_PAUS, _______, + _______, _______, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), }; diff --git a/keyboards/lily58/keymaps/bcat/readme.md b/keyboards/lily58/keymaps/bcat/readme.md index ac475c67603c..5e0d6153a4c1 100644 --- a/keyboards/lily58/keymaps/bcat/readme.md +++ b/keyboards/lily58/keymaps/bcat/readme.md @@ -2,7 +2,7 @@ This split ergo layout is standard QWERTY on the default layer, with symbols on the lower layer, numbers/navigation on the raise layer, and media keys centered -around the WASD cluster in the adjust (raise + lower) layer. A few general +around the ESDF cluster in the adjust (raise + lower) layer. A few general principles went into this layout: * The number row is optional, as are the outermost bottom row keys and the @@ -51,7 +51,7 @@ releasing the layer key. ## Lower layer -![Lower layer layout](https://i.imgur.com/zjYwqtv.png) +![Lower layer layout](https://i.imgur.com/ytNFySG.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/19ad0d3b5d745fbb2818db09740f5a11)) @@ -63,6 +63,6 @@ releasing the layer key. ## Adjust layer -![Adjust layer layout](https://i.imgur.com/tU72bSZ.png) +![Adjust layer layout](https://i.imgur.com/fCIySG2.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/8f6a3f08350a9bbe1d414b22bca4e6c7)) diff --git a/users/bcat/rules.mk b/users/bcat/rules.mk index 407729c82bb2..107b470edb99 100644 --- a/users/bcat/rules.mk +++ b/users/bcat/rules.mk @@ -2,12 +2,17 @@ BOOTMAGIC_ENABLE = lite # Enable mouse and media keys on all keyboards. -MOUSEKEY_ENABLE = yes EXTRAKEY_ENABLE = yes +MOUSEKEY_ENABLE = yes # Disable some unwanted features on all keyboards. -CONSOLE_ENABLE = no +API_SYSEX_ENABLE = no COMMAND_ENABLE = no +CONSOLE_ENABLE = no +FAUXCLICKY_ENABLE = no +MIDI_ENABLE = no NKRO_ENABLE = no +SLEEP_LED_ENABLE = no +UCIS_ENABLE = no UNICODE_ENABLE = no -API_SYSEX_ENABLE = no +UNICODEMAP_ENABLE = no From 5777177cec2c76f79b4930dacb390b0f4681bc85 Mon Sep 17 00:00:00 2001 From: Yan-Fa Li Date: Mon, 28 Oct 2019 09:47:48 -0700 Subject: [PATCH 193/316] [keyboard] yanfali fruity60 prototype (#7021) * initial commit * README * Unique id * info.json * layotus * br * Move to handwired * cleanup * Disable command for fruity out of flash space * Old compiler turn off command --- keyboards/handwired/fruity60/config.h | 53 +++++++++++++++++++ keyboards/handwired/fruity60/fruity60.c | 51 ++++++++++++++++++ keyboards/handwired/fruity60/fruity60.h | 42 +++++++++++++++ keyboards/handwired/fruity60/info.json | 12 +++++ .../fruity60/keymaps/default/config.h | 19 +++++++ .../fruity60/keymaps/default/keymap.c | 25 +++++++++ .../fruity60/keymaps/default/readme.md | 1 + keyboards/handwired/fruity60/readme.md | 15 ++++++ keyboards/handwired/fruity60/rules.mk | 38 +++++++++++++ users/yanfali/rules.mk | 3 ++ 10 files changed, 259 insertions(+) create mode 100644 keyboards/handwired/fruity60/config.h create mode 100644 keyboards/handwired/fruity60/fruity60.c create mode 100644 keyboards/handwired/fruity60/fruity60.h create mode 100644 keyboards/handwired/fruity60/info.json create mode 100644 keyboards/handwired/fruity60/keymaps/default/config.h create mode 100644 keyboards/handwired/fruity60/keymaps/default/keymap.c create mode 100644 keyboards/handwired/fruity60/keymaps/default/readme.md create mode 100644 keyboards/handwired/fruity60/readme.md create mode 100644 keyboards/handwired/fruity60/rules.mk diff --git a/keyboards/handwired/fruity60/config.h b/keyboards/handwired/fruity60/config.h new file mode 100644 index 000000000000..5cccba3dc8cc --- /dev/null +++ b/keyboards/handwired/fruity60/config.h @@ -0,0 +1,53 @@ +/* +Copyright 2019 Yan-Fa Li + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0xB170 +#define DEVICE_VER 0x0001 +#define MANUFACTURER yanfali +#define PRODUCT fruity60 +#define DESCRIPTION An Adafruit BLE 32u4 capable 60 + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 11 + +#define MATRIX_ROW_PINS \ + { B6, B5, D7, C6, D0, D1 } +#define MATRIX_COL_PINS \ + { F7, F6, F5, F4, F1, F0, D2, D3, B7, D6, C7 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* 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 diff --git a/keyboards/handwired/fruity60/fruity60.c b/keyboards/handwired/fruity60/fruity60.c new file mode 100644 index 000000000000..d68b17955ea9 --- /dev/null +++ b/keyboards/handwired/fruity60/fruity60.c @@ -0,0 +1,51 @@ +/* Copyright 2019 Yan-Fa Li + * + * 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 . + */ +#include "fruity60.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* + +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/handwired/fruity60/fruity60.h b/keyboards/handwired/fruity60/fruity60.h new file mode 100644 index 000000000000..7eb2e7e6fd81 --- /dev/null +++ b/keyboards/handwired/fruity60/fruity60.h @@ -0,0 +1,42 @@ +/* Copyright 2019 Yan-Fa Li + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_60_tsangan_hhkb( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k50, k51, k52, k53, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k54, k55, k56, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k57, k58, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k59, k5a, \ + k40, k41, k42, k45, k48, k49, k4a \ + ) \ + { \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a}, \ + {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a}, \ + {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a}, \ + {k40, k41, k42, KC_NO, KC_NO, k45, KC_NO, KC_NO, k48, k49, k4a}, \ + {k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5a}, \ + } diff --git a/keyboards/handwired/fruity60/info.json b/keyboards/handwired/fruity60/info.json new file mode 100644 index 000000000000..7cf5e61d18c4 --- /dev/null +++ b/keyboards/handwired/fruity60/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "fruity60", + "url": "/~https://github.com/yanfali/fruity60", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"label":"Backspace", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Alt", "x":11, "y":4, "w":1.5}, {"label":"Win", "x":12.5, "y":4}, {"label":"Menu", "x":13.5, "y":4, "w":1.5}] + } + } +} diff --git a/keyboards/handwired/fruity60/keymaps/default/config.h b/keyboards/handwired/fruity60/keymaps/default/config.h new file mode 100644 index 000000000000..7d7844ac616d --- /dev/null +++ b/keyboards/handwired/fruity60/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 Yan-Fa Li + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/handwired/fruity60/keymaps/default/keymap.c b/keyboards/handwired/fruity60/keymaps/default/keymap.c new file mode 100644 index 000000000000..a6cd15f4e2e5 --- /dev/null +++ b/keyboards/handwired/fruity60/keymaps/default/keymap.c @@ -0,0 +1,25 @@ +#include QMK_KEYBOARD_H + +enum layer { + BASE, + FN, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [BASE] = LAYOUT_60_tsangan_hhkb( + 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_GRV, 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, + LCTL_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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(FN), + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL + ), + + [FN] = LAYOUT_60_tsangan_hhkb( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, + _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST, RESET, + KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ), + +}; diff --git a/keyboards/handwired/fruity60/keymaps/default/readme.md b/keyboards/handwired/fruity60/keymaps/default/readme.md new file mode 100644 index 000000000000..7c01154cd1e2 --- /dev/null +++ b/keyboards/handwired/fruity60/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for fruity60 diff --git a/keyboards/handwired/fruity60/readme.md b/keyboards/handwired/fruity60/readme.md new file mode 100644 index 000000000000..ed476d264350 --- /dev/null +++ b/keyboards/handwired/fruity60/readme.md @@ -0,0 +1,15 @@ +# fruity60 + +![fruity60](/~https://github.com/yanfali/fruity60/blob/master/assets/pcb.png) + +A 60% tsangan, split bs/rs keyboard designed to support the bluefruit 32u4 ble controller + +Keyboard Maintainer: [Yan-Fa Li](/~https://github.com/yanfali)
+Hardware Supported: [github](/~https://github.com/yanfali/fruity60)
+Hardware Availability: You can make them yourself by downloading kicad and generating gerbers.
+ +Make example for this keyboard (after setting up your build environment): + + make fruity60:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/handwired/fruity60/rules.mk b/keyboards/handwired/fruity60/rules.mk new file mode 100644 index 000000000000..8c9bc95e504e --- /dev/null +++ b/keyboards/handwired/fruity60/rules.mk @@ -0,0 +1,38 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Processor frequency +F_CPU = 8000000 + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # 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 = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +BLUETOOTH = AdafruitBLE + +LAYOUTS = 60_tsangan_hhkb diff --git a/users/yanfali/rules.mk b/users/yanfali/rules.mk index b52bd55620e5..c43f298588cb 100644 --- a/users/yanfali/rules.mk +++ b/users/yanfali/rules.mk @@ -11,3 +11,6 @@ else AUDIO_ENABLE = no endif +ifeq ($(strip $(KEYBOARD)), fruity60) + COMMAND_ENABLE = no +endif From 84ac03bbab7cfc6cef6aa4e22360b92bdf044c6c Mon Sep 17 00:00:00 2001 From: "J.Flanagan" Date: Mon, 28 Oct 2019 12:57:15 -0500 Subject: [PATCH 194/316] [Keyboard] Add NEISO Macro Pad (#7163) * Initial Commit Initial commit of the N-E-ISO Pad * Changes to keymap.c Minor Changes to keymap.c * Major Changes Changes to config.h, neiso.c, neiso.h, readme.md, rules.mk, info.json * Updated readme.md Changed wording of redme.md * Initial Commit Initial commit of the N-E-ISO Pad * Changes to keymap.c Minor Changes to keymap.c * Major Changes Changes to config.h, neiso.c, neiso.h, readme.md, rules.mk, info.json * Updated readme.md Changed wording of redme.md * Update keyboards/sck/neiso/info.json Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/sck/neiso/info.json Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/sck/neiso/keymaps/default/keymap.c Co-Authored-By: fauxpark * Update keyboards/sck/neiso/neiso.h Co-Authored-By: fauxpark * Changes per request Removed lines 55-60 from default/keymap.c per request --- keyboards/sck/neiso/config.h | 170 ++++++++++++++++++ keyboards/sck/neiso/info.json | 12 ++ keyboards/sck/neiso/keymaps/default/config.h | 19 ++ keyboards/sck/neiso/keymaps/default/keymap.c | 54 ++++++ keyboards/sck/neiso/keymaps/default/readme.md | 1 + keyboards/sck/neiso/neiso.c | 30 ++++ keyboards/sck/neiso/neiso.h | 34 ++++ keyboards/sck/neiso/readme.md | 16 ++ keyboards/sck/neiso/rules.mk | 33 ++++ 9 files changed, 369 insertions(+) create mode 100644 keyboards/sck/neiso/config.h create mode 100644 keyboards/sck/neiso/info.json create mode 100644 keyboards/sck/neiso/keymaps/default/config.h create mode 100644 keyboards/sck/neiso/keymaps/default/keymap.c create mode 100644 keyboards/sck/neiso/keymaps/default/readme.md create mode 100644 keyboards/sck/neiso/neiso.c create mode 100644 keyboards/sck/neiso/neiso.h create mode 100644 keyboards/sck/neiso/readme.md create mode 100644 keyboards/sck/neiso/rules.mk diff --git a/keyboards/sck/neiso/config.h b/keyboards/sck/neiso/config.h new file mode 100644 index 000000000000..43530f2c0209 --- /dev/null +++ b/keyboards/sck/neiso/config.h @@ -0,0 +1,170 @@ +/* +Copyright 2019 jrfhoutx + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Space City Keyboards +#define PRODUCT NEISO +#define DESCRIPTION A five key ISO Macropad + +/* key matrix size */ +#define MATRIX_ROWS 1 +#define MATRIX_COLS 5 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS \ + { F4 } +#define MATRIX_COL_PINS \ + { B3, D2, F5, F7, B4 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +// #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 4 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * 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 + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/sck/neiso/info.json b/keyboards/sck/neiso/info.json new file mode 100644 index 000000000000..1484cd7f27f2 --- /dev/null +++ b/keyboards/sck/neiso/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "NEISO", + "url": "", + "maintainer": "jrfhoutx", + "width": 9.25, + "height": 14.25, + "layouts": { + "LAYOUT": { + "layout": [{"x":0.25, "y":0, "w":2, "h":1.25}, {"x":2.75, "y":0.25, "w":1.25, "h":2}, {"x":1.5, "y":1.5}, {"x":0, "y":1.75, "w":1.25, "h":2}, {"x":1.75, "y":2.75, "w":2, "h":1.25}] + } + } +} diff --git a/keyboards/sck/neiso/keymaps/default/config.h b/keyboards/sck/neiso/keymaps/default/config.h new file mode 100644 index 000000000000..499a4753f4b1 --- /dev/null +++ b/keyboards/sck/neiso/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 jrfhoutx + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/sck/neiso/keymaps/default/keymap.c b/keyboards/sck/neiso/keymaps/default/keymap.c new file mode 100644 index 000000000000..05335947b5a3 --- /dev/null +++ b/keyboards/sck/neiso/keymaps/default/keymap.c @@ -0,0 +1,54 @@ +/* Copyright 2019 jrfhoutx + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { QMKBEST = SAFE_RANGE, QMKURL }; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT(/* Base */ + KC_1, KC_2, + KC_3, + KC_4, KC_5 +), + [1] = LAYOUT(/* Base */ + KC_1, KC_2, + QMKBEST, + KC_4, KC_5 +), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMKBEST: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + SEND_STRING("QMK is the best thing ever!"); + } else { + // when keycode QMKBEST is released + } + break; + case QMKURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} diff --git a/keyboards/sck/neiso/keymaps/default/readme.md b/keyboards/sck/neiso/keymaps/default/readme.md new file mode 100644 index 000000000000..af217561978d --- /dev/null +++ b/keyboards/sck/neiso/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for the NEISO Macropad diff --git a/keyboards/sck/neiso/neiso.c b/keyboards/sck/neiso/neiso.c new file mode 100644 index 000000000000..4b817bdd57df --- /dev/null +++ b/keyboards/sck/neiso/neiso.c @@ -0,0 +1,30 @@ +/* Copyright 2019 jrfhoutx + * + * 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 . + */ +#include "neiso.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* + +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/sck/neiso/neiso.h b/keyboards/sck/neiso/neiso.h new file mode 100644 index 000000000000..7058fab5bf24 --- /dev/null +++ b/keyboards/sck/neiso/neiso.h @@ -0,0 +1,34 @@ +/* Copyright 2019 jrfhoutx + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ + +#define LAYOUT( \ + k01, k02, \ + k00, \ + k03, k04 \ +) \ + { {k00, k01, k02, k03, k04} } diff --git a/keyboards/sck/neiso/readme.md b/keyboards/sck/neiso/readme.md new file mode 100644 index 000000000000..c21897b0652f --- /dev/null +++ b/keyboards/sck/neiso/readme.md @@ -0,0 +1,16 @@ +# neiso + +![neiso](https://i.imgur.com/8uj89kN.jpg) + +A ProMicro/Teensy 2.0/Elite C controlled 5 key macropad using 4 ISO enter keys. Initially based on the I-S-hOle macropad. + +Keyboard Maintainer: jrfhoutx +Keyboard Designer: [jrfhoutx](/~https://github.com/jrfhoutx) +Hardware Supported: N-E-ISO PCB; ProMicro, Teensy 2.0, Elite C, Proton C +Hardware Availability: Space City Keyboards + +Make example for this keyboard (after setting up your build environment): + + make sck/neiso:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/sck/neiso/rules.mk b/keyboards/sck/neiso/rules.mk new file mode 100644 index 000000000000..becaf5e1e097 --- /dev/null +++ b/keyboards/sck/neiso/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = yes # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs From 24cf6dc7f4b61cd1b2752499bcb014aa2a545655 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arda=20K=C4=B1l=C4=B1=C3=A7da=C4=9F=C4=B1?= Date: Mon, 28 Oct 2019 21:04:37 +0300 Subject: [PATCH 195/316] aranck handwired keyboard added (#7151) * aranck handwired keyboard added * layer enum updated * layout optimisations and general fixes done * Readme updated * Readme updated * Readme updated --- keyboards/handwired/aranck/aranck.c | 43 +++ keyboards/handwired/aranck/aranck.h | 39 +++ keyboards/handwired/aranck/config.h | 262 ++++++++++++++++++ keyboards/handwired/aranck/info.json | 62 +++++ .../handwired/aranck/keymaps/default/config.h | 22 ++ .../handwired/aranck/keymaps/default/keymap.c | 178 ++++++++++++ .../aranck/keymaps/default/readme.md | 1 + .../aranck/keymaps/turkishish/config.h | 22 ++ .../aranck/keymaps/turkishish/keymap.c | 225 +++++++++++++++ .../aranck/keymaps/turkishish/readme.md | 1 + keyboards/handwired/aranck/readme.md | 22 ++ keyboards/handwired/aranck/rules.mk | 33 +++ 12 files changed, 910 insertions(+) create mode 100644 keyboards/handwired/aranck/aranck.c create mode 100644 keyboards/handwired/aranck/aranck.h create mode 100644 keyboards/handwired/aranck/config.h create mode 100644 keyboards/handwired/aranck/info.json create mode 100644 keyboards/handwired/aranck/keymaps/default/config.h create mode 100644 keyboards/handwired/aranck/keymaps/default/keymap.c create mode 100644 keyboards/handwired/aranck/keymaps/default/readme.md create mode 100644 keyboards/handwired/aranck/keymaps/turkishish/config.h create mode 100644 keyboards/handwired/aranck/keymaps/turkishish/keymap.c create mode 100644 keyboards/handwired/aranck/keymaps/turkishish/readme.md create mode 100644 keyboards/handwired/aranck/readme.md create mode 100644 keyboards/handwired/aranck/rules.mk diff --git a/keyboards/handwired/aranck/aranck.c b/keyboards/handwired/aranck/aranck.c new file mode 100644 index 000000000000..2e67ec1dae7c --- /dev/null +++ b/keyboards/handwired/aranck/aranck.c @@ -0,0 +1,43 @@ +/* Copyright 2019 Arda Kilicdagi + * + * 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 . + */ +#include "aranck.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + + + +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); +} \ No newline at end of file diff --git a/keyboards/handwired/aranck/aranck.h b/keyboards/handwired/aranck/aranck.h new file mode 100644 index 000000000000..de7639fd03be --- /dev/null +++ b/keyboards/handwired/aranck/aranck.h @@ -0,0 +1,39 @@ +/* Copyright 2019 Arda Kilicdagi + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_aranck_mit(\ + 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 \ +) \ +{ \ + { 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, KC_NO, k35, k36, k37, k38, k39, k3a } \ +} diff --git a/keyboards/handwired/aranck/config.h b/keyboards/handwired/aranck/config.h new file mode 100644 index 000000000000..5212409c8dd9 --- /dev/null +++ b/keyboards/handwired/aranck/config.h @@ -0,0 +1,262 @@ +/* +Copyright 2019 Arda Kilicdagi + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Ardakilic +#define PRODUCT ARANCK +#define DESCRIPTION A handwired 40% ortholinear keyboard + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS \ + { D3, D2, D1, D0 } +#define MATRIX_COL_PINS \ + { C6, D7, E6, B4, B6, B2, B3, B1, F7, F6, F5, F4 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +// #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* 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 + + +/** + * Aranck-specific definitions + */ +#define B5_AUDIO +/** + * Aranck-specific definitions END + */ + + +#define TAPPING_TERM 200 +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * 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 + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/handwired/aranck/info.json b/keyboards/handwired/aranck/info.json new file mode 100644 index 000000000000..143a533e0ea7 --- /dev/null +++ b/keyboards/handwired/aranck/info.json @@ -0,0 +1,62 @@ +{ + "keyboard_name": "Aranck", + "keyboard_folder": "handwired/aranck", + "url": "/~https://github.com/Ardakilic", + "maintainer": "Arda Kilicdagi", + "width": 12, + "height": 4, + "layouts": { + "LAYOUT_aranck_mit": { + "key_count": 47, + "layout": [ + { "x": 0, "y": 0 }, + { "x": 1, "y": 0 }, + { "x": 2, "y": 0 }, + { "x": 3, "y": 0 }, + { "x": 4, "y": 0 }, + { "x": 5, "y": 0 }, + { "x": 6, "y": 0 }, + { "x": 7, "y": 0 }, + { "x": 8, "y": 0 }, + { "x": 9, "y": 0 }, + { "x": 10, "y": 0 }, + { "x": 11, "y": 0 }, + { "x": 0, "y": 1 }, + { "x": 1, "y": 1 }, + { "x": 2, "y": 1 }, + { "x": 3, "y": 1 }, + { "x": 4, "y": 1 }, + { "x": 5, "y": 1 }, + { "x": 6, "y": 1 }, + { "x": 7, "y": 1 }, + { "x": 8, "y": 1 }, + { "x": 9, "y": 1 }, + { "x": 10, "y": 1 }, + { "x": 11, "y": 1 }, + { "x": 0, "y": 2 }, + { "x": 1, "y": 2 }, + { "x": 2, "y": 2 }, + { "x": 3, "y": 2 }, + { "x": 4, "y": 2 }, + { "x": 5, "y": 2 }, + { "x": 6, "y": 2 }, + { "x": 7, "y": 2 }, + { "x": 8, "y": 2 }, + { "x": 9, "y": 2 }, + { "x": 10, "y": 2 }, + { "x": 11, "y": 2 }, + { "x": 0, "y": 3 }, + { "x": 1, "y": 3 }, + { "x": 2, "y": 3 }, + { "x": 3, "y": 3 }, + { "x": 4, "y": 3 }, + { "x": 5, "y": 3, "w": 2 }, + { "x": 7, "y": 3 }, + { "x": 8, "y": 3 }, + { "x": 9, "y": 3 }, + { "x": 10, "y": 3 }, + { "x": 11, "y": 3 } + ] + }, + } +} diff --git a/keyboards/handwired/aranck/keymaps/default/config.h b/keyboards/handwired/aranck/keymaps/default/config.h new file mode 100644 index 000000000000..cf888b0adc3d --- /dev/null +++ b/keyboards/handwired/aranck/keymaps/default/config.h @@ -0,0 +1,22 @@ +/* Copyright 2019 Arda Kilicdagi + * + * 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 . + */ + +#pragma once + +// place overrides here + +// #define RETRO_TAPPING +// #define PERMISSIVE_HOLD \ No newline at end of file diff --git a/keyboards/handwired/aranck/keymaps/default/keymap.c b/keyboards/handwired/aranck/keymaps/default/keymap.c new file mode 100644 index 000000000000..2765c7afbfaa --- /dev/null +++ b/keyboards/handwired/aranck/keymaps/default/keymap.c @@ -0,0 +1,178 @@ +/* Copyright 2019 Arda Kilicdagi + * + * 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 . + */ +#include QMK_KEYBOARD_H + + +enum aranck_layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST, + _SPACE, + _SODA, + _NUMPAD +}; + + +#define LOCKSCREEN LCTL(LSFT(KC_POWER)) // Screen Lock shortcut for OSX + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |NPdESC| A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |SftEtr| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | PWR | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_aranck_mit( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + LT(_NUMPAD, KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + LSFT_T(KC_CAPS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_SFTENT /*KC_ENT*/, + LT(_SODA, KC_POWER), KC_LCTL, KC_LALT, KC_LGUI, MO(_LOWER), LT(_SPACE, KC_SPC), MO(_RAISE), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_aranck_mit( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_aranck_mit( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Soda Layer + * Keys that I mostly use when while chilling or taking a break :) + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | Mute | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Next | Vol- | Vol+ | Play | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | |Brght▼|Brght▲| + * `-----------------------------------------------------------------------------------' + */ +[_SODA] = LAYOUT_aranck_mit( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BRMD, KC_BRMU +), + +/* Space Layer (Space Bar Layer Tap) + * ,-----------------------------------------------------------------------------------. + * | |CMD+1 |CMD+2 |CMD+3 |CMD+4 |CMD+5 |CMD+6 |CMD+7 |CMD+8 |CMD+9 |CMD+0 |LCKOSX| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | Up | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Left | Down | Right| | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | |Brght▼|Brght▲| + * `-----------------------------------------------------------------------------------' + */ +[_SPACE] = LAYOUT_aranck_mit( + _______, LGUI(KC_1), LGUI(KC_2), LGUI(KC_3), LGUI(KC_4), LGUI(KC_5), LGUI(KC_6), LGUI(KC_7), LGUI(KC_8), LGUI(KC_9), LGUI(KC_0), LOCKSCREEN, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BRMD, KC_BRMU +), + +/* Numpad Layer + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | 7 | 8 | 9 | - | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | Enter| 4 | 5 | 6 | + | * | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | 1 | 2 | 3 | + | / | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | 0 | 0 | . | , | = | + * `-----------------------------------------------------------------------------------' + */ +[_NUMPAD] = LAYOUT_aranck_mit( + _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PMNS, KC_BSPC, + _______, _______, _______, _______, _______, _______, KC_PENT, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_PAST, + _______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PPLS, KC_PSLS, + _______, _______, _______, _______, _______, _______, KC_P0, KC_P0, KC_PDOT, KC_PCMM, KC_PEQL +), + + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset|EEPRst| | | | | | | | | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | |MUSmod|Aud on|Audoff| | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff| | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_aranck_mit( + _______, RESET, EEP_RST, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, + _______, _______, MU_MOD, AU_ON, AU_OFF, _______, _______, _______, _______, _______, _______, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + +// Enable the adjust layer when both lower and +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +//bool process_record_user(uint16_t keycode, keyrecord_t *record) { +// return true; +//} + +void matrix_init_user(void) {} + +void matrix_scan_user(void) {} + +void led_set_user(uint8_t usb_led) {} diff --git a/keyboards/handwired/aranck/keymaps/default/readme.md b/keyboards/handwired/aranck/keymaps/default/readme.md new file mode 100644 index 000000000000..ba7ddbdd3371 --- /dev/null +++ b/keyboards/handwired/aranck/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for Aranck diff --git a/keyboards/handwired/aranck/keymaps/turkishish/config.h b/keyboards/handwired/aranck/keymaps/turkishish/config.h new file mode 100644 index 000000000000..3e40ef4f6de9 --- /dev/null +++ b/keyboards/handwired/aranck/keymaps/turkishish/config.h @@ -0,0 +1,22 @@ +/* Copyright 2019 Arda Kilicdagi + * + * 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 . + */ + +#pragma once + +// place overrides here + +#define RETRO_TAPPING +#define PERMISSIVE_HOLD \ No newline at end of file diff --git a/keyboards/handwired/aranck/keymaps/turkishish/keymap.c b/keyboards/handwired/aranck/keymaps/turkishish/keymap.c new file mode 100644 index 000000000000..195b8aaad053 --- /dev/null +++ b/keyboards/handwired/aranck/keymaps/turkishish/keymap.c @@ -0,0 +1,225 @@ +/* Copyright 2019 Arda Kilicdagi + * + * 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 . + */ +#include QMK_KEYBOARD_H + + +enum aranck_layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST, + _SPACE, + _SODA, + _NUMPAD +}; + +//KC_NONUS_BSLASH (\|) is equivalent to ["é] key in Turkish keyboards. +//KC_GRV (~ `) is equivalent to [<>|] key in Turkish keyboards. +// KC_SCLN is Turkish s [şŞ] key +// KC_QUOT is Turkish i [iİ] key +// KC_COMM is Turkish o [öÖ] key +// KC_DOT is Turkish c [çÇ] key + +// Custom shortcuts specific to Turkish layout +#define CURLY_OPEN RALT(KC_7) +#define CURLY_CLOSE RALT(KC_0) +#define SQUARE_OPEN RALT(KC_8) +#define SQUARE_CLOSE RALT(KC_9) +#define DOLLAR_SIGN RALT(KC_4) +#define BACKSLASH RALT(KC_MINS) +#define VERTICAL_PIPE RALT(KC_EQL) +#define BACKTICK RALT(KC_BSLS) +#define TILDE RALT(KC_RBRC) +#define LOCKSCREEN LCTL(LSFT(KC_POWER)) // Screen Lock shortcut for OSX + +/* +// Unicode Turkish characters, in case it's needed +enum { + TR_C, // ç + TR_C_L, // Ç + TR_I, // ı + TR_I_L, // İ + TR_G, // ğ + TR_G_L, // Ğ + TR_S, // ş + TR_S_L, // Ş + TR_U, // ü + TR_U_L, // Ü + TR_O, // ö + TR_O_L, // Ö +}; + +// clang-format off +const uint32_t PROGMEM unicode_map[] = { + [TR_C] = 0x00c7, + [TR_C_L] = 0x00e7, + [TR_I] = 0x0130, + [TR_I_L] = 0x0131, + [TR_G] = 0x011e, + [TR_G_L] = 0x011f, + [TR_S] = 0x015e, + [TR_S_L] = 0x015f, + [TR_U] = 0x00dc, + [TR_U_L] = 0x00fc, + [TR_O] = 0x00d6, + [TR_O_L] = 0x00f6, +}; +// clang-format on +*/ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |NPdEsc| A | S | D | F | G | H | J | K | L | Ş | İ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |SftCps| Z | X | C | V | B | N | M | Ö | Ç | . |SftEtr| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Sda|<>| Ctrl | Alt | OS |Lowr|,| Space* |Rise|"| Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_aranck_mit( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + LT(_NUMPAD, KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + LSFT_T(KC_CAPS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_SFTENT /*KC_ENT*/, + LT(_SODA, KC_GRV), KC_LCTL, KC_LALT, KC_LGUI, LT(_LOWER, KC_BSLS), LT(_SPACE, KC_SPC), LT(_RAISE, KC_NONUS_BSLASH), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | > | ! | ' | ^ | + | % | & | / | ( | ) | = | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | ? | _ | Ğ | Ü | - | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | "$" | "{" | "}" | , | ">" | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | "[" | "]" | ' | " | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_aranck_mit( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LBRC, KC_RBRC, KC_EQL, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, DOLLAR_SIGN, CURLY_OPEN, CURLY_CLOSE, KC_BSLS, LSFT(KC_GRV), + _______, _______, _______, _______, _______, _______, _______, SQUARE_OPEN, SQUARE_CLOSE, LSFT(KC_2), KC_NONUS_BSLASH +), + + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | <>| | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | * | - | "\" | "|" | , | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | , | " | "~" | "`" | <>| | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_aranck_mit( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, BACKSLASH, VERTICAL_PIPE, KC_BSLS, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, TILDE, BACKTICK, KC_GRV, + _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Soda Layer + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | Up | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Left | Down |Right | | Mute | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Next | Vol- | Vol+ | Play | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | |Brght▼|Brght▲| + * `-----------------------------------------------------------------------------------' + */ +[_SODA] = LAYOUT_aranck_mit( + _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_MUTE, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BRMD, KC_BRMU +), + +/* Space Layer (Space Bar Layer Tap) + * ,-----------------------------------------------------------------------------------. + * | |CMD+1 |CMD+2 |CMD+3 |CMD+4 |CMD+5 |CMD+6 |CMD+7 |CMD+8 |CMD+9 |CMD+0 |LCKOSX| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | Up | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Left | Down |Right | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | |Brght▼|Brght▲| + * `-----------------------------------------------------------------------------------' + */ +[_SPACE] = LAYOUT_aranck_mit( + _______, LGUI(KC_1), LGUI(KC_2), LGUI(KC_3), LGUI(KC_4), LGUI(KC_5), LGUI(KC_6), LGUI(KC_7), LGUI(KC_8), LGUI(KC_9), LGUI(KC_0), LOCKSCREEN, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BRMD, KC_BRMU +), + + +/* Numpad Layer + * KC_PDOT is comma on the Turkish layout ¯\_(ツ)_/¯ + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | 7 | 8 | 9 | - | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | Enter| 4 | 5 | 6 | + | * | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | 1 | 2 | 3 | + | / | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | 0 | 0 | . | , | = | + * `-----------------------------------------------------------------------------------' + */ +[_NUMPAD] = LAYOUT_aranck_mit( + _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PMNS, KC_BSPC, + _______, _______, _______, _______, _______, _______, KC_PENT, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_PAST, + _______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PPLS, KC_PSLS, + _______, _______, _______, _______, _______, _______, KC_P0, KC_P0, KC_SLSH, KC_PDOT, KC_PEQL +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset|EEPRom| | | | | | | | | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | |MUSmod|Aud on|Audoff| | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff| | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_aranck_mit( + _______, RESET, EEP_RST, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, + _______, _______, MU_MOD, AU_ON, AU_OFF, _______, _______, _______, _______, _______, _______, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + +// Enable the adjust layer when both lower and +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +void matrix_init_user(void) {} + +void matrix_scan_user(void) {} + +void led_set_user(uint8_t usb_led) {} diff --git a/keyboards/handwired/aranck/keymaps/turkishish/readme.md b/keyboards/handwired/aranck/keymaps/turkishish/readme.md new file mode 100644 index 000000000000..8998081c1f2b --- /dev/null +++ b/keyboards/handwired/aranck/keymaps/turkishish/readme.md @@ -0,0 +1 @@ +# The Turkishish keymap for Aranck diff --git a/keyboards/handwired/aranck/readme.md b/keyboards/handwired/aranck/readme.md new file mode 100644 index 000000000000..67089b49974c --- /dev/null +++ b/keyboards/handwired/aranck/readme.md @@ -0,0 +1,22 @@ +# Aranck + +![aranck](https://i.imgur.com/IWfovI2l.jpg) + +![aranck2](https://i.imgur.com/rrhEhQZl.jpg) + +A handwired 40% ortholinear keyboard. + +The story: https://imgur.com/a/4QI7ifJ + +Keyboard Maintainer: [Arda Kilicdagi](/~https://github.com/ardakilic) +Hardware Supported: Pro Micro + +Make example for this keyboard (after setting up your build environment): + + make handwired/aranck:default:flash + +You can flash the "turkishish" layout (which I'm currently using) like: + + make handwired/aranck:turkishish:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). \ No newline at end of file diff --git a/keyboards/handwired/aranck/rules.mk b/keyboards/handwired/aranck/rules.mk new file mode 100644 index 000000000000..b95b98a4c72d --- /dev/null +++ b/keyboards/handwired/aranck/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # 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 +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = yes # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) \ No newline at end of file From 1971f22285ad1b46be1ea41e99966bc10217ad9f Mon Sep 17 00:00:00 2001 From: Adam Perlman Date: Mon, 28 Oct 2019 14:10:25 -0400 Subject: [PATCH 196/316] Update split i2c docs for example of when pull-ups are required (#7143) --- docs/feature_split_keyboard.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/feature_split_keyboard.md b/docs/feature_split_keyboard.md index efc65a4c700a..affce3429348 100644 --- a/docs/feature_split_keyboard.md +++ b/docs/feature_split_keyboard.md @@ -47,7 +47,7 @@ The 3 wires of the TRS/TRRS cable need to connect GND, VCC, and D0 (aka PDO or p The 4 wires of the TRRS cable need to connect GND, VCC, and SCL and SDA (aka PD0/pin 3 and PD1/pin 2, respectively) between the two Pro Micros. -The pull-up resistors may be placed on either half. It is also possible to use 4 resistors and have the pull-ups in both halves, but this is unnecessary in simple use cases. +The pull-up resistors may be placed on either half. If you wish to use the halves independently, it is also possible to use 4 resistors and have the pull-ups in both halves. ![I2C wiring](https://i.imgur.com/Hbzhc6E.png) From 8bc90ee20c79e5166283cd2df738ea8ec63e4c69 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Mon, 28 Oct 2019 19:05:27 +0000 Subject: [PATCH 197/316] Fix travis build failures for namecard2x4 (#7189) --- keyboards/namecard2x4/rules.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/keyboards/namecard2x4/rules.mk b/keyboards/namecard2x4/rules.mk index d9eff798ced3..4c4f8c9ee07e 100644 --- a/keyboards/namecard2x4/rules.mk +++ b/keyboards/namecard2x4/rules.mk @@ -33,3 +33,5 @@ HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) #UNICODEMAP_ENABLE = yes # for emoji user #RGBLIGHT_ENABLE = yes # uncomment if you want addressable led strips + +DEFAULT_FOLDER = namecard2x4/rev2 From 6d7c6d4fd6a4af8e0355b5d10c68db3274c1a7f8 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Tue, 29 Oct 2019 06:08:00 +1100 Subject: [PATCH 198/316] Cleanup rules.mk for 32U4 keyboards, R-S (#7182) --- keyboards/rabbit/rabbit68/rules.mk | 4 +- keyboards/redox/keymaps/default/rules.mk | 2 - keyboards/redox/rev1/rules.mk | 1 - keyboards/redox/rules.mk | 54 ++---------- keyboards/redox_w/rules.mk | 64 ++++---------- keyboards/redscarf_iiplus/verb/rules.mk | 51 +----------- keyboards/redscarf_iiplus/verc/rules.mk | 53 +----------- keyboards/reviung34/rules.mk | 16 +--- keyboards/reviung39/keymaps/default/rules.mk | 2 +- .../reviung39/keymaps/default_s/rules.mk | 2 +- keyboards/reviung39/rules.mk | 15 +--- keyboards/rgbkb/sol/keymaps/default/rules.mk | 5 -- keyboards/rgbkb/sol/rules.mk | 21 ++--- keyboards/rgbkb/zen/rules.mk | 18 ++-- keyboards/rgbkb/zygomorph/rules.mk | 47 ++--------- .../runner3680/3x6/keymaps/default/rules.mk | 1 - .../runner3680/3x7/keymaps/default/rules.mk | 1 - .../runner3680/3x8/keymaps/default/rules.mk | 1 - .../runner3680/4x6/keymaps/default/rules.mk | 1 - .../runner3680/4x7/keymaps/default/rules.mk | 1 - .../runner3680/4x8/keymaps/default/rules.mk | 1 - .../runner3680/5x6/keymaps/default/rules.mk | 1 - .../runner3680/5x7/keymaps/default/rules.mk | 1 - keyboards/runner3680/5x8/keymaps/JIS/rules.mk | 1 - .../runner3680/5x8/keymaps/default/rules.mk | 1 - keyboards/runner3680/rules.mk | 27 +----- keyboards/s7_elephant/rules.mk | 43 ++-------- keyboards/scarletbandana/rules.mk | 52 ++---------- keyboards/sck/osa/rules.mk | 4 - keyboards/scythe/rules.mk | 51 +----------- keyboards/sentraq/number_pad/rules.mk | 51 +----------- keyboards/sentraq/s60_x/default/rules.mk | 53 ++---------- keyboards/sentraq/s60_x/rgb/rules.mk | 53 ++---------- keyboards/sentraq/s65_plus/rules.mk | 56 ++----------- keyboards/sentraq/s65_x/rules.mk | 54 ++---------- keyboards/shiro/rules.mk | 51 +----------- keyboards/signum/3_0/elitec/rules.mk | 50 ++--------- keyboards/singa/keymaps/default/rules.mk | 0 keyboards/singa/keymaps/test/rules.mk | 0 keyboards/sirius/unigo66/rules.mk | 17 ++-- keyboards/sixkeyboard/rules.mk | 4 +- keyboards/smk60/rules.mk | 59 ++----------- keyboards/snagpad/rules.mk | 42 +--------- keyboards/snampad/rules.mk | 51 +----------- keyboards/southpole/rules.mk | 50 +++-------- keyboards/spacetime/rules.mk | 51 +----------- keyboards/speedo/rules.mk | 54 ++---------- keyboards/standaside/rules.mk | 56 ++----------- keyboards/stella/rules.mk | 7 +- keyboards/suihankey/alpha/rules.mk | 83 +------------------ keyboards/suihankey/rev1/rules.mk | 83 +------------------ keyboards/suihankey/rules.mk | 51 +----------- keyboards/suihankey/split/alpha/rules.mk | 83 +------------------ keyboards/suihankey/split/rev1/rules.mk | 83 +------------------ keyboards/sx60/keymaps/default/rules.mk | 0 keyboards/sx60/rules.mk | 56 +++---------- 56 files changed, 203 insertions(+), 1537 deletions(-) delete mode 100644 keyboards/redox/keymaps/default/rules.mk delete mode 100644 keyboards/runner3680/3x6/keymaps/default/rules.mk delete mode 100644 keyboards/runner3680/3x7/keymaps/default/rules.mk delete mode 100644 keyboards/runner3680/3x8/keymaps/default/rules.mk delete mode 100644 keyboards/runner3680/4x6/keymaps/default/rules.mk delete mode 100644 keyboards/runner3680/4x7/keymaps/default/rules.mk delete mode 100644 keyboards/runner3680/4x8/keymaps/default/rules.mk delete mode 100644 keyboards/runner3680/5x6/keymaps/default/rules.mk delete mode 100644 keyboards/runner3680/5x7/keymaps/default/rules.mk delete mode 100644 keyboards/runner3680/5x8/keymaps/JIS/rules.mk delete mode 100644 keyboards/runner3680/5x8/keymaps/default/rules.mk delete mode 100644 keyboards/singa/keymaps/default/rules.mk delete mode 100644 keyboards/singa/keymaps/test/rules.mk delete mode 100644 keyboards/sx60/keymaps/default/rules.mk diff --git a/keyboards/rabbit/rabbit68/rules.mk b/keyboards/rabbit/rabbit68/rules.mk index cd08d2319a53..1bf19e4e1995 100644 --- a/keyboards/rabbit/rabbit68/rules.mk +++ b/keyboards/rabbit/rabbit68/rules.mk @@ -1,14 +1,14 @@ # MCU name MCU = atmega32u4 - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = halfkay # Build Options diff --git a/keyboards/redox/keymaps/default/rules.mk b/keyboards/redox/keymaps/default/rules.mk deleted file mode 100644 index a81250cdf6d9..000000000000 --- a/keyboards/redox/keymaps/default/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -RGBLIGHT_ENABLE = yes - diff --git a/keyboards/redox/rev1/rules.mk b/keyboards/redox/rev1/rules.mk index f845616741c2..e69de29bb2d1 100644 --- a/keyboards/redox/rev1/rules.mk +++ b/keyboards/redox/rev1/rules.mk @@ -1 +0,0 @@ -BACKLIGHT_ENABLE = no \ No newline at end of file diff --git a/keyboards/redox/rules.mk b/keyboards/redox/rules.mk index 81c0694e09ae..165008f1f047 100644 --- a/keyboards/redox/rules.mk +++ b/keyboards/redox/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina # Build Options # change yes to no to disable diff --git a/keyboards/redox_w/rules.mk b/keyboards/redox_w/rules.mk index eb4bad194c47..22e8cb6b310e 100644 --- a/keyboards/redox_w/rules.mk +++ b/keyboards/redox_w/rules.mk @@ -1,57 +1,16 @@ - -OPT_DEFS += -DREDOX_W_PROMICRO -INTERPHASE_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \ - avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB) - -# # project specific files -SRC = matrix.c - - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # comment out to disable the options. # @@ -71,5 +30,12 @@ UNICODE_ENABLE = YES # Unicode USB = /dev/ttyACM0 +OPT_DEFS += -DREDOX_W_PROMICRO +INTERPHASE_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \ + avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB) + +# # project specific files +SRC = matrix.c + # upload: build # $(REDOX_W_UPLOAD_COMMAND) diff --git a/keyboards/redscarf_iiplus/verb/rules.mk b/keyboards/redscarf_iiplus/verb/rules.mk index 6ee7fe4383d6..169e69d39f18 100755 --- a/keyboards/redscarf_iiplus/verb/rules.mk +++ b/keyboards/redscarf_iiplus/verb/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = qmk-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/redscarf_iiplus/verc/rules.mk b/keyboards/redscarf_iiplus/verc/rules.mk index 5a7706b4876e..e62b78dc6510 100755 --- a/keyboards/redscarf_iiplus/verc/rules.mk +++ b/keyboards/redscarf_iiplus/verc/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = qmk-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # @@ -82,4 +35,4 @@ HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) CUSTOM_MATRIX = yes SRC += matrix.c -LAYOUTS = 65_ansi \ No newline at end of file +LAYOUTS = 65_ansi diff --git a/keyboards/reviung34/rules.mk b/keyboards/reviung34/rules.mk index 7c3d5f39171d..67f2386e0367 100755 --- a/keyboards/reviung34/rules.mk +++ b/keyboards/reviung34/rules.mk @@ -1,27 +1,16 @@ # MCU name MCU = atmega32u4 - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # @@ -42,4 +31,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) - diff --git a/keyboards/reviung39/keymaps/default/rules.mk b/keyboards/reviung39/keymaps/default/rules.mk index 7ad666d1a383..1e3cebb14515 100644 --- a/keyboards/reviung39/keymaps/default/rules.mk +++ b/keyboards/reviung39/keymaps/default/rules.mk @@ -1 +1 @@ -RGBLIGHT_ENABLE = yes \ No newline at end of file +RGBLIGHT_ENABLE = yes diff --git a/keyboards/reviung39/keymaps/default_s/rules.mk b/keyboards/reviung39/keymaps/default_s/rules.mk index 7ad666d1a383..1e3cebb14515 100644 --- a/keyboards/reviung39/keymaps/default_s/rules.mk +++ b/keyboards/reviung39/keymaps/default_s/rules.mk @@ -1 +1 @@ -RGBLIGHT_ENABLE = yes \ No newline at end of file +RGBLIGHT_ENABLE = yes diff --git a/keyboards/reviung39/rules.mk b/keyboards/reviung39/rules.mk index 965556736c3e..67f2386e0367 100644 --- a/keyboards/reviung39/rules.mk +++ b/keyboards/reviung39/rules.mk @@ -1,27 +1,16 @@ # MCU name MCU = atmega32u4 - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/rgbkb/sol/keymaps/default/rules.mk b/keyboards/rgbkb/sol/keymaps/default/rules.mk index 203d59c6a78a..269cf20273ed 100644 --- a/keyboards/rgbkb/sol/keymaps/default/rules.mk +++ b/keyboards/rgbkb/sol/keymaps/default/rules.mk @@ -7,10 +7,5 @@ # To keep things clean and tidy, as well as make upgrades easier, only place overrides from the defaults in this file. - - - # Do not edit past here - include keyboards/$(KEYBOARD)/post_rules.mk - diff --git a/keyboards/rgbkb/sol/rules.mk b/keyboards/rgbkb/sol/rules.mk index 3be8f0b22914..e3d3953df624 100644 --- a/keyboards/rgbkb/sol/rules.mk +++ b/keyboards/rgbkb/sol/rules.mk @@ -1,21 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -F_CPU = 16000000 - -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -F_USB = $(F_CPU) - -# Bootloader +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = qmk-dfu -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Custom local font file OPT_DEFS += -DOLED_FONT_H=\"common/glcdfont.c\" diff --git a/keyboards/rgbkb/zen/rules.mk b/keyboards/rgbkb/zen/rules.mk index 7473b61cfc59..4193d23e01ab 100644 --- a/keyboards/rgbkb/zen/rules.mk +++ b/keyboards/rgbkb/zen/rules.mk @@ -1,11 +1,15 @@ -# Pro Micro or Elite-C -# Automagically converted to Proton-C +# MCU name MCU = atmega32u4 -F_CPU = 16000000 -ARCH = AVR8 -F_USB = $(F_CPU) -BOOTLOADER = dfu -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina ifeq ($(strip $(CTPC)), yes) CONVERT_TO_PROTON_C=yes diff --git a/keyboards/rgbkb/zygomorph/rules.mk b/keyboards/rgbkb/zygomorph/rules.mk index 9bafc7b1d63c..955221fdf232 100644 --- a/keyboards/rgbkb/zygomorph/rules.mk +++ b/keyboards/rgbkb/zygomorph/rules.mk @@ -1,47 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = qmk-dfu -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change yes to no to disable # diff --git a/keyboards/runner3680/3x6/keymaps/default/rules.mk b/keyboards/runner3680/3x6/keymaps/default/rules.mk deleted file mode 100644 index 9104ce244c31..000000000000 --- a/keyboards/runner3680/3x6/keymaps/default/rules.mk +++ /dev/null @@ -1 +0,0 @@ -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. diff --git a/keyboards/runner3680/3x7/keymaps/default/rules.mk b/keyboards/runner3680/3x7/keymaps/default/rules.mk deleted file mode 100644 index 9104ce244c31..000000000000 --- a/keyboards/runner3680/3x7/keymaps/default/rules.mk +++ /dev/null @@ -1 +0,0 @@ -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. diff --git a/keyboards/runner3680/3x8/keymaps/default/rules.mk b/keyboards/runner3680/3x8/keymaps/default/rules.mk deleted file mode 100644 index 9104ce244c31..000000000000 --- a/keyboards/runner3680/3x8/keymaps/default/rules.mk +++ /dev/null @@ -1 +0,0 @@ -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. diff --git a/keyboards/runner3680/4x6/keymaps/default/rules.mk b/keyboards/runner3680/4x6/keymaps/default/rules.mk deleted file mode 100644 index 9104ce244c31..000000000000 --- a/keyboards/runner3680/4x6/keymaps/default/rules.mk +++ /dev/null @@ -1 +0,0 @@ -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. diff --git a/keyboards/runner3680/4x7/keymaps/default/rules.mk b/keyboards/runner3680/4x7/keymaps/default/rules.mk deleted file mode 100644 index 9104ce244c31..000000000000 --- a/keyboards/runner3680/4x7/keymaps/default/rules.mk +++ /dev/null @@ -1 +0,0 @@ -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. diff --git a/keyboards/runner3680/4x8/keymaps/default/rules.mk b/keyboards/runner3680/4x8/keymaps/default/rules.mk deleted file mode 100644 index 9104ce244c31..000000000000 --- a/keyboards/runner3680/4x8/keymaps/default/rules.mk +++ /dev/null @@ -1 +0,0 @@ -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. diff --git a/keyboards/runner3680/5x6/keymaps/default/rules.mk b/keyboards/runner3680/5x6/keymaps/default/rules.mk deleted file mode 100644 index 9104ce244c31..000000000000 --- a/keyboards/runner3680/5x6/keymaps/default/rules.mk +++ /dev/null @@ -1 +0,0 @@ -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. diff --git a/keyboards/runner3680/5x7/keymaps/default/rules.mk b/keyboards/runner3680/5x7/keymaps/default/rules.mk deleted file mode 100644 index 9104ce244c31..000000000000 --- a/keyboards/runner3680/5x7/keymaps/default/rules.mk +++ /dev/null @@ -1 +0,0 @@ -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. diff --git a/keyboards/runner3680/5x8/keymaps/JIS/rules.mk b/keyboards/runner3680/5x8/keymaps/JIS/rules.mk deleted file mode 100644 index 9104ce244c31..000000000000 --- a/keyboards/runner3680/5x8/keymaps/JIS/rules.mk +++ /dev/null @@ -1 +0,0 @@ -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. diff --git a/keyboards/runner3680/5x8/keymaps/default/rules.mk b/keyboards/runner3680/5x8/keymaps/default/rules.mk deleted file mode 100644 index 9104ce244c31..000000000000 --- a/keyboards/runner3680/5x8/keymaps/default/rules.mk +++ /dev/null @@ -1 +0,0 @@ -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. diff --git a/keyboards/runner3680/rules.mk b/keyboards/runner3680/rules.mk index 624dd2e507bd..3a0b190aefde 100644 --- a/keyboards/runner3680/rules.mk +++ b/keyboards/runner3680/rules.mk @@ -1,39 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -F_CPU = 16000000 - -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/s7_elephant/rules.mk b/keyboards/s7_elephant/rules.mk index 7f0ad6d3c572..6cbcb56aea5f 100644 --- a/keyboards/s7_elephant/rules.mk +++ b/keyboards/s7_elephant/rules.mk @@ -1,41 +1,14 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu # Build Options diff --git a/keyboards/scarletbandana/rules.mk b/keyboards/scarletbandana/rules.mk index de3ac9518075..a3461f314215 100644 --- a/keyboards/scarletbandana/rules.mk +++ b/keyboards/scarletbandana/rules.mk @@ -1,52 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - # Build Options # change yes to no to disable # diff --git a/keyboards/sck/osa/rules.mk b/keyboards/sck/osa/rules.mk index 3538c25babd2..2d4a95c9e933 100644 --- a/keyboards/sck/osa/rules.mk +++ b/keyboards/sck/osa/rules.mk @@ -1,8 +1,6 @@ # MCU name MCU = atmega32u4 - - # Bootloader selection # Teensy halfkay # Pro Micro caterina @@ -13,8 +11,6 @@ MCU = atmega32u4 # ATmega328P USBasp BOOTLOADER = atmel-dfu - - # Build Options # change yes to no to disable # diff --git a/keyboards/scythe/rules.mk b/keyboards/scythe/rules.mk index f0beca71eca8..54f2f7a52920 100644 --- a/keyboards/scythe/rules.mk +++ b/keyboards/scythe/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/sentraq/number_pad/rules.mk b/keyboards/sentraq/number_pad/rules.mk index 8678b7f886ec..8df6c4c7c5be 100644 --- a/keyboards/sentraq/number_pad/rules.mk +++ b/keyboards/sentraq/number_pad/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/sentraq/s60_x/default/rules.mk b/keyboards/sentraq/s60_x/default/rules.mk index b3fb861799e2..8b3674cd81c7 100644 --- a/keyboards/sentraq/s60_x/default/rules.mk +++ b/keyboards/sentraq/s60_x/default/rules.mk @@ -1,52 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - # Build Options # change yes to no to disable # @@ -61,5 +25,4 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 - LAYOUTS = 60_ansi 60_ansi_split_bs_rshift 60_iso 60_hhkb diff --git a/keyboards/sentraq/s60_x/rgb/rules.mk b/keyboards/sentraq/s60_x/rgb/rules.mk index 39bbc5d280f6..efd66a1ba1dc 100644 --- a/keyboards/sentraq/s60_x/rgb/rules.mk +++ b/keyboards/sentraq/s60_x/rgb/rules.mk @@ -1,52 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - # Build Options # change yes to no to disable # @@ -66,5 +30,4 @@ NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable RGB light - LAYOUTS = 60_ansi 60_ansi_split_bs_rshift 60_iso 60_hhkb diff --git a/keyboards/sentraq/s65_plus/rules.mk b/keyboards/sentraq/s65_plus/rules.mk index 08dd2d93c876..f4da10aa1667 100644 --- a/keyboards/sentraq/s65_plus/rules.mk +++ b/keyboards/sentraq/s65_plus/rules.mk @@ -1,53 +1,15 @@ - - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable diff --git a/keyboards/sentraq/s65_x/rules.mk b/keyboards/sentraq/s65_x/rules.mk index 6ab268deec16..a6a2319c2373 100644 --- a/keyboards/sentraq/s65_x/rules.mk +++ b/keyboards/sentraq/s65_x/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable diff --git a/keyboards/shiro/rules.mk b/keyboards/shiro/rules.mk index 3ea1516fc080..03c1bc8f868f 100644 --- a/keyboards/shiro/rules.mk +++ b/keyboards/shiro/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/signum/3_0/elitec/rules.mk b/keyboards/signum/3_0/elitec/rules.mk index 6a68eb443bc8..6393e0f93fbd 100644 --- a/keyboards/signum/3_0/elitec/rules.mk +++ b/keyboards/signum/3_0/elitec/rules.mk @@ -1,48 +1,14 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - -# Boot Section Size in *bytes* -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu # Build Options diff --git a/keyboards/singa/keymaps/default/rules.mk b/keyboards/singa/keymaps/default/rules.mk deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/keyboards/singa/keymaps/test/rules.mk b/keyboards/singa/keymaps/test/rules.mk deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/keyboards/sirius/unigo66/rules.mk b/keyboards/sirius/unigo66/rules.mk index c35487b18c3e..53cf934c4061 100644 --- a/keyboards/sirius/unigo66/rules.mk +++ b/keyboards/sirius/unigo66/rules.mk @@ -1,17 +1,16 @@ # MCU name MCU = atmega32u4 -F_CPU = 16000000 - -ARCH = AVR8 - -F_USB = $(F_CPU) - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu -# Interrupt driven control endpoint task -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # comment out to disable the options. # diff --git a/keyboards/sixkeyboard/rules.mk b/keyboards/sixkeyboard/rules.mk index 2befe17d8fee..5b89ff4e6251 100644 --- a/keyboards/sixkeyboard/rules.mk +++ b/keyboards/sixkeyboard/rules.mk @@ -1,5 +1,3 @@ -SRC = matrix.c - # MCU name MCU = atmega16u2 @@ -29,3 +27,5 @@ AUDIO_ENABLE = no UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID CUSTOM_MATRIX = yes + +SRC = matrix.c diff --git a/keyboards/smk60/rules.mk b/keyboards/smk60/rules.mk index 751dbec84112..cbb1c8b74b08 100644 --- a/keyboards/smk60/rules.mk +++ b/keyboards/smk60/rules.mk @@ -1,58 +1,15 @@ # MCU name MCU = atmega32u4 -# project specific files -#SRC = - -# 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 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu -#OPT_DEFS += -DBOOTLOADER_SIZE=4096 - -# Do not put the microcontroller into power saving mode -# when we get USB suspend event. We want it to keep updating -# backlight effects. -#OPT_DEFS += -DNO_SUSPEND_POWER_DOWN # Build Options # change yes to no to disable diff --git a/keyboards/snagpad/rules.mk b/keyboards/snagpad/rules.mk index 624ed262ec77..9256eaed120c 100644 --- a/keyboards/snagpad/rules.mk +++ b/keyboards/snagpad/rules.mk @@ -1,54 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Boot Section Size in *bytes* -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # comment out to disable the options. # diff --git a/keyboards/snampad/rules.mk b/keyboards/snampad/rules.mk index ec3208fd0e8f..1a1fbe6bc5e6 100644 --- a/keyboards/snampad/rules.mk +++ b/keyboards/snampad/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/southpole/rules.mk b/keyboards/southpole/rules.mk index 356b75bb6cba..d6b65e96091e 100644 --- a/keyboards/southpole/rules.mk +++ b/keyboards/southpole/rules.mk @@ -1,45 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = halfkay # Build Options # comment out to disable the options. @@ -53,4 +23,4 @@ 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 = no # Enable keyboard backlight functionality #AUDIO_ENABLE = no -RGBLIGHT_ENABLE = no \ No newline at end of file +RGBLIGHT_ENABLE = no diff --git a/keyboards/spacetime/rules.mk b/keyboards/spacetime/rules.mk index 62e8f9955e75..aa1a8892597e 100644 --- a/keyboards/spacetime/rules.mk +++ b/keyboards/spacetime/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/speedo/rules.mk b/keyboards/speedo/rules.mk index 6cba6b6b8696..4295e2ad7ec1 100644 --- a/keyboards/speedo/rules.mk +++ b/keyboards/speedo/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = halfkay # Build Options # change yes to no to disable diff --git a/keyboards/standaside/rules.mk b/keyboards/standaside/rules.mk index a7ebc21fa484..993f0acdc0e7 100644 --- a/keyboards/standaside/rules.mk +++ b/keyboards/standaside/rules.mk @@ -1,53 +1,14 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel_dfu # Build Options @@ -70,4 +31,3 @@ AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) RGBLIGHT_ENABLE = yes # Enable RGB underlighting support - diff --git a/keyboards/stella/rules.mk b/keyboards/stella/rules.mk index 2618abf4f2f9..b6b8f884178e 100644 --- a/keyboards/stella/rules.mk +++ b/keyboards/stella/rules.mk @@ -1,17 +1,16 @@ # MCU name MCU = atmega32u4 - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - # Build Options # change yes to no to disable # @@ -34,4 +33,4 @@ FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) # Supported layouts -LAYOUTS = tkl_ansi tkl_iso \ No newline at end of file +LAYOUTS = tkl_ansi tkl_iso diff --git a/keyboards/suihankey/alpha/rules.mk b/keyboards/suihankey/alpha/rules.mk index d4580058ec2c..1e3cebb14515 100644 --- a/keyboards/suihankey/alpha/rules.mk +++ b/keyboards/suihankey/alpha/rules.mk @@ -1,82 +1 @@ -# MCU name -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# atmega32a bootloadHID -BOOTLOADER = atmel-dfu - - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = no # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 -FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) -OLED_DRIVER_ENABLE = yes -SPLIT_KEYBOARD = no +RGBLIGHT_ENABLE = yes diff --git a/keyboards/suihankey/rev1/rules.mk b/keyboards/suihankey/rev1/rules.mk index d4580058ec2c..1e3cebb14515 100644 --- a/keyboards/suihankey/rev1/rules.mk +++ b/keyboards/suihankey/rev1/rules.mk @@ -1,82 +1 @@ -# MCU name -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# atmega32a bootloadHID -BOOTLOADER = atmel-dfu - - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = no # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 -FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) -OLED_DRIVER_ENABLE = yes -SPLIT_KEYBOARD = no +RGBLIGHT_ENABLE = yes diff --git a/keyboards/suihankey/rules.mk b/keyboards/suihankey/rules.mk index dbba5b93c744..d4c2e54b13fa 100644 --- a/keyboards/suihankey/rules.mk +++ b/keyboards/suihankey/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/suihankey/split/alpha/rules.mk b/keyboards/suihankey/split/alpha/rules.mk index 974450a692f2..1e3cebb14515 100644 --- a/keyboards/suihankey/split/alpha/rules.mk +++ b/keyboards/suihankey/split/alpha/rules.mk @@ -1,82 +1 @@ -# MCU name -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# atmega32a bootloadHID -BOOTLOADER = atmel-dfu - - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = no # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 -FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) -OLED_DRIVER_ENABLE = no -SPLIT_KEYBOARD = yes +RGBLIGHT_ENABLE = yes diff --git a/keyboards/suihankey/split/rev1/rules.mk b/keyboards/suihankey/split/rev1/rules.mk index 974450a692f2..1e3cebb14515 100644 --- a/keyboards/suihankey/split/rev1/rules.mk +++ b/keyboards/suihankey/split/rev1/rules.mk @@ -1,82 +1 @@ -# MCU name -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# atmega32a bootloadHID -BOOTLOADER = atmel-dfu - - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = no # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 -FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) -OLED_DRIVER_ENABLE = no -SPLIT_KEYBOARD = yes +RGBLIGHT_ENABLE = yes diff --git a/keyboards/sx60/keymaps/default/rules.mk b/keyboards/sx60/keymaps/default/rules.mk deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/keyboards/sx60/rules.mk b/keyboards/sx60/rules.mk index 0381293cebb0..4c711dc880ce 100755 --- a/keyboards/sx60/rules.mk +++ b/keyboards/sx60/rules.mk @@ -1,49 +1,15 @@ -# # project specific files -SRC = twimaster.c \ - matrix.c - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. @@ -59,3 +25,7 @@ BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality AUDIO_ENABLE ?= no RGBLIGHT_ENABLE ?= no CUSTOM_MATRIX ?= yes + +# project specific files +SRC = twimaster.c \ + matrix.c From 917ab71c52111c5ca89382eba74e08e616264d59 Mon Sep 17 00:00:00 2001 From: Yadunand Prem Date: Tue, 29 Oct 2019 09:13:07 +1100 Subject: [PATCH 199/316] Clean macos install script (#7186) --- util/macos_install.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/util/macos_install.sh b/util/macos_install.sh index d9ec50a7e293..c5c27d167082 100755 --- a/util/macos_install.sh +++ b/util/macos_install.sh @@ -2,20 +2,20 @@ util_dir=$(dirname "$0") -if ! brew --version 2>&1 > /dev/null; then +if ! brew --version >/dev/null 2>&1; then echo "Error! Homebrew not installed or broken!" echo -n "Would you like to install homebrew now? [y/n] " - while read ANSWER; do + while read -r ANSWER; do case $ANSWER in - y|Y) - /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" - break + y | Y) + /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + break ;; - n|N) - exit 1 + n | N) + exit 1 ;; - *) - echo -n "Would you like to install homebrew now? [y/n] " + *) + echo -n "Would you like to install homebrew now? [y/n] " ;; esac done @@ -26,4 +26,4 @@ brew tap PX4/homebrew-px4 brew update brew install avr-gcc@8 gcc-arm-none-eabi dfu-programmer avrdude clang-format dfu-util python3 brew link --force avr-gcc@8 -pip3 install -r ${util_dir}/../requirements.txt +pip3 install -r "${util_dir}/../requirements.txt" From 8ab7f1f39e715c824cc0e1391aa9a469b2a18438 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Tue, 29 Oct 2019 09:54:05 +1100 Subject: [PATCH 200/316] Fix formatting for sendstring LUTs (#7176) --- quantum/keymap_extras/sendstring_belgian.h | 71 ++++++++++++++++------ quantum/keymap_extras/sendstring_bepo.h | 71 ++++++++++++++++------ quantum/keymap_extras/sendstring_colemak.h | 31 +++++----- quantum/keymap_extras/sendstring_dvorak.h | 31 +++++----- quantum/keymap_extras/sendstring_french.h | 71 ++++++++++++++++------ quantum/keymap_extras/sendstring_german.h | 71 ++++++++++++++++------ quantum/keymap_extras/sendstring_jis.h | 51 +++++++++++----- quantum/keymap_extras/sendstring_norman.h | 31 +++++----- quantum/keymap_extras/sendstring_spanish.h | 71 ++++++++++++++++------ quantum/keymap_extras/sendstring_uk.h | 51 +++++++++++----- quantum/keymap_extras/sendstring_workman.h | 31 +++++----- 11 files changed, 403 insertions(+), 178 deletions(-) diff --git a/quantum/keymap_extras/sendstring_belgian.h b/quantum/keymap_extras/sendstring_belgian.h index d12c1890907e..ca0edfb683cc 100644 --- a/quantum/keymap_extras/sendstring_belgian.h +++ b/quantum/keymap_extras/sendstring_belgian.h @@ -20,45 +20,80 @@ #include "keymap_belgian.h" -const bool ascii_to_shift_lut[128] PROGMEM = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// clang-format off - 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; +const bool ascii_to_shift_lut[128] PROGMEM = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, -const bool ascii_to_altgr_lut[128] PROGMEM = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 0, 0, + 0, 0, 1, 1, 0, 0, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 0, 0, 0, 0, 1, 1, + 0, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 0, 0, 0, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0 +}; - 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0}; +const bool ascii_to_altgr_lut[128] PROGMEM = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + + 0, 0, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 0, + 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 0 +}; const uint8_t ascii_to_keycode_lut[128] PROGMEM = { // NUL SOH STX ETX EOT ENQ ACK BEL XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, // BS TAB LF VT FF CR SO SI - KC_BSPC, KC_TAB, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_BSPC, KC_TAB, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, // DLE DC1 DC2 DC3 DC4 NAK SYN ETB XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, // CAN EM SUB ESC FS GS RS US - XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, // ! " # $ % & ' - KC_SPC, BE_EXLM, BE_QUOT, BE_QUOT, BE_DLR, BE_UGRV, BE_AMP, BE_APOS, + KC_SPC, BE_EXLM, BE_QUOT, BE_QUOT, BE_DLR, BE_UGRV, BE_AMP, BE_APOS, // ( ) * + , - . / - BE_LPRN, BE_RPRN, BE_DLR, BE_EQL, BE_COMM, BE_MINS, BE_SCLN, BE_COLN, + BE_LPRN, BE_RPRN, BE_DLR, BE_EQL, BE_COMM, BE_MINS, BE_SCLN, BE_COLN, // 0 1 2 3 4 5 6 7 - BE_AGRV, BE_AMP, BE_EACU, BE_QUOT, BE_APOS, BE_LPRN, BE_PARA, BE_EGRV, + BE_AGRV, BE_AMP, BE_EACU, BE_QUOT, BE_APOS, BE_LPRN, BE_PARA, BE_EGRV, // 8 9 : ; < = > ? - BE_EXLM, BE_CCED, BE_COLN, BE_SCLN, BE_LESS, BE_EQL, BE_LESS, BE_COMM, + BE_EXLM, BE_CCED, BE_COLN, BE_SCLN, BE_LESS, BE_EQL, BE_LESS, BE_COMM, // @ A B C D E F G - BE_EACU, BE_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, + BE_EACU, BE_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, // H I J K L M N O - KC_H, KC_I, KC_J, KC_K, KC_L, BE_M, KC_N, KC_O, + KC_H, KC_I, KC_J, KC_K, KC_L, BE_M, KC_N, KC_O, // P Q R S T U V W - KC_P, BE_Q, KC_R, KC_S, KC_T, KC_U, KC_V, BE_W, + KC_P, BE_Q, KC_R, KC_S, KC_T, KC_U, KC_V, BE_W, // X Y Z [ \ ] ^ _ - KC_X, KC_Y, BE_Z, BE_CIRC, BE_LESS, BE_DLR, BE_PARA, BE_MINS, + KC_X, KC_Y, BE_Z, BE_CIRC, BE_LESS, BE_DLR, BE_PARA, BE_MINS, // ` a b c d e f g - BE_MU, BE_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, + BE_MU, BE_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, // h i j k l m n o - KC_H, KC_I, KC_J, KC_K, KC_L, BE_M, KC_N, KC_O, + KC_H, KC_I, KC_J, KC_K, KC_L, BE_M, KC_N, KC_O, // p q r s t u v w - KC_P, BE_Q, KC_R, KC_S, KC_T, KC_U, KC_V, BE_W, + KC_P, BE_Q, KC_R, KC_S, KC_T, KC_U, KC_V, BE_W, // x y z { | } ~ DEL - KC_X, KC_Y, BE_Z, BE_CCED, BE_AMP, BE_AGRV, BE_EQL, KC_DEL}; + KC_X, KC_Y, BE_Z, BE_CCED, BE_AMP, BE_AGRV, BE_EQL, KC_DEL +}; diff --git a/quantum/keymap_extras/sendstring_bepo.h b/quantum/keymap_extras/sendstring_bepo.h index bad3c3f0c1cf..ca5f73d7ec31 100644 --- a/quantum/keymap_extras/sendstring_bepo.h +++ b/quantum/keymap_extras/sendstring_bepo.h @@ -20,45 +20,80 @@ #include "keymap_bepo.h" -const bool ascii_to_shift_lut[128] PROGMEM = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// clang-format off - 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; +const bool ascii_to_shift_lut[128] PROGMEM = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, -const bool ascii_to_altgr_lut[128] PROGMEM = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 0, 0, 0, 1, + 0, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0 +}; - 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0}; +const bool ascii_to_altgr_lut[128] PROGMEM = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + + 0, 0, 0, 0, 0, 0, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 1, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 0 +}; const uint8_t ascii_to_keycode_lut[128] PROGMEM = { // NUL SOH STX ETX EOT ENQ ACK BEL XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, // BS TAB LF VT FF CR SO SI - KC_BSPC, KC_TAB, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_BSPC, KC_TAB, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, // DLE DC1 DC2 DC3 DC4 NAK SYN ETB XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, // CAN EM SUB ESC FS GS RS US - XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, // ! " # $ % & ' - KC_SPC, BP_DCRC, BP_DQOT, BP_DLR, BP_DLR, BP_PERC, BP_P, BP_APOS, + KC_SPC, BP_DCRC, BP_DQOT, BP_DLR, BP_DLR, BP_PERC, BP_P, BP_APOS, // ( ) * + , - . / - BP_LPRN, BP_RPRN, BP_ASTR, BP_PLUS, BP_COMM, BP_MINS, BP_DOT, BP_SLSH, + BP_LPRN, BP_RPRN, BP_ASTR, BP_PLUS, BP_COMM, BP_MINS, BP_DOT, BP_SLSH, // 0 1 2 3 4 5 6 7 - BP_ASTR, BP_DQOT, BP_LGIL, BP_RGIL, BP_LPRN, BP_RPRN, BP_AT, BP_PLUS, + BP_ASTR, BP_DQOT, BP_LGIL, BP_RGIL, BP_LPRN, BP_RPRN, BP_AT, BP_PLUS, // 8 9 : ; < = > ? - BP_MINS, BP_SLSH, BP_DOT, BP_COMM, BP_LGIL, BP_EQL, BP_RGIL, BP_APOS, + BP_MINS, BP_SLSH, BP_DOT, BP_COMM, BP_LGIL, BP_EQL, BP_RGIL, BP_APOS, // @ A B C D E F G - BP_AT, BP_A, BP_B, BP_C, BP_D, BP_E, BP_F, BP_G, + BP_AT, BP_A, BP_B, BP_C, BP_D, BP_E, BP_F, BP_G, // H I J K L M N O - BP_H, BP_I, BP_J, BP_K, BP_L, BP_M, BP_N, BP_O, + BP_H, BP_I, BP_J, BP_K, BP_L, BP_M, BP_N, BP_O, // P Q R S T U V W - BP_P, BP_Q, BP_R, BP_S, BP_T, BP_U, BP_V, BP_W, + BP_P, BP_Q, BP_R, BP_S, BP_T, BP_U, BP_V, BP_W, // X Y Z [ \ ] ^ _ - BP_X, BP_Y, BP_Z, BP_LPRN, BP_AGRV, BP_RPRN, BP_AT, KC_SPC, + BP_X, BP_Y, BP_Z, BP_LPRN, BP_AGRV, BP_RPRN, BP_AT, KC_SPC, // ` a b c d e f g - BP_PERC, BP_A, BP_B, BP_C, BP_D, BP_E, BP_F, BP_G, + BP_PERC, BP_A, BP_B, BP_C, BP_D, BP_E, BP_F, BP_G, // h i j k l m n o - BP_H, BP_I, BP_J, BP_K, BP_L, BP_M, BP_N, BP_O, + BP_H, BP_I, BP_J, BP_K, BP_L, BP_M, BP_N, BP_O, // p q r s t u v w - BP_P, BP_Q, BP_R, BP_S, BP_T, BP_U, BP_V, BP_W, + BP_P, BP_Q, BP_R, BP_S, BP_T, BP_U, BP_V, BP_W, // x y z { | } ~ DEL - BP_X, BP_Y, BP_Z, BP_Y, BP_B, BP_X, BP_K, KC_DEL}; + BP_X, BP_Y, BP_Z, BP_Y, BP_B, BP_X, BP_K, KC_DEL +}; diff --git a/quantum/keymap_extras/sendstring_colemak.h b/quantum/keymap_extras/sendstring_colemak.h index 1c02b3b86a47..fddf4b590eb0 100644 --- a/quantum/keymap_extras/sendstring_colemak.h +++ b/quantum/keymap_extras/sendstring_colemak.h @@ -20,37 +20,40 @@ #include "keymap_colemak.h" +// clang-format off + const uint8_t ascii_to_keycode_lut[128] PROGMEM = { // NUL SOH STX ETX EOT ENQ ACK BEL XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, // BS TAB LF VT FF CR SO SI - KC_BSPC, KC_TAB, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_BSPC, KC_TAB, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, // DLE DC1 DC2 DC3 DC4 NAK SYN ETB XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, // CAN EM SUB ESC FS GS RS US - XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, // ! " # $ % & ' - KC_SPC, KC_1, KC_QUOT, KC_3, KC_4, KC_5, KC_7, KC_QUOT, + KC_SPC, KC_1, KC_QUOT, KC_3, KC_4, KC_5, KC_7, KC_QUOT, // ( ) * + , - . / - KC_9, KC_0, KC_8, KC_EQL, KC_COMM, KC_MINS, KC_DOT, KC_SLSH, + KC_9, KC_0, KC_8, KC_EQL, KC_COMM, KC_MINS, KC_DOT, KC_SLSH, // 0 1 2 3 4 5 6 7 - KC_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, + KC_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, // 8 9 : ; < = > ? - KC_8, KC_9, CM_SCLN, CM_SCLN, KC_COMM, KC_EQL, KC_DOT, KC_SLSH, + KC_8, KC_9, CM_SCLN, CM_SCLN, KC_COMM, KC_EQL, KC_DOT, KC_SLSH, // @ A B C D E F G - KC_2, CM_A, CM_B, CM_C, CM_D, CM_E, CM_F, CM_G, + KC_2, CM_A, CM_B, CM_C, CM_D, CM_E, CM_F, CM_G, // H I J K L M N O - CM_H, CM_I, CM_J, CM_K, CM_L, CM_M, CM_N, CM_O, + CM_H, CM_I, CM_J, CM_K, CM_L, CM_M, CM_N, CM_O, // P Q R S T U V W - CM_P, CM_Q, CM_R, CM_S, CM_T, CM_U, CM_V, CM_W, + CM_P, CM_Q, CM_R, CM_S, CM_T, CM_U, CM_V, CM_W, // X Y Z [ \ ] ^ _ - CM_X, CM_Y, CM_Z, KC_LBRC, KC_BSLS, KC_RBRC, KC_6, KC_MINS, + CM_X, CM_Y, CM_Z, KC_LBRC, KC_BSLS, KC_RBRC, KC_6, KC_MINS, // ` a b c d e f g - KC_GRV, CM_A, CM_B, CM_C, CM_D, CM_E, CM_F, CM_G, + KC_GRV, CM_A, CM_B, CM_C, CM_D, CM_E, CM_F, CM_G, // h i j k l m n o - CM_H, CM_I, CM_J, CM_K, CM_L, CM_M, CM_N, CM_O, + CM_H, CM_I, CM_J, CM_K, CM_L, CM_M, CM_N, CM_O, // p q r s t u v w - CM_P, CM_Q, CM_R, CM_S, CM_T, CM_U, CM_V, CM_W, + CM_P, CM_Q, CM_R, CM_S, CM_T, CM_U, CM_V, CM_W, // x y z { | } ~ DEL - CM_X, CM_Y, CM_Z, KC_LBRC, KC_BSLS, KC_RBRC, KC_GRV, KC_DEL}; + CM_X, CM_Y, CM_Z, KC_LBRC, KC_BSLS, KC_RBRC, KC_GRV, KC_DEL +}; diff --git a/quantum/keymap_extras/sendstring_dvorak.h b/quantum/keymap_extras/sendstring_dvorak.h index 3ddb00b11261..25e1d31423a7 100644 --- a/quantum/keymap_extras/sendstring_dvorak.h +++ b/quantum/keymap_extras/sendstring_dvorak.h @@ -20,37 +20,40 @@ #include "keymap_dvorak.h" +// clang-format off + const uint8_t ascii_to_keycode_lut[128] PROGMEM = { // NUL SOH STX ETX EOT ENQ ACK BEL XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, // BS TAB LF VT FF CR SO SI - KC_BSPC, KC_TAB, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_BSPC, KC_TAB, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, // DLE DC1 DC2 DC3 DC4 NAK SYN ETB XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, // CAN EM SUB ESC FS GS RS US - XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, // ! " # $ % & ' - KC_SPC, DV_1, DV_QUOT, DV_3, DV_4, DV_5, DV_7, DV_QUOT, + KC_SPC, DV_1, DV_QUOT, DV_3, DV_4, DV_5, DV_7, DV_QUOT, // ( ) * + , - . / - DV_9, DV_0, DV_8, DV_EQL, DV_COMM, DV_MINS, DV_DOT, DV_SLSH, + DV_9, DV_0, DV_8, DV_EQL, DV_COMM, DV_MINS, DV_DOT, DV_SLSH, // 0 1 2 3 4 5 6 7 - DV_0, DV_1, DV_2, DV_3, DV_4, DV_5, DV_6, DV_7, + DV_0, DV_1, DV_2, DV_3, DV_4, DV_5, DV_6, DV_7, // 8 9 : ; < = > ? - DV_8, DV_9, DV_SCLN, DV_SCLN, DV_COMM, DV_EQL, DV_DOT, DV_SLSH, + DV_8, DV_9, DV_SCLN, DV_SCLN, DV_COMM, DV_EQL, DV_DOT, DV_SLSH, // @ A B C D E F G - DV_2, DV_A, DV_B, DV_C, DV_D, DV_E, DV_F, DV_G, + DV_2, DV_A, DV_B, DV_C, DV_D, DV_E, DV_F, DV_G, // H I J K L M N O - DV_H, DV_I, DV_J, DV_K, DV_L, DV_M, DV_N, DV_O, + DV_H, DV_I, DV_J, DV_K, DV_L, DV_M, DV_N, DV_O, // P Q R S T U V W - DV_P, DV_Q, DV_R, DV_S, DV_T, DV_U, DV_V, DV_W, + DV_P, DV_Q, DV_R, DV_S, DV_T, DV_U, DV_V, DV_W, // X Y Z [ \ ] ^ _ - DV_X, DV_Y, DV_Z, DV_LBRC, DV_BSLS, DV_RBRC, DV_6, DV_MINS, + DV_X, DV_Y, DV_Z, DV_LBRC, DV_BSLS, DV_RBRC, DV_6, DV_MINS, // ` a b c d e f g - DV_GRV, DV_A, DV_B, DV_C, DV_D, DV_E, DV_F, DV_G, + DV_GRV, DV_A, DV_B, DV_C, DV_D, DV_E, DV_F, DV_G, // h i j k l m n o - DV_H, DV_I, DV_J, DV_K, DV_L, DV_M, DV_N, DV_O, + DV_H, DV_I, DV_J, DV_K, DV_L, DV_M, DV_N, DV_O, // p q r s t u v w - DV_P, DV_Q, DV_R, DV_S, DV_T, DV_U, DV_V, DV_W, + DV_P, DV_Q, DV_R, DV_S, DV_T, DV_U, DV_V, DV_W, // x y z { | } ~ DEL - DV_X, DV_Y, DV_Z, DV_LBRC, DV_BSLS, DV_RBRC, DV_GRV, KC_DEL}; + DV_X, DV_Y, DV_Z, DV_LBRC, DV_BSLS, DV_RBRC, DV_GRV, KC_DEL +}; diff --git a/quantum/keymap_extras/sendstring_french.h b/quantum/keymap_extras/sendstring_french.h index df72f9f5b891..966685ccca50 100644 --- a/quantum/keymap_extras/sendstring_french.h +++ b/quantum/keymap_extras/sendstring_french.h @@ -20,45 +20,80 @@ #include "keymap_french.h" -const bool ascii_to_shift_lut[128] PROGMEM = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// clang-format off - 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; +const bool ascii_to_shift_lut[128] PROGMEM = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, -const bool ascii_to_altgr_lut[128] PROGMEM = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 0, 0, + 0, 0, 0, 1, 0, 0, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 0, 0, 0, 0, 1, 1, + 0, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0 +}; - 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0}; +const bool ascii_to_altgr_lut[128] PROGMEM = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + + 0, 0, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 0, + 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 0 +}; const uint8_t ascii_to_keycode_lut[128] PROGMEM = { // NUL SOH STX ETX EOT ENQ ACK BEL XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, // BS TAB LF VT FF CR SO SI - KC_BSPC, KC_TAB, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_BSPC, KC_TAB, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, // DLE DC1 DC2 DC3 DC4 NAK SYN ETB XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, // CAN EM SUB ESC FS GS RS US - XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, // ! " # $ % & ' - KC_SPC, FR_EXLM, FR_QUOT, FR_QUOT, FR_DLR, FR_UGRV, FR_AMP, FR_APOS, + KC_SPC, FR_EXLM, FR_QUOT, FR_QUOT, FR_DLR, FR_UGRV, FR_AMP, FR_APOS, // ( ) * + , - . / - FR_LPRN, FR_RPRN, FR_ASTR, FR_EQL, FR_COMM, FR_MINS, FR_SCLN, FR_COLN, + FR_LPRN, FR_RPRN, FR_ASTR, FR_EQL, FR_COMM, FR_MINS, FR_SCLN, FR_COLN, // 0 1 2 3 4 5 6 7 - FR_AGRV, FR_AMP, FR_EACU, FR_QUOT, FR_APOS, FR_LPRN, FR_MINS, FR_EGRV, + FR_AGRV, FR_AMP, FR_EACU, FR_QUOT, FR_APOS, FR_LPRN, FR_MINS, FR_EGRV, // 8 9 : ; < = > ? - FR_CCED, FR_AGRV, FR_COLN, FR_SCLN, FR_LESS, FR_EQL, FR_LESS, FR_COMM, + FR_CCED, FR_AGRV, FR_COLN, FR_SCLN, FR_LESS, FR_EQL, FR_LESS, FR_COMM, // @ A B C D E F G - FR_AGRV, FR_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, + FR_AGRV, FR_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, // H I J K L M N O - KC_H, KC_I, KC_J, KC_K, KC_L, FR_M, KC_N, KC_O, + KC_H, KC_I, KC_J, KC_K, KC_L, FR_M, KC_N, KC_O, // P Q R S T U V W - KC_P, FR_Q, KC_R, KC_S, KC_T, KC_U, KC_V, FR_W, + KC_P, FR_Q, KC_R, KC_S, KC_T, KC_U, KC_V, FR_W, // X Y Z [ \ ] ^ _ - KC_X, KC_Y, FR_Z, FR_LPRN, FR_UNDS, FR_RPRN, FR_CCED, FR_UNDS, + KC_X, KC_Y, FR_Z, FR_LPRN, FR_UNDS, FR_RPRN, FR_CCED, FR_UNDS, // ` a b c d e f g - FR_EGRV, FR_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, + FR_EGRV, FR_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, // h i j k l m n o - KC_H, KC_I, KC_J, KC_K, KC_L, FR_M, KC_N, KC_O, + KC_H, KC_I, KC_J, KC_K, KC_L, FR_M, KC_N, KC_O, // p q r s t u v w - KC_P, FR_Q, KC_R, KC_S, KC_T, KC_U, KC_V, FR_W, + KC_P, FR_Q, KC_R, KC_S, KC_T, KC_U, KC_V, FR_W, // x y z { | } ~ DEL - KC_X, KC_Y, FR_Z, FR_APOS, FR_MINS, FR_EQL, FR_EACU, KC_DEL}; + KC_X, KC_Y, FR_Z, FR_APOS, FR_MINS, FR_EQL, FR_EACU, KC_DEL +}; diff --git a/quantum/keymap_extras/sendstring_german.h b/quantum/keymap_extras/sendstring_german.h index 6efb6df01d61..3f27a9b2cabe 100644 --- a/quantum/keymap_extras/sendstring_german.h +++ b/quantum/keymap_extras/sendstring_german.h @@ -20,45 +20,80 @@ #include "keymap_german.h" -const bool ascii_to_shift_lut[128] PROGMEM = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// clang-format off - 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; +const bool ascii_to_shift_lut[128] PROGMEM = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, -const bool ascii_to_altgr_lut[128] PROGMEM = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 0, 1, 1, 1, 1, + 1, 1, 1, 0, 0, 0, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1, 1, 0, 1, 1, 1, + 0, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 0, 0, 0, 0, 1, + 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0 +}; - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0}; +const bool ascii_to_altgr_lut[128] PROGMEM = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 0 +}; const uint8_t ascii_to_keycode_lut[128] PROGMEM = { // NUL SOH STX ETX EOT ENQ ACK BEL XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, // BS TAB LF VT FF CR SO SI - KC_BSPC, KC_TAB, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_BSPC, KC_TAB, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, // DLE DC1 DC2 DC3 DC4 NAK SYN ETB XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, // CAN EM SUB ESC FS GS RS US - XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, // ! " # $ % & ' - KC_SPC, DE_1, DE_2, DE_HASH, DE_4, DE_5, DE_6, DE_HASH, + KC_SPC, DE_1, DE_2, DE_HASH, DE_4, DE_5, DE_6, DE_HASH, // ( ) * + , - . / - DE_8, DE_9, DE_PLUS, DE_PLUS, DE_COMM, DE_MINS, DE_DOT, DE_7, + DE_8, DE_9, DE_PLUS, DE_PLUS, DE_COMM, DE_MINS, DE_DOT, DE_7, // 0 1 2 3 4 5 6 7 - DE_0, DE_1, DE_2, DE_3, DE_4, DE_5, DE_6, DE_7, + DE_0, DE_1, DE_2, DE_3, DE_4, DE_5, DE_6, DE_7, // 8 9 : ; < = > ? - DE_8, DE_9, DE_DOT, DE_COMM, DE_LESS, DE_0, DE_LESS, DE_SS, + DE_8, DE_9, DE_DOT, DE_COMM, DE_LESS, DE_0, DE_LESS, DE_SS, // @ A B C D E F G - DE_Q, DE_A, DE_B, DE_C, DE_D, DE_E, DE_F, DE_G, + DE_Q, DE_A, DE_B, DE_C, DE_D, DE_E, DE_F, DE_G, // H I J K L M N O - DE_H, DE_I, DE_J, DE_K, DE_L, DE_M, DE_N, DE_O, + DE_H, DE_I, DE_J, DE_K, DE_L, DE_M, DE_N, DE_O, // P Q R S T U V W - DE_P, DE_Q, DE_R, DE_S, DE_T, DE_U, DE_V, DE_W, + DE_P, DE_Q, DE_R, DE_S, DE_T, DE_U, DE_V, DE_W, // X Y Z [ \ ] ^ _ - DE_X, DE_Y, DE_Z, DE_8, DE_SS, DE_9, DE_CIRC, DE_MINS, + DE_X, DE_Y, DE_Z, DE_8, DE_SS, DE_9, DE_CIRC, DE_MINS, // ` a b c d e f g - DE_ACUT, DE_A, DE_B, DE_C, DE_D, DE_E, DE_F, DE_G, + DE_ACUT, DE_A, DE_B, DE_C, DE_D, DE_E, DE_F, DE_G, // h i j k l m n o - DE_H, DE_I, DE_J, DE_K, DE_L, DE_M, DE_N, DE_O, + DE_H, DE_I, DE_J, DE_K, DE_L, DE_M, DE_N, DE_O, // p q r s t u v w - DE_P, DE_Q, DE_R, DE_S, DE_T, DE_U, DE_V, DE_W, + DE_P, DE_Q, DE_R, DE_S, DE_T, DE_U, DE_V, DE_W, // x y z { | } ~ DEL - DE_X, DE_Y, DE_Z, DE_7, DE_LESS, DE_0, DE_PLUS, KC_DEL}; + DE_X, DE_Y, DE_Z, DE_7, DE_LESS, DE_0, DE_PLUS, KC_DEL +}; diff --git a/quantum/keymap_extras/sendstring_jis.h b/quantum/keymap_extras/sendstring_jis.h index d0e65e446bef..421ceb0438ed 100644 --- a/quantum/keymap_extras/sendstring_jis.h +++ b/quantum/keymap_extras/sendstring_jis.h @@ -20,41 +20,60 @@ #include "keymap_jp.h" -const bool ascii_to_shift_lut[128] PROGMEM = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// clang-format off - 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0}; +const bool ascii_to_shift_lut[128] PROGMEM = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + + 0, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 1, 1, 1, + 0, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 0, 0, 0, 0, 1, + 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 0 +}; const uint8_t ascii_to_keycode_lut[128] PROGMEM = { // NUL SOH STX ETX EOT ENQ ACK BEL XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, // BS TAB LF VT FF CR SO SI - KC_BSPC, KC_TAB, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_BSPC, KC_TAB, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, // DLE DC1 DC2 DC3 DC4 NAK SYN ETB XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, // CAN EM SUB ESC FS GS RS US - XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, // ! " # $ % & ' - KC_SPC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, + KC_SPC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, // ( ) * + , - . / - KC_8, KC_9, JP_COLN, JP_SCLN, JP_COMM, JP_MINS, JP_DOT, JP_SLSH, + KC_8, KC_9, JP_COLN, JP_SCLN, JP_COMM, JP_MINS, JP_DOT, JP_SLSH, // 0 1 2 3 4 5 6 7 - KC_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, + KC_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, // 8 9 : ; < = > ? - KC_8, KC_9, JP_COLN, JP_SCLN, JP_COMM, JP_MINS, JP_DOT, JP_SLSH, + KC_8, KC_9, JP_COLN, JP_SCLN, JP_COMM, JP_MINS, JP_DOT, JP_SLSH, // @ A B C D E F G - JP_AT, KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, + JP_AT, KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, // H I J K L M N O - KC_H, KC_I, KC_J, KC_K, KC_L, KC_M, KC_N, KC_O, + KC_H, KC_I, KC_J, KC_K, KC_L, KC_M, KC_N, KC_O, // P Q R S T U V W - KC_P, KC_Q, KC_R, KC_S, KC_T, KC_U, KC_V, KC_W, + KC_P, KC_Q, KC_R, KC_S, KC_T, KC_U, KC_V, KC_W, // X Y Z [ \ ] ^ _ - KC_X, KC_Y, KC_Z, JP_LBRC, JP_BSLS, JP_RBRC, JP_CIRC, JP_BSLS, + KC_X, KC_Y, KC_Z, JP_LBRC, JP_BSLS, JP_RBRC, JP_CIRC, JP_BSLS, // ` a b c d e f g - JP_AT, KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, + JP_AT, KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, // h i j k l m n o - KC_H, KC_I, KC_J, KC_K, KC_L, KC_M, KC_N, KC_O, + KC_H, KC_I, KC_J, KC_K, KC_L, KC_M, KC_N, KC_O, // p q r s t u v w - KC_P, KC_Q, KC_R, KC_S, KC_T, KC_U, KC_V, KC_W, + KC_P, KC_Q, KC_R, KC_S, KC_T, KC_U, KC_V, KC_W, // x y z { | } ~ DEL - KC_X, KC_Y, KC_Z, JP_LBRC, JP_YEN, JP_RBRC, JP_CIRC, KC_DEL}; + KC_X, KC_Y, KC_Z, JP_LBRC, JP_YEN, JP_RBRC, JP_CIRC, KC_DEL +}; diff --git a/quantum/keymap_extras/sendstring_norman.h b/quantum/keymap_extras/sendstring_norman.h index 312247d6ef44..4146e6ca7beb 100644 --- a/quantum/keymap_extras/sendstring_norman.h +++ b/quantum/keymap_extras/sendstring_norman.h @@ -20,37 +20,40 @@ #include "keymap_norman.h" +// clang-format off + const uint8_t ascii_to_keycode_lut[128] PROGMEM = { // NUL SOH STX ETX EOT ENQ ACK BEL XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, // BS TAB LF VT FF CR SO SI - KC_BSPC, KC_TAB, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_BSPC, KC_TAB, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, // DLE DC1 DC2 DC3 DC4 NAK SYN ETB XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, // CAN EM SUB ESC FS GS RS US - XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, // ! " # $ % & ' - KC_SPC, KC_1, KC_QUOT, KC_3, KC_4, KC_5, KC_7, KC_QUOT, + KC_SPC, KC_1, KC_QUOT, KC_3, KC_4, KC_5, KC_7, KC_QUOT, // ( ) * + , - . / - KC_9, KC_0, KC_8, KC_EQL, KC_COMM, KC_MINS, KC_DOT, KC_SLSH, + KC_9, KC_0, KC_8, KC_EQL, KC_COMM, KC_MINS, KC_DOT, KC_SLSH, // 0 1 2 3 4 5 6 7 - KC_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, + KC_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, // 8 9 : ; < = > ? - KC_8, KC_9, NM_SCLN, NM_SCLN, KC_COMM, KC_EQL, KC_DOT, KC_SLSH, + KC_8, KC_9, NM_SCLN, NM_SCLN, KC_COMM, KC_EQL, KC_DOT, KC_SLSH, // @ A B C D E F G - KC_2, NM_A, NM_B, NM_C, NM_D, NM_E, NM_F, NM_G, + KC_2, NM_A, NM_B, NM_C, NM_D, NM_E, NM_F, NM_G, // H I J K L M N O - NM_H, NM_I, NM_J, NM_K, NM_L, NM_M, NM_N, NM_O, + NM_H, NM_I, NM_J, NM_K, NM_L, NM_M, NM_N, NM_O, // P Q R S T U V W - NM_P, NM_Q, NM_R, NM_S, NM_T, NM_U, NM_V, NM_W, + NM_P, NM_Q, NM_R, NM_S, NM_T, NM_U, NM_V, NM_W, // X Y Z [ \ ] ^ _ - NM_X, NM_Y, NM_Z, KC_LBRC, KC_BSLS, KC_RBRC, KC_6, KC_MINS, + NM_X, NM_Y, NM_Z, KC_LBRC, KC_BSLS, KC_RBRC, KC_6, KC_MINS, // ` a b c d e f g - KC_GRV, NM_A, NM_B, NM_C, NM_D, NM_E, NM_F, NM_G, + KC_GRV, NM_A, NM_B, NM_C, NM_D, NM_E, NM_F, NM_G, // h i j k l m n o - NM_H, NM_I, NM_J, NM_K, NM_L, NM_M, NM_N, NM_O, + NM_H, NM_I, NM_J, NM_K, NM_L, NM_M, NM_N, NM_O, // p q r s t u v w - NM_P, NM_Q, NM_R, NM_S, NM_T, NM_U, NM_V, NM_W, + NM_P, NM_Q, NM_R, NM_S, NM_T, NM_U, NM_V, NM_W, // x y z { | } ~ DEL - NM_X, NM_Y, NM_Z, KC_LBRC, KC_BSLS, KC_RBRC, KC_GRV, KC_DEL}; + NM_X, NM_Y, NM_Z, KC_LBRC, KC_BSLS, KC_RBRC, KC_GRV, KC_DEL +}; diff --git a/quantum/keymap_extras/sendstring_spanish.h b/quantum/keymap_extras/sendstring_spanish.h index af2c20149158..92bada269a04 100644 --- a/quantum/keymap_extras/sendstring_spanish.h +++ b/quantum/keymap_extras/sendstring_spanish.h @@ -20,45 +20,80 @@ #include "keymap_spanish.h" -const bool ascii_to_shift_lut[128] PROGMEM = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// clang-format off - 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; +const bool ascii_to_shift_lut[128] PROGMEM = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, -const bool ascii_to_altgr_lut[128] PROGMEM = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 0, 1, 1, 1, 0, + 1, 1, 1, 0, 0, 0, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1, 1, 0, 1, 1, 1, + 0, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 0, 0, 0, 1, 1, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0 +}; - 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0}; +const bool ascii_to_altgr_lut[128] PROGMEM = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + + 0, 0, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 0 +}; const uint8_t ascii_to_keycode_lut[128] PROGMEM = { // NUL SOH STX ETX EOT ENQ ACK BEL XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, // BS TAB LF VT FF CR SO SI - KC_BSPC, KC_TAB, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_BSPC, KC_TAB, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, // DLE DC1 DC2 DC3 DC4 NAK SYN ETB XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, // CAN EM SUB ESC FS GS RS US - XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, // ! " # $ % & ' - KC_SPC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, ES_APOS, + KC_SPC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, ES_APOS, // ( ) * + , - . / - KC_8, KC_9, ES_PLUS, ES_PLUS, KC_COMM, ES_MINS, KC_DOT, KC_7, + KC_8, KC_9, ES_PLUS, ES_PLUS, KC_COMM, ES_MINS, KC_DOT, KC_7, // 0 1 2 3 4 5 6 7 - KC_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, + KC_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, // 8 9 : ; < = > ? - KC_8, KC_9, KC_DOT, KC_COMM, ES_LESS, KC_0, ES_LESS, ES_APOS, + KC_8, KC_9, KC_DOT, KC_COMM, ES_LESS, KC_0, ES_LESS, ES_APOS, // @ A B C D E F G - KC_2, KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, + KC_2, KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, // H I J K L M N O - KC_H, KC_I, KC_J, KC_K, KC_L, KC_M, KC_N, KC_O, + KC_H, KC_I, KC_J, KC_K, KC_L, KC_M, KC_N, KC_O, // P Q R S T U V W - KC_P, KC_Q, KC_R, KC_S, KC_T, KC_U, KC_V, KC_W, + KC_P, KC_Q, KC_R, KC_S, KC_T, KC_U, KC_V, KC_W, // X Y Z [ \ ] ^ _ - KC_X, KC_Y, KC_Z, ES_GRV, ES_OVRR, ES_PLUS, ES_GRV, ES_MINS, + KC_X, KC_Y, KC_Z, ES_GRV, ES_OVRR, ES_PLUS, ES_GRV, ES_MINS, // ` a b c d e f g - ES_GRV, KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, + ES_GRV, KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, // h i j k l m n o - KC_H, KC_I, KC_J, KC_K, KC_L, KC_M, KC_N, KC_O, + KC_H, KC_I, KC_J, KC_K, KC_L, KC_M, KC_N, KC_O, // p q r s t u v w - KC_P, KC_Q, KC_R, KC_S, KC_T, KC_U, KC_V, KC_W, + KC_P, KC_Q, KC_R, KC_S, KC_T, KC_U, KC_V, KC_W, // x y z { | } ~ DEL - KC_X, KC_Y, KC_Z, ES_ACUT, KC_1, ES_CCED, ES_NTIL, KC_DEL}; + KC_X, KC_Y, KC_Z, ES_ACUT, KC_1, ES_CCED, ES_NTIL, KC_DEL +}; diff --git a/quantum/keymap_extras/sendstring_uk.h b/quantum/keymap_extras/sendstring_uk.h index e5bbe2564448..982456e40ae7 100644 --- a/quantum/keymap_extras/sendstring_uk.h +++ b/quantum/keymap_extras/sendstring_uk.h @@ -20,41 +20,60 @@ #include "keymap_uk.h" -const bool ascii_to_shift_lut[128] PROGMEM = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// clang-format off - 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0}; +const bool ascii_to_shift_lut[128] PROGMEM = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + + 0, 1, 1, 0, 1, 1, 1, 0, + 1, 1, 1, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1, 0, 1, 0, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 0, 0, 0, 1, 1, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 0 +}; const uint8_t ascii_to_keycode_lut[128] PROGMEM = { // NUL SOH STX ETX EOT ENQ ACK BEL XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, // BS TAB LF VT FF CR SO SI - KC_BSPC, KC_TAB, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_BSPC, KC_TAB, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, // DLE DC1 DC2 DC3 DC4 NAK SYN ETB XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, // CAN EM SUB ESC FS GS RS US - XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, // ! " # $ % & ' - UK_SPC, UK_1, UK_2, UK_HASH, UK_4, UK_5, UK_7, UK_QUOT, + UK_SPC, UK_1, UK_2, UK_HASH, UK_4, UK_5, UK_7, UK_QUOT, // ( ) * + , - . / - UK_9, UK_0, UK_8, UK_EQL, UK_COMM, UK_MINS, UK_DOT, UK_SLSH, + UK_9, UK_0, UK_8, UK_EQL, UK_COMM, UK_MINS, UK_DOT, UK_SLSH, // 0 1 2 3 4 5 6 7 - UK_0, UK_1, UK_2, UK_3, UK_4, UK_5, UK_6, UK_7, + UK_0, UK_1, UK_2, UK_3, UK_4, UK_5, UK_6, UK_7, // 8 9 : ; < = > ? - UK_8, UK_9, UK_SCLN, UK_SCLN, UK_COMM, UK_EQL, UK_DOT, UK_SLSH, + UK_8, UK_9, UK_SCLN, UK_SCLN, UK_COMM, UK_EQL, UK_DOT, UK_SLSH, // @ A B C D E F G - UK_QUOT, UK_A, UK_B, UK_C, UK_D, UK_E, UK_F, UK_G, + UK_QUOT, UK_A, UK_B, UK_C, UK_D, UK_E, UK_F, UK_G, // H I J K L M N O - UK_H, UK_I, UK_J, UK_K, UK_L, UK_M, UK_N, UK_O, + UK_H, UK_I, UK_J, UK_K, UK_L, UK_M, UK_N, UK_O, // P Q R S T U V W - UK_P, UK_Q, UK_R, UK_S, UK_T, UK_U, UK_V, UK_W, + UK_P, UK_Q, UK_R, UK_S, UK_T, UK_U, UK_V, UK_W, // X Y Z [ \ ] ^ _ - UK_X, UK_Y, UK_Z, UK_LBRC, UK_BSLS, UK_RBRC, UK_6, UK_MINS, + UK_X, UK_Y, UK_Z, UK_LBRC, UK_BSLS, UK_RBRC, UK_6, UK_MINS, // ` a b c d e f g - UK_GRV, UK_A, UK_B, UK_C, UK_D, UK_E, UK_F, UK_G, + UK_GRV, UK_A, UK_B, UK_C, UK_D, UK_E, UK_F, UK_G, // h i j k l m n o - UK_H, UK_I, UK_J, UK_K, UK_L, UK_M, UK_N, UK_O, + UK_H, UK_I, UK_J, UK_K, UK_L, UK_M, UK_N, UK_O, // p q r s t u v w - UK_P, UK_Q, UK_R, UK_S, UK_T, UK_U, UK_V, UK_W, + UK_P, UK_Q, UK_R, UK_S, UK_T, UK_U, UK_V, UK_W, // x y z { | } ~ DEL - UK_X, UK_Y, UK_Z, UK_LBRC, UK_BSLS, UK_RBRC, UK_HASH, KC_DEL}; + UK_X, UK_Y, UK_Z, UK_LBRC, UK_BSLS, UK_RBRC, UK_HASH, KC_DEL +}; diff --git a/quantum/keymap_extras/sendstring_workman.h b/quantum/keymap_extras/sendstring_workman.h index 239c9c0b6d43..434ef653b18d 100644 --- a/quantum/keymap_extras/sendstring_workman.h +++ b/quantum/keymap_extras/sendstring_workman.h @@ -20,37 +20,40 @@ #include "keymap_workman.h" +// clang-format off + const uint8_t ascii_to_keycode_lut[128] PROGMEM = { // NUL SOH STX ETX EOT ENQ ACK BEL XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, // BS TAB LF VT FF CR SO SI - KC_BSPC, KC_TAB, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_BSPC, KC_TAB, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, // DLE DC1 DC2 DC3 DC4 NAK SYN ETB XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, // CAN EM SUB ESC FS GS RS US - XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, // ! " # $ % & ' - KC_SPC, KC_1, KC_QUOT, KC_3, KC_4, KC_5, KC_7, KC_QUOT, + KC_SPC, KC_1, KC_QUOT, KC_3, KC_4, KC_5, KC_7, KC_QUOT, // ( ) * + , - . / - KC_9, KC_0, KC_8, KC_EQL, KC_COMM, KC_MINS, KC_DOT, KC_SLSH, + KC_9, KC_0, KC_8, KC_EQL, KC_COMM, KC_MINS, KC_DOT, KC_SLSH, // 0 1 2 3 4 5 6 7 - KC_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, + KC_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, // 8 9 : ; < = > ? - KC_8, KC_9, KC_SCLN, KC_SCLN, KC_COMM, KC_EQL, KC_DOT, KC_SLSH, + KC_8, KC_9, KC_SCLN, KC_SCLN, KC_COMM, KC_EQL, KC_DOT, KC_SLSH, // @ A B C D E F G - KC_2, WK_A, WK_B, WK_C, WK_D, WK_E, WK_F, WK_G, + KC_2, WK_A, WK_B, WK_C, WK_D, WK_E, WK_F, WK_G, // H I J K L M N O - WK_H, WK_I, WK_J, WK_K, WK_L, WK_M, WK_N, WK_O, + WK_H, WK_I, WK_J, WK_K, WK_L, WK_M, WK_N, WK_O, // P Q R S T U V W - WK_P, WK_Q, WK_R, WK_S, WK_T, WK_U, WK_V, WK_W, + WK_P, WK_Q, WK_R, WK_S, WK_T, WK_U, WK_V, WK_W, // X Y Z [ \ ] ^ _ - WK_X, WK_Y, WK_Z, KC_LBRC, KC_BSLS, KC_RBRC, KC_6, KC_MINS, + WK_X, WK_Y, WK_Z, KC_LBRC, KC_BSLS, KC_RBRC, KC_6, KC_MINS, // ` a b c d e f g - KC_GRV, WK_A, WK_B, WK_C, WK_D, WK_E, WK_F, WK_G, + KC_GRV, WK_A, WK_B, WK_C, WK_D, WK_E, WK_F, WK_G, // h i j k l m n o - WK_H, WK_I, WK_J, WK_K, WK_L, WK_M, WK_N, WK_O, + WK_H, WK_I, WK_J, WK_K, WK_L, WK_M, WK_N, WK_O, // p q r s t u v w - WK_P, WK_Q, WK_R, WK_S, WK_T, WK_U, WK_V, WK_W, + WK_P, WK_Q, WK_R, WK_S, WK_T, WK_U, WK_V, WK_W, // x y z { | } ~ DEL - WK_X, WK_Y, WK_Z, KC_LBRC, KC_BSLS, KC_RBRC, KC_GRV, KC_DEL}; + WK_X, WK_Y, WK_Z, KC_LBRC, KC_BSLS, KC_RBRC, KC_GRV, KC_DEL +}; From f19c8b2d5daedcbf833fe8320f290cad9d9f0b83 Mon Sep 17 00:00:00 2001 From: Xyverz Date: Mon, 28 Oct 2019 16:09:01 -0700 Subject: [PATCH 201/316] [Keymap] Updating keymaps (#7170) * Added WOW layer * Initial commit for this branch. Still a work in progress. * Added Rorschach keyboard layout. * Simplified keymap Removed the media layer to help simplify things. Also corrected some keymap mistakes in the Qwerty and Colemak layers. * Added ErgoTravel keymap. * reverted to previous layout. * Added Sol keyboard layout. * Minor changes to keymap. * more changes * Added sol graphic by Kagerufu and Cardiactuna * Added colemak layer because I can. * more changes to sol layout * Streamlined Sol layout * minor tweaks to sol layout * further revisions to sol keymap. * Removing deprecated #include statements from my keymaps * Standardizing keymap `include` lines. * Minor change to keymap. Swapped ESC with GRV on all alpha layers. * Tweaks to Atreus62 Keymap Added a layer for FPS RPG Loot Shooters. * Fixed readme.md for Atreus keymap. Replaced "Keymap" with "Layer" in illustrations for continuity's sake * More readme.md clean-up More clarification in the Atreus readme file. * Next verse, same as the first. * Changes to Sol layout Bringing my Sol layout more in line with my other Orthos. * Fixed keymap GUI. Replaced left-hand "RGUI" with "LGUI" on all layers as it should be. * Added ALPS64 keymap * Formatting corrections * fixes to config.h and keymap.c * Fixed errors This commit fixes a pathing issue in keyboards/orthodox/keymaps/xyverz/config.h and removes an stupid comma at the end of each LAYOUT stanza in keyboards/rgbkb/sol/keymaps/xyverz/keymap.c left there by me. * Fixed orthodox keymap config.h file I hope this one fixes the problem. *sigh* * Making suggested changes for PR#6192 Thanks to noroadsleft, fauxpark, and drashna. Still have more work to do, but at least these suggestions have been applied. * Fixing build errors Travis has shown me the error of my ways... * More fixes and corrections Those pesky semicolons... * More Fixes. * Removing unneeded code snippet. * fixed omitted semicolons * Code updates to my keymaps Updating the code for my Iris, Atreus62, and Atreus keymaps. * Fixed Atreus62 Keymap I forgot to add in the aliases for LOWER, RAISE, and ADJUST. * Added userspace Also made changes to Atreus62 Keymap to turn the red LEDs off on the ProMicro * Fixing code that disables LEDs on ProMicros Also tidied up my ErgoTravel keymap. * Moving userspace to new branch Moving my userspace to a new branch for the sake of keeping things clean on the master branch. * Added F13-F15 to Atreus62 Layout. * Update readme.md. * Updated Phantom keymap to current keymap standards * Phantom keymap updates Further updates - tidying and removing cruft. Thank you zvecr on Discord for the help! * Standards Updates Bringing my Kinesis keymap up to current code standards * Adding a readme * Bring GH60 code to standard * Utilizing layouts for 60_ansi and tkl_ansi Moving my GH60 and Phantom keymaps into layouts/community/ * Alps64 layout removal Removing my Alps64 keymap now that I've setup my 60_ansi layout. * Moved Clueboard layout to community/66_ansi. * Additions to 66_ansi config.h * Bringing keymaps up to standard. * More updates to keymaps. * Syntax updates * Revert "Syntax updates" This reverts commit a892b2d9fcc0d4ba8fc22d676d5414120cc2c183. * Moved WIP keymaps Moved my WIP keymaps to my wip_keymaps branch to keep my master clean * Updates requested by noroadsleft * more changes per noroadsleft More fixes as requested by noroadsleft. Further tidy-up and standardization of my keymap code. --- keyboards/atreus/keymaps/xyverz/keymap.c | 68 ++-- keyboards/atreus/keymaps/xyverz/readme.md | 12 +- keyboards/atreus62/keymaps/xyverz/keymap.c | 151 ++++---- keyboards/atreus62/keymaps/xyverz/readme.md | 41 ++- .../clueboard/66/keymaps/xyverz/config.h | 3 - .../clueboard/66/keymaps/xyverz/rules.mk | 46 --- keyboards/eco/keymaps/xyverz/keymap.c | 115 +++--- .../keebio/fourier/keymaps/xyverz/keymap.c | 84 ----- keyboards/keebio/iris/keymaps/xyverz/keymap.c | 113 +++--- keyboards/kinesis/keymaps/xyverz/keymap.c | 144 +++----- keyboards/kinesis/keymaps/xyverz/readme.md | 45 +-- keyboards/minidox/keymaps/xyverz/keymap.c | 167 ++++----- keyboards/orthodox/keymaps/xyverz/config.h | 9 +- keyboards/orthodox/keymaps/xyverz/keymap.c | 146 +++----- .../sol}/keymaps/xyverz/config.h | 13 +- keyboards/rgbkb/sol/keymaps/xyverz/keymap.c | 330 ++++++++++++++++++ keyboards/rgbkb/sol/keymaps/xyverz/readme.md | 132 +++++++ keyboards/rgbkb/sol/keymaps/xyverz/rules.mk | 51 +++ .../minivan/keymaps/xyverz/keymap.c | 84 ++--- .../community/60_ansi}/xyverz/keymap.c | 67 ++-- layouts/community/66_ansi/xyverz/config.h | 5 + .../community/66_ansi}/xyverz/keymap.c | 63 ++-- layouts/community/66_ansi/xyverz/rules.mk | 1 + layouts/community/ortho_4x12/xyverz/keymap.c | 135 +++---- layouts/community/ortho_4x12/xyverz/readme.md | 1 + layouts/community/ortho_5x12/xyverz/keymap.c | 141 ++------ .../community/tkl_ansi}/xyverz/keymap.c | 73 ++-- layouts/community/tkl_ansi/xyverz/readme.md | 1 + 28 files changed, 1057 insertions(+), 1184 deletions(-) delete mode 100644 keyboards/clueboard/66/keymaps/xyverz/config.h delete mode 100644 keyboards/clueboard/66/keymaps/xyverz/rules.mk delete mode 100644 keyboards/keebio/fourier/keymaps/xyverz/keymap.c rename keyboards/{keebio/fourier => rgbkb/sol}/keymaps/xyverz/config.h (81%) create mode 100644 keyboards/rgbkb/sol/keymaps/xyverz/keymap.c create mode 100644 keyboards/rgbkb/sol/keymaps/xyverz/readme.md create mode 100644 keyboards/rgbkb/sol/keymaps/xyverz/rules.mk rename {keyboards/gh60/revc/keymaps => layouts/community/60_ansi}/xyverz/keymap.c (83%) create mode 100644 layouts/community/66_ansi/xyverz/config.h rename {keyboards/clueboard/66/keymaps => layouts/community/66_ansi}/xyverz/keymap.c (86%) create mode 100644 layouts/community/66_ansi/xyverz/rules.mk rename {keyboards/phantom/keymaps => layouts/community/tkl_ansi}/xyverz/keymap.c (76%) create mode 100644 layouts/community/tkl_ansi/xyverz/readme.md diff --git a/keyboards/atreus/keymaps/xyverz/keymap.c b/keyboards/atreus/keymaps/xyverz/keymap.c index fe1ca295d86f..7653206ae56b 100644 --- a/keyboards/atreus/keymaps/xyverz/keymap.c +++ b/keyboards/atreus/keymaps/xyverz/keymap.c @@ -3,8 +3,6 @@ // Preonic keyboards by Jack Humbert. #include QMK_KEYBOARD_H -#include "action_layer.h" -#include "eeconfig.h" extern keymap_config_t keymap_config; @@ -12,13 +10,16 @@ extern keymap_config_t keymap_config; // 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 _DVORAK 0 -#define _QWERTY 1 -#define _COLEMAK 2 -#define _DVORMAC 3 -#define _LOWER 4 -#define _RAISE 5 -#define _ADJUST 16 + +enum layer_names { + _DVORAK, + _QWERTY, + _COLEMAK, + _DVORMAC, + _LOWER, + _RAISE, + _ADJUST +}; enum planck_keycodes { DVORAK = SAFE_RANGE, @@ -27,7 +28,7 @@ enum planck_keycodes { DVORMAC, LOWER, RAISE, - BACKLIT + ADJUST }; // Adding macros to make the keymaps below much easier to read. @@ -37,6 +38,9 @@ enum planck_keycodes { #define ALTENT ALT_T(KC_ENT) #define ESCTRL CTL_T(KC_ESC) #define TABALT ALT_T(KC_TAB) +#define ADJUST MO(_ADJUST) +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Dvorak Layer @@ -159,57 +163,31 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } - bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { - case QWERTY: + case DVORAK: if (record->event.pressed) { - persistent_default_layer_set(1UL<<_QWERTY); + set_single_persistent_default_layer(_DVORAK); } return false; - break; case COLEMAK: if (record->event.pressed) { - persistent_default_layer_set(1UL<<_COLEMAK); + set_single_persistent_default_layer(_COLEMAK); } return false; - break; - case DVORAK: + case QWERTY: if (record->event.pressed) { - persistent_default_layer_set(1UL<<_DVORAK); + set_single_persistent_default_layer(_QWERTY); } return false; - break; case DVORMAC: if (record->event.pressed) { - persistent_default_layer_set(1UL<<_DVORMAC); + set_single_persistent_default_layer(_DVORMAC); } return false; - break; - case LOWER: - if (record->event.pressed) { - layer_on(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - case RAISE: - if (record->event.pressed) { - layer_on(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; } return true; -}; +} \ No newline at end of file diff --git a/keyboards/atreus/keymaps/xyverz/readme.md b/keyboards/atreus/keymaps/xyverz/readme.md index ec7d836c173f..aa44f01dae4b 100644 --- a/keyboards/atreus/keymaps/xyverz/readme.md +++ b/keyboards/atreus/keymaps/xyverz/readme.md @@ -9,7 +9,7 @@ to a final go with this. I'm using MOD_TAP quite a bit in this keymap. On all layers, R4 pinky keys use mod-tap and are SHIFT when held and their normal keys when tapped. In addition, ESC and TAB are also set as Ctrl and ALT respectively when held, -and Enter/ALT on the right thumb key for all layers. +and Enter/ALT on the right thumb key for all alpha layers. I've enabled persistent keymaps for Qwerty, Dvorak and Colemak layers, similar to the default Planck layouts. @@ -44,7 +44,7 @@ Control. | Esc | Tab | GUI | LOWER| BkSp |------'`------| Spc | RAISE| - | ' | \ | `----------------------------------' `----------------------------------' -### Keymap 2: Colemak layer +### Layer 2: Colemak layer ,----------------------------------. ,----------------------------------. | Q | W | F | P | G | | J | L | U | Y | L | @@ -56,7 +56,7 @@ Control. | Esc | Tab | GUI | LOWER| BkSp |------'`------| Spc | RAISE| - | ' | \ | `----------------------------------' `----------------------------------' -### Keymap 3: Dvorak for Mac layout +### Layer 3: Dvorak for Mac layer ,----------------------------------. ,----------------------------------. | ' | , | . | P | Y | | F | G | C | R | L | @@ -68,7 +68,7 @@ Control. | Esc | Tab | GUI | LOWER| BkSp |------'`------| Spc | RAISE| - | / | \ | `----------------------------------' `----------------------------------' -### Keymap 4: LOWER layer +### Layer 4: LOWER layer ,----------------------------------. ,----------------------------------. | ! | @ | # | $ | % | | ^ | & | * | ( | ) | @@ -81,7 +81,7 @@ Control. `----------------------------------' `----------------------------------' -### Keymap 5: RAISE layer +### Layer 5: RAISE layer ,----------------------------------. ,----------------------------------. | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | @@ -93,7 +93,7 @@ Control. | ` | | | | Del |------'`------| Ins | | | | | `----------------------------------' `----------------------------------' -### Keymap 6: ADJUST layer +### Layer 6: ADJUST layer ,----------------------------------. ,----------------------------------. | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | diff --git a/keyboards/atreus62/keymaps/xyverz/keymap.c b/keyboards/atreus62/keymaps/xyverz/keymap.c index a7c33ce9eabe..52b01885065b 100644 --- a/keyboards/atreus62/keymaps/xyverz/keymap.c +++ b/keyboards/atreus62/keymaps/xyverz/keymap.c @@ -14,19 +14,21 @@ CHANGELOG: 0.1 - Initial commit. Based off of Profet's default keymap. - 0.2 - Converted to a more Planck/Preonic keymap style file with + 0.2 - Converted to a more Planck/Preonic keymap style file with persistent layers enabled. Renamed layers to reflect OLKB maps. Added a TODO list. - 0.3 - Moved location of media & volume keys. Added Print Screen, + 0.3 - Moved location of media & volume keys. Added Print Screen, Scroll Lock and Pause keys. Added a WOW gaming layer that changes the location of Ctrl & Alt to the thumb keys. Added readme. - 0.4 - After more useage, I realized that the ESC key was in the way + 0.4 - After more useage, I realized that the ESC key was in the way of my muscle memory (gee, thanks, Planck!) so I moved it to the normal Caps Lock position, and moved Caps Lock to the same position on the RAISE and LOWER layers. Added code to turn off the Pro Micro LEDs after flashing. 0.5 - Converted keymap to LAYOUT standard. + 0.6 - Swapped ESC and GRV in all layers. + 0.7 - Brought code up to current standards. TODO: @@ -39,66 +41,59 @@ // this is the style you want to emulate. // This is the canonical layout file for the Quantum project. If you want to add another keyboard, #include QMK_KEYBOARD_H -#include "action_layer.h" -#include "eeconfig.h" - -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. -#define _DVORAK 0 -#define _QWERTY 1 -#define _COLEMAK 2 -#define _WOW 3 -#define _LOWER 4 -#define _RAISE 5 -#define _ADJUST 16 - -enum atreus52_keycodes { - DVORAK = SAFE_RANGE, - QWERTY, - COLEMAK, - WOW, - LOWER, - RAISE -}; + +enum layer_names { _DVORAK, _QWERTY, _COLEMAK, _WOW, _DESTINY, _LOWER, _RAISE, _ADJUST }; + +enum atreus52_keycodes { DVORAK = SAFE_RANGE, QWERTY, COLEMAK, WOW, DESTINY, LOWER, RAISE, ADJUST }; // Aliases to make the keymap clearer. #define CTL_ENT CTL_T(KC_ENT) +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define ADJUST MO(_ADJUST) +// clang-format off const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_DVORAK] = LAYOUT ( /* dvorak */ - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, - KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, + KC_GRV, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_LGUI, KC_ENT, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_RCTL ), [_QWERTY] = LAYOUT ( /* qwerty */ - 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_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, - 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_GRV, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, 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_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_LGUI, KC_ENT, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_RCTL ), [_COLEMAK] = LAYOUT ( /* colemak */ - 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_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL, - KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_GRV, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_LGUI, KC_ENT, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_RCTL ), [_WOW] = LAYOUT ( /* Dvorak with minor modifications for playing World of Warcraft */ - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, - KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, + KC_GRV, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_LALT, CTL_ENT, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT ), + [_DESTINY] = LAYOUT ( /* Dvorak with minor modifications for playing Destiny 2 and other FPS Looters */ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, + KC_GRV, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, + KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_DEL, KC_ENT, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT + ), + [_LOWER] = LAYOUT ( KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12, KC_TILD, KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PIPE, @@ -114,76 +109,48 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, KC_HOME, KC_END, _______, KC_DEL, _______, _______, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ ), [_ADJUST] = LAYOUT ( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_F13, KC_F14, KC_F15, _______, _______, _______, _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, QWERTY, COLEMAK, DVORAK, _______, WOW, + _______, _______, _______, _______, _______, _______, _______, QWERTY, COLEMAK, DVORAK, DESTINY, WOW, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), - }; +//clang-format on void matrix_init_user(void) { #ifdef BOOTLOADER_CATERINA // This will disable the red LEDs on the ProMicros - DDRD &= ~(1<<5); - PORTD &= ~(1<<5); - DDRB &= ~(1<<0); - PORTB &= ~(1<<0); + setPinInput(D5); + writePinLow(D5); + setPinInput(B0); + writePinLow(B0); #endif }; -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +}; bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_QWERTY); - } - return false; - break; - case COLEMAK: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_COLEMAK); - } - return false; - break; - case DVORAK: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_DVORAK); - } - return false; - break; - case WOW: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_WOW); - } - return false; - break; - case LOWER: - if (record->event.pressed) { - layer_on(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - case RAISE: - if (record->event.pressed) { - layer_on(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - } - return true; + if (record->event.pressed) { + switch (keycode) { + case DVORAK: + set_single_persistent_default_layer(_DVORAK); + return false; + case QWERTY: + set_single_persistent_default_layer(_QWERTY); + return false; + case COLEMAK: + set_single_persistent_default_layer(_COLEMAK); + return false; + case WOW: + set_single_persistent_default_layer(_WOW); + return false; + case DESTINY: + set_single_persistent_default_layer(_DESTINY); + return false; + } + } + return true; }; diff --git a/keyboards/atreus62/keymaps/xyverz/readme.md b/keyboards/atreus62/keymaps/xyverz/readme.md index cf00b65e3a79..f91a87da4fe0 100644 --- a/keyboards/atreus62/keymaps/xyverz/readme.md +++ b/keyboards/atreus62/keymaps/xyverz/readme.md @@ -23,6 +23,13 @@ The bottom row is fairly Kinesis-ish since the Contour and Advantage keyboards h * Moved location of Escape key to Caps Lock position. Moved Caps Lock to same position on Raise/Lower Layers. * Put Tilde/Grave in the upper-left corner * Added code to turn off the red LEDs on the Pro Micro after flashing. They were annoying me. +### 0.5 + * Converted keymap to LAYOUT standard. +### 0.6 + * Swapped ESC and GRV in all layers. +### 0.7 + * Brought code up to new standards (as of 27 June 2019). + * Updated this readme file. ### TODO: @@ -34,11 +41,11 @@ The bottom row is fairly Kinesis-ish since the Contour and Advantage keyboards h ### Layer 0: Dvorak layer ,-----------------------------------------. ,-----------------------------------------. - | Grv | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | \ | + | Esc | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | \ | |------+------+------+------+------+------| |------+------+------+------+------+------| | Tab | ' | , | . | P | Y | | F | G | C | R | L | / | |------+------+------+------+------+------| |------+------+------+------+------+------| - | Esc | A | O | E | U | I | | D | H | T | N | S | - | + | Grv | A | O | E | U | I | | D | H | T | N | S | - | |------+------+------+------+------+------|------.,------|------+------+------+------+------+------| | Shft | ; | Q | J | K | X | Gui ||Enter | B | M | W | V | Z | Shft | |------+------+------+------+------+------| || |------+------+------+------+------+------| @@ -48,11 +55,11 @@ The bottom row is fairly Kinesis-ish since the Contour and Advantage keyboards h ### Layer 1: QWERTY layer ,-----------------------------------------. ,-----------------------------------------. - | Grv | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | + | Esc | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | |------+------+------+------+------+------| |------+------+------+------+------+------| | Tab | Q | W | E | R | T | | Y | U | I | O | P | Del | |------+------+------+------+------+------| |------+------+------+------+------+------| - | Esc | A | S | D | F | G | | D | H | T | N | S | ' | + | Grv | A | S | D | F | G | | D | H | T | N | S | ' | |------+------+------+------+------+------|------.,------|------+------+------+------+------+------| | Shft | Z | X | C | V | B | Gui ||Enter | N | M | , | . | / | Shft | |------+------+------+------+------+------| || |------+------+------+------+------+------| @@ -62,11 +69,11 @@ The bottom row is fairly Kinesis-ish since the Contour and Advantage keyboards h ### Keymap 2: Colemak layer ,-----------------------------------------. ,-----------------------------------------. - | Grv | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | + | Esc | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | |------+------+------+------+------+------| |------+------+------+------+------+------| | Tab | Q | W | F | P | G | | J | U | U | Y | ; | Del | |------+------+------+------+------+------| |------+------+------+------+------+------| - | Esc | A | R | S | T | D | | H | N | E | I | O | ' | + | Grv | A | R | S | T | D | | H | N | E | I | O | ' | |------+------+------+------+------+------|------.,------|------+------+------+------+------+------| | Shft | Z | X | C | V | B | Gui ||Enter | K | M | , | . | / | Shft | |------+------+------+------+------+------| || |------+------+------+------+------+------| @@ -80,14 +87,28 @@ The bottom row is fairly Kinesis-ish since the Contour and Advantage keyboards h |------+------+------+------+------+------| |------+------+------+------+------+------| | Tab | ' | , | . | P | Y | | F | G | C | R | L | / | |------+------+------+------+------+------| |------+------+------+------+------+------| - | Caps | A | O | E | U | I | | D | H | T | N | S | - | + | Grv | A | O | E | U | I | | D | H | T | N | S | - | |------+------+------+------+------+------|------.,------|------+------+------+------+------+------| | Shft | ; | Q | J | K | X | Alt ||Ctrl/ | B | M | W | V | Z | Shft | |------+------+------+------+------+------| ||Enter |------+------+------+------+------+------| | Ctrl | Alt | Left | Rght | LOWER| BkSp |------'`------| Spc | RAISE| Up | Down | Gui | Ctrl | `-----------------------------------------' `-----------------------------------------' -### Keymap 4: LOWER layer +### Layer 4: Destiny layer + + ,-----------------------------------------. ,-----------------------------------------. + | Esc | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | \ | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Tab | ' | , | . | P | Y | | F | G | C | R | L | / | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Grv | A | O | E | U | I | | D | H | T | N | S | - | + |------+------+------+------+------+------|------.,------|------+------+------+------+------+------| + | Shft | ; | Q | J | K | X | Del ||Enter | B | M | W | V | Z | Shft | + |------+------+------+------+------+------| || |------+------+------+------+------+------| + | Ctrl | Alt | Left | Rght | LOWER| BkSp |------'`------| Spc | RAISE| Up | Down | Gui | Ctrl | + `-----------------------------------------' `-----------------------------------------' + +### Keymap 5: LOWER layer ,-----------------------------------------. ,-----------------------------------------. | F11 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F12 | @@ -102,7 +123,7 @@ The bottom row is fairly Kinesis-ish since the Contour and Advantage keyboards h `-----------------------------------------' `-----------------------------------------' -### Keymap 5: RAISE layer +### Keymap 6: RAISE layer ,-----------------------------------------. ,-----------------------------------------. | F11 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F12 | @@ -116,7 +137,7 @@ The bottom row is fairly Kinesis-ish since the Contour and Advantage keyboards h | | | Home | End | | Del |------'`------| Ins | | PgUp | PgDn | | | `-----------------------------------------' `-----------------------------------------' -### Keymap 6: ADJUST layer +### Keymap 7: ADJUST layer ,-----------------------------------------. ,-----------------------------------------. | | | | | | | | | | | | | | diff --git a/keyboards/clueboard/66/keymaps/xyverz/config.h b/keyboards/clueboard/66/keymaps/xyverz/config.h deleted file mode 100644 index 979cbf57687d..000000000000 --- a/keyboards/clueboard/66/keymaps/xyverz/config.h +++ /dev/null @@ -1,3 +0,0 @@ -#pragma once - -#define TAPPING_TERM 600 // ms diff --git a/keyboards/clueboard/66/keymaps/xyverz/rules.mk b/keyboards/clueboard/66/keymaps/xyverz/rules.mk deleted file mode 100644 index 6fa110a7b665..000000000000 --- a/keyboards/clueboard/66/keymaps/xyverz/rules.mk +++ /dev/null @@ -1,46 +0,0 @@ -#---------------------------------------------------------------------------- -# On command line: -# -# make all = Make software. -# -# make clean = Clean out built project files. -# -# make coff = Convert ELF to AVR COFF. -# -# make extcoff = Convert ELF to AVR Extended COFF. -# -# make program = Download the hex file to the device. -# Please customize your programmer settings(PROGRAM_CMD) -# -# make teensy = Download the hex file to the device, using teensy_loader_cli. -# (must have teensy_loader_cli installed). -# -# make dfu = Download the hex file to the device, using dfu-programmer (must -# have dfu-programmer installed). -# -# make flip = Download the hex file to the device, using Atmel FLIP (must -# have Atmel FLIP installed). -# -# make dfu-ee = Download the eeprom file to the device, using dfu-programmer -# (must have dfu-programmer installed). -# -# make flip-ee = Download the eeprom file to the device, using Atmel FLIP -# (must have Atmel FLIP installed). -# -# make debug = Start either simulavr or avarice as specified for debugging, -# with avr-gdb or avr-insight as the front end for debugging. -# -# make filename.s = Just compile filename.c into the assembler code only. -# -# make filename.i = Create a preprocessed source file for use in submitting -# bug reports to the GCC project. -# -# To rebuild project do "make clean" then "make all". -#---------------------------------------------------------------------------- - -# Build Options -# change to "no" to disable the options, or define them in the makefile.mk in -# the appropriate keymap folder that will get included automatically -# -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. - diff --git a/keyboards/eco/keymaps/xyverz/keymap.c b/keyboards/eco/keymaps/xyverz/keymap.c index 395a014acb36..5a1974336a65 100644 --- a/keyboards/eco/keymaps/xyverz/keymap.c +++ b/keyboards/eco/keymaps/xyverz/keymap.c @@ -1,36 +1,13 @@ -// This is the canonical layout file for the Quantum project. If you want to add another keyboard, -// this is the style you want to emulate. - -// Default ECO Layout -// KLE here : http://www.keyboard-layout-editor.com/#/gists/0733eca6b4cb88ff9d7de746803f4039 - #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; - -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. -#define _QWERTY 0 -#define _COLEMAK 1 -#define _DVORAK 2 -#define _LOWER 3 -#define _RAISE 4 -#define _ADJUST 16 - -enum planck_keycodes { - QWERTY = SAFE_RANGE, - COLEMAK, - DVORAK, - LOWER, - RAISE, - BACKLIT -}; +enum layer_names { _QWERTY, _COLEMAK, _DVORAK, _LOWER, _RAISE, _ADJUST }; -// Aliases to make reading the keymap easier -#define GUIBSPC GUI_T(KC_BSPC) // GUI when held, BSPC when tapped. +enum custom_keycodes { QWERTY = SAFE_RANGE, COLEMAK, DVORAK, LOWER, RAISE, ADJUST }; +// Aliases to keep the keymap tidy +#define GUIBSPC GUI_T(KC_BSPC) // GUI when held, BSPC when tapped. + +// clang-format off const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty @@ -143,53 +120,39 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; +// clang-format on + +#ifdef AUDIO_ENABLE +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +#endif + +void matrix_init_user(void) { +#ifdef BOOTLOADER_CATERINA + // This will disable the red LEDs on the ProMicros + setPinInput(D5); + writePinLow(D5); + setPinInput(B0); + writePinLow(B0); +#endif +}; -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); }; bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_QWERTY); - } - return false; - break; - case COLEMAK: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_COLEMAK); - } - return false; - break; - case DVORAK: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_DVORAK); - } - return false; - break; - case LOWER: - if (record->event.pressed) { - layer_on(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - case RAISE: - if (record->event.pressed) { - layer_on(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - } - return true; -} - + if (record->event.pressed) { + switch (keycode) { + case QWERTY: + set_single_persistent_default_layer(_QWERTY); + return false; + case COLEMAK: + set_single_persistent_default_layer(_COLEMAK); + return false; + case DVORAK: + set_single_persistent_default_layer(_DVORAK); + return false; + } + } + return true; +} \ No newline at end of file diff --git a/keyboards/keebio/fourier/keymaps/xyverz/keymap.c b/keyboards/keebio/fourier/keymaps/xyverz/keymap.c deleted file mode 100644 index 4e864cdef7e5..000000000000 --- a/keyboards/keebio/fourier/keymaps/xyverz/keymap.c +++ /dev/null @@ -1,84 +0,0 @@ -#include QMK_KEYBOARD_H -#include "action_layer.h" -#include "eeconfig.h" - -extern keymap_config_t keymap_config; - -// 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 _BASE 0 -#define _FN1 1 -#define _FN2 2 - -enum custom_keycodes { - QWERTY = SAFE_RANGE, -}; - -#define KC_ KC_TRNS -#define KC_FN1 MO(_FN1) -#define KC_FN2 MO(_FN2) -#define KC_ESFN1 LT(_FN1, KC_ESC) -#define KC_SPFN1 LT(_FN1, KC_SPACE) -#define KC_SPFN2 LT(_FN2, KC_SPACE) -#define KC_BSFN1 LT(_FN1, KC_BSPC) -#define KC_BSFN2 LT(_FN2, KC_BSPC) -#define KC_RST RESET -#define KC_DBUG DEBUG -#define KC_RTOG RGB_TOG -#define KC_RMOD RGB_MOD -#define KC_RHUI RGB_HUI -#define KC_RHUD RGB_HUD -#define KC_RSAI RGB_SAI -#define KC_RSAD RGB_SAD -#define KC_RVAI RGB_VAI -#define KC_RVAD RGB_VAD - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BASE] = LAYOUT_kc( - //,----+----+----+----+----+----|----+----+----+----+----+----+----. - TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,SLSH,MINS, - //|----`----`----`----`----`----|----`----`----`----`----`----`----| - ESC , A , O , E , U , I , D , H , T , N , S , ENTER , - //|-----`----`----`----`----`----|----`----`----`----`----`--------| - LSFT ,SCLN, Q , J , K , X , B , M , W , V , Z , RSFT , - //|-------`----`----`----`----`----|----`----`----`----`----`------| - LCTL ,LALT,LGUI ,FN2 , BSPC , SPC , FN1 ,RGUI ,RALT , RCTL - //`-----+----+-----+----+--------|--------+-----+-----+-----+------' - ), - - [_FN1] = LAYOUT_kc( - //,----+----+----+----+----+----|----+----+----+----+----+----+----. - GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,EQL , - //|----`----`----`----`----`----|----`----`----`----`----`----`----| - CAPS ,RHUI,RSAI,RVAI,VOLU,LBRC,RBRC, , , ,SCLN, , - //|-----`----`----`----`----`----|----`----`----`----`----`--------| - RMOD ,RHUD,RSAD,RVAD,VOLD,LCBR,RCBR, , , , UP , , - //|-------`----`----`----`----`----|----`----`----`----`----`------| - RTOG , , , , DEL , INS , ,LEFT ,DOWN , RGHT - //`-----+----+-----+----+--------|--------+-----+-----+-----+------' - ), - - [_FN2] = LAYOUT_kc( - //,----+----+----+----+----+----|----+----+----+----+----+----+----. - TILD,EXLM, AT ,HASH,DLR ,PERC,CIRC,AMPR,ASTR,LPRN,RPRN,UNDS,PLUS, - //|----`----`----`----`----`----|----`----`----`----`----`----`----| - CAPS , , ,INS ,PGUP,HOME, F1 , F2 , F3 , F4 , F5 , F6 , - //|-----`----`----`----`----`----|----`----`----`----`----`--------| - , , ,DEL ,PGDN,END , F7 , F8 , F9 ,F10 ,F11 , F12 , - //|-------`----`----`----`----`----|----`----`----`----`----`------| - , , , , DEL , INS , , , , - //`-----+----+-----+----+--------|--------+-----+-----+-----+------' - ) - -}; - -void matrix_init_user(void) { - // This will disable the red LEDs on the ProMicros - DDRD &= ~(1<<5); - PORTD &= ~(1<<5); - DDRB &= ~(1<<0); - PORTB &= ~(1<<0); -}; - diff --git a/keyboards/keebio/iris/keymaps/xyverz/keymap.c b/keyboards/keebio/iris/keymaps/xyverz/keymap.c index 53bf32ac3619..cc120c15857f 100644 --- a/keyboards/keebio/iris/keymaps/xyverz/keymap.c +++ b/keyboards/keebio/iris/keymaps/xyverz/keymap.c @@ -1,23 +1,26 @@ #include QMK_KEYBOARD_H -#include "action_layer.h" -#include "eeconfig.h" extern keymap_config_t keymap_config; -#define _QWERTY 0 -#define _COLEMAK 1 -#define _DVORAK 2 -#define _LOWER 3 -#define _RAISE 4 -#define _ADJUST 16 + +enum layer_names { + _DVORAK, + _QWERTY, + _COLEMAK, + _WOW, + _LOWER, + _RAISE, + _ADJUST +}; enum custom_keycodes { - QWERTY = SAFE_RANGE, + DVORAK = SAFE_RANGE, + QWERTY, COLEMAK, - DVORAK, + WOW, LOWER, RAISE, - ADJUST, + ADJUST }; #define KC_____ KC_TRNS @@ -28,10 +31,23 @@ enum custom_keycodes { #define KC_QWRT QWERTY #define KC_CLMK COLEMAK #define KC_DVRK DVORAK +#define KC_WOW WOW #define KC_BSLT ALT_T(KC_BSPC) +#define ADJUST MO(_ADJUST) +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_DVORAK] = LAYOUT_kc ( + GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSLS, + TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,SLSH, + ESC , A , O , E , U , I , D , H , T , N , S ,MINS, + LSFT,SCLN, Q , J , K , X ,LOWR, RASE, B , M , W , V , Z ,RSFT, + LCTL,BSLT,LGUI, ENT ,SPC ,LALT + ), + [_QWERTY] = LAYOUT_kc ( EQL , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS, TAB , Q , W , E , R , T , Y , U , I , O , P ,BSLS, @@ -48,12 +64,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LCTL,BSPC,LGUI, ENT ,SPC ,LALT ), - [_DVORAK] = LAYOUT_kc ( + [_WOW] = LAYOUT_kc ( GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSLS, TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,SLSH, ESC , A , O , E , U , I , D , H , T , N , S ,MINS, - LSFT,SCLN, Q , J , K , X ,LOWR, RASE, B , M , W , V , Z ,RSFT, - LCTL,BSLT,LGUI, ENT ,SPC ,LALT + LSFT,SCLN, Q , J , K , X ,LALT, RGUI, B , M , W , V , Z ,RSFT, + LOWR,BSPC,LCTL, ENT ,SPC ,RASE ), [_LOWER] = LAYOUT_kc ( @@ -75,7 +91,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_ADJUST] = LAYOUT_kc ( F11 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F12 , ____,RST ,____,____,____,____, ____,____,____,____,____,____, - ____,____,____,____,____,____, ____,QWRT,CLMK,DVRK,____,____, + ____,____,____,____,____,____, ____,QWRT,CLMK,DVRK,WOW ,____, ____,____,____,____,____,____,____, ____,____,____,____,____,____,____, ____,____,____, ____,____,____ ) @@ -86,76 +102,39 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { float tone_qwerty[][2] = SONG(QWERTY_SOUND); #endif -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} - void matrix_init_user(void) { // This will disable the red LEDs on the ProMicros - DDRD &= ~(1<<5); - PORTD &= ~(1<<5); - DDRB &= ~(1<<0); - PORTB &= ~(1<<0); + setPinOutput(D5); + writePinLow(D5); + setPinOutput(B0); + writePinLow(B0); }; +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { - case QWERTY: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_qwerty); - #endif - persistent_default_layer_set(1UL<<_QWERTY); - } - return false; - break; - case COLEMAK: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_colemak); - #endif - persistent_default_layer_set(1UL<<_COLEMAK); - } - return false; - break; case DVORAK: if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_dvorak); - #endif - persistent_default_layer_set(1UL<<_DVORAK); + set_single_persistent_default_layer(_DVORAK); } return false; - break; - case LOWER: + case COLEMAK: if (record->event.pressed) { - layer_on(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); + set_single_persistent_default_layer(_COLEMAK); } return false; - break; - case RAISE: + case QWERTY: if (record->event.pressed) { - layer_on(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); + set_single_persistent_default_layer(_QWERTY); } return false; - break; - case ADJUST: + case WOW: if (record->event.pressed) { - layer_on(_ADJUST); - } else { - layer_off(_ADJUST); + set_single_persistent_default_layer(_WOW); } return false; - break; } return true; -} +} \ No newline at end of file diff --git a/keyboards/kinesis/keymaps/xyverz/keymap.c b/keyboards/kinesis/keymaps/xyverz/keymap.c index 842645d90501..1144d7924ab6 100644 --- a/keyboards/kinesis/keymaps/xyverz/keymap.c +++ b/keyboards/kinesis/keymaps/xyverz/keymap.c @@ -1,26 +1,20 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; - -#define _DVORAK 0 // Dvorak layer -#define _QWERTY 1 // Qwerty layer -#define _COLEMAK 2 // Colemak layer -#define _MEDIA 3 // Media Layer -#define _KEYPAD 4 // Keypad Layer - -enum custom_keycodes { - DVORAK = SAFE_RANGE, - QWERTY, - COLEMAK, - MEDIA, - KEYPAD +enum layer_names { + _DVORAK, + _QWERTY, + _COLEMAK, + _KEYPAD, }; +enum custom_keycodes { DVORAK = SAFE_RANGE, QWERTY, COLEMAK, KEYPAD }; + // Aliases to make the keymap more uniform #define GUI_END GUI_T(KC_END) -#define MED_DEL LT(_MEDIA, KC_DEL) #define KPD_ENT LT(_KEYPAD, KC_ENT) +// clang-format off + /* Function Keys on All Layers (Keypad toggles): @@ -46,9 +40,9 @@ enum custom_keycodes { ,--------------.,--------------. | LCtl | LAlt || RGUI | RCtl | ,------|-------|------||------+-------+-------. - | | Del | Home || PgUp | Enter | | - | BkSp | / |------||------| / | Space | - | | Media | End || PgDn | KeyPd | | + | | | Home || PgUp | Enter | | + | BkSp | Del |------||------| / | Space | + | | | End || PgDn | KeyPd | | `---------------------'`----------------------' QWERTY layer: @@ -66,9 +60,9 @@ enum custom_keycodes { ,--------------.,--------------. | LCtl | LAlt || RGUI | RCtl | ,------|-------|------||------+-------+-------. - | | Del | Home || PgUp | Enter | | - | BkSp | / |------||------| / | Space | - | | Media | End || PgDn | KeyPd | | + | | | Home || PgUp | Enter | | + | BkSp | Del |------||------| / | Space | + | | | End || PgDn | KeyPd | | `---------------------'`----------------------' Colemak layer: @@ -86,31 +80,11 @@ enum custom_keycodes { ,--------------.,--------------. | LCtl | LAlt || RGUI | RCtl | ,------|-------|------||------+-------+-------. - | | Del | Home || PgUp | Enter | | - | BkSp | / |------||------| / | Space | - | | Media | End || PgDn | KeyPd | | + | | | Home || PgUp | Enter | | + | BkSp | Del |------||------| / | Space | + | | | End || PgDn | KeyPd | | `---------------------'`----------------------' - Media layer: - ,-------------------------------------------.,-------------------------------------------. - | F11 | F1 | F2 | F3 | F4 | F5 || F6 | F7 | F8 | F9 | F10 | F12 | - |--------+------+------+------+------+------||------+------+------+------+------+--------| - | | | | | | || | | | | | | - |--------+------+------+------+------+------||------+------+------+------+------+--------| - | | | Mute | Vol- | Vol+ | || | | | | | | - |--------+------+------+------+------+------||------+------+------+------+------+--------| - | | Stop | Prev | Play | Next | Sel || | | | | | | - `--------+------+------+------+------+------'`------+------+------+------+------+--------' - | | | | | | | | | | - `---------------------------' `---------------------------' - ,-------------.,-------------. - | | || | | - ,------|------|------||------+------+------. - | | | || | | | - | | |------||------| | | - | | | || | | | - `--------------------'`--------------------' - Keypad layer: ,-------------------------------------------.,-------------------------------------------. | Power | | | | | || | NmLk | KP = | KP / | KP * | | @@ -145,7 +119,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Left Thumb KC_LCTL, KC_LALT, KC_HOME, - KC_BSPC, MED_DEL, GUI_END, + KC_BSPC, KC_DEL, GUI_END, // Right Hand KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, TG(_KEYPAD), RESET, @@ -171,12 +145,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Left Thumb KC_LCTL, KC_LALT, KC_HOME, - KC_BSPC, MED_DEL, KC_END, + KC_BSPC, KC_DEL, KC_END, // Right Hand KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, TG(_KEYPAD), RESET, - KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, - KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL , + 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, KC_SCLN, KC_QUOT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, @@ -197,12 +171,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Left Thumb KC_LCTL, KC_LALT, KC_HOME, - KC_BSPC, MED_DEL, KC_END, + KC_BSPC, KC_DEL, KC_END, // Right Hand KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, TG(_KEYPAD), RESET, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, - KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL, + KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, @@ -212,32 +186,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_PGDN, KPD_ENT, KC_SPC ), -[_MEDIA] = LAYOUT ( - // Left Hand - _______, _______, _______, _______, _______, _______, _______, _______, _______, - KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, - _______, _______, _______, _______, _______, _______, - _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, - _______, KC_MSTP, KC_MPRV, KC_MPLY, KC_MNXT, KC_MSEL, - _______, _______, _______, _______, - // Left Thumb - _______, _______, - _______, - _______, _______, _______, - - // Right Hand - _______, _______, _______, _______, _______, _______, _______, _______, _______, - KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, - // Right Thumb - _______, _______, - _______, - _______, _______, _______ - ), - [_KEYPAD] = LAYOUT ( // Left Hand _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -251,7 +199,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, - // Right Hand */ + // Right Hand _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_NLCK, KC_PEQL, KC_PSLS, KC_PAST, _______, _______, KC_P7, KC_P8, KC_P9, KC_PMNS, _______, @@ -263,38 +211,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, KC_P0 ) - }; -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} +// clang-format on bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case DVORAK: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_DVORAK); - } - return false; - break; - case QWERTY: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_QWERTY); - } - return false; - break; - case COLEMAK: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_COLEMAK); - } - return false; - break; - } + if (record->event.pressed) { + switch (keycode) { + case DVORAK: + set_single_persistent_default_layer(_DVORAK); + return false; + case QWERTY: + set_single_persistent_default_layer(_QWERTY); + return false; + case COLEMAK: + set_single_persistent_default_layer(_COLEMAK); + return false; + } + } return true; }; // Runs just one time when the keyboard initializes. -void matrix_init_user(void) { -}; +void matrix_init_user(void){}; diff --git a/keyboards/kinesis/keymaps/xyverz/readme.md b/keyboards/kinesis/keymaps/xyverz/readme.md index b55100d25bc6..f8896934c035 100644 --- a/keyboards/kinesis/keymaps/xyverz/readme.md +++ b/keyboards/kinesis/keymaps/xyverz/readme.md @@ -10,6 +10,8 @@ I've enabled persistent keymaps for Qwerty, Dvorak and Colemak layers, similar t Depending on the OS, most of the LEDs are now working in this keymap, but I still have yet to get the Num Pad LED working when switching to the Numpad layer. +Removed the Media layer 2018-12-07 + ## Still to do: * Figure out how to make the Numpad LED work properly. @@ -38,9 +40,9 @@ Depending on the OS, most of the LEDs are now working in this keymap, but I stil ,--------------.,--------------. | LCtl | LAlt || RGUI | RCtl | ,------|-------|------||------+-------+-------. - | | Del | Home || PgUp | Enter | | - | BkSp | / |------||------| / | Space | - | | Media | End || PgDn | KeyPd | | + | | | Home || PgUp | Enter | | + | BkSp | Del |------||------| / | Space | + | | | End || PgDn | KeyPd | | `---------------------'`----------------------' ### Layer 1: QWERTY layer @@ -59,9 +61,9 @@ Depending on the OS, most of the LEDs are now working in this keymap, but I stil ,--------------.,--------------. | LCtl | LAlt || RGUI | RCtl | ,------|-------|------||------+-------+-------. - | | Del | Home || PgUp | Enter | | - | BkSp | / |------||------| / | Space | - | | Media | End || PgDn | KeyPd | | + | | | Home || PgUp | Enter | | + | BkSp | Del |------||------| / | Space | + | | | End || PgDn | KeyPd | | `---------------------'`----------------------' ### Keymap 2: Colemak layer @@ -80,35 +82,12 @@ Depending on the OS, most of the LEDs are now working in this keymap, but I stil ,--------------.,--------------. | LCtl | LAlt || RGUI | RCtl | ,------|-------|------||------+-------+-------. - | | Del | Home || PgUp | Enter | | - | BkSp | / |------||------| / | Space | - | | Media | End || PgDn | KeyPd | | + | | | Home || PgUp | Enter | | + | BkSp | Del |------||------| / | Space | + | | | End || PgDn | KeyPd | | `---------------------'`----------------------' -### layer 3 : Media layer - - ,-------------------------------------------.,-------------------------------------------. - | F11 | F1 | F2 | F3 | F4 | F5 || F6 | F7 | F8 | F9 | F10 | F12 | - |--------+------+------+------+------+------||------+------+------+------+------+--------| - | | | | | | || | | | | | | - |--------+------+------+------+------+------||------+------+------+------+------+--------| - | | | Mute | Vol- | Vol+ | || | | | | | | - |--------+------+------+------+------+------||------+------+------+------+------+--------| - | | Stop | Prev | Play | Next | Sel || | | | | | | - `--------+------+------+------+------+------'`------+------+------+------+------+--------' - | | | | | | | | | | - `---------------------------' `---------------------------' - ,-------------.,-------------. - | | || | | - ,------|------|------||------+------+------. - | | | || | | | - | | |------||------| | | - | | | || | | | - `--------------------'`--------------------' - - - -### Keymap 4: Keypad layer +### layer 3 : Keypad layer ,-------------------------------------------.,-------------------------------------------. | Power | | | | | || | NmLk | KP = | KP / | KP * | | diff --git a/keyboards/minidox/keymaps/xyverz/keymap.c b/keyboards/minidox/keymaps/xyverz/keymap.c index 4863f4f922bd..994ee4e1b41e 100644 --- a/keyboards/minidox/keymaps/xyverz/keymap.c +++ b/keyboards/minidox/keymaps/xyverz/keymap.c @@ -1,44 +1,28 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; +enum layer_names { _QWERTY, _COLEMAK, _DVORAK, _LOWER, _RAISE, _ADJUST }; -// 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 _DVORAK 0 -#define _QWERTY 1 -#define _COLEMAK 2 -#define _LOWER 3 -#define _RAISE 4 -#define _ADJUST 16 - -enum planck_keycodes { - DVORAK = SAFE_RANGE, - QWERTY, - COLEMAK, - LOWER, - RAISE, - BACKLIT -}; +enum custom_keycodes { QWERTY = SAFE_RANGE, COLEMAK, DVORAK, LOWER, RAISE, ADJUST }; // Adding macros to make the keymaps below much easier to read. -#define SFTSCLN SFT_T(KC_SCLN) -#define SFTSLSH SFT_T(KC_SLSH) -#define SFTZED SFT_T(KC_Z) -//#define ALTENT ALT_T(KC_ENT) -//#define ESCTRL CTL_T(KC_ESC) -//#define TABGUI GUI_T(KC_TAB) -#define CTRLQ CTL_T(KC_Q) -#define CTRLV CTL_T(KC_V) -#define ALTJ ALT_T(KC_J) -#define ALTW ALT_T(KC_W) -#define CTRLX CTL_T(KC_X) -#define CTRLDOT CTL_T(KC_DOT) -#define ALTC ALT_T(KC_C) -#define ALTCOMM ALT_T(KC_COMM) -//#define GUIBSPC GUI_T(KC_BSPC) +/* + Visit /~https://github.com/qmk/qmk_firmware/blob/master/docs/feature_advanced_keycodes.md#mod-tap + to read why these macros below are side-aware (LALT, RCTL, etc). +*/ +#define CTLSCLN RCTL_T(KC_SCLN) +#define CTLSLSH LCTL_T(KC_SLSH) +#define RCTLZED RCTL_T(KC_Z) +#define LCTLZED LCTL_T(KC_Z) +#define ALTDOT RALT_T(KC_DOT) +#define ALTX LALT_T(KC_X) +#define ALTQ LALT_T(KC_Q) +#define ALTV RALT_T(KC_V) +#define GUICOMM RGUI_T(KC_COMM) +#define GUIJ LGUI_T(KC_J) +#define GUIC LGUI_T(KC_C) +#define GUIW RGUI_T(KC_W) +// clang-format off const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Dvorak @@ -48,19 +32,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------| |------+------+------+------+------| * | A | O | E | U | I | | D | H | T | N | S | * |------+------+------+------+------| |------+------+------+------+------| - * |SFT/ ;|CTL/ Q|ALT/ J| K | X | | B | M |ALT/ W|CTL/ V|SFT/ Z| + * |CTL/ ;|ALT/ Q|GUI/ J| K | X | | B | M |GUI/ W|ALT/ V|CTL/ Z| * `----------------------------------' `----------------------------------' * ,--------------------. ,------,-------------. - * | LOWER| Gui | | | | Ent |RAISE | - * `-------------| BSpc | | Spc |------+------. + * | LOWER| BSPC | | | | Spc |RAISE | + * `-------------| SHFT | | Ent |------+------. * | | | | * `------' `------' */ [_DVORAK] = LAYOUT ( \ KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, \ KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, \ - SFTSCLN, CTRLQ, ALTJ, KC_K, KC_X, KC_B, KC_M, ALTW, CTRLV, SFTZED, \ - LOWER, KC_LGUI, KC_BSPC, KC_SPC, KC_ENT, RAISE \ + CTLSCLN, ALTQ, GUIJ, KC_K, KC_X, KC_B, KC_M, GUIW, ALTV, RCTLZED, \ + LOWER, KC_BSPC, KC_LSFT, KC_ENT, KC_SPC, RAISE \ ), /* Qwerty @@ -70,19 +54,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------| |------+------+------+------+------| * | A | S | D | F | G | | H | J | K | L | ; | * |------+------+------+------+------| |------+------+------+------+------| - * |SFT/ Z|CTL/ X|ALT/ C| V | B | | N | M |ALT/ ,|CTL/ .|SFT/ /| + * |CTL/ Z|ALT/ X|GUI/ C| V | B | | N | M |GUI/ ,|ALT/ .|CTL/ /| * `----------------------------------' `----------------------------------' * ,--------------------. ,------,-------------. - * | LOWER| Gui | | | | Ent |RAISE | - * `-------------| BSpc | | Spc |------+------. + * | LOWER| BSPC | | | | Spc |RAISE | + * `-------------| SHFT | | Ent |------+------. * | | | | * `------' `------' */ [_QWERTY] = LAYOUT ( \ KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, \ KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, \ - SFTZED, CTRLX, ALTC, KC_V, KC_B, KC_N, KC_M, ALTCOMM, CTRLDOT, SFTSLSH, \ - LOWER, KC_LGUI, KC_BSPC, KC_SPC, KC_ENT, RAISE \ + LCTLZED, ALTX, GUIC, KC_V, KC_B, KC_N, KC_M, GUICOMM, ALTDOT, CTLSLSH, \ + LOWER, KC_BSPC, KC_LSFT, KC_ENT, KC_SPC, RAISE \ ), /* Colemak @@ -92,19 +76,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------| |------+------+------+------+------| * | A | R | S | T | D | | H | N | E | I | S | * |------+------+------+------+------| |------+------+------+------+------| - * |SFT/ Z|CTL/ X|ALT/ C| V | B | | K | M |ALT/ ,|CTL/ .|SFT/ /| + * |CTL/ Z|ALT/ X|GUI/ C| V | B | | K | M |GUI/ ,|ALT/ .|CTL/ /| * `----------------------------------' `----------------------------------' * ,--------------------. ,------,-------------. - * | LOWER| Gui | | | | Ent |RAISE | - * `-------------| BSpc | | Spc |------+------. + * | LOWER| BSPC | | | | Spc |RAISE | + * `-------------| SHFT | | Ent |------+------. * | | | | * `------' `------' */ [_COLEMAK] = LAYOUT ( \ KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, \ KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, \ - SFTZED, CTRLX, ALTC, KC_V, KC_B, KC_K, KC_M, ALTCOMM, CTRLDOT, SFTSLSH, \ - LOWER, KC_LGUI, KC_BSPC, KC_SPC, KC_ENT, RAISE \ + LCTLZED, ALTX, GUIC, KC_V, KC_B, KC_K, KC_M, GUICOMM, ALTDOT, CTLSLSH, \ + LOWER, KC_BSPC, KC_LSFT, KC_ENT, KC_SPC, RAISE \ ), /* Lower @@ -168,65 +152,44 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_ADJUST] = LAYOUT ( \ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_UP, KC_F9, KC_F10, \ - KC_F11, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_F12, \ + KC_F11, RESET, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_F12, \ _______, QWERTY, COLEMAK, DVORAK, _______, RESET, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______ \ -) + ) }; +// clang-format on -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -}; +#ifdef AUDIO_ENABLE +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +#endif void matrix_init_user(void) { - // This will disable the red LEDs on the ProMicros - DDRD &= ~(1<<5); - PORTD &= ~(1<<5); - DDRB &= ~(1<<0); - PORTB &= ~(1<<0); +#ifdef BOOTLOADER_CATERINA + // This will disable the red LEDs on the ProMicros + setPinInput(D5); + writePinLow(D5); + setPinInput(B0); + writePinLow(B0); +#endif }; +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); }; + bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_QWERTY); - } - return false; - break; - case COLEMAK: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_COLEMAK); - } - return false; - break; - case DVORAK: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_DVORAK); - } - return false; - break; - case LOWER: - if (record->event.pressed) { - layer_on(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - case RAISE: - if (record->event.pressed) { - layer_on(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - } + if (record->event.pressed) { + switch (keycode) { + case QWERTY: + set_single_persistent_default_layer(_QWERTY); + return false; + case COLEMAK: + set_single_persistent_default_layer(_COLEMAK); + return false; + case DVORAK: + set_single_persistent_default_layer(_DVORAK); + return false; + } + } return true; -}; +} \ No newline at end of file diff --git a/keyboards/orthodox/keymaps/xyverz/config.h b/keyboards/orthodox/keymaps/xyverz/config.h index fc6d5d23b5a2..a44d2b5aed91 100644 --- a/keyboards/orthodox/keymaps/xyverz/config.h +++ b/keyboards/orthodox/keymaps/xyverz/config.h @@ -19,10 +19,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once /* Use I2C or Serial, not both */ @@ -33,6 +30,4 @@ along with this program. If not, see . #define MASTER_LEFT // #define _MASTER_RIGHT -// #define EE_HANDS - -#endif +// #define EE_HANDS \ No newline at end of file diff --git a/keyboards/orthodox/keymaps/xyverz/keymap.c b/keyboards/orthodox/keymaps/xyverz/keymap.c index df66e0fc5583..cc3c38943b1a 100644 --- a/keyboards/orthodox/keymaps/xyverz/keymap.c +++ b/keyboards/orthodox/keymaps/xyverz/keymap.c @@ -1,50 +1,16 @@ -/* -This is the keymap for the keyboard +#include QMK_KEYBOARD_H -Copyright 2012 Jun Wako -Copyright 2015 Jack Humbert -Copyright 2017 Art Ortenburger +enum layer_names { _QWERTY, _COLEMAK, _DVORAK, _LOWER, _RAISE, _ADJUST }; -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. +enum custom_keycodes { QWERTY = SAFE_RANGE, COLEMAK, DVORAK, LOWER, RAISE, ADJUST }; -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. +// Aliases to keep the keymap tidy +#define ADJUST MO(_ADJUST) +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include QMK_KEYBOARD_H -#include "action_layer.h" -#include "eeconfig.h" - -extern keymap_config_t keymap_config; - -// 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 _DVORAK 0 -#define _QWERTY 1 -#define _COLEMAK 2 -#define _LOWER 3 -#define _RAISE 4 -#define _ADJUST 16 - -enum custom_keycodes { - DVORAK = SAFE_RANGE, - QWERTY, - COLEMAK, - LOWER, - RAISE, - ADJUST, -}; +// clang-format off const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_DVORAK] = LAYOUT ( \ @@ -84,70 +50,40 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) +}; +// clang-format on + +#ifdef AUDIO_ENABLE +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +#endif + +void matrix_init_user(void) { +#ifdef BOOTLOADER_CATERINA + // This will disable the red LEDs on the ProMicros + setPinInput(D5); + writePinLow(D5); + setPinInput(B0); + writePinLow(B0); +#endif }; -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); }; bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); - #endif - persistent_default_layer_set(1UL<<_QWERTY); - } - return false; - break; - case COLEMAK: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); - #endif - persistent_default_layer_set(1UL<<_COLEMAK); - } - return false; - break; - case DVORAK: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_dvorak, false, 0); - #endif - persistent_default_layer_set(1UL<<_DVORAK); - } - return false; - break; - case LOWER: - if (record->event.pressed) { - layer_on(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - case RAISE: - if (record->event.pressed) { - layer_on(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - case ADJUST: - if (record->event.pressed) { - layer_on(_ADJUST); - } else { - layer_off(_ADJUST); - } - return false; - break; - } - return true; -} + if (record->event.pressed) { + switch (keycode) { + case QWERTY: + set_single_persistent_default_layer(_QWERTY); + return false; + case COLEMAK: + set_single_persistent_default_layer(_COLEMAK); + return false; + case DVORAK: + set_single_persistent_default_layer(_DVORAK); + return false; + } + } + return true; +} \ No newline at end of file diff --git a/keyboards/keebio/fourier/keymaps/xyverz/config.h b/keyboards/rgbkb/sol/keymaps/xyverz/config.h similarity index 81% rename from keyboards/keebio/fourier/keymaps/xyverz/config.h rename to keyboards/rgbkb/sol/keymaps/xyverz/config.h index 9b46a61ccdbc..334eee608c67 100644 --- a/keyboards/keebio/fourier/keymaps/xyverz/config.h +++ b/keyboards/rgbkb/sol/keymaps/xyverz/config.h @@ -18,16 +18,9 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once -#include "config_common.h" -/* Use I2C or Serial, not both */ +// place overrides here -#define USE_SERIAL -// #define USE_I2C - -#define EE_HANDS - -#endif +/* #define SSD1306OLED */ diff --git a/keyboards/rgbkb/sol/keymaps/xyverz/keymap.c b/keyboards/rgbkb/sol/keymaps/xyverz/keymap.c new file mode 100644 index 000000000000..f5cf9ed3c81a --- /dev/null +++ b/keyboards/rgbkb/sol/keymaps/xyverz/keymap.c @@ -0,0 +1,330 @@ +#include QMK_KEYBOARD_H +#ifdef PROTOCOL_LUFA +#include "lufa.h" +#include "split_util.h" +#endif +#ifdef SSD1306OLED + #include "common/ssd1306.h" +#endif + +extern keymap_config_t keymap_config; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +extern uint8_t is_master; + +// 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. +enum layer_number { + _DVORAK = 0, + _DESTINY, + _QWERTY, + _COLEMAK, + _LOWER, + _RAISE, + _ADJUST +}; + +enum custom_keycodes { + DVORAK = SAFE_RANGE, + DESTINY, + QWERTY, + COLEMAK, + LOWER, + RAISE, + ADJUST, + BACKLIT, + RGBRST +}; + +enum macro_keycodes { + KC_SAMPLEMACRO, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_DVORAK] = LAYOUT( \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_HOME, KC_PGUP, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, \ + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_END, KC_PGDN, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, \ + KC_RCTL, KC_A, KC_O, KC_E, KC_U, KC_I, XXXXXXX, XXXXXXX, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \ + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, XXXXXXX, XXXXXXX, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, \ + KC_GRV, KC_LGUI, KC_LEFT, KC_RGHT, LOWER, KC_LCTL, KC_LALT, KC_RALT, KC_RCTL, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_RCTL, \ + KC_BSPC, KC_RGUI, KC_ENT, KC_SPC \ + + ), + + [_DESTINY] = LAYOUT( \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_HOME, KC_PGUP, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, \ + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_END, KC_PGDN, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, \ + KC_RCTL, KC_A, KC_O, KC_E, KC_U, KC_I, XXXXXXX, XXXXXXX, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \ + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, XXXXXXX, XXXXXXX, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, \ + KC_GRV, KC_LGUI, KC_LEFT, KC_RGHT, LOWER, KC_LCTL, KC_LALT, KC_RALT, KC_RCTL, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_RCTL, \ + KC_BSPC, KC_RGUI, KC_ENT, KC_SPC \ + + ), + + [_QWERTY] = LAYOUT( \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_HOME, KC_PGUP, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_END, KC_PGDN, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_SLSH, \ + KC_RCTL, KC_A, KC_S, KC_D, KC_F, KC_G, XXXXXXX, XXXXXXX, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, XXXXXXX, XXXXXXX, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + KC_GRV, KC_LGUI, KC_LEFT, KC_RGHT, LOWER, KC_LCTL, KC_LALT, KC_RALT, KC_RCTL, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_RCTL, \ + KC_BSPC, KC_RGUI, KC_ENT, KC_SPC \ + ), + + [_COLEMAK] = LAYOUT( \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_HOME, KC_PGUP, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, \ + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_END, KC_PGDN, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_SLSH, \ + KC_RCTL, KC_A, KC_R, KC_S, KC_T, KC_G, XXXXXXX, XXXXXXX, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_D, KC_V, XXXXXXX, XXXXXXX, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + KC_GRV, KC_LGUI, KC_LEFT, KC_RGHT, LOWER, KC_LCTL, KC_LALT, KC_RALT, KC_RCTL, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_RCTL, \ + KC_BSPC, KC_RGUI, KC_ENT, KC_SPC \ + ), + + [_LOWER] = LAYOUT( \ + KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, XXXXXXX, XXXXXXX, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ + _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_DEL, _______, _______, KC_INS \ + ), + + [_RAISE] = LAYOUT( \ + KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, XXXXXXX, XXXXXXX, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ + _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_DEL, _______, _______, KC_INS \ + ), + + /* ADJUST + * ,------------------------------------------------. ,------------------------------------------------. + * | F11 | F1 | F2 | F3 | F4 | F5 | RESET| | | F6 | F7 | F8 | F9 | F10 | F12 | + * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| + * | | |QWERTY|COLEMK|DVORAK|DESTNY| | | | | PrSc | ScLk | NmLk | | | + * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| + * | | | Mute | Vol- | Vol+ | | | | |RGBTOG|RGBMOD| HUI | SAI | VAI | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | | Prev | Play | Next | | | | | |RGBRMD| HUD | SAD | VAD | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | | | Home | End | | | | | | PgUp | PgDn | | | | + * `------+------+------+------+------+------+------| |------+------+------+------+------+------+------' + * | Del | | | | Ins | + * `-------------' `-------------' + */ + + [_ADJUST] = LAYOUT( \ + _______, _______, _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_NLCK, _______, _______, \ + KC_CAPS, _______, QWERTY, COLEMAK, DVORAK, DESTINY, XXXXXXX, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, \ + _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, _______, RGB_RMOD,RGB_HUD, RGB_SAD, RGB_VAD, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_DEL, _______, _______, KC_INS \ + ) +}; + + + +// define variables for reactive RGB +bool TOG_STATUS = false; +int RGB_current_mode; + +// Setting ADJ layer RGB back to default +void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { + if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) { + #ifdef RGBLIGHT_ENABLE + //rgblight_mode(RGB_current_mode); + #endif + layer_on(layer3); + } else { + layer_off(layer3); + } +} + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + +/* + Commenting this out since I removed the layer, but I want this in here for reference. + + case FN: + if (record->event.pressed) { + //not sure how to have keyboard check mode and set it to a variable, so my work around + //uses another variable that would be set to true after the first time a reactive key is pressed. + if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false + } else { + TOG_STATUS = !TOG_STATUS; + #ifdef RGBLIGHT_ENABLE + //rgblight_mode(15); + #endif + } + layer_on(_FN); + } else { + #ifdef RGBLIGHT_ENABLE + //rgblight_mode(RGB_current_mode); // revert RGB to initial mode prior to RGB mode change + #endif + layer_off(_FN); + TOG_STATUS = false; + } + return false; + break; + */ + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + //led operations - RGB mode change now updates the RGB_current_mode to allow the right RGB mode to be set after reactive keys are released + case RGBRST: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + #endif + break; + } + return true; +} + +void matrix_init_user(void) { + #ifdef RGBLIGHT_ENABLE + RGB_current_mode = rgblight_config.mode; + #endif + //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h + #ifdef SSD1306OLED + iota_gfx_init(!has_usb()); // turns on the display + #endif +} + + +//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h +#ifdef SSD1306OLED + +// hook point for 'led_test' keymap +// 'default' keymap's led_test_init() is empty function, do nothing +// 'led_test' keymap's led_test_init() force rgblight_mode_noeeprom(35); +__attribute__ ((weak)) +void led_test_init(void) {} + +void matrix_scan_user(void) { + led_test_init(); + iota_gfx_task(); // this is what updates the display continuously +} + +void matrix_update(struct CharacterMatrix *dest, + const struct CharacterMatrix *source) { + if (memcmp(dest->display, source->display, sizeof(dest->display))) { + memcpy(dest->display, source->display, sizeof(dest->display)); + dest->dirty = true; + } +} + +//assign the right code to your layers for OLED display +#define L_BASE 0 +#define L_FN (1<<_FN) +#define L_ADJ (1<<_ADJ) + +static void render_logo(struct CharacterMatrix *matrix) { + + static char logo[]={ + 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, + 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, + 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4, + 0}; + matrix_write(matrix, logo); + //matrix_write_P(&matrix, PSTR(" Split keyboard kit")); +} + + + +void render_status(struct CharacterMatrix *matrix) { + + // Render to mode icon + static char logo[][2][3]={{{0x95,0x96,0},{0xb5,0xb6,0}},{{0x97,0x98,0},{0xb7,0xb8,0}}}; + if(keymap_config.swap_lalt_lgui==false){ + matrix_write(matrix, logo[0][0]); + matrix_write_P(matrix, PSTR("\n")); + matrix_write(matrix, logo[0][1]); + }else{ + matrix_write(matrix, logo[1][0]); + matrix_write_P(matrix, PSTR("\n")); + matrix_write(matrix, logo[1][1]); + } + + // Define layers here, Have not worked out how to have text displayed for each layer. Copy down the number you see and add a case for it below + char buf[40]; + snprintf(buf,sizeof(buf), "Undef-%ld", layer_state); + matrix_write_P(matrix, PSTR("\nLayer: ")); + switch (layer_state) { + case L_BASE: + matrix_write_P(matrix, PSTR("Default")); + break; + /* case L_FN: + matrix_write_P(matrix, PSTR("FN")); + break; */ + case L_ADJ: + /* case L_ADJ_TRI: */ + matrix_write_P(matrix, PSTR("ADJ")); + break; + default: + matrix_write(matrix, buf); + } + + // Host Keyboard LED Status + char led[40]; + snprintf(led, sizeof(led), "\n%s %s %s", + (IS_HOST_LED_ON(USB_LED_NUM_LOCK)) ? "NUMLOCK" : " ", + (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) ? "CAPS" : " ", + (IS_HOST_LED_ON(USB_LED_SCROLL_LOCK)) ? "SCLK" : " "); + matrix_write(matrix, led); +} + + +void iota_gfx_task_user(void) { + struct CharacterMatrix matrix; + +#if DEBUG_TO_SCREEN + if (debug_enable) { + return; + } +#endif + + matrix_clear(&matrix); + if(is_master){ + render_status(&matrix); + }else{ + render_logo(&matrix); + } + matrix_update(&display, &matrix); +} + +#endif diff --git a/keyboards/rgbkb/sol/keymaps/xyverz/readme.md b/keyboards/rgbkb/sol/keymaps/xyverz/readme.md new file mode 100644 index 000000000000..485426f8e4eb --- /dev/null +++ b/keyboards/rgbkb/sol/keymaps/xyverz/readme.md @@ -0,0 +1,132 @@ +# Xyverz's Sol Layout +## Layout + +### Base modifier layout +``` + * ,------------------------------------------------. ,------------------------------------------------. + * | ESC | | | | | | - | | = | | | | | | \ | + * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| + * | Tab | | | | | | [ | | ] | | | | | | / | + * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| + * | Del | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * |Shift | | | | | | | | | | | | | |Shift | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | Adj | Alt | ` | Left | Rght | Ctrl | Alt | | Alt | Ctrl | Up | Down | / | = | Adj | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------' + * | BkSp | Win | | Enter| Space| + * `-------------' `-------------' +``` + +### Qwerty alphas +``` + * ,------------------------------------------------. ,------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| + * | | 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 | , | . | / | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | | + * `------+------+------+------+------+------+------| |------+------+------+------+------+------+------' + * | | | | | | + * `-------------' `-------------' +``` + +### Dvorak alphas +``` + * ,------------------------------------------------. ,------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| + * | | " | , | . | P | Y | | | | F | G | C | R | L | | + * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| + * | | A | O | E | U | I | | | | D | H | T | N | S | - | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | ; | Q | J | K | X | | | | B | M | W | V | Z | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | | + * `------+------+------+------+------+------+------| |------+------+------+------+------+------+------' + * | | | | | | + * `-------------' `--------=----' +``` +### Colemak alphas +``` + * ,------------------------------------------------. ,------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| + * | | Q | W | F | P | B | | | | J | L | U | Y | ; | | + * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| + * | | A | R | S | T | G | | | | K | N | E | I | O | ' | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | Z | X | C | D | V | | | | M | H | , | . | / | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | | + * `------+------+------+------+------+------+------| |------+------+------+------+------+------+------' + * | | | | | | + * `-------------' `-------------' +``` + +### Adjust (ADJ) +``` + * ,------------------------------------------------. ,------------------------------------------------. + * | F11 | F1 | F2 | F3 | F4 | F5 | RESET| | | F6 | F7 | F8 | F9 | F10 | F12 | + * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| + * | | |QWERTY|DVORAK|COLEMK| | | | | | PrSc | ScLk | NmLk | | | + * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| + * | | | Mute | Vol- | Vol+ | | | | |RGBTOG|RGBMOD| HUI | SAI | VAI | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | | Prev | Play | Next | | | | | |RGBRMD| HUD | SAD | VAD | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | | | Home | End | | | | | | PgUp | PgDn | | | | + * `------+------+------+------+------+------+------| |------+------+------+------+------+------+------' + * | Del | | | | Ins | + * `-------------' `-------------' +``` + +## Customize + +see `qmk_firmware/keyboards/sol/rev1/keymaps/default/rules.mk` + +``` + +# Variables you can set for SOL + +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = ne # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +RGBLIGHT_ENABLE = yes # Enable global lighting effects. Do not enable with RGB Matrix +LED_ANIMATIONS = yes # LED animations +LED_MIRRORED = no # Mirror LEDs across halves (enable DIP 1 on slave, and DIP 2 and 3 on master) +RGB_MATRIX_ENABLE = no # Enable per-key coordinate based RGB effects. Do not enable with RGBlight +RGB_MATRIX_KEYPRESSES = no # Enable reactive per-key effects. Can be very laggy +RGBLIGHT_FULL_POWER = no # Allow maximum RGB brightness. Otherwise, limited to a safe level for a normal USB-A port +UNICODE_ENABLE = no # Unicode +SWAP_HANDS_ENABLE = no # Enable one-hand typing +ENCODER_ENABLE_CUSTOM = yes # Enable rotary encoder + +OLED_ENABLE = yes # OLED_ENABLE +IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone) + + +``` +## Compile + +go to qmk top directory. +``` +$ cd qmk_firmware +``` + +build +``` +$ make sol:xyverz +``` + +After the initial flash with AVRdudess, you should be able to flash using this: +``` +$ make sol:xyverz:flash +``` diff --git a/keyboards/rgbkb/sol/keymaps/xyverz/rules.mk b/keyboards/rgbkb/sol/keymaps/xyverz/rules.mk new file mode 100644 index 000000000000..bdec5946d6fd --- /dev/null +++ b/keyboards/rgbkb/sol/keymaps/xyverz/rules.mk @@ -0,0 +1,51 @@ +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +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 +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +RGBLIGHT_ENABLE = yes # Enable global lighting effects. Do not enable with RGB Matrix +RGBLIGHT_ANIMATIONS = yes # LED animations +LED_MIRRORED = yes # Mirror LEDs across halves (enable DIP 1 on slave, and DIP 2 and 3 on master) +RGB_MATRIX_ENABLE = no # Enable per-key coordinate based RGB effects. Do not enable with RGBlight +RGB_MATRIX_KEYPRESSES = no # Enable reactive per-key effects. Can be very laggy +RGBLIGHT_FULL_POWER = no # Allow maximum RGB brightness. Otherwise, limited to a safe level for a normal USB-A port +UNICODE_ENABLE = no # Unicode +SWAP_HANDS_ENABLE = no # Enable one-hand typing +ENCODER_ENABLE_CUSTOM = no # Enable rotary encoder +AUDIO_ENABLE = no + +OLED_ENABLE = yes # OLED_ENABLE +IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone) + +# Do not edit past here + +ifeq ($(strip $(OLED_ENABLE)), yes) + OPT_DEFS += -DOLED_ENABLE +endif + +ifeq ($(strip $(ENCODER_ENABLE_CUSTOM)), yes) + OPT_DEFS += -DENCODER_ENABLE_CUSTOM + SRC += common/knob_v2.c + +endif + +ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) + OPT_DEFS += -DIOS_DEVICE_ENABLE + +else ifeq ($(strip $(RGBLIGHT_FULL_POWER)), yes) + OPT_DEFS += -DRGBLIGHT_FULL_POWER +endif + +ifeq ($(strip $(RGB_MATRIX_KEYPRESSES)), yes) + OPT_DEFS += -DRGB_MATRIX_KEYPRESSES +endif + +ifeq ($(strip $(LED_MIRRORED)), yes) + OPT_DEFS += -DLED_MIRRORED +endif \ No newline at end of file diff --git a/keyboards/thevankeyboards/minivan/keymaps/xyverz/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/xyverz/keymap.c index 059b7eb46e29..f5649573d8dc 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/xyverz/keymap.c +++ b/keyboards/thevankeyboards/minivan/keymaps/xyverz/keymap.c @@ -1,24 +1,8 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; +enum layer_names { _QWERTY, _COLEMAK, _DVORAK, _LOWER, _RAISE, _ADJUST }; -enum planck_layers { - _QWERTY, - _COLEMAK, - _DVORAK, - _LOWER, - _RAISE, - _ADJUST -}; - -enum planck_keycodes { - DVORAK = SAFE_RANGE, - QWERTY, - COLEMAK, - LOWER, - RAISE, - ADJUST -}; +enum custom_keycodes { QWERTY = SAFE_RANGE, COLEMAK, DVORAK, LOWER, RAISE, ADJUST }; // Aliases for some other things I want to try out #define RAI_ESC LT(_RAISE, KC_ESC) @@ -26,6 +10,7 @@ enum planck_keycodes { #define LOW_MIN LT(_LOWER, KC_MINS) // Same as above, but for Dvorak layer #define GUIBSPC GUI_T(KC_BSPC) +// clang-format off const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_DVORAK] = LAYOUT( /* 0: Dvorak */ KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, @@ -69,52 +54,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_HOME, KC_END, _______, _______, _______, _______, KC_PGUP, KC_PGDN ) }; +// clang-format on -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); }; bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_QWERTY); - } - return false; - break; - case COLEMAK: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_COLEMAK); - } - return false; - break; - case DVORAK: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_DVORAK); - } - return false; - break; - case LOWER: - if (record->event.pressed) { - layer_on(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - case RAISE: - if (record->event.pressed) { - layer_on(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - } - return true; -} + if (record->event.pressed) { + switch (keycode) { + case QWERTY: + set_single_persistent_default_layer(_QWERTY); + return false; + case COLEMAK: + set_single_persistent_default_layer(_COLEMAK); + return false; + case DVORAK: + set_single_persistent_default_layer(_DVORAK); + return false; + } + } + return true; +} \ No newline at end of file diff --git a/keyboards/gh60/revc/keymaps/xyverz/keymap.c b/layouts/community/60_ansi/xyverz/keymap.c similarity index 83% rename from keyboards/gh60/revc/keymaps/xyverz/keymap.c rename to layouts/community/60_ansi/xyverz/keymap.c index e47fcc2f9436..61176ef2b66b 100644 --- a/keyboards/gh60/revc/keymaps/xyverz/keymap.c +++ b/layouts/community/60_ansi/xyverz/keymap.c @@ -1,23 +1,15 @@ #include QMK_KEYBOARD_H +enum layer_names { + _QW, + _DV, + _CM, + _FL, +}; -extern keymap_config_t keymap_config; - - -// 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 _QW 0 -#define _DV 1 -#define _CM 2 -#define _FL 3 - -// Macro name shortcuts -#define QWERTY M(_QW) -#define DVORAK M(_DV) -#define COLEMAK M(_CM) +enum planck_keycodes { DVORAK = SAFE_RANGE, QWERTY, COLEMAK }; +// clang-format off const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* @@ -113,30 +105,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; +// clang-format on -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - switch(id) { - case _DV: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_DV); - } - break; - case _QW: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_QW); - } - break; - case _CM: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_CM); - } - break; - } - return MACRO_NONE; -}; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch (keycode) { + case DVORAK: + set_single_persistent_default_layer(_DV); + return false; + case QWERTY: + set_single_persistent_default_layer(_QW); + return false; + case COLEMAK: + set_single_persistent_default_layer(_CM); + return false; + } + } + return true; +} \ No newline at end of file diff --git a/layouts/community/66_ansi/xyverz/config.h b/layouts/community/66_ansi/xyverz/config.h new file mode 100644 index 000000000000..06e5830af8f5 --- /dev/null +++ b/layouts/community/66_ansi/xyverz/config.h @@ -0,0 +1,5 @@ +#pragma once + +#define TAPPING_TERM 600 // ms +#undef RGBLIGHT_HUE_STEP +#define RGBLIGHT_HUE_STEP 8 diff --git a/keyboards/clueboard/66/keymaps/xyverz/keymap.c b/layouts/community/66_ansi/xyverz/keymap.c similarity index 86% rename from keyboards/clueboard/66/keymaps/xyverz/keymap.c rename to layouts/community/66_ansi/xyverz/keymap.c index 3341ced918ab..521379bde91c 100644 --- a/keyboards/clueboard/66/keymaps/xyverz/keymap.c +++ b/layouts/community/66_ansi/xyverz/keymap.c @@ -2,20 +2,14 @@ // It's based on the default keymap, but Dvorak! #include QMK_KEYBOARD_H -#include "action_layer.h" -#include "eeconfig.h" -extern keymap_config_t keymap_config; - -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. -#define _QWERTY 0 -#define _COLEMAK 1 -#define _DVORAK 2 -#define _FL 3 -#define _CL 4 +enum layer_names { + _QWERTY, + _DVORAK, + _COLEMAK, + _FL, + _CL +}; enum planck_keycodes { QWERTY = SAFE_RANGE, @@ -27,6 +21,7 @@ enum planck_keycodes { #define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) #define FN_CAPS LT(_FL, KC_CAPS) // Tap for Caps Lock, Hold for Function Layer +// clang-format off const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _QWERTY: Base Layer (Default Layer) * ,-----------------------------------------------------------. ,---. @@ -107,33 +102,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAI, \ _______, _______, _______, _______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), }; - - -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} +// clang-format on bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_QWERTY); - } - return false; - break; - case COLEMAK: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_COLEMAK); - } - return false; - break; - case DVORAK: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_DVORAK); - } - return false; - break; - } - return true; + if (record->event.pressed) { + switch (keycode) { + case QWERTY: + set_single_persistent_default_layer(_QWERTY); + return false; + case DVORAK: + set_single_persistent_default_layer(_DVORAK); + return false; + case COLEMAK: + set_single_persistent_default_layer(_COLEMAK); + return false; + } + } + return true; } diff --git a/layouts/community/66_ansi/xyverz/rules.mk b/layouts/community/66_ansi/xyverz/rules.mk new file mode 100644 index 000000000000..164232f3398c --- /dev/null +++ b/layouts/community/66_ansi/xyverz/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. \ No newline at end of file diff --git a/layouts/community/ortho_4x12/xyverz/keymap.c b/layouts/community/ortho_4x12/xyverz/keymap.c index 681dafacd449..a21c143f008f 100644 --- a/layouts/community/ortho_4x12/xyverz/keymap.c +++ b/layouts/community/ortho_4x12/xyverz/keymap.c @@ -1,34 +1,15 @@ #include QMK_KEYBOARD_H -#include "action_layer.h" -#include "eeconfig.h" -extern keymap_config_t keymap_config; +enum layer_names { _QWERTY, _COLEMAK, _DVORAK, _LOWER, _RAISE, _ADJUST }; -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. -#define _QWERTY 0 -#define _COLEMAK 1 -#define _DVORAK 2 -#define _LOWER 3 -#define _RAISE 4 -#define _ADJUST 16 - -enum custom_keycodes { - QWERTY = SAFE_RANGE, - COLEMAK, - DVORAK, - LOWER, - RAISE, - ADJUST -}; +enum custom_keycodes { QWERTY = SAFE_RANGE, COLEMAK, DVORAK, LOWER, RAISE, ADJUST }; // Aliases to keep the keymap tidy -#define GUIBSPC GUI_T(KC_BSPC) // GUI when held, BSPC when tapped. -#define RGB_SWR RGB_M_SW // Swirl Animation alias -#define RGB_SNK RGB_M_SN // Snake Animation alias +#define GUIBSPC GUI_T(KC_BSPC) // GUI when held, BSPC when tapped. +#define RGB_SWR RGB_M_SW // Swirl Animation alias +#define RGB_SNK RGB_M_SN // Snake Animation alias +// clang-format off const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty @@ -47,7 +28,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_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_LALT, KC_LEFT, KC_RGHT, LOWER, GUIBSPC, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT \ -), + ), /* Colemak * ,-----------------------------------------------------------------------------------. @@ -65,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUIBSPC, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT \ -), + ), /* Dvorak * ,-----------------------------------------------------------------------------------. @@ -83,7 +64,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \ KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, \ KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUIBSPC, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT \ -), + ), /* Lower * ,-----------------------------------------------------------------------------------. @@ -101,7 +82,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, \ BL_STEP, _______, KC_HOME, KC_END, _______, KC_DEL, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ \ -), + ), /* Raise * ,-----------------------------------------------------------------------------------. @@ -119,7 +100,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, \ BL_STEP, _______, KC_HOME, KC_END, _______, KC_DEL, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ \ -), + ), /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. @@ -137,77 +118,41 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, RESET, RGB_M_P, RGB_M_B, RGB_M_R, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ RGB_TOG, RGB_MOD, RGB_SWR, RGB_M_K, RGB_M_G, RGB_HUI, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ -) - - + ) }; +// clang-format on -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} +#ifdef AUDIO_ENABLE +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +#endif void matrix_init_user(void) { #ifdef BOOTLOADER_CATERINA - // This will disable the red LEDs on the ProMicros - DDRD &= ~(1<<5); - PORTD &= ~(1<<5); - DDRB &= ~(1<<0); - PORTB &= ~(1<<0); + // This will disable the red LEDs on the ProMicros + setPinInput(D5); + writePinLow(D5); + setPinInput(B0); + writePinLow(B0); #endif }; +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); }; + bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_QWERTY); - } - return false; - break; - case COLEMAK: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_COLEMAK); - } - return false; - break; - case DVORAK: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_DVORAK); - } - return false; - break; - case LOWER: - if (record->event.pressed) { - layer_on(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - case RAISE: - if (record->event.pressed) { - layer_on(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; -/* case BACKLIT: - if (record->event.pressed) { - register_code(KC_RSFT); - #ifdef BACKLIGHT_ENABLE - backlight_step(); - #endif - } else { - unregister_code(KC_RSFT); - } - return false; - break; */ - } - return true; -} + if (record->event.pressed) { + switch (keycode) { + case QWERTY: + set_single_persistent_default_layer(_QWERTY); + return false; + case COLEMAK: + set_single_persistent_default_layer(_COLEMAK); + return false; + case DVORAK: + set_single_persistent_default_layer(_DVORAK); + return false; + } + } + return true; +} \ No newline at end of file diff --git a/layouts/community/ortho_4x12/xyverz/readme.md b/layouts/community/ortho_4x12/xyverz/readme.md index 1ec10a0da633..d6614d956dd7 100644 --- a/layouts/community/ortho_4x12/xyverz/readme.md +++ b/layouts/community/ortho_4x12/xyverz/readme.md @@ -8,6 +8,7 @@ This revision includes this documentation and introduction of the individual RGB ## Still to do: + * Update layout files to match current standards. * Enjoy this revision; figure out new things later. ### Qwerty layer diff --git a/layouts/community/ortho_5x12/xyverz/keymap.c b/layouts/community/ortho_5x12/xyverz/keymap.c index bbf1d7bb0eae..2cca237bbe69 100644 --- a/layouts/community/ortho_5x12/xyverz/keymap.c +++ b/layouts/community/ortho_5x12/xyverz/keymap.c @@ -1,34 +1,15 @@ #include QMK_KEYBOARD_H -#include "action_layer.h" -#include "eeconfig.h" -extern keymap_config_t keymap_config; +enum layer_names { _QWERTY, _COLEMAK, _DVORAK, _LOWER, _RAISE, _ADJUST }; -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. -#define _QWERTY 0 -#define _COLEMAK 1 -#define _DVORAK 2 -#define _LOWER 3 -#define _RAISE 4 -#define _ADJUST 16 - -enum custom_keycodes { - QWERTY = SAFE_RANGE, - COLEMAK, - DVORAK, - LOWER, - RAISE, - ADJUST, -}; +enum custom_keycodes { QWERTY = SAFE_RANGE, COLEMAK, DVORAK, LOWER, RAISE, ADJUST }; // Aliases to keep the keymap tidy -#define GUIBSPC GUI_T(KC_BSPC) // GUI when held, BSPC when tapped. -#define RGB_SWR RGB_M_SW // Swirl Animation alias -#define RGB_SNK RGB_M_SN // Snake Animation alias +#define GUIBSPC GUI_T(KC_BSPC) // GUI when held, BSPC when tapped. +#define RGB_SWR RGB_M_SW // Swirl Animation alias +#define RGB_SNK RGB_M_SN // Snake Animation alias +// clang-format off const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty @@ -50,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_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_LALT, KC_LEFT, KC_RGHT, LOWER, GUIBSPC, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT \ -), + ), /* Colemak * ,-----------------------------------------------------------------------------------. @@ -71,7 +52,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUIBSPC, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT \ -), + ), /* Dvorak * ,-----------------------------------------------------------------------------------. @@ -92,7 +73,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \ KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, \ KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUIBSPC, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT \ -), + ), /* Lower * ,-----------------------------------------------------------------------------------. @@ -113,7 +94,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, KC_PLUS, KC_LCBR, KC_RCBR, _______, \ _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, \ BL_STEP, _______, KC_HOME, KC_END, _______, KC_DEL, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ \ -), + ), /* Raise * ,-----------------------------------------------------------------------------------. @@ -134,7 +115,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, KC_EQL, KC_LBRC, KC_RBRC, _______, \ _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, \ BL_STEP, _______, KC_HOME, KC_END, _______, KC_DEL, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ \ -), + ), /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. @@ -155,92 +136,42 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, RGB_M_P, RGB_M_B, RGB_M_R, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ RGB_TOG, RGB_MOD, RGB_SWR, RGB_M_K, RGB_M_G, RGB_HUI, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ -) - - + ) }; +// clang-format on + #ifdef AUDIO_ENABLE float tone_qwerty[][2] = SONG(QWERTY_SOUND); float tone_dvorak[][2] = SONG(DVORAK_SOUND); float tone_colemak[][2] = SONG(COLEMAK_SOUND); #endif -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} - void matrix_init_user(void) { #ifdef BOOTLOADER_CATERINA - // This will disable the red LEDs on the ProMicros - DDRD &= ~(1<<5); - PORTD &= ~(1<<5); - DDRB &= ~(1<<0); - PORTB &= ~(1<<0); + // This will disable the red LEDs on the ProMicros + setPinInput(D5); + writePinLow(D5); + setPinInput(B0); + writePinLow(B0); #endif }; +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); }; + bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); - #endif - persistent_default_layer_set(1UL<<_QWERTY); - } - return false; - break; - case COLEMAK: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); - #endif - persistent_default_layer_set(1UL<<_COLEMAK); - } - return false; - break; - case DVORAK: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_dvorak, false, 0); - #endif - persistent_default_layer_set(1UL<<_DVORAK); - } - return false; - break; - case LOWER: - if (record->event.pressed) { - layer_on(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - case RAISE: - if (record->event.pressed) { - layer_on(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; -/* case BACKLIT: - if (record->event.pressed) { - register_code(KC_RSFT); - #ifdef BACKLIGHT_ENABLE - backlight_step(); - #endif - } else { - unregister_code(KC_RSFT); - } - return false; - break; */ - } - return true; -} + if (record->event.pressed) { + switch (keycode) { + case QWERTY: + set_single_persistent_default_layer(_QWERTY); + return false; + case COLEMAK: + set_single_persistent_default_layer(_COLEMAK); + return false; + case DVORAK: + set_single_persistent_default_layer(_DVORAK); + return false; + } + } + return true; +} \ No newline at end of file diff --git a/keyboards/phantom/keymaps/xyverz/keymap.c b/layouts/community/tkl_ansi/xyverz/keymap.c similarity index 76% rename from keyboards/phantom/keymaps/xyverz/keymap.c rename to layouts/community/tkl_ansi/xyverz/keymap.c index 07a743c164f7..1f79f87d1bff 100644 --- a/keyboards/phantom/keymaps/xyverz/keymap.c +++ b/layouts/community/tkl_ansi/xyverz/keymap.c @@ -1,25 +1,15 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; - - -// Used for SHIFT_ESC -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) - -// 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 _QW 0 -#define _DV 1 -#define _CM 2 -#define _FL 3 +enum layer_names { + _QW, + _DV, + _CM, + _FL, +}; -// Macro name shortcuts -#define QWERTY M(_QW) -#define DVORAK M(_DV) -#define COLEMAK M(_CM) +enum planck_keycodes { DVORAK = SAFE_RANGE, QWERTY, COLEMAK }; +// clang-format off const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QW] = LAYOUT_tkl_ansi( /* Layer 0: Qwerty */ \ @@ -59,34 +49,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; +// clang-format on -enum function_id { - SHIFT_ESC, -}; - -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - switch(id) { - case _DV: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_DV); - } - break; - case _QW: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_QW); - } - break; - case _CM: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_CM); - } - break; - } - return MACRO_NONE; -}; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch (keycode) { + case DVORAK: + set_single_persistent_default_layer(_DV); + return false; + case QWERTY: + set_single_persistent_default_layer(_QW); + return false; + case COLEMAK: + set_single_persistent_default_layer(_CM); + return false; + } + } + return true; +} \ No newline at end of file diff --git a/layouts/community/tkl_ansi/xyverz/readme.md b/layouts/community/tkl_ansi/xyverz/readme.md new file mode 100644 index 000000000000..b67b1385dd68 --- /dev/null +++ b/layouts/community/tkl_ansi/xyverz/readme.md @@ -0,0 +1 @@ +2019-10-16 Updated to bring keymap up to current. From 4fef3b23e4d9507cf5d6f26a845f5230d057827e Mon Sep 17 00:00:00 2001 From: Nikita Titov Date: Tue, 29 Oct 2019 02:22:58 +0300 Subject: [PATCH 202/316] [Docs] started Russian translation of Newbs Guide (partial) (#6967) * started Russian translation * added translation of some newbs docs * do not translate firmware word in name and transliterate names keeping original ones in brackets * addressed review comments * addressed more review comments Co-Authored-By: nabokovas --- docs/_langs.md | 1 + docs/ru-ru/README.md | 32 +++++ docs/ru-ru/getting_started_build_tools.md | 168 ++++++++++++++++++++++ docs/ru-ru/newbs.md | 23 +++ docs/ru-ru/newbs_getting_started.md | 102 +++++++++++++ 5 files changed, 326 insertions(+) create mode 100644 docs/ru-ru/README.md create mode 100644 docs/ru-ru/getting_started_build_tools.md create mode 100644 docs/ru-ru/newbs.md create mode 100644 docs/ru-ru/newbs_getting_started.md diff --git a/docs/_langs.md b/docs/_langs.md index c91e0d93fc52..2a4caf66ffce 100644 --- a/docs/_langs.md +++ b/docs/_langs.md @@ -2,3 +2,4 @@ - [:uk: English](/) - [:cn: 中文](/zh-cn/) - [:fr: Français](/fr-fr/) + - [:ru: Русский](/ru-ru/) diff --git a/docs/ru-ru/README.md b/docs/ru-ru/README.md new file mode 100644 index 000000000000..366a76036e4d --- /dev/null +++ b/docs/ru-ru/README.md @@ -0,0 +1,32 @@ +# Quantum Mechanical Keyboard Firmware + +[![Current Version](https://img.shields.io/github/tag/qmk/qmk_firmware.svg)](/~https://github.com/qmk/qmk_firmware/tags) +[![Build Status](https://travis-ci.org/qmk/qmk_firmware.svg?branch=master)](https://travis-ci.org/qmk/qmk_firmware) +[![Discord](https://img.shields.io/discord/440868230475677696.svg)](https://discord.gg/Uq7gcHh) +[![Docs Status](https://img.shields.io/badge/docs-ready-orange.svg)](https://docs.qmk.fm) +[![GitHub contributors](https://img.shields.io/github/contributors/qmk/qmk_firmware.svg)](/~https://github.com/qmk/qmk_firmware/pulse/monthly) +[![GitHub forks](https://img.shields.io/github/forks/qmk/qmk_firmware.svg?style=social&label=Fork)](/~https://github.com/qmk/qmk_firmware/) + +## Что такое QMK Firmware? + +QMK (*Quantum Mechanical Keyboard*) — это сообщество, работающее над ПО с открытым исходным кодом, которое разрабатывает QMK Firmware, QMK Toolbox, qmk.fm и эту документацию. QMK Firmware — это прошивка для клавиатур, основанная на [tmk\_keyboard](http://github.com/tmk/tmk_keyboard) с множеством полезных функций для микроконтроллеров Atmel AVR, а именно, для продуктов компаний [OLKB](http://olkb.com), [ErgoDox EZ](http://www.ergodox-ez.com) и [Clueboard](http://clueboard.co/). Она также была портирована на чипы ARM при помощи ChibiOS. Вы можете использовать ее для клавиатуры, собранной вручную или имеющей нестандартную печатную плату. + +## Как скачать + +Если вы собираетесь добавить раскладку, клавиатуру или новые функции в QMK, то самый простой путь реализации — это [сделать форк репозитория на GitHub](/~https://github.com/qmk/qmk_firmware#fork-destination-box), клонировать ваш репозиторий локально для дальнейшего внесения изменений, сделать пуш изменений, а затем открыть [пулреквест](/~https://github.com/qmk/qmk_firmware/pulls) из вашего форка. + +Также вы можете либо скачать репозиторий ([zip](/~https://github.com/qmk/qmk_firmware/zipball/master), [tar](/~https://github.com/qmk/qmk_firmware/tarball/master)), либо клонировать его через git (`git@github.com:qmk/qmk_firmware.git`) или https (`/~https://github.com/qmk/qmk_firmware.git`). + +## Как скомпилировать + +Перед компиляцией вам необходимо [настроить окружение](ru-ru/getting_started_build_tools.md) разработчика для AVR или/и ARM. После этого используйте команду `make` со следующим синтаксисом, чтобы собрать клавиатуру и раскладку: + + make planck/rev4:default + +Данная команда соберет ревизию `rev4` клавиатуры `planck` с раскладкой `default`. Не все клавиатуры имеют ревизии (они также называются subprojects или folders), в этом случае она может быть опущена: + + make preonic:default + +## Как настроить + +QMK обладает множеством [функций](ru-ru/features.md) для исследования, и [справочная документация](http://docs.qmk.fm) может стать хорошей отправной точкой для знакомства с ними. Большинством функций можно воспользоваться модифицируя [раскладку](ru-ru/keymap.md) и изменяя [коды клавиш](ru-ru/keycodes.md). diff --git a/docs/ru-ru/getting_started_build_tools.md b/docs/ru-ru/getting_started_build_tools.md new file mode 100644 index 000000000000..f590685339a4 --- /dev/null +++ b/docs/ru-ru/getting_started_build_tools.md @@ -0,0 +1,168 @@ +# Установка инструментов для сборки + +Данная страница описывает процесс установки окружения для сборки QMK. Эти инструкции относятся к процессорам AVR (таким как atmega32u4). + + + +**Примечание:** Если вы здесь впервые, ознакомьтесь с [Руководством для полных новичков](ru-ru/newbs.md). + +Прежде, чем продолжить, убедитесь, что у вас обновлены подмодули (сторонние библиотеки), выполнив `make git-submodule`. + +## Linux + +Чтобы всегда быть уверенными, что у вас установлены последние версии ПО, можно просто выполнить команду `sudo util/qmk_install.sh`. Она должна установить все необходимые зависимости. **Это выполнит `apt-get upgrade`.** + +Вы также можете устанавливать все вручную, но в данной документации список требований может не всегда быть актуальным. + +Текущие требования представлены ниже, но не все они могут быть необходимы, так как зависят от того, что вы делаете. Также стоит отметить, что в некоторых системах не все зависимости доступны в виде пакетов, или они могут называться по-другому. + +``` +build-essential +gcc +unzip +wget +zip +gcc-avr +binutils-avr +avr-libc +dfu-programmer +dfu-util +gcc-arm-none-eabi +binutils-arm-none-eabi +libnewlib-arm-none-eabi +git +``` + +Установите все зависимости при помощи вашего любимого менеджера пакетов. + +Пример для Debian / Ubuntu: + + sudo apt-get update + sudo apt-get install gcc unzip wget zip gcc-avr binutils-avr avr-libc dfu-programmer dfu-util gcc-arm-none-eabi binutils-arm-none-eabi libnewlib-arm-none-eabi + +Пример для Fedora / Red Hat: + + sudo dnf install gcc unzip wget zip dfu-util dfu-programmer avr-gcc avr-libc binutils-avr32-linux-gnu arm-none-eabi-gcc-cs arm-none-eabi-binutils-cs arm-none-eabi-newlib + +Пример для Arch / Manjaro: + + pacman -S base-devel gcc unzip wget zip avr-gcc avr-binutils avr-libc dfu-util arm-none-eabi-gcc arm-none-eabi-binutils arm-none-eabi-newlib git dfu-programmer dfu-util + +## Nix + +Если вы используете [NixOS](https://nixos.org/), или у вас установлена Nix в Linux или macOS, выполните `nix-shell` из корня репозитория, чтобы настроить окружение для сборки. + +По умолчанию, это скачает компиляторы для AVR и ARM. Если вам не нужны они оба, отключите `avr` или `arm` с помощью аргумента, например: + + nix-shell --arg arm false + +## macOS + +Если вы пользуетесь [Homebrew](https://brew.sh/), вы можете использовать следующие команды: + + brew tap osx-cross/avr + brew tap PX4/homebrew-px4 + brew update + brew install avr-gcc@8 + brew link --force avr-gcc@8 + brew install dfu-programmer + brew install dfu-util + brew install gcc-arm-none-eabi + brew install avrdude + +Данный метод является рекомендуемым. Если у вас нет Homebrew, [установите его!](http://brew.sh/) Он очень сильно пригодится тем, кто работает с командной строкой. Стоит отметить, что часть с `make` и `make install` во время установки `avr-gcc@8` из Homebrew может занимать более 20 минут и сильно нагружать CPU. + +## Windows с MSYS2 (рекомендуется) + +Наилучшим окружение для Windows Vista и всех последующих версий (тестировалось с 7 и 10) является [MSYS2](https://www.msys2.org). + +* Для установки MSYS2, скачайте его и следуйте дальнейшим указаниям отсюда: http://www.msys2.org +* Откройте ``MSYS2 MingGW 64-bit`` ярлык +* Перейдите в свой репозиторий QMK. Например, если он находится в корне вашего диска C: + * `$ cd /c/qmk_firmware` +* Запустите `util/qmk_install.sh` и следуйте подсказкам + +## Windows 10 (устарело) + +Это устаревшие инструкции для Windows 10. Мы рекомендуем использовать [MSYS2, как сказано выше](#windows-с-msys2-рекомендуется). + +### Обновление для дизайнеров (Creators Update) + +Если у вас Windows 10 с Обновлением для дизайнеров или новее, вы можете собрать прошивку и прошить ей напрямую. До Обновления для дизайнеров было возможно только собрать прошивку. Если у вас его еще нет, или вы не уверены, следуйте [этим инструкциям](https://support.microsoft.com/en-us/instantanswers/d4efb316-79f0-1aa1-9ef3-dcada78f3fa0/get-the-windows-10-creators-update). + +### Подсистема Windows для Linux (Windows Subsystem for Linux, WSL) + +В дополнение к Обновлению для дизайнеров вам необходима подсистема Windows для Linux, поэтому установите ее, следуя [иснтрукциям здесь](http://www.howtogeek.com/249966/how-to-install-and-use-the-linux-bash-shell-on-windows-10/). Если у вас уже есть подсистема Windows для Linux из Юбилейного обновления (Anniversary update), рекомендуется ее [обновить](https://betanews.com/2017/04/14/upgrade-windows-subsystem-for-linux/) до 16.04LTS, потому что некоторые клавиатуры не компилируются с набором инструментов из 14.04LTS. Стоит отметить, что вы четко должны понимать, что вы делаете, если выбрали метод `sudo do-release-upgrade`. + +### Git + +Если вы уже клонировали репозиторий в файловую систему Windows, вы можете пропустить данную секцию. + +Вам нужно клонировать репозиторий в файловую систему Windows при помощи обычного Git для Windows, а **не** WSL Git. Так что, если вы ещё не установили Git, [скачайте](https://git-scm.com/download/win) и установите его. Затем [настройте его](https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup). Важно указать свой адрес электронной почты и имя пользователя, особенно если вы планируете вносить свой вклад в проект. + +Как только Git будет установлен, откройте командную строку Git Bash и поменяйте директорию на ту, в которую хотите клонировать QMK; обратите внимание, что вы должны использовать косую черту, и что доступ к вашему диску C осуществляется примерно так: `/c/path/to/where/you/want/to/go`. Затем выполните `git clone --recurse-submodules /~https://github.com/qmk/qmk_firmware`, это создаст новую папку `qmk_firmware` в текущей директории. + +### Установка инструментов (Toolchain) + +Установка инструментов (Toolchain) осуществляется через подсистему Windows для Linux, и процесс полностью автоматизирован. Если вы хотите выполнить установку вручную, то не существует никакой другой инструкции помимо самого скрипта. Однако, вы всегда можете открыть ишью и запросить дополнительную информацию. + +1. Откройте "Bash On Ubuntu On Windows" в меню Пуск. +2. Перейдите в папку, в которую клонирована `qmk_firmware`. Обратите внимание, что пути начинаются с `/mnt/` в WSL, так что вы должны написать, например, `cd /mnt/c/path/to/qmk_firmware`. +3. Запустите `util/wsl_install.sh` и следуйте инструкциям на экране. +4. Закройте окно командной строки Bash, и откройте его снова. +5. Все готово, чтобы скомпилировать прошивку и прошить ей! + +### Несколько важных вещей, которые надо запомнить + +* Вы можете запустить `util/wsl_install.sh` еще раз, чтобы установить все последние обновления. +* Ваш репозиторий QMK должен находиться в файловой системе Windows, поскольку WSL не может запускать выполняемые файлы извне. +* WSL Git **не** совместим с Windows Git, поэтому используйте Windows Git Bash или Windows Git GUI для всех операций с Git. +* Вы можете изменять файлы как внутри WSL, так и просто через Windows. Но обратите внимание, что если вы изменяете makefiles или сценарии командной строки, вы должны убедиться, что используете текстовый редактор, который сохраняет файлы с переводом строки в стиле Unix (Unix line endings). В противном случае компиляция может не работать. + +## Windows (Vista и новее) (устарело) + +Это устаревшие инструкции для Windows Vista и более новых версий. Мы рекомендуем использовать [MSYS2, как сказано выше](#windows-с-msys2-рекомендуется). + +1. Если вы когда-то устанавливали WinAVR, удалите его. +2. Установите [MHV AVR Tools](https://infernoembedded.com/sites/default/files/project/MHV_AVR_Tools_20131101.exe). Отключите smatch, но **оставьте галочку напротив опции добавления инструмента в PATH**. +3. Если вы собираетесь прошивать клавиатуры на базе Infinity, вам нужно установить dfu-util. Обратитесь к инструкциям от [Input Club](/~https://github.com/kiibohd/controller/wiki/Loading-DFU-Firmware). +4. Установите [MinGW](https://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download). Во время установки отключите опцию установки графического пользовательского интерфейса. **НЕ ИЗМЕНЯЙТЕ директорию для установки по умолчанию.** Скрипты зависят от расположения по умолчанию. +5. Выполните клонирование данного репозитория. [Эта ссылка скачает его в виде zip-файла, который вам нужно будет разархивировать.](/~https://github.com/qmk/qmk_firmware/archive/master.zip) Откройте извлеченную папку в проводнике Windows. +6. Перейдите в папку `\util`. +7. Запустите двойным щелчком пакетный файл сценария `1-setup-path-win`. Вам нужно будет согласиться с уведомлением контроля учетных записей пользователей (User Account Control, UAC). Нажмите пробел, чтобы закрыть появившееся сообщение об успешном выполнении операции в командной строке. +8. Кликните правой кнопкой по пакетному файлу сценария `2-setup-environment-win`, выберите "Запуск от имени администратора" и согласитесь с уведомлением UAC. Это может занять пару минут, и вам потребуется подтвердить установку драйвера. Как только сценарий завершит свою работу, ваше окружение будет готово! + +Если у вас возникли проблемы и вам нужна помощь, будет полезно сгенерировать файл *Win_Check_Output.txt*, запустив `Win_Check.bat` в папке `\util`. + +## Docker + +Если это немного сложновато для вас, Docker может стать готовым решением, которое вы ищите. После установки [Docker CE](https://docs.docker.com/install/#supported-platforms) выполните следующую команду из директории `qmk_firmware`, чтобы собрать клавиатуру/раскладку: + +```bash +util/docker_build.sh keyboard:keymap +# Например: util/docker_build.sh ergodox_ez:steno +``` + +Это скомпилирует указанную клавиатуру/раскладку и создаст для вас `.hex` или `.bin` файл с результатом, готовым к процессу прошивки, в директории QMK. Если опустить `:keymap`, будет использована раскладка `default`. Заметьте, что формат параметров такой же, как и в случае сборки командой `make`. + +Вы также можете запустить скрипт без параметров. Тогда он попросит вас ввести поочередно параметры сборки. Возможно, вам это покажется более удобным: + +```bash +util/docker_build.sh +# Читает параметры из пользовательского ввода (оставьте пустым для значений по умолчанию) +``` + +Также имеется поддержка сборки _и_ прошивки клавиатуры прямо из Docker. Для этого укажите еще один параметр `target`: + +```bash +util/docker_build.sh keyboard:keymap:target +# Например: util/docker_build.sh planck/rev6:default:dfu-util +``` + +Если вы используете Linux, это должно работать прямо из коробки. На Windows и macOS это требует запуска [Docker Machine](http://gw.tnode.com/docker/docker-machine-with-usb-support-on-windows-macos/). Ее довольно утомительно настраивать, поэтому мы не рекомендуем это; используйте вместо этого [QMK Toolbox](/~https://github.com/qmk/qmk_toolbox). + +!> Docker для Windows требует включения [Hyper-V](https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v). Это означает, что он не работает на версиях Windows без Hyper-V, например, на Windows 7, Windows 8 и **Windows 10 Home**. + +## Vagrant + +Если у вас возникли проблемы при сборке прошивки, вы можете попробовать установить инструмент под названием Vagrant. Он сконфигурирует виртуальный компьютер с такими параметрами, которые подходят для сборки прошивки. У OLKB НЕТ файлов такого виртуально компьютера. Подробности о том, как настроить Vagrant, можно найти в [Руководстве по Vagrant](ru-ru/getting_started_vagrant.md). diff --git a/docs/ru-ru/newbs.md b/docs/ru-ru/newbs.md new file mode 100644 index 000000000000..0e7bd6499cac --- /dev/null +++ b/docs/ru-ru/newbs.md @@ -0,0 +1,23 @@ +# Руководство по QMK для полных новичков + +QMK ― это мощная прошивка с открытым исходным кодом для вашей механической клавиатуры. Вы можете использовать QMK для легкой и мощной персонализации своей клавиатуры. Люди с разным уровнем умений, от совсем новичков до крутых программистов, успешно применяли QMK, чтобы персонализировать свои клавиатуры. Данное руководство поможет вам сделать то же самое, независимо от уровня вашего мастерства. + +Не уверены, поддерживает ли ваша клавиатура QMK? Если это механическая клавиатура, которую вы собрали сами, шансы достаточно велики. Мы поддерживаем [большое число любительских клавиатур](https://qmk.fm/keyboards/), поэтому, даже если ваша текущая клавиатура не совместима с QMK, у вас не должно возникнуть проблем с нахождением подходящей для ваших нужд. + +## Обзор + +В данном руководстве 7 основных секций: + +* [Первое знакомство](ru-ru/newbs_getting_started.md) +* [Собираем вашу первую прошивку с помощью командной строки](ru-ru/newbs_building_firmware.md) +* [Собираем вашу первую прошивку с помощью онлайн GUI](ru-ru/newbs_building_firmware_configurator.md) +* [Прошиваем файл прошивки](ru-ru/newbs_flashing.md) +* [Тестируем и отлаживаем](ru-ru/newbs_testing_debugging.md) +* [Лучшие практики по Git](ru-ru/newbs_best_practices.md) +* [Узнайте больше на этих ресурсах](ru-ru/newbs_learn_more_resources.md) + +Данное руководство сосредоточено на помощи тем, кто никогда раньше не компилировал ПО. Приятие решений и рекомендации делаются с учетом именно этого. Существует много альтернативных методов для описанных процедур, и мы поддерживаем большинство из них. Если у вас есть сомнения о том, как выполнить задачу, вы можете [попросить у нас совета](ru-ru/getting_started_getting_help.md). + +## Дополнительные ресурсы + +* [Блог Томаса Баарта (Thomas Baart) об основах QMK](https://thomasbaart.nl/category/mechanical-keyboards/firmware/qmk/qmk-basics/) – Созданный пользователем блог, охватывающий основы использования QMK Firmware с точки зрения нового пользователя. diff --git a/docs/ru-ru/newbs_getting_started.md b/docs/ru-ru/newbs_getting_started.md new file mode 100644 index 000000000000..a301e9adba5e --- /dev/null +++ b/docs/ru-ru/newbs_getting_started.md @@ -0,0 +1,102 @@ +# Введение + +У вашей компьютерной клавиатуры внутри есть процессор, похожий на тот, что внутри вашего компьютера. Этот процессор выполняет программное обеспечение, которое отвечает за обнаружение нажатий клавиш и отсылку сигналов состояния клавиатуры, когда клавиши нажимаются и отпускаются. Роль такого ПО выполняет QMK, детектируя нажатия клавиш и отсылая эту информацию главному компьютеру. Сбор собственной раскладки эквивалентен сборке выполняемой программы для вашей клавиатуры. + +QMK старается дать вам большую силу, оставляя простые вещи легкими и делай сложные — возможными. Вам не надо уметь программировать, чтобы создавать мощные прошивки — вам только надо следовать нескольким простым синтаксическим правилам. + +# Первое знакомство + +Перед тем, как вы сможете собирать раскладки, вам необходимо установить некоторое программное обеспечение и настроить ваше окружение для сборки. Это нужно сделать только один раз, вне зависимости от того, для скольких клавиатур вы планируете компилировать прошивки. + +Если вы предпочитаете графический пользовательский интерфейс, пожалуйста, рассмотрите возможность использования онлайн [QMK Конфигуратора](https://config.qmk.fm). Пожалуйста, обратитесь к [Собираем вашу первую прошивку с помощью онлайн GUI](ru-ru/newbs_building_firmware_configurator.md). + + +## Загрузка ПО + +### Текстовый редактор + +Вам понадобится программа, умеющая редактировать и сохранять **обычные текстовые** файлы. Если вы используете Windows, вы можете делать это Блокнотом, а в Linux вы можете использовать gedit. Обе программы являются простыми, но функциональными редакторами. В macOS остерегайтесь стандартного приложения TextEdit: он не будет сохранять обычные текстовые файлы, пока вы явно не выберите _Make Plain Text_ из меню _Format_. + +Вы также можете скачать и установить отдельный текстовый редактор наподобие [Sublime Text](https://www.sublimetext.com/) или [VS Code](https://code.visualstudio.com/). Возможно, это наилучший вариант независимо от платформы, поскольку эти программы сделаны специально для редактирования кода. + +?> Не уверены, какой выбрать текстовый редактор? Лоуренс Брэдфорд (Laurence Bradford) написал [отличное введение](https://learntocodewith.me/programming/basics/text-editors/) в тему. + +### QMK Toolbox + +QMK Toolbox является дополнительной графической программой для Windows и macOS, которая позволяет вам разрабатывать и отлаживать вашу клавиатуру. Вы, вероятно, посчитаете ее бесценной для легкого процесса прошивки вашей клавиатуры и просмотра отладочных сообщений, которые она отображает. + +[Скачайте последний выпуск здесь.](/~https://github.com/qmk/qmk_toolbox/releases/latest) + +* Для Windows: `qmk_toolbox.exe` (переносимое приложение) или `qmk_toolbox_install.exe` (установщик) +* Для macOS: `QMK.Toolbox.app.zip` (переносимое приложение) или `QMK.Toolbox.pkg` (установщик) + +## Настройте ваше окружение + +Мы постарались сделать установку QMK максимально легкой. Вам нужно только подготовить ваше Linux или Unix окружение, после этого позвольте QMK установить все остальное. + +?> Если вы никогда раньше не работали с командной строкой Linux/Unix, существует несколько базовых концептов и команд, которые необходимо выучить. Эти ресурсы дадут вам достаточно знаний, чтобы работать с QMK:
+[Обязательные к изучению команды Linux](https://www.guru99.com/must-know-linux-commands.html)
+[Несколько базовых команд Unix](https://www.tjhsst.edu/~dhyatt/superap/unixcmd.html) + +### Windows + +Вам нужно будет установить MSYS2 и Git. + +* Следуйте инструкциям по установки на [домашней странице MSYS2](https://www.msys2.org). +* Закройте все открытые терминалы MSYS2 и откройте новый терминал MSYS2 MinGW 64-bit. +* Установите Git, выполнив эту команду: `pacman -S git`. + +### macOS + +Вам нужно будет установить Homebrew. Следуйте инструкциям на [домашней странице Homebrew](https://brew.sh). + +После установки Homebrew продолжите чтение с _Установите QMK_. На этом шаге вам надо будет запустить скрипт, который установит остальные пакеты. + +### Linux + +Вам нужно будет установить Git. Скорее всего, он у вас уже есть, но если нет, одна из следующих команд должна установить его: + +* Debian / Ubuntu / Devuan: `apt-get install git` +* Fedora / Red Hat / CentOS: `yum install git` +* Arch: `pacman -S git` + +?> Docker также является вариантом для всех платформ. [Нажмите сюда для получения подробностей.](ru-ru/getting_started_build_tools.md#docker) + +## Установите QMK + +Как только вы настроили ваше Linux/Unix окружение, вы готовы к загрузке QMK. Мы сделаем это при помощи Git, "клонировав" репозиторий QMK. Откройте Терминал или окно MSYS2 MinGW и оставьте его открытым до конца данного руководства. Выполните эти команды внутри него: + +```shell +git clone --recurse-submodules /~https://github.com/qmk/qmk_firmware.git +cd qmk_firmware +``` + +?> Если вы уже знаете, [как пользоваться GitHub](ru-ru/getting_started_github.md), мы рекомендуем вам вместо этого создать и клонировать свой собственный форк. Если вы не понимаете, что это значит, просто проигнорируйте это сообщение. + +QMK включает в себя скрипт, который поможет вам установить все оставшееся, что вам понадобится. Вы должны запустить его, набрав эту команду: + + util/qmk_install.sh + +## Протестируйте ваше окружение для сборки + +Теперь, когда ваше окружение QMK для сборки настроено, вы можете собрать прошивку для вашей клавиатуры. Начните с попытки собрать раскладку для клавиатуры по умолчанию. У вас должно это получиться с помощью команды в этом формате: + + make :default + +Например, чтобы собрать прошивку для Clueboard 66%, вы введете: + + make clueboard/66/rev3:default + +Когда все закончится, вы должны увидеть большой лог, который заканчивается примерно так: + +``` +Linking: .build/clueboard_66_rev3_default.elf [OK] +Creating load file for flashing: .build/clueboard_66_rev3_default.hex [OK] +Copying clueboard_66_rev3_default.hex to qmk_firmware folder [OK] +Checking file size of clueboard_66_rev3_default.hex [OK] + * The firmware size is fine - 26356/28672 (2316 bytes free) +``` + +# Создаем вашу раскладку + +Теперь вы готовы создать свою персональную раскладку! Для этого перейдите к [Собираем вашу первую прошивку](ru-ru/newbs_building_firmware.md). From e376aa284d3e7f7a321113769e2168aa5417e824 Mon Sep 17 00:00:00 2001 From: Christoffer Holmberg Date: Tue, 29 Oct 2019 01:26:13 +0200 Subject: [PATCH 203/316] [Keymap] Layout update for my ergodox (#7187) * Add KC_ESC to normal location and move SE_HALF to ARRW layer * Add `<` and `>` to SYMB layer as standalone keys --- keyboards/ergodox_ez/keymaps/skug/keymap.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/keyboards/ergodox_ez/keymaps/skug/keymap.c b/keyboards/ergodox_ez/keymaps/skug/keymap.c index af171c7e7187..a9be5d55c494 100644 --- a/keyboards/ergodox_ez/keymaps/skug/keymap.c +++ b/keyboards/ergodox_ez/keymaps/skug/keymap.c @@ -27,6 +27,9 @@ #define MDIA 2 // media keys #define ARRW 3 // arrow + soon mouse +#define SE_LT SE_LESS +#define SE_GT LSFT(SE_LESS) + enum custom_keycodes { PLACEHOLDER = SAFE_RANGE, // can always be here EPRM, @@ -38,8 +41,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 0: Basic layer * * ,--------------------------------------------------. ,--------------------------------------------------. - * | ½ | ! | " | # | # | % | Ins | | L1 | & | / | ( | ) | = | ? | - * | § | 1 | 2 @ | 3 £ | 4 $ | 5 | | | | 6 | 7 { | 8 [ | 9 ] | 0 } | + \ | + * | Esc | ! | " | # | # | % | Ins | | L1 | & | / | ( | ) | = | ? | + * | | 1 | 2 @ | 3 £ | 4 $ | 5 | | | | 6 | 7 { | 8 [ | 9 ] | 0 } | + \ | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * | Tab | Q | W | E | R | T | L2 | | L2 | Y | U | I | O | P | Å | * | | | | | | | | | | | | | | | | @@ -66,7 +69,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Otherwise, it needs KC_* [BASE] = LAYOUT_ergodox_80( // layer 0 : default // left hand - SE_HALF, KC_1, KC_2, KC_3, KC_4, KC_5, KC_INS, + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_INS, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), MO(ARRW), KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSPO, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_WBAK, @@ -96,7 +99,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | - | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | | | | . | 0 | = | | + * | | | | < | > | | | . | 0 | = | | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. * | | | | | | @@ -113,7 +116,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______,KC_EXLM,SE_AT, SE_LCBR,SE_RCBR,SE_PIPE,_______, _______,KC_HASH,SE_DLR, SE_LPRN,SE_RPRN,SE_GRV, _______,KC_PERC,SE_CIRC,SE_LBRC,SE_RBRC,SE_TILD,_______, - EPRM,_______,_______,_______,_______, + EPRM, _______, _______, SE_LT , SE_GT, _______,_______, _______,_______,_______, _______,_______,_______, @@ -171,7 +174,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), // Keymap: Ducky Style arrows [ARRW] = LAYOUT_ergodox_80( - _______, _______, _______, _______, _______, _______, _______, + SE_HALF, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP , _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, From a0964532594958c06a5f39900a59dd04201a2eee Mon Sep 17 00:00:00 2001 From: Yan-Fa Li Date: Mon, 28 Oct 2019 16:26:59 -0700 Subject: [PATCH 204/316] [Keyboard] Fix matrix for Tsangan (#7159) - 1st mod after space bar was wrong position --- keyboards/cannonkeys/an_c/an_c.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/cannonkeys/an_c/an_c.h b/keyboards/cannonkeys/an_c/an_c.h index 6d2085016360..06963b409181 100644 --- a/keyboards/cannonkeys/an_c/an_c.h +++ b/keyboards/cannonkeys/an_c/an_c.h @@ -23,13 +23,13 @@ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, \ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2E, \ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3E,\ - K40, K41, K42, K45, K49, K4B, K4E \ + K40, K41, K42, K45, K4A, K4B, K4E \ ) { \ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E}, \ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, KNO, K1E }, \ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KNO, KNO, K2E }, \ { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KNO, KNO, K3E }, \ - { K40, K41, K42, KNO, KNO, K45, KNO, KNO, KNO, K49, KNO, K4B, KNO, KNO, K4E } \ + { K40, K41, K42, KNO, KNO, K45, KNO, KNO, KNO, KNO, K4A, K4B, KNO, KNO, K4E } \ } #define LAYOUT_all( \ From 947e61eaebf168c0c60be34914141cff9a69e599 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Mon, 28 Oct 2019 16:29:00 -0700 Subject: [PATCH 205/316] [Keyboard] Change Corne RGB Matrix split handling (#7117) * [Keyboard] Change Corne RGB Matrix split handling This uses the "is_master" detection to set the led matrix, rather than a define at compile time. This means that the same hex can be used for both halves, not just one or the other. The caveat is that this costs ~240 bytes to do. However, I feel that this is a good trade-off, not just lazy. * Update documentation for RGB Matrix on the Corne --- keyboards/crkbd/readme.md | 9 ----- keyboards/crkbd/rev1/rev1.c | 71 ++++++++++++++++++++----------------- 2 files changed, 39 insertions(+), 41 deletions(-) diff --git a/keyboards/crkbd/readme.md b/keyboards/crkbd/readme.md index 2f599544a562..5de3e3ae0008 100644 --- a/keyboards/crkbd/readme.md +++ b/keyboards/crkbd/readme.md @@ -81,13 +81,4 @@ And in your `config.h` file, add the following: #endif ``` -However, to properly handle the LED matrix, two LED maps had to be used. One for the left half, and one for the right half. For the left, you don't need to do anything. That's the default setup. But for the right side, you need to add `RGB_MATRIX_SPLIT_RIGHT=yes` needs to be added to the command. - -First, compile and flash the left half. Then when that's done, recompile with the setting above. It should look something like: - -```sh -make crkbd:default RGB_MATRIX_SPLIT_RIGHT=yes -``` -And then flash this new firmware image. - After this is done, you should be able to use the normal RGB keycodes, but you'll see the RGB Matrix effects in use, giving a much better experience. diff --git a/keyboards/crkbd/rev1/rev1.c b/keyboards/crkbd/rev1/rev1.c index 9568d80080a7..b26292af5bfd 100644 --- a/keyboards/crkbd/rev1/rev1.c +++ b/keyboards/crkbd/rev1/rev1.c @@ -1,6 +1,5 @@ #include "crkbd.h" - #ifdef RGB_MATRIX_ENABLE // Logical Layout @@ -39,37 +38,6 @@ // 05 06 06 05 // 15 14 07 07 14 15 3 - -#ifdef RGB_MATRIX_SPLIT_RIGHT -led_config_t g_led_config = { { - { 51, 50, 45, 44, 37, 36 }, - { 52, 49, 46, 43, 38, 35 }, - { 53, 48, 47, 42, 39, 34 }, - { NO_LED, NO_LED, NO_LED, 41, 40, 33 }, - { 24, 23, 18, 17, 10, 9 }, - { 25, 22, 19, 16, 11, 8 }, - { 26, 21, 20, 15, 12, 7 }, - { NO_LED, NO_LED, NO_LED, 14, 13, 6 } -}, { - { 139, 16 }, { 174, 13 }, { 208, 20 }, { 208, 38 }, { 174, 48 }, { 139, 52 }, { 129, 63 }, - { 139, 39 }, { 139, 21 }, { 139, 4 }, { 156, 2 }, { 156, 19 }, { 156, 37 }, { 144, 58 }, - { 164, 55 }, { 174, 35 }, { 174, 13 }, { 174, 0 }, { 191, 3 }, { 191, 20 }, { 191, 37 }, - { 208, 42 }, { 208, 24 }, { 208, 7 }, { 224, 7 }, { 224, 24 }, { 224, 41 }, { 85, 16 }, - { 50, 13 }, { 16, 20 }, { 16, 38 }, { 50, 48 }, { 85, 52 }, { 95, 63 }, { 85, 39 }, - { 85, 21 }, { 85, 4 }, { 68, 2 }, { 68, 19 }, { 68, 37 }, { 80, 58 }, { 60, 55 }, - { 50, 35 }, { 50, 13 }, { 50, 0 }, { 33, 3 }, { 33, 20 }, { 33, 37 }, { 16, 42 }, - { 16, 24 }, { 16, 7 }, { 0, 7 }, { 0, 24 }, { 0, 41 } -}, { - 2, 2, 2, 2, 2, 2, 1, - 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 1, 1, 1, 2, - 2, 2, 2, 2, 2, 1, 4, - 4, 4, 4, 4, 4, 1, 1, - 4, 4, 4, 4, 4, 4, 4, - 4, 4, 1, 1, 1 -} }; -#else led_config_t g_led_config = { { { 24, 23, 18, 17, 10, 9 }, { 25, 22, 19, 16, 11, 8 }, @@ -99,4 +67,43 @@ led_config_t g_led_config = { { 4, 4, 1, 1, 1 } }; #endif + +__attribute__((weak)) +void matrix_init_user(void) {} + +void matrix_init_kb(void) { + +#ifdef RGB_MATRIX_ENABLE + if (!isLeftHand) { + g_led_config = (led_config_t){ { + { 51, 50, 45, 44, 37, 36 }, + { 52, 49, 46, 43, 38, 35 }, + { 53, 48, 47, 42, 39, 34 }, + { NO_LED, NO_LED, NO_LED, 41, 40, 33 }, + { 24, 23, 18, 17, 10, 9 }, + { 25, 22, 19, 16, 11, 8 }, + { 26, 21, 20, 15, 12, 7 }, + { NO_LED, NO_LED, NO_LED, 14, 13, 6 } + }, { + { 139, 16 }, { 174, 13 }, { 208, 20 }, { 208, 38 }, { 174, 48 }, { 139, 52 }, { 129, 63 }, + { 139, 39 }, { 139, 21 }, { 139, 4 }, { 156, 2 }, { 156, 19 }, { 156, 37 }, { 144, 58 }, + { 164, 55 }, { 174, 35 }, { 174, 13 }, { 174, 0 }, { 191, 3 }, { 191, 20 }, { 191, 37 }, + { 208, 42 }, { 208, 24 }, { 208, 7 }, { 224, 7 }, { 224, 24 }, { 224, 41 }, { 85, 16 }, + { 50, 13 }, { 16, 20 }, { 16, 38 }, { 50, 48 }, { 85, 52 }, { 95, 63 }, { 85, 39 }, + { 85, 21 }, { 85, 4 }, { 68, 2 }, { 68, 19 }, { 68, 37 }, { 80, 58 }, { 60, 55 }, + { 50, 35 }, { 50, 13 }, { 50, 0 }, { 33, 3 }, { 33, 20 }, { 33, 37 }, { 16, 42 }, + { 16, 24 }, { 16, 7 }, { 0, 7 }, { 0, 24 }, { 0, 41 } + }, { + 2, 2, 2, 2, 2, 2, 1, + 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 1, 1, 1, 2, + 2, 2, 2, 2, 2, 1, 4, + 4, 4, 4, 4, 4, 1, 1, + 4, 4, 4, 4, 4, 4, 4, + 4, 4, 1, 1, 1 + } }; + } #endif + matrix_init_user(); +} From c7a8cab8831f18778e4d46e3c6bfe36803656986 Mon Sep 17 00:00:00 2001 From: "J.Flanagan" Date: Mon, 28 Oct 2019 18:57:16 -0500 Subject: [PATCH 206/316] [Keyboard] Add M0116b keyboard (#7162) * initial commit restart of m0116b development * initial commit restart of m0116b development * Major and minor changes for new PCB design Changed matrix_row_pins and matrix_sol_pins to match new PCB design Changed layout matrix to match new PCB design Minor changes to settings in rules.mk Minor changes to readme.md files * Update rules.mk Changed settings in rules.mk * major and minor changes added a default keymap (copy of the m0116 keymap, just to have a default option) changes to the info.json * initial commit restart of m0116b development * Major and minor changes for new PCB design Changed matrix_row_pins and matrix_sol_pins to match new PCB design Changed layout matrix to match new PCB design Minor changes to settings in rules.mk Minor changes to readme.md files * Update rules.mk Changed settings in rules.mk * major and minor changes added a default keymap (copy of the m0116 keymap, just to have a default option) changes to the info.json * Update keyboards/sck/m0116b/keymaps/default/keymap.c Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/sck/m0116b/keymaps/default/keymap.c Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/sck/m0116b/keymaps/m0116/keymap.c Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/sck/m0116b/keymaps/m0116/keymap.c Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/sck/m0116b/keymaps/m0118/keymap.c Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/sck/m0116b/m0116b.h Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/sck/m0116b/m0116b.h Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/sck/m0116b/keymaps/m0118/keymap.c Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Requested changes Changes per requests * Changes to keymaps Changes as discussed corrected location of custom_keycodes declaration and changed custom keycode in keymap per request and discussion. --- keyboards/sck/m0116b/config.h | 249 ++++++++++++++++++ keyboards/sck/m0116b/info.json | 183 +++++++++++++ keyboards/sck/m0116b/keymaps/default/config.h | 20 ++ keyboards/sck/m0116b/keymaps/default/keymap.c | 100 +++++++ .../sck/m0116b/keymaps/default/readme.md | 1 + keyboards/sck/m0116b/keymaps/m0116/config.h | 20 ++ keyboards/sck/m0116b/keymaps/m0116/keymap.c | 100 +++++++ keyboards/sck/m0116b/keymaps/m0116/readme.md | 1 + keyboards/sck/m0116b/keymaps/m0118/config.h | 19 ++ keyboards/sck/m0116b/keymaps/m0118/keymap.c | 100 +++++++ keyboards/sck/m0116b/keymaps/m0118/readme.md | 1 + keyboards/sck/m0116b/m0116b.c | 51 ++++ keyboards/sck/m0116b/m0116b.h | 58 ++++ keyboards/sck/m0116b/readme.md | 26 ++ keyboards/sck/m0116b/rules.mk | 33 +++ 15 files changed, 962 insertions(+) create mode 100644 keyboards/sck/m0116b/config.h create mode 100644 keyboards/sck/m0116b/info.json create mode 100644 keyboards/sck/m0116b/keymaps/default/config.h create mode 100644 keyboards/sck/m0116b/keymaps/default/keymap.c create mode 100644 keyboards/sck/m0116b/keymaps/default/readme.md create mode 100644 keyboards/sck/m0116b/keymaps/m0116/config.h create mode 100644 keyboards/sck/m0116b/keymaps/m0116/keymap.c create mode 100644 keyboards/sck/m0116b/keymaps/m0116/readme.md create mode 100644 keyboards/sck/m0116b/keymaps/m0118/config.h create mode 100644 keyboards/sck/m0116b/keymaps/m0118/keymap.c create mode 100644 keyboards/sck/m0116b/keymaps/m0118/readme.md create mode 100644 keyboards/sck/m0116b/m0116b.c create mode 100644 keyboards/sck/m0116b/m0116b.h create mode 100644 keyboards/sck/m0116b/readme.md create mode 100644 keyboards/sck/m0116b/rules.mk diff --git a/keyboards/sck/m0116b/config.h b/keyboards/sck/m0116b/config.h new file mode 100644 index 000000000000..03fa9f255798 --- /dev/null +++ b/keyboards/sck/m0116b/config.h @@ -0,0 +1,249 @@ +/* +Copyright 2019 jrfhoutx + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER jrfhoutx +#define PRODUCT Golden Delicious +#define DESCRIPTION Golden Delicious (M0116B) - Apple M0116/M0118 Replacement PCB + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 18 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { D1, F0, F1, F4, F5, F6 } +#define MATRIX_COL_PINS { D5, D3, D2, D0, B3, B2, B1, B0, E6, B5, B6, C6, C7, F7, D4, D6, D7, B4 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +// #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * 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 + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ + #define BOOTMAGIC_LITE_ROW 0 + #define BOOTMAGIC_LITE_COLUMN 6 diff --git a/keyboards/sck/m0116b/info.json b/keyboards/sck/m0116b/info.json new file mode 100644 index 000000000000..e8d8fb221f02 --- /dev/null +++ b/keyboards/sck/m0116b/info.json @@ -0,0 +1,183 @@ +{ + "keyboard_name": "Golden Delicious - M0116B", + "url": "/~https://github.com/jrfhoutx", + "maintainer": "jrfhoutx", + "width": 19.5, + "height": 6.25, + "layouts": { + "LAYOUT_m0116_ansi": { + "key_count": 81, + "layout": [ + {"label":"K06 (D1,B2)", "x":5, "y":0, "w":2}, + {"label":"K10 (F0,D5)", "x":0, "y":1.25}, + {"label":"K11 (F0,D3)", "x":1, "y":1.25}, + {"label":"K12 (F0,D2)", "x":2, "y":1.25}, + {"label":"K13 (F0,D0)", "x":3, "y":1.25}, + {"label":"K14 (F0,B7)", "x":4, "y":1.25}, + {"label":"K15 (F0,B3)", "x":5, "y":1.25}, + {"label":"K16 (F0,B2)", "x":6, "y":1.25}, + {"label":"K17 (F0,B1)", "x":7, "y":1.25}, + {"label":"K18 (F0,B0)", "x":8, "y":1.25}, + {"label":"K19 (F0,B5)", "x":9, "y":1.25}, + {"label":"K1A (F0,B6)", "x":10, "y":1.25}, + {"label":"K1B (F0,C6)", "x":11, "y":1.25}, + {"label":"K1C (F0,C7)", "x":12, "y":1.25}, + {"label":"K1D (F0,F7)", "x":13, "y":1.25, "w":1.5}, + {"label":"K1E (F0,D4)", "x":15.5, "y":1.25}, + {"label":"K1F (F0,D6)", "x":16.5, "y":1.25}, + {"label":"K1G (F0,D7)", "x":17.5, "y":1.25}, + {"label":"K1H (F0,B4)", "x":18.5, "y":1.25}, + {"label":"K20 (F1,D5)", "x":0, "y":2.25, "w":1.5}, + {"label":"K21 (F1,D3)", "x":1.5, "y":2.25}, + {"label":"K22 (F1,D2)", "x":2.5, "y":2.25}, + {"label":"K23 (F1,D0)", "x":3.5, "y":2.25}, + {"label":"K24 (F1,B7)", "x":4.5, "y":2.25}, + {"label":"K25 (F1,B3)", "x":5.5, "y":2.25}, + {"label":"K26 (F1,B2)", "x":6.5, "y":2.25}, + {"label":"K27 (F1,B1)", "x":7.5, "y":2.25}, + {"label":"K28 (F1,B0)", "x":8.5, "y":2.25}, + {"label":"K29 (F1,B5)", "x":9.5, "y":2.25}, + {"label":"K2A (F1,B6)", "x":10.5, "y":2.25}, + {"label":"K2B (F1,C6)", "x":11.5, "y":2.25}, + {"label":"K2C (F1,C7)", "x":12.5, "y":2.25}, + {"label":"K2D (F1,F7)", "x":13.5, "y":2.25, "h":2}, + {"label":"K2E (F1,D4)", "x":15.5, "y":2.25}, + {"label":"K2F (F1,D6)", "x":16.5, "y":2.25}, + {"label":"K2G (F1,D7)", "x":17.5, "y":2.25}, + {"label":"K2H (F1,B4)", "x":18.5, "y":2.25}, + {"label":"K30 (F4,D5)", "x":0, "y":3.25, "w":1.75}, + {"label":"K31 (F4,D3)", "x":1.75, "y":3.25}, + {"label":"K32 (F4,D2)", "x":2.75, "y":3.25}, + {"label":"K33 (F4,D0)", "x":3.75, "y":3.25}, + {"label":"K34 (F4,B7)", "x":4.75, "y":3.25}, + {"label":"K35 (F4,B3)", "x":5.75, "y":3.25}, + {"label":"K36 (F4,B2)", "x":6.75, "y":3.25}, + {"label":"K37 (F4,B1)", "x":7.75, "y":3.25}, + {"label":"K38 (F4,B0)", "x":8.75, "y":3.25}, + {"label":"K39 (F4,B5)", "x":9.75, "y":3.25}, + {"label":"K3A (F4,B6)", "x":10.75, "y":3.25}, + {"label":"K3B (F4,C6)", "x":11.75, "y":3.25}, + {"label":"K3C (F4,D4)", "x":15.5, "y":3.25}, + {"label":"K3D (F4,D6)", "x":16.5, "y":3.25}, + {"label":"K3E (F4,D7)", "x":17.5, "y":3.25}, + {"label":"K3F (F4,B4)", "x":18.5, "y":3.25}, + {"label":"K40 (F5,D5)", "x":0, "y":4.25, "w":2.25}, + {"label":"K42 (F5,D2)", "x":2.25, "y":4.25}, + {"label":"K43 (F5,D0)", "x":3.25, "y":4.25}, + {"label":"K44 (F5,B7)", "x":4.25, "y":4.25}, + {"label":"K45 (F5,B3)", "x":5.25, "y":4.25}, + {"label":"K46 (F5,B2)", "x":6.25, "y":4.25}, + {"label":"K47 (F5,B1)", "x":7.25, "y":4.25}, + {"label":"K48 (F5,B0)", "x":8.25, "y":4.25}, + {"label":"K49 (F5,B5)", "x":9.25, "y":4.25}, + {"label":"K4A (F5,B6)", "x":10.25, "y":4.25}, + {"label":"K4B (F5,C6)", "x":11.25, "y":4.25}, + {"label":"K4C (F5,C7)", "x":12.25, "y":4.25, "w":2.25}, + {"label":"K4E (F5,D4)", "x":15.5, "y":4.25}, + {"label":"K4F (F5,D6)", "x":16.5, "y":4.25}, + {"label":"K4G (F5,D7)", "x":17.5, "y":4.25}, + {"label":"K4H (F4,B4)", "x":18.5, "y":4.25, "h":2}, + {"label":"K50 (F6,D5)", "x":0, "y":5.25}, + {"label":"K51 (F6,D3)", "x":1, "y":5.25}, + {"label":"K52 (F6,D2)", "x":2, "y":5.25, "w":1.75}, + {"label":"K53 (F6,D0)", "x":3.75, "y":5.25}, + {"label":"K56 (F6,B2)", "x":4.75, "y":5.25, "w":4.75}, + {"label":"K59 (F6,B5)", "x":9.5, "y":5.25}, + {"label":"K5A (F6,B6)", "x":10.5, "y":5.25}, + {"label":"K5B (F6,C6)", "x":11.5, "y":5.25}, + {"label":"K5C (F6,C7)", "x":12.5, "y":5.25}, + {"label":"K5D (F6,F7)", "x":13.5, "y":5.25}, + {"label":"K5E (F6,D4)", "x":15.5, "y":5.25, "w":2}, + {"label":"K5G (F6,D7)", "x":17.5, "y":5.25} + ] + }, + "LAYOUT_m0118_iso": { + "key_count": 82, + "layout": [ + {"label":"K06 (D1,B2)", "x":5, "y":0, "w":2}, + {"label":"K10 (F0,D5)", "x":0, "y":1.25}, + {"label":"K11 (F0,D3)", "x":1, "y":1.25}, + {"label":"K12 (F0,D2)", "x":2, "y":1.25}, + {"label":"K13 (F0,D0)", "x":3, "y":1.25}, + {"label":"K14 (F0,B7)", "x":4, "y":1.25}, + {"label":"K15 (F0,B3)", "x":5, "y":1.25}, + {"label":"K16 (F0,B2)", "x":6, "y":1.25}, + {"label":"K17 (F0,B1)", "x":7, "y":1.25}, + {"label":"K18 (F0,B0)", "x":8, "y":1.25}, + {"label":"K19 (F0,B5)", "x":9, "y":1.25}, + {"label":"K1A (F0,B6)", "x":10, "y":1.25}, + {"label":"K1B (F0,C6)", "x":11, "y":1.25}, + {"label":"K1C (F0,C7)", "x":12, "y":1.25}, + {"label":"K1D (F0,F7)", "x":13, "y":1.25, "w":1.5}, + {"label":"K1E (F0,D4)", "x":15.5, "y":1.25}, + {"label":"K1F (F0,D6)", "x":16.5, "y":1.25}, + {"label":"K1G(F0,D7)", "x":17.5, "y":1.25}, + {"label":"K1H (F0,B4)", "x":18.5, "y":1.25}, + {"label":"K20 (F1,D5)", "x":0, "y":2.25, "w":1.5}, + {"label":"K21 (F1,D3)", "x":1.5, "y":2.25}, + {"label":"K22 (F1,D2)", "x":2.5, "y":2.25}, + {"label":"K23 (F1,D0)", "x":3.5, "y":2.25}, + {"label":"K24 (F1,B7)", "x":4.5, "y":2.25}, + {"label":"K25 (F1,B3)", "x":5.5, "y":2.25}, + {"label":"K26 (F1,B2)", "x":6.5, "y":2.25}, + {"label":"K27 (F1,B1)", "x":7.5, "y":2.25}, + {"label":"K28 (F1,B0)", "x":8.5, "y":2.25}, + {"label":"K29 (F1,B5)", "x":9.5, "y":2.25}, + {"label":"K2A (F1,B6)", "x":10.5, "y":2.25}, + {"label":"K2B (F1,C6)", "x":11.5, "y":2.25}, + {"label":"K2C (F1,C7)", "x":12.5, "y":2.25}, + {"label":"K2D (F1,F7)", "x":13.75, "y":2.25, "w":0.75, "h":2}, + {"label":"K2E (F1,D4)", "x":15.5, "y":2.25}, + {"label":"K2F (F1,D6)", "x":16.5, "y":2.25}, + {"label":"K2G (F1,D7)", "x":17.5, "y":2.25}, + {"label":"K2H (F1,B4)", "x":18.5, "y":2.25}, + {"label":"K30 (F4,D5)", "x":0, "y":3.25, "w":1.75}, + {"label":"K31 (F4,D3)", "x":1.75, "y":3.25}, + {"label":"K32 (F4,D2)", "x":2.75, "y":3.25}, + {"label":"K33 (F4,D0)", "x":3.75, "y":3.25}, + {"label":"K34 (F4,B7)", "x":4.75, "y":3.25}, + {"label":"K35 (F4,B3)", "x":5.75, "y":3.25}, + {"label":"K36 (F4,B2)", "x":6.75, "y":3.25}, + {"label":"K37 (F4,B1)", "x":7.75, "y":3.25}, + {"label":"K38 (F4,B0)", "x":8.75, "y":3.25}, + {"label":"K39 (F4,B5)", "x":9.75, "y":3.25}, + {"label":"K3A (F4,B6)", "x":10.75, "y":3.25}, + {"label":"K3B (F4,C6)", "x":11.75, "y":3.25}, + {"label":"K3C (F4,C7)", "x":12.75, "y":3.25}, + {"label":"K3E (F4,D4)", "x":15.5, "y":3.25}, + {"label":"K3F (F4,D6)", "x":16.5, "y":3.25}, + {"label":"K3G (F4,D7)", "x":17.5, "y":3.25}, + {"label":"K3H (F4,B4)", "x":18.5, "y":3.25}, + {"label":"K40 (F5,D5)", "x":0, "y":4.25, "w":1.25}, + {"label":"K41 (F5,D3)", "x":1.25, "y":4.25}, + {"label":"K42 (F5,D2)", "x":2.25, "y":4.25}, + {"label":"K43 (F5,D0)", "x":3.25, "y":4.25}, + {"label":"K44 (F5,B7)", "x":4.25, "y":4.25}, + {"label":"K45 (F5,B3)", "x":5.25, "y":4.25}, + {"label":"K46 (F5,B2)", "x":6.25, "y":4.25}, + {"label":"K47 (F5,B1)", "x":7.25, "y":4.25}, + {"label":"K48 (F5,B0)", "x":8.25, "y":4.25}, + {"label":"K49 (F5,B5)", "x":9.25, "y":4.25}, + {"label":"K4A (F5,B6)", "x":10.25, "y":4.25}, + {"label":"K4B (F5,C6)", "x":11.25, "y":4.25}, + {"label":"K4C (F5,C7)", "x":12.25, "y":4.25, "w":1.25}, + {"label":"K4D (F5,F7)", "x":13.5, "y":4.25}, + {"label":"K4E (F5,D4)", "x":15.5, "y":4.25}, + {"label":"K4F (F5,D6)", "x":16.5, "y":4.25}, + {"label":"K4G (F5,D7)", "x":17.5, "y":4.25}, + {"label":"K4H (F5,B4)", "x":18.5, "y":4.25, "h":2}, + {"label":"K50 (F6,D5)", "x":0, "y":5.25, "w":1.25}, + {"label":"K51 (F6,D3)", "x":1.25, "y":5.25, "w":1.5}, + {"label":"K52 (F6,D2)", "x":2.75, "y":5.25, "w":1.75}, + {"label":"K56 (F6,B2)", "x":4.5, "y":5.25, "w":5.25}, + {"label":"K5A (F6,B6)", "x":9.75, "y":5.25, "w":1.75}, + {"label":"K5B (F6,C6)", "x":11.5, "y":5.25}, + {"label":"K5C (F6,C7)", "x":12.5, "y":5.25}, + {"label":"K5D (F6,F7)", "x":13.5, "y":5.25}, + {"label":"K5E (F6,D4)", "x":15.5, "y":5.25, "w":2}, + {"label":"K5G (F6,D7)", "x":17.5, "y":5.25} + ] + } + } + +} diff --git a/keyboards/sck/m0116b/keymaps/default/config.h b/keyboards/sck/m0116b/keymaps/default/config.h new file mode 100644 index 000000000000..015191d1b6a5 --- /dev/null +++ b/keyboards/sck/m0116b/keymaps/default/config.h @@ -0,0 +1,20 @@ +/* Copyright 2019 jrfhoutx + * + * 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 . + */ + +#pragma once + +#define TAPPING_TERM 200 +// place overrides here diff --git a/keyboards/sck/m0116b/keymaps/default/keymap.c b/keyboards/sck/m0116b/keymaps/default/keymap.c new file mode 100644 index 000000000000..b8ae5931f2c2 --- /dev/null +++ b/keyboards/sck/m0116b/keymaps/default/keymap.c @@ -0,0 +1,100 @@ +/* Copyright 2019 jrfhoutx + * + * 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 . + */ +#include QMK_KEYBOARD_H + +enum custom_keycodes { + M0116B = SAFE_RANGE, +}; + +#define CALTDEL LCTL(LALT(KC_DEL)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap BASE: (Base Layer) Default Layer + * ,---------------------------------------------------------------------------------. + * | | CALTDEL | | + * `---------------------------------------------------------------------------------' + * ,-----------------------------------------------------------. .-------------------. + * | ~ | 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | |MO(1)| / | * |Paus| + * |-----------------------------------------------------------| |-------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| | | 7 | 8 | 9 | + | + * |-----------------------------------------------------| | |-------------------| + * |Ctrl | A| S| D| F| G| H| J| K| L| ;| '|Return | | 4 | 5 | 6 | - | + * |-----------------------------------------------------------' |-------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | | 1 | 2 | 3 | Ent| + * |-----------------------------------------------------------' `--------------| | + * |CAPS|Opt |Cmd | ` | Space | \ |Left|Up|Down|Right| | 0 | . | | + * `-----------------------------------------------------------' `-------------------' + */ +[0] = LAYOUT_m0116_ansi( /* Base */ + CALTDEL, + 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_NLCK, KC_PEQL, KC_PSLS, KC_PAST, + 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_ENT, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_P4, KC_P5, KC_P6, KC_PMNS, + 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_P1, KC_P2, KC_P3, KC_PENT, + KC_LCAP, KC_LALT, KC_LGUI, KC_GRV, KC_SPC, LT(1, KC_BSLS), KC_LEFT, KC_UP, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT +), +/* Keymap Layer 1: (Layer 1) Layer 1 + * ,---------------------------------------------------------------------------------. + * | |RESET| | + * `---------------------------------------------------------------------------------' + * ,-----------------------------------------------------------. .-------------------. + * | |F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12| | | | | | | + * |-----------------------------------------------------------| |-------------------| + * | | | | | | | | | | | | | | | | | | | | + * |-----------------------------------------------------| | |-------------------| + * | | | | | | | | | | | | | | | | | | | + * |-----------------------------------------------------------' |-------------------| + * | | | | | | | | | | | | | | | | | | + * |-----------------------------------------------------------' `--------------| | + * | | | | | M0116B | | | | | | | | | | + * `-----------------------------------------------------------' `-------------------' + */ +[1] = LAYOUT_m0116_ansi( /* Layer 1 */ + RESET, + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M0116B, 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) { + switch (keycode) { + case M0116B: + if (record->event.pressed) { + // when keycode M0116B is pressed + SEND_STRING("Golden Delicious - aka M0116B - The Apple M0116/M0118 Replacement PCB."); + } else { + // when keycode M0116B is released + } + break; + + } + return true; +}; + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/sck/m0116b/keymaps/default/readme.md b/keyboards/sck/m0116b/keymaps/default/readme.md new file mode 100644 index 000000000000..ebc0b3e92ce2 --- /dev/null +++ b/keyboards/sck/m0116b/keymaps/default/readme.md @@ -0,0 +1 @@ +# A keymap for the Golden Delicious, this is for the M0116 diff --git a/keyboards/sck/m0116b/keymaps/m0116/config.h b/keyboards/sck/m0116b/keymaps/m0116/config.h new file mode 100644 index 000000000000..015191d1b6a5 --- /dev/null +++ b/keyboards/sck/m0116b/keymaps/m0116/config.h @@ -0,0 +1,20 @@ +/* Copyright 2019 jrfhoutx + * + * 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 . + */ + +#pragma once + +#define TAPPING_TERM 200 +// place overrides here diff --git a/keyboards/sck/m0116b/keymaps/m0116/keymap.c b/keyboards/sck/m0116b/keymaps/m0116/keymap.c new file mode 100644 index 000000000000..b8ae5931f2c2 --- /dev/null +++ b/keyboards/sck/m0116b/keymaps/m0116/keymap.c @@ -0,0 +1,100 @@ +/* Copyright 2019 jrfhoutx + * + * 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 . + */ +#include QMK_KEYBOARD_H + +enum custom_keycodes { + M0116B = SAFE_RANGE, +}; + +#define CALTDEL LCTL(LALT(KC_DEL)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap BASE: (Base Layer) Default Layer + * ,---------------------------------------------------------------------------------. + * | | CALTDEL | | + * `---------------------------------------------------------------------------------' + * ,-----------------------------------------------------------. .-------------------. + * | ~ | 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | |MO(1)| / | * |Paus| + * |-----------------------------------------------------------| |-------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| | | 7 | 8 | 9 | + | + * |-----------------------------------------------------| | |-------------------| + * |Ctrl | A| S| D| F| G| H| J| K| L| ;| '|Return | | 4 | 5 | 6 | - | + * |-----------------------------------------------------------' |-------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | | 1 | 2 | 3 | Ent| + * |-----------------------------------------------------------' `--------------| | + * |CAPS|Opt |Cmd | ` | Space | \ |Left|Up|Down|Right| | 0 | . | | + * `-----------------------------------------------------------' `-------------------' + */ +[0] = LAYOUT_m0116_ansi( /* Base */ + CALTDEL, + 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_NLCK, KC_PEQL, KC_PSLS, KC_PAST, + 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_ENT, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_P4, KC_P5, KC_P6, KC_PMNS, + 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_P1, KC_P2, KC_P3, KC_PENT, + KC_LCAP, KC_LALT, KC_LGUI, KC_GRV, KC_SPC, LT(1, KC_BSLS), KC_LEFT, KC_UP, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT +), +/* Keymap Layer 1: (Layer 1) Layer 1 + * ,---------------------------------------------------------------------------------. + * | |RESET| | + * `---------------------------------------------------------------------------------' + * ,-----------------------------------------------------------. .-------------------. + * | |F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12| | | | | | | + * |-----------------------------------------------------------| |-------------------| + * | | | | | | | | | | | | | | | | | | | | + * |-----------------------------------------------------| | |-------------------| + * | | | | | | | | | | | | | | | | | | | + * |-----------------------------------------------------------' |-------------------| + * | | | | | | | | | | | | | | | | | | + * |-----------------------------------------------------------' `--------------| | + * | | | | | M0116B | | | | | | | | | | + * `-----------------------------------------------------------' `-------------------' + */ +[1] = LAYOUT_m0116_ansi( /* Layer 1 */ + RESET, + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M0116B, 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) { + switch (keycode) { + case M0116B: + if (record->event.pressed) { + // when keycode M0116B is pressed + SEND_STRING("Golden Delicious - aka M0116B - The Apple M0116/M0118 Replacement PCB."); + } else { + // when keycode M0116B is released + } + break; + + } + return true; +}; + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/sck/m0116b/keymaps/m0116/readme.md b/keyboards/sck/m0116b/keymaps/m0116/readme.md new file mode 100644 index 000000000000..6f9eee3e229f --- /dev/null +++ b/keyboards/sck/m0116b/keymaps/m0116/readme.md @@ -0,0 +1 @@ +# The default keymap for the Golden Delicious when used with a M0116 diff --git a/keyboards/sck/m0116b/keymaps/m0118/config.h b/keyboards/sck/m0116b/keymaps/m0118/config.h new file mode 100644 index 000000000000..499a4753f4b1 --- /dev/null +++ b/keyboards/sck/m0116b/keymaps/m0118/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 jrfhoutx + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/sck/m0116b/keymaps/m0118/keymap.c b/keyboards/sck/m0116b/keymaps/m0118/keymap.c new file mode 100644 index 000000000000..094d700661dc --- /dev/null +++ b/keyboards/sck/m0116b/keymaps/m0118/keymap.c @@ -0,0 +1,100 @@ +/* Copyright 2019 jrfhoutx + * + * 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 . + */ +#include QMK_KEYBOARD_H + +enum custom_keycodes { + M0116B = SAFE_RANGE, +}; + +#define CALTDEL LCTL(LALT(KC_DEL)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap BASE: (Base Layer) Default Layer + * ,---------------------------------------------------------------------------------. + * | | CALTDEL | | + * `---------------------------------------------------------------------------------' + * ,-----------------------------------------------------------. .-------------------. + * |Esc| 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | |MO(1)| = | / | * | + * |-----------------------------------------------------------| |-------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]|Enter| | 7 | 8 | 9 | + | + * |--------------------------------------------------------| | |-------------------| + * |Caps | A| S| D| F| G| H| J| K| L| ;| '| # | | | 4 | 5 | 6 | - | + * |-----------------------------------------------------------' |-------------------| + * |Shift|<>| Z| X| C| V| B| N| M| ,| .| /|Shift| Up | | 1 | 2 | 3 | Ent| + * |-----------------------------------------------------------' `--------------| | + * |Ctrl | Opt | Cmd | Space |Cmd |Left|Right|Down| | 0 | . | | + * `-----------------------------------------------------------' `-------------------' + */ +[0] = LAYOUT_m0118_iso( /* Base */ + CALTDEL, + 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_NLCK, KC_PEQL, KC_PSLS, KC_PAST, + 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_ENT, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_LCAP, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_HASH, KC_P4, KC_P5, KC_P6, KC_PMNS, + KC_LSFT, KC_LABK, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, LT(1, KC_RALT), KC_LEFT, KC_RGHT, KC_DOWN, KC_P0, KC_PDOT +), +/* Keymap Layer 1: (Layer 1) Layer 1 + * ,---------------------------------------------------------------------------------. + * | | Reset | | + * `---------------------------------------------------------------------------------' + * ,-----------------------------------------------------------. .-------------------. + * | | | | | | | | | | | | | | | | | | | | + * |-----------------------------------------------------------| |-------------------| + * | | | | | | | | | | | | | | | | | | | | + * |--------------------------------------------------------| | |-------------------| + * | | | | | | | | | | | | | | | | | | | | + * |-----------------------------------------------------------' |-------------------| + * | | | | | | | | | | | | | | | | | | | | + * |-----------------------------------------------------------' `--------------| | + * | | | | M0116B | | | | | | | | | + * `-----------------------------------------------------------' `-------------------' + */ +[1] = LAYOUT_m0118_iso( /* Layer 1 */ + 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, M0116B, 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) { + switch (keycode) { + case M0116B: + if (record->event.pressed) { + // when keycode M0116B is pressed + SEND_STRING("Golden Delicious - M0116B - The Apple M0116/M0118 Replacement PCB."); + } else { + // when keycode M0116B is released + } + break; + + } + return true; +}; + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/sck/m0116b/keymaps/m0118/readme.md b/keyboards/sck/m0116b/keymaps/m0118/readme.md new file mode 100644 index 000000000000..049dad83afec --- /dev/null +++ b/keyboards/sck/m0116b/keymaps/m0118/readme.md @@ -0,0 +1 @@ +# The default keymap for the Golden Delicious when used with a M0118 diff --git a/keyboards/sck/m0116b/m0116b.c b/keyboards/sck/m0116b/m0116b.c new file mode 100644 index 000000000000..2e0a4ae2c758 --- /dev/null +++ b/keyboards/sck/m0116b/m0116b.c @@ -0,0 +1,51 @@ +/* Copyright 2019 jrfhoutx + * + * 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 . + */ +#include "m0116b.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* + +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/sck/m0116b/m0116b.h b/keyboards/sck/m0116b/m0116b.h new file mode 100644 index 000000000000..e3159251218a --- /dev/null +++ b/keyboards/sck/m0116b/m0116b.h @@ -0,0 +1,58 @@ +/* Copyright 2019 jrfhoutx + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_m0116_ansi( \ + K06, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3E, K3F, K3G, K3H, \ + K40, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4E, K4F, K4G, K4H, \ + K50, K51, K52, K53, K56, K59, K5A, K5B, K5C, K5D, K5E, K5G \ +) { \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K06, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, KC_NO, K3E, K3F, K3G, K3H }, \ + { K40, KC_NO, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, KC_NO, K4E, K4F, K4G, K4H }, \ + { K50, K51, K52, K53, KC_NO, KC_NO, K56, KC_NO, KC_NO, K59, K5A, K5B, K5C, K5D, K5E, KC_NO, K5G, KC_NO }, \ + } + +#define LAYOUT_m0118_iso( \ + K06, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3E, K3F, K3G, K3H, \ + K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, \ + K50, K51, K52, K56, K5A, K5B, K5C, K5D, K5E, K5G \ +) { \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K06, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, KC_NO, K3E, K3F, K3G, K3H }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H }, \ + { K50, K51, K52, KC_NO, KC_NO, KC_NO, K56, KC_NO, KC_NO, KC_NO, K5A, K5B, K5C, K5D, K5E, KC_NO, K5G, KC_NO }, \ + } diff --git a/keyboards/sck/m0116b/readme.md b/keyboards/sck/m0116b/readme.md new file mode 100644 index 000000000000..c8bb36d994ed --- /dev/null +++ b/keyboards/sck/m0116b/readme.md @@ -0,0 +1,26 @@ +# Golden Delicious aka M0116B + +The Golden Delicious (aka M0116B) is a replacement PCB for the Apple M0116 and M0118 keyboards, the best keyboard Apple ever made... + +Installation Information: + +The Golden Delicious comes with new daughter boards that use USB-B connectors. When installing the PCB you can use these new connectors, or you can reuse the old DIN type ADB connectors. Reusing the original ADB daughter boards will require you to put a USB-A connector on an original ADB cable and make sure that you are connecting the pins correctly (and is therefore slightly more advanced to use and setup as it requres a multimeter). + +The daughter boards can easily be snapped off from the main PCB. In order to electrically connect them to the main PCB you will need to reuse the 6 wire ribbon cable from your original PCB (or use the supplied pieces of ribbon cable if the originals are damaged during desoldering). + +When installing the PCB assembly back into the case, if you are using the new USB-B daughter boards, you will need to trim a small amount of the support brackets inside the case. This is to fit the new USB-B connectors in place of the original DIN type ADB connectors, since the new USB-B connectors are longer than the original ADB connectors. As can be seen [HERE](https://imgur.com/a/a1zIFUC). + +Repo Information: + +Keyboard Maintainer: jrfhoutx +Keyboard Designer: [jrfhoutx](/~https://github.com/jrfhoutx) +Hardware Supported: M0116B, ATMEGA32U4 +Hardware Availability: Space City Keyboards + +Make example for this keyboard (after setting up your build environment): + + make sck/m0116b:default + make sck/m0116b:m0116 + make sck/m0116b:m0118 + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/sck/m0116b/rules.mk b/keyboards/sck/m0116b/rules.mk new file mode 100644 index 000000000000..562bad5d5683 --- /dev/null +++ b/keyboards/sck/m0116b/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs From 1b06ea0c863b493215d80400f00797ceb0eabc3d Mon Sep 17 00:00:00 2001 From: Chris Alves Date: Mon, 28 Oct 2019 20:25:11 -0400 Subject: [PATCH 207/316] [Keymap] Added new custom keymap for the DZ60 (#6948) * Added custom dz60 keymap * Update readme.md * Updated pictures in README.md * README.md fixes * Updated mouse layout/ added ` key * Changed bkspc key to del in mod * Changed picture * Updated keymap * Removed default dz60 config.h * Updated Readme * Added Devorak Keymap * Re-added Default Config File * Updated Flash Command * Cleaned Up Custom Config File * Added Lock Security Layer * Updated Readme Picture --- keyboards/dz60/config.h | 2 +- .../dz60/keymaps/chrisae9/build_flash.sh | 7 ++++ keyboards/dz60/keymaps/chrisae9/config.h | 17 ++++++++ keyboards/dz60/keymaps/chrisae9/keymap.c | 39 +++++++++++++++++++ keyboards/dz60/keymaps/chrisae9/readme.md | 33 ++++++++++++++++ 5 files changed, 97 insertions(+), 1 deletion(-) create mode 100644 keyboards/dz60/keymaps/chrisae9/build_flash.sh create mode 100644 keyboards/dz60/keymaps/chrisae9/config.h create mode 100644 keyboards/dz60/keymaps/chrisae9/keymap.c create mode 100644 keyboards/dz60/keymaps/chrisae9/readme.md diff --git a/keyboards/dz60/config.h b/keyboards/dz60/config.h index 8d66c3584725..d121d997b8b6 100644 --- a/keyboards/dz60/config.h +++ b/keyboards/dz60/config.h @@ -43,4 +43,4 @@ #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 -#endif +#endif \ No newline at end of file diff --git a/keyboards/dz60/keymaps/chrisae9/build_flash.sh b/keyboards/dz60/keymaps/chrisae9/build_flash.sh new file mode 100644 index 000000000000..12adb8466b1e --- /dev/null +++ b/keyboards/dz60/keymaps/chrisae9/build_flash.sh @@ -0,0 +1,7 @@ +#OLD WAY +# dfu-programmer atmega32u4 erase --force +# dfu-programmer atmega32u4 flash /path/to/firmware.hex +# dfu-programmer atmega32u4 reset + +# run this in the qmk_firmware directory +make dz60:chrisae9:flash \ No newline at end of file diff --git a/keyboards/dz60/keymaps/chrisae9/config.h b/keyboards/dz60/keymaps/chrisae9/config.h new file mode 100644 index 000000000000..659970b72a41 --- /dev/null +++ b/keyboards/dz60/keymaps/chrisae9/config.h @@ -0,0 +1,17 @@ +/* chrisae9 Config */ +#pragma once + +/* Light Config */ +#undef RGBLIGHT_HUE_STEP +#define RGBLIGHT_HUE_STEP 1 +#undef RGBLIGHT_SAT_STEP +#define RGBLIGHT_SAT_STEP 8 +#undef RGBLIGHT_VAL_STEP +#define RGBLIGHT_VAL_STEP 16 + +/* Mouse Config */ +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_INTERVAL 15 +#define MOUSEKEY_TIME_TO_MAX 10 +#define MOUSEKEY_MAX_SPEED 2.5 + diff --git a/keyboards/dz60/keymaps/chrisae9/keymap.c b/keyboards/dz60/keymaps/chrisae9/keymap.c new file mode 100644 index 000000000000..f5403ff71b80 --- /dev/null +++ b/keyboards/dz60/keymaps/chrisae9/keymap.c @@ -0,0 +1,39 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT( + KC_GESC, 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_NO, 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_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, MO(2), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, MO(3), KC_LEFT, KC_NO, KC_DOWN, KC_RIGHT), + LAYOUT( + KC_CAPS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_NO, KC_BSPC, + KC_TRNS, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLASH, KC_EQL, KC_TRNS, + KC_GESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, + KC_LSFT, KC_NO, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_UP, MO(2), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, MO(3), KC_LEFT, KC_NO, KC_DOWN, KC_RIGHT), + + LAYOUT( + 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_NO, KC_DEL, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + TG(4), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_RSFT, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, TG(1), TG(1), TG(1), MO(3), KC_RALT, KC_NO, KC_RGUI, KC_RCTL), + + LAYOUT( + KC_PWR, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BRID, KC_BRIU, KC_NO, KC_PSCR, + KC_TRNS, KC_PGUP, KC_MS_U, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, + KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_MPLY, + KC_TRNS, KC_NO, RGB_M_P, RGB_M_B, KC_BTN3, KC_BTN4, KC_BTN5, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAD, RGB_VAI, RGB_SAI, RGB_TOG, + KC_TRNS, KC_TRNS, KC_MS_BTN2, KC_MS_BTN1, KC_MS_BTN1, KC_MS_BTN1, KC_TRNS, RGB_HUD, KC_NO, RGB_SAD, RGB_HUI), + + LAYOUT( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + TG(4), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO), + +}; diff --git a/keyboards/dz60/keymaps/chrisae9/readme.md b/keyboards/dz60/keymaps/chrisae9/readme.md new file mode 100644 index 000000000000..1057b58adb80 --- /dev/null +++ b/keyboards/dz60/keymaps/chrisae9/readme.md @@ -0,0 +1,33 @@ +# Chris' DZ60 Layout + +This is a custom keymap for the layout of the DZ60. + +## Keyboard Picture + +![Keyboard Picture](https://i.imgur.com/AKDKAXN.png) + +## Keyboard Layout + +![Chris DZ60](https://i.imgur.com/Z8XDwiI.png) + +## Setup + +[QMK Tookbox Download](/~https://github.com/qmk/qmk_toolbox/releases/tag/0.0.13) + +[MYSYS2 for Windows](http://www.msys2.org/) + +``` bash +#After downloading +pacman -Syu +#Close and re-open +pacman -Su +pacman -S git + +#Clone this repo and run this command in directory +util/qmk_install.sh +``` + +``` bash +#From the qmk_firware directory run +make dz60:chrisae9:flash +``` From e48fdebe5a351772c4f34b201130271a42c1496d Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Tue, 29 Oct 2019 01:00:03 +0000 Subject: [PATCH 208/316] Reduce duplication for ARM/AVR ws2812 RGB Matrix driver (#7180) * Reduce duplication for ARM/AVR ws2812 rgb_matrix driver * Reduce duplication for ARM/AVR ws2812 rgb_matrix driver - Fix setled_all use of r,g,b --- drivers/avr/ws2812.c | 33 ++++++++++----------------------- drivers/avr/ws2812.h | 35 +---------------------------------- quantum/rgb_matrix_drivers.c | 22 ++++++++++++++++++---- 3 files changed, 29 insertions(+), 61 deletions(-) diff --git a/drivers/avr/ws2812.c b/drivers/avr/ws2812.c index 0a02c6f7fd85..5c733c4ab0db 100644 --- a/drivers/avr/ws2812.c +++ b/drivers/avr/ws2812.c @@ -25,13 +25,17 @@ #include #include #include -#include "debug.h" -#if !defined(LED_ARRAY) && defined(RGB_MATRIX_ENABLE) -// LED color buffer -LED_TYPE led[DRIVER_LED_TOTAL]; -# define LED_ARRAY led -#endif +/* + * Forward declare internal functions + * + * The functions take a byte-array and send to the data output as WS2812 bitstream. + * The length is the number of bytes to send - three per LED. + */ + +void ws2812_sendarray(uint8_t *array, uint16_t length); +void ws2812_sendarray_mask(uint8_t *array, uint16_t length, uint8_t pinmask); + #ifdef RGBW_BB_TWI @@ -135,23 +139,6 @@ unsigned char I2C_Write(unsigned char c) { #endif -#ifdef RGB_MATRIX_ENABLE -// Set an led in the buffer to a color -void inline ws2812_setled(int i, uint8_t r, uint8_t g, uint8_t b) { - led[i].r = r; - led[i].g = g; - led[i].b = b; -} - -void ws2812_setled_all(uint8_t r, uint8_t g, uint8_t b) { - for (int i = 0; i < sizeof(led) / sizeof(led[0]); i++) { - led[i].r = r; - led[i].g = g; - led[i].b = b; - } -} -#endif - // Setleds for standard RGB void inline ws2812_setleds(LED_TYPE *ledarray, uint16_t leds) { // ws2812_setleds_pin(ledarray,leds, _BV(ws2812_pin)); diff --git a/drivers/avr/ws2812.h b/drivers/avr/ws2812.h index a9dd89718535..9652b94bbea3 100644 --- a/drivers/avr/ws2812.h +++ b/drivers/avr/ws2812.h @@ -20,13 +20,7 @@ * along with this program. If not, see . */ -#ifndef LIGHT_WS2812_H_ -#define LIGHT_WS2812_H_ - -#include -#include -//#include "ws2812_config.h" -//#include "i2cmaster.h" +#pragma once #include "quantum/color.h" @@ -42,33 +36,6 @@ * - Send out the LED data * - Wait 50�s to reset the LEDs */ -#ifdef RGB_MATRIX_ENABLE -void ws2812_setled(int index, uint8_t r, uint8_t g, uint8_t b); -void ws2812_setled_all(uint8_t r, uint8_t g, uint8_t b); -#endif - void ws2812_setleds(LED_TYPE *ledarray, uint16_t number_of_leds); void ws2812_setleds_pin(LED_TYPE *ledarray, uint16_t number_of_leds, uint8_t pinmask); void ws2812_setleds_rgbw(LED_TYPE *ledarray, uint16_t number_of_leds); - -/* - * Old interface / Internal functions - * - * The functions take a byte-array and send to the data output as WS2812 bitstream. - * The length is the number of bytes to send - three per LED. - */ - -void ws2812_sendarray(uint8_t *array, uint16_t length); -void ws2812_sendarray_mask(uint8_t *array, uint16_t length, uint8_t pinmask); - -/* - * Internal defines - */ -#ifndef CONCAT -# define CONCAT(a, b) a##b -#endif -#ifndef CONCAT_EXP -# define CONCAT_EXP(a, b) CONCAT(a, b) -#endif - -#endif /* LIGHT_WS2812_H_ */ diff --git a/quantum/rgb_matrix_drivers.c b/quantum/rgb_matrix_drivers.c index 5b54bd5956d7..503f97014f8e 100644 --- a/quantum/rgb_matrix_drivers.c +++ b/quantum/rgb_matrix_drivers.c @@ -97,19 +97,33 @@ const rgb_matrix_driver_t rgb_matrix_driver = { #elif defined(WS2812) -extern LED_TYPE led[DRIVER_LED_TOTAL]; +// LED color buffer +LED_TYPE led[DRIVER_LED_TOTAL]; + +static void init(void) {} static void flush(void) { // Assumes use of RGB_DI_PIN ws2812_setleds(led, DRIVER_LED_TOTAL); } -static void init(void) {} +// Set an led in the buffer to a color +static inline void setled(int i, uint8_t r, uint8_t g, uint8_t b) { + led[i].r = r; + led[i].g = g; + led[i].b = b; +} + +static void setled_all(uint8_t r, uint8_t g, uint8_t b) { + for (int i = 0; i < sizeof(led) / sizeof(led[0]); i++) { + setled(i, r, g, b); + } +} const rgb_matrix_driver_t rgb_matrix_driver = { .init = init, .flush = flush, - .set_color = ws2812_setled, - .set_color_all = ws2812_setled_all, + .set_color = setled, + .set_color_all = setled_all, }; #endif From afc5cb7f0abafd75c178b188a5fc1b9138fba956 Mon Sep 17 00:00:00 2001 From: Jonathan Rascher Date: Mon, 28 Oct 2019 20:08:48 -0500 Subject: [PATCH 209/316] Fix Lily58 build with link-time optimization (#7181) --- keyboards/lily58/config.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/keyboards/lily58/config.h b/keyboards/lily58/config.h index fb1cdf3962a1..50bf2beb3254 100644 --- a/keyboards/lily58/config.h +++ b/keyboards/lily58/config.h @@ -24,5 +24,9 @@ along with this program. If not, see . #define USE_I2C #define USE_SERIAL -#define NO_ACTION_MACRO -#define NO_ACTION_FUNCTION +#if !defined(NO_ACTION_MACRO) + #define NO_ACTION_MACRO +#endif +#if !defined(NO_ACTION_FUNCTION) + #define NO_ACTION_FUNCTION +#endif From e0e26957d43018998c405783a2609b99f0e098a7 Mon Sep 17 00:00:00 2001 From: "St. John Johnson" Date: Mon, 28 Oct 2019 18:24:36 -0700 Subject: [PATCH 210/316] Fix the CLI docs (#6979) - Sort the commands alphabetically - Add missing `json_keymap` - Correct underscore to dash --- docs/cli.md | 30 ++++++++++++++++++++---------- lib/python/qmk/cli/json/keymap.py | 2 +- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/docs/cli.md b/docs/cli.md index 0d3703c8cf0f..e655b0ee89b7 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -69,6 +69,16 @@ There are some limitations to the local CLI compared to the global CLI: # CLI Commands +## `qmk cformat` + +This command formats C code using clang-format. Run it with no arguments to format all core code, or pass filenames on the command line to run it on specific files. + +**Usage**: + +``` +qmk cformat [file1] [file2] [...] [fileN] +``` + ## `qmk compile` This command allows you to compile firmware from any directory. You can compile JSON exports from or compile keymaps in the repo. @@ -85,16 +95,6 @@ qmk compile qmk compile -kb -km ``` -## `qmk cformat` - -This command formats C code using clang-format. Run it with no arguments to format all core code, or pass filenames on the command line to run it on specific files. - -**Usage**: - -``` -qmk cformat [file1] [file2] [...] [fileN] -``` - ## `qmk config` This command lets you configure the behavior of QMK. For the full `qmk config` documentation see [CLI Configuration](cli_configuration.md). @@ -125,6 +125,16 @@ This command examines your environment and alerts you to potential build or flas qmk doctor ``` +## `qmk json-keymap` + +Creates a keymap.c from a QMK Configurator export. + +**Usage**: + +``` +qmk json-keymap [-o OUTPUT] filename +``` + ## `qmk list-keyboards` This command lists all the keyboards currently defined in `qmk_firmware` diff --git a/lib/python/qmk/cli/json/keymap.py b/lib/python/qmk/cli/json/keymap.py index a65acd61978b..207ac278cafe 100755 --- a/lib/python/qmk/cli/json/keymap.py +++ b/lib/python/qmk/cli/json/keymap.py @@ -11,7 +11,7 @@ @cli.argument('-o', '--output', arg_only=True, help='File to write to') @cli.argument('filename', arg_only=True, help='Configurator JSON file') -@cli.subcommand('Create a keymap.c from a QMK Configurator export.') +@cli.subcommand('Creates a keymap.c from a QMK Configurator export.') def json_keymap(cli): """Generate a keymap.c from a configurator export. From 476f5566132032af227a4fa95ceab56f4f3e06f7 Mon Sep 17 00:00:00 2001 From: Christoffer Holmberg Date: Tue, 29 Oct 2019 10:39:15 +0200 Subject: [PATCH 211/316] [Keymap] Update layout for my nyquist (#7188) * Add layer for gaming without fancy Shift & Ctrl keys * Add default layer select to ARRW layer * Define layers with an enum to save fw space --- .../keebio/nyquist/keymaps/skug/keymap.c | 49 +++++++++++++------ 1 file changed, 35 insertions(+), 14 deletions(-) diff --git a/keyboards/keebio/nyquist/keymaps/skug/keymap.c b/keyboards/keebio/nyquist/keymaps/skug/keymap.c index 3d67b2a73a67..be77cb24b680 100644 --- a/keyboards/keebio/nyquist/keymaps/skug/keymap.c +++ b/keyboards/keebio/nyquist/keymaps/skug/keymap.c @@ -19,16 +19,6 @@ extern keymap_config_t keymap_config; -// 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 BASE 0 -#define SYMB 1 -#define MDIA 2 -#define ARRW 3 -#define _ADJUST 16 - #define CT_APOS CTL_T(SE_APOS) #define CT_TILD CTL_T(SE_TILD) #define MD_OSLH LT(MDIA, SE_OSLH) @@ -36,6 +26,15 @@ extern keymap_config_t keymap_config; #define SE_LT SE_LESS #define SE_GT LSFT(SE_LESS) +enum layer_names { + BASE, + GAME, + SYMB, + MDIA, + ARRW, + _ADJUST, +}; + enum custom_keycodes { PLACEHOLDER = SAFE_RANGE, ADJUST, @@ -68,6 +67,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { CT_APOS, SE_ACUT, KC_LALT, KC_BSPC, KC_SPC, KC_LGUI, KC_ENT, KC_SPC, KC_BSPC, KC_ALGR, SE_ASTR, CT_TILD \ ), +/* Gaming layer + * ,-----------------------------------------. .-----------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | + | + * |------+------+------+------+------+------+ +------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | Å | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ARRW | A | S | D | F | G | | H | J | K | L | Ö | Ä | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |Shift | Z | X | C | V | B | | N | M | , | . | - | Shift| + * |------+------+------+------+------+------+ +------+------+------+------+------+------| + * | Ctrl | ´ | Alt | Bsp |Space | Win | | Entr | Space| Bsb | AlGr | * | Ctrl | + * `-----------------------------------------' '-----------------------------------------' + */ +[GAME] = LAYOUT( \ + // LEFT HAND RIGHT HAND + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, SE_PLUS, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, SE_AA, \ + MO(ARRW), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, MD_OSLH, SM_AE, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, SE_MINS, KC_RSFT, \ + KC_LCTL, SE_ACUT, KC_LALT, KC_BSPC, KC_SPC, KC_LGUI, KC_ENT, KC_SPC, KC_BSPC, KC_ALGR, SE_ASTR, KC_RCTL \ +), + /* Symbols layer * ,-----------------------------------------. .-----------------------------------------. * | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | @@ -112,9 +133,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Arrow layer * ,-----------------------------------------. .-----------------------------------------. - * | §/½ | | | | | | | | | | Ins | Home | PgUp | + * | §/½ | | | | | | | | | BASE | Ins | Home | PgUp | * |------+------+------+------+------+------+ +------+------+------+------+------+------| - * | | | Up | | | | | | | | Del | End | PgDn | + * | | | Up | | | | | | | GAME | Del | End | PgDn | * |------+------+------+------+------+------| |------+------+------+------+------+------| * | | Left | Down | Right| | Back | | Fwd | | | | | | * |------+------+------+------+------+------| |------+------+------+------+------+------| @@ -124,8 +145,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------' '-----------------------------------------' */ [ARRW] = LAYOUT( \ - SE_HALF, _______, _______, _______ , _______, _______, _______, _______, _______, KC_INS , KC_HOME, KC_PGUP, \ - _______, _______, KC_UP , _______ , _______, _______, _______, _______, _______, KC_DEL , KC_END , KC_PGDN, \ + SE_HALF, _______, _______, _______ , _______, _______, _______, _______, DF(BASE), KC_INS , KC_HOME, KC_PGUP, \ + _______, _______, KC_UP , _______ , _______, _______, _______, _______, DF(GAME), KC_DEL , KC_END , KC_PGDN, \ _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, KC_WBAK, KC_WFWD, _______, _______, _______, _______, _______, \ _______, _______, _______, _______ , _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, KC_DEL , _______, _______, _______, _______, _______, _______, _______, _______ \ From 0e6f78547eca1e7bbb093265e79c26a301e6635a Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Tue, 29 Oct 2019 13:15:03 -0700 Subject: [PATCH 212/316] [Docs] Update flashing information to include :flash target (#6999) * Update Newbs Flashing guide For the newbs that want to start flashing * Update flashing docs * Misc flashing * Attempt at flashing in french Lets hope I didn't butcher this too badly with machine transations * Update docs/feature_userspace.md * Apply language suggestions from code review * Apply suggestions from code review * Apply additional fr lang suggestions from code review * Apply suggestions from code review Co-Authored-By: fauxpark Co-Authored-By: Noan Mousy <4sstylz@protonmail.ch> Co-Authored-By: Xavier Hahn Co-Authored-By: Vincent LE GOFF --- docs/feature_userspace.md | 12 +--- docs/flashing.md | 13 ++-- docs/fr-FR/flashing.md | 11 +-- docs/fr-FR/newbs_flashing.md | 103 ++++++++++++++++----------- docs/getting_started_build_tools.md | 2 +- docs/getting_started_make_guide.md | 6 +- docs/newbs_flashing.md | 105 ++++++++++++++++------------ 7 files changed, 145 insertions(+), 107 deletions(-) diff --git a/docs/feature_userspace.md b/docs/feature_userspace.md index 1cc8ca7425ce..e162d423cebb 100644 --- a/docs/feature_userspace.md +++ b/docs/feature_userspace.md @@ -211,15 +211,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if ( (temp_mod | temp_osm) & MOD_MASK_SHIFT ) #endif { // - #if defined(__arm__) // only run for ARM boards - SEND_STRING(":dfu-util"); - #elif defined(BOOTLOADER_DFU) // only run for DFU boards - SEND_STRING(":dfu"); - #elif defined(BOOTLOADER_HALFKAY) // only run for teensy boards - SEND_STRING(":teensy"); - #elif defined(BOOTLOADER_CATERINA) // only run for Pro Micros - SEND_STRING(":avrdude"); - #endif // bootloader options + SEND_STRING(":flash"); } if ( (temp_mod | temp_osm) & MOD_MASK_CTRL) { SEND_STRING(" -j8 --output-sync"); @@ -244,7 +236,7 @@ endif This will add a new `KC_MAKE` keycode that can be used in any of your keymaps. And this keycode will output `make :`, making frequent compiling easier. And this will work with any keyboard and any keymap as it will output the current boards info, so that you don't have to type this out every time. -Also, holding `shift` will add the appropriate flashing command (`:dfu`, `:teensy`, `:avrdude`, `:dfu-util`) for a majority of keyboards. Holding `control` will add some commands that will speed up compiling time by processing multiple files at once. +Also, holding Shift will add the flash target (`:flash`) to the command. Holding Control will add some commands that will speed up compiling time by processing multiple files at once. And for the boards that lack a shift key, or that you want to always attempt the flashing part, you can add `FLASH_BOOTLOADER = yes` to the `rules.mk` of that keymap. diff --git a/docs/flashing.md b/docs/flashing.md index 18ae6364d42e..98841c1aacd7 100644 --- a/docs/flashing.md +++ b/docs/flashing.md @@ -99,11 +99,16 @@ or make ::avrdude -or if you want to flash multiple boards, use the following command - make ::avrdude-loop +#### Caterina commands + +There are a number of DFU commands that you can use to flash firmware to a DFU device: + +* `:avrdude` - This is the normal option which waits until a Caterina device is available (by detecting a new COM port), and then flashes the firmware. +* `:avrdude-loop` - This runs the same command as `:avrdude`, but after each device is flashed, it will attempt to flash again. This is useful for bulk flashing. _This requires you to manually escape the loop by hitting Ctrl+C._ +* `:avrdude-split-left` - This flashes the normal firmware, just like the default option (`:avrdude`). However, this also flashes the "Left Side" EEPROM file for split keyboards. _This is ideal for Pro Micro based split keyboards._ +* `:avrdude-split-right` - This flashes the normal firmware, just like the default option (`:avrdude`). However, this also flashes the "Right Side" EEPROM file for split keyboards. _This is ideal for Pro Micro based split keyboards._ -When you're done flashing boards, you'll need to hit Ctrl + C or whatever the correct keystroke is for your operating system to break the loop. ## Halfkay @@ -231,7 +236,7 @@ Flashing sequence: There are a number of DFU commands that you can use to flash firmware to a STM32 device: -* `:dfu-util` - The default command for flashing to STM32 devices. +* `:dfu-util` - The default command for flashing to STM32 devices, and will wait until an STM32 bootloader device is present. * `:dfu-util-split-left` - This flashes the normal firmware, just like the default option (`:dfu-util`). However, this also configures the "Left Side" EEPROM setting for split keyboards. * `:dfu-util-split-right` - This flashes the normal firmware, just like the default option (`:dfu-util`). However, this also configures the "Right Side" EEPROM setting for split keyboards. * `:st-link-cli` - This allows you to flash the firmware via ST-LINK's CLI utility, rather than dfu-util. diff --git a/docs/fr-FR/flashing.md b/docs/fr-FR/flashing.md index f4379189a714..1aa04af5ff53 100644 --- a/docs/fr-FR/flashing.md +++ b/docs/fr-FR/flashing.md @@ -99,11 +99,14 @@ ou, utilisez : make ::avrdude -ou, si vous vous voulez flasher plusieurs claviers, utilisez la commande suivante : +#### Commandes Caterina - make ::avrdude-loop +Il existe un certain nombre de commandes DFU que vous pouvez utiliser pour mettre à jour le firmware sur un périphérique DFU: -Quand vous avez fini de flasher vos claviers, vous aurez besoin d'utiliser Ctrl + C ou alors la touche ayant la fonction similaire sur votre OS pour sortir de la boucle. +* `: avrdude` - Il s’agit de l’option normale. Le script va attendre qu’un appareil Caterina soit disponible. Dès que c’est le cas, il flash le firmware. Il attendra de détecter un nouveau port COM pour le flasher. +* `: avrdude-loop` - Cela fonctionne de la même manière que`: avrdude`, mais une fois que chaque périphérique est flashé, il tentera de flasher à nouveau. Cela peut être utile pour flasher plusieurs claviers à la suite. _Cela implique de sortir manuellement de la boucle en appuyant sur Ctrl + C, Cmd + C ou un raccourci équivalent selon votre OS_ +* `: avrdude-split-left` - Cela fonctionne de la même manière que la fonction (`: avrdude`). Toutefois, cela permet aussi de flasher le coté gauche de l'EEPROM des claviers splittés / divisés. C'est donc la méthode recommandée pour les claviers splittés avec Pro Micro. +* `: avrdude-split-right` - Cela fonctionne de la même manière que la fonction (`: avrdude`). Toutefois, cela permet aussi de flasher le coté droite de l'EEPROM des claviers splittés / divisés. C'est donc la méthode recommandée pour les claviers splittés avec Pro Micro. ## Halfkay @@ -230,7 +233,7 @@ Séquence pour flasher: Il y a différentes commandes que vous pouvez utiliser pour flasher un firmware dans un appareil STM32  : -* `:dfu-util` - La commande par défaut pour flasher un appareil STM32. +* `:dfu-util` - C'est l'option standard pour flasher un appareil STM32. Le script attendra qu'un bootloader STM32 soit présent. * `:dfu-util-split-left` - Permet de flasher un firmware normalement, tout comme l'option précedente mais permet de configurer le coté gauche des paramètres EEPROM sur un clavier scindé. * `:dfu-util-split-right` - Permet de flasher un firmware normalement, tout comme l'option précedente mais permet de configurer le coté droit des paramètres EEPROM sur un clavier scindé. * `:st-link-cli` - Cela permet de flasher le firmware avec l'utilitaire en ligne de commande ST-LINK's plutôt que d'utiliser dfu-util. diff --git a/docs/fr-FR/newbs_flashing.md b/docs/fr-FR/newbs_flashing.md index 401c524acabb..267cf3add9f5 100644 --- a/docs/fr-FR/newbs_flashing.md +++ b/docs/fr-FR/newbs_flashing.md @@ -78,7 +78,23 @@ Appuyez sur le boutton `Flash` dans QMK Toolbox. Vous verrez un résultat simila ## Flashez votre clavier à l'aide de la ligne de commande -La première chose que vous devez savoir c'est quel bootloader utilise votre clavier. Il y a quatre bootloaders principaux. Pro-Micro et les clones, utilisent CATERINA, les Teensy utilisent Halfkay, les OLKB utilisent QMK-DFU et les autres chips atmega32u4 utilisent DFU. +C'est désormais relativement simple. Lorsque vous êtes prêt à compiler et à flasher votre firmware, ouvrez la fenêtre de votre terminal et exécutez la commande de build : + + make ::flash + +Par exemple, si votre keymap s'appelle "xyverz" et que vous fabriquez une keymap pour un clavier `planck` de version `rev5` vous devrez utiliser cette commande: + + make planck/rev5:xyverz:flash + +La commande va vérifier la configuration du clavier, puis tentera de le flasher en fonction du bootloader (chargeur d’amorçage) spécifié. Cela signifie que vous n'avez pas besoin de savoir quel bootloader votre clavier utilise. Exécutez simplement la commande et laissez-le faire le gros du travail. + +Cependant, tout dépend du bootloader qui est installé sur le clavier. Si cette information n’est pas configurée ou si vous tentez de flasher un clavier qui ne permet pas d’être flashé alors vous obtiendrez cette erreur : + + WARNING: This board's bootloader is not specified or is not supported by the ":flash" target at this time. + +Dans ce cas, vous devrez choisir le bootloader. + +Il y a cinq bootloaders principaux. Les Pro-Micro et les clones utilisent Caterina, les Teensy utilisent Halfkay, les claviers AVR d’OLKB utilisent QMK-DFU, certains controleurs atmega32u4 utilisent DFU et la plupart des controlleurs ARM utilisent ARM DFU. Vous pouvez trouver plus d'information à propos des bootloaders sur la page [Instructions de flash et information sur le Bootloader](flashing.md). @@ -207,11 +223,14 @@ Si vous avez un soucis, essayez de faire ceci: sudo make ::avrdude -En addition, si vous voulez flasher plusieurs boards, utilisez la commande suivante: +#### Commandes Caterina - make ::avrdude-loop +Il existe un certain nombre de commandes DFU que vous pouvez utiliser pour mettre à jour le firmware sur un périphérique DFU: -Une fois que vous avez terminé de flasher des boards, vous devrez appuyer sur Ctrl + C, ou les touches correspondantes pour votre système d'exploitation pour arrêter la boucle. +* `: avrdude` - Il s’agit de l’option normale. Elle attend qu’un appareil Caterina soit disponible, puis tente de flasher le firmware. Il attendra de détecter un autre port COM, puis il flashera à nouveau. +* `: avrdude-loop` - Cela fonctionne de la même manière que `: avrdude`, mais une fois que chaque périphérique est flashé, il tentera de flasher à nouveau. Cela peut être utile pour flasher plusieurs claviers à la suite. _Cela implique de sortir manuellement de la boucle en appuyant sur Ctrl + C, Cmd + C ou un raccourci équivalent selon votre OS_ +* `: avrdude-split-left` - Cela fonctionne de la même manière que la fonction (`: avrdude`). Toutefois, cela permet aussi de flasher le coté gauche de l'EEPROM des claviers splittés / divisés. C'est donc la méthode recommandée pour les claviers splittés avec Pro Micro. +* `: avrdude-split-right` - Cela fonctionne de la même manière que la fonction (`: avrdude`). Toutefois, cela permet aussi de flasher le coté droite de l'EEPROM des claviers splittés / divisés. C'est donc la méthode recommandée pour les claviers splittés avec Pro Micro. ### HalfKay @@ -246,42 +265,6 @@ Programming..................................................................... Booting ``` -### BootloadHID - -Pour les boards basée sur Bootmapper Client(BMC)/bootloadHID/ATmega32A, une fois prêt à compiler et flasher le firmware, ouvrez votre fenêtre de terminal et lancez la commande suivante: - - make ::bootloaderHID - -Par exemple, si votre keymap s'appelle "xyverz" et que vous compilez une keymap pour un jj40, vous utilisez cette commande: - - make jj40:xyverz:bootloaderHID - -Une fois le firmware compilé, vous aurez cette sortie: - -``` -Linking: .build/jj40_default.elf [OK] -Creating load file for flashing: .build/jj40_default.hex [OK] -Copying jj40_default.hex to qmk_firmware folder [OK] -Checking file size of jj40_default.hex [OK] - * The firmware size is fine - 21920/28672 (6752 bytes free) -``` - -A ce stade, le script de build va chercher le bootloader DFU toutes les 5 secondes. Il va répéter la sortie suivante jusqu'à ce que le dispositif soit trouvé ou que vous l'annuliez. - -``` -Error opening HIDBoot device: The specified device was not found -Trying again in 5s. -``` - -Une fois ce résultat atteint, réinitialisez le contrôleur. Il devrait afficher le résultat suivant: - -``` -Page size = 128 (0x80) -Device size = 32768 (0x8000); 30720 bytes remaining -Uploading 22016 (0x5600) bytes starting at 0 (0x0) -0x05580 ... 0x05600 -``` - ### STM32 (ARM) Pour la majorité des boards ARM (incluant les Proton C, Planck Rev 6, et Preonic Rev 3), lorsque vous êtes prêt à compiler et flasher votre firmware,ouvrez la fenêtre de terminal et lancez la commande de compilation: @@ -336,10 +319,46 @@ Transitioning to dfuMANIFEST state Il y aun certain nombre de commandes du DFU que vous pouvez utiliser pour flasher un firmware sur un device STM32: -* `:dfu-util` - C'est l'option standard pour flasher un appareil STM32. -* `:dfu-util-wait` - Ceci fonctionne comme la commande standard, mais permet de d'avoir une pause (configurable( de 10 secondes avant de flasher le fimrware. Vous pouvez utiliser `TIME_DELAY=20` à la ligne de commande pour changer le délai. +* `:dfu-util` - C'est l'option standard pour flasher un appareil STM32. Elle attendra qu'un bootloader STM32 soit présent et tentera de l’utiliser. * `:dfu-util-left` - Ceci flasher le firmware standard, comme la commande standard (`:dfu-util`). Toutefois, elle flasher aussi les fichiers EEPROM du "côté gauche" pour les claviers scindés. * `:dfu-util-right` - Ceci flash le firmware standard, comme la commande standard (`:dfu-util`). Toutefois, elle flash aussi les fichiers EEPROM du "côté droit" pour les claviers scindés. +* `:st-link-cli` - Cela permet de flasher le firmware avec l'utilitaire en ligne de commande ST-LINK's plutôt que d'utiliser dfu-util. + +### BootloadHID + +Pour les claviers basés sur Bootmapper Client(BMC)/bootloadHID/ATmega32A, si vous êtes prêts à compiler et flasher le firmware, ouvrez votre fenêtre de terminal et lancez la commande suivante : + + make ::bootloaderHID + +Par exemple, si votre keymap s'appelle "xyverz" et que vous compilez une keymap pour un jj40, utilisez cette commande: + + make jj40:xyverz:bootloaderHID + +Une fois le firmware compilé, vous aurez cette sortie: + +``` +Linking: .build/jj40_default.elf [OK] +Creating load file for flashing: .build/jj40_default.hex [OK] +Copying jj40_default.hex to qmk_firmware folder [OK] +Checking file size of jj40_default.hex [OK] + * The firmware size is fine - 21920/28672 (6752 bytes free) +``` + +A ce stade, le script de build va chercher le bootloader DFU toutes les 5 secondes. Il répétera l ’affichage de ce message jusqu'à ce que l’appareil soit trouvé ou que vous annuliez l'opération``` + +``` +Error opening HIDBoot device: The specified device was not found +Trying again in 5s. +``` + +Une fois ce résultat obtenu, réinitialisez le contrôleur. Le résultat suivant devrait s’afficher : + +``` +Page size = 128 (0x80) +Device size = 32768 (0x8000); 30720 bytes remaining +Uploading 22016 (0x5600) bytes starting at 0 (0x0) +0x05580 ... 0x05600 +``` ## Faites l'essai! diff --git a/docs/getting_started_build_tools.md b/docs/getting_started_build_tools.md index 268cc94c3807..a55e903a6f26 100644 --- a/docs/getting_started_build_tools.md +++ b/docs/getting_started_build_tools.md @@ -145,7 +145,7 @@ util/docker_build.sh There is also support for building _and_ flashing the keyboard straight from Docker by specifying the `target` as well: ```bash util/docker_build.sh keyboard:keymap:target -# For example: util/docker_build.sh planck/rev6:default:dfu-util +# For example: util/docker_build.sh planck/rev6:default:flash ``` If you're on Linux, this should work out of the box. On Windows and macOS, it requires [Docker Machine](http://gw.tnode.com/docker/docker-machine-with-usb-support-on-windows-macos/) to be running. This is tedious to set up, so it's not recommended; use [QMK Toolbox](/~https://github.com/qmk/qmk_toolbox) instead. diff --git a/docs/getting_started_make_guide.md b/docs/getting_started_make_guide.md index d1ecf6f5a641..d2596b2e2bfb 100644 --- a/docs/getting_started_make_guide.md +++ b/docs/getting_started_make_guide.md @@ -14,8 +14,8 @@ The full syntax of the `make` command is `::`, The `` means the following * If no target is given, then it's the same as `all` below * `all` compiles as many keyboard/revision/keymap combinations as specified. For example, `make planck/rev4:default` will generate a single .hex, while `make planck/rev4:all` will generate a hex for every keymap available to the planck. -* `dfu`, `teensy`, `avrdude`, `dfu-util` or `bootloadHID`, compile and upload the firmware to the keyboard. If the compilation fails, then nothing will be uploaded. The programmer to use depends on the keyboard. For most keyboards it's `dfu`, but for ChibiOS keyboards you should use `dfu-util`, and `teensy` for standard Teensys. To find out which command you should use for your keyboard, check the keyboard specific readme. - * **Note**: some operating systems need root access for these commands to work, so in that case you need to run for example `sudo make planck/rev4:default:dfu`. +* `flash`, `dfu`, `teensy`, `avrdude`, `dfu-util`, or `bootloadHID` compile and upload the firmware to the keyboard. If the compilation fails, then nothing will be uploaded. The programmer to use depends on the keyboard. For most keyboards it's `dfu`, but for ChibiOS keyboards you should use `dfu-util`, and `teensy` for standard Teensys. To find out which command you should use for your keyboard, check the keyboard specific readme. + * **Note**: some operating systems need root access for these commands to work, so in that case you need to run for example `sudo make planck/rev4:default:flash`. * `clean`, cleans the build output folders to make sure that everything is built from scratch. Run this before normal compilation if you have some unexplainable problems. You can also add extra options at the end of the make command line, after the target @@ -31,7 +31,7 @@ Here are some examples commands * `make all:all` builds everything (all keyboard folders, all keymaps). Running just `make` from the `root` will also run this. * `make ergodox_infinity:algernon:clean` will clean the build output of the Ergodox Infinity keyboard. -* `make planck/rev4:default:dfu COLOR=false` builds and uploads the keymap without color output. +* `make planck/rev4:default:flash COLOR=false` builds and uploads the keymap without color output. ## `rules.mk` Options diff --git a/docs/newbs_flashing.md b/docs/newbs_flashing.md index 9c76f5592de9..428e698e2418 100644 --- a/docs/newbs_flashing.md +++ b/docs/newbs_flashing.md @@ -86,7 +86,23 @@ Click the `Flash` button in QMK Toolbox. You will see output similar to the foll ## Flash your Keyboard from the Command Line -First thing you'll need to know is which bootloader that your keyboard uses. There are four main bootloaders that are used, usually. Pro-Micro and clones use CATERINA, and Teensy's use Halfkay, OLKB boards use QMK-DFU, and other atmega32u4 chips use DFU. +This has been made pretty simple compared to what it used to be. When you are ready to compile and flash your firmware, open up your terminal window and run the build command: + + make ::flash + +For example, if your keymap is named "xyverz" and you're building a keymap for a rev5 planck, you'll use this command: + + make planck/rev5:xyverz:flash + +This will check the keyboard's configuration, and then attempt to flash it based on the specified bootloader. This means that you don't need to know which bootloader that your keyboard uses. Just run the command, and let the command do the heavy lifting. + +However, this does rely on the bootloader being set by the keyboard. If this information is not configured, or you're using a board that doesn't have a supported target to flash it, you will see this error: + + WARNING: This board's bootloader is not specified or is not supported by the ":flash" target at this time. + +In this case, you'll have to fall back on specifying the bootloader. + +There are five main bootloaders that are used. Pro Micro and clones use Caterina, Teensys use HalfKay, OLKB's AVR boards use QMK-DFU, other ATmega32U4 boards use DFU, and most ARM boards use ARM DFU. You can find more information about the bootloaders in the [Flashing Instructions and Bootloader Information](flashing.md) page. @@ -216,11 +232,14 @@ If you have any issues with this, you may need to this: sudo make ::avrdude -Additionally, if you want to flash multiple boards, use the following command: +#### Caterina commands - make ::avrdude-loop +There are a number of DFU commands that you can use to flash firmware to a DFU device: -When you're done flashing boards, you'll need to hit Ctrl + C or whatever the correct keystroke is for your operating system to break the loop. +* `:avrdude` - This is the normal option which waits until a Caterina device is available (by detecting a new COM port), and then flashes the firmware. +* `:avrdude-loop` - This runs the same command as `:avrdude`, but after each device is flashed, it will attempt to flash again. This is useful for bulk flashing. _This requires you to manually escape the loop by hitting Control+C._ +* `:avrdude-split-left` - This flashes the normal firmware, just like the default option (`:avrdude`). However, this also flashes the "Left Side" EEPROM file for split keyboards. _This is ideal for Pro Micro based split keyboards._ +* `:avrdude-split-right` - This flashes the normal firmware, just like the default option (`:avrdude`). However, this also flashes the "Right Side" EEPROM file for split keyboards. _This is ideal for Pro Micro based split keyboards._ ### HalfKay @@ -256,42 +275,6 @@ Programming..................................................................... Booting ``` -### BootloadHID - -For Bootmapper Client(BMC)/bootloadHID/ATmega32A based boards, when you're ready to compile and flash your firmware, open up your terminal window and run the build command: - - make ::bootloaderHID - -For example, if your keymap is named "xyverz" and you're building a keymap for a jj40, you'll use this command: - - make jj40:xyverz:bootloaderHID - -Once the firmware finishes compiling, it will output something like this: - -``` -Linking: .build/jj40_default.elf [OK] -Creating load file for flashing: .build/jj40_default.hex [OK] -Copying jj40_default.hex to qmk_firmware folder [OK] -Checking file size of jj40_default.hex [OK] - * The firmware size is fine - 21920/28672 (6752 bytes free) -``` - -After it gets to this point, the build script will look for the DFU bootloader every 5 seconds. It will repeat the following until the device is found or you cancel it. - -``` -Error opening HIDBoot device: The specified device was not found -Trying again in 5s. -``` - -Once it does this, you'll want to reset the controller. It should then show output similar to this: - -``` -Page size = 128 (0x80) -Device size = 32768 (0x8000); 30720 bytes remaining -Uploading 22016 (0x5600) bytes starting at 0 (0x0) -0x05580 ... 0x05600 -``` - ### STM32 (ARM) For a majority of ARM boards (including the Proton C, Planck Rev 6, and Preonic Rev 3), when you're ready to compile and flash your firmware, open up your terminal window and run the build command: @@ -346,11 +329,47 @@ Transitioning to dfuMANIFEST state There are a number of DFU commands that you can use to flash firmware to a STM32 device: -* `:dfu-util` - The default command for flashing to STM32 devices. -* `:dfu-util-wait` - This works like the default command, but it gives you a (configurable) 10 second timeout before it attempts to flash the firmware. You can use `TIME_DELAY=20` from the command line to change the timeout. - * Eg: `make ::dfu-util TIME_DELAY=5` +* `:dfu-util` - The default command for flashing to STM32 devices, and will wait until an STM32 bootloader is present. . * `:dfu-util-split-left` - This flashes the normal firmware, just like the default option (`:dfu-util`). However, this also configures the "Left Side" EEPROM setting for split keyboards. * `:dfu-util-split-right` - This flashes the normal firmware, just like the default option (`:dfu-util`). However, this also configures the "Right Side" EEPROM setting for split keyboards. +* `:st-link-cli` - This allows you to flash the firmware via ST-LINK's CLI utility, rather than dfu-util. + + +### BootloadHID + +For Bootmapper Client(BMC)/bootloadHID/ATmega32A based boards, when you're ready to compile and flash your firmware, open up your terminal window and run the build command: + + make ::bootloaderHID + +For example, if your keymap is named "xyverz" and you're building a keymap for a jj40, you'll use this command: + + make jj40:xyverz:bootloaderHID + +Once the firmware finishes compiling, it will output something like this: + +``` +Linking: .build/jj40_default.elf [OK] +Creating load file for flashing: .build/jj40_default.hex [OK] +Copying jj40_default.hex to qmk_firmware folder [OK] +Checking file size of jj40_default.hex [OK] + * The firmware size is fine - 21920/28672 (6752 bytes free) +``` + +After it gets to this point, the build script will look for the DFU bootloader every 5 seconds. It will repeat the following until the device is found or you cancel it. + +``` +Error opening HIDBoot device: The specified device was not found +Trying again in 5s. +``` + +Once it does this, you'll want to reset the controller. It should then show output similar to this: + +``` +Page size = 128 (0x80) +Device size = 32768 (0x8000); 30720 bytes remaining +Uploading 22016 (0x5600) bytes starting at 0 (0x0) +0x05580 ... 0x05600 +``` ## Test It Out! From f1640165667bd416cd9b0680d4852988df686edc Mon Sep 17 00:00:00 2001 From: Dominic Fleckner Date: Tue, 29 Oct 2019 21:33:09 +0100 Subject: [PATCH 213/316] [Docs] Translated "CLI" documentation to German (#7178) * Translated "CLI" documentation to German > * Weise den User an, die Umgebungs-Variable `QMK_HOME` zu setzen, um die Firmware-Quelle anders einzustellen als `~/qmk_firmware`. - I wasn't quite sure with this translation, as I didn't understand the context in the original English docs. - The link to the CLI Configuration page is currently not working, due to it being missing in German. * Update docs/de/cli.md - typo * Update docs/de/cli.md - added Installation option into documentation * Update docs/de/cli.md - changed article for CLI * Update docs/de/cli.md Spelling * Update docs/de/cli.md Spelling * Update docs/de/cli.md de-anglicization * Update docs/de/cli.md Spelling * Update docs/de/cli.md Synonym * Update docs/de/cli.md Added Installation option * Cleaned up installation option duplicate Co-Authored-By: kuchosauronad0 <22005492+kuchosauronad0@users.noreply.github.com> --- docs/de/cli.md | 169 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 169 insertions(+) create mode 100644 docs/de/cli.md diff --git a/docs/de/cli.md b/docs/de/cli.md new file mode 100644 index 000000000000..437062ad6675 --- /dev/null +++ b/docs/de/cli.md @@ -0,0 +1,169 @@ +# QMK CLI (Kommandozeile) + +Diese Seite beschreibt die Einrichtung und den Umgang mit dem QMK CLI (Kommandozeile). + +# Übersicht + +Die QMK CLI vereinfacht das Zusammenbauen und Arbeiten mit QMK Tastaturen. Hier findest Du wichtige Befehle, um beispielsweise das Herunterladen und Kompilieren der QMK Firmware oder das Erstellen von Tastaturbelegungen (und vieles mehr) zu erleichtern. + +* [Globale CLI](#globale-cli) +* [Lokale CLI](#lokale-cli) +* [CLI-Befehle](#cli-befehle) + +# System-Anforderungen + +Die CLI benötigt Python 3.5 oder höher. Außerdem ist es nötig, die Packages laut [`requirements.txt`](/~https://github.com/qmk/qmk_firmware/blob/master/requirements.txt) zu installieren. + +# Globale CLI + +QMK bietet ein installierbares CLI, das Du zum Einrichten Deiner QMK Build-Umgebung verwenden kannst. Dieses ermöglicht Dir das Arbeiten mit QMK, und erleichtert das Arbeiten mit mehreren Kopien der `qmk_firmware`. Wir empfehlen, dieses CLI zu installieren und regelmäßig upzudaten. + +## Installation mit Homebrew (macOS, manche Linux) + +Solltest Du [Homebrew](https://brew.sh) installiert haben, kannst Du QMK per tap installieren: + +``` +brew tap qmk/qmk +brew install qmk +export QMK_HOME='~/qmk_firmware' # Optional: setzt den Installationsort für `qmk_firmware` +qmk setup # Dies klont `qmk/qmk_firmware` und richtet optional auch Deine Build-Umgebung ein +``` + +## Installation mit easy_install oder pip + +Falls Du kein Homebrew hast, kannst Du QMK auch manuell installieren. Zuerst musst Du sicherstellen, dass Python 3.5 (oder höher) und pip installiert ist. Dann installiere QMK mit diesem Befehl: + +``` +pip3 install qmk +export QMK_HOME='~/qmk_firmware' # Optional: setzt den Installationsort für `qmk_firmware` +qmk setup # Dies klont `qmk/qmk_firmware` und richtet optional auch Deine Build-Umgebung ein +``` +## Installation mit git Repo + +`git clone /~https://github.com/qmk/qmk_cli.git && cd qmk_cli && python3 setup.py install` + +## Packaging für andere Betriebssysteme + +Wir suchen nach Freiwilligen, die ein `qmk`-Package für weitere Betriebssysteme erstellen und pflegen. Falls Du ein Package für Dein OS erstellen möchtest, bitte befolge diese Richtlinien: + +* Verwende "Best Practices" für Dein OS, sollten sie mit diesen Richtlinien in Konflikt stehen. + * Dokumentiere den Grund in einem Kommentar, wenn Du abweichen musstest. +* Installiere mit einem [virtualenv](https://virtualenv.pypa.io/en/latest/). +* Weise den User an, die Umgebungs-Variable `QMK_HOME` zu setzen, um die Firmware-Quelle anders einzustellen als `~/qmk_firmware`. + +# Lokale CLI + +Wenn Du die globale CLI nicht verwenden möchtest, beinhaltet `qmk_firmware` auch eine lokale CLI. Du kannst sie hier finden: `qmk_firmware/bin/qmk`. Du kannst den `qmk`-Befehl aus irgendeinem Datei-Verzeichnis ausführen und es wird immer auf dieser Kopie von `qmk_firmware` arbeiten. + +**Beispiel**: + +``` +$ ~/qmk_firmware/bin/qmk hello +Ψ Hello, World! +``` + +## Einschränkungen der lokalen CLI + +Hier ein Vergleich mit der globalen CLI: + +* Die lokale CLI unterstützt kein `qmk setup` oder `qmk clone`. +* Die lokale CLI arbeitet immer innerhalb der selben `qmk_firmware`-Verzeichnisstruktur, auch wenn Du mehrere Repositories geklont hast. +* Die lokale CLI läuft nicht in einer virtualenv. Daher ist es möglich, dass Abhängigkeiten (dependencies) miteinander in Konflikt kommen/stehen. + +# CLI-Befehle + +## `qmk compile` + +Dieser Befehl erlaubt es dir, die Firmware - aus egal welchem Datei-Verzeichnis - zu compilen. Du kannst JSON-Exporte von oder Keymaps in der Repo kompilen. + +**Anwendung für Konfigurations-Exports**: + +``` +qmk compile +``` + +**Anwendung für Keymaps**: + +``` +qmk compile -kb -km +``` + +## `qmk cformat` + +Dieser Befehl formatiert C-Code im clang-Format. Benutze ihn ohne Argumente, um den core-Code zu formatieren, oder benutze Namen von Dateien in der CLI, um den Befehl auf bestimmte Dateien anzuwenden. + +**Anwendung**: + +``` +qmk cformat [file1] [file2] [...] [fileN] +``` + +## `qmk config` + +Dieser Befehl konfiguriert das Verhalten von QMK. Für die volle `qmk config`-Dokumentation gehe zu [CLI-Konfiguration](cli_configuration.md). + +**Anwendung**: + +``` +qmk config [-ro] [config_token1] [config_token2] [...] [config_tokenN] +``` + +## `qmk docs` + +Dieser Befehl startet einen lokalen HTTP-Server, den Du zum Browsen oder Verbessern der Dokumentation verwenden kannst. Der Default-Port ist 8936. + +**Anwendung**: + +``` +qmk docs [-p PORT] +``` + +## `qmk doctor` + +Dieser Befehl untersucht Deine Umgebung und warnt Dich vor potentiellen Build- oder Flash-Problemen. + +**Anwendung**: + +``` +qmk doctor +``` + +## `qmk list-keyboards` + +Dieser Befehl listet alle zurzeit in `qmk_firmware` definierten Tastaturen/Keyboards auf. + +**Anwendung**: + +``` +qmk list-keyboards +``` + +## `qmk new-keymap` + +Dieser Befehl erstellt eine neue Keymap basierend auf einer existierenden Standard-Keymap eines bestimmten Keyboards. + +**Anwendung**: + +``` +qmk new-keymap [-kb KEYBOARD] [-km KEYMAP] +``` + +## `qmk pyformat` + +Dieser Befehl formatiert Python-Code in `qmk_firmware`. + +**Anwendung**: + +``` +qmk pyformat +``` + +## `qmk pytest` + +Dieser Befehl führt die Python Test Suite aus. Wenn Du Python-Code veränderst, solltest Du sicherstellen, dass der Test erfolgreich ausgeführt wurde. + +**Anwendung**: + +``` +qmk pytest +``` From d62469013512cf8ffe775ec8aa941f32e1d7c7d3 Mon Sep 17 00:00:00 2001 From: Toshihiro Suzuki Date: Wed, 30 Oct 2019 07:41:37 +0900 Subject: [PATCH 214/316] [Keymap] Add keymaps for myself (#7141) * [zinc] add toshi0383 qwerty layout * Add dvorak like keymap * update keymap * update keymap * update * Add my keymap for reviung39 * cleanup * fix RESET button position * add rgb_mod to raise * Update keyboards/reviung39/keymaps/toshi0383/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/zinc/keymaps/toshi0383/keymap.c Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/zinc/keymaps/toshi0383/keymap.c Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * remove unnecessary code * improve comment * Update keyboards/reviung39/keymaps/toshi0383/keymap.c Co-Authored-By: Drashna Jaelre * Update keyboards/zinc/keymaps/toshi0383/keymap.c Co-Authored-By: Drashna Jaelre * remove unused function * cleanup * refactor using MO --- .../reviung39/keymaps/toshi0383/config.h | 47 +++++++++ .../reviung39/keymaps/toshi0383/keymap.c | 57 +++++++++++ .../reviung39/keymaps/toshi0383/readme.md | 3 + .../reviung39/keymaps/toshi0383/rules.mk | 1 + keyboards/zinc/keymaps/toshi0383/config.h | 39 ++++++++ keyboards/zinc/keymaps/toshi0383/keymap.c | 89 +++++++++++++++++ keyboards/zinc/keymaps/toshi0383/rules.mk | 95 +++++++++++++++++++ 7 files changed, 331 insertions(+) create mode 100644 keyboards/reviung39/keymaps/toshi0383/config.h create mode 100644 keyboards/reviung39/keymaps/toshi0383/keymap.c create mode 100644 keyboards/reviung39/keymaps/toshi0383/readme.md create mode 100644 keyboards/reviung39/keymaps/toshi0383/rules.mk create mode 100644 keyboards/zinc/keymaps/toshi0383/config.h create mode 100644 keyboards/zinc/keymaps/toshi0383/keymap.c create mode 100644 keyboards/zinc/keymaps/toshi0383/rules.mk diff --git a/keyboards/reviung39/keymaps/toshi0383/config.h b/keyboards/reviung39/keymaps/toshi0383/config.h new file mode 100644 index 000000000000..cd201ebfbbb2 --- /dev/null +++ b/keyboards/reviung39/keymaps/toshi0383/config.h @@ -0,0 +1,47 @@ +/* Copyright 2019 gtips + * + * 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 . + */ + +#pragma once + +// place overrides here + +#define RGB_DI_PIN D3 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 11 + #define RGBLIGHT_HUE_STEP 16 + #define RGBLIGHT_SAT_STEP 16 + #define RGBLIGHT_VAL_STEP 16 + #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +#endif diff --git a/keyboards/reviung39/keymaps/toshi0383/keymap.c b/keyboards/reviung39/keymaps/toshi0383/keymap.c new file mode 100644 index 000000000000..da94181db1c3 --- /dev/null +++ b/keyboards/reviung39/keymaps/toshi0383/keymap.c @@ -0,0 +1,57 @@ +/* Copyright 2019 gtips + * + * 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 . + */ +#include QMK_KEYBOARD_H + +enum layer_names { + _BASE, + _LOWER, + _RAISE, + _ADJUST +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define ADJUST MO(_ADJUST) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_reviung39( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPACE, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_RGUI, KC_RSFT, + KC_SPC, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_RCTL, KC_RGUI, KC_RALT, RGUI(KC_RSFT), + LOWER, KC_ENT, RAISE + ), + + [_LOWER] = LAYOUT_reviung39( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, _______, _______, _______, + _______, KC_LT, KC_GT, KC_LPRN, KC_RPRN, KC_GRV, KC_MINS, KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, KC_PIPE, + _______, _______, _______, _______, KC_EQL, KC_QUES, KC_UNDS, KC_PLUS, KC_COMM, KC_DOT, KC_SLSH, _______, + _______, KC_ENT, KC_RGUI + ), + + [_RAISE] = LAYOUT_reviung39( + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + _______, KC_COLN, KC_SCLN, KC_DQT, KC_QUOT, KC_BSLS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, + _______, _______, _______, _______, _______, _______, ADJUST, _______, _______, _______, _______, _______, + KC_LGUI, KC_ENT, _______ + ), + + [_ADJUST] = LAYOUT_reviung39( + RGB_VAI, RGB_SAI, RGB_HUI, RGB_MOD, XXXXXXX, RGB_TOG, KC_Y, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + RGB_VAD, RGB_SAD, RGB_HUD, RGB_RMOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, XXXXXXX, _______ + ), +}; diff --git a/keyboards/reviung39/keymaps/toshi0383/readme.md b/keyboards/reviung39/keymaps/toshi0383/readme.md new file mode 100644 index 000000000000..5a09f2559aac --- /dev/null +++ b/keyboards/reviung39/keymaps/toshi0383/readme.md @@ -0,0 +1,3 @@ +# toshi0383's keymap for REVIUNG39 + +__REVIUNG39 is regular version__ diff --git a/keyboards/reviung39/keymaps/toshi0383/rules.mk b/keyboards/reviung39/keymaps/toshi0383/rules.mk new file mode 100644 index 000000000000..7ad666d1a383 --- /dev/null +++ b/keyboards/reviung39/keymaps/toshi0383/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = yes \ No newline at end of file diff --git a/keyboards/zinc/keymaps/toshi0383/config.h b/keyboards/zinc/keymaps/toshi0383/config.h new file mode 100644 index 000000000000..33108a29e6f2 --- /dev/null +++ b/keyboards/zinc/keymaps/toshi0383/config.h @@ -0,0 +1,39 @@ +/* +This is the c configuration file for the keymap + +Copyright 2019 Toshihiro Suzuki +Copyright 2018 monksoffunk +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once +// if you need more program area, try uncomment follow line +#include "serial_config_simpleapi.h" + +// place overrides here +// Selection of RGBLIGHT MODE to use. +#if defined(LED_ANIMATIONS) + #define RGBLIGHT_EFFECT_BREATHING + #define RGBLIGHT_EFFECT_RAINBOW_MOOD + #define RGBLIGHT_EFFECT_RAINBOW_SWIRL + #define RGBLIGHT_EFFECT_SNAKE + #define RGBLIGHT_EFFECT_KNIGHT + #define RGBLIGHT_EFFECT_CHRISTMAS + #define RGBLIGHT_EFFECT_STATIC_GRADIENT + //#define RGBLIGHT_EFFECT_RGB_TEST + //#define RGBLIGHT_EFFECT_ALTERNATING +#endif diff --git a/keyboards/zinc/keymaps/toshi0383/keymap.c b/keyboards/zinc/keymaps/toshi0383/keymap.c new file mode 100644 index 000000000000..d1738c83e84e --- /dev/null +++ b/keyboards/zinc/keymaps/toshi0383/keymap.c @@ -0,0 +1,89 @@ +#include QMK_KEYBOARD_H + +extern uint8_t is_master; + +enum layer_names { + _BASE, + _LOWER, + _RAISE, + _ADJUST +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define ADJUST MO(_ADJUST) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { \ + /* Qwerty + * ,-----------------------------------------. ,-----------------------------------------. + * | Esc | Q | W | E | R | T | | Y | U | I | O | P |BSpace| + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | A | S | D | F | G | | H | J | K | L | : |Shift | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |Space | Z | X | C | V | B | | N | M | Ctrl | GUI | Alt | SCMD | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | |Lower |Enter | |Enter |Raise | | | | | + * `-----------------------------------------' `-----------------------------------------' + */ + [_BASE] = LAYOUT_ortho_4x12( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPACE, \ + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_RGUI, KC_RSFT, \ + KC_SPC, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_RCTL, KC_RGUI, KC_RALT, RGUI(KC_RSFT), \ + _______, _______, _______, _______, LOWER, KC_ENT, KC_ENT, RAISE, _______, _______, _______, _______ \ + ), + + /* Lower + * ,-----------------------------------------. ,-----------------------------------------. + * | ~ | ! | @ | # | $ | % | | ^ | & | * | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | < | > | ( | ) | ` | | - | { | } | [ | ] | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | = | ? | | _ | + | , | . | / | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | |------| TRSP | | TRSP | GUI | | | | | + * `-----------------------------------------' `-----------------------------------------' + */ + [_LOWER] = LAYOUT_ortho_4x12( \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, _______, _______, _______,\ + _______, KC_LT, KC_GT, KC_LPRN, KC_RPRN, KC_GRV, KC_MINS, KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, KC_PIPE, \ + _______, _______, _______, _______, KC_EQL, KC_QUES, KC_UNDS, KC_PLUS, KC_COMM, KC_DOT, KC_SLSH, _______, \ + _______, _______, _______, _______, _______, KC_TRNS, ADJUST, KC_RGUI, _______, _______, _______, _______ \ + ), + + /* Raise + * ,-----------------------------------------. ,-----------------------------------------. + * | | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | : | ; | " | ' | \ | | Left | Down | Up |Right | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | |ADJUST| | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | GUI |Shift | |Shift |------| | | | | + * `-----------------------------------------' `-----------------------------------------' + */ + [_RAISE] = LAYOUT_ortho_4x12( \ + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \ + _______, KC_COLN, KC_SCLN, KC_DQT, KC_QUOT, KC_BSLS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, \ + _______, _______, _______, _______, _______, _______, ADJUST, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, KC_LGUI, KC_LSFT, KC_LSFT, _______, _______, _______, _______, _______ \ + ), + + /* Adjust (Lower + Raise) + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | |RESET | |------| | | | | | + * `-----------------------------------------' `-----------------------------------------' + */ + [_ADJUST] = LAYOUT_ortho_4x12( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______ \ + ), + +}; diff --git a/keyboards/zinc/keymaps/toshi0383/rules.mk b/keyboards/zinc/keymaps/toshi0383/rules.mk new file mode 100644 index 000000000000..dca9aa7ff8cc --- /dev/null +++ b/keyboards/zinc/keymaps/toshi0383/rules.mk @@ -0,0 +1,95 @@ +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +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 +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +SWAP_HANDS_ENABLE = no # Enable one-hand typing + +define ZINC_CUSTOMISE_MSG + $(info Zinc customize) + $(info - LED_BACK_ENABLE=$(LED_BACK_ENABLE)) + $(info - LED_UNDERGLOW_ENABLE=$(LED_UNDERGLOW_ENABLE)) + $(info - LED_ANIMATION=$(LED_ANIMATIONS)) + $(info - IOS_DEVICE_ENABLE=$(IOS_DEVICE_ENABLE)) +endef + +# Zinc keyboard customize +LED_BACK_ENABLE = no # LED backlight (Enable SK6812mini backlight) +LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight) +LED_ANIMATIONS = yes # LED animations +IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) +Link_Time_Optimization = no # if firmware size over limit, try this option + +#### LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE. +#### Do not enable these with audio at the same time. + +### Zinc keyboard 'default' keymap: convenient command line option +## make ZINC= zinc:defualt +## option= back | under | na | ios +## ex. +## make ZINC=under zinc:defualt +## make ZINC=under,ios zinc:defualt +## make ZINC=back zinc:default +## make ZINC=back,na zinc:default +## make ZINC=back,ios zinc:default + +ifneq ($(strip $(ZINC)),) + ifeq ($(findstring back,$(ZINC)), back) + LED_BACK_ENABLE = yes + else ifeq ($(findstring under,$(ZINC)), under) + LED_UNDERGLOW_ENABLE = yes + endif + ifeq ($(findstring na,$(ZINC)), na) + LED_ANIMATIONS = no + endif + ifeq ($(findstring ios,$(ZINC)), ios) + IOS_DEVICE_ENABLE = yes + endif + $(eval $(call ZINC_CUSTOMISE_MSG)) + $(info ) +endif + +ifeq ($(strip $(LED_BACK_ENABLE)), yes) + RGBLIGHT_ENABLE = yes + OPT_DEFS += -DRGBLED_BACK + ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) + $(eval $(call ZINC_CUSTOMISE_MSG)) + $(error LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE both 'yes') + endif +else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) + RGBLIGHT_ENABLE = yes +else + RGBLIGHT_ENABLE = no +endif + +ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) + OPT_DEFS += -DIOS_DEVICE_ENABLE +endif + +ifeq ($(strip $(LED_ANIMATIONS)), yes) +# OPT_DEFS += -DRGBLIGHT_ANIMATIONS + OPT_DEFS += -DLED_ANIMATIONS +endif + +ifeq ($(strip $(Link_Time_Optimization)),yes) + EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization +endif + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +# Uncomment these for debugging +# $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) +# $(info -- OPT_DEFS=$(OPT_DEFS)) +# $(info ) + From cb3b5563e402dc1c14d8f34f731b17bdd956ea82 Mon Sep 17 00:00:00 2001 From: Wermeille Bastien Date: Tue, 29 Oct 2019 23:42:19 +0100 Subject: [PATCH 215/316] [Docs] Fix some misspells in French documentation (#7171) * Fix some spelling mistakes * Fix some misspell in french documentation * Small misspell fix in French in ChangeLog --- docs/fr-FR/ChangeLog/20190830.md | 4 ++-- docs/fr-FR/README.md | 4 ++-- docs/fr-FR/breaking_changes.md | 2 +- docs/fr-FR/cli.md | 6 +++--- docs/fr-FR/cli_configuration.md | 4 ++-- docs/fr-FR/contributing.md | 18 ++++++++--------- docs/fr-FR/flashing.md | 20 +++++++++---------- docs/fr-FR/getting_started_getting_help.md | 4 ++-- docs/fr-FR/getting_started_github.md | 6 +++--- docs/fr-FR/getting_started_introduction.md | 4 ++-- docs/fr-FR/newbs_best_practices.md | 16 +++++++-------- .../newbs_building_firmware_configurator.md | 4 ++-- docs/fr-FR/newbs_flashing.md | 10 +++++----- docs/fr-FR/newbs_getting_started.md | 10 +++++----- docs/fr-FR/newbs_testing_debugging.md | 8 ++++---- 15 files changed, 60 insertions(+), 60 deletions(-) diff --git a/docs/fr-FR/ChangeLog/20190830.md b/docs/fr-FR/ChangeLog/20190830.md index 4ce1b0863156..cb223be31abf 100644 --- a/docs/fr-FR/ChangeLog/20190830.md +++ b/docs/fr-FR/ChangeLog/20190830.md @@ -6,9 +6,9 @@ Ce document présente les fusions de Breaking Change. Voici la liste des changem ## Formattage de code Core avec clang-format -* Tous les fichiers core (`drivers/`, `quantum/`, `tests/`, et `tmk_core/`) seront formattés avec clang-format +* Tous les fichiers core (`drivers/`, `quantum/`, `tests/`, et `tmk_core/`) seront formatés avec clang-format * Un processus travis pour reformatter les PRs lors de la fusion a été mis en place -* Vous pouvez utiliser la nouvelle commande CLI `qmk cformat` afin de formatter avant de soumettre votre PR si vous le souhaitez. +* Vous pouvez utiliser la nouvelle commande CLI `qmk cformat` afin de formater avant de soumettre votre PR si vous le souhaitez. ## Nettoyage des descripteurs LUFA USB diff --git a/docs/fr-FR/README.md b/docs/fr-FR/README.md index 5bbe353b48c3..d3591554b01e 100644 --- a/docs/fr-FR/README.md +++ b/docs/fr-FR/README.md @@ -7,7 +7,7 @@ [![Contributeurs Github](https://img.shields.io/github/contributors/qmk/qmk_firmware.svg)](/~https://github.com/qmk/qmk_firmware/pulse/monthly) [![Forks Github](https://img.shields.io/github/forks/qmk/qmk_firmware.svg?style=social&label=Fork)](/~https://github.com/qmk/qmk_firmware/) -## Qu'est ce que QMK Firmware ? +## Qu'est-ce que QMK Firmware ? QMK (*Quantum Mechanical Keyboard*) est une communauté open source qui maintient le firmware QMK, la QMK Toolbox (*Boite à outil*), qmk.fm et leurs documentations. QMK Firmware est un firmware dédié aux claviers qui est basé sur [tmk\_keyboard](http://github.com/tmk/tmk_keyboard). Il offre des fonctionnalités très utiles pour les contrôleurs Atmel AVR, et, plus spécifiquement pour [les produits d'OLKB](http://olkb.com), le clavier [ErgoDox EZ](http://www.ergodox-ez.com), et pour les [produits Clueboard](http://clueboard.co/). Il prend désormais aussi en charge les processeurs ARM qui utilisent ChibiOS. Vous pouvez l'utiliser pour contrôler un clavier personnalisé soudé à la main ou alors sur un clavier avec un PCB personnalisé. @@ -23,7 +23,7 @@ Avant d'être prêt à compiler vous allez devoir [installer un environnement](g make planck/rev4:default -Cette commande compilera la révision `rev4` du clavier `planck` avec la disposition `default`. Notez que tous les claviers n'ont pas forcément de révisions (aussi appelées sous-projects ou dossiers, ou en en Anglais « subprojects » ou « folder »). Cette option peut donc être omise : +Cette commande compilera la révision `rev4` du clavier `planck` avec la disposition `default`. Notez que tous les claviers n'ont pas forcément de révisions (aussi appelées sous-projects ou dossiers, ou en anglais « subprojects » ou « folder »). Cette option peut donc être omise : make preonic:default diff --git a/docs/fr-FR/breaking_changes.md b/docs/fr-FR/breaking_changes.md index 6913dbd3f115..53bbb2212aa1 100644 --- a/docs/fr-FR/breaking_changes.md +++ b/docs/fr-FR/breaking_changes.md @@ -23,7 +23,7 @@ Le prochain Breaking Change est planifié pour le 29 novembre. ## Quels changements seront inclus? -Pour voir une liste de candidats de breaking changes, vous pouvez regardez la liste des [labels `breaking_change`](/~https://github.com/qmk/qmk_firmware/pulls?q=is%3Aopen+label%3Abreaking_change+is%3Apr). De nouveaux changements peuvent être ajoutés entre maintenant et lorsque `future` est fermée, et un PR avec ce label n'est pas garanti d'être fusionné. +Pour voir une liste de candidats de breaking changes, vous pouvez regarder la liste des [labels `breaking_change`](/~https://github.com/qmk/qmk_firmware/pulls?q=is%3Aopen+label%3Abreaking_change+is%3Apr). De nouveaux changements peuvent être ajoutés entre maintenant et lorsque `future` est fermée, et un PR avec ce label n'est pas garanti d'être fusionné. Si vous souhaitez que votre breaking change soit inclus dans ce tour, vous devez créer un PR avec le label `breaking_change` et faire en sorte qu'il soit accepté avant que `future` ne soit fermé. Une fois `future` fermé, aucun nouveau breaking change sera accepté. diff --git a/docs/fr-FR/cli.md b/docs/fr-FR/cli.md index 176ee90da45e..428153645828 100644 --- a/docs/fr-FR/cli.md +++ b/docs/fr-FR/cli.md @@ -4,7 +4,7 @@ Cette page décrit comment configurer et utiliser la CLI QMK. # Vue d'ensemble -La CLI de QMK permet de simplifier la compilation et l'intéraction avec les clavier QMK. Nous avons définis plusieurs commandes pour simplifier et rationaliser les tâches telles qu'obtenir et compiler le firmware QMK, créer de nouvelles keymaps, et plus. +La CLI de QMK permet de simplifier la compilation et l'interaction avec les claviers QMK. Nous avons défini plusieurs commandes pour simplifier et rationaliser les tâches telles qu'obtenir et compiler le firmware QMK, créer de nouvelles keymaps, et plus. * [CLI globale](#global-cli) * [CLI locale](#local-cli) @@ -127,7 +127,7 @@ qmk new-keymap [-kb KEYBOARD] [-km KEYMAP] ## `qmk pyformat` -Cette commande formatte le code python dans `qmk_firmware`. +Cette commande formate le code python dans `qmk_firmware`. **Utilisation**: @@ -137,7 +137,7 @@ qmk pyformat ## `qmk pytest` -Cette commande démarre la suite de test python. Si vous faites des changements dans le code Python, assurez vous que les tests se lancent avec succès. +Cette commande démarre la suite de test python. Si vous faites des changements dans le code Python, assurez-vous que les tests se lancent avec succès. **Utilisation**: diff --git a/docs/fr-FR/cli_configuration.md b/docs/fr-FR/cli_configuration.md index dcd197f85219..3eed1e0e9502 100644 --- a/docs/fr-FR/cli_configuration.md +++ b/docs/fr-FR/cli_configuration.md @@ -41,7 +41,7 @@ user.keymap: None -> default # CLI Documentation (`qmk config`) -La commande `qmk config` est utilisée pour intéragir avec la configuration sous-jacente. Lancée sans argument, elle affiche la configuration courante. Lorsque des arguments sont définis, ils sont considérés comme étant des jetons de configuration, qui sont des chaînes de caractère ne contenant aucun espace avec le format suivant: +La commande `qmk config` est utilisée pour interagir avec la configuration sous-jacente. Lancée sans argument, elle affiche la configuration courante. Lorsque des arguments sont définis, ils sont considérés comme étant des jetons de configuration, qui sont des chaînes de caractère ne contenant aucun espace avec le format suivant: [.][=] @@ -91,7 +91,7 @@ default.keymap: default -> None ## Plusieurs opérations -Vous pouvez combiner plusieures opérations d'écriture et de lecture en une seule commande. Elle seront exécutées et affichées dans l'ordre: +Vous pouvez combiner plusieurs opérations d'écriture et de lecture en une seule commande. Elles seront exécutées et affichées dans l'ordre: ``` $ qmk config compile default.keymap=default compile.keymap=None diff --git a/docs/fr-FR/contributing.md b/docs/fr-FR/contributing.md index 6d6889b018bf..0092d664efbe 100644 --- a/docs/fr-FR/contributing.md +++ b/docs/fr-FR/contributing.md @@ -2,7 +2,7 @@ 👍🎉 Premièrement, merci de prendre le temps de lire ceci et de contribuer! 🎉👍 -Les contributions de tiers nous aide à améliorer et faire grandir QMK. Nous voulons rendre les pull requests et le processus de contribution utile et simple à la fois pour les contributeurs et les mainteneurs. C'est pourquoi nous avons mis en places des directives pour les contibuteurs afin que votre pull request puisse être accepté sans changement majeur. +Les contributions de tiers nous aide à améliorer et faire grandir QMK. Nous voulons rendre les pull requests et le processus de contribution utile et simple à la fois pour les contributeurs et les mainteneurs. C'est pourquoi nous avons mis en places des directives pour les contributeurs afin que votre pull request puisse être accepté sans changement majeur. * [Aperçu du projet](#project-overview) * [Conventions de codage](#coding-conventions) @@ -38,7 +38,7 @@ Vous n'avez encore jamais contribué à un projet open source? Vous vous demande 0. Enregistrez-vous sur [GitHub](https://github.com). 1. Définissez une keymap à contribuer, [trouvez une issue](/~https://github.com/qmk/qmk_firmware/issues) que vous souhaitez corriger, ou [une fonction](/~https://github.com/qmk/qmk_firmware/issues?q=is%3Aopen+is%3Aissue+label%3Afeature) que vous voulez ajouter. 2. Créez un fork sur le dépôt associé avec une issue sur votre compte GitHub. Cela veut dire que vous allez avoir une copie du dépôt sous `votre-login-GitHub/qmk_firmware`. -3. Clonez le dépôt sur votre macine locale en utilisant `git clone /~https://github.com/login-github/repository-name.git`. +3. Clonez le dépôt sur votre machine locale en utilisant `git clone /~https://github.com/login-github/repository-name.git`. 4. Si vous travaillez sur une nouvelle fonctionnalité, pensez à ouvrir une issue pour parler avec nous du travail que vous souhaitez démarrer. 5. Créez une nouvelle branche pour votre correctif en utilisant `git checkout -b nom-de-branche`. 6. Faites les changements nécessaires pour corriger le problème ou ajouter la fonctionnalité. @@ -69,7 +69,7 @@ Nous avons un certain nombre de type de changements dans QMK, chacun nécessitan * Keymaps: Assurez-vous que `make keyboard:your_new_keymap` ne renvoie pas d'erreur. * Claviers: Assurez-vous que `make keyboard:all` ne renvoie pas d'erreur. * Core: Assurez-vous que `make all` ne renvoie pas d'erreur. -* Assurez-vous que les messages de commit soient compréhensibles d'eux-même. Vous devriez écrire une description simple (pas plus de 70 caractères) sur la première ligne, suivi d'une ligne vide, suivi d'un détail de votre commit, si nécessaire. Exemple: +* Assurez-vous que les messages de commit soient compréhensibles d'eux-mêmes. Vous devriez écrire une description simple (pas plus de 70 caractères) sur la première ligne, suivi d'une ligne vide, suivi d'un détail de votre commit, si nécessaire. Exemple: ``` Adjust the fronzlebop for the kerpleplork @@ -81,11 +81,11 @@ Limited experimentation on the devices I have available shows that 7 is high eno ## Documentation -La documentation est l'une des manière les plus simples de démarrer la contribution sur QMK. Il est simple de trouver des endroits où la documentation est fausse ou incomplète, et il est tout aussi simple de la corriger! Nous avons aussi grandement besoin de quelqu'un pour éditer notre documentation, donc si vous avez des compétences en édition mais que vous n'êtes pas sûr de savoir où aller, n'hésitez pas [demandez de l'aide](#where-can-i-go-for-help)! +La documentation est l'une des manières les plus simples de démarrer la contribution sur QMK. Il est simple de trouver des endroits où la documentation est fausse ou incomplète, et il est tout aussi simple de la corriger! Nous avons aussi grandement besoin de quelqu'un pour éditer notre documentation, donc si vous avez des compétences en édition mais que vous n'êtes pas sûr de savoir où aller, n'hésitez pas [demandez de l'aide](#where-can-i-go-for-help)! Vous trouverez toute notre documentation dans le répertoire `qmk_firmware/docs`, ou si vous préférez utiliser des outils web, vous pouvez cliquer sur le bouton "Suggest An Edit" en haut de chaque page sur http://docs.qmk.fm/. -Lorsque vous donnez des exemples de code dans la documentation, essayez de suivre les conventions de nommage utilisées ailleurs dnas la documentation. Par exemple, standardisez les enums en utilisant `my_layers` ou `my_keycodes` afin de garder une consistance: +Lorsque vous donnez des exemples de code dans la documentation, essayez de suivre les conventions de nommage utilisées ailleurs dans la documentation. Par exemple, standardisez les enums en utilisant `my_layers` ou `my_keycodes` afin de garder une consistance: ```c enum my_layers { @@ -129,16 +129,16 @@ Faites attention d'être sûr d'implémenter votre nouvelle fonctionnalité de l * [Chat sur Discord](https://discord.gg/Uq7gcHh) * [Ouvrir une Issue](/~https://github.com/qmk/qmk_firmware/issues/new) -Les PR de nouvelles fonctionnalités de de correction de bug affectent tous les claviers. Nous sommes aussi dans un processus de restructuration de QMK. Pour cette raison, il est absolument nécessaire que tout changement important ou significatif soit discuté avant que l'implémentation soit faite. Si vous ouvrez un PR sans nous avoir parlé, préparez vous à faire des refontes significatives si vous changements ne sont pas compatibles avec ce que nous avons planifié. +Les PR de nouvelles fonctionnalités de de correction de bug affectent tous les claviers. Nous sommes aussi dans un processus de restructuration de QMK. Pour cette raison, il est absolument nécessaire que tout changement important ou significatif soit discuté avant que l'implémentation soit faite. Si vous ouvrez un PR sans nous avoir parlé, préparez-vous à faire des refontes significatives si vos changements ne sont pas compatibles avec ce que nous avons planifié. Voici quelques choses à garder en tête lorsque vous travaillez sur une fonctionnalité ou un bug fix. -* **Désactivé par défaut** - la mémoire est plutôt limitée sur la plupart des puces que QMK supporte, et il est important que les keymaps courantes ne soient pas cassées. S'il vous plaît faites que vos features doivent être **activées** plutôt que désactivées. Si vous pensez qu'elle devrait être activée par défaut, ou que cela réduit la taille du code, parlez-nous en. +* **Désactivé par défaut** - la mémoire est plutôt limitée sur la plupart des puces que QMK supporte, et il est important que les keymaps courantes ne soient pas cassées. S'il vous plaît faites que vos features doivent être **activées** plutôt que désactivées. Si vous pensez qu'elle devrait être activée par défaut, ou que cela réduit la taille du code, parlez-nous-en. * **Compilez localement avant de soumettre** - Cela devrait aller sans dire, mais votre code doit compiler! Notre système Travis devrait relever les problèmes, mais il est généralement plus rapide de compiler quelques claviers en local plutôt que d'attendre le retour des résultats * **Faites attention aux révisions et différentes bases de puces** - beaucoup de claviers ont des révisions qui permettent des changements de configuration mineurs, voir des bases de chip différentes. Essayez de faire que votre fonctionnalité soit supportée à la fois sur ARM et AVR, ou désactivez-là automatiquement sur les plateformes non supportées. * **Expliquez votre fonctionnalité** - Documentez-là dans `docs/`, soit dans un nouveau fichier, ou dans une partie d'un fichier existant. Si vous ne la documentez pas, personne ne pourra bénéficier de votre dur labeur. -Nous vous demandons aussi de suivre ces ces directives: +Nous vous demandons aussi de suivre ces directives: * Gardez un nombre de commits raisonnable, ou nous squasherons votre PR. * Ne regroupez pas des claviers ou des keymaps avec des changements core. Soumettez vos changements core en premier. @@ -151,4 +151,4 @@ Afin de maintenir une vision claire sur comment les choses sont architectuées d # Que veut dire le code de conduite pour moi? -Note [Code De Conduite](/~https://github.com/qmk/qmk_firmware/blob/master/CODE_OF_CONDUCT.md) veut dire que vous avez la responsabilité de traiter tout le monde dans le projet avec respect et courtoisie, peut importe leur identité. Si vous êtes victime d'une attitude ou de commentaires inapropriés, tels que décrit dans notre Code de Conduite, nous sommes là pour vous et nous ferons de notre mieux pour nous assurer que le fautif soit réprimandé, tel que décrit dans notre code. +Note [Code De Conduite](/~https://github.com/qmk/qmk_firmware/blob/master/CODE_OF_CONDUCT.md) veut dire que vous avez la responsabilité de traiter tout le monde dans le projet avec respect et courtoisie, peu importe leur identité. Si vous êtes victime d'une attitude ou de commentaires inappropriés, tels que décrit dans notre Code de Conduite, nous sommes là pour vous et nous ferons de notre mieux pour nous assurer que le fautif soit réprimandé, tel que décrit dans notre code. diff --git a/docs/fr-FR/flashing.md b/docs/fr-FR/flashing.md index 1aa04af5ff53..c380614a5dec 100644 --- a/docs/fr-FR/flashing.md +++ b/docs/fr-FR/flashing.md @@ -1,6 +1,6 @@ # Instructions pour flasher et informations sur les bootloader -Les claviers utilisent différents types de bootloaders et certains doivent être flashés différement. Heureusement, certains projets comme la [QMK Toolbox](/~https://github.com/qmk/qmk_toolbox/releases) ont pour objectifs de permettre de flasher les différents bootloader sans trop se faire de soucis et ça peut importe les manières de les flasher. +Les claviers utilisent différents types de bootloaders et certains doivent être flashés différement. Heureusement, certains projets comme la [QMK Toolbox](/~https://github.com/qmk/qmk_toolbox/releases) ont pour objectifs de permettre de flasher les différents bootloader sans trop se faire de soucis et ça peu importe les manières de les flasher. Si vous avez un bootloader sélectionné avec la variable `BOOTLOADER` dans votre fichier `rules.mk` alors QMK vas automatiquement calculer si votre fichier .hex n'est pas trop grand pour être flashé sur votre appareil, et il affichera la taille finale du firmware. Pour vérifier la taille manuellement, vous pouvez aussi compiler le firmware avec l'option `check-size`. Exemple : `make planck/rev4:default:check-size`. @@ -49,7 +49,7 @@ QMK a un fork du bootloader LUFA DFU qui vous permet de faire un simple scan de #define QMK_LED E6 #define QMK_SPEAKER C6 -Le fabriquant et le nom du produit proviennent de vos définitions dans fichier `config.h`, et la chaîne de caractère « bootloader » est ajoutée au nom du prodruit. +Le fabricant et le nom du produit proviennent de vos définitions dans fichier `config.h`, et la chaîne de caractère « bootloader » est ajoutée au nom du produit. Pour génerer le bootloader, utilisez la cible `bootloader`. Exemple : `make planck/rev4:default:bootloader`. @@ -66,7 +66,7 @@ Il y a plusieurs commandes DFU que vous pouvez utiliser pour flasher le firmware ## Caterina -Les cartes arduinos et leurs clones utilisent le [bootloader Caterina](/~https://github.com/arduino/ArduinoCore-avr/tree/master/bootloaders/caterina) (tous les claviers utilisant un Pro Micro, ou un clone). Ils utilisent aussi le protocole avr109 pour communiquer en virtuellement en série (serial en Anglais). Les bootloaders comme le [A-Star](https://www.pololu.com/docs/0J61/9) sont basés sur Caterina. +Les cartes arduinos et leurs clones utilisent le [bootloader Caterina](/~https://github.com/arduino/ArduinoCore-avr/tree/master/bootloaders/caterina) (tous les claviers utilisant un Pro Micro, ou un clone). Ils utilisent aussi le protocole avr109 pour communiquer en virtuellement en série (serial en anglais). Les bootloaders comme le [A-Star](https://www.pololu.com/docs/0J61/9) sont basés sur Caterina. Pour vérifier la compatibilité avec un bootloader Caterina, vérifiez que ce bloc est présent dans votre fichier `rules.mk` : @@ -84,8 +84,8 @@ BOOTLOADER = caterina Flashers compatibles : -* [QMK Toolbox](/~https://github.com/qmk/qmk_toolbox/releases) (Interface graphique recomandée) -* [avrdude](http://www.nongnu.org/avrdude/) avec avr109 / `:avrdude` (Outil en ligne de commande recomandé) +* [QMK Toolbox](/~https://github.com/qmk/qmk_toolbox/releases) (Interface graphique recommandée) +* [avrdude](http://www.nongnu.org/avrdude/) avec avr109 / `:avrdude` (Outil en ligne de commande recommandé) * [AVRDUDESS](/~https://github.com/zkemble/AVRDUDESS) Séquence de flash :  @@ -172,7 +172,7 @@ Séquence de flash : ## BootloadHID -BootloadHID est un bootloader pour les microcontroleurs AVR. L'utilitaire de téleversement ne demande pas de drivers au niveau du kernel et peut être lancé sans installer aucune DLLs. +BootloadHID est un bootloader pour les microcontrôleurs AVR. L'utilitaire de téleversement ne demande pas de drivers au niveau du kernel et peut être lancé sans installer aucune DLLs. Pour vérifier la compatibilité avec le bootloader bootloadHID, vérifiez que ce bloc existe dans votre fichier `rules.mk` :  @@ -197,7 +197,7 @@ Séquence de flash 1. Entrez dans le bootloader en utilisant l'une de ces méthodes : * Pressez la touche du keycode `RESET` (Cela ne fonctionnera pas sur certains appareils). - * Verouillez la touche « Salt » tout en branchant le clavier (Géneralement ce principe est documenté dans le fichier readme du clavier) + * Verrouillez la touche « Salt » tout en branchant le clavier (Généralement ce principe est documenté dans le fichier readme du clavier) 2. Attendez que l'OS détecte l'appareil. 3. Flasher le fichier .hex. 4. Redémarrez l'appareil en mode « application ». Cela peut être fait automatiquement. @@ -227,13 +227,13 @@ Séquence pour flasher: 3. Flasher un fichier `.bin`.h * Vous allez recevoir un avertissement à propos de la signature DFU. Ignorez-la. 4. Réinitialisez l'appareil en mode « application ». Cela peut être fait automatiquement. - * Si vous êtes en train de travailler en ligne de commande, par exemple avec un `make planck/rev6:default:dfu-util` alors soyez bien sur que l'argument `:leave` est passé aux argument DFU grâce à la variable `DFU_ARGS` à l'intérieur de votre fichier `rules.mk` (Ex : `DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave`) afin que votre appareil redémarre après avoir été flashé. + * Si vous êtes en train de travailler en ligne de commande, par exemple avec un `make planck/rev6:default:dfu-util` alors soyez bien sur que l'argument `:leave` est passé aux arguments DFU grâce à la variable `DFU_ARGS` à l'intérieur de votre fichier `rules.mk` (Ex : `DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave`) afin que votre appareil redémarre après avoir été flashé. ### Commandes STM32 Il y a différentes commandes que vous pouvez utiliser pour flasher un firmware dans un appareil STM32  : * `:dfu-util` - C'est l'option standard pour flasher un appareil STM32. Le script attendra qu'un bootloader STM32 soit présent. -* `:dfu-util-split-left` - Permet de flasher un firmware normalement, tout comme l'option précedente mais permet de configurer le coté gauche des paramètres EEPROM sur un clavier scindé. -* `:dfu-util-split-right` - Permet de flasher un firmware normalement, tout comme l'option précedente mais permet de configurer le coté droit des paramètres EEPROM sur un clavier scindé. +* `:dfu-util-split-left` - Permet de flasher un firmware normalement, tout comme l'option précédente mais permet de configurer le côté gauche des paramètres EEPROM sur un clavier scindé. +* `:dfu-util-split-right` - Permet de flasher un firmware normalement, tout comme l'option précédente mais permet de configurer le côté droit des paramètres EEPROM sur un clavier scindé. * `:st-link-cli` - Cela permet de flasher le firmware avec l'utilitaire en ligne de commande ST-LINK's plutôt que d'utiliser dfu-util. diff --git a/docs/fr-FR/getting_started_getting_help.md b/docs/fr-FR/getting_started_getting_help.md index 5eaf51975187..fedb18c76c59 100644 --- a/docs/fr-FR/getting_started_getting_help.md +++ b/docs/fr-FR/getting_started_getting_help.md @@ -4,7 +4,7 @@ Il y a beaucoup de ressources pour trouver de l'aide avec QMK. ## Chat temps-réel -Vous trouverez des développeurs QMK et des utilisateurs sur notre [Serveur Discord](https://discord.gg/Uq7gcHh) principal. Il y a des canaux spécifiques dans le serveurs pour discuter des firmware, toolbox, hardware et configurateurs. +Vous trouverez des développeurs QMK et des utilisateurs sur notre [Serveur Discord](https://discord.gg/Uq7gcHh) principal. Il y a des canaux spécifiques dans le serveur pour discuter des firmwares, toolbox, hardware et configurateurs. ## Sous-Reddit OLKB @@ -12,4 +12,4 @@ Le forum officiel de QMK est [/r/olkb](https://reddit.com/r/olkb) sur [reddit.co ## Tickets GitHub -Vous pouvez ouvrir un [ticket sur GitHub](/~https://github.com/qmk/qmk_firmware/issues). Ceci est spécialement pratique lorsque votre problème demande une discussion long terme ou un débugage. +Vous pouvez ouvrir un [ticket sur GitHub](/~https://github.com/qmk/qmk_firmware/issues). Ceci est spécialement pratique lorsque votre problème demande une discussion sur le long terme ou un débugage. diff --git a/docs/fr-FR/getting_started_github.md b/docs/fr-FR/getting_started_github.md index 32a68d0cab94..22c6ee749ba4 100644 --- a/docs/fr-FR/getting_started_github.md +++ b/docs/fr-FR/getting_started_github.md @@ -8,11 +8,11 @@ Commencez par la [page GitHub de QMK](/~https://github.com/qmk/qmk_firmware), et v ![Fork on Github](http://i.imgur.com/8Toomz4.jpg) -Si vous faites partie d'une organisation, vous aurez besoin de savoir quel compte utiliser pour le fork. Dans la plupart des cas, vous voudrez créer le fork dans votre compte personnel. Une fois le fork complet (cela peut quelque fois prendre un peu de temps), appuyez sur le bouton "Clone or download": +Si vous faites partie d'une organisation, vous aurez besoin de savoir quel compte utiliser pour le fork. Dans la plupart des cas, vous voudrez créer le fork dans votre compte personnel. Une fois le fork complet (cela peut quelques fois prendre un peu de temps), appuyez sur le bouton "Clone or download": ![Download from Github](http://i.imgur.com/N1NYcSz.jpg) -Faites attention à sélectionner "HTTPS", et sélectionnez le liens et copiez-le: +Faites attention à sélectionner "HTTPS", et sélectionnez le lien et copiez-le: ![HTTPS link](http://i.imgur.com/eGO0ohO.jpg) @@ -48,7 +48,7 @@ To /~https://github.com/whoeveryouare/qmk_firmware.git + 20043e64...7da94ac5 master -> master ``` -Vos changements existent maintenant dans votre fork sur GitHub. Si vous allez à cete adresse (`/~https://github.com//qmk_firmware`), vous pouvez créer un nouveau "Pull Request" en cliquant sur ce bouton: +Vos changements existent maintenant dans votre fork sur GitHub. Si vous allez à cette adresse (`/~https://github.com//qmk_firmware`), vous pouvez créer un nouveau "Pull Request" en cliquant sur ce bouton: ![New Pull Request](http://i.imgur.com/DxMHpJ8.jpg) diff --git a/docs/fr-FR/getting_started_introduction.md b/docs/fr-FR/getting_started_introduction.md index b64a7728f60a..a7f0ff96af4d 100644 --- a/docs/fr-FR/getting_started_introduction.md +++ b/docs/fr-FR/getting_started_introduction.md @@ -43,7 +43,7 @@ Le fichier `config.h` peut être mis à 3 endroits: * userspace (`/users//config.h`) * keymap (`/keyboards//keymaps//config.h`) -Le système de compilation cherche automatiquement les fichiers de configuration dans l'ordre au dessus. Si vous souhaitez surcharger une configuration définie par un `config.h` précédent, vous devrez d'abord ajouter le code suivant. +Le système de compilation cherche automatiquement les fichiers de configuration dans l'ordre au-dessus. Si vous souhaitez surcharger une configuration définie par un `config.h` précédent, vous devrez d'abord ajouter le code suivant. ``` #pragma once @@ -51,7 +51,7 @@ Le système de compilation cherche automatiquement les fichiers de configuration Ensuite, pour surcharger l'option du fichier `config.h` précédent, vous devez `#undef` puis `#define` l'option à nouveau. -Voici à quoi l'ensemble du code resemble une fois regroupé: +Voici à quoi l'ensemble du code ressemble une fois regroupé: ``` #pragma once diff --git a/docs/fr-FR/newbs_best_practices.md b/docs/fr-FR/newbs_best_practices.md index c0e76b1c9660..14910131475e 100644 --- a/docs/fr-FR/newbs_best_practices.md +++ b/docs/fr-FR/newbs_best_practices.md @@ -11,7 +11,7 @@ Ce document suppose les choses suivantes: ## La branche master de votre fork: Mettre à jour souvent, ne jamais commit -Il est hautement recommandé pour le développement de QMK, peu importe ce qui est fait ou où, de garder votre branche `master` à jour, mais de ne ***jamais*** commit dessus. A la place, faites tous vos changement dans une branche de développement et crééz des "pull requests" de votre branche lorsque vous développez. +Il est hautement recommandé pour le développement de QMK, peu importe ce qui est fait ou où, de garder votre branche `master` à jour, mais de ne ***jamais*** commit dessus. A la place, faites tous vos changements dans une branche de développement et crééz des "pull requests" de votre branche lorsque vous développez. Pour réduire les chances de conflits de fusion (merge) — des cas où deux ou plus d'utilisateurs ont édité la même section d'un fichier en parallèle — gardez votre branche `master` relativement à jour et démarrez chaque nouveau développement en créant une nouvelle branche. @@ -44,7 +44,7 @@ git pull upstream master git push origin master ``` -Cela vous change la branche courante en master, synchronise les données de réferences du dépôt QMK vers votre ordinateur. La commande pull tire les données de réferences vers votre branche courante puis les y téleverse. La commande push permet de pousser la branche courante (master) vers votre fork github. +Cela vous change la branche courante en master, synchronise les données de références du dépôt QMK vers votre ordinateur. La commande pull tire les données de références vers votre branche courante puis les y téleverse. La commande push permet de pousser la branche courante (master) vers votre fork github. ### Faire des changements @@ -55,11 +55,11 @@ git checkout -b dev_branch git push --set-upstream origin dev_branch ``` -Ceci crée une branche nommée `dev_branch`, bascule vers cette branche, et ensuite sauvegarde cette nouvelle branche vers votre fork. L'argument `--set-upstream` demande à git d'utiliser votre fork et la branche `dev_branch` à chaque fois que vous utilisez `git push` ou `git pull` depuis cette branche. Vous ne devez l'utiliser que pour le premier "push", après celà, vous pouvez utiliser simplement `git push` ou `git pull`, sans le reste des arguments. +Ceci crée une branche nommée `dev_branch`, bascule vers cette branche, et ensuite sauvegarde cette nouvelle branche vers votre fork. L'argument `--set-upstream` demande à git d'utiliser votre fork et la branche `dev_branch` à chaque fois que vous utilisez `git push` ou `git pull` depuis cette branche. Vous ne devez l'utiliser que pour le premier "push", après cela, vous pouvez utiliser simplement `git push` ou `git pull`, sans le reste des arguments. !> Avec `git push`, vous pouvez utiliser `-u` à la place de `--set-upstream` — `-u` est un alias pour `--set-upstream`. -Vous pouvez appeler votre branche à peu prêt comme vous voulez, toutefois il est recommandé d'utiliser un nom qui est lié aux changements que vous allez faire. +Vous pouvez appeler votre branche à peu près comme vous voulez, toutefois il est recommandé d'utiliser un nom qui est lié aux changements que vous allez faire. Par défaut, `git checkout -b` va faire de la branche actuelle la branche de base de votre nouvelle branche. Vous pouvez définir la base de votre nouvelle branche comme étant n'importe quelle branche existante qui n'est pas la courante en utilisant la commande: @@ -76,11 +76,11 @@ git commit -m "My commit message." `git add` ajoute les fichiers qui ont été changés dans la *zone de staging* de Git, qui est sa "zone de chargement". Elle contient tous les changements qui vont être *validés* (committed) par `git commit`, qui sauvegarde les changements vers le dépôt. Utilisez des messages de validation descriptifs afin que vous puissiez savoir ce qui a changé d'un coup d'oeil. -!> Si vous changez beaucoup de fichiers, mais tous les fichiers font partie du même changement, vous pouvez utiliser `git add .` pour ajouter tous les fichiers changés dans le répertoire courant, plutôt que d'avoir à ajouter chaque fichiers individuellement. +!> Si vous changez beaucoup de fichiers, mais tous les fichiers font partie du même changement, vous pouvez utiliser `git add .` pour ajouter tous les fichiers changés dans le répertoire courant, plutôt que d'avoir à ajouter chaque fichier individuellement. ### Publier Vos Changements -La dernière étape est de pousser vos changements vers votre fork. pour se faire, entrez `git push`. Git publie maintenant l'état courant de `dev_branch` vers votre fork. +La dernière étape est de pousser vos changements vers votre fork. Pour ce faire, entrez `git push`. Git publie maintenant l'état courant de `dev_branch` vers votre fork. ## Résoudre Les Conflits De Merge @@ -112,7 +112,7 @@ Maintenant que l'état actuel de la branche courante et la branche upstream sont git rebase upstream/master ``` -Ceci dit à Git d'annuler les commits de la branche courrante puis de les réappliquer sur la branche master de QMK. +Ceci dit à Git d'annuler les commits de la branche courante puis de les réappliquer sur la branche master de QMK. ```bash $ git rebase upstream/master @@ -133,7 +133,7 @@ You can instead skip this commit: run "git rebase --skip". To abort and get back to the state before "git rebase", run "git rebase --abort". ``` -Ceci nous dit que nous avons un conflit de merge, et nous donne le nom du fichier en conflit. Ouvez le fichier conflictuel dans votre éditeur de texte et, quelque part dans le fichier, vous trouverez quelque chose comme ça: +Ceci nous dit que nous avons un conflit de merge, et nous donne le nom du fichier en conflit. Ouvrez le fichier conflictuel dans votre éditeur de texte et, quelque part dans le fichier, vous trouverez quelque chose comme ça: ```bash <<<<<<< HEAD diff --git a/docs/fr-FR/newbs_building_firmware_configurator.md b/docs/fr-FR/newbs_building_firmware_configurator.md index ea284c505953..577e5c80e9d4 100644 --- a/docs/fr-FR/newbs_building_firmware_configurator.md +++ b/docs/fr-FR/newbs_building_firmware_configurator.md @@ -20,11 +20,11 @@ Je vais le répéter, parce que c'est important !> **FAITES ATTENTION A UTILISER LA BONNE VERSION !** -Si votre clavier est annoncé comme fonctionnant grâce à QMK mais n'est pas dans la liste, il y a des chances que le développeur ne l'ait pas encore fait, ou que nous n'avons pas encore eu le temps de le merger. Ajoutez un problème (issue) sur [qmk_firmware](/~https://github.com/qmk/qmk_firmware/issues) demandant le support de votre clavier, s'il n'y a pas de [Pull Request](/~https://github.com/qmk/qmk_firmware/pulls?q=is%3Aopen+is%3Apr+label%3Akeyboard) ouvert pour lui. Il y a aussi des clavier alimentés par QMK qui sont sur le compte GitHub du fabriquant, il est bon de le vérifier aussi. +Si votre clavier est annoncé comme fonctionnant grâce à QMK mais n'est pas dans la liste, il y a des chances que le développeur ne l'ait pas encore fait, ou que nous n'avons pas encore eu le temps de le merger. Ajoutez un problème (issue) sur [qmk_firmware](/~https://github.com/qmk/qmk_firmware/issues) demandant le support de votre clavier, s'il n'y a pas de [Pull Request](/~https://github.com/qmk/qmk_firmware/pulls?q=is%3Aopen+is%3Apr+label%3Akeyboard) ouvert pour lui. Il y a aussi des claviers alimentés par QMK qui sont sur le compte GitHub du fabricant, il est bon de le vérifier aussi. ## Sélectionner la disposition de votre clavier -Choisissez la disposition (layout) qui représente le mieux la keymap que vous voulez créer. Certains clavier n'ont pas encore assez de dispositions ou des dispositions incorrectes. Ils seront supportés dans le future. +Choisissez la disposition (layout) qui représente le mieux la keymap que vous voulez créer. Certains claviers n'ont pas encore assez de dispositions ou des dispositions incorrectes. Ils seront supportés dans le future. ## Nom de la Keymap diff --git a/docs/fr-FR/newbs_flashing.md b/docs/fr-FR/newbs_flashing.md index 267cf3add9f5..c9849eb10482 100644 --- a/docs/fr-FR/newbs_flashing.md +++ b/docs/fr-FR/newbs_flashing.md @@ -120,7 +120,7 @@ Checking file size of planck_rev5_xyverz.hex * File size is fine - 18574/28672 ``` -Une fois arrivé à ce stade, le script de compilation va checher le bootloader DFU toutes les 5 secondes. Il va répéter les messages suivants jusqu'à ce que l'appareil soit trouvé ou que vous l'annuliez. +Une fois arrivé à ce stade, le script de compilation va chercher le bootloader DFU toutes les 5 secondes. Il va répéter les messages suivants jusqu'à ce que l'appareil soit trouvé ou que vous l'annuliez. dfu-programmer: no device present. Error: Bootloader not found. Trying again in 5s. @@ -143,7 +143,7 @@ Une fois terminé, vous devrez mettre à zéro le contrôleur. Vous allez voir u >>> dfu-programmer atmega32u4 reset ``` -?> Si vous avez des soucis concerant ceci - comme par exemple `dfu-programmer: no device present` - merci de regarder [Foires Aux Questions de Compilation](faq_build.md). +?> Si vous avez des soucis concernant ceci - par exemple `dfu-programmer: no device present` - merci de regarder [Foires Aux Questions de Compilation](faq_build.md). #### Commandes DFU @@ -174,7 +174,7 @@ Checking file size of lets_split_rev2_xyverz.hex Detecting USB port, reset your controller now.............. ``` -Une fois ceci fait, réinitialisez votre board et le script va détecter et flasher le firmware. La sortie devrait ressember à quelque chose comme ça: +Une fois ceci fait, réinitialisez votre board et le script va détecter et flasher le firmware. La sortie devrait ressembler à quelque chose comme ça: ``` Detected controller on USB port at /dev/ttyS15 @@ -219,7 +219,7 @@ avrdude.exe: safemode: Fuses OK (E:CB, H:D8, L:FF) avrdude.exe done. Thank you. ``` -Si vous avez un soucis, essayez de faire ceci: +Si vous avez un souci, essayez de faire ceci: sudo make ::avrdude @@ -267,7 +267,7 @@ Booting ### STM32 (ARM) -Pour la majorité des boards ARM (incluant les Proton C, Planck Rev 6, et Preonic Rev 3), lorsque vous êtes prêt à compiler et flasher votre firmware,ouvrez la fenêtre de terminal et lancez la commande de compilation: +Pour la majorité des boards ARM (incluant les Proton C, Planck Rev 6, et Preonic Rev 3), lorsque vous êtes prêt à compiler et flasher votre firmware, ouvrez la fenêtre de terminal et lancez la commande de compilation: make ::dfu-util diff --git a/docs/fr-FR/newbs_getting_started.md b/docs/fr-FR/newbs_getting_started.md index 751fd0563ac4..8a8029fd1455 100644 --- a/docs/fr-FR/newbs_getting_started.md +++ b/docs/fr-FR/newbs_getting_started.md @@ -2,19 +2,19 @@ Votre clavier d'ordinateur contient un processeur, proche de celui dans votre ordinateur. Ce processeur exécute un logiciel responsable de détecter les touches appuyées et envoie des rapports à propos de l'état du clavier lorsque les touches sont appuyées et relâchées. QMK prend le rôle de ce logiciel, détectant les appuis des boutons et passant cette information à l'ordinateur hôte. Lorsque vous construisez votre keymap customisée, vous créez l'équivalent d'un programme exécutable pour votre clavier. -QMK essaie de rendre les choses simples faciles, et les choses difficiles possibles. Vous n'avez pas à savoir programmer pour créer des keymaps puissantes - vous devez seulement suivre quelques rêgles de syntaxe simples. +QMK essaie de rendre les choses simples faciles, et les choses difficiles possibles. Vous n'avez pas à savoir programmer pour créer des keymaps puissantes - vous devez seulement suivre quelques règles de syntaxe simples. # Guide de démarrage Avant de pouvoir construire des keymaps, vous devez installer quelques logiciels et configurer votre environnement de compilation. Ceci n'a besoin d'être fait seulement une fois, peu importe le nombre de clavier pour lesquels vous compter compiler un firmware. -Si vous préférez une approche plus proche d'une interface graphique, considérez utiliser l'outil en ligne [QMK Configurator](https://config.qmk.fm). Référez vous à [Construire votre premier firmware en utilisant l'interface graphique en ligne](newbs_building_firmware_configurator.md). +Si vous préférez une approche plus proche d'une interface graphique, considérez utiliser l'outil en ligne [QMK Configurator](https://config.qmk.fm). Référez-vous à [Construire votre premier firmware en utilisant l'interface graphique en ligne](newbs_building_firmware_configurator.md). ## Logiciels à télécharger ### Editeur de texte -Vous allez avoir besoin d'un programme qui peut éditer et sauvegarder des fichier **plain text**. Si vous êtes sur Windows, vous pouvez utiliser notepad et sur Linux vous pouvez utiliser gedit. Ces deux options sont des éditeurs de texte simples mais fonctionnels. Sur macOS, faites attention avec l'application par défaut TextEdit: elle ne sauvegardera pas les fichiers en mode "plain text" sauf si vous sélectionnez explicitement _Make Plain Text_ à partir du menu _Format_. +Vous allez avoir besoin d'un programme qui peut éditer et sauvegarder des fichiers **plain text**. Si vous êtes sur Windows, vous pouvez utiliser notepad et sur Linux vous pouvez utiliser gedit. Ces deux options sont des éditeurs de texte simples mais fonctionnels. Sur macOS, faites attention avec l'application par défaut TextEdit: elle ne sauvegardera pas les fichiers en mode "plain text" sauf si vous sélectionnez explicitement _Make Plain Text_ à partir du menu _Format_. Vous pouvez aussi télécharger et installer un éditeur de texte dédié comme [Sublime Text](https://www.sublimetext.com/) ou [VS Code](https://code.visualstudio.com/). C'est probablement la meilleure solution peu importe la plateforme car ce sont des programmes conçus spécifiquement pour éditer du code. @@ -33,7 +33,7 @@ QMK Toolbox est un programme graphique optionnel pour Windows et macOS qui perme Nous avons essayé de rendre QMK aussi simple que possible à configurer. Vous avez uniquement à préparer votre environnment Linux ou Unix et laisser QMK installer le reste. -?> Si vous n'avez jamais travailé avec la lignde commande Linux/Unix, il y a un certain nombre de concepts basiques et de commandes que vous devriez apprendre. Ces ressources vous apprendrons suffisemment pour travailler avec QMK:
+?> Si vous n'avez jamais travaillé avec la ligne de commande Linux/Unix, il y a un certain nombre de concepts basiques et de commandes que vous devriez apprendre. Ces ressources vous apprendrons suffisemment pour travailler avec QMK:
[Commandes Linux à savoir](https://www.guru99.com/must-know-linux-commands.html)
[Commandes Unix de base](https://www.tjhsst.edu/~dhyatt/superap/unixcmd.html) @@ -49,7 +49,7 @@ Vous devez installer MSYS2 et Git. Vous devez installer Homebew. Suivez les instructions sur la [page de Homebrew](https://brew.sh). -Une fois Homebrew installé, continuez avec _Configurer QMK_. Dans cete étape, nous lancerons un script qui va installer d'autres paquets. +Une fois Homebrew installé, continuez avec _Configurer QMK_. Dans cette étape, nous lancerons un script qui va installer d'autres paquets. ### Linux diff --git a/docs/fr-FR/newbs_testing_debugging.md b/docs/fr-FR/newbs_testing_debugging.md index bc6aec668da6..680d7644ed21 100644 --- a/docs/fr-FR/newbs_testing_debugging.md +++ b/docs/fr-FR/newbs_testing_debugging.md @@ -4,7 +4,7 @@ Une fois votre clavier configuré avec un firmware custom, vous êtes prêt à l ## Tester -Tester votre clavier est normalement assez simple. Appuyez chaque touche de votre clavier et assurez vous qu'il envoie les touches auquel vous vous attendiez. Il existe même des programmes qui vous aideront à vérifier qu'aucune touche ne soit oubliée. +Tester votre clavier est normalement assez simple. Appuyez chaque touche de votre clavier et assurez-vous qu'il envoie les touches auquel vous vous attendiez. Il existe même des programmes qui vous aideront à vérifier qu'aucune touche ne soit oubliée. Note: ces programmes ne sont ni fournis ni approuvés par QMK. @@ -30,7 +30,7 @@ void keyboard_post_init_user(void) { ### Débuguer avec QMK Toolbox -Pour les plateformes compatibles, [QMK Toolbox](/~https://github.com/qmk/qmk_toolbox) peut être utilisé pour afficher les message de débugage pour votre clavier. +Pour les plateformes compatibles, [QMK Toolbox](/~https://github.com/qmk/qmk_toolbox) peut être utilisé pour afficher les messages de débugage pour votre clavier. ### Débuguer avec hid_listen @@ -47,9 +47,9 @@ Parfois, il est utile d'afficher des messages de débugage depuis votre [code cu Une fois fait, vous pouvez utiliser les fonctions print suivantes: * `print("string")`: Affiche une simple chaîne de caractères. -* `uprintf("%s string", var)`: Affiche une chaîne de caractères formattée. +* `uprintf("%s string", var)`: Affiche une chaîne de caractères formatée. * `dprint("string")` Affiche une chaîne de caractère simple, mais uniquement lorsque le mode debug est activé. -* `dprintf("%s string", var)`: Affiche une chaîne de caractère formattée, mais uniquement lorsque le mode debug est activé. +* `dprintf("%s string", var)`: Affiche une chaîne de caractère formatée, mais uniquement lorsque le mode debug est activé. ## Exemples de debugage From 908aede957a66e65d37601fa67548c369137b57b Mon Sep 17 00:00:00 2001 From: Spaceman Date: Tue, 29 Oct 2019 18:43:01 -0400 Subject: [PATCH 216/316] Update feature_bluetooth.md (#7193) * Update feature_bluetooth.md * Update feature_bluetooth.md * Update docs/feature_bluetooth.md Co-Authored-By: Joel Challis * Update docs/feature_bluetooth.md Co-Authored-By: fauxpark --- docs/feature_bluetooth.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/feature_bluetooth.md b/docs/feature_bluetooth.md index 3ffbfa068043..6cd5c3c6cf32 100644 --- a/docs/feature_bluetooth.md +++ b/docs/feature_bluetooth.md @@ -2,18 +2,18 @@ ## Bluetooth Known Supported Hardware -Currently Bluetooth support is limited to AVR based chips. For Bluetooth 2.1 Qmk has support for RN-42 HID Firmware and Bluefruit EZ Key the later of which is not produced anymore. For more recent BLE protocols currently only the Adafruit Bluefruit SPI friend is directly supported. BLE is needed to connect to iOS devices. Note iOS does not support Mouse Input. +Currently Bluetooth support is limited to AVR based chips. For Bluetooth 2.1, QMK has support for RN-42 modules and the Bluefruit EZ-Key, the latter of which is not produced anymore. For more recent BLE protocols, currently only the Adafruit Bluefruit SPI Friend is directly supported. BLE is needed to connect to iOS devices. Note iOS does not support mouse input. -|Board |Bluetooth Protocol |Connection Type |Rules.mk |Bluetooth Chip| +|Board |Bluetooth Protocol |Connection Type |rules.mk |Bluetooth Chip| |----------------------------------------------------------------|----------------------------|----------------|---------------------------|--------------| -|[Adafruit EzKey HID]("https://www.adafruit.com/product/1535") |Bluetooth Classic | UART | BLUETOOTH = AdafruitEZKey | | -|Rover Networks RN-42 (Sparkfun Bluesmirf) |Bluetooth Classic | UART | BLUETOOTH = RN42 | RN-42 | -|[Bluefruit LE SPI Friend](https://www.adafruit.com/product/2633)|Bluetooth Low Energy | SPI | BLUETOOTH = AdafruitBLE | nRF5182 | +|[Adafruit EZ-Key HID](https://www.adafruit.com/product/1535) |Bluetooth Classic | UART |`BLUETOOTH = AdafruitEZKey` | | +|Roving Networks RN-42 (Sparkfun Bluesmirf) |Bluetooth Classic | UART |`BLUETOOTH = RN42` | RN-42 | +|[Bluefruit LE SPI Friend](https://www.adafruit.com/product/2633)|Bluetooth Low Energy | SPI |`BLUETOOTH = AdafruitBLE` | nRF51822 | Not Supported Yet but possible: * [Bluefruit LE UART Friend](https://www.adafruit.com/product/2479). [Possible tmk implementation found in](/~https://github.com/tmk/tmk_keyboard/issues/514) * HC-05 boards flashed with RN-42 firmware. They apparently both use the CSR BC417 Chip. Flashing it with RN-42 firmware gives it HID capability. -* [Sparkfun Bluetooth mate](https://www.sparkfun.com/products/14839) +* Sparkfun Bluetooth Mate * HM-13 based boards ### Adafruit BLE SPI Friend From 64b7cfe735339193ae78fe0f13029b0e027af7a7 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Tue, 29 Oct 2019 22:53:11 +0000 Subject: [PATCH 217/316] Refactor ps2avrgb i2c ws2812 to core (#7183) * Refactor ps2avrgb i2c ws2812 to core * Refactor jj40 to use ws2812 i2c driver * Refactor ps2avrgb template to use ws2812 i2c driver * Add ws2812 stub files * clang-format and driver config * Add ws2812 driver docs * Fix default config values * Update tmk_core/protocol/vusb/main.c Co-Authored-By: Drashna Jaelre --- common_features.mk | 24 ++++++++++++++++-- docs/_summary.md | 1 + docs/ws2812_driver.md | 33 ++++++++++++++++++++++++ drivers/arm/ws2812.c | 1 + drivers/arm/ws2812_pwm.c | 1 + drivers/arm/ws2812_spi.c | 1 + drivers/avr/ws2812_i2c.c | 31 +++++++++++++++++++++++ keyboards/jj40/jj40.c | 37 --------------------------- keyboards/jj40/rules.mk | 4 +-- quantum/template/ps2avrgb/keyboard.c | 38 ---------------------------- quantum/template/ps2avrgb/rules.mk | 4 +-- tmk_core/protocol/vusb/main.c | 9 +++++++ 12 files changed, 101 insertions(+), 83 deletions(-) create mode 100644 docs/ws2812_driver.md create mode 100644 drivers/arm/ws2812.c create mode 100644 drivers/arm/ws2812_pwm.c create mode 100644 drivers/arm/ws2812_spi.c create mode 100644 drivers/avr/ws2812_i2c.c diff --git a/common_features.mk b/common_features.mk index 83b2b51aed8d..7bb9187bbcb7 100644 --- a/common_features.mk +++ b/common_features.mk @@ -112,7 +112,7 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) ifeq ($(strip $(RGBLIGHT_CUSTOM_DRIVER)), yes) OPT_DEFS += -DRGBLIGHT_CUSTOM_DRIVER else - SRC += ws2812.c + WS2812_DRIVER_REQUIRED = yes endif endif @@ -176,7 +176,7 @@ endif ifeq ($(strip $(RGB_MATRIX_ENABLE)), WS2812) OPT_DEFS += -DWS2812 - SRC += ws2812.c + WS2812_DRIVER_REQUIRED = yes endif ifeq ($(strip $(RGB_MATRIX_CUSTOM_KB)), yes) @@ -262,6 +262,26 @@ ifneq ($(strip $(BACKLIGHT_ENABLE)), no) endif endif +VALID_WS2812_DRIVER_TYPES := bitbang pwm spi i2c + +WS2812_DRIVER ?= bitbang +ifeq ($(strip $(WS2812_DRIVER_REQUIRED)), yes) + ifeq ($(filter $(WS2812_DRIVER),$(VALID_WS2812_DRIVER_TYPES)),) + $(error WS2812_DRIVER="$(WS2812_DRIVER)" is not a valid WS2812 driver) + endif + + ifeq ($(strip $(WS2812_DRIVER)), bitbang) + SRC += ws2812.c + else + SRC += ws2812_$(strip $(WS2812_DRIVER)).c + endif + + # add extra deps + ifeq ($(strip $(WS2812_DRIVER)), i2c) + QUANTUM_LIB_SRC += i2c_master.c + endif +endif + ifeq ($(strip $(CIE1931_CURVE)), yes) OPT_DEFS += -DUSE_CIE1931_CURVE LED_TABLES = yes diff --git a/docs/_summary.md b/docs/_summary.md index 65bfa11f09c9..dc6e88f95804 100644 --- a/docs/_summary.md +++ b/docs/_summary.md @@ -98,6 +98,7 @@ * [ISP Flashing Guide](isp_flashing_guide.md) * [ARM Debugging Guide](arm_debugging.md) * [I2C Driver](i2c_driver.md) + * [WS2812 Driver](ws2812_driver.md) * [GPIO Controls](internals_gpio_control.md) * [Proton C Conversion](proton_c_conversion.md) diff --git a/docs/ws2812_driver.md b/docs/ws2812_driver.md new file mode 100644 index 000000000000..6fa5d324cfbf --- /dev/null +++ b/docs/ws2812_driver.md @@ -0,0 +1,33 @@ +# WS2812 Driver +This driver powers the [RGB Lighting](feature_rgblight.md) and [RGB Matrix](feature_rgb_matrix.md) features. + +Currently QMK supports the following addressable LEDs on AVR microcontrollers (however, the white LED in RGBW variants is not supported): + + WS2811, WS2812, WS2812B, WS2812C, etc. + SK6812, SK6812MINI, SK6805 + +These LEDs are called "addressable" because instead of using a wire per color, each LED contains a small microchip that understands a special protocol sent over a single wire. The chip passes on the remaining data to the next LED, allowing them to be chained together. In this way, you can easily control the color of the individual LEDs. + +## Driver configuration + +### Bitbang +Default driver, the absence of configuration assumes this driver. To configure it, add this to your rules.mk: + +```make +WS2812_DRIVER = bitbang +``` + +!> ARM does not yet support WS2182. Progress is being made, but we are not quite there, yet. + +### I2C +Targeting boards where WS2812 support is offloaded to a 2nd MCU. Currently the driver is limited to AVR given the known consumers are ps2avrGB/BMC. To configure it, add this to your rules.mk: + +```make +WS2812_DRIVER = i2c +``` + +Configure the hardware via your config.h: +```c +#define WS2812_ADDRESS 0xb0 // default: 0xb0 +#define WS2812_TIMEOUT 100 // default: 100 +``` diff --git a/drivers/arm/ws2812.c b/drivers/arm/ws2812.c new file mode 100644 index 000000000000..2094e50098af --- /dev/null +++ b/drivers/arm/ws2812.c @@ -0,0 +1 @@ +#error("NOT SUPPORTED") \ No newline at end of file diff --git a/drivers/arm/ws2812_pwm.c b/drivers/arm/ws2812_pwm.c new file mode 100644 index 000000000000..2094e50098af --- /dev/null +++ b/drivers/arm/ws2812_pwm.c @@ -0,0 +1 @@ +#error("NOT SUPPORTED") \ No newline at end of file diff --git a/drivers/arm/ws2812_spi.c b/drivers/arm/ws2812_spi.c new file mode 100644 index 000000000000..2094e50098af --- /dev/null +++ b/drivers/arm/ws2812_spi.c @@ -0,0 +1 @@ +#error("NOT SUPPORTED") \ No newline at end of file diff --git a/drivers/avr/ws2812_i2c.c b/drivers/avr/ws2812_i2c.c new file mode 100644 index 000000000000..8525a026c7f8 --- /dev/null +++ b/drivers/avr/ws2812_i2c.c @@ -0,0 +1,31 @@ +#include "ws2812.h" +#include "i2c_master.h" + +#ifndef WS2812_ADDRESS +# define WS2812_ADDRESS 0xb0 +#endif + +#ifndef WS2812_TIMEOUT +# define WS2812_TIMEOUT 100 +#endif + +void ws2812_init(void) { i2c_init(); } + +// Setleds for standard RGB +void ws2812_setleds(LED_TYPE *ledarray, uint16_t leds) { + static bool s_init = false; + if (!s_init) { + ws2812_init(); + s_init = true; + } + + i2c_transmit(WS2812_ADDRESS, (uint8_t *)ledarray, sizeof(LED_TYPE) * leds, WS2812_TIMEOUT); +} + +// Setleds for SK6812RGBW +void ws2812_setleds_rgbw(LED_TYPE *ledarray, uint16_t leds) { +// not supported - for now error out if its enabled +#ifdef RGBW +# error "RGBW not supported" +#endif +} diff --git a/keyboards/jj40/jj40.c b/keyboards/jj40/jj40.c index 26cfa6c067e9..894ed49078aa 100644 --- a/keyboards/jj40/jj40.c +++ b/keyboards/jj40/jj40.c @@ -17,40 +17,3 @@ along with this program. If not, see . */ #include "jj40.h" - -#ifdef RGBLIGHT_ENABLE - -#include -#include "i2c_master.h" -#include "rgblight.h" - -extern rgblight_config_t rgblight_config; - -void matrix_init_kb(void) { - i2c_init(); - // call user level keymaps, if any - matrix_init_user(); -} -// custom RGB driver -void rgblight_set(void) { - if (!rgblight_config.enable) { - memset(led, 0, 3 * RGBLED_NUM); - } - - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); -} - -bool rgb_init = false; - -void matrix_scan_kb(void) { - // if LEDs were previously on before poweroff, turn them back on - if (rgb_init == false && rgblight_config.enable) { - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); - rgb_init = true; - } - - rgblight_task(); - matrix_scan_user(); -} - -#endif diff --git a/keyboards/jj40/rules.mk b/keyboards/jj40/rules.mk index b0bf574bd74b..8e0e8c864734 100644 --- a/keyboards/jj40/rules.mk +++ b/keyboards/jj40/rules.mk @@ -40,7 +40,7 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -RGBLIGHT_CUSTOM_DRIVER = yes +WS2812_DRIVER = i2c MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID @@ -48,6 +48,4 @@ AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) -SRC += i2c_master.c - LAYOUTS = ortho_4x12 planck_mit diff --git a/quantum/template/ps2avrgb/keyboard.c b/quantum/template/ps2avrgb/keyboard.c index efc8517485f4..73cd668f85dd 100644 --- a/quantum/template/ps2avrgb/keyboard.c +++ b/quantum/template/ps2avrgb/keyboard.c @@ -16,44 +16,6 @@ #include "%KEYBOARD%.h" -#ifdef RGBLIGHT_ENABLE - -# include -# include "i2c_master.h" -# include "rgblight.h" - -extern rgblight_config_t rgblight_config; - -void matrix_init_kb(void) { - i2c_init(); - // call user level keymaps, if any - matrix_init_user(); -} - -// custom RGB driver -void rgblight_set(void) { - if (!rgblight_config.enable) { - memset(led, 0, 3 * RGBLED_NUM); - } - - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); -} - -bool rgb_init = false; - -void matrix_scan_kb(void) { - // if LEDs were previously on before poweroff, turn them back on - if (rgb_init == false && rgblight_config.enable) { - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); - rgb_init = true; - } - - rgblight_task(); - matrix_scan_user(); -} - -#endif - // Optional override functions below. // You can leave any or all of these undefined. // These are only required if you want to perform custom actions. diff --git a/quantum/template/ps2avrgb/rules.mk b/quantum/template/ps2avrgb/rules.mk index bda115db55d6..ec57b03dcbce 100644 --- a/quantum/template/ps2avrgb/rules.mk +++ b/quantum/template/ps2avrgb/rules.mk @@ -19,8 +19,6 @@ CONSOLE_ENABLE = yes COMMAND_ENABLE = yes BACKLIGHT_ENABLE = no RGBLIGHT_ENABLE = yes -RGBLIGHT_CUSTOM_DRIVER = yes +WS2812_DRIVER = i2c OPT_DEFS = -DDEBUG_LEVEL=0 - -SRC += i2c_master.c diff --git a/tmk_core/protocol/vusb/main.c b/tmk_core/protocol/vusb/main.c index f8322d94ac73..8cc736497d7d 100644 --- a/tmk_core/protocol/vusb/main.c +++ b/tmk_core/protocol/vusb/main.c @@ -20,6 +20,11 @@ #include "timer.h" #include "uart.h" #include "debug.h" +#include "rgblight_reconfig.h" + +#if (defined(RGB_MIDI) | defined(RGBLIGHT_ANIMATIONS)) & defined(RGBLIGHT_ENABLE) +# include "rgblight.h" +#endif #define UART_BAUD_RATE 115200 @@ -94,6 +99,10 @@ int main(void) { // To prevent failing to configure NOT scan keyboard during configuration if (usbConfiguration && usbInterruptIsReady()) { keyboard_task(); + +#if defined(RGBLIGHT_ANIMATIONS) && defined(RGBLIGHT_ENABLE) + rgblight_task(); +#endif } vusb_transfer_keyboard(); } From 606813b72dc8645d59afb51775e6554b6c97769d Mon Sep 17 00:00:00 2001 From: Steve Purcell Date: Wed, 30 Oct 2019 12:39:38 +1300 Subject: [PATCH 218/316] Remove obsolete note about media keys in MacOS (#6631) * Remove obsolete note about media keys in MacOS KC_MNXT and KC_MPRV work fine on MacOS, so this note is obsolete. * Document behaviour of MEDIA_FAST_FORWARD/MEDIA_REWIND codes on MacOS * Small typo fix, and make OS-dependent keycode claim less absolute * Update docs/keycodes_basic.md Co-Authored-By: fauxpark --- docs/faq_keymap.md | 7 ------- docs/keycodes.md | 4 ++-- docs/keycodes_basic.md | 6 +++--- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/docs/faq_keymap.md b/docs/faq_keymap.md index 0a627469e75d..84d8548d465a 100644 --- a/docs/faq_keymap.md +++ b/docs/faq_keymap.md @@ -95,13 +95,6 @@ Even worse, it is not recognized unless the keyboard's VID and PID match that of See [this issue](/~https://github.com/qmk/qmk_firmware/issues/2179) for detailed information. - -## Media Control Keys in Mac OSX -#### KC_MNXT and KC_MPRV Does Not Work on Mac -Use `KC_MFFD`(`KC_MEDIA_FAST_FORWARD`) and `KC_MRWD`(`KC_MEDIA_REWIND`) instead of `KC_MNXT` and `KC_MPRV`. -See /~https://github.com/tmk/tmk_keyboard/issues/195 - - ## Keys Supported in Mac OSX? You can know which keycodes are supported in OSX from this source code. diff --git a/docs/keycodes.md b/docs/keycodes.md index 60f14844c269..7dcff03fd549 100644 --- a/docs/keycodes.md +++ b/docs/keycodes.md @@ -185,8 +185,8 @@ This is a reference only. Each group of keys links to the page documenting their |`KC_AUDIO_MUTE` |`KC_MUTE` |Mute | |`KC_AUDIO_VOL_UP` |`KC_VOLU` |Volume Up | |`KC_AUDIO_VOL_DOWN` |`KC_VOLD` |Volume Down | -|`KC_MEDIA_NEXT_TRACK` |`KC_MNXT` |Next Track (Windows) | -|`KC_MEDIA_PREV_TRACK` |`KC_MPRV` |Previous Track (Windows) | +|`KC_MEDIA_NEXT_TRACK` |`KC_MNXT` |Next Track | +|`KC_MEDIA_PREV_TRACK` |`KC_MPRV` |Previous Track | |`KC_MEDIA_STOP` |`KC_MSTP` |Stop Track (Windows) | |`KC_MEDIA_PLAY_PAUSE` |`KC_MPLY` |Play/Pause Track | |`KC_MEDIA_SELECT` |`KC_MSEL` |Launch Media Player (Windows) | diff --git a/docs/keycodes_basic.md b/docs/keycodes_basic.md index 8b1b52e190af..75d58c1f1b54 100644 --- a/docs/keycodes_basic.md +++ b/docs/keycodes_basic.md @@ -191,7 +191,7 @@ The basic set of keycodes are based on the [HID Keyboard/Keypad Usage Page (0x07 These keycodes are not part of the Keyboard/Keypad usage page. The `SYSTEM_` keycodes are found in the Generic Desktop page, and the rest are located in the Consumer page. -Windows and macOS use different keycodes for "next track" and "previous track". Make sure you choose the keycode that corresponds to your OS. +?> Some of these keycodes may behave differently depending on the OS. For example, on macOS, the keycodes `KC_MEDIA_FAST_FORWARD`, `KC_MEDIA_REWIND`, `KC_MEDIA_NEXT_TRACK` and `KC_MEDIA_PREV_TRACK` skip within the current track when held, but skip the entire track when tapped. |Key |Aliases |Description | |-----------------------|---------|-----------------------------| @@ -201,8 +201,8 @@ Windows and macOS use different keycodes for "next track" and "previous track". |`KC_AUDIO_MUTE` |`KC_MUTE`|Mute | |`KC_AUDIO_VOL_UP` |`KC_VOLU`|Volume Up | |`KC_AUDIO_VOL_DOWN` |`KC_VOLD`|Volume Down | -|`KC_MEDIA_NEXT_TRACK` |`KC_MNXT`|Next Track (Windows) | -|`KC_MEDIA_PREV_TRACK` |`KC_MPRV`|Previous Track (Windows) | +|`KC_MEDIA_NEXT_TRACK` |`KC_MNXT`|Next Track | +|`KC_MEDIA_PREV_TRACK` |`KC_MPRV`|Previous Track | |`KC_MEDIA_STOP` |`KC_MSTP`|Stop Track (Windows) | |`KC_MEDIA_PLAY_PAUSE` |`KC_MPLY`|Play/Pause Track | |`KC_MEDIA_SELECT` |`KC_MSEL`|Launch Media Player (Windows)| From 3817ff7cc00910c0bd6f638064580a70f9b156c1 Mon Sep 17 00:00:00 2001 From: Danny Date: Tue, 29 Oct 2019 19:56:12 -0400 Subject: [PATCH 219/316] [Keyboard] Move Nyquist/Iris rules.mk files, update READMEs (#7196) * Migrate Nyquist rules.mk files to be version specific and update flash command * Migrate Iris rules.mk files to be version specific and update flash command --- keyboards/keebio/iris/readme.md | 6 ++-- keyboards/keebio/iris/rev1/rules.mk | 35 ++++++++++++++++++++- keyboards/keebio/iris/rev1_led/rules.mk | 35 ++++++++++++++++++++- keyboards/keebio/iris/rev2/rules.mk | 36 +++++++++++++++++++-- keyboards/keebio/iris/rev3/rules.mk | 36 +++++++++++++++++++-- keyboards/keebio/iris/rev4/rules.mk | 36 +++++++++++++++++++-- keyboards/keebio/iris/rules.mk | 42 ------------------------- keyboards/keebio/nyquist/readme.md | 6 ++-- keyboards/keebio/nyquist/rev1/rules.mk | 34 +++++++++++++++++++- keyboards/keebio/nyquist/rev2/rules.mk | 34 +++++++++++++++++++- keyboards/keebio/nyquist/rev3/rules.mk | 35 +++++++++++++++++++-- keyboards/keebio/nyquist/rules.mk | 39 ----------------------- 12 files changed, 275 insertions(+), 99 deletions(-) delete mode 100644 keyboards/keebio/iris/rules.mk delete mode 100644 keyboards/keebio/nyquist/rules.mk diff --git a/keyboards/keebio/iris/readme.md b/keyboards/keebio/iris/readme.md index 6d166e7564aa..00126a390844 100644 --- a/keyboards/keebio/iris/readme.md +++ b/keyboards/keebio/iris/readme.md @@ -4,16 +4,16 @@ Iris A split ergo 4x6 keyboard with 3 or 4 thumb keys made and sold by Keebio. [More info at Keebio](https://keeb.io). Keyboard Maintainer: [Bakingpy/nooges](/~https://github.com/nooges) -Hardware Supported: Pro Micro +Hardware Supported: Pro Micro, ATmega32u4 Hardware Availability: [Keebio](https://keeb.io) Make example for this keyboard (after setting up your build environment): - make keebio/iris/rev2:default + make keebio/iris/rev4:default Example of flashing this keyboard: - make keebio/iris/rev2:default:avrdude + make keebio/iris/rev4:default:flash See [build environment setup](https://docs.qmk.fm/#/newbs_getting_started) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/keebio/iris/rev1/rules.mk b/keyboards/keebio/iris/rev1/rules.mk index 7b30c0beff2a..2d7155bf8fda 100644 --- a/keyboards/keebio/iris/rev1/rules.mk +++ b/keyboards/keebio/iris/rev1/rules.mk @@ -1 +1,34 @@ -BACKLIGHT_ENABLE = no +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# + +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +SPLIT_KEYBOARD = yes diff --git a/keyboards/keebio/iris/rev1_led/rules.mk b/keyboards/keebio/iris/rev1_led/rules.mk index 7b30c0beff2a..2d7155bf8fda 100644 --- a/keyboards/keebio/iris/rev1_led/rules.mk +++ b/keyboards/keebio/iris/rev1_led/rules.mk @@ -1 +1,34 @@ -BACKLIGHT_ENABLE = no +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# + +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +SPLIT_KEYBOARD = yes diff --git a/keyboards/keebio/iris/rev2/rules.mk b/keyboards/keebio/iris/rev2/rules.mk index d7463419b4fe..317898854322 100644 --- a/keyboards/keebio/iris/rev2/rules.mk +++ b/keyboards/keebio/iris/rev2/rules.mk @@ -1,2 +1,34 @@ -RGBLIGHT_ENABLE = yes -BACKLIGHT_ENABLE = yes +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# + +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +SPLIT_KEYBOARD = yes diff --git a/keyboards/keebio/iris/rev3/rules.mk b/keyboards/keebio/iris/rev3/rules.mk index d7e0da93675d..f3c90a078477 100644 --- a/keyboards/keebio/iris/rev3/rules.mk +++ b/keyboards/keebio/iris/rev3/rules.mk @@ -1,3 +1,35 @@ -RGBLIGHT_ENABLE = yes -BACKLIGHT_ENABLE = yes +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = qmk-dfu + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# + +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +SPLIT_KEYBOARD = yes ENCODER_ENABLE = yes diff --git a/keyboards/keebio/iris/rev4/rules.mk b/keyboards/keebio/iris/rev4/rules.mk index d7e0da93675d..f3c90a078477 100644 --- a/keyboards/keebio/iris/rev4/rules.mk +++ b/keyboards/keebio/iris/rev4/rules.mk @@ -1,3 +1,35 @@ -RGBLIGHT_ENABLE = yes -BACKLIGHT_ENABLE = yes +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = qmk-dfu + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# + +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +SPLIT_KEYBOARD = yes ENCODER_ENABLE = yes diff --git a/keyboards/keebio/iris/rules.mk b/keyboards/keebio/iris/rules.mk deleted file mode 100644 index ed730b02b225..000000000000 --- a/keyboards/keebio/iris/rules.mk +++ /dev/null @@ -1,42 +0,0 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp -ifneq (, $(findstring rev3, $(KEYBOARD))) - BOOTLOADER = qmk-dfu -else ifneq (, $(findstring rev4, $(KEYBOARD))) - BOOTLOADER = qmk-dfu -else - BOOTLOADER = caterina -endif - -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# - -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -SPLIT_KEYBOARD = yes - -DEFAULT_FOLDER = keebio/iris/rev2 diff --git a/keyboards/keebio/nyquist/readme.md b/keyboards/keebio/nyquist/readme.md index 9fa7259d8771..40e7ebf3d291 100644 --- a/keyboards/keebio/nyquist/readme.md +++ b/keyboards/keebio/nyquist/readme.md @@ -4,16 +4,16 @@ Nyquist A split 60% split 5x12 ortholinear keyboard made and sold by Keebio. [More info at Keebio](https://keeb.io). Keyboard Maintainer: [Bakingpy/nooges](/~https://github.com/nooges) -Hardware Supported: Pro Micro +Hardware Supported: Pro Micro, ATmega32u4 Hardware Availability: [Keebio](https://keeb.io) Make example for this keyboard (after setting up your build environment): - make keebio/nyquist/rev2:default + make keebio/nyquist/rev3:default Example of flashing this keyboard: - make keebio/nyquist/rev2:default:avrdude + make keebio/nyquist/rev3:default:flash See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/keebio/nyquist/rev1/rules.mk b/keyboards/keebio/nyquist/rev1/rules.mk index 7b30c0beff2a..c377644bae0e 100644 --- a/keyboards/keebio/nyquist/rev1/rules.mk +++ b/keyboards/keebio/nyquist/rev1/rules.mk @@ -1 +1,33 @@ -BACKLIGHT_ENABLE = no +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +SPLIT_KEYBOARD = yes +LAYOUTS = ortho_5x12 ortho_4x12 diff --git a/keyboards/keebio/nyquist/rev2/rules.mk b/keyboards/keebio/nyquist/rev2/rules.mk index bd518d8f273f..a6131ae5287b 100644 --- a/keyboards/keebio/nyquist/rev2/rules.mk +++ b/keyboards/keebio/nyquist/rev2/rules.mk @@ -1 +1,33 @@ -BACKLIGHT_ENABLE = yes +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +SPLIT_KEYBOARD = yes +LAYOUTS = ortho_5x12 ortho_4x12 diff --git a/keyboards/keebio/nyquist/rev3/rules.mk b/keyboards/keebio/nyquist/rev3/rules.mk index 31077066a364..740ff8002499 100644 --- a/keyboards/keebio/nyquist/rev3/rules.mk +++ b/keyboards/keebio/nyquist/rev3/rules.mk @@ -1,2 +1,33 @@ -BACKLIGHT_ENABLE = yes -RGBLIGHT_ENABLE = yes +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = qmk-dfu + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +SPLIT_KEYBOARD = yes +LAYOUTS = ortho_5x12 ortho_4x12 diff --git a/keyboards/keebio/nyquist/rules.mk b/keyboards/keebio/nyquist/rules.mk deleted file mode 100644 index bf3b6762198e..000000000000 --- a/keyboards/keebio/nyquist/rules.mk +++ /dev/null @@ -1,39 +0,0 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp -ifneq (, $(findstring rev3, $(KEYBOARD))) - BOOTLOADER = qmk-dfu -else - BOOTLOADER = caterina -endif - -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -SPLIT_KEYBOARD = yes -LAYOUTS = ortho_5x12 ortho_4x12 -DEFAULT_FOLDER = keebio/nyquist/rev2 From b47c10bf6f152d7a5c35fc4f7478aa69e91fb081 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Wed, 30 Oct 2019 15:27:25 +1100 Subject: [PATCH 220/316] Cleanup rules.mk for 32U4 keyboards, T-Z (#7190) * Cleanup rules.mk for 32U4 keyboards, T-Z * Use atmel-dfu in place of lufa-ms until it exists --- keyboards/gray_studio/cod67/rules.mk | 2 +- keyboards/standaside/rules.mk | 2 +- keyboards/tada68/keymaps/default/rules.mk | 18 ------ keyboards/tada68/rules.mk | 59 ++++------------- keyboards/tanuki/rules.mk | 56 +++-------------- keyboards/telophase/rules.mk | 63 +++++-------------- keyboards/tetris/rules.mk | 50 +++------------ keyboards/tgr/jane/keymaps/default/rules.mk | 0 keyboards/the_ruler/keymaps/default/rules.mk | 0 keyboards/the_ruler/rules.mk | 17 ++--- .../bananasplit/keymaps/default/rules.mk | 34 ---------- .../thevankeyboards/bananasplit/rules.mk | 55 +++------------- keyboards/thevankeyboards/caravan/rules.mk | 15 +++-- .../minivan/keymaps/default/rules.mk | 18 ------ keyboards/thevankeyboards/minivan/rules.mk | 56 +++-------------- .../roadkit/keymaps/default/rules.mk | 18 ------ keyboards/thevankeyboards/roadkit/rules.mk | 56 +++-------------- keyboards/tmo50/rules.mk | 43 +++---------- keyboards/toad/rules.mk | 50 +++------------ keyboards/tokyo60/rules.mk | 57 +++-------------- keyboards/touchpad/rules.mk | 51 +++------------ .../treadstone32/keymaps/default/rules.mk | 6 -- keyboards/treadstone32/rules.mk | 39 +----------- .../treadstone48/keymaps/default/rules.mk | 18 ------ keyboards/treadstone48/rules.mk | 55 ++++------------ keyboards/treasure/type9/rules.mk | 51 +-------------- keyboards/uzu42/rev1/rules.mk | 21 +------ keyboards/uzu42/rules.mk | 11 +--- keyboards/v60_type_r/keymaps/default/rules.mk | 2 - keyboards/v60_type_r/keymaps/iso/rules.mk | 2 - keyboards/v60_type_r/rules.mk | 41 +----------- .../vision_division/keymaps/default/rules.mk | 19 +----- .../keymaps/default/rules.mk | 1 - keyboards/vitamins_included/rev1/rules.mk | 11 +++- keyboards/vitamins_included/rev2/rules.mk | 11 +++- keyboards/vitamins_included/rules.mk | 2 +- keyboards/vn66/rules.mk | 15 +---- keyboards/waldo/keymaps/default/rules.mk | 0 .../keymaps/default_split_shft_bck/rules.mk | 0 keyboards/waldo/rules.mk | 15 ++--- keyboards/westfoxtrot/aanzee/rules.mk | 39 +----------- keyboards/westfoxtrot/cyclops/rules.mk | 53 +--------------- keyboards/westfoxtrot/cypher/rules.mk | 51 +-------------- keyboards/wilba_tech/rama_works_koyu/rules.mk | 14 ++--- .../wilba_tech/rama_works_m10_b/rules.mk | 7 +-- .../wilba_tech/rama_works_m60_a/rules.mk | 16 +++-- keyboards/wilba_tech/rama_works_m6_a/rules.mk | 6 +- keyboards/wilba_tech/rama_works_m6_b/rules.mk | 14 ++--- .../wilba_tech/rama_works_u80_a/rules.mk | 15 +++-- .../wilba_tech/wt60_a/keymaps/via/rules.mk | 2 +- keyboards/wilba_tech/wt60_a/rules.mk | 61 +++++------------- .../wilba_tech/wt60_d/keymaps/via/rules.mk | 2 +- keyboards/wilba_tech/wt60_d/rules.mk | 8 +-- .../wilba_tech/wt65_a/keymaps/via/rules.mk | 2 +- keyboards/wilba_tech/wt65_a/rules.mk | 15 +++-- .../wilba_tech/wt65_b/keymaps/via/rules.mk | 2 +- keyboards/wilba_tech/wt65_b/rules.mk | 15 +++-- .../wilba_tech/wt69_a/keymaps/via/rules.mk | 2 +- keyboards/wilba_tech/wt69_a/rules.mk | 7 +-- .../wilba_tech/wt75_a/keymaps/via/rules.mk | 2 +- keyboards/wilba_tech/wt75_a/rules.mk | 15 +++-- .../wilba_tech/wt75_b/keymaps/via/rules.mk | 2 +- keyboards/wilba_tech/wt75_b/rules.mk | 15 +++-- .../wilba_tech/wt75_c/keymaps/via/rules.mk | 2 +- keyboards/wilba_tech/wt75_c/rules.mk | 15 +++-- .../wilba_tech/wt80_a/keymaps/via/rules.mk | 2 +- keyboards/wilba_tech/wt80_a/rules.mk | 15 +++-- keyboards/wilba_tech/wt8_a/rules.mk | 6 +- keyboards/wilba_tech/zeal60/rules.mk | 14 ++--- keyboards/wilba_tech/zeal65/rules.mk | 14 ++--- keyboards/xd60/rev2/rules.mk | 55 +++------------- keyboards/xd60/rev3/rules.mk | 53 +++------------- keyboards/xd75/keymaps/default/rules.mk | 15 ----- keyboards/xd75/rules.mk | 53 +++------------- keyboards/xd84/rules.mk | 51 +-------------- .../xd87/keymaps/default_underglow/rules.mk | 2 +- keyboards/xd87/rules.mk | 51 +-------------- keyboards/xd96/rules.mk | 51 +-------------- keyboards/xmmx/rules.mk | 50 +++------------ keyboards/xw60/rules.mk | 38 +---------- keyboards/yd60mq/rules.mk | 39 +----------- keyboards/yd68/rules.mk | 51 +-------------- keyboards/yosino58/keymaps/default/rules.mk | 22 +------ keyboards/yosino58/rules.mk | 58 ++++------------- keyboards/zinc/keymaps/default/rules.mk | 1 - keyboards/zinc/rules.mk | 53 ++++------------ keyboards/zj68/rules.mk | 38 +---------- keyboards/zlant/rules.mk | 48 +++----------- 88 files changed, 394 insertions(+), 1808 deletions(-) delete mode 100644 keyboards/tada68/keymaps/default/rules.mk delete mode 100644 keyboards/tgr/jane/keymaps/default/rules.mk delete mode 100644 keyboards/the_ruler/keymaps/default/rules.mk delete mode 100644 keyboards/thevankeyboards/bananasplit/keymaps/default/rules.mk delete mode 100644 keyboards/thevankeyboards/minivan/keymaps/default/rules.mk delete mode 100644 keyboards/thevankeyboards/roadkit/keymaps/default/rules.mk delete mode 100644 keyboards/v60_type_r/keymaps/default/rules.mk delete mode 100644 keyboards/v60_type_r/keymaps/iso/rules.mk delete mode 100644 keyboards/vitamins_included/keymaps/default/rules.mk delete mode 100644 keyboards/waldo/keymaps/default/rules.mk delete mode 100644 keyboards/waldo/keymaps/default_split_shft_bck/rules.mk delete mode 100644 keyboards/xd75/keymaps/default/rules.mk diff --git a/keyboards/gray_studio/cod67/rules.mk b/keyboards/gray_studio/cod67/rules.mk index 1df4615eb9b9..196dfb8c48c9 100644 --- a/keyboards/gray_studio/cod67/rules.mk +++ b/keyboards/gray_studio/cod67/rules.mk @@ -9,7 +9,7 @@ MCU = atmega32u4 # QMK DFU qmk-dfu # ATmega32A bootloadHID # ATmega328P USBasp -BOOTLOADER = lufa-ms +BOOTLOADER = atmel-dfu # actually lufa-ms # Build Options # change yes to no to disable diff --git a/keyboards/standaside/rules.mk b/keyboards/standaside/rules.mk index 993f0acdc0e7..1d92c731c3aa 100644 --- a/keyboards/standaside/rules.mk +++ b/keyboards/standaside/rules.mk @@ -9,7 +9,7 @@ MCU = atmega32u4 # QMK DFU qmk-dfu # ATmega32A bootloadHID # ATmega328P USBasp -BOOTLOADER = atmel_dfu +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable diff --git a/keyboards/tada68/keymaps/default/rules.mk b/keyboards/tada68/keymaps/default/rules.mk deleted file mode 100644 index 53644093d6c4..000000000000 --- a/keyboards/tada68/keymaps/default/rules.mk +++ /dev/null @@ -1,18 +0,0 @@ -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration -NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - diff --git a/keyboards/tada68/rules.mk b/keyboards/tada68/rules.mk index ceb6f96af706..ec3991c318d1 100755 --- a/keyboards/tada68/rules.mk +++ b/keyboards/tada68/rules.mk @@ -1,61 +1,26 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # actually lufa-ms # Mass storage bootloader on the tada68 uses bin files -FIRMWARE_FORMAT=bin +FIRMWARE_FORMAT = bin # Build Options # comment out to disable the options. # BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work RGBLIGHT_ENABLE = no # Enable keyboard underlight functionality (+4870) diff --git a/keyboards/tanuki/rules.mk b/keyboards/tanuki/rules.mk index fd3c058304fd..516c3db5e689 100644 --- a/keyboards/tanuki/rules.mk +++ b/keyboards/tanuki/rules.mk @@ -1,52 +1,15 @@ - - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -BOOTLOADER=caterina +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina # Build Options # comment out to disable the options. @@ -64,4 +27,3 @@ AUDIO_ENABLE = no UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID TAP_DANCE_ENABLE = no - diff --git a/keyboards/telophase/rules.mk b/keyboards/telophase/rules.mk index 3af91858f256..2c8df3295d1e 100644 --- a/keyboards/telophase/rules.mk +++ b/keyboards/telophase/rules.mk @@ -1,56 +1,16 @@ - -OPT_DEFS += -DMITOSIS_PROMICRO -MITOSIS_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \ - avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB) - -# # project specific files -SRC = matrix.c - - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # comment out to disable the options. # @@ -72,3 +32,10 @@ USB = /dev/ttyACM0 # upload: build # $(MITOSIS_UPLOAD_COMMAND) + +OPT_DEFS += -DMITOSIS_PROMICRO +MITOSIS_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \ + avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB) + +# # project specific files +SRC = matrix.c diff --git a/keyboards/tetris/rules.mk b/keyboards/tetris/rules.mk index c3e641c8f218..15fcf5cf6d6c 100755 --- a/keyboards/tetris/rules.mk +++ b/keyboards/tetris/rules.mk @@ -1,47 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -#OPT_DEFS += -DBOOTLOADER_SIZE=4096 - -BOOTLOADER =qmk-dfu - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = qmk-dfu # Build Options # comment out to disable the options. diff --git a/keyboards/tgr/jane/keymaps/default/rules.mk b/keyboards/tgr/jane/keymaps/default/rules.mk deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/keyboards/the_ruler/keymaps/default/rules.mk b/keyboards/the_ruler/keymaps/default/rules.mk deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/keyboards/the_ruler/rules.mk b/keyboards/the_ruler/rules.mk index 33611c44bb0b..bfcc09261582 100644 --- a/keyboards/the_ruler/rules.mk +++ b/keyboards/the_ruler/rules.mk @@ -1,14 +1,15 @@ # MCU name MCU = atmega32u4 -# 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 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable diff --git a/keyboards/thevankeyboards/bananasplit/keymaps/default/rules.mk b/keyboards/thevankeyboards/bananasplit/keymaps/default/rules.mk deleted file mode 100644 index 9da4bf91a571..000000000000 --- a/keyboards/thevankeyboards/bananasplit/keymaps/default/rules.mk +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright 2017 Balz Guenat -# -# 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 . - - -# QMK Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -# BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -# MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -# EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -# CONSOLE_ENABLE = no # Console for debug(+400) -# COMMAND_ENABLE = yes # Commands for debug and configuration -# NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -# BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -# MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) -# AUDIO_ENABLE = no # Audio output on port C6 -# UNICODE_ENABLE = no # Unicode -# BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -# RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -# SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - diff --git a/keyboards/thevankeyboards/bananasplit/rules.mk b/keyboards/thevankeyboards/bananasplit/rules.mk index 81570c493a5a..19f0e81f51e4 100644 --- a/keyboards/thevankeyboards/bananasplit/rules.mk +++ b/keyboards/thevankeyboards/bananasplit/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. @@ -59,7 +23,6 @@ COMMAND_ENABLE = yes # Commands for debug and configuration 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 diff --git a/keyboards/thevankeyboards/caravan/rules.mk b/keyboards/thevankeyboards/caravan/rules.mk index 6143ed9a662f..f21c31f6fde4 100644 --- a/keyboards/thevankeyboards/caravan/rules.mk +++ b/keyboards/thevankeyboards/caravan/rules.mk @@ -1,17 +1,16 @@ # MCU name MCU = atmega32u4 - # Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# atmega32a bootloadHID +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - # Build Options # change yes to no to disable # diff --git a/keyboards/thevankeyboards/minivan/keymaps/default/rules.mk b/keyboards/thevankeyboards/minivan/keymaps/default/rules.mk deleted file mode 100644 index 7a331cd530cf..000000000000 --- a/keyboards/thevankeyboards/minivan/keymaps/default/rules.mk +++ /dev/null @@ -1,18 +0,0 @@ -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration -NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - diff --git a/keyboards/thevankeyboards/minivan/rules.mk b/keyboards/thevankeyboards/minivan/rules.mk index ea453e4b85d9..3a2b8ae58400 100644 --- a/keyboards/thevankeyboards/minivan/rules.mk +++ b/keyboards/thevankeyboards/minivan/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable @@ -53,7 +17,7 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096 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) +CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/thevankeyboards/roadkit/keymaps/default/rules.mk b/keyboards/thevankeyboards/roadkit/keymaps/default/rules.mk deleted file mode 100644 index 7a331cd530cf..000000000000 --- a/keyboards/thevankeyboards/roadkit/keymaps/default/rules.mk +++ /dev/null @@ -1,18 +0,0 @@ -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration -NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - diff --git a/keyboards/thevankeyboards/roadkit/rules.mk b/keyboards/thevankeyboards/roadkit/rules.mk index c2afaa85a8dd..79cbec757fd4 100644 --- a/keyboards/thevankeyboards/roadkit/rules.mk +++ b/keyboards/thevankeyboards/roadkit/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable @@ -53,7 +17,7 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096 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) +CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/tmo50/rules.mk b/keyboards/tmo50/rules.mk index f18bf73e8303..84abd20e6e9a 100644 --- a/keyboards/tmo50/rules.mk +++ b/keyboards/tmo50/rules.mk @@ -1,43 +1,14 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu # Build Options diff --git a/keyboards/toad/rules.mk b/keyboards/toad/rules.mk index ee87c6e8d49b..df45fa5df0e4 100644 --- a/keyboards/toad/rules.mk +++ b/keyboards/toad/rules.mk @@ -1,45 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. @@ -53,4 +23,4 @@ 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 ?= no # Enable keyboard backlight functionality AUDIO_ENABLE ?= no -RGBLIGHT_ENABLE ?= no \ No newline at end of file +RGBLIGHT_ENABLE ?= no diff --git a/keyboards/tokyo60/rules.mk b/keyboards/tokyo60/rules.mk index 3ec2e6150e03..644e6a5412ec 100644 --- a/keyboards/tokyo60/rules.mk +++ b/keyboards/tokyo60/rules.mk @@ -1,55 +1,14 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu # Build Options diff --git a/keyboards/touchpad/rules.mk b/keyboards/touchpad/rules.mk index e4fa2ac133b4..21642c3d28b7 100644 --- a/keyboards/touchpad/rules.mk +++ b/keyboards/touchpad/rules.mk @@ -1,49 +1,16 @@ # MCU name MCU = atmega32u4 -SRC = matrix.c i2c_master.c - -# 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) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically @@ -65,3 +32,5 @@ CUSTOM_MATRIX = yes # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +SRC += matrix.c i2c_master.c diff --git a/keyboards/treadstone32/keymaps/default/rules.mk b/keyboards/treadstone32/keymaps/default/rules.mk index 8c4541fa197b..5ca4c5258662 100644 --- a/keyboards/treadstone32/keymaps/default/rules.mk +++ b/keyboards/treadstone32/keymaps/default/rules.mk @@ -1,10 +1,7 @@ - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -TAP_DANCE_ENABLE = no - # If your custom treadstone32 pcb, you can rewrite to yes. RGBLIGHT_ENABLE = yes # LED underglow (Enable WS2812 RGB underlight.) LED_ANIMATIONS = yes # LED animations @@ -20,6 +17,3 @@ endif ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) OPT_DEFS += -DIOS_DEVICE_ENABLE endif - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/treadstone32/rules.mk b/keyboards/treadstone32/rules.mk index 1d37dfc69f77..dbc46b403c06 100644 --- a/keyboards/treadstone32/rules.mk +++ b/keyboards/treadstone32/rules.mk @@ -1,50 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change yes to no to disable # @@ -61,4 +27,3 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. LEADER_ENABLE = no - diff --git a/keyboards/treadstone48/keymaps/default/rules.mk b/keyboards/treadstone48/keymaps/default/rules.mk index c53226431d33..38ef4cc9fe08 100644 --- a/keyboards/treadstone48/keymaps/default/rules.mk +++ b/keyboards/treadstone48/keymaps/default/rules.mk @@ -1,21 +1,3 @@ - -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. -SWAP_HANDS_ENABLE = no # Enable one-hand typing TAP_DANCE_ENABLE = yes # If your custom treadstone48 pcb, you can rewrite to yes. diff --git a/keyboards/treadstone48/rules.mk b/keyboards/treadstone48/rules.mk index 8b0d3cd30a8e..fd3c6df5700a 100644 --- a/keyboards/treadstone48/rules.mk +++ b/keyboards/treadstone48/rules.mk @@ -1,51 +1,16 @@ -SRC += i2c.c -SRC += serial.c -SRC += ssd1306.c - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically @@ -70,3 +35,7 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend CUSTOM_MATRIX = yes DEFAULT_FOLDER = treadstone48/rev1 + +SRC += i2c.c +SRC += serial.c +SRC += ssd1306.c diff --git a/keyboards/treasure/type9/rules.mk b/keyboards/treasure/type9/rules.mk index af90959e1ff4..370c683a544a 100644 --- a/keyboards/treasure/type9/rules.mk +++ b/keyboards/treasure/type9/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/uzu42/rev1/rules.mk b/keyboards/uzu42/rev1/rules.mk index 9d0da7e0f86d..1e3cebb14515 100644 --- a/keyboards/uzu42/rev1/rules.mk +++ b/keyboards/uzu42/rev1/rules.mk @@ -1,20 +1 @@ -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -SWAP_HANDS_ENABLE = no # Enable one-hand typing - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +RGBLIGHT_ENABLE = yes diff --git a/keyboards/uzu42/rules.mk b/keyboards/uzu42/rules.mk index ff69431d439a..aea23f3cd0ec 100644 --- a/keyboards/uzu42/rules.mk +++ b/keyboards/uzu42/rules.mk @@ -1,6 +1,3 @@ -# if firmware size over limit, try this option -# CFLAGS += -flto - # MCU name MCU = atmega32u4 @@ -14,11 +11,6 @@ MCU = atmega32u4 # ATmega328P USBasp BOOTLOADER = caterina -# Use split_common libraries -SPLIT_KEYBOARD = yes - -DEFAULT_FOLDER = uzu42/rev1 - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically @@ -38,3 +30,6 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend OLED_DRIVER_ENABLE = no # OLED display +SPLIT_KEYBOARD = yes + +DEFAULT_FOLDER = uzu42/rev1 diff --git a/keyboards/v60_type_r/keymaps/default/rules.mk b/keyboards/v60_type_r/keymaps/default/rules.mk deleted file mode 100644 index b6c9a2580598..000000000000 --- a/keyboards/v60_type_r/keymaps/default/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -BACKLIGHT_ENABLE = no -RGBLIGHT_ENABLE = no diff --git a/keyboards/v60_type_r/keymaps/iso/rules.mk b/keyboards/v60_type_r/keymaps/iso/rules.mk deleted file mode 100644 index b6c9a2580598..000000000000 --- a/keyboards/v60_type_r/keymaps/iso/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -BACKLIGHT_ENABLE = no -RGBLIGHT_ENABLE = no diff --git a/keyboards/v60_type_r/rules.mk b/keyboards/v60_type_r/rules.mk index 35a79db1619c..7533dff3db48 100644 --- a/keyboards/v60_type_r/rules.mk +++ b/keyboards/v60_type_r/rules.mk @@ -1,53 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - # Build Options # change yes to no to disable # diff --git a/keyboards/vision_division/keymaps/default/rules.mk b/keyboards/vision_division/keymaps/default/rules.mk index 69a3b2cd297d..ef72559a0c1f 100644 --- a/keyboards/vision_division/keymaps/default/rules.mk +++ b/keyboards/vision_division/keymaps/default/rules.mk @@ -1,18 +1 @@ -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration -NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = yes # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - +AUDIO_ENABLE = yes diff --git a/keyboards/vitamins_included/keymaps/default/rules.mk b/keyboards/vitamins_included/keymaps/default/rules.mk deleted file mode 100644 index 8b137891791f..000000000000 --- a/keyboards/vitamins_included/keymaps/default/rules.mk +++ /dev/null @@ -1 +0,0 @@ - diff --git a/keyboards/vitamins_included/rev1/rules.mk b/keyboards/vitamins_included/rev1/rules.mk index 4b1454e1550d..8b96b5ca43b6 100644 --- a/keyboards/vitamins_included/rev1/rules.mk +++ b/keyboards/vitamins_included/rev1/rules.mk @@ -1,2 +1,11 @@ -SPLIT_KEYBOARD = yes +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina + +SPLIT_KEYBOARD = yes diff --git a/keyboards/vitamins_included/rev2/rules.mk b/keyboards/vitamins_included/rev2/rules.mk index 3d8bbe0f6195..bacfbea39629 100644 --- a/keyboards/vitamins_included/rev2/rules.mk +++ b/keyboards/vitamins_included/rev2/rules.mk @@ -1,2 +1,11 @@ -SPLIT_KEYBOARD = yes # Rev2 uses split_common +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = qmk-dfu + +SPLIT_KEYBOARD = yes diff --git a/keyboards/vitamins_included/rules.mk b/keyboards/vitamins_included/rules.mk index 761df0357b00..d81b4a9146c5 100644 --- a/keyboards/vitamins_included/rules.mk +++ b/keyboards/vitamins_included/rules.mk @@ -25,4 +25,4 @@ LAYOUTS = ortho_4x12 DEFAULT_FOLDER = vitamins_included/rev2 -LINK_TIME_OPTIMIZATION_ENABLE = yes \ No newline at end of file +LINK_TIME_OPTIMIZATION_ENABLE = yes diff --git a/keyboards/vn66/rules.mk b/keyboards/vn66/rules.mk index ad8bb587cea7..37005c127670 100644 --- a/keyboards/vn66/rules.mk +++ b/keyboards/vn66/rules.mk @@ -1,27 +1,16 @@ # MCU name MCU = atmega32u4 - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/waldo/keymaps/default/rules.mk b/keyboards/waldo/keymaps/default/rules.mk deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/keyboards/waldo/keymaps/default_split_shft_bck/rules.mk b/keyboards/waldo/keymaps/default_split_shft_bck/rules.mk deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/keyboards/waldo/rules.mk b/keyboards/waldo/rules.mk index 6b3a9b96ccf6..c174a9eb96e5 100644 --- a/keyboards/waldo/rules.mk +++ b/keyboards/waldo/rules.mk @@ -1,15 +1,16 @@ # MCU name MCU = atmega32u4 -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically diff --git a/keyboards/westfoxtrot/aanzee/rules.mk b/keyboards/westfoxtrot/aanzee/rules.mk index 4ba66a5f7889..5032b0d296be 100644 --- a/keyboards/westfoxtrot/aanzee/rules.mk +++ b/keyboards/westfoxtrot/aanzee/rules.mk @@ -1,49 +1,14 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu # Build Options diff --git a/keyboards/westfoxtrot/cyclops/rules.mk b/keyboards/westfoxtrot/cyclops/rules.mk index 10ea51391090..04b2bc82f65c 100644 --- a/keyboards/westfoxtrot/cyclops/rules.mk +++ b/keyboards/westfoxtrot/cyclops/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # @@ -77,4 +30,4 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) \ No newline at end of file +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/westfoxtrot/cypher/rules.mk b/keyboards/westfoxtrot/cypher/rules.mk index 63cbd36756a7..4703282ff274 100644 --- a/keyboards/westfoxtrot/cypher/rules.mk +++ b/keyboards/westfoxtrot/cypher/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/wilba_tech/rama_works_koyu/rules.mk b/keyboards/wilba_tech/rama_works_koyu/rules.mk index ebcb6a455f74..cf6a8a96a01f 100644 --- a/keyboards/wilba_tech/rama_works_koyu/rules.mk +++ b/keyboards/wilba_tech/rama_works_koyu/rules.mk @@ -1,10 +1,3 @@ -# project specific files -SRC = keyboards/wilba_tech/wt_main.c \ - keyboards/wilba_tech/wt_rgb_backlight.c \ - quantum/color.c \ - drivers/issi/is31fl3731.c \ - drivers/avr/i2c_master.c - # MCU name MCU = atmega32u4 @@ -47,4 +40,9 @@ RAW_ENABLE = yes DYNAMIC_KEYMAP_ENABLE = yes CIE1931_CURVE = yes -#LAYOUTS = ??? +# project specific files +SRC = keyboards/wilba_tech/wt_main.c \ + keyboards/wilba_tech/wt_rgb_backlight.c \ + quantum/color.c \ + drivers/issi/is31fl3731.c \ + drivers/avr/i2c_master.c diff --git a/keyboards/wilba_tech/rama_works_m10_b/rules.mk b/keyboards/wilba_tech/rama_works_m10_b/rules.mk index 99330021f248..07372d0ac23c 100644 --- a/keyboards/wilba_tech/rama_works_m10_b/rules.mk +++ b/keyboards/wilba_tech/rama_works_m10_b/rules.mk @@ -1,6 +1,3 @@ -# project specific files -SRC = keyboards/wilba_tech/wt_main.c - # MCU name MCU = atmega32u4 @@ -14,7 +11,6 @@ MCU = atmega32u4 # ATmega328P USBasp BOOTLOADER = atmel-dfu - # Build Options # change yes to no to disable # @@ -36,3 +32,6 @@ FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches RAW_ENABLE = yes DYNAMIC_KEYMAP_ENABLE = yes + +# project specific files +SRC = keyboards/wilba_tech/wt_main.c diff --git a/keyboards/wilba_tech/rama_works_m60_a/rules.mk b/keyboards/wilba_tech/rama_works_m60_a/rules.mk index 4ce5dc54cb9d..1dec6c074fa7 100644 --- a/keyboards/wilba_tech/rama_works_m60_a/rules.mk +++ b/keyboards/wilba_tech/rama_works_m60_a/rules.mk @@ -1,12 +1,3 @@ - - -# project specific files -SRC = keyboards/wilba_tech/wt_main.c \ - keyboards/wilba_tech/wt_rgb_backlight.c \ - quantum/color.c \ - drivers/issi/is31fl3731.c \ - drivers/avr/i2c_master.c - # MCU name MCU = atmega32u4 @@ -50,3 +41,10 @@ DYNAMIC_KEYMAP_ENABLE = yes CIE1931_CURVE = yes LAYOUTS = 60_hhkb + +# project specific files +SRC = keyboards/wilba_tech/wt_main.c \ + keyboards/wilba_tech/wt_rgb_backlight.c \ + quantum/color.c \ + drivers/issi/is31fl3731.c \ + drivers/avr/i2c_master.c diff --git a/keyboards/wilba_tech/rama_works_m6_a/rules.mk b/keyboards/wilba_tech/rama_works_m6_a/rules.mk index 32f0e25de8e9..5feee3112080 100644 --- a/keyboards/wilba_tech/rama_works_m6_a/rules.mk +++ b/keyboards/wilba_tech/rama_works_m6_a/rules.mk @@ -1,6 +1,3 @@ -# project specific files -SRC = keyboards/wilba_tech/wt_main.c - # MCU name MCU = atmega32u4 @@ -19,7 +16,6 @@ BOOTLOADER = atmel-dfu # backlight effects. OPT_DEFS += -DNO_SUSPEND_POWER_DOWN - # Build Options # change yes to no to disable # @@ -43,3 +39,5 @@ RAW_ENABLE = yes DYNAMIC_KEYMAP_ENABLE = yes CIE1931_CURVE = no +# project specific files +SRC = keyboards/wilba_tech/wt_main.c diff --git a/keyboards/wilba_tech/rama_works_m6_b/rules.mk b/keyboards/wilba_tech/rama_works_m6_b/rules.mk index c016fa344f50..4c14af06c458 100644 --- a/keyboards/wilba_tech/rama_works_m6_b/rules.mk +++ b/keyboards/wilba_tech/rama_works_m6_b/rules.mk @@ -1,10 +1,3 @@ -# project specific files -SRC = keyboards/wilba_tech/wt_main.c \ - keyboards/wilba_tech/wt_rgb_backlight.c \ - quantum/color.c \ - drivers/issi/is31fl3218.c \ - drivers/avr/i2c_master.c - # MCU name MCU = atmega32u4 @@ -23,7 +16,6 @@ BOOTLOADER = atmel-dfu # backlight effects. OPT_DEFS += -DNO_SUSPEND_POWER_DOWN - # Build Options # change yes to no to disable # @@ -47,3 +39,9 @@ RAW_ENABLE = yes DYNAMIC_KEYMAP_ENABLE = yes CIE1931_CURVE = yes +# project specific files +SRC = keyboards/wilba_tech/wt_main.c \ + keyboards/wilba_tech/wt_rgb_backlight.c \ + quantum/color.c \ + drivers/issi/is31fl3218.c \ + drivers/avr/i2c_master.c diff --git a/keyboards/wilba_tech/rama_works_u80_a/rules.mk b/keyboards/wilba_tech/rama_works_u80_a/rules.mk index caecaecbb7d9..0f02cd04f375 100644 --- a/keyboards/wilba_tech/rama_works_u80_a/rules.mk +++ b/keyboards/wilba_tech/rama_works_u80_a/rules.mk @@ -1,10 +1,3 @@ -# project specific files -SRC = keyboards/wilba_tech/wt_main.c \ - keyboards/wilba_tech/wt_rgb_backlight.c \ - quantum/color.c \ - drivers/issi/is31fl3731.c \ - drivers/avr/i2c_master.c - # MCU name MCU = atmega32u4 @@ -18,7 +11,6 @@ MCU = atmega32u4 # ATmega328P USBasp BOOTLOADER = atmel-dfu - # Build Options # change yes to no to disable # @@ -41,3 +33,10 @@ FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches RAW_ENABLE = yes DYNAMIC_KEYMAP_ENABLE = yes CIE1931_CURVE = yes + +# project specific files +SRC = keyboards/wilba_tech/wt_main.c \ + keyboards/wilba_tech/wt_rgb_backlight.c \ + quantum/color.c \ + drivers/issi/is31fl3731.c \ + drivers/avr/i2c_master.c diff --git a/keyboards/wilba_tech/wt60_a/keymaps/via/rules.mk b/keyboards/wilba_tech/wt60_a/keymaps/via/rules.mk index 8834bf0c8e51..4880a57becd3 100644 --- a/keyboards/wilba_tech/wt60_a/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt60_a/keymaps/via/rules.mk @@ -1,2 +1,2 @@ RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file +DYNAMIC_KEYMAP_ENABLE = yes diff --git a/keyboards/wilba_tech/wt60_a/rules.mk b/keyboards/wilba_tech/wt60_a/rules.mk index 4f702fab4983..111c94ee80d9 100644 --- a/keyboards/wilba_tech/wt60_a/rules.mk +++ b/keyboards/wilba_tech/wt60_a/rules.mk @@ -1,54 +1,16 @@ -# project specific files -SRC = drivers/issi/is31fl3736.c \ - drivers/avr/i2c_master.c \ - quantum/color.c \ - keyboards/wilba_tech/wt_mono_backlight.c \ - keyboards/wilba_tech/wt_main.c - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - # Build Options # change yes to no to disable # @@ -67,3 +29,10 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches + +# project specific files +SRC = drivers/issi/is31fl3736.c \ + drivers/avr/i2c_master.c \ + quantum/color.c \ + keyboards/wilba_tech/wt_mono_backlight.c \ + keyboards/wilba_tech/wt_main.c diff --git a/keyboards/wilba_tech/wt60_d/keymaps/via/rules.mk b/keyboards/wilba_tech/wt60_d/keymaps/via/rules.mk index 8834bf0c8e51..4880a57becd3 100644 --- a/keyboards/wilba_tech/wt60_d/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt60_d/keymaps/via/rules.mk @@ -1,2 +1,2 @@ RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file +DYNAMIC_KEYMAP_ENABLE = yes diff --git a/keyboards/wilba_tech/wt60_d/rules.mk b/keyboards/wilba_tech/wt60_d/rules.mk index 7ba0b9223b29..07372d0ac23c 100644 --- a/keyboards/wilba_tech/wt60_d/rules.mk +++ b/keyboards/wilba_tech/wt60_d/rules.mk @@ -1,6 +1,3 @@ -# project specific files -SRC = keyboards/wilba_tech/wt_main.c - # MCU name MCU = atmega32u4 @@ -34,4 +31,7 @@ AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file +DYNAMIC_KEYMAP_ENABLE = yes + +# project specific files +SRC = keyboards/wilba_tech/wt_main.c diff --git a/keyboards/wilba_tech/wt65_a/keymaps/via/rules.mk b/keyboards/wilba_tech/wt65_a/keymaps/via/rules.mk index 8834bf0c8e51..4880a57becd3 100644 --- a/keyboards/wilba_tech/wt65_a/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt65_a/keymaps/via/rules.mk @@ -1,2 +1,2 @@ RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file +DYNAMIC_KEYMAP_ENABLE = yes diff --git a/keyboards/wilba_tech/wt65_a/rules.mk b/keyboards/wilba_tech/wt65_a/rules.mk index 9b5bd1e7f9ba..111c94ee80d9 100644 --- a/keyboards/wilba_tech/wt65_a/rules.mk +++ b/keyboards/wilba_tech/wt65_a/rules.mk @@ -1,10 +1,3 @@ -# project specific files -SRC = drivers/issi/is31fl3736.c \ - drivers/avr/i2c_master.c \ - quantum/color.c \ - keyboards/wilba_tech/wt_mono_backlight.c \ - keyboards/wilba_tech/wt_main.c - # MCU name MCU = atmega32u4 @@ -18,7 +11,6 @@ MCU = atmega32u4 # ATmega328P USBasp BOOTLOADER = atmel-dfu - # Build Options # change yes to no to disable # @@ -37,3 +29,10 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches + +# project specific files +SRC = drivers/issi/is31fl3736.c \ + drivers/avr/i2c_master.c \ + quantum/color.c \ + keyboards/wilba_tech/wt_mono_backlight.c \ + keyboards/wilba_tech/wt_main.c diff --git a/keyboards/wilba_tech/wt65_b/keymaps/via/rules.mk b/keyboards/wilba_tech/wt65_b/keymaps/via/rules.mk index 8834bf0c8e51..4880a57becd3 100644 --- a/keyboards/wilba_tech/wt65_b/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt65_b/keymaps/via/rules.mk @@ -1,2 +1,2 @@ RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file +DYNAMIC_KEYMAP_ENABLE = yes diff --git a/keyboards/wilba_tech/wt65_b/rules.mk b/keyboards/wilba_tech/wt65_b/rules.mk index 9b5bd1e7f9ba..111c94ee80d9 100644 --- a/keyboards/wilba_tech/wt65_b/rules.mk +++ b/keyboards/wilba_tech/wt65_b/rules.mk @@ -1,10 +1,3 @@ -# project specific files -SRC = drivers/issi/is31fl3736.c \ - drivers/avr/i2c_master.c \ - quantum/color.c \ - keyboards/wilba_tech/wt_mono_backlight.c \ - keyboards/wilba_tech/wt_main.c - # MCU name MCU = atmega32u4 @@ -18,7 +11,6 @@ MCU = atmega32u4 # ATmega328P USBasp BOOTLOADER = atmel-dfu - # Build Options # change yes to no to disable # @@ -37,3 +29,10 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches + +# project specific files +SRC = drivers/issi/is31fl3736.c \ + drivers/avr/i2c_master.c \ + quantum/color.c \ + keyboards/wilba_tech/wt_mono_backlight.c \ + keyboards/wilba_tech/wt_main.c diff --git a/keyboards/wilba_tech/wt69_a/keymaps/via/rules.mk b/keyboards/wilba_tech/wt69_a/keymaps/via/rules.mk index 8834bf0c8e51..4880a57becd3 100644 --- a/keyboards/wilba_tech/wt69_a/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt69_a/keymaps/via/rules.mk @@ -1,2 +1,2 @@ RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file +DYNAMIC_KEYMAP_ENABLE = yes diff --git a/keyboards/wilba_tech/wt69_a/rules.mk b/keyboards/wilba_tech/wt69_a/rules.mk index f349608cd98f..7d1c2aa1b170 100644 --- a/keyboards/wilba_tech/wt69_a/rules.mk +++ b/keyboards/wilba_tech/wt69_a/rules.mk @@ -1,6 +1,3 @@ -# project specific files -SRC = keyboards/wilba_tech/wt_main.c - # MCU name MCU = atmega32u4 @@ -14,7 +11,6 @@ MCU = atmega32u4 # ATmega328P USBasp BOOTLOADER = atmel-dfu - # Build Options # change yes to no to disable # @@ -33,3 +29,6 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches + +# project specific files +SRC = keyboards/wilba_tech/wt_main.c diff --git a/keyboards/wilba_tech/wt75_a/keymaps/via/rules.mk b/keyboards/wilba_tech/wt75_a/keymaps/via/rules.mk index 8834bf0c8e51..4880a57becd3 100644 --- a/keyboards/wilba_tech/wt75_a/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt75_a/keymaps/via/rules.mk @@ -1,2 +1,2 @@ RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file +DYNAMIC_KEYMAP_ENABLE = yes diff --git a/keyboards/wilba_tech/wt75_a/rules.mk b/keyboards/wilba_tech/wt75_a/rules.mk index 9b5bd1e7f9ba..111c94ee80d9 100644 --- a/keyboards/wilba_tech/wt75_a/rules.mk +++ b/keyboards/wilba_tech/wt75_a/rules.mk @@ -1,10 +1,3 @@ -# project specific files -SRC = drivers/issi/is31fl3736.c \ - drivers/avr/i2c_master.c \ - quantum/color.c \ - keyboards/wilba_tech/wt_mono_backlight.c \ - keyboards/wilba_tech/wt_main.c - # MCU name MCU = atmega32u4 @@ -18,7 +11,6 @@ MCU = atmega32u4 # ATmega328P USBasp BOOTLOADER = atmel-dfu - # Build Options # change yes to no to disable # @@ -37,3 +29,10 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches + +# project specific files +SRC = drivers/issi/is31fl3736.c \ + drivers/avr/i2c_master.c \ + quantum/color.c \ + keyboards/wilba_tech/wt_mono_backlight.c \ + keyboards/wilba_tech/wt_main.c diff --git a/keyboards/wilba_tech/wt75_b/keymaps/via/rules.mk b/keyboards/wilba_tech/wt75_b/keymaps/via/rules.mk index 8834bf0c8e51..4880a57becd3 100644 --- a/keyboards/wilba_tech/wt75_b/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt75_b/keymaps/via/rules.mk @@ -1,2 +1,2 @@ RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file +DYNAMIC_KEYMAP_ENABLE = yes diff --git a/keyboards/wilba_tech/wt75_b/rules.mk b/keyboards/wilba_tech/wt75_b/rules.mk index 9b5bd1e7f9ba..111c94ee80d9 100644 --- a/keyboards/wilba_tech/wt75_b/rules.mk +++ b/keyboards/wilba_tech/wt75_b/rules.mk @@ -1,10 +1,3 @@ -# project specific files -SRC = drivers/issi/is31fl3736.c \ - drivers/avr/i2c_master.c \ - quantum/color.c \ - keyboards/wilba_tech/wt_mono_backlight.c \ - keyboards/wilba_tech/wt_main.c - # MCU name MCU = atmega32u4 @@ -18,7 +11,6 @@ MCU = atmega32u4 # ATmega328P USBasp BOOTLOADER = atmel-dfu - # Build Options # change yes to no to disable # @@ -37,3 +29,10 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches + +# project specific files +SRC = drivers/issi/is31fl3736.c \ + drivers/avr/i2c_master.c \ + quantum/color.c \ + keyboards/wilba_tech/wt_mono_backlight.c \ + keyboards/wilba_tech/wt_main.c diff --git a/keyboards/wilba_tech/wt75_c/keymaps/via/rules.mk b/keyboards/wilba_tech/wt75_c/keymaps/via/rules.mk index 8834bf0c8e51..4880a57becd3 100644 --- a/keyboards/wilba_tech/wt75_c/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt75_c/keymaps/via/rules.mk @@ -1,2 +1,2 @@ RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file +DYNAMIC_KEYMAP_ENABLE = yes diff --git a/keyboards/wilba_tech/wt75_c/rules.mk b/keyboards/wilba_tech/wt75_c/rules.mk index 9b5bd1e7f9ba..111c94ee80d9 100644 --- a/keyboards/wilba_tech/wt75_c/rules.mk +++ b/keyboards/wilba_tech/wt75_c/rules.mk @@ -1,10 +1,3 @@ -# project specific files -SRC = drivers/issi/is31fl3736.c \ - drivers/avr/i2c_master.c \ - quantum/color.c \ - keyboards/wilba_tech/wt_mono_backlight.c \ - keyboards/wilba_tech/wt_main.c - # MCU name MCU = atmega32u4 @@ -18,7 +11,6 @@ MCU = atmega32u4 # ATmega328P USBasp BOOTLOADER = atmel-dfu - # Build Options # change yes to no to disable # @@ -37,3 +29,10 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches + +# project specific files +SRC = drivers/issi/is31fl3736.c \ + drivers/avr/i2c_master.c \ + quantum/color.c \ + keyboards/wilba_tech/wt_mono_backlight.c \ + keyboards/wilba_tech/wt_main.c diff --git a/keyboards/wilba_tech/wt80_a/keymaps/via/rules.mk b/keyboards/wilba_tech/wt80_a/keymaps/via/rules.mk index 8834bf0c8e51..4880a57becd3 100644 --- a/keyboards/wilba_tech/wt80_a/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt80_a/keymaps/via/rules.mk @@ -1,2 +1,2 @@ RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file +DYNAMIC_KEYMAP_ENABLE = yes diff --git a/keyboards/wilba_tech/wt80_a/rules.mk b/keyboards/wilba_tech/wt80_a/rules.mk index 9b5bd1e7f9ba..111c94ee80d9 100644 --- a/keyboards/wilba_tech/wt80_a/rules.mk +++ b/keyboards/wilba_tech/wt80_a/rules.mk @@ -1,10 +1,3 @@ -# project specific files -SRC = drivers/issi/is31fl3736.c \ - drivers/avr/i2c_master.c \ - quantum/color.c \ - keyboards/wilba_tech/wt_mono_backlight.c \ - keyboards/wilba_tech/wt_main.c - # MCU name MCU = atmega32u4 @@ -18,7 +11,6 @@ MCU = atmega32u4 # ATmega328P USBasp BOOTLOADER = atmel-dfu - # Build Options # change yes to no to disable # @@ -37,3 +29,10 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches + +# project specific files +SRC = drivers/issi/is31fl3736.c \ + drivers/avr/i2c_master.c \ + quantum/color.c \ + keyboards/wilba_tech/wt_mono_backlight.c \ + keyboards/wilba_tech/wt_main.c diff --git a/keyboards/wilba_tech/wt8_a/rules.mk b/keyboards/wilba_tech/wt8_a/rules.mk index 5e87a299592f..7d1c2aa1b170 100644 --- a/keyboards/wilba_tech/wt8_a/rules.mk +++ b/keyboards/wilba_tech/wt8_a/rules.mk @@ -1,6 +1,3 @@ -# project specific files -SRC = keyboards/wilba_tech/wt_main.c - # MCU name MCU = atmega32u4 @@ -32,3 +29,6 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches + +# project specific files +SRC = keyboards/wilba_tech/wt_main.c diff --git a/keyboards/wilba_tech/zeal60/rules.mk b/keyboards/wilba_tech/zeal60/rules.mk index b8d63050c69a..11f3867de39f 100644 --- a/keyboards/wilba_tech/zeal60/rules.mk +++ b/keyboards/wilba_tech/zeal60/rules.mk @@ -1,10 +1,3 @@ -# project specific files -SRC = keyboards/wilba_tech/wt_main.c \ - keyboards/wilba_tech/wt_rgb_backlight.c \ - quantum/color.c \ - drivers/issi/is31fl3731.c \ - drivers/avr/i2c_master.c - # MCU name MCU = atmega32u4 @@ -48,3 +41,10 @@ DYNAMIC_KEYMAP_ENABLE = yes CIE1931_CURVE = yes LAYOUTS = 60_ansi 60_iso 60_hhkb 60_ansi_split_bs_rshift + +# project specific files +SRC = keyboards/wilba_tech/wt_main.c \ + keyboards/wilba_tech/wt_rgb_backlight.c \ + quantum/color.c \ + drivers/issi/is31fl3731.c \ + drivers/avr/i2c_master.c diff --git a/keyboards/wilba_tech/zeal65/rules.mk b/keyboards/wilba_tech/zeal65/rules.mk index f0df99656146..6c8783eb29f7 100644 --- a/keyboards/wilba_tech/zeal65/rules.mk +++ b/keyboards/wilba_tech/zeal65/rules.mk @@ -1,10 +1,3 @@ -# project specific files -SRC = keyboards/wilba_tech/wt_main.c \ - keyboards/wilba_tech/wt_rgb_backlight.c \ - quantum/color.c \ - drivers/issi/is31fl3731.c \ - drivers/avr/i2c_master.c - # MCU name MCU = atmega32u4 @@ -46,3 +39,10 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend RAW_ENABLE = yes DYNAMIC_KEYMAP_ENABLE = yes CIE1931_CURVE = yes + +# project specific files +SRC = keyboards/wilba_tech/wt_main.c \ + keyboards/wilba_tech/wt_rgb_backlight.c \ + quantum/color.c \ + drivers/issi/is31fl3731.c \ + drivers/avr/i2c_master.c diff --git a/keyboards/xd60/rev2/rules.mk b/keyboards/xd60/rev2/rules.mk index 42f9842af123..37f281b0cc43 100644 --- a/keyboards/xd60/rev2/rules.mk +++ b/keyboards/xd60/rev2/rules.mk @@ -1,52 +1,15 @@ # MCU name MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# LUFA specific -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) diff --git a/keyboards/xd60/rev3/rules.mk b/keyboards/xd60/rev3/rules.mk index 36f259e05489..8e1fd415b1ca 100644 --- a/keyboards/xd60/rev3/rules.mk +++ b/keyboards/xd60/rev3/rules.mk @@ -1,53 +1,16 @@ # MCU name MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# LUFA specific -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - # Build Options BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = yes # Mouse keys(+4700) diff --git a/keyboards/xd75/keymaps/default/rules.mk b/keyboards/xd75/keymaps/default/rules.mk deleted file mode 100644 index 52a8f38d45ff..000000000000 --- a/keyboards/xd75/keymaps/default/rules.mk +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright 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 . - diff --git a/keyboards/xd75/rules.mk b/keyboards/xd75/rules.mk index 4b2682b19242..9052c8c12381 100644 --- a/keyboards/xd75/rules.mk +++ b/keyboards/xd75/rules.mk @@ -1,50 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # QMK Build Options # change to "no" to disable the options, or define them in the Makefile in diff --git a/keyboards/xd84/rules.mk b/keyboards/xd84/rules.mk index 916645226210..d9d316c13361 100644 --- a/keyboards/xd84/rules.mk +++ b/keyboards/xd84/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/xd87/keymaps/default_underglow/rules.mk b/keyboards/xd87/keymaps/default_underglow/rules.mk index 390dad18dfbb..5cf1edf60be4 100755 --- a/keyboards/xd87/keymaps/default_underglow/rules.mk +++ b/keyboards/xd87/keymaps/default_underglow/rules.mk @@ -1,3 +1,3 @@ BOOTMAGIC_ENABLE = lite COMMAND_ENABLE = no -RGBLIGHT_ENABLE = yes \ No newline at end of file +RGBLIGHT_ENABLE = yes diff --git a/keyboards/xd87/rules.mk b/keyboards/xd87/rules.mk index 1b1b6fdf2847..3e8e4e1f512b 100644 --- a/keyboards/xd87/rules.mk +++ b/keyboards/xd87/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/xd96/rules.mk b/keyboards/xd96/rules.mk index 3a97fe5f98b8..2079e436c0be 100644 --- a/keyboards/xd96/rules.mk +++ b/keyboards/xd96/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/xmmx/rules.mk b/keyboards/xmmx/rules.mk index ee87c6e8d49b..df45fa5df0e4 100644 --- a/keyboards/xmmx/rules.mk +++ b/keyboards/xmmx/rules.mk @@ -1,45 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. @@ -53,4 +23,4 @@ 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 ?= no # Enable keyboard backlight functionality AUDIO_ENABLE ?= no -RGBLIGHT_ENABLE ?= no \ No newline at end of file +RGBLIGHT_ENABLE ?= no diff --git a/keyboards/xw60/rules.mk b/keyboards/xw60/rules.mk index 01435ee54491..913ac3c02424 100644 --- a/keyboards/xw60/rules.mk +++ b/keyboards/xw60/rules.mk @@ -1,48 +1,14 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu # Build Options diff --git a/keyboards/yd60mq/rules.mk b/keyboards/yd60mq/rules.mk index 2a8963011690..1e6d4bb7cdff 100644 --- a/keyboards/yd60mq/rules.mk +++ b/keyboards/yd60mq/rules.mk @@ -1,51 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - # Build Options # comment out to disable the options. # diff --git a/keyboards/yd68/rules.mk b/keyboards/yd68/rules.mk index 2a18c0015db5..420ab38bf5da 100644 --- a/keyboards/yd68/rules.mk +++ b/keyboards/yd68/rules.mk @@ -1,63 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # diff --git a/keyboards/yosino58/keymaps/default/rules.mk b/keyboards/yosino58/keymaps/default/rules.mk index 131f5e1f8a69..88c202edb06f 100644 --- a/keyboards/yosino58/keymaps/default/rules.mk +++ b/keyboards/yosino58/keymaps/default/rules.mk @@ -1,23 +1,5 @@ -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # 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 -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -SWAP_HANDS_ENABLE = no # Enable one-hand typing - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +EXTRAKEY_ENABLE = yes +RGBLIGHT_ENABLE = yes # If you want to change the display of OLED, you need to change here SRC += ./lib/glcdfont.c \ diff --git a/keyboards/yosino58/rules.mk b/keyboards/yosino58/rules.mk index 25f135a8e897..5d3885fb2f4d 100644 --- a/keyboards/yosino58/rules.mk +++ b/keyboards/yosino58/rules.mk @@ -1,54 +1,16 @@ -SRC += i2c.c -SRC += serial.c -SRC += ssd1306.c - -# if firmware size over limit, try this option -# CFLAGS += -flto - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically @@ -73,3 +35,7 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend CUSTOM_MATRIX = yes DEFAULT_FOLDER = yosino58/rev1 + +SRC += i2c.c +SRC += serial.c +SRC += ssd1306.c diff --git a/keyboards/zinc/keymaps/default/rules.mk b/keyboards/zinc/keymaps/default/rules.mk index 2dcefc0016d0..d2bc96e3afe1 100644 --- a/keyboards/zinc/keymaps/default/rules.mk +++ b/keyboards/zinc/keymaps/default/rules.mk @@ -1,4 +1,3 @@ - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically diff --git a/keyboards/zinc/rules.mk b/keyboards/zinc/rules.mk index 7574af387cc8..d9d840c2d0a8 100644 --- a/keyboards/zinc/rules.mk +++ b/keyboards/zinc/rules.mk @@ -1,50 +1,16 @@ -#SRC += i2c.c -SRC += serial.c - # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically @@ -69,3 +35,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend CUSTOM_MATRIX = yes DEFAULT_FOLDER = zinc/rev1 + +#SRC += i2c.c +SRC += serial.c diff --git a/keyboards/zj68/rules.mk b/keyboards/zj68/rules.mk index 79860ed7a24c..648553cc4141 100644 --- a/keyboards/zj68/rules.mk +++ b/keyboards/zj68/rules.mk @@ -1,48 +1,14 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu # Build Options diff --git a/keyboards/zlant/rules.mk b/keyboards/zlant/rules.mk index 0bc5c8aaed7c..82bc13c60ebc 100755 --- a/keyboards/zlant/rules.mk +++ b/keyboards/zlant/rules.mk @@ -1,45 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. From e258b10d71049645c2e6ce50f652ce3f11578603 Mon Sep 17 00:00:00 2001 From: Angelo Gazzola Date: Wed, 30 Oct 2019 05:34:19 +0100 Subject: [PATCH 221/316] [Keyboard] Add 42 keyboard (#7071) * [Keyboard] Add 42 keyboard * Apply suggested fixes * Remove 42.c * Move keyboard to handwired folder --- keyboards/handwired/42/42.h | 32 +++++++++++++ keyboards/handwired/42/README.md | 15 ++++++ keyboards/handwired/42/config.h | 42 +++++++++++++++++ .../handwired/42/keymaps/default/keymap.c | 47 +++++++++++++++++++ keyboards/handwired/42/rules.mk | 39 +++++++++++++++ 5 files changed, 175 insertions(+) create mode 100644 keyboards/handwired/42/42.h create mode 100644 keyboards/handwired/42/README.md create mode 100644 keyboards/handwired/42/config.h create mode 100644 keyboards/handwired/42/keymaps/default/keymap.c create mode 100644 keyboards/handwired/42/rules.mk diff --git a/keyboards/handwired/42/42.h b/keyboards/handwired/42/42.h new file mode 100644 index 000000000000..5be29bf25264 --- /dev/null +++ b/keyboards/handwired/42/42.h @@ -0,0 +1,32 @@ +/* Copyright 2019 Angelo Gazzola (nglgzz) + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define ___ KC_NO +#define LAYOUT( \ + 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, \ + K33, K34, K35, K36, K37, K38 \ +) { \ + { 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 }, \ + { ___, ___, ___, K33, K34, K35, K36, K37, K38, ___, ___, ___ } \ +} diff --git a/keyboards/handwired/42/README.md b/keyboards/handwired/42/README.md new file mode 100644 index 000000000000..20fb67aa7efc --- /dev/null +++ b/keyboards/handwired/42/README.md @@ -0,0 +1,15 @@ +# 42 + +42-keys ergonomic keyboard running on Adafruit Feather BLE. + +![42](/~https://github.com/nglgzz/42/raw/master/42.jpg) + +Keyboard Maintainer: [Angelo Gazzola (nglgzz)](/~https://github.com/nglgzz) +Hardware Supported: 42 (rev2, rev3), Feather 32u4 BLE +Hardware Availability: [GitHub](/~https://github.com/nglgzz/42/) + +Make example for this keyboard (after setting up your build environment): + + make handwired/42:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/handwired/42/config.h b/keyboards/handwired/42/config.h new file mode 100644 index 000000000000..3f5060989b3a --- /dev/null +++ b/keyboards/handwired/42/config.h @@ -0,0 +1,42 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0003 +#define MANUFACTURER nglgzz +#define PRODUCT 42 +#define DESCRIPTION BT + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_COL_PINS { F5, F6, F7, F0, F1, F4, B6, B5, D7, C7, D6, B7 } +#define MATRIX_ROW_PINS { D2, D3, D0, D1 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 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 + +#define TAPPING_TERM 100 diff --git a/keyboards/handwired/42/keymaps/default/keymap.c b/keyboards/handwired/42/keymaps/default/keymap.c new file mode 100644 index 000000000000..099e1fa01258 --- /dev/null +++ b/keyboards/handwired/42/keymaps/default/keymap.c @@ -0,0 +1,47 @@ +#include QMK_KEYBOARD_H + +// MOD_KC +#define CTL_ESC MT(MOD_LCTL, KC_ESCAPE) +#define CTL_ENT MT(MOD_LCTL, KC_ENTER) +#define ALT_Z MT(MOD_LALT, KC_Z) +#define ALT_SLS MT(MOD_LALT, KC_SLASH) +#define SU_QUOT MT(MOD_LGUI, KC_QUOTE) +#define SU_BSLS MT(MOD_LGUI, KC_BSLS) +#define SFT_DEL MT(MOD_LSFT, KC_DELETE) + +// LAYER_KC +#define L3_SPC LT(3, KC_SPC) +#define L2_SPC LT(2, KC_SPC) +#define L1_LBRC LT(1, KC_LBRC) +#define L1_RBRC LT(1, KC_RBRC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // Default Layer + LAYOUT( + KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_BSPC, + CTL_ESC, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, CTL_ENT, + KC_LSFT, ALT_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , ALT_SLS, SFT_DEL, + L1_LBRC, L3_SPC , SU_QUOT, SU_BSLS, L2_SPC , L1_RBRC + ), + // Symbols Layer + LAYOUT( + KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_EQL , + KC_INS , S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_MINS, + 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_CAPS, OUT_USB, OUT_BT , _______, _______, _______ + ), + // Navigation Layer + LAYOUT( + _______, _______, _______, KC_PGUP, _______, _______, KC_BRIU, _______, KC_UP , _______, _______, _______, + _______, _______, KC_HOME, KC_PGDN, KC_END , _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, + _______, _______, _______, _______, _______, _______, KC_BRID, KC_VOLD, KC_MUTE, KC_VOLU, _______, _______, + _______, _______, _______, _______, _______, _______ + ), + // Mouse Layer + LAYOUT( + _______, _______, KC_WREF, KC_WH_U, KC_WSCH, _______, _______, KC_BTN1, KC_MS_U, KC_BTN2, _______, _______, + _______, _______, KC_WH_L, KC_WH_D, KC_WH_R, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, + _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/handwired/42/rules.mk b/keyboards/handwired/42/rules.mk new file mode 100644 index 000000000000..b44a0a518cbd --- /dev/null +++ b/keyboards/handwired/42/rules.mk @@ -0,0 +1,39 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +F_CPU = 8000000 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328p USBasp +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs + +UNICODE_ENABLE = no # Unicode +UNICODEMAP_ENABLE = no # ^^ +UCIS_ENABLE = no # ^^ +BLUETOOTH = AdafruitBLE From b1c2bf071bcfd0d5badf79656f523dd8f5146f25 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Tue, 29 Oct 2019 22:33:46 -0700 Subject: [PATCH 222/316] [Keyboard] Think 6.5 (#7199) * generated files * create the physical and electrical matrix, thanks noroadsleft * add an appropriate keymap * add qmk configurator support * add readme * add keyboard configuration and rules * move over the think6.5 to the gray_studio directory * move to hotswap in anticipation of non hotswap pcb support * update readme to have the correct make path * rename to hotswap * add community layout support by using the LAYOUT_65_ansi_blocker LAYOUT macro name * thanks to cygnus for pointing out the solder json file to me. This commit is pretty much the same as the hotswap as it uses the same pins and switch matrix. * update readme to state that LAYOUT_65_ansi_blocker works for both hotswap and solder. * wrong pound include * add LED support. Soldered PCB only supports caps lock LED * add readme notes for indicator led * Update keyboards/gray_studio/think65/hotswap/keymaps/default/keymap.c Co-Authored-By: fauxpark * Update keyboards/gray_studio/think65/hotswap/rules.mk Co-Authored-By: fauxpark * Update keyboards/gray_studio/think65/hotswap/rules.mk Co-Authored-By: fauxpark * Update keyboards/gray_studio/think65/solder/keymaps/default/keymap.c Co-Authored-By: fauxpark * Update keyboards/gray_studio/think65/solder/rules.mk Co-Authored-By: fauxpark * Update keyboards/gray_studio/think65/solder/rules.mk Co-Authored-By: fauxpark --- .../gray_studio/think65/hotswap/config.h | 72 ++++++++ .../gray_studio/think65/hotswap/hotswap.c | 71 ++++++++ .../gray_studio/think65/hotswap/hotswap.h | 35 ++++ .../gray_studio/think65/hotswap/info.json | 82 +++++++++ .../think65/hotswap/keymaps/default/config.h | 19 +++ .../think65/hotswap/keymaps/default/keymap.c | 34 ++++ .../think65/hotswap/keymaps/default/readme.md | 1 + .../gray_studio/think65/hotswap/readme.md | 15 ++ .../gray_studio/think65/hotswap/rules.mk | 40 +++++ keyboards/gray_studio/think65/solder/config.h | 73 ++++++++ .../gray_studio/think65/solder/info.json | 157 ++++++++++++++++++ .../think65/solder/keymaps/default/config.h | 19 +++ .../think65/solder/keymaps/default/keymap.c | 34 ++++ .../think65/solder/keymaps/default/readme.md | 1 + .../gray_studio/think65/solder/readme.md | 17 ++ keyboards/gray_studio/think65/solder/rules.mk | 40 +++++ keyboards/gray_studio/think65/solder/solder.c | 57 +++++++ keyboards/gray_studio/think65/solder/solder.h | 49 ++++++ 18 files changed, 816 insertions(+) create mode 100644 keyboards/gray_studio/think65/hotswap/config.h create mode 100644 keyboards/gray_studio/think65/hotswap/hotswap.c create mode 100644 keyboards/gray_studio/think65/hotswap/hotswap.h create mode 100644 keyboards/gray_studio/think65/hotswap/info.json create mode 100644 keyboards/gray_studio/think65/hotswap/keymaps/default/config.h create mode 100644 keyboards/gray_studio/think65/hotswap/keymaps/default/keymap.c create mode 100644 keyboards/gray_studio/think65/hotswap/keymaps/default/readme.md create mode 100644 keyboards/gray_studio/think65/hotswap/readme.md create mode 100644 keyboards/gray_studio/think65/hotswap/rules.mk create mode 100644 keyboards/gray_studio/think65/solder/config.h create mode 100644 keyboards/gray_studio/think65/solder/info.json create mode 100644 keyboards/gray_studio/think65/solder/keymaps/default/config.h create mode 100644 keyboards/gray_studio/think65/solder/keymaps/default/keymap.c create mode 100644 keyboards/gray_studio/think65/solder/keymaps/default/readme.md create mode 100644 keyboards/gray_studio/think65/solder/readme.md create mode 100644 keyboards/gray_studio/think65/solder/rules.mk create mode 100644 keyboards/gray_studio/think65/solder/solder.c create mode 100644 keyboards/gray_studio/think65/solder/solder.h diff --git a/keyboards/gray_studio/think65/hotswap/config.h b/keyboards/gray_studio/think65/hotswap/config.h new file mode 100644 index 000000000000..fc1734146da8 --- /dev/null +++ b/keyboards/gray_studio/think65/hotswap/config.h @@ -0,0 +1,72 @@ +/* +Copyright 2019 MechMerlin + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Gray Studio +#define PRODUCT THINK6.5 +#define DESCRIPTION 65% 6.5 degree custom keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 16 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { B0, B1, B2, B3, E6 } +#define MATRIX_COL_PINS { D1, D0, D2, D3, D5, D4, D6, D7, B4, B5, F0, F1, B6, F4, F5, F6 } + +#define DIODE_DIRECTION COL2ROW + +#define RGB_DI_PIN E2 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 22 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +/*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +#endif + +// generated by KBFirmware JSON to QMK Parser +// https://noroadsleft.github.io/kbf_qmk_converter/ \ No newline at end of file diff --git a/keyboards/gray_studio/think65/hotswap/hotswap.c b/keyboards/gray_studio/think65/hotswap/hotswap.c new file mode 100644 index 000000000000..07cdc8b1f73f --- /dev/null +++ b/keyboards/gray_studio/think65/hotswap/hotswap.c @@ -0,0 +1,71 @@ +/* Copyright 2019 MechMerlin + * + * 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 . + */ +#include "hotswap.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + setPinOutput(C6); + setPinOutput(C7); + setPinOutput(F7); + + 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 + + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinLow(C7); + } else { + writePinHigh(C7); + } + + if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { + writePinLow(C6); + } else { + writePinHigh(C6); + } + + if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { + writePinLow(F7); + } else { + writePinHigh(F7); + } + + led_set_user(usb_led); +} + diff --git a/keyboards/gray_studio/think65/hotswap/hotswap.h b/keyboards/gray_studio/think65/hotswap/hotswap.h new file mode 100644 index 000000000000..f6087e39e6a9 --- /dev/null +++ b/keyboards/gray_studio/think65/hotswap/hotswap.h @@ -0,0 +1,35 @@ +/* Copyright 2019 MechMerlin + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define LAYOUT_65_ansi_blocker( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0E, K0F, \ + K10, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, \ + K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2F, \ + K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, K3F, \ + K40, K41, K43, K46, K4A, K4B, K4D, K4E, K4F \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KC_NO, K0E, K0F }, \ + { K10, KC_NO, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \ + { K20, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO, K2F }, \ + { KC_NO, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, K3E, K3F }, \ + { K40, K41, KC_NO, K43, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, KC_NO, K4D, K4E, K4F }, \ +} + +// generated by KBFirmware JSON to QMK Parser +// https://noroadsleft.github.io/kbf_qmk_converter/ \ No newline at end of file diff --git a/keyboards/gray_studio/think65/hotswap/info.json b/keyboards/gray_studio/think65/hotswap/info.json new file mode 100644 index 000000000000..6047c4f4a2e3 --- /dev/null +++ b/keyboards/gray_studio/think65/hotswap/info.json @@ -0,0 +1,82 @@ +{ + "keyboard_name": "THINK6.5", + "url": "", + "maintainer": "qmk", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_65_ansi_blocker": { + "key_count": 67, + "layout": [ + {"label":"K00 (B0,D1)", "x":0, "y":0}, + {"label":"K01 (B0,D0)", "x":1, "y":0}, + {"label":"K02 (B0,D2)", "x":2, "y":0}, + {"label":"K03 (B0,D3)", "x":3, "y":0}, + {"label":"K04 (B0,D5)", "x":4, "y":0}, + {"label":"K05 (B0,D4)", "x":5, "y":0}, + {"label":"K06 (B0,D6)", "x":6, "y":0}, + {"label":"K07 (B0,D7)", "x":7, "y":0}, + {"label":"K08 (B0,B4)", "x":8, "y":0}, + {"label":"K09 (B0,B5)", "x":9, "y":0}, + {"label":"K0A (B0,F0)", "x":10, "y":0}, + {"label":"K0B (B0,F1)", "x":11, "y":0}, + {"label":"K0C (B0,B6)", "x":12, "y":0}, + {"label":"K0E (B0,F5)", "x":13, "y":0, "w":2}, + {"label":"K0F (B0,F6)", "x":15, "y":0}, + {"label":"K10 (B1,D1)", "x":0, "y":1, "w":1.5}, + {"label":"K12 (B1,D2)", "x":1.5, "y":1}, + {"label":"K13 (B1,D3)", "x":2.5, "y":1}, + {"label":"K14 (B1,D5)", "x":3.5, "y":1}, + {"label":"K15 (B1,D4)", "x":4.5, "y":1}, + {"label":"K16 (B1,D6)", "x":5.5, "y":1}, + {"label":"K17 (B1,D7)", "x":6.5, "y":1}, + {"label":"K18 (B1,B4)", "x":7.5, "y":1}, + {"label":"K19 (B1,B5)", "x":8.5, "y":1}, + {"label":"K1A (B1,F0)", "x":9.5, "y":1}, + {"label":"K1B (B1,F1)", "x":10.5, "y":1}, + {"label":"K1C (B1,B6)", "x":11.5, "y":1}, + {"label":"K1D (B1,F4)", "x":12.5, "y":1}, + {"label":"K1E (B1,F5)", "x":13.5, "y":1, "w":1.5}, + {"label":"K1F (B1,F6)", "x":15, "y":1}, + {"label":"K20 (B2,D1)", "x":0, "y":2, "w":1.75}, + {"label":"K22 (B2,D2)", "x":1.75, "y":2}, + {"label":"K23 (B2,D3)", "x":2.75, "y":2}, + {"label":"K24 (B2,D5)", "x":3.75, "y":2}, + {"label":"K25 (B2,D4)", "x":4.75, "y":2}, + {"label":"K26 (B2,D6)", "x":5.75, "y":2}, + {"label":"K27 (B2,D7)", "x":6.75, "y":2}, + {"label":"K28 (B2,B4)", "x":7.75, "y":2}, + {"label":"K29 (B2,B5)", "x":8.75, "y":2}, + {"label":"K2A (B2,F0)", "x":9.75, "y":2}, + {"label":"K2B (B2,F1)", "x":10.75, "y":2}, + {"label":"K2C (B2,B6)", "x":11.75, "y":2}, + {"label":"K2D (B2,F4)", "x":12.75, "y":2, "w":2.25}, + {"label":"K2F (B2,F6)", "x":15, "y":2}, + {"label":"K31 (B3,D0)", "x":0, "y":3, "w":2.25}, + {"label":"K32 (B3,D2)", "x":2.25, "y":3}, + {"label":"K33 (B3,D3)", "x":3.25, "y":3}, + {"label":"K34 (B3,D5)", "x":4.25, "y":3}, + {"label":"K35 (B3,D4)", "x":5.25, "y":3}, + {"label":"K36 (B3,D6)", "x":6.25, "y":3}, + {"label":"K37 (B3,D7)", "x":7.25, "y":3}, + {"label":"K38 (B3,B4)", "x":8.25, "y":3}, + {"label":"K39 (B3,B5)", "x":9.25, "y":3}, + {"label":"K3A (B3,F0)", "x":10.25, "y":3}, + {"label":"K3B (B3,F1)", "x":11.25, "y":3}, + {"label":"K3D (B3,F4)", "x":12.25, "y":3, "w":1.75}, + {"label":"K3E (B3,F5)", "x":14, "y":3}, + {"label":"K3F (B3,F6)", "x":15, "y":3}, + {"label":"K40 (E6,D1)", "x":0, "y":4, "w":1.25}, + {"label":"K41 (E6,D0)", "x":1.25, "y":4, "w":1.25}, + {"label":"K43 (E6,D3)", "x":2.5, "y":4, "w":1.25}, + {"label":"K46 (E6,D6)", "x":3.75, "y":4, "w":6.25}, + {"label":"K4A (E6,F0)", "x":10, "y":4, "w":1.25}, + {"label":"K4B (E6,F1)", "x":11.25, "y":4, "w":1.25}, + {"label":"K4D (E6,F4)", "x":13, "y":4}, + {"label":"K4E (E6,F5)", "x":14, "y":4}, + {"label":"K4F (E6,F6)", "x":15, "y":4} + ] + } + } + ,"meta": "https://noroadsleft.github.io/kbf_qmk_converter/" +} \ No newline at end of file diff --git a/keyboards/gray_studio/think65/hotswap/keymaps/default/config.h b/keyboards/gray_studio/think65/hotswap/keymaps/default/config.h new file mode 100644 index 000000000000..26c6d6ade101 --- /dev/null +++ b/keyboards/gray_studio/think65/hotswap/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 MechMerlin + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/gray_studio/think65/hotswap/keymaps/default/keymap.c b/keyboards/gray_studio/think65/hotswap/keymaps/default/keymap.c new file mode 100644 index 000000000000..187f68c5c020 --- /dev/null +++ b/keyboards/gray_studio/think65/hotswap/keymaps/default/keymap.c @@ -0,0 +1,34 @@ +/* Copyright 2019 MechMerlin + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_65_ansi_blocker( + 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_DEL, + 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_HOME, + 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_PGUP, + 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_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_65_ansi_blocker( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +}; diff --git a/keyboards/gray_studio/think65/hotswap/keymaps/default/readme.md b/keyboards/gray_studio/think65/hotswap/keymaps/default/readme.md new file mode 100644 index 000000000000..438e10e2910a --- /dev/null +++ b/keyboards/gray_studio/think65/hotswap/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for think65 diff --git a/keyboards/gray_studio/think65/hotswap/readme.md b/keyboards/gray_studio/think65/hotswap/readme.md new file mode 100644 index 000000000000..1dee91509a7b --- /dev/null +++ b/keyboards/gray_studio/think65/hotswap/readme.md @@ -0,0 +1,15 @@ +# Think6.5 Hotswap + +65% board with 6.5 degree angle ran by Airpotter and Oldcat. PCB Manufactured by DEMO Studio and Keyboard manufactured by Gray Studio. + +Keyboard Maintainer: [MechMerlin](/~https://github.com/mechmerlin) +Hardware Supported: Think6.5 Hotswap PCB +Hardware Availability: [Geekhack GB](https://geekhack.org/index.php?topic=100166.0) + +**Note:** The `LAYOUT_65_ansi_blocker` LAYOUT macro utilizes the same pins and switch matrix as the soldered (compatible) version. Any firmware made with this LAYOUT macro can be flashed on both the Solder (Compatible) version and the Hotswap version of the Think6.5. + +Make example for this keyboard (after setting up your build environment): + + make gray_studio/think65/hotswap:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/gray_studio/think65/hotswap/rules.mk b/keyboards/gray_studio/think65/hotswap/rules.mk new file mode 100644 index 000000000000..2d789ff59a66 --- /dev/null +++ b/keyboards/gray_studio/think65/hotswap/rules.mk @@ -0,0 +1,40 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs + +LINK_TIME_OPTIMIZATION_ENABLE = yes + +LAYOUTS = 65_ansi_blocker + +# generated by KBFirmware JSON to QMK Parser +# https://noroadsleft.github.io/kbf_qmk_converter/ diff --git a/keyboards/gray_studio/think65/solder/config.h b/keyboards/gray_studio/think65/solder/config.h new file mode 100644 index 000000000000..cc8892a1167c --- /dev/null +++ b/keyboards/gray_studio/think65/solder/config.h @@ -0,0 +1,73 @@ +/* +Copyright 2019 MechMerlin + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Gray Studio +#define PRODUCT THINK6.5 +#define DESCRIPTION 65% 6.5 degree custom keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 16 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ + // 0 1 2 3 4 5 6 7 8 9 A B C D E F +#define MATRIX_ROW_PINS { B0, B1, B2, B3, E6 } +#define MATRIX_COL_PINS { D1, D0, D2, D3, D5, D4, D6, D7, B4, B5, F0, F1, B6, F4, F5, F6 } + +#define DIODE_DIRECTION COL2ROW + +#define RGB_DI_PIN E2 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 22 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +/*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +#endif + +// generated by KBFirmware JSON to QMK Parser +// https://noroadsleft.github.io/kbf_qmk_converter/ \ No newline at end of file diff --git a/keyboards/gray_studio/think65/solder/info.json b/keyboards/gray_studio/think65/solder/info.json new file mode 100644 index 000000000000..0be5042538c9 --- /dev/null +++ b/keyboards/gray_studio/think65/solder/info.json @@ -0,0 +1,157 @@ +{ + "keyboard_name": "THINK6.5", + "url": "", + "maintainer": "qmk", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_65_ansi_blocker": { + "key_count": 67, + "layout": [ + {"label":"K00 (B0,D1)", "x":0, "y":0}, + {"label":"K01 (B0,D0)", "x":1, "y":0}, + {"label":"K02 (B0,D2)", "x":2, "y":0}, + {"label":"K03 (B0,D3)", "x":3, "y":0}, + {"label":"K04 (B0,D5)", "x":4, "y":0}, + {"label":"K05 (B0,D4)", "x":5, "y":0}, + {"label":"K06 (B0,D6)", "x":6, "y":0}, + {"label":"K07 (B0,D7)", "x":7, "y":0}, + {"label":"K08 (B0,B4)", "x":8, "y":0}, + {"label":"K09 (B0,B5)", "x":9, "y":0}, + {"label":"K0A (B0,F0)", "x":10, "y":0}, + {"label":"K0B (B0,F1)", "x":11, "y":0}, + {"label":"K0C (B0,B6)", "x":12, "y":0}, + {"label":"K0E (B0,F5)", "x":13, "y":0, "w":2}, + {"label":"K0F (B0,F6)", "x":15, "y":0}, + {"label":"K10 (B1,D1)", "x":0, "y":1, "w":1.5}, + {"label":"K12 (B1,D2)", "x":1.5, "y":1}, + {"label":"K13 (B1,D3)", "x":2.5, "y":1}, + {"label":"K14 (B1,D5)", "x":3.5, "y":1}, + {"label":"K15 (B1,D4)", "x":4.5, "y":1}, + {"label":"K16 (B1,D6)", "x":5.5, "y":1}, + {"label":"K17 (B1,D7)", "x":6.5, "y":1}, + {"label":"K18 (B1,B4)", "x":7.5, "y":1}, + {"label":"K19 (B1,B5)", "x":8.5, "y":1}, + {"label":"K1A (B1,F0)", "x":9.5, "y":1}, + {"label":"K1B (B1,F1)", "x":10.5, "y":1}, + {"label":"K1C (B1,B6)", "x":11.5, "y":1}, + {"label":"K1D (B1,F4)", "x":12.5, "y":1}, + {"label":"K1E (B1,F5)", "x":13.5, "y":1, "w":1.5}, + {"label":"K1F (B1,F6)", "x":15, "y":1}, + {"label":"K20 (B2,D1)", "x":0, "y":2, "w":1.75}, + {"label":"K22 (B2,D2)", "x":1.75, "y":2}, + {"label":"K23 (B2,D3)", "x":2.75, "y":2}, + {"label":"K24 (B2,D5)", "x":3.75, "y":2}, + {"label":"K25 (B2,D4)", "x":4.75, "y":2}, + {"label":"K26 (B2,D6)", "x":5.75, "y":2}, + {"label":"K27 (B2,D7)", "x":6.75, "y":2}, + {"label":"K28 (B2,B4)", "x":7.75, "y":2}, + {"label":"K29 (B2,B5)", "x":8.75, "y":2}, + {"label":"K2A (B2,F0)", "x":9.75, "y":2}, + {"label":"K2B (B2,F1)", "x":10.75, "y":2}, + {"label":"K2C (B2,B6)", "x":11.75, "y":2}, + {"label":"K2D (B2,F4)", "x":12.75, "y":2, "w":2.25}, + {"label":"K2F (B2,F6)", "x":15, "y":2}, + {"label":"K31 (B3,D0)", "x":0, "y":3, "w":2.25}, + {"label":"K32 (B3,D2)", "x":2.25, "y":3}, + {"label":"K33 (B3,D3)", "x":3.25, "y":3}, + {"label":"K34 (B3,D5)", "x":4.25, "y":3}, + {"label":"K35 (B3,D4)", "x":5.25, "y":3}, + {"label":"K36 (B3,D6)", "x":6.25, "y":3}, + {"label":"K37 (B3,D7)", "x":7.25, "y":3}, + {"label":"K38 (B3,B4)", "x":8.25, "y":3}, + {"label":"K39 (B3,B5)", "x":9.25, "y":3}, + {"label":"K3A (B3,F0)", "x":10.25, "y":3}, + {"label":"K3B (B3,F1)", "x":11.25, "y":3}, + {"label":"K3D (B3,F4)", "x":12.25, "y":3, "w":1.75}, + {"label":"K3E (B3,F5)", "x":14, "y":3}, + {"label":"K3F (B3,F6)", "x":15, "y":3}, + {"label":"K40 (E6,D1)", "x":0, "y":4, "w":1.25}, + {"label":"K41 (E6,D0)", "x":1.25, "y":4, "w":1.25}, + {"label":"K43 (E6,D3)", "x":2.5, "y":4, "w":1.25}, + {"label":"K46 (E6,D6)", "x":3.75, "y":4, "w":6.25}, + {"label":"K4A (E6,F0)", "x":10, "y":4, "w":1.25}, + {"label":"K4B (E6,F1)", "x":11.25, "y":4, "w":1.25}, + {"label":"K4D (E6,F4)", "x":13, "y":4}, + {"label":"K4E (E6,F5)", "x":14, "y":4}, + {"label":"K4F (E6,F6)", "x":15, "y":4} + ] + }, + + "LAYOUT_all": { + "key_count": 69, + "layout": [ + {"label":"K00 (B0,D1)", "x":0, "y":0}, + {"label":"K01 (B0,D0)", "x":1, "y":0}, + {"label":"K02 (B0,D2)", "x":2, "y":0}, + {"label":"K03 (B0,D3)", "x":3, "y":0}, + {"label":"K04 (B0,D5)", "x":4, "y":0}, + {"label":"K05 (B0,D4)", "x":5, "y":0}, + {"label":"K06 (B0,D6)", "x":6, "y":0}, + {"label":"K07 (B0,D7)", "x":7, "y":0}, + {"label":"K08 (B0,B4)", "x":8, "y":0}, + {"label":"K09 (B0,B5)", "x":9, "y":0}, + {"label":"K0A (B0,F0)", "x":10, "y":0}, + {"label":"K0B (B0,F1)", "x":11, "y":0}, + {"label":"K0C (B0,B6)", "x":12, "y":0}, + {"label":"K0D (B0,F4)", "x":13, "y":0}, + {"label":"K0E (B0,F5)", "x":14, "y":0}, + {"label":"K0F (B0,F6)", "x":15, "y":0}, + {"label":"K10 (B1,D1)", "x":0, "y":1, "w":1.5}, + {"label":"K12 (B1,D2)", "x":1.5, "y":1}, + {"label":"K13 (B1,D3)", "x":2.5, "y":1}, + {"label":"K14 (B1,D5)", "x":3.5, "y":1}, + {"label":"K15 (B1,D4)", "x":4.5, "y":1}, + {"label":"K16 (B1,D6)", "x":5.5, "y":1}, + {"label":"K17 (B1,D7)", "x":6.5, "y":1}, + {"label":"K18 (B1,B4)", "x":7.5, "y":1}, + {"label":"K19 (B1,B5)", "x":8.5, "y":1}, + {"label":"K1A (B1,F0)", "x":9.5, "y":1}, + {"label":"K1B (B1,F1)", "x":10.5, "y":1}, + {"label":"K1C (B1,B6)", "x":11.5, "y":1}, + {"label":"K1D (B1,F4)", "x":12.5, "y":1}, + {"label":"K1E (B1,F5)", "x":13.5, "y":1, "w":1.5}, + {"label":"K1F (B1,F6)", "x":15, "y":1}, + {"label":"K20 (B2,D1)", "x":0, "y":2, "w":1.75}, + {"label":"K22 (B2,D2)", "x":1.75, "y":2}, + {"label":"K23 (B2,D3)", "x":2.75, "y":2}, + {"label":"K24 (B2,D5)", "x":3.75, "y":2}, + {"label":"K25 (B2,D4)", "x":4.75, "y":2}, + {"label":"K26 (B2,D6)", "x":5.75, "y":2}, + {"label":"K27 (B2,D7)", "x":6.75, "y":2}, + {"label":"K28 (B2,B4)", "x":7.75, "y":2}, + {"label":"K29 (B2,B5)", "x":8.75, "y":2}, + {"label":"K2A (B2,F0)", "x":9.75, "y":2}, + {"label":"K2B (B2,F1)", "x":10.75, "y":2}, + {"label":"K2C (B2,B6)", "x":11.75, "y":2}, + {"label":"K2D (B2,F4)", "x":12.75, "y":2, "w":2.25}, + {"label":"K2F (B2,F6)", "x":15, "y":2}, + {"label":"K30 (B3,D1)", "x":0, "y":3, "w":1.25}, + {"label":"K31 (B3,D0)", "x":1.25, "y":3}, + {"label":"K32 (B3,D2)", "x":2.25, "y":3}, + {"label":"K33 (B3,D3)", "x":3.25, "y":3}, + {"label":"K34 (B3,D5)", "x":4.25, "y":3}, + {"label":"K35 (B3,D4)", "x":5.25, "y":3}, + {"label":"K36 (B3,D6)", "x":6.25, "y":3}, + {"label":"K37 (B3,D7)", "x":7.25, "y":3}, + {"label":"K38 (B3,B4)", "x":8.25, "y":3}, + {"label":"K39 (B3,B5)", "x":9.25, "y":3}, + {"label":"K3A (B3,F0)", "x":10.25, "y":3}, + {"label":"K3B (B3,F1)", "x":11.25, "y":3}, + {"label":"K3D (B3,F4)", "x":12.25, "y":3, "w":1.75}, + {"label":"K3E (B3,F5)", "x":14, "y":3}, + {"label":"K3F (B3,F6)", "x":15, "y":3}, + {"label":"K40 (E6,D1)", "x":0, "y":4, "w":1.25}, + {"label":"K41 (E6,D0)", "x":1.25, "y":4, "w":1.25}, + {"label":"K43 (E6,D3)", "x":2.5, "y":4, "w":1.25}, + {"label":"K46 (E6,D6)", "x":3.75, "y":4, "w":6.25}, + {"label":"K4A (E6,F0)", "x":10, "y":4, "w":1.25}, + {"label":"K4B (E6,F1)", "x":11.25, "y":4, "w":1.25}, + {"label":"K4D (E6,F4)", "x":13, "y":4}, + {"label":"K4E (E6,F5)", "x":14, "y":4}, + {"label":"K4F (E6,F6)", "x":15, "y":4} + ] + } + } + ,"meta": "https://noroadsleft.github.io/kbf_qmk_converter/" +} \ No newline at end of file diff --git a/keyboards/gray_studio/think65/solder/keymaps/default/config.h b/keyboards/gray_studio/think65/solder/keymaps/default/config.h new file mode 100644 index 000000000000..26c6d6ade101 --- /dev/null +++ b/keyboards/gray_studio/think65/solder/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 MechMerlin + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/gray_studio/think65/solder/keymaps/default/keymap.c b/keyboards/gray_studio/think65/solder/keymaps/default/keymap.c new file mode 100644 index 000000000000..187f68c5c020 --- /dev/null +++ b/keyboards/gray_studio/think65/solder/keymaps/default/keymap.c @@ -0,0 +1,34 @@ +/* Copyright 2019 MechMerlin + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_65_ansi_blocker( + 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_DEL, + 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_HOME, + 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_PGUP, + 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_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_65_ansi_blocker( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +}; diff --git a/keyboards/gray_studio/think65/solder/keymaps/default/readme.md b/keyboards/gray_studio/think65/solder/keymaps/default/readme.md new file mode 100644 index 000000000000..438e10e2910a --- /dev/null +++ b/keyboards/gray_studio/think65/solder/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for think65 diff --git a/keyboards/gray_studio/think65/solder/readme.md b/keyboards/gray_studio/think65/solder/readme.md new file mode 100644 index 000000000000..e8636bf8ae3d --- /dev/null +++ b/keyboards/gray_studio/think65/solder/readme.md @@ -0,0 +1,17 @@ +# Think6.5 Solder (Compatible) + +65% board with 6.5 degree angle ran by Airpotter and Oldcat. PCB Manufactured by DEMO Studio and Keyboard manufactured by Gray Studio. + +Keyboard Maintainer: [MechMerlin](/~https://github.com/mechmerlin) +Hardware Supported: Think6.5 Compatible PCB +Hardware Availability: [Geekhack GB](https://geekhack.org/index.php?topic=100166.0) + +**Note:** The `LAYOUT_65_ansi_blocker` LAYOUT macro utilizes the same pins and switch matrix as the hotswap version. Any firmware made with this LAYOUT macro can be flashed on both the Solder (Compatible) version and the Hotswap version of the Think6.5. + +**Indicator LEDs:** The solder PCB ONLY supports Caps Lock LEDs unlike the Hotswap version that supports Num Lock, Caps Lock, and Scroll Lock. + +Make example for this keyboard (after setting up your build environment): + + make gray_studio/think65/solder:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/gray_studio/think65/solder/rules.mk b/keyboards/gray_studio/think65/solder/rules.mk new file mode 100644 index 000000000000..2d789ff59a66 --- /dev/null +++ b/keyboards/gray_studio/think65/solder/rules.mk @@ -0,0 +1,40 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs + +LINK_TIME_OPTIMIZATION_ENABLE = yes + +LAYOUTS = 65_ansi_blocker + +# generated by KBFirmware JSON to QMK Parser +# https://noroadsleft.github.io/kbf_qmk_converter/ diff --git a/keyboards/gray_studio/think65/solder/solder.c b/keyboards/gray_studio/think65/solder/solder.c new file mode 100644 index 000000000000..4f40fb4a9289 --- /dev/null +++ b/keyboards/gray_studio/think65/solder/solder.c @@ -0,0 +1,57 @@ +/* Copyright 2019 MechMerlin + * + * 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 . + */ +#include "solder.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + setPinOutput(C7); + + 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 + + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinLow(C7); + } else { + writePinHigh(C7); + } + + led_set_user(usb_led); +} + diff --git a/keyboards/gray_studio/think65/solder/solder.h b/keyboards/gray_studio/think65/solder/solder.h new file mode 100644 index 000000000000..b77cc578b110 --- /dev/null +++ b/keyboards/gray_studio/think65/solder/solder.h @@ -0,0 +1,49 @@ +/* Copyright 2019 MechMerlin + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define LAYOUT_all( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \ + K10, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, \ + K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2F, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, K3F, \ + K40, K41, K43, K46, K4A, K4B, K4D, K4E, K4F \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \ + { K10, KC_NO, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \ + { K20, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO, K2F }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, K3E, K3F }, \ + { K40, K41, KC_NO, K43, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, KC_NO, K4D, K4E, K4F }, \ +} + +#define LAYOUT_65_ansi_blocker( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0E, K0F, \ + K10, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, \ + K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2F, \ + K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, K3F, \ + K40, K41, K43, K46, K4A, K4B, K4D, K4E, K4F \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KC_NO, K0E, K0F }, \ + { K10, KC_NO, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \ + { K20, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO, K2F }, \ + { KC_NO, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, K3E, K3F }, \ + { K40, K41, KC_NO, K43, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, KC_NO, K4D, K4E, K4F }, \ +} + +// generated by KBFirmware JSON to QMK Parser +// https://noroadsleft.github.io/kbf_qmk_converter/ \ No newline at end of file From 674fcc474c162f44fadfa8a796134751d80ee639 Mon Sep 17 00:00:00 2001 From: kuchosauronad0 <22005492+kuchosauronad0@users.noreply.github.com> Date: Tue, 29 Oct 2019 22:52:24 -0700 Subject: [PATCH 223/316] [Keymap] Update to Userspace kuchosauronad0 (#6899) * Add Plover layer, remove unused layers * Add rgb indicator for success/failed sequences * Add RGB effects * Add RGB * Add effects for start and end of a leader sequence * Add PLOVER layer * Add RGB * Add RBG * Minor clean up * Minor clean up * Minor clean up * Minor clean up * Rename rgb_light to rgblight_user and fix all references to it * Remove unnecessary guards Remove unnecessary matrix_scan in rgb post_init function * remove trailing newline --- users/kuchosauronad0/config.h | 80 ++++++------- users/kuchosauronad0/kuchosauronad0.c | 13 ++- users/kuchosauronad0/kuchosauronad0.h | 74 ++++++------ users/kuchosauronad0/leader.c | 97 ++++++++++----- users/kuchosauronad0/process_records.c | 4 +- users/kuchosauronad0/process_records.h | 89 +++++++------- users/kuchosauronad0/rgblight_user.c | 156 +++++++++++++++++++++++++ users/kuchosauronad0/rgblight_user.h | 23 ++++ users/kuchosauronad0/rules.mk | 8 +- users/kuchosauronad0/wrappers.h | 152 ++++++++++++------------ 10 files changed, 459 insertions(+), 237 deletions(-) create mode 100644 users/kuchosauronad0/rgblight_user.c create mode 100644 users/kuchosauronad0/rgblight_user.h diff --git a/users/kuchosauronad0/config.h b/users/kuchosauronad0/config.h index b2c63c1e0c84..b06c9e2c5627 100644 --- a/users/kuchosauronad0/config.h +++ b/users/kuchosauronad0/config.h @@ -1,61 +1,62 @@ #pragma once #ifdef AUDIO_ENABLE - #define AUDIO_CLICKY - #define STARTUP_SONG SONG(RICK_ROLL) - #define GOODBYE_SONG SONG(SONIC_RING) - #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ - SONG(COLEMAK_SOUND), \ - SONG(DVORAK_SOUND), \ - SONG(OVERWATCH_THEME) \ - } - #define AUDIO_CLICKY_FREQ_RANDOMNESS 1.5f - // #ifdef RGBLIGHT_ENABLE - // #define NO_MUSIC_MODE - // #endif //RGBLIGHT_ENABLE/ - // #ifndef __arm__ - // #undef NOTE_REST - // #define NOTE_REST 1.00f - // #endif // !__arm__ - #define UNICODE_SONG_OSX SONG(RICK_ROLL) - #define UNICODE_SONG_LNX SONG(RICK_ROLL) - #define UNICODE_SONG_WIN SONG(RICK_ROLL) - #define UNICODE_SONG_BSD SONG(RICK_ROLL) - #define UNICODE_SONG_WINC SONG(RICK_ROLL) +# define DEFAULT_LAYER_SONGS \ + { SONG(QWERTY_SOUND), SONG(COLEMAK_SOUND), SONG(DVORAK_SOUND), SONG(PLOVER_SOUND) } +# define AUDIO_CLICKY +# define STARTUP_SONG SONG(RICK_ROLL) +# define GOODBYE_SONG SONG(SONIC_RING) +# define AUDIO_CLICKY_FREQ_RANDOMNESS 1.5f +# ifndef __arm__ +# undef NOTE_REST +# define NOTE_REST 1.00f +# endif // !__arm__ +# define UNICODE_SONG_OSX SONG(RICK_ROLL) +# define UNICODE_SONG_LNX SONG(RICK_ROLL) +# define UNICODE_SONG_WIN SONG(RICK_ROLL) +# define UNICODE_SONG_BSD SONG(RICK_ROLL) +# define UNICODE_SONG_WINC SONG(RICK_ROLL) #endif // !AUDIO_ENABLE #ifdef RGBLIGHT_ENABLE - #define RGBLIGHT_SLEEP - #undef RGBLIGHT_ANIMATIONS - #define RGBLIGHT_EFFECT_BREATHING - #define RGBLIGHT_EFFECT_SNAKE - #define RGBLIGHT_EFFECT_KNIGHT +# define RGBLIGHT_SLEEP +# undef RGBLIGHT_ANIMATIONS +# define RGBLIGHT_HUE_STEP 16 +# define RGBLIGHT_SAT_STEP 16 +# define RGBLIGHT_VAL_STEP 16 +# define RGBLIGHT_LIMIT_VAL 255 +# define RGBLIGHT_EFFECT_BREATHING +# define RGBLIGHT_EFFECT_STATIC_GRADIENT +//# define RGBLIGHT_EFFECT_KNIGHT +//# define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2 +//# define RGBLIGHT_EFFECT_SNAKE +//# define RGBLIGHT_EFFECT_SNAKE_LENGTH 2 #endif // !RGBLIGHT_ENABLE #ifndef ONESHOT_TAP_TOGGLE - #define ONESHOT_TAP_TOGGLE 2 +# define ONESHOT_TAP_TOGGLE 2 #endif // !ONESHOT_TAP_TOGGLE #ifndef ONESHOT_TIMEOUT - #define ONESHOT_TIMEOUT 3000 +# define ONESHOT_TIMEOUT 3000 #endif// !ONESHOT_TIMEOUT #ifndef QMK_KEYS_PER_SCAN - #define QMK_KEYS_PER_SCAN 4 +# define QMK_KEYS_PER_SCAN 4 #endif // !QMK_KEYS_PER_SCAN #if defined(LEADER_ENABLE) - #define LEADER_PER_KEY_TIMING - #define LEADER_TIMEOUT 250 +# define LEADER_PER_KEY_TIMING +# define LEADER_TIMEOUT 250 #endif // !LEADER_ENABLE #if defined(COMBO_ENABLE) - #define COMBO_COUNT 4 - #define COMBO_TERM 150 +# define COMBO_COUNT 4 +# define COMBO_TERM 150 #endif // !COMBO_ENABLE #if defined(NKRO_ENABLE) - #define FORCE_NKRO +# define FORCE_NKRO #endif // !NKRO_ENABLE // this makes it possible to do rolling combos (zx) with keys that @@ -68,18 +69,18 @@ //#define RETRO_TAPPING #ifndef TAPPING_TOGGLE - #define TAPPING_TOGGLE 1 +# define TAPPING_TOGGLE 1 #endif #ifdef TAPPING_TERM - #undef TAPPING_TERM +# undef TAPPING_TERM #endif // !TAPPING_TERM #if defined(KEYBOARD_handwired_kuchosauronad0_planckenstein) - #define TAPPING_TERM 185 +# define TAPPING_TERM 185 #elif defined(KEYBOARD_c39) - #define TAPPING_TERM 200 +# define TAPPING_TERM 200 #else - #define TAPPING_TERM 180 +# define TAPPING_TERM 180 #endif @@ -87,4 +88,3 @@ #define MACRO_TIMER 5 - diff --git a/users/kuchosauronad0/kuchosauronad0.c b/users/kuchosauronad0/kuchosauronad0.c index 21e74a0fae29..6c38d0f10606 100644 --- a/users/kuchosauronad0/kuchosauronad0.c +++ b/users/kuchosauronad0/kuchosauronad0.c @@ -19,10 +19,9 @@ along with this program. If not, see . userspace_config_t userspace_config; #if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE)) - #define KUCHOSAURONAD0_UNICODE_MODE UC_WINC +# define KUCHOSAURONAD0_UNICODE_MODE UC_WINC #else - // set to 2 for UC_WIN, set to 4 for UC_WINC - #define KUCHOSAURONAD0_UNICODE_MODE 2 +# define KUCHOSAURONAD0_UNICODE_MODE 2 // set to 2 for UC_WIN, set to 4 for UC_WINC #endif @@ -70,7 +69,7 @@ void shutdown_user (void) { #ifdef RGBLIGHT_ENABLE rgblight_enable_noeeprom(); rgblight_mode_noeeprom(1); - rgblight_setrgb_red(); + rgblight_setrgb_teal(); #endif // RGBLIGHT_ENABLE #ifdef RGB_MATRIX_ENABLE // uint16_t timer_start = timer_read(); @@ -108,11 +107,11 @@ void matrix_scan_user(void){ #ifdef TAP_DANCE_ENABLE // Run Diablo 3 macro checking code. // run_diablo_macro_check(); -#endif // TAP_DANCE_ENABLE +#endif // !TAP_DANCE_ENABLE #ifdef RGBLIGHT_ENABLE matrix_scan_rgb(); -#endif // RGBLIGHT_ENABLE +#endif // !RGBLIGHT_ENABLE matrix_scan_keymap(); } @@ -171,6 +170,8 @@ void eeconfig_init_user(void) { #else eeprom_update_byte(EECONFIG_UNICODEMODE, KUCHOSAURONAD0_UNICODE_MODE); #endif + eeconfig_init_keymap(); + keyboard_init(); } // TMUX stuff diff --git a/users/kuchosauronad0/kuchosauronad0.h b/users/kuchosauronad0/kuchosauronad0.h index 9ea2673dab1a..da996457c61f 100644 --- a/users/kuchosauronad0/kuchosauronad0.h +++ b/users/kuchosauronad0/kuchosauronad0.h @@ -1,7 +1,4 @@ -#ifndef USERSPACE -#define USERSPACE - -//#pragma once +#pragma once #include "quantum.h" @@ -11,23 +8,25 @@ #include "process_records.h" #ifdef TAP_DANCE_ENABLE - #include "tap_dances.h" - #define KC_TMX TD(TD_TMX) // tap1: 't' tap2: +b - #define KC_EOL TD(TD_EOL) // tap1: 'e' tap2: +e - #define KC_BOL TD(TD_BOL) // tap1: 'a' tap2: +a - #define KC_NW TD(TD_NW) // tap1: 'f' tap2: +f - #define KC_PW TD(TD_PW) // tap1: 'b' tap2: +b - #define KC_DW TD(TD_DW) // tap1: 'w' tap2: +w +# include "tap_dances.h" +# define KC_TMX TD(TD_TMX) // tap1: 't' tap2: +b +# define KC_EOL TD(TD_EOL) // tap1: 'e' tap2: +e +# define KC_BOL TD(TD_BOL) // tap1: 'a' tap2: +a +# define KC_NW TD(TD_NW) // tap1: 'f' tap2: +f +# define KC_PW TD(TD_PW) // tap1: 'b' tap2: +b +# define KC_DW TD(TD_DW) // tap1: 'w' tap2: +w #endif //!TAP_DANCE_ENABLE + #if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) - #include "rgb_stuff.h" +# include "rgblight_user.h" #endif + #if defined(UNICODEMAP_ENABLE) || defined(UNICODE_ENABLE) - #include "unicode.h" +# include "unicode.h" #endif //!UNICODE_ENABLE // Keycode aliases -#define TM_X LCTL(KC_B) // Tmux control sequence +#define TM_X LCTL(KC_B) // Tmux leader key // Unix QoL macros #define MC_BOL LCTL(KC_A) // jump to beginning of line #define MC_EOL LCTL(KC_E) // jump to end of line @@ -42,10 +41,11 @@ enum userspace_layers { _COLEMAK, _DVORAK, _WORKMAN, - _NORMAN, +/* _NORMAN, _MALTRON, _EUCALYN, - _CARPLAX, + _CARPLAX, */ + _PLOVER, _UNICODE, _MODS, /* layer 8 now 9*/ _GAMEPAD, @@ -57,18 +57,18 @@ enum userspace_layers { _ADJUST, }; -bool mod_key_press_timer (uint16_t code, uint16_t mod_code, bool pressed); -bool mod_key_press (uint16_t code, uint16_t mod_code, bool pressed, uint16_t this_timer); -bool send_game_macro(const char *str, keyrecord_t *record, bool override); -void matrix_init_keymap(void); -void shutdown_keymap(void); -void suspend_power_down_keymap(void); -void suspend_wakeup_init_keymap(void); -void matrix_scan_keymap(void); +bool mod_key_press_timer (uint16_t code, uint16_t mod_code, bool pressed); +bool mod_key_press (uint16_t code, uint16_t mod_code, bool pressed, uint16_t this_timer); +bool send_game_macro(const char *str, keyrecord_t *record, bool override); +void matrix_init_keymap(void); +void shutdown_keymap(void); +void suspend_power_down_keymap(void); +void suspend_wakeup_init_keymap(void); +void matrix_scan_keymap(void); uint32_t layer_state_set_keymap (uint32_t state); uint32_t default_layer_state_set_keymap (uint32_t state); -void led_set_keymap(uint8_t usb_led); -void eeconfig_init_keymap(void); +void led_set_keymap(uint8_t usb_led); +void eeconfig_init_keymap(void); void tmux_prefix(void); void tmux_pane_zoom(void); @@ -95,17 +95,15 @@ But since TD() doesn't work when tap dance is disabled We use custom codes here, so we can substitute the right stuff */ #ifdef TAP_DANCE_ENABLE -#define KC_D3_1 TD(TD_D3_1) -#define KC_D3_2 TD(TD_D3_2) -#define KC_D3_3 TD(TD_D3_3) -#define KC_D3_4 TD(TD_D3_4) -#else // TAP_DANCE_ENABLE -#define KC_D3_1 KC_1 -#define KC_D3_2 KC_2 -#define KC_D3_3 KC_3 -#define KC_D3_4 KC_4 -#endif // TAP_DANCE_ENABLE - -#endif // !USERSPACE +# define KC_D3_1 TD(TD_D3_1) +# define KC_D3_2 TD(TD_D3_2) +# define KC_D3_3 TD(TD_D3_3) +# define KC_D3_4 TD(TD_D3_4) +#else +# define KC_D3_1 KC_1 +# define KC_D3_2 KC_2 +# define KC_D3_3 KC_3 +# define KC_D3_4 KC_4 +#endif // !TAP_DANCE_ENABLE /* vi: ft=c:tw=80:sw=2:ts=2:sts=2:et */ diff --git a/users/kuchosauronad0/leader.c b/users/kuchosauronad0/leader.c index 58935abb3c4e..22674eef055a 100644 --- a/users/kuchosauronad0/leader.c +++ b/users/kuchosauronad0/leader.c @@ -1,77 +1,116 @@ #include "leader.h" +#ifdef RGBLIGHT_ENABLE +extern rgblight_config_t rgblight_config; +#endif +bool leader_succeed; LEADER_EXTERNS(); -void matrix_scan_user(void){ +void matrix_scan_user(void) { static bool has_ran_yet; if (!has_ran_yet) { has_ran_yet = true; startup_user(); } - #ifdef TAP_DANCE_ENABLE // Run Diablo 3 macro checking code. // run_diablo_macro_check(); -#endif // TAP_DANCE_ENABLE - +#endif #ifdef RGBLIGHT_ENABLE matrix_scan_rgb(); -#endif // RGBLIGHT_ENABLE - +#endif LEADER_DICTIONARY() { - leading = false; - leader_end(); + leader_succeed = leading = false; SEQ_ONE_KEY(KC_W) { // vim/tmux: Use in command mode in vim: write to file, switch tmux pane in the current session window and repeat the last command SEND_STRING(":w" SS_TAP(X_ENTER)); tmux_pane_switch_repeat(); - } - + leader_succeed = true; + } else SEQ_ONE_KEY(KC_T) { // Send the Tmux Prefix tmux_prefix(); - } - + leader_succeed = true; + } else SEQ_ONE_KEY(KC_A) { // tmux: Send the prefix and press 'right' arrow tmux_prefix(); tap_code(KC_RIGHT); - } - + leader_succeed = true; + } else SEQ_TWO_KEYS(KC_T, KC_T) { // tmux: Send the prefix to a nested session tmux_prefix(); tmux_prefix(); - } + leader_succeed = true; + } else SEQ_TWO_KEYS(KC_T, KC_R) { // tmux: Switch pane and repeat last action tmux_pane_switch_repeat(); - } - + leader_succeed = true; + } else SEQ_TWO_KEYS(KC_V, KC_Z){ // vim: Zoom pane tap_code16(LCTL(KC_W)); tap_code16(LSFT(KC_BSLS)); - } - + leader_succeed = true; + } else SEQ_TWO_KEYS(KC_V, KC_R) { // vim: Substitute and place cursor SEND_STRING(":%s///g" SS_TAP(X_LEFT)); tap_code(KC_LEFT); tap_code(KC_LEFT); - } - + leader_succeed = true; + } else SEQ_TWO_KEYS(KC_V, KC_T) { - // vim: move current pane to new tab - tap_code16(LCTL(KC_W)); - tap_code16(LSFT(KC_T)); - } - + // vim: move current pane to new tab + tap_code16(LCTL(KC_W)); + tap_code16(LSFT(KC_T)); + leader_succeed = true; + } else + SEQ_ONE_KEY(KC_R){ + // Toggle RGB Layer indicator + tap_code16(KC_RGB_T); + leader_succeed = true; + } else + SEQ_ONE_KEY(KC_SPC){ + // One Shot Unicode layer +//TODO tap_code16(OS_UNI); + leader_succeed = true; + } else + SEQ_TWO_KEYS(KC_SPC, KC_SPC){ + // Toggle _MODS + tap_code16(TG_MODS); + leader_succeed = true; + } else SEQ_THREE_KEYS(KC_BSPC, KC_BSPC, KC_BSPC){ - // Reset the keyboard - reset_keyboard(); + // Reset the keyboard + reset_keyboard(); + leader_succeed = true; } + leader_end(); } +// matrix_scan_keymap(); +} + +void leader_start(void) { +#ifdef RGBLIGHT_ENABLE + rgblight_savebase(); + rgblight_mode_noeeprom(1); + rgblight_sethsv_noeeprom_goldenrod(); +#endif +} - matrix_scan_keymap(); +void leader_end(void) { +// pick color depending of success /fail +// fade leader_start from 100 to 0 +// fade new color from 0 to 100 to 0 +// fade old color from 0 to 100 +#ifdef RGBLIGHT_ENABLE + if (leader_succeed) { + fadeflash_leds(HSV_GREEN); + } else { + fadeflash_leds(HSV_RED); + } +#endif } diff --git a/users/kuchosauronad0/process_records.c b/users/kuchosauronad0/process_records.c index 1eb3043b1c42..bec6fa5ad079 100644 --- a/users/kuchosauronad0/process_records.c +++ b/users/kuchosauronad0/process_records.c @@ -25,7 +25,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { #endif //KEYLOGGER_ENABLE switch (keycode) { - case KC_QWERTY ... KC_UNICODE: + case KC_QWERTY ... KC_PLOVER: if (record->event.pressed) { set_single_persistent_default_layer(keycode - KC_QWERTY); } @@ -168,7 +168,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case KC_OVERWATCH: // Toggle's if we hit "ENTER" or "BACKSPACE" to input macros if (record->event.pressed) { userspace_config.is_overwatch ^= 1; eeconfig_update_user(userspace_config.raw); } #ifdef RGBLIGHT_ENABLE - userspace_config.is_overwatch ? rgblight_mode_noeeprom(17) : rgblight_mode_noeeprom(18); +// userspace_config.is_overwatch ? rgblight_mode_noeeprom(17) : rgblight_mode_noeeprom(18); #endif //RGBLIGHT_ENABLE break; case KC_SALT: diff --git a/users/kuchosauronad0/process_records.h b/users/kuchosauronad0/process_records.h index 1a66beaa77ff..d3d4c4fe83c2 100644 --- a/users/kuchosauronad0/process_records.h +++ b/users/kuchosauronad0/process_records.h @@ -2,9 +2,9 @@ #include "kuchosauronad0.h" #if defined(KEYMAP_SAFE_RANGE) -#define PLACEHOLDER_SAFE_RANGE KEYMAP_SAFE_RANGE +# define PLACEHOLDER_SAFE_RANGE KEYMAP_SAFE_RANGE #else -#define PLACEHOLDER_SAFE_RANGE SAFE_RANGE +# define PLACEHOLDER_SAFE_RANGE SAFE_RANGE #endif enum userspace_custom_keycodes{ @@ -13,11 +13,7 @@ enum userspace_custom_keycodes{ KC_COLEMAK, // Sets default layer to COLEMAK KC_DVORAK, // Sets default layer to DVORAK KC_WORKMAN, // Sets default layer to WORKMAN - KC_NORMAN, // Sets default layer to NORMAN - KC_MALTRON, // Sets default layer to MALTRON - KC_EUCALYN, // Sets default layer to EUCALYN - KC_CARPLAX, // Sets default layer to CARPLAX - KC_UNICODE, // Sets default layer to UNICODE + KC_PLOVER, // Sets default layer to PLOVER KC_MAKE, // Run keyboard's customized make command KC_RGB_T, // Toggles RGB Layer Indication mode @@ -33,36 +29,37 @@ enum userspace_custom_keycodes{ UC_SHRG, // ¯\_(ツ)_/¯ UC_DISA, // ಠ_ಠ - MC_QT1, // "" - MC_QT2, // '' - MC_QT3, // `' - MC_PAR, // Parenthesis - MC_CUR, // Curly bracket - MC_SQR, // Square bracket - MC_ABR, // Angle bracket - MCT_NEW, // New Tmux Session - MCT_SH, // Tmux horizontal split - MCT_SV, // Tmux vertical split - MCT_ZM, // Tmux zoom - MCT_SCR, // Tmux scroll mode - MCT_UP, // Tmux up - MCT_DW, // Tmux down - MCT_LFT, // Tmux left - MCT_RGT, // Tmux right - MCV_B, // Vim begin of line - MCV_E, // Vim end of line - MCT_F, // Vim for loop - MCG_A, // Git add - MCG_C, // Git commit - MCG_P, // Git push - MCG_R, // Git revert - MCG_L, // Git log - MCG_S, // Git status + MC_QT1, // "" + MC_QT2, // '' + MC_QT3, // `' + MC_PAR, // Parenthesis + MC_CUR, // Curly bracket + MC_SQR, // Square bracket + MC_ABR, // Angle bracket + MCT_NEW, // New Tmux Session + MCT_SH, // Tmux horizontal split + MCT_SV, // Tmux vertical split + MCT_ZM, // Tmux zoom + MCT_SCR, // Tmux scroll mode + MCT_UP, // Tmux up + MCT_DW, // Tmux down + MCT_LFT, // Tmux left + MCT_RGT, // Tmux right + MCV_B, // Vim begin of line + MCV_E, // Vim end of line + MCT_F, // Vim for loop + MCG_A, // Git add + MCG_C, // Git commit + MCG_P, // Git push + MCG_R, // Git revert + MCG_L, // Git log + MCG_S, // Git status NEW_SAFE_RANGE //use "NEWPLACEHOLDER for keymap specific codes }; bool process_record_secrets(uint16_t keycode, keyrecord_t *record); +bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record); bool process_record_keymap(uint16_t keycode, keyrecord_t *record); #define LOWER MO(_LOWER) @@ -74,21 +71,21 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record); #define OS_RSE OSL(_RAISE) #define OS_UNI OSL(_UNICODE) -#define KC_SEC1 KC_SECRET_1 -#define KC_SEC2 KC_SECRET_2 -#define KC_SEC3 KC_SECRET_3 -#define KC_SEC4 KC_SECRET_4 -#define KC_SEC5 KC_SECRET_5 -#define KC_SEC6 KC_SECRET_6 +#define SEC1 KC_SECRET_1 +#define SEC2 KC_SECRET_2 +#define SEC3 KC_SECRET_3 +#define SEC4 KC_SECRET_4 +#define SEC5 KC_SECRET_5 +#define SEC6 KC_SECRET_6 -#define QWERTY KC_QWERTY -#define DVORAK KC_DVORAK -#define COLEMAK KC_COLEMAK -#define WORKMAN KC_WORKMAN -#define UNICODE KC_UNICODE +#define QWERTY KC_QWERTY +#define DVORAK KC_DVORAK +#define COLEMAK KC_COLEMAK +#define WORKMAN KC_WORKMAN +#define PLOVER KC_PLOVER #define KC_RESET RESET -#define KC_RST KC_RESET +#define KC_RST KC_RESET -#define UC_IRNY UC(0x2E2E) -#define UC_CLUE UC(0x203D) +#define UC_IRNY UC(0x2E2E) +#define UC_CLUE UC(0x203D) diff --git a/users/kuchosauronad0/rgblight_user.c b/users/kuchosauronad0/rgblight_user.c new file mode 100644 index 000000000000..63e412c557ac --- /dev/null +++ b/users/kuchosauronad0/rgblight_user.c @@ -0,0 +1,156 @@ +#include "rgblight_user.h" +extern rgblight_config_t rgblight_config; +bool has_initialized; +uint8_t base_hue; // Hue value of base state +uint8_t base_sat; // Saturation value of base state +uint8_t base_val; // Brightness value of base state +uint8_t base_mod; // Animation mode of the base state + +void rgblight_savebase(void) { // Save the current settings to ram + base_hue = rgblight_config.hue; + base_sat = rgblight_config.sat; + base_val = rgblight_config.val; + base_mod = rgblight_config.mode; +} +void rgblight_loadbase(void) { // Load settings from ram to eeprom + rgblight_mode( base_mod ); + rgblight_sethsv_eeprom_helper(base_hue, base_sat, base_val, true); +} + + + +bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { + if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) { + keycode = keycode & 0xFF; + } + switch (keycode) { + case KC_RGB_T: // Switch between underglow layer indication and normal qmk behaviour +#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) + if (record->event.pressed) { + userspace_config.rgb_layer_change ^= 1; + xprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change); + eeconfig_update_user(userspace_config.raw); + if (userspace_config.rgb_layer_change) { + layer_state_set(layer_state); // Immediately set the layer color (looks better) + } + } +#endif // RGBLIGHT_ENABLE + return false; + break; +#ifdef RGBLIGHT_ENABLE + case RGB_MODE_FORWARD ... RGB_MODE_GRADIENT: // quantum_keycodes.h L400 for definitions + if (record->event.pressed) { // This disables layer indication, as it's assumed that if you're changing this ... you want that disabled + if (userspace_config.rgb_layer_change) { + userspace_config.rgb_layer_change = false; + xprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change); + eeconfig_update_user(userspace_config.raw); + } + } + return true; + break; +#endif // RGBLIGHT_ENABLE + } + return true; +} + +void keyboard_post_init_rgb(void) { +# if defined(RGBLIGHT_ENABLE) || defined(RGBLIGHT_STARTUP_ANIMATION) + bool is_enabled = rgblight_config.enable; + if (userspace_config.rgb_layer_change) { + rgblight_enable_noeeprom(); + } + if (rgblight_config.enable) { + layer_state_set_user(layer_state); + uint16_t old_hue = rgblight_config.hue; + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); + for (uint16_t i = 255; i > 0; i--) { + rgblight_sethsv_noeeprom((i + old_hue) % 255, 255, 255); + wait_ms(5); + } + } + if (!is_enabled) { + rgblight_disable_noeeprom(); + } +# endif // !RGBLIGHT_ENABLE || RGBLIGHT_STARTUP_ANIMATION + layer_state_set_user(layer_state); +} + +void matrix_scan_rgb(void) { +# ifdef INDICATOR_LIGHTS + matrix_scan_indicator(); +# endif +} + +layer_state_t layer_state_set_rgb(layer_state_t state) { +# ifdef RGBLIGHT_ENABLE + if (userspace_config.rgb_layer_change) { + switch (biton32(state)) { // _RAISE, _LOWER and _ADJUST use a custom color and the breathing effect + case _RAISE: + rgblight_sethsv_noeeprom_green(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3); + break; + case _LOWER: + rgblight_sethsv_noeeprom_red(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3); + break; + case _ADJUST: + rgblight_sethsv_noeeprom_white(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 2); + break; + default: // Use a solid color for normal layers + switch (biton32(default_layer_state)) { + case _QWERTY: + rgblight_sethsv_noeeprom_magenta(); + break; + case _COLEMAK: + rgblight_sethsv_noeeprom_green(); + break; + case _DVORAK: + rgblight_sethsv_noeeprom_blue(); + break; + case _WORKMAN: + rgblight_sethsv_noeeprom_goldenrod(); + break; + case _PLOVER: + rgblight_sethsv_noeeprom_pink(); + break; + default: + rgblight_sethsv_noeeprom_white(); + break; + } + biton32(state) == _MODS ? rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING) : rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); // if _MODS layer is on, then breath to denote it + break; + } + } +# endif // !RGBLIGHT_ENABLE + return state; +} + +#ifdef INDICATOR_LIGHTS +void matrix_scan_indicator(void) { + if (has_initialized) { + set_rgb_indicators(get_mods(), host_keyboard_leds(), get_oneshot_mods()); + } +} +#endif // !INDICATOR_LIGHTS + +void rgblight_fade_helper(bool direction){ + // true: increase val = fade in + // false: decrease val = fade out + for (uint8_t index = 0; index < RGBLIGHT_VAL_STEP ; index++) { + direction ? rgblight_increase_val() : rgblight_decrease_val(); + wait_ms(5); + } +} +void fadeflash_leds(uint8_t hue, uint8_t sat, uint8_t val){ + // indicate success / fail of a leader sequence + // fade out, set new hue and saturation, fade in, fade out, set old color, fade in + // this is used in leader.c + // TODO: come up with a better name maybe + rgblight_fade_helper(false); + rgblight_sethsv_noeeprom(hue, sat, 0); + rgblight_fade_helper(true); + rgblight_fade_helper(false); + rgblight_sethsv_noeeprom(base_hue, base_sat, 0); + rgblight_fade_helper(true); +} diff --git a/users/kuchosauronad0/rgblight_user.h b/users/kuchosauronad0/rgblight_user.h new file mode 100644 index 000000000000..eab15b8325a3 --- /dev/null +++ b/users/kuchosauronad0/rgblight_user.h @@ -0,0 +1,23 @@ +#pragma once +#include "kuchosauronad0.h" + +typedef struct { + bool enabled; + uint8_t hue; + uint16_t timer; + uint8_t life; +} rgblight_fadeout; +const uint8_t RGBLIGHT_FADE_SPEED[6] PROGMEM; + +layer_state_t layer_state_set_rgb(layer_state_t state); +layer_state_t default_layer_state_set_rgb(layer_state_t state); + +bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record); +void scan_rgblight_fadeout(void); +void keyboard_post_init_rgb(void); +void matrix_scan_rgb(void); +void rgblight_sethsv_default_helper(uint8_t index); +void rgblight_savebase(void); +void rgblight_loadbase(void); +void rgblight_fade_helper(bool direction); +void fadeflash_leds(uint8_t hue, uint8_t sat, uint8_t val); diff --git a/users/kuchosauronad0/rules.mk b/users/kuchosauronad0/rules.mk index ad13083732a7..b844d12c9265 100644 --- a/users/kuchosauronad0/rules.mk +++ b/users/kuchosauronad0/rules.mk @@ -2,10 +2,11 @@ SRC += kuchosauronad0.c \ process_records.c LINK_TIME_OPTIMIZATION_ENABLE = yes +SPACE_CADET_ENABLE = no -#ifneq ("$(wildcard $(USER_PATH)/secrets.c)","") -# SRC += secrets.c -#endif +ifneq ($(strip $(RGBLIGHT_ENABLE)),yes ) + SRC += rgblight_user.c +endif ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) SRC += tap_dances.c @@ -14,6 +15,7 @@ endif ifeq ($(strip $(ENCODER_ENABLE)), yes) SRC += encoder.c endif + ifeq ($(strip $(COMBO_ENABLE)), yes) SRC += combo.c endif diff --git a/users/kuchosauronad0/wrappers.h b/users/kuchosauronad0/wrappers.h index 3172c8a6d3af..6dc19d935e8c 100644 --- a/users/kuchosauronad0/wrappers.h +++ b/users/kuchosauronad0/wrappers.h @@ -6,7 +6,7 @@ arguments, we need a wrapper in order for these definitions to be expanded before being used as arguments to the LAYOUT_xxx macro. */ #if (!defined(LAYOUT) && defined(KEYMAP)) -#define LAYOUT KEYMAP +# define LAYOUT KEYMAP #endif #define LAYOUT_ergodox_wrapper(...) LAYOUT_ergodox(__VA_ARGS__) @@ -16,6 +16,8 @@ expanded before being used as arguments to the LAYOUT_xxx macro. #define LAYOUT_ortho_4x12_wrapper(...) LAYOUT_ortho_4x12(__VA_ARGS__) #define LAYOUT_ortho_5x12_wrapper(...) LAYOUT_ortho_5x12(__VA_ARGS__) +#define LAYOUT_collide39_base_wrapper(...) LAYOUT_collide39_base(__VA_ARGS__) + /* Blocks for each of the four major keyboard layouts Organized so we can quickly adapt and modify all of them @@ -26,20 +28,30 @@ NOTE: These are all the same length. If you do a search/replace then you need to add/remove underscores to keep the lengths consistent. */ + +#define ___________________BLANK___________________ _______, _______, _______, _______, _______ + #ifdef TAP_DANCE_ENABLE - #define _________________QWERTY_L1_________________ KC_Q, KC_DW, KC_EOL, KC_R, KC_TMX - #define _________________QWERTY_L2_________________ KC_BOL, KC_S, KC_D, KC_NW, KC_G - #define _________________QWERTY_L3_________________ KC_Z, KC_X, KC_C, KC_V, KC_PW +# define _________________QWERTY_L1_________________ KC_Q, KC_DW, KC_EOL, KC_R, KC_TMX +# define _________________QWERTY_L2_________________ KC_BOL, KC_S, KC_D, KC_NW, KC_G +# define _________________QWERTY_L3_________________ KC_Z, KC_X, KC_C, KC_V, KC_PW #else - #define _________________QWERTY_L1_________________ KC_Q, KC_W, KC_E, KC_R, KC_T - #define _________________QWERTY_L2_________________ KC_A, KC_S, KC_D, KC_F, KC_G - #define _________________QWERTY_L3_________________ KC_Z, KC_X, KC_C, KC_V, KC_B +# define _________________QWERTY_L1_________________ KC_Q, KC_W, KC_E, KC_R, KC_T +# define _________________QWERTY_L2_________________ KC_A, KC_S, KC_D, KC_F, KC_G +# define _________________QWERTY_L3_________________ KC_Z, KC_X, KC_C, KC_V, KC_B #endif -#define _________________QWERTY_R1_________________ KC_Y, KC_U, KC_I, KC_O, KC_P -#define _________________QWERTY_R2_________________ KC_H, KC_J, KC_K, KC_L, KC_SCLN -#define _________________QWERTY_R3_________________ KC_N, KC_M, KC_COMM, KC_DOT, KC_SLASH +#define _________________QWERTY_R1_________________ KC_Y, KC_U, KC_I, KC_O, KC_P +#define _________________QWERTY_R2_________________ KC_H, KC_J, KC_K, KC_L, KC_SCLN +#define _________________QWERTY_R3_________________ KC_N, KC_M, KC_COMM, KC_DOT, KC_SLASH + +#define _________________PLOVER_L1_________________ KC_Q, KC_W, KC_E, KC_R, KC_T +#define _________________PLOVER_L2_________________ KC_A, KC_S, KC_D, KC_F, KC_G +#define _________________PLOVER_L3_________________ KC_NO, KC_NO, KC_C, KC_V, KC_NO +#define _________________PLOVER_R1_________________ KC_Y, KC_U, KC_I, KC_O, KC_P +#define _________________PLOVER_R2_________________ KC_H, KC_J, KC_K, KC_L, KC_SCLN +#define _________________PLOVER_R3_________________ KC_NO, KC_NO, KC_N, KC_M, KC_NO #define _________________COLEMAK_L1________________ KC_Q, KC_W, KC_F, KC_P, KC_G #define _________________COLEMAK_L2________________ KC_A, KC_R, KC_S, KC_T, KC_D @@ -57,23 +69,21 @@ NOTE: These are all the same length. If you do a search/replace #define ______________COLEMAK_MOD_DH_R2____________ KC_M, KC_N, KC_E, KC_I, KC_O #define ______________COLEMAK_MOD_DH_R3____________ KC_K, KC_H, KC_COMM, KC_DOT, KC_SLASH +#define _________________DVORAK_L1_________________ KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y +#define _________________DVORAK_L2_________________ KC_A, KC_O, KC_E, KC_U, KC_I +#define _________________DVORAK_L3_________________ KC_SCLN, KC_Q, KC_J, KC_K, KC_X -#define _________________DVORAK_L1_________________ KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y -#define _________________DVORAK_L2_________________ KC_A, KC_O, KC_E, KC_U, KC_I -#define _________________DVORAK_L3_________________ KC_SCLN, KC_Q, KC_J, KC_K, KC_X +#define _________________DVORAK_R1_________________ KC_F, KC_G, KC_C, KC_R, KC_L +#define _________________DVORAK_R2_________________ KC_D, KC_H, KC_T, KC_N, KC_S +#define _________________DVORAK_R3_________________ KC_B, KC_M, KC_W, KC_V, KC_Z -#define _________________DVORAK_R1_________________ KC_F, KC_G, KC_C, KC_R, KC_L -#define _________________DVORAK_R2_________________ KC_D, KC_H, KC_T, KC_N, KC_S -#define _________________DVORAK_R3_________________ KC_B, KC_M, KC_W, KC_V, KC_Z - -#define ________________DVORAK_AU_L1_______________ KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y -#define ________________DVORAK_AU_L2_______________ KC_O, KC_A, KC_E, KC_I, KC_U -#define ________________DVORAK_AU_L3_______________ KC_SCLN, KC_Q, KC_J, KC_K, KC_X - -#define ________________DVORAK_AU_R1_______________ KC_F, KC_G, KC_C, KC_R, KC_L -#define ________________DVORAK_AU_R2_______________ KC_D, KC_H, KC_T, KC_N, KC_S -#define ________________DVORAK_AU_R3_______________ KC_B, KC_M, KC_W, KC_V, KC_Z +#define ________________DVORAK_AU_L1_______________ KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y +#define ________________DVORAK_AU_L2_______________ KC_O, KC_A, KC_E, KC_I, KC_U +#define ________________DVORAK_AU_L3_______________ KC_SCLN, KC_Q, KC_J, KC_K, KC_X +#define ________________DVORAK_AU_R1_______________ KC_F, KC_G, KC_C, KC_R, KC_L +#define ________________DVORAK_AU_R2_______________ KC_D, KC_H, KC_T, KC_N, KC_S +#define ________________DVORAK_AU_R3_______________ KC_B, KC_M, KC_W, KC_V, KC_Z #define _________________WORKMAN_L1________________ KC_Q, KC_D, KC_R, KC_W, KC_B #define _________________WORKMAN_L2________________ KC_A, KC_S, KC_H, KC_T, KC_G @@ -83,7 +93,6 @@ NOTE: These are all the same length. If you do a search/replace #define _________________WORKMAN_R2________________ KC_Y, KC_N, KC_E, KC_O, KC_I #define _________________WORKMAN_R3________________ KC_K, KC_L, KC_COMM, KC_DOT, KC_SLASH - #define _________________NORMAN_L1_________________ KC_Q, KC_W, KC_D, KC_F, KC_K #define _________________NORMAN_L2_________________ KC_A, KC_S, KC_E, KC_T, KC_G #define _________________NORMAN_L3_________________ KC_Z, KC_X, KC_C, KC_V, KC_B @@ -92,7 +101,6 @@ NOTE: These are all the same length. If you do a search/replace #define _________________NORMAN_R2_________________ KC_Y, KC_N, KC_I, KC_O, KC_U #define _________________NORMAN_R3_________________ KC_P, KC_M, KC_COMM, KC_DOT, KC_SLASH - #define _________________MALTRON_L1________________ KC_Q, KC_P, KC_Y, KC_C, KC_B #define _________________MALTRON_L2________________ KC_A, KC_N, KC_I, KC_S, KC_F #define _________________MALTRON_L3________________ KC_SCLN, KC_SLSH, KC_J, KC_G, KC_COMM @@ -101,7 +109,6 @@ NOTE: These are all the same length. If you do a search/replace #define _________________MALTRON_R2________________ KC_D, KC_T, KC_D, KC_O, KC_R #define _________________MALTRON_R3________________ KC_DOT, KC_W, KC_K, KC_MINS, KC_X - #define _________________EUCALYN_L1________________ KC_SLSH, KC_COMM, KC_DOT, KC_F, KC_Q #define _________________EUCALYN_L2________________ KC_A, KC_O, KC_E, KC_I, KC_U #define _________________EUCALYN_L3________________ KC_Z, KC_X, KC_C, KC_V, KC_W @@ -110,7 +117,6 @@ NOTE: These are all the same length. If you do a search/replace #define _________________EUCALYN_R2________________ KC_G, KC_T, KC_K, KC_S, KC_N #define _________________EUCALYN_R3________________ KC_B, KC_H, KC_J, KC_L, KC_SCLN - #define _____________CARPLAX_QFMLWY_L1_____________ KC_Q, KC_F, KC_M, KC_L, KC_W #define _____________CARPLAX_QFMLWY_L2_____________ KC_D, KC_S, KC_T, KC_N, KC_R #define _____________CARPLAX_QFMLWY_L3_____________ KC_Z, KC_V, KC_G, KC_C, KC_X @@ -119,7 +125,6 @@ NOTE: These are all the same length. If you do a search/replace #define _____________CARPLAX_QFMLWY_R2_____________ KC_I, KC_A, KC_E, KC_H, KC_SCLN #define _____________CARPLAX_QFMLWY_R3_____________ KC_P, KC_K, KC_COMM, KC_DOT, KC_SLSH - #define _____________CARPLAX_QGMLWB_L1_____________ KC_Q, KC_G, KC_M, KC_L, KC_W #define _____________CARPLAX_QGMLWB_L2_____________ KC_D, KC_S, KC_T, KC_N, KC_R #define _____________CARPLAX_QGMLWB_L3_____________ KC_Z, KC_X, KC_C, KC_F, KC_J @@ -128,7 +133,6 @@ NOTE: These are all the same length. If you do a search/replace #define _____________CARPLAX_QGMLWB_R2_____________ KC_I, KC_A, KC_E, KC_O, KC_H #define _____________CARPLAX_QGMLWB_R3_____________ KC_K, KC_P, KC_COMM, KC_DOT, KC_SLSH - #define _____________CARPLAX_QGMLWY_L1_____________ KC_Q, KC_G, KC_M, KC_L, KC_W #define _____________CARPLAX_QGMLWY_L2_____________ KC_D, KC_S, KC_T, KC_N, KC_R #define _____________CARPLAX_QGMLWY_L3_____________ KC_Z, KC_X, KC_C, KC_V, KC_J @@ -138,23 +142,23 @@ NOTE: These are all the same length. If you do a search/replace #define _____________CARPLAX_QGMLWY_R3_____________ KC_K, KC_P, KC_COMM, KC_DOT, KC_SLSH #ifdef UNICODE_ENABLE -#define _______________UNICODE_L1__________________ UC_DISA,UC_DISA, UC_DISA, UC_DISA, UC_DISA -#define _______________UNICODE_L2__________________ UC_DISA,UC_DISA, UC_DISA, UC_DISA, UC_DISA -#define _______________UNICODE_L3__________________ UC_DISA,UC_DISA, UC_DISA, UC_DISA, UC_DISA +# define _______________UNICODE_L1__________________ UC_DISA,UC_DISA, UC_DISA, UC_DISA, UC_DISA +# define _______________UNICODE_L2__________________ UC_DISA,UC_DISA, UC_DISA, UC_DISA, UC_DISA +# define _______________UNICODE_L3__________________ UC_DISA,UC_DISA, UC_DISA, UC_DISA, UC_DISA -#define _______________UNICODE_R1__________________ UC_SHRG, UC_SHRG, UC_SHRG, UC_SHRG, UC_SHRG -#define _______________UNICODE_R2__________________ UC_SHRG, UC_SHRG, UC_SHRG, UC_SHRG, UC_SHRG -#define _______________UNICODE_R3__________________ UC_SHRG, UC_SHRG, UC_SHRG, UC_SHRG, UC_SHRG +# define _______________UNICODE_R1__________________ UC_SHRG, UC_SHRG, UC_SHRG, UC_SHRG, UC_SHRG +# define _______________UNICODE_R2__________________ UC_SHRG, UC_SHRG, UC_SHRG, UC_SHRG, UC_SHRG +# define _______________UNICODE_R3__________________ UC_SHRG, UC_SHRG, UC_SHRG, UC_SHRG, UC_SHRG #endif #ifdef UNICODEMAP_ENABLE -#define _______________UNICODE_L1__________________ X(SMRK), X(THINK), X(CLOWN), X(HUNDR), X(BANG) -#define _______________UNICODE_L2__________________ X(GRIN), X(MONKEY), X(OKOK), X(EGGPL), X(LIT) -#define _______________UNICODE_L3__________________ X(WEARY), X(UNAMU), X(EFFU), X(MONOCL), X(IRONY) +# define _______________UNICODE_L1__________________ X(SMRK), X(THINK), X(CLOWN), X(HUNDR), X(BANG) +# define _______________UNICODE_L2__________________ X(GRIN), X(MONKEY), X(OKOK), X(EGGPL), X(LIT) +# define _______________UNICODE_L3__________________ X(WEARY), X(UNAMU), X(EFFU), X(MONOCL), X(IRONY) -#define _______________UNICODE_R1__________________ X(DRUG0), X(THUP), X(INUP), X(DIZZY), X(COOL) -#define _______________UNICODE_R2__________________ X(FIST0), X(FIST2),X(FIST3),X(FIST1), X(OKOK) -#define _______________UNICODE_R3__________________ X(MNDBLWN), X(THDN), X(SPOCK),X(HOLE), X(DASH) +# define _______________UNICODE_R1__________________ X(DRUG0), X(THUP), X(INUP), X(DIZZY), X(COOL) +# define _______________UNICODE_R2__________________ X(FIST0), X(FIST2), X(FIST3), X(FIST1), X(OKOK) +# define _______________UNICODE_R3__________________ X(MNDBLWN), X(THDN), X(SPOCK), X(HOLE), X(DASH) #endif #define ________________NUMBER_LEFT________________ KC_1, KC_2, KC_3, KC_4, KC_5 @@ -162,45 +166,47 @@ NOTE: These are all the same length. If you do a search/replace #define _________________FUNC_LEFT_________________ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5 #define _________________FUNC_RIGHT________________ KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 -#define ___________________BLANK___________________ _______, _______, _______, _______, _______ +#define _________________MEDIA_RIGHT_______________ KC_MUTE, KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP +#define _________________MEDIA_LEFT________________ KC_VOLD, KC_VOLD, KC_MUTE, KC_VOLU, KC_VOLU +#define _________________LOWER_L1__________________ KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC +#define _________________LOWER_L2__________________ ___________________BLANK___________________ +#define _________________LOWER_L3__________________ _______, _______, _______, OS_UNI, TM_X -#define _________________LOWER_L1__________________ KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC -#define _________________LOWER_L2__________________ ___________________BLANK___________________ -#define _________________LOWER_L3__________________ ___________________BLANK___________________ +#define _________________LOWER_R1__________________ KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN +#define _________________LOWER_R2__________________ _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR +#define _________________LOWER_R3__________________ _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT -#define _________________LOWER_R1__________________ KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN -#define _________________LOWER_R2__________________ OS_UNI, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR -#define _________________LOWER_R3__________________ TM_X, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +#define _________________RAISE_L1__________________ ________________NUMBER_LEFT________________ +#define _________________RAISE_L2__________________ ___________________BLANK___________________ +#define _________________RAISE_L3__________________ ___________________BLANK___________________ +#define _________________RAISE_R1__________________ ________________NUMBER_RIGHT_______________ +#define _________________RAISE_R2__________________ _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC +#define _________________RAISE_R3__________________ _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END +#define _________________ADJUST_L1_________________ QWERTY, COLEMAK, DVORAK, WORKMAN, PLOVER +#define _________________ADJUST_L2_________________ _________________FUNC_LEFT_________________ +#define _________________ADJUST_L3_________________ _________________MEDIA_LEFT________________ -#define _________________RAISE_L1__________________ ________________NUMBER_LEFT________________ -#define _________________RAISE_L2__________________ ___________________BLANK___________________ -#define _________________RAISE_L3__________________ ___________________BLANK___________________ +#define _________________ADJUST_R1_________________ SEC1, SEC2, SEC3, SEC4, SEC5 +#define _________________ADJUST_R2_________________ _________________FUNC_RIGHT________________ +#define _________________ADJUST_R3_________________ _________________MEDIA_RIGHT_______________ -#define _________________RAISE_R1__________________ ________________NUMBER_RIGHT_______________ -#define _________________RAISE_R2__________________ _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC -#define _________________RAISE_R3__________________ _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END +#define _________________RGB_UP____________________ RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_TOG +#define _________________RGB_CENTER________________ MU_TOG , CK_TOGG, AU_ON, AU_OFF, AG_NORM +#define _________________RGB_DOWN__________________ RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, KC_RGB_T +#define _________________RGB_R1____________________ RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_TOG +#define _________________RGB_R2____________________ MU_TOG , CK_TOGG, AU_ON, AU_OFF, AG_NORM +#define _________________RGB_R3____________________ RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, KC_RGB_T +#define __________________GAMEPAD_L1_______________ _______, KC_Q, KC_W, KC_E, _______ +#define __________________GAMEPAD_L2_______________ _______, KC_A, KC_S, KC_D, _______ +#define __________________GAMEPAD_L3_______________ KC_1, KC_2, KC_3, KC_4, KC_5 -#define _________________ADJUST_L1_________________ ___________________BLANK___________________ -#define _________________ADJUST_L2_________________ _________________FUNC_LEFT_________________ -#define _________________ADJUST_L3_________________ AG_SWAP, QWERTY, COLEMAK, DVORAK, WORKMAN +#define __________________GAMEPAD_R1_______________ _______, KC_U, KC_UP, KC_O, _______ +#define __________________GAMEPAD_R2_______________ _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______ +#define __________________GAMEPAD_R3_______________ KC_6, KC_7, KC_8, KC_9, KC_0 +/* vi: ft=c:tw=80:sw=2:ts=2:sts=2:et */ -#define _________________ADJUST_R1_________________ KC_SEC1, KC_SEC2, KC_SEC3, KC_SEC4, KC_SEC5 -#define _________________ADJUST_R2_________________ _________________FUNC_RIGHT________________ -#define _________________ADJUST_R3_________________ KC_MUTE, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT - - -/* -#define _________________RGB_L1____________________ RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_TOG -#define _________________RGB_L2____________________ MU_TOG , CK_TOGG, AU_ON, AU_OFF, AG_NORM -#define _________________RGB_L3____________________ RGB_RMOD,RGB_HUD,RGB_SAD, RGB_VAD, KC_RGB_T -#define _________________RGB_R1____________________ RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_TOG -#define _________________RGB_R2____________________ MU_TOG , CK_TOGG, AU_ON, AU_OFF, AG_NORM -#define _________________RGB_R3____________________ RGB_RMOD,RGB_HUD,RGB_SAD, RGB_VAD, KC_RGB_T -*/ -/* vi: ft=c:tw=80:sw=2:ts=2:sts=2:et - */ From 455a0c597854b417c4dc02a462433043bddfa830 Mon Sep 17 00:00:00 2001 From: Andrew Kannan Date: Wed, 30 Oct 2019 02:45:58 -0400 Subject: [PATCH 224/316] [Keyboard] New CannonKeys boards and EEPROM fixes (#6968) * Add Iron165 * CannonKeys new boards and cleanup * Tmo50 info json * Update readme for TMOv2 * update via keymap tmo * info json again * Apply suggestions from code review Co-Authored-By: Drashna Jaelre * Address PR comments * More changes for rules files cleanup * info.json fixed? * Fix Savage65 matrix * Apply suggestions from code review Thanks noroadsleft for the improvements! Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Bump eeprom version * Apply suggestions from code review Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> --- keyboards/cannonkeys/an_c/config.h | 14 +- keyboards/cannonkeys/instant60/config.h | 14 +- .../boards/ST_STM32F072B_DISCOVERY/board.c | 109 +++ .../boards/ST_STM32F072B_DISCOVERY/board.h | 922 ++++++++++++++++++ .../boards/ST_STM32F072B_DISCOVERY/board.mk | 5 + .../ST_STM32F072B_DISCOVERY/cfg/board.chcfg | 703 +++++++++++++ .../cannonkeys/iron165/bootloader_defs.h | 7 + keyboards/cannonkeys/iron165/chconf.h | 524 ++++++++++ keyboards/cannonkeys/iron165/config.h | 89 ++ keyboards/cannonkeys/iron165/halconf.h | 354 +++++++ keyboards/cannonkeys/iron165/info.json | 13 + keyboards/cannonkeys/iron165/iron165.c | 1 + keyboards/cannonkeys/iron165/iron165.h | 17 + .../iron165/keymaps/default/keymap.c | 47 + .../cannonkeys/iron165/keymaps/via/keymap.c | 46 + .../cannonkeys/iron165/keymaps/via/rules.mk | 5 + keyboards/cannonkeys/iron165/mcuconf.h | 176 ++++ keyboards/cannonkeys/iron165/readme.md | 12 + keyboards/cannonkeys/iron165/rules.mk | 55 ++ .../boards/ST_STM32F072B_DISCOVERY/board.c | 109 +++ .../boards/ST_STM32F072B_DISCOVERY/board.h | 922 ++++++++++++++++++ .../boards/ST_STM32F072B_DISCOVERY/board.mk | 5 + .../ST_STM32F072B_DISCOVERY/cfg/board.chcfg | 703 +++++++++++++ .../cannonkeys/savage65/bootloader_defs.h | 7 + keyboards/cannonkeys/savage65/chconf.h | 524 ++++++++++ keyboards/cannonkeys/savage65/config.h | 97 ++ keyboards/cannonkeys/savage65/halconf.h | 354 +++++++ keyboards/cannonkeys/savage65/info.json | 13 + .../savage65/keymaps/default/keymap.c | 46 + .../cannonkeys/savage65/keymaps/via/keymap.c | 47 + .../cannonkeys/savage65/keymaps/via/rules.mk | 5 + keyboards/cannonkeys/savage65/mcuconf.h | 176 ++++ keyboards/cannonkeys/savage65/readme.md | 12 + keyboards/cannonkeys/savage65/rules.mk | 56 ++ keyboards/cannonkeys/savage65/savage65.c | 1 + keyboards/cannonkeys/savage65/savage65.h | 17 + .../boards/ST_STM32F072B_DISCOVERY/board.c | 109 +++ .../boards/ST_STM32F072B_DISCOVERY/board.h | 922 ++++++++++++++++++ .../boards/ST_STM32F072B_DISCOVERY/board.mk | 5 + .../ST_STM32F072B_DISCOVERY/cfg/board.chcfg | 703 +++++++++++++ keyboards/cannonkeys/tmov2/bootloader_defs.h | 7 + keyboards/cannonkeys/tmov2/chconf.h | 524 ++++++++++ keyboards/cannonkeys/tmov2/config.h | 97 ++ keyboards/cannonkeys/tmov2/halconf.h | 354 +++++++ keyboards/cannonkeys/tmov2/info.json | 12 + .../cannonkeys/tmov2/keymaps/default/keymap.c | 60 ++ .../cannonkeys/tmov2/keymaps/via/keymap.c | 60 ++ .../cannonkeys/tmov2/keymaps/via/rules.mk | 5 + keyboards/cannonkeys/tmov2/mcuconf.h | 176 ++++ keyboards/cannonkeys/tmov2/readme.md | 12 + keyboards/cannonkeys/tmov2/rules.mk | 64 ++ keyboards/cannonkeys/tmov2/tmov2.c | 1 + keyboards/cannonkeys/tmov2/tmov2.h | 15 + 53 files changed, 9319 insertions(+), 14 deletions(-) create mode 100644 keyboards/cannonkeys/iron165/boards/ST_STM32F072B_DISCOVERY/board.c create mode 100644 keyboards/cannonkeys/iron165/boards/ST_STM32F072B_DISCOVERY/board.h create mode 100644 keyboards/cannonkeys/iron165/boards/ST_STM32F072B_DISCOVERY/board.mk create mode 100644 keyboards/cannonkeys/iron165/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg create mode 100644 keyboards/cannonkeys/iron165/bootloader_defs.h create mode 100644 keyboards/cannonkeys/iron165/chconf.h create mode 100644 keyboards/cannonkeys/iron165/config.h create mode 100644 keyboards/cannonkeys/iron165/halconf.h create mode 100644 keyboards/cannonkeys/iron165/info.json create mode 100644 keyboards/cannonkeys/iron165/iron165.c create mode 100644 keyboards/cannonkeys/iron165/iron165.h create mode 100644 keyboards/cannonkeys/iron165/keymaps/default/keymap.c create mode 100644 keyboards/cannonkeys/iron165/keymaps/via/keymap.c create mode 100644 keyboards/cannonkeys/iron165/keymaps/via/rules.mk create mode 100644 keyboards/cannonkeys/iron165/mcuconf.h create mode 100644 keyboards/cannonkeys/iron165/readme.md create mode 100644 keyboards/cannonkeys/iron165/rules.mk create mode 100644 keyboards/cannonkeys/savage65/boards/ST_STM32F072B_DISCOVERY/board.c create mode 100644 keyboards/cannonkeys/savage65/boards/ST_STM32F072B_DISCOVERY/board.h create mode 100644 keyboards/cannonkeys/savage65/boards/ST_STM32F072B_DISCOVERY/board.mk create mode 100644 keyboards/cannonkeys/savage65/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg create mode 100644 keyboards/cannonkeys/savage65/bootloader_defs.h create mode 100644 keyboards/cannonkeys/savage65/chconf.h create mode 100644 keyboards/cannonkeys/savage65/config.h create mode 100644 keyboards/cannonkeys/savage65/halconf.h create mode 100644 keyboards/cannonkeys/savage65/info.json create mode 100644 keyboards/cannonkeys/savage65/keymaps/default/keymap.c create mode 100644 keyboards/cannonkeys/savage65/keymaps/via/keymap.c create mode 100644 keyboards/cannonkeys/savage65/keymaps/via/rules.mk create mode 100644 keyboards/cannonkeys/savage65/mcuconf.h create mode 100644 keyboards/cannonkeys/savage65/readme.md create mode 100644 keyboards/cannonkeys/savage65/rules.mk create mode 100644 keyboards/cannonkeys/savage65/savage65.c create mode 100644 keyboards/cannonkeys/savage65/savage65.h create mode 100644 keyboards/cannonkeys/tmov2/boards/ST_STM32F072B_DISCOVERY/board.c create mode 100644 keyboards/cannonkeys/tmov2/boards/ST_STM32F072B_DISCOVERY/board.h create mode 100644 keyboards/cannonkeys/tmov2/boards/ST_STM32F072B_DISCOVERY/board.mk create mode 100644 keyboards/cannonkeys/tmov2/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg create mode 100644 keyboards/cannonkeys/tmov2/bootloader_defs.h create mode 100644 keyboards/cannonkeys/tmov2/chconf.h create mode 100644 keyboards/cannonkeys/tmov2/config.h create mode 100644 keyboards/cannonkeys/tmov2/halconf.h create mode 100644 keyboards/cannonkeys/tmov2/info.json create mode 100644 keyboards/cannonkeys/tmov2/keymaps/default/keymap.c create mode 100644 keyboards/cannonkeys/tmov2/keymaps/via/keymap.c create mode 100644 keyboards/cannonkeys/tmov2/keymaps/via/rules.mk create mode 100644 keyboards/cannonkeys/tmov2/mcuconf.h create mode 100644 keyboards/cannonkeys/tmov2/readme.md create mode 100644 keyboards/cannonkeys/tmov2/rules.mk create mode 100644 keyboards/cannonkeys/tmov2/tmov2.c create mode 100644 keyboards/cannonkeys/tmov2/tmov2.h diff --git a/keyboards/cannonkeys/an_c/config.h b/keyboards/cannonkeys/an_c/config.h index f8ded7c1f19d..ef480521bc5a 100644 --- a/keyboards/cannonkeys/an_c/config.h +++ b/keyboards/cannonkeys/an_c/config.h @@ -62,21 +62,21 @@ along with this program. If not, see . // EEPROM usage // TODO: refactor with new user EEPROM code (coming soon) #define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 32 +#define EEPROM_MAGIC_ADDR 40 // Bump this every time we change what we store // This will automatically reset the EEPROM with defaults // and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x02 -#define EEPROM_VERSION_ADDR 34 +#define EEPROM_VERSION 0x03 +#define EEPROM_VERSION_ADDR 42 #define DYNAMIC_KEYMAP_LAYER_COUNT 4 // Dynamic macro starts after dynamic keymaps (35+(4*5*15*2)) = (35+600) = 635 // start + layer * rows * col * 2 -#define DYNAMIC_KEYMAP_EEPROM_ADDR 35 -#define EEPROM_CUSTOM_BACKLIGHT 636 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 637 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 200 +#define DYNAMIC_KEYMAP_EEPROM_ADDR 43 +#define EEPROM_CUSTOM_BACKLIGHT 644 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 645 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 192 #define DYNAMIC_KEYMAP_MACRO_COUNT 16 /* diff --git a/keyboards/cannonkeys/instant60/config.h b/keyboards/cannonkeys/instant60/config.h index 095384fb9ebc..9da2043d2f62 100644 --- a/keyboards/cannonkeys/instant60/config.h +++ b/keyboards/cannonkeys/instant60/config.h @@ -62,21 +62,21 @@ along with this program. If not, see . // EEPROM usage // TODO: refactor with new user EEPROM code (coming soon) #define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 32 +#define EEPROM_MAGIC_ADDR 40 // Bump this every time we change what we store // This will automatically reset the EEPROM with defaults // and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x02 -#define EEPROM_VERSION_ADDR 34 +#define EEPROM_VERSION 0x03 +#define EEPROM_VERSION_ADDR 42 #define DYNAMIC_KEYMAP_LAYER_COUNT 4 // Dynamic macro starts after dynamic keymaps (35+(4*5*15*2)) = (35+600) = 635 // start + layer * rows * col * 2 -#define DYNAMIC_KEYMAP_EEPROM_ADDR 35 -#define EEPROM_CUSTOM_BACKLIGHT 636 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 637 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 200 +#define DYNAMIC_KEYMAP_EEPROM_ADDR 43 +#define EEPROM_CUSTOM_BACKLIGHT 644 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 645 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 192 #define DYNAMIC_KEYMAP_MACRO_COUNT 16 /* diff --git a/keyboards/cannonkeys/iron165/boards/ST_STM32F072B_DISCOVERY/board.c b/keyboards/cannonkeys/iron165/boards/ST_STM32F072B_DISCOVERY/board.c new file mode 100644 index 000000000000..9d10fbd754da --- /dev/null +++ b/keyboards/cannonkeys/iron165/boards/ST_STM32F072B_DISCOVERY/board.c @@ -0,0 +1,109 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/* + * This file has been automatically generated using ChibiStudio board + * generator plugin. Do not edit manually. + */ + +#include "hal.h" + +#if HAL_USE_PAL || defined(__DOXYGEN__) +/** + * @brief PAL setup. + * @details Digital I/O ports static configuration as defined in @p board.h. + * This variable is used by the HAL when initializing the PAL driver. + */ +const PALConfig pal_default_config = { +#if STM32_HAS_GPIOA + {VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR, + VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH}, +#endif +#if STM32_HAS_GPIOB + {VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR, + VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH}, +#endif +#if STM32_HAS_GPIOC + {VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR, + VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH}, +#endif +#if STM32_HAS_GPIOD + {VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR, + VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH}, +#endif +#if STM32_HAS_GPIOE + {VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR, + VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH}, +#endif +#if STM32_HAS_GPIOF + {VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR, + VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH}, +#endif +#if STM32_HAS_GPIOG + {VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR, + VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH}, +#endif +#if STM32_HAS_GPIOH + {VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR, + VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH}, +#endif +#if STM32_HAS_GPIOI + {VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR, + VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH} +#endif +}; +#endif + +void enter_bootloader_mode_if_requested(void); + +/** + * @brief Early initialization code. + * @details This initialization must be performed just after stack setup + * and before any other initialization. + */ +void __early_init(void) { + enter_bootloader_mode_if_requested(); + stm32_clock_init(); +} + +#if HAL_USE_MMC_SPI || defined(__DOXYGEN__) +/** + * @brief MMC_SPI card detection. + */ +bool mmc_lld_is_card_inserted(MMCDriver *mmcp) { + + (void)mmcp; + /* TODO: Fill the implementation.*/ + return true; +} + +/** + * @brief MMC_SPI card write protection detection. + */ +bool mmc_lld_is_write_protected(MMCDriver *mmcp) { + + (void)mmcp; + /* TODO: Fill the implementation.*/ + return false; +} +#endif + +/** + * @brief Board-specific initialization code. + * @todo Add your board-specific code, if any. + */ +void boardInit(void) { +} diff --git a/keyboards/cannonkeys/iron165/boards/ST_STM32F072B_DISCOVERY/board.h b/keyboards/cannonkeys/iron165/boards/ST_STM32F072B_DISCOVERY/board.h new file mode 100644 index 000000000000..de3a93d1ceb0 --- /dev/null +++ b/keyboards/cannonkeys/iron165/boards/ST_STM32F072B_DISCOVERY/board.h @@ -0,0 +1,922 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/* + * This file has been automatically generated using ChibiStudio board + * generator plugin. Do not edit manually. + */ + +#ifndef BOARD_H +#define BOARD_H + +/* + * Setup for ST STM32F072B-Discovery board. + */ + +/* + * Board identifier. + */ +#define BOARD_ST_STM32F072B_DISCOVERY +#define BOARD_NAME "ST STM32F072B-Discovery" + +/* + * Board oscillators-related settings. + * NOTE: HSE not fitted. + */ +#if !defined(STM32_LSECLK) +#define STM32_LSECLK 32768 +#endif + +#define STM32_LSEDRV (3U << 3U) + +#if !defined(STM32_HSECLK) +#define STM32_HSECLK 0U +#endif + +#define STM32_HSE_BYPASS + +/* + * MCU type as defined in the ST header. + */ +#define STM32F072xB + +/* + * IO pins assignments. + */ +#define GPIOA_BUTTON 0U +#define GPIOA_PIN1 1U +#define GPIOA_PIN2 2U +#define GPIOA_PIN3 3U +#define GPIOA_PIN4 4U +#define GPIOA_PIN5 5U +#define GPIOA_PIN6 6U +#define GPIOA_PIN7 7U +#define GPIOA_PIN8 8U +#define GPIOA_PIN9 9U +#define GPIOA_PIN10 10U +#define GPIOA_USB_DM 11U +#define GPIOA_USB_DP 12U +#define GPIOA_SWDIO 13U +#define GPIOA_SWCLK 14U +#define GPIOA_PIN15 15U + +#define GPIOB_PIN0 0U +#define GPIOB_PIN1 1U +#define GPIOB_PIN2 2U +#define GPIOB_PIN3 3U +#define GPIOB_PIN4 4U +#define GPIOB_PIN5 5U +#define GPIOB_PIN6 6U +#define GPIOB_PIN7 7U +#define GPIOB_PIN8 8U +#define GPIOB_PIN9 9U +#define GPIOB_PIN10 10U +#define GPIOB_PIN11 11U +#define GPIOB_PIN12 12U +#define GPIOB_SPI2_SCK 13U +#define GPIOB_SPI2_MISO 14U +#define GPIOB_SPI2_MOSI 15U + +#define GPIOC_MEMS_CS 0U +#define GPIOC_PIN1 1U +#define GPIOC_PIN2 2U +#define GPIOC_PIN3 3U +#define GPIOC_PIN4 4U +#define GPIOC_PIN5 5U +#define GPIOC_LED_RED 6U +#define GPIOC_LED_BLUE 7U +#define GPIOC_LED_ORANGE 8U +#define GPIOC_LED_GREEN 9U +#define GPIOC_PIN10 10U +#define GPIOC_PIN11 11U +#define GPIOC_PIN12 12U +#define GPIOC_PIN13 13U +#define GPIOC_OSC32_IN 14U +#define GPIOC_OSC32_OUT 15U + +#define GPIOD_PIN0 0U +#define GPIOD_PIN1 1U +#define GPIOD_PIN2 2U +#define GPIOD_PIN3 3U +#define GPIOD_PIN4 4U +#define GPIOD_PIN5 5U +#define GPIOD_PIN6 6U +#define GPIOD_PIN7 7U +#define GPIOD_PIN8 8U +#define GPIOD_PIN9 9U +#define GPIOD_PIN10 10U +#define GPIOD_PIN11 11U +#define GPIOD_PIN12 12U +#define GPIOD_PIN13 13U +#define GPIOD_PIN14 14U +#define GPIOD_PIN15 15U + +#define GPIOE_PIN0 0U +#define GPIOE_PIN1 1U +#define GPIOE_PIN2 2U +#define GPIOE_PIN3 3U +#define GPIOE_PIN4 4U +#define GPIOE_PIN5 5U +#define GPIOE_PIN6 6U +#define GPIOE_PIN7 7U +#define GPIOE_PIN8 8U +#define GPIOE_PIN9 9U +#define GPIOE_PIN10 10U +#define GPIOE_PIN11 11U +#define GPIOE_PIN12 12U +#define GPIOE_PIN13 13U +#define GPIOE_PIN14 14U +#define GPIOE_PIN15 15U + +#define GPIOF_OSC_IN 0U +#define GPIOF_OSC_OUT 1U +#define GPIOF_PIN2 2U +#define GPIOF_PIN3 3U +#define GPIOF_PIN4 4U +#define GPIOF_PIN5 5U +#define GPIOF_PIN6 6U +#define GPIOF_PIN7 7U +#define GPIOF_PIN8 8U +#define GPIOF_PIN9 9U +#define GPIOF_PIN10 10U +#define GPIOF_PIN11 11U +#define GPIOF_PIN12 12U +#define GPIOF_PIN13 13U +#define GPIOF_PIN14 14U +#define GPIOF_PIN15 15U + +/* + * IO lines assignments. + */ +#define LINE_BUTTON PAL_LINE(GPIOA, 0U) +#define LINE_USB_DM PAL_LINE(GPIOA, 11U) +#define LINE_USB_DP PAL_LINE(GPIOA, 12U) +#define LINE_SWDIO PAL_LINE(GPIOA, 13U) +#define LINE_SWCLK PAL_LINE(GPIOA, 14U) + +#define LINE_SPI2_SCK PAL_LINE(GPIOB, 13U) +#define LINE_SPI2_MISO PAL_LINE(GPIOB, 14U) +#define LINE_SPI2_MOSI PAL_LINE(GPIOB, 15U) + +#define LINE_MEMS_CS PAL_LINE(GPIOC, 0U) +#define LINE_LED_RED PAL_LINE(GPIOC, 6U) +#define LINE_LED_BLUE PAL_LINE(GPIOC, 7U) +#define LINE_LED_ORANGE PAL_LINE(GPIOC, 8U) +#define LINE_LED_GREEN PAL_LINE(GPIOC, 9U) +#define LINE_OSC32_IN PAL_LINE(GPIOC, 14U) +#define LINE_OSC32_OUT PAL_LINE(GPIOC, 15U) + + + +#define LINE_OSC_IN PAL_LINE(GPIOF, 0U) +#define LINE_OSC_OUT PAL_LINE(GPIOF, 1U) + +/* + * I/O ports initial setup, this configuration is established soon after reset + * in the initialization code. + * Please refer to the STM32 Reference Manual for details. + */ +#define PIN_MODE_INPUT(n) (0U << ((n) * 2U)) +#define PIN_MODE_OUTPUT(n) (1U << ((n) * 2U)) +#define PIN_MODE_ALTERNATE(n) (2U << ((n) * 2U)) +#define PIN_MODE_ANALOG(n) (3U << ((n) * 2U)) +#define PIN_ODR_LOW(n) (0U << (n)) +#define PIN_ODR_HIGH(n) (1U << (n)) +#define PIN_OTYPE_PUSHPULL(n) (0U << (n)) +#define PIN_OTYPE_OPENDRAIN(n) (1U << (n)) +#define PIN_OSPEED_VERYLOW(n) (0U << ((n) * 2U)) +#define PIN_OSPEED_LOW(n) (1U << ((n) * 2U)) +#define PIN_OSPEED_MEDIUM(n) (2U << ((n) * 2U)) +#define PIN_OSPEED_HIGH(n) (3U << ((n) * 2U)) +#define PIN_PUPDR_FLOATING(n) (0U << ((n) * 2U)) +#define PIN_PUPDR_PULLUP(n) (1U << ((n) * 2U)) +#define PIN_PUPDR_PULLDOWN(n) (2U << ((n) * 2U)) +#define PIN_AFIO_AF(n, v) ((v) << (((n) % 8U) * 4U)) + +/* + * GPIOA setup: + * + * PA0 - BUTTON (input floating). + * PA1 - PIN1 (input pullup). + * PA2 - PIN2 (input pullup). + * PA3 - PIN3 (input pullup). + * PA4 - PIN4 (input pullup). + * PA5 - PIN5 (input pullup). + * PA6 - PIN6 (input pullup). + * PA7 - PIN7 (input pullup). + * PA8 - PIN8 (input pullup). + * PA9 - PIN9 (input pullup). + * PA10 - PIN10 (input pullup). + * PA11 - USB_DM (input floating). + * PA12 - USB_DP (input floating). + * PA13 - SWDIO (alternate 0). + * PA14 - SWCLK (alternate 0). + * PA15 - PIN15 (input pullup). + */ +#define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_BUTTON) | \ + PIN_MODE_INPUT(GPIOA_PIN1) | \ + PIN_MODE_INPUT(GPIOA_PIN2) | \ + PIN_MODE_INPUT(GPIOA_PIN3) | \ + PIN_MODE_INPUT(GPIOA_PIN4) | \ + PIN_MODE_INPUT(GPIOA_PIN5) | \ + PIN_MODE_INPUT(GPIOA_PIN6) | \ + PIN_MODE_INPUT(GPIOA_PIN7) | \ + PIN_MODE_INPUT(GPIOA_PIN8) | \ + PIN_MODE_INPUT(GPIOA_PIN9) | \ + PIN_MODE_INPUT(GPIOA_PIN10) | \ + PIN_MODE_INPUT(GPIOA_USB_DM) | \ + PIN_MODE_INPUT(GPIOA_USB_DP) | \ + PIN_MODE_ALTERNATE(GPIOA_SWDIO) | \ + PIN_MODE_ALTERNATE(GPIOA_SWCLK) | \ + PIN_MODE_INPUT(GPIOA_PIN15)) +#define VAL_GPIOA_OTYPER (PIN_OTYPE_PUSHPULL(GPIOA_BUTTON) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOA_USB_DM) | \ + PIN_OTYPE_PUSHPULL(GPIOA_USB_DP) | \ + PIN_OTYPE_PUSHPULL(GPIOA_SWDIO) | \ + PIN_OTYPE_PUSHPULL(GPIOA_SWCLK) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN15)) +#define VAL_GPIOA_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOA_BUTTON) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOA_USB_DM) | \ + PIN_OSPEED_VERYLOW(GPIOA_USB_DP) | \ + PIN_OSPEED_HIGH(GPIOA_SWDIO) | \ + PIN_OSPEED_HIGH(GPIOA_SWCLK) | \ + PIN_OSPEED_HIGH(GPIOA_PIN15)) +#define VAL_GPIOA_PUPDR (PIN_PUPDR_FLOATING(GPIOA_BUTTON) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN10) | \ + PIN_PUPDR_FLOATING(GPIOA_USB_DM) | \ + PIN_PUPDR_FLOATING(GPIOA_USB_DP) | \ + PIN_PUPDR_PULLUP(GPIOA_SWDIO) | \ + PIN_PUPDR_PULLDOWN(GPIOA_SWCLK) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN15)) +#define VAL_GPIOA_ODR (PIN_ODR_HIGH(GPIOA_BUTTON) | \ + PIN_ODR_HIGH(GPIOA_PIN1) | \ + PIN_ODR_HIGH(GPIOA_PIN2) | \ + PIN_ODR_HIGH(GPIOA_PIN3) | \ + PIN_ODR_HIGH(GPIOA_PIN4) | \ + PIN_ODR_HIGH(GPIOA_PIN5) | \ + PIN_ODR_HIGH(GPIOA_PIN6) | \ + PIN_ODR_HIGH(GPIOA_PIN7) | \ + PIN_ODR_HIGH(GPIOA_PIN8) | \ + PIN_ODR_HIGH(GPIOA_PIN9) | \ + PIN_ODR_HIGH(GPIOA_PIN10) | \ + PIN_ODR_HIGH(GPIOA_USB_DM) | \ + PIN_ODR_HIGH(GPIOA_USB_DP) | \ + PIN_ODR_HIGH(GPIOA_SWDIO) | \ + PIN_ODR_HIGH(GPIOA_SWCLK) | \ + PIN_ODR_HIGH(GPIOA_PIN15)) +#define VAL_GPIOA_AFRL (PIN_AFIO_AF(GPIOA_BUTTON, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN7, 0U)) +#define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOA_USB_DM, 0U) | \ + PIN_AFIO_AF(GPIOA_USB_DP, 0U) | \ + PIN_AFIO_AF(GPIOA_SWDIO, 0U) | \ + PIN_AFIO_AF(GPIOA_SWCLK, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN15, 0U)) + +/* + * GPIOB setup: + * + * PB0 - PIN0 (input pullup). + * PB1 - PIN1 (input pullup). + * PB2 - PIN2 (input pullup). + * PB3 - PIN3 (input pullup). + * PB4 - PIN4 (input pullup). + * PB5 - PIN5 (input pullup). + * PB6 - PIN6 (input pullup). + * PB7 - PIN7 (input pullup). + * PB8 - PIN8 (input pullup). + * PB9 - PIN9 (input pullup). + * PB10 - PIN10 (input pullup). + * PB11 - PIN11 (input pullup). + * PB12 - PIN12 (input pullup). + * PB13 - SPI2_SCK (alternate 0). + * PB14 - SPI2_MISO (alternate 0). + * PB15 - SPI2_MOSI (alternate 0). + */ +#define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_PIN0) | \ + PIN_MODE_INPUT(GPIOB_PIN1) | \ + PIN_MODE_INPUT(GPIOB_PIN2) | \ + PIN_MODE_INPUT(GPIOB_PIN3) | \ + PIN_MODE_INPUT(GPIOB_PIN4) | \ + PIN_MODE_INPUT(GPIOB_PIN5) | \ + PIN_MODE_INPUT(GPIOB_PIN6) | \ + PIN_MODE_INPUT(GPIOB_PIN7) | \ + PIN_MODE_INPUT(GPIOB_PIN8) | \ + PIN_MODE_INPUT(GPIOB_PIN9) | \ + PIN_MODE_INPUT(GPIOB_PIN10) | \ + PIN_MODE_INPUT(GPIOB_PIN11) | \ + PIN_MODE_INPUT(GPIOB_PIN12) | \ + PIN_MODE_ALTERNATE(GPIOB_SPI2_SCK) | \ + PIN_MODE_ALTERNATE(GPIOB_SPI2_MISO) | \ + PIN_MODE_ALTERNATE(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_OTYPER (PIN_OTYPE_PUSHPULL(GPIOB_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOB_SPI2_SCK) | \ + PIN_OTYPE_PUSHPULL(GPIOB_SPI2_MISO) | \ + PIN_OTYPE_PUSHPULL(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOB_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN1) | \ + PIN_OSPEED_HIGH(GPIOB_PIN2) | \ + PIN_OSPEED_HIGH(GPIOB_PIN3) | \ + PIN_OSPEED_HIGH(GPIOB_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOB_SPI2_SCK) | \ + PIN_OSPEED_VERYLOW(GPIOB_SPI2_MISO) | \ + PIN_OSPEED_VERYLOW(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN12) | \ + PIN_PUPDR_FLOATING(GPIOB_SPI2_SCK) | \ + PIN_PUPDR_FLOATING(GPIOB_SPI2_MISO) | \ + PIN_PUPDR_FLOATING(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_ODR (PIN_ODR_HIGH(GPIOB_PIN0) | \ + PIN_ODR_HIGH(GPIOB_PIN1) | \ + PIN_ODR_HIGH(GPIOB_PIN2) | \ + PIN_ODR_HIGH(GPIOB_PIN3) | \ + PIN_ODR_HIGH(GPIOB_PIN4) | \ + PIN_ODR_HIGH(GPIOB_PIN5) | \ + PIN_ODR_HIGH(GPIOB_PIN6) | \ + PIN_ODR_HIGH(GPIOB_PIN7) | \ + PIN_ODR_HIGH(GPIOB_PIN8) | \ + PIN_ODR_HIGH(GPIOB_PIN9) | \ + PIN_ODR_HIGH(GPIOB_PIN10) | \ + PIN_ODR_HIGH(GPIOB_PIN11) | \ + PIN_ODR_HIGH(GPIOB_PIN12) | \ + PIN_ODR_HIGH(GPIOB_SPI2_SCK) | \ + PIN_ODR_HIGH(GPIOB_SPI2_MISO) | \ + PIN_ODR_HIGH(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN7, 0U)) +#define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOB_SPI2_SCK, 0U) | \ + PIN_AFIO_AF(GPIOB_SPI2_MISO, 0U) | \ + PIN_AFIO_AF(GPIOB_SPI2_MOSI, 0U)) + +/* + * GPIOC setup: + * + * PC0 - MEMS_CS (output pushpull maximum). + * PC1 - PIN1 (input pullup). + * PC2 - PIN2 (input pullup). + * PC3 - PIN3 (input pullup). + * PC4 - PIN4 (input pullup). + * PC5 - PIN5 (input pullup). + * PC6 - LED_RED (output pushpull maximum). + * PC7 - LED_BLUE (output pushpull maximum). + * PC8 - LED_ORANGE (output pushpull maximum). + * PC9 - LED_GREEN (output pushpull maximum). + * PC10 - PIN10 (input pullup). + * PC11 - PIN11 (input pullup). + * PC12 - PIN12 (input pullup). + * PC13 - PIN13 (input pullup). + * PC14 - OSC32_IN (input floating). + * PC15 - OSC32_OUT (input floating). + */ +#define VAL_GPIOC_MODER (PIN_MODE_OUTPUT(GPIOC_MEMS_CS) | \ + PIN_MODE_INPUT(GPIOC_PIN1) | \ + PIN_MODE_INPUT(GPIOC_PIN2) | \ + PIN_MODE_INPUT(GPIOC_PIN3) | \ + PIN_MODE_INPUT(GPIOC_PIN4) | \ + PIN_MODE_INPUT(GPIOC_PIN5) | \ + PIN_MODE_OUTPUT(GPIOC_LED_RED) | \ + PIN_MODE_OUTPUT(GPIOC_LED_BLUE) | \ + PIN_MODE_OUTPUT(GPIOC_LED_ORANGE) | \ + PIN_MODE_OUTPUT(GPIOC_LED_GREEN) | \ + PIN_MODE_INPUT(GPIOC_PIN10) | \ + PIN_MODE_INPUT(GPIOC_PIN11) | \ + PIN_MODE_INPUT(GPIOC_PIN12) | \ + PIN_MODE_INPUT(GPIOC_PIN13) | \ + PIN_MODE_INPUT(GPIOC_OSC32_IN) | \ + PIN_MODE_INPUT(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_MEMS_CS) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_RED) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_BLUE) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_ORANGE) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_GREEN) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOC_OSC32_IN) | \ + PIN_OTYPE_PUSHPULL(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_OSPEEDR (PIN_OSPEED_HIGH(GPIOC_MEMS_CS) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN5) | \ + PIN_OSPEED_HIGH(GPIOC_LED_RED) | \ + PIN_OSPEED_HIGH(GPIOC_LED_BLUE) | \ + PIN_OSPEED_HIGH(GPIOC_LED_ORANGE) | \ + PIN_OSPEED_HIGH(GPIOC_LED_GREEN) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN13) | \ + PIN_OSPEED_HIGH(GPIOC_OSC32_IN) | \ + PIN_OSPEED_HIGH(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_PUPDR (PIN_PUPDR_FLOATING(GPIOC_MEMS_CS) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN5) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_RED) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_BLUE) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_ORANGE) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_GREEN) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN13) | \ + PIN_PUPDR_FLOATING(GPIOC_OSC32_IN) | \ + PIN_PUPDR_FLOATING(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_MEMS_CS) | \ + PIN_ODR_HIGH(GPIOC_PIN1) | \ + PIN_ODR_HIGH(GPIOC_PIN2) | \ + PIN_ODR_HIGH(GPIOC_PIN3) | \ + PIN_ODR_HIGH(GPIOC_PIN4) | \ + PIN_ODR_HIGH(GPIOC_PIN5) | \ + PIN_ODR_LOW(GPIOC_LED_RED) | \ + PIN_ODR_LOW(GPIOC_LED_BLUE) | \ + PIN_ODR_LOW(GPIOC_LED_ORANGE) | \ + PIN_ODR_LOW(GPIOC_LED_GREEN) | \ + PIN_ODR_HIGH(GPIOC_PIN10) | \ + PIN_ODR_HIGH(GPIOC_PIN11) | \ + PIN_ODR_HIGH(GPIOC_PIN12) | \ + PIN_ODR_HIGH(GPIOC_PIN13) | \ + PIN_ODR_HIGH(GPIOC_OSC32_IN) | \ + PIN_ODR_HIGH(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_MEMS_CS, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOC_LED_RED, 0U) | \ + PIN_AFIO_AF(GPIOC_LED_BLUE, 0U)) +#define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_LED_ORANGE, 0U) | \ + PIN_AFIO_AF(GPIOC_LED_GREEN, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOC_OSC32_IN, 0U) | \ + PIN_AFIO_AF(GPIOC_OSC32_OUT, 0U)) + +/* + * GPIOD setup: + * + * PD0 - PIN0 (input pullup). + * PD1 - PIN1 (input pullup). + * PD2 - PIN2 (input pullup). + * PD3 - PIN3 (input pullup). + * PD4 - PIN4 (input pullup). + * PD5 - PIN5 (input pullup). + * PD6 - PIN6 (input pullup). + * PD7 - PIN7 (input pullup). + * PD8 - PIN8 (input pullup). + * PD9 - PIN9 (input pullup). + * PD10 - PIN10 (input pullup). + * PD11 - PIN11 (input pullup). + * PD12 - PIN12 (input pullup). + * PD13 - PIN13 (input pullup). + * PD14 - PIN14 (input pullup). + * PD15 - PIN15 (input pullup). + */ +#define VAL_GPIOD_MODER (PIN_MODE_INPUT(GPIOD_PIN0) | \ + PIN_MODE_INPUT(GPIOD_PIN1) | \ + PIN_MODE_INPUT(GPIOD_PIN2) | \ + PIN_MODE_INPUT(GPIOD_PIN3) | \ + PIN_MODE_INPUT(GPIOD_PIN4) | \ + PIN_MODE_INPUT(GPIOD_PIN5) | \ + PIN_MODE_INPUT(GPIOD_PIN6) | \ + PIN_MODE_INPUT(GPIOD_PIN7) | \ + PIN_MODE_INPUT(GPIOD_PIN8) | \ + PIN_MODE_INPUT(GPIOD_PIN9) | \ + PIN_MODE_INPUT(GPIOD_PIN10) | \ + PIN_MODE_INPUT(GPIOD_PIN11) | \ + PIN_MODE_INPUT(GPIOD_PIN12) | \ + PIN_MODE_INPUT(GPIOD_PIN13) | \ + PIN_MODE_INPUT(GPIOD_PIN14) | \ + PIN_MODE_INPUT(GPIOD_PIN15)) +#define VAL_GPIOD_OTYPER (PIN_OTYPE_PUSHPULL(GPIOD_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN15)) +#define VAL_GPIOD_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOD_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN15)) +#define VAL_GPIOD_PUPDR (PIN_PUPDR_PULLUP(GPIOD_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN15)) +#define VAL_GPIOD_ODR (PIN_ODR_HIGH(GPIOD_PIN0) | \ + PIN_ODR_HIGH(GPIOD_PIN1) | \ + PIN_ODR_HIGH(GPIOD_PIN2) | \ + PIN_ODR_HIGH(GPIOD_PIN3) | \ + PIN_ODR_HIGH(GPIOD_PIN4) | \ + PIN_ODR_HIGH(GPIOD_PIN5) | \ + PIN_ODR_HIGH(GPIOD_PIN6) | \ + PIN_ODR_HIGH(GPIOD_PIN7) | \ + PIN_ODR_HIGH(GPIOD_PIN8) | \ + PIN_ODR_HIGH(GPIOD_PIN9) | \ + PIN_ODR_HIGH(GPIOD_PIN10) | \ + PIN_ODR_HIGH(GPIOD_PIN11) | \ + PIN_ODR_HIGH(GPIOD_PIN12) | \ + PIN_ODR_HIGH(GPIOD_PIN13) | \ + PIN_ODR_HIGH(GPIOD_PIN14) | \ + PIN_ODR_HIGH(GPIOD_PIN15)) +#define VAL_GPIOD_AFRL (PIN_AFIO_AF(GPIOD_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN7, 0U)) +#define VAL_GPIOD_AFRH (PIN_AFIO_AF(GPIOD_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN15, 0U)) + +/* + * GPIOE setup: + * + * PE0 - PIN0 (input pullup). + * PE1 - PIN1 (input pullup). + * PE2 - PIN2 (input pullup). + * PE3 - PIN3 (input pullup). + * PE4 - PIN4 (input pullup). + * PE5 - PIN5 (input pullup). + * PE6 - PIN6 (input pullup). + * PE7 - PIN7 (input pullup). + * PE8 - PIN8 (input pullup). + * PE9 - PIN9 (input pullup). + * PE10 - PIN10 (input pullup). + * PE11 - PIN11 (input pullup). + * PE12 - PIN12 (input pullup). + * PE13 - PIN13 (input pullup). + * PE14 - PIN14 (input pullup). + * PE15 - PIN15 (input pullup). + */ +#define VAL_GPIOE_MODER (PIN_MODE_INPUT(GPIOE_PIN0) | \ + PIN_MODE_INPUT(GPIOE_PIN1) | \ + PIN_MODE_INPUT(GPIOE_PIN2) | \ + PIN_MODE_INPUT(GPIOE_PIN3) | \ + PIN_MODE_INPUT(GPIOE_PIN4) | \ + PIN_MODE_INPUT(GPIOE_PIN5) | \ + PIN_MODE_INPUT(GPIOE_PIN6) | \ + PIN_MODE_INPUT(GPIOE_PIN7) | \ + PIN_MODE_INPUT(GPIOE_PIN8) | \ + PIN_MODE_INPUT(GPIOE_PIN9) | \ + PIN_MODE_INPUT(GPIOE_PIN10) | \ + PIN_MODE_INPUT(GPIOE_PIN11) | \ + PIN_MODE_INPUT(GPIOE_PIN12) | \ + PIN_MODE_INPUT(GPIOE_PIN13) | \ + PIN_MODE_INPUT(GPIOE_PIN14) | \ + PIN_MODE_INPUT(GPIOE_PIN15)) +#define VAL_GPIOE_OTYPER (PIN_OTYPE_PUSHPULL(GPIOE_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN15)) +#define VAL_GPIOE_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOE_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN15)) +#define VAL_GPIOE_PUPDR (PIN_PUPDR_PULLUP(GPIOE_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN15)) +#define VAL_GPIOE_ODR (PIN_ODR_HIGH(GPIOE_PIN0) | \ + PIN_ODR_HIGH(GPIOE_PIN1) | \ + PIN_ODR_HIGH(GPIOE_PIN2) | \ + PIN_ODR_HIGH(GPIOE_PIN3) | \ + PIN_ODR_HIGH(GPIOE_PIN4) | \ + PIN_ODR_HIGH(GPIOE_PIN5) | \ + PIN_ODR_HIGH(GPIOE_PIN6) | \ + PIN_ODR_HIGH(GPIOE_PIN7) | \ + PIN_ODR_HIGH(GPIOE_PIN8) | \ + PIN_ODR_HIGH(GPIOE_PIN9) | \ + PIN_ODR_HIGH(GPIOE_PIN10) | \ + PIN_ODR_HIGH(GPIOE_PIN11) | \ + PIN_ODR_HIGH(GPIOE_PIN12) | \ + PIN_ODR_HIGH(GPIOE_PIN13) | \ + PIN_ODR_HIGH(GPIOE_PIN14) | \ + PIN_ODR_HIGH(GPIOE_PIN15)) +#define VAL_GPIOE_AFRL (PIN_AFIO_AF(GPIOE_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN7, 0U)) +#define VAL_GPIOE_AFRH (PIN_AFIO_AF(GPIOE_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN15, 0U)) + +/* + * GPIOF setup: + * + * PF0 - OSC_IN (input floating). + * PF1 - OSC_OUT (input floating). + * PF2 - PIN2 (input pullup). + * PF3 - PIN3 (input pullup). + * PF4 - PIN4 (input pullup). + * PF5 - PIN5 (input pullup). + * PF6 - PIN6 (input pullup). + * PF7 - PIN7 (input pullup). + * PF8 - PIN8 (input pullup). + * PF9 - PIN9 (input pullup). + * PF10 - PIN10 (input pullup). + * PF11 - PIN11 (input pullup). + * PF12 - PIN12 (input pullup). + * PF13 - PIN13 (input pullup). + * PF14 - PIN14 (input pullup). + * PF15 - PIN15 (input pullup). + */ +#define VAL_GPIOF_MODER (PIN_MODE_INPUT(GPIOF_OSC_IN) | \ + PIN_MODE_INPUT(GPIOF_OSC_OUT) | \ + PIN_MODE_INPUT(GPIOF_PIN2) | \ + PIN_MODE_INPUT(GPIOF_PIN3) | \ + PIN_MODE_INPUT(GPIOF_PIN4) | \ + PIN_MODE_INPUT(GPIOF_PIN5) | \ + PIN_MODE_INPUT(GPIOF_PIN6) | \ + PIN_MODE_INPUT(GPIOF_PIN7) | \ + PIN_MODE_INPUT(GPIOF_PIN8) | \ + PIN_MODE_INPUT(GPIOF_PIN9) | \ + PIN_MODE_INPUT(GPIOF_PIN10) | \ + PIN_MODE_INPUT(GPIOF_PIN11) | \ + PIN_MODE_INPUT(GPIOF_PIN12) | \ + PIN_MODE_INPUT(GPIOF_PIN13) | \ + PIN_MODE_INPUT(GPIOF_PIN14) | \ + PIN_MODE_INPUT(GPIOF_PIN15)) +#define VAL_GPIOF_OTYPER (PIN_OTYPE_PUSHPULL(GPIOF_OSC_IN) | \ + PIN_OTYPE_PUSHPULL(GPIOF_OSC_OUT) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN15)) +#define VAL_GPIOF_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOF_OSC_IN) | \ + PIN_OSPEED_VERYLOW(GPIOF_OSC_OUT) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN15)) +#define VAL_GPIOF_PUPDR (PIN_PUPDR_FLOATING(GPIOF_OSC_IN) | \ + PIN_PUPDR_FLOATING(GPIOF_OSC_OUT) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN15)) +#define VAL_GPIOF_ODR (PIN_ODR_HIGH(GPIOF_OSC_IN) | \ + PIN_ODR_HIGH(GPIOF_OSC_OUT) | \ + PIN_ODR_HIGH(GPIOF_PIN2) | \ + PIN_ODR_HIGH(GPIOF_PIN3) | \ + PIN_ODR_HIGH(GPIOF_PIN4) | \ + PIN_ODR_HIGH(GPIOF_PIN5) | \ + PIN_ODR_HIGH(GPIOF_PIN6) | \ + PIN_ODR_HIGH(GPIOF_PIN7) | \ + PIN_ODR_HIGH(GPIOF_PIN8) | \ + PIN_ODR_HIGH(GPIOF_PIN9) | \ + PIN_ODR_HIGH(GPIOF_PIN10) | \ + PIN_ODR_HIGH(GPIOF_PIN11) | \ + PIN_ODR_HIGH(GPIOF_PIN12) | \ + PIN_ODR_HIGH(GPIOF_PIN13) | \ + PIN_ODR_HIGH(GPIOF_PIN14) | \ + PIN_ODR_HIGH(GPIOF_PIN15)) +#define VAL_GPIOF_AFRL (PIN_AFIO_AF(GPIOF_OSC_IN, 0U) | \ + PIN_AFIO_AF(GPIOF_OSC_OUT, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN7, 0U)) +#define VAL_GPIOF_AFRH (PIN_AFIO_AF(GPIOF_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN15, 0U)) + + +#if !defined(_FROM_ASM_) +#ifdef __cplusplus +extern "C" { +#endif + void boardInit(void); +#ifdef __cplusplus +} +#endif +#endif /* _FROM_ASM_ */ + +#endif /* BOARD_H */ diff --git a/keyboards/cannonkeys/iron165/boards/ST_STM32F072B_DISCOVERY/board.mk b/keyboards/cannonkeys/iron165/boards/ST_STM32F072B_DISCOVERY/board.mk new file mode 100644 index 000000000000..b98dcdd26c6a --- /dev/null +++ b/keyboards/cannonkeys/iron165/boards/ST_STM32F072B_DISCOVERY/board.mk @@ -0,0 +1,5 @@ +# List of all the board related files. +BOARDSRC = $(BOARD_PATH)/boards/ST_STM32F072B_DISCOVERY/board.c + +# Required include directories +BOARDINC = $(BOARD_PATH)/boards/ST_STM32F072B_DISCOVERY diff --git a/keyboards/cannonkeys/iron165/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg b/keyboards/cannonkeys/iron165/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg new file mode 100644 index 000000000000..9c7cf4fd76a3 --- /dev/null +++ b/keyboards/cannonkeys/iron165/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg @@ -0,0 +1,703 @@ + + + + + resources/gencfg/processors/boards/stm32f0xx/templates + .. + 3.0.x + + ST STM32F072B-Discovery + ST_STM32F072B_DISCOVERY + + STM32F072xB + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/keyboards/cannonkeys/iron165/bootloader_defs.h b/keyboards/cannonkeys/iron165/bootloader_defs.h new file mode 100644 index 000000000000..02c48c4e6dcb --- /dev/null +++ b/keyboards/cannonkeys/iron165/bootloader_defs.h @@ -0,0 +1,7 @@ +/* Address for jumping to bootloader on STM32 chips. */ +/* It is chip dependent, the correct number can be looked up here (page 175): + * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf + * This also requires a patch to chibios: + * /tmk_core/tool/chibios/ch-bootloader-jump.patch + */ +#define STM32_BOOTLOADER_ADDRESS 0x1FFFC800 diff --git a/keyboards/cannonkeys/iron165/chconf.h b/keyboards/cannonkeys/iron165/chconf.h new file mode 100644 index 000000000000..99fa8ce39822 --- /dev/null +++ b/keyboards/cannonkeys/iron165/chconf.h @@ -0,0 +1,524 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/chconf.h + * @brief Configuration file template. + * @details A copy of this file must be placed in each project directory, it + * contains the application specific kernel settings. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#define CH_CFG_ST_RESOLUTION 32 + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#define CH_CFG_ST_FREQUENCY 10000 + +/** + * @brief Time delta constant for the tick-less mode. + * @note If this value is zero then the system uses the classic + * periodic tick. This value represents the minimum number + * of ticks that is safe to specify in a timeout directive. + * The value one is not valid, timeouts are rounded up to + * this value. + */ +#define CH_CFG_ST_TIMEDELTA 2 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel parameters and options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Round robin interval. + * @details This constant is the number of system ticks allowed for the + * threads before preemption occurs. Setting this value to zero + * disables the preemption for threads with equal priority and the + * round robin becomes cooperative. Note that higher priority + * threads can still preempt, the kernel is always preemptive. + * @note Disabling the round robin preemption makes the kernel more compact + * and generally faster. + * @note The round robin preemption is not supported in tickless mode and + * must be set to zero in that case. + */ +#define CH_CFG_TIME_QUANTUM 0 + +/** + * @brief Managed RAM size. + * @details Size of the RAM area to be managed by the OS. If set to zero + * then the whole available RAM is used. The core memory is made + * available to the heap allocator and/or can be used directly through + * the simplified core memory allocator. + * + * @note In order to let the OS manage the whole RAM the linker script must + * provide the @p __heap_base__ and @p __heap_end__ symbols. + * @note Requires @p CH_CFG_USE_MEMCORE. + */ +#define CH_CFG_MEMCORE_SIZE 0 + +/** + * @brief Idle thread automatic spawn suppression. + * @details When this option is activated the function @p chSysInit() + * does not spawn the idle thread. The application @p main() + * function becomes the idle thread and must implement an + * infinite loop. + */ +#define CH_CFG_NO_IDLE_THREAD FALSE + +/* Use __WFI in the idle thread for waiting. Does lower the power + * consumption. */ +#define CORTEX_ENABLE_WFI_IDLE TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Performance options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief OS optimization. + * @details If enabled then time efficient rather than space efficient code + * is used when two possible implementations exist. + * + * @note This is not related to the compiler optimization options. + * @note The default is @p TRUE. + */ +#define CH_CFG_OPTIMIZE_SPEED FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Subsystem options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Time Measurement APIs. + * @details If enabled then the time measurement APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_TM FALSE + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_REGISTRY TRUE + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_WAITEXIT TRUE + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_SEMAPHORES TRUE + +/** + * @brief Semaphores queuing mode. + * @details If enabled then the threads are enqueued on semaphores by + * priority rather than in FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MUTEXES TRUE + +/** + * @brief Enables recursive behavior on mutexes. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @note The default is @p FALSE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE + +/** + * @brief Conditional Variables APIs. + * @details If enabled then the conditional variables APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_CONDVARS TRUE + +/** + * @brief Conditional Variables APIs with timeout. + * @details If enabled then the conditional variables APIs with timeout + * specification are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_CONDVARS. + */ +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_EVENTS TRUE + +/** + * @brief Events Flags APIs with timeout. + * @details If enabled then the events APIs with timeout specification + * are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_EVENTS. + */ +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MESSAGES TRUE + +/** + * @brief Synchronous Messages queuing mode. + * @details If enabled then messages are served by priority rather than in + * FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_MESSAGES. + */ +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE + +/** + * @brief Mailboxes APIs. + * @details If enabled then the asynchronous messages (mailboxes) APIs are + * included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_MAILBOXES TRUE + +/** + * @brief Core Memory Manager APIs. + * @details If enabled then the core memory manager APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMCORE FALSE + +/** + * @brief Heap Allocator APIs. + * @details If enabled then the memory heap allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or + * @p CH_CFG_USE_SEMAPHORES. + * @note Mutexes are recommended. + */ +#define CH_CFG_USE_HEAP FALSE + +/** + * @brief Memory Pools Allocator APIs. + * @details If enabled then the memory pools allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMPOOLS FALSE + +/** + * @brief Dynamic Threads APIs. + * @details If enabled then the dynamic threads creation APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_WAITEXIT. + * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. + */ +#define CH_CFG_USE_DYNAMIC FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_STATISTICS FALSE + +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_SYSTEM_STATE_CHECK FALSE + +/** + * @brief Debug option, parameters checks. + * @details If enabled then the checks on the API functions input + * parameters are activated. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_CHECKS FALSE + +/** + * @brief Debug option, consistency checks. + * @details If enabled then all the assertions in the kernel code are + * activated. This includes consistency checks inside the kernel, + * runtime anomalies and port-defined checks. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_ASSERTS FALSE + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_BUFFER_SIZE 128 + +/** + * @brief Debug option, stack checks. + * @details If enabled then a runtime stack check is performed. + * + * @note The default is @p FALSE. + * @note The stack check is performed in a architecture/port dependent way. + * It may not be implemented or some ports. + * @note The default failure mode is to halt the system with the global + * @p panic_msg variable set to @p NULL. + */ +#define CH_DBG_ENABLE_STACK_CHECK FALSE + +/** + * @brief Debug option, stacks initialization. + * @details If enabled then the threads working area is filled with a byte + * value when a thread is created. This can be useful for the + * runtime measurement of the used stack. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_FILL_THREADS FALSE + +/** + * @brief Debug option, threads profiling. + * @details If enabled then a field is added to the @p thread_t structure that + * counts the system ticks occurred while executing the thread. + * + * @note The default is @p FALSE. + * @note This debug option is not currently compatible with the + * tickless mode. + */ +#define CH_DBG_THREADS_PROFILING FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Threads descriptor structure extension. + * @details User fields added to the end of the @p thread_t structure. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p chThdInit() API. + * + * @note It is invoked from within @p chThdInit() and implicitly from all + * the threads creation APIs. + */ +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads finalization hook. + * @details User finalization code added to the @p chThdExit() API. + */ +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ + /* Add threads finalization code here.*/ \ +} + +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* Context switch code here.*/ \ +} + +/** + * @brief ISR enter hook. + */ +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} + +/** + * @brief ISR exit hook. + */ +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} + +/** + * @brief Idle thread enter hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to activate a power saving mode. + */ +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ +} + +/** + * @brief Idle thread leave hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to deactivate a power saving mode. + */ +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ +} + +/** + * @brief Idle Loop hook. + * @details This hook is continuously invoked by the idle thread loop. + */ +#define CH_CFG_IDLE_LOOP_HOOK() { \ + /* Idle loop code here.*/ \ +} + +/** + * @brief System tick event hook. + * @details This hook is invoked in the system tick handler immediately + * after processing the virtual timers queue. + */ +#define CH_CFG_SYSTEM_TICK_HOOK() { \ + /* System tick event code here.*/ \ +} + +/** + * @brief System halt hook. + * @details This hook is invoked in case to a system halting error before + * the system is halted. + */ +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ + /* System halt code here.*/ \ +} + +/** + * @brief Trace hook. + * @details This hook is invoked each time a new record is written in the + * trace buffer. + */ +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} + +/** @} */ + +/*===========================================================================*/ +/* Port-specific settings (override port settings defaulted in chcore.h). */ +/*===========================================================================*/ + +#endif /* CHCONF_H */ + +/** @} */ diff --git a/keyboards/cannonkeys/iron165/config.h b/keyboards/cannonkeys/iron165/config.h new file mode 100644 index 000000000000..c5fcd4518aba --- /dev/null +++ b/keyboards/cannonkeys/iron165/config.h @@ -0,0 +1,89 @@ +/* +Copyright 2015 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 . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x5A12 +#define PRODUCT_ID 0x5165 +#define DEVICE_VER 0x0001 +/* in python2: list(u"whatever".encode('utf-16-le')) */ +/* at most 32 characters or the ugly hack in usb_main.c borks */ +#define MANUFACTURER SmithAndRune +#define PRODUCT Iron165 +#define DESCRIPTION Iron165 Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 16 + +#define MATRIX_COL_PINS { A5, B10, A3, A2, B0, A8, C13, B9, B8, B7, B6, B5, B4, B3, A15, A14 } +#define MATRIX_ROW_PINS { B12, B13, B14, B15, A1 } +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_LEVELS 6 +#define BACKLIGHT_BREATHING +#define BREATHING_PERIOD 6 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 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 + +// EEPROM usage +// TODO: refactor with new user EEPROM code (coming soon) +#define EEPROM_MAGIC 0x451F +#define EEPROM_MAGIC_ADDR 40 +// Bump this every time we change what we store +// This will automatically reset the EEPROM with defaults +// and avoid loading invalid data from the EEPROM +#define EEPROM_VERSION 0x02 +#define EEPROM_VERSION_ADDR 42 + + +#define DYNAMIC_KEYMAP_LAYER_COUNT 4 +// Dynamic macro starts after dynamic keymaps (35+(4*5*15*2)) = (35+600) = 635 +// start + layer * rows * col * 2 +#define DYNAMIC_KEYMAP_EEPROM_ADDR 43 +#define EEPROM_CUSTOM_BACKLIGHT 684 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 685 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 192 +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 + +/* + * 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 diff --git a/keyboards/cannonkeys/iron165/halconf.h b/keyboards/cannonkeys/iron165/halconf.h new file mode 100644 index 000000000000..acd7678e7b5e --- /dev/null +++ b/keyboards/cannonkeys/iron165/halconf.h @@ -0,0 +1,354 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef _HALCONF_H_ +#define _HALCONF_H_ + +#include "mcuconf.h" + +/** + * @brief Enables the PAL subsystem. + */ +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) +#define HAL_USE_PAL TRUE +#endif + +/** + * @brief Enables the ADC subsystem. + */ +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) +#define HAL_USE_ADC FALSE +#endif + +/** + * @brief Enables the CAN subsystem. + */ +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE +#endif + +/** + * @brief Enables the EXT subsystem. + */ +#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) +#define HAL_USE_EXT FALSE +#endif + +/** + * @brief Enables the GPT subsystem. + */ +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT FALSE +#endif + +/** + * @brief Enables the I2C subsystem. + */ +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C FALSE +#endif + +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + +/** + * @brief Enables the ICU subsystem. + */ +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif + +/** + * @brief Enables the MAC subsystem. + */ +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif + +/** + * @brief Enables the MMC_SPI subsystem. + */ +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif + +/** + * @brief Enables the PWM subsystem. + */ +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM TRUE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC FALSE +#endif + +/** + * @brief Enables the SDC subsystem. + */ +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif + +/** + * @brief Enables the SERIAL subsystem. + */ +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL FALSE +#endif + +/** + * @brief Enables the SERIAL over USB subsystem. + */ +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the UART subsystem. + */ +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) +#define HAL_USE_UART FALSE +#endif + +/** + * @brief Enables the USB subsystem. + */ +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) +#define HAL_USE_USB TRUE +#endif + +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + +/*===========================================================================*/ +/* ADC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) +#define ADC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define ADC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* CAN driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Sleep mode related APIs inclusion switch. + */ +#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/*===========================================================================*/ +/* I2C driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the mutual exclusion APIs on the I2C bus. + */ +#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define I2C_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* MAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) +#define MAC_USE_ZERO_COPY FALSE +#endif + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) +#define MAC_USE_EVENTS TRUE +#endif + +/*===========================================================================*/ +/* MMC_SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + * This option is recommended also if the SPI driver does not + * use a DMA channel and heavily loads the CPU. + */ +#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) +#define MMC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SDC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Number of initialization attempts before rejecting the card. + * @note Attempts are performed at 10mS intervals. + */ +#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) +#define SDC_INIT_RETRY 100 +#endif + +/** + * @brief Include support for MMC cards. + * @note MMC support is not yet implemented so this option must be kept + * at @p FALSE. + */ +#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) +#define SDC_MMC_SUPPORT FALSE +#endif + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + */ +#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) +#define SDC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SERIAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SERIAL_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Serial buffers size. + * @details Configuration parameter, you can change the depth of the queue + * buffers depending on the requirements of your application. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_BUFFERS_SIZE 16 +#endif + +/*===========================================================================*/ +/* SERIAL_USB driver related setting. */ +/*===========================================================================*/ + +/** + * @brief Serial over USB buffers size. + * @details Configuration parameter, the buffer size must be a multiple of + * the USB data endpoint maximum packet size. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/*===========================================================================*/ +/* SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + + +/*===========================================================================*/ +/* USB driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif + +#endif /* _HALCONF_H_ */ + +/** @} */ diff --git a/keyboards/cannonkeys/iron165/info.json b/keyboards/cannonkeys/iron165/info.json new file mode 100644 index 000000000000..c9d1ebea3b84 --- /dev/null +++ b/keyboards/cannonkeys/iron165/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "Iron165", + "url": "https://cannonkeys.com", + "maintainer": "awkannan", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_default": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"x":15, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, {"x":15, "y":2}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Ctrl", "x":11.25, "y":4, "w":1.25}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] + } + } + +} diff --git a/keyboards/cannonkeys/iron165/iron165.c b/keyboards/cannonkeys/iron165/iron165.c new file mode 100644 index 000000000000..da21712fb2c3 --- /dev/null +++ b/keyboards/cannonkeys/iron165/iron165.c @@ -0,0 +1 @@ +#include "iron165.h" diff --git a/keyboards/cannonkeys/iron165/iron165.h b/keyboards/cannonkeys/iron165/iron165.h new file mode 100644 index 000000000000..d5579a09a409 --- /dev/null +++ b/keyboards/cannonkeys/iron165/iron165.h @@ -0,0 +1,17 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT_default( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K115, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K315, \ + K400, K401, K402, K406, K410, K411, K412, K413, K415 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, KC_NO }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO, K115 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO, K215 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, K315 }, \ + { K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, K412, K413, KC_NO, K415 } \ +} diff --git a/keyboards/cannonkeys/iron165/keymaps/default/keymap.c b/keyboards/cannonkeys/iron165/keymaps/default/keymap.c new file mode 100644 index 000000000000..12c2a699375f --- /dev/null +++ b/keyboards/cannonkeys/iron165/keymaps/default/keymap.c @@ -0,0 +1,47 @@ +/* +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 . +*/ +#include QMK_KEYBOARD_H + + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_names { + _BASE, + _FN1, +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = LAYOUT_default( + KC_GESC, 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_GRV, 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_DEL, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUBS, KC_ENT, KC_PGUP, + KC_LSFT, KC_NUHS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_FN1] = LAYOUT_default( + KC_GESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_TRNS, + KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + BL_BRTG, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + BL_INC, BL_DEC, BL_TOGG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_GRV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/cannonkeys/iron165/keymaps/via/keymap.c b/keyboards/cannonkeys/iron165/keymaps/via/keymap.c new file mode 100644 index 000000000000..ac0efd62c443 --- /dev/null +++ b/keyboards/cannonkeys/iron165/keymaps/via/keymap.c @@ -0,0 +1,46 @@ +/* +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 . +*/ +#include QMK_KEYBOARD_H + + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_names { + _BASE, + _FN1, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = LAYOUT_default( + KC_GESC, 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_GRV, 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_BSLS, KC_DEL, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUBS, KC_ENT, KC_PGUP, + KC_LSFT, KC_NUHS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_FN1] = LAYOUT_default( + KC_GESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_TRNS, + KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + BL_BRTG, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + BL_INC, BL_DEC, BL_TOGG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_GRV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/cannonkeys/iron165/keymaps/via/rules.mk b/keyboards/cannonkeys/iron165/keymaps/via/rules.mk new file mode 100644 index 000000000000..d12497792d56 --- /dev/null +++ b/keyboards/cannonkeys/iron165/keymaps/via/rules.mk @@ -0,0 +1,5 @@ +# rules.mk overrides to enable VIA + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes + diff --git a/keyboards/cannonkeys/iron165/mcuconf.h b/keyboards/cannonkeys/iron165/mcuconf.h new file mode 100644 index 000000000000..0e49478c8b05 --- /dev/null +++ b/keyboards/cannonkeys/iron165/mcuconf.h @@ -0,0 +1,176 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef _MCUCONF_H_ +#define _MCUCONF_H_ + +/* + * STM32F0xx drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 3...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +#define STM32F0xx_MCUCONF +// #define STM32F070xB + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_HSI_ENABLED TRUE +#define STM32_HSI14_ENABLED TRUE +#define STM32_HSI48_ENABLED FALSE +#define STM32_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED FALSE +#define STM32_LSE_ENABLED FALSE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSI_DIV2 +#define STM32_PREDIV_VALUE 1 +#define STM32_PLLMUL_VALUE 12 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE STM32_PPRE_DIV1 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_USBSW STM32_USBSW_HSI48 +#define STM32_CECSW STM32_CECSW_HSI +#define STM32_I2C1SW STM32_I2C1SW_HSI +#define STM32_USART1SW STM32_USART1SW_PCLK +#define STM32_RTCSEL STM32_RTCSEL_LSI + +/* + * ADC driver system settings. + */ +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_IRQ_PRIORITY 2 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 2 + +/* + * EXT driver system settings. + */ +#define STM32_EXT_EXTI0_1_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI2_3_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI4_15_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI16_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI17_IRQ_PRIORITY 3 + +/* + * GPT driver system settings. + */ +#define STM32_GPT_USE_TIM1 FALSE +#define STM32_GPT_USE_TIM2 FALSE +#define STM32_GPT_USE_TIM3 FALSE +#define STM32_GPT_USE_TIM14 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 2 +#define STM32_GPT_TIM2_IRQ_PRIORITY 2 +#define STM32_GPT_TIM3_IRQ_PRIORITY 2 +#define STM32_GPT_TIM14_IRQ_PRIORITY 2 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 FALSE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_IRQ_PRIORITY 3 +#define STM32_I2C_I2C2_IRQ_PRIORITY 3 +#define STM32_I2C_USE_DMA TRUE +#define STM32_I2C_I2C1_DMA_PRIORITY 1 +#define STM32_I2C_I2C2_DMA_PRIORITY 1 +#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * ICU driver system settings. + */ +#define STM32_ICU_USE_TIM1 FALSE +#define STM32_ICU_USE_TIM2 FALSE +#define STM32_ICU_USE_TIM3 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 3 +#define STM32_ICU_TIM2_IRQ_PRIORITY 3 +#define STM32_ICU_TIM3_IRQ_PRIORITY 3 + +/* + * PWM driver system settings. + */ +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 FALSE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 TRUE +#define STM32_PWM_TIM1_IRQ_PRIORITY 3 +#define STM32_PWM_TIM2_IRQ_PRIORITY 3 +#define STM32_PWM_TIM3_IRQ_PRIORITY 3 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USART1_PRIORITY 3 +#define STM32_SERIAL_USART2_PRIORITY 3 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 FALSE +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 2 +#define STM32_ST_USE_TIMER 2 + +/* + * UART driver system settings. + */ +#define STM32_UART_USE_USART1 FALSE +#define STM32_UART_USE_USART2 FALSE +#define STM32_UART_USART1_IRQ_PRIORITY 3 +#define STM32_UART_USART2_IRQ_PRIORITY 3 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_USB1 TRUE +#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE +#define STM32_USB_USB1_LP_IRQ_PRIORITY 3 + +#endif /* _MCUCONF_H_ */ diff --git a/keyboards/cannonkeys/iron165/readme.md b/keyboards/cannonkeys/iron165/readme.md new file mode 100644 index 000000000000..6cfb7a206763 --- /dev/null +++ b/keyboards/cannonkeys/iron165/readme.md @@ -0,0 +1,12 @@ +# Smith+Rune Iron165 + +Iron165 Keyboard + +Keyboard Maintainer: [Andrew Kannan](/~https://github.com/awkannan) +Hardware Supported: STM32F072CBT6 + +Make example for this keyboard (after setting up your build environment): + + make cannonkeys/iron165:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/cannonkeys/iron165/rules.mk b/keyboards/cannonkeys/iron165/rules.mk new file mode 100644 index 000000000000..5480987a3375 --- /dev/null +++ b/keyboards/cannonkeys/iron165/rules.mk @@ -0,0 +1,55 @@ +# project specific files +# SRC = ssd1306.c +## chip/board settings +# the next two should match the directories in +# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F0xx +# linker script to use +# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +MCU_LDSCRIPT = STM32F072xB +# startup code to use +# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f0xx +# it should exist either in /os/hal/boards/ +# or /boards +BOARD = ST_STM32F072B_DISCOVERY +# Cortex version +# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 +MCU = cortex-m0 +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +ARMV = 6 +# If you want to be able to jump to bootloader from firmware on STM32 MCUs, +# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in +# ./bootloader_defs.h or in ./boards//bootloader_defs.h (if you have +# a custom board definition that you plan to reuse). +# If you're not setting it here, leave it commented out. +# It is chip dependent, the correct number can be looked up here (page 175): +# http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf +# This also requires a patch to chibios: +# /tmk_core/tool/chibios/ch-bootloader-jump.patch +#STM32_BOOTLOADER_ADDRESS = 0x1FFFC800 + +# Build Options +# comment out to disable the options. +# + +# project specific files +VPATH += keyboards/cannonkeys/stm32f072 +SRC = keyboard.c \ + led.c + +DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave +DFU_SUFFIX_ARGS = -v 0483 -p DF11 + +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +CUSTOM_MATRIX = no # Custom matrix file +# BACKLIGHT_ENABLE = yes # This is broken on 072 for some reason +RGBLIGHT_ENABLE = no diff --git a/keyboards/cannonkeys/savage65/boards/ST_STM32F072B_DISCOVERY/board.c b/keyboards/cannonkeys/savage65/boards/ST_STM32F072B_DISCOVERY/board.c new file mode 100644 index 000000000000..9d10fbd754da --- /dev/null +++ b/keyboards/cannonkeys/savage65/boards/ST_STM32F072B_DISCOVERY/board.c @@ -0,0 +1,109 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/* + * This file has been automatically generated using ChibiStudio board + * generator plugin. Do not edit manually. + */ + +#include "hal.h" + +#if HAL_USE_PAL || defined(__DOXYGEN__) +/** + * @brief PAL setup. + * @details Digital I/O ports static configuration as defined in @p board.h. + * This variable is used by the HAL when initializing the PAL driver. + */ +const PALConfig pal_default_config = { +#if STM32_HAS_GPIOA + {VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR, + VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH}, +#endif +#if STM32_HAS_GPIOB + {VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR, + VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH}, +#endif +#if STM32_HAS_GPIOC + {VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR, + VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH}, +#endif +#if STM32_HAS_GPIOD + {VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR, + VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH}, +#endif +#if STM32_HAS_GPIOE + {VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR, + VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH}, +#endif +#if STM32_HAS_GPIOF + {VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR, + VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH}, +#endif +#if STM32_HAS_GPIOG + {VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR, + VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH}, +#endif +#if STM32_HAS_GPIOH + {VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR, + VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH}, +#endif +#if STM32_HAS_GPIOI + {VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR, + VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH} +#endif +}; +#endif + +void enter_bootloader_mode_if_requested(void); + +/** + * @brief Early initialization code. + * @details This initialization must be performed just after stack setup + * and before any other initialization. + */ +void __early_init(void) { + enter_bootloader_mode_if_requested(); + stm32_clock_init(); +} + +#if HAL_USE_MMC_SPI || defined(__DOXYGEN__) +/** + * @brief MMC_SPI card detection. + */ +bool mmc_lld_is_card_inserted(MMCDriver *mmcp) { + + (void)mmcp; + /* TODO: Fill the implementation.*/ + return true; +} + +/** + * @brief MMC_SPI card write protection detection. + */ +bool mmc_lld_is_write_protected(MMCDriver *mmcp) { + + (void)mmcp; + /* TODO: Fill the implementation.*/ + return false; +} +#endif + +/** + * @brief Board-specific initialization code. + * @todo Add your board-specific code, if any. + */ +void boardInit(void) { +} diff --git a/keyboards/cannonkeys/savage65/boards/ST_STM32F072B_DISCOVERY/board.h b/keyboards/cannonkeys/savage65/boards/ST_STM32F072B_DISCOVERY/board.h new file mode 100644 index 000000000000..de3a93d1ceb0 --- /dev/null +++ b/keyboards/cannonkeys/savage65/boards/ST_STM32F072B_DISCOVERY/board.h @@ -0,0 +1,922 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/* + * This file has been automatically generated using ChibiStudio board + * generator plugin. Do not edit manually. + */ + +#ifndef BOARD_H +#define BOARD_H + +/* + * Setup for ST STM32F072B-Discovery board. + */ + +/* + * Board identifier. + */ +#define BOARD_ST_STM32F072B_DISCOVERY +#define BOARD_NAME "ST STM32F072B-Discovery" + +/* + * Board oscillators-related settings. + * NOTE: HSE not fitted. + */ +#if !defined(STM32_LSECLK) +#define STM32_LSECLK 32768 +#endif + +#define STM32_LSEDRV (3U << 3U) + +#if !defined(STM32_HSECLK) +#define STM32_HSECLK 0U +#endif + +#define STM32_HSE_BYPASS + +/* + * MCU type as defined in the ST header. + */ +#define STM32F072xB + +/* + * IO pins assignments. + */ +#define GPIOA_BUTTON 0U +#define GPIOA_PIN1 1U +#define GPIOA_PIN2 2U +#define GPIOA_PIN3 3U +#define GPIOA_PIN4 4U +#define GPIOA_PIN5 5U +#define GPIOA_PIN6 6U +#define GPIOA_PIN7 7U +#define GPIOA_PIN8 8U +#define GPIOA_PIN9 9U +#define GPIOA_PIN10 10U +#define GPIOA_USB_DM 11U +#define GPIOA_USB_DP 12U +#define GPIOA_SWDIO 13U +#define GPIOA_SWCLK 14U +#define GPIOA_PIN15 15U + +#define GPIOB_PIN0 0U +#define GPIOB_PIN1 1U +#define GPIOB_PIN2 2U +#define GPIOB_PIN3 3U +#define GPIOB_PIN4 4U +#define GPIOB_PIN5 5U +#define GPIOB_PIN6 6U +#define GPIOB_PIN7 7U +#define GPIOB_PIN8 8U +#define GPIOB_PIN9 9U +#define GPIOB_PIN10 10U +#define GPIOB_PIN11 11U +#define GPIOB_PIN12 12U +#define GPIOB_SPI2_SCK 13U +#define GPIOB_SPI2_MISO 14U +#define GPIOB_SPI2_MOSI 15U + +#define GPIOC_MEMS_CS 0U +#define GPIOC_PIN1 1U +#define GPIOC_PIN2 2U +#define GPIOC_PIN3 3U +#define GPIOC_PIN4 4U +#define GPIOC_PIN5 5U +#define GPIOC_LED_RED 6U +#define GPIOC_LED_BLUE 7U +#define GPIOC_LED_ORANGE 8U +#define GPIOC_LED_GREEN 9U +#define GPIOC_PIN10 10U +#define GPIOC_PIN11 11U +#define GPIOC_PIN12 12U +#define GPIOC_PIN13 13U +#define GPIOC_OSC32_IN 14U +#define GPIOC_OSC32_OUT 15U + +#define GPIOD_PIN0 0U +#define GPIOD_PIN1 1U +#define GPIOD_PIN2 2U +#define GPIOD_PIN3 3U +#define GPIOD_PIN4 4U +#define GPIOD_PIN5 5U +#define GPIOD_PIN6 6U +#define GPIOD_PIN7 7U +#define GPIOD_PIN8 8U +#define GPIOD_PIN9 9U +#define GPIOD_PIN10 10U +#define GPIOD_PIN11 11U +#define GPIOD_PIN12 12U +#define GPIOD_PIN13 13U +#define GPIOD_PIN14 14U +#define GPIOD_PIN15 15U + +#define GPIOE_PIN0 0U +#define GPIOE_PIN1 1U +#define GPIOE_PIN2 2U +#define GPIOE_PIN3 3U +#define GPIOE_PIN4 4U +#define GPIOE_PIN5 5U +#define GPIOE_PIN6 6U +#define GPIOE_PIN7 7U +#define GPIOE_PIN8 8U +#define GPIOE_PIN9 9U +#define GPIOE_PIN10 10U +#define GPIOE_PIN11 11U +#define GPIOE_PIN12 12U +#define GPIOE_PIN13 13U +#define GPIOE_PIN14 14U +#define GPIOE_PIN15 15U + +#define GPIOF_OSC_IN 0U +#define GPIOF_OSC_OUT 1U +#define GPIOF_PIN2 2U +#define GPIOF_PIN3 3U +#define GPIOF_PIN4 4U +#define GPIOF_PIN5 5U +#define GPIOF_PIN6 6U +#define GPIOF_PIN7 7U +#define GPIOF_PIN8 8U +#define GPIOF_PIN9 9U +#define GPIOF_PIN10 10U +#define GPIOF_PIN11 11U +#define GPIOF_PIN12 12U +#define GPIOF_PIN13 13U +#define GPIOF_PIN14 14U +#define GPIOF_PIN15 15U + +/* + * IO lines assignments. + */ +#define LINE_BUTTON PAL_LINE(GPIOA, 0U) +#define LINE_USB_DM PAL_LINE(GPIOA, 11U) +#define LINE_USB_DP PAL_LINE(GPIOA, 12U) +#define LINE_SWDIO PAL_LINE(GPIOA, 13U) +#define LINE_SWCLK PAL_LINE(GPIOA, 14U) + +#define LINE_SPI2_SCK PAL_LINE(GPIOB, 13U) +#define LINE_SPI2_MISO PAL_LINE(GPIOB, 14U) +#define LINE_SPI2_MOSI PAL_LINE(GPIOB, 15U) + +#define LINE_MEMS_CS PAL_LINE(GPIOC, 0U) +#define LINE_LED_RED PAL_LINE(GPIOC, 6U) +#define LINE_LED_BLUE PAL_LINE(GPIOC, 7U) +#define LINE_LED_ORANGE PAL_LINE(GPIOC, 8U) +#define LINE_LED_GREEN PAL_LINE(GPIOC, 9U) +#define LINE_OSC32_IN PAL_LINE(GPIOC, 14U) +#define LINE_OSC32_OUT PAL_LINE(GPIOC, 15U) + + + +#define LINE_OSC_IN PAL_LINE(GPIOF, 0U) +#define LINE_OSC_OUT PAL_LINE(GPIOF, 1U) + +/* + * I/O ports initial setup, this configuration is established soon after reset + * in the initialization code. + * Please refer to the STM32 Reference Manual for details. + */ +#define PIN_MODE_INPUT(n) (0U << ((n) * 2U)) +#define PIN_MODE_OUTPUT(n) (1U << ((n) * 2U)) +#define PIN_MODE_ALTERNATE(n) (2U << ((n) * 2U)) +#define PIN_MODE_ANALOG(n) (3U << ((n) * 2U)) +#define PIN_ODR_LOW(n) (0U << (n)) +#define PIN_ODR_HIGH(n) (1U << (n)) +#define PIN_OTYPE_PUSHPULL(n) (0U << (n)) +#define PIN_OTYPE_OPENDRAIN(n) (1U << (n)) +#define PIN_OSPEED_VERYLOW(n) (0U << ((n) * 2U)) +#define PIN_OSPEED_LOW(n) (1U << ((n) * 2U)) +#define PIN_OSPEED_MEDIUM(n) (2U << ((n) * 2U)) +#define PIN_OSPEED_HIGH(n) (3U << ((n) * 2U)) +#define PIN_PUPDR_FLOATING(n) (0U << ((n) * 2U)) +#define PIN_PUPDR_PULLUP(n) (1U << ((n) * 2U)) +#define PIN_PUPDR_PULLDOWN(n) (2U << ((n) * 2U)) +#define PIN_AFIO_AF(n, v) ((v) << (((n) % 8U) * 4U)) + +/* + * GPIOA setup: + * + * PA0 - BUTTON (input floating). + * PA1 - PIN1 (input pullup). + * PA2 - PIN2 (input pullup). + * PA3 - PIN3 (input pullup). + * PA4 - PIN4 (input pullup). + * PA5 - PIN5 (input pullup). + * PA6 - PIN6 (input pullup). + * PA7 - PIN7 (input pullup). + * PA8 - PIN8 (input pullup). + * PA9 - PIN9 (input pullup). + * PA10 - PIN10 (input pullup). + * PA11 - USB_DM (input floating). + * PA12 - USB_DP (input floating). + * PA13 - SWDIO (alternate 0). + * PA14 - SWCLK (alternate 0). + * PA15 - PIN15 (input pullup). + */ +#define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_BUTTON) | \ + PIN_MODE_INPUT(GPIOA_PIN1) | \ + PIN_MODE_INPUT(GPIOA_PIN2) | \ + PIN_MODE_INPUT(GPIOA_PIN3) | \ + PIN_MODE_INPUT(GPIOA_PIN4) | \ + PIN_MODE_INPUT(GPIOA_PIN5) | \ + PIN_MODE_INPUT(GPIOA_PIN6) | \ + PIN_MODE_INPUT(GPIOA_PIN7) | \ + PIN_MODE_INPUT(GPIOA_PIN8) | \ + PIN_MODE_INPUT(GPIOA_PIN9) | \ + PIN_MODE_INPUT(GPIOA_PIN10) | \ + PIN_MODE_INPUT(GPIOA_USB_DM) | \ + PIN_MODE_INPUT(GPIOA_USB_DP) | \ + PIN_MODE_ALTERNATE(GPIOA_SWDIO) | \ + PIN_MODE_ALTERNATE(GPIOA_SWCLK) | \ + PIN_MODE_INPUT(GPIOA_PIN15)) +#define VAL_GPIOA_OTYPER (PIN_OTYPE_PUSHPULL(GPIOA_BUTTON) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOA_USB_DM) | \ + PIN_OTYPE_PUSHPULL(GPIOA_USB_DP) | \ + PIN_OTYPE_PUSHPULL(GPIOA_SWDIO) | \ + PIN_OTYPE_PUSHPULL(GPIOA_SWCLK) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN15)) +#define VAL_GPIOA_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOA_BUTTON) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOA_USB_DM) | \ + PIN_OSPEED_VERYLOW(GPIOA_USB_DP) | \ + PIN_OSPEED_HIGH(GPIOA_SWDIO) | \ + PIN_OSPEED_HIGH(GPIOA_SWCLK) | \ + PIN_OSPEED_HIGH(GPIOA_PIN15)) +#define VAL_GPIOA_PUPDR (PIN_PUPDR_FLOATING(GPIOA_BUTTON) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN10) | \ + PIN_PUPDR_FLOATING(GPIOA_USB_DM) | \ + PIN_PUPDR_FLOATING(GPIOA_USB_DP) | \ + PIN_PUPDR_PULLUP(GPIOA_SWDIO) | \ + PIN_PUPDR_PULLDOWN(GPIOA_SWCLK) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN15)) +#define VAL_GPIOA_ODR (PIN_ODR_HIGH(GPIOA_BUTTON) | \ + PIN_ODR_HIGH(GPIOA_PIN1) | \ + PIN_ODR_HIGH(GPIOA_PIN2) | \ + PIN_ODR_HIGH(GPIOA_PIN3) | \ + PIN_ODR_HIGH(GPIOA_PIN4) | \ + PIN_ODR_HIGH(GPIOA_PIN5) | \ + PIN_ODR_HIGH(GPIOA_PIN6) | \ + PIN_ODR_HIGH(GPIOA_PIN7) | \ + PIN_ODR_HIGH(GPIOA_PIN8) | \ + PIN_ODR_HIGH(GPIOA_PIN9) | \ + PIN_ODR_HIGH(GPIOA_PIN10) | \ + PIN_ODR_HIGH(GPIOA_USB_DM) | \ + PIN_ODR_HIGH(GPIOA_USB_DP) | \ + PIN_ODR_HIGH(GPIOA_SWDIO) | \ + PIN_ODR_HIGH(GPIOA_SWCLK) | \ + PIN_ODR_HIGH(GPIOA_PIN15)) +#define VAL_GPIOA_AFRL (PIN_AFIO_AF(GPIOA_BUTTON, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN7, 0U)) +#define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOA_USB_DM, 0U) | \ + PIN_AFIO_AF(GPIOA_USB_DP, 0U) | \ + PIN_AFIO_AF(GPIOA_SWDIO, 0U) | \ + PIN_AFIO_AF(GPIOA_SWCLK, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN15, 0U)) + +/* + * GPIOB setup: + * + * PB0 - PIN0 (input pullup). + * PB1 - PIN1 (input pullup). + * PB2 - PIN2 (input pullup). + * PB3 - PIN3 (input pullup). + * PB4 - PIN4 (input pullup). + * PB5 - PIN5 (input pullup). + * PB6 - PIN6 (input pullup). + * PB7 - PIN7 (input pullup). + * PB8 - PIN8 (input pullup). + * PB9 - PIN9 (input pullup). + * PB10 - PIN10 (input pullup). + * PB11 - PIN11 (input pullup). + * PB12 - PIN12 (input pullup). + * PB13 - SPI2_SCK (alternate 0). + * PB14 - SPI2_MISO (alternate 0). + * PB15 - SPI2_MOSI (alternate 0). + */ +#define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_PIN0) | \ + PIN_MODE_INPUT(GPIOB_PIN1) | \ + PIN_MODE_INPUT(GPIOB_PIN2) | \ + PIN_MODE_INPUT(GPIOB_PIN3) | \ + PIN_MODE_INPUT(GPIOB_PIN4) | \ + PIN_MODE_INPUT(GPIOB_PIN5) | \ + PIN_MODE_INPUT(GPIOB_PIN6) | \ + PIN_MODE_INPUT(GPIOB_PIN7) | \ + PIN_MODE_INPUT(GPIOB_PIN8) | \ + PIN_MODE_INPUT(GPIOB_PIN9) | \ + PIN_MODE_INPUT(GPIOB_PIN10) | \ + PIN_MODE_INPUT(GPIOB_PIN11) | \ + PIN_MODE_INPUT(GPIOB_PIN12) | \ + PIN_MODE_ALTERNATE(GPIOB_SPI2_SCK) | \ + PIN_MODE_ALTERNATE(GPIOB_SPI2_MISO) | \ + PIN_MODE_ALTERNATE(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_OTYPER (PIN_OTYPE_PUSHPULL(GPIOB_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOB_SPI2_SCK) | \ + PIN_OTYPE_PUSHPULL(GPIOB_SPI2_MISO) | \ + PIN_OTYPE_PUSHPULL(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOB_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN1) | \ + PIN_OSPEED_HIGH(GPIOB_PIN2) | \ + PIN_OSPEED_HIGH(GPIOB_PIN3) | \ + PIN_OSPEED_HIGH(GPIOB_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOB_SPI2_SCK) | \ + PIN_OSPEED_VERYLOW(GPIOB_SPI2_MISO) | \ + PIN_OSPEED_VERYLOW(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN12) | \ + PIN_PUPDR_FLOATING(GPIOB_SPI2_SCK) | \ + PIN_PUPDR_FLOATING(GPIOB_SPI2_MISO) | \ + PIN_PUPDR_FLOATING(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_ODR (PIN_ODR_HIGH(GPIOB_PIN0) | \ + PIN_ODR_HIGH(GPIOB_PIN1) | \ + PIN_ODR_HIGH(GPIOB_PIN2) | \ + PIN_ODR_HIGH(GPIOB_PIN3) | \ + PIN_ODR_HIGH(GPIOB_PIN4) | \ + PIN_ODR_HIGH(GPIOB_PIN5) | \ + PIN_ODR_HIGH(GPIOB_PIN6) | \ + PIN_ODR_HIGH(GPIOB_PIN7) | \ + PIN_ODR_HIGH(GPIOB_PIN8) | \ + PIN_ODR_HIGH(GPIOB_PIN9) | \ + PIN_ODR_HIGH(GPIOB_PIN10) | \ + PIN_ODR_HIGH(GPIOB_PIN11) | \ + PIN_ODR_HIGH(GPIOB_PIN12) | \ + PIN_ODR_HIGH(GPIOB_SPI2_SCK) | \ + PIN_ODR_HIGH(GPIOB_SPI2_MISO) | \ + PIN_ODR_HIGH(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN7, 0U)) +#define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOB_SPI2_SCK, 0U) | \ + PIN_AFIO_AF(GPIOB_SPI2_MISO, 0U) | \ + PIN_AFIO_AF(GPIOB_SPI2_MOSI, 0U)) + +/* + * GPIOC setup: + * + * PC0 - MEMS_CS (output pushpull maximum). + * PC1 - PIN1 (input pullup). + * PC2 - PIN2 (input pullup). + * PC3 - PIN3 (input pullup). + * PC4 - PIN4 (input pullup). + * PC5 - PIN5 (input pullup). + * PC6 - LED_RED (output pushpull maximum). + * PC7 - LED_BLUE (output pushpull maximum). + * PC8 - LED_ORANGE (output pushpull maximum). + * PC9 - LED_GREEN (output pushpull maximum). + * PC10 - PIN10 (input pullup). + * PC11 - PIN11 (input pullup). + * PC12 - PIN12 (input pullup). + * PC13 - PIN13 (input pullup). + * PC14 - OSC32_IN (input floating). + * PC15 - OSC32_OUT (input floating). + */ +#define VAL_GPIOC_MODER (PIN_MODE_OUTPUT(GPIOC_MEMS_CS) | \ + PIN_MODE_INPUT(GPIOC_PIN1) | \ + PIN_MODE_INPUT(GPIOC_PIN2) | \ + PIN_MODE_INPUT(GPIOC_PIN3) | \ + PIN_MODE_INPUT(GPIOC_PIN4) | \ + PIN_MODE_INPUT(GPIOC_PIN5) | \ + PIN_MODE_OUTPUT(GPIOC_LED_RED) | \ + PIN_MODE_OUTPUT(GPIOC_LED_BLUE) | \ + PIN_MODE_OUTPUT(GPIOC_LED_ORANGE) | \ + PIN_MODE_OUTPUT(GPIOC_LED_GREEN) | \ + PIN_MODE_INPUT(GPIOC_PIN10) | \ + PIN_MODE_INPUT(GPIOC_PIN11) | \ + PIN_MODE_INPUT(GPIOC_PIN12) | \ + PIN_MODE_INPUT(GPIOC_PIN13) | \ + PIN_MODE_INPUT(GPIOC_OSC32_IN) | \ + PIN_MODE_INPUT(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_MEMS_CS) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_RED) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_BLUE) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_ORANGE) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_GREEN) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOC_OSC32_IN) | \ + PIN_OTYPE_PUSHPULL(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_OSPEEDR (PIN_OSPEED_HIGH(GPIOC_MEMS_CS) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN5) | \ + PIN_OSPEED_HIGH(GPIOC_LED_RED) | \ + PIN_OSPEED_HIGH(GPIOC_LED_BLUE) | \ + PIN_OSPEED_HIGH(GPIOC_LED_ORANGE) | \ + PIN_OSPEED_HIGH(GPIOC_LED_GREEN) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN13) | \ + PIN_OSPEED_HIGH(GPIOC_OSC32_IN) | \ + PIN_OSPEED_HIGH(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_PUPDR (PIN_PUPDR_FLOATING(GPIOC_MEMS_CS) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN5) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_RED) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_BLUE) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_ORANGE) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_GREEN) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN13) | \ + PIN_PUPDR_FLOATING(GPIOC_OSC32_IN) | \ + PIN_PUPDR_FLOATING(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_MEMS_CS) | \ + PIN_ODR_HIGH(GPIOC_PIN1) | \ + PIN_ODR_HIGH(GPIOC_PIN2) | \ + PIN_ODR_HIGH(GPIOC_PIN3) | \ + PIN_ODR_HIGH(GPIOC_PIN4) | \ + PIN_ODR_HIGH(GPIOC_PIN5) | \ + PIN_ODR_LOW(GPIOC_LED_RED) | \ + PIN_ODR_LOW(GPIOC_LED_BLUE) | \ + PIN_ODR_LOW(GPIOC_LED_ORANGE) | \ + PIN_ODR_LOW(GPIOC_LED_GREEN) | \ + PIN_ODR_HIGH(GPIOC_PIN10) | \ + PIN_ODR_HIGH(GPIOC_PIN11) | \ + PIN_ODR_HIGH(GPIOC_PIN12) | \ + PIN_ODR_HIGH(GPIOC_PIN13) | \ + PIN_ODR_HIGH(GPIOC_OSC32_IN) | \ + PIN_ODR_HIGH(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_MEMS_CS, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOC_LED_RED, 0U) | \ + PIN_AFIO_AF(GPIOC_LED_BLUE, 0U)) +#define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_LED_ORANGE, 0U) | \ + PIN_AFIO_AF(GPIOC_LED_GREEN, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOC_OSC32_IN, 0U) | \ + PIN_AFIO_AF(GPIOC_OSC32_OUT, 0U)) + +/* + * GPIOD setup: + * + * PD0 - PIN0 (input pullup). + * PD1 - PIN1 (input pullup). + * PD2 - PIN2 (input pullup). + * PD3 - PIN3 (input pullup). + * PD4 - PIN4 (input pullup). + * PD5 - PIN5 (input pullup). + * PD6 - PIN6 (input pullup). + * PD7 - PIN7 (input pullup). + * PD8 - PIN8 (input pullup). + * PD9 - PIN9 (input pullup). + * PD10 - PIN10 (input pullup). + * PD11 - PIN11 (input pullup). + * PD12 - PIN12 (input pullup). + * PD13 - PIN13 (input pullup). + * PD14 - PIN14 (input pullup). + * PD15 - PIN15 (input pullup). + */ +#define VAL_GPIOD_MODER (PIN_MODE_INPUT(GPIOD_PIN0) | \ + PIN_MODE_INPUT(GPIOD_PIN1) | \ + PIN_MODE_INPUT(GPIOD_PIN2) | \ + PIN_MODE_INPUT(GPIOD_PIN3) | \ + PIN_MODE_INPUT(GPIOD_PIN4) | \ + PIN_MODE_INPUT(GPIOD_PIN5) | \ + PIN_MODE_INPUT(GPIOD_PIN6) | \ + PIN_MODE_INPUT(GPIOD_PIN7) | \ + PIN_MODE_INPUT(GPIOD_PIN8) | \ + PIN_MODE_INPUT(GPIOD_PIN9) | \ + PIN_MODE_INPUT(GPIOD_PIN10) | \ + PIN_MODE_INPUT(GPIOD_PIN11) | \ + PIN_MODE_INPUT(GPIOD_PIN12) | \ + PIN_MODE_INPUT(GPIOD_PIN13) | \ + PIN_MODE_INPUT(GPIOD_PIN14) | \ + PIN_MODE_INPUT(GPIOD_PIN15)) +#define VAL_GPIOD_OTYPER (PIN_OTYPE_PUSHPULL(GPIOD_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN15)) +#define VAL_GPIOD_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOD_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN15)) +#define VAL_GPIOD_PUPDR (PIN_PUPDR_PULLUP(GPIOD_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN15)) +#define VAL_GPIOD_ODR (PIN_ODR_HIGH(GPIOD_PIN0) | \ + PIN_ODR_HIGH(GPIOD_PIN1) | \ + PIN_ODR_HIGH(GPIOD_PIN2) | \ + PIN_ODR_HIGH(GPIOD_PIN3) | \ + PIN_ODR_HIGH(GPIOD_PIN4) | \ + PIN_ODR_HIGH(GPIOD_PIN5) | \ + PIN_ODR_HIGH(GPIOD_PIN6) | \ + PIN_ODR_HIGH(GPIOD_PIN7) | \ + PIN_ODR_HIGH(GPIOD_PIN8) | \ + PIN_ODR_HIGH(GPIOD_PIN9) | \ + PIN_ODR_HIGH(GPIOD_PIN10) | \ + PIN_ODR_HIGH(GPIOD_PIN11) | \ + PIN_ODR_HIGH(GPIOD_PIN12) | \ + PIN_ODR_HIGH(GPIOD_PIN13) | \ + PIN_ODR_HIGH(GPIOD_PIN14) | \ + PIN_ODR_HIGH(GPIOD_PIN15)) +#define VAL_GPIOD_AFRL (PIN_AFIO_AF(GPIOD_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN7, 0U)) +#define VAL_GPIOD_AFRH (PIN_AFIO_AF(GPIOD_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN15, 0U)) + +/* + * GPIOE setup: + * + * PE0 - PIN0 (input pullup). + * PE1 - PIN1 (input pullup). + * PE2 - PIN2 (input pullup). + * PE3 - PIN3 (input pullup). + * PE4 - PIN4 (input pullup). + * PE5 - PIN5 (input pullup). + * PE6 - PIN6 (input pullup). + * PE7 - PIN7 (input pullup). + * PE8 - PIN8 (input pullup). + * PE9 - PIN9 (input pullup). + * PE10 - PIN10 (input pullup). + * PE11 - PIN11 (input pullup). + * PE12 - PIN12 (input pullup). + * PE13 - PIN13 (input pullup). + * PE14 - PIN14 (input pullup). + * PE15 - PIN15 (input pullup). + */ +#define VAL_GPIOE_MODER (PIN_MODE_INPUT(GPIOE_PIN0) | \ + PIN_MODE_INPUT(GPIOE_PIN1) | \ + PIN_MODE_INPUT(GPIOE_PIN2) | \ + PIN_MODE_INPUT(GPIOE_PIN3) | \ + PIN_MODE_INPUT(GPIOE_PIN4) | \ + PIN_MODE_INPUT(GPIOE_PIN5) | \ + PIN_MODE_INPUT(GPIOE_PIN6) | \ + PIN_MODE_INPUT(GPIOE_PIN7) | \ + PIN_MODE_INPUT(GPIOE_PIN8) | \ + PIN_MODE_INPUT(GPIOE_PIN9) | \ + PIN_MODE_INPUT(GPIOE_PIN10) | \ + PIN_MODE_INPUT(GPIOE_PIN11) | \ + PIN_MODE_INPUT(GPIOE_PIN12) | \ + PIN_MODE_INPUT(GPIOE_PIN13) | \ + PIN_MODE_INPUT(GPIOE_PIN14) | \ + PIN_MODE_INPUT(GPIOE_PIN15)) +#define VAL_GPIOE_OTYPER (PIN_OTYPE_PUSHPULL(GPIOE_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN15)) +#define VAL_GPIOE_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOE_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN15)) +#define VAL_GPIOE_PUPDR (PIN_PUPDR_PULLUP(GPIOE_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN15)) +#define VAL_GPIOE_ODR (PIN_ODR_HIGH(GPIOE_PIN0) | \ + PIN_ODR_HIGH(GPIOE_PIN1) | \ + PIN_ODR_HIGH(GPIOE_PIN2) | \ + PIN_ODR_HIGH(GPIOE_PIN3) | \ + PIN_ODR_HIGH(GPIOE_PIN4) | \ + PIN_ODR_HIGH(GPIOE_PIN5) | \ + PIN_ODR_HIGH(GPIOE_PIN6) | \ + PIN_ODR_HIGH(GPIOE_PIN7) | \ + PIN_ODR_HIGH(GPIOE_PIN8) | \ + PIN_ODR_HIGH(GPIOE_PIN9) | \ + PIN_ODR_HIGH(GPIOE_PIN10) | \ + PIN_ODR_HIGH(GPIOE_PIN11) | \ + PIN_ODR_HIGH(GPIOE_PIN12) | \ + PIN_ODR_HIGH(GPIOE_PIN13) | \ + PIN_ODR_HIGH(GPIOE_PIN14) | \ + PIN_ODR_HIGH(GPIOE_PIN15)) +#define VAL_GPIOE_AFRL (PIN_AFIO_AF(GPIOE_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN7, 0U)) +#define VAL_GPIOE_AFRH (PIN_AFIO_AF(GPIOE_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN15, 0U)) + +/* + * GPIOF setup: + * + * PF0 - OSC_IN (input floating). + * PF1 - OSC_OUT (input floating). + * PF2 - PIN2 (input pullup). + * PF3 - PIN3 (input pullup). + * PF4 - PIN4 (input pullup). + * PF5 - PIN5 (input pullup). + * PF6 - PIN6 (input pullup). + * PF7 - PIN7 (input pullup). + * PF8 - PIN8 (input pullup). + * PF9 - PIN9 (input pullup). + * PF10 - PIN10 (input pullup). + * PF11 - PIN11 (input pullup). + * PF12 - PIN12 (input pullup). + * PF13 - PIN13 (input pullup). + * PF14 - PIN14 (input pullup). + * PF15 - PIN15 (input pullup). + */ +#define VAL_GPIOF_MODER (PIN_MODE_INPUT(GPIOF_OSC_IN) | \ + PIN_MODE_INPUT(GPIOF_OSC_OUT) | \ + PIN_MODE_INPUT(GPIOF_PIN2) | \ + PIN_MODE_INPUT(GPIOF_PIN3) | \ + PIN_MODE_INPUT(GPIOF_PIN4) | \ + PIN_MODE_INPUT(GPIOF_PIN5) | \ + PIN_MODE_INPUT(GPIOF_PIN6) | \ + PIN_MODE_INPUT(GPIOF_PIN7) | \ + PIN_MODE_INPUT(GPIOF_PIN8) | \ + PIN_MODE_INPUT(GPIOF_PIN9) | \ + PIN_MODE_INPUT(GPIOF_PIN10) | \ + PIN_MODE_INPUT(GPIOF_PIN11) | \ + PIN_MODE_INPUT(GPIOF_PIN12) | \ + PIN_MODE_INPUT(GPIOF_PIN13) | \ + PIN_MODE_INPUT(GPIOF_PIN14) | \ + PIN_MODE_INPUT(GPIOF_PIN15)) +#define VAL_GPIOF_OTYPER (PIN_OTYPE_PUSHPULL(GPIOF_OSC_IN) | \ + PIN_OTYPE_PUSHPULL(GPIOF_OSC_OUT) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN15)) +#define VAL_GPIOF_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOF_OSC_IN) | \ + PIN_OSPEED_VERYLOW(GPIOF_OSC_OUT) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN15)) +#define VAL_GPIOF_PUPDR (PIN_PUPDR_FLOATING(GPIOF_OSC_IN) | \ + PIN_PUPDR_FLOATING(GPIOF_OSC_OUT) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN15)) +#define VAL_GPIOF_ODR (PIN_ODR_HIGH(GPIOF_OSC_IN) | \ + PIN_ODR_HIGH(GPIOF_OSC_OUT) | \ + PIN_ODR_HIGH(GPIOF_PIN2) | \ + PIN_ODR_HIGH(GPIOF_PIN3) | \ + PIN_ODR_HIGH(GPIOF_PIN4) | \ + PIN_ODR_HIGH(GPIOF_PIN5) | \ + PIN_ODR_HIGH(GPIOF_PIN6) | \ + PIN_ODR_HIGH(GPIOF_PIN7) | \ + PIN_ODR_HIGH(GPIOF_PIN8) | \ + PIN_ODR_HIGH(GPIOF_PIN9) | \ + PIN_ODR_HIGH(GPIOF_PIN10) | \ + PIN_ODR_HIGH(GPIOF_PIN11) | \ + PIN_ODR_HIGH(GPIOF_PIN12) | \ + PIN_ODR_HIGH(GPIOF_PIN13) | \ + PIN_ODR_HIGH(GPIOF_PIN14) | \ + PIN_ODR_HIGH(GPIOF_PIN15)) +#define VAL_GPIOF_AFRL (PIN_AFIO_AF(GPIOF_OSC_IN, 0U) | \ + PIN_AFIO_AF(GPIOF_OSC_OUT, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN7, 0U)) +#define VAL_GPIOF_AFRH (PIN_AFIO_AF(GPIOF_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN15, 0U)) + + +#if !defined(_FROM_ASM_) +#ifdef __cplusplus +extern "C" { +#endif + void boardInit(void); +#ifdef __cplusplus +} +#endif +#endif /* _FROM_ASM_ */ + +#endif /* BOARD_H */ diff --git a/keyboards/cannonkeys/savage65/boards/ST_STM32F072B_DISCOVERY/board.mk b/keyboards/cannonkeys/savage65/boards/ST_STM32F072B_DISCOVERY/board.mk new file mode 100644 index 000000000000..b98dcdd26c6a --- /dev/null +++ b/keyboards/cannonkeys/savage65/boards/ST_STM32F072B_DISCOVERY/board.mk @@ -0,0 +1,5 @@ +# List of all the board related files. +BOARDSRC = $(BOARD_PATH)/boards/ST_STM32F072B_DISCOVERY/board.c + +# Required include directories +BOARDINC = $(BOARD_PATH)/boards/ST_STM32F072B_DISCOVERY diff --git a/keyboards/cannonkeys/savage65/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg b/keyboards/cannonkeys/savage65/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg new file mode 100644 index 000000000000..9c7cf4fd76a3 --- /dev/null +++ b/keyboards/cannonkeys/savage65/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg @@ -0,0 +1,703 @@ + + + + + resources/gencfg/processors/boards/stm32f0xx/templates + .. + 3.0.x + + ST STM32F072B-Discovery + ST_STM32F072B_DISCOVERY + + STM32F072xB + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/keyboards/cannonkeys/savage65/bootloader_defs.h b/keyboards/cannonkeys/savage65/bootloader_defs.h new file mode 100644 index 000000000000..02c48c4e6dcb --- /dev/null +++ b/keyboards/cannonkeys/savage65/bootloader_defs.h @@ -0,0 +1,7 @@ +/* Address for jumping to bootloader on STM32 chips. */ +/* It is chip dependent, the correct number can be looked up here (page 175): + * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf + * This also requires a patch to chibios: + * /tmk_core/tool/chibios/ch-bootloader-jump.patch + */ +#define STM32_BOOTLOADER_ADDRESS 0x1FFFC800 diff --git a/keyboards/cannonkeys/savage65/chconf.h b/keyboards/cannonkeys/savage65/chconf.h new file mode 100644 index 000000000000..99fa8ce39822 --- /dev/null +++ b/keyboards/cannonkeys/savage65/chconf.h @@ -0,0 +1,524 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/chconf.h + * @brief Configuration file template. + * @details A copy of this file must be placed in each project directory, it + * contains the application specific kernel settings. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#define CH_CFG_ST_RESOLUTION 32 + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#define CH_CFG_ST_FREQUENCY 10000 + +/** + * @brief Time delta constant for the tick-less mode. + * @note If this value is zero then the system uses the classic + * periodic tick. This value represents the minimum number + * of ticks that is safe to specify in a timeout directive. + * The value one is not valid, timeouts are rounded up to + * this value. + */ +#define CH_CFG_ST_TIMEDELTA 2 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel parameters and options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Round robin interval. + * @details This constant is the number of system ticks allowed for the + * threads before preemption occurs. Setting this value to zero + * disables the preemption for threads with equal priority and the + * round robin becomes cooperative. Note that higher priority + * threads can still preempt, the kernel is always preemptive. + * @note Disabling the round robin preemption makes the kernel more compact + * and generally faster. + * @note The round robin preemption is not supported in tickless mode and + * must be set to zero in that case. + */ +#define CH_CFG_TIME_QUANTUM 0 + +/** + * @brief Managed RAM size. + * @details Size of the RAM area to be managed by the OS. If set to zero + * then the whole available RAM is used. The core memory is made + * available to the heap allocator and/or can be used directly through + * the simplified core memory allocator. + * + * @note In order to let the OS manage the whole RAM the linker script must + * provide the @p __heap_base__ and @p __heap_end__ symbols. + * @note Requires @p CH_CFG_USE_MEMCORE. + */ +#define CH_CFG_MEMCORE_SIZE 0 + +/** + * @brief Idle thread automatic spawn suppression. + * @details When this option is activated the function @p chSysInit() + * does not spawn the idle thread. The application @p main() + * function becomes the idle thread and must implement an + * infinite loop. + */ +#define CH_CFG_NO_IDLE_THREAD FALSE + +/* Use __WFI in the idle thread for waiting. Does lower the power + * consumption. */ +#define CORTEX_ENABLE_WFI_IDLE TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Performance options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief OS optimization. + * @details If enabled then time efficient rather than space efficient code + * is used when two possible implementations exist. + * + * @note This is not related to the compiler optimization options. + * @note The default is @p TRUE. + */ +#define CH_CFG_OPTIMIZE_SPEED FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Subsystem options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Time Measurement APIs. + * @details If enabled then the time measurement APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_TM FALSE + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_REGISTRY TRUE + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_WAITEXIT TRUE + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_SEMAPHORES TRUE + +/** + * @brief Semaphores queuing mode. + * @details If enabled then the threads are enqueued on semaphores by + * priority rather than in FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MUTEXES TRUE + +/** + * @brief Enables recursive behavior on mutexes. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @note The default is @p FALSE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE + +/** + * @brief Conditional Variables APIs. + * @details If enabled then the conditional variables APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_CONDVARS TRUE + +/** + * @brief Conditional Variables APIs with timeout. + * @details If enabled then the conditional variables APIs with timeout + * specification are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_CONDVARS. + */ +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_EVENTS TRUE + +/** + * @brief Events Flags APIs with timeout. + * @details If enabled then the events APIs with timeout specification + * are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_EVENTS. + */ +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MESSAGES TRUE + +/** + * @brief Synchronous Messages queuing mode. + * @details If enabled then messages are served by priority rather than in + * FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_MESSAGES. + */ +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE + +/** + * @brief Mailboxes APIs. + * @details If enabled then the asynchronous messages (mailboxes) APIs are + * included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_MAILBOXES TRUE + +/** + * @brief Core Memory Manager APIs. + * @details If enabled then the core memory manager APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMCORE FALSE + +/** + * @brief Heap Allocator APIs. + * @details If enabled then the memory heap allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or + * @p CH_CFG_USE_SEMAPHORES. + * @note Mutexes are recommended. + */ +#define CH_CFG_USE_HEAP FALSE + +/** + * @brief Memory Pools Allocator APIs. + * @details If enabled then the memory pools allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMPOOLS FALSE + +/** + * @brief Dynamic Threads APIs. + * @details If enabled then the dynamic threads creation APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_WAITEXIT. + * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. + */ +#define CH_CFG_USE_DYNAMIC FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_STATISTICS FALSE + +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_SYSTEM_STATE_CHECK FALSE + +/** + * @brief Debug option, parameters checks. + * @details If enabled then the checks on the API functions input + * parameters are activated. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_CHECKS FALSE + +/** + * @brief Debug option, consistency checks. + * @details If enabled then all the assertions in the kernel code are + * activated. This includes consistency checks inside the kernel, + * runtime anomalies and port-defined checks. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_ASSERTS FALSE + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_BUFFER_SIZE 128 + +/** + * @brief Debug option, stack checks. + * @details If enabled then a runtime stack check is performed. + * + * @note The default is @p FALSE. + * @note The stack check is performed in a architecture/port dependent way. + * It may not be implemented or some ports. + * @note The default failure mode is to halt the system with the global + * @p panic_msg variable set to @p NULL. + */ +#define CH_DBG_ENABLE_STACK_CHECK FALSE + +/** + * @brief Debug option, stacks initialization. + * @details If enabled then the threads working area is filled with a byte + * value when a thread is created. This can be useful for the + * runtime measurement of the used stack. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_FILL_THREADS FALSE + +/** + * @brief Debug option, threads profiling. + * @details If enabled then a field is added to the @p thread_t structure that + * counts the system ticks occurred while executing the thread. + * + * @note The default is @p FALSE. + * @note This debug option is not currently compatible with the + * tickless mode. + */ +#define CH_DBG_THREADS_PROFILING FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Threads descriptor structure extension. + * @details User fields added to the end of the @p thread_t structure. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p chThdInit() API. + * + * @note It is invoked from within @p chThdInit() and implicitly from all + * the threads creation APIs. + */ +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads finalization hook. + * @details User finalization code added to the @p chThdExit() API. + */ +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ + /* Add threads finalization code here.*/ \ +} + +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* Context switch code here.*/ \ +} + +/** + * @brief ISR enter hook. + */ +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} + +/** + * @brief ISR exit hook. + */ +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} + +/** + * @brief Idle thread enter hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to activate a power saving mode. + */ +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ +} + +/** + * @brief Idle thread leave hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to deactivate a power saving mode. + */ +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ +} + +/** + * @brief Idle Loop hook. + * @details This hook is continuously invoked by the idle thread loop. + */ +#define CH_CFG_IDLE_LOOP_HOOK() { \ + /* Idle loop code here.*/ \ +} + +/** + * @brief System tick event hook. + * @details This hook is invoked in the system tick handler immediately + * after processing the virtual timers queue. + */ +#define CH_CFG_SYSTEM_TICK_HOOK() { \ + /* System tick event code here.*/ \ +} + +/** + * @brief System halt hook. + * @details This hook is invoked in case to a system halting error before + * the system is halted. + */ +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ + /* System halt code here.*/ \ +} + +/** + * @brief Trace hook. + * @details This hook is invoked each time a new record is written in the + * trace buffer. + */ +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} + +/** @} */ + +/*===========================================================================*/ +/* Port-specific settings (override port settings defaulted in chcore.h). */ +/*===========================================================================*/ + +#endif /* CHCONF_H */ + +/** @} */ diff --git a/keyboards/cannonkeys/savage65/config.h b/keyboards/cannonkeys/savage65/config.h new file mode 100644 index 000000000000..996b93951508 --- /dev/null +++ b/keyboards/cannonkeys/savage65/config.h @@ -0,0 +1,97 @@ +/* +Copyright 2015 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 . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xCA04 +#define PRODUCT_ID 0x5A65 +#define DEVICE_VER 0x0001 +/* in python2: list(u"whatever".encode('utf-16-le')) */ +/* at most 32 characters or the ugly hack in usb_main.c borks */ +#define MANUFACTURER CannonKeys +#define PRODUCT Savage65 +#define DESCRIPTION Savage65 Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 16 + +#define MATRIX_COL_PINS { A5, B10, A3, A2, B0, A9, C13, B9, B8, B7, B6, B5, B4, B3, A15, A14 } +#define MATRIX_ROW_PINS { B12, B11, B14, A8, A1 } +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_LEVELS 6 +#define BACKLIGHT_BREATHING +#define BREATHING_PERIOD 6 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 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 + +#define RGBLIGHT_ANIMATIONS + +#define WS2812_LED_N 20 +#define RGBLED_NUM WS2812_LED_N +#define PORT_WS2812 GPIOB +#define PIN_WS2812 15 +#define WS2812_SPI SPID2 + +// EEPROM usage +// TODO: refactor with new user EEPROM code (coming soon) +#define EEPROM_MAGIC 0x451F +#define EEPROM_MAGIC_ADDR 40 +// Bump this every time we change what we store +// This will automatically reset the EEPROM with defaults +// and avoid loading invalid data from the EEPROM +#define EEPROM_VERSION 0x02 +#define EEPROM_VERSION_ADDR 42 + + +#define DYNAMIC_KEYMAP_LAYER_COUNT 4 +// Dynamic macro starts after dynamic keymaps (35+(4*5*15*2)) = (35+600) = 635 +// start + layer * rows * col * 2 +#define DYNAMIC_KEYMAP_EEPROM_ADDR 43 +#define EEPROM_CUSTOM_BACKLIGHT 684 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 685 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 192 +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 + +/* + * 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 diff --git a/keyboards/cannonkeys/savage65/halconf.h b/keyboards/cannonkeys/savage65/halconf.h new file mode 100644 index 000000000000..9bcb477c03c0 --- /dev/null +++ b/keyboards/cannonkeys/savage65/halconf.h @@ -0,0 +1,354 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef _HALCONF_H_ +#define _HALCONF_H_ + +#include "mcuconf.h" + +/** + * @brief Enables the PAL subsystem. + */ +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) +#define HAL_USE_PAL TRUE +#endif + +/** + * @brief Enables the ADC subsystem. + */ +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) +#define HAL_USE_ADC FALSE +#endif + +/** + * @brief Enables the CAN subsystem. + */ +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE +#endif + +/** + * @brief Enables the EXT subsystem. + */ +#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) +#define HAL_USE_EXT FALSE +#endif + +/** + * @brief Enables the GPT subsystem. + */ +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT FALSE +#endif + +/** + * @brief Enables the I2C subsystem. + */ +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C FALSE +#endif + +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + +/** + * @brief Enables the ICU subsystem. + */ +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif + +/** + * @brief Enables the MAC subsystem. + */ +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif + +/** + * @brief Enables the MMC_SPI subsystem. + */ +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif + +/** + * @brief Enables the PWM subsystem. + */ +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM TRUE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC FALSE +#endif + +/** + * @brief Enables the SDC subsystem. + */ +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif + +/** + * @brief Enables the SERIAL subsystem. + */ +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL FALSE +#endif + +/** + * @brief Enables the SERIAL over USB subsystem. + */ +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI TRUE +#endif + +/** + * @brief Enables the UART subsystem. + */ +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) +#define HAL_USE_UART FALSE +#endif + +/** + * @brief Enables the USB subsystem. + */ +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) +#define HAL_USE_USB TRUE +#endif + +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + +/*===========================================================================*/ +/* ADC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) +#define ADC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define ADC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* CAN driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Sleep mode related APIs inclusion switch. + */ +#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/*===========================================================================*/ +/* I2C driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the mutual exclusion APIs on the I2C bus. + */ +#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define I2C_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* MAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) +#define MAC_USE_ZERO_COPY FALSE +#endif + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) +#define MAC_USE_EVENTS TRUE +#endif + +/*===========================================================================*/ +/* MMC_SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + * This option is recommended also if the SPI driver does not + * use a DMA channel and heavily loads the CPU. + */ +#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) +#define MMC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SDC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Number of initialization attempts before rejecting the card. + * @note Attempts are performed at 10mS intervals. + */ +#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) +#define SDC_INIT_RETRY 100 +#endif + +/** + * @brief Include support for MMC cards. + * @note MMC support is not yet implemented so this option must be kept + * at @p FALSE. + */ +#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) +#define SDC_MMC_SUPPORT FALSE +#endif + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + */ +#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) +#define SDC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SERIAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SERIAL_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Serial buffers size. + * @details Configuration parameter, you can change the depth of the queue + * buffers depending on the requirements of your application. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_BUFFERS_SIZE 16 +#endif + +/*===========================================================================*/ +/* SERIAL_USB driver related setting. */ +/*===========================================================================*/ + +/** + * @brief Serial over USB buffers size. + * @details Configuration parameter, the buffer size must be a multiple of + * the USB data endpoint maximum packet size. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/*===========================================================================*/ +/* SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + + +/*===========================================================================*/ +/* USB driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif + +#endif /* _HALCONF_H_ */ + +/** @} */ diff --git a/keyboards/cannonkeys/savage65/info.json b/keyboards/cannonkeys/savage65/info.json new file mode 100644 index 000000000000..3a0f0c38549d --- /dev/null +++ b/keyboards/cannonkeys/savage65/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "Savage65", + "url": "https://cannonkeys.com", + "maintainer": "awkannan", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_default": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"x":15, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, {"x":15, "y":2}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Ctrl", "x":11.25, "y":4, "w":1.25}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] + } + } + +} diff --git a/keyboards/cannonkeys/savage65/keymaps/default/keymap.c b/keyboards/cannonkeys/savage65/keymaps/default/keymap.c new file mode 100644 index 000000000000..0184b4939920 --- /dev/null +++ b/keyboards/cannonkeys/savage65/keymaps/default/keymap.c @@ -0,0 +1,46 @@ +/* +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 . +*/ +#include QMK_KEYBOARD_H + + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_names { + _BASE, + _FN1, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = LAYOUT_default( + KC_GESC, 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_DEL, KC_INS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUBS, KC_ENT, KC_PGUP, + KC_LSFT, KC_NUHS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_FN1] = LAYOUT_default( + KC_GESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_TRNS, RGB_TOG, + KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_MOD, + BL_BRTG, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + BL_INC, BL_DEC, BL_TOGG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_GRV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/cannonkeys/savage65/keymaps/via/keymap.c b/keyboards/cannonkeys/savage65/keymaps/via/keymap.c new file mode 100644 index 000000000000..f9f0bd4accd8 --- /dev/null +++ b/keyboards/cannonkeys/savage65/keymaps/via/keymap.c @@ -0,0 +1,47 @@ +/* +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 . +*/ +#include QMK_KEYBOARD_H + + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_names { + _BASE, + _FN1, +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = LAYOUT_default( + KC_GESC, 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_DEL, KC_INS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUBS, KC_ENT, KC_PGUP, + KC_LSFT, KC_NUHS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_FN1] = LAYOUT_default( + KC_GESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_TRNS, RGB_TOG, + KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_MOD, + BL_BRTG, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + BL_INC, BL_DEC, BL_TOGG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_GRV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/cannonkeys/savage65/keymaps/via/rules.mk b/keyboards/cannonkeys/savage65/keymaps/via/rules.mk new file mode 100644 index 000000000000..d12497792d56 --- /dev/null +++ b/keyboards/cannonkeys/savage65/keymaps/via/rules.mk @@ -0,0 +1,5 @@ +# rules.mk overrides to enable VIA + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes + diff --git a/keyboards/cannonkeys/savage65/mcuconf.h b/keyboards/cannonkeys/savage65/mcuconf.h new file mode 100644 index 000000000000..43fe0a462ef1 --- /dev/null +++ b/keyboards/cannonkeys/savage65/mcuconf.h @@ -0,0 +1,176 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef _MCUCONF_H_ +#define _MCUCONF_H_ + +/* + * STM32F0xx drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 3...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +#define STM32F0xx_MCUCONF +// #define STM32F070xB + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_HSI_ENABLED TRUE +#define STM32_HSI14_ENABLED TRUE +#define STM32_HSI48_ENABLED FALSE +#define STM32_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED FALSE +#define STM32_LSE_ENABLED FALSE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSI_DIV2 +#define STM32_PREDIV_VALUE 1 +#define STM32_PLLMUL_VALUE 12 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE STM32_PPRE_DIV1 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_USBSW STM32_USBSW_HSI48 +#define STM32_CECSW STM32_CECSW_HSI +#define STM32_I2C1SW STM32_I2C1SW_HSI +#define STM32_USART1SW STM32_USART1SW_PCLK +#define STM32_RTCSEL STM32_RTCSEL_LSI + +/* + * ADC driver system settings. + */ +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_IRQ_PRIORITY 2 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 2 + +/* + * EXT driver system settings. + */ +#define STM32_EXT_EXTI0_1_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI2_3_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI4_15_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI16_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI17_IRQ_PRIORITY 3 + +/* + * GPT driver system settings. + */ +#define STM32_GPT_USE_TIM1 FALSE +#define STM32_GPT_USE_TIM2 FALSE +#define STM32_GPT_USE_TIM3 FALSE +#define STM32_GPT_USE_TIM14 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 2 +#define STM32_GPT_TIM2_IRQ_PRIORITY 2 +#define STM32_GPT_TIM3_IRQ_PRIORITY 2 +#define STM32_GPT_TIM14_IRQ_PRIORITY 2 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 FALSE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_IRQ_PRIORITY 3 +#define STM32_I2C_I2C2_IRQ_PRIORITY 3 +#define STM32_I2C_USE_DMA TRUE +#define STM32_I2C_I2C1_DMA_PRIORITY 1 +#define STM32_I2C_I2C2_DMA_PRIORITY 1 +#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * ICU driver system settings. + */ +#define STM32_ICU_USE_TIM1 FALSE +#define STM32_ICU_USE_TIM2 FALSE +#define STM32_ICU_USE_TIM3 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 3 +#define STM32_ICU_TIM2_IRQ_PRIORITY 3 +#define STM32_ICU_TIM3_IRQ_PRIORITY 3 + +/* + * PWM driver system settings. + */ +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 FALSE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 TRUE +#define STM32_PWM_TIM1_IRQ_PRIORITY 3 +#define STM32_PWM_TIM2_IRQ_PRIORITY 3 +#define STM32_PWM_TIM3_IRQ_PRIORITY 3 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USART1_PRIORITY 3 +#define STM32_SERIAL_USART2_PRIORITY 3 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 TRUE +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 2 +#define STM32_ST_USE_TIMER 2 + +/* + * UART driver system settings. + */ +#define STM32_UART_USE_USART1 FALSE +#define STM32_UART_USE_USART2 FALSE +#define STM32_UART_USART1_IRQ_PRIORITY 3 +#define STM32_UART_USART2_IRQ_PRIORITY 3 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_USB1 TRUE +#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE +#define STM32_USB_USB1_LP_IRQ_PRIORITY 3 + +#endif /* _MCUCONF_H_ */ diff --git a/keyboards/cannonkeys/savage65/readme.md b/keyboards/cannonkeys/savage65/readme.md new file mode 100644 index 000000000000..d87657e5b3e1 --- /dev/null +++ b/keyboards/cannonkeys/savage65/readme.md @@ -0,0 +1,12 @@ +# CannonKeys Savage65 + +Savage65 Keyboard + +Keyboard Maintainer: [Andrew Kannan](/~https://github.com/awkannan) +Hardware Supported: STM32F072CBT6 + +Make example for this keyboard (after setting up your build environment): + + make cannonkeys/savage65:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/cannonkeys/savage65/rules.mk b/keyboards/cannonkeys/savage65/rules.mk new file mode 100644 index 000000000000..c6789d6c3a7b --- /dev/null +++ b/keyboards/cannonkeys/savage65/rules.mk @@ -0,0 +1,56 @@ +# project specific files +# SRC = ssd1306.c +## chip/board settings +# the next two should match the directories in +# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F0xx +# linker script to use +# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +MCU_LDSCRIPT = STM32F072xB +# startup code to use +# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f0xx +# it should exist either in /os/hal/boards/ +# or /boards +BOARD = ST_STM32F072B_DISCOVERY +# Cortex version +# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 +MCU = cortex-m0 +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +ARMV = 6 +# If you want to be able to jump to bootloader from firmware on STM32 MCUs, +# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in +# ./bootloader_defs.h or in ./boards//bootloader_defs.h (if you have +# a custom board definition that you plan to reuse). +# If you're not setting it here, leave it commented out. +# It is chip dependent, the correct number can be looked up here (page 175): +# http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf +# This also requires a patch to chibios: +# /tmk_core/tool/chibios/ch-bootloader-jump.patch +#STM32_BOOTLOADER_ADDRESS = 0x1FFFC800 + +# Build Options +# comment out to disable the options. +# + +# project specific files +VPATH += keyboards/cannonkeys/stm32f072 +SRC = keyboard.c \ + led.c + +DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave +DFU_SUFFIX_ARGS = -v 0483 -p DF11 + +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +CUSTOM_MATRIX = no # Custom matrix file +# BACKLIGHT_ENABLE = yes # This is broken on 072 for some reason +RGBLIGHT_ENABLE = yes + diff --git a/keyboards/cannonkeys/savage65/savage65.c b/keyboards/cannonkeys/savage65/savage65.c new file mode 100644 index 000000000000..d8e610c8b99d --- /dev/null +++ b/keyboards/cannonkeys/savage65/savage65.c @@ -0,0 +1 @@ +#include "savage65.h" diff --git a/keyboards/cannonkeys/savage65/savage65.h b/keyboards/cannonkeys/savage65/savage65.h new file mode 100644 index 000000000000..e9109cf7a608 --- /dev/null +++ b/keyboards/cannonkeys/savage65/savage65.h @@ -0,0 +1,17 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT_default( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K115, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K315, \ + K400, K401, K402, K406, K410, K411, K412, K413, K415 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO, K115 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO, K215 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, K315 }, \ + { K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, K412, K413, KC_NO, K415 } \ +} diff --git a/keyboards/cannonkeys/tmov2/boards/ST_STM32F072B_DISCOVERY/board.c b/keyboards/cannonkeys/tmov2/boards/ST_STM32F072B_DISCOVERY/board.c new file mode 100644 index 000000000000..9d10fbd754da --- /dev/null +++ b/keyboards/cannonkeys/tmov2/boards/ST_STM32F072B_DISCOVERY/board.c @@ -0,0 +1,109 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/* + * This file has been automatically generated using ChibiStudio board + * generator plugin. Do not edit manually. + */ + +#include "hal.h" + +#if HAL_USE_PAL || defined(__DOXYGEN__) +/** + * @brief PAL setup. + * @details Digital I/O ports static configuration as defined in @p board.h. + * This variable is used by the HAL when initializing the PAL driver. + */ +const PALConfig pal_default_config = { +#if STM32_HAS_GPIOA + {VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR, + VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH}, +#endif +#if STM32_HAS_GPIOB + {VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR, + VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH}, +#endif +#if STM32_HAS_GPIOC + {VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR, + VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH}, +#endif +#if STM32_HAS_GPIOD + {VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR, + VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH}, +#endif +#if STM32_HAS_GPIOE + {VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR, + VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH}, +#endif +#if STM32_HAS_GPIOF + {VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR, + VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH}, +#endif +#if STM32_HAS_GPIOG + {VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR, + VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH}, +#endif +#if STM32_HAS_GPIOH + {VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR, + VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH}, +#endif +#if STM32_HAS_GPIOI + {VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR, + VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH} +#endif +}; +#endif + +void enter_bootloader_mode_if_requested(void); + +/** + * @brief Early initialization code. + * @details This initialization must be performed just after stack setup + * and before any other initialization. + */ +void __early_init(void) { + enter_bootloader_mode_if_requested(); + stm32_clock_init(); +} + +#if HAL_USE_MMC_SPI || defined(__DOXYGEN__) +/** + * @brief MMC_SPI card detection. + */ +bool mmc_lld_is_card_inserted(MMCDriver *mmcp) { + + (void)mmcp; + /* TODO: Fill the implementation.*/ + return true; +} + +/** + * @brief MMC_SPI card write protection detection. + */ +bool mmc_lld_is_write_protected(MMCDriver *mmcp) { + + (void)mmcp; + /* TODO: Fill the implementation.*/ + return false; +} +#endif + +/** + * @brief Board-specific initialization code. + * @todo Add your board-specific code, if any. + */ +void boardInit(void) { +} diff --git a/keyboards/cannonkeys/tmov2/boards/ST_STM32F072B_DISCOVERY/board.h b/keyboards/cannonkeys/tmov2/boards/ST_STM32F072B_DISCOVERY/board.h new file mode 100644 index 000000000000..de3a93d1ceb0 --- /dev/null +++ b/keyboards/cannonkeys/tmov2/boards/ST_STM32F072B_DISCOVERY/board.h @@ -0,0 +1,922 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/* + * This file has been automatically generated using ChibiStudio board + * generator plugin. Do not edit manually. + */ + +#ifndef BOARD_H +#define BOARD_H + +/* + * Setup for ST STM32F072B-Discovery board. + */ + +/* + * Board identifier. + */ +#define BOARD_ST_STM32F072B_DISCOVERY +#define BOARD_NAME "ST STM32F072B-Discovery" + +/* + * Board oscillators-related settings. + * NOTE: HSE not fitted. + */ +#if !defined(STM32_LSECLK) +#define STM32_LSECLK 32768 +#endif + +#define STM32_LSEDRV (3U << 3U) + +#if !defined(STM32_HSECLK) +#define STM32_HSECLK 0U +#endif + +#define STM32_HSE_BYPASS + +/* + * MCU type as defined in the ST header. + */ +#define STM32F072xB + +/* + * IO pins assignments. + */ +#define GPIOA_BUTTON 0U +#define GPIOA_PIN1 1U +#define GPIOA_PIN2 2U +#define GPIOA_PIN3 3U +#define GPIOA_PIN4 4U +#define GPIOA_PIN5 5U +#define GPIOA_PIN6 6U +#define GPIOA_PIN7 7U +#define GPIOA_PIN8 8U +#define GPIOA_PIN9 9U +#define GPIOA_PIN10 10U +#define GPIOA_USB_DM 11U +#define GPIOA_USB_DP 12U +#define GPIOA_SWDIO 13U +#define GPIOA_SWCLK 14U +#define GPIOA_PIN15 15U + +#define GPIOB_PIN0 0U +#define GPIOB_PIN1 1U +#define GPIOB_PIN2 2U +#define GPIOB_PIN3 3U +#define GPIOB_PIN4 4U +#define GPIOB_PIN5 5U +#define GPIOB_PIN6 6U +#define GPIOB_PIN7 7U +#define GPIOB_PIN8 8U +#define GPIOB_PIN9 9U +#define GPIOB_PIN10 10U +#define GPIOB_PIN11 11U +#define GPIOB_PIN12 12U +#define GPIOB_SPI2_SCK 13U +#define GPIOB_SPI2_MISO 14U +#define GPIOB_SPI2_MOSI 15U + +#define GPIOC_MEMS_CS 0U +#define GPIOC_PIN1 1U +#define GPIOC_PIN2 2U +#define GPIOC_PIN3 3U +#define GPIOC_PIN4 4U +#define GPIOC_PIN5 5U +#define GPIOC_LED_RED 6U +#define GPIOC_LED_BLUE 7U +#define GPIOC_LED_ORANGE 8U +#define GPIOC_LED_GREEN 9U +#define GPIOC_PIN10 10U +#define GPIOC_PIN11 11U +#define GPIOC_PIN12 12U +#define GPIOC_PIN13 13U +#define GPIOC_OSC32_IN 14U +#define GPIOC_OSC32_OUT 15U + +#define GPIOD_PIN0 0U +#define GPIOD_PIN1 1U +#define GPIOD_PIN2 2U +#define GPIOD_PIN3 3U +#define GPIOD_PIN4 4U +#define GPIOD_PIN5 5U +#define GPIOD_PIN6 6U +#define GPIOD_PIN7 7U +#define GPIOD_PIN8 8U +#define GPIOD_PIN9 9U +#define GPIOD_PIN10 10U +#define GPIOD_PIN11 11U +#define GPIOD_PIN12 12U +#define GPIOD_PIN13 13U +#define GPIOD_PIN14 14U +#define GPIOD_PIN15 15U + +#define GPIOE_PIN0 0U +#define GPIOE_PIN1 1U +#define GPIOE_PIN2 2U +#define GPIOE_PIN3 3U +#define GPIOE_PIN4 4U +#define GPIOE_PIN5 5U +#define GPIOE_PIN6 6U +#define GPIOE_PIN7 7U +#define GPIOE_PIN8 8U +#define GPIOE_PIN9 9U +#define GPIOE_PIN10 10U +#define GPIOE_PIN11 11U +#define GPIOE_PIN12 12U +#define GPIOE_PIN13 13U +#define GPIOE_PIN14 14U +#define GPIOE_PIN15 15U + +#define GPIOF_OSC_IN 0U +#define GPIOF_OSC_OUT 1U +#define GPIOF_PIN2 2U +#define GPIOF_PIN3 3U +#define GPIOF_PIN4 4U +#define GPIOF_PIN5 5U +#define GPIOF_PIN6 6U +#define GPIOF_PIN7 7U +#define GPIOF_PIN8 8U +#define GPIOF_PIN9 9U +#define GPIOF_PIN10 10U +#define GPIOF_PIN11 11U +#define GPIOF_PIN12 12U +#define GPIOF_PIN13 13U +#define GPIOF_PIN14 14U +#define GPIOF_PIN15 15U + +/* + * IO lines assignments. + */ +#define LINE_BUTTON PAL_LINE(GPIOA, 0U) +#define LINE_USB_DM PAL_LINE(GPIOA, 11U) +#define LINE_USB_DP PAL_LINE(GPIOA, 12U) +#define LINE_SWDIO PAL_LINE(GPIOA, 13U) +#define LINE_SWCLK PAL_LINE(GPIOA, 14U) + +#define LINE_SPI2_SCK PAL_LINE(GPIOB, 13U) +#define LINE_SPI2_MISO PAL_LINE(GPIOB, 14U) +#define LINE_SPI2_MOSI PAL_LINE(GPIOB, 15U) + +#define LINE_MEMS_CS PAL_LINE(GPIOC, 0U) +#define LINE_LED_RED PAL_LINE(GPIOC, 6U) +#define LINE_LED_BLUE PAL_LINE(GPIOC, 7U) +#define LINE_LED_ORANGE PAL_LINE(GPIOC, 8U) +#define LINE_LED_GREEN PAL_LINE(GPIOC, 9U) +#define LINE_OSC32_IN PAL_LINE(GPIOC, 14U) +#define LINE_OSC32_OUT PAL_LINE(GPIOC, 15U) + + + +#define LINE_OSC_IN PAL_LINE(GPIOF, 0U) +#define LINE_OSC_OUT PAL_LINE(GPIOF, 1U) + +/* + * I/O ports initial setup, this configuration is established soon after reset + * in the initialization code. + * Please refer to the STM32 Reference Manual for details. + */ +#define PIN_MODE_INPUT(n) (0U << ((n) * 2U)) +#define PIN_MODE_OUTPUT(n) (1U << ((n) * 2U)) +#define PIN_MODE_ALTERNATE(n) (2U << ((n) * 2U)) +#define PIN_MODE_ANALOG(n) (3U << ((n) * 2U)) +#define PIN_ODR_LOW(n) (0U << (n)) +#define PIN_ODR_HIGH(n) (1U << (n)) +#define PIN_OTYPE_PUSHPULL(n) (0U << (n)) +#define PIN_OTYPE_OPENDRAIN(n) (1U << (n)) +#define PIN_OSPEED_VERYLOW(n) (0U << ((n) * 2U)) +#define PIN_OSPEED_LOW(n) (1U << ((n) * 2U)) +#define PIN_OSPEED_MEDIUM(n) (2U << ((n) * 2U)) +#define PIN_OSPEED_HIGH(n) (3U << ((n) * 2U)) +#define PIN_PUPDR_FLOATING(n) (0U << ((n) * 2U)) +#define PIN_PUPDR_PULLUP(n) (1U << ((n) * 2U)) +#define PIN_PUPDR_PULLDOWN(n) (2U << ((n) * 2U)) +#define PIN_AFIO_AF(n, v) ((v) << (((n) % 8U) * 4U)) + +/* + * GPIOA setup: + * + * PA0 - BUTTON (input floating). + * PA1 - PIN1 (input pullup). + * PA2 - PIN2 (input pullup). + * PA3 - PIN3 (input pullup). + * PA4 - PIN4 (input pullup). + * PA5 - PIN5 (input pullup). + * PA6 - PIN6 (input pullup). + * PA7 - PIN7 (input pullup). + * PA8 - PIN8 (input pullup). + * PA9 - PIN9 (input pullup). + * PA10 - PIN10 (input pullup). + * PA11 - USB_DM (input floating). + * PA12 - USB_DP (input floating). + * PA13 - SWDIO (alternate 0). + * PA14 - SWCLK (alternate 0). + * PA15 - PIN15 (input pullup). + */ +#define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_BUTTON) | \ + PIN_MODE_INPUT(GPIOA_PIN1) | \ + PIN_MODE_INPUT(GPIOA_PIN2) | \ + PIN_MODE_INPUT(GPIOA_PIN3) | \ + PIN_MODE_INPUT(GPIOA_PIN4) | \ + PIN_MODE_INPUT(GPIOA_PIN5) | \ + PIN_MODE_INPUT(GPIOA_PIN6) | \ + PIN_MODE_INPUT(GPIOA_PIN7) | \ + PIN_MODE_INPUT(GPIOA_PIN8) | \ + PIN_MODE_INPUT(GPIOA_PIN9) | \ + PIN_MODE_INPUT(GPIOA_PIN10) | \ + PIN_MODE_INPUT(GPIOA_USB_DM) | \ + PIN_MODE_INPUT(GPIOA_USB_DP) | \ + PIN_MODE_ALTERNATE(GPIOA_SWDIO) | \ + PIN_MODE_ALTERNATE(GPIOA_SWCLK) | \ + PIN_MODE_INPUT(GPIOA_PIN15)) +#define VAL_GPIOA_OTYPER (PIN_OTYPE_PUSHPULL(GPIOA_BUTTON) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOA_USB_DM) | \ + PIN_OTYPE_PUSHPULL(GPIOA_USB_DP) | \ + PIN_OTYPE_PUSHPULL(GPIOA_SWDIO) | \ + PIN_OTYPE_PUSHPULL(GPIOA_SWCLK) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN15)) +#define VAL_GPIOA_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOA_BUTTON) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOA_USB_DM) | \ + PIN_OSPEED_VERYLOW(GPIOA_USB_DP) | \ + PIN_OSPEED_HIGH(GPIOA_SWDIO) | \ + PIN_OSPEED_HIGH(GPIOA_SWCLK) | \ + PIN_OSPEED_HIGH(GPIOA_PIN15)) +#define VAL_GPIOA_PUPDR (PIN_PUPDR_FLOATING(GPIOA_BUTTON) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN10) | \ + PIN_PUPDR_FLOATING(GPIOA_USB_DM) | \ + PIN_PUPDR_FLOATING(GPIOA_USB_DP) | \ + PIN_PUPDR_PULLUP(GPIOA_SWDIO) | \ + PIN_PUPDR_PULLDOWN(GPIOA_SWCLK) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN15)) +#define VAL_GPIOA_ODR (PIN_ODR_HIGH(GPIOA_BUTTON) | \ + PIN_ODR_HIGH(GPIOA_PIN1) | \ + PIN_ODR_HIGH(GPIOA_PIN2) | \ + PIN_ODR_HIGH(GPIOA_PIN3) | \ + PIN_ODR_HIGH(GPIOA_PIN4) | \ + PIN_ODR_HIGH(GPIOA_PIN5) | \ + PIN_ODR_HIGH(GPIOA_PIN6) | \ + PIN_ODR_HIGH(GPIOA_PIN7) | \ + PIN_ODR_HIGH(GPIOA_PIN8) | \ + PIN_ODR_HIGH(GPIOA_PIN9) | \ + PIN_ODR_HIGH(GPIOA_PIN10) | \ + PIN_ODR_HIGH(GPIOA_USB_DM) | \ + PIN_ODR_HIGH(GPIOA_USB_DP) | \ + PIN_ODR_HIGH(GPIOA_SWDIO) | \ + PIN_ODR_HIGH(GPIOA_SWCLK) | \ + PIN_ODR_HIGH(GPIOA_PIN15)) +#define VAL_GPIOA_AFRL (PIN_AFIO_AF(GPIOA_BUTTON, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN7, 0U)) +#define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOA_USB_DM, 0U) | \ + PIN_AFIO_AF(GPIOA_USB_DP, 0U) | \ + PIN_AFIO_AF(GPIOA_SWDIO, 0U) | \ + PIN_AFIO_AF(GPIOA_SWCLK, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN15, 0U)) + +/* + * GPIOB setup: + * + * PB0 - PIN0 (input pullup). + * PB1 - PIN1 (input pullup). + * PB2 - PIN2 (input pullup). + * PB3 - PIN3 (input pullup). + * PB4 - PIN4 (input pullup). + * PB5 - PIN5 (input pullup). + * PB6 - PIN6 (input pullup). + * PB7 - PIN7 (input pullup). + * PB8 - PIN8 (input pullup). + * PB9 - PIN9 (input pullup). + * PB10 - PIN10 (input pullup). + * PB11 - PIN11 (input pullup). + * PB12 - PIN12 (input pullup). + * PB13 - SPI2_SCK (alternate 0). + * PB14 - SPI2_MISO (alternate 0). + * PB15 - SPI2_MOSI (alternate 0). + */ +#define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_PIN0) | \ + PIN_MODE_INPUT(GPIOB_PIN1) | \ + PIN_MODE_INPUT(GPIOB_PIN2) | \ + PIN_MODE_INPUT(GPIOB_PIN3) | \ + PIN_MODE_INPUT(GPIOB_PIN4) | \ + PIN_MODE_INPUT(GPIOB_PIN5) | \ + PIN_MODE_INPUT(GPIOB_PIN6) | \ + PIN_MODE_INPUT(GPIOB_PIN7) | \ + PIN_MODE_INPUT(GPIOB_PIN8) | \ + PIN_MODE_INPUT(GPIOB_PIN9) | \ + PIN_MODE_INPUT(GPIOB_PIN10) | \ + PIN_MODE_INPUT(GPIOB_PIN11) | \ + PIN_MODE_INPUT(GPIOB_PIN12) | \ + PIN_MODE_ALTERNATE(GPIOB_SPI2_SCK) | \ + PIN_MODE_ALTERNATE(GPIOB_SPI2_MISO) | \ + PIN_MODE_ALTERNATE(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_OTYPER (PIN_OTYPE_PUSHPULL(GPIOB_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOB_SPI2_SCK) | \ + PIN_OTYPE_PUSHPULL(GPIOB_SPI2_MISO) | \ + PIN_OTYPE_PUSHPULL(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOB_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN1) | \ + PIN_OSPEED_HIGH(GPIOB_PIN2) | \ + PIN_OSPEED_HIGH(GPIOB_PIN3) | \ + PIN_OSPEED_HIGH(GPIOB_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOB_SPI2_SCK) | \ + PIN_OSPEED_VERYLOW(GPIOB_SPI2_MISO) | \ + PIN_OSPEED_VERYLOW(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN12) | \ + PIN_PUPDR_FLOATING(GPIOB_SPI2_SCK) | \ + PIN_PUPDR_FLOATING(GPIOB_SPI2_MISO) | \ + PIN_PUPDR_FLOATING(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_ODR (PIN_ODR_HIGH(GPIOB_PIN0) | \ + PIN_ODR_HIGH(GPIOB_PIN1) | \ + PIN_ODR_HIGH(GPIOB_PIN2) | \ + PIN_ODR_HIGH(GPIOB_PIN3) | \ + PIN_ODR_HIGH(GPIOB_PIN4) | \ + PIN_ODR_HIGH(GPIOB_PIN5) | \ + PIN_ODR_HIGH(GPIOB_PIN6) | \ + PIN_ODR_HIGH(GPIOB_PIN7) | \ + PIN_ODR_HIGH(GPIOB_PIN8) | \ + PIN_ODR_HIGH(GPIOB_PIN9) | \ + PIN_ODR_HIGH(GPIOB_PIN10) | \ + PIN_ODR_HIGH(GPIOB_PIN11) | \ + PIN_ODR_HIGH(GPIOB_PIN12) | \ + PIN_ODR_HIGH(GPIOB_SPI2_SCK) | \ + PIN_ODR_HIGH(GPIOB_SPI2_MISO) | \ + PIN_ODR_HIGH(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN7, 0U)) +#define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOB_SPI2_SCK, 0U) | \ + PIN_AFIO_AF(GPIOB_SPI2_MISO, 0U) | \ + PIN_AFIO_AF(GPIOB_SPI2_MOSI, 0U)) + +/* + * GPIOC setup: + * + * PC0 - MEMS_CS (output pushpull maximum). + * PC1 - PIN1 (input pullup). + * PC2 - PIN2 (input pullup). + * PC3 - PIN3 (input pullup). + * PC4 - PIN4 (input pullup). + * PC5 - PIN5 (input pullup). + * PC6 - LED_RED (output pushpull maximum). + * PC7 - LED_BLUE (output pushpull maximum). + * PC8 - LED_ORANGE (output pushpull maximum). + * PC9 - LED_GREEN (output pushpull maximum). + * PC10 - PIN10 (input pullup). + * PC11 - PIN11 (input pullup). + * PC12 - PIN12 (input pullup). + * PC13 - PIN13 (input pullup). + * PC14 - OSC32_IN (input floating). + * PC15 - OSC32_OUT (input floating). + */ +#define VAL_GPIOC_MODER (PIN_MODE_OUTPUT(GPIOC_MEMS_CS) | \ + PIN_MODE_INPUT(GPIOC_PIN1) | \ + PIN_MODE_INPUT(GPIOC_PIN2) | \ + PIN_MODE_INPUT(GPIOC_PIN3) | \ + PIN_MODE_INPUT(GPIOC_PIN4) | \ + PIN_MODE_INPUT(GPIOC_PIN5) | \ + PIN_MODE_OUTPUT(GPIOC_LED_RED) | \ + PIN_MODE_OUTPUT(GPIOC_LED_BLUE) | \ + PIN_MODE_OUTPUT(GPIOC_LED_ORANGE) | \ + PIN_MODE_OUTPUT(GPIOC_LED_GREEN) | \ + PIN_MODE_INPUT(GPIOC_PIN10) | \ + PIN_MODE_INPUT(GPIOC_PIN11) | \ + PIN_MODE_INPUT(GPIOC_PIN12) | \ + PIN_MODE_INPUT(GPIOC_PIN13) | \ + PIN_MODE_INPUT(GPIOC_OSC32_IN) | \ + PIN_MODE_INPUT(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_MEMS_CS) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_RED) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_BLUE) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_ORANGE) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_GREEN) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOC_OSC32_IN) | \ + PIN_OTYPE_PUSHPULL(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_OSPEEDR (PIN_OSPEED_HIGH(GPIOC_MEMS_CS) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN5) | \ + PIN_OSPEED_HIGH(GPIOC_LED_RED) | \ + PIN_OSPEED_HIGH(GPIOC_LED_BLUE) | \ + PIN_OSPEED_HIGH(GPIOC_LED_ORANGE) | \ + PIN_OSPEED_HIGH(GPIOC_LED_GREEN) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN13) | \ + PIN_OSPEED_HIGH(GPIOC_OSC32_IN) | \ + PIN_OSPEED_HIGH(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_PUPDR (PIN_PUPDR_FLOATING(GPIOC_MEMS_CS) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN5) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_RED) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_BLUE) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_ORANGE) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_GREEN) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN13) | \ + PIN_PUPDR_FLOATING(GPIOC_OSC32_IN) | \ + PIN_PUPDR_FLOATING(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_MEMS_CS) | \ + PIN_ODR_HIGH(GPIOC_PIN1) | \ + PIN_ODR_HIGH(GPIOC_PIN2) | \ + PIN_ODR_HIGH(GPIOC_PIN3) | \ + PIN_ODR_HIGH(GPIOC_PIN4) | \ + PIN_ODR_HIGH(GPIOC_PIN5) | \ + PIN_ODR_LOW(GPIOC_LED_RED) | \ + PIN_ODR_LOW(GPIOC_LED_BLUE) | \ + PIN_ODR_LOW(GPIOC_LED_ORANGE) | \ + PIN_ODR_LOW(GPIOC_LED_GREEN) | \ + PIN_ODR_HIGH(GPIOC_PIN10) | \ + PIN_ODR_HIGH(GPIOC_PIN11) | \ + PIN_ODR_HIGH(GPIOC_PIN12) | \ + PIN_ODR_HIGH(GPIOC_PIN13) | \ + PIN_ODR_HIGH(GPIOC_OSC32_IN) | \ + PIN_ODR_HIGH(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_MEMS_CS, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOC_LED_RED, 0U) | \ + PIN_AFIO_AF(GPIOC_LED_BLUE, 0U)) +#define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_LED_ORANGE, 0U) | \ + PIN_AFIO_AF(GPIOC_LED_GREEN, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOC_OSC32_IN, 0U) | \ + PIN_AFIO_AF(GPIOC_OSC32_OUT, 0U)) + +/* + * GPIOD setup: + * + * PD0 - PIN0 (input pullup). + * PD1 - PIN1 (input pullup). + * PD2 - PIN2 (input pullup). + * PD3 - PIN3 (input pullup). + * PD4 - PIN4 (input pullup). + * PD5 - PIN5 (input pullup). + * PD6 - PIN6 (input pullup). + * PD7 - PIN7 (input pullup). + * PD8 - PIN8 (input pullup). + * PD9 - PIN9 (input pullup). + * PD10 - PIN10 (input pullup). + * PD11 - PIN11 (input pullup). + * PD12 - PIN12 (input pullup). + * PD13 - PIN13 (input pullup). + * PD14 - PIN14 (input pullup). + * PD15 - PIN15 (input pullup). + */ +#define VAL_GPIOD_MODER (PIN_MODE_INPUT(GPIOD_PIN0) | \ + PIN_MODE_INPUT(GPIOD_PIN1) | \ + PIN_MODE_INPUT(GPIOD_PIN2) | \ + PIN_MODE_INPUT(GPIOD_PIN3) | \ + PIN_MODE_INPUT(GPIOD_PIN4) | \ + PIN_MODE_INPUT(GPIOD_PIN5) | \ + PIN_MODE_INPUT(GPIOD_PIN6) | \ + PIN_MODE_INPUT(GPIOD_PIN7) | \ + PIN_MODE_INPUT(GPIOD_PIN8) | \ + PIN_MODE_INPUT(GPIOD_PIN9) | \ + PIN_MODE_INPUT(GPIOD_PIN10) | \ + PIN_MODE_INPUT(GPIOD_PIN11) | \ + PIN_MODE_INPUT(GPIOD_PIN12) | \ + PIN_MODE_INPUT(GPIOD_PIN13) | \ + PIN_MODE_INPUT(GPIOD_PIN14) | \ + PIN_MODE_INPUT(GPIOD_PIN15)) +#define VAL_GPIOD_OTYPER (PIN_OTYPE_PUSHPULL(GPIOD_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN15)) +#define VAL_GPIOD_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOD_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN15)) +#define VAL_GPIOD_PUPDR (PIN_PUPDR_PULLUP(GPIOD_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN15)) +#define VAL_GPIOD_ODR (PIN_ODR_HIGH(GPIOD_PIN0) | \ + PIN_ODR_HIGH(GPIOD_PIN1) | \ + PIN_ODR_HIGH(GPIOD_PIN2) | \ + PIN_ODR_HIGH(GPIOD_PIN3) | \ + PIN_ODR_HIGH(GPIOD_PIN4) | \ + PIN_ODR_HIGH(GPIOD_PIN5) | \ + PIN_ODR_HIGH(GPIOD_PIN6) | \ + PIN_ODR_HIGH(GPIOD_PIN7) | \ + PIN_ODR_HIGH(GPIOD_PIN8) | \ + PIN_ODR_HIGH(GPIOD_PIN9) | \ + PIN_ODR_HIGH(GPIOD_PIN10) | \ + PIN_ODR_HIGH(GPIOD_PIN11) | \ + PIN_ODR_HIGH(GPIOD_PIN12) | \ + PIN_ODR_HIGH(GPIOD_PIN13) | \ + PIN_ODR_HIGH(GPIOD_PIN14) | \ + PIN_ODR_HIGH(GPIOD_PIN15)) +#define VAL_GPIOD_AFRL (PIN_AFIO_AF(GPIOD_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN7, 0U)) +#define VAL_GPIOD_AFRH (PIN_AFIO_AF(GPIOD_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN15, 0U)) + +/* + * GPIOE setup: + * + * PE0 - PIN0 (input pullup). + * PE1 - PIN1 (input pullup). + * PE2 - PIN2 (input pullup). + * PE3 - PIN3 (input pullup). + * PE4 - PIN4 (input pullup). + * PE5 - PIN5 (input pullup). + * PE6 - PIN6 (input pullup). + * PE7 - PIN7 (input pullup). + * PE8 - PIN8 (input pullup). + * PE9 - PIN9 (input pullup). + * PE10 - PIN10 (input pullup). + * PE11 - PIN11 (input pullup). + * PE12 - PIN12 (input pullup). + * PE13 - PIN13 (input pullup). + * PE14 - PIN14 (input pullup). + * PE15 - PIN15 (input pullup). + */ +#define VAL_GPIOE_MODER (PIN_MODE_INPUT(GPIOE_PIN0) | \ + PIN_MODE_INPUT(GPIOE_PIN1) | \ + PIN_MODE_INPUT(GPIOE_PIN2) | \ + PIN_MODE_INPUT(GPIOE_PIN3) | \ + PIN_MODE_INPUT(GPIOE_PIN4) | \ + PIN_MODE_INPUT(GPIOE_PIN5) | \ + PIN_MODE_INPUT(GPIOE_PIN6) | \ + PIN_MODE_INPUT(GPIOE_PIN7) | \ + PIN_MODE_INPUT(GPIOE_PIN8) | \ + PIN_MODE_INPUT(GPIOE_PIN9) | \ + PIN_MODE_INPUT(GPIOE_PIN10) | \ + PIN_MODE_INPUT(GPIOE_PIN11) | \ + PIN_MODE_INPUT(GPIOE_PIN12) | \ + PIN_MODE_INPUT(GPIOE_PIN13) | \ + PIN_MODE_INPUT(GPIOE_PIN14) | \ + PIN_MODE_INPUT(GPIOE_PIN15)) +#define VAL_GPIOE_OTYPER (PIN_OTYPE_PUSHPULL(GPIOE_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN15)) +#define VAL_GPIOE_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOE_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN15)) +#define VAL_GPIOE_PUPDR (PIN_PUPDR_PULLUP(GPIOE_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN15)) +#define VAL_GPIOE_ODR (PIN_ODR_HIGH(GPIOE_PIN0) | \ + PIN_ODR_HIGH(GPIOE_PIN1) | \ + PIN_ODR_HIGH(GPIOE_PIN2) | \ + PIN_ODR_HIGH(GPIOE_PIN3) | \ + PIN_ODR_HIGH(GPIOE_PIN4) | \ + PIN_ODR_HIGH(GPIOE_PIN5) | \ + PIN_ODR_HIGH(GPIOE_PIN6) | \ + PIN_ODR_HIGH(GPIOE_PIN7) | \ + PIN_ODR_HIGH(GPIOE_PIN8) | \ + PIN_ODR_HIGH(GPIOE_PIN9) | \ + PIN_ODR_HIGH(GPIOE_PIN10) | \ + PIN_ODR_HIGH(GPIOE_PIN11) | \ + PIN_ODR_HIGH(GPIOE_PIN12) | \ + PIN_ODR_HIGH(GPIOE_PIN13) | \ + PIN_ODR_HIGH(GPIOE_PIN14) | \ + PIN_ODR_HIGH(GPIOE_PIN15)) +#define VAL_GPIOE_AFRL (PIN_AFIO_AF(GPIOE_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN7, 0U)) +#define VAL_GPIOE_AFRH (PIN_AFIO_AF(GPIOE_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN15, 0U)) + +/* + * GPIOF setup: + * + * PF0 - OSC_IN (input floating). + * PF1 - OSC_OUT (input floating). + * PF2 - PIN2 (input pullup). + * PF3 - PIN3 (input pullup). + * PF4 - PIN4 (input pullup). + * PF5 - PIN5 (input pullup). + * PF6 - PIN6 (input pullup). + * PF7 - PIN7 (input pullup). + * PF8 - PIN8 (input pullup). + * PF9 - PIN9 (input pullup). + * PF10 - PIN10 (input pullup). + * PF11 - PIN11 (input pullup). + * PF12 - PIN12 (input pullup). + * PF13 - PIN13 (input pullup). + * PF14 - PIN14 (input pullup). + * PF15 - PIN15 (input pullup). + */ +#define VAL_GPIOF_MODER (PIN_MODE_INPUT(GPIOF_OSC_IN) | \ + PIN_MODE_INPUT(GPIOF_OSC_OUT) | \ + PIN_MODE_INPUT(GPIOF_PIN2) | \ + PIN_MODE_INPUT(GPIOF_PIN3) | \ + PIN_MODE_INPUT(GPIOF_PIN4) | \ + PIN_MODE_INPUT(GPIOF_PIN5) | \ + PIN_MODE_INPUT(GPIOF_PIN6) | \ + PIN_MODE_INPUT(GPIOF_PIN7) | \ + PIN_MODE_INPUT(GPIOF_PIN8) | \ + PIN_MODE_INPUT(GPIOF_PIN9) | \ + PIN_MODE_INPUT(GPIOF_PIN10) | \ + PIN_MODE_INPUT(GPIOF_PIN11) | \ + PIN_MODE_INPUT(GPIOF_PIN12) | \ + PIN_MODE_INPUT(GPIOF_PIN13) | \ + PIN_MODE_INPUT(GPIOF_PIN14) | \ + PIN_MODE_INPUT(GPIOF_PIN15)) +#define VAL_GPIOF_OTYPER (PIN_OTYPE_PUSHPULL(GPIOF_OSC_IN) | \ + PIN_OTYPE_PUSHPULL(GPIOF_OSC_OUT) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN15)) +#define VAL_GPIOF_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOF_OSC_IN) | \ + PIN_OSPEED_VERYLOW(GPIOF_OSC_OUT) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN15)) +#define VAL_GPIOF_PUPDR (PIN_PUPDR_FLOATING(GPIOF_OSC_IN) | \ + PIN_PUPDR_FLOATING(GPIOF_OSC_OUT) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN15)) +#define VAL_GPIOF_ODR (PIN_ODR_HIGH(GPIOF_OSC_IN) | \ + PIN_ODR_HIGH(GPIOF_OSC_OUT) | \ + PIN_ODR_HIGH(GPIOF_PIN2) | \ + PIN_ODR_HIGH(GPIOF_PIN3) | \ + PIN_ODR_HIGH(GPIOF_PIN4) | \ + PIN_ODR_HIGH(GPIOF_PIN5) | \ + PIN_ODR_HIGH(GPIOF_PIN6) | \ + PIN_ODR_HIGH(GPIOF_PIN7) | \ + PIN_ODR_HIGH(GPIOF_PIN8) | \ + PIN_ODR_HIGH(GPIOF_PIN9) | \ + PIN_ODR_HIGH(GPIOF_PIN10) | \ + PIN_ODR_HIGH(GPIOF_PIN11) | \ + PIN_ODR_HIGH(GPIOF_PIN12) | \ + PIN_ODR_HIGH(GPIOF_PIN13) | \ + PIN_ODR_HIGH(GPIOF_PIN14) | \ + PIN_ODR_HIGH(GPIOF_PIN15)) +#define VAL_GPIOF_AFRL (PIN_AFIO_AF(GPIOF_OSC_IN, 0U) | \ + PIN_AFIO_AF(GPIOF_OSC_OUT, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN7, 0U)) +#define VAL_GPIOF_AFRH (PIN_AFIO_AF(GPIOF_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN15, 0U)) + + +#if !defined(_FROM_ASM_) +#ifdef __cplusplus +extern "C" { +#endif + void boardInit(void); +#ifdef __cplusplus +} +#endif +#endif /* _FROM_ASM_ */ + +#endif /* BOARD_H */ diff --git a/keyboards/cannonkeys/tmov2/boards/ST_STM32F072B_DISCOVERY/board.mk b/keyboards/cannonkeys/tmov2/boards/ST_STM32F072B_DISCOVERY/board.mk new file mode 100644 index 000000000000..b98dcdd26c6a --- /dev/null +++ b/keyboards/cannonkeys/tmov2/boards/ST_STM32F072B_DISCOVERY/board.mk @@ -0,0 +1,5 @@ +# List of all the board related files. +BOARDSRC = $(BOARD_PATH)/boards/ST_STM32F072B_DISCOVERY/board.c + +# Required include directories +BOARDINC = $(BOARD_PATH)/boards/ST_STM32F072B_DISCOVERY diff --git a/keyboards/cannonkeys/tmov2/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg b/keyboards/cannonkeys/tmov2/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg new file mode 100644 index 000000000000..9c7cf4fd76a3 --- /dev/null +++ b/keyboards/cannonkeys/tmov2/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg @@ -0,0 +1,703 @@ + + + + + resources/gencfg/processors/boards/stm32f0xx/templates + .. + 3.0.x + + ST STM32F072B-Discovery + ST_STM32F072B_DISCOVERY + + STM32F072xB + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/keyboards/cannonkeys/tmov2/bootloader_defs.h b/keyboards/cannonkeys/tmov2/bootloader_defs.h new file mode 100644 index 000000000000..02c48c4e6dcb --- /dev/null +++ b/keyboards/cannonkeys/tmov2/bootloader_defs.h @@ -0,0 +1,7 @@ +/* Address for jumping to bootloader on STM32 chips. */ +/* It is chip dependent, the correct number can be looked up here (page 175): + * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf + * This also requires a patch to chibios: + * /tmk_core/tool/chibios/ch-bootloader-jump.patch + */ +#define STM32_BOOTLOADER_ADDRESS 0x1FFFC800 diff --git a/keyboards/cannonkeys/tmov2/chconf.h b/keyboards/cannonkeys/tmov2/chconf.h new file mode 100644 index 000000000000..99fa8ce39822 --- /dev/null +++ b/keyboards/cannonkeys/tmov2/chconf.h @@ -0,0 +1,524 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/chconf.h + * @brief Configuration file template. + * @details A copy of this file must be placed in each project directory, it + * contains the application specific kernel settings. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#define CH_CFG_ST_RESOLUTION 32 + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#define CH_CFG_ST_FREQUENCY 10000 + +/** + * @brief Time delta constant for the tick-less mode. + * @note If this value is zero then the system uses the classic + * periodic tick. This value represents the minimum number + * of ticks that is safe to specify in a timeout directive. + * The value one is not valid, timeouts are rounded up to + * this value. + */ +#define CH_CFG_ST_TIMEDELTA 2 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel parameters and options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Round robin interval. + * @details This constant is the number of system ticks allowed for the + * threads before preemption occurs. Setting this value to zero + * disables the preemption for threads with equal priority and the + * round robin becomes cooperative. Note that higher priority + * threads can still preempt, the kernel is always preemptive. + * @note Disabling the round robin preemption makes the kernel more compact + * and generally faster. + * @note The round robin preemption is not supported in tickless mode and + * must be set to zero in that case. + */ +#define CH_CFG_TIME_QUANTUM 0 + +/** + * @brief Managed RAM size. + * @details Size of the RAM area to be managed by the OS. If set to zero + * then the whole available RAM is used. The core memory is made + * available to the heap allocator and/or can be used directly through + * the simplified core memory allocator. + * + * @note In order to let the OS manage the whole RAM the linker script must + * provide the @p __heap_base__ and @p __heap_end__ symbols. + * @note Requires @p CH_CFG_USE_MEMCORE. + */ +#define CH_CFG_MEMCORE_SIZE 0 + +/** + * @brief Idle thread automatic spawn suppression. + * @details When this option is activated the function @p chSysInit() + * does not spawn the idle thread. The application @p main() + * function becomes the idle thread and must implement an + * infinite loop. + */ +#define CH_CFG_NO_IDLE_THREAD FALSE + +/* Use __WFI in the idle thread for waiting. Does lower the power + * consumption. */ +#define CORTEX_ENABLE_WFI_IDLE TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Performance options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief OS optimization. + * @details If enabled then time efficient rather than space efficient code + * is used when two possible implementations exist. + * + * @note This is not related to the compiler optimization options. + * @note The default is @p TRUE. + */ +#define CH_CFG_OPTIMIZE_SPEED FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Subsystem options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Time Measurement APIs. + * @details If enabled then the time measurement APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_TM FALSE + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_REGISTRY TRUE + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_WAITEXIT TRUE + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_SEMAPHORES TRUE + +/** + * @brief Semaphores queuing mode. + * @details If enabled then the threads are enqueued on semaphores by + * priority rather than in FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MUTEXES TRUE + +/** + * @brief Enables recursive behavior on mutexes. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @note The default is @p FALSE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE + +/** + * @brief Conditional Variables APIs. + * @details If enabled then the conditional variables APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_CONDVARS TRUE + +/** + * @brief Conditional Variables APIs with timeout. + * @details If enabled then the conditional variables APIs with timeout + * specification are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_CONDVARS. + */ +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_EVENTS TRUE + +/** + * @brief Events Flags APIs with timeout. + * @details If enabled then the events APIs with timeout specification + * are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_EVENTS. + */ +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MESSAGES TRUE + +/** + * @brief Synchronous Messages queuing mode. + * @details If enabled then messages are served by priority rather than in + * FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_MESSAGES. + */ +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE + +/** + * @brief Mailboxes APIs. + * @details If enabled then the asynchronous messages (mailboxes) APIs are + * included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_MAILBOXES TRUE + +/** + * @brief Core Memory Manager APIs. + * @details If enabled then the core memory manager APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMCORE FALSE + +/** + * @brief Heap Allocator APIs. + * @details If enabled then the memory heap allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or + * @p CH_CFG_USE_SEMAPHORES. + * @note Mutexes are recommended. + */ +#define CH_CFG_USE_HEAP FALSE + +/** + * @brief Memory Pools Allocator APIs. + * @details If enabled then the memory pools allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMPOOLS FALSE + +/** + * @brief Dynamic Threads APIs. + * @details If enabled then the dynamic threads creation APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_WAITEXIT. + * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. + */ +#define CH_CFG_USE_DYNAMIC FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_STATISTICS FALSE + +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_SYSTEM_STATE_CHECK FALSE + +/** + * @brief Debug option, parameters checks. + * @details If enabled then the checks on the API functions input + * parameters are activated. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_CHECKS FALSE + +/** + * @brief Debug option, consistency checks. + * @details If enabled then all the assertions in the kernel code are + * activated. This includes consistency checks inside the kernel, + * runtime anomalies and port-defined checks. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_ASSERTS FALSE + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_BUFFER_SIZE 128 + +/** + * @brief Debug option, stack checks. + * @details If enabled then a runtime stack check is performed. + * + * @note The default is @p FALSE. + * @note The stack check is performed in a architecture/port dependent way. + * It may not be implemented or some ports. + * @note The default failure mode is to halt the system with the global + * @p panic_msg variable set to @p NULL. + */ +#define CH_DBG_ENABLE_STACK_CHECK FALSE + +/** + * @brief Debug option, stacks initialization. + * @details If enabled then the threads working area is filled with a byte + * value when a thread is created. This can be useful for the + * runtime measurement of the used stack. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_FILL_THREADS FALSE + +/** + * @brief Debug option, threads profiling. + * @details If enabled then a field is added to the @p thread_t structure that + * counts the system ticks occurred while executing the thread. + * + * @note The default is @p FALSE. + * @note This debug option is not currently compatible with the + * tickless mode. + */ +#define CH_DBG_THREADS_PROFILING FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Threads descriptor structure extension. + * @details User fields added to the end of the @p thread_t structure. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p chThdInit() API. + * + * @note It is invoked from within @p chThdInit() and implicitly from all + * the threads creation APIs. + */ +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads finalization hook. + * @details User finalization code added to the @p chThdExit() API. + */ +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ + /* Add threads finalization code here.*/ \ +} + +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* Context switch code here.*/ \ +} + +/** + * @brief ISR enter hook. + */ +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} + +/** + * @brief ISR exit hook. + */ +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} + +/** + * @brief Idle thread enter hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to activate a power saving mode. + */ +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ +} + +/** + * @brief Idle thread leave hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to deactivate a power saving mode. + */ +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ +} + +/** + * @brief Idle Loop hook. + * @details This hook is continuously invoked by the idle thread loop. + */ +#define CH_CFG_IDLE_LOOP_HOOK() { \ + /* Idle loop code here.*/ \ +} + +/** + * @brief System tick event hook. + * @details This hook is invoked in the system tick handler immediately + * after processing the virtual timers queue. + */ +#define CH_CFG_SYSTEM_TICK_HOOK() { \ + /* System tick event code here.*/ \ +} + +/** + * @brief System halt hook. + * @details This hook is invoked in case to a system halting error before + * the system is halted. + */ +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ + /* System halt code here.*/ \ +} + +/** + * @brief Trace hook. + * @details This hook is invoked each time a new record is written in the + * trace buffer. + */ +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} + +/** @} */ + +/*===========================================================================*/ +/* Port-specific settings (override port settings defaulted in chcore.h). */ +/*===========================================================================*/ + +#endif /* CHCONF_H */ + +/** @} */ diff --git a/keyboards/cannonkeys/tmov2/config.h b/keyboards/cannonkeys/tmov2/config.h new file mode 100644 index 000000000000..0c586de9e511 --- /dev/null +++ b/keyboards/cannonkeys/tmov2/config.h @@ -0,0 +1,97 @@ +/* +Copyright 2015 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 . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xCA04 +#define PRODUCT_ID 0x70F2 +#define DEVICE_VER 0x0001 +/* in python2: list(u"whatever".encode('utf-16-le')) */ +/* at most 32 characters or the ugly hack in usb_main.c borks */ +#define MANUFACTURER CannonKeys +#define PRODUCT TMOv2 +#define DESCRIPTION TMOv2 Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 15 + +#define MATRIX_COL_PINS { B14, A14, C13, C14, C15, F0, F1, B9, B8, B7, B6, B5, B4, B3, A15 } +#define MATRIX_ROW_PINS { A10, A9, A8, B12 } +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_LEVELS 6 +#define BACKLIGHT_BREATHING +#define BREATHING_PERIOD 6 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 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 + +#define RGBLIGHT_ANIMATIONS + +#define WS2812_LED_N 22 +#define RGBLED_NUM WS2812_LED_N +#define PORT_WS2812 GPIOB +#define PIN_WS2812 15 +#define WS2812_SPI SPID2 + +// EEPROM usage +// TODO: refactor with new user EEPROM code (coming soon) +#define EEPROM_MAGIC 0x451F +#define EEPROM_MAGIC_ADDR 40 +// Bump this every time we change what we store +// This will automatically reset the EEPROM with defaults +// and avoid loading invalid data from the EEPROM +#define EEPROM_VERSION 0x02 +#define EEPROM_VERSION_ADDR 42 + + +#define DYNAMIC_KEYMAP_LAYER_COUNT 4 +// Dynamic macro starts after dynamic keymaps (43+(4*4*15*2)) = (43+480) = 523 +// start + layer * rows * col * 2c +#define DYNAMIC_KEYMAP_EEPROM_ADDR 43 +#define EEPROM_CUSTOM_BACKLIGHT 523 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 524 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 200 +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 + +/* + * 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 diff --git a/keyboards/cannonkeys/tmov2/halconf.h b/keyboards/cannonkeys/tmov2/halconf.h new file mode 100644 index 000000000000..38743e0904fd --- /dev/null +++ b/keyboards/cannonkeys/tmov2/halconf.h @@ -0,0 +1,354 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef _HALCONF_H_ +#define _HALCONF_H_ + +#include "mcuconf.h" + +/** + * @brief Enables the PAL subsystem. + */ +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) +#define HAL_USE_PAL TRUE +#endif + +/** + * @brief Enables the ADC subsystem. + */ +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) +#define HAL_USE_ADC FALSE +#endif + +/** + * @brief Enables the CAN subsystem. + */ +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE +#endif + +/** + * @brief Enables the EXT subsystem. + */ +#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) +#define HAL_USE_EXT FALSE +#endif + +/** + * @brief Enables the GPT subsystem. + */ +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT FALSE +#endif + +/** + * @brief Enables the I2C subsystem. + */ +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C TRUE +#endif + +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + +/** + * @brief Enables the ICU subsystem. + */ +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif + +/** + * @brief Enables the MAC subsystem. + */ +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif + +/** + * @brief Enables the MMC_SPI subsystem. + */ +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif + +/** + * @brief Enables the PWM subsystem. + */ +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM TRUE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC FALSE +#endif + +/** + * @brief Enables the SDC subsystem. + */ +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif + +/** + * @brief Enables the SERIAL subsystem. + */ +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL FALSE +#endif + +/** + * @brief Enables the SERIAL over USB subsystem. + */ +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI TRUE +#endif + +/** + * @brief Enables the UART subsystem. + */ +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) +#define HAL_USE_UART FALSE +#endif + +/** + * @brief Enables the USB subsystem. + */ +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) +#define HAL_USE_USB TRUE +#endif + +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + +/*===========================================================================*/ +/* ADC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) +#define ADC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define ADC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* CAN driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Sleep mode related APIs inclusion switch. + */ +#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/*===========================================================================*/ +/* I2C driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the mutual exclusion APIs on the I2C bus. + */ +#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define I2C_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* MAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) +#define MAC_USE_ZERO_COPY FALSE +#endif + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) +#define MAC_USE_EVENTS TRUE +#endif + +/*===========================================================================*/ +/* MMC_SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + * This option is recommended also if the SPI driver does not + * use a DMA channel and heavily loads the CPU. + */ +#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) +#define MMC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SDC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Number of initialization attempts before rejecting the card. + * @note Attempts are performed at 10mS intervals. + */ +#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) +#define SDC_INIT_RETRY 100 +#endif + +/** + * @brief Include support for MMC cards. + * @note MMC support is not yet implemented so this option must be kept + * at @p FALSE. + */ +#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) +#define SDC_MMC_SUPPORT FALSE +#endif + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + */ +#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) +#define SDC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SERIAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SERIAL_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Serial buffers size. + * @details Configuration parameter, you can change the depth of the queue + * buffers depending on the requirements of your application. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_BUFFERS_SIZE 16 +#endif + +/*===========================================================================*/ +/* SERIAL_USB driver related setting. */ +/*===========================================================================*/ + +/** + * @brief Serial over USB buffers size. + * @details Configuration parameter, the buffer size must be a multiple of + * the USB data endpoint maximum packet size. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/*===========================================================================*/ +/* SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + + +/*===========================================================================*/ +/* USB driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif + +#endif /* _HALCONF_H_ */ + +/** @} */ diff --git a/keyboards/cannonkeys/tmov2/info.json b/keyboards/cannonkeys/tmov2/info.json new file mode 100644 index 000000000000..2734e94e4938 --- /dev/null +++ b/keyboards/cannonkeys/tmov2/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "TMOv2", + "url": "https://cannonkeys.com", + "maintainer": "awkannan", + "width": 17, + "height": 4, + "layouts": { + "LAYOUT_default": { + "layout": [{"x":0, "y":0}, {"label":"Tab", "x":1.25, "y":0, "w":1.5}, {"label":"Q", "x":2.75, "y":0}, {"label":"W", "x":3.75, "y":0}, {"label":"E", "x":4.75, "y":0}, {"label":"R", "x":5.75, "y":0}, {"label":"T", "x":6.75, "y":0}, {"label":"Y", "x":7.75, "y":0}, {"label":"U", "x":8.75, "y":0}, {"label":"I", "x":9.75, "y":0}, {"label":"O", "x":10.75, "y":0}, {"label":"P", "x":11.75, "y":0}, {"label":"{", "x":12.75, "y":0}, {"label":"}", "x":13.75, "y":0}, {"label":"Backspace", "x":14.75, "y":0}, {"x":0, "y":1}, {"label":"Caps Lock", "x":1.25, "y":1, "w":1.75}, {"label":"A", "x":3, "y":1}, {"label":"S", "x":4, "y":1}, {"label":"D", "x":5, "y":1}, {"label":"F", "x":6, "y":1}, {"label":"G", "x":7, "y":1}, {"label":"H", "x":8, "y":1}, {"label":"J", "x":9, "y":1}, {"label":"K", "x":10, "y":1}, {"label":"L", "x":11, "y":1}, {"label":":", "x":12, "y":1}, {"label":"\"", "x":13, "y":1}, {"label":"Enter", "x":14, "y":1, "w":1.75}, {"x":0, "y":2}, {"label":"Shift", "x":1.25, "y":2, "w":2.25}, {"label":"Z", "x":3.5, "y":2}, {"label":"X", "x":4.5, "y":2}, {"label":"C", "x":5.5, "y":2}, {"label":"V", "x":6.5, "y":2}, {"label":"B", "x":7.5, "y":2}, {"label":"N", "x":8.5, "y":2}, {"label":"M", "x":9.5, "y":2}, {"label":"<", "x":10.5, "y":2}, {"label":">", "x":11.5, "y":2}, {"label":"?", "x":12.5, "y":2}, {"label":"Shift", "x":13.5, "y":2, "w":1.25}, {"x":14.75, "y":2}, {"x":0, "y":3}, {"label":"Win", "x":3.25, "y":3}, {"label":"Alt", "x":4.25, "y":3, "w":1.5}, {"x":5.75, "y":3, "w":2.25}, {"x":8, "y":3, "w":2.75}, {"label":"Alt", "x":10.75, "y":3, "w":1.5}, {"label":"Menu", "x":12.25, "y":3}] + } + } +} diff --git a/keyboards/cannonkeys/tmov2/keymaps/default/keymap.c b/keyboards/cannonkeys/tmov2/keymaps/default/keymap.c new file mode 100644 index 000000000000..9e01965b535b --- /dev/null +++ b/keyboards/cannonkeys/tmov2/keymaps/default/keymap.c @@ -0,0 +1,60 @@ +/* +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 . +*/ +#include QMK_KEYBOARD_H + + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_names { + _BASE, + _FN1, + _FN2, + _FN3, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = LAYOUT_default( + BL_INC, 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, + BL_DEC, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + RGB_MOD, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FN2), + RGB_TOG, KC_LALT, KC_LGUI, LT(_FN1, KC_SPC), KC_SPC, KC_RALT, MO(_FN3) + ), + + [_FN1] = LAYOUT_default( + KC_TRNS, 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_DEL, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [_FN2] = LAYOUT_default( + RGB_TOG, 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_TRNS, + RGB_MOD, KC_TRNS, 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_RMOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [_FN3] = LAYOUT_default( + 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/cannonkeys/tmov2/keymaps/via/keymap.c b/keyboards/cannonkeys/tmov2/keymaps/via/keymap.c new file mode 100644 index 000000000000..9e01965b535b --- /dev/null +++ b/keyboards/cannonkeys/tmov2/keymaps/via/keymap.c @@ -0,0 +1,60 @@ +/* +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 . +*/ +#include QMK_KEYBOARD_H + + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_names { + _BASE, + _FN1, + _FN2, + _FN3, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = LAYOUT_default( + BL_INC, 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, + BL_DEC, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + RGB_MOD, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FN2), + RGB_TOG, KC_LALT, KC_LGUI, LT(_FN1, KC_SPC), KC_SPC, KC_RALT, MO(_FN3) + ), + + [_FN1] = LAYOUT_default( + KC_TRNS, 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_DEL, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [_FN2] = LAYOUT_default( + RGB_TOG, 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_TRNS, + RGB_MOD, KC_TRNS, 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_RMOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [_FN3] = LAYOUT_default( + 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/cannonkeys/tmov2/keymaps/via/rules.mk b/keyboards/cannonkeys/tmov2/keymaps/via/rules.mk new file mode 100644 index 000000000000..d12497792d56 --- /dev/null +++ b/keyboards/cannonkeys/tmov2/keymaps/via/rules.mk @@ -0,0 +1,5 @@ +# rules.mk overrides to enable VIA + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes + diff --git a/keyboards/cannonkeys/tmov2/mcuconf.h b/keyboards/cannonkeys/tmov2/mcuconf.h new file mode 100644 index 000000000000..048eb4df650d --- /dev/null +++ b/keyboards/cannonkeys/tmov2/mcuconf.h @@ -0,0 +1,176 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef _MCUCONF_H_ +#define _MCUCONF_H_ + +/* + * STM32F0xx drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 3...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +#define STM32F0xx_MCUCONF +// #define STM32F070xB + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_HSI_ENABLED TRUE +#define STM32_HSI14_ENABLED TRUE +#define STM32_HSI48_ENABLED FALSE +#define STM32_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED FALSE +#define STM32_LSE_ENABLED FALSE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSI_DIV2 +#define STM32_PREDIV_VALUE 1 +#define STM32_PLLMUL_VALUE 12 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE STM32_PPRE_DIV1 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_USBSW STM32_USBSW_HSI48 +#define STM32_CECSW STM32_CECSW_HSI +#define STM32_I2C1SW STM32_I2C1SW_HSI +#define STM32_USART1SW STM32_USART1SW_PCLK +#define STM32_RTCSEL STM32_RTCSEL_LSI + +/* + * ADC driver system settings. + */ +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_IRQ_PRIORITY 2 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 2 + +/* + * EXT driver system settings. + */ +#define STM32_EXT_EXTI0_1_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI2_3_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI4_15_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI16_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI17_IRQ_PRIORITY 3 + +/* + * GPT driver system settings. + */ +#define STM32_GPT_USE_TIM1 FALSE +#define STM32_GPT_USE_TIM2 FALSE +#define STM32_GPT_USE_TIM3 FALSE +#define STM32_GPT_USE_TIM14 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 2 +#define STM32_GPT_TIM2_IRQ_PRIORITY 2 +#define STM32_GPT_TIM3_IRQ_PRIORITY 2 +#define STM32_GPT_TIM14_IRQ_PRIORITY 2 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 TRUE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_IRQ_PRIORITY 3 +#define STM32_I2C_I2C2_IRQ_PRIORITY 3 +#define STM32_I2C_USE_DMA TRUE +#define STM32_I2C_I2C1_DMA_PRIORITY 1 +#define STM32_I2C_I2C2_DMA_PRIORITY 1 +#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * ICU driver system settings. + */ +#define STM32_ICU_USE_TIM1 FALSE +#define STM32_ICU_USE_TIM2 FALSE +#define STM32_ICU_USE_TIM3 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 3 +#define STM32_ICU_TIM2_IRQ_PRIORITY 3 +#define STM32_ICU_TIM3_IRQ_PRIORITY 3 + +/* + * PWM driver system settings. + */ +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 FALSE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 TRUE +#define STM32_PWM_TIM1_IRQ_PRIORITY 3 +#define STM32_PWM_TIM2_IRQ_PRIORITY 3 +#define STM32_PWM_TIM3_IRQ_PRIORITY 3 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USART1_PRIORITY 3 +#define STM32_SERIAL_USART2_PRIORITY 3 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 TRUE +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 2 +#define STM32_ST_USE_TIMER 2 + +/* + * UART driver system settings. + */ +#define STM32_UART_USE_USART1 FALSE +#define STM32_UART_USE_USART2 FALSE +#define STM32_UART_USART1_IRQ_PRIORITY 3 +#define STM32_UART_USART2_IRQ_PRIORITY 3 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_USB1 TRUE +#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE +#define STM32_USB_USB1_LP_IRQ_PRIORITY 3 + +#endif /* _MCUCONF_H_ */ diff --git a/keyboards/cannonkeys/tmov2/readme.md b/keyboards/cannonkeys/tmov2/readme.md new file mode 100644 index 000000000000..d19ba33935d4 --- /dev/null +++ b/keyboards/cannonkeys/tmov2/readme.md @@ -0,0 +1,12 @@ +# TMO V2 Keyboard + +TMO V2 Keyboard + +Keyboard Maintainer: [Andrew Kannan](/~https://github.com/awkannan) +Hardware Supported: STM32F072CBT6 + +Make example for this keyboard (after setting up your build environment): + + make cannonkeys/tmov2:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/cannonkeys/tmov2/rules.mk b/keyboards/cannonkeys/tmov2/rules.mk new file mode 100644 index 000000000000..828fa8ff805f --- /dev/null +++ b/keyboards/cannonkeys/tmov2/rules.mk @@ -0,0 +1,64 @@ +# project specific files +# SRC = ssd1306.c +## chip/board settings +# the next two should match the directories in +# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F0xx +# linker script to use +# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +MCU_LDSCRIPT = STM32F072xB +# startup code to use +# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f0xx +# it should exist either in /os/hal/boards/ +# or /boards +BOARD = ST_STM32F072B_DISCOVERY +# Cortex version +# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 +MCU = cortex-m0 +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +ARMV = 6 +# If you want to be able to jump to bootloader from firmware on STM32 MCUs, +# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in +# ./bootloader_defs.h or in ./boards//bootloader_defs.h (if you have +# a custom board definition that you plan to reuse). +# If you're not setting it here, leave it commented out. +# It is chip dependent, the correct number can be looked up here (page 175): +# http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf +# This also requires a patch to chibios: +# /tmk_core/tool/chibios/ch-bootloader-jump.patch +#STM32_BOOTLOADER_ADDRESS = 0x1FFFC800 + +# Build Options +# comment out to disable the options. +# + +# Options to pass to dfu-util when flashing +DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave +DFU_SUFFIX_ARGS = -p DF11 -v 0483 + +# Build Options +# comment out to disable the options. +# + +# project specific files +VPATH += keyboards/cannonkeys/stm32f072 +SRC = keyboard.c \ + led.c + +DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave +DFU_SUFFIX_ARGS = -v 0483 -p DF11 + +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +CUSTOM_MATRIX = no # Custom matrix file +# BACKLIGHT_ENABLE = yes # This is broken on 072 right now +RGBLIGHT_ENABLE = yes + diff --git a/keyboards/cannonkeys/tmov2/tmov2.c b/keyboards/cannonkeys/tmov2/tmov2.c new file mode 100644 index 000000000000..47295ac270bd --- /dev/null +++ b/keyboards/cannonkeys/tmov2/tmov2.c @@ -0,0 +1 @@ +#include "tmov2.h" diff --git a/keyboards/cannonkeys/tmov2/tmov2.h b/keyboards/cannonkeys/tmov2/tmov2.h new file mode 100644 index 000000000000..838075e71b94 --- /dev/null +++ b/keyboards/cannonkeys/tmov2/tmov2.h @@ -0,0 +1,15 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT_default( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ + K300, K302, K303, K305, K307, K309, K310 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO}, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO}, \ + { K300, KC_NO, K302, K303, KC_NO, K305, KC_NO, K307, KC_NO, K309, K310, KC_NO, KC_NO, KC_NO} \ +} From f183af14adbdea0789bf85bda46b81139e4524a8 Mon Sep 17 00:00:00 2001 From: kuchosauronad0 <22005492+kuchosauronad0@users.noreply.github.com> Date: Tue, 29 Oct 2019 23:59:44 -0700 Subject: [PATCH 225/316] [Keymap] Update keymap for kuchosauronad0 (#6902) * Add RGB * Add Plover layer --- keyboards/c39/keymaps/kuchosauronad0/config.h | 24 +++---- keyboards/c39/keymaps/kuchosauronad0/keymap.c | 64 +++++++++---------- .../c39/keymaps/kuchosauronad0/readme.md | 9 +++ keyboards/c39/keymaps/kuchosauronad0/rules.mk | 12 ++-- 4 files changed, 56 insertions(+), 53 deletions(-) diff --git a/keyboards/c39/keymaps/kuchosauronad0/config.h b/keyboards/c39/keymaps/kuchosauronad0/config.h index c214ddb75043..cf0726e2bb02 100644 --- a/keyboards/c39/keymaps/kuchosauronad0/config.h +++ b/keyboards/c39/keymaps/kuchosauronad0/config.h @@ -28,16 +28,16 @@ along with this program. If not, see . get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_LALT)) \ ) -//#ifdef RGBLIGHT_ENABLE -//#define RGB_DI_PIN D3 -//#define RGBLED_NUM 16 // Number of LEDs -//#define RGBLED_SPLIT { 8, 8 } -// -//#define RGBLIGHT_HUE_STEP 12 -//#define RGBLIGHT_SAT_STEP 12 -//#define RGBLIGHT_VAL_STEP 12 -//#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2 -//#define RGBLIGHT_EFFECT_SNAKE_LENGTH 2 -//#define RGBLIGHT_EFFECT_BREATHE_CENTER 1 -//#endif // RGBLIGHT_ENABLE +#ifdef RGBLIGHT_ENABLE +# define RGB_DI_PIN D0 +# define RGBLED_NUM 4 +#endif // !RGBLIGHT_ENABLE + +/* +#ifdef AUDIO_ENABLE +# Timer 1: #define B5_AUDIO #define B6_AUDIO #define B7_AUDIO +# Timer 3: #define C4_AUDIO #define C5_AUDIO #define C6_AUDIO +//TODO: only D0 and D1 available +#endif // !AUDIO_ENABLE +*/ diff --git a/keyboards/c39/keymaps/kuchosauronad0/keymap.c b/keyboards/c39/keymaps/kuchosauronad0/keymap.c index 738408cc3e9f..231e3cf44d10 100644 --- a/keyboards/c39/keymaps/kuchosauronad0/keymap.c +++ b/keyboards/c39/keymaps/kuchosauronad0/keymap.c @@ -22,14 +22,18 @@ along with this program. If not, see . #include QMK_KEYBOARD_H #include "kuchosauronad0.h" -#ifdef INDICATOR_LIGHTS -extern userspace_config_t userspace_config; +#ifdef RGBLIGHT_ENABLE + extern rgblight_config_t rgblight_config; +#endif -uint8_t last_mod; -uint8_t last_led; -uint8_t last_osm; +#ifdef INDICATOR_LIGHTS + extern userspace_config_t userspace_config; + uint8_t last_mod; + uint8_t last_led; + uint8_t last_osm; #endif + #define LAYOUT_collide39_base( \ K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ @@ -40,7 +44,16 @@ uint8_t last_osm; SFT_T(KC_ESC), K11, K12, K13, K14, K15, LT(LOWER,KC_PGDN), K16, K17, K18, K19, K1A, SFT_T(KC_ENT), \ MT(MOD_LCTL,KC_DEL), K21, K22, K23, K24, K25, KC_SPACE, K26, K27, K28, K29, K2A, KC_LEAD \ ) -#define LAYOUT_collide39_base_wrapper(...) LAYOUT_collide39_base(__VA_ARGS__) + +/* + * ,------. ,----------------------------------------------------------------------------. ,------. + * |ALTTAB| | Q | W | E | R | T |RSE/PU| Y | U | I | O | P | | BSPC | + * |------| |------+------+------+------+------+------+------+------+------+------+------+ |------| + * |SF/ESC| | A | S | D | F | G |LWR/PD| H | J | K | L | ; | | ENTER| + * |------| |------+------+------+------+------+------+------+------+------+------+------+ |------| + * |CTLDEL| | Z | X | C | V | B |SPACE | N | M | , | . | / | |LEADER| + * `------' `----------------------------------------------------------------------------' `------' + */ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -70,39 +83,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), #endif [_WORKMAN] = LAYOUT_collide39_base_wrapper( - _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, - _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, - _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ - ), - - [_NORMAN] = LAYOUT_collide39_base_wrapper( - _________________NORMAN_L1_________________, _________________NORMAN_L1_________________, - _________________NORMAN_L2_________________, _________________NORMAN_R2_________________, - _________________NORMAN_L3_________________, _________________NORMAN_R3_________________ - ), - - [_MALTRON] = LAYOUT_collide39_base_wrapper( - _________________MALTRON_L1________________, _________________MALTRON_R1________________, - _________________MALTRON_L2________________, _________________MALTRON_R2________________, - _________________MALTRON_L3________________, _________________MALTRON_R3________________ + _________________RGB_UP____________________, _________________RGB_UP____________________, + _________________RGB_CENTER________________, _________________RGB_CENTER________________, + _________________RGB_DOWN__________________, _________________RGB_DOWN__________________ ), - [_EUCALYN] = LAYOUT_collide39_base_wrapper( - _________________EUCALYN_L1________________, _________________EUCALYN_R1________________, - _________________EUCALYN_L2________________, _________________EUCALYN_R2________________, - _________________EUCALYN_L3________________, _________________EUCALYN_R3________________ + [_PLOVER] = LAYOUT_wrapper(\ + KC_1, _________________PLOVER_L1_________________, _______, _________________PLOVER_R1_________________, KC_1, + KC_NO, _________________PLOVER_L2_________________, _______, _________________PLOVER_R2_________________, KC_NO, + KC_NO, _________________PLOVER_L3_________________, _______, _________________PLOVER_R3_________________, _______ ), - [_CARPLAX] = LAYOUT_collide39_base_wrapper( - _____________CARPLAX_QFMLWY_L1_____________, _____________CARPLAX_QFMLWY_R1_____________, - _____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________, - _____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________ - ), - - [_MODS] = LAYOUT_wrapper(\ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_LALT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RALT, + KC_LCTL, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RCTL, KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), @@ -121,7 +115,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_ADJUST] = LAYOUT_wrapper(\ KC_MAKE, _________________ADJUST_L1_________________, _______, _________________ADJUST_R1_________________, KC_RESET, VRSN, _________________ADJUST_L2_________________, _______, _________________ADJUST_R2_________________, EEP_RST, - TG_MODS, _________________ADJUST_L3_________________, _______, _________________ADJUST_R3_________________, KC_MPLY + DEBUG, _________________ADJUST_L3_________________, _______, _________________ADJUST_R3_________________, _______ ) }; diff --git a/keyboards/c39/keymaps/kuchosauronad0/readme.md b/keyboards/c39/keymaps/kuchosauronad0/readme.md index 60b971e4eb3e..ff01fb5ffa63 100644 --- a/keyboards/c39/keymaps/kuchosauronad0/readme.md +++ b/keyboards/c39/keymaps/kuchosauronad0/readme.md @@ -1 +1,10 @@ # Personal keymap for the collide39 + +## Features: + +- leader key +- combos +- tap dance +- rgb backlight for the space key using a chameleon 4x WS28xx leds + +# diff --git a/keyboards/c39/keymaps/kuchosauronad0/rules.mk b/keyboards/c39/keymaps/kuchosauronad0/rules.mk index e2be2e5acc80..ac7c77dd4608 100644 --- a/keyboards/c39/keymaps/kuchosauronad0/rules.mk +++ b/keyboards/c39/keymaps/kuchosauronad0/rules.mk @@ -2,19 +2,19 @@ BOOTLOADER = caterina BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = no # Commands for debug and configuration LEADER_ENABLE = yes # default is yes TAP_DANCE_ENABLE = no #(+1254) +COMBO_ENABLE = yes UNICODE_ENABLE = no #(+1134) UNICODEMAP_ENABLE = yes -RGBLIGHT_ENABLE = no +RGBLIGHT_ENABLE = yes AUDIO_ENABLE = no NKRO_ENABLE = yes -INDICATOR_LIGHTS = no +INDICATOR_LIGHTS = yes MACROS_ENABLED = no -RGBLIGHT_TWINKLE = no -RGBLIGHT_STARTUP_ANIMATION = no +RGBLIGHT_STARTUP_ANIMATION = yes -NO_SECRETS = yes +NO_SECRETS = no From dfdd9e821bfce93324ea68d8652008509137e0d9 Mon Sep 17 00:00:00 2001 From: "Rico Sta. Cruz" Date: Thu, 31 Oct 2019 05:53:48 +1100 Subject: [PATCH 226/316] [Docs] Update getting_started_vagrant.md (#7203) --- docs/getting_started_vagrant.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/getting_started_vagrant.md b/docs/getting_started_vagrant.md index b62524271c25..da26682d7f30 100644 --- a/docs/getting_started_vagrant.md +++ b/docs/getting_started_vagrant.md @@ -40,7 +40,7 @@ vagrant plugin install vagrant-vbguest Finished with your environment? From anywhere inside the folder where you checked out this project, Execute: ```console -vagrant destory +vagrant destroy ``` ### What if I want to use Docker directly? @@ -54,4 +54,4 @@ Execute the following to bypass the `vagrant` user booting directly to the offic ```console vagrant ssh -c 'sudo -i' -``` \ No newline at end of file +``` From 096a49c3dc3a1674a8cc95987c97e922c0c769a4 Mon Sep 17 00:00:00 2001 From: ai03 Date: Wed, 30 Oct 2019 17:10:40 -0700 Subject: [PATCH 227/316] [Keyboard] Add KBD67 MKII Solderable PCB Variant (#7202) * Clone 8x source to begin * Start replacing stuff * Get things compiling * Rename files * Move board files to match MKII RGB files * Adjust readme * Adjust main keymap to be functional * Make defualt keymap more basic; add personal keymap * Remove unnecessary trailing slashes from keymap * Remove unused functions from keymaps * Remove obsolete build flags * Adjust comments as requested * Apply suggestions from code review Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Adjust as suggested * Fix broken compile following applying suggestions --- .../kbdfans/kbd67/mkii_soldered/config.h | 251 ++++++++++++++++++ .../kbdfans/kbd67/mkii_soldered/info.json | 83 ++++++ .../kbd67/mkii_soldered/keymaps/ai03/keymap.c | 41 +++ .../mkii_soldered/keymaps/ai03/readme.md | 3 + .../mkii_soldered/keymaps/default/keymap.c | 40 +++ .../mkii_soldered/keymaps/default/readme.md | 3 + .../kbd67/mkii_soldered/mkii_soldered.c | 48 ++++ .../kbd67/mkii_soldered/mkii_soldered.h | 43 +++ .../kbdfans/kbd67/mkii_soldered/readme.md | 16 ++ .../kbdfans/kbd67/mkii_soldered/rules.mk | 35 +++ 10 files changed, 563 insertions(+) create mode 100644 keyboards/kbdfans/kbd67/mkii_soldered/config.h create mode 100644 keyboards/kbdfans/kbd67/mkii_soldered/info.json create mode 100644 keyboards/kbdfans/kbd67/mkii_soldered/keymaps/ai03/keymap.c create mode 100644 keyboards/kbdfans/kbd67/mkii_soldered/keymaps/ai03/readme.md create mode 100644 keyboards/kbdfans/kbd67/mkii_soldered/keymaps/default/keymap.c create mode 100644 keyboards/kbdfans/kbd67/mkii_soldered/keymaps/default/readme.md create mode 100644 keyboards/kbdfans/kbd67/mkii_soldered/mkii_soldered.c create mode 100644 keyboards/kbdfans/kbd67/mkii_soldered/mkii_soldered.h create mode 100644 keyboards/kbdfans/kbd67/mkii_soldered/readme.md create mode 100644 keyboards/kbdfans/kbd67/mkii_soldered/rules.mk diff --git a/keyboards/kbdfans/kbd67/mkii_soldered/config.h b/keyboards/kbdfans/kbd67/mkii_soldered/config.h new file mode 100644 index 000000000000..6a726af06159 --- /dev/null +++ b/keyboards/kbdfans/kbd67/mkii_soldered/config.h @@ -0,0 +1,251 @@ +/* +Copyright 2019 Ryota Goto + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xA103 +#define PRODUCT_ID 0x0013 +#define DEVICE_VER 0x0001 +#define MANUFACTURER KBDfans +#define PRODUCT KBD67-MKII +#define DESCRIPTION 65% Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { B3, D0, D1, D2, D3 } +#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4, D5 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 + +//#define RGB_DI_PIN B3 +//#ifdef RGB_DI_PIN +// #define RGBLED_NUM 20 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 200 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +/*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +//#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * 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 + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/kbdfans/kbd67/mkii_soldered/info.json b/keyboards/kbdfans/kbd67/mkii_soldered/info.json new file mode 100644 index 000000000000..6440a007eeb2 --- /dev/null +++ b/keyboards/kbdfans/kbd67/mkii_soldered/info.json @@ -0,0 +1,83 @@ +{ + "keyboard_name": "KBD67 MKII Soldered Variant", + "url": "", + "maintainer": "qmk", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [{"label":"~", "x":0, "y":0}, + {"label":"!", "x":1, "y":0}, + {"label":"@", "x":2, "y":0}, + {"label":"#", "x":3, "y":0}, + {"label":"$", "x":4, "y":0}, + {"label":"%", "x":5, "y":0}, + {"label":"^", "x":6, "y":0}, + {"label":"&", "x":7, "y":0}, + {"label":"*", "x":8, "y":0}, + {"label":"(", "x":9, "y":0}, + {"label":")", "x":10, "y":0}, + {"label":"_", "x":11, "y":0}, + {"label":"+", "x":12, "y":0}, + {"label":"Back Space", "x":13, "y":0}, + {"label":"Delete", "x":14, "y":0}, + {"label":"Home", "x":15, "y":0}, + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"{", "x":11.5, "y":1}, + {"label":"}", "x":12.5, "y":1}, + {"label":"|", "x":13.5, "y":1, "w":1.5}, + {"label":"End", "x":15, "y":1}, + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":":", "x":10.75, "y":2}, + {"label":"\"", "x":11.75, "y":2}, + {"label":"Enter", "x":12.75, "y":2, "w":2.25}, + {"label":"PgUp", "x":15, "y":2}, + {"label":"Shift", "x":0, "y":3, "w":1.25}, + {"label":"Hi", "x":1.25, "y":3}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":"<", "x":9.25, "y":3}, + {"label":">", "x":10.25, "y":3}, + {"label":"?", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":1.75}, + {"label":"↑", "x":14, "y":3}, + {"label":"PgDn", "x":15, "y":3}, + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, + {"label":"Win", "x":1.25, "y":4, "w":1.25}, + {"label":"Alt", "x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":2.25}, + {"x":6, "y":4, "w":1.25}, + {"x":7.25, "y":4, "w":2.75}, + {"label":"Alt", "x":10, "y":4, "w":1.25}, + {"label":"Win", "x":11.25, "y":4, "w":1.25}, + {"label":"←", "x":13, "y":4}, + {"label":"↓", "x":14, "y":4}, + {"label":"→", "x":15, "y":4} + ] + } + } +} diff --git a/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/ai03/keymap.c b/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/ai03/keymap.c new file mode 100644 index 000000000000..0e6cdf776a49 --- /dev/null +++ b/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/ai03/keymap.c @@ -0,0 +1,41 @@ +/* Copyright 2019 Ryota Goto + * + * 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 . + */ +#include QMK_KEYBOARD_H + +/* K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K212, K014, \ + * K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ + * K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K213, K214, \ + * K300, K404, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ + * K400, K401, K402, K403, K405, K407, K409, K410, K411, K413, K414 \ + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( /* Base */ + 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_BSPC, KC_DEL, + 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_END, + MO(1), 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_PGUP, + KC_LSFT, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PSCR, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_GRV, KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_all( /* FN */ + RESET, 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_CAPS, _______, KC_PGUP, _______, _______, _______, _______, _______, KC_UP, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, + _______, KC_HOME, KC_PGDN, KC_END, _______, KC_VOLD, KC_VOLU, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, BL_INC, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, BL_DEC, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END + ) +}; + diff --git a/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/ai03/readme.md b/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/ai03/readme.md new file mode 100644 index 000000000000..91306e82af0d --- /dev/null +++ b/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/ai03/readme.md @@ -0,0 +1,3 @@ +# The ai03 keymap for KBD67 MKII + +Tweaked slightly for more functionality closer to home position. diff --git a/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/default/keymap.c b/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/default/keymap.c new file mode 100644 index 000000000000..6dcbf00dd257 --- /dev/null +++ b/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/default/keymap.c @@ -0,0 +1,40 @@ +/* Copyright 2019 Ryota Goto + * + * 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 . + */ +#include QMK_KEYBOARD_H + +/* K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K212, K014, \ + * K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ + * K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K213, K214, \ + * K300, K404, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ + * K400, K401, K402, K403, K405, K407, K409, K410, K411, K413, K414 \ + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( /* Base */ + 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_DEL, KC_HOME, + 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_END, + MO(1), 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_PGUP, + KC_LSFT, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_all( /* FN */ + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, BL_INC, + KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_DEC, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END + ) +}; diff --git a/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/default/readme.md b/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/default/readme.md new file mode 100644 index 000000000000..dec2b0486279 --- /dev/null +++ b/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/default/readme.md @@ -0,0 +1,3 @@ +# The default keymap for KBD67 MKII + +A basic 65% keymap. diff --git a/keyboards/kbdfans/kbd67/mkii_soldered/mkii_soldered.c b/keyboards/kbdfans/kbd67/mkii_soldered/mkii_soldered.c new file mode 100644 index 000000000000..c36a84e75ffe --- /dev/null +++ b/keyboards/kbdfans/kbd67/mkii_soldered/mkii_soldered.c @@ -0,0 +1,48 @@ +/* Copyright 2019 Ryota Goto + * + * 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 . + */ +#include "mkii_soldered.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* + +void matrix_init_kb(void) { + + matrix_init_user(); +} + +void led_set_kb(uint8_t usb_led) { + + led_set_user(usb_led); +} + +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); +} + +*/ diff --git a/keyboards/kbdfans/kbd67/mkii_soldered/mkii_soldered.h b/keyboards/kbdfans/kbd67/mkii_soldered/mkii_soldered.h new file mode 100644 index 000000000000..7eb11f1ff07c --- /dev/null +++ b/keyboards/kbdfans/kbd67/mkii_soldered/mkii_soldered.h @@ -0,0 +1,43 @@ +/* Copyright 2019 Ryota Goto + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_all( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K212, K014, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K213, K214, \ + K300, K404, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ + K400, K401, K402, K403, K405, K407, K409, K410, K411, K413, K414 \ +) \ +{ \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \ + { K400, K401, K402, K403, K404, K405, KC_NO, K407, KC_NO, K409, K410, K411, KC_NO, K413, K414 } \ +} + + diff --git a/keyboards/kbdfans/kbd67/mkii_soldered/readme.md b/keyboards/kbdfans/kbd67/mkii_soldered/readme.md new file mode 100644 index 000000000000..313f244e14c6 --- /dev/null +++ b/keyboards/kbdfans/kbd67/mkii_soldered/readme.md @@ -0,0 +1,16 @@ +# KBD67 MKII - Soldered Variant + +![Render](https://i.imgur.com/W8jBycQ.png) + +A simple 65% keyboard +This is for the solderable PCB for the MKII. For hotswap PCB firmware, please check the other directories. + +Keyboard Maintainer: [ai03](/~https://github.com/ai03-2725) / [KBDfans](https://kbdfans.cn/) +Hardware Supported: KBD67 MKII Soldered PCB (Not hotswap) +Hardware Availability: KBDfans + +Make example for this keyboard (after setting up your build environment): + + make kbdfans/kbd67/mkii_soldered:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/kbdfans/kbd67/mkii_soldered/rules.mk b/keyboards/kbdfans/kbd67/mkii_soldered/rules.mk new file mode 100644 index 000000000000..bf65a7a74e35 --- /dev/null +++ b/keyboards/kbdfans/kbd67/mkii_soldered/rules.mk @@ -0,0 +1,35 @@ +# MCU name +MCU = atmega32u4 + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs \ No newline at end of file From 6a75d109794df2541f54abebddb80a3c070ab0f0 Mon Sep 17 00:00:00 2001 From: lf Date: Wed, 30 Oct 2019 21:56:59 -0700 Subject: [PATCH 228/316] [Docs] Fix dunder names being accidentally bolded (#7217) * Fix dunder names being accidentally bolded * Update docs/coding_conventions_python.md Co-Author: fauxpark * Change all the "names to avoid" to use backticks --- docs/coding_conventions_python.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/coding_conventions_python.md b/docs/coding_conventions_python.md index c7743050e20e..694aa38cfc21 100644 --- a/docs/coding_conventions_python.md +++ b/docs/coding_conventions_python.md @@ -77,9 +77,9 @@ Always use a .py filename extension. Never use dashes. ## Names to Avoid -* single character names except for counters or iterators. You may use "e" as an exception identifier in try/except statements. -* dashes (-) in any package/module name -* __double_leading_and_trailing_underscore__ names (reserved by Python) +* single character names except for counters or iterators. You may use `e` as an exception identifier in try/except statements. +* dashes (`-`) in any package/module name +* `__double_leading_and_trailing_underscore__` names (reserved by Python) # Docstrings From 3e77e2aeac10e9305e4f7879e1cb237edf37866b Mon Sep 17 00:00:00 2001 From: davidwed Date: Thu, 31 Oct 2019 05:57:53 +0100 Subject: [PATCH 229/316] [Keyboard] KBDfans/KBD75: Set "RGBLIGHT_SLEEP" as default (#7205) --- keyboards/kbdfans/kbd75/config.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/keyboards/kbdfans/kbd75/config.h b/keyboards/kbdfans/kbd75/config.h index a9dc487db14f..83fd8cbdae9d 100644 --- a/keyboards/kbdfans/kbd75/config.h +++ b/keyboards/kbdfans/kbd75/config.h @@ -44,4 +44,6 @@ #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 +/* If defined, the RGB lighting will be switched off when the host goes to sleep */ +#define RGBLIGHT_SLEEP #endif From c4730ba00f643e9dd1b5bb68f67c9c359a934280 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Wed, 30 Oct 2019 21:59:54 -0700 Subject: [PATCH 230/316] [Keyboard] Fix info.json for Aranck handwired (#7206) --- keyboards/handwired/aranck/info.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/handwired/aranck/info.json b/keyboards/handwired/aranck/info.json index 143a533e0ea7..450d89634a1b 100644 --- a/keyboards/handwired/aranck/info.json +++ b/keyboards/handwired/aranck/info.json @@ -57,6 +57,6 @@ { "x": 10, "y": 3 }, { "x": 11, "y": 3 } ] - }, + } } } From 878039c59c2c4eae5b2556ad526418ca9a9c9ab3 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Wed, 30 Oct 2019 22:01:23 -0700 Subject: [PATCH 231/316] [Keyboard] Complete info.json for Chiron handwired (#7207) --- keyboards/handwired/chiron/info.json | 81 ++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) diff --git a/keyboards/handwired/chiron/info.json b/keyboards/handwired/chiron/info.json index e69de29bb2d1..85aba1b43f8b 100644 --- a/keyboards/handwired/chiron/info.json +++ b/keyboards/handwired/chiron/info.json @@ -0,0 +1,81 @@ +{ + "keyboard_name": "Chiron Keyboard", + "url": "", + "maintainer": "musl", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"L00", "x":0, "y":0}, + {"label":"L01", "x":1, "y":0}, + {"label":"L02", "x":2, "y":0}, + {"label":"L03", "x":3, "y":0}, + {"label":"L04", "x":4, "y":0}, + {"label":"L05", "x":5, "y":0}, + {"label":"L06", "x":6, "y":0}, + {"label":"R00", "x":8, "y":0}, + {"label":"R01", "x":9, "y":0}, + {"label":"R02", "x":10, "y":0}, + {"label":"R03", "x":11, "y":0}, + {"label":"R04", "x":12, "y":0}, + {"label":"R05", "x":13, "y":0}, + {"label":"R06", "x":14, "y":0}, + {"label":"L10", "x":0, "y":1}, + {"label":"L11", "x":1, "y":1}, + {"label":"L12", "x":2, "y":1}, + {"label":"L13", "x":3, "y":1}, + {"label":"L14", "x":4, "y":1}, + {"label":"L15", "x":5, "y":1}, + {"label":"L16", "x":6, "y":1}, + {"label":"R10", "x":8, "y":1}, + {"label":"R11", "x":9, "y":1}, + {"label":"R12", "x":10, "y":1}, + {"label":"R13", "x":11, "y":1}, + {"label":"R14", "x":12, "y":1}, + {"label":"R15", "x":13, "y":1}, + {"label":"R16", "x":14, "y":1}, + {"label":"L20", "x":0, "y":2}, + {"label":"L21", "x":1, "y":2}, + {"label":"L22", "x":2, "y":2}, + {"label":"L23", "x":3, "y":2}, + {"label":"L24", "x":4, "y":2}, + {"label":"L25", "x":5, "y":2}, + {"label":"L26", "x":6, "y":2}, + {"label":"R20", "x":8, "y":2}, + {"label":"R21", "x":9, "y":2}, + {"label":"R22", "x":10, "y":2}, + {"label":"R23", "x":11, "y":2}, + {"label":"R24", "x":12, "y":2}, + {"label":"R25", "x":13, "y":2}, + {"label":"R26", "x":14, "y":2}, + {"label":"L30", "x":0, "y":3}, + {"label":"L31", "x":1, "y":3}, + {"label":"L32", "x":2, "y":3}, + {"label":"L33", "x":3, "y":3}, + {"label":"L34", "x":4, "y":3}, + {"label":"L35", "x":5, "y":3}, + {"label":"L36", "x":6, "y":3}, + {"label":"R30", "x":8, "y":3}, + {"label":"R31", "x":9, "y":3}, + {"label":"R32", "x":10, "y":3}, + {"label":"R33", "x":11, "y":3}, + {"label":"R34", "x":12, "y":3}, + {"label":"R35", "x":13, "y":3}, + {"label":"R36", "x":14, "y":3}, + {"label":"L40", "x":0, "y":4}, + {"label":"L41", "x":1, "y":4}, + {"label":"L42", "x":2, "y":4}, + {"label":"L43", "x":4, "y":4, "h":1.25}, + {"label":"L44", "x":5, "y":4, "h":1.25}, + {"label":"L45", "x":6, "y":4, "h":1.25}, + {"label":"R40", "x":8, "y":4, "h":1.25}, + {"label":"R41", "x":9, "y":4, "h":1.25}, + {"label":"R42", "x":10, "y":4, "h":1.25}, + {"label":"R43", "x":12, "y":4}, + {"label":"R44", "x":13, "y":4}, + {"label":"R45", "x":14, "y":4} + ] + } + } +} From e176ab11ab2cc6bfe46ed43da32a48d41532241f Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Wed, 30 Oct 2019 22:02:08 -0700 Subject: [PATCH 232/316] [Keyboard] Complete info.json for Sticc14 handwired (#7208) --- keyboards/handwired/sticc14/info.json | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/keyboards/handwired/sticc14/info.json b/keyboards/handwired/sticc14/info.json index e69de29bb2d1..fac5ab313eb5 100644 --- a/keyboards/handwired/sticc14/info.json +++ b/keyboards/handwired/sticc14/info.json @@ -0,0 +1,27 @@ +{ + "keyboard_name": "Sticc14", + "url": "", + "maintainer": "erkhal", + "width": 3, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"K00", "x":0, "y":0}, + {"label":"K01", "x":1, "y":0}, + {"label":"K02", "x":2, "y":0}, + {"label":"K10", "x":0, "y":1}, + {"label":"K11", "x":1, "y":1}, + {"label":"K12", "x":2, "y":1}, + {"label":"K20", "x":0, "y":2}, + {"label":"K21", "x":1, "y":2}, + {"label":"K22", "x":2, "y":2}, + {"label":"K30", "x":0, "y":3}, + {"label":"K31", "x":1, "y":3}, + {"label":"K32", "x":2, "y":3}, + {"label":"K40", "x":0, "y":4, "w":2}, + {"label":"K41", "x":2, "y":4} + ] + } + } +} From bd55396a45338b82bf8f26afa05b054c1079286d Mon Sep 17 00:00:00 2001 From: XScorpion2 Date: Thu, 31 Oct 2019 00:12:15 -0500 Subject: [PATCH 233/316] [Keyboard] Legonut Sol R2 Release (#7213) * Merge remote-tracking branch 'legonut/sol_r2_release' into master_update2 * Update keyboards/rgbkb/sol/readme.md Co-Authored-By: fauxpark --- keyboards/rgbkb/sol/keymaps/default/keymap.c | 2 +- keyboards/rgbkb/sol/readme.md | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/keyboards/rgbkb/sol/keymaps/default/keymap.c b/keyboards/rgbkb/sol/keymaps/default/keymap.c index 9bbc6397b935..51039e48e2a9 100644 --- a/keyboards/rgbkb/sol/keymaps/default/keymap.c +++ b/keyboards/rgbkb/sol/keymaps/default/keymap.c @@ -111,7 +111,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| * | | HUD | VAD | HUI |RGBRST| | | | | |QWERTY|COLEMK| | | | * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | | | | | | | | | | | |RGBTOG| HUI | SAI | VAI | + * | | SPD | | SPI | | | | | | | |RGBTOG| HUI | SAI | VAI | * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| * | | | |RGBMOD(| | | | | | | |RGBRMOD| HUD | SAD | VAD | * `------+------+------+------+------+------+------| |------+------+------+------+------+------+------' diff --git a/keyboards/rgbkb/sol/readme.md b/keyboards/rgbkb/sol/readme.md index 391189095c3a..7e7946d57338 100644 --- a/keyboards/rgbkb/sol/readme.md +++ b/keyboards/rgbkb/sol/readme.md @@ -1,15 +1,15 @@ # Sol -![Sol](https://cdn.shopify.com/s/files/1/0008/8827/5005/products/CqdJAno_2048x2048.jpg?v=1533825028) +![Sol](https://imgur.com/1chZff9) -Sol is a split ergonomic keyboard with ortholinear alphas and several modifier layouts. It can use up to 88 RGB LEDs, with per-key backlighting and underglow. The boards have presoldered components, including type C ports and ATmega32U4. Sol, when used with dual power supplies, is the brightest keyboard on earth. +Sol is a split ergonomic keyboard with ortholinear alphas and several modifier layouts. It can use up to 180 RGB LEDs, with per-key backlighting, perimeter, and optional underglow. The boards have presoldered components, including type C ports and ATmega32U4. Sol, when used with dual power supplies, is the brightest keyboard on earth. Keyboard Maintainer: [Legonut](/~https://github.com/Legonut) -Hardware Supported: Sol PCB R1.0, R1.1 +Hardware Supported: Sol PCB R1.0, R1.1, R2.0, R2.1 Hardware Availability: [RGBKB](https://www.rgbkb.net) Make example for this keyboard (after setting up your build environment): - make rgbkb/sol:default + make rgbkb/sol/rev2:default See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). From 22812aee5c207c35010c4b5478af6039c4f2b1ef Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Thu, 31 Oct 2019 05:30:21 +0000 Subject: [PATCH 234/316] rgblight_task logic fixes (#7214) --- tmk_core/protocol/lufa/lufa.c | 4 ++-- tmk_core/protocol/vusb/main.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c index 12a6924fd004..eb166c828e51 100644 --- a/tmk_core/protocol/lufa/lufa.c +++ b/tmk_core/protocol/lufa/lufa.c @@ -78,7 +78,7 @@ extern keymap_config_t keymap_config; # include "virtser.h" #endif -#if (defined(RGB_MIDI) | defined(RGBLIGHT_ANIMATIONS)) & defined(RGBLIGHT_ENABLE) +#if (defined(RGB_MIDI) || defined(RGBLIGHT_ANIMATIONS)) && defined(RGBLIGHT_ENABLE) # include "rgblight.h" #endif @@ -1001,7 +1001,7 @@ int main(void) { MIDI_Device_USBTask(&USB_MIDI_Interface); #endif -#if defined(RGBLIGHT_ANIMATIONS) & defined(RGBLIGHT_ENABLE) +#if defined(RGBLIGHT_ANIMATIONS) && defined(RGBLIGHT_ENABLE) rgblight_task(); #endif diff --git a/tmk_core/protocol/vusb/main.c b/tmk_core/protocol/vusb/main.c index 8cc736497d7d..e6291900e6c8 100644 --- a/tmk_core/protocol/vusb/main.c +++ b/tmk_core/protocol/vusb/main.c @@ -22,7 +22,7 @@ #include "debug.h" #include "rgblight_reconfig.h" -#if (defined(RGB_MIDI) | defined(RGBLIGHT_ANIMATIONS)) & defined(RGBLIGHT_ENABLE) +#if (defined(RGB_MIDI) || defined(RGBLIGHT_ANIMATIONS)) && defined(RGBLIGHT_ENABLE) # include "rgblight.h" #endif From 74252e03cfd2ee3d7ba823fb4c3ce522f43e79a0 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Thu, 31 Oct 2019 16:50:45 +1100 Subject: [PATCH 235/316] Fix "could not find module" error message formatting (#7219) --- bin/qmk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/qmk b/bin/qmk index 876473fa43bd..5da8673ba0fe 100755 --- a/bin/qmk +++ b/bin/qmk @@ -26,7 +26,7 @@ with open(os.path.join(qmk_dir, 'requirements.txt'), 'r') as fd: module = line.split('=')[0] if '=' in line else line if not find_spec(module): - print('Could not find module %s!', module) + print('Could not find module %s!' % module) print('Please run `pip3 install -r requirements.txt` to install the python dependencies.') exit(255) From 934fa5183e95ad98e2e744c48e524308e940f799 Mon Sep 17 00:00:00 2001 From: moyi4681 Date: Thu, 31 Oct 2019 14:00:46 +0800 Subject: [PATCH 236/316] [Keyboard] add xbows woody and knight keyboards (#7112) * add xbows knight and woody keyboards add xbows knight and woody keyboards * Update rules.mk * Update keyboards/xbows/knight/readme.md Co-Authored-By: MechMerlin <30334081+mechmerlin@users.noreply.github.com> * Update knight.c * Update keyboards/xbows/knight/keymaps/default/keymap.c Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/xbows/knight/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/xbows/knight/rules.mk Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/xbows/knight/rules.mk Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/xbows/woody/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/xbows/knight/rules.mk Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update rules.mk * Update keymap.c * Update keyboards/xbows/woody/rules.mk Co-Authored-By: Drashna Jaelre * Update keyboards/xbows/knight/keymaps/default/keymap.c Co-Authored-By: Drashna Jaelre * Update keymap.c * Update keyboards/xbows/knight/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/xbows/knight/rules.mk Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/xbows/woody/rules.mk Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/xbows/woody/rules.mk Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> --- keyboards/xbows/knight/config.h | 39 ++++++ keyboards/xbows/knight/info.json | 12 ++ .../xbows/knight/keymaps/default/keymap.c | 18 +++ keyboards/xbows/knight/knight.c | 19 +++ keyboards/xbows/knight/knight.h | 35 +++++ keyboards/xbows/knight/readme.md | 15 ++ keyboards/xbows/knight/rules.mk | 33 +++++ keyboards/xbows/woody/config.h | 43 ++++++ keyboards/xbows/woody/info.json | 12 ++ .../xbows/woody/keymaps/default/keymap.c | 16 +++ keyboards/xbows/woody/readme.md | 15 ++ keyboards/xbows/woody/rules.mk | 16 +++ keyboards/xbows/woody/woody.c | 128 ++++++++++++++++++ keyboards/xbows/woody/woody.h | 16 +++ 14 files changed, 417 insertions(+) create mode 100644 keyboards/xbows/knight/config.h create mode 100644 keyboards/xbows/knight/info.json create mode 100644 keyboards/xbows/knight/keymaps/default/keymap.c create mode 100644 keyboards/xbows/knight/knight.c create mode 100644 keyboards/xbows/knight/knight.h create mode 100644 keyboards/xbows/knight/readme.md create mode 100644 keyboards/xbows/knight/rules.mk create mode 100644 keyboards/xbows/woody/config.h create mode 100644 keyboards/xbows/woody/info.json create mode 100644 keyboards/xbows/woody/keymaps/default/keymap.c create mode 100644 keyboards/xbows/woody/readme.md create mode 100644 keyboards/xbows/woody/rules.mk create mode 100644 keyboards/xbows/woody/woody.c create mode 100644 keyboards/xbows/woody/woody.h diff --git a/keyboards/xbows/knight/config.h b/keyboards/xbows/knight/config.h new file mode 100644 index 000000000000..6dc32db48e30 --- /dev/null +++ b/keyboards/xbows/knight/config.h @@ -0,0 +1,39 @@ +#pragma once +#include "config_common.h" +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x1225 +#define DEVICE_VER 0x0001 +#define MANUFACTURER X-BOWS +#define PRODUCT KNIGHT +#define DESCRIPTION XBOWS SPLIT keyboard + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 12 +#define MATRIX_COLS 15 + +// wiring of each half +#define MATRIX_ROW_PINS { D2, E6, C7, F7, F6, F5 } +#define MATRIX_COL_PINS { B0, B1, B2, B3, F4, F1, C6, B6, B5, B4, D7, D6, D4, D5, D3} +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +// #define BACKLIGHT_LEVELS 3 +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* serial.c configuration for split keyboard */ +#define SOFT_SERIAL_PIN D0 +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define SPLIT_HAND_PIN F0 +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + diff --git a/keyboards/xbows/knight/info.json b/keyboards/xbows/knight/info.json new file mode 100644 index 000000000000..9eafde01bcaa --- /dev/null +++ b/keyboards/xbows/knight/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "knight", + "url": "", + "maintainer": "xbows", + "width": 23.5, + "height": 6.5, + "layouts": { + "LAYOUT": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1.5, "y":0}, {"label":"F2", "x":2.5, "y":0}, {"label":"F3", "x":3.5, "y":0}, {"label":"F4", "x":4.5, "y":0}, {"label":"F5", "x":6, "y":0}, {"label":"F6", "x":7, "y":0}, {"label":"F7", "x":8, "y":0}, {"label":"F8", "x":9, "y":0}, {"label":"F9", "x":10.5, "y":0}, {"label":"F10", "x":11.5, "y":0}, {"label":"F11", "x":12.5, "y":0}, {"label":"F12", "x":13.5, "y":0}, {"x":14.5, "y":0, "w":2}, {"x":16.5, "y":0, "w":2}, {"x":19.5, "y":0}, {"x":20.5, "y":0}, {"x":21.5, "y":0}, {"x":22.5, "y":0}, {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":9.5, "y":1.5}, {"label":"&", "x":10.5, "y":1.5}, {"label":"*", "x":11.5, "y":1.5}, {"label":"(", "x":12.5, "y":1.5}, {"label":")", "x":13.5, "y":1.5}, {"label":"_", "x":14.5, "y":1.5}, {"label":"+", "x":15.5, "y":1.5}, {"label":"Backspace", "x":16.5, "y":1.5, "w":2}, {"label":"Num Lock", "x":19.5, "y":1.5}, {"label":"/", "x":20.5, "y":1.5}, {"label":"*", "x":21.5, "y":1.5}, {"label":"-", "x":22.5, "y":1.5}, {"label":"Tab", "x":0, "y":2.5}, {"label":"Q", "x":1, "y":2.5}, {"label":"W", "x":2, "y":2.5}, {"label":"E", "x":3, "y":2.5}, {"label":"R", "x":4, "y":2.5}, {"label":"T", "x":5, "y":2.5}, {"label":"Y", "x":9.5, "y":2.5}, {"label":"U", "x":10.5, "y":2.5}, {"label":"I", "x":11.5, "y":2.5}, {"label":"O", "x":12.5, "y":2.5}, {"label":"P", "x":13.5, "y":2.5}, {"label":"{", "x":14.5, "y":2.5}, {"label":"}", "x":15.5, "y":2.5}, {"label":"|", "x":16.5, "y":2.5}, {"x":17.5, "y":2.5}, {"label":"7", "x":19.5, "y":2.5}, {"label":"8", "x":20.5, "y":2.5}, {"label":"9", "x":21.5, "y":2.5}, {"label":"+", "x":22.5, "y":2.5}, {"label":"Caps Lock", "x":0, "y":3.5}, {"label":"A", "x":1, "y":3.5}, {"label":"S", "x":2, "y":3.5}, {"label":"D", "x":3, "y":3.5}, {"label":"F", "x":4, "y":3.5}, {"label":"G", "x":5, "y":3.5}, {"label":"Backspace", "x":6, "y":3.5, "w":3.25}, {"label":"H", "x":9.25, "y":3.5}, {"label":"J", "x":10.25, "y":3.5}, {"label":"K", "x":11.25, "y":3.5}, {"label":"L", "x":12.25, "y":3.5}, {"label":":", "x":13.25, "y":3.5}, {"label":"\"", "x":14.25, "y":3.5}, {"label":"Enter", "x":15.25, "y":3.5, "w":2.25}, {"x":17.5, "y":3.5}, {"label":"4", "x":19.5, "y":3.5}, {"label":"5", "x":20.5, "y":3.5}, {"label":"6", "x":21.5, "y":3.5}, {"x":22.5, "y":3.5}, {"label":"Shift", "x":0, "y":4.5}, {"label":"Z", "x":1, "y":4.5}, {"label":"X", "x":2, "y":4.5}, {"label":"C", "x":3, "y":4.5}, {"label":"V", "x":4, "y":4.5}, {"label":"B", "x":5, "y":4.5}, {"label":"Enter", "x":6, "y":4.5, "w":3.25}, {"label":"N", "x":9.25, "y":4.5}, {"label":"M", "x":10.25, "y":4.5}, {"label":"<", "x":11.25, "y":4.5}, {"label":">", "x":12.25, "y":4.5}, {"label":"?", "x":13.25, "y":4.5}, {"label":"Shift", "x":14.25, "y":4.5}, {"x":16.5, "y":4.5}, {"label":"1", "x":19.5, "y":4.5}, {"label":"2", "x":20.5, "y":4.5}, {"label":"3", "x":21.5, "y":4.5}, {"label":"Enter", "x":22.5, "y":4.5, "h":2}, {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, {"label":"Win", "x":1.25, "y":5.5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":2.25}, {"label":"Ctrl", "x":6, "y":5.5, "w":1.25}, {"label":"Shift", "x":7.25, "y":5.5, "w":1.25}, {"x":8.5, "y":5.5, "w":2.25}, {"label":"Alt", "x":10.75, "y":5.5, "w":2.25}, {"x":13, "y":5.5}, {"label":"Ctrl", "x":14, "y":5.5}, {"x":15.5, "y":5.5}, {"x":16.5, "y":5.5}, {"x":17.5, "y":5.5}, {"x":19.5, "y":5.5, "w":2}, {"x":21.5, "y":5.5}] + } + } +} diff --git a/keyboards/xbows/knight/keymaps/default/keymap.c b/keyboards/xbows/knight/keymaps/default/keymap.c new file mode 100644 index 000000000000..a6a65437aa7d --- /dev/null +++ b/keyboards/xbows/knight/keymaps/default/keymap.c @@ -0,0 +1,18 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_PSCR, KC_ESC, KC_TAB, KC_BSPC, MO(1), + 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_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_EQL, + 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_PGUP, KC_P7, KC_P8, KC_P9, KC_PMNS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_BSPC,KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_ENT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, + KC_LCTL, KC_LGUI, KC_LALT,KC_SPC, KC_LCTL, KC_LSFT,KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_ENT), + [1] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_PSCR, KC_ESC, KC_TAB, KC_BSPC,KC_TRNS, + 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_BSPC, KC_NLCK,KC_PSLS,KC_PAST,KC_EQL, + 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_PGUP, KC_P7, KC_P8, KC_P9, KC_PMNS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, BL_STEP,KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, RESET, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, + KC_LCTL, KC_LGUI, KC_SPC,KC_LALT, KC_LCTL, KC_LSFT,KC_SPC, KC_RALT, KC_TRNS,KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_0, KC_PDOT,KC_ENT ) +}; diff --git a/keyboards/xbows/knight/knight.c b/keyboards/xbows/knight/knight.c new file mode 100644 index 000000000000..1b8adc8c2acc --- /dev/null +++ b/keyboards/xbows/knight/knight.c @@ -0,0 +1,19 @@ +#include "knight.h" +void matrix_init_kb(void) { + setPinOutput(D1); + setPinOutput(E2); + matrix_init_user(); +}; +void led_set_kb(uint8_t usb_led) { + if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { + writePinHigh(D1); + } else { + writePinLow(D1); + } + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinHigh(E2); + } else { + writePinLow(E2); + } + led_set_user(usb_led); +} diff --git a/keyboards/xbows/knight/knight.h b/keyboards/xbows/knight/knight.h new file mode 100644 index 000000000000..0f252789fc6d --- /dev/null +++ b/keyboards/xbows/knight/knight.h @@ -0,0 +1,35 @@ +#pragma once + +#include "quantum.h" + + +#ifdef USE_I2C +#include +#ifdef __AVR__ + #include + #include +#endif +#endif + +#define LAYOUT( \ + 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, K111, K112, K113, K114, K115, K116, K117, K118, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, 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, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K415, K416, K417, \ + K500, K501, K502, K503, K505, K506, K507, K509, K510, K511, K512, K513, K514, K516, K517, K518 \ +) \ + { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, KC_NO, K111, K112, K113, K114 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314 }, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, KC_NO }, \ + { K500, K501, K502, K503, KC_NO,K505, K506, K507, KC_NO,K509, K510, K511, K512, K513, K514 }, \ + { K015, K016, K017, K018 }, \ + { K115, K116, K117, K118 }, \ + { K215, K216, K217, K218 }, \ + { K315, K316, K317, K318 }, \ + { K415, K416, K417, KC_NO }, \ + { KC_NO,K516, K517, K518 } \ +} diff --git a/keyboards/xbows/knight/readme.md b/keyboards/xbows/knight/readme.md new file mode 100644 index 000000000000..063ff7a2e6a7 --- /dev/null +++ b/keyboards/xbows/knight/readme.md @@ -0,0 +1,15 @@ +# KNIGHT +![KNIGHT](https://ftp.bmp.ovh/imgs/2019/10/5f357cd665dd4b04.png) + +KNIGHT, a split87 and pad Mechanical Keyboard. +X-BOWS Knight, the first ergonomic mechanical keyboard with magnetic connection of detachable numeric keypad on both sides. Revolutionary seamless integrated aluminum alloy body. Original spherical OEM keycaps. + +Keyboard Maintainer: X-BOWS +Hardware Supported: X-BOWS Knight +Hardware Availability: [X-BOWS](https://x-bows.com/) + +Make example for this keyboard (after setting up your build environment): + + make xbows/knight:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/xbows/knight/rules.mk b/keyboards/xbows/knight/rules.mk new file mode 100644 index 000000000000..3b18ea469681 --- /dev/null +++ b/keyboards/xbows/knight/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +SPLIT_KEYBOARD = yes diff --git a/keyboards/xbows/woody/config.h b/keyboards/xbows/woody/config.h new file mode 100644 index 000000000000..bf59031376cc --- /dev/null +++ b/keyboards/xbows/woody/config.h @@ -0,0 +1,43 @@ +#pragma once +#include "config_common.h" +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x1224 +#define DEVICE_VER 0x0001 +#define MANUFACTURER X-BOWS +#define PRODUCT WOO-DY +#define DESCRIPTION XBOWS 65RGB keyboard + +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 +#define MATRIX_ROW_PINS {B3, B2, B1, B0, B5 } +#define MATRIX_COL_PINS {B6, C6, C7, F4, F5, F6, F7, B7, D2, D3, D5, D4, D6, D7, B4 } +#define DIODE_DIRECTION COL2ROW + +#define RGB_MATRIX_LED_PROCESS_LIMIT 4 +#define RGB_MATRIX_LED_FLUSH_LIMIT 26 +#define DEBOUNCE 3 +#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects +#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +#define RGB_MATRIX_KEYPRESSES +#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 +#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define DISABLE_RGB_MATRIX_BAND_SAT +#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#define DISABLE_RGB_MATRIX_SPLASH +#define DISABLE_RGB_MATRIX_MULTISPLASH +#define DISABLE_RGB_MATRIX_SOLID_SPLASH +#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +#define DISABLE_RGB_MATRIX_DIGITAL_RAIN +#define DRIVER_ADDR_1 0b1110100 +#define DRIVER_ADDR_2 0b1110110 +#define DRIVER_COUNT 2 +#define DRIVER_1_LED_TOTAL 35 +#define DRIVER_2_LED_TOTAL 32 +#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) diff --git a/keyboards/xbows/woody/info.json b/keyboards/xbows/woody/info.json new file mode 100644 index 000000000000..498267783b46 --- /dev/null +++ b/keyboards/xbows/woody/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "WOO-DY", + "url": "", + "maintainer": "qmk", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0, "w":2}, {"x":15, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":15, "y":1}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":15, "y":2}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":6.25}, {"x":10.25, "y":4, "w":1.5}, {"x":11.75, "y":4, "w":1.25}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] + } + } +} diff --git a/keyboards/xbows/woody/keymaps/default/keymap.c b/keyboards/xbows/woody/keymaps/default/keymap.c new file mode 100644 index 000000000000..3010f568d9fd --- /dev/null +++ b/keyboards/xbows/woody/keymaps/default/keymap.c @@ -0,0 +1,16 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* Base */ + KC_GESC, 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_DEL, \ + 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_PGUP, \ + 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_PGDN, \ + 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_UP, KC_INS, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + [1] = LAYOUT( /* FN */ + KC_GESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_DEL, \ + KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, RESET, KC_HOME, \ + KC_CAPS, RGB_SPI, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, EEP_RST, KC_END, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MAGIC_TOGGLE_NKRO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, KC_MUTE, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT) +}; diff --git a/keyboards/xbows/woody/readme.md b/keyboards/xbows/woody/readme.md new file mode 100644 index 000000000000..002705e10e0a --- /dev/null +++ b/keyboards/xbows/woody/readme.md @@ -0,0 +1,15 @@ +# WOO-DY +![WOO-DY](https://ftp.bmp.ovh/imgs/2019/10/cf5ba2fa02a62afc.png) + +Woo-dy, A 67 Keys Wooden Mechanical Keyboard. +At once minimalist and stylish, Woo-dy brings a natural calm and relaxation to your working space. The natural wood base made from real walnut or cherry reduces weight, feels great and adds subtle, natural style to any room. + +Keyboard Maintainer: X-BOWS +Hardware Supported: X-BOWS Woo-dy +Hardware Availability: [X-BOWS](https://x-bows.com/) + +Make example for this keyboard (after setting up your build environment): + + make xbows/woody:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/xbows/woody/rules.mk b/keyboards/xbows/woody/rules.mk new file mode 100644 index 000000000000..2a9fcb7fc344 --- /dev/null +++ b/keyboards/xbows/woody/rules.mk @@ -0,0 +1,16 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +BACKLIGHT_ENABLE = no +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +AUDIO_ENABLE = no +RGB_MATRIX_ENABLE = yes # Use RGB matrix +NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in diff --git a/keyboards/xbows/woody/woody.c b/keyboards/xbows/woody/woody.c new file mode 100644 index 000000000000..9821f5f65504 --- /dev/null +++ b/keyboards/xbows/woody/woody.c @@ -0,0 +1,128 @@ +#include "woody.h" +#ifdef RGB_MATRIX_ENABLE +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { + + {0, C8_8, C7_8, C6_8}, // LA17 + {0, C9_8, C7_7, C6_7}, // LA16 + {0, C9_7, C8_7, C6_6}, // LA15 + {0, C9_6, C8_6, C7_6}, // LA14 + {0, C9_5, C8_5, C7_5}, // LA13 + {0, C9_4, C8_4, C7_4}, // LA12 + {0, C9_3, C8_3, C7_3}, // LA11 + {0, C9_2, C8_2, C7_2}, // LA10 + {0, C9_1, C8_1, C7_1}, // LA9 + {0, C2_9, C3_9, C4_9}, // LB0 + {0, C1_9, C3_10, C4_10}, // LB1 + {0, C1_10, C2_10, C4_11}, // LB2 + {0, C1_11, C2_11, C3_11}, // LB3 + {0, C1_13, C2_13, C3_13}, // LB5 + {0, C1_14, C2_14, C3_14}, // LB6 + + {0, C1_7, C2_7, C3_7}, // LA7 + {0, C1_6, C2_6, C3_6}, // LA6 + {0, C1_5, C2_5, C3_5}, // LA5 + {0, C1_4, C2_4, C3_4}, // LA4 + {0, C1_3, C2_3, C3_3}, // LA3 + {0, C1_2, C2_2, C4_3}, // LA2 + {0, C1_1, C3_2, C4_2}, // LA1 + {0, C2_1, C3_1, C4_1}, // LA0 + {0, C9_9, C8_9, C7_9}, // LB9 + {0, C9_10, C8_10, C7_10}, // LB10 + {0, C9_11, C8_11, C7_11}, // LB11 + {0, C9_12, C8_12, C7_12}, // LB12 + {0, C9_13, C8_13, C7_13}, // LB13 + {0, C9_14, C8_14, C7_14}, // LB14 + {0, C1_15, C2_15, C3_15}, // LB7 + + {0, C1_8, C2_8, C3_8}, // LA8 + {1, C9_6, C8_6, C7_6}, // LC14 + {1, C9_5, C8_5, C7_5}, // LC13 + {1, C9_4, C8_4, C7_4}, // LC12 + {1, C9_3, C8_3, C7_3}, // LC11 + {1, C9_2, C8_2, C7_2}, // LC10 + {1, C9_1, C8_1, C7_1}, // LC9 + {1, C2_9, C3_9, C4_9}, // LD0 + {1, C1_9, C3_10, C4_10}, // LD1 + {1, C1_10, C2_10, C4_11}, // LD2 + {1, C1_11, C2_11, C3_11}, // LD3 + {1, C1_12, C2_12, C3_12}, // LD4 + {1, C1_13, C2_13, C3_13}, // LD5 + {0, C1_16, C2_16, C3_16}, // LB8 + + {1, C9_8, C7_7, C6_7}, // LC16 + {1, C1_5, C2_5, C3_5}, // LC5 + {1, C1_4, C2_4, C3_4}, // LC4 + {1, C1_3, C2_3, C3_3}, // LC3 + {1, C1_2, C2_2, C4_3}, // LC2 + {1, C1_1, C3_2, C4_2}, // LC1 + {1, C9_9, C8_9, C7_9}, // LD9 + {1, C9_10, C8_10, C7_10}, // LD10 + {1, C9_11, C8_11, C7_11}, // LD11 + {1, C9_12, C8_12, C7_12}, // LD12 + {1, C1_14, C2_14, C3_14}, // LD6 + {1, C1_15, C2_15, C3_15}, // LD7 + {1, C1_16, C2_16, C3_16}, // LD8 + {0, C9_15, C8_15, C6_14}, // LB15 + + {1, C8_8, C7_8, C6_8}, // LC17 + {1, C1_8, C2_8, C3_8}, // LC8 + {1, C1_7, C2_7, C3_7}, // LC7 + {1, C2_1, C3_1, C4_1}, // LC0 + {1, C9_14, C8_14, C7_14}, // LD14 + {1, C9_16, C7_15, C6_15}, // LD16 + {1, C8_16, C7_16, C6_16}, // LD17 + {0, C8_16, C7_16, C6_16}, // LB17 + {0, C9_16, C7_15, C6_15}, // LB16 + +}; + +led_config_t g_led_config = { { + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 }, + { 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29 }, + { 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, NO_LED,42, 43 }, + { 44, 45, 46, 47, 48, 49, 59, 51, 52, 53, 54, NO_LED, 55, 56, 57 }, + { 58, 59, 60, NO_LED, NO_LED, NO_LED, 61, NO_LED, NO_LED, 62, NO_LED,63, 64, 65, 66} +}, { + {0,0},{15,0},{30,0},{45,0},{60,0},{75,0},{90,0},{105,0},{120,0},{135,0},{150,0},{165,0},{180,0},{203,0},{224,0}, + {4,16},{23,16},{38,16},{53,16},{68,16},{83,16},{98,16},{113,16},{128,16},{143,16},{158,16},{173,16},{188,16},{206,16},{224,16}, + {6,32},{26,32},{41,32},{56,32},{71,32},{86,32},{101,32},{116,32},{131,32},{146,32},{161,32},{176,32},{201,32},{224,32}, + {9,48},{34,48},{49,48},{64,48},{79,48},{94,48},{109,48},{124,48},{139,48},{154,48},{169,48},{189,48},{210,48},{224,48}, + {2,64},{21,64},{41,64},{99,64},{157,64},{178,64},{195,64},{210,64},{224,64} +}, { + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, + 4, 4, 4, 4, 4, 4, 1, 1, 1 +} }; +#endif + +void matrix_init_kb(void) { + matrix_init_user(); +} +void matrix_scan_kb(void) { + matrix_scan_user(); +} +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + return process_record_user(keycode, record); +} +void suspend_power_down_kb(void) +{ + rgb_matrix_set_suspend_state(true); + suspend_power_down_user(); +} + +void suspend_wakeup_init_kb(void) +{ + rgb_matrix_set_suspend_state(false); + suspend_wakeup_init_user(); +} +__attribute__ ((weak)) + +void rgb_matrix_indicators_user(void) +{ + if (IS_LED_ON(host_keyboard_leds(), USB_LED_CAPS_LOCK)) + { + rgb_matrix_set_color(30, 0xFF, 0x00, 0x00); + } +} diff --git a/keyboards/xbows/woody/woody.h b/keyboards/xbows/woody/woody.h new file mode 100644 index 000000000000..48eab82a6821 --- /dev/null +++ b/keyboards/xbows/woody/woody.h @@ -0,0 +1,16 @@ +#pragma once +#define XXX KC_NO +#include "quantum.h" +#define LAYOUT( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3C, K3D, K3E, \ + K40, K41, K42, K46, K49, K4B, K4C, K4D, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, XXX, K2D, K2E }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, XXX, K3C, K3D, K3E }, \ + { K40, K41, K42, XXX, XXX, XXX, K46, XXX, XXX, K49, XXX, K4B, K4C, K4D, K4E } \ +} From 742e83e102f5d91087672ae3f91e433a74bd51dd Mon Sep 17 00:00:00 2001 From: Guy Khmelnitsky Date: Thu, 31 Oct 2019 11:47:07 +0200 Subject: [PATCH 237/316] [Docs] Add he-IL (Hebrew) Translation (#7001) * Add he-IL (Hebrew) Translation * Add Hebrew to SUMMARY * Try RTL * Add RTL text * Lowercase folder names * Update lowercase folder in Summary * Adding getting_started_introduction.md * Add Proton C Conversion translation * Add Becoming a QMK Collaborator Translation * Add FAQ translation * Add Hardware translation * Documentation Best Practices translation * Add FAQ General translation * Align docs RTL * Add Becoming a QMK Collaborator Translation * Translate Getting Started - Getting Help * Translate Getting Started With Github * Code sections should be alligned to the left * Code sections should be alligned to the left * Code sections should be alligned to the left * Revert "Code sections should be alligned to the left" This reverts commit d0c46e90c4915ceebe7c5182aca2b75afad25df0. * Add Markdown aligned to the left * Update quantum_keycodes.md * Update proton_c_conversion.md * Translate Newbs Learn More Resourses --- docs/_langs.md | 1 + docs/he-il/README.md | 34 +++++ docs/he-il/_summary.md | 138 +++++++++++++++++++++ docs/he-il/becoming_a_qmk_collaborator.md | 11 ++ docs/he-il/documentation_best_practices.md | 67 ++++++++++ docs/he-il/faq.md | 8 ++ docs/he-il/faq_general.md | 17 +++ docs/he-il/getting_started_getting_help.md | 17 +++ docs/he-il/getting_started_github.md | 69 +++++++++++ docs/he-il/getting_started_introduction.md | 72 +++++++++++ docs/he-il/hardware.md | 10 ++ docs/he-il/newbs_learn_more_resources.md | 16 +++ docs/he-il/proton_c_conversion.md | 36 ++++++ docs/he-il/quantum_keycodes.md | 35 ++++++ 14 files changed, 531 insertions(+) create mode 100644 docs/he-il/README.md create mode 100644 docs/he-il/_summary.md create mode 100644 docs/he-il/becoming_a_qmk_collaborator.md create mode 100644 docs/he-il/documentation_best_practices.md create mode 100644 docs/he-il/faq.md create mode 100644 docs/he-il/faq_general.md create mode 100644 docs/he-il/getting_started_getting_help.md create mode 100644 docs/he-il/getting_started_github.md create mode 100644 docs/he-il/getting_started_introduction.md create mode 100644 docs/he-il/hardware.md create mode 100644 docs/he-il/newbs_learn_more_resources.md create mode 100644 docs/he-il/proton_c_conversion.md create mode 100644 docs/he-il/quantum_keycodes.md diff --git a/docs/_langs.md b/docs/_langs.md index 2a4caf66ffce..c834342704f5 100644 --- a/docs/_langs.md +++ b/docs/_langs.md @@ -2,4 +2,5 @@ - [:uk: English](/) - [:cn: 中文](/zh-cn/) - [:fr: Français](/fr-fr/) + - [:he: עברית](/he-il/) - [:ru: Русский](/ru-ru/) diff --git a/docs/he-il/README.md b/docs/he-il/README.md new file mode 100644 index 000000000000..db0ad43c3cb0 --- /dev/null +++ b/docs/he-il/README.md @@ -0,0 +1,34 @@ +
+# קושחה עבור Quantum Mechanical Keyboard + +[![גירסה נוכחית](https://img.shields.io/github/tag/qmk/qmk_firmware.svg)](/~https://github.com/qmk/qmk_firmware/tags) +[![מצב הבניה](https://travis-ci.org/qmk/qmk_firmware.svg?branch=master)](https://travis-ci.org/qmk/qmk_firmware) +[![ערוץ דיסקורד](https://img.shields.io/discord/440868230475677696.svg)](https://discord.gg/Uq7gcHh) +[![מצב מסמכים](https://img.shields.io/badge/docs-ready-orange.svg)](https://docs.qmk.fm) +[![תומכי GitHub](https://img.shields.io/github/contributors/qmk/qmk_firmware.svg)](/~https://github.com/qmk/qmk_firmware/pulse/monthly) +[![מזלגות GitHub](https://img.shields.io/github/forks/qmk/qmk_firmware.svg?style=social&label=Fork)](/~https://github.com/qmk/qmk_firmware/) + +## מה היא קושחת QMK? + +QMK (*Quantum Mechanical Keyboard*) היא קהילת קוד פתוח (open source) שמתחזקת את קושחת QMK, QMK Toolbox, qmk.fm, והמסמכים המתאימים. קושחת QMK היא קושחה עבור מקלדות המבוססת על [tmk\_keyboard](http://github.com/tmk/tmk_keyboard) עם כמה תוספות עבור בקרי Atmel AVR ובאופן ספציפי יותר - [מוצרי OLKB](http://olkb.com), מקלדת [ErgoDox EZ](http://www.ergodox-ez.com), וגם [מוצרי Clueboard](http://clueboard.co/). בנוסף, הקושחה עברה פורט עבור שבבי ARM באמצעות ChibiOS. ניתן להשתמש בה על מנת להפעיל את מקלדות ה PCB המקוסטמות שלך. + +## איך להשיג אותה + +אם אתם מתכננים לתרום מיפוי מקשים, מקלדת או יכולת ל QMK, הדבר הקל ביותר הוא [לעשות פורק לריפו בGithub](/~https://github.com/qmk/qmk_firmware#fork-destination-box), ולעשות קלון לריפו בסביבה המקומית ושם לבצע את השינויים שלכם, לדחוף אותם ולפתוח [Pull Request](/~https://github.com/qmk/qmk_firmware/pulls) מהפורק שלך. + +אחרת, אפשר להוריד את הקושחה באופן ישיר ([zip](/~https://github.com/qmk/qmk_firmware/zipball/master), [tar](/~https://github.com/qmk/qmk_firmware/tarball/master)), או לשכפל אותה באמצעות git (`git@github.com:qmk/qmk_firmware.git`), או https (`/~https://github.com/qmk/qmk_firmware.git`). + +## איך לקמפל + +לפני שתצליחו לקמפל, תדרשו [להתקין סביבה](getting_started_build_tools.md) עבור פיתוח AVR ו/או ARM. ברגע שהדבר בוצע, תוכלו להריץ פקודת `make` כדי לבנות מקלדת ומיפוי עם התחביר הבא: + + make planck/rev4:default + +כך תוכלו לבנות את גרסא `rev4` של ה `planck` עם מיפוי ברירת המחדל (`default`). לא כל המקלדות בעלות גרסאות (נקרא גם תת-פרוייקט או תיקייה), במקרה כזה, אפשר להריץ את הפקודה הבאה: + + make preonic:default + +## איך להתאים + +לQMK יש המון [יכולות](features.md) שאפשר לנווט בהן, וכמות נכבדת של [תיעוד ודוקומנטציה](http://docs.qmk.fm) בה אפשר לנבור. רוב הפיצ׳רים באים לידי ביטוי על ידי שינוי [מיפוי המקלדת](keymap.md) ושינוי [קודי המקשים](keycodes.md). +
diff --git a/docs/he-il/_summary.md b/docs/he-il/_summary.md new file mode 100644 index 000000000000..acc0546d097e --- /dev/null +++ b/docs/he-il/_summary.md @@ -0,0 +1,138 @@ +
+**בשפה העברית** +* [המדריך המלא למתחילים](newbs.md) + * [מקורות ללמידה](he-il/newbs_learn_more_resources.md) +* [בסיס QMK](he-il/README.md) + * [מבוא לQMK](he-il/getting_started_introduction.md) + * [איך להשתמש בGithub](he-il/getting_started_github.md) + * [קבלת עזרה](he-il/getting_started_getting_help.md) +* [שאלות נפוצות](he-il/faq.md) + * [שאלות נפוצות כלליות](he-il/faq_general.md) +* [חומרה](he-il/hardware.md) +* התייחסויות + * [איך לתעד נכון](he-il/documentation_best_practices.md) + +**בשפה האנגלית** +* [המדריך המלא למתחילים](newbs.md) + * [התחלה](newbs_getting_started.md) + * [בנייה של הקושחה הראשונה שלך](newbs_building_firmware.md) + * [צריבה של הקושחה](newbs_flashing.md) + * [בדיקות ודיבאגינג](newbs_testing_debugging.md) + * [עבודה נכונה ב GIT](newbs_best_practices.md) + * [מקורות ללמידה](newbs_learn_more_resources.md) + +* [בסיס QMK](README.md) + * [מבוא לQMK](getting_started_introduction.md) + * [QMK CLI](cli.md) + * [QMK CLI Config](cli_configuration.md) + * [תרומה ל QMK](contributing.md) + * [איך להשתמש בGithub](getting_started_github.md) + * [קבלת עזרה](getting_started_getting_help.md) + +* [שינויים משמעותיים](breaking_changes.md) + * [2019 Aug 30](ChangeLog/20190830.md) + +* [שאלות נפוצות](faq.md) + * [שאלות נפוצות כלליות](faq_general.md) + * [בנייה/קומפילציה של QMK](faq_build.md) + * [דיבאגינג ופתרון תקלות של QMK](faq_debug.md) + * [מיפוי מקשים](faq_keymap.md) + * [התקנת דרייברים עם Zadig](driver_installation_zadig.md) + +* מדריכים מפורטים + * [התקנת כלי Build](getting_started_build_tools.md) + * [מדריך Vagrant](getting_started_vagrant.md) + * [הוראות בנייה/קומפילציה](getting_started_make_guide.md) + * [צריבת קושחה](flashing.md) + * [התאמה אישית של הפונקציונאליות](custom_quantum_functions.md) + * [מיפוי מקשים](keymap.md) + +* [חומרה](hardware.md) + * [מעבדי AVR](hardware_avr.md) + * [דרייברים](hardware_drivers.md) + +* התייחסויות + * [מדריך למקלדות](hardware_keyboard_guidelines.md) + * [אפשרויות הגדרות](config_options.md) + * [קודי מקשים](keycodes.md) + * [קונבנציות קוד - C](coding_conventions_c.md) + * [קונבנציות קוד - Python](coding_conventions_python.md) + * [איך לתעד נכון](documentation_best_practices.md) + * [טמפלטים לדוקומנטציה](documentation_templates.md) + * [מילון](reference_glossary.md) + * [בדיקות יחידה](unit_testing.md) + * [פונקציות שימושיות](ref_functions.md) + * [תמיכה בConfigurator](reference_configurator_support.md) + * [פורמט info.json](reference_info_json.md) + * [פיתוח בPython CLI](cli_development.md) + +* [תכונות](features.md) + * [Basic Keycodes](keycodes_basic.md) + * [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md) + * [Quantum Keycodes](quantum_keycodes.md) + * [Advanced Keycodes](feature_advanced_keycodes.md) + * [Audio](feature_audio.md) + * [Auto Shift](feature_auto_shift.md) + * [Backlight](feature_backlight.md) + * [Bluetooth](feature_bluetooth.md) + * [Bootmagic](feature_bootmagic.md) + * [Combos](feature_combo.md) + * [Command](feature_command.md) + * [Debounce API](feature_debounce_type.md) + * [DIP Switch](feature_dip_switch.md) + * [Dynamic Macros](feature_dynamic_macros.md) + * [Encoders](feature_encoders.md) + * [Grave Escape](feature_grave_esc.md) + * [Haptic Feedback](feature_haptic_feedback.md) + * [HD44780 LCD Controller](feature_hd44780.md) + * [Key Lock](feature_key_lock.md) + * [Layouts](feature_layouts.md) + * [Leader Key](feature_leader_key.md) + * [LED Matrix](feature_led_matrix.md) + * [Macros](feature_macros.md) + * [Mouse Keys](feature_mouse_keys.md) + * [OLED Driver](feature_oled_driver.md) + * [One Shot Keys](feature_advanced_keycodes.md#one-shot-keys) + * [Pointing Device](feature_pointing_device.md) + * [PS/2 Mouse](feature_ps2_mouse.md) + * [RGB Lighting](feature_rgblight.md) + * [RGB Matrix](feature_rgb_matrix.md) + * [Space Cadet](feature_space_cadet.md) + * [Split Keyboard](feature_split_keyboard.md) + * [Stenography](feature_stenography.md) + * [Swap Hands](feature_swap_hands.md) + * [Tap Dance](feature_tap_dance.md) + * [Terminal](feature_terminal.md) + * [Thermal Printer](feature_thermal_printer.md) + * [Unicode](feature_unicode.md) + * [Userspace](feature_userspace.md) + * [Velocikey](feature_velocikey.md) + +* למייקרים ומודרים + * [מדריך לכתיבה ידנית](hand_wire.md) + * [מדריך לצריבת ISP](isp_flashing_guide.md) + * [מדריך לדיבאגינג ARM](arm_debugging.md) + * [מנהל התקן I2C](i2c_driver.md) + * [בקרת GPIO](internals_gpio_control.md) + * [המרת Proton C](proton_c_conversion.md) + +* להבנה עמוקה יותר + * [איך עובדות מקלדות](how_keyboards_work.md) + * [להבין את QMK](understanding_qmk.md) + +* נושאים נוספים + * [שימוש ב - Eclipse עם QMK](other_eclipse.md) + * [שימוש ב - VSCode עם QMK](other_vscode.md) + * [תמיכה](support.md) + * [כיצד להוסיף תרגום](translating.md) + +* QMK מבפנים (בתהליך) + * [Defines](internals_defines.md) + * [Input Callback Reg](internals_input_callback_reg.md) + * [Midi Device](internals_midi_device.md) + * [Midi Device Setup Process](internals_midi_device_setup_process.md) + * [Midi Util](internals_midi_util.md) + * [Send Functions](internals_send_functions.md) + * [Sysex Tools](internals_sysex_tools.md) + +
diff --git a/docs/he-il/becoming_a_qmk_collaborator.md b/docs/he-il/becoming_a_qmk_collaborator.md new file mode 100644 index 000000000000..4c14441bdb26 --- /dev/null +++ b/docs/he-il/becoming_a_qmk_collaborator.md @@ -0,0 +1,11 @@ +
+# איך להפוך לשותף של QMK + +שותף של QMK הוא יצרן מקלדות או מעצב שמעוניין בלעזור ל-QMK לגדול ולתמוך במקלד(ו)ת שלהם, ולעודד את המשתמשים והצרכנים להוסיף יכולות, רעיונות ומיפויים. אנחנו תמיד מחפשים עוד מקלדות ומשתפי פעולה, אבל אנחנו מבקשים שיעמדו בדרישות הבאות: + +* **קיום לוח PCB למכירה.** לצערינו, יש יותר מידי הסתבכויות ובעיות עם מקלדות המחווטות ידנית. +* **תחזוק המקלדת ב-QMK.** זה אולי רק ידרוש הגדרה בסיסית כדי לגרום למקלדת לעבוד, אבל זה גם יכול לכלול התאמה של שינויים בקוד הליבה של QMK שיכול לשבור קוד ייחודי שלכם. +* **אישור ומיזוג Pull Requests של מיפויי מקלדת עבור המקלדת** אנחנו רוצים לעודד משתמשים לתרום את מיפויי המקלדת שלהם לאחרים כדי לעזור לאחרים להתחיל ליצור את שלהם. + +אם אתם עומדים בדרישות הללו, שלחו לנו מייל לכתובת hello@qmk.fm עם מבוא וקישורים עבור המקלדת שלכם. +
\ No newline at end of file diff --git a/docs/he-il/documentation_best_practices.md b/docs/he-il/documentation_best_practices.md new file mode 100644 index 000000000000..90c4a137a047 --- /dev/null +++ b/docs/he-il/documentation_best_practices.md @@ -0,0 +1,67 @@ +
+# איך לתעד נכון + +עמוד זה קיים כדי לתעד את השיטות הטובות ביותר כאשר כותבים תיעוד עבור QMK. מעקב אחר הוראות אלה יעזור לשמור על סגנון וטון עקביים, אשר בתורם יעזרו לאנשים אחרים להבין טוב יותר את QMK. + +# פתיחת עמוד + +התיעוד שלך צריך בד״כ להפתח עם כותרת בגודל H1, אחריה פסקה אחת של תיאור של מה המשתמש ימצא בעמוד זה. +זכור כי כותרת זו והפסקה ימוקמו ליד תוכן העניינים, אז חשוב לשמור על כותרת קצרה ולהמנע ממשפטים ארוכים ללא פיסוק. + +לדוגמה: + +``` +# הכותרת שלי + +עמוד זה מדבר על היכולת הסופר-מגניבה שלי. אתה יכול להשתמש ביכולת זו כדי להכין קפה, לסחוט תפוזים ולקבל משלוח של ביצים ועוגות מהסופר הקרוב באמצעות רחפן. +``` + +# כותרות + +עמוד התיעוד צריך לאופן כללי לכלול מס׳ כותרות בגודל "H1". רק כותרות מגודל H1 ו- H2 יכללו בתוכן העניינים, אז חשוב לתכנן אותם בהתאם. הכותרות לא להיות רחבות מידי כדי למנוע מתוכן העניינים להפוך להיות רחב מידי + +# בלוקי רמיזה מעוצבים + +ניתן להוסיף בלוקי רמיזה מעוצבים שמצויירים מסביב לטקסט כדי למשוך תשומת לב אליו. + +### חשוב + +``` +!> זה חשוב +``` + +יתרנדר כ: + +!> זה חשוב + +### טיפים כלליים + +``` +?> זהו טיפ שימושי. +``` + +יתרנדר כ: + +?> זהו טיפ שימושי. + + +# תיעוד יכולות ופיצ׳ריםDocumenting Features + +אם יוצרים יכולת חדשה ב QMK, צרו עמוד תיעוד עבורה. העמוד לא צריך להיות ארוך במיוחד, מספר משפטים המתארים את היכולת (פיצ׳ר) וטבלה המתארת קודי מקשים רלוונטיים זה מספיק. הנה דוגמה בסיסית: + +```markdown +# הפיצ׳ר המגניב שלי + +עמוד זה מדבר על היכולת הסופר-מגניבה שלי. אתה יכול להשתמש ביכולת זו כדי להכין קפה, לסחוט תפוזים ולקבל משלוח של ביצים ועוגות מהסופר הקרוב באמצעות רחפן. + +## קודי המקשים המגניבים של היכולת שלי + +|Long Name|Short Name|Description| +|---------|----------|-----------| +|KC_COFFEE||Make Coffee| +|KC_CREAM||Order Cream| +|KC_SUGAR||Order Sugar| +``` + +מקמו את התיעוד שלכם בתוך `docs/feature_.md`, והוסיפו קישור לקובץ זה במקום המתאים ב `docs/_sidebar.md`. אם הוספתם קודי מקשים נוספים, תקפידו להוסיף אותם ל- `docs/keycodes.md` עם לינק לעמוד היכולת שלכם. +
\ No newline at end of file diff --git a/docs/he-il/faq.md b/docs/he-il/faq.md new file mode 100644 index 000000000000..88ea07fbe711 --- /dev/null +++ b/docs/he-il/faq.md @@ -0,0 +1,8 @@ +
+# שאלות נפוצות + +* [כללי](faq_general.md) +* [בנייה או קומפילציה של QMK](faq_build.md) +* [דיבאגינג ופתרון בעיות של QMK](faq_debug.md) +* [מיפוי מקשים](faq_keymap.md) +
\ No newline at end of file diff --git a/docs/he-il/faq_general.md b/docs/he-il/faq_general.md new file mode 100644 index 000000000000..26286d552f02 --- /dev/null +++ b/docs/he-il/faq_general.md @@ -0,0 +1,17 @@ +
+# שאלות נפוצות + +## מה זה QMK? + +[QMK](/~https://github.com/qmk), קיצור עבור Quantum Mechanical Keyboard, הוא קבוצה של אנשים הבונים כלים עבור מקלדות מותאמות אישית. התחלנו עם [קושחת QMK](/~https://github.com/qmk/qmk_firmware), פורק של [TMK](/~https://github.com/tmk/tmk_keyboard) אשר שונה באופן ניכר. + +## מה ההבדלים העיקריים בין QMK ו-Keymap TMK? + +TMK עוצב ומומש במקור ע״י [Jun Wako](/~https://github.com/tmk). QMK התחיל כפורק של [Jack Humbert](/~https://github.com/jackhumbert) של הפרוייקט של TMK עבור Planck. אחרי כמה זמן הפורק של ג׳ק השתנה מזה של TMK וב- 2015 ג׳ק החליט לשנות את שמו של הפורק ל- QMK. + +מנק׳ מבט טכנית, QMK נבנה על גבי TMK ע״י הוספת יכולות ופיצ׳רים חדשים. ראוי לציון ש- QMK הרחיב את מס׳ קודי המקלדת האפשריים ומשתמש בהם למימוש יכולות מתקדמות כמו `S()`, `LCTL()`, ו- `MO()`. ניתן לראות רשימה מלאה של קודי המקלדת האלה ב - [קודי מקלדת](keycodes.md). + +מנק׳ מבט של הפרוייקט וניהול הקהילה, TMK מנהל את כל המקלדות הנתמכות בעצמו, עם מעט תמיכה מהקהילה. כל אחד יכול לעשות פורק מהפרוייקט עבור מקלדות אחרות. רק מס׳ מיפויי מקשים נמצאים בברירת המחדל כך שאנשים בד״כ לא משתפים מיפויי מקשים זה עם זה. QMK מעודד את השיתוף של המקלדות וקודי המקשים דרך רפוזיטורי בניהול מרכזי, אשר מקבל את כל בקשות ה- Pull Requests שעומדות בסטנדרט האיכות. רובם מנוהלות ע״י הקהילה, אבל הצוות של QMK עוזר כשנדרש. + +לשתי הגישות יש יתרונות וחסרונות וקוד עובר בחופשיות בין TMK ל- QMK כשצריך. +
\ No newline at end of file diff --git a/docs/he-il/getting_started_getting_help.md b/docs/he-il/getting_started_getting_help.md new file mode 100644 index 000000000000..1a2edc3133f7 --- /dev/null +++ b/docs/he-il/getting_started_getting_help.md @@ -0,0 +1,17 @@ +
+# קבלת עזרה + +ישנם משאבים רבים לצורך קבלת עזרה עם QMK. + +## צ׳אט בזמן אמת + +אפשר למצוא מפתחי QMK ומשתמשים [בשרת ה-Discord הראשי שלנו](https://discord.gg/Uq7gcHh). ישנם ערוצים ספציפיים בשרת לצורך שיחות על הקושחה, ארגז הכלים, חומרה והמגדיר. + +## סאב-רדיט OLKB + +הפורום הרשמי של QMK נמצא ב - [/r/olkb](https://reddit.com/r/olkb) באתר [reddit.com](https://reddit.com). + +## סוגיות Github + +ניתן לפתוח [סוגייה ב-GitHub](/~https://github.com/qmk/qmk_firmware/issues). הדבר שימושי במיוחד כאשר הסוגיה דורשת דיון עמוק וארוך או דיבאגינג. +
\ No newline at end of file diff --git a/docs/he-il/getting_started_github.md b/docs/he-il/getting_started_github.md new file mode 100644 index 000000000000..55602c81426d --- /dev/null +++ b/docs/he-il/getting_started_github.md @@ -0,0 +1,69 @@ +
+# איך להשתמש ב-Github עם QMK + +Github עלול להיות קצת טריקי למי שלא מכיר את העבודה איתו - מדריך זה ילווה אתכם שלב אחר שלב דרך ביצוע פעולות fork, clone ו-pull request עם QMK. + +?> מדריך זה מניח שאתם מרגישים בנוח עם הרצה של פקודות בסביבת command line (שורת הפקודה) ו-git מותקן במערכת שלכם. + +התחילו ב- [עמוד של QMK ב-Github](/~https://github.com/qmk/qmk_firmware), ותצמאו כפתור בחלק העליון מימין עם התיכוב "Fork": + +![Fork ב-Github](http://i.imgur.com/8Toomz4.jpg) + +אם אתם חלק מארגון, תצטרכו לבחור לאיזה חשבון לבצע פעולת fork. ברוב המבקרים, תרצו לבצע fork לתוך החשבון הפרטי שלכם. ברגע שה-fork הסתיים (לפעמים זה יכול לקחת קצת זמן) הקליקו על כפתור ה-"Clone or Download": + +![הורדה מ-Github](http://i.imgur.com/N1NYcSz.jpg) + +תוודאו שאתם בוחרים באופצייה של "HTTPS", בחרו את הקישור והעתיקו אותו: + +![קישור HTTPS](http://i.imgur.com/eGO0ohO.jpg) + +מכאן והלאה, הקיש `git clone ` בשורת הפקודה והדביקו את הלינק שלכם: + +
+ +``` +user@computer:~$ git clone /~https://github.com/whoeveryouare/qmk_firmware.git +Cloning into 'qmk_firmware'... +remote: Counting objects: 46625, done. +remote: Compressing objects: 100% (2/2), done. +remote: Total 46625 (delta 0), reused 0 (delta 0), pack-reused 46623 +Receiving objects: 100% (46625/46625), 84.47 MiB | 3.14 MiB/s, done. +Resolving deltas: 100% (29362/29362), done. +Checking out files: 100% (2799/2799), done. +``` + +
+ +כעת, יש לכם את ה-fork של QMK על המכונה המקומית שלכם ואתם יכולים להוסיף את מיפויי המקשים שלכם, לקמפל את הפרוייקט ולצרוב אותו על הלוח שלכם. כשאתם שלמים עם השינוי שעשיתם, תוכלו להוסיף, לבצע פעולת commit ולדחוף את השינויים ל-fork שלכם באופן הבא: + +
+ +``` +user@computer:~$ git add . +user@computer:~$ git commit -m "adding my keymap" +[master cccb1608] adding my keymap + 1 file changed, 1 insertion(+) + create mode 100644 keyboards/planck/keymaps/mine/keymap.c +user@computer:~$ git push +Counting objects: 1, done. +Delta compression using up to 4 threads. +Compressing objects: 100% (1/1), done. +Writing objects: 100% (1/1), 1.64 KiB | 0 bytes/s, done. +Total 1 (delta 1), reused 0 (delta 0) +remote: Resolving deltas: 100% (1/1), completed with 1 local objects. +To /~https://github.com/whoeveryouare/qmk_firmware.git + + 20043e64...7da94ac5 master -> master +``` + +
+ +השינויים שלכם יופיעו ב-fork שלכם ב-GitHub - אם תחזרו לשם (`/~https://github.com//qmk_firmware`), תוכלו ליצור "Pull Request חדש" ע״י הקשה על הכפתור הבא: + +![Pull Request חדש](http://i.imgur.com/DxMHpJ8.jpg) + +כאן תוכלו לראות בדיוק למה עשיתם commit - אם הכל נראה תקין, תוכלו להשלים את הפעולה ע״י הקשה על "Create Pull Request": + +![צרו Pull Request](http://i.imgur.com/Ojydlaj.jpg) + +אחרי שהגשתם, אנו עלולים לפנות אליכם לגבי השינויים שהצעתם, נבקש שתבצעו שינויים ובסופו של דבר נקבל את השינויים! תודה שתרמתם לפרוייקט QMK :) +
\ No newline at end of file diff --git a/docs/he-il/getting_started_introduction.md b/docs/he-il/getting_started_introduction.md new file mode 100644 index 000000000000..4b7f56b2a7e0 --- /dev/null +++ b/docs/he-il/getting_started_introduction.md @@ -0,0 +1,72 @@ +
+# מבוא + +עמוד זה מנסה להסביר את המידע הבסיסי אותו תדרשו לדעת כדי לעבוד עם פרוייקט QMK. הוא מניח שאתם יודעים איך לנווט בסביבת Unix Shell, אבל לא מניח שאתם מכירים את שפת C או קומפילציה באמצעות make. + +## מבנה QMK בסיסי + +QMK הוא פורק של הפרוייקט [tmk_keyboard](/~https://github.com/tmk/tmk_keyboard) של [Jun Wako](/~https://github.com/tmk). קוד הTMK המקורי, עם התאמות, יכול להמצא בתיקיית `tmk`. התוספות של QMK לפרוייקט יכולות להמצא בתיקיית `quantum`. פרוייקטי מקלדות יכולות להמצא בתיקיות `handwired` ו- `keyboard`. + +### מבנה אחסון המשתמש + +בתוך תיקיית `users` יש תיקייה לכל משתמש. זה המקום למשתמשים להוסיף קוד שהם רוצים להשתמש בו במקלדות שונות. מומלץ לעיין במסמך [תכונות אחסון המשתמש](feature_userspace.md) לקבלת מידע נוסף. + +### מבנה פרוייקט המקלדת + +בתוך תיקיית `keyboards`, תת התיקייה `handwired` ותת התיקיות של היצרן והמוכר, לדוגמה `clueboard` היא תיקייה לכל פרוייקט מקלדת - `qmk_firmware/keyboards/clueboard/2x1800` בתוך התיקייה הזאת תמצאו את המבנה הבא: + + +* `keymaps/`: מיפויי מקשים שונים היכולים להבנות +* `rules.mk`: קובץ המגדיר את הגדרות ברירת המחדל של `make`. נא לא לערוך את הקובץ ישירות, במקום זאת, השתמשו בקובץ מיפוי המקשים ספציפי `rules.mk`. +* `config.h`: הקובץ מכיל הגדרות לזמן הקומפילציה. נא לא לערוך את הקובץ ישירות אלא להשתמש בקובץ `config.h` לכל מיפויי מקשים. +* `info.json`: הקובץ מכיל הגדרות פריסה עבור QMK Configurator. צפו ב [תמיכת Configurator](reference_configurator_support.md) למידע נוסף. +* `readme.md`: סקירה כללית של המקלדת. +* `.h`: הקובץ בו פריסת המקלדת מוגדרת אל מול מטריצת המתגים של המקלדת. +* `.c`: הקובץ בו ניתן למצוא קוד מותאם למקלדת. + +למידע נוסף - אנא הכנסו ל [QMK](hardware_keyboard_guidelines.md). +For more information on project structure, see [QMK מדריך למקלדת](hardware_keyboard_guidelines.md). + +### מבנה מפיוי המקשים + +בכל ספריית מיפוי מקשים, הקבצים הבאים עלולים להמצא. רק הקובץ `keymap.c` הוא חובה, אם השאר לא נמצאים, אפשרויות ברירת המחדל יבחרו. +In every keymap folder, the following files may be found. Only `keymap.c` is required, and if the rest of the files are not found the default options will be chosen. + +* `config.h`: ההגדרות השונות עבור מיפוי המקשים. +* `keymap.c`: כל הקודים של מיפוי המקשים, קובץ חובה +* `rules.mk`: אילו יכולות של QMK מאופשרות. +* `readme.md`: הסבר על מיפוי המקשים, איך אחרים ישתמשו בו והסבר על היכולות. נא להעלות תמונות לשירותים כמו imgur. + +# קובץ `config.h` + +לקובץ `config.h` יש 3 מיקומים אפשריים: + +* keyboard (`/keyboards//config.h`) +* userspace (`/users//config.h`) +* keymap (`/keyboards//keymaps//config.h`) + +מערכת הבילד אוטומטית בוחרת את קובץ ההגדרות לפי הסדר הנ״ל. אם רוצים לדרוס הגדרה מסויימת שהוגדרה בקובץ `config.h` קודם, ראשית תצטרכו להשתמש בקוד מוכן עבור ההגדרות שאתם רוצים לשנות. + +
+ +``` +#pragma once +``` + +
+ +כדי לדרוס הגדרות מקובץ `config.h` קודם, אתם מוכרחים להשתמש בפקודת `#undef` ואז שוב `#define`. + +דוגמה לקוד כזה נראית כך: +
+ +``` +#pragma once + +// overrides go here! +#undef MY_SETTING +#define MY_SETTING 4 +``` + +
+
\ No newline at end of file diff --git a/docs/he-il/hardware.md b/docs/he-il/hardware.md new file mode 100644 index 000000000000..441792e031b8 --- /dev/null +++ b/docs/he-il/hardware.md @@ -0,0 +1,10 @@ +
+# חומרה + +QMK רצה על מגוון של חומרות. אם המעבד שלך יכול להיות ממוקד (מטורגט) ע״י [LUFA](http://www.fourwalledcubicle.com/LUFA.php) או [ChibiOS](http://www.chibios.com) כנראה שתוכל לגרום ל QMK לרוץ על המעבד. קטע זה מדבר על הרצת QMK, ותקשורת עם, סוגים שונים של חומרות. + +* [מדריך למקלדת](hardware_keyboard_guidelines.md) +* [מעבדי AVR](hardware_avr.md) +* מעבדי ARM (TBD) +* [מנהלי התקנים](hardware_drivers.md) +
\ No newline at end of file diff --git a/docs/he-il/newbs_learn_more_resources.md b/docs/he-il/newbs_learn_more_resources.md new file mode 100644 index 000000000000..8792a9de0a78 --- /dev/null +++ b/docs/he-il/newbs_learn_more_resources.md @@ -0,0 +1,16 @@ +
+# מקורות ללמידה + +המקורות הבאים מטרתם היא לתת למשתמשים חדשים בקהילת QMK כדי להבין לעומק את המידע שמגיע במסמכי המתחילים. + +מקורות גיט: + +* [מדריך כללי מעולה](https://www.codecademy.com/learn/learn-git) +* [משחק גיט כדי ללמוד מדוגמאות](https://learngitbranching.js.org/) +* [מקורות גיט כדי ללמוד עוד על GitHub](getting_started_github.md) +* [מקור גיט כדי ללמוד במפורש על QMK](contributing.md) + +מקורות לפקודות שורה (Command Line): + +* [מדריך טוב על Command Line](https://www.codecademy.com/learn/learn-the-command-line) +
\ No newline at end of file diff --git a/docs/he-il/proton_c_conversion.md b/docs/he-il/proton_c_conversion.md new file mode 100644 index 000000000000..9642ca309052 --- /dev/null +++ b/docs/he-il/proton_c_conversion.md @@ -0,0 +1,36 @@ +
+# המרה של לוח להשתמש ב-Proton C + +אם לוח נתמך ב-QMK משתמש בלוח Pro Micro (או כל לוח נתמך) ואתם רוצים להשתמש ב-Proton C, ניתן לייצר את החומרה ע"י הוספה של הפקודה `CONVERT_TO_PROTON_C=yes` (או `CTPC=yes`) לפקודת make, כמו כאן: +
+ +``` + make 40percentclub/mf68:default CTPC=yes +``` + +
+ניתן להוסיף את אותו ארגומנט לקובץ `rules.mk` במיפוי המקשים שלכם, שתיצור את אותה התוצאה. + +הדבר חושף את דגל `CONVERT_TO_PROTON_C` שניתן להשתמש בו בקוד שלכם באמצעות פקודת `#ifdef`, כמו כאן: +
+ +``` + #ifdef CONVERT_TO_PROTON_C + // Proton C code + #else + // Pro Micro code + #endif +``` + +
+לפני שתצליחו לקמפל, יכול להיות שתקבלו שגיאות שונות לגבי `PORTB/DDRB`, וכו' שלא הוגדרו, אם כך, תצטרכו להמיר את קודי המקלדת להשתמש ב - [בקרי GPIO](internals_gpio_control.md) שיעבדו עבור ARM וגם AVR. הדבר לא אמור להשפיע על הבילדים של AVR בכלל. + +ל-Proton C יש רק מנורת LED אחת על הלוח (C13), וכברירת מחדל, TXLED (D5) ממופה אליו. אם תרצו במקום, למפות אליו את RXLED (B0), הוסיפו את השורה הבא לקובץ `config.h`: +
+ +``` + #define CONVERT_TO_PROTON_C_RXLED +``` + +
+
diff --git a/docs/he-il/quantum_keycodes.md b/docs/he-il/quantum_keycodes.md new file mode 100644 index 000000000000..3ca545e9774f --- /dev/null +++ b/docs/he-il/quantum_keycodes.md @@ -0,0 +1,35 @@ +
+# קודי מקלדת Quantum + +קודי מקלדת Quantum מאפשרים התאמה נוחה יותר של מיפוי המקשים שלך מעבר למה שהבסיסי מאפשר, ללא צורך בהגדרת של פעולות מותאמות אישית. + +כל קודי המקלדת בתוך quantum הם מספרים בין `0x0000` ֿֿֿ ל-`0xFFFF`. בתוך הקובץ `keymap.c` זה עלול להראות כאילו יש לך פונקציות ומקרים יחודיים נוספים, אבל בסופו של דבר הקדם-מעבד של שפת C יתרגם אלה לתוך מספר יחיד בין 4 בתים. QMK שמרה את מרחב הכתובות בין `0x0000` עד ל- `0x00FF` עבור קודי מקשים סטנדרטיים. קודי מקשים אלה, כגון `KC_A`, `KC_1`, ו- `KC_LCTL`, אשר מתארים מקשים בסיסיים מוגדרים בתוך USB HID specification. + +בעמודו זה יש לנו את קודי המקשים מתועדים בין `0x00FF` ֿֿ ל- `0xFFFF` אשר משומשים בשביל לממש יכולות מתקדמות של quantum. אם תגדירו קודי מקשים משלכם, הם יתווספו לתוך המרחב הזה גם כן. + +## קודי מקשים של QMK +
+ +``` +|Key |Aliases |Description | +|---------------|-----------|---------------------------------------------------------------------| +|`RESET` | |Put the keyboard into DFU mode for flashing | +|`DEBUG` | |Toggle debug mode | +|`EEPROM_RESET` |`EEP_RST` |Resets EEPROM state by reinitializing it | +|`KC_GESC` |`GRAVE_ESC`|Escape when tapped, ` when pressed with Shift or GUI| +|`KC_LSPO` | |Left Shift when held, `(` when tapped | +|`KC_RSPC` | |Right Shift when held, `)` when tapped | +|`KC_LCPO` | |Left Control when held, `(` when tapped | +|`KC_RCPC` | |Right Control when held, `)` when tapped | +|`KC_LAPO` | |Left Alt when held, `(` when tapped | +|`KC_RAPC` | |Right Alt when held, `)` when tapped | +|`KC_SFTENT` | |Right Shift when held, Enter when tapped | +|`KC_LEAD` | |The [Leader key](feature_leader_key.md) | +|`KC_LOCK` | |The [Lock key](feature_key_lock.md) | +|`FUNC(n)` |`F(n)` |Call `fn_action(n)` (deprecated) | +|`M(n)` | |Call macro `n` | +|`MACROTAP(n)` | |Macro-tap `n` idk FIXME | +``` + +
+
From 2ce6adff2b0b4f049b3bd8b4169cda977c057fa5 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Fri, 1 Nov 2019 00:11:36 +1100 Subject: [PATCH 238/316] Miscellaneous rules.mk cleanups (#7212) * Miscellaneous rules.mk cleanups * Put back ARM bootloader rules --- keyboards/converter/usb_usb/ble/rules.mk | 5 +++-- keyboards/converter/usb_usb/hasu/rules.mk | 1 + keyboards/converter/usb_usb/pro_micro/rules.mk | 1 + keyboards/handwired/42/rules.mk | 2 +- keyboards/handwired/chiron/rules.mk | 2 +- keyboards/handwired/fruity60/rules.mk | 6 +++--- keyboards/kbdfans/kbd67/mkii_soldered/rules.mk | 4 +--- 7 files changed, 11 insertions(+), 10 deletions(-) diff --git a/keyboards/converter/usb_usb/ble/rules.mk b/keyboards/converter/usb_usb/ble/rules.mk index f5ab3880bfcf..a882bd145885 100644 --- a/keyboards/converter/usb_usb/ble/rules.mk +++ b/keyboards/converter/usb_usb/ble/rules.mk @@ -1,5 +1,4 @@ -BLUETOOTH = AdafruitBLE -ADAFRUIT_BLE_ENABLE = yes +# Processor frequency F_CPU = 8000000 BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) @@ -19,5 +18,7 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +BLUETOOTH = AdafruitBLE +ADAFRUIT_BLE_ENABLE = yes EXTRAFLAGS += -flto diff --git a/keyboards/converter/usb_usb/hasu/rules.mk b/keyboards/converter/usb_usb/hasu/rules.mk index 27d8af7683e8..c2ee0bc86f97 100644 --- a/keyboards/converter/usb_usb/hasu/rules.mk +++ b/keyboards/converter/usb_usb/hasu/rules.mk @@ -1 +1,2 @@ +# Processor frequency F_CPU = 16000000 diff --git a/keyboards/converter/usb_usb/pro_micro/rules.mk b/keyboards/converter/usb_usb/pro_micro/rules.mk index 7c04fa34fd24..3437a35bdf1d 100644 --- a/keyboards/converter/usb_usb/pro_micro/rules.mk +++ b/keyboards/converter/usb_usb/pro_micro/rules.mk @@ -1 +1,2 @@ +# Processor frequency F_CPU = 8000000 diff --git a/keyboards/handwired/42/rules.mk b/keyboards/handwired/42/rules.mk index b44a0a518cbd..f2306f310fc1 100644 --- a/keyboards/handwired/42/rules.mk +++ b/keyboards/handwired/42/rules.mk @@ -1,7 +1,7 @@ # MCU name MCU = atmega32u4 -# Processor frequency. +# Processor frequency F_CPU = 8000000 # Bootloader selection diff --git a/keyboards/handwired/chiron/rules.mk b/keyboards/handwired/chiron/rules.mk index a5bbb30e18a9..96f64227004e 100644 --- a/keyboards/handwired/chiron/rules.mk +++ b/keyboards/handwired/chiron/rules.mk @@ -10,7 +10,6 @@ MCU = atmega32u4 # ATmega32A bootloadHID # ATmega328P USBasp BOOTLOADER = atmel-dfu -SPLIT_KEYBOARD = yes # Build Options # change yes to no to disable @@ -36,3 +35,4 @@ TAP_DANCE_ENABLE = no UCIS_ENABLE = no UNICODEMAP_ENABLE = no UNICODE_ENABLE = no +SPLIT_KEYBOARD = yes diff --git a/keyboards/handwired/fruity60/rules.mk b/keyboards/handwired/fruity60/rules.mk index 8c9bc95e504e..9e64f161af95 100644 --- a/keyboards/handwired/fruity60/rules.mk +++ b/keyboards/handwired/fruity60/rules.mk @@ -1,6 +1,9 @@ # MCU name MCU = atmega32u4 +# Processor frequency +F_CPU = 8000000 + # Bootloader selection # Teensy halfkay # Pro Micro caterina @@ -11,9 +14,6 @@ MCU = atmega32u4 # ATmega328P USBasp BOOTLOADER = caterina -# Processor frequency -F_CPU = 8000000 - # Build Options # change yes to no to disable # diff --git a/keyboards/kbdfans/kbd67/mkii_soldered/rules.mk b/keyboards/kbdfans/kbd67/mkii_soldered/rules.mk index bf65a7a74e35..a945af726a63 100644 --- a/keyboards/kbdfans/kbd67/mkii_soldered/rules.mk +++ b/keyboards/kbdfans/kbd67/mkii_soldered/rules.mk @@ -1,7 +1,6 @@ # MCU name MCU = atmega32u4 - # Bootloader selection # Teensy halfkay # Pro Micro caterina @@ -12,7 +11,6 @@ MCU = atmega32u4 # ATmega328P USBasp BOOTLOADER = atmel-dfu - # Build Options # change yes to no to disable # @@ -32,4 +30,4 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs \ No newline at end of file +HD44780_ENABLE = no # Enable support for HD44780 based LCDs From 1acafc94f40154db009d5ed55bca204c2399c0a8 Mon Sep 17 00:00:00 2001 From: yiancar Date: Thu, 31 Oct 2019 16:19:57 +0000 Subject: [PATCH 239/316] Correct ARM STM32 I2C frequency. (#7080) It was beleaved that this setting result in a 400Khz I2C bus. This was incorrect, actual frequency measure with a logic analyzer was around 150Khz. This is derived from the excel sheet linked in the .h file. Also confirmed with the ST IDE. --- drivers/arm/i2c_master.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/arm/i2c_master.h b/drivers/arm/i2c_master.h index b40fa0a91026..a8ed66403a58 100644 --- a/drivers/arm/i2c_master.h +++ b/drivers/arm/i2c_master.h @@ -73,19 +73,19 @@ // The default timing values below configures the I2C clock to 400khz assuming a 72Mhz clock // For more info : https://www.st.com/en/embedded-software/stsw-stm32126.html # ifndef I2C1_TIMINGR_PRESC -# define I2C1_TIMINGR_PRESC 15U +# define I2C1_TIMINGR_PRESC 0U # endif # ifndef I2C1_TIMINGR_SCLDEL -# define I2C1_TIMINGR_SCLDEL 4U +# define I2C1_TIMINGR_SCLDEL 7U # endif # ifndef I2C1_TIMINGR_SDADEL -# define I2C1_TIMINGR_SDADEL 2U +# define I2C1_TIMINGR_SDADEL 0U # endif # ifndef I2C1_TIMINGR_SCLH -# define I2C1_TIMINGR_SCLH 15U +# define I2C1_TIMINGR_SCLH 38U # endif # ifndef I2C1_TIMINGR_SCLL -# define I2C1_TIMINGR_SCLL 21U +# define I2C1_TIMINGR_SCLL 129U # endif #endif From bc7f1dd296d2bb4e0716b68883ee8f17c8a5f458 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Ignacio=20Amelivia=20Santiago?= Date: Thu, 31 Oct 2019 20:36:33 +0100 Subject: [PATCH 240/316] [Docs] Spanish translation (#7068) * add all translation docs to translating.md * Adding Spanish folder and README.md * Adding Spanish to the langs file * Adding a Spanish summary file * Small corrections on the Spanish README file * Adding Spanish newbs.md * Translate some newbs documentation * Adding the translated newbs getting started file * Adding the building firmware file * Adding a translated building firmware with configurator file * Adding the flashing guide * Adding the newbs_testing_debugging file * Apply suggestions from code review * QMK Configurator -> Configurador QMK Co-Authored-By: Karey Higuera --- docs/_langs.md | 1 + docs/es/README.md | 32 ++ docs/es/_summary.md | 121 ++++++ docs/es/becoming_a_qmk_collaborator.md | 9 + docs/es/newbs.md | 23 ++ docs/es/newbs_best_practices.md | 159 ++++++++ docs/es/newbs_building_firmware.md | 81 ++++ .../newbs_building_firmware_configurator.md | 105 ++++++ docs/es/newbs_flashing.md | 351 ++++++++++++++++++ docs/es/newbs_getting_started.md | 103 +++++ docs/es/newbs_learn_more_resources.md | 15 + docs/es/newbs_testing_debugging.md | 99 +++++ docs/index.html | 4 +- 13 files changed, 1102 insertions(+), 1 deletion(-) create mode 100644 docs/es/README.md create mode 100644 docs/es/_summary.md create mode 100644 docs/es/becoming_a_qmk_collaborator.md create mode 100644 docs/es/newbs.md create mode 100644 docs/es/newbs_best_practices.md create mode 100644 docs/es/newbs_building_firmware.md create mode 100644 docs/es/newbs_building_firmware_configurator.md create mode 100644 docs/es/newbs_flashing.md create mode 100644 docs/es/newbs_getting_started.md create mode 100644 docs/es/newbs_learn_more_resources.md create mode 100644 docs/es/newbs_testing_debugging.md diff --git a/docs/_langs.md b/docs/_langs.md index c834342704f5..7a7f127a9768 100644 --- a/docs/_langs.md +++ b/docs/_langs.md @@ -1,6 +1,7 @@ - Translations - [:uk: English](/) - [:cn: 中文](/zh-cn/) + - [:es: Español](/es/) - [:fr: Français](/fr-fr/) - [:he: עברית](/he-il/) - [:ru: Русский](/ru-ru/) diff --git a/docs/es/README.md b/docs/es/README.md new file mode 100644 index 000000000000..73e7a7097dac --- /dev/null +++ b/docs/es/README.md @@ -0,0 +1,32 @@ +# Firmware Quantum Mechanical Keyboard + +[![Versión actual](https://img.shields.io/github/tag/qmk/qmk_firmware.svg)](/~https://github.com/qmk/qmk_firmware/tags) +[![Estado de Build](https://travis-ci.org/qmk/qmk_firmware.svg?branch=master)](https://travis-ci.org/qmk/qmk_firmware) +[![Discord](https://img.shields.io/discord/440868230475677696.svg)](https://discord.gg/Uq7gcHh) +[![Estado de la documentación](https://img.shields.io/badge/docs-ready-orange.svg)](https://docs.qmk.fm) +[![Contribuyentes en GitHub](https://img.shields.io/github/contributors/qmk/qmk_firmware.svg)](/~https://github.com/qmk/qmk_firmware/pulse/monthly) +[![Forks en GitHub](https://img.shields.io/github/forks/qmk/qmk_firmware.svg?style=social&label=Fork)](/~https://github.com/qmk/qmk_firmware/) + +## ¿Qué es el firmware QMK? + +QMK (*Quantum Mechanical Keyboard*) es una comunidad open source que mantiene el firmware QMK, QMK Toolbox, qmk.fm, y estos documentos. El firmware QMK es un firmware para teclados basado en [tmk\_keyboard](http://github.com/tmk/tmk_keyboard) con algunas características útiles para controladores Atmel AVR, y más específicamente, la [línea de productos OLKB](http://olkb.com), el teclado [ErgoDox EZ](http://www.ergodox-ez.com), y la [línea de productos Clueboard](http://clueboard.co/). También ha sido portado a chips ARM chips usando ChibiOS. Lo puedes utilizar para manejar tu propio teclado ya sea cableado a mano o basado en una PCB personalizada. + +## Cómo conseguirlo + +Si estás pensando en contribuir con un keymap, teclado, or característica a QMK, la manera más sencilla es hacer un [fork del repositorio en Github](/~https://github.com/qmk/qmk_firmware#fork-destination-box), y clonar tu repositorio localmente para hacer los cambios, subirlos, y abir un [Pull Request](/~https://github.com/qmk/qmk_firmware/pulls) desde tu fork. + +De cualquier manera, también puedes descargarlo directamente en formatos ([zip](/~https://github.com/qmk/qmk_firmware/zipball/master), [tar](/~https://github.com/qmk/qmk_firmware/tarball/master)), o clonarlo via git (`git@github.com:qmk/qmk_firmware.git`), o https (`/~https://github.com/qmk/qmk_firmware.git`). + +## Cómo compilar + +Antes de poder compilar, necesitarás [instalar un entorno](getting_started_build_tools.md) para el desarrollo de AVR y/o ARM. Una vez hayas completado este paso, usarás el comando `make` para compilar un teclado y keymap con la siguiente notación: + + make planck/rev4:default + +Este ejemplo compilaría la revisión `rev4` del teclado `planck` con el keymap `default`. No todos los teclados tienen revisiones (también llamados subproyectos o carpetas), en ese caso, se puede omitir: + + make preonic:default + +## Cómo personalizar + +QMK tiene montones de [características](features.md) para explorar, y una buena cantidad de [documentación de referencia](http://docs.qmk.fm) en la que sumergirse. Se pueden sacar provecho de la mayoría de las características modificando tu [keymap](keymap.md), y cambiando los [keycodes](keycodes.md). diff --git a/docs/es/_summary.md b/docs/es/_summary.md new file mode 100644 index 000000000000..684d7ab6cdba --- /dev/null +++ b/docs/es/_summary.md @@ -0,0 +1,121 @@ +* [Guía completa para novatos](newbs.md) + * [Empezando](newbs_getting_started.md) + * [Construyendo tu primer firmare](newbs_building_firmware.md) + * [Flasheando el firmware](newbs_flashing.md) + * [Testeando y depurando ](newbs_testing_debugging.md) + * [Mejores práticas](newbs_best_practices.md) + * [Recursos de aprendizaje](newbs_learn_more_resources.md) + +* [QMK Basics](README.md) + * [Introducción a QMK](getting_started_introduction.md) + * [QMK CLI](cli.md) + * [Configuración de QMK CLI](cli_configuration.md) + * [Contribuyendo a QMK](contributing.md) + * [Cómo usar Github](getting_started_github.md) + * [Obtener ayuda](getting_started_getting_help.md) + +* [Cambios incompatibles](breaking_changes.md) + * [30 Ago 2019](ChangeLog/20190830.md) + +* [Preguntas frecuentes](faq.md) + * [General](faq_general.md) + * [Construir/Compilar QMK](faq_build.md) + * [Depurando/Encontrando problemas en QMK](faq_debug.md) + * [Keymap](faq_keymap.md) + * [Instalación de drivers con Zadig](driver_installation_zadig.md) + +* Guías detalladas + * [Instalar herramientas construcción](getting_started_build_tools.md) + * [Guía Vagrant](getting_started_vagrant.md) + * [Instrucciones de Construcción/Compilado](getting_started_make_guide.md) + * [Flasheando Firmware](flashing.md) + * [Personalizando funcionalidad](custom_quantum_functions.md) + * [Visión general del Keymap](keymap.md) + +* [Hardware](hardware.md) + * [Procesadores AVR](hardware_avr.md) + * [Drivers](hardware_drivers.md) + +* Referencia + * [Pautas de teclados](hardware_keyboard_guidelines.md) + * [Opciones de configuración](config_options.md) + * [Keycodes](keycodes.md) + * [Convenciones de código - C](coding_conventions_c.md) + * [Convenciones de código - Python](coding_conventions_python.md) + * [Mejores prácticas de documentación](documentation_best_practices.md) + * [Plantillas de documentación](documentation_templates.md) + * [Glosario](reference_glossary.md) + * [Tests unitarios](unit_testing.md) + * [Funciones útiles](ref_functions.md) + * [Sporte configurador](reference_configurator_support.md) + * [Formato info.json](reference_info_json.md) + * [Desarrollo Python CLI](cli_development.md) + +* [Características](features.md) + * [Keycodes Básicos](keycodes_basic.md) + * [Teclas US ANSI Shifted](keycodes_us_ansi_shifted.md) + * [Keycodes Quantum](quantum_keycodes.md) + * [Keycodes Avanzados](feature_advanced_keycodes.md) + * [Audio](feature_audio.md) + * [Auto Shift](feature_auto_shift.md) + * [Retroiluminación](feature_backlight.md) + * [Bluetooth](feature_bluetooth.md) + * [Bootmagic](feature_bootmagic.md) + * [Combos](feature_combo.md) + * [Comando](feature_command.md) + * [API Debounce](feature_debounce_type.md) + * [Switch DIP](feature_dip_switch.md) + * [Macros Dinámicas](feature_dynamic_macros.md) + * [Encoders](feature_encoders.md) + * [Grave Escape](feature_grave_esc.md) + * [Feedback Háptico](feature_haptic_feedback.md) + * [Controlador LCD HD44780](feature_hd44780.md) + * [Key Lock](feature_key_lock.md) + * [Layouts](feature_layouts.md) + * [Tecla Leader](feature_leader_key.md) + * [Matriz LED](feature_led_matrix.md) + * [Macros](feature_macros.md) + * [Teclas del ratón](feature_mouse_keys.md) + * [Driver OLED](feature_oled_driver.md) + * [Teclas One Shot](feature_advanced_keycodes.md#one-shot-keys) + * [Dispositivo de apuntado](feature_pointing_device.md) + * [Ratón PS/2](feature_ps2_mouse.md) + * [Iluminación RGB](feature_rgblight.md) + * [Matriz RGB](feature_rgb_matrix.md) + * [Cadete espacial](feature_space_cadet.md) + * [Teclado dividido](feature_split_keyboard.md) + * [Stenografía](feature_stenography.md) + * [Swap Hands](feature_swap_hands.md) + * [Tap Dance](feature_tap_dance.md) + * [Terminal](feature_terminal.md) + * [Impresora Térmica](feature_thermal_printer.md) + * [Unicode](feature_unicode.md) + * [Userspace](feature_userspace.md) + * [Velocikey](feature_velocikey.md) + +* Para Makers y Modders + * [Guía de cableado a mano](hand_wire.md) + * [Guía de flasheado de ISP](isp_flashing_guide.md) + * [Guía de depuración de ARM](arm_debugging.md) + * [Driver I2C](i2c_driver.md) + * [Controles GPIO](internals_gpio_control.md) + * [Conversión Proton C](proton_c_conversion.md) + +* Para entender en profundidad + * [Cómo funcionan los teclados](how_keyboards_work.md) + * [Entendiendo QMK](understanding_qmk.md) + +* Otros temas + * [Usando Eclipse con QMK](other_eclipse.md) + * [Usando VSCode con QMK](other_vscode.md) + * [Soporte](support.md) + * [Cómo añadir traducciones](translating.md) + +* QMK Internals (En progreso) + * [Defines](internals_defines.md) + * [Input Callback Reg](internals_input_callback_reg.md) + * [Dispositivo Midi](internals_midi_device.md) + * [Proceso de configuración de un dispositivo Midi](internals_midi_device_setup_process.md) + * [Utilidad Midi](internals_midi_util.md) + * [Funciones Send](internals_send_functions.md) + * [Herramientas Sysex](internals_sysex_tools.md) diff --git a/docs/es/becoming_a_qmk_collaborator.md b/docs/es/becoming_a_qmk_collaborator.md new file mode 100644 index 000000000000..f88846df24e4 --- /dev/null +++ b/docs/es/becoming_a_qmk_collaborator.md @@ -0,0 +1,9 @@ +# Llegar a ser un colaborador QMK + +Un colaborador QMK es un maker o diseñador de teclados que tiene interés en ayudar a QMK a crecer y mantener sus teclado(s), y alentar a los usuarios y clientes a presentar herramientas, ideas, y keymaps. Siempre procuramos agregar más teclados y colaboradores, pero pedimos que cumplan los siguientes requisitos: + +* **Tener un PCB disponible a la venta.** Desafortunadamente, hay demasiada variación y complicaciones con teclados cableados a mano. +* **Realizar el mantenimiento de tu teclado en QMK.** Este podría requirir un setup inicial para hacer que tu teclado funcione, pero también podría incluir adaptarse a cambios hecho al base de QMK que podrían descomponer o rendir código superfluo. +* **Aprobar e incorporar pull requests de keymaps para tu teclado.** Nos gusta alentar a los usuarios a contribuir sus keymaps para que otros los vean y los puedan usar para crear sus propios. + +Si sientes que cumples los requisitos, ¡mándanos un email a hello@qmk.fm con una introducción y algunos enlaces para tu teclado! diff --git a/docs/es/newbs.md b/docs/es/newbs.md new file mode 100644 index 000000000000..ebb4b6ac2d11 --- /dev/null +++ b/docs/es/newbs.md @@ -0,0 +1,23 @@ +# La guía completa de QMK para novatos + +QMK es un poderoso firmware Open Source para tu teclado mecánico. Puedes utilizar QMK para personalizar tu teclado en maneras a la vez simples y potentes. Gente de todos los niveles de habilidad, desde completos novatos hasta expertos programadores, han utilizado con éxito QMK para personalizar sus teclados. Esta guía te ayudará a hacer lo mismo, sin importar tu nivel de habilidad. + +¿No estás seguro de si tu teclado puede ejecutar QMK? Si es un teclado mecánico construido por ti mismo probablemente puedas. Damos soporte a [gran número de placas de hobbistas](http://qmk.fm/keyboards/), e incluso si tu teclado actual no pudiera ejecutar QMK no deberías tener problemas encontrando uno que cumpliera tus necesidades. + +## Visión general + +Hay 7 secciones principales en esta guía: + +* [Empezando](newbs_getting_started.md) +* [Construyendo tu primer firmware](newbs_building_firmware.md) +* [Construyendo tu primer firmware usando la GUI](newbs_building_firmware_configurator.md) +* [Flasheando el firmware](newbs_flashing.md) +* [Testeando y depurando](newbs_testing_debugging.md) +* [Mejores práticas](newbs_best_practices.md) +* [Recursos de aprendizaje](newbs_learn_more_resources.md) + +Esta guía está enfocada en ayudar a alguien que nunca ha compilado software con anterioridad. Toma decisiones y hace recomendaciones teniendo en cuenta este punto de vista. Hay métodos alternativos para muchos de estos procedimientos, y soportamos la mayoría de esas alternativas. Si tienes alguna duda sobre cómo llevar a cabo una tarea nos puedes [preguntar para que te guiemos](getting_started_getting_help.md). + +## Recursos adicionales + +* [Blog de Básicos de Thomas Baart's QMK](https://thomasbaart.nl/category/mechanical-keyboards/firmware/qmk/qmk-basics/) – Un blog creado por un usuario que cubre lo básico sobre cómo usar el firmware QMK Firmware, visto desde la perspectiva de un usuario nuevo. diff --git a/docs/es/newbs_best_practices.md b/docs/es/newbs_best_practices.md new file mode 100644 index 000000000000..fc2afb9ed244 --- /dev/null +++ b/docs/es/newbs_best_practices.md @@ -0,0 +1,159 @@ +# Mejores prácticas + +## O, "Cómo aprendí a dejar de preocuparme y amarle a Git." + +Este documento procura instruir a los novatos en las mejores prácticas para tener una experiencia más fácil en contribuir a QMK. Te guiaremos por el proceso de contribuir a QMK, explicando algunas maneras de hacerlo más fácilmente, y luego romperemos algunas cosas para enseñarte cómo arreglarlas. + +En este documento suponemos un par de cosas: + +1. Tienes una cuenta de Github, y has hecho un [fork del repo qmk_firmware](getting_started_github.md) en tu cuenta. +2. Has [configurado tu entorno de desarrollo](newbs_getting_started.md?id=environment-setup). + + +## La rama master de tu fork: Actualizar a menudo, nunca commit + +Se recomienda que para desarrollo con QMK, lo que sea que estés haciendo, mantener tu rama `master` actualizada, pero **nunca** commit en ella. Mejor, haz todos tus cambios en una rama de desarrollo y manda pull requests de tus ramas mientras programas. + +Para evitar los conflictos de merge — cuando dos o más usuarios han editado la misma parte de un archivo al mismo tiempo — mantén tu rama `master` actualizada, y empieza desarrollo nuevo creando una nueva rama. + +### Actualizando tu rama master + +Para mantener tu rama `master` actualizada, se recomienda agregar el repository ("repo") de Firmware QMK como un repo remoto en git. Para hacer esto, abre tu interfaz de línea de mandatos y ingresa: +``` +git remote add upstream /~https://github.com/qmk/qmk_firmware.git +``` + +Para verificar que el repo ha sido agregado, ejecuta `git remote -v`, y lo siguiente debe aparecer: + +``` +$ git remote -v +origin /~https://github.com//qmk_firmware.git (fetch) +origin /~https://github.com//qmk_firmware.git (push) +upstream /~https://github.com/qmk/qmk_firmware.git (fetch) +upstream /~https://github.com/qmk/qmk_firmware.git (push) +``` + +Ya que has hecho esto, puedes buscar actualizaciones del repo ejecutando `git fetch upstream`. Esto busca las ramas y etiquetas — juntos conocidos como "refs" — del repo QMK, que ahora tiene el apodo `upstream`. Ahora podemos comparar los archivos en nuestro fork `origin` con los de QMK. + +Para actualizar la rama master de tu fork, ejecuta lo siguiente, pulsando Intro después de cada línea: + +``` +git checkout master +git fetch upstream +git pull upstream master +git push origin master +``` + +Esto te coloca en tu rama master, busca los refs del repo de QMK, descarga la rama `master` actual a tu computadora, y después lo sube a tu fork. + +### Hacer cambios + +Para hacer cambios, crea una nueva rama ejecutando: + +``` +git checkout -b dev_branch +git push --set-upstream origin dev_branch +``` + +Esto crea una nueva rama llamada `dev_branch`, te coloca en ella, y después guarda la nueva rama a tu fork. El parámetro `--set-upstream` le dice a git que use tu fork y la rama `dev_branch` cada vez que uses `git push` o `git pull` en esta rama. Solo necesitas usarlo la primera que que subes cambios; ya después, puedes usar `git push` o `git pull`, sin usar los demás parámetros. + +!> Con `git push`, puedes usar `-u` en vez de `--set-upstream` — `-u` es un alias de `--set-upstream`. + +Puedes nombrar tu rama casi cualquier cosa, pero se recomienda ponerle algo con relación a los cambios que vas a hacer. + +Por defecto `git checkout -b` se basará tu nueva rama en la rama en la cual estás actualmente. Puedes basar tu rama en otra rama existente agregando el nombre de la rama al comando: + +``` +git checkout -b dev_branch master +``` + +Ahora que tienes una rama development, abre tu editor de texto y haz los cambios que quieres. Se recomienda hacer varios commits pequeños a tu rama; de este modo cualquier cambio que causa problemas puede ser rastreado y deshecho si fuera necesario. Para hacer tus cambios, edita y guarda los archivos que necesitas actualizar, agrégalos al *staging area* de Git, y luego haz un commit a tu rama: + +``` +git add path/to/updated_file +git commit -m "My commit message." +``` +`git add` agrega los archivos que han sido cambiados al *staging area* de Git, lo cual es la "zona de preparación"de Git. Este contiene los cambios que vas a *commit* usando `git commit`, que guarda los cambios en el repo. Usa un mensaje de commit descriptivo para que puedas saber que ha cambiado fácilmente. + +!> Si has cambiado muchos archivos, pero todos los archivos son parte del mismo cambio, puedes usar `git add .` para agregar todos los archivos cambiados que están en tu directiro actual, en vez de agregar cada archivo manualmente. + +### Publicar tus cambios + +El útimo paso es subir tus cambios a tu fork. Para hacerlo, ejecuta `git push`. Ahora Git publicará el estado actual de `dev_branch` a tu fork. + + +## Resolver los conflictos del merge + +A veces cuando el trabajo en una rama tarda mucho tiempo en completarse, los cambios que han sido hechos por otros chocan con los cambios que has hecho en tu rama cuando abres un pull request. Esto se llama un *merge conflict*, y es algo que ocurre cuando varias personas editan las mismas partes de los mismos archivos. + +### Rebase tus cambios + +Un *rebase* es la manera de Git de tomar los cambios que se aplicaron en un punto, deshacerlos, y aplicar estos mismos cambios en otro punto. En el caso de un conflicto de merge, puedes hacer un rebase de tu rama para recoger los cambios que has hecho. + +Para empezar, ejecuta lo siguiente: + +``` +git fetch upstream +git rev-list --left-right --count HEAD...upstream/master +``` + +El comando `git rev-list` ejecutado aquí muestra el número de commits que difieren entre la rama actual y la rama master de QMK. Ejecutamos `git fetch` primero para asegurarnos de que tenemos los refs que representan es estado actual del repo upstream. El output del comando `git rev-list` muestra dos números: + +``` +$ git rev-list --left-right --count HEAD...upstream/master +7 35 +``` + +El primer número representa el número de commits en la rama actual desde que fue creada, y el segundo número es el número de commits hecho a `upstream/master` desde que la rama actual fue creada, o sea los cambios que no están registrados en la rama actual. + +Ahora que sabemos el estado actual de la rama actual y el del repo upstream, podemos empezar una operación rebase: + +``` +git rebase upstream/master +``` +Esto le dice a Git que deshaga los commits en la rama actual, y después los re-aplica en la rama master de QMK. + +``` +$ git rebase upstream/master +First, rewinding head to replay your work on top of it... +Applying: Commit #1 +Using index info to reconstruct a base tree... +M conflicting_file_1.txt +Falling back to patching base and 3-way merge... +Auto-merging conflicting_file_1.txt +CONFLICT (content): Merge conflict in conflicting_file_1.txt +error: Failed to merge in the changes. +hint: Use 'git am --show-current-patch' to see the failed patch +Patch failed at 0001 Commit #1 + +Resolve all conflicts manually, mark them as resolved with +"git add/rm ", then run "git rebase --continue". +You can instead skip this commit: run "git rebase --skip". +To abort and get back to the state before "git rebase", run "git rebase --abort". +``` + +Esto nos dice que tenemos un conflicto de merge, y nos dice el nombre del archivo con el conflict. Abre el archivo en tu editor de texto, y en alguna parte del archivo verás algo así: + +``` +<<<<<<< HEAD +

For help with any issues, email us at support@webhost.us.

+======= +

Need help? Email support@webhost.us.

+>>>>>>> Commit #1 +``` +La línea `<<<<<<< HEAD` marca el principio de un conflicto de merge, y la línea `>>>>>>> Commit #1` marca el final, con las secciones de conflicto separadas por `=======`. La parte del lado `HEAD` is de la versión de QMK master del archivo, y la parte marcada con el mensaje de commit es de la rama actual. + +Ya que Git rastrea *cambios de archivos* en vez del contenido de los archivos directamente, si Git no puede encontrar el texto que estaba en el archivo antes del último commit, no sabrá cómo editar el archivo. El editar el archivo de nuevo resolverá este conflicto. Haz tus cambios, y guarda el archivo. + +``` +

Need help? Email support@webhost.us.

+``` + +Ahora ejecuta: + +``` +git add conflicting_file_1.txt +git rebase --continue +``` + +Git registra los cambios al archivo con conflictos, y sigue aplicando los commits de nuestra rama hasta llegar al final. diff --git a/docs/es/newbs_building_firmware.md b/docs/es/newbs_building_firmware.md new file mode 100644 index 000000000000..ff9873c785e6 --- /dev/null +++ b/docs/es/newbs_building_firmware.md @@ -0,0 +1,81 @@ +# Construyendo tu primer firmware + +Ahora que has configurado tu entorno de construcción estas listo para empezar a construir firmwares personalizados. Para esta sección de la guía alternaremos entre 3 programas - tu gestor de ficheros, tu editor de texto , y tu ventana de terminal. Manten los 3 abiertos hasta que hayas acabado y estés contento con el firmware de tu teclado. + +Si has cerrado y reabierto la ventana de tu terminal después de seguir el primero paso de esta guía, no olvides hacer `cd qmk_firmware` para que tu terminal esté en el directorio correcto. + +## Navega a tu carpeta de keymaps + +Comienza navegando a la carpeta `keymaps` correspondiente a tu teclado. + +?> Si estás en macOS o Windows hay comandos que puedes utilizar fácilmente para abrir la carpeta keymaps. + +?> macOS: + + abre keyboards//keymaps + +?> Windows: + + inicia .\\keyboards\\\\keymaps + +## Crea una copia del keymap `default` + +Una vez que tengas la carpeta `keymaps` abierta querrás crear una copia de la carpeta `default`. Recomendamos encarecidamente que nombres la carpeta igual que tu nombre de usuario de GitHub, pero puedes utilizar el nombre que quieras siempre que contenga sólo letras en minúscula, números y el caracter de guión bajo. + +Para automatizar el proceso, también tienes la opción de ejecutar el script `new_keymap.sh`. + +Navega a la carpeta `qmk_firmware/util` e introduce lo siguiente: + +``` +./new_keymap.sh +``` + +Por ejemplo, para un usuario llamado John, intentando hacer un keymap nuevo para el 1up60hse, tendría que teclear + +``` +./new_keymap.sh 1upkeyboards/1up60hse john +``` + +## Abre `keymap.c` con tu editor de texto favorito + +Abre tu `keymap.c`. Dentro de este fichero encontrarás la estructura que controla cómo se comporta tu teclado. En lo alto de `keymap.c` puede haber distintos defines y enums que hacen el keymap más fácil de leer. Continuando por abajo encontrarás una línea con este aspecto: + + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +Esta línea indica el comienzo del listado de Capas. Debajo encontrarás líneas que contienen o bien `LAYOUT` o `KEYMAP`, y estas líneas indican el comienzo de una capa. Debajo de esa línea está la lista de teclas que pertenecen a esa capa concreta. + +!> Cuando estés editando tu fichero de keymap ten cuidado con no añadir ni eliminar ninguna coma. Si lo haces el firmware dejará de compilar y puede no ser fácil averiguar dónde está la coma faltante o sobrante. + +## Personaliza el Layout a tu gusto + +Cómo completar esta paso depende enteramente de ti. Haz ese pequeño cambio que querías o rehaz completamente todo. Puedes eliminar capas si no las necesitas todas, o añadir nuevas hasta un total de 32. Comprueba la siguiente documentación para descubrir qué es lo que puedes definir aquí: + +* [Keycodes](keycodes.md) +* [Características](features.md) +* [Preguntas frecuentes](faq.md) + +?> Mientras estás descubriendo cómo funcionan los keymaps, haz pequeños cambios. Cambios mayores pueden hacer difícil la depuración de problemas que puedan aparecer. + +## Construye tu firmware + +Cuando los cambios a tu keymap están completos necesitarás construir el firmware. Para hacerlo vuelve a la ventana de tu terminal y ejecuta el siguiente comando: + + make : + +Por ejemplo, si tu keymap se llama "xyverz" y estás construyendo un keymap para un planck rev5, utilizarás el siguiente comando: + + make planck/rev5:xyverz + +Mientras compila, recibirás un montón de información de salida en la pantalla informándote de qué ficheros están siendo compilados. Debería acabar con una información similar a esta: + +``` +Linking: .build/planck_rev5_xyverz.elf [OK] +Creating load file for flashing: .build/planck_rev5_xyverz.hex [OK] +Copying planck_rev5_xyverz.hex to qmk_firmware folder [OK] +Checking file size of planck_rev5_xyverz.hex [OK] + * File size is fine - 18392/28672 +``` + +## Flashea tu firmware + +Continua con [Flasheando el firmware](newbs_flashing.md) para aprender cómo escribir tu firmware nuevo en tu teclado. diff --git a/docs/es/newbs_building_firmware_configurator.md b/docs/es/newbs_building_firmware_configurator.md new file mode 100644 index 000000000000..a25734324018 --- /dev/null +++ b/docs/es/newbs_building_firmware_configurator.md @@ -0,0 +1,105 @@ +# Configurador QMK + +El [Configurador QMK](https://config.qmk.fm) es un entorno gráfico online que genera ficheros hexadecimales de Firmware QMK. + +?> **Por favor sigue estos pasos en orden.** + +Ve el [Video tutorial](https://youtu.be/tx54jkRC9ZY) + +El Configurador QMK functiona mejor con Chrome/Firefox. + + +!> **Ficheros de otras herramientas como KLE, o kbfirmware no serán compatibles con el Configurador QMK. No las cargues, no las importes. El configurador Configurador QMK es una herramienta DIFERENTE. ** + +## Seleccionando tu teclado + +Haz click en el desplegable y selecciona el teclado para el que quieres crear el keymap. + +?> Si tu teclado tiene varias versiones, asegúrate de que seleccionas la correcta.** + +Lo diré otra vez porque es importante + +!> **ASEGÚRATE DE QUE SELECCIONAS LA VERSIÓN CORRECTA!** + +Si se ha anunciado que tu teclado funciona con QMK pero no está en la lista, es probable que un desarrollador no se haya encargado de él aún o que todavía no hemos tenido la oportunidad de incluirlo. Abre un issue en [qmk_firmware](/~https://github.com/qmk/qmk_firmware/issues) solicitando soportar ese teclado un particular, si no hay un [Pull Request](/~https://github.com/qmk/qmk_firmware/pulls?q=is%3Aopen+is%3Apr+label%3Akeyboard) activo para ello. Hay también teclados que funcionan con QMK que están en las cuentas de github de sus manufacturantes. Acuérdate de comprobar esto también. + +## Eligiendo el layout de tu teclado + +Elige el layout que mejor represente el keymap que quieres crear. Algunos teclados no tienen suficientes layouts o layouts correctos definidos aún. Serán soportados en el futuro. + +## Nombre del keymap + +Llama a este keymap como quieras. + +?> Si estás teniendo problemas para compilar, puede merecer la pena probar un cambio de nombre, ya que puede que ya exista en el repositorio de QMK Firmware. + +## Creando Tu keymap + +La adición de keycodes se puede hacer de 3 maneras. +1. Arrastrando y soltando +2. Clickando en un hueco vacío en el layout y haciendo click en el keycode que deseas +3. Clickando en un hueco vacío en el layout, presionando la tecla física en tu teclado. + +Mueve el puntero de tu ratón sobre una tecla y un pequeño extracto te dirá que es lo que hace la tecla. Para una descripción más detallada por favor, mira + +[Referencia básica de keycodes](https://docs.qmk.fm/#/keycodes_basic) +[Referencia avanzada de keycodes](https://docs.qmk.fm/#/feature_advanced_keycodes) + +En el caso de que no puedas encontrar un layout que suporte tu keymap, por ejemplo, tres huecos para la barra espaciadora, dos huecos para el retroceso o dos huecos para shift etc etc, rellènalos TODOS. + +### Ejemplo: + +3 huecos para barra espaciadora: Rellena TODOS con barra espaciadora + +2 huecos para retroceso: Rellena AMBOS con retroceso + +2 huecos para el shift derecho: Rellena AMBOS con shift derecho + +1 hueco para el shift izquierdo y 1 hueco para soporte iso: Rellena ambos con el shift izquierdo + +5 huecos , pero sólo 4 teclas: Intuye y comprueba o pregunta a alguien que lo haya hecho anteriormente. + +## Guardando tu keymap para ediciones futuras + +Cuando estés satisfecho con un teclado o quieres trabajar en el después, pulsa el botón `Exportar Keymap`. Guardára tu keymap con el nombre que elijas seguido de .json. + +Entonces podrás cargar este fichero .json en el futuro pulsando el botón `Importar Keymap`. + +!> **PRECAUCIÓN:** No es el mismo tipo de fichero .json usado en kbfirmware.com ni ninguna otra herramienta. Si intentas utilizar un fichero .json de alguna de estas herramientas con el Configurador QMK, existe la posibilidad de que tu teclado **explote**. + +## Generando tu fichero de firmware + +Pulsa el botón verde `Compilar`. + +Cuando la compilación haya acabado, podrás presionar el botón verde `Descargar Firmware`. + +## Flasheando tu teclado + +Por favor, dirígete a la sección de [Flashear firmware](newbs_flashing.md) + +## Problemas comunes + +#### Mi fichero .json no funciona + +Si el fichero .json fue generado con el Configurador QMK, enhorabuena, has dado con un bug. Abre una issue en [qmk_configurator](/~https://github.com/qmk/qmk_configurator/issues) + +Si no....cómo no viste el mensaje en negrita que puse arriba diciendo que no hay que utilizar otros ficheros .json? + +#### Hay espacios extra en mi layout ¿Qué hago? + +Si te refieres a tener tres espacios para la barra espaciadora, la mejor decisión es rellenar los tres con la barra espaciadora. También se puede hacer lo mismo con las teclas retroceso y las de shift + +#### Para qué sirve el keycode....... + +Por favor, mira + +[Referencia básica de keycodes](https://docs.qmk.fm/#/keycodes_basic) +[Referencia avanzada de keycodes](https://docs.qmk.fm/#/feature_advanced_keycodes) + +#### No compila + +Por favor, revisa las otras capas de tu keymap para asegurarte de que no hay teclas aleatorias presentes. + +## Problemas y bugs + +Siempre aceptamos peticiones de clientes y reportes de bug. Por favor, indícalos en [qmk_configurator](/~https://github.com/qmk/qmk_configurator/issues) diff --git a/docs/es/newbs_flashing.md b/docs/es/newbs_flashing.md new file mode 100644 index 000000000000..066715c4830f --- /dev/null +++ b/docs/es/newbs_flashing.md @@ -0,0 +1,351 @@ +# Flasheando tu teclado + +Ahora que has construido tu fichero de firmware personalizado querrás flashear tu teclado. + +## Flasheando tu teclado con QMK Toolbox + +La manera más simple de flashear tu teclado sería con [QMK Toolbox](/~https://github.com/qmk/qmk_toolbox/releases). + +De todos modos, QMK Toolbox actualmente sólo está disponible para Windows y macOS. Si estás usando Linux (o sólo quisieras flashear el firmware desde la línea de comandos), tendrás que utilizar el [método indicado abajo](newbs_flashing.md#flash-your-keyboard-from-the-command-line). + +### Cargar el fichero en QMK Toolbox + +Empieza abriendo la aplicación QMK Toolbox. Tendrás que buscar el fichero de firmware usando Finder o Explorer. El firmware de teclado puede estar en uno de estos dos formatos- `.hex` o `.bin`. QMK intenta copiar el apropiado para tu teclado en el fichero raíz `qmk_firmware`. + +?> Si tu estás on Windows o macOS hay comandos que puedes usar para abrir fácilmente la carpeta del firmware actual en Explorer o Finder. + +?> Windows: + + start . + +?> macOS: + + open . + +El fichero de firmware sempre sigue el siguiente formato de nombre: + + _.{bin,hex} + +Por ejemplo, un `plank/rev5` con un keymap `default` tendrá este nombre de fichero: + + planck_rev5_default.hex + +Una vez que hayas localizado el fichero de tu firmware arrástralo a la caja "Fichero local" en QMK Toolbox, o haz click en "Abrir" y navega allí donde tengas almacenado tu fichero de firmware. + +### Pon tu teclado en modo DFU (Bootloader) + +Para poder flashear tu firmware personalizado tienes que poner tu teclado en un modo especial que permite flasheado. Cuando está en este modo no podrás teclear o utilizarlo para ninguna otra cosa. Es muy importante que no desconectes tu teclado, de lo contrario interrumpirás el proceso de flasheo mientras el firmware se está escribiendo. + +Diferentes teclados tienen diferentes maneras de entrar en este modo especial. Si tu PCB actualmente ejecuta QMK o TMK y no has recibido instrucciones específicas, intenta los siguientes pasos en orden: + +* Manten pulsadas ambas teclas shift y pulsa `Pause` +* Manten pulsadas ambas teclas shift y pulsa `B` +* Desconecta tu teclado, mantén pulsada la barra espaciadora y `B` al mismo tiempo, conecta tu teclado y espera un segundo antes de dejar de pulsar las teclas +* Pulsa el botón físico `RESET` situado en el fondo de la PCB +* Localiza los pines en la PCB etiquetados on `BOOT0` o `RESET`, puentea estos dos juntos cuando enchufes la PCB + +Si has tenido éxito verás un mensaje similar a este en QMK Toolbox: + +``` +*** Clueboard - Clueboard 66% HotSwap disconnected -- 0xC1ED:0x2390 +*** DFU device connected +``` + +### Flashea tu teclado + +Haz click en el botón `Flash` de QMK Toolbox. Verás una información de salida similar a esta: + +``` +*** Clueboard - Clueboard 66% HotSwap disconnected -- 0xC1ED:0x2390 +*** DFU device connected +*** Attempting to flash, please don't remove device +>>> dfu-programmer atmega32u4 erase --force + Erasing flash... Success + Checking memory from 0x0 to 0x6FFF... Empty. +>>> dfu-programmer atmega32u4 flash /Users/skully/qmk_firmware/clueboard_66_hotswap_gen1_skully.hex + Checking memory from 0x0 to 0x55FF... Empty. + 0% 100% Programming 0x5600 bytes... + [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success + 0% 100% Reading 0x7000 bytes... + [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success + Validating... Success + 0x5600 bytes written into 0x7000 bytes memory (76.79%). +>>> dfu-programmer atmega32u4 reset + +*** DFU device disconnected +*** Clueboard - Clueboard 66% HotSwap connected -- 0xC1ED:0x2390 +``` + +## Flashea tu teclado desde la línea de comandos + +Lo primero que tienes que saber es qué bootloader utiliza tu teclado. Hay cuatro bootloaders pincipales que se usan habitualmente . Pro-Micro y sus clones usan CATERINA, Teensy's usa Halfkay, las placas OLKB usan QMK-DFU, y otros chips atmega32u4 usan DFU. + +Puedes encontrar más información sobre bootloaders en la página [Instrucciones de flasheado e información de Bootloader](flashing.md). + +Si sabes qué bootloader estás usando, en el momento de compilar el firmware, podrás añadir algún texto extra al comando `make` para automatizar el proceso de flasheado. + +### DFU + +Para eo bootloader DFU, cuando estés listo para compilar y flashear tu firmware, abre tu ventana de terminal y ejecuta el siguiente comando de construcción: + + make ::dfu + +Por ejemplo, si tu keymap se llama "xyverz" y estás construyendo un keymap para un planck rev5, utilizarás este comando: + + make planck/rev5:xyverz:dfu + +Una vez que finalice de compilar, deberá aparecer lo siguiente: + +``` +Linking: .build/planck_rev5_xyverz.elf [OK] +Creating load file for flashing: .build/planck_rev5_xyverz.hex [OK] +Copying planck_rev5_xyverz.hex to qmk_firmware folder [OK] +Checking file size of planck_rev5_xyverz.hex + * File size is fine - 18574/28672 + ``` + +Después de llegar a este punto, el script de construcción buscará el bootloader DFU cada 5 segundos. Repetirá lo siguiente hasta que se encuentre el dispositivo o lo canceles: + + dfu-programmer: no device present. + Error: Bootloader not found. Trying again in 5s. + +Una vez haya hecho esto, tendrás que reiniciar el controlador. Debería mostrar una información de salida similar a esta: + +``` +*** Attempting to flash, please don't remove device +>>> dfu-programmer atmega32u4 erase --force + Erasing flash... Success + Checking memory from 0x0 to 0x6FFF... Empty. +>>> dfu-programmer atmega32u4 flash /Users/skully/qmk_firmware/clueboard_66_hotswap_gen1_skully.hex + Checking memory from 0x0 to 0x55FF... Empty. + 0% 100% Programming 0x5600 bytes... + [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success + 0% 100% Reading 0x7000 bytes... + [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success + Validating... Success + 0x5600 bytes written into 0x7000 bytes memory (76.79%). +>>> dfu-programmer atmega32u4 reset +``` + +?> Si tienes problemas con esto- del estilo de `dfu-programmer: no device present` - por favor consulta las [Preguntas frecuentes de construcción](faq_build.md). + +#### Comandos DFU + +Hay un número de comandos DFU que puedes usar para flashear firmware a un dispositivo DFU: + +* `:dfu` - Esta es la opción normal y espera hasta que un dispositivo DFU esté disponible, entonces flashea el firmware. Esperará reintentando cada 5 segundos, para ver si un dispositivo DFU ha aparecido. +* `:dfu-ee` - Esta flashea un fichero `eep` en vez del hex normal. Esto no es lo común. +* `:dfu-split-left` - Esta flashea el firmware normal, igual que la opción por defecto (`:dfu`). Sin embargo, también flashea el fichero EEPROM "Lado Izquierdo" para teclados divididos. _Esto es ideal para los ficheros divididos basados en Elite C._ +* `:dfu-split-right` - Esto flashea el firmware normal, igual que la opción por defecto (`:dfu`). Sin embargo, también flashea el fichero EEPROM "Lado Derecho" para teclados divididos. _Esto es ideal para los ficheros divididos basados en Elite C._ + + +### Caterina + +Para placas Arduino y sus clones (como la SparkFun ProMicro), cuando estés listo para compilar y flashear tu firmware, abre tu ventana de terminal y ejecuta el siguiente comando de construcción: + + make ::avrdude + +Por ejemplo, si tu keymap se llama "xyverz" y estás construyendo un keymap para un Lets Split rev2, usarás este comando: + + make lets_split/rev2:xyverz:avrdude + +Una vez que finalice de compilar, deberá aparecer lo siguiente: + +``` +Linking: .build/lets_split_rev2_xyverz.elf [OK] +Creating load file for flashing: .build/lets_split_rev2_xyverz.hex [OK] +Checking file size of lets_split_rev2_xyverz.hex [OK] + * File size is fine - 27938/28672 +Detecting USB port, reset your controller now.............. +``` + +En este punto, reinicia la placa y entonces el script detectará el bootloader y procederá a flashear la placa. La información de salida deber ser algo similar a esto: + +``` +Detected controller on USB port at /dev/ttyS15 + +Connecting to programmer: . +Found programmer: Id = "CATERIN"; type = S + Software Version = 1.0; No Hardware Version given. +Programmer supports auto addr increment. +Programmer supports buffered memory access with buffersize=128 bytes. + +Programmer supports the following devices: + Device code: 0x44 + +avrdude.exe: AVR device initialized and ready to accept instructions + +Reading | ################################################## | 100% 0.00s + +avrdude.exe: Device signature = 0x1e9587 (probably m32u4) +avrdude.exe: NOTE: "flash" memory has been specified, an erase cycle will be performed + To disable this feature, specify the -D option. +avrdude.exe: erasing chip +avrdude.exe: reading input file "./.build/lets_split_rev2_xyverz.hex" +avrdude.exe: input file ./.build/lets_split_rev2_xyverz.hex auto detected as Intel Hex +avrdude.exe: writing flash (27938 bytes): + +Writing | ################################################## | 100% 2.40s + +avrdude.exe: 27938 bytes of flash written +avrdude.exe: verifying flash memory against ./.build/lets_split_rev2_xyverz.hex: +avrdude.exe: load data flash data from input file ./.build/lets_split_rev2_xyverz.hex: +avrdude.exe: input file ./.build/lets_split_rev2_xyverz.hex auto detected as Intel Hex +avrdude.exe: input file ./.build/lets_split_rev2_xyverz.hex contains 27938 bytes +avrdude.exe: reading on-chip flash data: + +Reading | ################################################## | 100% 0.43s + +avrdude.exe: verifying ... +avrdude.exe: 27938 bytes of flash verified + +avrdude.exe: safemode: Fuses OK (E:CB, H:D8, L:FF) + +avrdude.exe done. Thank you. +``` +Si tienes problemas con esto, puede ser necesario que hagas esto: + + sudo make ::avrdude + + +Adicionalmente, si quisieras flashear múltiples placas, usa el siguiente comando: + + make ::avrdude-loop + +Cuando hayas acabado de flashear placas, necesitarás pulsar Ctrl + C o cualquier combinación que esté definida en tu sistema operativo para finalizar el bucle. + + +### HalfKay + +Para dispositivos PJRC (Teensy's), cuando estés listo para compilar y flashear tu firmware, abre tu ventana de terminal y ejecuta el siguiente comando de construcción: + + make ::teensy + +Por ejemplo, si tu keymap se llama "xyverz" y estás construyendo un keymap para un Ergodox o un Ergodox EZ, usarás este comando: + + make ergodox_ez:xyverz:teensy + +Una vez que el firmware acabe de compilar, deberá mostrar una información de salida como esta: + +``` +Linking: .build/ergodox_ez_xyverz.elf [OK] +Creating load file for flashing: .build/ergodox_ez_xyverz.hex [OK] +Checking file size of ergodox_ez_xyverz.hex [OK] + * File size is fine - 25584/32256 + Teensy Loader, Command Line, Version 2.1 +Read "./.build/ergodox_ez_xyverz.hex": 25584 bytes, 79.3% usage +Waiting for Teensy device... + (hint: press the reset button) + ``` + +En este punto, reinicia tu placa. Una vez que lo hayas hecho, deberás ver una información de salida como esta: + + ``` + Found HalfKay Bootloader +Read "./.build/ergodox_ez_xyverz.hex": 28532 bytes, 88.5% usage +Programming............................................................................................................................................................................ +................................................... +Booting +``` + +### BootloadHID + +Para placas basadas en Bootmapper Client(BMC)/bootloadHID/ATmega32A, cuando estés listo para compilar y flashear tu firmware, abre tu ventana de terminal y ejecuta el comando de construcción: + + make ::bootloaderHID + +Por ejemplo, si tu keymap se llama "xyverz" y estás construyendo un keymap para un jj40, usarás esté comando: + + make jj40:xyverz:bootloaderHID + +Una vez que el firmware acaba de compilar, mostrará una información de salida como esta: + +``` +Linking: .build/jj40_default.elf [OK] +Creating load file for flashing: .build/jj40_default.hex [OK] +Copying jj40_default.hex to qmk_firmware folder [OK] +Checking file size of jj40_default.hex [OK] + * The firmware size is fine - 21920/28672 (6752 bytes free) +``` + +Después de llegar a este punto, el script de construcción buscará el bootloader DFU cada 5 segundos. Repetirá lo siguiente hasta que se encuentre el dispositivo o hasta que lo canceles. + +``` +Error opening HIDBoot device: The specified device was not found +Trying again in 5s. +``` + +Una vez que lo haga, querrás reinicar el controlador. Debería entonces mostrar una información de salida similar a esta: + +``` +Page size = 128 (0x80) +Device size = 32768 (0x8000); 30720 bytes remaining +Uploading 22016 (0x5600) bytes starting at 0 (0x0) +0x05580 ... 0x05600 +``` + +### STM32 (ARM) + +Para la mayoría de placas ARM (incluyendo la Proton C, Planck Rev 6, y Preonic Rev 3), cuando estés listo para compilar y flashear tu firmware, abre tu ventana de terminal y ejecuta el siguiente comando de construcción: + + make ::dfu-util + +Por ejemplo, si tu keymap se llama "xyverz" y estás construyendo un keymap para un teclado Planck Revision 6, utilizarás este comando y a continuación reiniciarás el teclado con el bootloader (antes de que acabe de compilar): + + make planck/rev6:xyverz:dfu-util + +Una vez que el firmware acaba de compilar, mostrará una información de salida similar a esta: + +``` +Linking: .build/planck_rev6_xyverz.elf [OK] +Creating binary load file for flashing: .build/planck_rev6_xyverz.bin [OK] +Creating load file for flashing: .build/planck_rev6_xyverz.hex [OK] + +Size after: + text data bss dec hex filename + 0 41820 0 41820 a35c .build/planck_rev6_xyverz.hex + +Copying planck_rev6_xyverz.bin to qmk_firmware folder [OK] +dfu-util 0.9 + +Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc. +Copyright 2010-2016 Tormod Volden and Stefan Schmidt +This program is Free Software and has ABSOLUTELY NO WARRANTY +Please report bugs to http://sourceforge.net/p/dfu-util/tickets/ + +Invalid DFU suffix signature +A valid DFU suffix will be required in a future dfu-util release!!! +Opening DFU capable USB device... +ID 0483:df11 +Run-time device DFU version 011a +Claiming USB DFU Interface... +Setting Alternate Setting #0 ... +Determining device status: state = dfuERROR, status = 10 +dfuERROR, clearing status +Determining device status: state = dfuIDLE, status = 0 +dfuIDLE, continuing +DFU mode device DFU version 011a +Device returned transfer size 2048 +DfuSe interface name: "Internal Flash " +Downloading to address = 0x08000000, size = 41824 +Download [=========================] 100% 41824 bytes +Download done. +File downloaded successfully +Transitioning to dfuMANIFEST state +``` + +#### STM32 Commands + +Hay un número de comandos DFU que puedes usar para flashear firmware a un dispositivo DFU: + +* `:dfu-util` - El comando por defecto para flashing en dispositivos STM32. +* `:dfu-util-wait` - Esto funciona como el comando por defecto, pero te da (configurable) 10 segundos de tiempo antes de que intente flashear el firmware. Puedes usar `TIME_DELAY=20` desde la líena de comandos para cambiar este tiempo de retardo. + * Eg: `make ::dfu-util TIME_DELAY=5` +* `:dfu-util-split-left` - Flashea el firmware normal, igual que la opción por defecto (`:dfu-util`). Sin embargo, también flashea el fichero EEPROM "Lado Izquierdo" para teclados divididos. +* `:dfu-util-split-right` - Flashea el firmware normal, igual que la opción por defecto (`:dfu-util`). Sin embargo, también flashea el fichero EEPROM "Lado Derecho" para teclados divididos. + +## ¡Pruébalo! + +¡Felicidades! ¡Tu firmware personalizado ha sido programado en tu teclado! + +Pruébalo y asegúrate de que todo funciona de la manera que tu quieres. Hemos escrito [Testeando y depurando](newbs_testing_debugging.md) para redondear esta guía de novatos, así que pásate por allí para aprender cómo resolver problemas con tu funcionalidad personalizada. diff --git a/docs/es/newbs_getting_started.md b/docs/es/newbs_getting_started.md new file mode 100644 index 000000000000..eb0d6d36fbd9 --- /dev/null +++ b/docs/es/newbs_getting_started.md @@ -0,0 +1,103 @@ +# Introducción + +El teclado de tu computador tiene un procesador dentro de él, no muy distinto del que está dentro de tu ordenador. Este procesador ejecuta software que es responsable de detectar la pulsación de las teclas y enviar informes sobre el estado del teclado cuando las teclas son pulsadas y liberadas. QMK ocupa el rol de ese software. Cuando construyes un keymap personalizado , estas creando el equivalente de un programa ejecutable en tu teclado. + +QMK intenta poner un montón de poder en tus manos haciendo que las cosas fáciles sean fáciles, y las cosas difíciles posibles. No tienes que saber cómo programar para crear keymaps potentes — sólo tienes que seguir un conjunto simple de reglas sintácticas. + +# Comenzando + +Antes de que puedas construir keymaps, necesitarás instalar algun software y configurar tu entorno de construcción. Esto sólo hay que hacerlo una vez sin importar en cuántos teclados planeas configurar el software. + +Si prefieres hacerlo mediante un interfaz gráfico , por favor, considera utilizar el [Configurador QMK](https://config.qmk.fm). En ese caso dirígete a [Construyendo tu primer firmware usando la GUI](newbs_building_firmware_configurator.md). + + +## Descarga el software + +### Editor de texto + +Necesitarás un programa con el que puedas editar y guardar archivos de **texto plano**, en windows puedes utilizar Notepad y en tu Linux puedes utilizar gedit. Estos dos programas son editores simples y funcionales. En macOS ten cuidado con la aplicación de edición de texto por defecto TextEdit: no guardará texto plano a menos de que se le seleccione explícitamente _Make Plain Text_ desde el menú _Format_. + +También puedes descargar e instalar un editor de texto dedicado como [Sublime Text](https://www.sublimetext.com/) o [VS Code](https://code.visualstudio.com/). Esta es probablemente la mejor manera independientemente de la plataforma, ya que estos programas fueron creados específicamente para editar código. + +?> ¿No estás seguro de qué editor de texto utilizar? Laurence Bradford escribió una [estupenda introducción](https://learntocodewith.me/programming/basics/text-editors/) al tema. + +### QMK Toolbox + +QMK Toolbox is an optional graphical program for Windows and macOS that allows you to both program and debug your custom keyboard. You will likely find it invaluable for easily flashing your keyboard and viewing debug messages that it prints. + +[Download the latest release here.](/~https://github.com/qmk/qmk_toolbox/releases/latest) + +* For Windows: `qmk_toolbox.exe` (portable) or `qmk_toolbox_install.exe` (installer) +* For macOS: `QMK.Toolbox.app.zip` (portable) or `QMK.Toolbox.pkg` (installer) + +## Configura tu entorno + +Hemos intentado hacer QMK lo más fácil de configurar posible. Sólo tienes que preparar tu entorno Linux o Unix, y luego dejar que QMK +instale el resto. + +?> Si no has trabajado con la línea de comandos de Linux/Unix con anterioridad, hay algunos conceptos y comandos básicos que deberías aprender. Estos recursos te enseñarán lo suficiente para poder trabajar con QMK:
+[Comandos de Linux que debería saber](https://www.guru99.com/must-know-linux-commands.html)
+[Algunos comandos básicos de Unix](https://www.tjhsst.edu/~dhyatt/superap/unixcmd.html) + +### Windows + +Necesitarás instalar MSYS2 y Git. + +* Sigue las instrucciones de instalación en la [página de MSYS2](http://www.msys2.org). +* Cierra las terminales abiertas de MSYS2 y abre una nueva termial de MSYS2 MinGW 64-bit. +* Instala Git ejecutando este comando: `pacman -S git`. + +### macOS + +Necesitarás instalar Homebrew. Sigue las instrucciones que encontrarás en la [página de Homebrew](https://brew.sh). + +Despueś de que se haya inastalado Homebrew, continúa con _Set Up QMK_. En ese paso ejecutará un script que instalará el resto de paquetes. + +### Linux + +Necesitarás instalar Git. Es bastante probable que ya lo tengas, pero si no, uno de los siguientes comandos debería instalarlo: + +* Debian / Ubuntu / Devuan: `apt-get install git` +* Fedora / Red Hat / CentOS: `yum install git` +* Arch: `pacman -S git` + +?> Docker es también una opción en todas las plataformas. [Haz click aquí si quieres detalles.](getting_started_build_tools.md#docker) + +## Configura QMK + +Una vez que hayas configurado tu entorno Linux/Unix, estarás listo para descargar QMK. Haremos esto utilizando Git para "clonar" el respositorio de QMK. Abre una ventana de Terminal o MSYS2 MinGW y mantenla abierta mientras sigues esta guía. Dentro de esa ventana ejecuta estos dos comandos: + +```shell +git clone --recurse-submodules /~https://github.com/qmk/qmk_firmware.git +cd qmk_firmware +``` + +?> Si ya sabes [cómo usar GitHub](getting_started_github.md), te recomendamos en vez de eso, crees y clones tu propio fork. Si no sabes lo que significa, puedes ignorar este mensaje sin problemas. + +QMK viene con un script para ayudarte a configurar el resto de cosas que necesitarás. Deberías ejecutarlo introduciendo este comando: + + util/qmk_install.sh + +## Prueba tu entorno de construcción + +Ahora que tu entorno de construcción de QMK está configurado, puedes construcir un firmware para tu teclado. Comienza intentado construir el keymap por defecto del teclado. Deberías ser capaz de hacerlo con un comando con este formato: + + make :default + +Por ejemplo, para construir el firmware para un Clueboard 66% deberías usar: + + make clueboard/66/rev3:default + +Cuando esté hecho, deberías tener un montón de información de salida similar a esta: + +``` +Linking: .build/clueboard_66_rev3_default.elf [OK] +Creating load file for flashing: .build/clueboard_66_rev3_default.hex [OK] +Copying clueboard_66_rev3_default.hex to qmk_firmware folder [OK] +Checking file size of clueboard_66_rev3_default.hex [OK] + * The firmware size is fine - 26356/28672 (2316 bytes free) +``` + +# Creando tu keymap + +Ya estás listo para crear tu propio keymap personal! Para hacerlo continua con [Construyendo tu primer firmware](newbs_building_firmware.md). diff --git a/docs/es/newbs_learn_more_resources.md b/docs/es/newbs_learn_more_resources.md new file mode 100644 index 000000000000..413b9ffa5ef3 --- /dev/null +++ b/docs/es/newbs_learn_more_resources.md @@ -0,0 +1,15 @@ +# Recursos de aprendizaje + +Estos recursos procuran dar miembros nuevos en la communidad QMK un mayor entendimiento de la información proporcionada en la documentación para novatos. + +Recursos de Git: + +* [Excelente tutorial general](https://www.codecademy.com/learn/learn-git) +* [Juego de Git para aprender usando ejemplos](https://learngitbranching.js.org/) +* [Recursos de Git para aprender más sobre Github](getting_started_github.md) +* [Recursos de Git dirigidos específicamente a QMK](contributing.md) + + +Recursos para línea de mandatos: + +* [Excelente tutorial general sobre la línea de mandatos](https://www.codecademy.com/learn/learn-the-command-line) diff --git a/docs/es/newbs_testing_debugging.md b/docs/es/newbs_testing_debugging.md new file mode 100644 index 000000000000..ef7412f15c3e --- /dev/null +++ b/docs/es/newbs_testing_debugging.md @@ -0,0 +1,99 @@ +# Testeando y depurando + +Una vez que hayas flasheado tu teclado con un firmware personalizado estarás listo para probarlo. Con un poco de suerte todo funcionará a la primera, pero si no es así, este documento te ayudará a averiguar qué está mal. + +## Probando + +Probar tu teclado es generalmente bastante sencillo. Persiona cada una de las teclas y asegúrate de que envía la tecla correcta. Existen incluso programas que te ayudarán a asegurarte de que no te dejas ninguna tecla sin comprobar. + +Nota: Estos programas no los provée ni están relacionados con QMK. + +* [Switch Hitter](https://elitekeyboards.com/switchhitter.php) (Sólo Windows) +* [Keyboard Viewer](https://www.imore.com/how-use-keyboard-viewer-your-mac) (Sólo Mac) +* [Keyboard Tester](http://www.keyboardtester.com) (Aplicación web) +* [Keyboard Checker](http://keyboardchecker.com) (Aplicación web) + +## Depurando + +Tu teclado mostrará información de depuración si tienes `CONSOLE_ENABLE = yes` en tu `rules.mk`. Por defecto la información de salida es muy limitada, pero puedes encender el modo de depuración para incrementar la información de salida. Utiliza el keycode `DEBUG` de tu keymap, usa la característica [Comando](feature_command.md) para activar el modo depuración, o añade el siguiente código a tu keymap. + +```c +void keyboard_post_init_user(void) { + // Customise these values to desired behaviour + debug_enable=true; + debug_matrix=true; + //debug_keyboard=true; + //debug_mouse=true; +} +``` + +### Depurando con QMK Toolbox + +Para plataformas compatibles, [QMK Toolbox](/~https://github.com/qmk/qmk_toolbox) se puede usar para mostrar mensajes de depuración de tu teclado. + +### Depurando con hid_listen + +¿Prefieres una solución basada en una terminal? [hid_listen](https://www.pjrc.com/teensy/hid_listen.html), provista por PJRC, se puede usar también para mostrar mensajes de depuración. Hay binarios preconstruídos para Windows,Linux,y MacOS. + + + +## Enviando tus propios mensajes de depuración + +A veces, es útil imprimir mensajes de depuración desde tu [código personalizado](custom_quantum_functions.md). Hacerlo es bastante simple. Comienza incluyendo `print.h` al principio de tu fichero: + + #include + +Después de eso puedes utilzar algunas funciones print diferentes: + +* `print("string")`: Imprime un string simple +* `uprintf("%s string", var)`: Imprime un string formateado +* `dprint("string")` Imprime un string simple, pero sólo cuando el modo de depuración está activo +* `dprintf("%s string", var)`: Imprime un string formateado, pero sólo cuando el modo de depuración está activo + +## Ejemplos de depuración + +Debajo hay una colección de ejemplos de depuración del mundo real. Para información adicional, Dirígete a [Depurando/Encontrando problemas en QMK](faq_debug.md). + +### ¿Que posición en la matriz tiene esta pulsación de tecla? + +Cuando estés portando, o intentando diagnosticar problemas en la pcb, puede ser útil saber si la pulsación de una tecla es escaneada correctamente. Para hablitar la información de registro en este escenario, añade el siguiente código al `keymap.c` de tus keymaps + +```c +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + // If console is enabled, it will print the matrix position and status of each key pressed +#ifdef CONSOLE_ENABLE + uprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed); +#endif + return true; +} +``` + +Ejemplo de salida +```text +Waiting for device:....... +Listening: +KL: kc: 169, col: 0, row: 0, pressed: 1 +KL: kc: 169, col: 0, row: 0, pressed: 0 +KL: kc: 174, col: 1, row: 0, pressed: 1 +KL: kc: 174, col: 1, row: 0, pressed: 0 +KL: kc: 172, col: 2, row: 0, pressed: 1 +KL: kc: 172, col: 2, row: 0, pressed: 0 +``` + +### ¿Cuanto tiempo tardó en escanear la pulsación de una tecla? + +Cuando estés probando problemas en el rendimiento, puede ser útil saber la frecuenta a la cual la matríz de pulsadores se está escaneando. Para hablitar la información de registro en este escenario, añade el siguiente código al `config.h` de tus keymaps + +```c +#define DEBUG_MATRIX_SCAN_RATE +``` + +Ejemplo de salida +```text + > matrix scan frequency: 315 + > matrix scan frequency: 313 + > matrix scan frequency: 316 + > matrix scan frequency: 316 + > matrix scan frequency: 316 + > matrix scan frequency: 316 +``` diff --git a/docs/index.html b/docs/index.html index 94372944a971..0cee19ecd69e 100644 --- a/docs/index.html +++ b/docs/index.html @@ -6,7 +6,7 @@ - + @@ -39,10 +39,12 @@ search: { paths: 'auto', placeholder: { + '/es/': 'Buscar', '/zh-cn/': '搜索', '/': 'Search' }, noData: { + '/es/': '¡Ningún resultado!', '/zh-cn/': '没有结果!', '/': 'No results!' }, From f4c8057a1c5296c108afcbc57df842f36b7daad4 Mon Sep 17 00:00:00 2001 From: michizhou <33012425+michizhou@users.noreply.github.com> Date: Thu, 31 Oct 2019 15:39:50 -0400 Subject: [PATCH 241/316] [Docs] Add Spanish translation for hardware documentation (#7161) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add Spanish translation for hardware documentation * Finished Spanish translations for hardware docs * Resolved errors in Spanish page translations * Corrected misspelled folder name in documentation Co-Authored-By: Karey Higuera Co-Authored-By: José Ignacio Amelivia Santiago --- docs/es/hardware.md | 8 ++ docs/es/hardware_avr.md | 181 ++++++++++++++++++++++++ docs/es/hardware_drivers.md | 36 +++++ docs/es/hardware_keyboard_guidelines.md | 149 +++++++++++++++++++ 4 files changed, 374 insertions(+) create mode 100644 docs/es/hardware.md create mode 100644 docs/es/hardware_avr.md create mode 100644 docs/es/hardware_drivers.md create mode 100644 docs/es/hardware_keyboard_guidelines.md diff --git a/docs/es/hardware.md b/docs/es/hardware.md new file mode 100644 index 000000000000..8d7579c9efee --- /dev/null +++ b/docs/es/hardware.md @@ -0,0 +1,8 @@ +# Hardware + +QMK es compatible con una variedad de hardware. Si tu procesador puede ser dirigido por [LUFA](http://www.fourwalledcubicle.com/LUFA.php) o [ChibiOS](http://www.chibios.com), probablemente puedes hacer que QMK se ejecute en él. Esta sección explora cómo hacer que QMK se ejecute y se comunique con hardware de todo tipo. + +* [Pautas de teclados](hardware_keyboard_guidelines.md) +* [Procesadores AVR](hardware_avr.md) +* Procesadores ARM (TBD) +* [Drivers](hardware_drivers.md) diff --git a/docs/es/hardware_avr.md b/docs/es/hardware_avr.md new file mode 100644 index 000000000000..4236292a12dc --- /dev/null +++ b/docs/es/hardware_avr.md @@ -0,0 +1,181 @@ +# Teclados con Procesadores AVR + +Esta página describe el soporte para procesadores AVR en QMK. Los procesadores AVR incluyen el atmega32u4, atmega32u2, at90usb1286, y otros procesadores de la Corporación Atmel. Los procesadores AVR son MCUs de 8-bit que son diseñados para ser fáciles de trabajar. Los procesadores AVR más comunes en los teclados tienen USB y un montón de GPIO para permitir grandes matrices de teclado. Son los MCUs más populares para el uso en los teclados hoy en día. + +Si aún no lo has hecho, debes leer las [Pautas de teclados](hardware_keyboard_guidelines.md) para tener una idea de cómo los teclados encajan en QMK. + +## Añadir tu Teclado AVR a QMK + +QMK tiene varias características para simplificar el trabajo con teclados AVR. Para la mayoría de los teclados no tienes que escribir ni una sola línea de código. Para empezar, ejecuta el archivo `util/new_keyboard.sh`: + +``` +$ ./util/new_keyboard.sh +Generating a new QMK keyboard directory + +Keyboard Name: mycoolkb +Keyboard Type [avr]: +Your Name [John Smith]: + +Copying base template files... done +Copying avr template files... done +Renaming keyboard files... done +Replacing %KEYBOARD% with mycoolkb... done +Replacing %YOUR_NAME% with John Smith... done + +Created a new keyboard called mycoolkb. + +To start working on things, cd into keyboards/mycoolkb, +or open the directory in your favourite text editor. +``` + +Esto creará todos los archivos necesarios para tu nuevo teclado, y rellenará la configuración con valores predeterminados. Ahora sólo tienes que personalizarlo para tu teclado. + +## `readme.md` + +Aquí es donde describirás tu teclado. Por favor sigue la [Plantilla del readme de teclados](documentation_templates.md#keyboard-readmemd-template) al escribir tu `readme.md`. Te animamos a colocar una imagen en la parte superior de tu `readme.md`. Por favor, utiliza un servicio externo como [Imgur](http://imgur.com) para alojar las imágenes. + +## `.c` + +Aquí es donde pondrás toda la lógica personalizada para tu teclado. Muchos teclados no necesitan nada aquí. Puedes aprender más sobre cómo escribir lógica personalizada en [Funciones Quantum Personalizadas](custom_quantum_functions.md). + +## `.h` + +Este es el archivo en el que defines tu(s) [Macro(s) de Layout](feature_layouts.md). Por lo menos deberías tener un `#define LAYOUT` para tu teclado que se ve algo así: + +```c +#define LAYOUT( \ + k00, k01, k02, \ + k10, k11 \ +) { \ + { k00, k01, k02 }, \ + { k10, KC_NO, k11 }, \ +} +``` + +La primera mitad de la macro pre-procesador `LAYOUT` define la disposición física de las llaves. La segunda mitad de la macro define la matriz a la que están conectados los interruptores. Esto te permite tener una disposición física de las llaves que difiere de la matriz de cableado. + +Cada una de las variables `k__` tiene que ser única, y normalmente sigue el formato `k`. + +La matriz física (la segunda mitad) debe tener un número de filas igualando `MATRIX_ROWS`, y cada fila debe tener exactamente `MATRIX_COLS` elementos. Si no tienes tantas teclas físicas puedes usar `KC_NO` para rellenar los espacios en blanco. + +## `config.h` + +El archivo `config.h` es donde configuras el hardware y el conjunto de características para tu teclado. Hay un montón de opciones que se pueden colocar en ese archivo, demasiadas para listar allí. Para obtener una visión de conjunto completa de las opciones disponibles consulta la página de [Opciones de Configuración](config_options.md). + +### Configuración de hardware + + +En la parte superior de `config.h` encontrarás ajustes relacionados con USB. Estos controlan la apariencia de tu teclado en el Sistema Operativo. Si no tienes una buena razón para cambiar debes dejar el `VENDOR_ID` como `0xFEED`. Para el `PRODUCT_ID` debes seleccionar un número que todavía no esté en uso. + +Cambia las líneas de `MANUFACTURER`, `PRODUCT`, y `DESCRIPTION` para reflejar con precisión tu teclado. + +```c +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Tú +#define PRODUCT mi_teclado_fantastico +#define DESCRIPTION Un teclado personalizado +``` + +?> Windows y macOS mostrarán el `MANUFACTURER` y `PRODUCT` en la lista de dispositivos USB. `lsusb` en Linux toma estos de la lista mantenida por el [Repositorio de ID USB](http://www.linux-usb.org/usb-ids.html) por defecto. `lsusb -v` mostrará los valores reportados por el dispositivo, y también están presentes en los registros del núcleo después de conectarlo. + +### Configuración de la matriz del teclado + +La siguiente sección del archivo `config.h` trata de la matriz de tu teclado. Lo primero que debes establecer es el tamaño de la matriz. Esto es generalmente, pero no siempre, el mismo número de filas y columnas como la disposición física de las teclas. + +```c +#define MATRIX_ROWS 2 +#define MATRIX_COLS 3 +``` + +Una vez que hayas definido el tamaño de tu matriz, necesitas definir qué pines en tu MCU están conectados a filas y columnas. Para hacerlo simplemente especifica los nombres de esos pines: + +```c +#define MATRIX_ROW_PINS { D0, D5 } +#define MATRIX_COL_PINS { F1, F0, B0 } +#define UNUSED_PINS +``` + +El número de entradas debe ser el mismo que el número que asignaste a `MATRIX_ROWS`, y del mismo modo para `MATRIX_COL_PINS` y `MATRIX_COLS`. No tienes que especificar `UNUSED_PINS`, pero puedes si deseas documentar qué pines están abiertos. + +Finalmente, puedes especificar la dirección en la que apuntan tus diodos. Esto puede ser `COL2ROW` o `ROW2COL`. + +```c +#define DIODE_DIRECTION COL2ROW +``` + +#### Matriz de patas directas +Para configurar un teclado en el que cada interruptor está conectado a un pin y tierra separados en lugar de compartir los pines de fila y columna, usa `DIRECT_PINS`. La asignación define los pines de cada interruptor en filas y columnas, de izquierda a derecha. Debe ajustarse a los tamaños dentro de `MATRIX_ROWS` y `MATRIX_COLS`. Usa `NO_PIN` para rellenar espacios en blanco. Sobreescribe el comportamiento de `DIODE_DIRECTION`, `MATRIX_ROW_PINS` y `MATRIX_COL_PINS`. + +```c +// #define MATRIX_ROW_PINS { D0, D5 } +// #define MATRIX_COL_PINS { F1, F0, B0 } +#define DIRECT_PINS { \ + { F1, E6, B0, B2, B3 }, \ + { F5, F0, B1, B7, D2 }, \ + { F6, F7, C7, D5, D3 }, \ + { B5, C6, B6, NO_PIN, NO_PIN } \ +} +#define UNUSED_PINS + +/* COL2ROW, ROW2COL */ +//#define DIODE_DIRECTION +``` + +### Configuración de retroiluminación + +QMK soporta retroiluminación en la mayoría de los pines GPIO. Algunos de ellos pueden ser manejados por el MCU en hardware. Para más detalles, consulta la [Documentación de Retroiluminación](feature_backlight.md). + +```c +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_LEVELS 3 +#define BACKLIGHT_BREATHING +#define BREATHING_PERIOD 6 +``` + +### Otras opciones de configuración + +Hay un montón de características que se pueden configurar o ajustar en `config.h`. Debes consultar la página de [Opciones de Configuración](config_options.md) para más detalles. + +## `rules.mk` + +Usa el archivo `rules.mk` para decirle a QMK qué archivos construir y qué características habilitar. Si estás construyendo sobre un atmega32u4 deberías poder dejar mayormente los valores predeterminados. Si estás usando otro MCU es posible que tengas que ajustar algunos parámetros. + +### Opciones MCU + +Estas opciones le indican al sistema de compilación para qué CPU construir. Ten mucho cuidado si cambias cualquiera de estos ajustes. Puedes inutilizar tu teclado. + +```make +MCU = atmega32u4 +F_CPU = 16000000 +ARCH = AVR8 +F_USB = $(F_CPU) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT +``` + +### Gestores de arranque + +El gestor de arranque es una sección especial de tu MCU que te permite actualizar el código almacenado en el MCU. Piensa en ello como una partición de rescate para tu teclado. + +#### Ejemplo de gestor de arranque + +```make +BOOTLOADER = halfkay +``` + +#### Ejemplo de cargador DFU Atmel + +```make +BOOTLOADER = atmel-dfu +``` + +#### Ejemplo de gestor de arranque Pro Micro + +```make +BOOTLOADER = caterina +``` + +### Opciones de construcción + +Hay un serie de características que se pueden activar o desactivar en `rules.mk`. Consulta la página de [Opciones de Configuración](config_options.md#feature-options) para obtener una lista detallada y una descripción. diff --git a/docs/es/hardware_drivers.md b/docs/es/hardware_drivers.md new file mode 100644 index 000000000000..7b74b34b456b --- /dev/null +++ b/docs/es/hardware_drivers.md @@ -0,0 +1,36 @@ +# Controladores de hardware QMK + +QMK se utiliza en un montón de hardware diferente. Mientras que el soporte para los MCUs y las configuraciones de matriz más comunes está integrado, hay una serie de controladores que se pueden añadir para soportar hardware adicional al teclado. Los ejemplos incluyen ratones y otros dispositivos de apuntamiento, extensores de i/o para teclados divididos, modúlos Bluetooth, y pantallas LCD, OLED y TFT. + + + +# Controladores disponibles + +## ProMicro (Solo AVR) + +Soporte para direccionar pines en el ProMicro por su nombre Arduino en lugar de su nombre AVR. Esto necesita ser mejor documentado. Si estás tratando de hacer esto y leer el código no ayuda por favor [abre una issue](/~https://github.com/qmk/qmk_firmware/issues/new) y podemos ayudarte por el proceso. + +## Controlador OLED SSD1306 + +Soporte para pantallas OLED basadas en SSD1306. Para obtener más información consulta la página de [Característica de Controlador OLED](feature_oled_driver.md). + +## uGFX + +Puedes hacer uso de uGFX dentro de QMK para manejar LCDs de caracteres y gráficos, matrices de LED, OLED, TFT, y otras tecnologías de visualización. Esto necesita ser mejor documentado. Si estás tratando de hacer esto y leer el código no ayuda por favor [abre una issue](/~https://github.com/qmk/qmk_firmware/issues/new) y podemos ayudarte por el proceso. + +## WS2812 (Solo AVR) + +Soporte para LEDs WS2811/WS2812{a,b,c}. Para obtener más información consulta la página de [Luz RGB](feature_rgblight.md). + +## IS31FL3731 + +Soporte para hasta 2 controladores. Cada controlador implementa 2 matrices charlieplex para direccionar LEDs individualmente usando I2C. Esto permite hasta 144 LEDs del mismo color o 32 LEDs RGB. Para obtener más información sobre cómo configurar el controlador, consulta la página de [Matriz RGB](feature_rgb_matrix.md). + +## IS31FL3733 + +Soporte para hasta un solo controlador con espacio para expansión. Cada controlador puede controlar 192 LEDs individuales o 64 LEDs RGB. Para obtener más información sobre cómo configurar el controlador, consulta la página de [Matriz RGB](feature_rgb_matrix.md). + diff --git a/docs/es/hardware_keyboard_guidelines.md b/docs/es/hardware_keyboard_guidelines.md new file mode 100644 index 000000000000..2cde2b39fb7d --- /dev/null +++ b/docs/es/hardware_keyboard_guidelines.md @@ -0,0 +1,149 @@ +# Pautas del teclado QMK + +Desde sus inicios, QMK ha crecido a pasos agigantados gracias a personas como tú que contribuyes a la creación y mantenimiento de nuestros teclados comunitarios. A medida que hemos crecido hemos descubierto algunos patrones que funcionan bien, y pedimos que te ajustes a ellos para que sea más fácil para que otras personas se beneficien de tu duro trabajo. + + +## Nombrar tu Teclado/Proyecto + +Todos los nombres de teclado están en minúsculas, consistiendo sólo de letras, números y guiones bajos (`_`). Los nombres no pueden comenzar con un guión bajo. La barra de desplazamiento (`/`) se utiliza como un carácter de separación de subcarpetas. + +Los nombres `test`, `keyboard`, y `all` están reservados para las órdenes de make y no pueden ser usados como un nombre de teclado o subcarpeta. + +Ejemplos Válidos: + +* `412_64` +* `chimera_ortho` +* `clueboard/66/rev3` +* `planck` +* `v60_type_r` + +## Subcarpetas + +QMK utiliza subcarpetas tanto para organización como para compartir código entre las revisiones del mismo teclado. Puedes anidar carpetas hasta 4 niveles de profundidad: + + qmk_firmware/keyboards/top_folder/sub_1/sub_2/sub_3/sub_4 + +Si una subcarpeta tiene un archivo `rules.mk` será considerado un teclado compilable. Estará disponible en el configurador de QMK y se probará con `make all`. Si estás utilizando una carpeta para organizar varios teclados del mismo fabricante no debes tener un archivo `rules.mk`. + +Ejemplo: + +Clueboard utiliza subcarpetas para ambos propósitos: organización y revisiones de teclado. + +* [`qmk_firmware`](/~https://github.com/qmk/qmk_firmware/tree/master) + * [`keyboards`](/~https://github.com/qmk/qmk_firmware/tree/master/keyboards) + * [`clueboard`](/~https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard) ← This is the organization folder, there's no `rules.mk` file + * [`60`](/~https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/60) ← This is a compilable keyboard, it has a `rules.mk` file + * [`66`](/~https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/66) ← This is also compilable- it uses `DEFAULT_FOLDER` to specify `rev3` as the default revision + * [`rev1`](/~https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/66/rev1) ← compilable: `make clueboard/66/rev1` + * [`rev2`](/~https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/66/rev2) ← compilable: `make clueboard/66/rev2` + * [`rev3`](/~https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/66/rev3) ← compilable: `make clueboard/66/rev3` or `make clueboard/66` + +## Estructura de carpetas de teclado + +Su teclado debe estar ubicado en `qmk_firm cuidada/keyboards/` y el nombre de la carpeta debe ser el nombre de su teclado como se describe en la sección anterior. Dentro de esta carpeta debe haber varios archivos: + +* `readme.md` +* `info.json` +* `config.h` +* `rules.mk` +* `.c` +* `.h` + +### `readme.md` + +Todos los proyectos necesitan tener un archivo `readme.md` que explica lo que es el teclado, quién lo hizo y dónde está disponible. Si es aplicable, también debe contener enlaces a más información, como el sitio web del fabricante. Por favor, sigue la [plantilla publicada](documentation_templates.md#keyboard-readmemd-template). + +### `info.json` + +Este archivo es utilizado por la [API de QMK](/~https://github.com/qmk/qmk_api). Contiene la información que [configurador de QMK](https://config.qmk.fm/) necesita mostrar en una representación de su teclado. También puede establecer metadatos aquí. Para más información, consulta la [página de referencia](reference_info_json.md). + +### `config.h` + +Todos los proyectos necesitan tener un archivo `config.h` que establece cosas como el tamaño de la matriz, nombre del producto, USB VID/PID, descripción y otros ajustes. En general, usa este archivo para establecer la información esencial y los valores predeterminados para tu teclado que siempre funcionarán. + +### `rules.mk` + +La presencia de este archivo indica que la carpeta es un destino de teclado y se puede utilizar en las órdenes `make`. Aquí es donde estableces el entorno de compilación para tu teclado y configuras el conjunto predeterminado de características. + +### `` + +Aquí es donde escribirás código personalizado para tu teclado. Típicamente escribirás código para inicializar e interactuar con el hardware de tu teclado. Si tu teclado se compone de sólo una matriz de teclas sin LEDs, altavoces u otro hardware auxiliar este archivo puede estar en blanco. + +Las funciones siguientes se definen típicamente en este archivo: + +* `void matrix_init_kb(void)` +* `void matrix_scan_kb(void)` +* `bool process_record_kb(uint16_t keycode, keyrecord_t *record)` +* `void led_set_kb(uint8_t usb_led)` + +### `` + +Este archivo se utiliza para definir la matriz para tu teclado. Debes definir al menos un macro de C que traduce una serie en una matriz que representa la matriz de interruptor físico para tu teclado. Si es posible construir tu teclado con múltiples diseños debes definir macros adicionales. + +Si solo tienes un diseño debes llamar a esta macro `LAYOUT`. + +Al definir diseños múltiples debes tener un diseño base, llamado `LAYOUT_all`, que soporte todas las posibles posiciones de switch en tu matriz, incluso si ese diseño es imposible de construir físicamente. Esta es la macro que deberías usar en tu keymap `predeterminado`. Debes tener keymaps adicionales llamados `default_ término layout>` que usen tus otras macros de diseño. Esto hará que sea más fácil para las personas utilizar los diseños que defines. + +Los nombres de las macros de diseño son completamente minúsculas, excepto por la palabra `LAYOUT` en el frente. + +Por ejemplo, si tienes un PCB de 60% que soporta ANSI e ISO podría definir los siguientes diseños y keymaps: + +| Nombre de diseño | Nombre de keymap | Descripción | +|-------------|-------------|-------------| +| LAYOUT_all | default | Un diseño que soporta tanto ISO como ANSI | +| LAYOUT_ansi | default_ansi | Un diseño ANSI | +| LAYOUT_iso | default_iso | Un diseño ISO | + +## Archivos de Imagen/Hardware + +En un esfuerzo por mantener el tamaño de repo abajo ya no estamos aceptando archivos binarios de cualquier formato, con pocas excepciones. Alojarlos en otro lugar (por ejemplo ) y enlazarlos en el `readme.md` es preferible. + +Para archivos de hardware (tales como placas, casos, pcb) puedes contribuir a [qmk.fm repo](/~https://github.com/qmk/qmk.fm) y estarán disponibles en [qmk.fm](http://qmk.fm). Archivos descargables se almacenan en `//` (nombre sigue el mismo formato que el anterior), se sirven en `http://qmk.fm//`, y se generan páginas de `/_pages//` que se sirven en la misma ubicación (Los archivos .md se generan en archivos .html mediante Jekyll). Echa un vistazo a la carpeta `lets_split` para ver un ejemplo. + +## Predeterminados de teclado + +Dada la cantidad de funcionalidad que expone QMK, es muy fácil confundir a los nuevos usuarios. Al armar el firmware predeterminado para tu teclado, te recomendamos limitar tus funciones y opciones habilitadas al conjunto mínimo necesario para soportar tu hardware. A continuación se formulan recomendaciones sobre características específicas. + +### Bootmagic y Command + +[Bootmagic](feature_bootmagic.md) and [Command](feature_command.md) son dos características relacionadas que permiten a un usuario controlar su teclado de manera no obvia. Te recomendamos que piense largo y tendido acerca de si vas a habilitar cualquiera de las características, y cómo vas a exponer esta funcionalidad. Tengas en cuenta que los usuarios que quieren esta funcionalidad puede habilitarla en sus keymaps personales sin afectar a todos los usuarios novatos que pueden estar usando tu teclado como su primera tarjeta programable. + +De lejos el problema más común con el que se encuentran los nuevos usuarios es la activación accidental de Bootmagic mientras están conectando su teclado. Están sosteniendo el teclado por la parte inferior, presionando sin saberlo en alt y barra espaciadora, y luego se dan cuenta de que estas teclas han sido intercambiadas en ellos. Recomendamos dejar esta característica deshabilitada de forma predeterminada, pero si la activas consideres establecer la opción `BOOTMAGIC_KEY_SALT` a una tecla que es difícil de presionar al conectar el teclado. + +Si tu teclado no tiene 2 teclas de cambio debes proporcionar un predeterminado de trabajo para `IS_COMMAND`, incluso cuando haya definido `COMMAND_ENABLE = no`. Esto dará a sus usuarios un valor predeterminado para ajustarse a si lo hacen enable Command. + +## Programación de teclado personalizado + +Como se documenta en [Funcionalidad de Adaptación](custom_quantum_functions.md) puedes definir funciones personalizadas para tu teclado. Por favor, tengas en cuenta que sus usuarios pueden querer personalizar ese comportamiento así, y hacer que sea posible para que puedan hacer eso. Si está proporcionando una función personalizada, por ejemplo `process_record_kb()`, asegúrese de que su función también llame a la versión` `_user()` de la llamada. También debes tener en cuenta el valor de retorno de la versión `_user()`, y ejecutar sólo tu código personalizado si el usuario devuelve `true`. + +## Proyectos Sin Producción/Conectados A Mano + +Estamos encantados de aceptar cualquier proyecto que utilice QMK, incluidos los prototipos y los cableados de mano, pero tenemos una carpeta `/keyboards/handwired/` separada para ellos, por lo que la carpeta `/keyboards/` principal no se llena. Si un proyecto prototipo se convierte en un proyecto de producción en algún momento en el futuro, ¡estaremos encantados de moverlo a la carpeta `/keyboards/` principal! + +## Advertencias como errores + +Al desarrollar su teclado, tengas en cuenta que todas las advertencias serán tratadas como errores - estas pequeñas advertencias pueden acumularse y causar errores más grandes en el camino (y pierdan es generalmente una mala práctica). + +## Derechos de autor + +Si estás adaptando la configuración de tu teclado de otro proyecto, pero no utilizando el mismo código, asegúrese de actualizar la cabecera de derechos de autor en la parte superior de los archivos para mostrar tu nombre, en este formato: + + Copyright 2017 Tu nombre + +Si estás modificando el código de otra persona y sólo ha hecho cambios triviales debes dejar su nombre en la declaración de derechos de autor. Si has hecho un trabajo significativo en el archivo debe agregar tu nombre a la de ellos, así: + + Copyright 2017 Su nombre Tu nombre + +El año debe ser el primer año en que se crea el archivo. Si el trabajo se hizo a ese archivo en años posteriores puedes reflejar que mediante la adición del segundo año a la primera, como así: + + Copyright 2015-2017 Tu nombre + +## Licencia + +El núcleo de QMC está licenciado bajo la [GNU General Public License](https://www.gnu.org/licenses/licenses.en.html). Si estás enviando binarios para los procesadores AVR puedes elegir cualquiera [GPLv2](https://www.gnu.org/licenses/old-licenses/gpl-2.0.html) o [GPLv3](https://www.gnu.org/licenses/gpl.html). Si estás enviando binarios para ARM procesadores debes elegir [GPL Versión 3](https://www.gnu.org/licenses/gpl.html) para cumplir con los [ChibiOS](http://www.chibios.org) licencia GPLv3. + +Si tu teclado hace uso de la [uGFX](https://gfx.io) características dentro de QMK debes cumplir con la [Licencia de uGFX](https://ugfx.io/license.html), que requiere una licencia comercial separada antes de vender un dispositivo que contiene uGFX. + +## Detalles técnicos + +Si estás buscando más información sobre cómo hacer que su teclado funcione con QMK, [echa un vistazo a la sección hardware](hardware.md)! From 77861fcbc0d363368e5d4b057e0f5b035c66ea62 Mon Sep 17 00:00:00 2001 From: Josh Hinnebusch Date: Thu, 31 Oct 2019 17:05:48 -0400 Subject: [PATCH 242/316] [Keyboard] Add hbcp (#7101) * add initial hbcp files * adjust hbcp keymaps * update per PR requested changes * add info.json * update LED stuff in regards to my personal keymap * update to new LED pin manipulation code * update info.json * Update keyboards/hineybush/hbcp/hbcp.c Co-Authored-By: fauxpark * Update keyboards/hineybush/hbcp/hbcp.c Co-Authored-By: fauxpark * Update keyboards/hineybush/hbcp/hbcp.c Co-Authored-By: fauxpark * Update keyboards/hineybush/hbcp/hbcp.c Co-Authored-By: fauxpark * Update keyboards/hineybush/hbcp/readme.md Co-Authored-By: fauxpark * Update keyboards/hineybush/hbcp/rules.mk Co-Authored-By: fauxpark * Update keyboards/hineybush/hbcp/rules.mk Co-Authored-By: fauxpark * Update keyboards/hineybush/hbcp/rules.mk Co-Authored-By: fauxpark * Update keyboards/hineybush/hbcp/rules.mk Co-Authored-By: fauxpark * Update keyboards/hineybush/hbcp/rules.mk Co-Authored-By: fauxpark * Update keyboards/hineybush/hbcp/rules.mk Co-Authored-By: fauxpark * Update keyboards/hineybush/hbcp/rules.mk Co-Authored-By: fauxpark * Update keyboards/hineybush/hbcp/rules.mk Co-Authored-By: fauxpark * Update keyboards/hineybush/hbcp/hbcp.c Co-Authored-By: Joel Challis * Update keyboards/hineybush/hbcp/hbcp.c Co-Authored-By: Joel Challis * update per pull request suggestions * Update keyboards/hineybush/hbcp/hbcp.c Co-Authored-By: Joel Challis * update per PR request, update default keymap * Update keyboards/hineybush/hbcp/keymaps/hiney/keymap.c Co-Authored-By: fauxpark * Update keyboards/hineybush/hbcp/keymaps/hiney/keymap.c Co-Authored-By: fauxpark * Update keyboards/hineybush/hbcp/keymaps/hiney/keymap.c Co-Authored-By: fauxpark * Update keyboards/hineybush/hbcp/info.json Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/hineybush/hbcp/info.json Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/hineybush/hbcp/keymaps/hiney/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * update per PR requests * Update keyboards/hineybush/hbcp/info.json Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * add RGB defs to hiney/config.h --- keyboards/hineybush/hbcp/config.h | 246 ++++++++++++++++++ keyboards/hineybush/hbcp/hbcp.c | 110 ++++++++ keyboards/hineybush/hbcp/hbcp.h | 58 +++++ keyboards/hineybush/hbcp/info.json | 15 ++ .../hineybush/hbcp/keymaps/default/config.h | 19 ++ .../hineybush/hbcp/keymaps/default/keymap.c | 82 ++++++ .../hineybush/hbcp/keymaps/default/readme.md | 1 + .../hineybush/hbcp/keymaps/hiney/config.h | 28 ++ .../hineybush/hbcp/keymaps/hiney/keymap.c | 106 ++++++++ .../hineybush/hbcp/keymaps/hiney/readme.md | 1 + keyboards/hineybush/hbcp/readme.md | 15 ++ keyboards/hineybush/hbcp/rules.mk | 33 +++ 12 files changed, 714 insertions(+) create mode 100644 keyboards/hineybush/hbcp/config.h create mode 100644 keyboards/hineybush/hbcp/hbcp.c create mode 100644 keyboards/hineybush/hbcp/hbcp.h create mode 100644 keyboards/hineybush/hbcp/info.json create mode 100644 keyboards/hineybush/hbcp/keymaps/default/config.h create mode 100644 keyboards/hineybush/hbcp/keymaps/default/keymap.c create mode 100644 keyboards/hineybush/hbcp/keymaps/default/readme.md create mode 100644 keyboards/hineybush/hbcp/keymaps/hiney/config.h create mode 100644 keyboards/hineybush/hbcp/keymaps/hiney/keymap.c create mode 100644 keyboards/hineybush/hbcp/keymaps/hiney/readme.md create mode 100644 keyboards/hineybush/hbcp/readme.md create mode 100644 keyboards/hineybush/hbcp/rules.mk diff --git a/keyboards/hineybush/hbcp/config.h b/keyboards/hineybush/hbcp/config.h new file mode 100644 index 000000000000..5bf426df7ebc --- /dev/null +++ b/keyboards/hineybush/hbcp/config.h @@ -0,0 +1,246 @@ +/* +Copyright 2019 Josh Hinnebusch + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x04D8 +#define PRODUCT_ID 0xECE8 +#define DEVICE_VER 0x0001 +#define MANUFACTURER hineybush keyboards +#define PRODUCT hbcp +#define DESCRIPTION compact 1800 layout custom keyboard + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 18 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { B1, B6, D0, C7, C6, C5 } +#define MATRIX_COL_PINS { F0, F1, F2, F3, F4, F5, F6, F7, A0, A1, A2, A3, A4, A5, B5, B4, B3, B2 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN B0 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 27 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ + /*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * 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 + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/hineybush/hbcp/hbcp.c b/keyboards/hineybush/hbcp/hbcp.c new file mode 100644 index 000000000000..cd5320f6e509 --- /dev/null +++ b/keyboards/hineybush/hbcp/hbcp.c @@ -0,0 +1,110 @@ +/* Copyright 2019 Josh Hinnebusch + * + * 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 . + */ +#include "hbcp.h" + +// Indicator color definitions +#ifndef HSV_CAPS + #define HSV_CAPS 0, 0, 120 // Define caps lock color (H, S, V) +#endif + +#ifndef HSV_NLCK + #define HSV_NLCK 0, 0, 120 // Define num lock color (H, S, V) +#endif + +#ifndef HSV_SCRL + #define HSV_SCRL 0, 0, 120 // Define scroll lock color (H, S, V) +#endif + +#ifndef HSV_BLACK + #define HSV_BLACK 0, 0, 0 // Define 'black' color, more like 'LED off' (H, S, V) +#endif + +// #define HSV_custom_color H, S, V + + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + + +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); +} + +#ifdef RGBLIGHT_ENABLE + +__attribute__ ((weak)) +void led_set_user(uint8_t usb_led) { + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + sethsv_raw(HSV_CAPS, (LED_TYPE *)&led[0]); + } else { + sethsv(HSV_BLACK, (LED_TYPE *)&led[0]); + } + if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { + sethsv_raw(HSV_NLCK, (LED_TYPE *)&led[1]); + } else { + sethsv(HSV_BLACK, (LED_TYPE *)&led[1]); + } + if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { + sethsv_raw(HSV_SCRL, (LED_TYPE *)&led[2]); + } else { + sethsv(HSV_BLACK, (LED_TYPE *)&led[2]); + } + rgblight_set(); +} + +__attribute__ ((weak)) +void keyboard_post_init_user(void) { + rgblight_set_effect_range(3, RGBLED_NUM-3); + led_set_user(_BV(USB_LED_CAPS_LOCK)|_BV(USB_LED_NUM_LOCK)|_BV(USB_LED_SCROLL_LOCK)); + wait_ms(300); + led_set_user(0); +} + +__attribute__ ((weak)) +void hbcp_sethsv_range(uint8_t hue, uint8_t sat, uint8_t val, uint8_t start, uint8_t end) { + LED_TYPE tmp_led; + sethsv_raw(hue, sat, val, &tmp_led); + for (uint8_t i = start; i < end; i++) { + led[i] = tmp_led; + } + rgblight_set(); +} + +#endif diff --git a/keyboards/hineybush/hbcp/hbcp.h b/keyboards/hineybush/hbcp/hbcp.h new file mode 100644 index 000000000000..bb9fcdca1100 --- /dev/null +++ b/keyboards/hineybush/hbcp/hbcp.h @@ -0,0 +1,58 @@ +/* Copyright 2019 Josh Hinnebusch + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_all( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, K317, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K415, K416, K417, \ + K500, K501, K502, K505, K509, K510, K511, K512, K513, K514, K515, K516, K517 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017}, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117}, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217},\ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, K317},\ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K415, K416, K417},\ + { K500, K501, K502, KC_NO, KC_NO, KC_NO, K505, KC_NO, KC_NO, KC_NO, KC_NO,K509, K510, K511, K512, K513, K514, K515, K516, K517 }\ +} + +#define LAYOUT_wkl( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, K015, K016, K017, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K013, K114, K115, K116, K117, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, K316, K317, \ + K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K415, K416, \ + K500, K501, K505, K510, K511, K512, K513, K514, K515, K516, K517 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO, K114, K115, K116, K117 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314, K315, K316, K317 }, \ + { K400, KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K415, K416, KC_NO }, \ + { K500, K501, KC_NO,KC_NO,KC_NO,K505, KC_NO,KC_NO,KC_NO,KC_NO,K510, K511, K512, K513, K514, K515, K516, K517 } \ +} diff --git a/keyboards/hineybush/hbcp/info.json b/keyboards/hineybush/hbcp/info.json new file mode 100644 index 000000000000..54071dff4f09 --- /dev/null +++ b/keyboards/hineybush/hbcp/info.json @@ -0,0 +1,15 @@ +{ + "keyboard_name": "hbcp", + "url": "", + "maintainer": "hineybush", + "width": 22, + "height": 6.75, + "layouts": { + "LAYOUT_all": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1.25, "y":0}, {"label":"F2", "x":2.25, "y":0}, {"label":"F3", "x":3.25, "y":0}, {"label":"F4", "x":4.25, "y":0}, {"label":"F5", "x":5.5, "y":0}, {"label":"F6", "x":6.5, "y":0}, {"label":"F7", "x":7.5, "y":0}, {"label":"F8", "x":8.5, "y":0}, {"label":"F9", "x":9.75, "y":0}, {"label":"F10", "x":10.75, "y":0}, {"label":"F11", "x":11.75, "y":0}, {"label":"F12", "x":12.75, "y":0}, {"label":"PrtSc", "x":15.5, "y":0}, {"label":"Scroll Lock", "x":16.5, "y":0}, {"label":"Pause", "x":17.5, "y":0}, {"label":"PgUp", "x":18.5, "y":0}, {"label":"~", "x":0, "y":1.25}, {"label":"!", "x":1, "y":1.25}, {"label":"@", "x":2, "y":1.25}, {"label":"#", "x":3, "y":1.25}, {"label":"$", "x":4, "y":1.25}, {"label":"%", "x":5, "y":1.25}, {"label":"^", "x":6, "y":1.25}, {"label":"&", "x":7, "y":1.25}, {"label":"*", "x":8, "y":1.25}, {"label":"(", "x":9, "y":1.25}, {"label":")", "x":10, "y":1.25}, {"label":"_", "x":11, "y":1.25}, {"label":"+", "x":12, "y":1.25}, {"x":13, "y":1.25}, {"x":14, "y":1.25}, {"label":"Num Lock", "x":15.5, "y":1.25}, {"label":"/", "x":16.5, "y":1.25}, {"label":"*", "x":17.5, "y":1.25}, {"label":"-", "x":18.5, "y":1.25}, {"label":"Tab", "x":0, "y":2.25, "w":1.5}, {"label":"Q", "x":1.5, "y":2.25}, {"label":"W", "x":2.5, "y":2.25}, {"label":"E", "x":3.5, "y":2.25}, {"label":"R", "x":4.5, "y":2.25}, {"label":"T", "x":5.5, "y":2.25}, {"label":"Y", "x":6.5, "y":2.25}, {"label":"U", "x":7.5, "y":2.25}, {"label":"I", "x":8.5, "y":2.25}, {"label":"O", "x":9.5, "y":2.25}, {"label":"P", "x":10.5, "y":2.25}, {"label":"{", "x":11.5, "y":2.25}, {"label":"}", "x":12.5, "y":2.25}, {"label":"|", "x":13.5, "y":2.25, "w":1.5}, {"label":"7", "x":15.5, "y":2.25}, {"label":"8", "x":16.5, "y":2.25}, {"label":"9", "x":17.5, "y":2.25}, {"x":18.5, "y":2.25}, {"label":"Caps Lock", "x":0, "y":3.25, "w":1.75}, {"label":"A", "x":1.75, "y":3.25}, {"label":"S", "x":2.75, "y":3.25}, {"label":"D", "x":3.75, "y":3.25}, {"label":"F", "x":4.75, "y":3.25}, {"label":"G", "x":5.75, "y":3.25}, {"label":"H", "x":6.75, "y":3.25}, {"label":"J", "x":7.75, "y":3.25}, {"label":"K", "x":8.75, "y":3.25}, {"label":"L", "x":9.75, "y":3.25}, {"label":":", "x":10.75, "y":3.25}, {"label":"\"", "x":11.75, "y":3.25}, {"x":12.75, "y":3.25}, {"label":"Enter", "x":13.75, "y":3.25, "w":1.25}, {"label":"4", "x":15.5, "y":3.25}, {"label":"5", "x":16.5, "y":3.25}, {"label":"6", "x":17.5, "y":3.25}, {"x":18.5, "y":3.25}, {"x":0, "y":4.25, "w":1.25}, {"x":1.25, "y":4.25}, {"label":"Z", "x":2.25, "y":4.25}, {"label":"X", "x":3.25, "y":4.25}, {"label":"C", "x":4.25, "y":4.25}, {"label":"V", "x":5.25, "y":4.25}, {"label":"B", "x":6.25, "y":4.25}, {"label":"N", "x":7.25, "y":4.25}, {"label":"M", "x":8.25, "y":4.25}, {"label":"<", "x":9.25, "y":4.25}, {"label":">", "x":10.25, "y":4.25}, {"label":"?", "x":11.25, "y":4.25}, {"label":"Shift", "x":12.25, "y":4.25, "w":1.75}, {"label":"\u2191", "x":14.25, "y":4.5}, {"label":"1", "x":15.5, "y":4.25}, {"label":"2", "x":16.5, "y":4.25}, {"label":"3", "x":17.5, "y":4.25}, {"x":18.5, "y":4.25}, {"x":0, "y":5.25, "w":1.25}, {"x":1.25, "y":5.25, "w":1.25}, {"x":2.5, "y":5.25, "w":1.25}, {"x":3.75, "y":5.25, "w":6.25}, {"x":10, "y":5.25}, {"x":11, "y":5.25}, {"x":12, "y":5.25}, {"label":"\u2190", "x":13.25, "y":5.5}, {"label":"\u2193", "x":14.25, "y":5.5}, {"label":"\u2192", "x":15.25, "y":5.5}' {"label":"0", "x":16.5, "y":5.25}, {"label":".", "x":17.5, "y":5.25}, {"x":18.5, "y":5.25}] + }, + "LAYOUT_wkl": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1.25, "y":0}, {"label":"F2", "x":2.25, "y":0}, {"label":"F3", "x":3.25, "y":0}, {"label":"F4", "x":4.25, "y":0}, {"label":"F5", "x":5.5, "y":0}, {"label":"F6", "x":6.5, "y":0}, {"label":"F7", "x":7.5, "y":0}, {"label":"F8", "x":8.5, "y":0}, {"label":"F9", "x":9.75, "y":0}, {"label":"F10", "x":10.75, "y":0}, {"label":"F11", "x":11.75, "y":0}, {"label":"F12", "x":12.75, "y":0}, {"label":"PrtSc", "x":15.5, "y":0}, {"label":"Scroll Lock", "x":16.5, "y":0}, {"label":"Pause", "x":17.5, "y":0}, {"label":"PgUp", "x":18.5, "y":0}, {"label":"~", "x":0, "y":1.25}, {"label":"!", "x":1, "y":1.25}, {"label":"@", "x":2, "y":1.25}, {"label":"#", "x":3, "y":1.25}, {"label":"$", "x":4, "y":1.25}, {"label":"%", "x":5, "y":1.25}, {"label":"^", "x":6, "y":1.25}, {"label":"&", "x":7, "y":1.25}, {"label":"*", "x":8, "y":1.25}, {"label":"(", "x":9, "y":1.25}, {"label":")", "x":10, "y":1.25}, {"label":"_", "x":11, "y":1.25}, {"label":"+", "x":12, "y":1.25}, {"label":"Backspace", "x":13, "y":1.25, "w":2}, {"label":"Num Lock", "x":15.5, "y":1.25}, {"label":"/", "x":16.5, "y":1.25}, {"label":"*", "x":17.5, "y":1.25}, {"label":"-", "x":18.5, "y":1.25}, {"label":"Tab", "x":0, "y":2.25, "w":1.5}, {"label":"Q", "x":1.5, "y":2.25}, {"label":"W", "x":2.5, "y":2.25}, {"label":"E", "x":3.5, "y":2.25}, {"label":"R", "x":4.5, "y":2.25}, {"label":"T", "x":5.5, "y":2.25}, {"label":"Y", "x":6.5, "y":2.25}, {"label":"U", "x":7.5, "y":2.25}, {"label":"I", "x":8.5, "y":2.25}, {"label":"O", "x":9.5, "y":2.25}, {"label":"P", "x":10.5, "y":2.25}, {"label":"{", "x":11.5, "y":2.25}, {"label":"}", "x":12.5, "y":2.25}, {"label":"|", "x":13.5, "y":2.25, "w":1.5}, {"label":"7", "x":15.5, "y":2.25}, {"label":"8", "x":16.5, "y":2.25}, {"label":"9", "x":17.5, "y":2.25}, {"x":18.5, "y":2.25}, {"label":"Caps Lock", "x":0, "y":3.25, "w":1.75}, {"label":"A", "x":1.75, "y":3.25}, {"label":"S", "x":2.75, "y":3.25}, {"label":"D", "x":3.75, "y":3.25}, {"label":"F", "x":4.75, "y":3.25}, {"label":"G", "x":5.75, "y":3.25}, {"label":"H", "x":6.75, "y":3.25}, {"label":"J", "x":7.75, "y":3.25}, {"label":"K", "x":8.75, "y":3.25}, {"label":"L", "x":9.75, "y":3.25}, {"label":":", "x":10.75, "y":3.25}, {"label":"\"", "x":11.75, "y":3.25}, {"label":"Enter", "x":12.75, "y":3.25, "w":2.25}, {"label":"4", "x":15.5, "y":3.25}, {"label":"5", "x":16.5, "y":3.25}, {"label":"6", "x":17.5, "y":3.25}, {"x":18.5, "y":3.25}, {"label":"Shift", "x":0, "y":4.25, "w":2.25}, {"label":"Z", "x":2.25, "y":4.25}, {"label":"X", "x":3.25, "y":4.25}, {"label":"C", "x":4.25, "y":4.25}, {"label":"V", "x":5.25, "y":4.25}, {"label":"B", "x":6.25, "y":4.25}, {"label":"N", "x":7.25, "y":4.25}, {"label":"M", "x":8.25, "y":4.25}, {"label":"<", "x":9.25, "y":4.25}, {"label":">", "x":10.25, "y":4.25}, {"label":"?", "x":11.25, "y":4.25}, {"label":"Shift", "x":12.25, "y":4.25, "w":1.75}, {"label":"\u2191", "x":14.25, "y":4.5}, {"label":"1", "x":15.5, "y":4.25}, {"label":"2", "x":16.5, "y":4.25}, {"label":"3", "x":17.5, "y":4.25}, {"label":"Enter", "x":18.5, "y":4.25, "h":2}, {"label":"Ctrl", "x":0, "y":5.25, "w":1.5}, {"label":"Alt", "x":1.5, "y":5.25, "w":1.5}, {"x":3, "y":5.25, "w":7}, {"label":"Alt", "x":10, "y":5.25, "w":1.5}, {"label":"Win", "x":11.5, "y":5.25, "w":1.5}, {"label":"\u2190", "x":13.25, "y":5.5}, {"label":"\u2193", "x":14.25, "y":5.5}, {"label":"\u2192", "x":15.25, "y":5.5}, {"label":"0", "x":16.5, "y":5.25}, {"label":".", "x":17.5, "y":5.25}] + } + } +} diff --git a/keyboards/hineybush/hbcp/keymaps/default/config.h b/keyboards/hineybush/hbcp/keymaps/default/config.h new file mode 100644 index 000000000000..89865cef3527 --- /dev/null +++ b/keyboards/hineybush/hbcp/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 hineybush + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/hineybush/hbcp/keymaps/default/keymap.c b/keyboards/hineybush/hbcp/keymaps/default/keymap.c new file mode 100644 index 000000000000..09d5b6b33cdf --- /dev/null +++ b/keyboards/hineybush/hbcp/keymaps/default/keymap.c @@ -0,0 +1,82 @@ +/* Copyright 2019 hineybush + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_wkl( /* Base */ + + /*K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, K015, K016, K017, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K013, K114, K115, K116, K117, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, K316, K317, \ + K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K415, K416, \ + K500, K501, K505, K510, K511, K512, K513, K514, K515, K516, K517 \*/ + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_INS, KC_PGUP, KC_PGDN, + 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_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, + 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_PMNS, + 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_P4, KC_P5, KC_P6, KC_PPLS, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, KC_P1, KC_P2, KC_P3, + KC_LCTL, KC_LALT, KC_SPC, MO(1), KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT + + ), + + [1] = LAYOUT_wkl( + KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK,KC_HOME, KC_END, + KC_TRNS, KC_TRNS, 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_HUD, RGB_HUI,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, RGB_SAD, RGB_SAI,KC_TRNS, KC_TRNS, + KC_TRNS, 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_VAD, 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, KC_VOLU, RGB_TOG, RGB_MOD,KC_TRNS, + KC_TRNS, KC_TRNS, KC_MPLY, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT, KC_TRNS,KC_TRNS, KC_TRNS + + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMKBEST: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + SEND_STRING("QMK is the best thing ever!"); + } else { + // when keycode QMKBEST is released + } + break; + case QMKURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} diff --git a/keyboards/hineybush/hbcp/keymaps/default/readme.md b/keyboards/hineybush/hbcp/keymaps/default/readme.md new file mode 100644 index 000000000000..becc5829b8db --- /dev/null +++ b/keyboards/hineybush/hbcp/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for hbcp \ No newline at end of file diff --git a/keyboards/hineybush/hbcp/keymaps/hiney/config.h b/keyboards/hineybush/hbcp/keymaps/hiney/config.h new file mode 100644 index 000000000000..2d8bbf3a7335 --- /dev/null +++ b/keyboards/hineybush/hbcp/keymaps/hiney/config.h @@ -0,0 +1,28 @@ +/* Copyright 2019 Josh Hinnebusch + * + * 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 . + */ + +#pragma once + +// place overrides here + +#ifndef HSV_SOFT_PINK + #define HSV_SOFT_PINK 255, 110, 100 // Define custom "soft pink" color +#endif + +#ifndef HSV_BLACK + #define HSV_BLACK 0, 0, 0 // Define 'black' color, more like 'LED off' (H, S, V) +#endif +// not sure why i need to also define this here, as it is already in hbcp.h diff --git a/keyboards/hineybush/hbcp/keymaps/hiney/keymap.c b/keyboards/hineybush/hbcp/keymaps/hiney/keymap.c new file mode 100644 index 000000000000..c3186cbc438e --- /dev/null +++ b/keyboards/hineybush/hbcp/keymaps/hiney/keymap.c @@ -0,0 +1,106 @@ +/* Copyright 2019 Josh Hinnebusch + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + ALTCUT, + QMKURL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_wkl( /* Base */ + + /*K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, K015, K016, K017, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K013, K114, K115, K116, K117, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, K316, K317, \ + K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K415, K416, \ + K500, K501, K505, K510, K511, K512, K513, K514, K515, K516, K517 \*/ + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_INS, KC_PGUP, KC_PGDN, + 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_BSPC, KC_LNUM, KC_PSLS, KC_PAST, KC_PAUS, + 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_PMNS, + KC_LGUI, 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_P4, KC_P5, KC_P6, KC_PPLS, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, KC_P1, KC_P2, KC_P3, + KC_LCTL, KC_LALT, KC_SPC, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT + + ), + + [1] = LAYOUT_wkl( + KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK,KC_HOME, KC_END, + KC_TRNS, KC_TRNS, 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_HUD, RGB_HUI,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, RGB_SAD, RGB_SAI,KC_TRNS, KC_TRNS, + KC_CAPS, 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_VAD, 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, KC_VOLU, RGB_TOG, RGB_MOD,KC_TRNS, + KC_TRNS, KC_TRNS, KC_MPLY, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT, KC_TRNS,KC_TRNS, KC_TRNS + + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case ALTCUT: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + send_string_with_delay_P(PSTR(SS_TAP(X_TAB)SS_TAP(X_T)SS_TAP(X_V)SS_TAP(X_B)), 20); // altium macro + } else { + // when keycode QMKBEST is released + } + break; + case QMKURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +#ifdef RGBLIGHT_ENABLE +// The first three LEDs are used as indicators for CAPS_LOCK, NUM_LOCK and SCROLL_LOCK. +void led_set_user(uint8_t usb_led) { + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + sethsv_raw(HSV_SOFT_PINK, (LED_TYPE *)&led[0]); + } else { + sethsv(HSV_BLACK, (LED_TYPE *)&led[0]); + } + if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { + sethsv_raw(HSV_SOFT_PINK, (LED_TYPE *)&led[1]); + } else { + sethsv(HSV_BLACK, (LED_TYPE *)&led[1]); + } + if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { + sethsv_raw(HSV_SOFT_PINK, (LED_TYPE *)&led[2]); + } else { + sethsv(HSV_BLACK, (LED_TYPE *)&led[2]); + } + rgblight_set(); +} + +#endif diff --git a/keyboards/hineybush/hbcp/keymaps/hiney/readme.md b/keyboards/hineybush/hbcp/keymaps/hiney/readme.md new file mode 100644 index 000000000000..2829d4b5bad7 --- /dev/null +++ b/keyboards/hineybush/hbcp/keymaps/hiney/readme.md @@ -0,0 +1 @@ +# hineybush's keymap for hbcp diff --git a/keyboards/hineybush/hbcp/readme.md b/keyboards/hineybush/hbcp/readme.md new file mode 100644 index 000000000000..712339413c38 --- /dev/null +++ b/keyboards/hineybush/hbcp/readme.md @@ -0,0 +1,15 @@ +# hbcp + +![hbcp](https://i.imgur.com/27Vkolf.png) + +A custom compact-1800 layout keyboard. + +Keyboard Maintainer: [hineybush](/~https://github.com/hineybush) +Hardware Supported: HBCP PCB featuring an AT90USB1286 +Hardware Availability: Group buy only + +Make example for this keyboard (after setting up your build environment): + + make hineybush/hbcp:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/hineybush/hbcp/rules.mk b/keyboards/hineybush/hbcp/rules.mk new file mode 100644 index 000000000000..fa31c9e0019e --- /dev/null +++ b/keyboards/hineybush/hbcp/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = at90usb1286 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs From aba90329b2b88c892a81c35761ff4c428003f0f9 Mon Sep 17 00:00:00 2001 From: Josh Hinnebusch Date: Thu, 31 Oct 2019 17:14:37 -0400 Subject: [PATCH 243/316] [Keyboard] Add h88 PCB (#7201) * add initial h88 files * add h88 PCB * update VID and PID * add GUI key to base WKL keymap file * Update keyboards/hineybush/h88/config.h Co-Authored-By: Drashna Jaelre * Update keyboards/hineybush/h88/config.h Co-Authored-By: Drashna Jaelre * Update keyboards/hineybush/h88/config.h Co-Authored-By: Drashna Jaelre * Update keyboards/hineybush/h88/rules.mk Co-Authored-By: Drashna Jaelre * Update keyboards/hineybush/h88/rules.mk Co-Authored-By: Drashna Jaelre * Update keyboards/hineybush/h88/info.json Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/hineybush/h88/info.json Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/hineybush/h88/info.json Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/hineybush/h88/info.json Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/hineybush/h88/keymaps/default/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/hineybush/h88/keymaps/wkl/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/hineybush/h88/info.json Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/hineybush/h88/rules.mk Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * update per PR requests * update copyright year in files --- keyboards/hineybush/h88/config.h | 78 ++++++++++++++++ keyboards/hineybush/h88/h88.c | 69 ++++++++++++++ keyboards/hineybush/h88/h88.h | 90 +++++++++++++++++++ keyboards/hineybush/h88/info.json | 20 +++++ .../hineybush/h88/keymaps/default/config.h | 21 +++++ .../hineybush/h88/keymaps/default/keymap.c | 50 +++++++++++ .../hineybush/h88/keymaps/default/readme.md | 1 + keyboards/hineybush/h88/keymaps/wkl/config.h | 21 +++++ keyboards/hineybush/h88/keymaps/wkl/keymap.c | 49 ++++++++++ keyboards/hineybush/h88/keymaps/wkl/readme.md | 1 + keyboards/hineybush/h88/readme.md | 40 +++++++++ keyboards/hineybush/h88/rules.mk | 33 +++++++ 12 files changed, 473 insertions(+) create mode 100644 keyboards/hineybush/h88/config.h create mode 100644 keyboards/hineybush/h88/h88.c create mode 100644 keyboards/hineybush/h88/h88.h create mode 100644 keyboards/hineybush/h88/info.json create mode 100644 keyboards/hineybush/h88/keymaps/default/config.h create mode 100644 keyboards/hineybush/h88/keymaps/default/keymap.c create mode 100644 keyboards/hineybush/h88/keymaps/default/readme.md create mode 100644 keyboards/hineybush/h88/keymaps/wkl/config.h create mode 100644 keyboards/hineybush/h88/keymaps/wkl/keymap.c create mode 100644 keyboards/hineybush/h88/keymaps/wkl/readme.md create mode 100644 keyboards/hineybush/h88/readme.md create mode 100644 keyboards/hineybush/h88/rules.mk diff --git a/keyboards/hineybush/h88/config.h b/keyboards/hineybush/h88/config.h new file mode 100644 index 000000000000..26d5189eb38b --- /dev/null +++ b/keyboards/hineybush/h88/config.h @@ -0,0 +1,78 @@ +/* +Copyright 2019 Josh Hinnebusch + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x04D8 +#define PRODUCT_ID 0xECA2 +#define DEVICE_VER 0x0001 +#define MANUFACTURER hineybush keyboards +#define PRODUCT h88 +#define DESCRIPTION QMK-programmable TKL PCB for custom keyboards with an extra key in the F-row + + + +/* key matrix size */ +#define MATRIX_ROWS 12 +#define MATRIX_COLS 9 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { B0, B1, B2, B3, D0, D1, B5, B6, D7, B4, D6, D4 } +#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, C6, D2 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + +#define RGB_DI_PIN D3 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 24 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#define RGBLIGHT_SLEEP // RGB will turn off when PC is put to sleep +#endif diff --git a/keyboards/hineybush/h88/h88.c b/keyboards/hineybush/h88/h88.c new file mode 100644 index 000000000000..46d6393907f3 --- /dev/null +++ b/keyboards/hineybush/h88/h88.c @@ -0,0 +1,69 @@ +/* Copyright 2019 Josh Hinnebusch + * + * 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 . + */ +#include "h88.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); +} + +void led_init_ports(void) { + setPinOutput(D5); + setPinOutput(E6); +} + +void led_set_user(uint8_t usb_led) { + + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + setPinOutput(D5); + writePinLow(D5); + } else { + setPinInput(D5); + writePinLow(D5); + } + + if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { + setPinOutput(E6); + writePinLow(E6); + } else { + setPinInput(E6); + writePinLow(E6); + } + +} + diff --git a/keyboards/hineybush/h88/h88.h b/keyboards/hineybush/h88/h88.h new file mode 100644 index 000000000000..f701529d181f --- /dev/null +++ b/keyboards/hineybush/h88/h88.h @@ -0,0 +1,90 @@ +/* Copyright 2019 Josh Hinnebusch + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +// This a shortcut to help you visually see your layout. +// The following is an example using the Planck MIT layout +// The first section contains all of the arguments +// The second converts the arguments into a two-dimensional array +#define LAYOUT_all(\ + K000, K010, K001, K011, K002, K012, K003, K013, K004, K014, K015, K006, K016, K007, K017, K008, K018, \ + K020, K030, K021, K031, K022, K032, K023, K033, K024, K034, K025, K035, K026, K036, K027, K037, K028, K038, \ + K040, K050, K041, K051, K042, K052, K043, K053, K044, K054, K045, K055, K046, K056, K057, K048, K058, \ + K060, K070, K061, K071, K062, K072, K063, K073, K064, K074, K065, K075, K066, K076, \ + K080, K090, K081, K091, K082, K092, K083, K093, K084, K094, K085, K095, K086, K096, K088, \ + K100, K110, K101, K113, K105, K115, K106, K116, K117, K108, K118 \ +) { \ + { K000, K001, K002, K003, K004, KC_NO, K006, K007, K008 }, \ + { K010, K011, K012, K013, K014, K015, K016, K017, K018 }, \ + { K020, K021, K022, K023, K024, K025, K026, K027, K028 }, \ + { K030, K031, K032, K033, K034, K035, K036, K037, K038 }, \ + { K040, K041, K042, K043, K044, K045, K046, KC_NO, K048 }, \ + { K050, K051, K052, K053, K054, K055, K056, K057, K058 }, \ + { K060, K061, K062, K063, K064, K065, K066, KC_NO, KC_NO }, \ + { K070, K071, K072, K073, K074, K075, K076, KC_NO, KC_NO }, \ + { K080, K081, K082, K083, K084, K085, K086, KC_NO, K088 }, \ + { K090, K091, K092, K093, K094, K095, K096, KC_NO, KC_NO }, \ + { K100, K101, KC_NO, KC_NO, KC_NO, K105, K106, KC_NO, K108 }, \ + { K110, KC_NO, KC_NO, K113, KC_NO, K115, K116, K117, K118 } \ +} + + +#define LAYOUT_tkl_ansi(\ + K000, K010, K001, K011, K002, K012, K003, K013, K004, K014, K015, K006, K016, K007, K017, K008, K018, \ + K020, K030, K021, K031, K022, K032, K023, K033, K024, K034, K025, K035, K026, K027, K037, K028, K038, \ + K040, K050, K041, K051, K042, K052, K043, K053, K044, K054, K045, K055, K046, K056, K057, K048, K058, \ + K060, K070, K061, K071, K062, K072, K063, K073, K064, K074, K065, K075, K076, \ + K080, K081, K091, K082, K092, K083, K093, K084, K094, K085, K095, K086, K088, \ + K100, K110, K101, K113, K105, K115, K106, K116, K117, K108, K118 \ +) { \ + { K000, K001, K002, K003, K004, KC_NO, K006, K007, K008 }, \ + { K010, K011, K012, K013, K014, K015, K016, K017, K018 }, \ + { K020, K021, K022, K023, K024, K025, K026, K027, K028 }, \ + { K030, K031, K032, K033, K034, K035, KC_NO, K037, K038 }, \ + { K040, K041, K042, K043, K044, K045, K046, KC_NO, K048 }, \ + { K050, K051, K052, K053, K054, K055, K056, K057, K058 }, \ + { K060, K061, K062, K063, K064, K065, KC_NO, KC_NO, KC_NO }, \ + { K070, K071, K072, K073, K074, K075, K076, KC_NO, KC_NO }, \ + { K080, K081, K082, K083, K084, K085, K086, KC_NO, K088 }, \ + {KC_NO, K091, K092, K093, K094, K095, KC_NO, KC_NO, KC_NO }, \ + { K100, K101, KC_NO, KC_NO, KC_NO, K105, K106, KC_NO, K108 }, \ + { K110, KC_NO, KC_NO, K113, KC_NO, K115, K116, K117, K118 } \ +} + +#define LAYOUT_tkl_ansi_wkl(\ + K000, K010, K001, K011, K002, K012, K003, K013, K004, K014, K015, K006, K016, K007, K017, K008, K018, \ + K020, K030, K021, K031, K022, K032, K023, K033, K024, K034, K025, K035, K026, K027, K037, K028, K038, \ + K040, K050, K041, K051, K042, K052, K043, K053, K044, K054, K045, K055, K046, K056, K057, K048, K058, \ + K060, K070, K061, K071, K062, K072, K063, K073, K064, K074, K065, K075, K076, \ + K080, K081, K091, K082, K092, K083, K093, K084, K094, K085, K095, K086, K088, \ + K100, K101, K113, K115, K116, K117, K108, K118 \ +) { \ + { K000, K001, K002, K003, K004, KC_NO, K006, K007, K008 }, \ + { K010, K011, K012, K013, K014, K015, K016, K017, K018 }, \ + { K020, K021, K022, K023, K024, K025, K026, K027, K028 }, \ + { K030, K031, K032, K033, K034, K035, KC_NO, K037, K038 }, \ + { K040, K041, K042, K043, K044, K045, K046, KC_NO, K048 }, \ + { K050, K051, K052, K053, K054, K055, K056, K057, K058 }, \ + { K060, K061, K062, K063, K064, K065, KC_NO, KC_NO, KC_NO }, \ + { K070, K071, K072, K073, K074, K075, K076, KC_NO, KC_NO }, \ + { K080, K081, K082, K083, K084, K085, K086, KC_NO, K088 }, \ + {KC_NO, K091, K092, K093, K094, K095, KC_NO, KC_NO, KC_NO }, \ + { K100, K101, KC_NO, KC_NO, KC_NO,KC_NO, KC_NO, KC_NO, K108 }, \ + {KC_NO, KC_NO, KC_NO, K113, KC_NO, K115, K116, K117, K118 } \ +} + diff --git a/keyboards/hineybush/h88/info.json b/keyboards/hineybush/h88/info.json new file mode 100644 index 000000000000..f36ac09f7fa3 --- /dev/null +++ b/keyboards/hineybush/h88/info.json @@ -0,0 +1,20 @@ +{ + "keyboard_name": "h88a", + "url": "", + "maintainer": "hineybush", + "width": 18.25, + "height": 6.25, + "layouts": { + "LAYOUT_all": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1.25, "y":0}, {"label":"F2", "x":2.25, "y":0}, {"label":"F3", "x":3.25, "y":0}, {"label":"F4", "x":4.25, "y":0}, {"label":"F5", "x":5.5, "y":0}, {"label":"F6", "x":6.5, "y":0}, {"label":"F7", "x":7.5, "y":0}, {"label":"F8", "x":8.5, "y":0}, {"label":"F9", "x":9.75, "y":0}, {"label":"F10", "x":10.75, "y":0}, {"label":"F11", "x":11.75, "y":0}, {"label":"F12", "x":12.75, "y":0}, {"label":"F13", "x":14, "y":0}, {"label":"PrtSc", "x":15.25, "y":0}, {"label":"Scroll Lock", "x":16.25, "y":0}, {"label":"Pause", "x":17.25, "y":0}, {"label":"~", "x":0, "y":1.25}, {"label":"!", "x":1, "y":1.25}, {"label":"@", "x":2, "y":1.25}, {"label":"#", "x":3, "y":1.25}, {"label":"$", "x":4, "y":1.25}, {"label":"%", "x":5, "y":1.25}, {"label":"^", "x":6, "y":1.25}, {"label":"&", "x":7, "y":1.25}, {"label":"*", "x":8, "y":1.25}, {"label":"(", "x":9, "y":1.25}, {"label":")", "x":10, "y":1.25}, {"label":"_", "x":11, "y":1.25}, {"label":"+", "x":12, "y":1.25}, {"x":13, "y":1.25}, {"label":"Bksp", "x":14, "y":1.25}, {"label":"Insert", "x":15.25, "y":1.25}, {"label":"Home", "x":16.25, "y":1.25}, {"label":"PgUp", "x":17.25, "y":1.25}, {"label":"Tab", "x":0, "y":2.25, "w":1.5}, {"label":"Q", "x":1.5, "y":2.25}, {"label":"W", "x":2.5, "y":2.25}, {"label":"E", "x":3.5, "y":2.25}, {"label":"R", "x":4.5, "y":2.25}, {"label":"T", "x":5.5, "y":2.25}, {"label":"Y", "x":6.5, "y":2.25}, {"label":"U", "x":7.5, "y":2.25}, {"label":"I", "x":8.5, "y":2.25}, {"label":"O", "x":9.5, "y":2.25}, {"label":"P", "x":10.5, "y":2.25}, {"label":"{", "x":11.5, "y":2.25}, {"label":"}", "x":12.5, "y":2.25}, {"label":"|", "x":13.5, "y":2.25, "w":1.5}, {"label":"Delete", "x":15.25, "y":2.25}, {"label":"End", "x":16.25, "y":2.25}, {"label":"PgDn", "x":17.25, "y":2.25}, {"label":"Caps Lock", "x":0, "y":3.25, "w":1.75}, {"label":"A", "x":1.75, "y":3.25}, {"label":"S", "x":2.75, "y":3.25}, {"label":"D", "x":3.75, "y":3.25}, {"label":"F", "x":4.75, "y":3.25}, {"label":"G", "x":5.75, "y":3.25}, {"label":"H", "x":6.75, "y":3.25}, {"label":"J", "x":7.75, "y":3.25}, {"label":"K", "x":8.75, "y":3.25}, {"label":"L", "x":9.75, "y":3.25}, {"label":":", "x":10.75, "y":3.25}, {"label":"\"", "x":11.75, "y":3.25}, {"x":12.75, "y":3.25}, {"label":"Enter", "x":13.75, "y":3.25, "w":1.25}, {"label":"Shift", "x":0, "y":4.25, "w":1.25}, {"x":1.25, "y":4.25}, {"label":"Z", "x":2.25, "y":4.25}, {"label":"X", "x":3.25, "y":4.25}, {"label":"C", "x":4.25, "y":4.25}, {"label":"V", "x":5.25, "y":4.25}, {"label":"B", "x":6.25, "y":4.25}, {"label":"N", "x":7.25, "y":4.25}, {"label":"M", "x":8.25, "y":4.25}, {"label":"<", "x":9.25, "y":4.25}, {"label":">", "x":10.25, "y":4.25}, {"label":"?", "x":11.25, "y":4.25}, {"label":"Shift", "x":12.25, "y":4.25, "w":1.75}, {"x":14, "y":4.25}, {"label":"\u2191", "x":16.25, "y":4.25}, {"label":"Ctrl", "x":0, "y":5.25, "w":1.25}, {"label":"Win", "x":1.25, "y":5.25, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.25, "w":1.25}, {"x":3.75, "y":5.25, "w":6.25}, {"label":"Alt", "x":10, "y":5.25, "w":1.25}, {"label":"Win", "x":11.25, "y":5.25, "w":1.25}, {"label":"Menu", "x":12.5, "y":5.25, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":5.25, "w":1.25}, {"label":"\u2190", "x":15.25, "y":5.25}, {"label":"\u2193", "x":16.25, "y":5.25}, {"label":"\u2192", "x":17.25, "y":5.25}] + }, + + "LAYOUT_tkl_ansi": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1.25, "y":0}, {"label":"F2", "x":2.25, "y":0}, {"label":"F3", "x":3.25, "y":0}, {"label":"F4", "x":4.25, "y":0}, {"label":"F5", "x":5.5, "y":0}, {"label":"F6", "x":6.5, "y":0}, {"label":"F7", "x":7.5, "y":0}, {"label":"F8", "x":8.5, "y":0}, {"label":"F9", "x":9.75, "y":0}, {"label":"F10", "x":10.75, "y":0}, {"label":"F11", "x":11.75, "y":0}, {"label":"F12", "x":12.75, "y":0}, {"label":"F13", "x":14, "y":0}, {"label":"PrtSc", "x":15.25, "y":0}, {"label":"Scroll Lock", "x":16.25, "y":0}, {"label":"Pause", "x":17.25, "y":0}, {"label":"~", "x":0, "y":1.25}, {"label":"!", "x":1, "y":1.25}, {"label":"@", "x":2, "y":1.25}, {"label":"#", "x":3, "y":1.25}, {"label":"$", "x":4, "y":1.25}, {"label":"%", "x":5, "y":1.25}, {"label":"^", "x":6, "y":1.25}, {"label":"&", "x":7, "y":1.25}, {"label":"*", "x":8, "y":1.25}, {"label":"(", "x":9, "y":1.25}, {"label":")", "x":10, "y":1.25}, {"label":"_", "x":11, "y":1.25}, {"label":"+", "x":12, "y":1.25}, {"label":"Bksp", "x":13, "y":1.25, "w":2}, {"label":"Insert", "x":15.25, "y":1.25}, {"label":"Home", "x":16.25, "y":1.25}, {"label":"PgUp", "x":17.25, "y":1.25}, {"label":"Tab", "x":0, "y":2.25, "w":1.5}, {"label":"Q", "x":1.5, "y":2.25}, {"label":"W", "x":2.5, "y":2.25}, {"label":"E", "x":3.5, "y":2.25}, {"label":"R", "x":4.5, "y":2.25}, {"label":"T", "x":5.5, "y":2.25}, {"label":"Y", "x":6.5, "y":2.25}, {"label":"U", "x":7.5, "y":2.25}, {"label":"I", "x":8.5, "y":2.25}, {"label":"O", "x":9.5, "y":2.25}, {"label":"P", "x":10.5, "y":2.25}, {"label":"{", "x":11.5, "y":2.25}, {"label":"}", "x":12.5, "y":2.25}, {"label":"|", "x":13.5, "y":2.25, "w":1.5}, {"label":"Delete", "x":15.25, "y":2.25}, {"label":"End", "x":16.25, "y":2.25}, {"label":"PgDn", "x":17.25, "y":2.25}, {"label":"Caps Lock", "x":0, "y":3.25, "w":1.75}, {"label":"A", "x":1.75, "y":3.25}, {"label":"S", "x":2.75, "y":3.25}, {"label":"D", "x":3.75, "y":3.25}, {"label":"F", "x":4.75, "y":3.25}, {"label":"G", "x":5.75, "y":3.25}, {"label":"H", "x":6.75, "y":3.25}, {"label":"J", "x":7.75, "y":3.25}, {"label":"K", "x":8.75, "y":3.25}, {"label":"L", "x":9.75, "y":3.25}, {"label":":", "x":10.75, "y":3.25}, {"label":"\"", "x":11.75, "y":3.25}, {"label":"Enter", "x":12.75, "y":3.25, "w":2.25}, {"label":"Shift", "x":0, "y":4.25, "w":2.25}, {"label":"Z", "x":2.25, "y":4.25}, {"label":"X", "x":3.25, "y":4.25}, {"label":"C", "x":4.25, "y":4.25}, {"label":"V", "x":5.25, "y":4.25}, {"label":"B", "x":6.25, "y":4.25}, {"label":"N", "x":7.25, "y":4.25}, {"label":"M", "x":8.25, "y":4.25}, {"label":"<", "x":9.25, "y":4.25}, {"label":">", "x":10.25, "y":4.25}, {"label":"?", "x":11.25, "y":4.25}, {"label":"Shift", "x":12.25, "y":4.25, "w":2.75}, {"label":"\u2191", "x":16.25, "y":4.25}, {"label":"Ctrl", "x":0, "y":5.25, "w":1.25}, {"label":"Win", "x":1.25, "y":5.25, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.25, "w":1.25}, {"x":3.75, "y":5.25, "w":6.25}, {"label":"Alt", "x":10, "y":5.25, "w":1.25}, {"label":"Win", "x":11.25, "y":5.25, "w":1.25}, {"label":"Menu", "x":12.5, "y":5.25, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":5.25, "w":1.25}, {"label":"\u2190", "x":15.25, "y":5.25}, {"label":"\u2193", "x":16.25, "y":5.25}, {"label":"\u2192", "x":17.25, "y":5.25}] + }, + "LAYOUT_tkl_ansi_wkl": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1.25, "y":0}, {"label":"F2", "x":2.25, "y":0}, {"label":"F3", "x":3.25, "y":0}, {"label":"F4", "x":4.25, "y":0}, {"label":"F5", "x":5.5, "y":0}, {"label":"F6", "x":6.5, "y":0}, {"label":"F7", "x":7.5, "y":0}, {"label":"F8", "x":8.5, "y":0}, {"label":"F9", "x":9.75, "y":0}, {"label":"F10", "x":10.75, "y":0}, {"label":"F11", "x":11.75, "y":0}, {"label":"F12", "x":12.75, "y":0}, {"label":"F13", "x":14, "y":0}, {"label":"PrtSc", "x":15.25, "y":0}, {"label":"Scroll Lock", "x":16.25, "y":0}, {"label":"Pause", "x":17.25, "y":0}, {"label":"~", "x":0, "y":1.25}, {"label":"!", "x":1, "y":1.25}, {"label":"@", "x":2, "y":1.25}, {"label":"#", "x":3, "y":1.25}, {"label":"$", "x":4, "y":1.25}, {"label":"%", "x":5, "y":1.25}, {"label":"^", "x":6, "y":1.25}, {"label":"&", "x":7, "y":1.25}, {"label":"*", "x":8, "y":1.25}, {"label":"(", "x":9, "y":1.25}, {"label":")", "x":10, "y":1.25}, {"label":"_", "x":11, "y":1.25}, {"label":"+", "x":12, "y":1.25}, {"label":"Bksp", "x":13, "y":1.25, "w":2}, {"label":"Insert", "x":15.25, "y":1.25}, {"label":"Home", "x":16.25, "y":1.25}, {"label":"PgUp", "x":17.25, "y":1.25}, {"label":"Tab", "x":0, "y":2.25, "w":1.5}, {"label":"Q", "x":1.5, "y":2.25}, {"label":"W", "x":2.5, "y":2.25}, {"label":"E", "x":3.5, "y":2.25}, {"label":"R", "x":4.5, "y":2.25}, {"label":"T", "x":5.5, "y":2.25}, {"label":"Y", "x":6.5, "y":2.25}, {"label":"U", "x":7.5, "y":2.25}, {"label":"I", "x":8.5, "y":2.25}, {"label":"O", "x":9.5, "y":2.25}, {"label":"P", "x":10.5, "y":2.25}, {"label":"{", "x":11.5, "y":2.25}, {"label":"}", "x":12.5, "y":2.25}, {"label":"|", "x":13.5, "y":2.25, "w":1.5}, {"label":"Delete", "x":15.25, "y":2.25}, {"label":"End", "x":16.25, "y":2.25}, {"label":"PgDn", "x":17.25, "y":2.25}, {"label":"Caps Lock", "x":0, "y":3.25, "w":1.75}, {"label":"A", "x":1.75, "y":3.25}, {"label":"S", "x":2.75, "y":3.25}, {"label":"D", "x":3.75, "y":3.25}, {"label":"F", "x":4.75, "y":3.25}, {"label":"G", "x":5.75, "y":3.25}, {"label":"H", "x":6.75, "y":3.25}, {"label":"J", "x":7.75, "y":3.25}, {"label":"K", "x":8.75, "y":3.25}, {"label":"L", "x":9.75, "y":3.25}, {"label":":", "x":10.75, "y":3.25}, {"label":"\"", "x":11.75, "y":3.25}, {"label":"Enter", "x":12.75, "y":3.25, "w":2.25}, {"label":"Shift", "x":0, "y":4.25, "w":2.25}, {"label":"Z", "x":2.25, "y":4.25}, {"label":"X", "x":3.25, "y":4.25}, {"label":"C", "x":4.25, "y":4.25}, {"label":"V", "x":5.25, "y":4.25}, {"label":"B", "x":6.25, "y":4.25}, {"label":"N", "x":7.25, "y":4.25}, {"label":"M", "x":8.25, "y":4.25}, {"label":"<", "x":9.25, "y":4.25}, {"label":">", "x":10.25, "y":4.25}, {"label":"?", "x":11.25, "y":4.25}, {"label":"Shift", "x":12.25, "y":4.25, "w":2.75}, {"label":"\u2191", "x":16.25, "y":4.25}, {"label":"Ctrl", "x":0, "y":5.25, "w":1.5}, {"label":"Alt", "x":2.5, "y":5.25, "w":1.5}, {"x":4, "y":5.25, "w":7}, {"label":"Alt", "x":11, "y":5.25, "w":1.5}, {"label":"Ctrl", "x":13.5, "y":5.25, "w":1.5}, {"label":"\u2190", "x":15.25, "y":5.25}, {"label":"\u2193", "x":16.25, "y":5.25}, {"label":"\u2192", "x":17.25, "y":5.25}] + } + } +} + diff --git a/keyboards/hineybush/h88/keymaps/default/config.h b/keyboards/hineybush/h88/keymaps/default/config.h new file mode 100644 index 000000000000..dbb63d3d5413 --- /dev/null +++ b/keyboards/hineybush/h88/keymaps/default/config.h @@ -0,0 +1,21 @@ +/* Copyright 2019 Josh Hinnebusch + * + * 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 . + */ + +#pragma once + + +// place overrides here + diff --git a/keyboards/hineybush/h88/keymaps/default/keymap.c b/keyboards/hineybush/h88/keymaps/default/keymap.c new file mode 100644 index 000000000000..17035b4725f0 --- /dev/null +++ b/keyboards/hineybush/h88/keymaps/default/keymap.c @@ -0,0 +1,50 @@ +/* Copyright 2019 Josh Hinnebusch + + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_all( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_0, KC_PSCR, KC_SLCK, KC_PAUS, + 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_BSPC, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, + 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_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_TRNS, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + [1] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, KC_TRNS, BL_TOGG, BL_DEC, BL_INC, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, + 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_MPLY, KC_MNXT, KC_VOLD, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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; +} + + diff --git a/keyboards/hineybush/h88/keymaps/default/readme.md b/keyboards/hineybush/h88/keymaps/default/readme.md new file mode 100644 index 000000000000..455a2e00e850 --- /dev/null +++ b/keyboards/hineybush/h88/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for h88a diff --git a/keyboards/hineybush/h88/keymaps/wkl/config.h b/keyboards/hineybush/h88/keymaps/wkl/config.h new file mode 100644 index 000000000000..dbb63d3d5413 --- /dev/null +++ b/keyboards/hineybush/h88/keymaps/wkl/config.h @@ -0,0 +1,21 @@ +/* Copyright 2019 Josh Hinnebusch + * + * 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 . + */ + +#pragma once + + +// place overrides here + diff --git a/keyboards/hineybush/h88/keymaps/wkl/keymap.c b/keyboards/hineybush/h88/keymaps/wkl/keymap.c new file mode 100644 index 000000000000..12f225289a59 --- /dev/null +++ b/keyboards/hineybush/h88/keymaps/wkl/keymap.c @@ -0,0 +1,49 @@ +/* Copyright 2019 Josh Hinnebusch + + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_tkl_ansi_wkl( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_0, KC_PSCR, KC_SLCK, KC_PAUS, + 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_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, + 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, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LALT, KC_SPC, MO(1), KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT), + + [1] = LAYOUT_tkl_ansi_wkl( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, KC_TRNS, BL_TOGG, BL_DEC, BL_INC, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, + 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_MPLY, KC_MNXT, KC_VOLD, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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; +} + diff --git a/keyboards/hineybush/h88/keymaps/wkl/readme.md b/keyboards/hineybush/h88/keymaps/wkl/readme.md new file mode 100644 index 000000000000..bc0d78f04e29 --- /dev/null +++ b/keyboards/hineybush/h88/keymaps/wkl/readme.md @@ -0,0 +1 @@ +# The wkl keymap for h88a diff --git a/keyboards/hineybush/h88/readme.md b/keyboards/hineybush/h88/readme.md new file mode 100644 index 000000000000..d12dbeec3af3 --- /dev/null +++ b/keyboards/hineybush/h88/readme.md @@ -0,0 +1,40 @@ +h88 +=== + +A QMK-powered replacement PCB for custom TKL keyboards that feature an extra key in the Fn row. This PCB is designed with the TGR Jane V2 CE in mind, however other keyboards with the same layout and a.87 USB positioning may work. + +Keyboard Maintainer: [hineybush](/~https://github.com/hineybush) +Hardware Supported: h88 ver 1.0 +Hardware Availability: hineybush.com + +Make example for this keyboard (after setting up your build environment): + + make hineybush/h88:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +## h88 hardware information + +Controller: Atmega32u4 + + /* Column pin configuration + * col: 0 1 2 3 4 5 6 7 8 + * pin: F0 F1 F4 F5 F6 F7 C7 C6 D2 + */ + + /* Row pin configuration + * row: 0 1 2 3 4 5 6 7 8 9 10 11 + * pin: B0 B1 B2 B3 D0 D1 B5 B6 D7 B4 D6 D4 (Rev 1) + */ + +The H88 PCB utilizes duplex matrix organization. + + Caps Lock LED: D5 + Scroll Lock LED: E6 + Num Lock LED: not supported + Backlight Pin: B7 + RGB Data Pin: D3 + + + +For in-switch indicator LEDs, bridge the center pad of the J1 and J2 3-pad jumpers follwing the small silk screen line. diff --git a/keyboards/hineybush/h88/rules.mk b/keyboards/hineybush/h88/rules.mk new file mode 100644 index 000000000000..62b2d7b8b371 --- /dev/null +++ b/keyboards/hineybush/h88/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable RGB underglow +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +LINK_TIME_OPTIMIZATION_ENABLE = yes From ea8822e26713753e694e51ede6e2a668d52b0173 Mon Sep 17 00:00:00 2001 From: asdftemp <53125463+asdftemp@users.noreply.github.com> Date: Thu, 31 Oct 2019 22:17:24 +0100 Subject: [PATCH 244/316] [Keyboard] Added slash keyboard (#7042) * feat(slash): added slash keyboard * fix(slash): fixed typo in readme * Improvements after review * disabled debug and print to reduce firmware size * Fixes after review * fixed hardware list in readme.md --- keyboards/handwired/slash/config.h | 59 +++++++++++++++ keyboards/handwired/slash/info.json | 74 +++++++++++++++++++ .../handwired/slash/keymaps/default/config.h | 19 +++++ .../handwired/slash/keymaps/default/keymap.c | 11 +++ .../handwired/slash/keymaps/default/readme.md | 1 + keyboards/handwired/slash/readme.md | 19 +++++ keyboards/handwired/slash/rules.mk | 30 ++++++++ keyboards/handwired/slash/slash.c | 16 ++++ keyboards/handwired/slash/slash.h | 36 +++++++++ 9 files changed, 265 insertions(+) create mode 100644 keyboards/handwired/slash/config.h create mode 100644 keyboards/handwired/slash/info.json create mode 100644 keyboards/handwired/slash/keymaps/default/config.h create mode 100644 keyboards/handwired/slash/keymaps/default/keymap.c create mode 100644 keyboards/handwired/slash/keymaps/default/readme.md create mode 100644 keyboards/handwired/slash/readme.md create mode 100644 keyboards/handwired/slash/rules.mk create mode 100644 keyboards/handwired/slash/slash.c create mode 100644 keyboards/handwired/slash/slash.h diff --git a/keyboards/handwired/slash/config.h b/keyboards/handwired/slash/config.h new file mode 100644 index 000000000000..56aec3144adc --- /dev/null +++ b/keyboards/handwired/slash/config.h @@ -0,0 +1,59 @@ +/* +Copyright 2019 4sdftemp + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER asdftemp +#define PRODUCT Slash +#define DESCRIPTION 60% keyboard with bluetooth + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 8 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { C7, D6, B7, B6, B5, D7, C6, D0 } +#define MATRIX_COL_PINS { D2, F0, F1, F4, F5, F6, F7, D3 } +#define UNUSED_PINS +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* 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 diff --git a/keyboards/handwired/slash/info.json b/keyboards/handwired/slash/info.json new file mode 100644 index 000000000000..713a77aaae9b --- /dev/null +++ b/keyboards/handwired/slash/info.json @@ -0,0 +1,74 @@ +{ + "keyboard_name": "slash", + "url": "", + "maintainer": "qmk", + "width": 16.75, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"`", "x":1.75, "y":0}, + {"label":"1", "x":2.75, "y":0}, + {"label":"2", "x":3.75, "y":0}, + {"label":"3", "x":4.75, "y":0}, + {"label":"4", "x":5.75, "y":0}, + {"label":"5", "x":6.75, "y":0}, + {"label":"6", "x":7.75, "y":0}, + {"label":"7", "x":8.75, "y":0}, + {"label":"8", "x":9.75, "y":0}, + {"label":"9", "x":10.75, "y":0}, + {"label":"0", "x":11.75, "y":0}, + {"label":"-", "x":12.75, "y":0}, + {"label":"=", "x":13.75, "y":0}, + {"label":"Backspace", "x":14.75, "y":0, "w":2}, + {"label":"Tab", "x":1.25, "y":1, "w":1.5}, + {"label":"Q", "x":2.75, "y":1}, + {"label":"W", "x":3.75, "y":1}, + {"label":"E", "x":4.75, "y":1}, + {"label":"R", "x":5.75, "y":1}, + {"label":"T", "x":6.75, "y":1}, + {"label":"Y", "x":7.75, "y":1}, + {"label":"U", "x":8.75, "y":1}, + {"label":"I", "x":9.75, "y":1}, + {"label":"O", "x":10.75, "y":1}, + {"label":"P", "x":11.75, "y":1}, + {"label":"[", "x":12.75, "y":1}, + {"label":"]", "x":13.75, "y":1}, + {"label":"\\", "x":14.75, "y":1, "w":1.5}, + {"label":"Caps Lock", "x":1, "y":2, "w":1.75}, + {"label":"A", "x":2.75, "y":2}, + {"label":"S", "x":3.75, "y":2}, + {"label":"D", "x":4.75, "y":2}, + {"label":"F", "x":5.75, "y":2}, + {"label":"G", "x":6.75, "y":2}, + {"label":"H", "x":7.75, "y":2}, + {"label":"J", "x":8.75, "y":2}, + {"label":"K", "x":9.75, "y":2}, + {"label":"L", "x":10.75, "y":2}, + {"label":";", "x":11.75, "y":2}, + {"label":"'", "x":12.75, "y":2}, + {"label":"Enter", "x":13.75, "y":2, "w":2.25}, + {"label":"Shift", "x":0.5, "y":3, "w":2.25}, + {"label":"Z", "x":2.75, "y":3}, + {"label":"X", "x":3.75, "y":3}, + {"label":"C", "x":4.75, "y":3}, + {"label":"V", "x":5.75, "y":3}, + {"label":"B", "x":6.75, "y":3}, + {"label":"N", "x":7.75, "y":3}, + {"label":"M", "x":8.75, "y":3}, + {"label":",", "x":9.75, "y":3}, + {"label":".", "x":10.75, "y":3}, + {"label":"/", "x":11.75, "y":3}, + {"label":"Shift", "x":12.75, "y":3, "w":2.75}, + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, + {"label":"GUI", "x":1.25, "y":4, "w":1.25}, + {"label":"Alt", "x":2.5, "y":4, "w":1.25}, + {"label":"Space", "x":3.75, "y":4, "w":6.25}, + {"label":"Alt", "x":10, "y":4, "w":1.25}, + {"label":"GUI", "x":11.25, "y":4, "w":1.25}, + {"label":"Menu", "x":12.5, "y":4, "w":1.25}, + {"label":"Ctrl", "x":13.75, "y":4, "w":1.25} + ] + } + } +} diff --git a/keyboards/handwired/slash/keymaps/default/config.h b/keyboards/handwired/slash/keymaps/default/config.h new file mode 100644 index 000000000000..05a8d25b91ea --- /dev/null +++ b/keyboards/handwired/slash/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 4sdftemp + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/handwired/slash/keymaps/default/keymap.c b/keyboards/handwired/slash/keymaps/default/keymap.c new file mode 100644 index 000000000000..f57ef8b64577 --- /dev/null +++ b/keyboards/handwired/slash/keymaps/default/keymap.c @@ -0,0 +1,11 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + LAYOUT( /* Base */ + 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, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL + ), +}; diff --git a/keyboards/handwired/slash/keymaps/default/readme.md b/keyboards/handwired/slash/keymaps/default/readme.md new file mode 100644 index 000000000000..517377a4b01c --- /dev/null +++ b/keyboards/handwired/slash/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for slash diff --git a/keyboards/handwired/slash/readme.md b/keyboards/handwired/slash/readme.md new file mode 100644 index 000000000000..954a847388fc --- /dev/null +++ b/keyboards/handwired/slash/readme.md @@ -0,0 +1,19 @@ +# slash + +![slash](https://i.imgur.com/MYEfSE0.jpg) + +I found this project a while ago on [Reddit](https://www.reddit.com/r/MechanicalKeyboards/comments/6v3b6f/build_slash_keyboard_handwired_bluetooth/). This keyboard uses 61 keys in a 8x8 matrix. That bring the required pins to 16 which leaves 1 pin free. Unfortunately I couldn't get the firmware to compile on kbfirmware.com(the way [ND1BV](https://imgur.com/user/ND1BV) described it). So I decided to create the config myself and share it. I changed the wiring of the pins a little bit showed [here](https://i.imgur.com/WZ93xHx.png) + +Keyboard Maintainer: [asdftemp](/~https://github.com/asdftemp) +Hardware Supported: Adafruit Feather 32u4 Bluefruit LE +Hardware Availability: [Adafruit shop](https://www.adafruit.com/product/2829) + +Make example for this keyboard (after setting up your build environment): + + make handwired/slash:default + +Flashing should be done trough avrdude. Full make command is: + + make handwired/slash:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/handwired/slash/rules.mk b/keyboards/handwired/slash/rules.mk new file mode 100644 index 000000000000..4aba5bdeb9ab --- /dev/null +++ b/keyboards/handwired/slash/rules.mk @@ -0,0 +1,30 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency +F_CPU = 8000000 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +#BLUETOOTH_ENABLE = Yes # Enable Bluetooth with the Adafruit EZ-Key HID +BLUETOOTH = AdafruitBLE +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/handwired/slash/slash.c b/keyboards/handwired/slash/slash.c new file mode 100644 index 000000000000..59902b5074bf --- /dev/null +++ b/keyboards/handwired/slash/slash.c @@ -0,0 +1,16 @@ +/* Copyright 2019 4sdftemp + * + * 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 . + */ +#include "slash.h" diff --git a/keyboards/handwired/slash/slash.h b/keyboards/handwired/slash/slash.h new file mode 100644 index 000000000000..6c1342d6b263 --- /dev/null +++ b/keyboards/handwired/slash/slash.h @@ -0,0 +1,36 @@ +/* Copyright 2019 asdftemp + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + 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, \ + k40, k41, k42, k43, k44, k45, k46, k47 \ +) \ +{ \ + { k00, k02, k04, k06, k08, k0A, k0C, KC_NO }, \ + { k01, k03, k05, k07, k09, k0B, k0D, KC_NO }, \ + { k10, k12, k14, k16, k18, k1A, k1C, k45 }, \ + { k11, k13, k15, k17, k19, k1B, k1D, k44 }, \ + { k21, k23, k25, k27, k29, k2B, KC_NO, k42 }, \ + { k20, k22, k24, k26, k28, k2A, k2C, k43 }, \ + { k31, k33, k35, k37, k39, k3B, k47, k40 }, \ + { k30, k32, k34, k36, k38, k3A, k46, k41 } \ +} From 671030f0ae25e25541c0824688a6ed9ec0bd8f2e Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Thu, 31 Oct 2019 19:18:57 -0700 Subject: [PATCH 245/316] [Keyboard] HBCP info.json typo fix (#7228) Fixing a typo on a suggestion I made that got committed to the PR. --- keyboards/hineybush/hbcp/info.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/hineybush/hbcp/info.json b/keyboards/hineybush/hbcp/info.json index 54071dff4f09..bb21a6294b8c 100644 --- a/keyboards/hineybush/hbcp/info.json +++ b/keyboards/hineybush/hbcp/info.json @@ -6,7 +6,7 @@ "height": 6.75, "layouts": { "LAYOUT_all": { - "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1.25, "y":0}, {"label":"F2", "x":2.25, "y":0}, {"label":"F3", "x":3.25, "y":0}, {"label":"F4", "x":4.25, "y":0}, {"label":"F5", "x":5.5, "y":0}, {"label":"F6", "x":6.5, "y":0}, {"label":"F7", "x":7.5, "y":0}, {"label":"F8", "x":8.5, "y":0}, {"label":"F9", "x":9.75, "y":0}, {"label":"F10", "x":10.75, "y":0}, {"label":"F11", "x":11.75, "y":0}, {"label":"F12", "x":12.75, "y":0}, {"label":"PrtSc", "x":15.5, "y":0}, {"label":"Scroll Lock", "x":16.5, "y":0}, {"label":"Pause", "x":17.5, "y":0}, {"label":"PgUp", "x":18.5, "y":0}, {"label":"~", "x":0, "y":1.25}, {"label":"!", "x":1, "y":1.25}, {"label":"@", "x":2, "y":1.25}, {"label":"#", "x":3, "y":1.25}, {"label":"$", "x":4, "y":1.25}, {"label":"%", "x":5, "y":1.25}, {"label":"^", "x":6, "y":1.25}, {"label":"&", "x":7, "y":1.25}, {"label":"*", "x":8, "y":1.25}, {"label":"(", "x":9, "y":1.25}, {"label":")", "x":10, "y":1.25}, {"label":"_", "x":11, "y":1.25}, {"label":"+", "x":12, "y":1.25}, {"x":13, "y":1.25}, {"x":14, "y":1.25}, {"label":"Num Lock", "x":15.5, "y":1.25}, {"label":"/", "x":16.5, "y":1.25}, {"label":"*", "x":17.5, "y":1.25}, {"label":"-", "x":18.5, "y":1.25}, {"label":"Tab", "x":0, "y":2.25, "w":1.5}, {"label":"Q", "x":1.5, "y":2.25}, {"label":"W", "x":2.5, "y":2.25}, {"label":"E", "x":3.5, "y":2.25}, {"label":"R", "x":4.5, "y":2.25}, {"label":"T", "x":5.5, "y":2.25}, {"label":"Y", "x":6.5, "y":2.25}, {"label":"U", "x":7.5, "y":2.25}, {"label":"I", "x":8.5, "y":2.25}, {"label":"O", "x":9.5, "y":2.25}, {"label":"P", "x":10.5, "y":2.25}, {"label":"{", "x":11.5, "y":2.25}, {"label":"}", "x":12.5, "y":2.25}, {"label":"|", "x":13.5, "y":2.25, "w":1.5}, {"label":"7", "x":15.5, "y":2.25}, {"label":"8", "x":16.5, "y":2.25}, {"label":"9", "x":17.5, "y":2.25}, {"x":18.5, "y":2.25}, {"label":"Caps Lock", "x":0, "y":3.25, "w":1.75}, {"label":"A", "x":1.75, "y":3.25}, {"label":"S", "x":2.75, "y":3.25}, {"label":"D", "x":3.75, "y":3.25}, {"label":"F", "x":4.75, "y":3.25}, {"label":"G", "x":5.75, "y":3.25}, {"label":"H", "x":6.75, "y":3.25}, {"label":"J", "x":7.75, "y":3.25}, {"label":"K", "x":8.75, "y":3.25}, {"label":"L", "x":9.75, "y":3.25}, {"label":":", "x":10.75, "y":3.25}, {"label":"\"", "x":11.75, "y":3.25}, {"x":12.75, "y":3.25}, {"label":"Enter", "x":13.75, "y":3.25, "w":1.25}, {"label":"4", "x":15.5, "y":3.25}, {"label":"5", "x":16.5, "y":3.25}, {"label":"6", "x":17.5, "y":3.25}, {"x":18.5, "y":3.25}, {"x":0, "y":4.25, "w":1.25}, {"x":1.25, "y":4.25}, {"label":"Z", "x":2.25, "y":4.25}, {"label":"X", "x":3.25, "y":4.25}, {"label":"C", "x":4.25, "y":4.25}, {"label":"V", "x":5.25, "y":4.25}, {"label":"B", "x":6.25, "y":4.25}, {"label":"N", "x":7.25, "y":4.25}, {"label":"M", "x":8.25, "y":4.25}, {"label":"<", "x":9.25, "y":4.25}, {"label":">", "x":10.25, "y":4.25}, {"label":"?", "x":11.25, "y":4.25}, {"label":"Shift", "x":12.25, "y":4.25, "w":1.75}, {"label":"\u2191", "x":14.25, "y":4.5}, {"label":"1", "x":15.5, "y":4.25}, {"label":"2", "x":16.5, "y":4.25}, {"label":"3", "x":17.5, "y":4.25}, {"x":18.5, "y":4.25}, {"x":0, "y":5.25, "w":1.25}, {"x":1.25, "y":5.25, "w":1.25}, {"x":2.5, "y":5.25, "w":1.25}, {"x":3.75, "y":5.25, "w":6.25}, {"x":10, "y":5.25}, {"x":11, "y":5.25}, {"x":12, "y":5.25}, {"label":"\u2190", "x":13.25, "y":5.5}, {"label":"\u2193", "x":14.25, "y":5.5}, {"label":"\u2192", "x":15.25, "y":5.5}' {"label":"0", "x":16.5, "y":5.25}, {"label":".", "x":17.5, "y":5.25}, {"x":18.5, "y":5.25}] + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1.25, "y":0}, {"label":"F2", "x":2.25, "y":0}, {"label":"F3", "x":3.25, "y":0}, {"label":"F4", "x":4.25, "y":0}, {"label":"F5", "x":5.5, "y":0}, {"label":"F6", "x":6.5, "y":0}, {"label":"F7", "x":7.5, "y":0}, {"label":"F8", "x":8.5, "y":0}, {"label":"F9", "x":9.75, "y":0}, {"label":"F10", "x":10.75, "y":0}, {"label":"F11", "x":11.75, "y":0}, {"label":"F12", "x":12.75, "y":0}, {"label":"PrtSc", "x":15.5, "y":0}, {"label":"Scroll Lock", "x":16.5, "y":0}, {"label":"Pause", "x":17.5, "y":0}, {"label":"PgUp", "x":18.5, "y":0}, {"label":"~", "x":0, "y":1.25}, {"label":"!", "x":1, "y":1.25}, {"label":"@", "x":2, "y":1.25}, {"label":"#", "x":3, "y":1.25}, {"label":"$", "x":4, "y":1.25}, {"label":"%", "x":5, "y":1.25}, {"label":"^", "x":6, "y":1.25}, {"label":"&", "x":7, "y":1.25}, {"label":"*", "x":8, "y":1.25}, {"label":"(", "x":9, "y":1.25}, {"label":")", "x":10, "y":1.25}, {"label":"_", "x":11, "y":1.25}, {"label":"+", "x":12, "y":1.25}, {"x":13, "y":1.25}, {"x":14, "y":1.25}, {"label":"Num Lock", "x":15.5, "y":1.25}, {"label":"/", "x":16.5, "y":1.25}, {"label":"*", "x":17.5, "y":1.25}, {"label":"-", "x":18.5, "y":1.25}, {"label":"Tab", "x":0, "y":2.25, "w":1.5}, {"label":"Q", "x":1.5, "y":2.25}, {"label":"W", "x":2.5, "y":2.25}, {"label":"E", "x":3.5, "y":2.25}, {"label":"R", "x":4.5, "y":2.25}, {"label":"T", "x":5.5, "y":2.25}, {"label":"Y", "x":6.5, "y":2.25}, {"label":"U", "x":7.5, "y":2.25}, {"label":"I", "x":8.5, "y":2.25}, {"label":"O", "x":9.5, "y":2.25}, {"label":"P", "x":10.5, "y":2.25}, {"label":"{", "x":11.5, "y":2.25}, {"label":"}", "x":12.5, "y":2.25}, {"label":"|", "x":13.5, "y":2.25, "w":1.5}, {"label":"7", "x":15.5, "y":2.25}, {"label":"8", "x":16.5, "y":2.25}, {"label":"9", "x":17.5, "y":2.25}, {"x":18.5, "y":2.25}, {"label":"Caps Lock", "x":0, "y":3.25, "w":1.75}, {"label":"A", "x":1.75, "y":3.25}, {"label":"S", "x":2.75, "y":3.25}, {"label":"D", "x":3.75, "y":3.25}, {"label":"F", "x":4.75, "y":3.25}, {"label":"G", "x":5.75, "y":3.25}, {"label":"H", "x":6.75, "y":3.25}, {"label":"J", "x":7.75, "y":3.25}, {"label":"K", "x":8.75, "y":3.25}, {"label":"L", "x":9.75, "y":3.25}, {"label":":", "x":10.75, "y":3.25}, {"label":"\"", "x":11.75, "y":3.25}, {"x":12.75, "y":3.25}, {"label":"Enter", "x":13.75, "y":3.25, "w":1.25}, {"label":"4", "x":15.5, "y":3.25}, {"label":"5", "x":16.5, "y":3.25}, {"label":"6", "x":17.5, "y":3.25}, {"x":18.5, "y":3.25}, {"x":0, "y":4.25, "w":1.25}, {"x":1.25, "y":4.25}, {"label":"Z", "x":2.25, "y":4.25}, {"label":"X", "x":3.25, "y":4.25}, {"label":"C", "x":4.25, "y":4.25}, {"label":"V", "x":5.25, "y":4.25}, {"label":"B", "x":6.25, "y":4.25}, {"label":"N", "x":7.25, "y":4.25}, {"label":"M", "x":8.25, "y":4.25}, {"label":"<", "x":9.25, "y":4.25}, {"label":">", "x":10.25, "y":4.25}, {"label":"?", "x":11.25, "y":4.25}, {"label":"Shift", "x":12.25, "y":4.25, "w":1.75}, {"label":"\u2191", "x":14.25, "y":4.5}, {"label":"1", "x":15.5, "y":4.25}, {"label":"2", "x":16.5, "y":4.25}, {"label":"3", "x":17.5, "y":4.25}, {"x":18.5, "y":4.25}, {"x":0, "y":5.25, "w":1.25}, {"x":1.25, "y":5.25, "w":1.25}, {"x":2.5, "y":5.25, "w":1.25}, {"x":3.75, "y":5.25, "w":6.25}, {"x":10, "y":5.25}, {"x":11, "y":5.25}, {"x":12, "y":5.25}, {"label":"\u2190", "x":13.25, "y":5.5}, {"label":"\u2193", "x":14.25, "y":5.5}, {"label":"\u2192", "x":15.25, "y":5.5}, {"label":"0", "x":16.5, "y":5.25}, {"label":".", "x":17.5, "y":5.25}, {"x":18.5, "y":5.25}] }, "LAYOUT_wkl": { "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1.25, "y":0}, {"label":"F2", "x":2.25, "y":0}, {"label":"F3", "x":3.25, "y":0}, {"label":"F4", "x":4.25, "y":0}, {"label":"F5", "x":5.5, "y":0}, {"label":"F6", "x":6.5, "y":0}, {"label":"F7", "x":7.5, "y":0}, {"label":"F8", "x":8.5, "y":0}, {"label":"F9", "x":9.75, "y":0}, {"label":"F10", "x":10.75, "y":0}, {"label":"F11", "x":11.75, "y":0}, {"label":"F12", "x":12.75, "y":0}, {"label":"PrtSc", "x":15.5, "y":0}, {"label":"Scroll Lock", "x":16.5, "y":0}, {"label":"Pause", "x":17.5, "y":0}, {"label":"PgUp", "x":18.5, "y":0}, {"label":"~", "x":0, "y":1.25}, {"label":"!", "x":1, "y":1.25}, {"label":"@", "x":2, "y":1.25}, {"label":"#", "x":3, "y":1.25}, {"label":"$", "x":4, "y":1.25}, {"label":"%", "x":5, "y":1.25}, {"label":"^", "x":6, "y":1.25}, {"label":"&", "x":7, "y":1.25}, {"label":"*", "x":8, "y":1.25}, {"label":"(", "x":9, "y":1.25}, {"label":")", "x":10, "y":1.25}, {"label":"_", "x":11, "y":1.25}, {"label":"+", "x":12, "y":1.25}, {"label":"Backspace", "x":13, "y":1.25, "w":2}, {"label":"Num Lock", "x":15.5, "y":1.25}, {"label":"/", "x":16.5, "y":1.25}, {"label":"*", "x":17.5, "y":1.25}, {"label":"-", "x":18.5, "y":1.25}, {"label":"Tab", "x":0, "y":2.25, "w":1.5}, {"label":"Q", "x":1.5, "y":2.25}, {"label":"W", "x":2.5, "y":2.25}, {"label":"E", "x":3.5, "y":2.25}, {"label":"R", "x":4.5, "y":2.25}, {"label":"T", "x":5.5, "y":2.25}, {"label":"Y", "x":6.5, "y":2.25}, {"label":"U", "x":7.5, "y":2.25}, {"label":"I", "x":8.5, "y":2.25}, {"label":"O", "x":9.5, "y":2.25}, {"label":"P", "x":10.5, "y":2.25}, {"label":"{", "x":11.5, "y":2.25}, {"label":"}", "x":12.5, "y":2.25}, {"label":"|", "x":13.5, "y":2.25, "w":1.5}, {"label":"7", "x":15.5, "y":2.25}, {"label":"8", "x":16.5, "y":2.25}, {"label":"9", "x":17.5, "y":2.25}, {"x":18.5, "y":2.25}, {"label":"Caps Lock", "x":0, "y":3.25, "w":1.75}, {"label":"A", "x":1.75, "y":3.25}, {"label":"S", "x":2.75, "y":3.25}, {"label":"D", "x":3.75, "y":3.25}, {"label":"F", "x":4.75, "y":3.25}, {"label":"G", "x":5.75, "y":3.25}, {"label":"H", "x":6.75, "y":3.25}, {"label":"J", "x":7.75, "y":3.25}, {"label":"K", "x":8.75, "y":3.25}, {"label":"L", "x":9.75, "y":3.25}, {"label":":", "x":10.75, "y":3.25}, {"label":"\"", "x":11.75, "y":3.25}, {"label":"Enter", "x":12.75, "y":3.25, "w":2.25}, {"label":"4", "x":15.5, "y":3.25}, {"label":"5", "x":16.5, "y":3.25}, {"label":"6", "x":17.5, "y":3.25}, {"x":18.5, "y":3.25}, {"label":"Shift", "x":0, "y":4.25, "w":2.25}, {"label":"Z", "x":2.25, "y":4.25}, {"label":"X", "x":3.25, "y":4.25}, {"label":"C", "x":4.25, "y":4.25}, {"label":"V", "x":5.25, "y":4.25}, {"label":"B", "x":6.25, "y":4.25}, {"label":"N", "x":7.25, "y":4.25}, {"label":"M", "x":8.25, "y":4.25}, {"label":"<", "x":9.25, "y":4.25}, {"label":">", "x":10.25, "y":4.25}, {"label":"?", "x":11.25, "y":4.25}, {"label":"Shift", "x":12.25, "y":4.25, "w":1.75}, {"label":"\u2191", "x":14.25, "y":4.5}, {"label":"1", "x":15.5, "y":4.25}, {"label":"2", "x":16.5, "y":4.25}, {"label":"3", "x":17.5, "y":4.25}, {"label":"Enter", "x":18.5, "y":4.25, "h":2}, {"label":"Ctrl", "x":0, "y":5.25, "w":1.5}, {"label":"Alt", "x":1.5, "y":5.25, "w":1.5}, {"x":3, "y":5.25, "w":7}, {"label":"Alt", "x":10, "y":5.25, "w":1.5}, {"label":"Win", "x":11.5, "y":5.25, "w":1.5}, {"label":"\u2190", "x":13.25, "y":5.5}, {"label":"\u2193", "x":14.25, "y":5.5}, {"label":"\u2192", "x":15.25, "y":5.5}, {"label":"0", "x":16.5, "y":5.25}, {"label":".", "x":17.5, "y":5.25}] From f8ce91b62484f874c314c26293b47a037f7a1068 Mon Sep 17 00:00:00 2001 From: Jonathan Dayton Date: Fri, 1 Nov 2019 01:42:22 -0500 Subject: [PATCH 246/316] [Keymap] Add Planck-style RoPro keymap (#7230) * Copy the default layout * Copy Planck keymap layers * Update README * Update copyright name --- .../ropro/keymaps/jdayton3/README.md | 19 ++ .../ropro/keymaps/jdayton3/keymap.c | 286 ++++++++++++++++++ 2 files changed, 305 insertions(+) create mode 100644 keyboards/kingly_keys/ropro/keymaps/jdayton3/README.md create mode 100644 keyboards/kingly_keys/ropro/keymaps/jdayton3/keymap.c diff --git a/keyboards/kingly_keys/ropro/keymaps/jdayton3/README.md b/keyboards/kingly_keys/ropro/keymaps/jdayton3/README.md new file mode 100644 index 000000000000..b62ea79e10d3 --- /dev/null +++ b/keyboards/kingly_keys/ropro/keymaps/jdayton3/README.md @@ -0,0 +1,19 @@ +``` + ,-----------------------------------------------------------------------------------. + | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + |------+------+------+------+------+------+------+------+------+------+------+------| + | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + |------+------+------+------+------+------+------+------+------+------+------+------| + RotEn | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + ,------+------+------+------+------+------+------+------+------+------+------+------+------| + | PgUp | Esc | A | S | D | F | G | H | J | K | L | ; | " | + |------+------+------+------+------+------+-------------+------+------+------+------+------| + | Home | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + |------+------+------+------+------+------+------+------+------+------+------+------+------| + | PgDn | Brite| Ctrl | ALT | GUI |Lower |SPACE |SPACE |Raise | Left | Down | Up |Right | + `------------------------------------------------------------------------------------------' +``` + +# A Planck-based RoPro layout + +Basically all the layers from the default Planck layout, plus a number row, a function row, 3 extra keys, and a rotary encoder. diff --git a/keyboards/kingly_keys/ropro/keymaps/jdayton3/keymap.c b/keyboards/kingly_keys/ropro/keymaps/jdayton3/keymap.c new file mode 100644 index 000000000000..0c6db75142b6 --- /dev/null +++ b/keyboards/kingly_keys/ropro/keymaps/jdayton3/keymap.c @@ -0,0 +1,286 @@ +/* Copyright 2019 Jonathan Dayton (jdayton3) + * + * 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 . + */ + +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +enum layer_names { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _PLOVER, + _ADJUST +}; + +enum keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + PLOVER, + BACKLIT, + EXT_PLV +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* QWERTY + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * RotEn | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * ,------+------+------+------+------+------+------+------+------+------+------+------+------| + * | PgUp | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------+-------------+------+------+------+------+------| + * | Home | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------+------| + * | PgDn | Brite| Ctrl | ALT | GUI |Lower |SPACE |SPACE |Raise | Left | Down | Up |Right | + * `------------------------------------------------------------------------------------------' + */ + [_QWERTY] = LAYOUT( + 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_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, + KC_NO, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_PGUP, 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_HOME, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + KC_PGDN, RGB_TOG, KC_RCTRL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + + /* Colemak + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + * |-----------------------------------------------------------------------------------| + * RotEn | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * ,------|------+------+------+------+------+------+------+------+------+------+------+------| + * | PgUp | Esc | A | R | S | T | D | H | N | E | I | O | " | + * |------|------+------+------+------+------+------+------+------+------+------+------+------| + * | Home | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------|------+------+------+------+------+------+------+------+------+------+------+------| + * | PgDn | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `------------------------------------------------------------------------------------------' + */ + [_COLEMAK] = LAYOUT( + 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_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, + KC_NO, KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_ESC, + KC_PGUP, KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_HOME, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + KC_PGDN, RGB_TOG, KC_RCTRL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + + /* Dvorak + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + * |-----------------------------------------------------------------------------------. + * RotEn | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | + * ,------|------+------+------+------+------+------+------+------+------+------+------+------| + * | PgUp | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------|------+------+------+------+------+------+------+------+------+------+------+------| + * | Home | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------|------+------+------+------+------+------+------+------+------+------+------+------| + * | PgDn | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `------------------------------------------------------------------------------------------' + */ + [_DVORAK] = LAYOUT( + 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_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, + KC_NO, KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, + KC_PGUP, KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, + KC_HOME, KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT, + KC_PGDN, RGB_TOG, KC_RCTRL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + + /* LOWER + * ,-----------------------------------------------------------------------------------. + * |TOGRGB| | | |Sat(-)|Hue(-)|Hue(+)|Sat(+)| | |Brght-|Brght+| + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ` | | | | | | | | | | | = | + * |-----------------------------------------------------------------------------------. + * RotEn | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * ,------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Home | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------| + * | End | | | | | | | | Next | Vol- | Vol+ | Play | + * `------------------------------------------------------------------------------------------' + */ + [_LOWER] = LAYOUT( + RGB_TOG, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SAD, RGB_HUD, RGB_HUI, RGB_SAI, KC_TRNS, KC_TRNS, RGB_VAD, RGB_VAI, + KC_GRAVE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_EQUAL, + KC_NLCK, KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, + KC_HOME, KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + KC_TRNS, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______, + KC_END, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + ), + + /* RAISE + * ,-----------------------------------------------------------------------------------. + * |TOGRGB| | | |Sat(-)|Hue(-)|Hue(+)|Sat(+)| | |Brght-|Brght+| + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ` | | | | | | | | | | | = | + * |-----------------------------------------------------------------------------------. + * RotEn | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * ,------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Home | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------| + * | End | | | | | | | | Next | Vol- | Vol+ | Play | + * `------------------------------------------------------------------------------------------' + */ + [_RAISE] = LAYOUT( + RGB_TOG, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SAD, RGB_HUD, RGB_HUI, RGB_SAI, KC_TRNS, KC_TRNS, RGB_VAD, RGB_VAI, + KC_GRAVE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_EQUAL, + KC_NLCK, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_HOME, KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + KC_TRNS, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, + KC_END, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + ), + + /* Plover layer (http://opensteno.org) + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + * |-----------------------------------------------------------------------------------. + * RotEn | # | # | # | # | # | # | # | # | # | # | # | # | + * ,------|------+------+------+------+------+------+------+------+------+------+------+------| + * | PgUp | | S | T | P | H | * | * | F | P | L | T | D | + * |------|------+------+------+------+------+------+------+------+------+------+------+------| + * | Home | | S | K | W | R | * | * | R | B | G | S | Z | + * |------|------+------+------+------+------+------+------+------+------+------+------+------| + * | PgDn | Exit | | | A | O | | E | U | | | | + * `------------------------------------------------------------------------------------------' + */ + [_PLOVER] = LAYOUT( + 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_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, + KC_NO, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 , + KC_PGUP, XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + KC_HOME, XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_PGDN, EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX + ), + + /* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + * |-----------------------------------------------------------------------------------. + * RotEn | | Reset|Debug | RGB |RGBMOD| HUE+ | HUE- | SAT+ | SAT- |BRGTH+|BRGTH-| Del | + * ,------|------+------+------+------+------+------+------+------+------+------+------+------| + * | PgUp | | |MUSmod|Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| | + * |------|------+------+------+------+------+------+------+------+------+------+------+------| + * | Home | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof|TermOn|TermOf| | | | + * |------|------+------+------+------+------+------+------+------+------+------+------+------| + * | PgDn | | | | | | | | | | | | + * `------------------------------------------------------------------------------------------' + */ + [_ADJUST] = LAYOUT( + 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_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, + KC_NO, _______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL , + KC_PGUP, _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______, + KC_HOME, _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______, + KC_PGDN, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + if (clockwise) { + tap_code(KC_WH_L); + } else { + tap_code(KC_WH_R); + } + } +} + + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + break; + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(KC_RSFT); + } + return false; + break; + case PLOVER: + if (record->event.pressed) { + layer_off(_RAISE); + layer_off(_LOWER); + layer_off(_ADJUST); + layer_on(_PLOVER); + if (!eeconfig_is_enabled()) { + eeconfig_init(); + } + keymap_config.raw = eeconfig_read_keymap(); + keymap_config.nkro = 1; + eeconfig_update_keymap(keymap_config.raw); + } + return false; + break; + case EXT_PLV: + if (record->event.pressed) { + layer_off(_PLOVER); + } + return false; + break; + } + return true; +} From 3546932a8b25ea199f33b8a39c49ccaa5f7ca3c9 Mon Sep 17 00:00:00 2001 From: worthlessowl <53881082+worthlessowl@users.noreply.github.com> Date: Sat, 2 Nov 2019 07:19:04 +0700 Subject: [PATCH 247/316] [Keyboard] Owlet60 keymap removal, matrix.c and owlet60.h fix (#7235) --- .../handwired/owlet60/keymaps/irham/config.h | 19 ----- .../handwired/owlet60/keymaps/irham/keymap.c | 74 ------------------- .../handwired/owlet60/keymaps/irham/readme.md | 1 - keyboards/handwired/owlet60/matrix.c | 8 +- keyboards/handwired/owlet60/owlet60.h | 54 +++++++------- 5 files changed, 31 insertions(+), 125 deletions(-) delete mode 100644 keyboards/handwired/owlet60/keymaps/irham/config.h delete mode 100644 keyboards/handwired/owlet60/keymaps/irham/keymap.c delete mode 100644 keyboards/handwired/owlet60/keymaps/irham/readme.md diff --git a/keyboards/handwired/owlet60/keymaps/irham/config.h b/keyboards/handwired/owlet60/keymaps/irham/config.h deleted file mode 100644 index f662fe7c93a9..000000000000 --- a/keyboards/handwired/owlet60/keymaps/irham/config.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright 2019 worthlessowl - * - * 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 . - */ - -#pragma once - -// place overrides here diff --git a/keyboards/handwired/owlet60/keymaps/irham/keymap.c b/keyboards/handwired/owlet60/keymaps/irham/keymap.c deleted file mode 100644 index dc1d34ff22bb..000000000000 --- a/keyboards/handwired/owlet60/keymaps/irham/keymap.c +++ /dev/null @@ -1,74 +0,0 @@ -/* Copyright 2019 worthlessowl - * - * 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 . - */ -#include QMK_KEYBOARD_H - -// Defines the keycodes used by our macros in process_record_user -enum custom_keycodes { - QMKBEST = SAFE_RANGE, - QMKURL -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_owlet60_full_bsp( - KC__VOLUP, 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_HOME, \ - KC__VOLDOWN, 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_PGUP, \ - KC__MUTE, 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_PGDN, \ - KC_LSFT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, KC_UP, MO(1), \ - KC_LCTRL, KC_LALT, KC_SPC, KC_LGUI,KC_SPC, KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT \ - ), - - [1] = LAYOUT_owlet60_full_bsp( - KC_TRNS, 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_DEL, RGB_TOG, \ - KC_TRNS, KC_TRNS, KC_TRNS, 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_MOD, \ - KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_END, \ - KC_TRNS,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_VAI, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAD, KC_TRNS \ - ) -}; - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QMKBEST: - if (record->event.pressed) { - // when keycode QMKBEST is pressed - SEND_STRING("QMK is the best thing ever!"); - } else { - // when keycode QMKBEST is released - } - break; - case QMKURL: - if (record->event.pressed) { - // when keycode QMKURL is pressed - SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); - } else { - // when keycode QMKURL is released - } - break; - } - return true; -} - -void matrix_init_user(void) { - -} - -void matrix_scan_user(void) { - -} - -void led_set_user(uint8_t usb_led) { - -} diff --git a/keyboards/handwired/owlet60/keymaps/irham/readme.md b/keyboards/handwired/owlet60/keymaps/irham/readme.md deleted file mode 100644 index 1d177ae10298..000000000000 --- a/keyboards/handwired/owlet60/keymaps/irham/readme.md +++ /dev/null @@ -1 +0,0 @@ -# The default keymap for owlet60 \ No newline at end of file diff --git a/keyboards/handwired/owlet60/matrix.c b/keyboards/handwired/owlet60/matrix.c index 8ecce4eb125a..994f527ec772 100644 --- a/keyboards/handwired/owlet60/matrix.c +++ b/keyboards/handwired/owlet60/matrix.c @@ -225,10 +225,10 @@ void matrix_init(void) { uint8_t matrix_scan(void) { bool changed = false; - + for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { changed |= read_cols_on_row(raw_matrix, current_row); - } + } debounce(raw_matrix, matrix, MATRIX_ROWS, changed); @@ -290,7 +290,7 @@ static void select_col_analog(uint8_t col) { static void mux_pin_control(const uint8_t binary[]) { // set pin0 setPinOutput(col_select_pins[0]); - if(binary[0] == 0) { + if(binary[2] == 0) { writePinLow(col_select_pins[0]); } else { @@ -306,7 +306,7 @@ static void mux_pin_control(const uint8_t binary[]) { } // set pin2 setPinOutput(col_select_pins[2]); - if(binary[2] == 0) { + if(binary[0] == 0) { writePinLow(col_select_pins[2]); } else { diff --git a/keyboards/handwired/owlet60/owlet60.h b/keyboards/handwired/owlet60/owlet60.h index 9db2a789d6b0..f17f40fdaf7f 100644 --- a/keyboards/handwired/owlet60/owlet60.h +++ b/keyboards/handwired/owlet60/owlet60.h @@ -32,15 +32,15 @@ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \ k40, k41, k42, k43, k44, k45, k46, k47, k48 \ ) { \ - { k07, k11, k13, k15, k50, k19, k1b, k1d}, \ - { k17, k21, k23, k25, k51, k29, k2b, k3d}, \ - { k27, k31, k33, k35, k52, k39, k3b, k47}, \ - { k37, k41, k42, k43, k40, k45, k46, k48}, \ - { k38, k32, k34, k44, k30, k3a, k3c, k3e}, \ - { k28, k22, k24, k36, k20, k2a, k2c, k2d}, \ - { k18, k12, k14, k26, k10, k1a, k1c, k1e}, \ - { k08, k02, k04, k16, k00, k0a, k0c, k0f}, \ - { k09, k03, k05, k06, k01, k0b, k0d, k0e} \ + { k50, k11, k13, k15, k07, k19, k1b, k1d}, \ + { k51, k21, k23, k25, k17, k29, k2b, k3d}, \ + { k52, k31, k33, k35, k27, k39, k3b, k47}, \ + { k40, k41, k42, k43, k37, k45, k46, k48}, \ + { k30, k32, k34, k44, k38, k3a, k3c, k3e}, \ + { k20, k22, k24, k36, k28, k2a, k2c, k2d}, \ + { k10, k12, k14, k26, k18, k1a, k1c, k1e}, \ + { k00, k02, k04, k16, k08, k0a, k0c, k0f}, \ + { k01, k03, k05, k06, k09, k0b, k0d, k0e} \ } #define LAYOUT_owlet60_full_bsp( \ @@ -68,15 +68,15 @@ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ k40, k41, k42, k43, k44, k45, k47 \ ) { \ - { k07, k11, k13, k15, k50, k19, k1b, k1d}, \ - { k17, k21, k23, k25, k51, k29, k2b, k3d}, \ - { k27, k31, k33, k35, k52, k39, k3b, k47}, \ - { k37, k41, k42, k43, k40, k45, KC_NO, KC_NO}, \ - { k38, k32, k34, k44, k30, k3a, k3c, KC_NO}, \ - { k28, k22, k24, k36, k20, k2a, k2c, KC_NO}, \ - { k18, k12, k14, k26, k10, k1a, k1c, KC_NO}, \ - { k08, k02, k04, k16, k00, k0a, k0c, KC_NO}, \ - { k09, k03, k05, k06, k01, k0b, k0d, k0e} \ + { k50, k11, k13, k15, k07, k19, k1b, k1d}, \ + { k51, k21, k23, k25, k17, k29, k2b, k3d}, \ + { k52, k31, k33, k35, k27, k39, k3b, k47}, \ + { k40, k41, k42, k43, k37, k45, KC_NO, KC_NO}, \ + { k30, k32, k34, k44, k38, k3a, k3c, KC_NO}, \ + { k20, k22, k24, k36, k28, k2a, k2c, KC_NO}, \ + { k10, k12, k14, k26, k18, k1a, k1c, KC_NO}, \ + { k00, k02, k04, k16, k08, k0a, k0c, KC_NO}, \ + { k01, k03, k05, k06, k09, k0b, k0d, k0e} \ } #define LAYOUT_owlet60_60_percent_full_bsp( \ @@ -86,13 +86,13 @@ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ k40, k41, k42, k43, k44, k45, k47 \ ) { \ - { k07, k11, k13, k15, k50, k19, k1b, k1d}, \ - { k17, k21, k23, k25, k51, k29, k2b, k3d}, \ - { k27, k31, k33, k35, k52, k39, k3b, k47}, \ - { k37, k41, k42, k43, k40, k45, KC_NO, KC_NO}, \ - { k38, k32, k34, k44, k30, k3a, k3c, KC_NO}, \ - { k28, k22, k24, k36, k20, k2a, k2c, KC_NO}, \ - { k18, k12, k14, k26, k10, k1a, k1c, KC_NO}, \ - { k08, k02, k04, k16, k00, k0a, k0c, KC_NO}, \ - { k09, k03, k05, k06, k01, k0b, k0d, KC_NO} \ + { k50, k11, k13, k15, k07, k19, k1b, k1d}, \ + { k51, k21, k23, k25, k17, k29, k2b, k3d}, \ + { k52, k31, k33, k35, k27, k39, k3b, k47}, \ + { k40, k41, k42, k43, k37, k45, KC_NO, KC_NO}, \ + { k30, k32, k34, k44, k38, k3a, k3c, KC_NO}, \ + { k20, k22, k24, k36, k28, k2a, k2c, KC_NO}, \ + { k10, k12, k14, k26, k18, k1a, k1c, KC_NO}, \ + { k00, k02, k04, k16, k08, k0a, k0c, KC_NO}, \ + { k01, k03, k05, k06, k09, k0b, k0d, KC_NO} \ } From f5cf5b950f04659ae7faf1534650092023adb468 Mon Sep 17 00:00:00 2001 From: mechlovin <57231893+mechlovin@users.noreply.github.com> Date: Sat, 2 Nov 2019 08:47:26 +0700 Subject: [PATCH 248/316] [Keyboard] Add Hannah910 (#7234) * Add new PCB Hannah910 a replace pcb for tgr910 keyboard * Update readme.md * update --- keyboards/mechlovin/hannah910/config.h | 245 ++++++++++++++++++ keyboards/mechlovin/hannah910/hannah910.c | 61 +++++ keyboards/mechlovin/hannah910/hannah910.h | 70 +++++ keyboards/mechlovin/hannah910/info.json | 21 ++ .../mechlovin/hannah910/keymaps/ansi/config.h | 19 ++ .../mechlovin/hannah910/keymaps/ansi/keymap.c | 33 +++ .../hannah910/keymaps/ansi/readme.md | 1 + .../hannah910/keymaps/default/config.h | 19 ++ .../hannah910/keymaps/default/keymap.c | 33 +++ .../hannah910/keymaps/default/readme.md | 1 + keyboards/mechlovin/hannah910/readme.md | 15 ++ keyboards/mechlovin/hannah910/rules.mk | 33 +++ 12 files changed, 551 insertions(+) create mode 100644 keyboards/mechlovin/hannah910/config.h create mode 100644 keyboards/mechlovin/hannah910/hannah910.c create mode 100644 keyboards/mechlovin/hannah910/hannah910.h create mode 100644 keyboards/mechlovin/hannah910/info.json create mode 100644 keyboards/mechlovin/hannah910/keymaps/ansi/config.h create mode 100644 keyboards/mechlovin/hannah910/keymaps/ansi/keymap.c create mode 100644 keyboards/mechlovin/hannah910/keymaps/ansi/readme.md create mode 100644 keyboards/mechlovin/hannah910/keymaps/default/config.h create mode 100644 keyboards/mechlovin/hannah910/keymaps/default/keymap.c create mode 100644 keyboards/mechlovin/hannah910/keymaps/default/readme.md create mode 100644 keyboards/mechlovin/hannah910/readme.md create mode 100644 keyboards/mechlovin/hannah910/rules.mk diff --git a/keyboards/mechlovin/hannah910/config.h b/keyboards/mechlovin/hannah910/config.h new file mode 100644 index 000000000000..1ff7dfd0b297 --- /dev/null +++ b/keyboards/mechlovin/hannah910/config.h @@ -0,0 +1,245 @@ +/* +Copyright 2019 Mechlovin + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Mechlovin +#define PRODUCT Hannah910 +#define DESCRIPTION A replace PCB for TGR910 keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { B5, B6, D3, C6, C7 } +#define MATRIX_COL_PINS { E6, B1, B3, F0, F1, F4, F5, F6, F7, D5, D4, B4, D6, D7, B0 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + + +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +#define RGBLED_NUM 9 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +#define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +#define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * 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 + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/mechlovin/hannah910/hannah910.c b/keyboards/mechlovin/hannah910/hannah910.c new file mode 100644 index 000000000000..2c696ab564fe --- /dev/null +++ b/keyboards/mechlovin/hannah910/hannah910.c @@ -0,0 +1,61 @@ +/* Copyright 2019 Mechlovin + * + * 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 . + */ +#include "hannah910.h" + +void matrix_init_kb(void) { + matrix_init_user(); + led_init_ports(); +}; +void led_init_ports(void) { + setPinOutput(B2); + setPinOutput(D0); + setPinOutput(D1); + setPinOutput(D2); + +} +void led_set_kb(uint8_t usb_led) { + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinHigh(B2); + } else { + writePinLow(B2); + } + led_set_user(usb_led); +} + +uint32_t layer_state_set_user(uint32_t state) +{ + // if on layer 1, turn on D2 LED, otherwise off. + if (biton32(state) == 1) { + writePinHigh(D2); + } else { + writePinLow(D2); + } + // if on layer 2, turn on D1 LED, otherwise off. + if (biton32(state) == 2) { + writePinHigh(D1); + } else { + writePinLow(D1); + } + + // if on layer 3, turn on D0 LED, otherwise off. + if (biton32(state) == 3) { + writePinHigh(D0); + } else { + writePinLow(D0); + } + + return state; +} diff --git a/keyboards/mechlovin/hannah910/hannah910.h b/keyboards/mechlovin/hannah910/hannah910.h new file mode 100644 index 000000000000..554116721c33 --- /dev/null +++ b/keyboards/mechlovin/hannah910/hannah910.h @@ -0,0 +1,70 @@ +/* Copyright 2019 Mechlovin + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_all( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, k14, \ + k15, k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k40, k41, k42, k43, k45, \ + k46, k47, k48, k49, k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k60, \ + k61, k62, k63, k64, k65, k66, k67, k68, k69, k70, k71 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, k14 }, \ + { k15, k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k40, k41, k42, k43, k45 }, \ + { k46, k47, k48, k49, k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k60 }, \ + { k61, k62, k63, KC_NO, k64, KC_NO, k65, KC_NO, k66, KC_NO, k67, k68, k69, k70, k71 }, \ +} +#define LAYOUT_iso( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, k14, \ + k15, k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, k29, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k40, k41, k42, k43, k45, \ + k46, k47, k48, k49, k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k60, \ + k61, k62, k63, k65, k67, k68, k69, k70, k71 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, k14 }, \ + { k15, k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, KC_NO, k29 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k40, k41, k42, k43, k45 }, \ + { k46, k47, k48, k49, k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k60 }, \ + { k61, k62, k63, KC_NO, KC_NO, KC_NO, k65, KC_NO, KC_NO, KC_NO, k67, k68, k69, k70, k71 }, \ +} + +#define LAYOUT_ansi( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, \ + k15, k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k40, k41, k43, k45, \ + k46, k48, k49, k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k60, \ + k61, k62, k63, k65, k67, k68, k69, k70, k71 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, KC_NO }, \ + { k15, k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k40, k41, KC_NO, k43, k45 }, \ + { k46, KC_NO, k48, k49, k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k60 }, \ + { k61, k62, k63, KC_NO, KC_NO, KC_NO, k65, KC_NO, KC_NO, KC_NO, k67, k68, k69, k70, k71 }, \ +} diff --git a/keyboards/mechlovin/hannah910/info.json b/keyboards/mechlovin/hannah910/info.json new file mode 100644 index 000000000000..7bc6c744140e --- /dev/null +++ b/keyboards/mechlovin/hannah910/info.json @@ -0,0 +1,21 @@ +{ + "keyboard_name": "Hannah910", + "url": "", + "maintainer": "Mechlovin'", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_all": { + "key_count": 71, + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Back", "x":13, "y":0}, {"label":"Delete", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"INS", "x":15, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, {"label":"HOME", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"Shift", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Up", "x":14, "y":3}, {"label":"END", "x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"label":"Space", "x":3.75, "y":4, "w":2.75}, {"label":"Space", "x":6.5, "y":4, "w":1.25}, {"label":"Space", "x":7.75, "y":4, "w":2.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Left", "x":13, "y":4}, {"label":"Down", "x":14, "y":4}, {"label":"Right", "x":15, "y":4}] + }, + "LAYOUT_iso": { + "key_count": 68, + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"INS", "x":15, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"HOME", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"Shift", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Up", "x":14, "y":3}, {"label":"END", "x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"label":"6.25U", "x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Left", "x":13, "y":4}, {"label":"Down", "x":14, "y":4}, {"label":"Right", "x":15, "y":4}] + }, + "LAYOUT_ansi": { + "key_count": 66, + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"INS", "x":15, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"HOME", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Up", "x":14, "y":3}, {"label":"END", "x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"label":"6.25U", "x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Left", "x":13, "y":4}, {"label":"Down", "x":14, "y":4}, {"label":"Right", "x":15, "y":4}] + } + } +} \ No newline at end of file diff --git a/keyboards/mechlovin/hannah910/keymaps/ansi/config.h b/keyboards/mechlovin/hannah910/keymaps/ansi/config.h new file mode 100644 index 000000000000..3d1156ac0651 --- /dev/null +++ b/keyboards/mechlovin/hannah910/keymaps/ansi/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 Mechlovin + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/mechlovin/hannah910/keymaps/ansi/keymap.c b/keyboards/mechlovin/hannah910/keymaps/ansi/keymap.c new file mode 100644 index 000000000000..97dd7a5f0260 --- /dev/null +++ b/keyboards/mechlovin/hannah910/keymaps/ansi/keymap.c @@ -0,0 +1,33 @@ +/* Copyright 2019 Mechlovin + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ansi( /* Base */ + 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_INS, + LT(1,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_HOME, + 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_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_ansi( /* Base */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), +}; \ No newline at end of file diff --git a/keyboards/mechlovin/hannah910/keymaps/ansi/readme.md b/keyboards/mechlovin/hannah910/keymaps/ansi/readme.md new file mode 100644 index 000000000000..b0dfa055c6c1 --- /dev/null +++ b/keyboards/mechlovin/hannah910/keymaps/ansi/readme.md @@ -0,0 +1 @@ +# The ansi keymap for hannah910 diff --git a/keyboards/mechlovin/hannah910/keymaps/default/config.h b/keyboards/mechlovin/hannah910/keymaps/default/config.h new file mode 100644 index 000000000000..3d1156ac0651 --- /dev/null +++ b/keyboards/mechlovin/hannah910/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 Mechlovin + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/mechlovin/hannah910/keymaps/default/keymap.c b/keyboards/mechlovin/hannah910/keymaps/default/keymap.c new file mode 100644 index 000000000000..48499a111a7c --- /dev/null +++ b/keyboards/mechlovin/hannah910/keymaps/default/keymap.c @@ -0,0 +1,33 @@ +/* Copyright 2019 Mechlovin + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( /* Base */ + 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_DEL, + 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_INS, + LT(1,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_NUBS, KC_ENT, KC_HOME, + KC_LSFT, KC_NUHS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_all( /* Base */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), +}; \ No newline at end of file diff --git a/keyboards/mechlovin/hannah910/keymaps/default/readme.md b/keyboards/mechlovin/hannah910/keymaps/default/readme.md new file mode 100644 index 000000000000..6abbe27c4b0f --- /dev/null +++ b/keyboards/mechlovin/hannah910/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for hannah910 diff --git a/keyboards/mechlovin/hannah910/readme.md b/keyboards/mechlovin/hannah910/readme.md new file mode 100644 index 000000000000..6cc6b226f169 --- /dev/null +++ b/keyboards/mechlovin/hannah910/readme.md @@ -0,0 +1,15 @@ +# hannah910 + +![hannah910](https://i.imgur.com/n8WN5Z7.jpg) + +Replacement PCB and plate for TGR 910 keyboard + +Keyboard Maintainer: [Mechlovin'](/~https://github.com/mechlovin) +Hardware Supported: TGR910 CE, TGR910 SE +Hardware Availability: [Reddit Group Buy](https://www.reddit.com/r/mechmarket/comments/dhwvbn/gb_1015_update_hannah_910_group_buy_tgr_910/) + +Make example for this keyboard (after setting up your build environment): + + make mechlovin/hannah910:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/mechlovin/hannah910/rules.mk b/keyboards/mechlovin/hannah910/rules.mk new file mode 100644 index 000000000000..5e17282eb074 --- /dev/null +++ b/keyboards/mechlovin/hannah910/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +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 +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs \ No newline at end of file From 1f6cb53fb34867827c487e523f7134bab1acab04 Mon Sep 17 00:00:00 2001 From: Jonathan Rascher Date: Fri, 1 Nov 2019 20:48:58 -0500 Subject: [PATCH 249/316] [Keymap] Moar personal keymap and userspace tweaks (#7238) * Enable link-time optimization * Make RGB static gradient ranges shorter * Shift Quefrency media keys to the right * Shift KBD67 media keys to the right * Move some 60% keys from function to adjust layer * Set "extra" Lily58 keys to browser back/forward * Remove Instant60 EEPROM hack after #6968 * Remove unnecessary bits from macropad keymaps * Update KLE images --- keyboards/9key/keymaps/bcat/keymap.c | 5 +---- keyboards/9key/keymaps/bcat/rules.mk | 1 - .../kbd67/hotswap/keymaps/bcat/keymap.c | 6 +++--- .../kbd67/hotswap/keymaps/bcat/readme.md | 4 ++-- keyboards/keebio/bdn9/keymaps/bcat/keymap.c | 7 ++----- .../keebio/quefrency/keymaps/bcat/keymap.c | 6 +++--- .../keebio/quefrency/keymaps/bcat/readme.md | 4 ++-- keyboards/lily58/keymaps/bcat/keymap.c | 2 +- keyboards/lily58/keymaps/bcat/readme.md | 2 +- .../60_ansi_split_bs_rshift/bcat/keymap.c | 12 ++++++------ .../60_ansi_split_bs_rshift/bcat/readme.md | 12 ++++++------ .../community/60_tsangan_hhkb/bcat/keymap.c | 12 ++++++------ .../community/60_tsangan_hhkb/bcat/readme.md | 11 ++++++----- users/bcat/bcat.c | 6 ++++++ users/bcat/config.h | 18 ------------------ users/bcat/rules.mk | 5 +++++ 16 files changed, 50 insertions(+), 63 deletions(-) delete mode 100644 keyboards/9key/keymaps/bcat/rules.mk create mode 100644 users/bcat/bcat.c diff --git a/keyboards/9key/keymaps/bcat/keymap.c b/keyboards/9key/keymaps/bcat/keymap.c index c42bc76c2540..5c30d6308dd0 100644 --- a/keyboards/9key/keymaps/bcat/keymap.c +++ b/keyboards/9key/keymaps/bcat/keymap.c @@ -5,11 +5,8 @@ enum layer { LAYER_FUNCTION, }; -/* Switch to function layer when held. */ #define LY_FUNC MO(LAYER_FUNCTION) - -/* Send Ctrl+Alt+L (Cinnamon screen lock shortcut) when pressed. */ -#define KY_LOCK LCA(KC_L) +#define KY_LOCK LCA(KC_L) /* Cinnamon lock screen */ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [LAYER_DEFAULT] = LAYOUT( diff --git a/keyboards/9key/keymaps/bcat/rules.mk b/keyboards/9key/keymaps/bcat/rules.mk deleted file mode 100644 index 0ecc2bd66147..000000000000 --- a/keyboards/9key/keymaps/bcat/rules.mk +++ /dev/null @@ -1 +0,0 @@ -BOOTLOADER = caterina # Pro Micro diff --git a/keyboards/kbdfans/kbd67/hotswap/keymaps/bcat/keymap.c b/keyboards/kbdfans/kbd67/hotswap/keymaps/bcat/keymap.c index 879c97ba7e8a..71aed2b37bba 100644 --- a/keyboards/kbdfans/kbd67/hotswap/keymaps/bcat/keymap.c +++ b/keyboards/kbdfans/kbd67/hotswap/keymaps/bcat/keymap.c @@ -20,9 +20,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Function layer: http://www.keyboard-layout-editor.com/#/gists/f29128427f674c43777f045e363d1b44 */ [LAYER_FUNCTION] = LAYOUT( _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, _______, - KC_CAPS, KC_MPLY, KC_VOLU, KC_MSTP, _______, _______, EEP_RST, RESET, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, _______, - _______, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_CAPS, _______, KC_MPLY, KC_VOLU, KC_MSTP, _______, EEP_RST, RESET, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, _______, + _______, _______, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), }; diff --git a/keyboards/kbdfans/kbd67/hotswap/keymaps/bcat/readme.md b/keyboards/kbdfans/kbd67/hotswap/keymaps/bcat/readme.md index f07cf8c1c636..a0c2d97dfe3a 100644 --- a/keyboards/kbdfans/kbd67/hotswap/keymaps/bcat/readme.md +++ b/keyboards/kbdfans/kbd67/hotswap/keymaps/bcat/readme.md @@ -1,7 +1,7 @@ # bcat's KBD67 hotswap layout This is pretty much a stock 65% split keyboard layout, with an HHKB-style -(split) backspace and media keys in the function layer centered around the WASD +(split) backspace and media keys in the function layer centered around the ESDF cluster. ## Default layer @@ -12,6 +12,6 @@ cluster. ## Function layer -![Function layer layout](https://i.imgur.com/VQF5RBy.png) +![Function layer layout](https://i.imgur.com/E7Pf1gS.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/f29128427f674c43777f045e363d1b44)) diff --git a/keyboards/keebio/bdn9/keymaps/bcat/keymap.c b/keyboards/keebio/bdn9/keymaps/bcat/keymap.c index 7eab7217343c..05d324034c3c 100644 --- a/keyboards/keebio/bdn9/keymaps/bcat/keymap.c +++ b/keyboards/keebio/bdn9/keymaps/bcat/keymap.c @@ -5,18 +5,15 @@ enum layer { LAYER_SECOND, }; -/* Switch to second layer when held. */ #define LY_SECND MO(LAYER_SECOND) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* First layer (F1-F6) */ [LAYER_FIRST] = LAYOUT( KC_MUTE, LY_SECND, BL_BRTG, KC_F4, KC_F5, KC_F6, KC_F1, KC_F2, KC_F3 ), - /* Second layer (F7-F12) */ [LAYER_SECOND] = LAYOUT( EEP_RST, _______, RESET, KC_F10, KC_F11, KC_F12, @@ -26,12 +23,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { void encoder_update_user(uint8_t index, bool clockwise) { switch (index) { - /* Top-left encoder (volume): */ + /* Top-left encoder (volume) */ case 0: tap_code(clockwise ? KC_VOLU : KC_VOLD); break; - /* Top-right encoder (backlight brightness): */ + /* Top-right encoder (backlight brightness) */ case 1: if (clockwise) { backlight_increase(); diff --git a/keyboards/keebio/quefrency/keymaps/bcat/keymap.c b/keyboards/keebio/quefrency/keymaps/bcat/keymap.c index 7c9699def9d5..d74a55b4b118 100644 --- a/keyboards/keebio/quefrency/keymaps/bcat/keymap.c +++ b/keyboards/keebio/quefrency/keymaps/bcat/keymap.c @@ -20,9 +20,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Function layer: http://www.keyboard-layout-editor.com/#/gists/59636898946da51f91fb290f8e078b4d */ [LAYER_FUNCTION] = LAYOUT_65( _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, RGB_HUI, - KC_CAPS, KC_MPLY, KC_VOLU, KC_MSTP, _______, _______, EEP_RST, RESET, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, RGB_SAI, - _______, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_SAD, - _______, _______, KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, RGB_HUD, + KC_CAPS, _______, KC_MPLY, KC_VOLU, KC_MSTP, _______, EEP_RST, RESET, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, RGB_SAI, + _______, _______, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_SAD, + _______, _______, _______, KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, RGB_HUD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_RMOD, RGB_VAD, RGB_MOD ), }; diff --git a/keyboards/keebio/quefrency/keymaps/bcat/readme.md b/keyboards/keebio/quefrency/keymaps/bcat/readme.md index 3976bb858933..0436e1d2ce16 100644 --- a/keyboards/keebio/quefrency/keymaps/bcat/readme.md +++ b/keyboards/keebio/quefrency/keymaps/bcat/readme.md @@ -1,7 +1,7 @@ # bcat's Quefrency 65% layout This is pretty much a stock 65% split keyboard layout, with an HHKB-style -(split) backspace, media keys in the function layer centered around the WASD +(split) backspace, media keys in the function layer centered around the ESDF cluster, and RGB controls in the function layer on the arrow/nav keys. ## Default layer @@ -12,6 +12,6 @@ cluster, and RGB controls in the function layer on the arrow/nav keys. ## Function layer -![Function layer layout](https://i.imgur.com/PGCbgtS.png) +![Function layer layout](https://i.imgur.com/xE4CuH0.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/59636898946da51f91fb290f8e078b4d)) diff --git a/keyboards/lily58/keymaps/bcat/keymap.c b/keyboards/lily58/keymaps/bcat/keymap.c index 905e4ed76a48..9a85a55e1bcd 100644 --- a/keyboards/lily58/keymaps/bcat/keymap.c +++ b/keyboards/lily58/keymaps/bcat/keymap.c @@ -18,7 +18,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KY_CESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC, KC_RBRC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_WBAK, KC_WFWD, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_LCTL, KC_LALT, LY_LWR, KC_SPC, KC_ENT, LY_RSE, KC_RGUI, KC_APP ), diff --git a/keyboards/lily58/keymaps/bcat/readme.md b/keyboards/lily58/keymaps/bcat/readme.md index 5e0d6153a4c1..f90c5110bcc6 100644 --- a/keyboards/lily58/keymaps/bcat/readme.md +++ b/keyboards/lily58/keymaps/bcat/readme.md @@ -45,7 +45,7 @@ releasing the layer key. ## Default layer -![Default layer layout](https://i.imgur.com/KlzNei7.png) +![Default layer layout](https://i.imgur.com/wx1brJV.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/e0eb3af65961e9fd612dcff3ddd88e4f)) diff --git a/layouts/community/60_ansi_split_bs_rshift/bcat/keymap.c b/layouts/community/60_ansi_split_bs_rshift/bcat/keymap.c index cd13f6262508..92cc366aca21 100644 --- a/layouts/community/60_ansi_split_bs_rshift/bcat/keymap.c +++ b/layouts/community/60_ansi_split_bs_rshift/bcat/keymap.c @@ -22,18 +22,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Function layer: http://www.keyboard-layout-editor.com/#/gists/c7a55e75285d474b6301140eaf53f915 */ [LAYER_FUNCTION] = LAYOUT_60_ansi_split_bs_rshift( _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, - KC_CAPS, KC_MPLY, KC_VOLU, KC_MSTP, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, _______, - _______, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, - _______, _______, KC_MUTE, _______, _______, _______, _______, _______, KC_END, KC_PGDN, KC_DOWN, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), /* Adjust layer: http://www.keyboard-layout-editor.com/#/gists/6e1068e4f91bbacccaf5ac0acbeec79c */ [LAYER_ADJUST] = LAYOUT_60_ansi_split_bs_rshift( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, EEP_RST, RESET, _______, _______, _______, RGB_VAI, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI, RGB_SAI, RGB_RMOD, RGB_MOD, RGB_TOG, - _______, _______, _______, _______, _______, BL_BRTG, BL_DEC, BL_INC, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, + KC_CAPS, _______, KC_MPLY, KC_VOLU, KC_MSTP, _______, EEP_RST, RESET, KC_PSCR, KC_SLCK, KC_PAUS, RGB_VAI, _______, _______, + _______, _______, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, _______, RGB_HUI, RGB_SAI, RGB_RMOD, RGB_MOD, RGB_TOG, + _______, _______, _______, KC_MUTE, _______, BL_BRTG, BL_DEC, BL_INC, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), }; diff --git a/layouts/community/60_ansi_split_bs_rshift/bcat/readme.md b/layouts/community/60_ansi_split_bs_rshift/bcat/readme.md index f0db6417c074..35ce63196cb4 100644 --- a/layouts/community/60_ansi_split_bs_rshift/bcat/readme.md +++ b/layouts/community/60_ansi_split_bs_rshift/bcat/readme.md @@ -2,10 +2,10 @@ This is a hybrid of an HHKB layout and a standard ANSI bottom row. It's nice if you want to fill out a 60% case with no blockers, or just really want a 6.25U -spacebar. The arrow and navigation keys match a standard HHKB layout (using the -Fn key next to the right shift key), but the media keys are centered around the -WASD cluster instead of the usual HHKB layout. Additionally, the redundant Fn -key on the bottom row activates an adjust layer to control RGB underglow. +spacebar. The arrow and navigation keys match a standard HHKB layout using the +Fn key next to the right shift key. Additionally, the redundant Fn key on the +bottom row activates an adjust layer with controls for RGB underglow and +backlight, as well as media keys centered around the ESDF cluster. ## Default layer @@ -15,12 +15,12 @@ key on the bottom row activates an adjust layer to control RGB underglow. ## Function layer -![Function layer layout](https://i.imgur.com/XT3AtDl.png) +![Function layer layout](https://i.imgur.com/oLdVfn0.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/c7a55e75285d474b6301140eaf53f915)) ## Adjust layer -![Adjust layer layout](https://i.imgur.com/KxCtI50.png) +![Adjust layer layout](https://i.imgur.com/bqC6QYS.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/6e1068e4f91bbacccaf5ac0acbeec79c)) diff --git a/layouts/community/60_tsangan_hhkb/bcat/keymap.c b/layouts/community/60_tsangan_hhkb/bcat/keymap.c index bcc76292ea48..19516542f0a5 100644 --- a/layouts/community/60_tsangan_hhkb/bcat/keymap.c +++ b/layouts/community/60_tsangan_hhkb/bcat/keymap.c @@ -22,18 +22,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Function layer: http://www.keyboard-layout-editor.com/#/gists/f6311fd7e315de781143b80eb040a551 */ [LAYER_FUNCTION] = LAYOUT_60_tsangan_hhkb( _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, - KC_CAPS, KC_MPLY, KC_VOLU, KC_MSTP, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, _______, - _______, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, - _______, _______, KC_MUTE, _______, _______, _______, _______, _______, KC_END, KC_PGDN, KC_DOWN, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), /* Adjust layer: http://www.keyboard-layout-editor.com/#/gists/65ac939caec878401603bc36290852d4 */ [LAYER_ADJUST] = LAYOUT_60_tsangan_hhkb( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, EEP_RST, RESET, _______, _______, _______, RGB_VAI, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI, RGB_SAI, RGB_RMOD, RGB_MOD, RGB_TOG, - _______, _______, _______, _______, _______, BL_BRTG, BL_DEC, BL_INC, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, + KC_CAPS, _______, KC_MPLY, KC_VOLU, KC_MSTP, _______, EEP_RST, RESET, KC_PSCR, KC_SLCK, KC_PAUS, RGB_VAI, _______, _______, + _______, _______, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, _______, RGB_HUI, RGB_SAI, RGB_RMOD, RGB_MOD, RGB_TOG, + _______, _______, _______, KC_MUTE, _______, BL_BRTG, BL_DEC, BL_INC, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), }; diff --git a/layouts/community/60_tsangan_hhkb/bcat/readme.md b/layouts/community/60_tsangan_hhkb/bcat/readme.md index 2c1979365def..c0debdef5b74 100644 --- a/layouts/community/60_tsangan_hhkb/bcat/readme.md +++ b/layouts/community/60_tsangan_hhkb/bcat/readme.md @@ -1,9 +1,10 @@ # bcat's 60% Tsangan HHKB layout This is a normal Tsangan/HHKB (split backspace, split right shift) layout with -arrow and navigation keys that match a standard HHKB layout, as well as media -keys centered around the WASD cluster. Additionally, the redundant right Super -key on the bottom row actives an adjust layer to control RGB underglow. +arrow and navigation keys that match a standard HHKB layout. Additionally, the +redundant right Super key on the bottom row actives an adjust layer with +controls for RGB underglow and backlight, as well as media keys centered around +the ESDF cluster. ## Default layer @@ -13,12 +14,12 @@ key on the bottom row actives an adjust layer to control RGB underglow. ## Function layer -![Function layer layout](https://i.imgur.com/SwUddUV.png) +![Function layer layout](https://i.imgur.com/s2uyH2U.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/f6311fd7e315de781143b80eb040a551)) ## Adjust layer -![Adjust layer layout](https://i.imgur.com/Z6YIxdP.png) +![Adjust layer layout](https://i.imgur.com/BKNez3Z.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/65ac939caec878401603bc36290852d4)) diff --git a/users/bcat/bcat.c b/users/bcat/bcat.c new file mode 100644 index 000000000000..bea64dbaa9b1 --- /dev/null +++ b/users/bcat/bcat.c @@ -0,0 +1,6 @@ +#include "quantum.h" + +#if defined(RGBLIGHT_ENABLE) + /* Adjust RGB static hue ranges for shorter gradients than default. */ + const uint8_t RGBLED_GRADIENT_RANGES[] PROGMEM = {255, 127, 63, 31, 15}; +#endif diff --git a/users/bcat/config.h b/users/bcat/config.h index 5f49a4ed376a..f6be07bf6ebf 100644 --- a/users/bcat/config.h +++ b/users/bcat/config.h @@ -65,21 +65,3 @@ #define MOUSEKEY_WHEEL_MAX_SPEED 3 #define MOUSEKEY_WHEEL_TIME_TO_MAX 150 #endif - -#if defined(KEYBOARD_cannonkeys_instant60) - /* - * Work around EEPROM incompatibility with VIA: - * /~https://github.com/qmk/qmk_firmware/issues/6589#issuecomment-524042457. - */ - #undef EEPROM_MAGIC_ADDR - #undef EEPROM_VERSION_ADDR - #undef DYNAMIC_KEYMAP_EEPROM_ADDR - #undef EEPROM_CUSTOM_BACKLIGHT - #undef DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR - - #define EEPROM_MAGIC_ADDR 34 - #define EEPROM_VERSION_ADDR 36 - #define DYNAMIC_KEYMAP_EEPROM_ADDR 37 - #define EEPROM_CUSTOM_BACKLIGHT 637 - #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 638 -#endif diff --git a/users/bcat/rules.mk b/users/bcat/rules.mk index 107b470edb99..6d3444b2ce5f 100644 --- a/users/bcat/rules.mk +++ b/users/bcat/rules.mk @@ -1,3 +1,5 @@ +SRC += bcat.c + # Enable Bootmagic Lite to consistently reset to bootloader and clear EEPROM. BOOTMAGIC_ENABLE = lite @@ -16,3 +18,6 @@ SLEEP_LED_ENABLE = no UCIS_ENABLE = no UNICODE_ENABLE = no UNICODEMAP_ENABLE = no + +# Enable link-time optimization to reduce binary size. +LINK_TIME_OPTIMIZATION_ENABLE = yes From e6cc9cc78d40af1386f9a116d5fcc95c20233110 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Sat, 2 Nov 2019 13:06:03 +1100 Subject: [PATCH 250/316] Template updates (#7221) * Template updates * Flesh out info.json & keymap.c, and turn double spaces section into a list * Add enum to demonstrate layer naming * Semicolon --- quantum/template/avr/readme.md | 6 +-- quantum/template/avr/rules.mk | 1 + quantum/template/base/info.json | 18 +++++++ quantum/template/{avr => base}/keyboard.c | 25 +++++---- quantum/template/base/keyboard.h | 7 +-- .../template/base/keymaps/default/keymap.c | 19 +++++-- quantum/template/ps2avrgb/keyboard.c | 52 ------------------- quantum/template/ps2avrgb/readme.md | 6 +-- quantum/template/ps2avrgb/rules.mk | 18 ++++--- util/new_keyboard.sh | 2 + 10 files changed, 69 insertions(+), 85 deletions(-) rename quantum/template/{avr => base}/keyboard.c (68%) delete mode 100644 quantum/template/ps2avrgb/keyboard.c diff --git a/quantum/template/avr/readme.md b/quantum/template/avr/readme.md index 719222d37759..0430dd0fc931 100644 --- a/quantum/template/avr/readme.md +++ b/quantum/template/avr/readme.md @@ -4,9 +4,9 @@ A short description of the keyboard/project -Keyboard Maintainer: [%YOUR_NAME%](/~https://github.com/yourusername) -Hardware Supported: The PCBs, controllers supported -Hardware Availability: links to where you can find this hardware +* Keyboard Maintainer: [%YOUR_NAME%](/~https://github.com/yourusername) +* Hardware Supported: The PCBs, controllers supported +* Hardware Availability: Links to where you can find this hardware Make example for this keyboard (after setting up your build environment): diff --git a/quantum/template/avr/rules.mk b/quantum/template/avr/rules.mk index bb2bd14f9fa6..ea0c83c68a1c 100644 --- a/quantum/template/avr/rules.mk +++ b/quantum/template/avr/rules.mk @@ -13,6 +13,7 @@ BOOTLOADER = atmel-dfu # If you don't know the bootloader type, then you can specify the # Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Otherwise, delete this section # Teensy halfKay 512 # Teensy++ halfKay 1024 # Atmel DFU loader 4096 diff --git a/quantum/template/base/info.json b/quantum/template/base/info.json index e69de29bb2d1..b8e8f1f2dbb8 100644 --- a/quantum/template/base/info.json +++ b/quantum/template/base/info.json @@ -0,0 +1,18 @@ +{ + "keyboard_name": "%KEYBOARD%", + "url": "", + "maintainer": "%YOUR_NAME%", + "width": 3, + "height": 2, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"k00", "x":0, "y":0}, + {"label":"k01", "x":1, "y":0}, + {"label":"k02", "x":2, "y":0}, + {"label":"k10", "x":0, "y":1, "w":1.5}, + {"label":"k12", "x":1.5, "y":1, "w":1.5} + ] + } + } +} diff --git a/quantum/template/avr/keyboard.c b/quantum/template/base/keyboard.c similarity index 68% rename from quantum/template/avr/keyboard.c rename to quantum/template/base/keyboard.c index e852a42c4096..55e4fffd3a4e 100644 --- a/quantum/template/avr/keyboard.c +++ b/quantum/template/base/keyboard.c @@ -13,6 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + #include "%KEYBOARD%.h" // Optional override functions below. @@ -20,32 +21,30 @@ // These are only required if you want to perform custom actions. /* - void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up + // put your keyboard start-up code here + // runs once when the firmware starts up - matrix_init_user(); + matrix_init_user(); } void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) + // put your looping keyboard code here + // runs every cycle (a lot) - matrix_scan_user(); + 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 + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware - return process_record_user(keycode, record); + 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 + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - led_set_user(usb_led); + led_set_user(usb_led); } - */ diff --git a/quantum/template/base/keyboard.h b/quantum/template/base/keyboard.h index 2e531b1fd42b..8a21d9257831 100644 --- a/quantum/template/base/keyboard.h +++ b/quantum/template/base/keyboard.h @@ -13,11 +13,12 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + #pragma once #include "quantum.h" -/* This a shortcut to help you visually see your layout. +/* This is a shortcut to help you visually see your layout. * * The first section contains all of the arguments representing the physical * layout of the board and position of the keys. @@ -27,9 +28,9 @@ */ #define LAYOUT( \ k00, k01, k02, \ - k10, k11 \ + k10, k12 \ ) \ { \ { k00, k01, k02 }, \ - { k10, KC_NO, k11 }, \ + { k10, KC_NO, k12 } \ } diff --git a/quantum/template/base/keymaps/default/keymap.c b/quantum/template/base/keymaps/default/keymap.c index 3508055b7866..4d5bac7b2f41 100644 --- a/quantum/template/base/keymaps/default/keymap.c +++ b/quantum/template/base/keymaps/default/keymap.c @@ -15,6 +15,12 @@ */ #include QMK_KEYBOARD_H +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FN +}; + // Defines the keycodes used by our macros in process_record_user enum custom_keycodes { QMKBEST = SAFE_RANGE, @@ -22,10 +28,15 @@ enum custom_keycodes { }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT( /* Base */ - KC_A, KC_1, KC_H, - KC_TAB, KC_SPC + /* Base */ + [_BASE] = LAYOUT( + KC_A, KC_1, MO(_FN), + KC_TAB, KC_SPC ), + [_FN] = LAYOUT( + QMKBEST, QMKURL, _______, + RESET, XXXXXXX + ) }; bool process_record_user(uint16_t keycode, keyrecord_t *record) { @@ -50,6 +61,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } +/* void matrix_init_user(void) { } @@ -61,3 +73,4 @@ void matrix_scan_user(void) { void led_set_user(uint8_t usb_led) { } +*/ diff --git a/quantum/template/ps2avrgb/keyboard.c b/quantum/template/ps2avrgb/keyboard.c deleted file mode 100644 index 73cd668f85dd..000000000000 --- a/quantum/template/ps2avrgb/keyboard.c +++ /dev/null @@ -1,52 +0,0 @@ -/* Copyright %YEAR% %YOUR_NAME% - * - * 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 . - */ - -#include "%KEYBOARD%.h" - -// Optional override functions below. -// You can leave any or all of these undefined. -// These are only required if you want to perform custom actions. - -/* - -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/quantum/template/ps2avrgb/readme.md b/quantum/template/ps2avrgb/readme.md index 3dce0e950570..b45ef91c9dcb 100644 --- a/quantum/template/ps2avrgb/readme.md +++ b/quantum/template/ps2avrgb/readme.md @@ -4,9 +4,9 @@ A short description of the keyboard/project -Keyboard Maintainer: [%YOUR_NAME%](/~https://github.com/yourusername) -Hardware Supported: The PCBs, controllers supported -Hardware Availability: links to where you can find this hardware +* Keyboard Maintainer: [%YOUR_NAME%](/~https://github.com/yourusername) +* Hardware Supported: The PCBs, controllers supported +* Hardware Availability: links to where you can find this hardware Make example for this keyboard (after setting up your build environment): diff --git a/quantum/template/ps2avrgb/rules.mk b/quantum/template/ps2avrgb/rules.mk index ec57b03dcbce..b9b81a675003 100644 --- a/quantum/template/ps2avrgb/rules.mk +++ b/quantum/template/ps2avrgb/rules.mk @@ -11,14 +11,16 @@ MCU = atmega32a # ATmega328P USBasp BOOTLOADER = bootloadHID -# build options -BOOTMAGIC_ENABLE = no -MOUSEKEY_ENABLE = no -EXTRAKEY_ENABLE = yes -CONSOLE_ENABLE = yes -COMMAND_ENABLE = yes -BACKLIGHT_ENABLE = no -RGBLIGHT_ENABLE = yes +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow WS2812_DRIVER = i2c OPT_DEFS = -DDEBUG_LEVEL=0 diff --git a/util/new_keyboard.sh b/util/new_keyboard.sh index fe7c1a8299c4..11c6497e23c6 100755 --- a/util/new_keyboard.sh +++ b/util/new_keyboard.sh @@ -86,6 +86,7 @@ replace_year_placeholders() { replace_keyboard_placeholders() { local replace_keyboard_filenames=( "${keyboard_dir}/config.h" + "${keyboard_dir}/info.json" "${keyboard_dir}/readme.md" "${keyboard_dir}/${keyboard_name}.c" "${keyboard_dir}/keymaps/default/readme.md" @@ -97,6 +98,7 @@ replace_keyboard_placeholders() { replace_name_placeholders() { local replace_name_filenames=( "${keyboard_dir}/config.h" + "${keyboard_dir}/info.json" "${keyboard_dir}/readme.md" "${keyboard_dir}/${keyboard_name}.c" "${keyboard_dir}/${keyboard_name}.h" From ff8d43694659b36ea5215a4183d43f58fc7f01e9 Mon Sep 17 00:00:00 2001 From: umi <57262844+umi-umi@users.noreply.github.com> Date: Sat, 2 Nov 2019 22:11:36 +0900 Subject: [PATCH 251/316] correct description (#7240) --- docs/feature_haptic_feedback.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/feature_haptic_feedback.md b/docs/feature_haptic_feedback.md index acd156a27aa0..d9e445de86a6 100644 --- a/docs/feature_haptic_feedback.md +++ b/docs/feature_haptic_feedback.md @@ -22,7 +22,7 @@ Not all keycodes below will work depending on which haptic mechanism you have ch | Name | Description | |-----------|-------------------------------------------------------| |`HPT_ON` | Turn haptic feedback on | -|`HPT_OFF` | Turn haptic feedback on | +|`HPT_OFF` | Turn haptic feedback off | |`HPT_TOG` | Toggle haptic feedback on/off | |`HPT_RST` | Reset haptic feedback config to default | |`HPT_FBK` | Toggle feedback to occur on keypress, release or both | From 4531cc874e1bb8602fede9dc038b692673521590 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sat, 2 Nov 2019 21:20:03 +0000 Subject: [PATCH 252/316] Initial migration of software PWM backlight (#6709) * Initial migration of software PWM backlight * First pass at backlight driver docs * Correct driver name in docs * Run backlight_task when using BACKLIGHT_PINS * Resolve backlight docs TODOs --- common_features.mk | 21 +++-- docs/feature_backlight.md | 131 +++++++++++++++++++---------- quantum/backlight/backlight_avr.c | 10 +-- quantum/backlight/backlight_soft.c | 66 +++++++++++++++ quantum/quantum.c | 2 +- quantum/quantum.h | 4 +- 6 files changed, 173 insertions(+), 61 deletions(-) create mode 100644 quantum/backlight/backlight_soft.c diff --git a/common_features.mk b/common_features.mk index 7bb9187bbcb7..a1f95955a60c 100644 --- a/common_features.mk +++ b/common_features.mk @@ -234,7 +234,7 @@ ifeq ($(strip $(BACKLIGHT_CUSTOM_DRIVER)), yes) BACKLIGHT_ENABLE = custom endif -VALID_BACKLIGHT_TYPES := yes custom +VALID_BACKLIGHT_TYPES := yes software custom BACKLIGHT_ENABLE ?= no ifneq ($(strip $(BACKLIGHT_ENABLE)), no) @@ -246,19 +246,22 @@ ifneq ($(strip $(BACKLIGHT_ENABLE)), no) CIE1931_CURVE = yes endif - COMMON_VPATH += $(QUANTUM_DIR)/backlight SRC += $(QUANTUM_DIR)/backlight/backlight.c OPT_DEFS += -DBACKLIGHT_ENABLE - ifeq ($(strip $(BACKLIGHT_ENABLE)), custom) - OPT_DEFS += -DBACKLIGHT_CUSTOM_DRIVER - endif - - ifeq ($(PLATFORM),AVR) - SRC += $(QUANTUM_DIR)/backlight/backlight_avr.c + ifeq ($(strip $(BACKLIGHT_ENABLE)), software) + SRC += $(QUANTUM_DIR)/backlight/backlight_soft.c else - SRC += $(QUANTUM_DIR)/backlight/backlight_arm.c + ifeq ($(strip $(BACKLIGHT_ENABLE)), custom) + OPT_DEFS += -DBACKLIGHT_CUSTOM_DRIVER + endif + + ifeq ($(PLATFORM),AVR) + SRC += $(QUANTUM_DIR)/backlight/backlight_avr.c + else + SRC += $(QUANTUM_DIR)/backlight/backlight_arm.c + endif endif endif diff --git a/docs/feature_backlight.md b/docs/feature_backlight.md index 6a2946fd6df5..71f375594c4e 100644 --- a/docs/feature_backlight.md +++ b/docs/feature_backlight.md @@ -6,14 +6,16 @@ QMK is able to control the brightness of these LEDs by switching them on and off The MCU can only supply so much current to its GPIO pins. Instead of powering the backlight directly from the MCU, the backlight pin is connected to a transistor or MOSFET that switches the power to the LEDs. -## Usage +## Driver configuration Most keyboards have backlighting enabled by default if they support it, but if it is not working for you, check that your `rules.mk` includes the following: -```make -BACKLIGHT_ENABLE = yes +```makefile +BACKLIGHT_ENABLE = software # Valid driver values are 'yes,software,no' ``` +See below for help on individual drivers. + ## Keycodes Once enabled the following keycodes below can be used to change the backlight level. @@ -27,8 +29,54 @@ Once enabled the following keycodes below can be used to change the backlight le |`BL_DEC` |Decrease the backlight level | |`BL_BRTG`|Toggle backlight breathing | +## Backlight Functions + +|Function |Description | +|----------|-----------------------------------------------------------| +|`backlight_toggle()` |Turn the backlight on or off | +|`backlight_enable()` |Turn the backlight on | +|`backlight_disable()` |Turn the backlight off | +|`backlight_step()` |Cycle through backlight levels | +|`backlight_increase()` |Increase the backlight level | +|`backlight_decrease()` |Decrease the backlight level | +|`backlight_level(x)` |Sets the backlight level to specified level | +|`get_backlight_level()` |Return the current backlight level | +|`is_backlight_enabled()`|Return whether the backlight is currently on | + +### Backlight Breathing Functions + +|Function |Description | +|----------|---------------------------------------------------| +|`breathing_toggle()` |Turn the backlight breathing on or off | +|`breathing_enable()` |Turns on backlight breathing | +|`breathing_disable()` |Turns off backlight breathing | + +## Common Driver Configuration + +To change the behavior of the backlighting, `#define` these in your `config.h`: + +|Define |Default |Description | +|---------------------|-------------|--------------------------------------------------------------------------------------| +|`BACKLIGHT_LEVELS` |`3` |The number of brightness levels (maximum 31 excluding off) | +|`BACKLIGHT_CAPS_LOCK`|*Not defined*|Enable Caps Lock indicator using backlight (for keyboards without dedicated LED) | +|`BACKLIGHT_BREATHING`|*Not defined*|Enable backlight breathing, if supported | +|`BREATHING_PERIOD` |`6` |The length of one backlight "breath" in seconds | +|`BACKLIGHT_ON_STATE` |`0` |The state of the backlight pin when the backlight is "on" - `1` for high, `0` for low | + +### Backlight On State + +Most backlight circuits are driven by an N-channel MOSFET or NPN transistor. This means that to turn the transistor *on* and light the LEDs, you must drive the backlight pin, connected to the gate or base, *high*. +Sometimes, however, a P-channel MOSFET, or a PNP transistor is used. In this case, when the transistor is on, the pin is driven *low* instead. + +This functionality is configured at the keyboard level with the `BACKLIGHT_ON_STATE` define. + ## AVR driver +On AVR boards, the default driver currently sniffs the configuration to pick the best scenario. To enable it, add this to your rules.mk: +```makefile +BACKLIGHT_ENABLE = yes +``` + ### Caveats Hardware PWM is supported according to the following table: @@ -63,22 +111,10 @@ When both timers are in use for Audio, the backlight PWM will not use a hardware To change the behavior of the backlighting, `#define` these in your `config.h`: -|Define |Default |Description | -|---------------------|-------------|-------------------------------------------------------------------------------------------------------------| -|`BACKLIGHT_PIN` |`B7` |The pin that controls the LEDs. Unless you are designing your own keyboard, you shouldn't need to change this| -|`BACKLIGHT_PINS` |*Not defined*|experimental: see below for more information | -|`BACKLIGHT_LEVELS` |`3` |The number of brightness levels (maximum 31 excluding off) | -|`BACKLIGHT_CAPS_LOCK`|*Not defined*|Enable Caps Lock indicator using backlight (for keyboards without dedicated LED) | -|`BACKLIGHT_BREATHING`|*Not defined*|Enable backlight breathing, if supported | -|`BREATHING_PERIOD` |`6` |The length of one backlight "breath" in seconds | -|`BACKLIGHT_ON_STATE` |`0` |The state of the backlight pin when the backlight is "on" - `1` for high, `0` for low | - -### Backlight On State - -Most backlight circuits are driven by an N-channel MOSFET or NPN transistor. This means that to turn the transistor *on* and light the LEDs, you must drive the backlight pin, connected to the gate or base, *high*. -Sometimes, however, a P-channel MOSFET, or a PNP transistor is used. In this case, when the transistor is on, the pin is driven *low* instead. - -This functionality is configured at the keyboard level with the `BACKLIGHT_ON_STATE` define. +|Define |Default |Description | +|---------------------|-------------|--------------------------------------------------------------------------------------------------------------| +|`BACKLIGHT_PIN` |`B7` |The pin that controls the LEDs. Unless you are designing your own keyboard, you shouldn't need to change this | +|`BACKLIGHT_PINS` |*Not defined*|experimental: see below for more information | ### Multiple backlight pins @@ -103,7 +139,7 @@ In this way `OCRxx` essentially controls the duty cycle of the LEDs, and thus th The breathing effect is achieved by registering an interrupt handler for `TIMER1_OVF_vect` that is called whenever the counter resets, roughly 244 times per second. In this handler, the value of an incrementing counter is mapped onto a precomputed brightness curve. To turn off breathing, the interrupt handler is simply disabled, and the brightness reset to the level stored in EEPROM. -### Software PWM Implementation +### Timer Assisted PWM Implementation When `BACKLIGHT_PIN` is not set to a hardware backlight pin, QMK will use a hardware timer configured to trigger software interrupts. This time will count up to `ICRx` (by default `0xFFFF`) before resetting to 0. When resetting to 0, the CPU will fire an OVF (overflow) interrupt that will turn the LEDs on, starting the duty cycle. @@ -114,9 +150,14 @@ The breathing effect is the same as in the hardware PWM implementation. ## ARM Driver +While still in its early stages, ARM backlight support aims to eventually have feature parity with AVR. To enable it, add this to your rules.mk: +```makefile +BACKLIGHT_ENABLE = yes +``` + ### Caveats -Currently only hardware PWM is supported, and does not provide automatic configuration. +Currently only hardware PWM is supported, not timer assisted, and does not provide automatic configuration. ?> STMF072 support is being investigated. @@ -130,30 +171,32 @@ To change the behavior of the backlighting, `#define` these in your `config.h`: |`BACKLIGHT_PWM_DRIVER` |`PWMD4` |The PWM driver to use, see ST datasheets for pin to PWM timer mapping. Unless you are designing your own keyboard, you shouldn't need to change this| |`BACKLIGHT_PWM_CHANNEL` |`3` |The PWM channel to use, see ST datasheets for pin to PWM channel mapping. Unless you are designing your own keyboard, you shouldn't need to change this| |`BACKLIGHT_PAL_MODE` |`2` |The pin alternative function to use, see ST datasheets for pin AF mapping. Unless you are designing your own keyboard, you shouldn't need to change this| -|`BACKLIGHT_LEVELS` |`3` |The number of brightness levels (maximum 31 excluding off) | -|`BACKLIGHT_CAPS_LOCK` |*Not defined*|Enable Caps Lock indicator using backlight (for keyboards without dedicated LED) | -|`BACKLIGHT_BREATHING` |*Not defined*|Enable backlight breathing, if supported | -|`BREATHING_PERIOD` |`6` |The length of one backlight "breath" in seconds | -## Backlight Functions +## Software PWM Driver -|Function |Description | -|----------|-----------------------------------------------------------| -|`backlight_toggle()` |Turn the backlight on or off | -|`backlight_enable()` |Turn the backlight on | -|`backlight_disable()` |Turn the backlight off | -|`backlight_step()` |Cycle through backlight levels | -|`backlight_increase()` |Increase the backlight level | -|`backlight_decrease()` |Decrease the backlight level | -|`backlight_level(x)` |Sets the backlight level, from 0 to | -| |`BACKLIGHT_LEVELS` | -|`get_backlight_level()` |Return the current backlight level | -|`is_backlight_enabled()`|Return whether the backlight is currently on | +Emulation of PWM while running other keyboard tasks, it offers maximum hardware compatibility without extra platform configuration. The tradeoff is the backlight might jitter when the keyboard is busy. To enable, add this to your rules.mk: +```makefile +BACKLIGHT_ENABLE = software +``` -### Backlight Breathing Functions +### Software PWM Configuration + +To change the behavior of the backlighting, `#define` these in your `config.h`: + +|Define |Default |Description | +|-----------------|-------------|-------------------------------------------------------------------------------------------------------------| +|`BACKLIGHT_PIN` |`B7` |The pin that controls the LEDs. Unless you are designing your own keyboard, you shouldn't need to change this| +|`BACKLIGHT_PINS` |*Not defined*|experimental: see below for more information | -|Function |Description | -|----------|----------------------------------------------------------| -|`breathing_toggle()` |Turn the backlight breathing on or off | -|`breathing_enable()` |Turns on backlight breathing | -|`breathing_disable()` |Turns off backlight breathing | +### Multiple backlight pins + +Most keyboards have only one backlight pin which control all backlight LEDs (especially if the backlight is connected to an hardware PWM pin). +In software PWM, it is possible to define multiple backlight pins. All those pins will be turned on and off at the same time during the PWM duty cycle. +This feature allows to set for instance the Caps Lock LED (or any other controllable LED) brightness at the same level as the other LEDs of the backlight. This is useful if you have mapped LCTRL in place of Caps Lock and you need the Caps Lock LED to be part of the backlight instead of being activated when Caps Lock is on. + +To activate multiple backlight pins, you need to add something like this to your user `config.h`: + +```c +#undef BACKLIGHT_PIN +#define BACKLIGHT_PINS { F5, B2 } +``` diff --git a/quantum/backlight/backlight_avr.c b/quantum/backlight/backlight_avr.c index 445698f47c4c..648a37adf37e 100644 --- a/quantum/backlight/backlight_avr.c +++ b/quantum/backlight/backlight_avr.c @@ -159,7 +159,7 @@ # define BACKLIGHT_ON_STATE 0 # endif -void backlight_on(uint8_t backlight_pin) { +void backlight_on(pin_t backlight_pin) { # if BACKLIGHT_ON_STATE == 0 writePinLow(backlight_pin); # else @@ -167,7 +167,7 @@ void backlight_on(uint8_t backlight_pin) { # endif } -void backlight_off(uint8_t backlight_pin) { +void backlight_off(pin_t backlight_pin) { # if BACKLIGHT_ON_STATE == 0 writePinHigh(backlight_pin); # else @@ -191,16 +191,16 @@ void backlight_off(uint8_t backlight_pin) { # define FOR_EACH_LED(x) \ for (uint8_t i = 0; i < BACKLIGHT_LED_COUNT; i++) { \ - uint8_t backlight_pin = backlight_pins[i]; \ + pin_t backlight_pin = backlight_pins[i]; \ { x } \ } -static const uint8_t backlight_pins[BACKLIGHT_LED_COUNT] = BACKLIGHT_PIN_INIT; +static const pin_t backlight_pins[BACKLIGHT_LED_COUNT] = BACKLIGHT_PIN_INIT; # else // full hardware PWM // we support only one backlight pin -static const uint8_t backlight_pin = BACKLIGHT_PIN; +static const pin_t backlight_pin = BACKLIGHT_PIN; # define FOR_EACH_LED(x) x # endif diff --git a/quantum/backlight/backlight_soft.c b/quantum/backlight/backlight_soft.c new file mode 100644 index 000000000000..a6aba7782cba --- /dev/null +++ b/quantum/backlight/backlight_soft.c @@ -0,0 +1,66 @@ +#include "quantum.h" +#include "backlight.h" + +#if !defined(BACKLIGHT_PIN) && !defined(BACKLIGHT_PINS) +# error "Backlight pin/pins not defined. Please configure." +#endif + +#ifdef BACKLIGHT_BREATHING +# error "Backlight breathing is not available for software PWM. Please disable." +#endif + +#ifndef BACKLIGHT_ON_STATE +# define BACKLIGHT_ON_STATE 0 +#endif + +#ifdef BACKLIGHT_PINS +# define BACKLIGHT_PIN_INIT BACKLIGHT_PINS +#else +# define BACKLIGHT_PIN_INIT \ + { BACKLIGHT_PIN } +#endif + +static const pin_t backlight_pins[] = BACKLIGHT_PIN_INIT; +#define BACKLIGHT_LED_COUNT (sizeof(backlight_pins) / sizeof(pin_t)) + +#define FOR_EACH_LED(x) \ + for (uint8_t i = 0; i < BACKLIGHT_LED_COUNT; i++) { \ + pin_t backlight_pin = backlight_pins[i]; \ + { x } \ + } + +void backlight_on(pin_t backlight_pin) { +#if BACKLIGHT_ON_STATE == 0 + writePinLow(backlight_pin); +#else + writePinHigh(backlight_pin); +#endif +} + +void backlight_off(pin_t backlight_pin) { +#if BACKLIGHT_ON_STATE == 0 + writePinHigh(backlight_pin); +#else + writePinLow(backlight_pin); +#endif +} + +void backlight_init_ports(void) { + // Setup backlight pin as output and output to on state. + FOR_EACH_LED(setPinOutput(backlight_pin); backlight_on(backlight_pin);) +} + +void backlight_task(void) { + static uint8_t backlight_tick = 0; + + if ((0xFFFF >> (get_backlight_level() * ((BACKLIGHT_LEVELS + 1) / 2))) & (1 << backlight_tick)) { + FOR_EACH_LED(backlight_on(backlight_pin);) + } else { + FOR_EACH_LED(backlight_off(backlight_pin);) + } + backlight_tick = (backlight_tick + 1) % 16; +} + +void backlight_set(uint8_t level) { + // noop as backlight_task uses get_backlight_level() +} diff --git a/quantum/quantum.c b/quantum/quantum.c index d689a9fbfbd9..571dda4c5bed 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -981,7 +981,7 @@ void matrix_scan_quantum() { #if defined(BACKLIGHT_ENABLE) # if defined(LED_MATRIX_ENABLE) led_matrix_task(); -# elif defined(BACKLIGHT_PIN) +# elif defined(BACKLIGHT_PIN) || defined(BACKLIGHT_PINS) backlight_task(); # endif #endif diff --git a/quantum/quantum.h b/quantum/quantum.h index f5ac97379d33..01abe1c0a137 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h @@ -257,8 +257,8 @@ void tap_code16(uint16_t code); void backlight_init_ports(void); void backlight_task(void); void backlight_task_internal(void); -void backlight_on(uint8_t backlight_pin); -void backlight_off(uint8_t backlight_pin); +void backlight_on(pin_t backlight_pin); +void backlight_off(pin_t backlight_pin); # ifdef BACKLIGHT_BREATHING void breathing_task(void); From 1249da4e8eab0be8618a5ea6a718eb757684f244 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sat, 2 Nov 2019 21:21:00 +0000 Subject: [PATCH 253/316] Use task driven PWM for CTPC until ARM can provide automatic configuration (#6928) * Use task driven PWM for CTPC until ARM can provide automatic configuration * Update CTPC docs to cover backlight --- docs/proton_c_conversion.md | 10 ++++++++++ quantum/stm32/proton_c.mk | 6 +++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/docs/proton_c_conversion.md b/docs/proton_c_conversion.md index be7d50a9f41c..8014a35e04cb 100644 --- a/docs/proton_c_conversion.md +++ b/docs/proton_c_conversion.md @@ -19,3 +19,13 @@ Before being able to compile, you may get some errors about `PORTB/DDRB`, etc no The Proton C only has one on-board LED (C13), and by default, the TXLED (D5) is mapped to it. If you want the RXLED (B0) mapped to it instead, add this like to your `config.h`: #define CONVERT_TO_PROTON_C_RXLED + +## Feature Conversion + +These are defaults based on what has been implemented for ARM boards. + +| Feature | Notes | +|-------------------------------------|------------------------------------------------------------------------------------------------------------------| +| [Audio](feature_audio.md) | Enabled | +| [RGB Lighting](feature_rgblight.md) | Disabled | +| [Backlight](feature_backlight.md) | Forces [task driven PWM](feature_backlight.md#software-pwm-driver) until ARM can provide automatic configuration | diff --git a/quantum/stm32/proton_c.mk b/quantum/stm32/proton_c.mk index a65e283d3f16..193e09ca1e09 100644 --- a/quantum/stm32/proton_c.mk +++ b/quantum/stm32/proton_c.mk @@ -3,7 +3,11 @@ # These are defaults based on what has been implemented for ARM boards AUDIO_ENABLE = yes RGBLIGHT_ENABLE = no -BACKLIGHT_ENABLE = no + +# Force task driven PWM until ARM can provide automatic configuration +ifneq ($(strip $(BACKLIGHT_ENABLE)), no) + BACKLIGHT_ENABLE = software +endif # The rest of these settings shouldn't change From bed98091aa4e2b555e092760d49856e38f2c9657 Mon Sep 17 00:00:00 2001 From: Xavier Hahn Date: Sun, 3 Nov 2019 17:02:44 +0100 Subject: [PATCH 254/316] French translation - FAQ section (#6995) * Translated faq.md and added all other files (copy from English) * Translated driver_installation_zadig.md in French * Translated faq_build.md in French * Translated faq_debug in French * Translateed faq_general.md in French * Translated first part of faq_keymap.md * Renamed docs/fr-FR folder to docs/fr-fr * Finished translation of faq_keymap.md * Update faq_build.md * Review (#3) * Review * Update docs/fr-fr/faq_keymap.md * Update docs/fr-fr/faq_debug.md * Fix some PR comments Co-Authored-By: Noan Mousy <4sstylz@protonmail.ch> Co-Authored-By: Wermeille Bastien --- docs/{fr-FR => fr-fr}/ChangeLog/20190830.md | 0 docs/{fr-FR => fr-fr}/README.md | 0 docs/{fr-FR => fr-fr}/_summary.md | 46 ++-- docs/{fr-FR => fr-fr}/breaking_changes.md | 0 docs/{fr-FR => fr-fr}/cli.md | 0 docs/{fr-FR => fr-fr}/cli_configuration.md | 0 docs/{fr-FR => fr-fr}/contributing.md | 0 docs/fr-fr/driver_installation_zadig.md | 46 ++++ docs/fr-fr/faq.md | 6 + docs/fr-fr/faq_build.md | 182 ++++++++++++++ docs/fr-fr/faq_debug.md | 236 ++++++++++++++++++ docs/fr-fr/faq_general.md | 16 ++ docs/fr-fr/faq_keymap.md | 226 +++++++++++++++++ docs/{fr-FR => fr-fr}/flashing.md | 0 .../getting_started_getting_help.md | 0 .../getting_started_github.md | 0 .../getting_started_introduction.md | 0 docs/{fr-FR => fr-fr}/newbs.md | 0 docs/{fr-FR => fr-fr}/newbs_best_practices.md | 0 .../newbs_building_firmware.md | 0 .../newbs_building_firmware_configurator.md | 0 docs/{fr-FR => fr-fr}/newbs_flashing.md | 0 .../{fr-FR => fr-fr}/newbs_getting_started.md | 0 .../newbs_learn_more_resources.md | 0 .../newbs_testing_debugging.md | 0 25 files changed, 735 insertions(+), 23 deletions(-) rename docs/{fr-FR => fr-fr}/ChangeLog/20190830.md (100%) rename docs/{fr-FR => fr-fr}/README.md (100%) rename docs/{fr-FR => fr-fr}/_summary.md (79%) rename docs/{fr-FR => fr-fr}/breaking_changes.md (100%) rename docs/{fr-FR => fr-fr}/cli.md (100%) rename docs/{fr-FR => fr-fr}/cli_configuration.md (100%) rename docs/{fr-FR => fr-fr}/contributing.md (100%) create mode 100644 docs/fr-fr/driver_installation_zadig.md create mode 100644 docs/fr-fr/faq.md create mode 100644 docs/fr-fr/faq_build.md create mode 100644 docs/fr-fr/faq_debug.md create mode 100644 docs/fr-fr/faq_general.md create mode 100644 docs/fr-fr/faq_keymap.md rename docs/{fr-FR => fr-fr}/flashing.md (100%) rename docs/{fr-FR => fr-fr}/getting_started_getting_help.md (100%) rename docs/{fr-FR => fr-fr}/getting_started_github.md (100%) rename docs/{fr-FR => fr-fr}/getting_started_introduction.md (100%) rename docs/{fr-FR => fr-fr}/newbs.md (100%) rename docs/{fr-FR => fr-fr}/newbs_best_practices.md (100%) rename docs/{fr-FR => fr-fr}/newbs_building_firmware.md (100%) rename docs/{fr-FR => fr-fr}/newbs_building_firmware_configurator.md (100%) rename docs/{fr-FR => fr-fr}/newbs_flashing.md (100%) rename docs/{fr-FR => fr-fr}/newbs_getting_started.md (100%) rename docs/{fr-FR => fr-fr}/newbs_learn_more_resources.md (100%) rename docs/{fr-FR => fr-fr}/newbs_testing_debugging.md (100%) diff --git a/docs/fr-FR/ChangeLog/20190830.md b/docs/fr-fr/ChangeLog/20190830.md similarity index 100% rename from docs/fr-FR/ChangeLog/20190830.md rename to docs/fr-fr/ChangeLog/20190830.md diff --git a/docs/fr-FR/README.md b/docs/fr-fr/README.md similarity index 100% rename from docs/fr-FR/README.md rename to docs/fr-fr/README.md diff --git a/docs/fr-FR/_summary.md b/docs/fr-fr/_summary.md similarity index 79% rename from docs/fr-FR/_summary.md rename to docs/fr-fr/_summary.md index 16ae82d06322..eef4861763d8 100644 --- a/docs/fr-FR/_summary.md +++ b/docs/fr-fr/_summary.md @@ -1,32 +1,32 @@ **En Français** -* [Guide pour débutant complet](fr-FR/newbs.md) - * [Pour débuter](fr-FR/newbs_getting_started.md) - * [Compiler son premier firmware](fr-FR/newbs_building_firmware.md) - * [Flasher le Firmware](fr-FR/newbs_flashing.md) - * [Test et Débuggage](fr-FR/newbs_testing_debugging.md) - * [Bonnes pratiques Git](fr-FR/newbs_best_practices.md) - * [Ressources d'apprentissage](fr-FR/newbs_learn_more_resources.md) +* [Guide pour débutant complet](fr-fr/newbs.md) + * [Pour débuter](fr-fr/newbs_getting_started.md) + * [Compiler son premier firmware](fr-fr/newbs_building_firmware.md) + * [Flasher le Firmware](fr-fr/newbs_flashing.md) + * [Test et Débuggage](fr-fr/newbs_testing_debugging.md) + * [Bonnes pratiques Git](fr-fr/newbs_best_practices.md) + * [Ressources d'apprentissage](fr-fr/newbs_learn_more_resources.md) -* [Les bases de QMK](fr-FR/README.md) - * [Indroduction à QMK](fr-FR/getting_started_introduction.md) - * [QMK CLI](fr-FR/cli.md) - * [Configuration de la CLI QMK](fr-FR/cli_configuration.md) - * [Contribuer à QMK](fr-FR/contributing.md) - * [Comment utiliser GitHub](fr-FR/getting_started_github.md) - * [Trouver de l'aide](fr-FR/getting_started_getting_help.md) +* [Les bases de QMK](fr-fr/README.md) + * [Indroduction à QMK](fr-fr/getting_started_introduction.md) + * [QMK CLI](fr-fr/cli.md) + * [Configuration de la CLI QMK](fr-fr/cli_configuration.md) + * [Contribuer à QMK](fr-fr/contributing.md) + * [Comment utiliser GitHub](fr-fr/getting_started_github.md) + * [Trouver de l'aide](fr-fr/getting_started_getting_help.md) -* [Breaking changes](fr-FR/breaking_changes.md) - * [30 août 2019](fr-FR/ChangeLog/20190830.md) +* [Breaking changes](fr-fr/breaking_changes.md) + * [30 août 2019](fr-fr/ChangeLog/20190830.md) -**En Anglais** +* [FAQ](fr-fr/faq.md) + * [FAQ Générale](fr-fr/faq_general.md) + * [Compiler QMK](fr-fr/faq_build.md) + * [Débugguer / Dépanner QMK](fr-fr/faq_debug.md) + * [Keymap / Disposition](fr-fr/faq_keymap.md) + * [Installer les drivers avec Zadig](fr-fr/driver_installation_zadig.md) -* [FAQ](faq.md) - * [FAQ Générale](faq_general.md) - * [Compiler QMK](faq_build.md) - * [Débugguer / Dépanner QMK](faq_debug.md) - * [Keymap / Disposition](faq_keymap.md) - * [Installer les drivers avec Zadig](driver_installation_zadig.md) +**En Anglais** * Guides détaillés * [Installation des outils de compilation](getting_started_build_tools.md) diff --git a/docs/fr-FR/breaking_changes.md b/docs/fr-fr/breaking_changes.md similarity index 100% rename from docs/fr-FR/breaking_changes.md rename to docs/fr-fr/breaking_changes.md diff --git a/docs/fr-FR/cli.md b/docs/fr-fr/cli.md similarity index 100% rename from docs/fr-FR/cli.md rename to docs/fr-fr/cli.md diff --git a/docs/fr-FR/cli_configuration.md b/docs/fr-fr/cli_configuration.md similarity index 100% rename from docs/fr-FR/cli_configuration.md rename to docs/fr-fr/cli_configuration.md diff --git a/docs/fr-FR/contributing.md b/docs/fr-fr/contributing.md similarity index 100% rename from docs/fr-FR/contributing.md rename to docs/fr-fr/contributing.md diff --git a/docs/fr-fr/driver_installation_zadig.md b/docs/fr-fr/driver_installation_zadig.md new file mode 100644 index 000000000000..9e7d77b6dc42 --- /dev/null +++ b/docs/fr-fr/driver_installation_zadig.md @@ -0,0 +1,46 @@ +# Installation du driver du bootloader avec Zadig + +Vous n’aurez pas besoin de pilote particulier pour utiliser un clavier QMK. En effet, QMK se présente à l'ordinateur hôte comme un clavier HID standard et sera reconnu sans problème. Cependant vous aurez peut-être besoin d'un pilote pour flasher votre clavier avec Windows. En effet, quand vous redémarrerez votre clavier en mode bootloader, le périphérique que détectera Windows ne sera pas un clavier mais un périphérique bootloader. + +Il existe deux exceptions : le bootloader Caterina, qui se trouve en général sur les Pro Micros, et le bootloader Halfkay, livré avec les Teensy de PJRC. Ils apparaissent respectivement sous la forme d'un port série et d'un périphérique HID générique, ne nécessitant pas de pilote particulier. + +Nous vous recommandons d'utiliser l'utilitaire [Zadig](https://zadig.akeo.ie/). Si vous avez configuré votre environnement de développement avec Msys2 ou WSL, le script `qmk_install.sh` vous aura proposé l'installation des pilotes durant le processus. + +## Installation + +Passez votre clavier en mode bootloader, soit en appuyant sur le keycode `RESET` (qui peut se trouver dans un calque différent) ou en appuyant sur le bouton reset qui se trouve en général sous la board. Si votre clavier n'a aucune de ces options, essayez de le brancher en maintenant Escape ou Espace+`B` appuyés (voir la documentation de [Bootmagic](feature_bootmagic.md) pour plus de détails). Certaines boards utilisent [Command](feature_command.md) à la place de Bootmagic. Dans ce cas, vous pouvez entrer en mode bootloader en appuyant, à n'importe quel moment lorsque le clavier est branché, sur les combinaisons de touches Shift Gauche+Shift Droit+`B` ou Shift Gauche+Shift Droit+Escape. +Certains claviers ont des instructions spécifiques pour passer en mode bootloader. Par exemple, la touche [Bootmagic Lite]](feature_bootmagic.md#bootmagic-lite) (défaut : Échap) peut être sur une touche différente telle que Contrôle Gauche. La combinaison pour la Command (défaut : Shift Gauche+Shift Droit) peut être différente, par exemple Contrôle Gauche+Contrôle Droit. Référez-vous au fichier README de votre clavier. + +Pour mettre un clavier en mode bootloader avec USBaspLoader, appuyez sur le bouton `RESET` tout en maintenant le bouton `BOOT`. Vous pouvez aussi maintenir le bouton `BOOT` en branchant le câble USB. + +Zadig détectera automatiquement les périphériques en mode bootloader. Il se peut toutefois que vous deviez vérifier en passant par **Options → List All Devices**. + + + - Pour les claviers avec des MCUs Atmel AVR, le bootloader aura un nom similaire à `ATm32U4DFU`, et un Vendor ID `03EB`. + - Les bootloaders USBasp s'appelleront `USBasp`, avec un VID/PID `16C0:05DC`. + - Les claviers AVR flashé avec le bootloader QMK-DFU s'appelleront ` Bootloader` et auront aussi le VID `03EB`. + - Pour la plupart des claviers ARM, ils s'appelleront `STM32 BOOTLOADER`, et auront un VID/PID `0483:DF11`. + +!> Si Zadig affiche certains de vos périphériques avec le driver `HidUsb`, votre clavier n'est probablement pas en mode bootloader. La flèche aura une couleur orange et vous aurez un message de confirmation vous demandant de modifier un pilote système. **Ne continuez pas!** + +Si la flèche apparaît en vert, sélectionnez le driver et appuyez sur le bouton **Install Driver**. Le driver `libusb-win32` devrait normalement fonctionner pour AVR, et `WinUSB` pour ARM. Si vous avez des problèmes pour flasher la board, essayez d'installer un pilote différent de la liste. Pour flasher un périphérique USBaspLoader en ligne de commande avec msys2, le driver `libusbk` est recommandé, sinon `libusb-win32` devrait fonctionner correctement si vous utilisez QMK Toolbox pour flasher. + +![Zadig montrant un driver de bootloader installé correctement](https://i.imgur.com/b8VgXzx.png) + +Finalement, débranchez et rebranchez le clavier afin de vous assurer que le nouveau pilote a bien été chargé. Si vous utilisez QMK Toolbox pour flasher, redémarrez-le aussi, il arrive qu'il n'arrive pas à détecter le changement de driver. + +## Récupérer l'installation du mauvais périphérique + +Si vous n'arrivez plus à saisir de texte avec le clavier, il est possible que vous ayez installé le driver sur le clavier au lieu du bootloader. Vous pouvez facilement vérifier ceci dans Zadig. Un clavier fonctionnel a le pilote `HidUsb` installé sur toutes ses interfaces : + +![Un clavier fonctionnel vu par Zadig](https://i.imgur.com/Hx0E5kC.png) + +Ouvrez le Gestionnaire de périphériques et cherchez un périphérique qui ressemble à votre clavier. + +![La board avec le mauvais driver installé, dans le Gestionnaire de périphériques](https://i.imgur.com/L3wvX8f.png) + +Cliquez dessus avec le bouton droit et sélectionner **Désinstaller le périphérique**. Faites bien attention à sélectionner **Supprimer le pilote pour ce périphérique** avant de valider. + +![Le dialogue Suppression de périphérique, avec la boîte "suppression de pilote" cochée](https://i.imgur.com/aEs2RuA.png) + +Appuyez sur **Action → Analyser les changements de hardware**. A ce stade, vous devriez pouvoir saisir à nouveau. Vérifiez dans Zadig que les périphériques utilisent bien le pilote `HidUsb`. Si c'est le cas, vous avez corrigé le problème, votre clavier devrait fonctionner à nouveau ! diff --git a/docs/fr-fr/faq.md b/docs/fr-fr/faq.md new file mode 100644 index 000000000000..89576b3cc280 --- /dev/null +++ b/docs/fr-fr/faq.md @@ -0,0 +1,6 @@ +# Foire Aux Questions + +* [FAQ Générale](faq_general.md) +* [Construire ou Compiler QMK](faq_build.md) +* [Débuguer et Dépanner QMK](faq_debug.md) +* [Keymap (disposition)](faq_keymap.md) diff --git a/docs/fr-fr/faq_build.md b/docs/fr-fr/faq_build.md new file mode 100644 index 000000000000..774bf6880f00 --- /dev/null +++ b/docs/fr-fr/faq_build.md @@ -0,0 +1,182 @@ +# Foire aux questions sur la compilation + +Cette page couvre les questions concernant la compilation de QMK. Si vous ne l'avez pas encore fait, vous devriez lire les guides [Configuration de l'environnement de build](getting_started_build_tools.md) et [Instructions pour Make](getting_started_make_guide.md). + +## Je ne peux pas programmer sous Linux + +Vous aurez besoin des permissions appropriées pour utiliser un périphérique. Pour les utilisateurs de Linux, référez-vous aux instructions concernant les règles `udev` ci-dessous. Si `udev` vous pose des problèmes, une alternative est d'utiliser la commande `sudo`. Si vous ne connaissez pas cette commande, référez-vous à son manuel d'utilisation en utilisant `man sudo` ou [regardez cette page](https://linux.die.net/man/8/sudo). + +Un exemple utilisant `sudo`, lorsque votre contrôleur est un ATMega32u4 : + + $ sudo dfu-programmer atmega32u4 erase --force + $ sudo dfu-programmer atmega32u4 flash your.hex + $ sudo dfu-programmer atmega32u4 reset + +ou simplement : + + $ sudo make ::dfu + +Veuillez noter que lancer `make` avec `sudo` est généralement une **mauvaise** idée, et vous devriez préférer une des méthodes précédente, si possible. + +### Règles `udev` pour Linux + +Sous Linux, vous aurez besoin des permissions appropriées pour accéder au MCU (le micro-contrôleur). Vous avez le choix d'utiliser `sudo` en flashant le firmware, ou placer ces fichiers dans `/etc/udev/rules.d`. Une fois ajouté, lancez les commandes suivantes : + +```console +sudo udevadm control --reload-rules +sudo udevadm trigger +``` + +**/etc/udev/rules.d/50-atmel-dfu.rules:** +``` +# Atmel ATMega32U4 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff4", MODE:="0666" +# Atmel USBKEY AT90USB1287 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ffb", MODE:="0666" +# Atmel ATMega32U2 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff0", MODE:="0666" +``` + +**/etc/udev/rules.d/52-tmk-keyboard.rules:** +``` +# tmk keyboard products /~https://github.com/tmk/tmk_keyboard +SUBSYSTEMS=="usb", ATTRS{idVendor}=="feed", MODE:="0666" +``` + +**/etc/udev/rules.d/54-input-club-keyboard.rules:** + +``` +# Input Club keyboard bootloader +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1c11", MODE:="0666" +``` + +**/etc/udev/rules.d/55-catalina.rules:** +``` +# ModemManager should ignore the following devices +ATTRS{idVendor}=="2a03", ENV{ID_MM_DEVICE_IGNORE}="1" +ATTRS{idVendor}=="2341", ENV{ID_MM_DEVICE_IGNORE}="1" +``` + +**Note:** Le filtrage utilisant ModemManager fonctionnera uniquement si vous n'êtes pas en mode strict. Les commandes suivantes peuvent changer cette option : + +```console +sudo sed -i 's/--filter-policy=strict/--filter-policy=default/' /lib/systemd/system/ModemManager.service +sudo systemctl daemon-reload +sudo systemctl restart ModemManager +``` + +**/etc/udev/rules.d/56-dfu-util.rules:** + +``` +# stm32duino +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1eaf", ATTRS{idProduct}=="0003", MODE:="0666" +# Generic stm32 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE:="0666" +``` + +### Le périphérique sériel n'est pas détecté en mode bootloader sous Linux + +Assurez-vous que votre kernel ait un support approprié pour votre périphérique. Si votre périphérique utilise USB ACM, par exemple pour les Pro Micro (AtMega32u4), assurez-vous d'inclure `CONFIG_USB_ACM=y`. D'autres périphériques peuvent avoir besoin de `USB_SERIAL` et de ses sous-options. + +## Périphérique inconnu pour le bootloader DFU + +Les problèmes rencontrés lorsque l'on flash des claviers sous Windows sont, la plupart du temps, dus à une installation du mauvais pilote, ou un pilote manquant. + +Relancer le script d'installation de QMK (`./util/qmk_install.sh` situé dans répertoire `qmk_firmware`sous MSYS2 ou WSL) ou réinstaller la QMK Toolbox peut résoudre le problème. Une alternative est de télécharger et lancer manuellement le package [`qmk_driver_installer`](/~https://github.com/qmk/qmk_driver_installer). + +Si vous rencontrez toujours des problèmes, essayez de télécharger et lancer Zadig. Voir [Installation du driver du bootloader avec Zadig](driver_installation_zadig.md) pour plus d'informations. + +## WINAVR est obsolète + +Il n'est plus recommandé et peut causer des problèmes. Voir [TMK Issue #99](/~https://github.com/tmk/tmk_keyboard/issues/99). + +## USB VID et PID + +Vous pouvez utiliser l'ID de votre choix en modifier `config.h`. Il y a peu de chance de conflit avec d'autres produits. + +La plupart des boards QMK utilisent `0xFEED` comme vendor ID. Vérifiez les autres claviers pour être sûr de choisir un Product ID unique. + +Étudiez aussi ce ticket +/~https://github.com/tmk/tmk_keyboard/issues/150 + +Vous pouvez acheter un VID:PID unique ici. Je ne pense pas que ce soit nécessaire pour un usage personnel. +- http://www.obdev.at/products/vusb/license.html +- http://www.mcselec.com/index.php?page=shop.product_details&flypage=shop.flypage&product_id=92&option=com_phpshop&Itemid=1 + +## Cortex: `cstddef: No such file or directory` + +Ce problème existait avec le GCC 4.8 d'Ubuntu 14.04, la solution a nécessité de mettre à jour vers 4.9 avec ce PPA. +https://launchpad.net/~terry.guo/+archive/ubuntu/gcc-arm-embedded + +/~https://github.com/tmk/tmk_keyboard/issues/212 +/~https://github.com/tmk/tmk_keyboard/wiki/mbed-cortex-porting#compile-error-cstddef +https://developer.mbed.org/forum/mbed/topic/5205/ + +## `clock_prescale_set` and `clock_div_1` Not Available + +Votre chaîne d'outils (Toolchain) est trop vieille pour supporter le MCU. Par exemple, WinAVR 20100110 ne supporte pas ATMega32u2. + +``` +Compiling C: ../../tmk_core/protocol/lufa/lufa.c +avr-gcc -c -mmcu=atmega32u2 -gdwarf-2 -DF_CPU=16000000UL -DINTERRUPT_CONTROL_ENDPOINT -DBOOTLOADER_SIZE=4096 -DF_USB=16000000UL -DARCH=ARCH_AVR8 -DUSB_DEVICE_ONLY -DUSE_FLASH_DESCRIPTORS -DUSE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)" -DFIXED_CONTROL_ENDPOINT_SIZE=8 -DFIXED_NUM_CONFIGURATIONS=1 -DPROTOCOL_LUFA -DEXTRAKEY_ENABLE -DCONSOLE_ENABLE -DCOMMAND_ENABLE -DVERSION=unknown -Os -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections -fno-inline-small-functions -fpack-struct -fshort-enums -fno-strict-aliasing -Wall -Wstrict-prototypes -Wa,-adhlns=obj_alps64/protocol/lufa/lufa.lst -I. -I../../tmk_core -I../../tmk_core/protocol/lufa -I../../tmk_core/protocol/lufa/LUFA-git -I../../tmk_core/common -std=gnu99 -include config.h -MMD -MP -MF .dep/obj_alps64_protocol_lufa_lufa.o.d ../../tmk_core/protocol/lufa/lufa.c -o obj_alps64/protocol/lufa/lufa.o +../../tmk_core/protocol/lufa/lufa.c: In function 'setup_mcu': +../../tmk_core/protocol/lufa/lufa.c:575: warning: implicit declaration of function 'clock_prescale_set' +../../tmk_core/protocol/lufa/lufa.c:575: error: 'clock_div_1' undeclared (first use in this function) +../../tmk_core/protocol/lufa/lufa.c:575: error: (Each undeclared identifier is reported only once +../../tmk_core/protocol/lufa/lufa.c:575: error: for each function it appears in.) +make: *** [obj_alps64/protocol/lufa/lufa.o] Error 1 +``` + +## BOOTLOADER_SIZE pour AVR + +Notez que la taille du bootloader pour les Teensy2.0++ est de 2048bytes. Quelques Makefiles peuvent contenir une erreur et avoir le mauvais commentaire. + +``` +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 2048 +# Atmel DFU loader 4096 (TMK Alt Controller) +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=2048 +``` + +## `avr-gcc: internal compiler error: Abort trap: 6 (program cc1)` sous MacOS + +C'est un problème de mise à jour avec brew, causée par des liens symboliques (symlinks) dont dépend avr-gcc qui sont détruits. + +La solution est de supprimer et réinstaller tous les modules affectés. + +``` +brew rm avr-gcc +brew rm dfu-programmer +brew rm dfu-util +brew rm gcc-arm-none-eabi +brew rm avrdude +brew install avr-gcc +brew install dfu-programmer +brew install dfu-util +brew install gcc-arm-none-eabi +brew install avrdude +``` + +### avr-gcc 8.1 et LUFA + +Si vous avez mis à jour votre avr-gcc au-dessus de la version 7, vous risquez de voir des erreurs impliquant LUA. Par exemple : + +`lib/lufa/LUFA/Drivers/USB/Class/Device/AudioClassDevice.h:380:5: error: 'const' attribute on function returning 'void'` + +Pour le moment, vous devrez revenir à la version 7 de avr-gcc dans brew. + +``` +brew uninstall --force avr-gcc +brew install avr-gcc@8 +brew link --force avr-gcc@8 +``` + +### Je viens de flasher mon clavier et il ne fait rien/l'appui des touches n'est pas enregistré - c'est aussi un ARM(rev6 plank, clueboard 60, hs60v2, etc.) (Février 2019) + +A cause de la manière dont les EEPROM fonctionnent sur les puces ARM, les options sauvegardées peuvent ne plus être valides. Ceci affecte les calques par défaut et *peut*, sous certaines conditions que nous essayons encore de déterminer, rendre le clavier inutilisable. Réinitialiser l'EEPROM corrigera le problème. + +[Réinitialiser EEPROM sur Planck rev6](https://cdn.discordapp.com/attachments/473506116718952450/539284620861243409/planck_rev6_default.bin) peut être utilisé pour forcer une réinitialisation d'EEPROM. Une fois cette image flashée, flashez à nouveau votre firmware standard. Cela devrait rétablir le fonctionnement de votre clavier. +Si bootmagic est activé dans n'importe quel forme, vous devriez être capable de faire aussi ceci (regardez [Documentation Bootmagic](feature_bootmagic.md) et les informations spécifiques à votre clavier). diff --git a/docs/fr-fr/faq_debug.md b/docs/fr-fr/faq_debug.md new file mode 100644 index 000000000000..7a85fd1f249a --- /dev/null +++ b/docs/fr-fr/faq_debug.md @@ -0,0 +1,236 @@ +# FAQ Débugage + +Cette page détaille diverses questions fréquemment posées par les utilisateurs sur le dépannage de leurs claviers. + +# Console de débugage + +## `hid_listen` ne reconnaît pas de périphérique + +Lorsque la console de débugage sur votre périphérique n'est pas prêt, vous obtiendrez un message similaire : + +``` +Waiting for device:......... +``` + +Une fois le périphérique connecté, *hid_listen* le trouve et vous obtiendrez ce message : + +``` +Waiting for new device:......................... +Listening: +``` + +Si vous ne recevez pas ce message `Listening:`, essayez de compiler avec `CONSOLE_ENABLE=yes` dans le [Makefile] + +Il se peut que vous ayez besoin de certains privilèges avancés pour accéder à des périphériques sur des OS comme Linux. + +- Essayez `sudo hid_listen` + +## Ne reçoit pas de messages sur la console + +Vérifiez : + +- *hid_listen* trouve votre périphérique. Voir ci-dessus. +- Activez le débugage en appuyant sur **Magic**+d. Voir [Commandes Magic](/~https://github.com/tmk/tmk_keyboard#magic-commands). +- Définissez `debug_enable=true` en général dans `matrix_init()` du fichier **matrix.c**. +- Essayez d'utiliser la fonction `print` à la place du debug print. Voir **common/print.h**. +- Déconnectez tous les autres périphériques qui utilisent la fonction console. Voir [Issue #97](/~https://github.com/tmk/tmk_keyboard/issues/97). + +## Linux ou les systèmes UNIX nécessitent des privilèges super utilisateur + +Utilisez `sudo` pour exécuter *hid_listen* avec des privilèges étendus. + +``` +$ sudo hid_listen +``` + +Ou ajoutez une *udev rule* pour les périphériques TMK en plaçant un fichier dans le répertoire rules. Le chemin vers ce répertoire peut varier en fonction du système. + +Fichier: /etc/udev/rules.d/52-tmk-keyboard.rules(sous Ubuntu) +``` +# tmk keyboard products /~https://github.com/tmk/tmk_keyboard +SUBSYSTEMS=="usb", ATTRS{idVendor}=="feed", MODE:="0666" +``` + +*** + +# Divers + +## Considérations de sécurité + +Vous ne voulez probablement pas "briquer" votre clavier, rendre impossible d'écrire un firmware dessus. Il y a quelques paramètres qui montrent ce qui est (et n'est probablement pas) trop risqué. + +- Si votre map de clavier n'inclut pas de RESET, pour entrer en mode DFU, vous devrez appuyer sur le bouton reset du PCB. Cela implique que vous devrez certainement dévisser certaines pièces de votre clavier pour y accéder. +- Modifier les fichiers tmk_core / common peut rendre le clavier inutilisable +- Si un fichier .hex trop large est la cause du problème : `make dfu` supprime le bloc puis teste la taille (il ne fait pas les choses dans le bon ordre), ce qui provoque une erreur. En résultat, le flash n’aura pas été fait et le clavier restera en mode DFU. +- Pour finir, notez que la taille maximale d'un fichier .hex sur un Plank est de 7000h (28672 decimal) + +``` +Linking: .build/planck_rev4_cbbrowne.elf [OK] +Creating load file for Flash: .build/planck_rev4_cbbrowne.hex [OK] + +Size after: + text data bss dec hex filename + 0 22396 0 22396 577c planck_rev4_cbbrowne.hex +``` + +- La taille du fichier ci-dessus est de 22396/577ch, ce qui est en dessous de 28672/7000h +- Tant que vous avez un fichier .hex alternatif correct, vous pouvez réessayer en le chargeant +- Certaines options que vous pouvez spécifier dans votre Makefile consomme de la mémoire supplémentaire. Faites attention aux options BOOTMAGIC_ENABLE, MOUSEKEY_ENABLE, EXTRAKEY_ENABLE, CONSOLE_ENABLE, API_SYSEX_ENABLE. +- Les outils DFU **ne** vous permettent **pas** d'écrire dans le bootloader (à moins que vous n'ajoutiez des options spéciales), il n'y a donc peu de risque. +- Les EEPROM ont environ 100000 cycles d'écriture. Ne réécrivez pas le firmware de manière continue et répétée. Vous allez détruire définitivement l'EEPROM. + +## NKRO ne fonctionne pas + +Premièrement, vous devez compiler le firmware avec l'option de compilation `NKRO_ENABLE` dans le **Makefile**. + +Essayez la commande `Magic` **N** (`LShift+RShift+N` par défaut) si **NKRO** ne fonctionne toujours pas. Vous pouvez utiliser cette commande pour basculer temporairement entre le mode **NKRO** et **6KRO**. Sous certaines conditions, **NKRO** ne fonctionnera pas et vous devrez basculer en **6KRO**, en particulier lorsque vous êtes dans le BIOS. + +Si votre firmware est compilé avec `BOOTMAGIC_ENABLE` vous devrez l'activer avec la commande `BootMagic` **N** (`Espace+N` par défaut). Cette option est enregistrée dans l'EEPROM et sera gardé entre deux cycles de démarrage. + +/~https://github.com/tmk/tmk_keyboard#boot-magic-configuration---virtual-dip-switch + +## Le TrackPoint a besoin Circuit de réinitialisation (Support de souris PS/2) + +Sans circuit de réinitialisation vous allez avoir des résultats inconsistants à cause de la mauvaise initialisation du matériel. Regardez le schéma du circuit du TPM754. + +- http://geekhack.org/index.php?topic=50176.msg1127447#msg1127447 +- http://www.mikrocontroller.net/attachment/52583/tpm754.pdf + +## Impossible de lire la colonne de la matrice après 16 + +Utilisez `1UL<<16` à la place de `1<<16` dans `read_cols()` du fichier [matrix.h] lorsque le nombre de vos colonnes dépassent 16. + +En C, `1` implique un type [int] qui est [16 bits] pour les AVR, ce qui implique que vous ne pouvez pas décaler à gauche de plus de 15. Si vous utilisez `1<<16`, vous aurez un résultat non attendu de zéro. Vous devez donc utiliser un type [unsigned long] en utilisant `1UL`. + +http://deskthority.net/workshop-f7/rebuilding-and-redesigning-a-classic-thinkpad-keyboard-t6181-60.html#p146279 + +## Bootloader Jump ne fonctionne pas + +Configurez correctement la taille du bootloader dans le **Makefile**. Une mauvaise taille de section du bootloader empêchera probablement le démarrage avec **Magic command** et **Boot Magic**. + +``` +# Size of Bootloaders in bytes: +# Atmel DFU loader(ATmega32U4) 4096 +# Atmel DFU loader(AT90USB128) 8192 +# LUFA bootloader(ATmega32U4) 4096 +# Arduino Caterina(ATmega32U4) 4096 +# USBaspLoader(ATmega***) 2048 +# Teensy halfKay(ATmega32U4) 512 +# Teensy++ halfKay(AT90USB128) 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 +``` + +La taille de la section de démarrage de AVR est définie par l'option **BOOTSZ** fuse. Vérifiez la fiche technique du MCU. Veuilez noter que les tailles et adresses sont définies en **Word** (2 octets) dans la fiche technique alors que TMK utilise des **Byte**. + +La section de boot AVR se trouve à la fin de la mémoire flash, comme suit. + +``` +byte Atmel/LUFA(ATMega32u4) byte Atmel(AT90SUB1286) +0x0000 +---------------+ 0x00000 +---------------+ + | | | | + | | | | + | Application | | Application | + | | | | + = = = = + | | 32KB-4KB | | 128KB-8KB +0x6000 +---------------+ 0x1E000 +---------------+ + | Bootloader | 4KB | Bootloader | 8KB +0x7FFF +---------------+ 0x1FFFF +---------------+ + + +byte Teensy(ATMega32u4) byte Teensy++(AT90SUB1286) +0x0000 +---------------+ 0x00000 +---------------+ + | | | | + | | | | + | Application | | Application | + | | | | + = = = = + | | 32KB-512B | | 128KB-2KB +0x7E00 +---------------+ 0x1FC00 +---------------+ + | Bootloader | 512B | Bootloader | 2KB +0x7FFF +---------------+ 0x1FFFF +---------------+ +``` + +Référez-vous à cette discussion pour plus de référence. +/~https://github.com/tmk/tmk_keyboard/issues/179 + +Si vous utilisez un TeensyUSB, il y a un [bug connu](/~https://github.com/qmk/qmk_firmware/issues/164) qui fait que le bouton reset matériel empêche la touche RESET de fonctionner. Débrancher et rebrancher le clavier devrait résoudre le problème. + +## Les touches spéciales ne fonctionnent pas (Touche Système, Touches de contrôle du son) + +Vous devez définir `EXTRAKEY_ENABLE` dans le fichier `rules.mk` pour les utiliser dans QMK. + +``` +EXTRAKEY_ENABLE = yes # Audio control and System control +``` + +## Réveiller du mode veille ne fonctionne pas + +Sous Windows, activez l'option `Permettre au périphérique de sortir l'ordinateur de veille` dans les paramètres des **Options d'alimentations** du **Gestionnaire de périphériques**. Vérifiez aussi les paramètres du BIOS. + +Appuyer sur n'importe quelle touche en mode veille devrait sortir l'ordinateur de veille. + +## Vous utilisez un Arduino ? + +**Faites attention au fait que le nommage des pin d'un Arduino diffère de la puce**. Par exemple, la pin `D0` n'est pas `PD0`. Vérifiez le circuit avec la fiche technique. + +- http://arduino.cc/en/uploads/Main/arduino-leonardo-schematic_3b.pdf +- http://arduino.cc/en/uploads/Main/arduino-micro-schematic.pdf + +Les Arduino Leonardo et micro ont des **ATMega32U4** et peuvent être utilisés avec TMK, mais le bootloader Arduino peut causer des problèmes. + +## Activer JTAG + +Par défaut, le débugage des interfaces JTAG est désactivé dès que le clavier démarre. Les MCUs compatible JTAG viennent d'usine avec le fusible `JTAGEN` activé, et il prend certaines pins du MCU que la board pourrait utiliser pour la matrice, les LEDs, etc. + +Si vous voulez garder JTAG activé, ajoutez la ligne suivante à votre fichier `config.h` : + +```c +#define NO_JTAG_DISABLE +``` + +## Adding LED Indicators of Lock Keys + +Si vous souhaitez votre propre indicateur LED pour CapsLock, ScrollLock et NumLock alors lisez ce post. + +http://deskthority.net/workshop-f7/tmk-keyboard-firmware-collection-t4478-120.html#p191560 + +## Programmer Arduino Micro/Leonardo + +Appuyez sur le bouton reset puis lancez la commande suivante dans les 8 secondes. + +``` +avrdude -patmega32u4 -cavr109 -b57600 -Uflash:w:adb_usb.hex -P/dev/ttyACM0 +``` + +Le nom du périphérique peut varier en fonction de votre système. + +http://arduino.cc/en/Main/ArduinoBoardMicro +https://geekhack.org/index.php?topic=14290.msg1563867#msg1563867 + +## Compatibilité USB 3 + +Il semble que certaines personnes ont eu des problèmes avec les ports USB 3, essayez un port USB 2. + +## Compatibilité Mac + +### OS X 10.11 et Hub + +https://geekhack.org/index.php?topic=14290.msg1884034#msg1884034 + +## Problème sur BIOS (UEFI) / Resume (Mise en veille et réveil) / Redémarrage + +Certaines personnes ont eu des problèmes de fonctionnement de leur clavier dans le BIOS et/ou après des redémarrages. + +Pour le moment, l'origine du problème n'est pas comprise, mais certaines options de compilation semble liées. Dans le Makefile, essayez de désactiver les options comme `CONSOLE_ENABLE`, `NKRO_ENABLE`, `SLEEP_LED_ENABLE` et/ou d'autres. + +/~https://github.com/tmk/tmk_keyboard/issues/266 +https://geekhack.org/index.php?topic=41989.msg1967778#msg1967778 + +## FLIP ne marche pas + +### `AtLibUsbDfu.dll` Not Found + +Supprimez le pilote actuel et réinstallez celui donné par FLIP dans le gestionnaire de périphériques. + +http://imgur.com/a/bnwzy diff --git a/docs/fr-fr/faq_general.md b/docs/fr-fr/faq_general.md new file mode 100644 index 000000000000..b1eae6df1669 --- /dev/null +++ b/docs/fr-fr/faq_general.md @@ -0,0 +1,16 @@ +# Questions fréquemment posées + +## Qu'est-ce que QMK ? + +[QMK](/~https://github.com/qmk), acronyme pour Quantum Mechanical Keyboard, est un groupe de personnes qui construisent des outils pour des claviers personnalisés. Nous avons commencé par le [firmware QMK](/~https://github.com/qmk/qmk_firmware), un fork très modifié du firmware [TMK](/~https://github.com/tmk/tmk_keyboard). + +## Quelles sont les différences entre QMK et TMK ? + +TMK a été conçu et développé à l'origine par [Jun Wako](/~https://github.com/tmk). QMK a démarré comme étant le fork de [Jack Humbert](/~https://github.com/jackhumbert) pour le Planck. Au bout d'un moment, le fork de Jack a divergé de manière significative de TMK et, en 2015, Jack a décidé de le renommer QMK. + +D'un point de vue technique, QMK se base sur TMK en lui ajoutant plusieurs nouvelles fonctionnalités. +QMK a notamment augmenté le nombre de keycodes disponibles et les a utilisé pour implémenter des fonctionnalités avancées telles que `S()`, `LCTL()` et `MO()`. Vous pouvez voir une liste complète de ces keycodes dans [Keycodes] (keycodes.md). + +D'un point de vue management de projet et communauté, Hasu, sur TMK maintient tous les claviers supportés officiellement par lui-même, avec un peu de support de la communauté. Il existe ou peuvent être créées d'autres communautés maintenant des fork pour d'autres claviers. Peu de keymaps sont définies par défaut, les utilisateurs ne se partagent donc pas leurs keymaps en général. QMK encourage le partage des claviers et des keymaps à l'aide d'un dépôt géré de manière centrale, acceptant les pull requests qui suivent les standards de qualité. Ceux-ci sont surtout maitenus par la communauté, mais l'équipe de QMK aide aussi lorsque c'est nécessaire. + +Les deux approches ont leurs avantages et leurs inconvénients, et le développements de fonctionnalités intéressantes sont partagées entre TMK et QMK lorsque fait sens. diff --git a/docs/fr-fr/faq_keymap.md b/docs/fr-fr/faq_keymap.md new file mode 100644 index 000000000000..8244d4225fc2 --- /dev/null +++ b/docs/fr-fr/faq_keymap.md @@ -0,0 +1,226 @@ +# FAQ Keymap + +Cette page couvre les questions souvent posées à propos des keymaps. Si vous ne l'avez pas encore fait, vous devriez commencer par là [Aperçu des Keymap](keymap.md). + +## Quels Keycodes puis-je utiliser ? + +Regardez [Keycodes](keycodes.md) pour une liste des keycodes disponibles. Certains keycodes spécifiques ont des documentations plus complètes de disponible. + +Les keycodes sont définies dans [common/keycode.h](/~https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/keycode.h). + +## Quels sont les keycodes par défaut ? + +Il existe 3 configurations de clavier standard utilisées dans le monde: ANSI, ISO et JIS. L'Amérique du Nord utilise principalement l'ANSI, l'Europe et l'Afrique l'ISO et le Japon utilise JIS. Les autres régions utilisent généralement ANSI ou ISO. Les keycodes correspondant à ces dispositions spécifiques sont affichés ici : + + +![Keyboard Layout Image](https://i.imgur.com/5wsh5wM.png) + +## Certaines de mes touches sont permutées ou ne fonctionnent pas + +QMK possède deux fonctionnalités, Bootmagic et Command, qui vous permettent de modifier le comportement de votre clavier à la volée. Cela inclut, sans toutefois s'y limiter, l'échange de Ctrl / Majuscules, la désactivation de l'interface graphique, le basculement de Alt/Gui, le basculement de barre d'espacement arrière/barre oblique inversée, la désactivation de toutes les touches et d'autres modifications comportementales. + +Pour résoudre rapidement le problème, essayez de maintenir les touches Espace + Retour arrière enfoncées pendant que vous branchez votre clavier. Cela réinitialisera les paramètres stockés sur votre clavier, ramenant ces touches à un fonctionnement normal. Si cela ne fonctionne pas, regardez ici: + +* [Bootmagic](feature_bootmagic.md) +* [Command](feature_command.md) + +## La touche de menu ne fonctionne pas + +La touche trouvée sur la plupart des claviers modernes située entre `KC_RGUI` et` KC_RCTL` est en réalité appelée `KC_APP`. En effet, lorsque cette touche a été inventée, il existait déjà une clé nommée `MENU` dans les normes correspondantes. MS a donc choisi de l'appeler la touche` APP`. + +## `KC_SYSREQ` ne fonctionne pas + +Utilisez le keycode pour Print Screen (`KC_PSCREEN` or `KC_PSCR`) à la place de `KC_SYSREQ`. La combinaison de touche 'Alt + Print Screen' est reconnue comme 'System request'. + +Voir [issue #168](/~https://github.com/tmk/tmk_keyboard/issues/168) et +* http://en.wikipedia.org/wiki/Magic_SysRq_key +* http://en.wikipedia.org/wiki/System_request + +## Les touches alimentation ne fonctionnent pas + +Un peu déroutant, il y a deux codes de touche "Alimentation" dans QMK: `KC_POWER` dans la page d'utilisation du clavier / keypad, et `KC_SYSTEM_POWER` (ou `KC_PWR`) dans la page Consumer. + +Le premier n'est reconnu que sur macOS, alors que le dernier, `KC_SLEP` et `KC_WAKE` sont supportés par les trois principaux systèmes d'exploitation. Il est donc recommandé de les utiliser à la place. Sous Windows, ces touches prennent effet immédiatement, mais sur macOS, elles doivent être maintenues enfoncées jusqu'à ce qu'une boîte de dialogue apparaisse. + +## Modificateur "One Shot" + +Cette fonctionnalité permet de corriger un problème avec la touche Shift. En effet, il arrive de saisir plusieurs majuscules en ne voulant en saisir qu'une sur un mot. Ex : `CEtte` à la place de `Cette`. La fonctionnalité « One shot » shift permet de corriger ça. + +/~https://github.com/tmk/tmk_keyboard/issues/67 + +## Le modificateur d'un calque reste bloqué + +Les touches de modification ou les calques peuvent être bloquées si la commutation de calque n'est pas configurée correctement. +Pour les touches de modification et les actions de calque, vous devez placer `KC_TRANS` sur la même position du calque de destination afin de désenregistrer la clé de modificateur ou de revenir au calque précédent lors de la libération. + +* /~https://github.com/tmk/tmk_core/blob/master/doc/keymap.md#31-momentary-switching +* http://geekhack.org/index.php?topic=57008.msg1492604#msg1492604 +* /~https://github.com/tmk/tmk_keyboard/issues/248 + +## Support de touche à verrouillage mécanique + +Cette fonctionnalité permet l'usage de *touches à verrouillage mécanique* comme [ces interrupteurs Alps](http://deskthority.net/wiki/Alps_SKCL_Lock). Vous pouvez l'activer en ajoutant ceci à votre `config.h` : + +``` +#define LOCKING_SUPPORT_ENABLE +#define LOCKING_RESYNC_ENABLE +``` + +Une fois la fonction activée, utilisez les keycodes `KC_LCAP`, `KC_LNUM` et `KC_LSCR` dans votre keymap. + +Des vieux claviers mécaniques ont parfois des touches à verrouillage, mais les claviers modernes n'en sont pas équipés. ***Vous n'avez pas besoin de cette fonction dans la majorité des cas et devez utiliser les keycodes `KC_CAPS`, `KC_NLCK` et `KC_SLCK`.*** + +## Ajouter des caractères spéciaux autres que ASCII comme la cédille 'Ç' + +IL N'EXISTE AUCUNE METHODE UNIVERSELLE POUR LES AJOUTER QUI FONCTIONNE SUR TOUS LES SYSTEMES. Vous devez définir une **MACRO** d'une manière spécifique à votre OS ou layout. + +Voir ce post pour un exemple de code **MACRO**. + +http://deskthority.net/workshop-f7/tmk-keyboard-firmware-collection-t4478-120.html#p195620 + +Sous **Windows** vous pouvez utiliser la touche `AltGr` ou **Alt code**. +* http://en.wikipedia.org/wiki/AltGr_key +* http://en.wikipedia.org/wiki/Alt_code + +Sous **Mac OS** définissez une combinaison de touche `Option`. +* http://en.wikipedia.org/wiki/Option_key#Alternative_keyboard_input + +Sous **Xorg** vous pouvez utiliser une touche `compose` à la place. +* http://en.wikipedia.org/wiki/Compose_key + +Et voir ceci pour une entrée **Unicode**. +* http://en.wikipedia.org/wiki/Unicode_input + +## Touche `Fn` sur macOS + +Contrairement à la plupart des touches Fn, celle des claviers Apple a son propre code d'activation... en quelque sorte. Il remplace le sixième code d'activation dans un rapport de base 6KRO HID - de sorte qu'un clavier Apple ne contient en réalité que 5KRO. + +Il est techniquement possible de demander à QMK d’envoyer ce keycode. Cependant, cela nécessite une modification du format du rapport pour ajouter l'état de la touche Fn. +Pire encore, ce keycode n'est reconnu que si les identifiants du clavier VID et PID correspondent à ceux d'un vrai clavier Apple. Malheureusement QMK ne peut juridiquement prendre en charge cette fonctionnalité et il y a peu de chance que la situation s'améliore. + +Voir [cette issue](/~https://github.com/qmk/qmk_firmware/issues/2179) pour des informations détaillées. + +## Touches Media sous Mac OSX + +#### KC_MNXT et KC_MPRV ne fonctionnent pas sous Mac + +Utilisez `KC_MFFD`(`KC_MEDIA_FAST_FORWARD`) et `KC_MRWD`(`KC_MEDIA_REWIND`) à la place de `KC_MNXT` et `KC_MPRV`. +Voir /~https://github.com/tmk/tmk_keyboard/issues/195 + +## Touches supportées sous Mac OSX? + +Vous pouvez connaître les keycodes supportés par OSX en lisant ce code source. + +`usb_2_adb_keymap` contient les tableaux des pages Keyboard/Keypad vers les scancodes ADB (keycodes interne à OSX). + +https://opensource.apple.com/source/IOHIDFamily/IOHIDFamily-606.1.7/IOHIDFamily/Cosmo_USB2ADB.c + +Et `IOHIDConsumer::dispatchConsumerEvent` s'occupe des utilisations Consumer page. + +https://opensource.apple.com/source/IOHIDFamily/IOHIDFamily-606.1.7/IOHIDFamily/IOHIDConsumer.cpp + +## Touches JIS dans Mac OSX + +Les touches de clavier spécifiques JIS comme `無変換(Muhenkan)`, `変換(Henkan)`, `ひらがな(hiragana)` ne sont pas reconnues par OSX. Vous pouvez utiliser **Seil** pour les activer, esssayez les options suivantes. + +* Activer la touche NFER sur clavier PC +* Activer la touche XFER sur clavier PC +* Activer la touche KATAKANA sur clavier PC + +https://pqrs.org/osx/karabiner/seil.html + +## RN-42 Bluetooth ne fonctionne pas avec Karabiner + +Karabiner - Outil de Keymapping sous Mac OSX - Ignore les entrées du module RN-42. Vous devez activer cette option pour rendre Karabiner compatible avec votre clavier. +/~https://github.com/tekezo/Karabiner/issues/403#issuecomment-102559237 + +Plus de détails sur ce problème sur les liens suivants. +/~https://github.com/tmk/tmk_keyboard/issues/213 +/~https://github.com/tekezo/Karabiner/issues/403 + +## Esc et ` sur une touche simple. + +Cette fonctionnalité permet d'utiliser une touche à la fois comme touche Échap ou une touche `§` (En Azerty) selon le cas d’utilisation. Cela est très utile sur un clavier de petite taille. + +Voir la fonctionnalité [Grave Escape](feature_grave_esc.md). + +## Avoir les touches modificatrices qui ont double usage en flèches directionnelles. + +Ceci transforme les touches "modificateur droit" en touches fléchées lorsque les touches sont seulement "tapées" tout en restant des modificateurs lorsqu'elles sont maintenues. + +Dans TMK la fonction double rôle s'appelle **TAP**. + +```C + +#include "keymap_common.h" + + +/* Arrow keys on right modifier keys with TMK dual role feature + * + * /~https://github.com/tmk/tmk_core/blob/master/doc/keymap.md#213-modifier-with-tap-keydual-role + * https://en.wikipedia.org/wiki/Modifier_key#Dual-role_keys + */ +const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* 0: qwerty */ + [0] = LAYOUT( \ + ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, NUHS,BSPC, \ + TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, \ + LCTL,A, S, D, F, G, H, J, K, L, SCLN,QUOT,ENT, \ + LSFT,NUBS,Z, X, C, V, B, N, M, COMM,DOT, SLSH,FN0, ESC, \ + FN4, LGUI,LALT, SPC, APP, FN2, FN1, FN3), + [1] = LAYOUT( \ + GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS,TRNS, \ + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,\ + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \ + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,FN5, TRNS, \ + TRNS,TRNS,TRNS, TRNS, TRNS,FN7, FN6, FN8), +}; + +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_UP), + [1] = ACTION_MODS_TAP_KEY(MOD_RGUI, KC_DOWN), + [2] = ACTION_MODS_TAP_KEY(MOD_RALT, KC_LEFT), + [3] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_RIGHT), + [4] = ACTION_LAYER_MOMENTARY(1), + [5] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_PGUP), + [6] = ACTION_MODS_TAP_KEY(MOD_RGUI, KC_PGDN), + [7] = ACTION_MODS_TAP_KEY(MOD_RALT, KC_HOME), + [8] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_END), +}; + +``` + +Touches double rôle : https://en.wikipedia.org/wiki/Modifier_key#Dual-role_keys + +## Eject sur Mac OSX + +Le keycode`KC_EJCT` fonctionne sous OSX. /~https://github.com/tmk/tmk_keyboard/issues/250 + +Il semble que Windows 10 ignore le code et Linux/Xorg le reconnaît mais n'a pas de mapping par défaut. + +Nous ne sommes pas sûr quel keycode est utilisé pour la touche Eject sur les claviers Apple officiels. HHKB utilise `F20` pour la touche Eject (`Fn+f`) lorsqu'il est en mode Mac, mais ce n'est probablement pas la même chose que le keycode Eject d'Apple. + +## Qu'est-ce que `weak_mods` et `real_mods` dans `action_util.c` + +___TO BE IMPROVED___ + +real_mods est prévu pour retenir l'état des touches modificateur réelles/physiques, alors que weak_mods ne retient l'état que des modificateurs temporaires ou virtuels qui ne devraient pas affecter l'état des touches modificaterus réelles. + +Par exemple, disons que vous maintenez la touche physique "shift gauche" et tapez ACTION_MODS_KEY(LSHIFT, KC_A), + +en weak_mods, + +* (1) maintenir shift gauche : real_mods |= MOD_BIT(LSHIFT) +* (2) appuyer ACTION_MODS_KEY(LSHIFT, KC_A): weak_mods |= MOD_BIT(LSHIFT) +* (3) lâcher ACTION_MODS_KEY(LSHIFT, KC_A): weak_mods &= ~MOD_BIT(LSHIFT) +real_mods garde sur état modificateur. + +sans weak_mods, + +* (1) maintenir shift gauche : real_mods |= MOD_BIT(LSHIFT) +* (2) appuyer ACTION_MODS_KEY(LSHIFT, KC_A): real_mods |= MOD_BIT(LSHIFT) +* (3) lâcher ACTION_MODS_KEY(LSHIFT, KC_A): real_mods &= ~MOD_BIT(LSHIFT) +ici real_mods a perdu son état pour 'shift gauche physique'. + +weak_mods est ORed avec real_mods lorsque le rapport du clavier est envoyé. +/~https://github.com/tmk/tmk_core/blob/master/common/action_util.c#L57 diff --git a/docs/fr-FR/flashing.md b/docs/fr-fr/flashing.md similarity index 100% rename from docs/fr-FR/flashing.md rename to docs/fr-fr/flashing.md diff --git a/docs/fr-FR/getting_started_getting_help.md b/docs/fr-fr/getting_started_getting_help.md similarity index 100% rename from docs/fr-FR/getting_started_getting_help.md rename to docs/fr-fr/getting_started_getting_help.md diff --git a/docs/fr-FR/getting_started_github.md b/docs/fr-fr/getting_started_github.md similarity index 100% rename from docs/fr-FR/getting_started_github.md rename to docs/fr-fr/getting_started_github.md diff --git a/docs/fr-FR/getting_started_introduction.md b/docs/fr-fr/getting_started_introduction.md similarity index 100% rename from docs/fr-FR/getting_started_introduction.md rename to docs/fr-fr/getting_started_introduction.md diff --git a/docs/fr-FR/newbs.md b/docs/fr-fr/newbs.md similarity index 100% rename from docs/fr-FR/newbs.md rename to docs/fr-fr/newbs.md diff --git a/docs/fr-FR/newbs_best_practices.md b/docs/fr-fr/newbs_best_practices.md similarity index 100% rename from docs/fr-FR/newbs_best_practices.md rename to docs/fr-fr/newbs_best_practices.md diff --git a/docs/fr-FR/newbs_building_firmware.md b/docs/fr-fr/newbs_building_firmware.md similarity index 100% rename from docs/fr-FR/newbs_building_firmware.md rename to docs/fr-fr/newbs_building_firmware.md diff --git a/docs/fr-FR/newbs_building_firmware_configurator.md b/docs/fr-fr/newbs_building_firmware_configurator.md similarity index 100% rename from docs/fr-FR/newbs_building_firmware_configurator.md rename to docs/fr-fr/newbs_building_firmware_configurator.md diff --git a/docs/fr-FR/newbs_flashing.md b/docs/fr-fr/newbs_flashing.md similarity index 100% rename from docs/fr-FR/newbs_flashing.md rename to docs/fr-fr/newbs_flashing.md diff --git a/docs/fr-FR/newbs_getting_started.md b/docs/fr-fr/newbs_getting_started.md similarity index 100% rename from docs/fr-FR/newbs_getting_started.md rename to docs/fr-fr/newbs_getting_started.md diff --git a/docs/fr-FR/newbs_learn_more_resources.md b/docs/fr-fr/newbs_learn_more_resources.md similarity index 100% rename from docs/fr-FR/newbs_learn_more_resources.md rename to docs/fr-fr/newbs_learn_more_resources.md diff --git a/docs/fr-FR/newbs_testing_debugging.md b/docs/fr-fr/newbs_testing_debugging.md similarity index 100% rename from docs/fr-FR/newbs_testing_debugging.md rename to docs/fr-fr/newbs_testing_debugging.md From 38353688f2cf2d077a0e16b9a3f2b054fffc74c0 Mon Sep 17 00:00:00 2001 From: Rys Sommefeldt Date: Sun, 3 Nov 2019 17:46:13 +0000 Subject: [PATCH 255/316] [Keymap] Add personal JC65 v32a layout (#7244) * Add personal JC65 v32a layout * Update keyboards/jc65/v32a/keymaps/rys/keymap.c Co-Authored-By: fauxpark --- keyboards/jc65/v32a/keymaps/rys/keymap.c | 23 +++++++++++++++++++++++ keyboards/jc65/v32a/keymaps/rys/rules.mk | 2 ++ 2 files changed, 25 insertions(+) create mode 100644 keyboards/jc65/v32a/keymaps/rys/keymap.c create mode 100644 keyboards/jc65/v32a/keymaps/rys/rules.mk diff --git a/keyboards/jc65/v32a/keymaps/rys/keymap.c b/keyboards/jc65/v32a/keymaps/rys/keymap.c new file mode 100644 index 000000000000..f946c8eebf39 --- /dev/null +++ b/keyboards/jc65/v32a/keymaps/rys/keymap.c @@ -0,0 +1,23 @@ +#include QMK_KEYBOARD_H + +enum layers { + _BASE, + _FUNC +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT( + 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_NUBS, KC_DEL, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_PGUP, + KC_NUHS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, KC_ENT, KC_PGDN, + KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, MO(_FUNC), + KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, KC_SPC, XXXXXXX, XXXXXXX, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [_FUNC] = LAYOUT( + RGB_TOG, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, RESET, + RGB_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + RGB_RMOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, + RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_HUD, RGB_SAD, RGB_VAD + ) +}; diff --git a/keyboards/jc65/v32a/keymaps/rys/rules.mk b/keyboards/jc65/v32a/keymaps/rys/rules.mk new file mode 100644 index 000000000000..d7463419b4fe --- /dev/null +++ b/keyboards/jc65/v32a/keymaps/rys/rules.mk @@ -0,0 +1,2 @@ +RGBLIGHT_ENABLE = yes +BACKLIGHT_ENABLE = yes From e9c44e396d21df990b1d08e8b4c30e288797dffe Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Sun, 3 Nov 2019 09:52:01 -0800 Subject: [PATCH 256/316] Smallish overhaul of Auto-Shift feature (#6067) * Fix edge case when using One Shot Layer with Auto Shift, and it not triggering the cleanup * Remove junk code (no longer used) * Replace `(un)register_code` calls with `tap_code` where appropriate * Fixed up Switch check to be more readable (less verbose) * Simplified modifier check (if it comes back non-zero, there are mods) * Add additional function calls for autoshift settings * Made all variables static, since there are function calls to get their status * Fixed up documentation * Re-add special characters that were missed * formatting pass --- docs/feature_auto_shift.md | 20 ++-- quantum/process_keycode/process_auto_shift.c | 114 +++++-------------- quantum/process_keycode/process_auto_shift.h | 15 ++- 3 files changed, 44 insertions(+), 105 deletions(-) diff --git a/docs/feature_auto_shift.md b/docs/feature_auto_shift.md index 9b4b29624901..f0b507bc618a 100644 --- a/docs/feature_auto_shift.md +++ b/docs/feature_auto_shift.md @@ -51,12 +51,15 @@ By default, Auto Shift is disabled for any key press that is accompanied by one modifiers. Thus, Ctrl+A that you hold for a really long time is not the same as Ctrl+Shift+A. -You can re-enable Auto Shift for modifiers by adding another rule to your `rules.mk` +You can re-enable Auto Shift for modifiers by adding a define to your `config.h` - AUTO_SHIFT_MODIFIERS = yes +```c +#define AUTO_SHIFT_MODIFIERS +``` In which case, Ctrl+A held past the `AUTO_SHIFT_TIMEOUT` will be sent as Ctrl+Shift+A + ## Configuring Auto Shift If desired, there is some configuration that can be done to change the @@ -65,15 +68,12 @@ behavior of Auto Shift. This is done by setting various variables the A sample is - #ifndef CONFIG_USER_H - #define CONFIG_USER_H - - #include "../../config.h" - - #define AUTO_SHIFT_TIMEOUT 150 - #define NO_AUTO_SHIFT_SPECIAL +```c +#pragma once - #endif +#define AUTO_SHIFT_TIMEOUT 150 +#define NO_AUTO_SHIFT_SPECIAL +``` ### AUTO_SHIFT_TIMEOUT (Value in ms) diff --git a/quantum/process_keycode/process_auto_shift.c b/quantum/process_keycode/process_auto_shift.c index 4ae3fe446e35..b474bda6912c 100644 --- a/quantum/process_keycode/process_auto_shift.c +++ b/quantum/process_keycode/process_auto_shift.c @@ -20,19 +20,10 @@ # include "process_auto_shift.h" -# define TAP(key) \ - register_code(key); \ - unregister_code(key) - -# define TAP_WITH_MOD(mod, key) \ - register_code(mod); \ - register_code(key); \ - unregister_code(key); \ - unregister_code(mod) - -uint16_t autoshift_time = 0; -uint16_t autoshift_timeout = AUTO_SHIFT_TIMEOUT; -uint16_t autoshift_lastkey = KC_NO; +static bool autoshift_enabled = true; +static uint16_t autoshift_time = 0; +static uint16_t autoshift_timeout = AUTO_SHIFT_TIMEOUT; +static uint16_t autoshift_lastkey = KC_NO; void autoshift_timer_report(void) { char display[8]; @@ -52,14 +43,9 @@ void autoshift_flush(void) { uint16_t elapsed = timer_elapsed(autoshift_time); if (elapsed > autoshift_timeout) { - register_code(KC_LSFT); - } - - register_code(autoshift_lastkey); - unregister_code(autoshift_lastkey); - - if (elapsed > autoshift_timeout) { - unregister_code(KC_LSFT); + tap_code16(LSFT(autoshift_lastkey)); + } else { + tap_code(autoshift_lastkey); } autoshift_time = 0; @@ -67,8 +53,6 @@ void autoshift_flush(void) { } } -bool autoshift_enabled = true; - void autoshift_enable(void) { autoshift_enabled = true; } void autoshift_disable(void) { autoshift_enabled = false; @@ -84,106 +68,62 @@ void autoshift_toggle(void) { } } -bool autoshift_state(void) { return autoshift_enabled; } +bool get_autoshift_state(void) { return autoshift_enabled; } -bool process_auto_shift(uint16_t keycode, keyrecord_t *record) { -# ifndef AUTO_SHIFT_MODIFIERS - static uint8_t any_mod_pressed; -# endif +uint16_t get_autoshift_timeout(void) { return autoshift_timeout; } +void set_autoshift_timeout(uint16_t timeout) { autoshift_timeout = timeout; } + +bool process_auto_shift(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { switch (keycode) { case KC_ASUP: autoshift_timeout += 5; - return false; + return true; case KC_ASDN: autoshift_timeout -= 5; - return false; + return true; case KC_ASRP: autoshift_timer_report(); - return false; + return true; case KC_ASTG: autoshift_toggle(); - return false; + return true; case KC_ASON: autoshift_enable(); - return false; + return true; case KC_ASOFF: autoshift_disable(); - return false; + return true; # ifndef NO_AUTO_SHIFT_ALPHA - case KC_A: - case KC_B: - case KC_C: - case KC_D: - case KC_E: - case KC_F: - case KC_G: - case KC_H: - case KC_I: - case KC_J: - case KC_K: - case KC_L: - case KC_M: - case KC_N: - case KC_O: - case KC_P: - case KC_Q: - case KC_R: - case KC_S: - case KC_T: - case KC_U: - case KC_V: - case KC_W: - case KC_X: - case KC_Y: - case KC_Z: + case KC_A ... KC_Z: # endif # ifndef NO_AUTO_SHIFT_NUMERIC - case KC_1: - case KC_2: - case KC_3: - case KC_4: - case KC_5: - case KC_6: - case KC_7: - case KC_8: - case KC_9: - case KC_0: + case KC_1 ... KC_0: # endif # ifndef NO_AUTO_SHIFT_SPECIAL - case KC_MINUS: - case KC_EQL: case KC_TAB: - case KC_LBRC: - case KC_RBRC: - case KC_BSLS: - case KC_SCLN: - case KC_QUOT: - case KC_COMM: - case KC_DOT: - case KC_SLSH: - case KC_GRAVE: + case KC_MINUS ... KC_SLASH: case KC_NONUS_BSLASH: - case KC_NONUS_HASH: # endif - autoshift_flush(); if (!autoshift_enabled) return true; # ifndef AUTO_SHIFT_MODIFIERS - any_mod_pressed = get_mods() & (MOD_BIT(KC_LGUI) | MOD_BIT(KC_RGUI) | MOD_BIT(KC_LALT) | MOD_BIT(KC_RALT) | MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL) | MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)); - - if (any_mod_pressed) { + if (get_mods()) { return true; } # endif - autoshift_on(keycode); + + // We need some extra handling here for OSL edge cases +# if !defined(NO_ACTION_ONESHOT) && !defined(NO_ACTION_TAPPING) + clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); +# endif return false; default: diff --git a/quantum/process_keycode/process_auto_shift.h b/quantum/process_keycode/process_auto_shift.h index 083325d8e391..e86c4658e98d 100644 --- a/quantum/process_keycode/process_auto_shift.h +++ b/quantum/process_keycode/process_auto_shift.h @@ -14,8 +14,7 @@ * along with this program. If not, see . */ -#ifndef PROCESS_AUTO_SHIFT_H -#define PROCESS_AUTO_SHIFT_H +#pragma once #include "quantum.h" @@ -25,9 +24,9 @@ bool process_auto_shift(uint16_t keycode, keyrecord_t *record); -void autoshift_enable(void); -void autoshift_disable(void); -void autoshift_toggle(void); -bool autoshift_state(void); - -#endif +void autoshift_enable(void); +void autoshift_disable(void); +void autoshift_toggle(void); +bool get_autoshift_state(void); +uint16_t get_autoshift_timeout(void); +void set_autoshift_timeout(uint16_t timeout); From 732d1dd4f6f9ec060b4b8332309c82ebb6c3ca25 Mon Sep 17 00:00:00 2001 From: Jonathan Rascher Date: Sun, 3 Nov 2019 16:30:15 -0600 Subject: [PATCH 257/316] Fix KBDPad MKI backlight, Num Lock LEDs; clean up firmware a bit (#6883) * Update keyboard kit URL * Replace custom RGB driver with new one from #7183 * Replace backlight with standard impl * Remove some unnecessary default settings * Disable COMMAND since docs want it off by default (There's no working IS_COMMAND set for this board anyway, so it's already a nop.) --- keyboards/kbdfans/kbdpad/mk1/config.h | 9 ++-- keyboards/kbdfans/kbdpad/mk1/info.json | 4 +- keyboards/kbdfans/kbdpad/mk1/mk1.c | 71 +++----------------------- keyboards/kbdfans/kbdpad/mk1/readme.md | 2 +- keyboards/kbdfans/kbdpad/mk1/rules.mk | 8 ++- 5 files changed, 17 insertions(+), 77 deletions(-) diff --git a/keyboards/kbdfans/kbdpad/mk1/config.h b/keyboards/kbdfans/kbdpad/mk1/config.h index 2c55d2aef06a..1f0b371af0d2 100644 --- a/keyboards/kbdfans/kbdpad/mk1/config.h +++ b/keyboards/kbdfans/kbdpad/mk1/config.h @@ -27,12 +27,13 @@ along with this program. If not, see . #define MATRIX_ROWS 6 #define MATRIX_COLS 4 -// 0 1 2 3 4 5 #define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5 } #define MATRIX_COL_PINS { A0, A1, A2, A3 } -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW -#define DEBOUNCE 5 -#define BACKLIGHT_LEVELS 1 +#define BACKLIGHT_PIN D4 +#define BACKLIGHT_BREATHING + +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 6 diff --git a/keyboards/kbdfans/kbdpad/mk1/info.json b/keyboards/kbdfans/kbdpad/mk1/info.json index 426a23b8d525..4f0da62e83c5 100644 --- a/keyboards/kbdfans/kbdpad/mk1/info.json +++ b/keyboards/kbdfans/kbdpad/mk1/info.json @@ -1,6 +1,6 @@ { - "keyboard_name": "KBDFans KBDPad MKI", - "url": "", + "keyboard_name": "KBDfans KBDPad MKI", + "url": "https://kbdfans.com/products/kbdfans-pad-custom-mechanical-keyboard-diy-kit", "maintainer": "qmk", "width": 4, "height": 6.25, diff --git a/keyboards/kbdfans/kbdpad/mk1/mk1.c b/keyboards/kbdfans/kbdpad/mk1/mk1.c index c17cb008486f..71a47b7ba9c0 100644 --- a/keyboards/kbdfans/kbdpad/mk1/mk1.c +++ b/keyboards/kbdfans/kbdpad/mk1/mk1.c @@ -13,76 +13,17 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "i2c_master.h" -#include "quantum.h" -#ifdef RGBLIGHT_ENABLE -#include "rgblight.h" -extern rgblight_config_t rgblight_config; +#include "quantum.h" -void rgblight_set(void) { - if (!rgblight_config.enable) { - for (uint8_t i = 0; i < RGBLED_NUM; i++) { - led[i].r = 0; - led[i].g = 0; - led[i].b = 0; - } - } - - i2c_init(); - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); -} -#endif +#define NUMLOCK_PIN D0 void matrix_init_kb(void) { -#ifdef RGBLIGHT_ENABLE - if (rgblight_config.enable) { - i2c_init(); - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); - } -#endif - // call user level keymaps, if any + setPinOutput(NUMLOCK_PIN); matrix_init_user(); } -void matrix_scan_kb(void) { -#ifdef RGBLIGHT_ENABLE - rgblight_task(); -#endif - matrix_scan_user(); - /* Nothing else for now. */ -} - -__attribute__ ((weak)) -void matrix_scan_user(void) { +void led_set_kb(uint8_t usb_led) { + writePin(NUMLOCK_PIN, IS_LED_ON(usb_led, USB_LED_NUM_LOCK)); + led_set_user(usb_led); } - -void backlight_init_ports(void) { - // initialize pins D0, D1, D4 and D6 as output - setPinOutput(D0); - setPinOutput(D1); - setPinOutput(D4); - setPinOutput(D6); - - // turn backlight LEDs on - writePinHigh(D0); - writePinHigh(D1); - writePinHigh(D4); - writePinHigh(D6); -} - -void backlight_set(uint8_t level) { - if (level == 0) { - // turn backlight LEDs off - writePinLow(D0); - writePinLow(D1); - writePinLow(D4); - writePinLow(D6); - } else { - // turn backlight LEDs on - writePinHigh(D0); - writePinHigh(D1); - writePinHigh(D4); - writePinHigh(D6); - } -} \ No newline at end of file diff --git a/keyboards/kbdfans/kbdpad/mk1/readme.md b/keyboards/kbdfans/kbdpad/mk1/readme.md index 569fb88a229f..e808d893471d 100644 --- a/keyboards/kbdfans/kbdpad/mk1/readme.md +++ b/keyboards/kbdfans/kbdpad/mk1/readme.md @@ -4,7 +4,7 @@ Custom numpad. Keyboard Maintainer: [MechMerlin](/~https://github.com/mechmerlin) Hardware Supported: KBDPad MKI -Hardware Availability: No longer available. +Hardware Availability: [KBDfans](https://kbdfans.com/products/kbdfans-pad-custom-mechanical-keyboard-diy-kit) Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/kbdfans/kbdpad/mk1/rules.mk b/keyboards/kbdfans/kbdpad/mk1/rules.mk index e43baee5c5bf..f1f740760a25 100644 --- a/keyboards/kbdfans/kbdpad/mk1/rules.mk +++ b/keyboards/kbdfans/kbdpad/mk1/rules.mk @@ -31,11 +31,9 @@ BOOTMAGIC_ENABLE = no MOUSEKEY_ENABLE = yes EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = yes -COMMAND_ENABLE = yes +COMMAND_ENABLE = no BACKLIGHT_ENABLE = yes -RGBLIGHT_ENABLE = no -RGBLIGHT_CUSTOM_DRIVER = no +RGBLIGHT_ENABLE = no # PCB has underglow LEDs, but case doesn't let them show. +WS2812_DRIVER = i2c OPT_DEFS = -DDEBUG_LEVEL=0 - -QUANTUM_LIB_SRC = i2c_master.c From be6562a22335b85e9904c0f7cc748943c9e809a7 Mon Sep 17 00:00:00 2001 From: Thomas Baart Date: Sun, 3 Nov 2019 23:34:47 +0100 Subject: [PATCH 258/316] Adds raw write functions to the OLED driver (#7237) * Added oled_write_raw and oled_write_raw_P functions to the OLED driver * Added oled_write_raw method calls to feature_oled_driver.md --- docs/feature_oled_driver.md | 6 ++++++ drivers/oled/oled_driver.c | 21 ++++++++++++++++++++- drivers/oled/oled_driver.h | 6 +++++- 3 files changed, 31 insertions(+), 2 deletions(-) diff --git a/docs/feature_oled_driver.md b/docs/feature_oled_driver.md index 623f1816ac18..b124ba5a8f5d 100644 --- a/docs/feature_oled_driver.md +++ b/docs/feature_oled_driver.md @@ -229,6 +229,12 @@ void oled_write_P(const char *data, bool invert); // Remapped to call 'void oled_write_ln(const char *data, bool invert);' on ARM void oled_write_ln_P(const char *data, bool invert); +// Writes a string to the buffer at current cursor position +void oled_write_raw(const char *data, uint16_t size); + +// Writes a PROGMEM string to the buffer at current cursor position +void oled_write_raw_P(const char *data, uint16_t size); + // Can be used to manually turn on the screen if it is off // Returns true if the screen was on or turns on bool oled_on(void); diff --git a/drivers/oled/oled_driver.c b/drivers/oled/oled_driver.c index 72960cca4c86..f20f4629aafa 100644 --- a/drivers/oled/oled_driver.c +++ b/drivers/oled/oled_driver.c @@ -431,6 +431,15 @@ void oled_write_ln(const char *data, bool invert) { oled_advance_page(true); } +void oled_write_raw(const char *data, uint16_t size) { + if (size > OLED_MATRIX_SIZE) size = OLED_MATRIX_SIZE; + for (uint16_t i = 0; i < size; i++) { + if (oled_buffer[i] == data[i]) continue; + oled_buffer[i] = data[i]; + oled_dirty |= (1 << (i / OLED_BLOCK_SIZE)); + } +} + #if defined(__AVR__) void oled_write_P(const char *data, bool invert) { uint8_t c = pgm_read_byte(data); @@ -444,6 +453,16 @@ void oled_write_ln_P(const char *data, bool invert) { oled_write_P(data, invert); oled_advance_page(true); } + +void oled_write_raw_P(const char *data, uint16_t size) { + if (size > OLED_MATRIX_SIZE) size = OLED_MATRIX_SIZE; + for (uint16_t i = 0; i < size; i++) { + uint8_t c = pgm_read_byte(++data); + if (oled_buffer[i] == c) continue; + oled_buffer[i] = c; + oled_dirty |= (1 << (i / OLED_BLOCK_SIZE)); + } +} #endif // defined(__AVR__) bool oled_on(void) { @@ -566,4 +585,4 @@ void oled_task(void) { #endif } -__attribute__((weak)) void oled_task_user(void) {} +__attribute__((weak)) void oled_task_user(void) {} \ No newline at end of file diff --git a/drivers/oled/oled_driver.h b/drivers/oled/oled_driver.h index ac8a1c7651d3..bba6a7a12904 100644 --- a/drivers/oled/oled_driver.h +++ b/drivers/oled/oled_driver.h @@ -200,6 +200,8 @@ void oled_write(const char *data, bool invert); // Advances the cursor to the next page, wiring ' ' to the remainder of the current page void oled_write_ln(const char *data, bool invert); +void oled_write_raw(const char *data, uint16_t size); + #if defined(__AVR__) // Writes a PROGMEM string to the buffer at current cursor position // Advances the cursor while writing, inverts the pixels if true @@ -211,6 +213,8 @@ void oled_write_P(const char *data, bool invert); // Advances the cursor to the next page, wiring ' ' to the remainder of the current page // Remapped to call 'void oled_write_ln(const char *data, bool invert);' on ARM void oled_write_ln_P(const char *data, bool invert); + +void oled_write_raw_P(const char *data, uint16_t size); #else // Writes a string to the buffer at current cursor position // Advances the cursor while writing, inverts the pixels if true @@ -254,4 +258,4 @@ bool oled_scroll_off(void); uint8_t oled_max_chars(void); // Returns the maximum number of lines that will fit on the oled -uint8_t oled_max_lines(void); +uint8_t oled_max_lines(void); \ No newline at end of file From 363cdb5fc00519a4eb45a4401b93451949c59d6a Mon Sep 17 00:00:00 2001 From: fauxpark Date: Mon, 4 Nov 2019 09:35:43 +1100 Subject: [PATCH 259/316] Remove duplicate pro_micro.h (#7246) --- keyboards/ai03/orbit/serial.c | 1 - keyboards/claw44/serial.c | 1 - keyboards/crkbd/serial.c | 1 - keyboards/ergoinu/matrix.c | 6 - keyboards/fortitude60/serial.c | 1 - keyboards/handwired/xealous/matrix.c | 1 - keyboards/helix/local_drivers/serial.c | 1 - keyboards/helix/pico/matrix.c | 6 - keyboards/lily58/serial.c | 1 - keyboards/meira/matrix.c | 2 - keyboards/meira/promicro/promicro.h | 2 - keyboards/minidox/pro_micro.h | 362 ------------------------- keyboards/mint60/matrix.c | 6 - keyboards/treadstone48/pro_micro.h | 362 ------------------------- keyboards/treadstone48/serial.c | 1 - keyboards/yosino58/pro_micro.h | 358 ------------------------ keyboards/yosino58/serial.c | 1 - keyboards/zinc/serial.c | 1 - quantum/split_common/serial.c | 1 - 19 files changed, 1115 deletions(-) delete mode 100644 keyboards/minidox/pro_micro.h delete mode 100644 keyboards/treadstone48/pro_micro.h delete mode 100644 keyboards/yosino58/pro_micro.h diff --git a/keyboards/ai03/orbit/serial.c b/keyboards/ai03/orbit/serial.c index 1315377a3459..636dfa090677 100644 --- a/keyboards/ai03/orbit/serial.c +++ b/keyboards/ai03/orbit/serial.c @@ -17,7 +17,6 @@ #include #include #include "serial.h" -//#include #ifdef SOFT_SERIAL_PIN diff --git a/keyboards/claw44/serial.c b/keyboards/claw44/serial.c index 325c29a3f704..f6293c3dc231 100644 --- a/keyboards/claw44/serial.c +++ b/keyboards/claw44/serial.c @@ -17,7 +17,6 @@ #include #include #include "serial.h" -//#include #ifdef SOFT_SERIAL_PIN diff --git a/keyboards/crkbd/serial.c b/keyboards/crkbd/serial.c index 325c29a3f704..f6293c3dc231 100644 --- a/keyboards/crkbd/serial.c +++ b/keyboards/crkbd/serial.c @@ -17,7 +17,6 @@ #include #include #include "serial.h" -//#include #ifdef SOFT_SERIAL_PIN diff --git a/keyboards/ergoinu/matrix.c b/keyboards/ergoinu/matrix.c index 92c95e335eb6..00914a2575ed 100644 --- a/keyboards/ergoinu/matrix.c +++ b/keyboards/ergoinu/matrix.c @@ -174,18 +174,12 @@ uint8_t matrix_scan(void) { }else{ matrix_slave_scan(); -// if(serial_slave_DATA_CORRUPT()){ -// TXLED0; int offset = (isLeftHand) ? ROWS_PER_HAND : 0; for (int i = 0; i < ROWS_PER_HAND; ++i) { matrix[offset+i] = serial_master_buffer[i]; } -// }else{ -// TXLED1; -// } - matrix_scan_quantum(); } return 1; diff --git a/keyboards/fortitude60/serial.c b/keyboards/fortitude60/serial.c index 6006ebf1bdb2..674c42d593b1 100644 --- a/keyboards/fortitude60/serial.c +++ b/keyboards/fortitude60/serial.c @@ -17,7 +17,6 @@ #include #include #include "serial.h" -//#include #ifdef SOFT_SERIAL_PIN diff --git a/keyboards/handwired/xealous/matrix.c b/keyboards/handwired/xealous/matrix.c index 6d43db4d9135..46410b986dc2 100644 --- a/keyboards/handwired/xealous/matrix.c +++ b/keyboards/handwired/xealous/matrix.c @@ -27,7 +27,6 @@ along with this program. If not, see . #include "util.h" #include "matrix.h" #include "split_util.h" -#include "pro_micro.h" #include "config.h" #include "timer.h" diff --git a/keyboards/helix/local_drivers/serial.c b/keyboards/helix/local_drivers/serial.c index 6006ebf1bdb2..674c42d593b1 100644 --- a/keyboards/helix/local_drivers/serial.c +++ b/keyboards/helix/local_drivers/serial.c @@ -17,7 +17,6 @@ #include #include #include "serial.h" -//#include #ifdef SOFT_SERIAL_PIN diff --git a/keyboards/helix/pico/matrix.c b/keyboards/helix/pico/matrix.c index aba55da7c8c0..c2940e3b3e61 100644 --- a/keyboards/helix/pico/matrix.c +++ b/keyboards/helix/pico/matrix.c @@ -202,18 +202,12 @@ uint8_t matrix_scan(void) }else{ matrix_slave_scan(); -// if(serial_slave_DATA_CORRUPT()){ -// TXLED0; int offset = (isLeftHand) ? ROWS_PER_HAND : 0; for (int i = 0; i < ROWS_PER_HAND; ++i) { matrix[offset+i] = serial_master_buffer[i]; } -// }else{ -// TXLED1; -// } - matrix_scan_quantum(); } return 1; diff --git a/keyboards/lily58/serial.c b/keyboards/lily58/serial.c index 325c29a3f704..f6293c3dc231 100755 --- a/keyboards/lily58/serial.c +++ b/keyboards/lily58/serial.c @@ -17,7 +17,6 @@ #include #include #include "serial.h" -//#include #ifdef SOFT_SERIAL_PIN diff --git a/keyboards/meira/matrix.c b/keyboards/meira/matrix.c index 030c91332d0d..7de188a68c65 100644 --- a/keyboards/meira/matrix.c +++ b/keyboards/meira/matrix.c @@ -116,8 +116,6 @@ void matrix_init(void) init_rows(); // init_lcols(); -// TX_RX_LED_INIT; - // initialize matrix state: all keys off for (uint8_t i=0; i < MATRIX_ROWS; i++) { matrix[i] = 0; diff --git a/keyboards/meira/promicro/promicro.h b/keyboards/meira/promicro/promicro.h index 8e7525eab699..9e6800b4977f 100644 --- a/keyboards/meira/promicro/promicro.h +++ b/keyboards/meira/promicro/promicro.h @@ -5,6 +5,4 @@ #include "quantum.h" -#include "pro_micro.h" - #endif diff --git a/keyboards/minidox/pro_micro.h b/keyboards/minidox/pro_micro.h deleted file mode 100644 index f9e7ed75d9d5..000000000000 --- a/keyboards/minidox/pro_micro.h +++ /dev/null @@ -1,362 +0,0 @@ -/* - pins_arduino.h - Pin definition functions for Arduino - Part of Arduino - http://www.arduino.cc/ - - Copyright (c) 2007 David A. Mellis - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General - Public License along with this library; if not, write to the - Free Software Foundation, Inc., 59 Temple Place, Suite 330, - Boston, MA 02111-1307 USA - - $Id: wiring.h 249 2007-02-03 16:52:51Z mellis $ -*/ - -#ifndef Pins_Arduino_h -#define Pins_Arduino_h - -#include - -// Workaround for wrong definitions in "iom32u4.h". -// This should be fixed in the AVR toolchain. -#undef UHCON -#undef UHINT -#undef UHIEN -#undef UHADDR -#undef UHFNUM -#undef UHFNUML -#undef UHFNUMH -#undef UHFLEN -#undef UPINRQX -#undef UPINTX -#undef UPNUM -#undef UPRST -#undef UPCONX -#undef UPCFG0X -#undef UPCFG1X -#undef UPSTAX -#undef UPCFG2X -#undef UPIENX -#undef UPDATX -#undef TCCR2A -#undef WGM20 -#undef WGM21 -#undef COM2B0 -#undef COM2B1 -#undef COM2A0 -#undef COM2A1 -#undef TCCR2B -#undef CS20 -#undef CS21 -#undef CS22 -#undef WGM22 -#undef FOC2B -#undef FOC2A -#undef TCNT2 -#undef TCNT2_0 -#undef TCNT2_1 -#undef TCNT2_2 -#undef TCNT2_3 -#undef TCNT2_4 -#undef TCNT2_5 -#undef TCNT2_6 -#undef TCNT2_7 -#undef OCR2A -#undef OCR2_0 -#undef OCR2_1 -#undef OCR2_2 -#undef OCR2_3 -#undef OCR2_4 -#undef OCR2_5 -#undef OCR2_6 -#undef OCR2_7 -#undef OCR2B -#undef OCR2_0 -#undef OCR2_1 -#undef OCR2_2 -#undef OCR2_3 -#undef OCR2_4 -#undef OCR2_5 -#undef OCR2_6 -#undef OCR2_7 - -#define NUM_DIGITAL_PINS 30 -#define NUM_ANALOG_INPUTS 12 - -#define TX_RX_LED_INIT DDRD |= (1<<5), DDRB |= (1<<0) -#define TXLED0 PORTD |= (1<<5) -#define TXLED1 PORTD &= ~(1<<5) -#define RXLED0 PORTB |= (1<<0) -#define RXLED1 PORTB &= ~(1<<0) - -static const uint8_t SDA = 2; -static const uint8_t SCL = 3; -#define LED_BUILTIN 13 - -// Map SPI port to 'new' pins D14..D17 -static const uint8_t SS = 17; -static const uint8_t MOSI = 16; -static const uint8_t MISO = 14; -static const uint8_t SCK = 15; - -// Mapping of analog pins as digital I/O -// A6-A11 share with digital pins -static const uint8_t ADC0 = 18; -static const uint8_t ADC1 = 19; -static const uint8_t ADC2 = 20; -static const uint8_t ADC3 = 21; -static const uint8_t ADC4 = 22; -static const uint8_t ADC5 = 23; -static const uint8_t ADC6 = 24; // D4 -static const uint8_t ADC7 = 25; // D6 -static const uint8_t ADC8 = 26; // D8 -static const uint8_t ADC9 = 27; // D9 -static const uint8_t ADC10 = 28; // D10 -static const uint8_t ADC11 = 29; // D12 - -#define digitalPinToPCICR(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCICR) : ((uint8_t *)0)) -#define digitalPinToPCICRbit(p) 0 -#define digitalPinToPCMSK(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCMSK0) : ((uint8_t *)0)) -#define digitalPinToPCMSKbit(p) ( ((p) >= 8 && (p) <= 11) ? (p) - 4 : ((p) == 14 ? 3 : ((p) == 15 ? 1 : ((p) == 16 ? 2 : ((p) == 17 ? 0 : (p - A8 + 4)))))) - -// __AVR_ATmega32U4__ has an unusual mapping of pins to channels -extern const uint8_t PROGMEM analog_pin_to_channel_PGM[]; -#define analogPinToChannel(P) ( pgm_read_byte( analog_pin_to_channel_PGM + (P) ) ) - -#define digitalPinToInterrupt(p) ((p) == 0 ? 2 : ((p) == 1 ? 3 : ((p) == 2 ? 1 : ((p) == 3 ? 0 : ((p) == 7 ? 4 : NOT_AN_INTERRUPT))))) - -#ifdef ARDUINO_MAIN - -// On the Arduino board, digital pins are also used -// for the analog output (software PWM). Analog input -// pins are a separate set. - -// ATMEL ATMEGA32U4 / ARDUINO LEONARDO -// -// D0 PD2 RXD1/INT2 -// D1 PD3 TXD1/INT3 -// D2 PD1 SDA SDA/INT1 -// D3# PD0 PWM8/SCL OC0B/SCL/INT0 -// D4 A6 PD4 ADC8 -// D5# PC6 ??? OC3A/#OC4A -// D6# A7 PD7 FastPWM #OC4D/ADC10 -// D7 PE6 INT6/AIN0 -// -// D8 A8 PB4 ADC11/PCINT4 -// D9# A9 PB5 PWM16 OC1A/#OC4B/ADC12/PCINT5 -// D10# A10 PB6 PWM16 OC1B/0c4B/ADC13/PCINT6 -// D11# PB7 PWM8/16 0C0A/OC1C/#RTS/PCINT7 -// D12 A11 PD6 T1/#OC4D/ADC9 -// D13# PC7 PWM10 CLK0/OC4A -// -// A0 D18 PF7 ADC7 -// A1 D19 PF6 ADC6 -// A2 D20 PF5 ADC5 -// A3 D21 PF4 ADC4 -// A4 D22 PF1 ADC1 -// A5 D23 PF0 ADC0 -// -// New pins D14..D17 to map SPI port to digital pins -// -// MISO D14 PB3 MISO,PCINT3 -// SCK D15 PB1 SCK,PCINT1 -// MOSI D16 PB2 MOSI,PCINT2 -// SS D17 PB0 RXLED,SS/PCINT0 -// -// Connected LEDs on board for TX and RX -// TXLED D24 PD5 XCK1 -// RXLED D17 PB0 -// HWB PE2 HWB - -// these arrays map port names (e.g. port B) to the -// appropriate addresses for various functions (e.g. reading -// and writing) -const uint16_t PROGMEM port_to_mode_PGM[] = { - NOT_A_PORT, - NOT_A_PORT, - (uint16_t) &DDRB, - (uint16_t) &DDRC, - (uint16_t) &DDRD, - (uint16_t) &DDRE, - (uint16_t) &DDRF, -}; - -const uint16_t PROGMEM port_to_output_PGM[] = { - NOT_A_PORT, - NOT_A_PORT, - (uint16_t) &PORTB, - (uint16_t) &PORTC, - (uint16_t) &PORTD, - (uint16_t) &PORTE, - (uint16_t) &PORTF, -}; - -const uint16_t PROGMEM port_to_input_PGM[] = { - NOT_A_PORT, - NOT_A_PORT, - (uint16_t) &PINB, - (uint16_t) &PINC, - (uint16_t) &PIND, - (uint16_t) &PINE, - (uint16_t) &PINF, -}; - -const uint8_t PROGMEM digital_pin_to_port_PGM[] = { - PD, // D0 - PD2 - PD, // D1 - PD3 - PD, // D2 - PD1 - PD, // D3 - PD0 - PD, // D4 - PD4 - PC, // D5 - PC6 - PD, // D6 - PD7 - PE, // D7 - PE6 - - PB, // D8 - PB4 - PB, // D9 - PB5 - PB, // D10 - PB6 - PB, // D11 - PB7 - PD, // D12 - PD6 - PC, // D13 - PC7 - - PB, // D14 - MISO - PB3 - PB, // D15 - SCK - PB1 - PB, // D16 - MOSI - PB2 - PB, // D17 - SS - PB0 - - PF, // D18 - A0 - PF7 - PF, // D19 - A1 - PF6 - PF, // D20 - A2 - PF5 - PF, // D21 - A3 - PF4 - PF, // D22 - A4 - PF1 - PF, // D23 - A5 - PF0 - - PD, // D24 - PD5 - PD, // D25 / D6 - A7 - PD7 - PB, // D26 / D8 - A8 - PB4 - PB, // D27 / D9 - A9 - PB5 - PB, // D28 / D10 - A10 - PB6 - PD, // D29 / D12 - A11 - PD6 -}; - -const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] = { - _BV(2), // D0 - PD2 - _BV(3), // D1 - PD3 - _BV(1), // D2 - PD1 - _BV(0), // D3 - PD0 - _BV(4), // D4 - PD4 - _BV(6), // D5 - PC6 - _BV(7), // D6 - PD7 - _BV(6), // D7 - PE6 - - _BV(4), // D8 - PB4 - _BV(5), // D9 - PB5 - _BV(6), // D10 - PB6 - _BV(7), // D11 - PB7 - _BV(6), // D12 - PD6 - _BV(7), // D13 - PC7 - - _BV(3), // D14 - MISO - PB3 - _BV(1), // D15 - SCK - PB1 - _BV(2), // D16 - MOSI - PB2 - _BV(0), // D17 - SS - PB0 - - _BV(7), // D18 - A0 - PF7 - _BV(6), // D19 - A1 - PF6 - _BV(5), // D20 - A2 - PF5 - _BV(4), // D21 - A3 - PF4 - _BV(1), // D22 - A4 - PF1 - _BV(0), // D23 - A5 - PF0 - - _BV(5), // D24 - PD5 - _BV(7), // D25 / D6 - A7 - PD7 - _BV(4), // D26 / D8 - A8 - PB4 - _BV(5), // D27 / D9 - A9 - PB5 - _BV(6), // D28 / D10 - A10 - PB6 - _BV(6), // D29 / D12 - A11 - PD6 -}; - -const uint8_t PROGMEM digital_pin_to_timer_PGM[] = { - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - TIMER0B, /* 3 */ - NOT_ON_TIMER, - TIMER3A, /* 5 */ - TIMER4D, /* 6 */ - NOT_ON_TIMER, - - NOT_ON_TIMER, - TIMER1A, /* 9 */ - TIMER1B, /* 10 */ - TIMER0A, /* 11 */ - - NOT_ON_TIMER, - TIMER4A, /* 13 */ - - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, -}; - -const uint8_t PROGMEM analog_pin_to_channel_PGM[] = { - 7, // A0 PF7 ADC7 - 6, // A1 PF6 ADC6 - 5, // A2 PF5 ADC5 - 4, // A3 PF4 ADC4 - 1, // A4 PF1 ADC1 - 0, // A5 PF0 ADC0 - 8, // A6 D4 PD4 ADC8 - 10, // A7 D6 PD7 ADC10 - 11, // A8 D8 PB4 ADC11 - 12, // A9 D9 PB5 ADC12 - 13, // A10 D10 PB6 ADC13 - 9 // A11 D12 PD6 ADC9 -}; - -#endif /* ARDUINO_MAIN */ - -// These serial port names are intended to allow libraries and architecture-neutral -// sketches to automatically default to the correct port name for a particular type -// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN, -// the first hardware serial port whose RX/TX pins are not dedicated to another use. -// -// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor -// -// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial -// -// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library -// -// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins. -// -// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX -// pins are NOT connected to anything by default. -#define SERIAL_PORT_MONITOR Serial -#define SERIAL_PORT_USBVIRTUAL Serial -#define SERIAL_PORT_HARDWARE Serial1 -#define SERIAL_PORT_HARDWARE_OPEN Serial1 - -#endif /* Pins_Arduino_h */ diff --git a/keyboards/mint60/matrix.c b/keyboards/mint60/matrix.c index 6d8878332ac6..30f3c56bcf1b 100644 --- a/keyboards/mint60/matrix.c +++ b/keyboards/mint60/matrix.c @@ -200,18 +200,12 @@ uint8_t matrix_scan(void) }else{ matrix_slave_scan(); -// if(serial_slave_DATA_CORRUPT()){ -// TXLED0; int offset = (isLeftHand) ? ROWS_PER_HAND : 0; for (int i = 0; i < ROWS_PER_HAND; ++i) { matrix[offset+i] = serial_master_buffer[i]; } -// }else{ -// TXLED1; -// } - matrix_scan_quantum(); } return 1; diff --git a/keyboards/treadstone48/pro_micro.h b/keyboards/treadstone48/pro_micro.h deleted file mode 100644 index f9e7ed75d9d5..000000000000 --- a/keyboards/treadstone48/pro_micro.h +++ /dev/null @@ -1,362 +0,0 @@ -/* - pins_arduino.h - Pin definition functions for Arduino - Part of Arduino - http://www.arduino.cc/ - - Copyright (c) 2007 David A. Mellis - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General - Public License along with this library; if not, write to the - Free Software Foundation, Inc., 59 Temple Place, Suite 330, - Boston, MA 02111-1307 USA - - $Id: wiring.h 249 2007-02-03 16:52:51Z mellis $ -*/ - -#ifndef Pins_Arduino_h -#define Pins_Arduino_h - -#include - -// Workaround for wrong definitions in "iom32u4.h". -// This should be fixed in the AVR toolchain. -#undef UHCON -#undef UHINT -#undef UHIEN -#undef UHADDR -#undef UHFNUM -#undef UHFNUML -#undef UHFNUMH -#undef UHFLEN -#undef UPINRQX -#undef UPINTX -#undef UPNUM -#undef UPRST -#undef UPCONX -#undef UPCFG0X -#undef UPCFG1X -#undef UPSTAX -#undef UPCFG2X -#undef UPIENX -#undef UPDATX -#undef TCCR2A -#undef WGM20 -#undef WGM21 -#undef COM2B0 -#undef COM2B1 -#undef COM2A0 -#undef COM2A1 -#undef TCCR2B -#undef CS20 -#undef CS21 -#undef CS22 -#undef WGM22 -#undef FOC2B -#undef FOC2A -#undef TCNT2 -#undef TCNT2_0 -#undef TCNT2_1 -#undef TCNT2_2 -#undef TCNT2_3 -#undef TCNT2_4 -#undef TCNT2_5 -#undef TCNT2_6 -#undef TCNT2_7 -#undef OCR2A -#undef OCR2_0 -#undef OCR2_1 -#undef OCR2_2 -#undef OCR2_3 -#undef OCR2_4 -#undef OCR2_5 -#undef OCR2_6 -#undef OCR2_7 -#undef OCR2B -#undef OCR2_0 -#undef OCR2_1 -#undef OCR2_2 -#undef OCR2_3 -#undef OCR2_4 -#undef OCR2_5 -#undef OCR2_6 -#undef OCR2_7 - -#define NUM_DIGITAL_PINS 30 -#define NUM_ANALOG_INPUTS 12 - -#define TX_RX_LED_INIT DDRD |= (1<<5), DDRB |= (1<<0) -#define TXLED0 PORTD |= (1<<5) -#define TXLED1 PORTD &= ~(1<<5) -#define RXLED0 PORTB |= (1<<0) -#define RXLED1 PORTB &= ~(1<<0) - -static const uint8_t SDA = 2; -static const uint8_t SCL = 3; -#define LED_BUILTIN 13 - -// Map SPI port to 'new' pins D14..D17 -static const uint8_t SS = 17; -static const uint8_t MOSI = 16; -static const uint8_t MISO = 14; -static const uint8_t SCK = 15; - -// Mapping of analog pins as digital I/O -// A6-A11 share with digital pins -static const uint8_t ADC0 = 18; -static const uint8_t ADC1 = 19; -static const uint8_t ADC2 = 20; -static const uint8_t ADC3 = 21; -static const uint8_t ADC4 = 22; -static const uint8_t ADC5 = 23; -static const uint8_t ADC6 = 24; // D4 -static const uint8_t ADC7 = 25; // D6 -static const uint8_t ADC8 = 26; // D8 -static const uint8_t ADC9 = 27; // D9 -static const uint8_t ADC10 = 28; // D10 -static const uint8_t ADC11 = 29; // D12 - -#define digitalPinToPCICR(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCICR) : ((uint8_t *)0)) -#define digitalPinToPCICRbit(p) 0 -#define digitalPinToPCMSK(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCMSK0) : ((uint8_t *)0)) -#define digitalPinToPCMSKbit(p) ( ((p) >= 8 && (p) <= 11) ? (p) - 4 : ((p) == 14 ? 3 : ((p) == 15 ? 1 : ((p) == 16 ? 2 : ((p) == 17 ? 0 : (p - A8 + 4)))))) - -// __AVR_ATmega32U4__ has an unusual mapping of pins to channels -extern const uint8_t PROGMEM analog_pin_to_channel_PGM[]; -#define analogPinToChannel(P) ( pgm_read_byte( analog_pin_to_channel_PGM + (P) ) ) - -#define digitalPinToInterrupt(p) ((p) == 0 ? 2 : ((p) == 1 ? 3 : ((p) == 2 ? 1 : ((p) == 3 ? 0 : ((p) == 7 ? 4 : NOT_AN_INTERRUPT))))) - -#ifdef ARDUINO_MAIN - -// On the Arduino board, digital pins are also used -// for the analog output (software PWM). Analog input -// pins are a separate set. - -// ATMEL ATMEGA32U4 / ARDUINO LEONARDO -// -// D0 PD2 RXD1/INT2 -// D1 PD3 TXD1/INT3 -// D2 PD1 SDA SDA/INT1 -// D3# PD0 PWM8/SCL OC0B/SCL/INT0 -// D4 A6 PD4 ADC8 -// D5# PC6 ??? OC3A/#OC4A -// D6# A7 PD7 FastPWM #OC4D/ADC10 -// D7 PE6 INT6/AIN0 -// -// D8 A8 PB4 ADC11/PCINT4 -// D9# A9 PB5 PWM16 OC1A/#OC4B/ADC12/PCINT5 -// D10# A10 PB6 PWM16 OC1B/0c4B/ADC13/PCINT6 -// D11# PB7 PWM8/16 0C0A/OC1C/#RTS/PCINT7 -// D12 A11 PD6 T1/#OC4D/ADC9 -// D13# PC7 PWM10 CLK0/OC4A -// -// A0 D18 PF7 ADC7 -// A1 D19 PF6 ADC6 -// A2 D20 PF5 ADC5 -// A3 D21 PF4 ADC4 -// A4 D22 PF1 ADC1 -// A5 D23 PF0 ADC0 -// -// New pins D14..D17 to map SPI port to digital pins -// -// MISO D14 PB3 MISO,PCINT3 -// SCK D15 PB1 SCK,PCINT1 -// MOSI D16 PB2 MOSI,PCINT2 -// SS D17 PB0 RXLED,SS/PCINT0 -// -// Connected LEDs on board for TX and RX -// TXLED D24 PD5 XCK1 -// RXLED D17 PB0 -// HWB PE2 HWB - -// these arrays map port names (e.g. port B) to the -// appropriate addresses for various functions (e.g. reading -// and writing) -const uint16_t PROGMEM port_to_mode_PGM[] = { - NOT_A_PORT, - NOT_A_PORT, - (uint16_t) &DDRB, - (uint16_t) &DDRC, - (uint16_t) &DDRD, - (uint16_t) &DDRE, - (uint16_t) &DDRF, -}; - -const uint16_t PROGMEM port_to_output_PGM[] = { - NOT_A_PORT, - NOT_A_PORT, - (uint16_t) &PORTB, - (uint16_t) &PORTC, - (uint16_t) &PORTD, - (uint16_t) &PORTE, - (uint16_t) &PORTF, -}; - -const uint16_t PROGMEM port_to_input_PGM[] = { - NOT_A_PORT, - NOT_A_PORT, - (uint16_t) &PINB, - (uint16_t) &PINC, - (uint16_t) &PIND, - (uint16_t) &PINE, - (uint16_t) &PINF, -}; - -const uint8_t PROGMEM digital_pin_to_port_PGM[] = { - PD, // D0 - PD2 - PD, // D1 - PD3 - PD, // D2 - PD1 - PD, // D3 - PD0 - PD, // D4 - PD4 - PC, // D5 - PC6 - PD, // D6 - PD7 - PE, // D7 - PE6 - - PB, // D8 - PB4 - PB, // D9 - PB5 - PB, // D10 - PB6 - PB, // D11 - PB7 - PD, // D12 - PD6 - PC, // D13 - PC7 - - PB, // D14 - MISO - PB3 - PB, // D15 - SCK - PB1 - PB, // D16 - MOSI - PB2 - PB, // D17 - SS - PB0 - - PF, // D18 - A0 - PF7 - PF, // D19 - A1 - PF6 - PF, // D20 - A2 - PF5 - PF, // D21 - A3 - PF4 - PF, // D22 - A4 - PF1 - PF, // D23 - A5 - PF0 - - PD, // D24 - PD5 - PD, // D25 / D6 - A7 - PD7 - PB, // D26 / D8 - A8 - PB4 - PB, // D27 / D9 - A9 - PB5 - PB, // D28 / D10 - A10 - PB6 - PD, // D29 / D12 - A11 - PD6 -}; - -const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] = { - _BV(2), // D0 - PD2 - _BV(3), // D1 - PD3 - _BV(1), // D2 - PD1 - _BV(0), // D3 - PD0 - _BV(4), // D4 - PD4 - _BV(6), // D5 - PC6 - _BV(7), // D6 - PD7 - _BV(6), // D7 - PE6 - - _BV(4), // D8 - PB4 - _BV(5), // D9 - PB5 - _BV(6), // D10 - PB6 - _BV(7), // D11 - PB7 - _BV(6), // D12 - PD6 - _BV(7), // D13 - PC7 - - _BV(3), // D14 - MISO - PB3 - _BV(1), // D15 - SCK - PB1 - _BV(2), // D16 - MOSI - PB2 - _BV(0), // D17 - SS - PB0 - - _BV(7), // D18 - A0 - PF7 - _BV(6), // D19 - A1 - PF6 - _BV(5), // D20 - A2 - PF5 - _BV(4), // D21 - A3 - PF4 - _BV(1), // D22 - A4 - PF1 - _BV(0), // D23 - A5 - PF0 - - _BV(5), // D24 - PD5 - _BV(7), // D25 / D6 - A7 - PD7 - _BV(4), // D26 / D8 - A8 - PB4 - _BV(5), // D27 / D9 - A9 - PB5 - _BV(6), // D28 / D10 - A10 - PB6 - _BV(6), // D29 / D12 - A11 - PD6 -}; - -const uint8_t PROGMEM digital_pin_to_timer_PGM[] = { - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - TIMER0B, /* 3 */ - NOT_ON_TIMER, - TIMER3A, /* 5 */ - TIMER4D, /* 6 */ - NOT_ON_TIMER, - - NOT_ON_TIMER, - TIMER1A, /* 9 */ - TIMER1B, /* 10 */ - TIMER0A, /* 11 */ - - NOT_ON_TIMER, - TIMER4A, /* 13 */ - - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, -}; - -const uint8_t PROGMEM analog_pin_to_channel_PGM[] = { - 7, // A0 PF7 ADC7 - 6, // A1 PF6 ADC6 - 5, // A2 PF5 ADC5 - 4, // A3 PF4 ADC4 - 1, // A4 PF1 ADC1 - 0, // A5 PF0 ADC0 - 8, // A6 D4 PD4 ADC8 - 10, // A7 D6 PD7 ADC10 - 11, // A8 D8 PB4 ADC11 - 12, // A9 D9 PB5 ADC12 - 13, // A10 D10 PB6 ADC13 - 9 // A11 D12 PD6 ADC9 -}; - -#endif /* ARDUINO_MAIN */ - -// These serial port names are intended to allow libraries and architecture-neutral -// sketches to automatically default to the correct port name for a particular type -// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN, -// the first hardware serial port whose RX/TX pins are not dedicated to another use. -// -// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor -// -// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial -// -// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library -// -// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins. -// -// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX -// pins are NOT connected to anything by default. -#define SERIAL_PORT_MONITOR Serial -#define SERIAL_PORT_USBVIRTUAL Serial -#define SERIAL_PORT_HARDWARE Serial1 -#define SERIAL_PORT_HARDWARE_OPEN Serial1 - -#endif /* Pins_Arduino_h */ diff --git a/keyboards/treadstone48/serial.c b/keyboards/treadstone48/serial.c index 6006ebf1bdb2..674c42d593b1 100644 --- a/keyboards/treadstone48/serial.c +++ b/keyboards/treadstone48/serial.c @@ -17,7 +17,6 @@ #include #include #include "serial.h" -//#include #ifdef SOFT_SERIAL_PIN diff --git a/keyboards/yosino58/pro_micro.h b/keyboards/yosino58/pro_micro.h deleted file mode 100644 index 366633372716..000000000000 --- a/keyboards/yosino58/pro_micro.h +++ /dev/null @@ -1,358 +0,0 @@ -/* - pins_arduino.h - Pin definition functions for Arduino - Part of Arduino - http://www.arduino.cc/ - - Copyright (c) 2007 David A. Mellis - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General - Public License along with this library; if not, write to the - Free Software Foundation, Inc., 59 Temple Place, Suite 330, - Boston, MA 02111-1307 USA - - $Id: wiring.h 249 2007-02-03 16:52:51Z mellis $ -*/ -#pragma once - -#include - -// Workaround for wrong definitions in "iom32u4.h". -// This should be fixed in the AVR toolchain. -#undef UHCON -#undef UHINT -#undef UHIEN -#undef UHADDR -#undef UHFNUM -#undef UHFNUML -#undef UHFNUMH -#undef UHFLEN -#undef UPINRQX -#undef UPINTX -#undef UPNUM -#undef UPRST -#undef UPCONX -#undef UPCFG0X -#undef UPCFG1X -#undef UPSTAX -#undef UPCFG2X -#undef UPIENX -#undef UPDATX -#undef TCCR2A -#undef WGM20 -#undef WGM21 -#undef COM2B0 -#undef COM2B1 -#undef COM2A0 -#undef COM2A1 -#undef TCCR2B -#undef CS20 -#undef CS21 -#undef CS22 -#undef WGM22 -#undef FOC2B -#undef FOC2A -#undef TCNT2 -#undef TCNT2_0 -#undef TCNT2_1 -#undef TCNT2_2 -#undef TCNT2_3 -#undef TCNT2_4 -#undef TCNT2_5 -#undef TCNT2_6 -#undef TCNT2_7 -#undef OCR2A -#undef OCR2_0 -#undef OCR2_1 -#undef OCR2_2 -#undef OCR2_3 -#undef OCR2_4 -#undef OCR2_5 -#undef OCR2_6 -#undef OCR2_7 -#undef OCR2B -#undef OCR2_0 -#undef OCR2_1 -#undef OCR2_2 -#undef OCR2_3 -#undef OCR2_4 -#undef OCR2_5 -#undef OCR2_6 -#undef OCR2_7 - -#define NUM_DIGITAL_PINS 30 -#define NUM_ANALOG_INPUTS 12 - -#define TX_RX_LED_INIT DDRD |= (1<<5), DDRB |= (1<<0) -#define TXLED0 PORTD |= (1<<5) -#define TXLED1 PORTD &= ~(1<<5) -#define RXLED0 PORTB |= (1<<0) -#define RXLED1 PORTB &= ~(1<<0) - -static const uint8_t SDA = 2; -static const uint8_t SCL = 3; -#define LED_BUILTIN 13 - -// Map SPI port to 'new' pins D14..D17 -static const uint8_t SS = 17; -static const uint8_t MOSI = 16; -static const uint8_t MISO = 14; -static const uint8_t SCK = 15; - -// Mapping of analog pins as digital I/O -// A6-A11 share with digital pins -static const uint8_t ADC0 = 18; -static const uint8_t ADC1 = 19; -static const uint8_t ADC2 = 20; -static const uint8_t ADC3 = 21; -static const uint8_t ADC4 = 22; -static const uint8_t ADC5 = 23; -static const uint8_t ADC6 = 24; // D4 -static const uint8_t ADC7 = 25; // D6 -static const uint8_t ADC8 = 26; // D8 -static const uint8_t ADC9 = 27; // D9 -static const uint8_t ADC10 = 28; // D10 -static const uint8_t ADC11 = 29; // D12 - -#define digitalPinToPCICR(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCICR) : ((uint8_t *)0)) -#define digitalPinToPCICRbit(p) 0 -#define digitalPinToPCMSK(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCMSK0) : ((uint8_t *)0)) -#define digitalPinToPCMSKbit(p) ( ((p) >= 8 && (p) <= 11) ? (p) - 4 : ((p) == 14 ? 3 : ((p) == 15 ? 1 : ((p) == 16 ? 2 : ((p) == 17 ? 0 : (p - A8 + 4)))))) - -// __AVR_ATmega32U4__ has an unusual mapping of pins to channels -extern const uint8_t PROGMEM analog_pin_to_channel_PGM[]; -#define analogPinToChannel(P) ( pgm_read_byte( analog_pin_to_channel_PGM + (P) ) ) - -#define digitalPinToInterrupt(p) ((p) == 0 ? 2 : ((p) == 1 ? 3 : ((p) == 2 ? 1 : ((p) == 3 ? 0 : ((p) == 7 ? 4 : NOT_AN_INTERRUPT))))) - -#ifdef ARDUINO_MAIN - -// On the Arduino board, digital pins are also used -// for the analog output (software PWM). Analog input -// pins are a separate set. - -// ATMEL ATMEGA32U4 / ARDUINO LEONARDO -// -// D0 PD2 RXD1/INT2 -// D1 PD3 TXD1/INT3 -// D2 PD1 SDA SDA/INT1 -// D3# PD0 PWM8/SCL OC0B/SCL/INT0 -// D4 A6 PD4 ADC8 -// D5# PC6 ??? OC3A/#OC4A -// D6# A7 PD7 FastPWM #OC4D/ADC10 -// D7 PE6 INT6/AIN0 -// -// D8 A8 PB4 ADC11/PCINT4 -// D9# A9 PB5 PWM16 OC1A/#OC4B/ADC12/PCINT5 -// D10# A10 PB6 PWM16 OC1B/0c4B/ADC13/PCINT6 -// D11# PB7 PWM8/16 0C0A/OC1C/#RTS/PCINT7 -// D12 A11 PD6 T1/#OC4D/ADC9 -// D13# PC7 PWM10 CLK0/OC4A -// -// A0 D18 PF7 ADC7 -// A1 D19 PF6 ADC6 -// A2 D20 PF5 ADC5 -// A3 D21 PF4 ADC4 -// A4 D22 PF1 ADC1 -// A5 D23 PF0 ADC0 -// -// New pins D14..D17 to map SPI port to digital pins -// -// MISO D14 PB3 MISO,PCINT3 -// SCK D15 PB1 SCK,PCINT1 -// MOSI D16 PB2 MOSI,PCINT2 -// SS D17 PB0 RXLED,SS/PCINT0 -// -// Connected LEDs on board for TX and RX -// TXLED D24 PD5 XCK1 -// RXLED D17 PB0 -// HWB PE2 HWB - -// these arrays map port names (e.g. port B) to the -// appropriate addresses for various functions (e.g. reading -// and writing) -const uint16_t PROGMEM port_to_mode_PGM[] = { - NOT_A_PORT, - NOT_A_PORT, - (uint16_t) &DDRB, - (uint16_t) &DDRC, - (uint16_t) &DDRD, - (uint16_t) &DDRE, - (uint16_t) &DDRF, -}; - -const uint16_t PROGMEM port_to_output_PGM[] = { - NOT_A_PORT, - NOT_A_PORT, - (uint16_t) &PORTB, - (uint16_t) &PORTC, - (uint16_t) &PORTD, - (uint16_t) &PORTE, - (uint16_t) &PORTF, -}; - -const uint16_t PROGMEM port_to_input_PGM[] = { - NOT_A_PORT, - NOT_A_PORT, - (uint16_t) &PINB, - (uint16_t) &PINC, - (uint16_t) &PIND, - (uint16_t) &PINE, - (uint16_t) &PINF, -}; - -const uint8_t PROGMEM digital_pin_to_port_PGM[] = { - PD, // D0 - PD2 - PD, // D1 - PD3 - PD, // D2 - PD1 - PD, // D3 - PD0 - PD, // D4 - PD4 - PC, // D5 - PC6 - PD, // D6 - PD7 - PE, // D7 - PE6 - - PB, // D8 - PB4 - PB, // D9 - PB5 - PB, // D10 - PB6 - PB, // D11 - PB7 - PD, // D12 - PD6 - PC, // D13 - PC7 - - PB, // D14 - MISO - PB3 - PB, // D15 - SCK - PB1 - PB, // D16 - MOSI - PB2 - PB, // D17 - SS - PB0 - - PF, // D18 - A0 - PF7 - PF, // D19 - A1 - PF6 - PF, // D20 - A2 - PF5 - PF, // D21 - A3 - PF4 - PF, // D22 - A4 - PF1 - PF, // D23 - A5 - PF0 - - PD, // D24 - PD5 - PD, // D25 / D6 - A7 - PD7 - PB, // D26 / D8 - A8 - PB4 - PB, // D27 / D9 - A9 - PB5 - PB, // D28 / D10 - A10 - PB6 - PD, // D29 / D12 - A11 - PD6 -}; - -const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] = { - _BV(2), // D0 - PD2 - _BV(3), // D1 - PD3 - _BV(1), // D2 - PD1 - _BV(0), // D3 - PD0 - _BV(4), // D4 - PD4 - _BV(6), // D5 - PC6 - _BV(7), // D6 - PD7 - _BV(6), // D7 - PE6 - - _BV(4), // D8 - PB4 - _BV(5), // D9 - PB5 - _BV(6), // D10 - PB6 - _BV(7), // D11 - PB7 - _BV(6), // D12 - PD6 - _BV(7), // D13 - PC7 - - _BV(3), // D14 - MISO - PB3 - _BV(1), // D15 - SCK - PB1 - _BV(2), // D16 - MOSI - PB2 - _BV(0), // D17 - SS - PB0 - - _BV(7), // D18 - A0 - PF7 - _BV(6), // D19 - A1 - PF6 - _BV(5), // D20 - A2 - PF5 - _BV(4), // D21 - A3 - PF4 - _BV(1), // D22 - A4 - PF1 - _BV(0), // D23 - A5 - PF0 - - _BV(5), // D24 - PD5 - _BV(7), // D25 / D6 - A7 - PD7 - _BV(4), // D26 / D8 - A8 - PB4 - _BV(5), // D27 / D9 - A9 - PB5 - _BV(6), // D28 / D10 - A10 - PB6 - _BV(6), // D29 / D12 - A11 - PD6 -}; - -const uint8_t PROGMEM digital_pin_to_timer_PGM[] = { - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - TIMER0B, /* 3 */ - NOT_ON_TIMER, - TIMER3A, /* 5 */ - TIMER4D, /* 6 */ - NOT_ON_TIMER, - - NOT_ON_TIMER, - TIMER1A, /* 9 */ - TIMER1B, /* 10 */ - TIMER0A, /* 11 */ - - NOT_ON_TIMER, - TIMER4A, /* 13 */ - - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, -}; - -const uint8_t PROGMEM analog_pin_to_channel_PGM[] = { - 7, // A0 PF7 ADC7 - 6, // A1 PF6 ADC6 - 5, // A2 PF5 ADC5 - 4, // A3 PF4 ADC4 - 1, // A4 PF1 ADC1 - 0, // A5 PF0 ADC0 - 8, // A6 D4 PD4 ADC8 - 10, // A7 D6 PD7 ADC10 - 11, // A8 D8 PB4 ADC11 - 12, // A9 D9 PB5 ADC12 - 13, // A10 D10 PB6 ADC13 - 9 // A11 D12 PD6 ADC9 -}; - -#endif /* ARDUINO_MAIN */ - -// These serial port names are intended to allow libraries and architecture-neutral -// sketches to automatically default to the correct port name for a particular type -// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN, -// the first hardware serial port whose RX/TX pins are not dedicated to another use. -// -// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor -// -// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial -// -// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library -// -// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins. -// -// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX -// pins are NOT connected to anything by default. -#define SERIAL_PORT_MONITOR Serial -#define SERIAL_PORT_USBVIRTUAL Serial -#define SERIAL_PORT_HARDWARE Serial1 -#define SERIAL_PORT_HARDWARE_OPEN Serial1 diff --git a/keyboards/yosino58/serial.c b/keyboards/yosino58/serial.c index 325c29a3f704..f6293c3dc231 100644 --- a/keyboards/yosino58/serial.c +++ b/keyboards/yosino58/serial.c @@ -17,7 +17,6 @@ #include #include #include "serial.h" -//#include #ifdef SOFT_SERIAL_PIN diff --git a/keyboards/zinc/serial.c b/keyboards/zinc/serial.c index 325c29a3f704..f6293c3dc231 100644 --- a/keyboards/zinc/serial.c +++ b/keyboards/zinc/serial.c @@ -17,7 +17,6 @@ #include #include #include "serial.h" -//#include #ifdef SOFT_SERIAL_PIN diff --git a/quantum/split_common/serial.c b/quantum/split_common/serial.c index c4ef2a97e7d7..c27cbfdd0a79 100644 --- a/quantum/split_common/serial.c +++ b/quantum/split_common/serial.c @@ -17,7 +17,6 @@ #include #include #include "serial.h" -//#include #ifdef SOFT_SERIAL_PIN From a4d138645fdb5043cd76bc135eea48453cc50dff Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sun, 3 Nov 2019 22:42:21 +0000 Subject: [PATCH 260/316] [Keyboard] Fix v60_type_r compile failures (#7250) --- keyboards/v60_type_r/config.h | 8 ++++---- keyboards/v60_type_r/rules.mk | 9 ++++++--- keyboards/v60_type_r/v60_type_r.c | 10 ++-------- keyboards/v60_type_r/v60_type_r.h | 2 +- 4 files changed, 13 insertions(+), 16 deletions(-) diff --git a/keyboards/v60_type_r/config.h b/keyboards/v60_type_r/config.h index 51ca6def94a5..d1a788a8582e 100644 --- a/keyboards/v60_type_r/config.h +++ b/keyboards/v60_type_r/config.h @@ -53,14 +53,14 @@ along with this program. If not, see . #define BACKLIGHT_LEVELS 3 #define BACKLIGHT_ON_STATE 0 -#define RGBLIGHT_CUSTOM_DRIVER -#define RGBLIGHT_ANIMATIONS +//#define RGB_DI_PIN 0 #define RGBLED_NUM 1 +#define RGBLIGHT_ANIMATIONS +#define RGB_STEP 16 + #define RGB_RED_PIN PF6 #define RGB_GREEN_PIN PF5 #define RGB_BLUE_PIN PF4 -#define RGB_DI_PIN 0 -#define RGB_STEP 16 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 diff --git a/keyboards/v60_type_r/rules.mk b/keyboards/v60_type_r/rules.mk index 7533dff3db48..37acd03d1a52 100644 --- a/keyboards/v60_type_r/rules.mk +++ b/keyboards/v60_type_r/rules.mk @@ -17,18 +17,21 @@ BOOTLOADER = atmel-dfu BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default -RGBLIGHT_ENABLE = yes # Enable the RGB Underglow +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable the RGB Underglow +RGBLIGHT_CUSTOM_DRIVER = yes MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +LINK_TIME_OPTIMIZATION_ENABLE = yes + LAYOUTS = 60_ansi 60_iso diff --git a/keyboards/v60_type_r/v60_type_r.c b/keyboards/v60_type_r/v60_type_r.c index 5caa149b45d1..871d9915d304 100644 --- a/keyboards/v60_type_r/v60_type_r.c +++ b/keyboards/v60_type_r/v60_type_r.c @@ -18,13 +18,7 @@ #include "quantum.h" // if we've got an RGB underglow! -#ifdef V60_POLESTAR - -#include "rgblight.h" - -#include - -#include "action_layer.h" +#ifdef RGBLIGHT_ENABLE #define SOFTPWM_LED_TIMER_TOP F_CPU/(256*64) @@ -191,4 +185,4 @@ ISR(TIMER3_COMPA_vect) softpwm_buff[2] = led[0].b; } } -#endif // V60_POLESTAR +#endif // RGBLIGHT_ENABLE diff --git a/keyboards/v60_type_r/v60_type_r.h b/keyboards/v60_type_r/v60_type_r.h index c33a2840b095..78b6561ba5ef 100644 --- a/keyboards/v60_type_r/v60_type_r.h +++ b/keyboards/v60_type_r/v60_type_r.h @@ -17,7 +17,7 @@ #include "quantum.h" -#ifdef V60_POLESTAR +#ifdef RGBLIGHT_ENABLE #include "rgblight.h" From 3a215195ed3a12464df7169e7b68bfe0763e95b1 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Mon, 4 Nov 2019 09:43:13 +1100 Subject: [PATCH 261/316] Convert remaining PS2AVRGB boards to I2C WS2812 driver (#7245) * Convert remaining PS2AVRGB boards to I2C WS2812 driver * Add back functions to make the custom matrices happy --- keyboards/bfake/bfake.c | 53 +++++-------- keyboards/bfake/i2c.c | 106 ------------------------- keyboards/bfake/i2c.h | 27 ------- keyboards/bfake/rules.mk | 19 +---- keyboards/jc65/v32a/i2c.c | 106 ------------------------- keyboards/jc65/v32a/i2c.h | 27 ------- keyboards/jc65/v32a/rules.mk | 19 +---- keyboards/jc65/v32a/v32a.c | 56 +++++-------- keyboards/jj50/i2c.c | 104 ------------------------ keyboards/jj50/i2c.h | 25 ------ keyboards/jj50/jj50.c | 67 +++------------- keyboards/jj50/rules.mk | 24 +----- keyboards/mechmini/v1/i2c.c | 104 ------------------------ keyboards/mechmini/v1/i2c.h | 22 ----- keyboards/mechmini/v1/rules.mk | 19 +---- keyboards/mechmini/v1/v1.c | 60 ++------------ keyboards/mehkee96/i2c.c | 106 ------------------------- keyboards/mehkee96/i2c.h | 27 ------- keyboards/mehkee96/mehkee96.c | 65 ++------------- keyboards/mehkee96/rules.mk | 4 +- keyboards/mt40/i2c.c | 104 ------------------------ keyboards/mt40/i2c.h | 25 ------ keyboards/mt40/mt40.c | 29 +------ keyboards/mt40/rules.mk | 4 +- keyboards/percent/canoe/canoe.c | 92 +++++++-------------- keyboards/percent/canoe/i2c.c | 106 ------------------------- keyboards/percent/canoe/i2c.h | 27 ------- keyboards/percent/canoe/rules.mk | 21 +---- keyboards/percent/skog/i2c.c | 106 ------------------------- keyboards/percent/skog/i2c.h | 25 ------ keyboards/percent/skog/rules.mk | 19 +---- keyboards/percent/skog/skog.c | 66 ++------------- keyboards/winkeyless/bmini/bmini.c | 26 +----- keyboards/winkeyless/bmini/i2c.c | 106 ------------------------- keyboards/winkeyless/bmini/i2c.h | 27 ------- keyboards/winkeyless/bmini/rules.mk | 19 +---- keyboards/winkeyless/bminiex/bminiex.c | 61 -------------- keyboards/winkeyless/bminiex/i2c.c | 106 ------------------------- keyboards/winkeyless/bminiex/i2c.h | 25 ------ keyboards/winkeyless/bminiex/rules.mk | 19 +---- keyboards/ymd75/i2c.c | 104 ------------------------ keyboards/ymd75/i2c.h | 25 ------ keyboards/ymd75/rules.mk | 20 +---- keyboards/ymd75/ymd75.c | 67 +++------------- keyboards/ymd96/i2c.c | 104 ------------------------ keyboards/ymd96/i2c.h | 25 ------ keyboards/ymd96/rules.mk | 19 +---- keyboards/ymd96/ymd96.c | 66 ++------------- keyboards/ymdk_np21/i2c.c | 104 ------------------------ keyboards/ymdk_np21/i2c.h | 25 ------ keyboards/ymdk_np21/rules.mk | 20 +---- keyboards/ymdk_np21/ymdk_np21.c | 45 ----------- 52 files changed, 138 insertions(+), 2539 deletions(-) delete mode 100644 keyboards/bfake/i2c.c delete mode 100644 keyboards/bfake/i2c.h delete mode 100644 keyboards/jc65/v32a/i2c.c delete mode 100644 keyboards/jc65/v32a/i2c.h delete mode 100644 keyboards/jj50/i2c.c delete mode 100644 keyboards/jj50/i2c.h delete mode 100644 keyboards/mechmini/v1/i2c.c delete mode 100644 keyboards/mechmini/v1/i2c.h delete mode 100644 keyboards/mehkee96/i2c.c delete mode 100644 keyboards/mehkee96/i2c.h delete mode 100644 keyboards/mt40/i2c.c delete mode 100644 keyboards/mt40/i2c.h delete mode 100644 keyboards/percent/canoe/i2c.c delete mode 100644 keyboards/percent/canoe/i2c.h delete mode 100644 keyboards/percent/skog/i2c.c delete mode 100644 keyboards/percent/skog/i2c.h delete mode 100644 keyboards/winkeyless/bmini/i2c.c delete mode 100644 keyboards/winkeyless/bmini/i2c.h delete mode 100644 keyboards/winkeyless/bminiex/i2c.c delete mode 100644 keyboards/winkeyless/bminiex/i2c.h delete mode 100644 keyboards/ymd75/i2c.c delete mode 100644 keyboards/ymd75/i2c.h delete mode 100644 keyboards/ymd96/i2c.c delete mode 100644 keyboards/ymd96/i2c.h delete mode 100644 keyboards/ymdk_np21/i2c.c delete mode 100644 keyboards/ymdk_np21/i2c.h diff --git a/keyboards/bfake/bfake.c b/keyboards/bfake/bfake.c index 2160706fea56..f7d006576c72 100644 --- a/keyboards/bfake/bfake.c +++ b/keyboards/bfake/bfake.c @@ -16,51 +16,34 @@ along with this program. If not, see . */ #include "bfake.h" -#ifdef BACKLIGHT_ENABLE -#include "backlight.h" -#endif -#ifdef RGBLIGHT_ENABLE -#include "rgblight.h" -#endif - -#include - -#include "action_layer.h" -#include "i2c.h" -#include "quantum.h" - -#ifdef RGBLIGHT_ENABLE -extern rgblight_config_t rgblight_config; - -void rgblight_set(void) { - if (!rgblight_config.enable) { - for (uint8_t i = 0; i < RGBLED_NUM; i++) { - led[i].r = 0; - led[i].g = 0; - led[i].b = 0; - } - } - - i2c_init(); - i2c_send(0xb0, (uint8_t*)led, 3 * RGBLED_NUM); -} -#endif __attribute__ ((weak)) -void matrix_scan_user(void) { -} +void matrix_scan_user(void) {} void backlight_init_ports(void) { - DDRD |= (1<<0 | 1<<1 | 1<<4 | 1<<6); - PORTD &= ~(1<<0 | 1<<1 | 1<<4 | 1<<6); + setPinOutput(D0); + setPinOutput(D1); + setPinOutput(D4); + setPinOutput(D6); + + writePinLow(D0); + writePinLow(D1); + writePinLow(D4); + writePinLow(D6); } void backlight_set(uint8_t level) { if (level == 0) { // Turn out the lights - PORTD &= ~(1<<0 | 1<<1 | 1<<4 | 1<<6); + writePinLow(D0); + writePinLow(D1); + writePinLow(D4); + writePinLow(D6); } else { // Turn on the lights - PORTD |= (1<<0 | 1<<1 | 1<<4 | 1<<6); + writePinHigh(D0); + writePinHigh(D1); + writePinHigh(D4); + writePinHigh(D6); } } diff --git a/keyboards/bfake/i2c.c b/keyboards/bfake/i2c.c deleted file mode 100644 index a4f95213524f..000000000000 --- a/keyboards/bfake/i2c.c +++ /dev/null @@ -1,106 +0,0 @@ -/* -Copyright 2016 Luiz Ribeiro - -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 . -*/ - -// Please do not modify this file - -#include -#include - -#include "i2c.h" - -void i2c_set_bitrate(uint16_t bitrate_khz) { - uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz); - if (bitrate_div >= 16) { - bitrate_div = (bitrate_div - 16) / 2; - } - TWBR = bitrate_div; -} - -void i2c_init(void) { - // set pull-up resistors on I2C bus pins - PORTC |= 0b11; - - i2c_set_bitrate(400); - - // enable TWI (two-wire interface) - TWCR |= (1 << TWEN); - - // enable TWI interrupt and slave address ACK - TWCR |= (1 << TWIE); - TWCR |= (1 << TWEA); -} - -uint8_t i2c_start(uint8_t address) { - // reset TWI control register - TWCR = 0; - - // begin transmission and wait for it to end - TWCR = (1< - -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 . -*/ - -// Please do not modify this file - -#ifndef __I2C_H__ -#define __I2C_H__ - -void i2c_init(void); -void i2c_set_bitrate(uint16_t bitrate_khz); -uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length); - -#endif diff --git a/keyboards/bfake/rules.mk b/keyboards/bfake/rules.mk index b5b3b852cb05..5963c9810a02 100644 --- a/keyboards/bfake/rules.mk +++ b/keyboards/bfake/rules.mk @@ -1,18 +1,3 @@ -# Copyright 2017 Luiz Ribeiro -# -# 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 . - # MCU name MCU = atmega32a @@ -34,10 +19,10 @@ CONSOLE_ENABLE = yes COMMAND_ENABLE = yes BACKLIGHT_ENABLE = no RGBLIGHT_ENABLE = no -RGBLIGHT_CUSTOM_DRIVER = yes +WS2812_DRIVER = i2c OPT_DEFS = -DDEBUG_LEVEL=0 # custom matrix setup CUSTOM_MATRIX = yes -SRC = matrix.c i2c.c +SRC = matrix.c diff --git a/keyboards/jc65/v32a/i2c.c b/keyboards/jc65/v32a/i2c.c deleted file mode 100644 index a4f95213524f..000000000000 --- a/keyboards/jc65/v32a/i2c.c +++ /dev/null @@ -1,106 +0,0 @@ -/* -Copyright 2016 Luiz Ribeiro - -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 . -*/ - -// Please do not modify this file - -#include -#include - -#include "i2c.h" - -void i2c_set_bitrate(uint16_t bitrate_khz) { - uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz); - if (bitrate_div >= 16) { - bitrate_div = (bitrate_div - 16) / 2; - } - TWBR = bitrate_div; -} - -void i2c_init(void) { - // set pull-up resistors on I2C bus pins - PORTC |= 0b11; - - i2c_set_bitrate(400); - - // enable TWI (two-wire interface) - TWCR |= (1 << TWEN); - - // enable TWI interrupt and slave address ACK - TWCR |= (1 << TWIE); - TWCR |= (1 << TWEA); -} - -uint8_t i2c_start(uint8_t address) { - // reset TWI control register - TWCR = 0; - - // begin transmission and wait for it to end - TWCR = (1< - -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 . -*/ - -// Please do not modify this file - -#ifndef __I2C_H__ -#define __I2C_H__ - -void i2c_init(void); -void i2c_set_bitrate(uint16_t bitrate_khz); -uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length); - -#endif diff --git a/keyboards/jc65/v32a/rules.mk b/keyboards/jc65/v32a/rules.mk index ee6efb3fa53f..18e7f1de9dc7 100644 --- a/keyboards/jc65/v32a/rules.mk +++ b/keyboards/jc65/v32a/rules.mk @@ -1,18 +1,3 @@ -# Copyright 2017 Luiz Ribeiro -# -# 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 . - # MCU name MCU = atmega32a @@ -34,10 +19,10 @@ CONSOLE_ENABLE = yes COMMAND_ENABLE = yes BACKLIGHT_ENABLE = yes RGBLIGHT_ENABLE = yes -RGBLIGHT_CUSTOM_DRIVER = yes +WS2812_DRIVER = i2c OPT_DEFS = -DDEBUG_LEVEL=0 # custom matrix setup CUSTOM_MATRIX = yes -SRC = matrix.c i2c.c +SRC = matrix.c diff --git a/keyboards/jc65/v32a/v32a.c b/keyboards/jc65/v32a/v32a.c index 8176ade0a1c5..9b1e07274c51 100644 --- a/keyboards/jc65/v32a/v32a.c +++ b/keyboards/jc65/v32a/v32a.c @@ -16,56 +16,36 @@ along with this program. If not, see . */ #include "v32a.h" -#ifdef BACKLIGHT_ENABLE -#include "backlight.h" -#endif -#ifdef RGBLIGHT_ENABLE -#include "rgblight.h" -#endif - -#include - -#include "action_layer.h" -#include "i2c.h" -#include "quantum.h" - -#ifdef RGBLIGHT_ENABLE -extern rgblight_config_t rgblight_config; - -void rgblight_set(void) { - if (!rgblight_config.enable) { - for (uint8_t i = 0; i < RGBLED_NUM; i++) { - led[i].r = 0; - led[i].g = 0; - led[i].b = 0; - } - } - - i2c_init(); - i2c_send(0xb0, (uint8_t*)led, 3 * RGBLED_NUM); -} -#endif __attribute__ ((weak)) -void matrix_scan_user(void) { -#ifdef RGBLIGHT_ENABLE - rgblight_task(); -#endif -} +void matrix_scan_user(void) {} #ifdef BACKLIGHT_ENABLE void backlight_init_ports(void) { - DDRD |= (1<<0 | 1<<1 | 1<<4 | 1<<6); - PORTD &= ~(1<<0 | 1<<1 | 1<<4 | 1<<6); + setPinOutput(D0); + setPinOutput(D1); + setPinOutput(D4); + setPinOutput(D6); + + writePinLow(D0); + writePinLow(D1); + writePinLow(D4); + writePinLow(D6); } void backlight_set(uint8_t level) { if (level == 0) { // Turn out the lights - PORTD &= ~(1<<0 | 1<<1 | 1<<4 | 1<<6); + writePinLow(D0); + writePinLow(D1); + writePinLow(D4); + writePinLow(D6); } else { // Turn on the lights - PORTD |= (1<<0 | 1<<1 | 1<<4 | 1<<6); + writePinHigh(D0); + writePinHigh(D1); + writePinHigh(D4); + writePinHigh(D6); } } #endif diff --git a/keyboards/jj50/i2c.c b/keyboards/jj50/i2c.c deleted file mode 100644 index c27f3e3d17e1..000000000000 --- a/keyboards/jj50/i2c.c +++ /dev/null @@ -1,104 +0,0 @@ -/* -Copyright 2016 Luiz Ribeiro - -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 . -*/ - -#include -#include - -#include "i2c.h" - -void i2c_set_bitrate(uint16_t bitrate_khz) { - uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz); - if (bitrate_div >= 16) { - bitrate_div = (bitrate_div - 16) / 2; - } - TWBR = bitrate_div; -} - -void i2c_init(void) { - // set pull-up resistors on I2C bus pins - PORTC |= 0b11; - - i2c_set_bitrate(400); - - // enable TWI (two-wire interface) - TWCR |= (1 << TWEN); - - // enable TWI interrupt and slave address ACK - TWCR |= (1 << TWIE); - TWCR |= (1 << TWEA); -} - -uint8_t i2c_start(uint8_t address) { - // reset TWI control register - TWCR = 0; - - // begin transmission and wait for it to end - TWCR = (1< - -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 __I2C_H__ -#define __I2C_H__ - -void i2c_init(void); -void i2c_set_bitrate(uint16_t bitrate_khz); -uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length); - -#endif diff --git a/keyboards/jj50/jj50.c b/keyboards/jj50/jj50.c index d4a70f68d0dd..7c3cee95d186 100644 --- a/keyboards/jj50/jj50.c +++ b/keyboards/jj50/jj50.c @@ -17,24 +17,20 @@ along with this program. If not, see . #include "jj50.h" -#include - -#include "action_layer.h" -#include "i2c.h" -#include "quantum.h" - #include "backlight.h" #include "backlight_custom.h" -// for keyboard subdirectory level init functions -// @Override -void matrix_init_kb(void) { - // call user level keymaps, if any - matrix_init_user(); -} +void matrix_init_kb(void) { matrix_init_user(); } + +__attribute__ ((weak)) +void matrix_init_user(void) {} + +void matrix_scan_kb(void) { matrix_scan_user(); } + +__attribute__ ((weak)) +void matrix_scan_user(void) {} #ifdef BACKLIGHT_ENABLE -/// Overrides functions in `quantum.c` void backlight_init_ports(void) { b_led_init_ports(); } @@ -47,48 +43,3 @@ void backlight_set(uint8_t level) { b_led_set(level); } #endif - -#ifdef RGBLIGHT_ENABLE -extern rgblight_config_t rgblight_config; - -// custom RGB driver -void rgblight_set(void) { - if (!rgblight_config.enable) { - for (uint8_t i=0; i -# Modified 2018 Wayne Jones (WarmCatUK) - -# 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 . - # MCU name MCU = atmega32a @@ -35,22 +19,18 @@ CONSOLE_ENABLE = no COMMAND_ENABLE = yes BACKLIGHT_ENABLE = yes RGBLIGHT_ENABLE = yes -RGBLIGHT_CUSTOM_DRIVER = yes +WS2812_DRIVER = i2c NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work - -DISABLE_WS2812 = no - KEY_LOCK_ENABLE = yes # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - #OPT_DEFS = -DDEBUG_LEVEL=0 # custom matrix setup CUSTOM_MATRIX = yes -SRC = matrix.c i2c.c backlight.c +SRC = matrix.c backlight.c LAYOUTS = ortho_5x12 diff --git a/keyboards/mechmini/v1/i2c.c b/keyboards/mechmini/v1/i2c.c deleted file mode 100644 index c27f3e3d17e1..000000000000 --- a/keyboards/mechmini/v1/i2c.c +++ /dev/null @@ -1,104 +0,0 @@ -/* -Copyright 2016 Luiz Ribeiro - -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 . -*/ - -#include -#include - -#include "i2c.h" - -void i2c_set_bitrate(uint16_t bitrate_khz) { - uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz); - if (bitrate_div >= 16) { - bitrate_div = (bitrate_div - 16) / 2; - } - TWBR = bitrate_div; -} - -void i2c_init(void) { - // set pull-up resistors on I2C bus pins - PORTC |= 0b11; - - i2c_set_bitrate(400); - - // enable TWI (two-wire interface) - TWCR |= (1 << TWEN); - - // enable TWI interrupt and slave address ACK - TWCR |= (1 << TWIE); - TWCR |= (1 << TWEA); -} - -uint8_t i2c_start(uint8_t address) { - // reset TWI control register - TWCR = 0; - - // begin transmission and wait for it to end - TWCR = (1< -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 __I2C_H__ -#define __I2C_H__ - -void i2c_init(void); -void i2c_set_bitrate(uint16_t bitrate_khz); -uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length); - -#endif diff --git a/keyboards/mechmini/v1/rules.mk b/keyboards/mechmini/v1/rules.mk index 3510ca6f3f1c..ee023b43bae4 100644 --- a/keyboards/mechmini/v1/rules.mk +++ b/keyboards/mechmini/v1/rules.mk @@ -1,18 +1,3 @@ -# Copyright 2017 Luiz Ribeiro -# -# 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 . - # MCU name MCU = atmega32a @@ -34,10 +19,10 @@ CONSOLE_ENABLE = yes COMMAND_ENABLE = yes BACKLIGHT_ENABLE = no RGBLIGHT_ENABLE = yes -RGBLIGHT_CUSTOM_DRIVER = yes +WS2812_DRIVER = i2c OPT_DEFS = -DDEBUG_LEVEL=0 # custom matrix setup CUSTOM_MATRIX = yes -SRC = matrix.c i2c.c +SRC = matrix.c diff --git a/keyboards/mechmini/v1/v1.c b/keyboards/mechmini/v1/v1.c index 508d60c784db..2c910d9658ca 100644 --- a/keyboards/mechmini/v1/v1.c +++ b/keyboards/mechmini/v1/v1.c @@ -16,61 +16,13 @@ along with this program. If not, see . */ #include "v1.h" -#include -#include "action_layer.h" -#include "i2c.h" -#include "quantum.h" -#include "rgblight.h" -// for keyboard subdirectory level init functions -// @Override -void matrix_init_kb(void) { - // call user level keymaps, if any - matrix_init_user(); -} +void matrix_init_kb(void) { matrix_init_user(); } -#ifdef RGBLIGHT_ENABLE -extern rgblight_config_t rgblight_config; +__attribute__ ((weak)) +void matrix_init_user(void) {} -// custom RGB driver -void rgblight_set(void) { - if (!rgblight_config.enable) { - for (uint8_t i=0; i - -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 . -*/ - -// Please do not modify this file - -#include -#include - -#include "i2c.h" - -void i2c_set_bitrate(uint16_t bitrate_khz) { - uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz); - if (bitrate_div >= 16) { - bitrate_div = (bitrate_div - 16) / 2; - } - TWBR = bitrate_div; -} - -void i2c_init(void) { - // set pull-up resistors on I2C bus pins - PORTC |= 0b11; - - i2c_set_bitrate(400); - - // enable TWI (two-wire interface) - TWCR |= (1 << TWEN); - - // enable TWI interrupt and slave address ACK - TWCR |= (1 << TWIE); - TWCR |= (1 << TWEA); -} - -uint8_t i2c_start(uint8_t address) { - // reset TWI control register - TWCR = 0; - - // begin transmission and wait for it to end - TWCR = (1< - -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 . -*/ - -// Please do not modify this file - -#ifndef __I2C_H__ -#define __I2C_H__ - -void i2c_init(void); -void i2c_set_bitrate(uint16_t bitrate_khz); -uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length); - -#endif diff --git a/keyboards/mehkee96/mehkee96.c b/keyboards/mehkee96/mehkee96.c index 604fad8032c6..46427ec93bfc 100644 --- a/keyboards/mehkee96/mehkee96.c +++ b/keyboards/mehkee96/mehkee96.c @@ -16,66 +16,13 @@ along with this program. If not, see . */ #include "mehkee96.h" -#include "rgblight.h" -#include +void matrix_init_kb(void) { matrix_init_user(); } -#include "action_layer.h" -#include "i2c.h" -#include "quantum.h" +__attribute__ ((weak)) +void matrix_init_user(void) {} -// for keyboard subdirectory level init functions -// @Override -void matrix_init_kb(void) { - // call user level keymaps, if any - matrix_init_user(); -} +void matrix_scan_kb(void) { matrix_scan_user(); } -#ifdef RGBLIGHT_ENABLE -extern rgblight_config_t rgblight_config; - -// custom RGB driver -void rgblight_set(void) { - if (!rgblight_config.enable) { - for (uint8_t i=0; i - -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 . -*/ - -#include -#include - -#include "i2c.h" - -void i2c_set_bitrate(uint16_t bitrate_khz) { - uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz); - if (bitrate_div >= 16) { - bitrate_div = (bitrate_div - 16) / 2; - } - TWBR = bitrate_div; -} - -void i2c_init(void) { - // set pull-up resistors on I2C bus pins - PORTC |= 0b11; - - i2c_set_bitrate(400); - - // enable TWI (two-wire interface) - TWCR |= (1 << TWEN); - - // enable TWI interrupt and slave address ACK - TWCR |= (1 << TWIE); - TWCR |= (1 << TWEA); -} - -uint8_t i2c_start(uint8_t address) { - // reset TWI control register - TWCR = 0; - - // begin transmission and wait for it to end - TWCR = (1< - -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 __I2C_H__ -#define __I2C_H__ - -void i2c_init(void); -void i2c_set_bitrate(uint16_t bitrate_khz); -uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length); - -#endif diff --git a/keyboards/mt40/mt40.c b/keyboards/mt40/mt40.c index 555689f8729c..dd079e7d813e 100644 --- a/keyboards/mt40/mt40.c +++ b/keyboards/mt40/mt40.c @@ -13,32 +13,5 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "mt40.h" -#include "rgblight.h" - -#include - -#include "action_layer.h" -#include "i2c.h" -#include "quantum.h" - -extern rgblight_config_t rgblight_config; -void rgblight_set(void) { - if (!rgblight_config.enable) { - for (uint8_t i = 0; i < RGBLED_NUM; i++) { - led[i].r = 0; - led[i].g = 0; - led[i].b = 0; - } - } - - i2c_init(); - i2c_send(0xb0, (uint8_t*)led, 3 * RGBLED_NUM); -} - -__attribute__ ((weak)) -void matrix_scan_kb(void) { - rgblight_task(); - matrix_init_user(); -} +#include "mt40.h" diff --git a/keyboards/mt40/rules.mk b/keyboards/mt40/rules.mk index 19410bc6e020..0cbf90c674b2 100644 --- a/keyboards/mt40/rules.mk +++ b/keyboards/mt40/rules.mk @@ -24,14 +24,14 @@ AUDIO_ENABLE ?= no # Audio output on port C6 UNICODE_ENABLE ?= no # Unicode BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE ?= yes # Enable WS2812 RGB underlight. -RGBLIGHT_CUSTOM_DRIVER = yes +WS2812_DRIVER = i2c TAP_DANCE_ENABLE = no OPT_DEFS = -DDEBUG_LEVEL=0 # custom matrix setup CUSTOM_MATRIX = yes -SRC = matrix.c i2c.c +SRC = matrix.c LAYOUTS = planck_mit LAYOUTS_HAS_RGB = no diff --git a/keyboards/percent/canoe/canoe.c b/keyboards/percent/canoe/canoe.c index a7427e15286c..e59b0dd7bcc0 100644 --- a/keyboards/percent/canoe/canoe.c +++ b/keyboards/percent/canoe/canoe.c @@ -16,81 +16,43 @@ along with this program. If not, see . */ #include "canoe.h" -#ifdef BACKLIGHT_ENABLE -#include "backlight.h" -#endif -#ifdef RGBLIGHT_ENABLE -#include "i2c.h" -#include "rgblight.h" -#endif + +void matrix_init_kb(void) { matrix_init_user(); } + +__attribute__ ((weak)) +void matrix_init_user(void) {} + +void matrix_scan_kb(void) { matrix_scan_user(); } + +__attribute__ ((weak)) +void matrix_scan_user(void) {} #ifdef BACKLIGHT_ENABLE void backlight_set(uint8_t level) { if (level == 0) { // Turn out the lights - PORTD &= ~(1<<0 | 1<<1 | 1<<4 | 1<<6); + writePinLow(D0); + writePinLow(D1); + writePinLow(D4); + writePinLow(D6); } else { // Turn on the lights - PORTD |= (1<<0 | 1<<1 | 1<<4 | 1<<6); + writePinHigh(D0); + writePinHigh(D1); + writePinHigh(D4); + writePinHigh(D6); } } void backlight_init_ports(void) { - DDRD |= (1<<0 | 1<<1 | 1<<4 | 1<<6); - PORTD &= ~(1<<0 | 1<<1 | 1<<4 | 1<<6); -} - -#endif - -// for keyboard subdirectory level init functions -// @Override -void matrix_init_kb(void) { - // call user level keymaps, if any - matrix_init_user(); -} - -#ifdef RGBLIGHT_ENABLE -extern rgblight_config_t rgblight_config; - -// custom RGB driver -void rgblight_set(void) { - if (!rgblight_config.enable) { - for (uint8_t i=0; i - -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 . -*/ - -// Please do not modify this file - -#include -#include - -#include "i2c.h" - -void i2c_set_bitrate(uint16_t bitrate_khz) { - uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz); - if (bitrate_div >= 16) { - bitrate_div = (bitrate_div - 16) / 2; - } - TWBR = bitrate_div; -} - -void i2c_init(void) { - // set pull-up resistors on I2C bus pins - PORTC |= 0b11; - - i2c_set_bitrate(400); - - // enable TWI (two-wire interface) - TWCR |= (1 << TWEN); - - // enable TWI interrupt and slave address ACK - TWCR |= (1 << TWIE); - TWCR |= (1 << TWEA); -} - -uint8_t i2c_start(uint8_t address) { - // reset TWI control register - TWCR = 0; - - // begin transmission and wait for it to end - TWCR = (1< - -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 . -*/ - -// Please do not modify this file - -#ifndef __I2C_H__ -#define __I2C_H__ - -void i2c_init(void); -void i2c_set_bitrate(uint16_t bitrate_khz); -uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length); - -#endif diff --git a/keyboards/percent/canoe/rules.mk b/keyboards/percent/canoe/rules.mk index e3269b94db81..bb14269a2b28 100644 --- a/keyboards/percent/canoe/rules.mk +++ b/keyboards/percent/canoe/rules.mk @@ -1,18 +1,3 @@ -# Copyright 2017 Luiz Ribeiro -# -# 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 . - # MCU name MCU = atmega32a @@ -34,12 +19,12 @@ CONSOLE_ENABLE = yes COMMAND_ENABLE = yes BACKLIGHT_ENABLE = no RGBLIGHT_ENABLE = yes -RGBLIGHT_CUSTOM_DRIVER = yes +WS2812_DRIVER = i2c OPT_DEFS = -DDEBUG_LEVEL=0 # custom matrix setup CUSTOM_MATRIX = yes -SRC = matrix.c i2c.c +SRC = matrix.c -LAYOUTS = 65_ansi_blocker \ No newline at end of file +LAYOUTS = 65_ansi_blocker diff --git a/keyboards/percent/skog/i2c.c b/keyboards/percent/skog/i2c.c deleted file mode 100644 index a4f95213524f..000000000000 --- a/keyboards/percent/skog/i2c.c +++ /dev/null @@ -1,106 +0,0 @@ -/* -Copyright 2016 Luiz Ribeiro - -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 . -*/ - -// Please do not modify this file - -#include -#include - -#include "i2c.h" - -void i2c_set_bitrate(uint16_t bitrate_khz) { - uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz); - if (bitrate_div >= 16) { - bitrate_div = (bitrate_div - 16) / 2; - } - TWBR = bitrate_div; -} - -void i2c_init(void) { - // set pull-up resistors on I2C bus pins - PORTC |= 0b11; - - i2c_set_bitrate(400); - - // enable TWI (two-wire interface) - TWCR |= (1 << TWEN); - - // enable TWI interrupt and slave address ACK - TWCR |= (1 << TWIE); - TWCR |= (1 << TWEA); -} - -uint8_t i2c_start(uint8_t address) { - // reset TWI control register - TWCR = 0; - - // begin transmission and wait for it to end - TWCR = (1< - -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 . -*/ - -// Please do not modify this file - -#pragma once - -void i2c_init(void); -void i2c_set_bitrate(uint16_t bitrate_khz); -uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length); - diff --git a/keyboards/percent/skog/rules.mk b/keyboards/percent/skog/rules.mk index b8439906b8b3..2b0c1154dd57 100644 --- a/keyboards/percent/skog/rules.mk +++ b/keyboards/percent/skog/rules.mk @@ -1,18 +1,3 @@ -# Copyright 2018 Jumail Mundekkat / MxBlue -# -# 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 . - # MCU name MCU = atmega32a @@ -34,9 +19,9 @@ CONSOLE_ENABLE = yes COMMAND_ENABLE = yes BACKLIGHT_ENABLE = yes RGBLIGHT_ENABLE = yes +WS2812_DRIVER = i2c BACKLIGHT_CUSTOM_DRIVER = yes -RGBLIGHT_CUSTOM_DRIVER = yes OPT_DEFS = -DDEBUG_LEVEL=0 @@ -45,4 +30,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # custom matrix setup CUSTOM_MATRIX = yes -SRC = matrix.c i2c.c backlight.c +SRC = matrix.c backlight.c diff --git a/keyboards/percent/skog/skog.c b/keyboards/percent/skog/skog.c index 3d1eb0e1a16b..8678d483a7e2 100644 --- a/keyboards/percent/skog/skog.c +++ b/keyboards/percent/skog/skog.c @@ -19,23 +19,18 @@ ps2avrGB support code by Kenneth A. (bminiex/.[ch]) #include "skog.h" -#include "rgblight.h" +#include "backlight.h" +#include "backlight_custom.h" -#include +void matrix_init_kb(void) { matrix_init_user(); } -#include "action_layer.h" -#include "i2c.h" -#include "quantum.h" +__attribute__ ((weak)) +void matrix_init_user(void) {} -#include "backlight.h" -#include "backlight_custom.h" +void matrix_scan_kb(void) { matrix_scan_user(); } -// for keyboard subdirectory level init functions -// @Override -void matrix_init_kb(void) { - // call user level keymaps, if any - matrix_init_user(); -} +__attribute__ ((weak)) +void matrix_scan_user(void) {} #ifdef BACKLIGHT_ENABLE /// Overrides functions in `quantum.c` @@ -51,48 +46,3 @@ void backlight_set(uint8_t level) { b_led_set(level); } #endif - -#ifdef RGBLIGHT_ENABLE -extern rgblight_config_t rgblight_config; - -// custom RGB driver -void rgblight_set(void) { - if (!rgblight_config.enable) { - for (uint8_t i=0; i. */ #include "bmini.h" -#include "rgblight.h" - -#include - -#include "action_layer.h" -#include "i2c.h" -#include "quantum.h" - -extern rgblight_config_t rgblight_config; - -void rgblight_set(void) { - if (!rgblight_config.enable) { - for (uint8_t i = 0; i < RGBLED_NUM; i++) { - led[i].r = 0; - led[i].g = 0; - led[i].b = 0; - } - } - - i2c_init(); - i2c_send(0xb0, (uint8_t*)led, 3 * RGBLED_NUM); -} __attribute__ ((weak)) -void matrix_scan_user(void) { - rgblight_task(); -} +void matrix_scan_user(void) {} diff --git a/keyboards/winkeyless/bmini/i2c.c b/keyboards/winkeyless/bmini/i2c.c deleted file mode 100644 index a4f95213524f..000000000000 --- a/keyboards/winkeyless/bmini/i2c.c +++ /dev/null @@ -1,106 +0,0 @@ -/* -Copyright 2016 Luiz Ribeiro - -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 . -*/ - -// Please do not modify this file - -#include -#include - -#include "i2c.h" - -void i2c_set_bitrate(uint16_t bitrate_khz) { - uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz); - if (bitrate_div >= 16) { - bitrate_div = (bitrate_div - 16) / 2; - } - TWBR = bitrate_div; -} - -void i2c_init(void) { - // set pull-up resistors on I2C bus pins - PORTC |= 0b11; - - i2c_set_bitrate(400); - - // enable TWI (two-wire interface) - TWCR |= (1 << TWEN); - - // enable TWI interrupt and slave address ACK - TWCR |= (1 << TWIE); - TWCR |= (1 << TWEA); -} - -uint8_t i2c_start(uint8_t address) { - // reset TWI control register - TWCR = 0; - - // begin transmission and wait for it to end - TWCR = (1< - -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 . -*/ - -// Please do not modify this file - -#ifndef __I2C_H__ -#define __I2C_H__ - -void i2c_init(void); -void i2c_set_bitrate(uint16_t bitrate_khz); -uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length); - -#endif diff --git a/keyboards/winkeyless/bmini/rules.mk b/keyboards/winkeyless/bmini/rules.mk index 8cfc810566d3..7822bd83010d 100644 --- a/keyboards/winkeyless/bmini/rules.mk +++ b/keyboards/winkeyless/bmini/rules.mk @@ -1,18 +1,3 @@ -# Copyright 2017 Luiz Ribeiro -# -# 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 . - # MCU name MCU = atmega32a @@ -34,10 +19,10 @@ CONSOLE_ENABLE = yes COMMAND_ENABLE = yes BACKLIGHT_ENABLE = no RGBLIGHT_ENABLE = yes -RGBLIGHT_CUSTOM_DRIVER = yes +WS2812_DRIVER = i2c OPT_DEFS = -DDEBUG_LEVEL=0 # custom matrix setup CUSTOM_MATRIX = yes -SRC = matrix.c i2c.c +SRC = matrix.c diff --git a/keyboards/winkeyless/bminiex/bminiex.c b/keyboards/winkeyless/bminiex/bminiex.c index d9b05aba5145..11315b921073 100644 --- a/keyboards/winkeyless/bminiex/bminiex.c +++ b/keyboards/winkeyless/bminiex/bminiex.c @@ -16,24 +16,10 @@ along with this program. If not, see . */ #include "bminiex.h" -#include "rgblight.h" - -#include - -#include "action_layer.h" -#include "i2c.h" -#include "quantum.h" #include "backlight.h" #include "backlight_custom.h" -// for keyboard subdirectory level init functions -// @Override -void matrix_init_kb(void) { - // call user level keymaps, if any - matrix_init_user(); -} - #ifdef BACKLIGHT_ENABLE /// Overrides functions in `quantum.c` void backlight_init_ports(void) { @@ -48,50 +34,3 @@ void backlight_set(uint8_t level) { b_led_set(level); } #endif - -#ifdef RGBLIGHT_ENABLE -extern rgblight_config_t rgblight_config; - -// custom RGB driver -void rgblight_set(void) { - if (!rgblight_config.enable) { - for (uint8_t i=0; i - -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 . -*/ - -// Please do not modify this file - -#include -#include - -#include "i2c.h" - -void i2c_set_bitrate(uint16_t bitrate_khz) { - uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz); - if (bitrate_div >= 16) { - bitrate_div = (bitrate_div - 16) / 2; - } - TWBR = bitrate_div; -} - -void i2c_init(void) { - // set pull-up resistors on I2C bus pins - PORTC |= 0b11; - - i2c_set_bitrate(400); - - // enable TWI (two-wire interface) - TWCR |= (1 << TWEN); - - // enable TWI interrupt and slave address ACK - TWCR |= (1 << TWIE); - TWCR |= (1 << TWEA); -} - -uint8_t i2c_start(uint8_t address) { - // reset TWI control register - TWCR = 0; - - // begin transmission and wait for it to end - TWCR = (1< - -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 . -*/ - -// Please do not modify this file - -#pragma once - -void i2c_init(void); -void i2c_set_bitrate(uint16_t bitrate_khz); -uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length); - diff --git a/keyboards/winkeyless/bminiex/rules.mk b/keyboards/winkeyless/bminiex/rules.mk index 24e4348795fe..39a77bda1276 100644 --- a/keyboards/winkeyless/bminiex/rules.mk +++ b/keyboards/winkeyless/bminiex/rules.mk @@ -1,18 +1,3 @@ -# Copyright 2017 Luiz Ribeiro -# -# 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 . - # MCU name MCU = atmega32a @@ -36,7 +21,7 @@ COMMAND_ENABLE = no BACKLIGHT_ENABLE = yes BACKLIGHT_CUSTOM_DRIVER = yes RGBLIGHT_ENABLE = yes -RGBLIGHT_CUSTOM_DRIVER = yes +WS2812_DRIVER = i2c TAP_DANCE_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE @@ -46,4 +31,4 @@ OPT_DEFS = -DDEBUG_LEVEL=0 # custom matrix setup CUSTOM_MATRIX = yes -SRC = matrix.c i2c.c backlight.c +SRC = matrix.c backlight.c diff --git a/keyboards/ymd75/i2c.c b/keyboards/ymd75/i2c.c deleted file mode 100644 index c27f3e3d17e1..000000000000 --- a/keyboards/ymd75/i2c.c +++ /dev/null @@ -1,104 +0,0 @@ -/* -Copyright 2016 Luiz Ribeiro - -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 . -*/ - -#include -#include - -#include "i2c.h" - -void i2c_set_bitrate(uint16_t bitrate_khz) { - uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz); - if (bitrate_div >= 16) { - bitrate_div = (bitrate_div - 16) / 2; - } - TWBR = bitrate_div; -} - -void i2c_init(void) { - // set pull-up resistors on I2C bus pins - PORTC |= 0b11; - - i2c_set_bitrate(400); - - // enable TWI (two-wire interface) - TWCR |= (1 << TWEN); - - // enable TWI interrupt and slave address ACK - TWCR |= (1 << TWIE); - TWCR |= (1 << TWEA); -} - -uint8_t i2c_start(uint8_t address) { - // reset TWI control register - TWCR = 0; - - // begin transmission and wait for it to end - TWCR = (1< - -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 __I2C_H__ -#define __I2C_H__ - -void i2c_init(void); -void i2c_set_bitrate(uint16_t bitrate_khz); -uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length); - -#endif diff --git a/keyboards/ymd75/rules.mk b/keyboards/ymd75/rules.mk index 7bee201738ab..0c1c9110ca83 100644 --- a/keyboards/ymd75/rules.mk +++ b/keyboards/ymd75/rules.mk @@ -1,19 +1,3 @@ -# Copyright 2017 Luiz Ribeiro -# Modified 2018 Wayne Jones (WarmCatUK) - -# 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 . - # MCU name MCU = atmega32a @@ -35,7 +19,7 @@ CONSOLE_ENABLE = no COMMAND_ENABLE = yes BACKLIGHT_ENABLE = yes RGBLIGHT_ENABLE = yes -RGBLIGHT_CUSTOM_DRIVER = yes +WS2812_DRIVER = i2c NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work @@ -51,4 +35,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # custom matrix setup CUSTOM_MATRIX = yes -SRC = matrix.c i2c.c backlight.c +SRC = matrix.c backlight.c diff --git a/keyboards/ymd75/ymd75.c b/keyboards/ymd75/ymd75.c index 2259dfa5f049..74f7c6a493d9 100644 --- a/keyboards/ymd75/ymd75.c +++ b/keyboards/ymd75/ymd75.c @@ -16,23 +16,19 @@ along with this program. If not, see . */ #include "ymd75.h" -//#include "rgblight.h" - -#include - -#include "action_layer.h" -#include "i2c.h" -#include "quantum.h" #include "backlight.h" #include "backlight_custom.h" -// for keyboard subdirectory level init functions -// @Override -void matrix_init_kb(void) { - // call user level keymaps, if any - matrix_init_user(); -} +void matrix_init_kb(void) { matrix_init_user(); } + +__attribute__ ((weak)) +void matrix_init_user(void) {} + +void matrix_scan_kb(void) { matrix_scan_user(); } + +__attribute__ ((weak)) +void matrix_scan_user(void) {} #ifdef BACKLIGHT_ENABLE /// Overrides functions in `quantum.c` @@ -48,48 +44,3 @@ void backlight_set(uint8_t level) { b_led_set(level); } #endif - -#ifdef RGBLIGHT_ENABLE -extern rgblight_config_t rgblight_config; - -// custom RGB driver -void rgblight_set(void) { - if (!rgblight_config.enable) { - for (uint8_t i=0; i - -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 . -*/ - -#include -#include - -#include "i2c.h" - -void i2c_set_bitrate(uint16_t bitrate_khz) { - uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz); - if (bitrate_div >= 16) { - bitrate_div = (bitrate_div - 16) / 2; - } - TWBR = bitrate_div; -} - -void i2c_init(void) { - // set pull-up resistors on I2C bus pins - PORTC |= 0b11; - - i2c_set_bitrate(400); - - // enable TWI (two-wire interface) - TWCR |= (1 << TWEN); - - // enable TWI interrupt and slave address ACK - TWCR |= (1 << TWIE); - TWCR |= (1 << TWEA); -} - -uint8_t i2c_start(uint8_t address) { - // reset TWI control register - TWCR = 0; - - // begin transmission and wait for it to end - TWCR = (1< - -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 __I2C_H__ -#define __I2C_H__ - -void i2c_init(void); -void i2c_set_bitrate(uint16_t bitrate_khz); -uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length); - -#endif diff --git a/keyboards/ymd96/rules.mk b/keyboards/ymd96/rules.mk index 96441e1b3f37..19d9fd81abb3 100644 --- a/keyboards/ymd96/rules.mk +++ b/keyboards/ymd96/rules.mk @@ -1,18 +1,3 @@ -# Copyright 2017 Luiz Ribeiro -# -# 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 . - # MCU name MCU = atmega32a @@ -37,7 +22,7 @@ BACKLIGHT_ENABLE = yes BACKLIGHT_CUSTOM_DRIVER = yes RGBLIGHT_ENABLE = yes -RGBLIGHT_CUSTOM_DRIVER = yes +WS2812_DRIVER = i2c KEY_LOCK_ENABLE = yes @@ -48,4 +33,4 @@ OPT_DEFS = -DDEBUG_LEVEL=0 # custom matrix setup CUSTOM_MATRIX = yes -SRC = matrix.c i2c.c backlight.c +SRC = matrix.c backlight.c diff --git a/keyboards/ymd96/ymd96.c b/keyboards/ymd96/ymd96.c index b0bf6128faea..546a4c6e3af2 100644 --- a/keyboards/ymd96/ymd96.c +++ b/keyboards/ymd96/ymd96.c @@ -18,22 +18,18 @@ along with this program. If not, see . #include "ymd96.h" -#include +#include "backlight.h" +#include "backlight_custom.h" -#include "action_layer.h" -#include "quantum.h" +void matrix_init_kb(void) { matrix_init_user(); } -#include "i2c.h" +__attribute__ ((weak)) +void matrix_init_user(void) {} -#include "backlight.h" -#include "backlight_custom.h" +void matrix_scan_kb(void) { matrix_scan_user(); } -// for keyboard subdirectory level init functions -// @Override -void matrix_init_kb(void) { - // call user level keymaps, if any - matrix_init_user(); -} +__attribute__ ((weak)) +void matrix_scan_user(void) {} #ifdef BACKLIGHT_ENABLE /// Overrides functions in `quantum.c` @@ -49,49 +45,3 @@ void backlight_set(uint8_t level) { b_led_set(level); } #endif - -#ifdef RGBLIGHT_ENABLE -extern rgblight_config_t rgblight_config; - -// custom RGB driver -void rgblight_set(void) { - if (!rgblight_config.enable) { - for (uint8_t i=0; i - -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 . -*/ - -#include -#include - -#include "i2c.h" - -void i2c_set_bitrate(uint16_t bitrate_khz) { - uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz); - if (bitrate_div >= 16) { - bitrate_div = (bitrate_div - 16) / 2; - } - TWBR = bitrate_div; -} - -void i2c_init(void) { - // set pull-up resistors on I2C bus pins - PORTC |= 0b11; - - i2c_set_bitrate(400); - - // enable TWI (two-wire interface) - TWCR |= (1 << TWEN); - - // enable TWI interrupt and slave address ACK - TWCR |= (1 << TWIE); - TWCR |= (1 << TWEA); -} - -uint8_t i2c_start(uint8_t address) { - // reset TWI control register - TWCR = 0; - - // begin transmission and wait for it to end - TWCR = (1< - -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 __I2C_H__ -#define __I2C_H__ - -void i2c_init(void); -void i2c_set_bitrate(uint16_t bitrate_khz); -uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length); - -#endif diff --git a/keyboards/ymdk_np21/rules.mk b/keyboards/ymdk_np21/rules.mk index 634b9c69c4bd..2bab3043e873 100644 --- a/keyboards/ymdk_np21/rules.mk +++ b/keyboards/ymdk_np21/rules.mk @@ -1,18 +1,3 @@ -# Copyright 2017 Luiz Ribeiro -# -# 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 . - # MCU name MCU = atmega32a @@ -37,8 +22,7 @@ BACKLIGHT_ENABLE = yes BACKLIGHT_CUSTOM_DRIVER = yes RGBLIGHT_ENABLE = yes -RGBLIGHT_CUSTOM_DRIVER = yes -# DISABLE_WS2812 = no +WS2812_DRIVER = i2c KEY_LOCK_ENABLE = yes @@ -49,4 +33,4 @@ OPT_DEFS = -DDEBUG_LEVEL=0 # custom matrix setup CUSTOM_MATRIX = yes -SRC = matrix.c i2c.c backlight.c +SRC = matrix.c backlight.c diff --git a/keyboards/ymdk_np21/ymdk_np21.c b/keyboards/ymdk_np21/ymdk_np21.c index c1b11b4046f2..f2b3d46dabd6 100644 --- a/keyboards/ymdk_np21/ymdk_np21.c +++ b/keyboards/ymdk_np21/ymdk_np21.c @@ -18,25 +18,9 @@ along with this program. If not, see . #include "ymdk_np21.h" -#include - -#include "action_layer.h" -#include "quantum.h" - -#include "i2c.h" - #include "backlight.h" #include "backlight_custom.h" -extern rgblight_config_t rgblight_config; - -// for keyboard subdirectory level init functions -// @Override -void matrix_init_kb(void) { - // call user level keymaps, if any - matrix_init_user(); -} - #ifdef BACKLIGHT_ENABLE /// Overrides functions in `quantum.c` void backlight_init_ports(void) { @@ -51,32 +35,3 @@ void backlight_set(uint8_t level) { b_led_set(level); } #endif - -// custom RGB driver -void rgblight_set(void) { - if (!rgblight_config.enable) { - for (uint8_t i=0; i Date: Mon, 4 Nov 2019 00:43:26 +0100 Subject: [PATCH 262/316] [Keyboard] Add the Kyria keyboard (#7222) * Added raw api for sending data directly to the buffer * Added default keymap variant * Applied proposed OLED display fix * Keymap progress * Keymap progress * Fixed inconsistent tabs * Fixed oled_write_raw apis * Updated keymap * Personal keymap * Added functionality to own keymap * Fixed spacing and build error * Keymap changes * Revert "Updated split encoders so indexes are based on left hand encoders first (#6382)" This reverts commit 46c49ae4e639509ceb6e81c460855d2eb89086b8. * Updated keymaps and configs * Revert "Revert "Updated split encoders so indexes are based on left hand encoders first (#6382)"" This reverts commit f6a85fe1aa9acd2ef77a5ed0ad8f39834cc366d7. * Update keyboards/kyria/config.h Co-Authored-By: Drashna Jaelre * Update keyboards/kyria/config.h Co-Authored-By: Drashna Jaelre * Update keyboards/kyria/config.h Co-Authored-By: Drashna Jaelre * Update keyboards/kyria/rev1/config.h Co-Authored-By: Drashna Jaelre * Update keyboards/kyria/rules.mk Co-Authored-By: Drashna Jaelre * Update keyboards/kyria/rules.mk Co-Authored-By: Drashna Jaelre * Update keyboards/kyria/rev1/rev1.h Co-Authored-By: Drashna Jaelre * Update keyboards/kyria/rev1/config.h Co-Authored-By: Drashna Jaelre * Update keyboards/kyria/readme.md Co-Authored-By: fauxpark * Update keyboards/kyria/keymaps/thomasbaart/keymap.c Co-Authored-By: fauxpark * Update keyboards/kyria/rev1/config.h Co-Authored-By: Drashna Jaelre * Update keyboards/kyria/readme.md Co-Authored-By: fauxpark * Update keyboards/kyria/keymaps/default/keymap.c Co-Authored-By: fauxpark * Update keyboards/kyria/keymaps/default/keymap.c Co-Authored-By: fauxpark * Update keyboards/kyria/keymaps/default/keymap.c Co-Authored-By: fauxpark * Update keyboards/kyria/keymaps/thomasbaart/keymap.c Co-Authored-By: fauxpark * Update keyboards/kyria/keymaps/thomasbaart/keymap.c Co-Authored-By: fauxpark * Update keyboards/kyria/rules.mk Co-Authored-By: fauxpark * Update keyboards/kyria/keymaps/thomasbaart/keymap.c Co-Authored-By: fauxpark * Update keyboards/kyria/keymaps/thomasbaart/keymap.c Co-Authored-By: fauxpark * Update keyboards/kyria/keymaps/thomasbaart/keymap.c Co-Authored-By: fauxpark * Update keyboards/kyria/keymaps/thomasbaart/keymap.c Co-Authored-By: fauxpark * Update keyboards/kyria/keymaps/thomasbaart/keymap.c Co-Authored-By: fauxpark * Update keyboards/kyria/keymaps/thomasbaart/keymap.c Co-Authored-By: fauxpark * Update keyboards/kyria/keymaps/thomasbaart/keymap.c Co-Authored-By: fauxpark * Processed keymap feedback * Reverted OLED raw API functionality --- keyboards/kyria/config.h | 18 + keyboards/kyria/info.json | 23 ++ keyboards/kyria/keymaps/default/config.h | 32 ++ keyboards/kyria/keymaps/default/keymap.c | 224 +++++++++++++ keyboards/kyria/keymaps/default/rules.mk | 3 + keyboards/kyria/keymaps/thomasbaart/config.h | 47 +++ keyboards/kyria/keymaps/thomasbaart/keymap.c | 333 +++++++++++++++++++ keyboards/kyria/keymaps/thomasbaart/rules.mk | 5 + keyboards/kyria/kyria.c | 16 + keyboards/kyria/kyria.h | 43 +++ keyboards/kyria/readme.md | 21 ++ keyboards/kyria/rev1/config.h | 65 ++++ keyboards/kyria/rev1/rev1.c | 1 + keyboards/kyria/rev1/rev1.h | 43 +++ keyboards/kyria/rev1/rules.mk | 3 + keyboards/kyria/rules.mk | 36 ++ 16 files changed, 913 insertions(+) create mode 100644 keyboards/kyria/config.h create mode 100644 keyboards/kyria/info.json create mode 100644 keyboards/kyria/keymaps/default/config.h create mode 100644 keyboards/kyria/keymaps/default/keymap.c create mode 100644 keyboards/kyria/keymaps/default/rules.mk create mode 100644 keyboards/kyria/keymaps/thomasbaart/config.h create mode 100644 keyboards/kyria/keymaps/thomasbaart/keymap.c create mode 100644 keyboards/kyria/keymaps/thomasbaart/rules.mk create mode 100644 keyboards/kyria/kyria.c create mode 100644 keyboards/kyria/kyria.h create mode 100644 keyboards/kyria/readme.md create mode 100644 keyboards/kyria/rev1/config.h create mode 100644 keyboards/kyria/rev1/rev1.c create mode 100644 keyboards/kyria/rev1/rev1.h create mode 100644 keyboards/kyria/rev1/rules.mk create mode 100644 keyboards/kyria/rules.mk diff --git a/keyboards/kyria/config.h b/keyboards/kyria/config.h new file mode 100644 index 000000000000..2e1e190bd7af --- /dev/null +++ b/keyboards/kyria/config.h @@ -0,0 +1,18 @@ +/* +Copyright 2019 Thomas Baart +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 . +*/ + +#pragma once + +#include "config_common.h" + diff --git a/keyboards/kyria/info.json b/keyboards/kyria/info.json new file mode 100644 index 000000000000..916367f47a07 --- /dev/null +++ b/keyboards/kyria/info.json @@ -0,0 +1,23 @@ +{ + "keyboard_name": "Kyria", + "url": "https://splitkb.com", + "maintainer": "splitkb.com", + "width": 16.5, + "height": 5.5, + "layouts": { + "LAYOUT": { + "layout": [ + {"x":3, "y":0.25}, {"x":12.5, "y":0.25}, {"x":2, "y":0.5}, {"x":4, "y":0.5}, {"x":11.5, "y":0.5}, + {"x":13.5, "y":0.5}, {"x":5, "y":0.75}, {"x":10.5, "y":0.75}, {"x":0, "y":1}, {"x":1, "y":1}, + {"x":14.5, "y":1}, {"x":15.5, "y":1}, {"x":3, "y":1.25}, {"x":12.5, "y":1.25}, {"x":2, "y":1.5}, + {"x":4, "y":1.5}, {"x":11.5, "y":1.5}, {"x":13.5, "y":1.5}, {"x":5, "y":1.75}, {"x":10.5, "y":1.75}, + {"x":0, "y":2}, {"x":1, "y":2}, {"x":14.5, "y":2}, {"x":15.5, "y":2}, {"x":3, "y":2.25}, + {"x":12.5, "y":2.25}, {"x":2, "y":2.5}, {"x":4, "y":2.5}, {"x":11.5, "y":2.5}, {"x":13.5, "y":2.5}, + {"x":5, "y":2.75}, {"x":10.5, "y":2.75}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":14.5, "y":3}, + {"x":15.5, "y":3}, {"x":6, "y":3.25}, {"x":9.5, "y":3.25}, {"x":2.5, "y":3.5}, {"x":3.5, "y":3.5}, + {"x":7, "y":3.5}, {"x":8.5, "y":3.5}, {"x":12, "y":3.5}, {"x":13, "y":3.5}, {"x":4.5, "y":3.75}, + {"x":11, "y":3.75}, {"x":5.5, "y":4.25}, {"x":10, "y":4.25}, {"x":6.5, "y":4.5}, {"x":9, "y":4.5} + ] + } + } + } \ No newline at end of file diff --git a/keyboards/kyria/keymaps/default/config.h b/keyboards/kyria/keymaps/default/config.h new file mode 100644 index 000000000000..f00bfa8e7059 --- /dev/null +++ b/keyboards/kyria/keymaps/default/config.h @@ -0,0 +1,32 @@ +/* Copyright 2019 Thomas Baart + * + * 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 . + */ + +#pragma once + +#ifdef OLED_DRIVER_ENABLE + #define OLED_DISPLAY_128X64 +#endif + +#ifdef RGBLIGHT_ENABLE + #define RGBLIGHT_ANIMATIONS + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 +#endif + +// If you are using an Elite C rev3 on the slave side, uncomment the lines below: +// #define SPLIT_USB_DETECT +// #define NO_USB_STARTUP_CHECK diff --git a/keyboards/kyria/keymaps/default/keymap.c b/keyboards/kyria/keymaps/default/keymap.c new file mode 100644 index 000000000000..a27486d392af --- /dev/null +++ b/keyboards/kyria/keymaps/default/keymap.c @@ -0,0 +1,224 @@ +/* Copyright 2019 Thomas Baart + * + * 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 . + */ +#include QMK_KEYBOARD_H + +enum layers { + QWERTY = 0, + LOWER, + RAISE, + ADJUST +}; + +enum custom_keycodes { + LOWER = SAFE_RANGE, + RAISE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* + * Base Layer: QWERTY + * + * ,-------------------------------------------. ,-------------------------------------------. + * |RAIS/ESC| Q | W | E | R | T | | Y | U | I | O | P | | \ | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * |Ctrl/BS | A | S | D | F | G | | H | J | K | L | ; : | ' " | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | LShift | Z | X | C | V | B |LShift|LShift| |LShift|LShift| N | M | , < | . > | / ? | - _ | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | GUI | Del | Enter| Space| Esc | | Enter| Space| Tab | Bksp | AltGr| + * | | | Alt | Lower| Raise| | Lower| Raise| | | | + * `----------------------------------' `----------------------------------' + */ + [QWERTY] = LAYOUT( + LT(RAISE, KC_ESC), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_PIPE, + MT(MOD_LCTL, KC_BSPC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LSFT, KC_LSFT, KC_LSFT, KC_LSFT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_MINS, + KC_LGUI, KC_DEL, MT(MOD_LALT, KC_ENT), LT(LOWER, KC_SPC), LT(RAISE, KC_ESC), LT(LOWER, KC_ENT), LT(RAISE, KC_SPC), KC_TAB, KC_BSPC, KC_RALT + ), +/* + * Lower Layer: Symbols + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | ! | @ | { | } | | | | | | | | | | \ | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | # | $ | ( | ) | ` | | + | - | / | * | % | ' " | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | % | ^ | [ | ] | ~ | | | | | | & | = | , | . | / ? | - _ | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | ; | = | | = | ; | | | | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [LOWER] = LAYOUT( + _______, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, _______, _______, _______, _______, _______, KC_BSLS, + _______, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, KC_PLUS, KC_MINS, KC_SLSH, KC_ASTR, KC_PERC, KC_QUOT, + _______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, _______, _______, _______, _______, KC_AMPR, KC_EQL, KC_COMM, KC_DOT, KC_SLSH, KC_MINS, + _______, _______, _______, KC_SCLN, KC_EQL, KC_EQL, KC_SCLN, _______, _______, _______ + ), +/* + * Raise Layer: Number keys, media, navigation + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | | Prev | Play | Next | VolUp| | Left | Down | Up | Right| | | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | | | | Mute | VolDn| | | | | | MLeft| Mdown| MUp |MRight| | | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | | | | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [RAISE] = LAYOUT( + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLU, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, + _______, _______, _______, _______, KC_MUTE, KC_VOLD, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +/* + * Adjust Layer: Function keys, RGB + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | TOG | SAI | HUI | VAI | MOD | | | | | F11 | F12 | | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | | SAD | HUD | VAD | RMOD | | | | | | | | | | | | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | | | | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [ADJUST] = LAYOUT( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, RGB_TOG, RGB_SAI, RGB_HUI, RGB_VAI, RGB_MOD, _______, _______, _______, KC_F11, KC_F12, _______, + _______, _______, RGB_SAD, RGB_HUD, RGB_VAD, RGB_RMOD,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +// /* +// * Layer template +// * +// * ,-------------------------------------------. ,-------------------------------------------. +// * | | | | | | | | | | | | | | +// * |--------+------+------+------+------+------| |------+------+------+------+------+--------| +// * | | | | | | | | | | | | | | +// * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| +// * | | | | | | | | | | | | | | | | | | +// * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' +// * | | | | | | | | | | | | +// * | | | | | | | | | | | | +// * `----------------------------------' `----------------------------------' +// */ +// [_LAYERINDEX] = LAYOUT( +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +// ), +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, LOWER, RAISE, ADJUST); +} + +#ifdef OLED_DRIVER_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_180; +} + +static void render_kyria_logo(void) { + static const char PROGMEM kyria_logo[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,192,224,240,112,120, 56, 60, 28, 30, 14, 14, 14, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 14, 30, 28, 60, 56,120,112,240,224,192,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0,192,224,240,124, 62, 31, 15, 7, 3, 1,128,192,224,240,120, 56, 60, 28, 30, 14, 14, 7, 7,135,231,127, 31,255,255, 31,127,231,135, 7, 7, 14, 14, 30, 28, 60, 56,120,240,224,192,128, 1, 3, 7, 15, 31, 62,124,240,224,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,240,252,255, 31, 7, 1, 0, 0,192,240,252,254,255,247,243,177,176, 48, 48, 48, 48, 48, 48, 48,120,254,135, 1, 0, 0,255,255, 0, 0, 1,135,254,120, 48, 48, 48, 48, 48, 48, 48,176,177,243,247,255,254,252,240,192, 0, 0, 1, 7, 31,255,252,240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0,255,255,255, 0, 0, 0, 0, 0,254,255,255, 1, 1, 7, 30,120,225,129,131,131,134,134,140,140,152,152,177,183,254,248,224,255,255,224,248,254,183,177,152,152,140,140,134,134,131,131,129,225,120, 30, 7, 1, 1,255,255,254, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0,255,255, 0, 0,192,192, 48, 48, 0, 0,240,240, 0, 0, 0, 0, 0, 0,240,240, 0, 0,240,240,192,192, 48, 48, 48, 48,192,192, 0, 0, 48, 48,243,243, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48,192,192, 0, 0, 0, 0, 0, + 0, 0, 0,255,255,255, 0, 0, 0, 0, 0,127,255,255,128,128,224,120, 30,135,129,193,193, 97, 97, 49, 49, 25, 25,141,237,127, 31, 7,255,255, 7, 31,127,237,141, 25, 25, 49, 49, 97, 97,193,193,129,135, 30,120,224,128,128,255,255,127, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0, 63, 63, 3, 3, 12, 12, 48, 48, 0, 0, 0, 0, 51, 51, 51, 51, 51, 51, 15, 15, 0, 0, 63, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 63, 63, 48, 48, 0, 0, 12, 12, 51, 51, 51, 51, 51, 51, 63, 63, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 15, 63,255,248,224,128, 0, 0, 3, 15, 63,127,255,239,207,141, 13, 12, 12, 12, 12, 12, 12, 12, 30,127,225,128, 0, 0,255,255, 0, 0,128,225,127, 30, 12, 12, 12, 12, 12, 12, 12, 13,141,207,239,255,127, 63, 15, 3, 0, 0,128,224,248,255, 63, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 3, 7, 15, 62,124,248,240,224,192,128, 1, 3, 7, 15, 30, 28, 60, 56,120,112,112,224,224,225,231,254,248,255,255,248,254,231,225,224,224,112,112,120, 56, 60, 28, 30, 15, 7, 3, 1,128,192,224,240,248,124, 62, 15, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 3, 7, 15, 14, 30, 28, 60, 56,120,112,112,112,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,112,112,112,120, 56, 60, 28, 30, 14, 15, 7, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + }; + oled_write_raw_P(kyria_logo, sizeof(kyria_logo)); +} + +static void render_qmk_logo(void) { + static const char PROGMEM qmk_logo[] = { + 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, + 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, + 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0}; + + oled_write_P(qmk_logo, false); +} + +static void render_status(void) { + // QMK Logo and version information + render_qmk_logo(); + oled_write_P(PSTR("Kyria rev1.0\n\n"), false); + + // Host Keyboard Layer Status + oled_write_P(PSTR("Layer: "), false); + switch (get_highest_layer(layer_state)) { + case _QWERTY: + oled_write_P(PSTR("Default\n"), false); + break; + case _LOWER: + oled_write_P(PSTR("Lower\n"), false); + break; + case _RAISE: + oled_write_P(PSTR("Raise\n"), false); + break; + case _ADJUST: + oled_write_P(PSTR("Adjust\n"), false); + break; + default: + oled_write_P(PSTR("Undefined\n"), false); + } + + // Host Keyboard LED Status + uint8_t led_usb_state = host_keyboard_leds(); + oled_write_P(IS_LED_ON(led_usb_state, USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false); + oled_write_P(IS_LED_ON(led_usb_state, USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false); + oled_write_P(IS_LED_ON(led_usb_state, USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false); +} + +void oled_task_user(void) { + if (is_keyboard_master()) { + render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) + } else { + render_kyria_logo(); + } +} +#endif + +#ifdef ENCODER_ENABLE +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + // Volume control + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } + else if (index == 1) { + // Page up/Page down + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } +} +#endif diff --git a/keyboards/kyria/keymaps/default/rules.mk b/keyboards/kyria/keymaps/default/rules.mk new file mode 100644 index 000000000000..213c50a80fe1 --- /dev/null +++ b/keyboards/kyria/keymaps/default/rules.mk @@ -0,0 +1,3 @@ +OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays +ENCODER_ENABLE = yes # ENables the use of one or more encoders +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow \ No newline at end of file diff --git a/keyboards/kyria/keymaps/thomasbaart/config.h b/keyboards/kyria/keymaps/thomasbaart/config.h new file mode 100644 index 000000000000..e878663bfb1e --- /dev/null +++ b/keyboards/kyria/keymaps/thomasbaart/config.h @@ -0,0 +1,47 @@ +/* Copyright 2019 Thomas Baart + * + * 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 . + */ + +#pragma once + +#ifdef OLED_DRIVER_ENABLE + #define OLED_DISPLAY_128X64 +#endif + +#ifdef RGBLIGHT_ENABLE + #define RGBLIGHT_ANIMATIONS + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_SLEEP +#endif + +// EC11K encoders have a different resolution than other EC11 encoders. +// When using the default resolution of 4, if you notice your encoder skipping +// every other tick, lower the resolution to 2. +#define ENCODER_RESOLUTION 2 + +// The Leader key allows to flexibly assign macros to key sequences. +#define LEADER_PER_KEY_TIMING +#define LEADER_TIMEOUT 350 + +#define TAPPING_TERM 200 + +// Allows to use either side as the master. Look at the documentation for info: +// https://docs.qmk.fm/#/config_options?id=setting-handedness +#define EE_HANDS + +// Allows media codes to properly register in macros and rotary encoder code +#define TAP_CODE_DELAY 10 \ No newline at end of file diff --git a/keyboards/kyria/keymaps/thomasbaart/keymap.c b/keyboards/kyria/keymaps/thomasbaart/keymap.c new file mode 100644 index 000000000000..ea6ce0a749e2 --- /dev/null +++ b/keyboards/kyria/keymaps/thomasbaart/keymap.c @@ -0,0 +1,333 @@ +/* Copyright 2019 Thomas Baart + * + * 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 . + */ +#include QMK_KEYBOARD_H + +uint16_t copy_paste_timer; + +enum layers { + QWERTY = 0, + LOWER, + RAISE, + NAV, + ADJUST +}; + +enum custom_keycodes { + KC_CCCV = SAFE_RANGE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* + * Base Layer: QWERTY + * + * ,-------------------------------------------. ,-------------------------------------------. + * | ESC | Q | W | E | R | T | | Y | U | I | O | P | | \ | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | LSFT | A | S | D | F | G | | H | J | K | L | ; : | ' " | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | LCTL | Z | X | C | V | B | CCCV | | | Del |Leader| N | M | , < | . > | / ? | - _ | + * `----------------------+------+------+------+------+ | |------+------+------+------+------+----------------------' + * | GUI | Alt | | Space| Enter| | Bspc | Space| | Tab | AltGr| + * | | | Lower| Shift| Alt | | | Nav | Raise| | | + * `----------------------------------' `----------------------------------' + */ + [QWERTY] = LAYOUT( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_PIPE, + KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_CCCV, XXXXXXX, KC_DEL, KC_LEAD, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_MINS, + KC_LGUI, KC_LALT, MO(LOWER), MT(MOD_LSFT, KC_SPC), MT(MOD_LALT, KC_ENT), KC_BSPC, LT(NAV, KC_SPC), MO(RAISE), KC_TAB, KC_RALT + ), +/* + * Lower Layer: Numpad, Media + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | | | VolUp| | | | / ? | 7 & | 8 * | 9 ( | - _ | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | | Prev | Play | Next | | | * | 4 $ | 5 % | 6 ^ | , < | + | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | | | VolDn| Mute | | | | | | | 0 ) | 1 ! | 2 @ | 3 # | = + | | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | | | | + * | | | Lower| | | | | Nav | Raise| | | + * `----------------------------------' `----------------------------------' + */ + [LOWER] = LAYOUT( + _______, _______, _______, KC_VOLU, _______, _______, KC_SLSH, KC_7, KC_8, KC_9, KC_MINS, _______, + _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, KC_ASTR, KC_4, KC_5, KC_6, KC_COMM, KC_PLUS, + _______, _______, _______, KC_VOLD, KC_MUTE, _______, _______, _______, _______, _______, KC_0, KC_1, KC_2, KC_3, KC_EQL, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +/* + * Raise Layer: Symbols + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | ! | @ | { | } | | | | | _ | € | | | \ | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | # | $ | ( | ) | ` | | + | - | / | * | % | ' " | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | % | ^ | [ | ] | ~ | | | | | | & | = | , | . | / ? | - _ | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | | | | + * | | | Lower| | | | | Nav | Raise| | | + * `----------------------------------' `----------------------------------' + */ + [RAISE] = LAYOUT( + _______, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, _______, KC_UNDS, ALGR(KC_5),_______,_______,KC_BSLS, + _______, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, KC_PLUS, KC_MINS, KC_SLSH, KC_ASTR, KC_PERC, KC_QUOT, + _______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, _______, _______, _______, _______, KC_AMPR, KC_EQL, KC_COMM, KC_DOT, KC_SLSH, KC_MINS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +/* + * Navigation Layer + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | | | | | | | PgUp | Home | Up | End | | ScrlLk | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | | | | | | | PgDn | Left | Down | Right| | CapsLk | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | | | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | | | | + * | | | Lower| | | | | Nav | Raise| | | + * `----------------------------------' `----------------------------------' + */ + [NAV] = LAYOUT( + _______, _______, _______, _______, _______, _______, KC_PGUP, KC_HOME, KC_UP, KC_END, _______, KC_SLCK, + _______, _______, _______, _______, _______, _______, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_CAPS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +/* + * Adjust Layer + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | | | | | | | | F7 | F8 | F9 | F10 | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | | SAI | HUI | VAI | | | | F4 | F5 | F6 | F11 | | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | | SAD | HUD | VAD | | | | | | | | F1 | F2 | F3 | F12 | | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | | | | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [ADJUST] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, _______, RGB_SAI, RGB_HUI, RGB_VAI, _______, _______, KC_F4, KC_F5, KC_F6, KC_F11, _______, + _______, _______, RGB_SAD, RGB_HUD, RGB_VAD, _______, _______, _______, _______, _______, _______, KC_F1, KC_F2, KC_F3, KC_F12, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +// /* +// * Layer template +// * +// * ,-------------------------------------------. ,-------------------------------------------. +// * | | | | | | | | | | | | | | +// * |--------+------+------+------+------+------| |------+------+------+------+------+--------| +// * | | | | | | | | | | | | | | +// * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| +// * | | | | | | | | | | | | | | | | | | +// * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' +// * | | | | | | | | | | | | +// * | | | | | | | | | | | | +// * `----------------------------------' `----------------------------------' +// */ +// [_LAYERINDEX] = LAYOUT( +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +// ), +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, LOWER, RAISE, ADJUST); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KC_CCCV: // One key copy/paste + if (record->event.pressed) { + copy_paste_timer = timer_read(); + } else { + if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { // Hold, copy + tap_code16(LCTL(KC_C)); + } else { // Tap, paste + tap_code16(LCTL(KC_V)); + } + } + break; + } + return true; +} + +LEADER_EXTERNS(); + +void matrix_scan_user(void) { + LEADER_DICTIONARY() { + leading = false; + leader_end(); + + SEQ_ONE_KEY(KC_C) { // Inline Code + SEND_STRING("`` " SS_TAP(X_LEFT) SS_TAP(X_LEFT)); + } + SEQ_ONE_KEY(KC_P) { // Invoke Password Manager + SEND_STRING(SS_LCTRL(SS_LALT("\\"))); + } + SEQ_ONE_KEY(KC_S) { // Windows screenshot + SEND_STRING(SS_LGUI("\nS")); + } + SEQ_TWO_KEYS(KC_F, KC_P) { // Fusion Projection prefix + SEND_STRING("[Projection] "); + } + SEQ_TWO_KEYS(KC_E, KC_S) { // Email splitkb + SEND_STRING("thomas@splitkb.com"); + } + SEQ_TWO_KEYS(KC_E, KC_P) { // Email personal + SEND_STRING("mail@thomasbaart.nl"); + } + SEQ_TWO_KEYS(KC_S, KC_D) { // Splitkb documentation + SEND_STRING("https://docs.splitkb.com/"); + } + SEQ_TWO_KEYS(KC_S, KC_V) { // Splitkb VAT number + SEND_STRING("NL210593349B01"); + } + SEQ_THREE_KEYS(KC_S, KC_D, KC_K) { // Splitkb Kyria build log + SEND_STRING("https://docs.splitkb.com/docs/kyria-build-log/"); + } + SEQ_TWO_KEYS(KC_B, KC_C) { // Discord bongocat + SEND_STRING(":bongocat:\n"); + } + SEQ_TWO_KEYS(KC_C, KC_B) { // Discord code block + SEND_STRING("```c" SS_LSFT("\n\n") "``` " SS_TAP(X_UP)); + } + } +} + +#ifdef OLED_DRIVER_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_180; +} + +static void render_kyria_logo(void) { + static const char PROGMEM kyria_logo[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,192,224,240,112,120, 56, 60, 28, 30, 14, 14, 14, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 14, 30, 28, 60, 56,120,112,240,224,192,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0,192,224,240,124, 62, 31, 15, 7, 3, 1,128,192,224,240,120, 56, 60, 28, 30, 14, 14, 7, 7,135,231,127, 31,255,255, 31,127,231,135, 7, 7, 14, 14, 30, 28, 60, 56,120,240,224,192,128, 1, 3, 7, 15, 31, 62,124,240,224,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,240,252,255, 31, 7, 1, 0, 0,192,240,252,254,255,247,243,177,176, 48, 48, 48, 48, 48, 48, 48,120,254,135, 1, 0, 0,255,255, 0, 0, 1,135,254,120, 48, 48, 48, 48, 48, 48, 48,176,177,243,247,255,254,252,240,192, 0, 0, 1, 7, 31,255,252,240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0,255,255,255, 0, 0, 0, 0, 0,254,255,255, 1, 1, 7, 30,120,225,129,131,131,134,134,140,140,152,152,177,183,254,248,224,255,255,224,248,254,183,177,152,152,140,140,134,134,131,131,129,225,120, 30, 7, 1, 1,255,255,254, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0,255,255, 0, 0,192,192, 48, 48, 0, 0,240,240, 0, 0, 0, 0, 0, 0,240,240, 0, 0,240,240,192,192, 48, 48, 48, 48,192,192, 0, 0, 48, 48,243,243, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48,192,192, 0, 0, 0, 0, 0, + 0, 0, 0,255,255,255, 0, 0, 0, 0, 0,127,255,255,128,128,224,120, 30,135,129,193,193, 97, 97, 49, 49, 25, 25,141,237,127, 31, 7,255,255, 7, 31,127,237,141, 25, 25, 49, 49, 97, 97,193,193,129,135, 30,120,224,128,128,255,255,127, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0, 63, 63, 3, 3, 12, 12, 48, 48, 0, 0, 0, 0, 51, 51, 51, 51, 51, 51, 15, 15, 0, 0, 63, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 63, 63, 48, 48, 0, 0, 12, 12, 51, 51, 51, 51, 51, 51, 63, 63, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 15, 63,255,248,224,128, 0, 0, 3, 15, 63,127,255,239,207,141, 13, 12, 12, 12, 12, 12, 12, 12, 30,127,225,128, 0, 0,255,255, 0, 0,128,225,127, 30, 12, 12, 12, 12, 12, 12, 12, 13,141,207,239,255,127, 63, 15, 3, 0, 0,128,224,248,255, 63, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 3, 7, 15, 62,124,248,240,224,192,128, 1, 3, 7, 15, 30, 28, 60, 56,120,112,112,224,224,225,231,254,248,255,255,248,254,231,225,224,224,112,112,120, 56, 60, 28, 30, 15, 7, 3, 1,128,192,224,240,248,124, 62, 15, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 3, 7, 15, 14, 30, 28, 60, 56,120,112,112,112,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,112,112,112,120, 56, 60, 28, 30, 14, 15, 7, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + }; + oled_write_raw_P(kyria_logo, sizeof(kyria_logo)); +} + +static void render_qmk_logo(void) { + static const char PROGMEM qmk_logo[] = { + 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, + 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, + 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0}; + + oled_write_P(qmk_logo, false); +} + +static void render_status(void) { + // QMK Logo and version information + render_qmk_logo(); + oled_write_P(PSTR(" Kyria rev1.0\n\n"), false); + + // Host Keyboard Layer Status + oled_write_P(PSTR("Layer: "), false); + switch (get_highest_layer(layer_state)) { + case QWERTY: + oled_write_P(PSTR("Default\n"), false); + break; + case LOWER: + oled_write_P(PSTR("Lower\n"), false); + break; + case RAISE: + oled_write_P(PSTR("Raise\n"), false); + break; + case NAV: + oled_write_P(PSTR("Navigation\n"), false); + break; + case ADJUST: + oled_write_P(PSTR("Adjust\n"), false); + break; + default: + oled_write_P(PSTR("Undefined\n"), false); + } + + // Host Keyboard LED Status + uint8_t led_usb_state = host_keyboard_leds(); + oled_write_P(IS_LED_ON(led_usb_state, USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false); + oled_write_P(IS_LED_ON(led_usb_state, USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false); + oled_write_P(IS_LED_ON(led_usb_state, USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false); +} + +void oled_task_user(void) { + if (is_keyboard_master()) { + render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) + } else { + render_kyria_logo(); + } +} +#endif + +#ifdef ENCODER_ENABLE +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + switch (biton32(layer_state)) { + case QWERTY: + // Move whole words. Hold shift to select while moving. + if (clockwise) { + tap_code16(C(KC_RGHT)); + } else { + tap_code16(C(KC_LEFT)); + } + break; + default: + // History scrubbing. For Adobe products, hold shift while moving + // backward to go forward instead. + if (clockwise) { + tap_code16(C(KC_Z)); + } else { + tap_code16(C(KC_Y)); + } + break; + } + } else if (index == 1) { + switch (biton32(layer_state)) { + case QWERTY: + // Scrolling with PageUp and PgDn. + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + break; + default: + // Volume control. + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + break; + } + } +} +#endif diff --git a/keyboards/kyria/keymaps/thomasbaart/rules.mk b/keyboards/kyria/keymaps/thomasbaart/rules.mk new file mode 100644 index 000000000000..9b8e2941987c --- /dev/null +++ b/keyboards/kyria/keymaps/thomasbaart/rules.mk @@ -0,0 +1,5 @@ +OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays +ENCODER_ENABLE = yes # Enables the use of one or more encoders +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +LEADER_ENABLE = yes # Enable the Leader Key feature +MOUSEKEY_ENABLE = no diff --git a/keyboards/kyria/kyria.c b/keyboards/kyria/kyria.c new file mode 100644 index 000000000000..21ed5e84c8f9 --- /dev/null +++ b/keyboards/kyria/kyria.c @@ -0,0 +1,16 @@ +/* Copyright 2019 Thomas Baart + * + * 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 . + */ +#include "kyria.h" diff --git a/keyboards/kyria/kyria.h b/keyboards/kyria/kyria.h new file mode 100644 index 000000000000..a2a675e0db5a --- /dev/null +++ b/keyboards/kyria/kyria.h @@ -0,0 +1,43 @@ +/* Copyright 2019 Thomas Baart + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, R06, R07, R08, R09, R10, R11, \ + L12, L13, L14, L15, L16, L17, R18, R19, R20, R21, R22, R23, \ + L24, L25, L26, L27, L28, L29, L30, L31, R32, R33, R34, R35, R36, R37, R38, R39, \ + L40, L41, L42, L43, L44, R45, R46, R47, R48, R49 \ +) \ +{ \ + { KC_NO, KC_NO, L05, L04, L03, L02, L01, L00 }, \ + { KC_NO, KC_NO, L17, L16, L15, L14, L13, L12 }, \ + { L31, L30, L29, L28, L27, L26, L25, L24 }, \ + { L44, L43, L42, L41, L40, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, KC_NO, R06, R07, R08, R09, R10, R11 }, \ + { KC_NO, KC_NO, R18, R19, R20, R21, R22, R23 }, \ + { R32, R33, R34, R35, R36, R37, R38, R39 }, \ + { R45, R46, R47, R48, R49, KC_NO, KC_NO, KC_NO }, \ +} diff --git a/keyboards/kyria/readme.md b/keyboards/kyria/readme.md new file mode 100644 index 000000000000..f63a8f6551de --- /dev/null +++ b/keyboards/kyria/readme.md @@ -0,0 +1,21 @@ +# Kyria + +![Kyria](https://cdn.shopify.com/s/files/1/0227/9171/6941/products/PlateCase_f1870016-98b8-43a9-8aed-3eaf073b367b_900x.jpg?v=1568934600) + +An ergonomical 40% split keyboard + +Keyboard Maintainer: [splitkb.com](/~https://github.com/splitkb) +Hardware Supported: Pro Micro 5V/16MHz and compatible. +Hardware Availability: [splitkb.com](https://splitkb.com) and partners. + +Make example for this keyboard (after setting up your build environment): + + make kyria:default + +Example of flashing this keyboard: + + make kyria/rev1:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +A build guide for the Kyria can be found at [docs.splitkb.com](https://docs.splitkb.com/docs/kyria-build-log/). diff --git a/keyboards/kyria/rev1/config.h b/keyboards/kyria/rev1/config.h new file mode 100644 index 000000000000..29209f3fc6ea --- /dev/null +++ b/keyboards/kyria/rev1/config.h @@ -0,0 +1,65 @@ +/* +Copyright 2019 Thomas Baart + +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 . +*/ + +#pragma once + + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER splitkb +#define PRODUCT Kyria Keyboard +#define DESCRIPTION Split 40 percent ergonomic keyboard + +/* key matrix size */ +/* Rows are doubled up */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 8 + +// wiring +#define MATRIX_ROW_PINS { B4, E6, D7, D4 } +#define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5, F4 } +#define UNUSED_PINS + +#define ENCODERS_PAD_A { C6 } +#define ENCODERS_PAD_B { B5 } +#define ENCODERS_PAD_A_RIGHT { B5 } +#define ENCODERS_PAD_B_RIGHT { C6 } + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D2 + +#define RGB_DI_PIN D3 +#define RGBLED_SPLIT { 10, 10 } +#define RGBLED_NUM 20 + +/* 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 diff --git a/keyboards/kyria/rev1/rev1.c b/keyboards/kyria/rev1/rev1.c new file mode 100644 index 000000000000..9aedcc130ac3 --- /dev/null +++ b/keyboards/kyria/rev1/rev1.c @@ -0,0 +1 @@ +#include "rev1.h" \ No newline at end of file diff --git a/keyboards/kyria/rev1/rev1.h b/keyboards/kyria/rev1/rev1.h new file mode 100644 index 000000000000..2ef05bb0e98f --- /dev/null +++ b/keyboards/kyria/rev1/rev1.h @@ -0,0 +1,43 @@ +/* Copyright 2019 Thomas Baart + * + * 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 . + */ +#pragma once + +#include "kyria.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, R06, R07, R08, R09, R10, R11, \ + L12, L13, L14, L15, L16, L17, R18, R19, R20, R21, R22, R23, \ + L24, L25, L26, L27, L28, L29, L30, L31, R32, R33, R34, R35, R36, R37, R38, R39, \ + L40, L41, L42, L43, L44, R45, R46, R47, R48, R49 \ +) \ +{ \ + { KC_NO, KC_NO, L05, L04, L03, L02, L01, L00 }, \ + { KC_NO, KC_NO, L17, L16, L15, L14, L13, L12 }, \ + { L31, L30, L29, L28, L27, L26, L25, L24 }, \ + { L44, L43, L42, L41, L40, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, KC_NO, R06, R07, R08, R09, R10, R11 }, \ + { KC_NO, KC_NO, R18, R19, R20, R21, R22, R23 }, \ + { R32, R33, R34, R35, R36, R37, R38, R39 }, \ + { R45, R46, R47, R48, R49, KC_NO, KC_NO, KC_NO }, \ +} diff --git a/keyboards/kyria/rev1/rules.mk b/keyboards/kyria/rev1/rules.mk new file mode 100644 index 000000000000..8b1c9616cbe9 --- /dev/null +++ b/keyboards/kyria/rev1/rules.mk @@ -0,0 +1,3 @@ +OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays +ENCODER_ENABLE = yes # ENables the use of one or more encoders +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow diff --git a/keyboards/kyria/rules.mk b/keyboards/kyria/rules.mk new file mode 100644 index 000000000000..57fbf76cfbbf --- /dev/null +++ b/keyboards/kyria/rules.mk @@ -0,0 +1,36 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs +SPLIT_KEYBOARD = yes # Split common +LINK_TIME_OPTIMIZATION_ENABLE =yes + +DEFAULT_FOLDER = kyria/rev1 From 2b83b908ddb035e4b23281d96cc69828e0b0e676 Mon Sep 17 00:00:00 2001 From: Jerry Cooke Date: Mon, 4 Nov 2019 21:44:20 +0000 Subject: [PATCH 263/316] [Keymap] Add keymap for user jerryhcooke (#7251) * Add keymap for user jerryhcooke Created a new keymap with encoder changing per layer * Added readme * Update readme.md * Update readme.md * Update readme.md * Update keyboards/keebio/iris/keymaps/jerryhcooke/keymap.c Co-Authored-By: Drashna Jaelre * Update keymap.c * Fixed Formatting Ran automatic C formatting as suggested * Update rules.mk Fixed linespacing --- .../keebio/iris/keymaps/jerryhcooke/config.h | 35 +++++++++++++++++ .../keebio/iris/keymaps/jerryhcooke/keymap.c | 39 +++++++++++++++++++ .../keebio/iris/keymaps/jerryhcooke/readme.md | 3 ++ .../keebio/iris/keymaps/jerryhcooke/rules.mk | 3 ++ 4 files changed, 80 insertions(+) create mode 100644 keyboards/keebio/iris/keymaps/jerryhcooke/config.h create mode 100644 keyboards/keebio/iris/keymaps/jerryhcooke/keymap.c create mode 100644 keyboards/keebio/iris/keymaps/jerryhcooke/readme.md create mode 100644 keyboards/keebio/iris/keymaps/jerryhcooke/rules.mk diff --git a/keyboards/keebio/iris/keymaps/jerryhcooke/config.h b/keyboards/keebio/iris/keymaps/jerryhcooke/config.h new file mode 100644 index 000000000000..58f33d371636 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/jerryhcooke/config.h @@ -0,0 +1,35 @@ +/* +Copyright 2017 Danny Nguyen + +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 . +*/ + +#pragma once + +// #define USE_I2C +#define EE_HANDS + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 12 +#define RGBLIGHT_HUE_STEP 2 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + +#ifndef NO_DEBUG +# define NO_DEBUG +#endif // !NO_DEBUG +#if !defined(NO_PRINT) && !defined(CONSOLE_ENABLE) +# define NO_PRINT +#endif // !NO_PRINT diff --git a/keyboards/keebio/iris/keymaps/jerryhcooke/keymap.c b/keyboards/keebio/iris/keymaps/jerryhcooke/keymap.c new file mode 100644 index 000000000000..1e512540aae6 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/jerryhcooke/keymap.c @@ -0,0 +1,39 @@ +#include QMK_KEYBOARD_H + +#define _QWERTY 0 +#define _LOWER 1 +#define _RAISE 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {[0] = LAYOUT(KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O, KC_ENT, LCTL_T(KC_LGUI), KC_Z, KC_X, KC_C, KC_D, KC_V, LGUI(KC_L), MEH_T(KC_MINS), KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, KC_LGUI, LT(1, KC_QUOT), KC_SFTENT, KC_SPC, LT(2, KC_BSLS), LALT_T(KC_APP)), + [1] = LAYOUT(KC_MPLY, KC_NO, KC_DQUO, KC_NO, LALT(KC_F4), KC_NO, KC_P7, KC_P8, KC_P9, KC_PMNS, KC_NO, RESET, KC_MPRV, KC_END, KC_UP, KC_HOME, KC_PGUP, KC_NO, KC_P4, KC_P5, KC_P6, KC_PPLS, RGB_SAI, RGB_SAD, KC_MNXT, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_NO, KC_P1, KC_P2, KC_P3, KC_PAST, RGB_HUI, RGB_HUD, KC_NO, KC_WBAK, KC_WFWD, KC_WSTP, KC_WREF, KC_NO, LCA(KC_DEL), KC_NLCK, KC_P0, KC_P0, KC_PDOT, KC_PENT, RGB_SPI, RGB_SPD, KC_PSCR, KC_NO, KC_LGUI, RGB_TOG, RGB_VAI, RGB_VAD), + [2] = LAYOUT(KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_NO, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_K, KC_NO, KC_WH_D, KC_MS_U, KC_WH_U, KC_NO, KC_F12, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO)}; + +#ifdef ENCODER_ENABLE +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + switch (biton32(layer_state)) { + case _LOWER: + clockwise ? tap_code(KC_MS_WH_UP) : tap_code(KC_MS_WH_DOWN); + break; + case _RAISE: + clockwise ? rgblight_increase_hue() : rgblight_decrease_hue(); + break; + default: + clockwise ? tap_code(KC_AUDIO_VOL_UP) : tap_code(KC_AUDIO_VOL_DOWN); + break; + } + } else if (index == 1) { + switch (biton32(layer_state)) { + case _LOWER: + clockwise ? tap_code(KC_UP) : tap_code(KC_DOWN); + break; + case _RAISE: + clockwise ? tap_code(KC_MEDIA_NEXT_TRACK) : tap_code(KC_MEDIA_PREV_TRACK); + break; + default: + clockwise ? tap_code(KC_RIGHT) : tap_code(KC_LEFT); + break; + } + } +} +#endif // ENCODER_ENABLE diff --git a/keyboards/keebio/iris/keymaps/jerryhcooke/readme.md b/keyboards/keebio/iris/keymaps/jerryhcooke/readme.md new file mode 100644 index 000000000000..8c2a6efef77c --- /dev/null +++ b/keyboards/keebio/iris/keymaps/jerryhcooke/readme.md @@ -0,0 +1,3 @@ +[Jerry's Iris R4 Layout](https://imgur.com/a/JLytcqS) + +This is a fairly modified version of the default keymap that I tinkered with to allow the rotary encoder to carry out a different function on each layer. diff --git a/keyboards/keebio/iris/keymaps/jerryhcooke/rules.mk b/keyboards/keebio/iris/keymaps/jerryhcooke/rules.mk new file mode 100644 index 000000000000..8e5cd7a48551 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/jerryhcooke/rules.mk @@ -0,0 +1,3 @@ +RGBLIGHT_ENABLE = yes +BACKLIGHT_ENABLE = yes +MOUSEKEY_ENABLE = yes From a510e5212b32a1150a11670358fc8fe309ab1f09 Mon Sep 17 00:00:00 2001 From: Gregory Gubarev Date: Tue, 5 Nov 2019 01:44:49 +0400 Subject: [PATCH 264/316] [Docs] Create RU ver getting_started_getting_help (#7227) * Create RU ver getting_started_getting_help * uodate RU ver of getting_started_getting_help * Update docs/ru-ru/getting_started_getting_help.md Co-Authored-By: nabokovas Co-Authored-By: Nikita Titov --- docs/ru-ru/getting_started_getting_help.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 docs/ru-ru/getting_started_getting_help.md diff --git a/docs/ru-ru/getting_started_getting_help.md b/docs/ru-ru/getting_started_getting_help.md new file mode 100644 index 000000000000..75be44310e5d --- /dev/null +++ b/docs/ru-ru/getting_started_getting_help.md @@ -0,0 +1,15 @@ +# Получение помощи + +Существует много ресурсов для получения помощи по работе с QMK. + +## Чат в реальном времени + +Вы можете найти разработчиков и пользователей QMK на нашем главном [сервере Discord](https://discord.gg/Uq7gcHh). На сервере есть специальные каналы для разговоров о прошивке, Toolbox, оборудовании и конфигураторе. + +## OLKB Сабреддит + +Официальный форум QMK [/r/olkb](https://reddit.com/r/olkb) на [reddit.com](https://reddit.com). + +## GitHub ишью + +Вы можете открыть [ишью на GitHub](/~https://github.com/qmk/qmk_firmware/issues). Это особенно удобно, когда ваша проблема потребует длительного обсуждения или отладки. From 511fa5f8156b188c591ee760b7d246939c260451 Mon Sep 17 00:00:00 2001 From: Daniel Shields <1530706+shieldsd@users.noreply.github.com> Date: Mon, 4 Nov 2019 21:47:52 +0000 Subject: [PATCH 265/316] [Keymap] Add new LED/RGB key codes (#7254) --- keyboards/model01/keymaps/dshields/keymap.c | 4 ++-- keyboards/planck/keymaps/dshields/keymap.c | 2 +- users/dshields/dshields.h | 7 +++++++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/keyboards/model01/keymaps/dshields/keymap.c b/keyboards/model01/keymaps/dshields/keymap.c index 485acfd3e29d..981f1081837e 100644 --- a/keyboards/model01/keymaps/dshields/keymap.c +++ b/keyboards/model01/keymaps/dshields/keymap.c @@ -17,8 +17,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [FUN] = LAYOUT( EEP_RST, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_TAB , _______, KC_MS_U, _______, KC_BTN3, _______, RGB_MOD, DM_STRT, _______, KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, KC_F12 , - KC_HOME, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN1, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, _______, _______, - KC_END , KC_PSCR, KC_INS , _______, KC_BTN2, _______, _______, DM_STOP, _______, _______, _______, _______, KC_BSLS, KC_PIPE, + KC_HOME, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN1, _______, RGB_HUI, _______, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, _______, _______, + KC_END , KC_PSCR, KC_INS , _______, KC_BTN2, _______, RGB_HUD, DM_STOP, _______, _______, _______, _______, KC_BSLS, KC_PIPE, _______, _______, KC_DEL , KC_ENT , _______, _______, diff --git a/keyboards/planck/keymaps/dshields/keymap.c b/keyboards/planck/keymaps/dshields/keymap.c index 1c4a00b9650b..030e094a7e57 100644 --- a/keyboards/planck/keymaps/dshields/keymap.c +++ b/keyboards/planck/keymaps/dshields/keymap.c @@ -24,7 +24,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [FUN] = LAYOUT_planck_grid( KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, RESET, EEP_RST, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 , KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, _______, _______, _______, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, - LGT_TOG, LGT_MOD, LGT_BRT, _______, _______, DM_STRT, DM_STOP, _______, _______, KC_BTN1, KC_BTN2, KC_BTN3, + LGT_TOG, LGT_MOD, LGT_BRT, LGT_INC, LGT_DEC, DM_STRT, DM_STOP, _______, _______, KC_BTN1, KC_BTN2, KC_BTN3, _______, _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R ) }; diff --git a/users/dshields/dshields.h b/users/dshields/dshields.h index a65ccfea0046..d8f76e8c0088 100644 --- a/users/dshields/dshields.h +++ b/users/dshields/dshields.h @@ -21,20 +21,27 @@ // mod-tap keys #define MT_SPC SFT_T(KC_SPC) +// LED/RGB controls #ifdef KEYBOARD_planck_light #define LGT_TOG RGB_TOG #define LGT_MOD RGB_MOD #define LGT_BRT _______ + #define LGT_INC RGB_HUI + #define LGT_DEC RGB_HUD #endif #ifdef KEYBOARD_planck_rev3 #define LGT_TOG BL_TOGG #define LGT_MOD BL_STEP #define LGT_BRT BL_BRTG + #define LGT_INC BL_INC + #define LGT_DEC BL_DEC #endif #ifdef KEYBOARD_planck_rev6 #define LGT_TOG _______ #define LGT_MOD _______ #define LGT_BRT _______ + #define LGT_INC _______ + #define LGT_DEC _______ #endif enum layers { DEF, LWR, RSE, FUN }; From a836c85e54bfb06cd685a5444eea377374cebea3 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Mon, 4 Nov 2019 13:59:15 -0800 Subject: [PATCH 266/316] Update keymap.c --- keyboards/kyria/keymaps/default/keymap.c | 27 ++++++++++-------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/keyboards/kyria/keymaps/default/keymap.c b/keyboards/kyria/keymaps/default/keymap.c index a27486d392af..acadb0422b1e 100644 --- a/keyboards/kyria/keymaps/default/keymap.c +++ b/keyboards/kyria/keymaps/default/keymap.c @@ -16,15 +16,10 @@ #include QMK_KEYBOARD_H enum layers { - QWERTY = 0, - LOWER, - RAISE, - ADJUST -}; - -enum custom_keycodes { - LOWER = SAFE_RANGE, - RAISE + _QWERTY = 0, + _LOWER, + _RAISE, + _ADJUST }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -42,11 +37,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | Alt | Lower| Raise| | Lower| Raise| | | | * `----------------------------------' `----------------------------------' */ - [QWERTY] = LAYOUT( - LT(RAISE, KC_ESC), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_PIPE, + [_QWERTY] = LAYOUT( + LT(_RAISE, KC_ESC), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_PIPE, MT(MOD_LCTL, KC_BSPC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LSFT, KC_LSFT, KC_LSFT, KC_LSFT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_MINS, - KC_LGUI, KC_DEL, MT(MOD_LALT, KC_ENT), LT(LOWER, KC_SPC), LT(RAISE, KC_ESC), LT(LOWER, KC_ENT), LT(RAISE, KC_SPC), KC_TAB, KC_BSPC, KC_RALT + KC_LGUI, KC_DEL, MT(MOD_LALT, KC_ENT), LT(_LOWER, KC_SPC), LT(_RAISE, KC_ESC), LT(_LOWER, KC_ENT), LT(_RAISE, KC_SPC), KC_TAB, KC_BSPC, KC_RALT ), /* * Lower Layer: Symbols @@ -62,7 +57,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `----------------------------------' `----------------------------------' */ - [LOWER] = LAYOUT( + [_LOWER] = LAYOUT( _______, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, _______, _______, _______, _______, _______, KC_BSLS, _______, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, KC_PLUS, KC_MINS, KC_SLSH, KC_ASTR, KC_PERC, KC_QUOT, _______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, _______, _______, _______, _______, KC_AMPR, KC_EQL, KC_COMM, KC_DOT, KC_SLSH, KC_MINS, @@ -82,7 +77,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `----------------------------------' `----------------------------------' */ - [RAISE] = LAYOUT( + [_RAISE] = LAYOUT( _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLU, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, _______, _______, @@ -102,7 +97,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `----------------------------------' `----------------------------------' */ - [ADJUST] = LAYOUT( + [_ADJUST] = LAYOUT( _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, RGB_TOG, RGB_SAI, RGB_HUI, RGB_VAI, RGB_MOD, _______, _______, _______, KC_F11, KC_F12, _______, _______, _______, RGB_SAD, RGB_HUD, RGB_VAD, RGB_RMOD,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -131,7 +126,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; layer_state_t layer_state_set_user(layer_state_t state) { - return update_tri_layer_state(state, LOWER, RAISE, ADJUST); + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } #ifdef OLED_DRIVER_ENABLE From 29630e6e49487cbf97fa57f47b399d4d5866fe13 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Mon, 4 Nov 2019 15:35:47 -0800 Subject: [PATCH 267/316] [Core] Add short form LTO_ENABLE (#7259) For drashna's sanity's sake --- docs/config_options.md | 3 ++- tmk_core/common.mk | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/config_options.md b/docs/config_options.md index abd98ec8a802..c44a47178cee 100644 --- a/docs/config_options.md +++ b/docs/config_options.md @@ -348,7 +348,8 @@ Use these to enable or disable building certain features. The more you have enab * `NO_USB_STARTUP_CHECK` * Disables usb suspend check after keyboard startup. Usually the keyboard waits for the host to wake it up before any tasks are performed. This is useful for split keyboards as one half will not get a wakeup call but must send commands to the master. * `LINK_TIME_OPTIMIZATION_ENABLE` - = Enables Link Time Optimization (`LTO`) when compiling the keyboard. This makes the process take longer, but can significantly reduce the compiled size (and since the firmware is small, the added time is not noticable). However, this will automatically disable the old Macros and Functions features automatically, as these break when `LTO` is enabled. It does this by automatically defining `NO_ACTION_MACRO` and `NO_ACTION_FUNCTION` + * Enables Link Time Optimization (`LTO`) when compiling the keyboard. This makes the process take longer, but can significantly reduce the compiled size (and since the firmware is small, the added time is not noticeable). However, this will automatically disable the old Macros and Functions features automatically, as these break when `LTO` is enabled. It does this by automatically defining `NO_ACTION_MACRO` and `NO_ACTION_FUNCTION` + * Alternatively, you can use `LTO_ENABLE` instead of `LINK_TIME_OPTIMIZATION_ENABLE`. ## USB Endpoint Limitations diff --git a/tmk_core/common.mk b/tmk_core/common.mk index db553534652b..d43950299b1b 100644 --- a/tmk_core/common.mk +++ b/tmk_core/common.mk @@ -203,6 +203,9 @@ ifeq ($(strip $(SHARED_EP_ENABLE)), yes) TMK_COMMON_DEFS += -DSHARED_EP_ENABLE endif +ifeq ($(strip $(LTO_ENABLE)), yes) + LINK_TIME_OPTIMIZATION_ENABLE = yes +endif ifeq ($(strip $(LINK_TIME_OPTIMIZATION_ENABLE)), yes) EXTRAFLAGS += -flto From 31fe2e085902b80c0cc89fbce3d592e1db041530 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Mon, 4 Nov 2019 15:53:40 -0800 Subject: [PATCH 268/316] [Keyboard] Reduce compiled size of Panc60 keyboard (#7260) --- keyboards/panc60/rules.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/panc60/rules.mk b/keyboards/panc60/rules.mk index 6ca8d7b78c3f..cdacb4be7dbe 100644 --- a/keyboards/panc60/rules.mk +++ b/keyboards/panc60/rules.mk @@ -31,7 +31,7 @@ BOOTMAGIC_ENABLE = no MOUSEKEY_ENABLE = yes EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = yes -COMMAND_ENABLE = yes +COMMAND_ENABLE = no BACKLIGHT_ENABLE = yes RGBLIGHT_ENABLE = yes RGBLIGHT_CUSTOM_DRIVER = yes From 0a9a69394e132c3d00eddffd2e345f48113e56c4 Mon Sep 17 00:00:00 2001 From: Christopher Date: Tue, 5 Nov 2019 01:02:42 +0100 Subject: [PATCH 269/316] Fixes #7256: USB descriptor to identify correctly as MIDI device. (#7258) --- tmk_core/protocol/usb_descriptor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tmk_core/protocol/usb_descriptor.c b/tmk_core/protocol/usb_descriptor.c index ffcf0957f358..e93ce87df28c 100644 --- a/tmk_core/protocol/usb_descriptor.c +++ b/tmk_core/protocol/usb_descriptor.c @@ -431,7 +431,7 @@ const USB_Descriptor_Configuration_t PROGMEM .Refresh = 0, .SyncEndpointNumber = 0}, - .MIDI_In_Jack_Endpoint_SPC = {.Header = {.Size = sizeof(USB_MIDI_Descriptor_Jack_Endpoint_t), .Type = AUDIO_DSUBTYPE_CSEndpoint_General}, .Subtype = AUDIO_DSUBTYPE_CSEndpoint_General, .TotalEmbeddedJacks = 0x01, .AssociatedJackID = {0x01}}, + .MIDI_In_Jack_Endpoint_SPC = {.Header = {.Size = sizeof(USB_MIDI_Descriptor_Jack_Endpoint_t), .Type = AUDIO_DTYPE_CSEndpoint}, .Subtype = AUDIO_DSUBTYPE_CSEndpoint_General, .TotalEmbeddedJacks = 0x01, .AssociatedJackID = {0x01}}, .MIDI_Out_Jack_Endpoint = {.Endpoint = {.Header = {.Size = sizeof(USB_Audio_Descriptor_StreamEndpoint_Std_t), .Type = DTYPE_Endpoint}, .EndpointAddress = MIDI_STREAM_IN_EPADDR, .Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = MIDI_STREAM_EPSIZE, .PollingIntervalMS = 0x05}, .Refresh = 0, From efa28d0f5cca55b0dfecaddd0860ec3dfeab8bb0 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Tue, 5 Nov 2019 11:05:03 +1100 Subject: [PATCH 270/316] Convert some PS2AVRGB boards to I2C WS2812 driver (#7241) * Convert some PS2AVRGB boards to I2C WS2812 driver * Fix Travis failure for bface --- keyboards/ares/ares.c | 72 ++-------------------- keyboards/ares/rules.mk | 19 +----- keyboards/donutcables/budget96/budget96.c | 71 +++------------------- keyboards/donutcables/budget96/rules.mk | 20 +------ keyboards/eve/meteor/meteor.c | 50 ++-------------- keyboards/eve/meteor/rules.mk | 19 +----- keyboards/exclusive/e6v2/le_bmc/le_bmc.c | 51 ++-------------- keyboards/exclusive/e6v2/le_bmc/rules.mk | 3 +- keyboards/exclusive/e6v2/oe_bmc/oe_bmc.c | 63 +++---------------- keyboards/exclusive/e6v2/oe_bmc/rules.mk | 3 +- keyboards/exent/exent.c | 73 ----------------------- keyboards/exent/rules.mk | 4 +- keyboards/facew/facew.c | 54 ++++++----------- keyboards/facew/rules.mk | 20 +------ keyboards/ft/mars80/mars80.c | 52 ++-------------- keyboards/ft/mars80/rules.mk | 19 +----- keyboards/gray_studio/hb85/hb85.c | 40 +++---------- keyboards/gray_studio/hb85/rules.mk | 19 +----- keyboards/jj4x4/jj4x4.c | 37 ------------ keyboards/jj4x4/rules.mk | 19 +----- keyboards/kbdfans/kbdpad/mk1/mk1.c | 2 +- keyboards/kbdfans/kbdpad/mk1/rules.mk | 15 ----- keyboards/panc60/panc60.c | 55 ++++++----------- keyboards/panc60/rules.mk | 20 +------ keyboards/pearl/pearl.c | 52 ++-------------- keyboards/pearl/rules.mk | 20 +------ keyboards/percent/skog_lite/rules.mk | 19 +----- keyboards/percent/skog_lite/skog_lite.c | 49 ++------------- keyboards/singa/rules.mk | 19 +----- keyboards/singa/singa.c | 49 ++------------- keyboards/tgr/alice/alice.c | 39 +----------- keyboards/tgr/alice/rules.mk | 19 +----- keyboards/tgr/jane/jane.c | 51 ++-------------- keyboards/tgr/jane/rules.mk | 19 +----- keyboards/unikorn/readme.md | 1 - keyboards/unikorn/rules.mk | 19 +----- keyboards/unikorn/unikorn.c | 50 ++-------------- keyboards/winkeyless/bface/bface.c | 49 ++------------- keyboards/winkeyless/bface/bface.h | 4 +- keyboards/winkeyless/bface/rules.mk | 20 +------ 40 files changed, 122 insertions(+), 1157 deletions(-) diff --git a/keyboards/ares/ares.c b/keyboards/ares/ares.c index 85c7435edc3f..07276491c513 100644 --- a/keyboards/ares/ares.c +++ b/keyboards/ares/ares.c @@ -17,50 +17,12 @@ along with this program. If not, see . #include "ares.h" -#ifdef RGBLIGHT_ENABLE - -#include -#include "i2c_master.h" -#include "rgblight.h" - -extern rgblight_config_t rgblight_config; - -void matrix_init_kb(void) { - i2c_init(); - // call user level keymaps, if any - matrix_init_user(); -} - -// custom RGB driver -void rgblight_set(void) { - if (!rgblight_config.enable) { - memset(led, 0, 3 * RGBLED_NUM); - } - - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); -} - -bool rgb_init = false; - -void matrix_scan_kb(void) { - // if LEDs were previously on before poweroff, turn them back on - if (rgb_init == false && rgblight_config.enable) { - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); - rgb_init = true; - } - - rgblight_task(); - matrix_scan_user(); -} - -#endif - #ifdef BACKLIGHT_ENABLE void backlight_init_ports(void) { - setPinOutput(D0); - setPinOutput(D1); - setPinOutput(D4); - setPinOutput(D6); + setPinOutput(D0); + setPinOutput(D1); + setPinOutput(D4); + setPinOutput(D6); } void backlight_set(uint8_t level) { @@ -79,29 +41,3 @@ void backlight_set(uint8_t level) { } } #endif - -// Optional override functions below. -// You can leave any or all of these undefined. -// These are only required if you want to perform custom actions. - -/* -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); -} -*/ \ No newline at end of file diff --git a/keyboards/ares/rules.mk b/keyboards/ares/rules.mk index 3ac90cf973f6..58d36bc67350 100644 --- a/keyboards/ares/rules.mk +++ b/keyboards/ares/rules.mk @@ -1,18 +1,3 @@ -# Copyright 2017 Luiz Ribeiro -# -# 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 . - # MCU name MCU = atmega32a @@ -34,8 +19,6 @@ CONSOLE_ENABLE = yes COMMAND_ENABLE = yes BACKLIGHT_ENABLE = no RGBLIGHT_ENABLE = no -RGBLIGHT_CUSTOM_DRIVER = yes +WS2812_DRIVER = i2c OPT_DEFS = -DDEBUG_LEVEL=0 - -SRC += i2c_master.c diff --git a/keyboards/donutcables/budget96/budget96.c b/keyboards/donutcables/budget96/budget96.c index 2fc826f09273..e9125a3e609e 100644 --- a/keyboards/donutcables/budget96/budget96.c +++ b/keyboards/donutcables/budget96/budget96.c @@ -13,61 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "budget96.h" - -#ifdef BACKLIGHT_ENABLE -#include "backlight.h" -#endif -#ifdef RGBLIGHT_ENABLE -#include "rgblight.h" -#endif - -#include - -#include "action_layer.h" -#include "i2c_master.h" -#include "quantum.h" - -__attribute__ ((weak)) -void matrix_scan_user(void) { -} - -#ifdef RGBLIGHT_ENABLE -extern rgblight_config_t rgblight_config; - -void rgblight_set(void) { - if (!rgblight_config.enable) { - for (uint8_t i = 0; i < RGBLED_NUM; i++) { - led[i].r = 0; - led[i].g = 0; - led[i].b = 0; - } - } - - i2c_init(); - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); -} -#endif - -void matrix_init_kb(void) { -#ifdef RGBLIGHT_ENABLE - if (rgblight_config.enable) { - i2c_init(); - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); - } -#endif - // call user level keymaps, if any - matrix_init_user(); -} - -void matrix_scan_kb(void) { -#ifdef RGBLIGHT_ENABLE - rgblight_task(); -#endif - matrix_scan_user(); - /* Nothing else for now. */ -} +#include "budget96.h" void backlight_init_ports(void) { // initialize pins D0, D1, D4 and D6 as output @@ -76,25 +23,25 @@ void backlight_init_ports(void) { setPinOutput(D4); setPinOutput(D6); - // turn RGB LEDs on + // turn backlight LEDs on writePinHigh(D0); writePinHigh(D1); writePinHigh(D4); writePinHigh(D6); } - void backlight_set(uint8_t level) { - if (level == 0) { - // turn RGB LEDs off +void backlight_set(uint8_t level) { + if (level == 0) { + // turn backlight LEDs off writePinLow(D0); writePinLow(D1); writePinLow(D4); writePinLow(D6); - } else { - // turn RGB LEDs on + } else { + // turn backlight LEDs on writePinHigh(D0); writePinHigh(D1); writePinHigh(D4); writePinHigh(D6); - } - } + } +} diff --git a/keyboards/donutcables/budget96/rules.mk b/keyboards/donutcables/budget96/rules.mk index 4f9e0e412df6..54328d248d13 100644 --- a/keyboards/donutcables/budget96/rules.mk +++ b/keyboards/donutcables/budget96/rules.mk @@ -1,18 +1,3 @@ -# Copyright 2017 Luiz Ribeiro -# -# 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 . - # MCU name MCU = atmega32a @@ -34,9 +19,6 @@ CONSOLE_ENABLE = yes COMMAND_ENABLE = yes BACKLIGHT_ENABLE = yes RGBLIGHT_ENABLE = yes -RGBLIGHT_CUSTOM_DRIVER = yes +WS2812_DRIVER = i2c OPT_DEFS = -DDEBUG_LEVEL=0 - -# custom matrix setup -SRC = i2c_master.c diff --git a/keyboards/eve/meteor/meteor.c b/keyboards/eve/meteor/meteor.c index 1bd47ef9e1af..f5ecbad02543 100644 --- a/keyboards/eve/meteor/meteor.c +++ b/keyboards/eve/meteor/meteor.c @@ -14,49 +14,7 @@ * along with this program. If not, see . */ -#include "i2c_master.h" -#include "quantum.h" - -#ifdef RGBLIGHT_ENABLE -#include "rgblight.h" -extern rgblight_config_t rgblight_config; - -void rgblight_set(void) { - if (!rgblight_config.enable) { - for (uint8_t i = 0; i < RGBLED_NUM; i++) { - led[i].r = 0; - led[i].g = 0; - led[i].b = 0; - } - } - - i2c_init(); - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); -} -#endif - -void matrix_init_kb(void) { -#ifdef RGBLIGHT_ENABLE - if (rgblight_config.enable) { - i2c_init(); - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); - } -#endif - // call user level keymaps, if any - matrix_init_user(); -} - -void matrix_scan_kb(void) { -#ifdef RGBLIGHT_ENABLE - rgblight_task(); -#endif - matrix_scan_user(); - /* Nothing else for now. */ -} - -__attribute__ ((weak)) -void matrix_scan_user(void) { -} +#include "meteor.h" void backlight_init_ports(void) { // initialize pins D0, D1, D4 and D6 as output @@ -73,17 +31,17 @@ void backlight_init_ports(void) { } void backlight_set(uint8_t level) { - if (level == 0) { + if (level == 0) { // turn backlight LEDs off writePinLow(D0); writePinLow(D1); writePinLow(D4); writePinLow(D6); - } else { + } else { // turn backlight LEDs on writePinHigh(D0); writePinHigh(D1); writePinHigh(D4); writePinHigh(D6); - } + } } diff --git a/keyboards/eve/meteor/rules.mk b/keyboards/eve/meteor/rules.mk index e43baee5c5bf..e57c21c856bb 100644 --- a/keyboards/eve/meteor/rules.mk +++ b/keyboards/eve/meteor/rules.mk @@ -1,18 +1,3 @@ -# Copyright 2017 Luiz Ribeiro -# -# 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 . - # MCU name MCU = atmega32a @@ -34,8 +19,6 @@ CONSOLE_ENABLE = yes COMMAND_ENABLE = yes BACKLIGHT_ENABLE = yes RGBLIGHT_ENABLE = no -RGBLIGHT_CUSTOM_DRIVER = no +WS2812_DRIVER = i2c OPT_DEFS = -DDEBUG_LEVEL=0 - -QUANTUM_LIB_SRC = i2c_master.c diff --git a/keyboards/exclusive/e6v2/le_bmc/le_bmc.c b/keyboards/exclusive/e6v2/le_bmc/le_bmc.c index 5f7ef25b227d..e3b81c81ba43 100644 --- a/keyboards/exclusive/e6v2/le_bmc/le_bmc.c +++ b/keyboards/exclusive/e6v2/le_bmc/le_bmc.c @@ -13,49 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "rgblight.h" -#include "i2c_master.h" -#include "quantum.h" -#ifdef RGBLIGHT_ENABLE -extern rgblight_config_t rgblight_config; - -void rgblight_set(void) { - if (!rgblight_config.enable) { - for (uint8_t i = 0; i < RGBLED_NUM; i++) { - led[i].r = 0; - led[i].g = 0; - led[i].b = 0; - } - } - - i2c_init(); - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); -} -#endif - -void matrix_init_kb(void) { -#ifdef RGBLIGHT_ENABLE - if (rgblight_config.enable) { - i2c_init(); - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); - } -#endif - // call user level keymaps, if any - matrix_init_user(); -} - -void matrix_scan_kb(void) { -#ifdef RGBLIGHT_ENABLE - rgblight_task(); -#endif - matrix_scan_user(); - /* Nothing else for now. */ -} - -__attribute__ ((weak)) -void matrix_scan_user(void) { -} +#include "le_bmc.h" void backlight_init_ports(void) { // initialize pins D0, D1, D4 and D6 as output @@ -72,17 +31,17 @@ void backlight_init_ports(void) { } void backlight_set(uint8_t level) { - if (level == 0) { + if (level == 0) { // turn backlight LEDs off writePinLow(D0); writePinLow(D1); writePinLow(D4); writePinLow(D6); - } else { + } else { // turn backlight LEDs on writePinHigh(D0); writePinHigh(D1); writePinHigh(D4); writePinHigh(D6); - } -} \ No newline at end of file + } +} diff --git a/keyboards/exclusive/e6v2/le_bmc/rules.mk b/keyboards/exclusive/e6v2/le_bmc/rules.mk index 13a5f1b89a44..106044ba7257 100644 --- a/keyboards/exclusive/e6v2/le_bmc/rules.mk +++ b/keyboards/exclusive/e6v2/le_bmc/rules.mk @@ -24,7 +24,7 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -RGBLIGHT_CUSTOM_DRIVER = yes +WS2812_DRIVER = i2c RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) UNICODE_ENABLE = no # Unicode @@ -34,4 +34,3 @@ FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) OPT_DEFS = -DDEBUG_LEVEL=0 -SRC += i2c_master.c diff --git a/keyboards/exclusive/e6v2/oe_bmc/oe_bmc.c b/keyboards/exclusive/e6v2/oe_bmc/oe_bmc.c index 5357550ae124..97d354653f1b 100644 --- a/keyboards/exclusive/e6v2/oe_bmc/oe_bmc.c +++ b/keyboards/exclusive/e6v2/oe_bmc/oe_bmc.c @@ -13,57 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "oe_bmc.h" -#include "rgblight.h" -#include "i2c_master.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); -} - -#ifdef RGBLIGHT_ENABLE -extern rgblight_config_t rgblight_config; - -void rgblight_set(void) { - if (!rgblight_config.enable) { - for (uint8_t i = 0; i < RGBLED_NUM; i++) { - led[i].r = 0; - led[i].g = 0; - led[i].b = 0; - } - } - - i2c_init(); - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); -} -#endif - -__attribute__ ((weak)) -void matrix_scan_user(void) { -} +#include "oe_bmc.h" void backlight_init_ports(void) { // initialize pins D0, D1, D4 and D6 as output @@ -72,7 +23,7 @@ void backlight_init_ports(void) { setPinOutput(D4); setPinOutput(D6); - // turn RGB LEDs on + // turn backlight LEDs on writePinHigh(D0); writePinHigh(D1); writePinHigh(D4); @@ -80,17 +31,17 @@ void backlight_init_ports(void) { } void backlight_set(uint8_t level) { - if (level == 0) { - // turn RGB LEDs off + if (level == 0) { + // turn backlight LEDs off writePinLow(D0); writePinLow(D1); writePinLow(D4); writePinLow(D6); - } else { - // turn RGB LEDs on + } else { + // turn backlight LEDs on writePinHigh(D0); writePinHigh(D1); writePinHigh(D4); writePinHigh(D6); - } + } } diff --git a/keyboards/exclusive/e6v2/oe_bmc/rules.mk b/keyboards/exclusive/e6v2/oe_bmc/rules.mk index 13a5f1b89a44..106044ba7257 100644 --- a/keyboards/exclusive/e6v2/oe_bmc/rules.mk +++ b/keyboards/exclusive/e6v2/oe_bmc/rules.mk @@ -24,7 +24,7 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -RGBLIGHT_CUSTOM_DRIVER = yes +WS2812_DRIVER = i2c RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) UNICODE_ENABLE = no # Unicode @@ -34,4 +34,3 @@ FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) OPT_DEFS = -DDEBUG_LEVEL=0 -SRC += i2c_master.c diff --git a/keyboards/exent/exent.c b/keyboards/exent/exent.c index 00cd20aff6fd..82066f7e8553 100644 --- a/keyboards/exent/exent.c +++ b/keyboards/exent/exent.c @@ -15,76 +15,3 @@ */ #include "exent.h" - -#ifdef RGBLIGHT_ENABLE - -# include -# include "i2c_master.h" -# include "rgblight.h" - -extern rgblight_config_t rgblight_config; - -void matrix_init_kb(void) { - i2c_init(); - // call user level keymaps, if any - matrix_init_user(); -} - -// custom RGB driver -void rgblight_set(void) { - if (!rgblight_config.enable) { - memset(led, 0, 3 * RGBLED_NUM); - } - - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); -} - -bool rgb_init = false; - -void matrix_scan_kb(void) { - // if LEDs were previously on before poweroff, turn them back on - if (rgb_init == false && rgblight_config.enable) { - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); - rgb_init = true; - } - - rgblight_task(); - matrix_scan_user(); -} - -#endif - -// Optional override functions below. -// You can leave any or all of these undefined. -// These are only required if you want to perform custom actions. - -/* - -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/exent/rules.mk b/keyboards/exent/rules.mk index a49f32058290..10442b31ba61 100644 --- a/keyboards/exent/rules.mk +++ b/keyboards/exent/rules.mk @@ -19,10 +19,8 @@ CONSOLE_ENABLE = yes COMMAND_ENABLE = yes BACKLIGHT_ENABLE = no RGBLIGHT_ENABLE = yes -RGBLIGHT_CUSTOM_DRIVER = yes +WS2812_DRIVER = i2c OPT_DEFS = -DDEBUG_LEVEL=0 -SRC += i2c_master.c - LAYOUTS = 65_ansi 65_iso diff --git a/keyboards/facew/facew.c b/keyboards/facew/facew.c index 7ec56548b16d..fa58f0cf79a1 100644 --- a/keyboards/facew/facew.c +++ b/keyboards/facew/facew.c @@ -16,51 +16,31 @@ along with this program. If not, see . */ #include "facew.h" -#ifdef BACKLIGHT_ENABLE -#include "backlight.h" -#endif -#ifdef RGBLIGHT_ENABLE -#include "rgblight.h" -#endif - -#include - -#include "action_layer.h" -#include "i2c_master.h" -#include "quantum.h" - -#ifdef RGBLIGHT_ENABLE -extern rgblight_config_t rgblight_config; - -void rgblight_set(void) { - if (!rgblight_config.enable) { - for (uint8_t i = 0; i < RGBLED_NUM; i++) { - led[i].r = 0; - led[i].g = 0; - led[i].b = 0; - } - } - - i2c_init(); - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); -} -#endif - -__attribute__ ((weak)) -void matrix_scan_user(void) { -} void backlight_init_ports(void) { - DDRD |= (1<<0 | 1<<1 | 1<<4 | 1<<6); - PORTD &= ~(1<<0 | 1<<1 | 1<<4 | 1<<6); + setPinOutput(D0); + setPinOutput(D1); + setPinOutput(D4); + setPinOutput(D6); + + writePinLow(D0); + writePinLow(D1); + writePinLow(D4); + writePinLow(D6); } void backlight_set(uint8_t level) { if (level == 0) { // Turn out the lights - PORTD &= ~(1<<0 | 1<<1 | 1<<4 | 1<<6); + writePinLow(D0); + writePinLow(D1); + writePinLow(D4); + writePinLow(D6); } else { // Turn on the lights - PORTD |= (1<<0 | 1<<1 | 1<<4 | 1<<6); + writePinHigh(D0); + writePinHigh(D1); + writePinHigh(D4); + writePinHigh(D6); } } diff --git a/keyboards/facew/rules.mk b/keyboards/facew/rules.mk index c9942e369440..c4117d15d768 100644 --- a/keyboards/facew/rules.mk +++ b/keyboards/facew/rules.mk @@ -1,18 +1,3 @@ -# Copyright 2017 Luiz Ribeiro -# -# 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 . - # MCU name MCU = atmega32a @@ -34,11 +19,8 @@ CONSOLE_ENABLE = yes COMMAND_ENABLE = yes BACKLIGHT_ENABLE = yes RGBLIGHT_ENABLE = yes -RGBLIGHT_CUSTOM_DRIVER = yes +WS2812_DRIVER = i2c OPT_DEFS = -DDEBUG_LEVEL=0 -# custom matrix setup -SRC = i2c_master.c - LAYOUTS = 60_ansi diff --git a/keyboards/ft/mars80/mars80.c b/keyboards/ft/mars80/mars80.c index 75434508223b..8e512740877f 100644 --- a/keyboards/ft/mars80/mars80.c +++ b/keyboards/ft/mars80/mars80.c @@ -16,50 +16,6 @@ #include "mars80.h" -#include "rgblight.h" -#include "i2c_master.h" -#include "quantum.h" - -#ifdef RGBLIGHT_ENABLE -extern rgblight_config_t rgblight_config; - -void rgblight_set(void) { - if (!rgblight_config.enable) { - for (uint8_t i = 0; i < RGBLED_NUM; i++) { - led[i].r = 0; - led[i].g = 0; - led[i].b = 0; - } - } - - i2c_init(); - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); -} -#endif - -void matrix_init_kb(void) { -#ifdef RGBLIGHT_ENABLE - if (rgblight_config.enable) { - i2c_init(); - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); - } -#endif - // call user level keymaps, if any - matrix_init_user(); -} - -void matrix_scan_kb(void) { -#ifdef RGBLIGHT_ENABLE - rgblight_task(); -#endif - matrix_scan_user(); - /* Nothing else for now. */ -} - -__attribute__ ((weak)) -void matrix_scan_user(void) { -} - void backlight_init_ports(void) { // initialize pins D0, D1, D4 and D6 as output setPinOutput(D0); @@ -75,17 +31,17 @@ void backlight_init_ports(void) { } void backlight_set(uint8_t level) { - if (level == 0) { + if (level == 0) { // turn backlight LEDs off writePinLow(D0); writePinLow(D1); writePinLow(D4); writePinLow(D6); - } else { + } else { // turn backlight LEDs on writePinHigh(D0); writePinHigh(D1); writePinHigh(D4); writePinHigh(D6); - } -} \ No newline at end of file + } +} diff --git a/keyboards/ft/mars80/rules.mk b/keyboards/ft/mars80/rules.mk index f1c79b196c57..de85d62c8e0a 100644 --- a/keyboards/ft/mars80/rules.mk +++ b/keyboards/ft/mars80/rules.mk @@ -1,18 +1,3 @@ -# Copyright 2019 Luiz Ribeiro -# -# 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 . - # MCU name MCU = atmega32a @@ -34,10 +19,8 @@ CONSOLE_ENABLE = yes COMMAND_ENABLE = yes BACKLIGHT_ENABLE = yes RGBLIGHT_ENABLE = yes -RGBLIGHT_CUSTOM_DRIVER = yes +WS2812_DRIVER = i2c OPT_DEFS = -DDEBUG_LEVEL=0 -SRC += i2c_master.c - LAYOUTS = tkl_ansi tkl_iso diff --git a/keyboards/gray_studio/hb85/hb85.c b/keyboards/gray_studio/hb85/hb85.c index 3e4202358786..21562b9e0f0c 100644 --- a/keyboards/gray_studio/hb85/hb85.c +++ b/keyboards/gray_studio/hb85/hb85.c @@ -16,33 +16,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include - -#include "rgblight.h" - -#include "i2c_master.h" -#include "quantum.h" - -#ifdef RGBLIGHT_ENABLE -extern rgblight_config_t rgblight_config; - -void rgblight_set(void) { - if (!rgblight_config.enable) { - for (uint8_t i = 0; i < RGBLED_NUM; i++) { - led[i].r = 0; - led[i].g = 0; - led[i].b = 0; - } - } - - i2c_init(); - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); -} -#endif - -__attribute__ ((weak)) -void matrix_scan_user(void) { -} +#include "hb85.h" void backlight_init_ports(void) { // initialize pins D0, D1, D4 and D6 as output @@ -51,7 +25,7 @@ void backlight_init_ports(void) { setPinOutput(D4); setPinOutput(D6); - // turn RGB LEDs on + // turn backlight LEDs on writePinHigh(D0); writePinHigh(D1); writePinHigh(D4); @@ -59,17 +33,17 @@ void backlight_init_ports(void) { } void backlight_set(uint8_t level) { - if (level == 0) { - // turn RGB LEDs off + if (level == 0) { + // turn backlight LEDs off writePinLow(D0); writePinLow(D1); writePinLow(D4); writePinLow(D6); - } else { - // turn RGB LEDs on + } else { + // turn backlight LEDs on writePinHigh(D0); writePinHigh(D1); writePinHigh(D4); writePinHigh(D6); - } + } } diff --git a/keyboards/gray_studio/hb85/rules.mk b/keyboards/gray_studio/hb85/rules.mk index 5339aad89cb0..ec57b03dcbce 100644 --- a/keyboards/gray_studio/hb85/rules.mk +++ b/keyboards/gray_studio/hb85/rules.mk @@ -1,18 +1,3 @@ -# Copyright 2019 fcoury -# -# 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 . - # MCU name MCU = atmega32a @@ -34,8 +19,6 @@ CONSOLE_ENABLE = yes COMMAND_ENABLE = yes BACKLIGHT_ENABLE = no RGBLIGHT_ENABLE = yes -RGBLIGHT_CUSTOM_DRIVER = yes +WS2812_DRIVER = i2c OPT_DEFS = -DDEBUG_LEVEL=0 - -SRC += i2c_master.c diff --git a/keyboards/jj4x4/jj4x4.c b/keyboards/jj4x4/jj4x4.c index 265508b2d5b4..6330c89de5c6 100644 --- a/keyboards/jj4x4/jj4x4.c +++ b/keyboards/jj4x4/jj4x4.c @@ -17,40 +17,3 @@ along with this program. If not, see . */ #include "jj4x4.h" - -#ifdef RGBLIGHT_ENABLE - -#include -#include "i2c_master.h" -#include "rgblight.h" - -extern rgblight_config_t rgblight_config; - -void matrix_init_kb(void) { - i2c_init(); - // call user level keymaps, if any - matrix_init_user(); -} -// custom RGB driver -void rgblight_set(void) { - if (!rgblight_config.enable) { - memset(led, 0, 3 * RGBLED_NUM); - } - - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); -} - -bool rgb_init = false; - -void matrix_scan_kb(void) { - // if LEDs were previously on before poweroff, turn them back on - if (rgb_init == false && rgblight_config.enable) { - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); - rgb_init = true; - } - - rgblight_task(); - matrix_scan_user(); -} - -#endif diff --git a/keyboards/jj4x4/rules.mk b/keyboards/jj4x4/rules.mk index fedc525f8efc..aa74cc7c92f6 100644 --- a/keyboards/jj4x4/rules.mk +++ b/keyboards/jj4x4/rules.mk @@ -1,18 +1,3 @@ -# Copyright 2017 Luiz Ribeiro -# -# 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 . - # MCU name MCU = atmega32a @@ -40,7 +25,7 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -RGBLIGHT_CUSTOM_DRIVER = yes +WS2812_DRIVER = i2c MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID @@ -48,6 +33,4 @@ AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) -SRC += i2c_master.c - LAYOUTS = ortho_4x4 diff --git a/keyboards/kbdfans/kbdpad/mk1/mk1.c b/keyboards/kbdfans/kbdpad/mk1/mk1.c index 71a47b7ba9c0..aa781875ce06 100644 --- a/keyboards/kbdfans/kbdpad/mk1/mk1.c +++ b/keyboards/kbdfans/kbdpad/mk1/mk1.c @@ -14,7 +14,7 @@ * along with this program. If not, see . */ -#include "quantum.h" +#include "mk1.h" #define NUMLOCK_PIN D0 diff --git a/keyboards/kbdfans/kbdpad/mk1/rules.mk b/keyboards/kbdfans/kbdpad/mk1/rules.mk index f1f740760a25..b4cd885b1a3c 100644 --- a/keyboards/kbdfans/kbdpad/mk1/rules.mk +++ b/keyboards/kbdfans/kbdpad/mk1/rules.mk @@ -1,18 +1,3 @@ -# Copyright 2017 Luiz Ribeiro -# -# 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 . - # MCU name MCU = atmega32a diff --git a/keyboards/panc60/panc60.c b/keyboards/panc60/panc60.c index 16674d30d266..6bd16a4bdc48 100644 --- a/keyboards/panc60/panc60.c +++ b/keyboards/panc60/panc60.c @@ -13,52 +13,33 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "panc60.h" -#ifdef BACKLIGHT_ENABLE -#include "backlight.h" -#endif -#ifdef RGBLIGHT_ENABLE -#include "rgblight.h" -#endif - -#include - -#include "action_layer.h" -#include "i2c_master.h" -#include "quantum.h" - -__attribute__ ((weak)) -void matrix_scan_user(void) { -} -#ifdef RGBLIGHT_ENABLE -extern rgblight_config_t rgblight_config; - -void rgblight_set(void) { - if (!rgblight_config.enable) { - for (uint8_t i = 0; i < RGBLED_NUM; i++) { - led[i].r = 0; - led[i].g = 0; - led[i].b = 0; - } - } - - i2c_init(); - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); -} -#endif +#include "panc60.h" void backlight_init_ports(void) { - DDRD |= (1<<0 | 1<<1 | 1<<4 | 1<<6); - PORTD &= ~(1<<0 | 1<<1 | 1<<4 | 1<<6); + setPinOutput(D0); + setPinOutput(D1); + setPinOutput(D4); + setPinOutput(D6); + + writePinLow(D0); + writePinLow(D1); + writePinLow(D4); + writePinLow(D6); } void backlight_set(uint8_t level) { if (level == 0) { // Turn out the lights - PORTD &= ~(1<<0 | 1<<1 | 1<<4 | 1<<6); + writePinLow(D0); + writePinLow(D1); + writePinLow(D4); + writePinLow(D6); } else { // Turn on the lights - PORTD |= (1<<0 | 1<<1 | 1<<4 | 1<<6); + writePinHigh(D0); + writePinHigh(D1); + writePinHigh(D4); + writePinHigh(D6); } } diff --git a/keyboards/panc60/rules.mk b/keyboards/panc60/rules.mk index cdacb4be7dbe..d3ed4998bc1d 100644 --- a/keyboards/panc60/rules.mk +++ b/keyboards/panc60/rules.mk @@ -1,18 +1,3 @@ -# Copyright 2017 Luiz Ribeiro -# -# 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 . - # MCU name MCU = atmega32a @@ -34,11 +19,8 @@ CONSOLE_ENABLE = yes COMMAND_ENABLE = no BACKLIGHT_ENABLE = yes RGBLIGHT_ENABLE = yes -RGBLIGHT_CUSTOM_DRIVER = yes +WS2812_DRIVER = i2c OPT_DEFS = -DDEBUG_LEVEL=0 -# custom matrix setup -SRC = i2c_master.c - LAYOUTS = 60_ansi 60_hhkb diff --git a/keyboards/pearl/pearl.c b/keyboards/pearl/pearl.c index c8cd8a8609c3..093b5fdd9378 100644 --- a/keyboards/pearl/pearl.c +++ b/keyboards/pearl/pearl.c @@ -15,49 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "rgblight.h" -#include "i2c_master.h" -#include "quantum.h" - -#ifdef RGBLIGHT_ENABLE -extern rgblight_config_t rgblight_config; - -void rgblight_set(void) { - if (!rgblight_config.enable) { - for (uint8_t i = 0; i < RGBLED_NUM; i++) { - led[i].r = 0; - led[i].g = 0; - led[i].b = 0; - } - } - - i2c_init(); - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); -} -#endif - -void matrix_init_kb(void) { -#ifdef RGBLIGHT_ENABLE - if (rgblight_config.enable) { - i2c_init(); - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); - } -#endif - // call user level keymaps, if any - matrix_init_user(); -} - -void matrix_scan_kb(void) { -#ifdef RGBLIGHT_ENABLE - rgblight_task(); -#endif - matrix_scan_user(); - /* Nothing else for now. */ -} - -__attribute__ ((weak)) -void matrix_scan_user(void) { -} +#include "pearl.h" void backlight_init_ports(void) { // initialize pins D0, D1, D4 and D6 as output @@ -74,17 +32,17 @@ void backlight_init_ports(void) { } void backlight_set(uint8_t level) { - if (level == 0) { + if (level == 0) { // turn backlight LEDs off writePinLow(D0); writePinLow(D1); writePinLow(D4); writePinLow(D6); - } else { + } else { // turn backlight LEDs on writePinHigh(D0); writePinHigh(D1); writePinHigh(D4); writePinHigh(D6); - } -} \ No newline at end of file + } +} diff --git a/keyboards/pearl/rules.mk b/keyboards/pearl/rules.mk index eacf8bb2c3d4..79b783e42136 100644 --- a/keyboards/pearl/rules.mk +++ b/keyboards/pearl/rules.mk @@ -1,18 +1,3 @@ -# Copyright 2017 Luiz Ribeiro -# -# 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 . - # MCU name MCU = atmega32a @@ -34,9 +19,6 @@ CONSOLE_ENABLE = yes COMMAND_ENABLE = yes BACKLIGHT_ENABLE = yes RGBLIGHT_ENABLE = yes -RGBLIGHT_CUSTOM_DRIVER = yes +WS2812_DRIVER = i2c OPT_DEFS = -DDEBUG_LEVEL=0 - -# custom matrix setup -SRC = i2c_master.c diff --git a/keyboards/percent/skog_lite/rules.mk b/keyboards/percent/skog_lite/rules.mk index ed29c47f2c26..1d2372c77fcd 100644 --- a/keyboards/percent/skog_lite/rules.mk +++ b/keyboards/percent/skog_lite/rules.mk @@ -1,18 +1,3 @@ -# Copyright 2017 Luiz Ribeiro -# -# 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 . - # MCU name MCU = atmega32a @@ -34,10 +19,8 @@ CONSOLE_ENABLE = yes COMMAND_ENABLE = yes BACKLIGHT_ENABLE = yes RGBLIGHT_ENABLE = yes -RGBLIGHT_CUSTOM_DRIVER = yes +WS2812_DRIVER = i2c OPT_DEFS = -DDEBUG_LEVEL=0 -SRC = i2c_master.c - LAYOUTS = tkl_ansi diff --git a/keyboards/percent/skog_lite/skog_lite.c b/keyboards/percent/skog_lite/skog_lite.c index a77fc925868d..a6c00f52931f 100644 --- a/keyboards/percent/skog_lite/skog_lite.c +++ b/keyboards/percent/skog_lite/skog_lite.c @@ -13,49 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "rgblight.h" -#include "i2c_master.h" -#include "quantum.h" -#ifdef RGBLIGHT_ENABLE -extern rgblight_config_t rgblight_config; - -void rgblight_set(void) { - if (!rgblight_config.enable) { - for (uint8_t i = 0; i < RGBLED_NUM; i++) { - led[i].r = 0; - led[i].g = 0; - led[i].b = 0; - } - } - - i2c_init(); - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); -} -#endif - -void matrix_init_kb(void) { -#ifdef RGBLIGHT_ENABLE - if (rgblight_config.enable) { - i2c_init(); - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); - } -#endif - // call user level keymaps, if any - matrix_init_user(); -} - -void matrix_scan_kb(void) { -#ifdef RGBLIGHT_ENABLE - rgblight_task(); -#endif - matrix_scan_user(); - /* Nothing else for now. */ -} - -__attribute__ ((weak)) -void matrix_scan_user(void) { -} +#include "skog_lite.h" void backlight_init_ports(void) { // initialize pins D0, D1, D4 and D6 as output @@ -72,17 +31,17 @@ void backlight_init_ports(void) { } void backlight_set(uint8_t level) { - if (level == 0) { + if (level == 0) { // turn backlight LEDs off writePinLow(D0); writePinLow(D1); writePinLow(D4); writePinLow(D6); - } else { + } else { // turn backlight LEDs on writePinHigh(D0); writePinHigh(D1); writePinHigh(D4); writePinHigh(D6); - } + } } diff --git a/keyboards/singa/rules.mk b/keyboards/singa/rules.mk index df2a59e905b4..54328d248d13 100644 --- a/keyboards/singa/rules.mk +++ b/keyboards/singa/rules.mk @@ -1,18 +1,3 @@ -# Copyright 2017 Luiz Ribeiro -# -# 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 . - # MCU name MCU = atmega32a @@ -34,8 +19,6 @@ CONSOLE_ENABLE = yes COMMAND_ENABLE = yes BACKLIGHT_ENABLE = yes RGBLIGHT_ENABLE = yes -RGBLIGHT_CUSTOM_DRIVER = yes +WS2812_DRIVER = i2c OPT_DEFS = -DDEBUG_LEVEL=0 - -SRC = i2c_master.c diff --git a/keyboards/singa/singa.c b/keyboards/singa/singa.c index ee49ba65c100..144065d02953 100644 --- a/keyboards/singa/singa.c +++ b/keyboards/singa/singa.c @@ -13,49 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "rgblight.h" -#include "i2c_master.h" -#include "quantum.h" -#ifdef RGBLIGHT_ENABLE -extern rgblight_config_t rgblight_config; - -void rgblight_set(void) { - if (!rgblight_config.enable) { - for (uint8_t i = 0; i < RGBLED_NUM; i++) { - led[i].r = 0; - led[i].g = 0; - led[i].b = 0; - } - } - - i2c_init(); - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); -} -#endif - -void matrix_init_kb(void) { -#ifdef RGBLIGHT_ENABLE - if (rgblight_config.enable) { - i2c_init(); - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); - } -#endif - // call user level keymaps, if any - matrix_init_user(); -} - -void matrix_scan_kb(void) { -#ifdef RGBLIGHT_ENABLE - rgblight_task(); -#endif - matrix_scan_user(); - /* Nothing else for now. */ -} - -__attribute__ ((weak)) -void matrix_scan_user(void) { -} +#include "singa.h" void backlight_init_ports(void) { // initialize pins D0, D1, D4 and D6 as output @@ -72,17 +31,17 @@ void backlight_init_ports(void) { } void backlight_set(uint8_t level) { - if (level == 0) { + if (level == 0) { // turn backlight LEDs off writePinLow(D0); writePinLow(D1); writePinLow(D4); writePinLow(D6); - } else { + } else { // turn backlight LEDs on writePinHigh(D0); writePinHigh(D1); writePinHigh(D4); writePinHigh(D6); - } + } } diff --git a/keyboards/tgr/alice/alice.c b/keyboards/tgr/alice/alice.c index adb88fef0a88..39aed2cf5676 100644 --- a/keyboards/tgr/alice/alice.c +++ b/keyboards/tgr/alice/alice.c @@ -15,41 +15,4 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include - -#include "rgblight.h" - -#include "i2c_master.h" -#include "quantum.h" - -#ifdef RGBLIGHT_ENABLE -extern rgblight_config_t rgblight_config; - -void matrix_init_kb(void) { - i2c_init(); - // call user level keymaps, if any - matrix_init_user(); -} - -// custom RGB driver -void rgblight_set(void) { - if (!rgblight_config.enable) { - memset(led, 0, 3 * RGBLED_NUM); - } - - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); -} - -bool rgb_init = false; - -void matrix_scan_kb(void) { - // if LEDs were previously on before poweroff, turn them back on - if (rgb_init == false && rgblight_config.enable) { - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); - rgb_init = true; - } - - rgblight_task(); - matrix_scan_user(); -} -#endif +#include "alice.h" diff --git a/keyboards/tgr/alice/rules.mk b/keyboards/tgr/alice/rules.mk index aa141f7c3b59..530e8ea32979 100644 --- a/keyboards/tgr/alice/rules.mk +++ b/keyboards/tgr/alice/rules.mk @@ -1,18 +1,3 @@ -# Copyright 2017 Luiz Ribeiro -# -# 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 . - # MCU name MCU = atmega32a @@ -34,8 +19,6 @@ CONSOLE_ENABLE = yes COMMAND_ENABLE = yes BACKLIGHT_ENABLE = no RGBLIGHT_ENABLE = yes -RGBLIGHT_CUSTOM_DRIVER = yes +WS2812_DRIVER = i2c OPT_DEFS = -DDEBUG_LEVEL=0 - -SRC += i2c_master.c diff --git a/keyboards/tgr/jane/jane.c b/keyboards/tgr/jane/jane.c index c17cb008486f..4ab0b300735e 100644 --- a/keyboards/tgr/jane/jane.c +++ b/keyboards/tgr/jane/jane.c @@ -13,49 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "i2c_master.h" -#include "quantum.h" -#ifdef RGBLIGHT_ENABLE -#include "rgblight.h" -extern rgblight_config_t rgblight_config; - -void rgblight_set(void) { - if (!rgblight_config.enable) { - for (uint8_t i = 0; i < RGBLED_NUM; i++) { - led[i].r = 0; - led[i].g = 0; - led[i].b = 0; - } - } - - i2c_init(); - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); -} -#endif - -void matrix_init_kb(void) { -#ifdef RGBLIGHT_ENABLE - if (rgblight_config.enable) { - i2c_init(); - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); - } -#endif - // call user level keymaps, if any - matrix_init_user(); -} - -void matrix_scan_kb(void) { -#ifdef RGBLIGHT_ENABLE - rgblight_task(); -#endif - matrix_scan_user(); - /* Nothing else for now. */ -} - -__attribute__ ((weak)) -void matrix_scan_user(void) { -} +#include "jane.h" void backlight_init_ports(void) { // initialize pins D0, D1, D4 and D6 as output @@ -72,17 +31,17 @@ void backlight_init_ports(void) { } void backlight_set(uint8_t level) { - if (level == 0) { + if (level == 0) { // turn backlight LEDs off writePinLow(D0); writePinLow(D1); writePinLow(D4); writePinLow(D6); - } else { + } else { // turn backlight LEDs on writePinHigh(D0); writePinHigh(D1); writePinHigh(D4); writePinHigh(D6); - } -} \ No newline at end of file + } +} diff --git a/keyboards/tgr/jane/rules.mk b/keyboards/tgr/jane/rules.mk index f2b4883066d3..c6a26d4a40b8 100644 --- a/keyboards/tgr/jane/rules.mk +++ b/keyboards/tgr/jane/rules.mk @@ -1,18 +1,3 @@ -# Copyright 2017 Luiz Ribeiro -# -# 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 . - # MCU name MCU = atmega32a @@ -34,10 +19,8 @@ CONSOLE_ENABLE = yes COMMAND_ENABLE = yes BACKLIGHT_ENABLE = yes RGBLIGHT_ENABLE = no -RGBLIGHT_CUSTOM_DRIVER = no +WS2812_DRIVER = i2c OPT_DEFS = -DDEBUG_LEVEL=0 -QUANTUM_LIB_SRC = i2c_master.c - LAYOUTS = tkl_ansi tkl_iso diff --git a/keyboards/unikorn/readme.md b/keyboards/unikorn/readme.md index 3175cddc2ded..1f8b16d649b7 100644 --- a/keyboards/unikorn/readme.md +++ b/keyboards/unikorn/readme.md @@ -18,7 +18,6 @@ To enable RGB lighting support, install the necessary components and set RGBLIGH ``` RGBLIGHT_ENABLE = yes -RGBLIGHT_CUSTOM_DRIVER = yes ``` diff --git a/keyboards/unikorn/rules.mk b/keyboards/unikorn/rules.mk index d4f4d2aaf308..e57c21c856bb 100644 --- a/keyboards/unikorn/rules.mk +++ b/keyboards/unikorn/rules.mk @@ -1,18 +1,3 @@ -# Copyright 2017 Luiz Ribeiro -# -# 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 . - # MCU name MCU = atmega32a @@ -34,8 +19,6 @@ CONSOLE_ENABLE = yes COMMAND_ENABLE = yes BACKLIGHT_ENABLE = yes RGBLIGHT_ENABLE = no -RGBLIGHT_CUSTOM_DRIVER = no +WS2812_DRIVER = i2c OPT_DEFS = -DDEBUG_LEVEL=0 - -SRC = i2c_master.c diff --git a/keyboards/unikorn/unikorn.c b/keyboards/unikorn/unikorn.c index 1bd47ef9e1af..70bc5a988f43 100644 --- a/keyboards/unikorn/unikorn.c +++ b/keyboards/unikorn/unikorn.c @@ -14,49 +14,7 @@ * along with this program. If not, see . */ -#include "i2c_master.h" -#include "quantum.h" - -#ifdef RGBLIGHT_ENABLE -#include "rgblight.h" -extern rgblight_config_t rgblight_config; - -void rgblight_set(void) { - if (!rgblight_config.enable) { - for (uint8_t i = 0; i < RGBLED_NUM; i++) { - led[i].r = 0; - led[i].g = 0; - led[i].b = 0; - } - } - - i2c_init(); - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); -} -#endif - -void matrix_init_kb(void) { -#ifdef RGBLIGHT_ENABLE - if (rgblight_config.enable) { - i2c_init(); - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); - } -#endif - // call user level keymaps, if any - matrix_init_user(); -} - -void matrix_scan_kb(void) { -#ifdef RGBLIGHT_ENABLE - rgblight_task(); -#endif - matrix_scan_user(); - /* Nothing else for now. */ -} - -__attribute__ ((weak)) -void matrix_scan_user(void) { -} +#include "unikorn.h" void backlight_init_ports(void) { // initialize pins D0, D1, D4 and D6 as output @@ -73,17 +31,17 @@ void backlight_init_ports(void) { } void backlight_set(uint8_t level) { - if (level == 0) { + if (level == 0) { // turn backlight LEDs off writePinLow(D0); writePinLow(D1); writePinLow(D4); writePinLow(D6); - } else { + } else { // turn backlight LEDs on writePinHigh(D0); writePinHigh(D1); writePinHigh(D4); writePinHigh(D6); - } + } } diff --git a/keyboards/winkeyless/bface/bface.c b/keyboards/winkeyless/bface/bface.c index 1c83be4b8d57..8cb5b600cdd7 100644 --- a/keyboards/winkeyless/bface/bface.c +++ b/keyboards/winkeyless/bface/bface.c @@ -13,49 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "rgblight.h" -#include "i2c_master.h" -#include "quantum.h" -#ifdef RGBLIGHT_ENABLE -extern rgblight_config_t rgblight_config; - -void rgblight_set(void) { - if (!rgblight_config.enable) { - for (uint8_t i = 0; i < RGBLED_NUM; i++) { - led[i].r = 0; - led[i].g = 0; - led[i].b = 0; - } - } - - i2c_init(); - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); -} -#endif - -void matrix_init_kb(void) { -#ifdef RGBLIGHT_ENABLE - if (rgblight_config.enable) { - i2c_init(); - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); - } -#endif - // call user level keymaps, if any - matrix_init_user(); -} - -void matrix_scan_kb(void) { -#ifdef RGBLIGHT_ENABLE - rgblight_task(); -#endif - matrix_scan_user(); - /* Nothing else for now. */ -} - -__attribute__ ((weak)) -void matrix_scan_user(void) { -} +#include "bface.h" void backlight_init_ports(void) { // initialize pins D0, D1, D4 and D6 as output @@ -72,17 +31,17 @@ void backlight_init_ports(void) { } void backlight_set(uint8_t level) { - if (level == 0) { + if (level == 0) { // turn backlight LEDs off writePinLow(D0); writePinLow(D1); writePinLow(D4); writePinLow(D6); - } else { + } else { // turn backlight LEDs on writePinHigh(D0); writePinHigh(D1); writePinHigh(D4); writePinHigh(D6); - } + } } diff --git a/keyboards/winkeyless/bface/bface.h b/keyboards/winkeyless/bface/bface.h index f7a3b9521f48..bca0c24c1afb 100644 --- a/keyboards/winkeyless/bface/bface.h +++ b/keyboards/winkeyless/bface/bface.h @@ -18,9 +18,7 @@ along with this program. If not, see . #pragma once -#include "quantum_keycodes.h" -#include "keycode.h" -#include "action.h" +#include "quantum.h" #define LAYOUT_60_ansi( \ K04, K14, K24, K34, K44, K54, K16, KB6, KB7, K17, KA4, KB4, KC4, KE4, \ diff --git a/keyboards/winkeyless/bface/rules.mk b/keyboards/winkeyless/bface/rules.mk index 12b502785584..506e37ac9c02 100644 --- a/keyboards/winkeyless/bface/rules.mk +++ b/keyboards/winkeyless/bface/rules.mk @@ -1,18 +1,3 @@ -# Copyright 2017 Luiz Ribeiro -# -# 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 . - # MCU name MCU = atmega32a @@ -36,9 +21,6 @@ BACKLIGHT_ENABLE = yes BACKLIGHT_CUSTOM_DRIVER = yes BACKLIGHT_BREATHING = no RGBLIGHT_ENABLE = yes -RGBLIGHT_CUSTOM_DRIVER = yes +WS2812_DRIVER = i2c OPT_DEFS = -DDEBUG_LEVEL=0 - -# custom matrix setup -SRC = i2c_master.c From d382eeeb9d3b795c16533c5f64ab1455e774f925 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Tue, 5 Nov 2019 00:18:57 +0000 Subject: [PATCH 271/316] CI - Fix change detection (#7038) * Fix travis change detection * Fix travis change detection - add back python ignore --- .travis.yml | 1 + util/travis_build.sh | 79 +++++++++++++++--------------------- util/travis_compiled_push.sh | 1 + util/travis_docs.sh | 1 + util/travis_push.sh | 5 --- util/travis_test.sh | 27 +++--------- util/travis_utils.sh | 24 +++++++++++ 7 files changed, 64 insertions(+), 74 deletions(-) create mode 100755 util/travis_utils.sh diff --git a/.travis.yml b/.travis.yml index 84fa63faf3d3..bfac998c11ed 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,6 +16,7 @@ install: - npm install -g moxygen script: - git rev-parse --short HEAD + - git diff --name-only HEAD $TRAVIS_BRANCH - bash util/travis_test.sh - bash util/travis_build.sh - bash util/travis_docs.sh diff --git a/util/travis_build.sh b/util/travis_build.sh index 225c8548f525..6d5dbed6843d 100755 --- a/util/travis_build.sh +++ b/util/travis_build.sh @@ -1,57 +1,42 @@ #!/bin/bash -# if docker is installed - patch calls to within the qmk docker image -if command -v docker >/dev/null; then - function make() { - docker run --rm -e MAKEFLAGS="$MAKEFLAGS" -w /qmk_firmware/ -v "$PWD":/qmk_firmware --user $(id -u):$(id -g) qmkfm/base_container make "$@" - } +source util/travis_utils.sh + +NUM_CORE_CHANGES=$(echo "$QMK_CHANGES" | grep -Ecv -e '^(docs/)' -e '^(keyboards/)' -e '^(layouts/)' -e '^(util/)' -e '^(lib/python/)' -e '^(bin/qmk)' -e '^(requirements.txt)' -e '(.travis.yml)') + +if [[ "$TRAVIS_COMMIT_MESSAGE" == *"[skip build]"* ]]; then + echo "Skipping due to commit message" + exit 0 fi -# test force push -#TRAVIS_COMMIT_RANGE="c287f1bfc5c8...81f62atc4c1d" +if [ "$LOCAL_BRANCH" == "master" ] || [ "$NUM_CORE_CHANGES" != "0" ]; then + echo "Making default keymaps for all keyboards" + make all:default + exit $? +fi -TRAVIS_COMMIT_MESSAGE="${TRAVIS_COMMIT_MESSAGE:-none}" -TRAVIS_COMMIT_RANGE="${TRAVIS_COMMIT_RANGE:-HEAD~1..HEAD}" -MAKE_ALL="make all:default" +exit_code=0 -if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then - exit_code=0 - git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} - if [ $? -eq 128 ]; then - # We don't know what changed so just build the default keymaps - echo "Making default keymaps for all keyboards (fallback)" - eval $MAKE_ALL +for KB in $(make list-keyboards); do + KEYBOARD_CHANGES=$(echo "$QMK_CHANGES" | grep -E '^(keyboards/'${KB}'/)') + if [[ -z "$KEYBOARD_CHANGES" ]]; then + # skip as no changes for this keyboard + continue + fi + + KEYMAP_ONLY=$(echo "$KEYBOARD_CHANGES" | grep -cv /keymaps/) + if [[ $KEYMAP_ONLY -gt 0 ]]; then + echo "Making all keymaps for $KB" + make ${KB}:all : $((exit_code = $exit_code + $?)) else - NEFM=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -Ev '^(keyboards/)' | grep -Ev '^(docs/)' | grep -Ev '^(lib/python/)' | grep -Ev '^(bin/qmk)' | grep -Ev '^(requirements.txt)' | grep -Ev '^(util/)' | wc -l) - BRANCH=$(git rev-parse --abbrev-ref HEAD) - # is this branch master or a "non docs, non keyboards" change - if [ $NEFM -gt 0 -o "$BRANCH" = "master" ]; then - echo "Making default keymaps for all keyboards" - eval $MAKE_ALL + CHANGED_KEYMAPS=$(echo "$KEYBOARD_CHANGES" | grep -oP '(?<=keyboards/'${KB}'/keymaps/)([a-zA-Z0-9_-]+)(?=\/)') + for KM in $CHANGED_KEYMAPS ; do + echo "Making $KM for $KB" + make ${KB}:${KM} : $((exit_code = $exit_code + $?)) - else - # keyboards project format - # /keyboards/board1/rev/keymaps/ - # /keyboards/board2/keymaps/ - # ensure we strip everything off after and including the keymaps folder to get board and/or revision - MKB=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -oP '(?<=keyboards\/)([a-zA-Z0-9_\/]+)(?=\/)' | sed 's^/keymaps/.*^^' | sort -u) - for KB in $MKB ; do - KEYMAP_ONLY=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -Ev '^(keyboards/'${KB}'/keymaps/)' | wc -l) - if [[ $KEYMAP_ONLY -gt 0 ]]; then - echo "Making all keymaps for $KB" - make ${KB}:all - : $((exit_code = $exit_code + $?)) - else - MKM=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -oP '(?<=keyboards/'${KB}'/keymaps/)([a-zA-Z0-9_]+)(?=\/)' | sort -u) - for KM in $MKM ; do - echo "Making $KM for $KB" - make ${KB}:${KM} - : $((exit_code = $exit_code + $?)) - done - fi - done - fi + done fi - exit $exit_code -fi +done + +exit $exit_code diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh index 8ca65f21a05d..e0490cd702a9 100755 --- a/util/travis_compiled_push.sh +++ b/util/travis_compiled_push.sh @@ -1,5 +1,6 @@ #!/bin/bash +source util/travis_utils.sh source util/travis_push.sh set -o errexit -o nounset diff --git a/util/travis_docs.sh b/util/travis_docs.sh index 5cfd63466d22..93c2d7186729 100755 --- a/util/travis_docs.sh +++ b/util/travis_docs.sh @@ -1,5 +1,6 @@ #!/bin/bash +source util/travis_utils.sh source util/travis_push.sh if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip docs]"* ]] ; then diff --git a/util/travis_push.sh b/util/travis_push.sh index d100f9d48f7a..7f7d4c2c647d 100755 --- a/util/travis_push.sh +++ b/util/travis_push.sh @@ -1,10 +1,5 @@ # Use this by sourcing it in your script. -TRAVIS_BRANCH="${TRAVIS_BRANCH:master}" -TRAVIS_PULL_REQUEST="${TRAVIS_PULL_REQUEST:false}" -TRAVIS_COMMIT_MESSAGE="${TRAVIS_COMMIT_MESSAGE:-none}" -TRAVIS_COMMIT_RANGE="${TRAVIS_COMMIT_RANGE:-HEAD~1..HEAD}" - if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]] ; then git config --global user.name "QMK Bot" git config --global user.email "hello@qmk.fm" diff --git a/util/travis_test.sh b/util/travis_test.sh index 9b7402c28241..95991907ef35 100644 --- a/util/travis_test.sh +++ b/util/travis_test.sh @@ -1,26 +1,9 @@ #!/bin/bash -# if docker is installed - patch calls to within the qmk docker image -if command -v docker >/dev/null; then - function make() { - docker run --rm -e MAKEFLAGS="$MAKEFLAGS" -w /qmk_firmware/ -v "$PWD":/qmk_firmware --user $(id -u):$(id -g) qmkfm/base_container make "$@" - } - function qmk() { - docker run --rm -w /qmk_firmware/ -v "$PWD":/qmk_firmware --user $(id -u):$(id -g) qmkfm/base_container bin/qmk "$@" - } -fi - -TRAVIS_COMMIT_MESSAGE="${TRAVIS_COMMIT_MESSAGE:-none}" -TRAVIS_COMMIT_RANGE="${TRAVIS_COMMIT_RANGE:-HEAD~1..HEAD}" - -# test force push -#TRAVIS_COMMIT_RANGE="c287f1bfc5c8...81f62atc4c1d" - -BRANCH=$(git rev-parse --abbrev-ref HEAD) -CHANGES=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE}) +source util/travis_utils.sh -NUM_CORE_CHANGES=$(echo "$CHANGES" | grep -Ecv -e '^(docs/)' -e '^(keyboards/)' -e '^(layouts/)') -NUM_PY_CHANGES=$(echo "$CHANGES" | grep -Ec -e '^(lib/python/)' -e '^(bin/qmk)') +NUM_CORE_CHANGES=$(echo "$QMK_CHANGES" | grep -Ecv -e '^(docs/)' -e '^(keyboards/)' -e '^(layouts/)' -e '^(util/)' -e '^(lib/python/)' -e '^(bin/qmk)' -e '^(requirements.txt)' -e '(.travis.yml)') +NUM_PY_CHANGES=$(echo "$QMK_CHANGES" | grep -Ec -e '^(lib/python/)' -e '^(bin/qmk)') if [[ "$TRAVIS_COMMIT_MESSAGE" == *"[skip test]"* ]]; then echo "Skipping due to commit message" @@ -29,14 +12,14 @@ fi exit_code=0 -if [ "$BRANCH" == "master" ] || [ "$NUM_CORE_CHANGES" != "0" ]; then +if [ "$LOCAL_BRANCH" == "master" ] || [ "$NUM_CORE_CHANGES" != "0" ]; then echo "Running tests." make test:all : $((exit_code = $exit_code + $?)) fi -if [ "$BRANCH" == "master" ] || [ "$NUM_PY_CHANGES" != "0" ]; then +if [ "$LOCAL_BRANCH" == "master" ] || [ "$NUM_PY_CHANGES" != "0" ]; then echo "Running python tests." qmk pytest : $((exit_code = $exit_code + $?)) diff --git a/util/travis_utils.sh b/util/travis_utils.sh new file mode 100755 index 000000000000..031bcda1a82c --- /dev/null +++ b/util/travis_utils.sh @@ -0,0 +1,24 @@ +# Use this by sourcing it in your script. + +# Provide sane defaults for travis environment +TRAVIS_BRANCH="${TRAVIS_BRANCH:master}" +TRAVIS_PULL_REQUEST="${TRAVIS_PULL_REQUEST:false}" +TRAVIS_COMMIT_MESSAGE="${TRAVIS_COMMIT_MESSAGE:-none}" +TRAVIS_COMMIT_RANGE="${TRAVIS_COMMIT_RANGE:-HEAD~1..HEAD}" + +# test force push +#TRAVIS_COMMIT_RANGE="c287f1bfc5c8...81f62atc4c1d" + +# Extra variables +LOCAL_BRANCH=${TRAVIS_PULL_REQUEST_BRANCH:-${TRAVIS_BRANCH}} +QMK_CHANGES=$(git diff --name-only HEAD ${TRAVIS_BRANCH}) + +# if docker is installed - patch calls to within the qmk docker image +if command -v docker >/dev/null; then + function make() { + docker run --rm -e MAKEFLAGS="$MAKEFLAGS" -w /qmk_firmware/ -v "$PWD":/qmk_firmware --user $(id -u):$(id -g) qmkfm/base_container make "$@" + } + function qmk() { + docker run --rm -w /qmk_firmware/ -v "$PWD":/qmk_firmware --user $(id -u):$(id -g) qmkfm/base_container bin/qmk "$@" + } +fi From 0e664f92c4d61d685259607d7257c53f60da5fc0 Mon Sep 17 00:00:00 2001 From: Jonathan Rascher Date: Tue, 5 Nov 2019 00:37:54 -0600 Subject: [PATCH 272/316] Switch Quefrency to serial for independent halves (#7262) --- keyboards/keebio/quefrency/keymaps/bcat/config.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/keyboards/keebio/quefrency/keymaps/bcat/config.h b/keyboards/keebio/quefrency/keymaps/bcat/config.h index 87eaa6a7837f..071856f10b2c 100644 --- a/keyboards/keebio/quefrency/keymaps/bcat/config.h +++ b/keyboards/keebio/quefrency/keymaps/bcat/config.h @@ -1,6 +1,12 @@ #pragma once -#define USE_I2C +/* + * Quefrency lacks I2C resistors on the right PCB, so the right half doesn't + * work independently. (Presumably the floating I2C lines cause a problem.) + * Using serial seems sufficiently fast in practice and allows both halves to + * be used independently. + */ +#define USE_SERIAL /* Use an extra LED on the right side since it's wider on the 65% PCB. */ #undef RGBLED_NUM From 542cb0a8ce3f324c6bd46751d733daf86384a8f6 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Mon, 4 Nov 2019 22:59:13 -0800 Subject: [PATCH 273/316] [Core] Convert Dynamic Macro to a Core Feature (#5948) * Convert Dynamic Macro to a Core Feature This imports the code from Dynamic Macro into the core code, and handles it, as such. This deprecates the old method but does not remove it, for legacy support. This way, no existing user files need to be touched. Additionally, this reorganizes the documentation to better reflect the changes. Also, it adds user hooks to the feature so users can customize the existing functionality. Based heavily on and closes #2976 * Apply suggestions from code review Co-Authored-By: fauxpark Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Cleanup based on feedback * Add short-form keycodes and document them - add short-form keycodes to quantum/quantum_keycodes.h - document the new aliases in docs/feature_dynamic_macros.md * Add Dynamic Macros section and keycodes to docs/keycodes.md * Make anti-nesting optional * Add documentation for DYNAMIC_MACRO_NO_NESTING option * Fix Merge artifacts * Fix formatting typo in docs Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Remove DYNAMIC_MACRO_RANGE as it's not needed * Fix includes and layer var type --- common_features.mk | 6 +- docs/feature_dynamic_macros.md | 75 ++--- docs/keycodes.md | 10 + quantum/dynamic_macro.h | 20 +- .../process_keycode/process_dynamic_macro.c | 257 ++++++++++++++++++ .../process_keycode/process_dynamic_macro.h | 41 +++ quantum/quantum.c | 14 +- quantum/quantum.h | 4 + quantum/quantum_keycodes.h | 16 +- 9 files changed, 384 insertions(+), 59 deletions(-) create mode 100644 quantum/process_keycode/process_dynamic_macro.c create mode 100644 quantum/process_keycode/process_dynamic_macro.h diff --git a/common_features.mk b/common_features.mk index a1f95955a60c..e50207b0b4b5 100644 --- a/common_features.mk +++ b/common_features.mk @@ -407,8 +407,12 @@ ifeq ($(strip $(SPACE_CADET_ENABLE)), yes) OPT_DEFS += -DSPACE_CADET_ENABLE endif - ifeq ($(strip $(DIP_SWITCH_ENABLE)), yes) SRC += $(QUANTUM_DIR)/dip_switch.c OPT_DEFS += -DDIP_SWITCH_ENABLE endif + +ifeq ($(strip $(DYNAMIC_MACRO_ENABLE)), yes) + SRC += $(QUANTUM_DIR)/process_keycode/process_dynamic_macro.c + OPT_DEFS += -DDYNAMIC_MACRO_ENABLE +endif diff --git a/docs/feature_dynamic_macros.md b/docs/feature_dynamic_macros.md index 0d11a28641a6..b86df6c60ffe 100644 --- a/docs/feature_dynamic_macros.md +++ b/docs/feature_dynamic_macros.md @@ -4,51 +4,45 @@ QMK supports temporary macros created on the fly. We call these Dynamic Macros. You can store one or two macros and they may have a combined total of 128 keypresses. You can increase this size at the cost of RAM. -To enable them, first add a new element to the end of your `keycodes` enum — `DYNAMIC_MACRO_RANGE`: +To enable them, first include `DYNAMIC_MACRO_ENABLE = yes` in your `rules.mk`. Then, add the following keys to your keymap: -```c -enum keycodes { - QWERTY = SAFE_RANGE, - COLEMAK, - DVORAK, - PLOVER, - LOWER, - RAISE, - BACKLIT, - EXT_PLV, - DYNAMIC_MACRO_RANGE, -}; -``` +|Key |Alias |Description | +|------------------|----------|---------------------------------------------------| +|`DYN_REC_START1` |`DM_REC1` |Start recording Macro 1 | +|`DYN_REC_START2` |`DM_REC2` |Start recording Macro 2 | +|`DYN_MACRO_PLAY1` |`DM_PLY1` |Replay Macro 1 | +|`DYN_MACRO_PLAY2` |`DM_PLY2` |Replay Macro 2 | +|`DYN_REC_STOP` |`DM_RSTP` |Finish the macro that is currently being recorded. | -Your `keycodes` enum may have a slightly different name. You must add `DYNAMIC_MACRO_RANGE` as the last element because `dynamic_macros.h` will add some more keycodes after it. +That should be everything necessary. -Below it, include the `dynamic_macro.h` header: +To start recording the macro, press either `DYN_REC_START1` or `DYN_REC_START2`. -```c - #include "dynamic_macro.h"` -``` +To finish the recording, press the `DYN_REC_STOP` layer button. -Add the following keys to your keymap: +To replay the macro, press either `DYN_MACRO_PLAY1` or `DYN_MACRO_PLAY2`. -* `DYN_REC_START1` — start recording the macro 1, -* `DYN_REC_START2` — start recording the macro 2, -* `DYN_MACRO_PLAY1` — replay the macro 1, -* `DYN_MACRO_PLAY2` — replay the macro 2, -* `DYN_REC_STOP` — finish the macro that is currently being recorded. +It is possible to replay a macro as part of a macro. It's ok to replay macro 2 while recording macro 1 and vice versa but never create recursive macros i.e. macro 1 that replays macro 1. If you do so and the keyboard will get unresponsive, unplug the keyboard and plug it again. You can disable this completly by defining `DYNAMIC_MACRO_NO_NESTING` in your `config.h` file. -Add the following code to the very beginning of your `process_record_user()` function: +?> For the details about the internals of the dynamic macros, please read the comments in the `process_dynamic_macro.h` and `process_dynamic_macro.c` files. -```c - if (!process_record_dynamic_macro(keycode, record)) { - return false; - } -``` +## Customization -That should be everything necessary. To start recording the macro, press either `DYN_REC_START1` or `DYN_REC_START2`. To finish the recording, press the `DYN_REC_STOP` layer button. To replay the macro, press either `DYN_MACRO_PLAY1` or `DYN_MACRO_PLAY2`. +There are a number of options added that should allow some additional degree of customization -Note that it's possible to replay a macro as part of a macro. It's ok to replay macro 2 while recording macro 1 and vice versa but never create recursive macros i.e. macro 1 that replays macro 1. If you do so and the keyboard will get unresponsive, unplug the keyboard and plug it again. +|Define |Default |Description | +|----------------------------|----------------|-----------------------------------------------------------------------------------------------------------------| +|`DYNAMIC_MACRO_SIZE` |128 |Sets the amount of memory that Dynamic Macros can use. This is a limited resource, dependent on the controller. | +|`DYNAMIC_MACRO_USER_CALL` |*Not defined* |Defining this falls back to using the user `keymap.c` file to trigger the macro behavior. | +|`DYNAMIC_MACRO_NO_NESTING` |*Not Defined* |Defining this disables the ability to call a macro from another macro (nested macros). | -For users of the earlier versions of dynamic macros: It is still possible to finish the macro recording using just the layer modifier used to access the dynamic macro keys, without a dedicated `DYN_REC_STOP` key. If you want this behavior back, use the following snippet instead of the one above: + +If the LEDs start blinking during the recording with each keypress, it means there is no more space for the macro in the macro buffer. To fit the macro in, either make the other macro shorter (they share the same buffer) or increase the buffer size by adding the `DYNAMIC_MACRO_SIZE` define in your `config.h` (default value: 128; please read the comments for it in the header). + + +### DYNAMIC_MACRO_USER_CALL + +For users of the earlier versions of dynamic macros: It is still possible to finish the macro recording using just the layer modifier used to access the dynamic macro keys, without a dedicated `DYN_REC_STOP` key. If you want this behavior back, add `#define DYNAMIC_MACRO_USER_CALL` to your `config.h` and insert the following snippet at the beginning of your `process_record_user()` function: ```c uint16_t macro_kc = (keycode == MO(_DYN) ? DYN_REC_STOP : keycode); @@ -58,6 +52,15 @@ For users of the earlier versions of dynamic macros: It is still possible to fin } ``` -If the LEDs start blinking during the recording with each keypress, it means there is no more space for the macro in the macro buffer. To fit the macro in, either make the other macro shorter (they share the same buffer) or increase the buffer size by setting the `DYNAMIC_MACRO_SIZE` preprocessor macro (default value: 128; please read the comments for it in the header). +### User Hooks + +There are a number of hooks that you can use to add custom functionality and feedback options to Dynamic Macro feature. This allows for some additional degree of customization. + +Note, that direction indicates which macro it is, with `1` being Macro 1, `-1` being Macro 2, and 0 being no macro. + +* `dynamic_macro_record_start_user(void)` - Triggered when you start recording a macro. +* `dynamic_macro_play_user(int8_t direction)` - Triggered when you play back a macro. +* `dynamic_macro_record_key_user(int8_t direction, keyrecord_t *record)` - Triggered on each keypress while recording a macro. +* `dynamic_macro_record_end_user(int8_t direction)` - Triggered when the macro recording is stopped. -For the details about the internals of the dynamic macros, please read the comments in the `dynamic_macro.h` header. +Additionally, you can call `dynamic_macro_led_blink()` to flash the backlights if that feature is enabled. diff --git a/docs/keycodes.md b/docs/keycodes.md index 7dcff03fd549..fa01df63dca7 100644 --- a/docs/keycodes.md +++ b/docs/keycodes.md @@ -297,6 +297,16 @@ This is a reference only. Each group of keys links to the page documenting their |`OUT_USB` |USB only | |`OUT_BT` |Bluetooth only | +## [Dynamic Macros](feature_dynamic_macros.md) + +|Key |Alias |Description | +|-----------------|---------|--------------------------------------------------| +|`DYN_REC_START1` |`DM_REC1`|Start recording Macro 1 | +|`DYN_REC_START2` |`DM_REC2`|Start recording Macro 2 | +|`DYN_MACRO_PLAY1`|`DM_PLY1`|Replay Macro 1 | +|`DYN_MACRO_PLAY2`|`DM_PLY2`|Replay Macro 2 | +|`DYN_REC_STOP` |`DM_RSTP`|Finish the macro that is currently being recorded.| + ## [Layer Switching](feature_advanced_keycodes.md#switching-and-toggling-layers) |Key |Description | diff --git a/quantum/dynamic_macro.h b/quantum/dynamic_macro.h index c7632c004b1c..fe9de6fa6516 100644 --- a/quantum/dynamic_macro.h +++ b/quantum/dynamic_macro.h @@ -15,8 +15,10 @@ */ /* Author: Wojciech Siewierski < wojciech dot siewierski at onet dot pl > */ -#ifndef DYNAMIC_MACROS_H -#define DYNAMIC_MACROS_H +#pragma once + +/* Warn users that this is now deprecated and they should use the core feature instead. */ +#pragma message "Dynamic Macros is now a core feature. See updated documentation to see how to configure it: https://docs.qmk.fm/#/feature_dynamic_macros" #include "action_layer.h" @@ -33,18 +35,6 @@ # define DYNAMIC_MACRO_SIZE 128 #endif -/* DYNAMIC_MACRO_RANGE must be set as the last element of user's - * "planck_keycodes" enum prior to including this header. This allows - * us to 'extend' it. - */ -enum dynamic_macro_keycodes { - DYN_REC_START1 = DYNAMIC_MACRO_RANGE, - DYN_REC_START2, - DYN_REC_STOP, - DYN_MACRO_PLAY1, - DYN_MACRO_PLAY2, -}; - /* Blink the LEDs to notify the user about some event. */ void dynamic_macro_led_blink(void) { #ifdef BACKLIGHT_ENABLE @@ -272,5 +262,3 @@ bool process_record_dynamic_macro(uint16_t keycode, keyrecord_t *record) { #undef DYNAMIC_MACRO_CURRENT_SLOT #undef DYNAMIC_MACRO_CURRENT_LENGTH #undef DYNAMIC_MACRO_CURRENT_CAPACITY - -#endif diff --git a/quantum/process_keycode/process_dynamic_macro.c b/quantum/process_keycode/process_dynamic_macro.c new file mode 100644 index 000000000000..2065f242db9e --- /dev/null +++ b/quantum/process_keycode/process_dynamic_macro.c @@ -0,0 +1,257 @@ +/* Copyright 2016 Jack Humbert + * Copyright 2019 Drashna Jael're (@drashna, aka Christopher Courtney) + * + * 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 . + */ + +/* Author: Wojciech Siewierski < wojciech dot siewierski at onet dot pl > */ +#include "process_dynamic_macro.h" + +// default feedback method +void dynamic_macro_led_blink(void) { +#ifdef BACKLIGHT_ENABLE + backlight_toggle(); + wait_ms(100); + backlight_toggle(); +#endif +} + +/* User hooks for Dynamic Macros */ + +__attribute__((weak)) void dynamic_macro_record_start_user(void) { dynamic_macro_led_blink(); } + +__attribute__((weak)) void dynamic_macro_play_user(int8_t direction) { dynamic_macro_led_blink(); } + +__attribute__((weak)) void dynamic_macro_record_key_user(int8_t direction, keyrecord_t *record) { dynamic_macro_led_blink(); } + +__attribute__((weak)) void dynamic_macro_record_end_user(int8_t direction) { dynamic_macro_led_blink(); } + +/* Convenience macros used for retrieving the debug info. All of them + * need a `direction` variable accessible at the call site. + */ +#define DYNAMIC_MACRO_CURRENT_SLOT() (direction > 0 ? 1 : 2) +#define DYNAMIC_MACRO_CURRENT_LENGTH(BEGIN, POINTER) ((int)(direction * ((POINTER) - (BEGIN)))) +#define DYNAMIC_MACRO_CURRENT_CAPACITY(BEGIN, END2) ((int)(direction * ((END2) - (BEGIN)) + 1)) + +/** + * Start recording of the dynamic macro. + * + * @param[out] macro_pointer The new macro buffer iterator. + * @param[in] macro_buffer The macro buffer used to initialize macro_pointer. + */ +void dynamic_macro_record_start(keyrecord_t **macro_pointer, keyrecord_t *macro_buffer) { + dprintln("dynamic macro recording: started"); + + dynamic_macro_record_start_user(); + + clear_keyboard(); + layer_clear(); + *macro_pointer = macro_buffer; +} + +/** + * Play the dynamic macro. + * + * @param macro_buffer[in] The beginning of the macro buffer being played. + * @param macro_end[in] The element after the last macro buffer element. + * @param direction[in] Either +1 or -1, which way to iterate the buffer. + */ +void dynamic_macro_play(keyrecord_t *macro_buffer, keyrecord_t *macro_end, int8_t direction) { + dprintf("dynamic macro: slot %d playback\n", DYNAMIC_MACRO_CURRENT_SLOT()); + + layer_state_t saved_layer_state = layer_state; + + clear_keyboard(); + layer_clear(); + + while (macro_buffer != macro_end) { + process_record(macro_buffer); + macro_buffer += direction; + } + + clear_keyboard(); + + layer_state = saved_layer_state; + + dynamic_macro_play_user(direction); +} + +/** + * Record a single key in a dynamic macro. + * + * @param macro_buffer[in] The start of the used macro buffer. + * @param macro_pointer[in,out] The current buffer position. + * @param macro2_end[in] The end of the other macro. + * @param direction[in] Either +1 or -1, which way to iterate the buffer. + * @param record[in] The current keypress. + */ +void dynamic_macro_record_key(keyrecord_t *macro_buffer, keyrecord_t **macro_pointer, keyrecord_t *macro2_end, int8_t direction, keyrecord_t *record) { + /* If we've just started recording, ignore all the key releases. */ + if (!record->event.pressed && *macro_pointer == macro_buffer) { + dprintln("dynamic macro: ignoring a leading key-up event"); + return; + } + + /* The other end of the other macro is the last buffer element it + * is safe to use before overwriting the other macro. + */ + if (*macro_pointer - direction != macro2_end) { + **macro_pointer = *record; + *macro_pointer += direction; + } else { + dynamic_macro_record_key_user(direction, record); + } + + dprintf("dynamic macro: slot %d length: %d/%d\n", DYNAMIC_MACRO_CURRENT_SLOT(), DYNAMIC_MACRO_CURRENT_LENGTH(macro_buffer, *macro_pointer), DYNAMIC_MACRO_CURRENT_CAPACITY(macro_buffer, macro2_end)); +} + +/** + * End recording of the dynamic macro. Essentially just update the + * pointer to the end of the macro. + */ +void dynamic_macro_record_end(keyrecord_t *macro_buffer, keyrecord_t *macro_pointer, int8_t direction, keyrecord_t **macro_end) { + dynamic_macro_record_end_user(direction); + + /* Do not save the keys being held when stopping the recording, + * i.e. the keys used to access the layer DYN_REC_STOP is on. + */ + while (macro_pointer != macro_buffer && (macro_pointer - direction)->event.pressed) { + dprintln("dynamic macro: trimming a trailing key-down event"); + macro_pointer -= direction; + } + + dprintf("dynamic macro: slot %d saved, length: %d\n", DYNAMIC_MACRO_CURRENT_SLOT(), DYNAMIC_MACRO_CURRENT_LENGTH(macro_buffer, macro_pointer)); + + *macro_end = macro_pointer; +} + +/* Handle the key events related to the dynamic macros. Should be + * called from process_record_user() like this: + * + * bool process_record_user(uint16_t keycode, keyrecord_t *record) { + * if (!process_record_dynamic_macro(keycode, record)) { + * return false; + * } + * <...THE REST OF THE FUNCTION...> + * } + */ +bool process_dynamic_macro(uint16_t keycode, keyrecord_t *record) { + /* Both macros use the same buffer but read/write on different + * ends of it. + * + * Macro1 is written left-to-right starting from the beginning of + * the buffer. + * + * Macro2 is written right-to-left starting from the end of the + * buffer. + * + * ¯o_buffer macro_end + * v v + * +------------------------------------------------------------+ + * |>>>>>> MACRO1 >>>>>> <<<<<<<<<<<<< MACRO2 <<<<<<<<<<<<<| + * +------------------------------------------------------------+ + * ^ ^ + * r_macro_end r_macro_buffer + * + * During the recording when one macro encounters the end of the + * other macro, the recording is stopped. Apart from this, there + * are no arbitrary limits for the macros' length in relation to + * each other: for example one can either have two medium sized + * macros or one long macro and one short macro. Or even one empty + * and one using the whole buffer. + */ + static keyrecord_t macro_buffer[DYNAMIC_MACRO_SIZE]; + + /* Pointer to the first buffer element after the first macro. + * Initially points to the very beginning of the buffer since the + * macro is empty. */ + static keyrecord_t *macro_end = macro_buffer; + + /* The other end of the macro buffer. Serves as the beginning of + * the second macro. */ + static keyrecord_t *const r_macro_buffer = macro_buffer + DYNAMIC_MACRO_SIZE - 1; + + /* Like macro_end but for the second macro. */ + static keyrecord_t *r_macro_end = r_macro_buffer; + + /* A persistent pointer to the current macro position (iterator) + * used during the recording. */ + static keyrecord_t *macro_pointer = NULL; + + /* 0 - no macro is being recorded right now + * 1,2 - either macro 1 or 2 is being recorded */ + static uint8_t macro_id = 0; + + if (macro_id == 0) { + /* No macro recording in progress. */ + if (!record->event.pressed) { + switch (keycode) { + case DYN_REC_START1: + dynamic_macro_record_start(¯o_pointer, macro_buffer); + macro_id = 1; + return false; + case DYN_REC_START2: + dynamic_macro_record_start(¯o_pointer, r_macro_buffer); + macro_id = 2; + return false; + case DYN_MACRO_PLAY1: + dynamic_macro_play(macro_buffer, macro_end, +1); + return false; + case DYN_MACRO_PLAY2: + dynamic_macro_play(r_macro_buffer, r_macro_end, -1); + return false; + } + } + } else { + /* A macro is being recorded right now. */ + switch (keycode) { + case DYN_REC_STOP: + /* Stop the macro recording. */ + if (record->event.pressed) { /* Ignore the initial release + * just after the recoding + * starts. */ + switch (macro_id) { + case 1: + dynamic_macro_record_end(macro_buffer, macro_pointer, +1, ¯o_end); + break; + case 2: + dynamic_macro_record_end(r_macro_buffer, macro_pointer, -1, &r_macro_end); + break; + } + macro_id = 0; + } + return false; +#ifdef DYNAMIC_MACRO_NO_NESTING + case DYN_MACRO_PLAY1: + case DYN_MACRO_PLAY2: + dprintln("dynamic macro: ignoring macro play key while recording"); + return false; +#endif + default: + /* Store the key in the macro buffer and process it normally. */ + switch (macro_id) { + case 1: + dynamic_macro_record_key(macro_buffer, ¯o_pointer, r_macro_end, +1, record); + break; + case 2: + dynamic_macro_record_key(r_macro_buffer, ¯o_pointer, macro_end, -1, record); + break; + } + return true; + break; + } + } + + return true; +} diff --git a/quantum/process_keycode/process_dynamic_macro.h b/quantum/process_keycode/process_dynamic_macro.h new file mode 100644 index 000000000000..39036541b8d9 --- /dev/null +++ b/quantum/process_keycode/process_dynamic_macro.h @@ -0,0 +1,41 @@ +/* Copyright 2016 Jack Humbert + * Copyright 2019 Drashna Jael're (@drashna, aka Christopher Courtney) + * + * 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 . + */ + +/* Author: Wojciech Siewierski < wojciech dot siewierski at onet dot pl > */ +#pragma once + +#include "quantum.h" + +/* May be overridden with a custom value. Be aware that the effective + * macro length is half of this value: each keypress is recorded twice + * because of the down-event and up-event. This is not a bug, it's the + * intended behavior. + * + * Usually it should be fine to set the macro size to at least 256 but + * there have been reports of it being too much in some users' cases, + * so 128 is considered a safe default. + */ +#ifndef DYNAMIC_MACRO_SIZE +# define DYNAMIC_MACRO_SIZE 128 +#endif + +void dynamic_macro_led_blink(void); +bool process_dynamic_macro(uint16_t keycode, keyrecord_t *record); +void dynamic_macro_record_start_user(void); +void dynamic_macro_play_user(int8_t direction); +void dynamic_macro_record_key_user(int8_t direction, keyrecord_t *record); +void dynamic_macro_record_end_user(int8_t direction); diff --git a/quantum/quantum.c b/quantum/quantum.c index 571dda4c5bed..1f17c6ff71d4 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -26,7 +26,7 @@ #ifdef BACKLIGHT_ENABLE # include "backlight.h" - extern backlight_config_t backlight_config; +extern backlight_config_t backlight_config; #endif #ifdef FAUXCLICKY_ENABLE @@ -89,7 +89,7 @@ static void do_code16(uint16_t code, void (*f)(uint8_t)) { uint8_t mods_to_send = 0; - if (code & QK_RMODS_MIN) { // Right mod flag is set + if (code & QK_RMODS_MIN) { // Right mod flag is set if (code & QK_LCTL) mods_to_send |= MOD_BIT(KC_RCTL); if (code & QK_LSFT) mods_to_send |= MOD_BIT(KC_RSFT); if (code & QK_LALT) mods_to_send |= MOD_BIT(KC_RALT); @@ -222,6 +222,10 @@ bool process_record_quantum(keyrecord_t *record) { // Must run first to be able to mask key_up events. process_key_lock(&keycode, record) && #endif +#if defined(DYNAMIC_MACRO_ENABLE) && !defined(DYNAMIC_MACRO_USER_CALL) + // Must run asap to ensure all keypresses are recorded. + process_dynamic_macro(keycode, record) && +#endif #if defined(AUDIO_ENABLE) && defined(AUDIO_CLICKY) process_clicky(keycode, record) && #endif // AUDIO_CLICKY @@ -563,7 +567,7 @@ bool process_record_quantum(keyrecord_t *record) { keymap_config.swap_backslash_backspace = true; break; case MAGIC_HOST_NKRO: - clear_keyboard(); // clear first buffer to prevent stuck keys + clear_keyboard(); // clear first buffer to prevent stuck keys keymap_config.nkro = true; break; case MAGIC_SWAP_ALT_GUI: @@ -606,7 +610,7 @@ bool process_record_quantum(keyrecord_t *record) { keymap_config.swap_backslash_backspace = false; break; case MAGIC_UNHOST_NKRO: - clear_keyboard(); // clear first buffer to prevent stuck keys + clear_keyboard(); // clear first buffer to prevent stuck keys keymap_config.nkro = false; break; case MAGIC_UNSWAP_ALT_GUI: @@ -644,7 +648,7 @@ bool process_record_quantum(keyrecord_t *record) { #endif break; case MAGIC_TOGGLE_NKRO: - clear_keyboard(); // clear first buffer to prevent stuck keys + clear_keyboard(); // clear first buffer to prevent stuck keys keymap_config.nkro = !keymap_config.nkro; break; case MAGIC_EE_HANDS_LEFT: diff --git a/quantum/quantum.h b/quantum/quantum.h index 01abe1c0a137..87343a15df6c 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h @@ -149,6 +149,10 @@ extern layer_state_t layer_state; #include "dip_switch.h" #endif +#ifdef DYNAMIC_MACRO_ENABLE + #include "process_dynamic_macro.h" +#endif + // Function substitutions to ease GPIO manipulation #if defined(__AVR__) diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index 5fac6a5cae88..51a7e290fa62 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -505,6 +505,13 @@ enum quantum_keycodes { MAGIC_EE_HANDS_LEFT, MAGIC_EE_HANDS_RIGHT, + // Dynamic Macros + DYN_REC_START1, + DYN_REC_START2, + DYN_REC_STOP, + DYN_MACRO_PLAY1, + DYN_MACRO_PLAY2, + // always leave at the end SAFE_RANGE }; @@ -757,4 +764,11 @@ enum quantum_keycodes { # define SH_OFF (QK_SWAP_HANDS | OP_SH_OFF) #endif -#endif // QUANTUM_KEYCODES_H +// Dynamic Macros aliases +#define DM_REC1 DYN_REC_START1 +#define DM_REC2 DYN_REC_START2 +#define DM_RSTP DYN_REC_STOP +#define DM_PLY1 DYN_MACRO_PLAY1 +#define DM_PLY2 DYN_MACRO_PLAY2 + +#endif // QUANTUM_KEYCODES_H From 1244d0e266dad4170ed0c63e68e00c74c87367b2 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Tue, 5 Nov 2019 18:04:58 +1100 Subject: [PATCH 274/316] Un-clang-format usb_descriptor.h (#7216) Preserves readability of the file, making it easier to understand and modify. --- tmk_core/protocol/usb_descriptor.c | 1048 +++++++++++++++++++--------- 1 file changed, 701 insertions(+), 347 deletions(-) diff --git a/tmk_core/protocol/usb_descriptor.c b/tmk_core/protocol/usb_descriptor.c index e93ce87df28c..70032d69fa52 100644 --- a/tmk_core/protocol/usb_descriptor.c +++ b/tmk_core/protocol/usb_descriptor.c @@ -40,6 +40,8 @@ #include "report.h" #include "usb_descriptor.h" +// clang-format off + /* * HID report descriptors */ @@ -49,46 +51,46 @@ const USB_Descriptor_HIDReport_Datatype_t PROGMEM SharedReport[] = { #else const USB_Descriptor_HIDReport_Datatype_t PROGMEM KeyboardReport[] = { #endif - HID_RI_USAGE_PAGE(8, 0x01), // Generic Desktop - HID_RI_USAGE(8, 0x06), // Keyboard - HID_RI_COLLECTION(8, 0x01), // Application + HID_RI_USAGE_PAGE(8, 0x01), // Generic Desktop + HID_RI_USAGE(8, 0x06), // Keyboard + HID_RI_COLLECTION(8, 0x01), // Application #ifdef KEYBOARD_SHARED_EP - HID_RI_REPORT_ID(8, REPORT_ID_KEYBOARD), + HID_RI_REPORT_ID(8, REPORT_ID_KEYBOARD), #endif - // Modifiers (8 bits) - HID_RI_USAGE_PAGE(8, 0x07), // Keyboard/Keypad - HID_RI_USAGE_MINIMUM(8, 0xE0), // Keyboard Left Control - HID_RI_USAGE_MAXIMUM(8, 0xE7), // Keyboard Right GUI - HID_RI_LOGICAL_MINIMUM(8, 0x00), - HID_RI_LOGICAL_MAXIMUM(8, 0x01), - HID_RI_REPORT_COUNT(8, 0x08), - HID_RI_REPORT_SIZE(8, 0x01), - HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_ABSOLUTE), - // Reserved (1 byte) - HID_RI_REPORT_COUNT(8, 0x01), - HID_RI_REPORT_SIZE(8, 0x08), - HID_RI_INPUT(8, HID_IOF_CONSTANT), - // Keycodes (6 bytes) - HID_RI_USAGE_PAGE(8, 0x07), // Keyboard/Keypad - HID_RI_USAGE_MINIMUM(8, 0x00), - HID_RI_USAGE_MAXIMUM(8, 0xFF), - HID_RI_LOGICAL_MINIMUM(8, 0x00), - HID_RI_LOGICAL_MAXIMUM(16, 0x00FF), - HID_RI_REPORT_COUNT(8, 0x06), - HID_RI_REPORT_SIZE(8, 0x08), - HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_ARRAY | HID_IOF_ABSOLUTE), - - // Status LEDs (5 bits) - HID_RI_USAGE_PAGE(8, 0x08), // LED - HID_RI_USAGE_MINIMUM(8, 0x01), // Num Lock - HID_RI_USAGE_MAXIMUM(8, 0x05), // Kana - HID_RI_REPORT_COUNT(8, 0x05), - HID_RI_REPORT_SIZE(8, 0x01), - HID_RI_OUTPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_ABSOLUTE | HID_IOF_NON_VOLATILE), - // LED padding (3 bits) - HID_RI_REPORT_COUNT(8, 0x01), - HID_RI_REPORT_SIZE(8, 0x03), - HID_RI_OUTPUT(8, HID_IOF_CONSTANT), + // Modifiers (8 bits) + HID_RI_USAGE_PAGE(8, 0x07), // Keyboard/Keypad + HID_RI_USAGE_MINIMUM(8, 0xE0), // Keyboard Left Control + HID_RI_USAGE_MAXIMUM(8, 0xE7), // Keyboard Right GUI + HID_RI_LOGICAL_MINIMUM(8, 0x00), + HID_RI_LOGICAL_MAXIMUM(8, 0x01), + HID_RI_REPORT_COUNT(8, 0x08), + HID_RI_REPORT_SIZE(8, 0x01), + HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_ABSOLUTE), + // Reserved (1 byte) + HID_RI_REPORT_COUNT(8, 0x01), + HID_RI_REPORT_SIZE(8, 0x08), + HID_RI_INPUT(8, HID_IOF_CONSTANT), + // Keycodes (6 bytes) + HID_RI_USAGE_PAGE(8, 0x07), // Keyboard/Keypad + HID_RI_USAGE_MINIMUM(8, 0x00), + HID_RI_USAGE_MAXIMUM(8, 0xFF), + HID_RI_LOGICAL_MINIMUM(8, 0x00), + HID_RI_LOGICAL_MAXIMUM(16, 0x00FF), + HID_RI_REPORT_COUNT(8, 0x06), + HID_RI_REPORT_SIZE(8, 0x08), + HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_ARRAY | HID_IOF_ABSOLUTE), + + // Status LEDs (5 bits) + HID_RI_USAGE_PAGE(8, 0x08), // LED + HID_RI_USAGE_MINIMUM(8, 0x01), // Num Lock + HID_RI_USAGE_MAXIMUM(8, 0x05), // Kana + HID_RI_REPORT_COUNT(8, 0x05), + HID_RI_REPORT_SIZE(8, 0x01), + HID_RI_OUTPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_ABSOLUTE | HID_IOF_NON_VOLATILE), + // LED padding (3 bits) + HID_RI_REPORT_COUNT(8, 0x01), + HID_RI_REPORT_SIZE(8, 0x03), + HID_RI_OUTPUT(8, HID_IOF_CONSTANT), HID_RI_END_COLLECTION(0), #ifndef KEYBOARD_SHARED_EP }; @@ -101,54 +103,54 @@ const USB_Descriptor_HIDReport_Datatype_t PROGMEM MouseReport[] = { const USB_Descriptor_HIDReport_Datatype_t PROGMEM SharedReport[] = { # define SHARED_REPORT_STARTED # endif - HID_RI_USAGE_PAGE(8, 0x01), // Generic Desktop - HID_RI_USAGE(8, 0x02), // Mouse - HID_RI_COLLECTION(8, 0x01), // Application + HID_RI_USAGE_PAGE(8, 0x01), // Generic Desktop + HID_RI_USAGE(8, 0x02), // Mouse + HID_RI_COLLECTION(8, 0x01), // Application # ifdef MOUSE_SHARED_EP - HID_RI_REPORT_ID(8, REPORT_ID_MOUSE), + HID_RI_REPORT_ID(8, REPORT_ID_MOUSE), # endif - HID_RI_USAGE(8, 0x01), // Pointer - HID_RI_COLLECTION(8, 0x00), // Physical - // Buttons (5 bits) - HID_RI_USAGE_PAGE(8, 0x09), // Button - HID_RI_USAGE_MINIMUM(8, 0x01), // Button 1 - HID_RI_USAGE_MAXIMUM(8, 0x05), // Button 5 - HID_RI_LOGICAL_MINIMUM(8, 0x00), - HID_RI_LOGICAL_MAXIMUM(8, 0x01), - HID_RI_REPORT_COUNT(8, 0x05), - HID_RI_REPORT_SIZE(8, 0x01), - HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_ABSOLUTE), - // Button padding (3 bits) - HID_RI_REPORT_COUNT(8, 0x01), - HID_RI_REPORT_SIZE(8, 0x03), - HID_RI_INPUT(8, HID_IOF_CONSTANT), - - // X/Y position (2 bytes) - HID_RI_USAGE_PAGE(8, 0x01), // Generic Desktop - HID_RI_USAGE(8, 0x30), // X - HID_RI_USAGE(8, 0x31), // Y - HID_RI_LOGICAL_MINIMUM(8, -127), - HID_RI_LOGICAL_MAXIMUM(8, 127), - HID_RI_REPORT_COUNT(8, 0x02), - HID_RI_REPORT_SIZE(8, 0x08), - HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_RELATIVE), - - // Vertical wheel (1 byte) - HID_RI_USAGE(8, 0x38), // Wheel - HID_RI_LOGICAL_MINIMUM(8, -127), - HID_RI_LOGICAL_MAXIMUM(8, 127), - HID_RI_REPORT_COUNT(8, 0x01), - HID_RI_REPORT_SIZE(8, 0x08), - HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_RELATIVE), - // Horizontal wheel (1 byte) - HID_RI_USAGE_PAGE(8, 0x0C), // Consumer - HID_RI_USAGE(16, 0x0238), // AC Pan - HID_RI_LOGICAL_MINIMUM(8, -127), - HID_RI_LOGICAL_MAXIMUM(8, 127), - HID_RI_REPORT_COUNT(8, 0x01), - HID_RI_REPORT_SIZE(8, 0x08), - HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_RELATIVE), - HID_RI_END_COLLECTION(0), + HID_RI_USAGE(8, 0x01), // Pointer + HID_RI_COLLECTION(8, 0x00), // Physical + // Buttons (5 bits) + HID_RI_USAGE_PAGE(8, 0x09), // Button + HID_RI_USAGE_MINIMUM(8, 0x01), // Button 1 + HID_RI_USAGE_MAXIMUM(8, 0x05), // Button 5 + HID_RI_LOGICAL_MINIMUM(8, 0x00), + HID_RI_LOGICAL_MAXIMUM(8, 0x01), + HID_RI_REPORT_COUNT(8, 0x05), + HID_RI_REPORT_SIZE(8, 0x01), + HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_ABSOLUTE), + // Button padding (3 bits) + HID_RI_REPORT_COUNT(8, 0x01), + HID_RI_REPORT_SIZE(8, 0x03), + HID_RI_INPUT(8, HID_IOF_CONSTANT), + + // X/Y position (2 bytes) + HID_RI_USAGE_PAGE(8, 0x01), // Generic Desktop + HID_RI_USAGE(8, 0x30), // X + HID_RI_USAGE(8, 0x31), // Y + HID_RI_LOGICAL_MINIMUM(8, -127), + HID_RI_LOGICAL_MAXIMUM(8, 127), + HID_RI_REPORT_COUNT(8, 0x02), + HID_RI_REPORT_SIZE(8, 0x08), + HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_RELATIVE), + + // Vertical wheel (1 byte) + HID_RI_USAGE(8, 0x38), // Wheel + HID_RI_LOGICAL_MINIMUM(8, -127), + HID_RI_LOGICAL_MAXIMUM(8, 127), + HID_RI_REPORT_COUNT(8, 0x01), + HID_RI_REPORT_SIZE(8, 0x08), + HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_RELATIVE), + // Horizontal wheel (1 byte) + HID_RI_USAGE_PAGE(8, 0x0C), // Consumer + HID_RI_USAGE(16, 0x0238), // AC Pan + HID_RI_LOGICAL_MINIMUM(8, -127), + HID_RI_LOGICAL_MAXIMUM(8, 127), + HID_RI_REPORT_COUNT(8, 0x01), + HID_RI_REPORT_SIZE(8, 0x08), + HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_RELATIVE), + HID_RI_END_COLLECTION(0), HID_RI_END_COLLECTION(0), # ifndef MOUSE_SHARED_EP }; @@ -160,68 +162,68 @@ const USB_Descriptor_HIDReport_Datatype_t PROGMEM SharedReport[] = { #endif #ifdef EXTRAKEY_ENABLE - HID_RI_USAGE_PAGE(8, 0x01), // Generic Desktop - HID_RI_USAGE(8, 0x80), // System Control - HID_RI_COLLECTION(8, 0x01), // Application - HID_RI_REPORT_ID(8, REPORT_ID_SYSTEM), - HID_RI_USAGE_MINIMUM(16, 0x0081), // System Power Down - HID_RI_USAGE_MAXIMUM(16, 0x0083), // System Wake Up - HID_RI_LOGICAL_MINIMUM(16, 0x0001), - HID_RI_LOGICAL_MAXIMUM(16, 0x0003), - HID_RI_REPORT_COUNT(8, 1), - HID_RI_REPORT_SIZE(8, 16), - HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_ARRAY | HID_IOF_ABSOLUTE), + HID_RI_USAGE_PAGE(8, 0x01), // Generic Desktop + HID_RI_USAGE(8, 0x80), // System Control + HID_RI_COLLECTION(8, 0x01), // Application + HID_RI_REPORT_ID(8, REPORT_ID_SYSTEM), + HID_RI_USAGE_MINIMUM(16, 0x0081), // System Power Down + HID_RI_USAGE_MAXIMUM(16, 0x0083), // System Wake Up + HID_RI_LOGICAL_MINIMUM(16, 0x0001), + HID_RI_LOGICAL_MAXIMUM(16, 0x0003), + HID_RI_REPORT_COUNT(8, 1), + HID_RI_REPORT_SIZE(8, 16), + HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_ARRAY | HID_IOF_ABSOLUTE), HID_RI_END_COLLECTION(0), - HID_RI_USAGE_PAGE(8, 0x0C), // Consumer - HID_RI_USAGE(8, 0x01), // Consumer Control - HID_RI_COLLECTION(8, 0x01), // Application - HID_RI_REPORT_ID(8, REPORT_ID_CONSUMER), - HID_RI_USAGE_MINIMUM(16, 0x0001), // Consumer Control - HID_RI_USAGE_MAXIMUM(16, 0x029C), // AC Distribute Vertically - HID_RI_LOGICAL_MINIMUM(16, 0x0001), - HID_RI_LOGICAL_MAXIMUM(16, 0x029C), - HID_RI_REPORT_COUNT(8, 1), - HID_RI_REPORT_SIZE(8, 16), - HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_ARRAY | HID_IOF_ABSOLUTE), + HID_RI_USAGE_PAGE(8, 0x0C), // Consumer + HID_RI_USAGE(8, 0x01), // Consumer Control + HID_RI_COLLECTION(8, 0x01), // Application + HID_RI_REPORT_ID(8, REPORT_ID_CONSUMER), + HID_RI_USAGE_MINIMUM(16, 0x0001), // Consumer Control + HID_RI_USAGE_MAXIMUM(16, 0x029C), // AC Distribute Vertically + HID_RI_LOGICAL_MINIMUM(16, 0x0001), + HID_RI_LOGICAL_MAXIMUM(16, 0x029C), + HID_RI_REPORT_COUNT(8, 1), + HID_RI_REPORT_SIZE(8, 16), + HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_ARRAY | HID_IOF_ABSOLUTE), HID_RI_END_COLLECTION(0), #endif #ifdef NKRO_ENABLE - HID_RI_USAGE_PAGE(8, 0x01), // Generic Desktop - HID_RI_USAGE(8, 0x06), // Keyboard - HID_RI_COLLECTION(8, 0x01), // Application - HID_RI_REPORT_ID(8, REPORT_ID_NKRO), - // Modifiers (8 bits) - HID_RI_USAGE_PAGE(8, 0x07), // Keyboard/Keypad - HID_RI_USAGE_MINIMUM(8, 0xE0), // Keyboard Left Control - HID_RI_USAGE_MAXIMUM(8, 0xE7), // Keyboard Right GUI - HID_RI_LOGICAL_MINIMUM(8, 0x00), - HID_RI_LOGICAL_MAXIMUM(8, 0x01), - HID_RI_REPORT_COUNT(8, 0x08), - HID_RI_REPORT_SIZE(8, 0x01), - HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_ABSOLUTE), - // Keycodes - HID_RI_USAGE_PAGE(8, 0x07), // Keyboard/Keypad - HID_RI_USAGE_MINIMUM(8, 0x00), - HID_RI_USAGE_MAXIMUM(8, KEYBOARD_REPORT_BITS * 8 - 1), - HID_RI_LOGICAL_MINIMUM(8, 0x00), - HID_RI_LOGICAL_MAXIMUM(8, 0x01), - HID_RI_REPORT_COUNT(8, KEYBOARD_REPORT_BITS * 8), - HID_RI_REPORT_SIZE(8, 0x01), - HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_ABSOLUTE), - - // Status LEDs (5 bits) - HID_RI_USAGE_PAGE(8, 0x08), // LED - HID_RI_USAGE_MINIMUM(8, 0x01), // Num Lock - HID_RI_USAGE_MAXIMUM(8, 0x05), // Kana - HID_RI_REPORT_COUNT(8, 0x05), - HID_RI_REPORT_SIZE(8, 0x01), - HID_RI_OUTPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_ABSOLUTE | HID_IOF_NON_VOLATILE), - // LED padding (3 bits) - HID_RI_REPORT_COUNT(8, 0x01), - HID_RI_REPORT_SIZE(8, 0x03), - HID_RI_OUTPUT(8, HID_IOF_CONSTANT), + HID_RI_USAGE_PAGE(8, 0x01), // Generic Desktop + HID_RI_USAGE(8, 0x06), // Keyboard + HID_RI_COLLECTION(8, 0x01), // Application + HID_RI_REPORT_ID(8, REPORT_ID_NKRO), + // Modifiers (8 bits) + HID_RI_USAGE_PAGE(8, 0x07), // Keyboard/Keypad + HID_RI_USAGE_MINIMUM(8, 0xE0), // Keyboard Left Control + HID_RI_USAGE_MAXIMUM(8, 0xE7), // Keyboard Right GUI + HID_RI_LOGICAL_MINIMUM(8, 0x00), + HID_RI_LOGICAL_MAXIMUM(8, 0x01), + HID_RI_REPORT_COUNT(8, 0x08), + HID_RI_REPORT_SIZE(8, 0x01), + HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_ABSOLUTE), + // Keycodes + HID_RI_USAGE_PAGE(8, 0x07), // Keyboard/Keypad + HID_RI_USAGE_MINIMUM(8, 0x00), + HID_RI_USAGE_MAXIMUM(8, KEYBOARD_REPORT_BITS * 8 - 1), + HID_RI_LOGICAL_MINIMUM(8, 0x00), + HID_RI_LOGICAL_MAXIMUM(8, 0x01), + HID_RI_REPORT_COUNT(8, KEYBOARD_REPORT_BITS * 8), + HID_RI_REPORT_SIZE(8, 0x01), + HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_ABSOLUTE), + + // Status LEDs (5 bits) + HID_RI_USAGE_PAGE(8, 0x08), // LED + HID_RI_USAGE_MINIMUM(8, 0x01), // Num Lock + HID_RI_USAGE_MAXIMUM(8, 0x05), // Kana + HID_RI_REPORT_COUNT(8, 0x05), + HID_RI_REPORT_SIZE(8, 0x01), + HID_RI_OUTPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_ABSOLUTE | HID_IOF_NON_VOLATILE), + // LED padding (3 bits) + HID_RI_REPORT_COUNT(8, 0x01), + HID_RI_REPORT_SIZE(8, 0x03), + HID_RI_OUTPUT(8, HID_IOF_CONSTANT), HID_RI_END_COLLECTION(0), #endif #ifdef SHARED_EP_ENABLE @@ -230,46 +232,48 @@ const USB_Descriptor_HIDReport_Datatype_t PROGMEM SharedReport[] = { #ifdef RAW_ENABLE const USB_Descriptor_HIDReport_Datatype_t PROGMEM RawReport[] = { - HID_RI_USAGE_PAGE(16, 0xFF60), // Vendor Defined - HID_RI_USAGE(8, 0x61), // Vendor Defined - HID_RI_COLLECTION(8, 0x01), // Application - // Data to host - HID_RI_USAGE(8, 0x62), // Vendor Defined - HID_RI_LOGICAL_MINIMUM(8, 0x00), - HID_RI_LOGICAL_MAXIMUM(16, 0x00FF), - HID_RI_REPORT_COUNT(8, RAW_EPSIZE), - HID_RI_REPORT_SIZE(8, 0x08), - HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_ABSOLUTE), - // Data from host - HID_RI_USAGE(8, 0x63), // Vendor Defined - HID_RI_LOGICAL_MINIMUM(8, 0x00), - HID_RI_LOGICAL_MAXIMUM(16, 0x00FF), - HID_RI_REPORT_COUNT(8, RAW_EPSIZE), - HID_RI_REPORT_SIZE(8, 0x08), - HID_RI_OUTPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_ABSOLUTE | HID_IOF_NON_VOLATILE), + HID_RI_USAGE_PAGE(16, 0xFF60), // Vendor Defined + HID_RI_USAGE(8, 0x61), // Vendor Defined + HID_RI_COLLECTION(8, 0x01), // Application + // Data to host + HID_RI_USAGE(8, 0x62), // Vendor Defined + HID_RI_LOGICAL_MINIMUM(8, 0x00), + HID_RI_LOGICAL_MAXIMUM(16, 0x00FF), + HID_RI_REPORT_COUNT(8, RAW_EPSIZE), + HID_RI_REPORT_SIZE(8, 0x08), + HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_ABSOLUTE), + + // Data from host + HID_RI_USAGE(8, 0x63), // Vendor Defined + HID_RI_LOGICAL_MINIMUM(8, 0x00), + HID_RI_LOGICAL_MAXIMUM(16, 0x00FF), + HID_RI_REPORT_COUNT(8, RAW_EPSIZE), + HID_RI_REPORT_SIZE(8, 0x08), + HID_RI_OUTPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_ABSOLUTE | HID_IOF_NON_VOLATILE), HID_RI_END_COLLECTION(0), }; #endif #ifdef CONSOLE_ENABLE const USB_Descriptor_HIDReport_Datatype_t PROGMEM ConsoleReport[] = { - HID_RI_USAGE_PAGE(16, 0xFF31), // Vendor Defined (PJRC Teensy compatible) - HID_RI_USAGE(8, 0x74), // Vendor Defined (PJRC Teensy compatible) - HID_RI_COLLECTION(8, 0x01), // Application - // Data to host - HID_RI_USAGE(8, 0x75), // Vendor Defined - HID_RI_LOGICAL_MINIMUM(8, 0x00), - HID_RI_LOGICAL_MAXIMUM(16, 0x00FF), - HID_RI_REPORT_COUNT(8, CONSOLE_EPSIZE), - HID_RI_REPORT_SIZE(8, 0x08), - HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_ABSOLUTE), - // Data from host - HID_RI_USAGE(8, 0x76), // Vendor Defined - HID_RI_LOGICAL_MINIMUM(8, 0x00), - HID_RI_LOGICAL_MAXIMUM(16, 0x00FF), - HID_RI_REPORT_COUNT(8, CONSOLE_EPSIZE), - HID_RI_REPORT_SIZE(8, 0x08), - HID_RI_OUTPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_ABSOLUTE | HID_IOF_NON_VOLATILE), + HID_RI_USAGE_PAGE(16, 0xFF31), // Vendor Defined (PJRC Teensy compatible) + HID_RI_USAGE(8, 0x74), // Vendor Defined (PJRC Teensy compatible) + HID_RI_COLLECTION(8, 0x01), // Application + // Data to host + HID_RI_USAGE(8, 0x75), // Vendor Defined + HID_RI_LOGICAL_MINIMUM(8, 0x00), + HID_RI_LOGICAL_MAXIMUM(16, 0x00FF), + HID_RI_REPORT_COUNT(8, CONSOLE_EPSIZE), + HID_RI_REPORT_SIZE(8, 0x08), + HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_ABSOLUTE), + + // Data from host + HID_RI_USAGE(8, 0x76), // Vendor Defined + HID_RI_LOGICAL_MINIMUM(8, 0x00), + HID_RI_LOGICAL_MAXIMUM(16, 0x00FF), + HID_RI_REPORT_COUNT(8, CONSOLE_EPSIZE), + HID_RI_REPORT_SIZE(8, 0x08), + HID_RI_OUTPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_ABSOLUTE | HID_IOF_NON_VOLATILE), HID_RI_END_COLLECTION(0), }; #endif @@ -277,26 +281,33 @@ const USB_Descriptor_HIDReport_Datatype_t PROGMEM ConsoleReport[] = { /* * Device descriptor */ -const USB_Descriptor_Device_t PROGMEM DeviceDescriptor = {.Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, - .USBSpecification = VERSION_BCD(1, 1, 0), +const USB_Descriptor_Device_t PROGMEM DeviceDescriptor = { + .Header = { + .Size = sizeof(USB_Descriptor_Device_t), + .Type = DTYPE_Device + }, + .USBSpecification = VERSION_BCD(1, 1, 0), + #if VIRTSER_ENABLE - .Class = USB_CSCP_IADDeviceClass, - .SubClass = USB_CSCP_IADDeviceSubclass, - .Protocol = USB_CSCP_IADDeviceProtocol, + .Class = USB_CSCP_IADDeviceClass, + .SubClass = USB_CSCP_IADDeviceSubclass, + .Protocol = USB_CSCP_IADDeviceProtocol, #else - .Class = USB_CSCP_NoDeviceClass, - .SubClass = USB_CSCP_NoDeviceSubclass, - .Protocol = USB_CSCP_NoDeviceProtocol, + .Class = USB_CSCP_NoDeviceClass, + .SubClass = USB_CSCP_NoDeviceSubclass, + .Protocol = USB_CSCP_NoDeviceProtocol, #endif - .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE, - // Specified in config.h - .VendorID = VENDOR_ID, - .ProductID = PRODUCT_ID, - .ReleaseNumber = DEVICE_VER, - .ManufacturerStrIndex = 0x01, - .ProductStrIndex = 0x02, - .SerialNumStrIndex = 0x03, - .NumberOfConfigurations = FIXED_NUM_CONFIGURATIONS}; + + .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE, + // Specified in config.h + .VendorID = VENDOR_ID, + .ProductID = PRODUCT_ID, + .ReleaseNumber = DEVICE_VER, + .ManufacturerStrIndex = 0x01, + .ProductStrIndex = 0x02, + .SerialNumStrIndex = 0x03, + .NumberOfConfigurations = FIXED_NUM_CONFIGURATIONS +}; #ifndef USB_MAX_POWER_CONSUMPTION # define USB_MAX_POWER_CONSUMPTION 500 @@ -309,197 +320,540 @@ const USB_Descriptor_Device_t PROGMEM DeviceDescriptor = {.Header = {. /* * Configuration descriptors */ -const USB_Descriptor_Configuration_t PROGMEM - ConfigurationDescriptor = - { - .Config = {.Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration}, .TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t), .TotalInterfaces = TOTAL_INTERFACES, .ConfigurationNumber = 1, .ConfigurationStrIndex = NO_DESCRIPTOR, .ConfigAttributes = (USB_CONFIG_ATTR_RESERVED | USB_CONFIG_ATTR_REMOTEWAKEUP), .MaxPowerConsumption = USB_CONFIG_POWER_MA(USB_MAX_POWER_CONSUMPTION)}, - +const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = { + .Config = { + .Header = { + .Size = sizeof(USB_Descriptor_Configuration_Header_t), + .Type = DTYPE_Configuration + }, + .TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t), + .TotalInterfaces = TOTAL_INTERFACES, + .ConfigurationNumber = 1, + .ConfigurationStrIndex = NO_DESCRIPTOR, + .ConfigAttributes = (USB_CONFIG_ATTR_RESERVED | USB_CONFIG_ATTR_REMOTEWAKEUP), + .MaxPowerConsumption = USB_CONFIG_POWER_MA(USB_MAX_POWER_CONSUMPTION) + }, #ifndef KEYBOARD_SHARED_EP - /* - * Keyboard - */ - .Keyboard_Interface = {.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface}, - .InterfaceNumber = KEYBOARD_INTERFACE, - .AlternateSetting = 0x00, - .TotalEndpoints = 1, - .Class = HID_CSCP_HIDClass, - .SubClass = HID_CSCP_BootSubclass, - .Protocol = HID_CSCP_KeyboardBootProtocol, - - .InterfaceStrIndex = NO_DESCRIPTOR}, - .Keyboard_HID = {.Header = {.Size = sizeof(USB_HID_Descriptor_HID_t), .Type = HID_DTYPE_HID}, .HIDSpec = VERSION_BCD(1, 1, 1), .CountryCode = 0x00, .TotalReportDescriptors = 1, .HIDReportType = HID_DTYPE_Report, .HIDReportLength = sizeof(KeyboardReport)}, - .Keyboard_INEndpoint = {.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint}, .EndpointAddress = (ENDPOINT_DIR_IN | KEYBOARD_IN_EPNUM), .Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = KEYBOARD_EPSIZE, .PollingIntervalMS = USB_POLLING_INTERVAL_MS}, + /* + * Keyboard + */ + .Keyboard_Interface = { + .Header = { + .Size = sizeof(USB_Descriptor_Interface_t), + .Type = DTYPE_Interface + }, + .InterfaceNumber = KEYBOARD_INTERFACE, + .AlternateSetting = 0x00, + .TotalEndpoints = 1, + .Class = HID_CSCP_HIDClass, + .SubClass = HID_CSCP_BootSubclass, + .Protocol = HID_CSCP_KeyboardBootProtocol, + .InterfaceStrIndex = NO_DESCRIPTOR + }, + .Keyboard_HID = { + .Header = { + .Size = sizeof(USB_HID_Descriptor_HID_t), + .Type = HID_DTYPE_HID + }, + .HIDSpec = VERSION_BCD(1, 1, 1), + .CountryCode = 0x00, + .TotalReportDescriptors = 1, + .HIDReportType = HID_DTYPE_Report, + .HIDReportLength = sizeof(KeyboardReport) + }, + .Keyboard_INEndpoint = { + .Header = { + .Size = sizeof(USB_Descriptor_Endpoint_t), + .Type = DTYPE_Endpoint + }, + .EndpointAddress = (ENDPOINT_DIR_IN | KEYBOARD_IN_EPNUM), + .Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), + .EndpointSize = KEYBOARD_EPSIZE, + .PollingIntervalMS = USB_POLLING_INTERVAL_MS + }, #endif #ifdef RAW_ENABLE - /* - * Raw HID - */ - .Raw_Interface = {.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface}, .InterfaceNumber = RAW_INTERFACE, .AlternateSetting = 0x00, .TotalEndpoints = 2, .Class = HID_CSCP_HIDClass, .SubClass = HID_CSCP_NonBootSubclass, .Protocol = HID_CSCP_NonBootProtocol, .InterfaceStrIndex = NO_DESCRIPTOR}, - .Raw_HID = {.Header = {.Size = sizeof(USB_HID_Descriptor_HID_t), .Type = HID_DTYPE_HID}, .HIDSpec = VERSION_BCD(1, 1, 1), .CountryCode = 0x00, .TotalReportDescriptors = 1, .HIDReportType = HID_DTYPE_Report, .HIDReportLength = sizeof(RawReport)}, - .Raw_INEndpoint = {.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint}, .EndpointAddress = (ENDPOINT_DIR_IN | RAW_IN_EPNUM), .Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = RAW_EPSIZE, .PollingIntervalMS = 0x01}, - .Raw_OUTEndpoint = {.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint}, .EndpointAddress = (ENDPOINT_DIR_OUT | RAW_OUT_EPNUM), .Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = RAW_EPSIZE, .PollingIntervalMS = 0x01}, + /* + * Raw HID + */ + .Raw_Interface = { + .Header = { + .Size = sizeof(USB_Descriptor_Interface_t), + .Type = DTYPE_Interface + }, + .InterfaceNumber = RAW_INTERFACE, + .AlternateSetting = 0x00, + .TotalEndpoints = 2, + .Class = HID_CSCP_HIDClass, + .SubClass = HID_CSCP_NonBootSubclass, + .Protocol = HID_CSCP_NonBootProtocol, + .InterfaceStrIndex = NO_DESCRIPTOR + }, + .Raw_HID = { + .Header = { + .Size = sizeof(USB_HID_Descriptor_HID_t), + .Type = HID_DTYPE_HID + }, + .HIDSpec = VERSION_BCD(1, 1, 1), + .CountryCode = 0x00, + .TotalReportDescriptors = 1, + .HIDReportType = HID_DTYPE_Report, + .HIDReportLength = sizeof(RawReport) + }, + .Raw_INEndpoint = { + .Header = { + .Size = sizeof(USB_Descriptor_Endpoint_t), + .Type = DTYPE_Endpoint + }, + .EndpointAddress = (ENDPOINT_DIR_IN | RAW_IN_EPNUM), + .Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), + .EndpointSize = RAW_EPSIZE, + .PollingIntervalMS = 0x01 + }, + .Raw_OUTEndpoint = { + .Header = { + .Size = sizeof(USB_Descriptor_Endpoint_t), + .Type = DTYPE_Endpoint + }, + .EndpointAddress = (ENDPOINT_DIR_OUT | RAW_OUT_EPNUM), + .Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), + .EndpointSize = RAW_EPSIZE, + .PollingIntervalMS = 0x01 + }, #endif #if defined(MOUSE_ENABLE) && !defined(MOUSE_SHARED_EP) - /* - * Mouse - */ - .Mouse_Interface = {.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface}, .InterfaceNumber = MOUSE_INTERFACE, .AlternateSetting = 0x00, .TotalEndpoints = 1, .Class = HID_CSCP_HIDClass, .SubClass = HID_CSCP_BootSubclass, .Protocol = HID_CSCP_MouseBootProtocol, .InterfaceStrIndex = NO_DESCRIPTOR}, - .Mouse_HID = {.Header = {.Size = sizeof(USB_HID_Descriptor_HID_t), .Type = HID_DTYPE_HID}, .HIDSpec = VERSION_BCD(1, 1, 1), .CountryCode = 0x00, .TotalReportDescriptors = 1, .HIDReportType = HID_DTYPE_Report, .HIDReportLength = sizeof(MouseReport)}, - .Mouse_INEndpoint = {.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint}, .EndpointAddress = (ENDPOINT_DIR_IN | MOUSE_IN_EPNUM), .Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = MOUSE_EPSIZE, .PollingIntervalMS = USB_POLLING_INTERVAL_MS}, + /* + * Mouse + */ + .Mouse_Interface = { + .Header = { + .Size = sizeof(USB_Descriptor_Interface_t), + .Type = DTYPE_Interface + }, + .InterfaceNumber = MOUSE_INTERFACE, + .AlternateSetting = 0x00, + .TotalEndpoints = 1, + .Class = HID_CSCP_HIDClass, + .SubClass = HID_CSCP_BootSubclass, + .Protocol = HID_CSCP_MouseBootProtocol, + .InterfaceStrIndex = NO_DESCRIPTOR + }, + .Mouse_HID = { + .Header = { + .Size = sizeof(USB_HID_Descriptor_HID_t), + .Type = HID_DTYPE_HID + }, + .HIDSpec = VERSION_BCD(1, 1, 1), + .CountryCode = 0x00, + .TotalReportDescriptors = 1, + .HIDReportType = HID_DTYPE_Report, + .HIDReportLength = sizeof(MouseReport) + }, + .Mouse_INEndpoint = { + .Header = { + .Size = sizeof(USB_Descriptor_Endpoint_t), + .Type = DTYPE_Endpoint + }, + .EndpointAddress = (ENDPOINT_DIR_IN | MOUSE_IN_EPNUM), + .Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), + .EndpointSize = MOUSE_EPSIZE, + .PollingIntervalMS = USB_POLLING_INTERVAL_MS + }, #endif #ifdef SHARED_EP_ENABLE - /* - * Shared - */ - .Shared_Interface = {.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface}, - .InterfaceNumber = SHARED_INTERFACE, - .AlternateSetting = 0x00, - .TotalEndpoints = 1, - .Class = HID_CSCP_HIDClass, + /* + * Shared + */ + .Shared_Interface = { + .Header = { + .Size = sizeof(USB_Descriptor_Interface_t), + .Type = DTYPE_Interface + }, + .InterfaceNumber = SHARED_INTERFACE, + .AlternateSetting = 0x00, + .TotalEndpoints = 1, + .Class = HID_CSCP_HIDClass, # ifdef KEYBOARD_SHARED_EP - .SubClass = HID_CSCP_BootSubclass, - .Protocol = HID_CSCP_KeyboardBootProtocol, + .SubClass = HID_CSCP_BootSubclass, + .Protocol = HID_CSCP_KeyboardBootProtocol, # else - .SubClass = HID_CSCP_NonBootSubclass, - .Protocol = HID_CSCP_NonBootProtocol, + .SubClass = HID_CSCP_NonBootSubclass, + .Protocol = HID_CSCP_NonBootProtocol, # endif - .InterfaceStrIndex = NO_DESCRIPTOR}, - .Shared_HID = {.Header = {.Size = sizeof(USB_HID_Descriptor_HID_t), .Type = HID_DTYPE_HID}, .HIDSpec = VERSION_BCD(1, 1, 1), .CountryCode = 0x00, .TotalReportDescriptors = 1, .HIDReportType = HID_DTYPE_Report, .HIDReportLength = sizeof(SharedReport)}, - .Shared_INEndpoint = {.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint}, .EndpointAddress = (ENDPOINT_DIR_IN | SHARED_IN_EPNUM), .Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = SHARED_EPSIZE, .PollingIntervalMS = USB_POLLING_INTERVAL_MS}, + .InterfaceStrIndex = NO_DESCRIPTOR + }, + .Shared_HID = { + .Header = { + .Size = sizeof(USB_HID_Descriptor_HID_t), + .Type = HID_DTYPE_HID + }, + .HIDSpec = VERSION_BCD(1, 1, 1), + .CountryCode = 0x00, + .TotalReportDescriptors = 1, + .HIDReportType = HID_DTYPE_Report, + .HIDReportLength = sizeof(SharedReport) + }, + .Shared_INEndpoint = { + .Header = { + .Size = sizeof(USB_Descriptor_Endpoint_t), + .Type = DTYPE_Endpoint + }, + .EndpointAddress = (ENDPOINT_DIR_IN | SHARED_IN_EPNUM), + .Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), + .EndpointSize = SHARED_EPSIZE, + .PollingIntervalMS = USB_POLLING_INTERVAL_MS + }, #endif #ifdef CONSOLE_ENABLE - /* - * Console - */ - .Console_Interface = {.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface}, .InterfaceNumber = CONSOLE_INTERFACE, .AlternateSetting = 0x00, .TotalEndpoints = 2, .Class = HID_CSCP_HIDClass, .SubClass = HID_CSCP_NonBootSubclass, .Protocol = HID_CSCP_NonBootProtocol, .InterfaceStrIndex = NO_DESCRIPTOR}, - .Console_HID = {.Header = {.Size = sizeof(USB_HID_Descriptor_HID_t), .Type = HID_DTYPE_HID}, .HIDSpec = VERSION_BCD(1, 1, 1), .CountryCode = 0x00, .TotalReportDescriptors = 1, .HIDReportType = HID_DTYPE_Report, .HIDReportLength = sizeof(ConsoleReport)}, - .Console_INEndpoint = {.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint}, .EndpointAddress = (ENDPOINT_DIR_IN | CONSOLE_IN_EPNUM), .Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = CONSOLE_EPSIZE, .PollingIntervalMS = 0x01}, - .Console_OUTEndpoint = {.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint}, .EndpointAddress = (ENDPOINT_DIR_OUT | CONSOLE_OUT_EPNUM), .Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = CONSOLE_EPSIZE, .PollingIntervalMS = 0x01}, + /* + * Console + */ + .Console_Interface = { + .Header = { + .Size = sizeof(USB_Descriptor_Interface_t), + .Type = DTYPE_Interface + }, + .InterfaceNumber = CONSOLE_INTERFACE, + .AlternateSetting = 0x00, + .TotalEndpoints = 2, + .Class = HID_CSCP_HIDClass, + .SubClass = HID_CSCP_NonBootSubclass, + .Protocol = HID_CSCP_NonBootProtocol, + .InterfaceStrIndex = NO_DESCRIPTOR + }, + .Console_HID = { + .Header = { + .Size = sizeof(USB_HID_Descriptor_HID_t), + .Type = HID_DTYPE_HID + }, + .HIDSpec = VERSION_BCD(1, 1, 1), + .CountryCode = 0x00, + .TotalReportDescriptors = 1, + .HIDReportType = HID_DTYPE_Report, + .HIDReportLength = sizeof(ConsoleReport) + }, + .Console_INEndpoint = { + .Header = { + .Size = sizeof(USB_Descriptor_Endpoint_t), + .Type = DTYPE_Endpoint + }, + .EndpointAddress = (ENDPOINT_DIR_IN | CONSOLE_IN_EPNUM), + .Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), + .EndpointSize = CONSOLE_EPSIZE, + .PollingIntervalMS = 0x01 + }, + .Console_OUTEndpoint = { + .Header = { + .Size = sizeof(USB_Descriptor_Endpoint_t), + .Type = DTYPE_Endpoint + }, + .EndpointAddress = (ENDPOINT_DIR_OUT | CONSOLE_OUT_EPNUM), + .Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), + .EndpointSize = CONSOLE_EPSIZE, + .PollingIntervalMS = 0x01 + }, #endif #ifdef MIDI_ENABLE - /* - * MIDI - */ - .Audio_Interface_Association = - { - .Header = {.Size = sizeof(USB_Descriptor_Interface_Association_t), .Type = DTYPE_InterfaceAssociation}, - .FirstInterfaceIndex = AC_INTERFACE, - .TotalInterfaces = 2, - .Class = AUDIO_CSCP_AudioClass, - .SubClass = AUDIO_CSCP_ControlSubclass, - .Protocol = AUDIO_CSCP_ControlProtocol, - .IADStrIndex = NO_DESCRIPTOR, - }, - .Audio_ControlInterface = {.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface}, - - .InterfaceNumber = AC_INTERFACE, - .AlternateSetting = 0, - .TotalEndpoints = 0, - .Class = AUDIO_CSCP_AudioClass, - .SubClass = AUDIO_CSCP_ControlSubclass, - .Protocol = AUDIO_CSCP_ControlProtocol, - .InterfaceStrIndex = NO_DESCRIPTOR}, - .Audio_ControlInterface_SPC = - { - .Header = {.Size = sizeof(USB_Audio_Descriptor_Interface_AC_t), .Type = AUDIO_DTYPE_CSInterface}, - .Subtype = AUDIO_DSUBTYPE_CSInterface_Header, - .ACSpecification = VERSION_BCD(1, 0, 0), - .TotalLength = sizeof(USB_Audio_Descriptor_Interface_AC_t), - .InCollection = 1, - .InterfaceNumber = AS_INTERFACE, - }, - .Audio_StreamInterface = {.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface}, - - .InterfaceNumber = AS_INTERFACE, - .AlternateSetting = 0, - .TotalEndpoints = 2, - .Class = AUDIO_CSCP_AudioClass, - .SubClass = AUDIO_CSCP_MIDIStreamingSubclass, - .Protocol = AUDIO_CSCP_StreamingProtocol, - .InterfaceStrIndex = NO_DESCRIPTOR}, - .Audio_StreamInterface_SPC = {.Header = {.Size = sizeof(USB_MIDI_Descriptor_AudioInterface_AS_t), .Type = AUDIO_DTYPE_CSInterface}, .Subtype = AUDIO_DSUBTYPE_CSInterface_General, .AudioSpecification = VERSION_BCD(1, 0, 0), .TotalLength = offsetof(USB_Descriptor_Configuration_t, MIDI_Out_Jack_Endpoint_SPC) + sizeof(USB_MIDI_Descriptor_Jack_Endpoint_t) - offsetof(USB_Descriptor_Configuration_t, Audio_StreamInterface_SPC)}, - .MIDI_In_Jack_Emb = {.Header = {.Size = sizeof(USB_MIDI_Descriptor_InputJack_t), .Type = AUDIO_DTYPE_CSInterface}, .Subtype = AUDIO_DSUBTYPE_CSInterface_InputTerminal, .JackType = MIDI_JACKTYPE_Embedded, .JackID = 0x01, .JackStrIndex = NO_DESCRIPTOR}, - .MIDI_In_Jack_Ext = {.Header = {.Size = sizeof(USB_MIDI_Descriptor_InputJack_t), .Type = AUDIO_DTYPE_CSInterface}, .Subtype = AUDIO_DSUBTYPE_CSInterface_InputTerminal, .JackType = MIDI_JACKTYPE_External, .JackID = 0x02, .JackStrIndex = NO_DESCRIPTOR}, - .MIDI_Out_Jack_Emb = {.Header = {.Size = sizeof(USB_MIDI_Descriptor_OutputJack_t), .Type = AUDIO_DTYPE_CSInterface}, .Subtype = AUDIO_DSUBTYPE_CSInterface_OutputTerminal, .JackType = MIDI_JACKTYPE_Embedded, .JackID = 0x03, .NumberOfPins = 1, .SourceJackID = {0x02}, .SourcePinID = {0x01}, .JackStrIndex = NO_DESCRIPTOR}, - .MIDI_Out_Jack_Ext = {.Header = {.Size = sizeof(USB_MIDI_Descriptor_OutputJack_t), .Type = AUDIO_DTYPE_CSInterface}, .Subtype = AUDIO_DSUBTYPE_CSInterface_OutputTerminal, .JackType = MIDI_JACKTYPE_External, .JackID = 0x04, .NumberOfPins = 1, .SourceJackID = {0x01}, .SourcePinID = {0x01}, .JackStrIndex = NO_DESCRIPTOR}, - .MIDI_In_Jack_Endpoint = {.Endpoint = {.Header = {.Size = sizeof(USB_Audio_Descriptor_StreamEndpoint_Std_t), .Type = DTYPE_Endpoint}, .EndpointAddress = MIDI_STREAM_OUT_EPADDR, .Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = MIDI_STREAM_EPSIZE, .PollingIntervalMS = 0x05}, - - .Refresh = 0, - .SyncEndpointNumber = 0}, - .MIDI_In_Jack_Endpoint_SPC = {.Header = {.Size = sizeof(USB_MIDI_Descriptor_Jack_Endpoint_t), .Type = AUDIO_DTYPE_CSEndpoint}, .Subtype = AUDIO_DSUBTYPE_CSEndpoint_General, .TotalEmbeddedJacks = 0x01, .AssociatedJackID = {0x01}}, - .MIDI_Out_Jack_Endpoint = {.Endpoint = {.Header = {.Size = sizeof(USB_Audio_Descriptor_StreamEndpoint_Std_t), .Type = DTYPE_Endpoint}, .EndpointAddress = MIDI_STREAM_IN_EPADDR, .Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = MIDI_STREAM_EPSIZE, .PollingIntervalMS = 0x05}, - - .Refresh = 0, - .SyncEndpointNumber = 0}, - .MIDI_Out_Jack_Endpoint_SPC = {.Header = {.Size = sizeof(USB_MIDI_Descriptor_Jack_Endpoint_t), .Type = AUDIO_DTYPE_CSEndpoint}, .Subtype = AUDIO_DSUBTYPE_CSEndpoint_General, .TotalEmbeddedJacks = 0x01, .AssociatedJackID = {0x03}}, + /* + * MIDI + */ + .Audio_Interface_Association = { + .Header = { + .Size = sizeof(USB_Descriptor_Interface_Association_t), + .Type = DTYPE_InterfaceAssociation + }, + .FirstInterfaceIndex = AC_INTERFACE, + .TotalInterfaces = 2, + .Class = AUDIO_CSCP_AudioClass, + .SubClass = AUDIO_CSCP_ControlSubclass, + .Protocol = AUDIO_CSCP_ControlProtocol, + .IADStrIndex = NO_DESCRIPTOR, + }, + .Audio_ControlInterface = { + .Header = { + .Size = sizeof(USB_Descriptor_Interface_t), + .Type = DTYPE_Interface + }, + .InterfaceNumber = AC_INTERFACE, + .AlternateSetting = 0, + .TotalEndpoints = 0, + .Class = AUDIO_CSCP_AudioClass, + .SubClass = AUDIO_CSCP_ControlSubclass, + .Protocol = AUDIO_CSCP_ControlProtocol, + .InterfaceStrIndex = NO_DESCRIPTOR + }, + .Audio_ControlInterface_SPC = { + .Header = { + .Size = sizeof(USB_Audio_Descriptor_Interface_AC_t), + .Type = AUDIO_DTYPE_CSInterface + }, + .Subtype = AUDIO_DSUBTYPE_CSInterface_Header, + .ACSpecification = VERSION_BCD(1, 0, 0), + .TotalLength = sizeof(USB_Audio_Descriptor_Interface_AC_t), + .InCollection = 1, + .InterfaceNumber = AS_INTERFACE, + }, + .Audio_StreamInterface = { + .Header = { + .Size = sizeof(USB_Descriptor_Interface_t), + .Type = DTYPE_Interface + }, + .InterfaceNumber = AS_INTERFACE, + .AlternateSetting = 0, + .TotalEndpoints = 2, + .Class = AUDIO_CSCP_AudioClass, + .SubClass = AUDIO_CSCP_MIDIStreamingSubclass, + .Protocol = AUDIO_CSCP_StreamingProtocol, + .InterfaceStrIndex = NO_DESCRIPTOR + }, + .Audio_StreamInterface_SPC = { + .Header = { + .Size = sizeof(USB_MIDI_Descriptor_AudioInterface_AS_t), + .Type = AUDIO_DTYPE_CSInterface + }, + .Subtype = AUDIO_DSUBTYPE_CSInterface_General, + .AudioSpecification = VERSION_BCD(1, 0, 0), + .TotalLength = offsetof(USB_Descriptor_Configuration_t, MIDI_Out_Jack_Endpoint_SPC) + sizeof(USB_MIDI_Descriptor_Jack_Endpoint_t) - offsetof(USB_Descriptor_Configuration_t, Audio_StreamInterface_SPC) + }, + .MIDI_In_Jack_Emb = { + .Header = { + .Size = sizeof(USB_MIDI_Descriptor_InputJack_t), + .Type = AUDIO_DTYPE_CSInterface + }, + .Subtype = AUDIO_DSUBTYPE_CSInterface_InputTerminal, + .JackType = MIDI_JACKTYPE_Embedded, + .JackID = 0x01, + .JackStrIndex = NO_DESCRIPTOR + }, + .MIDI_In_Jack_Ext = { + .Header = { + .Size = sizeof(USB_MIDI_Descriptor_InputJack_t), + .Type = AUDIO_DTYPE_CSInterface + }, + .Subtype = AUDIO_DSUBTYPE_CSInterface_InputTerminal, + .JackType = MIDI_JACKTYPE_External, + .JackID = 0x02, + .JackStrIndex = NO_DESCRIPTOR + }, + .MIDI_Out_Jack_Emb = { + .Header = { + .Size = sizeof(USB_MIDI_Descriptor_OutputJack_t), + .Type = AUDIO_DTYPE_CSInterface + }, + .Subtype = AUDIO_DSUBTYPE_CSInterface_OutputTerminal, + .JackType = MIDI_JACKTYPE_Embedded, + .JackID = 0x03, + .NumberOfPins = 1, + .SourceJackID = {0x02}, + .SourcePinID = {0x01}, + .JackStrIndex = NO_DESCRIPTOR + }, + .MIDI_Out_Jack_Ext = { + .Header = { + .Size = sizeof(USB_MIDI_Descriptor_OutputJack_t), + .Type = AUDIO_DTYPE_CSInterface + }, + .Subtype = AUDIO_DSUBTYPE_CSInterface_OutputTerminal, + .JackType = MIDI_JACKTYPE_External, + .JackID = 0x04, + .NumberOfPins = 1, + .SourceJackID = {0x01}, + .SourcePinID = {0x01}, + .JackStrIndex = NO_DESCRIPTOR + }, + .MIDI_In_Jack_Endpoint = { + .Endpoint = { + .Header = { + .Size = sizeof(USB_Audio_Descriptor_StreamEndpoint_Std_t), + .Type = DTYPE_Endpoint + }, + .EndpointAddress = MIDI_STREAM_OUT_EPADDR, + .Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), + .EndpointSize = MIDI_STREAM_EPSIZE, + .PollingIntervalMS = 0x05 + }, + .Refresh = 0, + .SyncEndpointNumber = 0 + }, + .MIDI_In_Jack_Endpoint_SPC = { + .Header = { + .Size = sizeof(USB_MIDI_Descriptor_Jack_Endpoint_t), + .Type = AUDIO_DTYPE_CSEndpoint + }, + .Subtype = AUDIO_DSUBTYPE_CSEndpoint_General, + .TotalEmbeddedJacks = 0x01, + .AssociatedJackID = {0x01} + }, + .MIDI_Out_Jack_Endpoint = { + .Endpoint = { + .Header = { + .Size = sizeof(USB_Audio_Descriptor_StreamEndpoint_Std_t), + .Type = DTYPE_Endpoint + }, + .EndpointAddress = MIDI_STREAM_IN_EPADDR, + .Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), + .EndpointSize = MIDI_STREAM_EPSIZE, + .PollingIntervalMS = 0x05 + }, + .Refresh = 0, + .SyncEndpointNumber = 0 + }, + .MIDI_Out_Jack_Endpoint_SPC = { + .Header = { + .Size = sizeof(USB_MIDI_Descriptor_Jack_Endpoint_t), + .Type = AUDIO_DTYPE_CSEndpoint + }, + .Subtype = AUDIO_DSUBTYPE_CSEndpoint_General, + .TotalEmbeddedJacks = 0x01, + .AssociatedJackID = {0x03} + }, #endif #ifdef VIRTSER_ENABLE - /* - * Virtual Serial - */ - .CDC_Interface_Association = - { - .Header = {.Size = sizeof(USB_Descriptor_Interface_Association_t), .Type = DTYPE_InterfaceAssociation}, - .FirstInterfaceIndex = CCI_INTERFACE, - .TotalInterfaces = 2, - .Class = CDC_CSCP_CDCClass, - .SubClass = CDC_CSCP_ACMSubclass, - .Protocol = CDC_CSCP_ATCommandProtocol, - .IADStrIndex = NO_DESCRIPTOR, - }, - .CDC_CCI_Interface = {.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface}, .InterfaceNumber = CCI_INTERFACE, .AlternateSetting = 0, .TotalEndpoints = 1, .Class = CDC_CSCP_CDCClass, .SubClass = CDC_CSCP_ACMSubclass, .Protocol = CDC_CSCP_ATCommandProtocol, .InterfaceStrIndex = NO_DESCRIPTOR}, - .CDC_Functional_Header = - { - .Header = {.Size = sizeof(USB_CDC_Descriptor_FunctionalHeader_t), .Type = CDC_DTYPE_CSInterface}, - .Subtype = 0x00, - .CDCSpecification = VERSION_BCD(1, 1, 0), - }, - .CDC_Functional_ACM = - { - .Header = {.Size = sizeof(USB_CDC_Descriptor_FunctionalACM_t), .Type = CDC_DTYPE_CSInterface}, - .Subtype = 0x02, - .Capabilities = 0x02, - }, - .CDC_Functional_Union = - { - .Header = {.Size = sizeof(USB_CDC_Descriptor_FunctionalUnion_t), .Type = CDC_DTYPE_CSInterface}, - .Subtype = 0x06, - .MasterInterfaceNumber = CCI_INTERFACE, - .SlaveInterfaceNumber = CDI_INTERFACE, - }, - .CDC_NotificationEndpoint = {.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint}, .EndpointAddress = CDC_NOTIFICATION_EPADDR, .Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = CDC_NOTIFICATION_EPSIZE, .PollingIntervalMS = 0xFF}, - .CDC_DCI_Interface = {.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface}, .InterfaceNumber = CDI_INTERFACE, .AlternateSetting = 0, .TotalEndpoints = 2, .Class = CDC_CSCP_CDCDataClass, .SubClass = CDC_CSCP_NoDataSubclass, .Protocol = CDC_CSCP_NoDataProtocol, .InterfaceStrIndex = NO_DESCRIPTOR}, - .CDC_DataOutEndpoint = {.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint}, .EndpointAddress = CDC_OUT_EPADDR, .Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = CDC_EPSIZE, .PollingIntervalMS = 0x05}, - .CDC_DataInEndpoint = {.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint}, .EndpointAddress = CDC_IN_EPADDR, .Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = CDC_EPSIZE, .PollingIntervalMS = 0x05}, + /* + * Virtual Serial + */ + .CDC_Interface_Association = { + .Header = { + .Size = sizeof(USB_Descriptor_Interface_Association_t), + .Type = DTYPE_InterfaceAssociation + }, + .FirstInterfaceIndex = CCI_INTERFACE, + .TotalInterfaces = 2, + .Class = CDC_CSCP_CDCClass, + .SubClass = CDC_CSCP_ACMSubclass, + .Protocol = CDC_CSCP_ATCommandProtocol, + .IADStrIndex = NO_DESCRIPTOR, + }, + .CDC_CCI_Interface = { + .Header = { + .Size = sizeof(USB_Descriptor_Interface_t), + .Type = DTYPE_Interface + }, + .InterfaceNumber = CCI_INTERFACE, + .AlternateSetting = 0, + .TotalEndpoints = 1, + .Class = CDC_CSCP_CDCClass, + .SubClass = CDC_CSCP_ACMSubclass, + .Protocol = CDC_CSCP_ATCommandProtocol, + .InterfaceStrIndex = NO_DESCRIPTOR + }, + .CDC_Functional_Header = { + .Header = { + .Size = sizeof(USB_CDC_Descriptor_FunctionalHeader_t), + .Type = CDC_DTYPE_CSInterface + }, + .Subtype = 0x00, + .CDCSpecification = VERSION_BCD(1, 1, 0), + }, + .CDC_Functional_ACM = { + .Header = { + .Size = sizeof(USB_CDC_Descriptor_FunctionalACM_t), + .Type = CDC_DTYPE_CSInterface + }, + .Subtype = 0x02, + .Capabilities = 0x02, + }, + .CDC_Functional_Union = { + .Header = { + .Size = sizeof(USB_CDC_Descriptor_FunctionalUnion_t), + .Type = CDC_DTYPE_CSInterface + }, + .Subtype = 0x06, + .MasterInterfaceNumber = CCI_INTERFACE, + .SlaveInterfaceNumber = CDI_INTERFACE, + }, + .CDC_NotificationEndpoint = { + .Header = { + .Size = sizeof(USB_Descriptor_Endpoint_t), + .Type = DTYPE_Endpoint + }, + .EndpointAddress = CDC_NOTIFICATION_EPADDR, + .Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), + .EndpointSize = CDC_NOTIFICATION_EPSIZE, + .PollingIntervalMS = 0xFF + }, + .CDC_DCI_Interface = { + .Header = { + .Size = sizeof(USB_Descriptor_Interface_t), + .Type = DTYPE_Interface + }, + .InterfaceNumber = CDI_INTERFACE, + .AlternateSetting = 0, + .TotalEndpoints = 2, + .Class = CDC_CSCP_CDCDataClass, + .SubClass = CDC_CSCP_NoDataSubclass, + .Protocol = CDC_CSCP_NoDataProtocol, + .InterfaceStrIndex = NO_DESCRIPTOR + }, + .CDC_DataOutEndpoint = { + .Header = { + .Size = sizeof(USB_Descriptor_Endpoint_t), + .Type = DTYPE_Endpoint + }, + .EndpointAddress = CDC_OUT_EPADDR, + .Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), + .EndpointSize = CDC_EPSIZE, + .PollingIntervalMS = 0x05 + }, + .CDC_DataInEndpoint = { + .Header = { + .Size = sizeof(USB_Descriptor_Endpoint_t), + .Type = DTYPE_Endpoint + }, + .EndpointAddress = CDC_IN_EPADDR, + .Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), + .EndpointSize = CDC_EPSIZE, + .PollingIntervalMS = 0x05 + }, #endif }; /* * String descriptors */ -const USB_Descriptor_String_t PROGMEM LanguageString = {.Header = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String}, .UnicodeString = {LANGUAGE_ID_ENG}}; +const USB_Descriptor_String_t PROGMEM LanguageString = { + .Header = { + .Size = USB_STRING_LEN(1), + .Type = DTYPE_String + }, + .UnicodeString = {LANGUAGE_ID_ENG} +}; -const USB_Descriptor_String_t PROGMEM ManufacturerString = {.Header = {.Size = USB_STRING_LEN(sizeof(STR(MANUFACTURER)) - 1), // Subtract 1 for null terminator - .Type = DTYPE_String}, - .UnicodeString = LSTR(MANUFACTURER)}; +const USB_Descriptor_String_t PROGMEM ManufacturerString = { + .Header = { + .Size = USB_STRING_LEN(sizeof(STR(MANUFACTURER)) - 1), // Subtract 1 for null terminator + .Type = DTYPE_String + }, + .UnicodeString = LSTR(MANUFACTURER) +}; -const USB_Descriptor_String_t PROGMEM ProductString = {.Header = {.Size = USB_STRING_LEN(sizeof(STR(PRODUCT)) - 1), // Subtract 1 for null terminator - .Type = DTYPE_String}, - .UnicodeString = LSTR(PRODUCT)}; +const USB_Descriptor_String_t PROGMEM ProductString = { + .Header = { + .Size = USB_STRING_LEN(sizeof(STR(PRODUCT)) - 1), // Subtract 1 for null terminator + .Type = DTYPE_String + }, + .UnicodeString = LSTR(PRODUCT) +}; #ifndef SERIAL_NUMBER # define SERIAL_NUMBER 0 #endif -const USB_Descriptor_String_t PROGMEM SerialNumberString = {.Header = {.Size = USB_STRING_LEN(sizeof(STR(SERIAL_NUMBER)) - 1), // Subtract 1 for null terminator - .Type = DTYPE_String}, - .UnicodeString = LSTR(SERIAL_NUMBER)}; +const USB_Descriptor_String_t PROGMEM SerialNumberString = { + .Header = { + .Size = USB_STRING_LEN(sizeof(STR(SERIAL_NUMBER)) - 1), // Subtract 1 for null terminator + .Type = DTYPE_String + }, + .UnicodeString = LSTR(SERIAL_NUMBER) +}; + +// clang-format on /** * This function is called by the library when in device mode, and must be overridden (see library "USB Descriptors" From dc1137129d063975b3191853dc96d0095fcf94d6 Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Mon, 4 Nov 2019 23:05:51 -0800 Subject: [PATCH 275/316] [Keyboard] Add LAYOUT_60_iso to XD60 (#7263) * refactor iso keymap - remove redundant action_layer.h include - use enum for layer management - QMK coding conventions (four-space indent) * add LAYOUT_60_iso macro * enable 60_iso community layout for both revisions * swap KC_HOME to KC_RSFT * update ISO keymap readme * update default keymap readme `make` command no longer valid. * refactor keyboard readme Update to reflect current QMK template. * add LAYOUT_60_iso data to info.json * use #pragma once in header files --- keyboards/xd60/info.json | 4 +++ keyboards/xd60/keymaps/default/readme.md | 6 +++- keyboards/xd60/keymaps/iso/keymap.c | 39 +++++++++++++----------- keyboards/xd60/keymaps/iso/readme.md | 19 +++++++++--- keyboards/xd60/readme.md | 19 +++++------- keyboards/xd60/rev2/config.h | 5 +-- keyboards/xd60/rev2/rules.mk | 2 +- keyboards/xd60/rev3/rules.mk | 2 +- keyboards/xd60/xd60.h | 18 ++++++++--- 9 files changed, 69 insertions(+), 45 deletions(-) diff --git a/keyboards/xd60/info.json b/keyboards/xd60/info.json index ba3c4b5413e0..c69e8a78872f 100644 --- a/keyboards/xd60/info.json +++ b/keyboards/xd60/info.json @@ -10,6 +10,10 @@ "LAYOUT_60_ansi": { "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + }, + + "LAYOUT_60_iso": { + "layout": [{"label":"\u00ac", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"\u00a3", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"@", "x":11.75, "y":2}, {"label":"~", "x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"GUI", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"label":"Space", "x":3.75, "y":4, "w":6.25}, {"label":"AltGr", "x":10, "y":4, "w":1.25}, {"label":"GUI", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] } } } diff --git a/keyboards/xd60/keymaps/default/readme.md b/keyboards/xd60/keymaps/default/readme.md index 248e0a60673c..7d6bc75365ce 100644 --- a/keyboards/xd60/keymaps/default/readme.md +++ b/keyboards/xd60/keymaps/default/readme.md @@ -6,4 +6,8 @@ Default Keymap for XD60 as indicated on the original sale page. ## Build -To build the default keymap, simply run `make xd60:default`. + +To build the default keymap, simply run: + + make xd60/rev2:default # XD60 rev2 + make xd60/rev3:default # XD60 rev3 diff --git a/keyboards/xd60/keymaps/iso/keymap.c b/keyboards/xd60/keymaps/iso/keymap.c index bb4f8eff8494..0f4694ca6319 100644 --- a/keyboards/xd60/keymaps/iso/keymap.c +++ b/keyboards/xd60/keymaps/iso/keymap.c @@ -1,30 +1,33 @@ #include QMK_KEYBOARD_H -#include "action_layer.h" -#define _BL 0 -#define _FL 1 +enum layer_names { + _BL, + _FL, +}; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - // 0: Base Layer - [_BL] = LAYOUT_all( - 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_NO, \ - 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_NO, \ - 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_LSFT, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,KC_DEL, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT), + //,: Base Layer + [_BL] = LAYOUT_60_iso( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_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_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_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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL + ), - // 1: Function Layer - [_FL] = LAYOUT_all( - RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_NO, \ - KC_NO, KC_VOLD, KC_MUTE, KC_VOLU, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, BL_TOGG, BL_DEC, BL_INC, KC_NO, \ - KC_NO, KC_MPLY, KC_MSTP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_ENT, \ - KC_LSFT, RGB_TOG, RGB_MOD, KC_CUT, KC_COPY,KC_PASTE,RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD, KC_HOME, KC_PGUP, KC_END, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, MO(1), KC_NO, KC_PGDOWN, KC_NO), + //,: Function Layer + [_FL] = LAYOUT_60_iso( + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, + XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, BL_TOGG, BL_DEC, BL_INC, + XXXXXXX, KC_MPLY, KC_MSTP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_ENT, + KC_LSFT, RGB_TOG, RGB_MOD, KC_CUT, KC_COPY, KC_PSTE, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL + ) }; // Loop void matrix_scan_user(void) { - // Empty + // Empty }; diff --git a/keyboards/xd60/keymaps/iso/readme.md b/keyboards/xd60/keymaps/iso/readme.md index 82c575d981da..84374fa1858d 100644 --- a/keyboards/xd60/keymaps/iso/readme.md +++ b/keyboards/xd60/keymaps/iso/readme.md @@ -1,9 +1,20 @@ # iso Keymap for XIUDI's 60% XD60 PCB -![iso Keymap for XD60]() - -## Additional Notes iso Keymap for XD60. +## Keymap + +### Base Layer + +![Layer 0](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/xd60/keymaps/iso/layer0.png) + +### Function Layer + +![Layer 1](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/xd60/keymaps/iso/layer1.png) + ## Build -To build the default keymap, simply run `make xd60:iso`. + +To build the default keymap, simply run: + + make xd60/rev2:iso # XD60 rev2 + make xd60/rev3:iso # XD60 rev3 diff --git a/keyboards/xd60/readme.md b/keyboards/xd60/readme.md index b9862428c777..4280414827be 100644 --- a/keyboards/xd60/readme.md +++ b/keyboards/xd60/readme.md @@ -1,21 +1,16 @@ -XD60 -== +# XD60 Compact 60% with arrows. ![Top View of a pair of XD60 Keyboard](https://i.imgur.com/3Jq2743.jpg) -Keyboard Maintainer: QMK Community -Hardware Supported: XD60 PCB rev2 & rev3 -Hardware Availability: https://www.massdrop.com/buy/xd60-xd64-custom-mechanical-keyboard-kit?mode=guest_open +* Keyboard Maintainer: QMK Community +* Hardware Supported: XD60 PCB rev2 & rev3 +* Hardware Availability: [Drop.com](https://www.drop.com/buy/xd60-xd64-custom-mechanical-keyboard-kit?mode=guest_open), [KPRepublic on AliExpress](https://www.aliexpress.com/item/32814945677.html) -With the implementation of Rev3 you need to specify the Rev you want to build. -To build for a Rev2 with a default keymap: +Make example for this keyboard (after setting up your build environment): -```make xd60/rev2:default``` - -To build for a Rev3 with a default keymap: - -```make xd60/rev3:default``` + make xd60/rev2:default # rev2 + make xd60/rev3:default # rev3 See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/xd60/rev2/config.h b/keyboards/xd60/rev2/config.h index 5f23f6eac31b..26dbb50e30b6 100644 --- a/keyboards/xd60/rev2/config.h +++ b/keyboards/xd60/rev2/config.h @@ -15,8 +15,7 @@ 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 +#pragma once #include "config_common.h" @@ -70,5 +69,3 @@ along with this program. If not, see . #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE - -#endif diff --git a/keyboards/xd60/rev2/rules.mk b/keyboards/xd60/rev2/rules.mk index 37f281b0cc43..b6a8c05d2ff0 100644 --- a/keyboards/xd60/rev2/rules.mk +++ b/keyboards/xd60/rev2/rules.mk @@ -26,4 +26,4 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -LAYOUTS = 60_ansi +LAYOUTS = 60_ansi 60_iso diff --git a/keyboards/xd60/rev3/rules.mk b/keyboards/xd60/rev3/rules.mk index 8e1fd415b1ca..7cff162c9f96 100644 --- a/keyboards/xd60/rev3/rules.mk +++ b/keyboards/xd60/rev3/rules.mk @@ -26,4 +26,4 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -LAYOUTS = 60_ansi +LAYOUTS = 60_ansi 60_iso diff --git a/keyboards/xd60/xd60.h b/keyboards/xd60/xd60.h index 579d67dd3436..3946138c3810 100644 --- a/keyboards/xd60/xd60.h +++ b/keyboards/xd60/xd60.h @@ -1,8 +1,6 @@ -#ifndef XD60_H -#define XD60_H +#pragma once #include "quantum.h" -#include "led.h" /* XD60 LEDs * GPIO pads @@ -48,4 +46,16 @@ inline void xd60_bl_led_off(void) { DDRF &= ~(1<<5); PORTF &= ~(1<<5); } { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D } \ } -#endif +#define LAYOUT_60_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, \ + 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, K3D, \ + K40, K41, K42, K45, K4A, K4B, K4C, K4D \ +) { \ + { 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, KC_NO }, \ + { 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, KC_NO, K3D }, \ + { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D } \ +} From dcb2d63302fefe1b37b8ca606ce7241ae8655389 Mon Sep 17 00:00:00 2001 From: x1 Date: Tue, 5 Nov 2019 16:07:31 +0900 Subject: [PATCH 276/316] [Keyboard] Add Kudox Rev2 (#7253) * Add a directory as rev2 in keybords/kudox. * Modified default keymap of Kudox. * Modified JIS keymap of Kudox. * Changed kudox default from rev1 to rev2. * Modified a keymap of kudox/x1. * Move keyboards/kudox/keymaps to keyboards/kudox/rev1/. * Remove keyboards/kudox/info.json. * Modified kudox's READMEs. * Remove unnecessary codes. --- keyboards/kudox/kudox.h | 3 + keyboards/kudox/readme.md | 11 ++- keyboards/kudox/{ => rev1}/info.json | 6 +- .../kudox/{ => rev1}/keymaps/default/config.h | 0 .../kudox/{ => rev1}/keymaps/default/keymap.c | 0 .../{ => rev1}/keymaps/default/readme.md | 0 .../kudox/{ => rev1}/keymaps/jis/config.h | 0 .../kudox/{ => rev1}/keymaps/jis/keymap.c | 0 .../kudox/{ => rev1}/keymaps/jis/readme.md | 0 .../kudox/{ => rev1}/keymaps/jis/rules.mk | 0 .../kudox/{ => rev1}/keymaps/x1/config.h | 0 .../kudox/{ => rev1}/keymaps/x1/keymap.c | 0 .../kudox/{ => rev1}/keymaps/x1/readme.md | 0 .../kudox/{ => rev1}/keymaps/x1/rules.mk | 0 keyboards/kudox/rev2/config.h | 91 +++++++++++++++++++ keyboards/kudox/rev2/info.json | 77 ++++++++++++++++ keyboards/kudox/rev2/keymaps/default/config.h | 17 ++++ keyboards/kudox/rev2/keymaps/default/keymap.c | 49 ++++++++++ .../kudox/rev2/keymaps/default/readme.md | 3 + keyboards/kudox/rev2/keymaps/jis/config.h | 17 ++++ keyboards/kudox/rev2/keymaps/jis/keymap.c | 48 ++++++++++ keyboards/kudox/rev2/keymaps/jis/readme.md | 3 + keyboards/kudox/rev2/keymaps/jis/rules.mk | 0 keyboards/kudox/rev2/rev2.c | 0 keyboards/kudox/rev2/rev2.h | 23 +++++ keyboards/kudox/rev2/rules.mk | 0 keyboards/kudox/rules.mk | 2 +- 27 files changed, 341 insertions(+), 9 deletions(-) rename keyboards/kudox/{ => rev1}/info.json (97%) rename keyboards/kudox/{ => rev1}/keymaps/default/config.h (100%) rename keyboards/kudox/{ => rev1}/keymaps/default/keymap.c (100%) rename keyboards/kudox/{ => rev1}/keymaps/default/readme.md (100%) rename keyboards/kudox/{ => rev1}/keymaps/jis/config.h (100%) rename keyboards/kudox/{ => rev1}/keymaps/jis/keymap.c (100%) rename keyboards/kudox/{ => rev1}/keymaps/jis/readme.md (100%) rename keyboards/kudox/{ => rev1}/keymaps/jis/rules.mk (100%) rename keyboards/kudox/{ => rev1}/keymaps/x1/config.h (100%) rename keyboards/kudox/{ => rev1}/keymaps/x1/keymap.c (100%) rename keyboards/kudox/{ => rev1}/keymaps/x1/readme.md (100%) rename keyboards/kudox/{ => rev1}/keymaps/x1/rules.mk (100%) create mode 100644 keyboards/kudox/rev2/config.h create mode 100644 keyboards/kudox/rev2/info.json create mode 100644 keyboards/kudox/rev2/keymaps/default/config.h create mode 100644 keyboards/kudox/rev2/keymaps/default/keymap.c create mode 100644 keyboards/kudox/rev2/keymaps/default/readme.md create mode 100644 keyboards/kudox/rev2/keymaps/jis/config.h create mode 100644 keyboards/kudox/rev2/keymaps/jis/keymap.c create mode 100644 keyboards/kudox/rev2/keymaps/jis/readme.md create mode 100644 keyboards/kudox/rev2/keymaps/jis/rules.mk create mode 100644 keyboards/kudox/rev2/rev2.c create mode 100644 keyboards/kudox/rev2/rev2.h create mode 100644 keyboards/kudox/rev2/rules.mk diff --git a/keyboards/kudox/kudox.h b/keyboards/kudox/kudox.h index 8ff75559d1fd..176f02fb5f98 100644 --- a/keyboards/kudox/kudox.h +++ b/keyboards/kudox/kudox.h @@ -19,5 +19,8 @@ #ifdef KEYBOARD_kudox_rev1 #include "rev1.h" #endif +#ifdef KEYBOARD_kudox_rev2 + #include "rev2.h" +#endif #include "quantum.h" diff --git a/keyboards/kudox/readme.md b/keyboards/kudox/readme.md index 42e1ed937202..cc97bf83b0a7 100644 --- a/keyboards/kudox/readme.md +++ b/keyboards/kudox/readme.md @@ -5,22 +5,25 @@

-Kudox PCB rev1.0 +Kudox PCB rev2.0

- Keyboard Maintainer: [Kumao Kobo](/~https://github.com/kumaokobo) -- Hardware Supported: Kudox PCB rev1.0 w/ Pro Micro +- Hardware Supported: Kudox PCB rev1.0 rev2.0 w/ Pro Micro Make example for this keyboard (after setting up your build environment): ```sh -make kudox/rev1:default +make kudox/rev2:default ``` + Example of flashing this keyboard: ```sh -make kudox/rev1:default:avrdude +make kudox/rev2:default:flash ``` +*keymaps/default is for rev2.0. If you want to use rev1.0, you should remove Left-06 key and Right-06 key.* + See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/kudox/info.json b/keyboards/kudox/rev1/info.json similarity index 97% rename from keyboards/kudox/info.json rename to keyboards/kudox/rev1/info.json index 842fb655c6a0..f92d525838a0 100644 --- a/keyboards/kudox/info.json +++ b/keyboards/kudox/rev1/info.json @@ -1,9 +1,7 @@ { - "keyboard_name": "Kudox Keyboard", - "url": "", + "url": "http://kumaokobo.com/", "maintainer": "Kumao Kobo", - "width": 17, - "height": 6, + "keyboard_name": "Kudox Keyboard Rev1", "layouts": { "LAYOUT": { "layout": [ diff --git a/keyboards/kudox/keymaps/default/config.h b/keyboards/kudox/rev1/keymaps/default/config.h similarity index 100% rename from keyboards/kudox/keymaps/default/config.h rename to keyboards/kudox/rev1/keymaps/default/config.h diff --git a/keyboards/kudox/keymaps/default/keymap.c b/keyboards/kudox/rev1/keymaps/default/keymap.c similarity index 100% rename from keyboards/kudox/keymaps/default/keymap.c rename to keyboards/kudox/rev1/keymaps/default/keymap.c diff --git a/keyboards/kudox/keymaps/default/readme.md b/keyboards/kudox/rev1/keymaps/default/readme.md similarity index 100% rename from keyboards/kudox/keymaps/default/readme.md rename to keyboards/kudox/rev1/keymaps/default/readme.md diff --git a/keyboards/kudox/keymaps/jis/config.h b/keyboards/kudox/rev1/keymaps/jis/config.h similarity index 100% rename from keyboards/kudox/keymaps/jis/config.h rename to keyboards/kudox/rev1/keymaps/jis/config.h diff --git a/keyboards/kudox/keymaps/jis/keymap.c b/keyboards/kudox/rev1/keymaps/jis/keymap.c similarity index 100% rename from keyboards/kudox/keymaps/jis/keymap.c rename to keyboards/kudox/rev1/keymaps/jis/keymap.c diff --git a/keyboards/kudox/keymaps/jis/readme.md b/keyboards/kudox/rev1/keymaps/jis/readme.md similarity index 100% rename from keyboards/kudox/keymaps/jis/readme.md rename to keyboards/kudox/rev1/keymaps/jis/readme.md diff --git a/keyboards/kudox/keymaps/jis/rules.mk b/keyboards/kudox/rev1/keymaps/jis/rules.mk similarity index 100% rename from keyboards/kudox/keymaps/jis/rules.mk rename to keyboards/kudox/rev1/keymaps/jis/rules.mk diff --git a/keyboards/kudox/keymaps/x1/config.h b/keyboards/kudox/rev1/keymaps/x1/config.h similarity index 100% rename from keyboards/kudox/keymaps/x1/config.h rename to keyboards/kudox/rev1/keymaps/x1/config.h diff --git a/keyboards/kudox/keymaps/x1/keymap.c b/keyboards/kudox/rev1/keymaps/x1/keymap.c similarity index 100% rename from keyboards/kudox/keymaps/x1/keymap.c rename to keyboards/kudox/rev1/keymaps/x1/keymap.c diff --git a/keyboards/kudox/keymaps/x1/readme.md b/keyboards/kudox/rev1/keymaps/x1/readme.md similarity index 100% rename from keyboards/kudox/keymaps/x1/readme.md rename to keyboards/kudox/rev1/keymaps/x1/readme.md diff --git a/keyboards/kudox/keymaps/x1/rules.mk b/keyboards/kudox/rev1/keymaps/x1/rules.mk similarity index 100% rename from keyboards/kudox/keymaps/x1/rules.mk rename to keyboards/kudox/rev1/keymaps/x1/rules.mk diff --git a/keyboards/kudox/rev2/config.h b/keyboards/kudox/rev2/config.h new file mode 100644 index 000000000000..3a0d608c226d --- /dev/null +++ b/keyboards/kudox/rev2/config.h @@ -0,0 +1,91 @@ +/* Copyright 2019 Kumao Kobo + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x9690 +#define DEVICE_VER 0x0200 +#define MANUFACTURER Kumao Kobo +#define PRODUCT The Kudox Keyboard +#define DESCRIPTION Split row staggered 5x7 custom keyboard + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 10 +#define MATRIX_COLS 7 + +// wiring of each half +#define MATRIX_ROW_PINS { D4, D7, E6, B4, B5 } +#define MATRIX_COL_PINS { F5, F6, F7, B1, B3, B2, B6 } +// #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5} //uncomment this line and comment line above if you need to reverse left-to-right key order + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +// #define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* serial.c configuration for split keyboard */ +#define SOFT_SERIAL_PIN D0 + +/* 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 + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 + +#undef RGBLED_NUM +#define RGBLED_NUM 14 // Number of LEDs +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + +/* + * 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 + +#define MOUSEKEY_INTERVAL 20 +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_TIME_TO_MAX 60 +#define MOUSEKEY_MAX_SPEED 7 +#define MOUSEKEY_WHEEL_DELAY 0 diff --git a/keyboards/kudox/rev2/info.json b/keyboards/kudox/rev2/info.json new file mode 100644 index 000000000000..73cb5a525aa4 --- /dev/null +++ b/keyboards/kudox/rev2/info.json @@ -0,0 +1,77 @@ +{ + "url": "http://kumaokobo.com/", + "maintainer": "Kumao Kobo", + "keyboard_name": "Kudox Keyboard Rev2", + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"1", "x":1, "y":0}, + {"label":"2", "x":2, "y":0}, + {"label":"3", "x":3, "y":0}, + {"label":"4", "x":4, "y":0}, + {"label":"5", "x":5, "y":0}, + {"label":"`", "x":6, "y":0}, + {"label":"6", "x":10, "y":0}, + {"label":"7", "x":11, "y":0}, + {"label":"8", "x":12, "y":0}, + {"label":"9", "x":13, "y":0}, + {"label":"0", "x":14, "y":0}, + {"label":"-", "x":15, "y":0}, + {"label":"\u2190", "x":16, "y":0}, + {"label":"Tab", "x":0, "y":1, "w":1.25}, + {"label":"Q", "x":1.25, "y":1}, + {"label":"W", "x":2.25, "y":1}, + {"label":"E", "x":3.25, "y":1}, + {"label":"R", "x":4.25, "y":1}, + {"label":"T", "x":5.25, "y":1}, + {"label":"LANG2", "x":6.25, "y":1}, + {"label":"Y", "x":9.75, "y":1}, + {"label":"U", "x":10.75, "y":1}, + {"label":"I", "x":11.75, "y":1}, + {"label":"O", "x":12.75, "y":1}, + {"label":"P", "x":13.75, "y":1}, + {"label":"/", "x":14.75, "y":1}, + {"label":"\\", "x":15.75, "y":1, "w":1.25}, + {"label":"Ctrl", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":10.25, "y":2}, + {"label":"J", "x":11.25, "y":2}, + {"label":"K", "x":12.25, "y":2}, + {"label":"L", "x":13.25, "y":2}, + {"label":";", "x":14.25, "y":2}, + {"label":"Enter", "x":15.25, "y":2, "w":1.75}, + {"label":"Shift", "x":0, "y":3, "w":2.25}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"LANG1", "x":9.75, "y":3}, + {"label":"N", "x":10.75, "y":3}, + {"label":"M", "x":11.75, "y":3}, + {"label":",", "x":12.75, "y":3}, + {"label":".", "x":13.75, "y":3}, + {"label":"Shift", "x":14.75, "y":3, "w":2.25}, + {"label":"Alt", "x":0, "y":4, "w":1.25}, + {"label":"'", "x":1.25, "y":4}, + {"label":"-", "x":2.25, "y":4}, + {"label":"=", "x":3.25, "y":4}, + {"label":"layer", "x":4.25, "y":4.33, "w":1.25}, + {"label":"GUI", "x":5.5, "y":4.67}, + {"label":"Space", "x":6.5, "y":5}, + {"label":"Enter", "x":9.5, "y":5}, + {"label":"Del", "x":10.5, "y":4.67}, + {"label":"layer", "x":11.5, "y":4.33, "w":1.25}, + {"label":"\u2190", "x":12.75, "y":4}, + {"label":"\u2193", "x":13.75, "y":4}, + {"label":"\u2191", "x":14.75, "y":4}, + {"label":"\u2192", "x":15.75, "y":4, "w":1.25} + ] + } + } +} diff --git a/keyboards/kudox/rev2/keymaps/default/config.h b/keyboards/kudox/rev2/keymaps/default/config.h new file mode 100644 index 000000000000..f5bf85cca0ab --- /dev/null +++ b/keyboards/kudox/rev2/keymaps/default/config.h @@ -0,0 +1,17 @@ +/* Copyright 2019 Kumao Kobo + * + * 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 . + */ + +#pragma once diff --git a/keyboards/kudox/rev2/keymaps/default/keymap.c b/keyboards/kudox/rev2/keymaps/default/keymap.c new file mode 100644 index 000000000000..138a725a8cc5 --- /dev/null +++ b/keyboards/kudox/rev2/keymaps/default/keymap.c @@ -0,0 +1,49 @@ +#include QMK_KEYBOARD_H + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _QWERTY 0 +#define _SYMB 1 + +// Shortcut to make keymap more readable +#define SYM_L MO(_SYMB) + +#define KC_ALES LALT_T(KC_ESC) + +#define KC_RGENT MT(KC_RGUI, KC_ENT) + +#define KC_L1SYM LT(_SYMB, KC_LANG1) +#define KC_L2SYM LT(_SYMB, KC_LANG2) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + KC_ESC ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_GRV , KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_MINS ,KC_BSPC , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_L2SYM, KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_SLSH ,KC_BSLS , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┘ └────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_LCTL ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G , KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,KC_ENT , + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B , KC_L1SYM,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_RSFT , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┴────────┼────────┼────────┼────────┤ + KC_ALES ,KC_QUOT ,KC_MINS ,KC_EQL ,KC_ENT ,KC_LGUI ,KC_SPC , KC_RGENT,KC_DEL ,SYM_L ,KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT + //└────────┴────────┴────────┴────────┴────────┴────────┴────────┘ └────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + ), + + [_SYMB] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + KC_ESC ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 ,_______ , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_F11 ,KC_F12 , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_DQUO ,KC_QUOT ,KC_GRV ,KC_ASTR ,KC_PLUS ,KC_EQL , KC_LPRN ,KC_RPRN ,KC_PIPE ,KC_ASTR ,KC_TILD ,KC_CIRC ,KC_JYEN , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┘ └────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_AT ,KC_COLN ,KC_GRV ,_______ ,KC_MINS , KC_LBRC ,KC_RBRC ,KC_DOT ,KC_SLSH ,KC_MINS ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,KC_DOT ,KC_SLSH , _______ ,KC_LCBR ,KC_RCBR ,KC_DOT ,KC_SLSH ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┴────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,_______ ,KC_LT ,KC_UNDS ,KC_CIRC ,KC_GT + //└────────┴────────┴────────┴────────┴────────┴────────┴────────┘ └────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + ) +}; diff --git a/keyboards/kudox/rev2/keymaps/default/readme.md b/keyboards/kudox/rev2/keymaps/default/readme.md new file mode 100644 index 000000000000..9bc4ca505136 --- /dev/null +++ b/keyboards/kudox/rev2/keymaps/default/readme.md @@ -0,0 +1,3 @@ +# The default keymap for Kudox Keyboard Rev2.0 + +Left-06 key and Right-06 key are different between Rev1.0 and Rev2.0. diff --git a/keyboards/kudox/rev2/keymaps/jis/config.h b/keyboards/kudox/rev2/keymaps/jis/config.h new file mode 100644 index 000000000000..f5bf85cca0ab --- /dev/null +++ b/keyboards/kudox/rev2/keymaps/jis/config.h @@ -0,0 +1,17 @@ +/* Copyright 2019 Kumao Kobo + * + * 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 . + */ + +#pragma once diff --git a/keyboards/kudox/rev2/keymaps/jis/keymap.c b/keyboards/kudox/rev2/keymaps/jis/keymap.c new file mode 100644 index 000000000000..c78cea2331b4 --- /dev/null +++ b/keyboards/kudox/rev2/keymaps/jis/keymap.c @@ -0,0 +1,48 @@ +#include QMK_KEYBOARD_H +#include"keymap_jp.h" + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _QWERTY 0 +#define _SYMB 1 + +// Shortcut to make keymap more readable +#define SYM_L MO(_SYMB) + +#define KC_ALES LALT_T(KC_ESC) + +#define KC_L1SYM LT(_SYMB, KC_LANG1) +#define KC_L2SYM LT(_SYMB, KC_LANG2) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_QWERTY] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + KC_GRV ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_ESC , KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_MINS ,KC_BSPC , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_LANG2, KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,JP_AT ,JP_COLN , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┘ └────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_LCTL ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G , KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,KC_ENT , + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B , KC_UP ,KC_N ,KC_M ,KC_SLSH ,JP_UNDS ,KC_RSFT , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┴────────┼────────┼────────┼────────┤ + KC_ALES ,KC_LGUI ,KC_LALT ,KC_DEL ,KC_L2SYM,KC_SPC ,KC_ENT , KC_LEFT ,KC_DOWN ,KC_RGHT ,KC_COMM ,KC_DOT ,KC_L1SYM,JP_BSLS + //└────────┴────────┴────────┴────────┴────────┴────────┴────────┘ └────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + ), + + [_SYMB] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + KC_ESC ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 ,_______ , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_F11 ,KC_F12 , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,JP_LPRN ,JP_RPRN ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ , JP_HASH ,JP_DLR ,JP_PERC ,JP_PLUS ,KC_MINS ,JP_CIRC ,JP_YEN , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┘ └────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,JP_LBRC ,JP_RBRC ,XXXXXXX ,XXXXXXX ,XXXXXXX , JP_AMPR ,KC_SLSH ,JP_ASTR ,KC_SCLN ,JP_COLN ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,JP_LCBR ,JP_RCBR ,XXXXXXX ,XXXXXXX ,XXXXXXX , KC_VOLU ,XXXXXXX ,XXXXXXX ,KC_LT ,KC_GT ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┴────────┼────────┼────────┼────────┤ + _______ ,_______ ,KC_LT ,KC_GT ,KC_LANG2,_______ ,_______ , KC_MUTE ,KC_VOLD ,KC_LANG1,_______ ,_______ ,_______ ,KC_DEL + //└────────┴────────┴────────┴────────┴────────┴────────┴────────┘ └────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + ) +}; diff --git a/keyboards/kudox/rev2/keymaps/jis/readme.md b/keyboards/kudox/rev2/keymaps/jis/readme.md new file mode 100644 index 000000000000..ddf27339d1f8 --- /dev/null +++ b/keyboards/kudox/rev2/keymaps/jis/readme.md @@ -0,0 +1,3 @@ +# The JIS keymap for Kudox Keyboard Rev2.0 + +Left-06 key and Right-06 key are different between Rev1.0 and Rev2.0. diff --git a/keyboards/kudox/rev2/keymaps/jis/rules.mk b/keyboards/kudox/rev2/keymaps/jis/rules.mk new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/keyboards/kudox/rev2/rev2.c b/keyboards/kudox/rev2/rev2.c new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/keyboards/kudox/rev2/rev2.h b/keyboards/kudox/rev2/rev2.h new file mode 100644 index 000000000000..dcc745ddb799 --- /dev/null +++ b/keyboards/kudox/rev2/rev2.h @@ -0,0 +1,23 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, L06, R06, R05, R04, R03, R02, R01, R00, \ + L10, L11, L12, L13, L14, L15, L16, R16, R15, R14, R13, R12, R11, R10, \ + L20, L21, L22, L23, L24, L25, R25, R24, R23, R22, R21, R20, \ + L30, L31, L32, L33, L34, L35, R35, R34, R33, R32, R31, R30, \ + L40, L41, L42, L43, L44, L45, L46, R46, R45, R44, R43, R42, R41, R40 \ +) \ +{ \ + { L00, L01, L02, L03, L04, L05, L06 }, \ + { L10, L11, L12, L13, L14, L15, L16 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { L40, L41, L42, L43, L44, L45, L46 }, \ + { R00, R01, R02, R03, R04, R05, R06 }, \ + { R10, R11, R12, R13, R14, R15, R16 }, \ + { R20, R21, R22, R23, R24, R25 }, \ + { R30, R31, R32, R33, R34, R35 }, \ + { R40, R41, R42, R43, R44, R45, R46 } \ +} diff --git a/keyboards/kudox/rev2/rules.mk b/keyboards/kudox/rev2/rules.mk new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/keyboards/kudox/rules.mk b/keyboards/kudox/rules.mk index 68a434feb12c..5d8c2b2bb381 100644 --- a/keyboards/kudox/rules.mk +++ b/keyboards/kudox/rules.mk @@ -33,4 +33,4 @@ RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. SPLIT_KEYBOARD = yes -DEFAULT_FOLDER = kudox/rev1 +DEFAULT_FOLDER = kudox/rev2 From 8b832c494cd6d50e4f9c8384ce54733308eda95f Mon Sep 17 00:00:00 2001 From: Tsan-Kuang Lee <1425438+tsankuanglee@users.noreply.github.com> Date: Tue, 5 Nov 2019 01:14:15 -0600 Subject: [PATCH 277/316] [Keyboard] add keymap beautifier for Ergodox EZ (#4393) * add beautifier * add example * Update keyboards/ergodox_ez/util/keymap_beautifier.py Co-Authored-By: tsankuanglee <1425438+tsankuanglee@users.noreply.github.com> * Update keyboards/ergodox_ez/util/keymap_beautifier.py Co-Authored-By: tsankuanglee <1425438+tsankuanglee@users.noreply.github.com> * works for regular layout * all planned features implemented * add justification switch * docker support * doc and starting script * clean up the container after done --- keyboards/ergodox_ez/util/compile_keymap.py | 0 .../util/keymap_beautifier/Dockerfile | 8 + .../keymap_beautifier/KeymapBeautifier.py | 399 ++++++++++++++++++ .../util/keymap_beautifier/README.md | 139 ++++++ .../util/keymap_beautifier/docker_run.sh | 3 + .../util/keymap_beautifier/requirements.txt | 1 + keyboards/ergodox_ez/util/readme.md | 8 + 7 files changed, 558 insertions(+) mode change 100644 => 100755 keyboards/ergodox_ez/util/compile_keymap.py create mode 100644 keyboards/ergodox_ez/util/keymap_beautifier/Dockerfile create mode 100755 keyboards/ergodox_ez/util/keymap_beautifier/KeymapBeautifier.py create mode 100644 keyboards/ergodox_ez/util/keymap_beautifier/README.md create mode 100755 keyboards/ergodox_ez/util/keymap_beautifier/docker_run.sh create mode 100644 keyboards/ergodox_ez/util/keymap_beautifier/requirements.txt diff --git a/keyboards/ergodox_ez/util/compile_keymap.py b/keyboards/ergodox_ez/util/compile_keymap.py old mode 100644 new mode 100755 diff --git a/keyboards/ergodox_ez/util/keymap_beautifier/Dockerfile b/keyboards/ergodox_ez/util/keymap_beautifier/Dockerfile new file mode 100644 index 000000000000..fbee1d0df8b4 --- /dev/null +++ b/keyboards/ergodox_ez/util/keymap_beautifier/Dockerfile @@ -0,0 +1,8 @@ +FROM python:3.7.4-alpine3.10 + +WORKDIR /usr/src/app +COPY requirements.txt ./ +RUN pip install --no-cache-dir -r requirements.txt +COPY ./KeymapBeautifier.py ./KeymapBeautifier.py + +CMD [ "python", "./KeymapBeautifier.py", "-h" ] diff --git a/keyboards/ergodox_ez/util/keymap_beautifier/KeymapBeautifier.py b/keyboards/ergodox_ez/util/keymap_beautifier/KeymapBeautifier.py new file mode 100755 index 000000000000..b96e4c96cde8 --- /dev/null +++ b/keyboards/ergodox_ez/util/keymap_beautifier/KeymapBeautifier.py @@ -0,0 +1,399 @@ +#!/usr/bin/env python + +import argparse +import pycparser +import re + +class KeymapBeautifier: + justify_toward_center = False + filename_in = None + filename_out = None + output_layout = None + output = None + + column_max_widths = {} + + KEY_ALIASES = { + "KC_TRANSPARENT": "_______", + "KC_TRNS": "_______", + "KC_NO": "XXXXXXX", + } + KEYMAP_START = 'const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {\n' + KEYMAP_END = '};\n' + KEYMAP_START_REPLACEMENT = "const int keymaps[]={\n" + KEY_CHART = """ + /* + * ,--------------------------------------------------. ,--------------------------------------------------. + * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | | 38 | 39 | 40 | 41 | 42 | 43 | 44 | + * |--------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| + * | 7 | 8 | 9 | 10 | 11 | 12 | 13 | | 45 | 46 | 47 | 48 | 49 | 50 | 51 | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | 14 | 15 | 16 | 17 | 18 | 19 |------| |------| 52 | 53 | 54 | 55 | 56 | 57 | + * |--------+------+------+------+------+------| 26 | | 58 |------+------+------+------+------+--------| + * | 20 | 21 | 22 | 23 | 24 | 25 | | | | 59 | 60 | 61 | 62 | 63 | 64 | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | 27 | 28 | 29 | 30 | 31 | | 65 | 66 | 67 | 68 | 69 | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | 32 | 33 | | 70 | 71 | + * ,------+------+------| |------+------+------. + * | | | 34 | | 72 | | | + * | 35 | 36 |------| |------| 74 | 75 | + * | | | 37 | | 73 | | | + * `--------------------' `--------------------' + */ +""" + KEY_COORDINATES = { + 'LAYOUT_ergodox': [ + # left hand + (0,0), (0,1), (0,2), (0,3), (0,4), (0,5), (0,6), + (1,0), (1,1), (1,2), (1,3), (1,4), (1,5), (1,6), + (2,0), (2,1), (2,2), (2,3), (2,4), (2,5), + (3,0), (3,1), (3,2), (3,3), (3,4), (3,5), (3,6), + (4,0), (4,1), (4,2), (4,3), (4,4), + # left thumb + (5,5), (5,6), + (6,6), + (7,4), (7,5), (7,6), + # right hand + (8,0), (8,1), (8,2), (8,3), (8,4), (8,5), (8,6), + (9,0), (9,1), (9,2), (9,3), (9,4), (9,5), (9,6), + (10,1), (10,2), (10,3), (10,4), (10,5), (10,6), + (11,0), (11,1), (11,2), (11,3), (11,4), (11,5), (11,6), + (12,2), (12,3), (12,4), (12,5), (12,6), + # right thumb + (13,0), (13,1), + (14,0), + (15,0), (15,1), (15,2) + ], + 'LAYOUT_ergodox_pretty': [ + # left hand and right hand + (0,0), (0,1), (0,2), (0,3), (0,4), (0,5), (0,6), (0,7), (0,8), (0,9), (0,10), (0,11), (0,12), (0,13), + (1,0), (1,1), (1,2), (1,3), (1,4), (1,5), (1,6), (1,7), (1,8), (1,9), (1,10), (1,11), (1,12), (1,13), + (2,0), (2,1), (2,2), (2,3), (2,4), (2,5), (2,8), (2,9), (2,10), (2,11), (2,12), (2,13), + (3,0), (3,1), (3,2), (3,3), (3,4), (3,5), (3,6), (3,7), (3,8), (3,9), (3,10), (3,11), (3,12), (3,13), + (4,0), (4,1), (4,2), (4,3), (4,4), (4,9), (4,10), (4,11), (4,12), (4,13), + + # left thumb and right thumb + (5,5), (5,6), (5,7), (5,8), + (6,6), (6,7), + (7,4), (7,5), (7,6), (7,7), (7,8), (7,9) + ], + } + current_converted_KEY_COORDINATES = [] + + # each column is aligned within each group (tuples of row indexes are inclusive) + KEY_ROW_GROUPS = { + 'LAYOUT_ergodox': [(0,4),(5,7),(8,12),(13,15)], + 'LAYOUT_ergodox_pretty': [(0,7)], + #'LAYOUT_ergodox_pretty': [(0,5),(6,7)], + #'LAYOUT_ergodox_pretty': [(0,3),(4,4),(5,7)], + #'LAYOUT_ergodox_pretty': [(0,4),(5,7)], + } + + + INDEX_CONVERSTION_LAYOUT_ergodox_pretty_to_LAYOUT_ergodox = [ + 0, 1, 2, 3, 4, 5, 6, 38,39,40,41,42,43,44, + 7, 8, 9,10,11,12,13, 45,46,47,48,49,50,51, + 14,15,16,17,18,19, 52,53,54,55,56,57, + 20,21,22,23,24,25,26, 58,59,60,61,62,63,64, + 27,28,29,30,31, 65,66,67,68,69, + 32,33, 70,71, + 34, 72, + 35,36,37, 73,74,75, + ] + + + def index_conversion_map_reversed(self, conversion_map): + return [conversion_map.index(i) for i in range(len(conversion_map))] + + + def __init__(self, source_code = "", output_layout="LAYOUT_ergodox", justify_toward_center = False): + self.output_layout = output_layout + self.justify_toward_center = justify_toward_center + # determine the conversion map + #if input_layout == self.output_layout: + # conversion_map = [i for i in range(len(self.INDEX_CONVERSTION_LAYOUT_ergodox_pretty_to_LAYOUT_ergodox))] + #conversion_map = self.INDEX_CONVERSTION_LAYOUT_ergodox_pretty_to_LAYOUT_ergodox + if self.output_layout == "LAYOUT_ergodox_pretty": + index_conversion_map = self.index_conversion_map_reversed(self.INDEX_CONVERSTION_LAYOUT_ergodox_pretty_to_LAYOUT_ergodox) + else: + index_conversion_map = list(range(len(self.INDEX_CONVERSTION_LAYOUT_ergodox_pretty_to_LAYOUT_ergodox))) + self.current_converted_KEY_COORDINATES = [ + self.KEY_COORDINATES[self.output_layout][index_conversion_map[i]] + for i in range(len(self.KEY_COORDINATES[self.output_layout])) + ] + + self.output = self.beautify_source_code(source_code) + + def beautify_source_code(self, source_code): + # to keep it simple for the parser, we only use the parser to parse the key definition part + src = { + "before": [], + "keys": [], + "after": [], + } + + current_section = "before" + for line in source_code.splitlines(True): + if current_section == 'before' and line == self.KEYMAP_START: + src[current_section].append("\n") + current_section = 'keys' + src[current_section].append(self.KEYMAP_START_REPLACEMENT) + continue + elif current_section == 'keys' and line == self.KEYMAP_END: + src[current_section].append(self.KEYMAP_END) + current_section = 'after' + continue + src[current_section].append(line) + output_lines = src['before'] + self.beautify_keys_section("".join(src['keys'])) + src['after'] + return "".join(output_lines) + + def beautify_keys_section(self, src): + parsed = self.parser(src) + layer_output = [] + + keymap = parsed.children()[0] + layers = keymap[1] + for layer in layers.init.exprs: + input_layout = layer.expr.name.name + + key_symbols = self.layer_expr(layer) + # re-order keys from input_layout to regular layout + if input_layout == "LAYOUT_ergodox_pretty": + key_symbols = [key_symbols[i] for i in self.index_conversion_map_reversed(self.INDEX_CONVERSTION_LAYOUT_ergodox_pretty_to_LAYOUT_ergodox)] + + padded_key_symbols = self.pad_key_symbols(key_symbols, input_layout) + current_pretty_output_layer = self.pretty_output_layer(layer.name[0].value, padded_key_symbols) + # strip trailing spaces from padding + layer_output.append(re.sub(r" +\n", "\n", current_pretty_output_layer)) + + return [self.KEYMAP_START + "\n", + self.KEY_CHART + "\n", + ",\n\n".join(layer_output) + "\n", + self.KEYMAP_END + "\n"] + + def get_row_group(self, row): + for low, high in self.KEY_ROW_GROUPS[self.output_layout]: + if low <= row <= high: + return (low, high) + raise Exception("Cannot find row groups in KEY_ROW_GROUPS") + + + def calculate_column_max_widths(self, key_symbols): + # calculate the max width for each column + self.column_max_widths = {} + for i in range(len(key_symbols)): + row_index, column_index = self.current_converted_KEY_COORDINATES[i] + row_group = self.get_row_group(row_index) + if (row_group, column_index) in self.column_max_widths: + self.column_max_widths[(row_group, column_index)] = max(self.column_max_widths[(row_group, column_index)], len(key_symbols[i])) + else: + self.column_max_widths[(row_group, column_index)] = len(key_symbols[i]) + + + def pad_key_symbols(self, key_symbols, input_layout, just='left'): + self.calculate_column_max_widths(key_symbols) + + padded_key_symbols = [] + # pad each key symbol + for i in range(len(key_symbols)): + key = key_symbols[i] + # look up column coordinate to determine number of spaces to pad + row_index, column_index = self.current_converted_KEY_COORDINATES[i] + row_group = self.get_row_group(row_index) + if just == 'left': + padded_key_symbols.append(key.ljust(self.column_max_widths[(row_group, column_index)])) + else: + padded_key_symbols.append(key.rjust(self.column_max_widths[(row_group, column_index)])) + return padded_key_symbols + + + layer_keys_pointer = 0 + layer_keys = None + def grab_next_n_columns(self, n_columns, input_layout, layer_keys = None, from_beginning = False): + if layer_keys: + self.layer_keys = layer_keys + if from_beginning: + self.layer_keys_pointer = 0 + + begin = self.layer_keys_pointer + end = begin + n_columns + return self.layer_keys[self.layer_keys_pointer-n_keys:self.layer_keys_pointer] + + key_coordinates_counter = 0 + def get_padded_line(self, source_keys, key_from, key_to, just="left"): + if just == "right": + keys = [k.strip().rjust(len(k)) for k in source_keys[key_from:key_to]] + else: + keys = [k for k in source_keys[key_from:key_to]] + + from_row, from_column = self.KEY_COORDINATES[self.output_layout][self.key_coordinates_counter] + row_group = self.get_row_group(from_row) + self.key_coordinates_counter += key_to - key_from + columns_before_key_from = sorted([col for row, col in self.KEY_COORDINATES[self.output_layout] if row == from_row and col < from_column]) + # figure out which columns in this row needs padding; only pad empty columns to the right of an existing column + columns_to_pad = { c: True for c in range(from_column) } + if columns_before_key_from: + for c in range(max(columns_before_key_from)+1): + columns_to_pad[c] = False + + # for rows with fewer columns that don't start with column 0, we need to insert leading spaces + spaces = 0 + for c, v in columns_to_pad.items(): + if not v: + continue + if (row_group,c) in self.column_max_widths: + spaces += self.column_max_widths[(row_group,c)] + len(", ") + else: + spaces += 0 + return " " * spaces + ", ".join(keys) + "," + + def pretty_output_layer(self, layer, keys): + self.key_coordinates_counter = 0 + if self.output_layout == "LAYOUT_ergodox": + formatted_key_symbols = """ +// left hand + +{} +{} +{} +{} +{} + +// left thumb + +{} +{} +{} + +// right hand + +{} +{} +{} +{} +{} + +// right thumb + +{} +{} +{} +""".format( + # left hand + self.get_padded_line(keys, 0, 7, just="left"), + self.get_padded_line(keys, 7, 14, just="left"), + self.get_padded_line(keys, 14, 20, just="left"), + self.get_padded_line(keys, 20, 27, just="left"), + self.get_padded_line(keys, 27, 32, just="left"), + # left thumb + self.get_padded_line(keys, 32, 34, just="left"), + self.get_padded_line(keys, 34, 35, just="left"), + self.get_padded_line(keys, 35, 38, just="left"), + # right hand + self.get_padded_line(keys, 38, 45, just="left"), + self.get_padded_line(keys, 45, 52, just="left"), + self.get_padded_line(keys, 52, 58, just="left"), + self.get_padded_line(keys, 58, 65, just="left"), + self.get_padded_line(keys, 65, 70, just="left"), + # right thumb + self.get_padded_line(keys, 70, 72, just="left"), + self.get_padded_line(keys, 72, 73, just="left"), + self.get_padded_line(keys, 73, 76, just="left"), + ) + elif self.output_layout == "LAYOUT_ergodox_pretty": + left_half_justification = "right" if self.justify_toward_center else "left" + formatted_key_symbols = """ +{} {} +{} {} +{} {} +{} {} +{} {} + +{} {} +{} {} +{} {} +""".format( + self.get_padded_line(keys, 0, 7, just=left_half_justification), self.get_padded_line(keys, 38, 45, just="left"), + self.get_padded_line(keys, 7, 14, just=left_half_justification), self.get_padded_line(keys, 45, 52, just="left"), + self.get_padded_line(keys, 14, 20, just=left_half_justification), self.get_padded_line(keys, 52, 58, just="left"), + self.get_padded_line(keys, 20, 27, just=left_half_justification), self.get_padded_line(keys, 58, 65, just="left"), + self.get_padded_line(keys, 27, 32, just=left_half_justification), self.get_padded_line(keys, 65, 70, just="left"), + + self.get_padded_line(keys, 32, 34, just=left_half_justification), self.get_padded_line(keys, 70, 72, just="left"), + self.get_padded_line(keys, 34, 35, just=left_half_justification), self.get_padded_line(keys, 72, 73, just="left"), + self.get_padded_line(keys, 35, 38, just=left_half_justification), self.get_padded_line(keys, 73, 76, just="left"), + + ) + else: + formatted_key_symbols = "" + + # rid of the trailing comma + formatted_key_symbols = formatted_key_symbols[0:len(formatted_key_symbols)-2] + "\n" + s = "[{}] = {}({})".format(layer, self.output_layout, formatted_key_symbols) + return s + + # helper functions for pycparser + def parser(self, src): + src = self.comment_remover(src) + return pycparser.CParser().parse(src) + def comment_remover(self, text): + # remove comments since pycparser cannot deal with them + # credit: https://stackoverflow.com/a/241506 + def replacer(match): + s = match.group(0) + if s.startswith('/'): + return " " # note: a space and not an empty string + else: + return s + pattern = re.compile( + r'//.*?$|/\*.*?\*/|\'(?:\\.|[^\\\'])*\'|"(?:\\.|[^\\"])*"', + re.DOTALL | re.MULTILINE + ) + return re.sub(pattern, replacer, text) + + def function_expr(self, f): + name = f.name.name + args = [] + for arg in f.args.exprs: + if type(arg) is pycparser.c_ast.Constant: + args.append(arg.value) + elif type(arg) is pycparser.c_ast.ID: + args.append(arg.name) + return "{}({})".format(name, ",".join(args)) + + def key_expr(self, raw): + if type(raw) is pycparser.c_ast.ID: + if raw.name in self.KEY_ALIASES: + return self.KEY_ALIASES[raw.name] + return raw.name + elif type(raw) is pycparser.c_ast.FuncCall: + return self.function_expr(raw) + + def layer_expr(self, layer): + transformed = [self.key_expr(k) for k in layer.expr.args.exprs] + return transformed + + +if __name__ == "__main__": + + parser = argparse.ArgumentParser(description="Beautify keymap.c downloaded from ErgoDox-Ez Configurator for easier customization.") + parser.add_argument("input_filename", help="input file: c source code file that has the layer keymaps") + parser.add_argument("-o", "--output-filename", help="output file: beautified c filename. If not given, output to STDOUT.") + parser.add_argument("-p", "--pretty-output-layout", action="store_true", help="use LAYOUT_ergodox_pretty for output instead of LAYOUT_ergodox") + parser.add_argument("-c", "--justify-toward-center", action="store_true", help="for LAYOUT_ergodox_pretty, align right for the left half, and align left for the right half. Default is align left for both halves.") + args = parser.parse_args() + if args.pretty_output_layout: + output_layout="LAYOUT_ergodox_pretty" + else: + output_layout="LAYOUT_ergodox" + with open(args.input_filename) as f: + source_code = f.read() + result = KeymapBeautifier(source_code, output_layout=output_layout, justify_toward_center=args.justify_toward_center).output + if args.output_filename: + with open(args.output_filename, "w") as f: + f.write(result) + else: + print(result) + diff --git a/keyboards/ergodox_ez/util/keymap_beautifier/README.md b/keyboards/ergodox_ez/util/keymap_beautifier/README.md new file mode 100644 index 000000000000..bd3d125a6d42 --- /dev/null +++ b/keyboards/ergodox_ez/util/keymap_beautifier/README.md @@ -0,0 +1,139 @@ +# keymap_beautifier.py + +## About +This Python 3 script, by [Tsan-Kuang Lee](/~https://github.com/tsankuanglee) takes the keymap.c downloaded from [ErgoDox EZ Configurator](https://configure.ergodox-ez.com/) and beautifies it for easier customization, allowing one to quickly draft a layout to build upon. + +## Features +For example, the original `keymap.c` looks like + +``` +[0] = LAYOUT_ergodox(KC_EQUAL,KC_1,KC_2,KC_3,KC_4,KC_5,LCTL(KC_MINUS),KC_DELETE,KC_Q,KC_W,KC_E,KC_R,KC_T,KC_LBRACKET,KC_BSPACE,KC_A,KC_S,KC_D,KC_F,KC_G,KC_LSPO,CTL_T(KC_Z),KC_X,KC_C,KC_V,KC_B,ALL_T(KC_NO),LT(1,KC_GRAVE),KC_QUOTE,LALT(KC_LSHIFT),KC_LEFT,KC_RIGHT,ALT_T(KC_APPLICATION),KC_LGUI,KC_HOME,KC_SPACE,KC_UNDS,KC_END,LCTL(KC_EQUAL),KC_6,KC_7,KC_8,KC_9,KC_0,KC_MINUS,KC_RBRACKET,KC_Y,KC_U,KC_I,KC_O,KC_P,KC_BSLASH,KC_H,ALT_T(KC_J),KC_K,KC_L,LT(2,KC_SCOLON),GUI_T(KC_QUOTE),MEH_T(KC_NO),KC_N,KC_M,KC_COMMA,KC_DOT,CTL_T(KC_SLASH),KC_RSPC,KC_UP,KC_DOWN,KC_LBRACKET,KC_RBRACKET,TT(1),KC_LALT,CTL_T(KC_ESCAPE),KC_PGUP,KC_PGDOWN,LT(1,KC_TAB),KC_ENTER), +``` + +The beautifier parses it and outputs: + +``` +[0] = LAYOUT_ergodox( +// left hand + +KC_EQUAL , KC_1 , KC_2 , KC_3 , KC_4 , KC_5, LCTL(KC_MINUS), +KC_DELETE , KC_Q , KC_W , KC_E , KC_R , KC_T, KC_LBRACKET , +KC_BSPACE , KC_A , KC_S , KC_D , KC_F , KC_G, +KC_LSPO , CTL_T(KC_Z), KC_X , KC_C , KC_V , KC_B, ALL_T(KC_NO) , +LT(1,KC_GRAVE), KC_QUOTE , LALT(KC_LSHIFT), KC_LEFT, KC_RIGHT, + +// left thumb + + ALT_T(KC_APPLICATION), KC_LGUI, + KC_HOME, +KC_SPACE, KC_UNDS , KC_END , + +// right hand + +LCTL(KC_EQUAL), KC_6, KC_7 , KC_8 , KC_9 , KC_0 , KC_MINUS , +KC_RBRACKET , KC_Y, KC_U , KC_I , KC_O , KC_P , KC_BSLASH , + KC_H, ALT_T(KC_J), KC_K , KC_L , LT(2,KC_SCOLON), GUI_T(KC_QUOTE), +MEH_T(KC_NO) , KC_N, KC_M , KC_COMMA, KC_DOT , CTL_T(KC_SLASH), KC_RSPC , + KC_UP , KC_DOWN , KC_LBRACKET, KC_RBRACKET , TT(1) , + +// right thumb + +KC_LALT , CTL_T(KC_ESCAPE), +KC_PGUP , +KC_PGDOWN, LT(1,KC_TAB) , KC_ENTER +) +``` + +Optionally, it can also render [LAYOUT_ergodox_pretty](/~https://github.com/qmk/qmk_firmware/blob/ee700b2e831067bdb7584425569b61bc6329247b/keyboards/ergodox_ez/keymaps/bpruitt-goddard/keymap.c#L49-L57): +``` +[0] = LAYOUT_ergodox_pretty( + KC_ESCAPE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEAD, KC_LEAD, KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_BSPACE , + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_HYPR, KC_HYPR, KC_Y , KC_U , KC_I , KC_O , KC_P , KC_BSLASH , + KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H , KC_J , KC_K , KC_L , KC_SCOLON , KC_QUOTE , + KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, SH_MON, SH_MON , KC_N , KC_M , KC_COMMA , KC_DOT , KC_SLASH , KC_RSHIFT , +LT(6,KC_NO), LT(7,KC_NO), KC_LCTRL, KC_LGUI, KC_LALT, ALGR_T(KC_MINUS), RGUI_T(KC_EQUAL), RCTL_T(KC_LBRACKET), LT(10,KC_RBRACKET), LT(6,KC_APPLICATION), + + LT(6,KC_GRAVE), MEH_T(KC_NO), KC_LEFT, KC_RIGHT , + LT(10,KC_DELETE), KC_UP , + KC_SPACE, LT(8,KC_ENTER), LT(7,KC_BSPACE), KC_DOWN, LT(7,KC_SPACE), LT(8,KC_ENTER) +) +``` + +We can also align everythng t othe left (easier editing in my opinon): +``` +[0] = LAYOUT_ergodox_pretty( +KC_ESCAPE , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_LEAD , KC_LEAD, KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_BSPACE , +KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_HYPR , KC_HYPR, KC_Y , KC_U , KC_I , KC_O , KC_P , KC_BSLASH , +KC_LCTRL , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCOLON , KC_QUOTE , +KC_LSHIFT , KC_Z , KC_X , KC_C , KC_V , KC_B , SH_MON , SH_MON , KC_N , KC_M , KC_COMMA , KC_DOT , KC_SLASH , KC_RSHIFT , +LT(6,KC_NO), LT(7,KC_NO), KC_LCTRL, KC_LGUI, KC_LALT , ALGR_T(KC_MINUS), RGUI_T(KC_EQUAL), RCTL_T(KC_LBRACKET), LT(10,KC_RBRACKET), LT(6,KC_APPLICATION), + + LT(6,KC_GRAVE), MEH_T(KC_NO) , KC_LEFT, KC_RIGHT , + LT(10,KC_DELETE), KC_UP , + KC_SPACE, LT(8,KC_ENTER), LT(7,KC_BSPACE) , KC_DOWN, LT(7,KC_SPACE), LT(8,KC_ENTER) +) +``` + +## Usage + +### With docker +This is the cleaner way. `Docker` is the only requirement. The program executes within a container that has all dependencies installed. + +First build the images. (Run once) +``` +cd QMK_GIT_REPO_dir/keyboards/ergodox_ez/util/keymap_beautifier +docker build -t keymapbeautifier:1.0 . +``` +Run it +``` +cd QMK_GIT_REPO_dir/keyboards/ergodox_ez/util/keymap_beautifier +cp PATH_TO_YOUR_C_SOURCE_FILE.c input.c +./docker_run.sh input.c -p -c -o output.c +``` +The prettified file is written to `output.c`. See the section Tweaks for non-default settings. + +### Without docker +Requirements: +* python3 (tested on 3.7.4) +* python module `pycparser` installed (with `pip install pycparser`) + +To run: +``` +cd QMK_GIT_REPO_dir/keyboards/ergodox_ez/util/keymap_beautifier +cp PATH_TO_YOUR_C_SOURCE_FILE.c input.c +./KeymapBeautifier.py input.c -p -c -o output.c +``` +The prettified file is written to `output.c`. See the section Tweaks for non-default settings. + +## Tweaks +``` +usage: KeymapBeautifier.py [-h] [-o OUTPUT_FILENAME] [-p] [-c] input_filename + +Beautify keymap.c downloaded from ErgoDox-Ez Configurator for easier +customization. + +positional arguments: + input_filename input file: c source code file that has the layer + keymaps + +optional arguments: + -h, --help show this help message and exit + -o OUTPUT_FILENAME, --output-filename OUTPUT_FILENAME + output file: beautified c filename. If not given, + output to STDOUT. + -p, --pretty-output-layout + use LAYOUT_ergodox_pretty for output instead of + LAYOUT_ergodox + -c, --justify-toward-center + for LAYOUT_ergodox_pretty, align right for the left + half, and align left for the right half. Default is + align left for both halves. +``` +For example, +``` +./docker_run.sh input.c -p -c -o output.c +# or if you don't want to use docker: +#./KeymapBeautifier.py input.c -p -c -o output.c +``` +will read `input.c`, and produce `output.c` with LAYOUT_ergodox_pretty, and have the key symbols gravitating toward the center. + diff --git a/keyboards/ergodox_ez/util/keymap_beautifier/docker_run.sh b/keyboards/ergodox_ez/util/keymap_beautifier/docker_run.sh new file mode 100755 index 000000000000..1ce43a6dde2e --- /dev/null +++ b/keyboards/ergodox_ez/util/keymap_beautifier/docker_run.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +docker run --mount type=bind,source="${PWD}",target=/usr/src/app --name keymapbeautifier --rm keymapbeautifier:1.0 ./KeymapBeautifier.py $* diff --git a/keyboards/ergodox_ez/util/keymap_beautifier/requirements.txt b/keyboards/ergodox_ez/util/keymap_beautifier/requirements.txt new file mode 100644 index 000000000000..dc1c9e101ad9 --- /dev/null +++ b/keyboards/ergodox_ez/util/keymap_beautifier/requirements.txt @@ -0,0 +1 @@ +pycparser diff --git a/keyboards/ergodox_ez/util/readme.md b/keyboards/ergodox_ez/util/readme.md index 26c5e5d99cc7..deb0cad5db19 100644 --- a/keyboards/ergodox_ez/util/readme.md +++ b/keyboards/ergodox_ez/util/readme.md @@ -1,3 +1,11 @@ # ErgoDox EZ Utilities +## compile_keymap.py + The Python script in this directory, by [mbarkhau](/~https://github.com/mbarkhau) allows you to write out a basic ErgoDox EZ keymap using Markdown notation, and then transpile it to C, which you can then compile. It's experimental, but if you're not comfortable using C, it's a nice option. + +## keymap_beautifier.py + +This Python 3 script, by [Tsan-Kuang Lee](/~https://github.com/tsankuanglee) takes the keymap.c downloaded from [ErgoDox EZ Configurator](https://configure.ergodox-ez.com/) and beautifies it for easier customization, allowing one to quickly draft a layout to build upon. + +See [README.md](./keymap_beautifier/README.md) for this utility for more details. From fc51a4a1076c5f6f102024f1520e33634bc45dc4 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Tue, 5 Nov 2019 18:19:21 +1100 Subject: [PATCH 278/316] Fix typo in ARM I2C copyright header (#7264) --- drivers/arm/i2c_master.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/arm/i2c_master.h b/drivers/arm/i2c_master.h index a8ed66403a58..efe3909a6610 100644 --- a/drivers/arm/i2c_master.h +++ b/drivers/arm/i2c_master.h @@ -1,9 +1,9 @@ /* Copyright 2018 Jack Humbert * Copyright 2018 Yiancar * - * This program is free sofare: you can redistribute it and/or modify + * 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 Sofare Foundation, either version 2 of the License, or + * 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, From 7c0edbe800c4c5ee7fee870f7355f895bb714e4c Mon Sep 17 00:00:00 2001 From: fauxpark Date: Wed, 6 Nov 2019 06:50:18 +1100 Subject: [PATCH 279/316] Set `git submodule update` depth to 50 (#7269) --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 508691f45f1f..1aa8b2305c5a 100644 --- a/Makefile +++ b/Makefile @@ -558,10 +558,10 @@ endef if ! python3 --version 1> /dev/null 2>&1; then printf "$(MSG_PYTHON_MISSING)"; fi # Check if the submodules are dirty, and display a warning if they are ifndef SKIP_GIT - if [ ! -e lib/chibios ]; then git submodule sync lib/chibios && git submodule update --depth 1 --init lib/chibios; fi - if [ ! -e lib/chibios-contrib ]; then git submodule sync lib/chibios-contrib && git submodule update --depth 1 --init lib/chibios-contrib; fi - if [ ! -e lib/ugfx ]; then git submodule sync lib/ugfx && git submodule update --depth 1 --init lib/ugfx; fi - if [ ! -e lib/lufa ]; then git submodule sync lib/lufa && git submodule update --depth 1 --init lib/lufa; fi + if [ ! -e lib/chibios ]; then git submodule sync lib/chibios && git submodule update --depth 50 --init lib/chibios; fi + if [ ! -e lib/chibios-contrib ]; then git submodule sync lib/chibios-contrib && git submodule update --depth 50 --init lib/chibios-contrib; fi + if [ ! -e lib/ugfx ]; then git submodule sync lib/ugfx && git submodule update --depth 50 --init lib/ugfx; fi + if [ ! -e lib/lufa ]; then git submodule sync lib/lufa && git submodule update --depth 50 --init lib/lufa; fi git submodule status --recursive 2>/dev/null | \ while IFS= read -r x; do \ case "$$x" in \ From ed0575fc8aacdfdd83a31fc98df2b1cad2e977f4 Mon Sep 17 00:00:00 2001 From: buztard Date: Tue, 5 Nov 2019 21:05:42 +0100 Subject: [PATCH 280/316] [Keyboard] Remove RGB_MATRIX_SPLIT_RIGHT from crkbd (#7267) The need for this was dropped in 947e61eaebf168c0c60be34914141cff9a69e599 --- keyboards/crkbd/rev1/rules.mk | 6 ------ 1 file changed, 6 deletions(-) diff --git a/keyboards/crkbd/rev1/rules.mk b/keyboards/crkbd/rev1/rules.mk index 307786375077..ab9bed09c0a2 100644 --- a/keyboards/crkbd/rev1/rules.mk +++ b/keyboards/crkbd/rev1/rules.mk @@ -1,9 +1,3 @@ -RGB_MATRIX_SPLIT_RIGHT = no # if no, order LEDs for left hand, if yes, order LEDs for right hand - -ifeq ($(strip $(RGB_MATRIX_SPLIT_RIGHT)), yes) - OPT_DEFS += -DRGB_MATRIX_SPLIT_RIGHT -endif - SRC += matrix.c \ split_util.c \ split_scomm.c From dfb78d2a086daa2ceb3fd043afce03785abfa23a Mon Sep 17 00:00:00 2001 From: fauxpark Date: Wed, 6 Nov 2019 11:42:16 +1100 Subject: [PATCH 281/316] New and improved lock LED callbacks (#7215) * New and improved lock LED callbacks * Include stdbool * Update documentation * Use full function signatures and add keyboard-level example --- docs/custom_quantum_functions.md | 96 +++++++++++++------ keyboards/maartenwut/wasdat/wasdat.c | 26 ++--- quantum/quantum.c | 21 ++++ quantum/quantum.h | 2 + quantum/template/base/keyboard.c | 4 +- .../template/base/keymaps/default/keymap.c | 4 +- tmk_core/common/host.c | 6 ++ tmk_core/common/host.h | 2 + tmk_core/common/led.h | 13 +++ 9 files changed, 123 insertions(+), 51 deletions(-) diff --git a/docs/custom_quantum_functions.md b/docs/custom_quantum_functions.md index 839d49ca0561..2d505b075177 100644 --- a/docs/custom_quantum_functions.md +++ b/docs/custom_quantum_functions.md @@ -90,68 +90,110 @@ keyrecord_t record { # LED Control -QMK provides methods to read the 5 LEDs defined as part of the HID spec: +QMK provides methods to read 5 of the LEDs defined in the HID spec: -* `USB_LED_NUM_LOCK` -* `USB_LED_CAPS_LOCK` -* `USB_LED_SCROLL_LOCK` -* `USB_LED_COMPOSE` -* `USB_LED_KANA` +* Num Lock +* Caps Lock +* Scroll Lock +* Compose +* Kana -These five constants correspond to the positional bits of the host LED state. -There are two ways to get the host LED state: +There are two ways to get the lock LED state: -* by implementing `led_set_user()` -* by calling `host_keyboard_leds()` +* by implementing `bool led_update_kb(led_t led_state)` or `_user(led_t led_state)`; or +* by calling `led_t host_keyboard_led_state()` -## `led_set_user()` +!> `host_keyboard_led_state()` may already reflect a new value before `led_update_user()` is called. -This function will be called when the state of one of those 5 LEDs changes. It receives the LED state as a parameter. -Use the `IS_LED_ON(usb_led, led_name)` and `IS_LED_OFF(usb_led, led_name)` macros to check the LED status. +Two more deprecated functions exist that provide the LED state as a `uint8_t`: -!> `host_keyboard_leds()` may already reflect a new value before `led_set_user()` is called. +* `uint8_t led_set_kb(uint8_t usb_led)` and `_user(uint8_t usb_led)` +* `uint8_t host_keyboard_leds()` -### Example `led_set_user()` Implementation +## `led_update_user()` + +This function will be called when the state of one of those 5 LEDs changes. It receives the LED state as a struct parameter. + +You must return either `true` or `false` from this function, depending on whether you want to override the keyboard-level implementation. + +?> Because the `led_set_*` functions return `void` instead of `bool`, they do not allow for overriding the keyboard LED control, and thus it's recommended to use `led_update_*` instead. + +### Example `led_update_kb()` Implementation + +```c +bool led_update_kb(led_t led_state) { + if(led_update_user(led_state)) { + if (led_state.num_lock) { + writePinLow(B0); + } else { + writePinHigh(B0); + } + if (led_state.caps_lock) { + writePinLow(B1); + } else { + writePinHigh(B1); + } + if (led_state.scroll_lock) { + writePinLow(B2); + } else { + writePinHigh(B2); + } + if (led_state.compose) { + writePinLow(B3); + } else { + writePinHigh(B3); + } + if (led_state.kana) { + writePinLow(B4); + } else { + writePinHigh(B4); + } + return true; + } +} +``` + +### Example `led_update_user()` Implementation ```c -void led_set_user(uint8_t usb_led) { - if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { +bool led_update_user(led_t led_state) { + if (led_state.num_lock) { writePinLow(B0); } else { writePinHigh(B0); } - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + if (led_state.caps_lock) { writePinLow(B1); } else { writePinHigh(B1); } - if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { + if (led_state.scroll_lock) { writePinLow(B2); } else { writePinHigh(B2); } - if (IS_LED_ON(usb_led, USB_LED_COMPOSE)) { + if (led_state.compose) { writePinLow(B3); } else { writePinHigh(B3); } - if (IS_LED_ON(usb_led, USB_LED_KANA)) { + if (led_state.kana) { writePinLow(B4); } else { writePinHigh(B4); } + return true; } ``` -### `led_set_*` Function Documentation +### `led_update_*` Function Documentation -* Keyboard/Revision: `void led_set_kb(uint8_t usb_led)` -* Keymap: `void led_set_user(uint8_t usb_led)` +* Keyboard/Revision: `bool led_update_kb(led_t led_state)` +* Keymap: `bool led_update_user(led_t led_state)` -## `host_keyboard_leds()` +## `host_keyboard_led_state()` -Call this function to get the last received LED state. This is useful for reading the LED state outside `led_set_*`, e.g. in [`matrix_scan_user()`](#matrix-scanning-code). -For convenience, you can use the `IS_HOST_LED_ON(led_name)` and `IS_HOST_LED_OFF(led_name)` macros instead of calling and checking `host_keyboard_leds()` directly. +Call this function to get the last received LED state as a `led_t`. This is useful for reading the LED state outside `led_update_*`, e.g. in [`matrix_scan_user()`](#matrix-scanning-code). ## Setting Physical LED State diff --git a/keyboards/maartenwut/wasdat/wasdat.c b/keyboards/maartenwut/wasdat/wasdat.c index 11338634d441..99dd97dcfa99 100644 --- a/keyboards/maartenwut/wasdat/wasdat.c +++ b/keyboards/maartenwut/wasdat/wasdat.c @@ -33,26 +33,12 @@ void led_init_ports(void) { setPinOutput(B2); } -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinLow(B0); - } else { - writePinHigh(B0); - } - - if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { - writePinLow(B1); - } else { - writePinHigh(B1); - } - - if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { - writePinLow(B2); - } else { - writePinHigh(B2); +bool led_update_kb(led_t led_state) { + if(led_update_user(led_state)) { + writePin(B0, !led_state.caps_lock); + writePin(B1, !led_state.scroll_lock); + writePin(B2, !led_state.num_lock); } - led_set_user(usb_led); + return true; } diff --git a/quantum/quantum.c b/quantum/quantum.c index 1f17c6ff71d4..c27c3aba6180 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -1070,10 +1070,30 @@ void api_send_unicode(uint32_t unicode) { #endif } +/** \brief Lock LED set callback - keymap/user level + * + * \deprecated Use led_update_user() instead. + */ __attribute__((weak)) void led_set_user(uint8_t usb_led) {} +/** \brief Lock LED set callback - keyboard level + * + * \deprecated Use led_update_kb() instead. + */ __attribute__((weak)) void led_set_kb(uint8_t usb_led) { led_set_user(usb_led); } +/** \brief Lock LED update callback - keymap/user level + * + * \return True if led_update_kb() should run its own code, false otherwise. + */ +__attribute__((weak)) bool led_update_user(led_t led_state) { return true; } + +/** \brief Lock LED update callback - keyboard level + * + * \return Ignored for now. + */ +__attribute__((weak)) bool led_update_kb(led_t led_state) { return led_update_user(led_state); } + __attribute__((weak)) void led_init_ports(void) {} __attribute__((weak)) void led_set(uint8_t usb_led) { @@ -1096,6 +1116,7 @@ __attribute__((weak)) void led_set(uint8_t usb_led) { #endif led_set_kb(usb_led); + led_update_kb((led_t) usb_led); } //------------------------------------------------------------------------------ diff --git a/quantum/quantum.h b/quantum/quantum.h index 87343a15df6c..7988c587881d 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h @@ -289,5 +289,7 @@ uint16_t hex_to_keycode(uint8_t hex); void led_set_user(uint8_t usb_led); void led_set_kb(uint8_t usb_led); +bool led_update_user(led_t led_state); +bool led_update_kb(led_t led_state); void api_send_unicode(uint32_t unicode); diff --git a/quantum/template/base/keyboard.c b/quantum/template/base/keyboard.c index 55e4fffd3a4e..fc31c294a2e2 100644 --- a/quantum/template/base/keyboard.c +++ b/quantum/template/base/keyboard.c @@ -42,9 +42,9 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { return process_record_user(keycode, record); } -void led_set_kb(uint8_t usb_led) { +bool led_update_kb(led_t led_state) { // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - led_set_user(usb_led); + return led_update_user(led_state); } */ diff --git a/quantum/template/base/keymaps/default/keymap.c b/quantum/template/base/keymaps/default/keymap.c index 4d5bac7b2f41..3a68f5487caf 100644 --- a/quantum/template/base/keymaps/default/keymap.c +++ b/quantum/template/base/keymaps/default/keymap.c @@ -70,7 +70,7 @@ void matrix_scan_user(void) { } -void led_set_user(uint8_t usb_led) { - +bool led_update_user(led_t led_state) { + return true; } */ diff --git a/tmk_core/common/host.c b/tmk_core/common/host.c index ce39760a5bb8..713b0d945644 100644 --- a/tmk_core/common/host.c +++ b/tmk_core/common/host.c @@ -39,6 +39,12 @@ uint8_t host_keyboard_leds(void) { if (!driver) return 0; return (*driver->keyboard_leds)(); } + +led_t host_keyboard_led_state(void) { + if (!driver) return (led_t) {0}; + return (led_t)((*driver->keyboard_leds)()); +} + /* send report */ void host_keyboard_send(report_keyboard_t *report) { if (!driver) return; diff --git a/tmk_core/common/host.h b/tmk_core/common/host.h index b2a7f984277f..2cffef6e15a2 100644 --- a/tmk_core/common/host.h +++ b/tmk_core/common/host.h @@ -21,6 +21,7 @@ along with this program. If not, see . #include #include "report.h" #include "host_driver.h" +#include "led.h" #define IS_LED_ON(leds, led_name) ((leds) & (1 << (led_name))) #define IS_LED_OFF(leds, led_name) (~(leds) & (1 << (led_name))) @@ -41,6 +42,7 @@ host_driver_t *host_get_driver(void); /* host driver interface */ uint8_t host_keyboard_leds(void); +led_t host_keyboard_led_state(void); void host_keyboard_send(report_keyboard_t *report); void host_mouse_send(report_mouse_t *report); void host_system_send(uint16_t data); diff --git a/tmk_core/common/led.h b/tmk_core/common/led.h index 2c28fe5401a7..daf974bed48c 100644 --- a/tmk_core/common/led.h +++ b/tmk_core/common/led.h @@ -18,6 +18,7 @@ along with this program. If not, see . #ifndef LED_H #define LED_H #include "stdint.h" +#include "stdbool.h" /* FIXME: Add doxygen comments here. */ @@ -32,6 +33,18 @@ along with this program. If not, see . extern "C" { #endif +typedef union { + uint8_t raw; + struct { + bool num_lock : 1; + bool caps_lock : 1; + bool scroll_lock : 1; + bool compose : 1; + bool kana : 1; + uint8_t reserved : 3; + }; +} led_t; + void led_set(uint8_t usb_led); void led_init_ports(void); From 95309e9af5c58cd0f468ac1fadfcef3ff52aaa6a Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Tue, 5 Nov 2019 22:12:21 -0800 Subject: [PATCH 282/316] [Keymap] Updates to noroadsleft keymap for KC60 (2019-11-05) (#7265) * Rename layers_keymap to layer_names * Update Escape and Left Control keys - change KC_GESC to KC_ESC - change KC_LCTL to MT(MOD_LCTL, KC_GRV) * Disable features I don't use Makes the firmware lean. Why? Because I can. :D * Update the readme files * Add KC_F13 through KC_F24 emulation ... and update the readme files accordingly. * Update rules/config - Swap EXTRAFLAGS for LINK_TIME_OPTIMIZATION_ENABLE - remove NO_ACTION_MACRO and NO_ACTION_FUNCTION - Re-enable COMMAND * concatenate full-length and short layer names * enable dynamic macros * update readme files --- keyboards/kc60/keymaps/noroadsleft/config.h | 9 +++ keyboards/kc60/keymaps/noroadsleft/keymap.c | 70 +++++++++++-------- keyboards/kc60/keymaps/noroadsleft/readme.md | 14 +++- .../kc60/keymaps/noroadsleft/readme_ch1.md | 31 ++------ .../kc60/keymaps/noroadsleft/readme_ch2.md | 2 +- .../kc60/keymaps/noroadsleft/readme_ch3.md | 10 +-- .../kc60/keymaps/noroadsleft/readme_ch4.md | 8 +-- .../kc60/keymaps/noroadsleft/readme_ch5.md | 39 +++++------ .../kc60/keymaps/noroadsleft/readme_git.md | 11 +-- keyboards/kc60/keymaps/noroadsleft/rules.mk | 8 ++- 10 files changed, 112 insertions(+), 90 deletions(-) diff --git a/keyboards/kc60/keymaps/noroadsleft/config.h b/keyboards/kc60/keymaps/noroadsleft/config.h index e216d050b161..4490a3bb76f0 100644 --- a/keyboards/kc60/keymaps/noroadsleft/config.h +++ b/keyboards/kc60/keymaps/noroadsleft/config.h @@ -6,3 +6,12 @@ #define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 5 #define BREATHING_PERIOD 4 + +#ifdef LOCKING_SUPPORT_ENABLE +# undef LOCKING_SUPPORT_ENABLE +#endif +#ifdef LOCKING_RESYNC_ENABLE +# undef LOCKING_RESYNC_ENABLE +#endif + +#define NO_ACTION_ONESHOT diff --git a/keyboards/kc60/keymaps/noroadsleft/keymap.c b/keyboards/kc60/keymaps/noroadsleft/keymap.c index 98d73535687c..84aeb482d6fe 100644 --- a/keyboards/kc60/keymaps/noroadsleft/keymap.c +++ b/keyboards/kc60/keymaps/noroadsleft/keymap.c @@ -8,42 +8,39 @@ /********************** ** LAYER DEFINITIONS ** **********************/ -enum layers_keymap { +enum layer_names { // BASE LAYERS + // SHORT CODES _QWERTY = 0, + _QW = _QWERTY, _DVORAK, + _DV = _DVORAK, _COLEMAK, + _CM = _COLEMAK, _MAC, + _MC = _MAC, _QUAKE2, + _Q2 = _QUAKE2, _QUAKE2_DVORAK, + _QD = _QUAKE2_DVORAK, _QUAKE2_CONSOLE, - + _QC = _QUAKE2_CONSOLE, // FUNCTION LAYERS _FUNCWIN, + _FW = _FUNCWIN, _FUNCMAC, + _FM = _FUNCMAC, _FUNCQ2, - + _FQ = _FUNCQ2, // OTHER LAYERS _NUMPAD, + _NP = _NUMPAD, _MACROS, - _SYSTEM + _MA = _MACROS, + _SYSTEM, + _SY = _SYSTEM, }; -// LAYER SHORT CODES -#define _QW _QWERTY -#define _DV _DVORAK -#define _CM _COLEMAK -#define _MC _MAC -#define _Q2 _QUAKE2 -#define _QD _QUAKE2_DVORAK -#define _QC _QUAKE2_CONSOLE -#define _FW _FUNCWIN -#define _FM _FUNCMAC -#define _FQ _FUNCQ2 -#define _NP _NUMPAD -#define _MA _MACROS -#define _SY _SYSTEM - // KEYCODE DEFINITIONS #define NO_CHNG KC_TRNS // Note for me for keys I need to leave as Pass-through @@ -58,6 +55,8 @@ enum layers_keymap { #define WN_COPY LCTL(DV_C) // Windows/Linux Copy #define WN_PSTE LCTL(DV_V) // Windows/Linux Paste +#define CTL_GRV MT(MOD_LCTL, KC_GRV) // Left Control when held, Grave accent when tapped + #define MC_PSCR LGUI(LSFT(KC_3)) // MacOS Print Screen (Command + Shift + 3) #define MC_HOME LGUI(KC_LEFT) // MacOS Home (Command + Left Arrow) #define MC_END LGUI(KC_RGHT) // MacOS End (Command + Right Arrow) @@ -252,6 +251,21 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } } return false; + case KC_F1 ... KC_F12: + if (record->event.pressed) { + if ( get_mods() & MOD_MASK_RALT ) { + register_code( keycode + 0x2E ); + } else { + register_code( keycode ); + } + } else { + if ( get_mods() & MOD_MASK_RALT ) { + unregister_code( keycode + 0x2E ); + } else { + unregister_code( keycode ); + } + } + return false; } // switch() return true; }; @@ -267,31 +281,31 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* QWERTY */ [_QWERTY] = LAYOUT_60_ansi( // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 - KC_GESC, 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_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, \ FW_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, NUBS_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_SPC, KC_RALT, KC_RGUI, MO(_FW), KC_RCTL \ + CTL_GRV, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_MA), MO(_FW), KC_RCTL \ ), /* Dvorak */ [_DVORAK] = LAYOUT_60_ansi( // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSPC, \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSPC, \ KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS, \ FW_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, \ KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FW), KC_RCTL \ + CTL_GRV, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_MA), MO(_FW), KC_RCTL \ ), /* Colemak */ [_COLEMAK] = LAYOUT_60_ansi( // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 - KC_GESC, 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_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_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, \ FW_CAPS, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FW), KC_RCTL \ + CTL_GRV, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_MA), MO(_FW), KC_RCTL \ ), /**************** @@ -391,9 +405,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Macro layer */ [_MACROS] = LAYOUT_60_ansi( // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 - TG(_MA), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, G_PUSH, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, G_FTCH, G_COMM, _______, _______, _______, _______, T_L3DED, _______, _______, _______, \ + TG(_MA), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, DM_REC1, DM_REC2, _______, \ + _______, _______, _______, G_PUSH, _______, _______, _______, _______, _______, _______, _______, DM_PLY1, DM_PLY2, DM_RSTP, \ + _______, _______, _______, G_FTCH, G_COMM, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, G_BRCH, SIGNA, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, NO_CHNG, _______ \ ), diff --git a/keyboards/kc60/keymaps/noroadsleft/readme.md b/keyboards/kc60/keymaps/noroadsleft/readme.md index c9db4f8de208..6a7ad6f65e33 100644 --- a/keyboards/kc60/keymaps/noroadsleft/readme.md +++ b/keyboards/kc60/keymaps/noroadsleft/readme.md @@ -1,12 +1,24 @@ # @noroadsleft's KC60 keymap -### Last updated: April 7, 2019, 2:26 AM UTC-0700 +### Last updated: November 5, 2019, 12:07 AM UTC-0800 ![](https://i.imgur.com/tzhXQYI.jpg) I am a full-time Dvorak typist, and occasional semi-serious FPS gamer. The layers are oriented towards a mix of typing and gaming. +---- + +# Preface + +Images in this readme follow the following format: + +![Legend](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/legend.png) +*Legend* + +Descriptions of the physical locations of keys will use the key's function in a US QWERTY layout, even if the layout itself is not QWERTY. + + ---- # Outline diff --git a/keyboards/kc60/keymaps/noroadsleft/readme_ch1.md b/keyboards/kc60/keymaps/noroadsleft/readme_ch1.md index fff80760e5be..3872232f5a9a 100644 --- a/keyboards/kc60/keymaps/noroadsleft/readme_ch1.md +++ b/keyboards/kc60/keymaps/noroadsleft/readme_ch1.md @@ -12,21 +12,14 @@ ## Layer 0: QWERTY - `_QW` -Standard QWERTY layout, with three QMK features: +Standard QWERTY layout, with four QMK features: - The `Menu` key has been replaced by `MO(_FW)`, which moves to my Windows Fn layer when held. +- The Right `GUI` key has been replaced with a `MO(_MA)` key, which moves to the Macro layer when held. - The `Caps Lock` key has been replaced with a dual function `LT()` key, which opens the Windows Fn layer when held, and is `Caps Lock` when tapped -- The `Escape` key has been replaced with a `KC_GESC` `` ` ~ `` key when used with a `Fn` key or a `Shift` key +- The Left `Control` key has been replaced with a `MT(MOD_CTRL, KC_GRV)` key, which is ` ~ when tapped and `Ctrl` when held. -###### For the rest of this readme, the physical location of keys will be referred to by their function in a US QWERTY layout. - -![QWERTY layer](https://i.imgur.com/2eVsefw.png) - -Keycode(s) Sent | Notes -:---------------------------------------------------- | :---- -[`KC_GESC`](https://docs.qmk.fm/#/feature_grave_esc) | `Esc` when tapped alone, `` ` ~ `` when used with a `Shift` or `GUI` key. -`LT(_FW, KC_CAPS)` | Opens the Windows Fn layer when held; toggles Caps Lock when tapped. -`MO(_FW)` | Opens the Windows Fn layer when held. +![QWERTY layer](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/layer_00.png) ---- @@ -37,13 +30,7 @@ Keycode(s) Sent | Notes A hardware-based Dvorak Simplified layout. At my weekend job, I use a shared computer that runs MacOS Sierra, in US QWERTY layout. In this layer, I can leave the system in QWERTY, plug my keyboard in, and still type in Dvorak. -![Hardware Dvorak layer](https://i.imgur.com/a6hYedB.png) - -Keycode(s) Sent | Notes -:---------------------------------------------------- | :---- -[`KC_GESC`](https://docs.qmk.fm/#/feature_grave_esc) | `Esc` when tapped alone, `` ` ~ `` when used with a `Shift` or `GUI` key. -`LT(_FW, KC_CAPS)` | Opens the Windows Fn layer when held; toggles Caps Lock when tapped. -`MO(_FW)` | Opens the Windows Fn layer when held. +![Hardware Dvorak layer](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/layer_01.png) ---- @@ -54,13 +41,7 @@ Keycode(s) Sent | Notes A hardware-based Colemak layout. Been thinking of trying it, so it's here. -![Hardware Colemak layer](https://i.imgur.com/dbQ6HDW.png) - -Keycode(s) Sent | Notes -:---------------------------------------------------- | :---- -[`KC_GESC`](https://docs.qmk.fm/#/feature_grave_esc) | `Esc` when tapped alone, `` ` ~ `` when used with a `Shift` or `GUI` key. -`LT(_FW, KC_CAPS)` | Opens the Windows Fn layer when held; toggles Caps Lock when tapped. -`MO(_FW)` | Opens the Windows Fn layer when held. +![Hardware Colemak layer](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/layer_02.png) ---- diff --git a/keyboards/kc60/keymaps/noroadsleft/readme_ch2.md b/keyboards/kc60/keymaps/noroadsleft/readme_ch2.md index 142fe302fda8..76ab51015395 100644 --- a/keyboards/kc60/keymaps/noroadsleft/readme_ch2.md +++ b/keyboards/kc60/keymaps/noroadsleft/readme_ch2.md @@ -16,7 +16,7 @@ This layer overrides the `Fn` keys on whichever base layer is currently enabled, sending the keyboard to the MacOS-oriented Fn layer `_FM`, instead of the Windows Fn layer `_FW`. -![MacOS Overlay](https://i.imgur.com/lxsEVpm.png) +![MacOS Overlay](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/layer_03.png) ---- diff --git a/keyboards/kc60/keymaps/noroadsleft/readme_ch3.md b/keyboards/kc60/keymaps/noroadsleft/readme_ch3.md index b9dc556e4e3b..93c43fbf915c 100644 --- a/keyboards/kc60/keymaps/noroadsleft/readme_ch3.md +++ b/keyboards/kc60/keymaps/noroadsleft/readme_ch3.md @@ -16,20 +16,20 @@ These layers were born out of the confusion I have had trying to use the in-game chat and the console in [Quake 2](https://en.wikipedia.org/wiki/Quake_II). When Quake 2 came out, alternate keyboard layouts weren't really a thing. As a result, all in-game text input is hard-locked to US QWERTY, regardless of what the operating system is using for its input method. -I'm attempting to solve this by some creative use of QMK's macro feature. The keycode in the System layer that enables these layers, [`GO_Q2`](./keymap.c#L404), is a [macro](./keymap.c#L165-L172) that sets the default layer to the QWERTY layer, then turns the Quake 2 layer `_Q2` on. The result is a partially-overwritten QWERTY layer, that has some keycodes with some creative layer switching. +I'm attempting to solve this by some creative use of QMK's macro feature. The keycode in the System layer that enables these layers, [`GO_Q2`](./keymap.c#L418), is a [macro](./keymap.c#L164-L171) that sets the default layer to the QWERTY layer, then turns the Quake 2 layer `_Q2` on. The result is a partially-overwritten QWERTY layer, that has some keycodes with some creative layer switching. -When I hit the `Enter` key (bound in-game to text chat), the [macro keycode](./keymap.c#L173-L179) I've created sends the keycode for `Enter`, then follows with enabling the Hardware Dvorak layer and its corresponding overlay. Now the game is in text chat mode, and my keyboard is in Dvorak. When I hit `Enter` again, another `Enter` [keycode macro](./keymap.c#L180-L186) is sent, which sends the message, then the macro brings me back to the standard QWERTY+Quake 2 setup. Hitting `Escape` instead runs a [macro](./keymap.c#L187-L193) that cancels the sending of the message, and undoes the layers. +When I hit the `Enter` key (bound in-game to text chat), the [macro keycode](./keymap.c#L172-L178) I've created sends the keycode for `Enter`, then follows with enabling the Hardware Dvorak layer and its corresponding overlay. Now the game is in text chat mode, and my keyboard is in Dvorak. When I hit `Enter` again, another `Enter` [keycode macro](./keymap.c#L179-L185) is sent, which sends the message, then the macro brings me back to the standard QWERTY+Quake 2 setup. Hitting `Escape` instead runs a [macro](./keymap.c#L186-L192) that cancels the sending of the message, and undoes the layers. I have been testing this configuration for a few months. Sometimes I end up still in Dvorak mode without any text input systems (in-game chat or the console) running, but it pretty much always happens when I'm focused on the game, so I don't know the cause yet. ### Layer 4: Quake 2 -![Quake 2](https://i.imgur.com/WEZ9p2u.png) +![Quake 2](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/layer_04.png) ### Layer 5: Quake 2 Dvorak -![Quake 2 Dvorak](https://i.imgur.com/rhugHN4.png) +![Quake 2 Dvorak](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/layer_05.png) ### Layer 6: Quake 2 Console -![Quake 2 Console](https://i.imgur.com/dRTAjcy.png) +![Quake 2 Console](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/layer_06.png) ---- diff --git a/keyboards/kc60/keymaps/noroadsleft/readme_ch4.md b/keyboards/kc60/keymaps/noroadsleft/readme_ch4.md index 00e6b781b47f..32ca82ce9dc3 100644 --- a/keyboards/kc60/keymaps/noroadsleft/readme_ch4.md +++ b/keyboards/kc60/keymaps/noroadsleft/readme_ch4.md @@ -16,7 +16,7 @@ Arrows, Navigation keys (Insert, Home, Page Up, etc.), and Function keys are here. Also has keys for Calculator, Menu, Volume Control, and shortcuts for Select All, Undo, Cut, Copy, and Paste. Numpad Enter for when I'm working in Adobe Photoshop, because it treats Numpad Enter differently from the regular Enter key. -![Windows Fn layer](https://i.imgur.com/XwCshcz.png) +![Windows Fn layer](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/layer_07.png) ---- @@ -27,7 +27,7 @@ Arrows, Navigation keys (Insert, Home, Page Up, etc.), and Function keys are her Based on my Windows Fn layer, but swaps a few functions for a MacOS environment. Arrow, Navigation, and Function keys are basically unchanged from Layer 2. This layer enables using either `Fn` key as a sort of simulated `Command` key, which I find easier to reach and use. -![MacOS-oriented Fn layer](https://i.imgur.com/Z11kRu2.png) +![MacOS-oriented Fn layer](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/layer_08.png) ---- @@ -38,11 +38,11 @@ Based on my Windows Fn layer, but swaps a few functions for a MacOS environment. Based on the Windows function layer, but removes some functions that are pointless to have while in the game. -![Quake 2 Fn layer](https://i.imgur.com/9PG7yWb.png) +![Quake 2 Fn layer](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/layer_09.png) Keycode(s) Sent | Notes :-------------------------------- | :---- -[`Q2_GRV`](./keymap.c#L194-L201) | Sends `KC_GRV`, then enables the Dvorak, Quake 2 Dvorak, and Quake 2 Console layers. +[`Q2_GRV`](./keymap.c#L193-L200) | Sends `KC_GRV`, then enables the Dvorak, Quake 2 Dvorak, and Quake 2 Console layers. diff --git a/keyboards/kc60/keymaps/noroadsleft/readme_ch5.md b/keyboards/kc60/keymaps/noroadsleft/readme_ch5.md index a65b3acbeb44..cb2abbd6dd76 100644 --- a/keyboards/kc60/keymaps/noroadsleft/readme_ch5.md +++ b/keyboards/kc60/keymaps/noroadsleft/readme_ch5.md @@ -16,7 +16,7 @@ Puts a Numpad on the right-hand side of the keyboard. A through F included for hexadecimal input. Tapping `Space` returns to the previous Base Layer. -![Numpad layer](https://i.imgur.com/fKVRkGH.png) +![Numpad layer](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/layer_10.png) ---- @@ -25,42 +25,35 @@ Puts a Numpad on the right-hand side of the keyboard. A through F included for h ### Accessed by holding the `Fn` key and tapping the right-side `Win` key -Has some macros that I use in Git, and some frequently-typed strings. +Has some macros that I use in Git, some frequently-typed strings, and keys for use with the [Dynamic Macros feature](https://docs.qmk.fm/#/feature_dynamic_macros). Tapping `Esc` exits the Macro layer, if the macro used doesn't do it automatically. -![Macro layer](https://i.imgur.com/wgbsluI.png) +![Macro layer](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/layer_11.png) ### Macros -#### [T_L3DED](./keymap.c#L122-L126) - -Output: `lavak3DED ` - -Twitch emote for [a streamer I watch a lot](https://www.twitch.tv/lavak3_). -![lavak3DED](https://static-cdn.jtvnw.net/emoticons/v1/821796/1.0) - -#### [G_PUSH](./keymap.c#L127-L131) +#### [G_PUSH](./keymap.c#L126-L130) Output: `git push origin ` Everything from here down is related to Git or GitHub. -#### [G_FTCH](./keymap.c#L132-L141) +#### [G_FTCH](./keymap.c#L131-L140) | Condition | Output | | :-------- | :----- | | If Shift is active | `git pull upstream ` | | Otherwise | `git fetch upstream ` | -#### [G_COMM](./keymap.c#L142-L147) +#### [G_COMM](./keymap.c#L141-L146) Output: `git commit -m ""` Left Readies a `git commit` command, moves the cursor between the quotation marks, then disables the Macro layer. -#### [G_BRCH](./keymap.c#L148-L158) +#### [G_BRCH](./keymap.c#L147-L157) | Condition | Output | | :-------- | :----- | @@ -69,13 +62,13 @@ Readies a `git commit` command, moves the cursor between the quotation marks, th `$(git branch-name)` is a [git alias](./readme_git.md) that returns the name of the current branch. This macro disables the Macro layer when finished. -#### [SIGNA](./keymap.c#L159-L164) +#### [SIGNA](./keymap.c#L158-L163) Output: `\- @noroadsleft` Enter Sometimes on GitHub, I sign my comments. Types my GitHub name in Markdown syntax, and then taps the `Enter` key. Disables the Macro layer when finished. -#### [MC_UNDO](./keymap.c#L202-L210) +#### [MC_UNDO](./keymap.c#L201-L209) | Condition | Output | | :-------- | :----- | @@ -84,7 +77,7 @@ Sometimes on GitHub, I sign my comments. Types my GitHub name in Markdown syntax An Undo shortcut that turns to Redo if Shift is being held. I'm not sure that part is required to get that behavior, but it works as desired, so I'm not messing with it. -#### [MC_PSTE](./keymap.c#L211-L219) +#### [MC_PSTE](./keymap.c#L210-L218) | Condition | Output | | :-------- | :----- | @@ -93,7 +86,7 @@ An Undo shortcut that turns to Redo if Shift is being held. I'm not s The program I use this in uses Shift + Command + Option + V to paste while maintaining formatting (typeface, text size, etc.). Sometimes I want this and sometimes I don't. Using Shift changes the behavior. -#### [NUBS_Z](./keymap.c#L220-L234) +#### [NUBS_Z](./keymap.c#L219-L233) | Condition | Output | | :-------- | :----- | @@ -102,16 +95,20 @@ The program I use this in uses Shift + Command + Opti Sometimes I type in languages from countries that use ISO layout, but my keyboard is ANSI, so I have one key fewer. This macro simulates the Non-US Backslash key if I use Right Alt + Z. -#### [VRSN](./keymap.c#L235-L239) +#### [VRSN](./keymap.c#L234-L238) Outputs a string that tells me the Git commit from which my flashed firmware was built. Looks something like: kc60/noroadsleft @ 0.6.326-6-gae6d7b-dirty -#### [Emulated Numeric Keypad](./keymap.c#L240-L254) +#### [Emulated Numeric Keypad](./keymap.c#L239-L253) If I hold the Right Alt key, the number row (`KC_1` through `KC_0`) will output numpad keycodes instead of number row keycodes, enabling quicker access to characters like ™ and °. +#### [Emulated Extended Function Keys](./keymap.c#L254-L268) + +Similar to the emulated numpad, if I hold the Right Alt key with the Fn key, the function row (`KC_F1` through `KC_F12`) will output keycodes `KC_F13` throught `KC_F24`. + ---- ### Layer 12: System layer - `_SY` @@ -120,7 +117,7 @@ If I hold the Right Alt key, the number row (`KC_1` through `KC_0`) will output This is where I change my keyboard function. Base layer select on `1` through `3`, Backlight controls on `C` through `N`, Reset on `8*`, Debug on `0)`. -![System layer](https://i.imgur.com/95ovTBn.png) +![System layer](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/layer_12.png) ---- diff --git a/keyboards/kc60/keymaps/noroadsleft/readme_git.md b/keyboards/kc60/keymaps/noroadsleft/readme_git.md index b81bb9409dc5..432f1abc7e99 100644 --- a/keyboards/kc60/keymaps/noroadsleft/readme_git.md +++ b/keyboards/kc60/keymaps/noroadsleft/readme_git.md @@ -11,7 +11,8 @@ # Cherry Pick cp = cherry-pick - # Check out a Pull Request + # Check out a Pull Request locally + # e.g. `git cop 351` fetches the commits from Pull Request #351 and saves it to local branch 'pr/351'. cop = "!f() { git fetch upstream pull/$1/head:pr/$1; git checkout pr/$1; }; f" # Sync master branch @@ -39,13 +40,17 @@ # Short-form status st = "!git status --short --untracked-files=no" + stu = "!git ls-files --others -x '*/*'" # Returns the name of the current branch branch-name = "!git rev-parse --abbrev-ref HEAD" bn = "!git branch-name" # short-form of the above + # List branches by the date of their last commit, newest to oldest + bbd = "for-each-ref --count=30 --sort=-committerdate refs/heads/ --format='%(objectname) %(objecttype) %(refname:short) (%(authordate))'" # Compare commit counts between current branch and QMK master - cc = "!f() { git fetch upstream; echo \"$(git branch-name) vs. upstream/master\"; git rev-list --left-right --count $(git branch-name)...upstream/master; }; f" + # e.g. `git cc dev_branch upstream/master` returns how many commits are on `dev_branch` and not on `upstream/master`, and vice versa. + cc = "!f() { git fetch upstream; echo \"$(git branch-name) vs. $2\"; git rev-list --left-right --count $1...$2; }; f" # Push to origin repo po = "push origin $(git branch-name)" @@ -71,6 +76,4 @@ # Force push without overwriting established history pushf = push --force-with-lease - - ``` diff --git a/keyboards/kc60/keymaps/noroadsleft/rules.mk b/keyboards/kc60/keymaps/noroadsleft/rules.mk index 9d78fc0fb32d..c9805878d268 100644 --- a/keyboards/kc60/keymaps/noroadsleft/rules.mk +++ b/keyboards/kc60/keymaps/noroadsleft/rules.mk @@ -1,2 +1,8 @@ # /~https://github.com/qmk/qmk_firmware/issues/3448#issuecomment-406636125 -EXTRAFLAGS += -flto +# EXTRAFLAGS += -flto +LINK_TIME_OPTIMIZATION_ENABLE = yes + +MOUSEKEY_ENABLE = no # Mouse keys +# COMMAND_ENABLE = no # Commands for debug and configuration +SPACE_CADET_ENABLE = no # Space Cadet +DYNAMIC_MACRO_ENABLE = yes From 002adadf58fa7ad05edae7036bcf638251170894 Mon Sep 17 00:00:00 2001 From: Josh Hinnebusch Date: Wed, 6 Nov 2019 01:30:13 -0500 Subject: [PATCH 283/316] [Keyboard] update hbcp keymaps (#7275) * update hbcp keymaps * update hbcp info.json file * update readme * update hbcp "hiney" keymap --- keyboards/hineybush/hbcp/hbcp.h | 14 +- keyboards/hineybush/hbcp/info.json | 212 +++++++++++++++++- .../hineybush/hbcp/keymaps/default/keymap.c | 42 ++-- .../hineybush/hbcp/keymaps/default/readme.md | 3 +- .../hineybush/hbcp/keymaps/hiney/config.h | 16 ++ .../hineybush/hbcp/keymaps/hiney/keymap.c | 6 +- keyboards/hineybush/hbcp/keymaps/wkl/config.h | 19 ++ keyboards/hineybush/hbcp/keymaps/wkl/keymap.c | 82 +++++++ .../hineybush/hbcp/keymaps/wkl/readme.md | 1 + 9 files changed, 360 insertions(+), 35 deletions(-) create mode 100644 keyboards/hineybush/hbcp/keymaps/wkl/config.h create mode 100644 keyboards/hineybush/hbcp/keymaps/wkl/keymap.c create mode 100644 keyboards/hineybush/hbcp/keymaps/wkl/readme.md diff --git a/keyboards/hineybush/hbcp/hbcp.h b/keyboards/hineybush/hbcp/hbcp.h index bb9fcdca1100..0bcf7b7304a1 100644 --- a/keyboards/hineybush/hbcp/hbcp.h +++ b/keyboards/hineybush/hbcp/hbcp.h @@ -26,19 +26,19 @@ * represents the switch matrix. */ #define LAYOUT_all( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217, \ - K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, K317, \ - K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K415, K416, K417, \ - K500, K501, K502, K505, K509, K510, K511, K512, K513, K514, K515, K516, K517 \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, K015, K016, K017, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K013, K114, K115, K116, K117, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, K317, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K415, K416, K417, \ + K500, K501, K502, K505, K509, K510, K511, K512, K513, K514, K515, K516, K517 \ ) { \ { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017}, \ { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117}, \ { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217},\ { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, K317},\ { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K415, K416, K417},\ - { K500, K501, K502, KC_NO, KC_NO, KC_NO, K505, KC_NO, KC_NO, KC_NO, KC_NO,K509, K510, K511, K512, K513, K514, K515, K516, K517 }\ + { K500, K501, K502, KC_NO, KC_NO, K505, KC_NO, KC_NO, KC_NO, K509, K510, K511, K512, K513, K514, K515, K516, K517 }\ } #define LAYOUT_wkl( \ diff --git a/keyboards/hineybush/hbcp/info.json b/keyboards/hineybush/hbcp/info.json index bb21a6294b8c..8a8fd217f42a 100644 --- a/keyboards/hineybush/hbcp/info.json +++ b/keyboards/hineybush/hbcp/info.json @@ -2,14 +2,218 @@ "keyboard_name": "hbcp", "url": "", "maintainer": "hineybush", - "width": 22, - "height": 6.75, + "width": 19.5, + "height": 6.25, "layouts": { "LAYOUT_all": { - "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1.25, "y":0}, {"label":"F2", "x":2.25, "y":0}, {"label":"F3", "x":3.25, "y":0}, {"label":"F4", "x":4.25, "y":0}, {"label":"F5", "x":5.5, "y":0}, {"label":"F6", "x":6.5, "y":0}, {"label":"F7", "x":7.5, "y":0}, {"label":"F8", "x":8.5, "y":0}, {"label":"F9", "x":9.75, "y":0}, {"label":"F10", "x":10.75, "y":0}, {"label":"F11", "x":11.75, "y":0}, {"label":"F12", "x":12.75, "y":0}, {"label":"PrtSc", "x":15.5, "y":0}, {"label":"Scroll Lock", "x":16.5, "y":0}, {"label":"Pause", "x":17.5, "y":0}, {"label":"PgUp", "x":18.5, "y":0}, {"label":"~", "x":0, "y":1.25}, {"label":"!", "x":1, "y":1.25}, {"label":"@", "x":2, "y":1.25}, {"label":"#", "x":3, "y":1.25}, {"label":"$", "x":4, "y":1.25}, {"label":"%", "x":5, "y":1.25}, {"label":"^", "x":6, "y":1.25}, {"label":"&", "x":7, "y":1.25}, {"label":"*", "x":8, "y":1.25}, {"label":"(", "x":9, "y":1.25}, {"label":")", "x":10, "y":1.25}, {"label":"_", "x":11, "y":1.25}, {"label":"+", "x":12, "y":1.25}, {"x":13, "y":1.25}, {"x":14, "y":1.25}, {"label":"Num Lock", "x":15.5, "y":1.25}, {"label":"/", "x":16.5, "y":1.25}, {"label":"*", "x":17.5, "y":1.25}, {"label":"-", "x":18.5, "y":1.25}, {"label":"Tab", "x":0, "y":2.25, "w":1.5}, {"label":"Q", "x":1.5, "y":2.25}, {"label":"W", "x":2.5, "y":2.25}, {"label":"E", "x":3.5, "y":2.25}, {"label":"R", "x":4.5, "y":2.25}, {"label":"T", "x":5.5, "y":2.25}, {"label":"Y", "x":6.5, "y":2.25}, {"label":"U", "x":7.5, "y":2.25}, {"label":"I", "x":8.5, "y":2.25}, {"label":"O", "x":9.5, "y":2.25}, {"label":"P", "x":10.5, "y":2.25}, {"label":"{", "x":11.5, "y":2.25}, {"label":"}", "x":12.5, "y":2.25}, {"label":"|", "x":13.5, "y":2.25, "w":1.5}, {"label":"7", "x":15.5, "y":2.25}, {"label":"8", "x":16.5, "y":2.25}, {"label":"9", "x":17.5, "y":2.25}, {"x":18.5, "y":2.25}, {"label":"Caps Lock", "x":0, "y":3.25, "w":1.75}, {"label":"A", "x":1.75, "y":3.25}, {"label":"S", "x":2.75, "y":3.25}, {"label":"D", "x":3.75, "y":3.25}, {"label":"F", "x":4.75, "y":3.25}, {"label":"G", "x":5.75, "y":3.25}, {"label":"H", "x":6.75, "y":3.25}, {"label":"J", "x":7.75, "y":3.25}, {"label":"K", "x":8.75, "y":3.25}, {"label":"L", "x":9.75, "y":3.25}, {"label":":", "x":10.75, "y":3.25}, {"label":"\"", "x":11.75, "y":3.25}, {"x":12.75, "y":3.25}, {"label":"Enter", "x":13.75, "y":3.25, "w":1.25}, {"label":"4", "x":15.5, "y":3.25}, {"label":"5", "x":16.5, "y":3.25}, {"label":"6", "x":17.5, "y":3.25}, {"x":18.5, "y":3.25}, {"x":0, "y":4.25, "w":1.25}, {"x":1.25, "y":4.25}, {"label":"Z", "x":2.25, "y":4.25}, {"label":"X", "x":3.25, "y":4.25}, {"label":"C", "x":4.25, "y":4.25}, {"label":"V", "x":5.25, "y":4.25}, {"label":"B", "x":6.25, "y":4.25}, {"label":"N", "x":7.25, "y":4.25}, {"label":"M", "x":8.25, "y":4.25}, {"label":"<", "x":9.25, "y":4.25}, {"label":">", "x":10.25, "y":4.25}, {"label":"?", "x":11.25, "y":4.25}, {"label":"Shift", "x":12.25, "y":4.25, "w":1.75}, {"label":"\u2191", "x":14.25, "y":4.5}, {"label":"1", "x":15.5, "y":4.25}, {"label":"2", "x":16.5, "y":4.25}, {"label":"3", "x":17.5, "y":4.25}, {"x":18.5, "y":4.25}, {"x":0, "y":5.25, "w":1.25}, {"x":1.25, "y":5.25, "w":1.25}, {"x":2.5, "y":5.25, "w":1.25}, {"x":3.75, "y":5.25, "w":6.25}, {"x":10, "y":5.25}, {"x":11, "y":5.25}, {"x":12, "y":5.25}, {"label":"\u2190", "x":13.25, "y":5.5}, {"label":"\u2193", "x":14.25, "y":5.5}, {"label":"\u2192", "x":15.25, "y":5.5}, {"label":"0", "x":16.5, "y":5.25}, {"label":".", "x":17.5, "y":5.25}, {"x":18.5, "y":5.25}] + "key_count": 103, + "layout": [ + {"label":"Esc (K000)", "x":0, "y":0}, + {"label":"F1 (K001)", "x":1.25, "y":0}, + {"label":"F2 (K002)", "x":2.25, "y":0}, + {"label":"F3 (K003)", "x":3.25, "y":0}, + {"label":"F4 (K004)", "x":4.25, "y":0}, + {"label":"F5 (K005)", "x":5.5, "y":0}, + {"label":"F6 (K006)", "x":6.5, "y":0}, + {"label":"F7 (K007)", "x":7.5, "y":0}, + {"label":"F8 (K008)", "x":8.5, "y":0}, + {"label":"F9 (K009)", "x":9.75, "y":0}, + {"label":"F10 (K010)", "x":10.75, "y":0}, + {"label":"F11 (K011)", "x":11.75, "y":0}, + {"label":"F12 (K012)", "x":12.75, "y":0}, + {"label":"Delete (K014)", "x":15.5, "y":0}, + {"label":"Insert (K015)", "x":16.5, "y":0}, + {"label":"PgUp (K016)", "x":17.5, "y":0}, + {"label":"PgDn (K017)", "x":18.5, "y":0}, + {"label":"~ (K100)", "x":0, "y":1.25}, + {"label":"! (K101)", "x":1, "y":1.25}, + {"label":"@ (K102)", "x":2, "y":1.25}, + {"label":"# (K103)", "x":3, "y":1.25}, + {"label":"$ (K104)", "x":4, "y":1.25}, + {"label":"% (K105)", "x":5, "y":1.25}, + {"label":"^ (K106)", "x":6, "y":1.25}, + {"label":"& (K107)", "x":7, "y":1.25}, + {"label":"* (K108)", "x":8, "y":1.25}, + {"label":"( (K109)", "x":9, "y":1.25}, + {"label":") (K110)", "x":10, "y":1.25}, + {"label":"_ (K111)", "x":11, "y":1.25}, + {"label":"+ (K112)", "x":12, "y":1.25}, + {"label":"~ (K113)", "x":13, "y":1.25}, + {"label":"Backspace (K013)", "x":14, "y":1.25}, + {"label":"Num Lock (K114)", "x":15.5, "y":1.25}, + {"label":"/ (K115)", "x":16.5, "y":1.25}, + {"label":"* (K116)", "x":17.5, "y":1.25}, + {"label":"Pause (K117)", "x":18.5, "y":1.25}, + {"label":"Tab (K200)", "x":0, "y":2.25, "w":1.5}, + {"label":"Q (K201)", "x":1.5, "y":2.25}, + {"label":"W (K202)", "x":2.5, "y":2.25}, + {"label":"E (K203)", "x":3.5, "y":2.25}, + {"label":"R (K204)", "x":4.5, "y":2.25}, + {"label":"T (K205)", "x":5.5, "y":2.25}, + {"label":"Y (K206)", "x":6.5, "y":2.25}, + {"label":"U (K207)", "x":7.5, "y":2.25}, + {"label":"I (K208)", "x":8.5, "y":2.25}, + {"label":"O (K209)", "x":9.5, "y":2.25}, + {"label":"P (K210)", "x":10.5, "y":2.25}, + {"label":"{ (K211)", "x":11.5, "y":2.25}, + {"label":"} (K212)", "x":12.5, "y":2.25}, + {"label":"| (K213)", "x":13.5, "y":2.25, "w":1.5}, + {"label":"7 (K214)", "x":15.5, "y":2.25}, + {"label":"8 (K215)", "x":16.5, "y":2.25}, + {"label":"9 (K216)", "x":17.5, "y":2.25}, + {"label":"- (K217)", "x":18.5, "y":2.25}, + {"label":"Caps Lock (K300)", "x":0, "y":3.25, "w":1.75}, + {"label":"A (K301)", "x":1.75, "y":3.25}, + {"label":"S (K302)", "x":2.75, "y":3.25}, + {"label":"D (K303)", "x":3.75, "y":3.25}, + {"label":"F (K304)", "x":4.75, "y":3.25}, + {"label":"G (K305)", "x":5.75, "y":3.25}, + {"label":"H (K306)", "x":6.75, "y":3.25}, + {"label":"J (K307)", "x":7.75, "y":3.25}, + {"label":"K (K308)", "x":8.75, "y":3.25}, + {"label":"L (K309)", "x":9.75, "y":3.25}, + {"label":": (K310)", "x":10.75, "y":3.25}, + {"label":"\" (K311)", "x":11.75, "y":3.25}, + {"label":"~ (K312)", "x":12.75, "y":3.25}, + {"label":"Enter (K313)", "x":13.75, "y":3.25, "w":1.25}, + {"label":"4 (K314)", "x":15.5, "y":3.25}, + {"label":"5 (K315)", "x":16.5, "y":3.25}, + {"label":"6 (K316)", "x":17.5, "y":3.25}, + {"label":"+ (K317)", "x":18.5, "y":3.25}, + {"label":"Shift (K400)", "x":0, "y":4.25, "w":1.25}, + {"label":"| (K401)", "x":1.25, "y":4.25}, + {"label":"Z (K402)", "x":2.25, "y":4.25}, + {"label":"X (K403)", "x":3.25, "y":4.25}, + {"label":"C (K404)", "x":4.25, "y":4.25}, + {"label":"V (K405)", "x":5.25, "y":4.25}, + {"label":"B (K406)", "x":6.25, "y":4.25}, + {"label":"N (K407)", "x":7.25, "y":4.25}, + {"label":"M (K408)", "x":8.25, "y":4.25}, + {"label":"< (K409)", "x":9.25, "y":4.25}, + {"label":"> (K410)", "x":10.25, "y":4.25}, + {"label":"? (K411)", "x":11.25, "y":4.25}, + {"label":"Shift (K412)", "x":12.25, "y":4.25, "w":1.75}, + {"label":"Up (K413)", "x":14.25, "y":4.5}, + {"label":"1 (K414)", "x":15.5, "y":4.25}, + {"label":"2 (K415)", "x":16.5, "y":4.25}, + {"label":"3 (K416)", "x":17.5, "y":4.25}, + {"label":"TRNS (K417)", "x":18.5, "y":4.25}, + {"label":"Ctrl (K500)", "x":0, "y":5.25, "w":1.25}, + {"label":"GUI (K501)", "x":1.25, "y":5.25, "w":1.25}, + {"label":"Alt (K502)", "x":2.5, "y":5.25, "w":1.25}, + {"label":"Space (K505)", "x":3.75, "y":5.25, "w":6.25}, + {"label":"Alt (K509)", "x":10, "y":5.25}, + {"label":"MO(1) (K510)", "x":11, "y":5.25}, + {"label":"GUI (K511)", "x":12, "y":5.25}, + {"label":"Left (K512)", "x":13.25, "y":5.5}, + {"label":"Down (K513)", "x":14.25, "y":5.5}, + {"label":"Right (K514)", "x":15.25, "y":5.5}, + {"label":"0 (K515)", "x":16.5, "y":5.25}, + {"label":". (K516)", "x":17.5, "y":5.25}, + {"label":"Enter (K517)", "x":18.5, "y":5.25} + ] }, "LAYOUT_wkl": { - "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1.25, "y":0}, {"label":"F2", "x":2.25, "y":0}, {"label":"F3", "x":3.25, "y":0}, {"label":"F4", "x":4.25, "y":0}, {"label":"F5", "x":5.5, "y":0}, {"label":"F6", "x":6.5, "y":0}, {"label":"F7", "x":7.5, "y":0}, {"label":"F8", "x":8.5, "y":0}, {"label":"F9", "x":9.75, "y":0}, {"label":"F10", "x":10.75, "y":0}, {"label":"F11", "x":11.75, "y":0}, {"label":"F12", "x":12.75, "y":0}, {"label":"PrtSc", "x":15.5, "y":0}, {"label":"Scroll Lock", "x":16.5, "y":0}, {"label":"Pause", "x":17.5, "y":0}, {"label":"PgUp", "x":18.5, "y":0}, {"label":"~", "x":0, "y":1.25}, {"label":"!", "x":1, "y":1.25}, {"label":"@", "x":2, "y":1.25}, {"label":"#", "x":3, "y":1.25}, {"label":"$", "x":4, "y":1.25}, {"label":"%", "x":5, "y":1.25}, {"label":"^", "x":6, "y":1.25}, {"label":"&", "x":7, "y":1.25}, {"label":"*", "x":8, "y":1.25}, {"label":"(", "x":9, "y":1.25}, {"label":")", "x":10, "y":1.25}, {"label":"_", "x":11, "y":1.25}, {"label":"+", "x":12, "y":1.25}, {"label":"Backspace", "x":13, "y":1.25, "w":2}, {"label":"Num Lock", "x":15.5, "y":1.25}, {"label":"/", "x":16.5, "y":1.25}, {"label":"*", "x":17.5, "y":1.25}, {"label":"-", "x":18.5, "y":1.25}, {"label":"Tab", "x":0, "y":2.25, "w":1.5}, {"label":"Q", "x":1.5, "y":2.25}, {"label":"W", "x":2.5, "y":2.25}, {"label":"E", "x":3.5, "y":2.25}, {"label":"R", "x":4.5, "y":2.25}, {"label":"T", "x":5.5, "y":2.25}, {"label":"Y", "x":6.5, "y":2.25}, {"label":"U", "x":7.5, "y":2.25}, {"label":"I", "x":8.5, "y":2.25}, {"label":"O", "x":9.5, "y":2.25}, {"label":"P", "x":10.5, "y":2.25}, {"label":"{", "x":11.5, "y":2.25}, {"label":"}", "x":12.5, "y":2.25}, {"label":"|", "x":13.5, "y":2.25, "w":1.5}, {"label":"7", "x":15.5, "y":2.25}, {"label":"8", "x":16.5, "y":2.25}, {"label":"9", "x":17.5, "y":2.25}, {"x":18.5, "y":2.25}, {"label":"Caps Lock", "x":0, "y":3.25, "w":1.75}, {"label":"A", "x":1.75, "y":3.25}, {"label":"S", "x":2.75, "y":3.25}, {"label":"D", "x":3.75, "y":3.25}, {"label":"F", "x":4.75, "y":3.25}, {"label":"G", "x":5.75, "y":3.25}, {"label":"H", "x":6.75, "y":3.25}, {"label":"J", "x":7.75, "y":3.25}, {"label":"K", "x":8.75, "y":3.25}, {"label":"L", "x":9.75, "y":3.25}, {"label":":", "x":10.75, "y":3.25}, {"label":"\"", "x":11.75, "y":3.25}, {"label":"Enter", "x":12.75, "y":3.25, "w":2.25}, {"label":"4", "x":15.5, "y":3.25}, {"label":"5", "x":16.5, "y":3.25}, {"label":"6", "x":17.5, "y":3.25}, {"x":18.5, "y":3.25}, {"label":"Shift", "x":0, "y":4.25, "w":2.25}, {"label":"Z", "x":2.25, "y":4.25}, {"label":"X", "x":3.25, "y":4.25}, {"label":"C", "x":4.25, "y":4.25}, {"label":"V", "x":5.25, "y":4.25}, {"label":"B", "x":6.25, "y":4.25}, {"label":"N", "x":7.25, "y":4.25}, {"label":"M", "x":8.25, "y":4.25}, {"label":"<", "x":9.25, "y":4.25}, {"label":">", "x":10.25, "y":4.25}, {"label":"?", "x":11.25, "y":4.25}, {"label":"Shift", "x":12.25, "y":4.25, "w":1.75}, {"label":"\u2191", "x":14.25, "y":4.5}, {"label":"1", "x":15.5, "y":4.25}, {"label":"2", "x":16.5, "y":4.25}, {"label":"3", "x":17.5, "y":4.25}, {"label":"Enter", "x":18.5, "y":4.25, "h":2}, {"label":"Ctrl", "x":0, "y":5.25, "w":1.5}, {"label":"Alt", "x":1.5, "y":5.25, "w":1.5}, {"x":3, "y":5.25, "w":7}, {"label":"Alt", "x":10, "y":5.25, "w":1.5}, {"label":"Win", "x":11.5, "y":5.25, "w":1.5}, {"label":"\u2190", "x":13.25, "y":5.5}, {"label":"\u2193", "x":14.25, "y":5.5}, {"label":"\u2192", "x":15.25, "y":5.5}, {"label":"0", "x":16.5, "y":5.25}, {"label":".", "x":17.5, "y":5.25}] + "key_count": 97, + "layout": [ + {"label":"Esc (K000)", "x":0, "y":0}, + {"label":"F1 (K001)", "x":1.25, "y":0}, + {"label":"F2 (K002)", "x":2.25, "y":0}, + {"label":"F3 (K003)", "x":3.25, "y":0}, + {"label":"F4 (K004)", "x":4.25, "y":0}, + {"label":"F5 (K005)", "x":5.5, "y":0}, + {"label":"F6 (K006)", "x":6.5, "y":0}, + {"label":"F7 (K007)", "x":7.5, "y":0}, + {"label":"F8 (K008)", "x":8.5, "y":0}, + {"label":"F9 (K009)", "x":9.75, "y":0}, + {"label":"F10 (K010)", "x":10.75, "y":0}, + {"label":"F11 (K011)", "x":11.75, "y":0}, + {"label":"F12 (K012)", "x":12.75, "y":0}, + {"label":"Delete (K014)", "x":15.5, "y":0}, + {"label":"Insert (K015)", "x":16.5, "y":0}, + {"label":"PgUp (K016)", "x":17.5, "y":0}, + {"label":"PgDn (K017)", "x":18.5, "y":0}, + {"label":"~ (K100)", "x":0, "y":1.25}, + {"label":"! (K101)", "x":1, "y":1.25}, + {"label":"@ (K102)", "x":2, "y":1.25}, + {"label":"# (K103)", "x":3, "y":1.25}, + {"label":"$ (K104)", "x":4, "y":1.25}, + {"label":"% (K105)", "x":5, "y":1.25}, + {"label":"^ (K106)", "x":6, "y":1.25}, + {"label":"& (K107)", "x":7, "y":1.25}, + {"label":"* (K108)", "x":8, "y":1.25}, + {"label":"( (K109)", "x":9, "y":1.25}, + {"label":") (K110)", "x":10, "y":1.25}, + {"label":"_ (K111)", "x":11, "y":1.25}, + {"label":"+ (K112)", "x":12, "y":1.25}, + {"label":"Backspace (K013)", "x":13, "y":1.25, "w":2}, + {"label":"Num Lock (K114)", "x":15.5, "y":1.25}, + {"label":"/ (K115)", "x":16.5, "y":1.25}, + {"label":"* (K116)", "x":17.5, "y":1.25}, + {"label":"Pause (K117)", "x":18.5, "y":1.25}, + {"label":"Tab (K200)", "x":0, "y":2.25, "w":1.5}, + {"label":"Q (K201)", "x":1.5, "y":2.25}, + {"label":"W (K202)", "x":2.5, "y":2.25}, + {"label":"E (K203)", "x":3.5, "y":2.25}, + {"label":"R (K204)", "x":4.5, "y":2.25}, + {"label":"T (K205)", "x":5.5, "y":2.25}, + {"label":"Y (K206)", "x":6.5, "y":2.25}, + {"label":"U (K207)", "x":7.5, "y":2.25}, + {"label":"I (K208)", "x":8.5, "y":2.25}, + {"label":"O (K209)", "x":9.5, "y":2.25}, + {"label":"P (K210)", "x":10.5, "y":2.25}, + {"label":"{ (K211)", "x":11.5, "y":2.25}, + {"label":"} (K212)", "x":12.5, "y":2.25}, + {"label":"| (K213)", "x":13.5, "y":2.25, "w":1.5}, + {"label":"7 (K214)", "x":15.5, "y":2.25}, + {"label":"8 (K215)", "x":16.5, "y":2.25}, + {"label":"9 (K216)", "x":17.5, "y":2.25}, + {"label":"- (K217)", "x":18.5, "y":2.25}, + {"label":"Caps Lock (K300)", "x":0, "y":3.25, "w":1.75}, + {"label":"A (K301)", "x":1.75, "y":3.25}, + {"label":"S (K302)", "x":2.75, "y":3.25}, + {"label":"D (K303)", "x":3.75, "y":3.25}, + {"label":"F (K304)", "x":4.75, "y":3.25}, + {"label":"G (K305)", "x":5.75, "y":3.25}, + {"label":"H (K306)", "x":6.75, "y":3.25}, + {"label":"J (K307)", "x":7.75, "y":3.25}, + {"label":"K (K308)", "x":8.75, "y":3.25}, + {"label":"L (K309)", "x":9.75, "y":3.25}, + {"label":": (K310)", "x":10.75, "y":3.25}, + {"label":"\" (K311)", "x":11.75, "y":3.25}, + {"label":"Enter (K313)", "x":12.75, "y":3.25, "w":2.25}, + {"label":"4 (K314)", "x":15.5, "y":3.25}, + {"label":"5 (K315)", "x":16.5, "y":3.25}, + {"label":"6 (K316)", "x":17.5, "y":3.25}, + {"label":"+ (K317)", "x":18.5, "y":3.25}, + {"label":"Shift (K400)", "x":0, "y":4.25, "w":2.25}, + {"label":"Z (K402)", "x":2.25, "y":4.25}, + {"label":"X (K403)", "x":3.25, "y":4.25}, + {"label":"C (K404)", "x":4.25, "y":4.25}, + {"label":"V (K405)", "x":5.25, "y":4.25}, + {"label":"B (K406)", "x":6.25, "y":4.25}, + {"label":"N (K407)", "x":7.25, "y":4.25}, + {"label":"M (K408)", "x":8.25, "y":4.25}, + {"label":"< (K409)", "x":9.25, "y":4.25}, + {"label":"> (K410)", "x":10.25, "y":4.25}, + {"label":"? (K411)", "x":11.25, "y":4.25}, + {"label":"Shift (K412)", "x":12.25, "y":4.25, "w":1.75}, + {"label":"Up (K413)", "x":14.25, "y":4.5}, + {"label":"1 (K414)", "x":15.5, "y":4.25}, + {"label":"2 (K415)", "x":16.5, "y":4.25}, + {"label":"3 (K416)", "x":17.5, "y":4.25}, + {"label":"Ctrl (K500)", "x":0, "y":5.25, "w":1.5}, + {"label":"Alt (K501)", "x":1.5, "y":5.25, "w":1.5}, + {"label":"Space (K505)", "x":3, "y":5.25, "w":7}, + {"label":"MO(1) (K510)", "x":10, "y":5.25, "w":1.5}, + {"label":"GUI (K511)", "x":11.5, "y":5.25, "w":1.5}, + {"label":"Left (K512)", "x":13.25, "y":5.5}, + {"label":"Down (K513)", "x":14.25, "y":5.5}, + {"label":"Right (K514)", "x":15.25, "y":5.5}, + {"label":"0 (K515)", "x":16.5, "y":5.25}, + {"label":". (K516)", "x":17.5, "y":5.25}, + {"label":"Enter (K517)", "x":18.5, "y":4.25, "h":2} + ] } } } diff --git a/keyboards/hineybush/hbcp/keymaps/default/keymap.c b/keyboards/hineybush/hbcp/keymaps/default/keymap.c index 09d5b6b33cdf..b8ab480ba31e 100644 --- a/keyboards/hineybush/hbcp/keymaps/default/keymap.c +++ b/keyboards/hineybush/hbcp/keymaps/default/keymap.c @@ -23,30 +23,32 @@ enum custom_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_wkl( /* Base */ + [0] = LAYOUT_all( /* Base */ - /*K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, K015, K016, K017, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K013, K114, K115, K116, K117, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217, \ - K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, K316, K317, \ - K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K415, K416, \ - K500, K501, K505, K510, K511, K512, K513, K514, K515, K516, K517 \*/ - KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_INS, KC_PGUP, KC_PGDN, - 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_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, - 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_PMNS, - 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_P4, KC_P5, KC_P6, KC_PPLS, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, KC_P1, KC_P2, KC_P3, - KC_LCTL, KC_LALT, KC_SPC, MO(1), KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT + /*#define LAYOUT_all( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, K015, K016, K017, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K013, K114, K115, K116, K117, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, K317, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K415, K416, K417, \ + K500, K501, K502, K505, K509, K510, K511, K512, K513, K514, K515, K516, K517 \ +)*/ + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_INS, KC_PGUP, KC_PGDN, + 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_GRV, KC_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, + 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_PMNS, + 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_LSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_TRNS, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, MO(1), KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT ), - [1] = LAYOUT_wkl( - KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK,KC_HOME, KC_END, - KC_TRNS, KC_TRNS, 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_HUD, RGB_HUI,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, RGB_SAD, RGB_SAI,KC_TRNS, KC_TRNS, - KC_TRNS, 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_VAD, 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, KC_VOLU, RGB_TOG, RGB_MOD,KC_TRNS, - KC_TRNS, KC_TRNS, KC_MPLY, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT, KC_TRNS,KC_TRNS, KC_TRNS + [1] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK,KC_HOME, KC_END, + KC_TRNS, KC_TRNS, KC_TRNS,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_HUD, RGB_HUI,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, RGB_SAD, RGB_SAI,KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, 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_VAD, 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, KC_TRNS, KC_VOLU, RGB_TOG, RGB_MOD,KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT, KC_TRNS,KC_TRNS, KC_TRNS ), }; diff --git a/keyboards/hineybush/hbcp/keymaps/default/readme.md b/keyboards/hineybush/hbcp/keymaps/default/readme.md index becc5829b8db..8cbd45cd094e 100644 --- a/keyboards/hineybush/hbcp/keymaps/default/readme.md +++ b/keyboards/hineybush/hbcp/keymaps/default/readme.md @@ -1 +1,2 @@ -# The default keymap for hbcp \ No newline at end of file +# The default "all key" keymap for hbcp +# Somewhat dirty with ISO and split backspace, but has all keys diff --git a/keyboards/hineybush/hbcp/keymaps/hiney/config.h b/keyboards/hineybush/hbcp/keymaps/hiney/config.h index 2d8bbf3a7335..b864d6a63557 100644 --- a/keyboards/hineybush/hbcp/keymaps/hiney/config.h +++ b/keyboards/hineybush/hbcp/keymaps/hiney/config.h @@ -22,6 +22,22 @@ #define HSV_SOFT_PINK 255, 110, 100 // Define custom "soft pink" color #endif +#ifndef HSV_SOFT_WHITE + #define HSV_SOFT_WHITE 0, 0, 90 // Define custom "soft white" color +#endif + +#ifndef HSV_WARM_WHITE + #define HSV_WARM_WHITE 41, 105, 90 // Define custom "warm white" color +#endif + +#ifndef HSV_SOFT_RED + #define HSV_SOFT_RED 0, 240, 160 // Define custom "soft red" color +#endif + +#ifndef HSV_SOFT_BLUE + #define HSV_SOFT_BLUE 159, 180, 160 // Define custom "soft blue" color +#endif + #ifndef HSV_BLACK #define HSV_BLACK 0, 0, 0 // Define 'black' color, more like 'LED off' (H, S, V) #endif diff --git a/keyboards/hineybush/hbcp/keymaps/hiney/keymap.c b/keyboards/hineybush/hbcp/keymaps/hiney/keymap.c index c3186cbc438e..bcfb9ed5bc92 100644 --- a/keyboards/hineybush/hbcp/keymaps/hiney/keymap.c +++ b/keyboards/hineybush/hbcp/keymaps/hiney/keymap.c @@ -86,17 +86,17 @@ void matrix_scan_user(void) { // The first three LEDs are used as indicators for CAPS_LOCK, NUM_LOCK and SCROLL_LOCK. void led_set_user(uint8_t usb_led) { if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - sethsv_raw(HSV_SOFT_PINK, (LED_TYPE *)&led[0]); + sethsv_raw(HSV_SOFT_RED, (LED_TYPE *)&led[0]); } else { sethsv(HSV_BLACK, (LED_TYPE *)&led[0]); } if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { - sethsv_raw(HSV_SOFT_PINK, (LED_TYPE *)&led[1]); + sethsv_raw(HSV_WARM_WHITE, (LED_TYPE *)&led[1]); } else { sethsv(HSV_BLACK, (LED_TYPE *)&led[1]); } if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { - sethsv_raw(HSV_SOFT_PINK, (LED_TYPE *)&led[2]); + sethsv_raw(HSV_SOFT_BLUE, (LED_TYPE *)&led[2]); } else { sethsv(HSV_BLACK, (LED_TYPE *)&led[2]); } diff --git a/keyboards/hineybush/hbcp/keymaps/wkl/config.h b/keyboards/hineybush/hbcp/keymaps/wkl/config.h new file mode 100644 index 000000000000..89865cef3527 --- /dev/null +++ b/keyboards/hineybush/hbcp/keymaps/wkl/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 hineybush + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/hineybush/hbcp/keymaps/wkl/keymap.c b/keyboards/hineybush/hbcp/keymaps/wkl/keymap.c new file mode 100644 index 000000000000..09d5b6b33cdf --- /dev/null +++ b/keyboards/hineybush/hbcp/keymaps/wkl/keymap.c @@ -0,0 +1,82 @@ +/* Copyright 2019 hineybush + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_wkl( /* Base */ + + /*K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, K015, K016, K017, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K013, K114, K115, K116, K117, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, K316, K317, \ + K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K415, K416, \ + K500, K501, K505, K510, K511, K512, K513, K514, K515, K516, K517 \*/ + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_INS, KC_PGUP, KC_PGDN, + 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_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, + 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_PMNS, + 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_P4, KC_P5, KC_P6, KC_PPLS, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, KC_P1, KC_P2, KC_P3, + KC_LCTL, KC_LALT, KC_SPC, MO(1), KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT + + ), + + [1] = LAYOUT_wkl( + KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK,KC_HOME, KC_END, + KC_TRNS, KC_TRNS, 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_HUD, RGB_HUI,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, RGB_SAD, RGB_SAI,KC_TRNS, KC_TRNS, + KC_TRNS, 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_VAD, 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, KC_VOLU, RGB_TOG, RGB_MOD,KC_TRNS, + KC_TRNS, KC_TRNS, KC_MPLY, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT, KC_TRNS,KC_TRNS, KC_TRNS + + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMKBEST: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + SEND_STRING("QMK is the best thing ever!"); + } else { + // when keycode QMKBEST is released + } + break; + case QMKURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} diff --git a/keyboards/hineybush/hbcp/keymaps/wkl/readme.md b/keyboards/hineybush/hbcp/keymaps/wkl/readme.md new file mode 100644 index 000000000000..70f593637051 --- /dev/null +++ b/keyboards/hineybush/hbcp/keymaps/wkl/readme.md @@ -0,0 +1 @@ +# The default WKL keymap for hbcp From b9610091f520f7f20d20964101ae28f7b5f77de2 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Thu, 7 Nov 2019 19:36:31 +1100 Subject: [PATCH 284/316] [Keyboard] Fix `led_init_ports()` for Wasdat (#7288) --- keyboards/maartenwut/wasdat/wasdat.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/keyboards/maartenwut/wasdat/wasdat.c b/keyboards/maartenwut/wasdat/wasdat.c index 99dd97dcfa99..a2ec320f78f1 100644 --- a/keyboards/maartenwut/wasdat/wasdat.c +++ b/keyboards/maartenwut/wasdat/wasdat.c @@ -29,8 +29,11 @@ void matrix_init_kb(void) { void led_init_ports(void) { setPinOutput(B0); + writePinHigh(B0); setPinOutput(B1); + writePinHigh(B1); setPinOutput(B2); + writePinHigh(B2); } bool led_update_kb(led_t led_state) { From 1ea0cac998cab60c8b2aa64ba4bd995acbece4b4 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Thu, 7 Nov 2019 13:10:29 +0000 Subject: [PATCH 285/316] ARM - ws2812 bitbang (#7173) * Initial ARM bitbang ws2812 driver * Unify chibios platform to run rgblight_task * Remove 'avr only' comments from ws2812 docs * Remove 'avr only' comments from ws2812 docs * Unify chibios platform to run rgblight_task - review comments * Remove debug flags from keymap * Add comments from review * Add defines for STM32L0XX * Attempt to get arm ws2812 working on multiple gcc versions --- docs/feature_rgb_matrix.md | 2 +- docs/feature_rgblight.md | 2 +- docs/hardware_drivers.md | 2 +- docs/ws2812_driver.md | 13 ++- drivers/arm/ws2812.c | 101 +++++++++++++++++- drivers/arm/ws2812.h | 17 +++ keyboards/handwired/onekey/bluepill/config.h | 2 + .../handwired/onekey/keymaps/rgb/config.h | 4 + .../handwired/onekey/keymaps/rgb/keymap.c | 11 ++ .../handwired/onekey/keymaps/rgb/rules.mk | 1 + keyboards/handwired/onekey/proton_c/config.h | 2 + .../handwired/onekey/stm32f0_disco/config.h | 2 + quantum/stm32/proton_c.mk | 2 +- tmk_core/protocol/chibios/main.c | 8 ++ 14 files changed, 162 insertions(+), 7 deletions(-) create mode 100644 drivers/arm/ws2812.h create mode 100644 keyboards/handwired/onekey/keymaps/rgb/config.h create mode 100644 keyboards/handwired/onekey/keymaps/rgb/keymap.c create mode 100644 keyboards/handwired/onekey/keymaps/rgb/rules.mk diff --git a/docs/feature_rgb_matrix.md b/docs/feature_rgb_matrix.md index b2850c3cff22..3e69361fbdaf 100644 --- a/docs/feature_rgb_matrix.md +++ b/docs/feature_rgb_matrix.md @@ -107,7 +107,7 @@ Where `X_Y` is the location of the LED in the matrix defined by [the datasheet]( --- -### WS2812 (AVR only) +### WS2812 There is basic support for addressable RGB matrix lighting with a WS2811/WS2812{a,b,c} addressable LED strand. To enable it, add this to your `rules.mk`: diff --git a/docs/feature_rgblight.md b/docs/feature_rgblight.md index be4ddfa72956..397dde587df2 100644 --- a/docs/feature_rgblight.md +++ b/docs/feature_rgblight.md @@ -6,7 +6,7 @@ QMK has the ability to control RGB LEDs attached to your keyboard. This is commo Some keyboards come with RGB LEDs preinstalled. Others must have them installed after the fact. See the [Hardware Modification](#hardware-modification) section for information on adding RGB lighting to your keyboard. -Currently QMK supports the following addressable LEDs on AVR microcontrollers (however, the white LED in RGBW variants is not supported): +Currently QMK supports the following addressable LEDs (however, the white LED in RGBW variants is not supported): * WS2811, WS2812, WS2812B, WS2812C, etc. * SK6812, SK6812MINI, SK6805 diff --git a/docs/hardware_drivers.md b/docs/hardware_drivers.md index 321ba2a4bcb5..16518779570a 100644 --- a/docs/hardware_drivers.md +++ b/docs/hardware_drivers.md @@ -22,7 +22,7 @@ Support for SSD1306 based OLED displays. For more information see the [OLED Driv You can make use of uGFX within QMK to drive character and graphic LCDs, LED arrays, OLED, TFT, and other display technologies. This needs to be better documented, if you are trying to do this and reading the code doesn't help please [open an issue](/~https://github.com/qmk/qmk_firmware/issues/new) and we can help you through the process. -## WS2812 (AVR Only) +## WS2812 Support for WS2811/WS2812{a,b,c} LED's. For more information see the [RGB Light](feature_rgblight.md) page. diff --git a/docs/ws2812_driver.md b/docs/ws2812_driver.md index 6fa5d324cfbf..67481c458db6 100644 --- a/docs/ws2812_driver.md +++ b/docs/ws2812_driver.md @@ -1,13 +1,22 @@ # WS2812 Driver This driver powers the [RGB Lighting](feature_rgblight.md) and [RGB Matrix](feature_rgb_matrix.md) features. -Currently QMK supports the following addressable LEDs on AVR microcontrollers (however, the white LED in RGBW variants is not supported): +Currently QMK supports the following addressable LEDs (however, the white LED in RGBW variants is not supported): WS2811, WS2812, WS2812B, WS2812C, etc. SK6812, SK6812MINI, SK6805 These LEDs are called "addressable" because instead of using a wire per color, each LED contains a small microchip that understands a special protocol sent over a single wire. The chip passes on the remaining data to the next LED, allowing them to be chained together. In this way, you can easily control the color of the individual LEDs. +## Supported Driver Types + +| | AVR | ARM | +|----------|--------------------|--------------------| +| bit bang | :heavy_check_mark: | :heavy_check_mark: | +| I2C | :heavy_check_mark: | | +| SPI | | Soon™ | +| PWM | | Soon™ | + ## Driver configuration ### Bitbang @@ -17,7 +26,7 @@ Default driver, the absence of configuration assumes this driver. To configure i WS2812_DRIVER = bitbang ``` -!> ARM does not yet support WS2182. Progress is being made, but we are not quite there, yet. +!> This driver is not hardware accelerated and may not be performant on heavily loaded systems. ### I2C Targeting boards where WS2812 support is offloaded to a 2nd MCU. Currently the driver is limited to AVR given the known consumers are ps2avrGB/BMC. To configure it, add this to your rules.mk: diff --git a/drivers/arm/ws2812.c b/drivers/arm/ws2812.c index 2094e50098af..b076eff33002 100644 --- a/drivers/arm/ws2812.c +++ b/drivers/arm/ws2812.c @@ -1 +1,100 @@ -#error("NOT SUPPORTED") \ No newline at end of file +#include "quantum.h" +#include "ws2812.h" +#include "ch.h" +#include "hal.h" + +/* Adapted from /~https://github.com/bigjosh/SimpleNeoPixelDemo/ */ + +#ifndef NOP_FUDGE +# if defined(STM32F1XX) || defined(STM32F1xx) || defined(STM32F0XX) || defined(STM32F0xx) || defined(STM32F3XX) || defined(STM32F3xx) || defined(STM32L0XX) || defined(STM32L0xx) +# define NOP_FUDGE 0.4 +# else +# error("NOP_FUDGE configuration required") +# define NOP_FUDGE 1 // this just pleases the compile so the above error is easier to spot +# endif +#endif + +#define NUMBER_NOPS 6 +#define CYCLES_PER_SEC (STM32_SYSCLK / NUMBER_NOPS * NOP_FUDGE) +#define NS_PER_SEC (1000000000L) // Note that this has to be SIGNED since we want to be able to check for negative values of derivatives +#define NS_PER_CYCLE (NS_PER_SEC / CYCLES_PER_SEC) +#define NS_TO_CYCLES(n) ((n) / NS_PER_CYCLE) + +#define wait_ns(x) \ + do { \ + for (int i = 0; i < NS_TO_CYCLES(x); i++) { \ + __asm__ volatile("nop\n\t" \ + "nop\n\t" \ + "nop\n\t" \ + "nop\n\t" \ + "nop\n\t" \ + "nop\n\t"); \ + } \ + } while (0) + +// These are the timing constraints taken mostly from the WS2812 datasheets +// These are chosen to be conservative and avoid problems rather than for maximum throughput + +#define T1H 900 // Width of a 1 bit in ns +#define T1L (1250 - T1H) // Width of a 1 bit in ns + +#define T0H 350 // Width of a 0 bit in ns +#define T0L (1250 - T0H) // Width of a 0 bit in ns + +// The reset gap can be 6000 ns, but depending on the LED strip it may have to be increased +// to values like 600000 ns. If it is too small, the pixels will show nothing most of the time. +#define RES 10000 // Width of the low gap between bits to cause a frame to latch + +void sendByte(uint8_t byte) { + // WS2812 protocol wants most significant bits first + for (unsigned char bit = 0; bit < 8; bit++) { + bool is_one = byte & (1 << (7 - bit)); + // using something like wait_ns(is_one ? T1L : T0L) here throws off timings + if (is_one) { + // 1 + writePinHigh(RGB_DI_PIN); + wait_ns(T1H); + writePinLow(RGB_DI_PIN); + wait_ns(T1L); + } else { + // 0 + writePinHigh(RGB_DI_PIN); + wait_ns(T0H); + writePinLow(RGB_DI_PIN); + wait_ns(T0L); + } + } +} + +void ws2812_init(void) { setPinOutput(RGB_DI_PIN); } + +// Setleds for standard RGB +void ws2812_setleds(LED_TYPE *ledarray, uint16_t leds) { + static bool s_init = false; + if (!s_init) { + ws2812_init(); + s_init = true; + } + + // this code is very time dependent, so we need to disable interrupts + chSysLock(); + + for (uint8_t i = 0; i < leds; i++) { + // WS2812 protocol dictates grb order + sendByte(ledarray[i].g); + sendByte(ledarray[i].r); + sendByte(ledarray[i].b); + } + + wait_ns(RES); + + chSysUnlock(); +} + +// Setleds for SK6812RGBW +void ws2812_setleds_rgbw(LED_TYPE *ledarray, uint16_t leds) { +// not supported - for now error out if its enabled +#ifdef RGBW +# error "RGBW not supported" +#endif +} diff --git a/drivers/arm/ws2812.h b/drivers/arm/ws2812.h new file mode 100644 index 000000000000..bf5c9fd0f187 --- /dev/null +++ b/drivers/arm/ws2812.h @@ -0,0 +1,17 @@ +#pragma once + +#include "quantum/color.h" + +/* User Interface + * + * Input: + * ledarray: An array of GRB data describing the LED colors + * number_of_leds: The number of LEDs to write + * + * The functions will perform the following actions: + * - Set the data-out pin as output + * - Send out the LED data + * - Wait 50�s to reset the LEDs + */ +void ws2812_setleds(LED_TYPE *ledarray, uint16_t number_of_leds); +void ws2812_setleds_rgbw(LED_TYPE *ledarray, uint16_t number_of_leds); diff --git a/keyboards/handwired/onekey/bluepill/config.h b/keyboards/handwired/onekey/bluepill/config.h index 81282ae1ffc3..01555e43152f 100644 --- a/keyboards/handwired/onekey/bluepill/config.h +++ b/keyboards/handwired/onekey/bluepill/config.h @@ -25,3 +25,5 @@ #define BACKLIGHT_PIN A0 #define BACKLIGHT_PWM_DRIVER PWMD2 #define BACKLIGHT_PWM_CHANNEL 1 + +#define RGB_DI_PIN A1 diff --git a/keyboards/handwired/onekey/keymaps/rgb/config.h b/keyboards/handwired/onekey/keymaps/rgb/config.h new file mode 100644 index 000000000000..89e76326b41a --- /dev/null +++ b/keyboards/handwired/onekey/keymaps/rgb/config.h @@ -0,0 +1,4 @@ +#pragma once + +#define RGBLED_NUM 9 +#define RGBLIGHT_ANIMATIONS diff --git a/keyboards/handwired/onekey/keymaps/rgb/keymap.c b/keyboards/handwired/onekey/keymaps/rgb/keymap.c new file mode 100644 index 000000000000..a96c6f386398 --- /dev/null +++ b/keyboards/handwired/onekey/keymaps/rgb/keymap.c @@ -0,0 +1,11 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + LAYOUT( RGB_MOD ) +}; + +void keyboard_post_init_user(void) { + rgblight_enable_noeeprom(); + rgblight_sethsv_noeeprom_cyan(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_SWIRL); +} diff --git a/keyboards/handwired/onekey/keymaps/rgb/rules.mk b/keyboards/handwired/onekey/keymaps/rgb/rules.mk new file mode 100644 index 000000000000..1e3cebb14515 --- /dev/null +++ b/keyboards/handwired/onekey/keymaps/rgb/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = yes diff --git a/keyboards/handwired/onekey/proton_c/config.h b/keyboards/handwired/onekey/proton_c/config.h index d4fb9c829975..fe34f94add3f 100644 --- a/keyboards/handwired/onekey/proton_c/config.h +++ b/keyboards/handwired/onekey/proton_c/config.h @@ -26,3 +26,5 @@ #define BACKLIGHT_PWM_DRIVER PWMD4 #define BACKLIGHT_PWM_CHANNEL 3 #define BACKLIGHT_PAL_MODE 2 + +#define RGB_DI_PIN A1 diff --git a/keyboards/handwired/onekey/stm32f0_disco/config.h b/keyboards/handwired/onekey/stm32f0_disco/config.h index 4024ee1caa6b..637ed65d3fa3 100644 --- a/keyboards/handwired/onekey/stm32f0_disco/config.h +++ b/keyboards/handwired/onekey/stm32f0_disco/config.h @@ -26,3 +26,5 @@ #define BACKLIGHT_PWM_DRIVER PWMD3 #define BACKLIGHT_PWM_CHANNEL 3 #define BACKLIGHT_PAL_MODE 0 + +#define RGB_DI_PIN B15 diff --git a/quantum/stm32/proton_c.mk b/quantum/stm32/proton_c.mk index 193e09ca1e09..ff28a4cb5d58 100644 --- a/quantum/stm32/proton_c.mk +++ b/quantum/stm32/proton_c.mk @@ -2,7 +2,7 @@ # These are defaults based on what has been implemented for ARM boards AUDIO_ENABLE = yes -RGBLIGHT_ENABLE = no +WS2812_DRIVER = bitbang # Force task driven PWM until ARM can provide automatic configuration ifneq ($(strip $(BACKLIGHT_ENABLE)), no) diff --git a/tmk_core/protocol/chibios/main.c b/tmk_core/protocol/chibios/main.c index de2b493b8418..c304f4d795c2 100644 --- a/tmk_core/protocol/chibios/main.c +++ b/tmk_core/protocol/chibios/main.c @@ -32,6 +32,11 @@ #include "sendchar.h" #include "debug.h" #include "printf.h" +#include "rgblight_reconfig.h" + +#if (defined(RGB_MIDI) || defined(RGBLIGHT_ANIMATIONS)) && defined(RGBLIGHT_ENABLE) +# include "rgblight.h" +#endif #ifdef SLEEP_LED_ENABLE # include "sleep_led.h" #endif @@ -214,6 +219,9 @@ int main(void) { #endif #ifdef RAW_ENABLE raw_hid_task(); +#endif +#if defined(RGBLIGHT_ANIMATIONS) && defined(RGBLIGHT_ENABLE) + rgblight_task(); #endif } } From 0f249990a9cd294d63ffe40eec1b96a276c138e8 Mon Sep 17 00:00:00 2001 From: Derek Date: Thu, 7 Nov 2019 10:51:06 -0500 Subject: [PATCH 286/316] [Keyboard] Add UA62 keyboard (#7290) * Added UA62 Added UA62 Keyboard * Update readme.md * Made changes based on code review Updated files. * Rename UA62.c to ua62.c * Rename UA62.h to ua62.h * Rename keyboards/UA62/readme.md to keyboards/ua62/readme.md * Rename keyboards/UA62/keymaps/default/keymap.c to keyboards/ua62/keymaps/default/keymap.c * Rename keyboards/UA62/config.h to keyboards/ua62/config.h * Update and rename keyboards/UA62/info.json to keyboards/ua62/info.json * Rename keyboards/UA62/rules.mk to keyboards/ua62/rules.mk * Rename keyboards/UA62/ua62.c to keyboards/ua62/ua62.c * Rename keyboards/UA62/ua62.h to keyboards/ua62/ua62.h * Update keyboards/ua62/readme.md --- keyboards/ua62/config.h | 250 ++++++++++++++++++++++++ keyboards/ua62/info.json | 12 ++ keyboards/ua62/keymaps/default/keymap.c | 43 ++++ keyboards/ua62/readme.md | 14 ++ keyboards/ua62/rules.mk | 32 +++ keyboards/ua62/ua62.c | 17 ++ keyboards/ua62/ua62.h | 41 ++++ 7 files changed, 409 insertions(+) create mode 100644 keyboards/ua62/config.h create mode 100644 keyboards/ua62/info.json create mode 100644 keyboards/ua62/keymaps/default/keymap.c create mode 100644 keyboards/ua62/readme.md create mode 100644 keyboards/ua62/rules.mk create mode 100644 keyboards/ua62/ua62.c create mode 100644 keyboards/ua62/ua62.h diff --git a/keyboards/ua62/config.h b/keyboards/ua62/config.h new file mode 100644 index 000000000000..a6590d368599 --- /dev/null +++ b/keyboards/ua62/config.h @@ -0,0 +1,250 @@ +/* +Copyright 2019 NaCly + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xBEEF +#define PRODUCT_ID 0xFFFF +#define DEVICE_VER 0x0001 +#define MANUFACTURER NaCly +#define PRODUCT UA62 +#define DESCRIPTION A Keyboard Used for Input. + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 13 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { D3, D2, D1, D0, D4 } +#define MATRIX_COL_PINS { C6, D7, E6, B4, B5, B6, B2, B3, B1, F7, F6, F5, F4 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION ROW2COL + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* 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 + +#define TAPPING_TERM 200 +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * 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 + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/ua62/info.json b/keyboards/ua62/info.json new file mode 100644 index 000000000000..f50ec854ff8e --- /dev/null +++ b/keyboards/ua62/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "ua62", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5.7, + "layouts": { + "LAYOUT": { + "layout": [{"x":0, "y":0.6}, {"x":1, "y":0.6}, {"x":2, "y":0.35}, {"x":3, "y":0}, {"x":4, "y":0.35}, {"x":5, "y":0.7}, {"x":9, "y":0.7}, {"x":10, "y":0.35}, {"x":11, "y":0}, {"x":12, "y":0.35}, {"x":13, "y":0.6}, {"x":14, "y":0.6}, {"x":0, "y":1.6}, {"x":1, "y":1.6}, {"x":2, "y":1.35}, {"x":3, "y":1}, {"x":4, "y":1.35}, {"x":5, "y":1.7}, {"x":9, "y":1.7}, {"x":10, "y":1.35}, {"x":11, "y":1}, {"x":12, "y":1.35}, {"x":13, "y":1.6}, {"x":14, "y":1.6}, {"x":0, "y":2.6}, {"x":1, "y":2.6}, {"x":2, "y":2.35}, {"x":3, "y":2}, {"x":4, "y":2.35}, {"x":5, "y":2.7}, {"x":9, "y":2.7}, {"x":10, "y":2.35}, {"x":11, "y":2}, {"x":12, "y":2.35}, {"x":13, "y":2.6}, {"x":14, "y":2.6}, {"x":0, "y":3.6}, {"x":1, "y":3.6}, {"x":2, "y":3.35}, {"x":3, "y":3}, {"x":4, "y":3.35}, {"x":5, "y":3.7}, {"x":9, "y":3.7}, {"x":10, "y":3.35}, {"x":11, "y":3}, {"x":12, "y":3.35}, {"x":13, "y":3.6}, {"x":14, "y":3.6}, {"x":0, "y":4.6}, {"x":1, "y":4.6}, {"x":2, "y":4.35}, {"x":3, "y":4}, {"x":4, "y":4.35}, {"x":5, "y":4.7}, {"x":6, "y":3.95, "h":1.5}, {"x":8, "y":3.95, "h":1.5}, {"x":9, "y":4.7}, {"x":10, "y":4.35}, {"x":11, "y":4}, {"x":12, "y":4.35}, {"x":13, "y":4.6}, {"x":14, "y":4.6}] + } + } + } diff --git a/keyboards/ua62/keymaps/default/keymap.c b/keyboards/ua62/keymaps/default/keymap.c new file mode 100644 index 000000000000..5488fdfdc104 --- /dev/null +++ b/keyboards/ua62/keymaps/default/keymap.c @@ -0,0 +1,43 @@ +/* Copyright 2019 NaCly + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_LCTRL, KC_A, KC_S, KC_D, LT(1, KC_F), KC_G, KC_H, LT(2, KC_J), KC_K, KC_L, KC_SCLN, KC_QUOT, + 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_LCTRL, KC_LGUI, KC_LALT, KC_GRV, KC_EQL, KC_BSPC, KC_DEL, KC_ENT, KC_SPC, KC_LBRC, KC_RBRC, KC_HOME, KC_END, KC_ESC + ), + //Holding F + [1] = LAYOUT( + 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_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_LCTRL, KC_NO, KC_NO, KC_NO, _______, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_NO, + KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_RSFT, + KC_LCTRL, KC_LGUI, KC_LALT, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME, KC_END, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + ), + //Holding J + [2] = LAYOUT( + KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_MPRV, KC_MPLY, KC_MNXT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, _______, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_LCTRL, KC_LGUI, KC_LALT, KC_NO, KC_NO, KC_NO, KC_NO, KC_ENT, KC_SPC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + ) +}; + diff --git a/keyboards/ua62/readme.md b/keyboards/ua62/readme.md new file mode 100644 index 000000000000..62523e21462f --- /dev/null +++ b/keyboards/ua62/readme.md @@ -0,0 +1,14 @@ +# UA62 + +* A Universal pcb for the atreus62 +* atreus62 by profet23 +* Original atreus by Phil Hagelberg +* Keyboard Maintainer: [NaCly](/~https://github.com/na-cly) +* Hardware Supported: UA62 PCB +* Hardware Availability: /~https://github.com/na-cly/UA62 (Order PCBS) + +Make example for this keyboard (after setting up your build environment): + + make ua62:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/ua62/rules.mk b/keyboards/ua62/rules.mk new file mode 100644 index 000000000000..eaca3310b08e --- /dev/null +++ b/keyboards/ua62/rules.mk @@ -0,0 +1,32 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/ua62/ua62.c b/keyboards/ua62/ua62.c new file mode 100644 index 000000000000..cac45f3fbffd --- /dev/null +++ b/keyboards/ua62/ua62.c @@ -0,0 +1,17 @@ +/* Copyright 2019 NaCly + * + * 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 . + */ +#include "ua62.h" + diff --git a/keyboards/ua62/ua62.h b/keyboards/ua62/ua62.h new file mode 100644 index 000000000000..4509bbff3d85 --- /dev/null +++ b/keyboards/ua62/ua62.h @@ -0,0 +1,41 @@ +/* Copyright 2019 NaCly + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + 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, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, KC_NO, k06, k07, k08, k09, k0a, k0b }, \ + { k10, k11, k12, k13, k14, k15, KC_NO, k16, k17, k18, k19, k1a, k1b }, \ + { k20, k21, k22, k23, k24, k25, KC_NO, k26, k27, k28, k29, k2a, k2b }, \ + { k30, k31, k32, k33, k34, k35, k47, k36, k37, k38, k39, k3a, k3b }, \ + { k40, k41, k42, k43, k44, k45, k46, k48, k49, k4a, k4b, k4c, k4d }, \ +} From d96f0584a2b76f3a53608715e91b6ad79bc9e14f Mon Sep 17 00:00:00 2001 From: Yan-Fa Li Date: Thu, 7 Nov 2019 15:48:41 -0800 Subject: [PATCH 287/316] [Keyboard] Hadron v3 Enable RGB (#7292) - bitbang age is upon us. All hail zvecr --- keyboards/hadron/ver3/rules.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/hadron/ver3/rules.mk b/keyboards/hadron/ver3/rules.mk index 599fb53fae66..1345c67f283d 100644 --- a/keyboards/hadron/ver3/rules.mk +++ b/keyboards/hadron/ver3/rules.mk @@ -17,7 +17,7 @@ COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover CUSTOM_MATRIX = no # Custom matrix file AUDIO_ENABLE = yes -RGBLIGHT_ENABLE = no +RGBLIGHT_ENABLE = yes RGB_MATRIX_ENABLE = no #WS2812 once arm_rgb is implemented HAPTIC_ENABLE += DRV2605L QWIIC_ENABLE += MICRO_OLED From cec391df70197a63b12a69c0e08927ecb156e341 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Thu, 7 Nov 2019 15:49:51 -0800 Subject: [PATCH 288/316] [Keyboard] Enable RGB Light on ARM OLKB Keyboards (#7293) * Enable RGBLight on Planck Rev6 * Enable RGBLight on Preonic Rev3 All hail zvecr! --- keyboards/planck/rev6/config.h | 17 ++++++++++------- keyboards/planck/rev6/rules.mk | 5 +++-- keyboards/preonic/rev3/config.h | 18 +++++++++++------- keyboards/preonic/rev3/rules.mk | 3 ++- 4 files changed, 26 insertions(+), 17 deletions(-) diff --git a/keyboards/planck/rev6/config.h b/keyboards/planck/rev6/config.h index d8c9d86ae61e..3cea2e721e99 100644 --- a/keyboards/planck/rev6/config.h +++ b/keyboards/planck/rev6/config.h @@ -125,14 +125,17 @@ /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 -#define WS2812_LED_N 2 -#define RGBLED_NUM WS2812_LED_N -#define WS2812_TIM_N 2 -#define WS2812_TIM_CH 2 -#define PORT_WS2812 GPIOA -#define PIN_WS2812 1 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA stream for TIMx_UP (look up in reference manual under DMA Channel selection) +// #define WS2812_LED_N 2 +// #define RGBLED_NUM WS2812_LED_N +// #define WS2812_TIM_N 2 +// #define WS2812_TIM_CH 2 +// #define PORT_WS2812 GPIOA +// #define PIN_WS2812 1 +// #define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA stream for TIMx_UP (look up in reference manual under DMA Channel selection) //#define WS2812_DMA_CHANNEL 7 // DMA channel for TIMx_UP //#define WS2812_EXTERNAL_PULLUP +#define RGB_DI_PIN A1 +#define RGBLED_NUM 9 +#define RGBLIGHT_ANIMATIONS #endif diff --git a/keyboards/planck/rev6/rules.mk b/keyboards/planck/rev6/rules.mk index 9cedb1799429..093d528e3ecc 100644 --- a/keyboards/planck/rev6/rules.mk +++ b/keyboards/planck/rev6/rules.mk @@ -20,7 +20,8 @@ MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = yes # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +WS2812_DRIVER = bitbang API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE @@ -29,7 +30,7 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # SERIAL_LINK_ENABLE = yes ENCODER_ENABLE = yes -DIP_SWITCH_ENABLE = yes +DIP_SWITCH_ENABLE = yes LAYOUTS = ortho_4x12 planck_mit LAYOUTS_HAS_RGB = no diff --git a/keyboards/preonic/rev3/config.h b/keyboards/preonic/rev3/config.h index 5eac2169e660..b5b2ced5a72c 100644 --- a/keyboards/preonic/rev3/config.h +++ b/keyboards/preonic/rev3/config.h @@ -112,14 +112,18 @@ /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 -#define WS2812_LED_N 2 -#define RGBLED_NUM WS2812_LED_N -#define WS2812_TIM_N 2 -#define WS2812_TIM_CH 2 -#define PORT_WS2812 GPIOA -#define PIN_WS2812 1 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA stream for TIMx_UP (look up in reference manual under DMA Channel selection) +// #define WS2812_LED_N 2 +// #define RGBLED_NUM WS2812_LED_N +// #define WS2812_TIM_N 2 +// #define WS2812_TIM_CH 2 +// #define PORT_WS2812 GPIOA +// #define PIN_WS2812 1 +// #define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA stream for TIMx_UP (look up in reference manual under DMA Channel selection) //#define WS2812_DMA_CHANNEL 7 // DMA channel for TIMx_UP //#define WS2812_EXTERNAL_PULLUP +#define RGB_DI_PIN A1 +#define RGBLED_NUM 9 +#define RGBLIGHT_ANIMATIONS + #endif diff --git a/keyboards/preonic/rev3/rules.mk b/keyboards/preonic/rev3/rules.mk index 4aaa775e7516..33893c841343 100644 --- a/keyboards/preonic/rev3/rules.mk +++ b/keyboards/preonic/rev3/rules.mk @@ -17,7 +17,8 @@ MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = yes # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +WS2812_DRIVER = bitbang API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE From 0483327fa66396879155f3e9c10247ce54dfe18e Mon Sep 17 00:00:00 2001 From: tw1t611 Date: Fri, 8 Nov 2019 05:49:45 +0100 Subject: [PATCH 289/316] [Keymap] Tw1t611 (#7282) * Add tw1t611 keymap. * Add underglow --- keyboards/redox/keymaps/tw1t611/config.h | 17 +++++++++++ keyboards/redox/keymaps/tw1t611/keymap.c | 36 +++++++++++++++++++++++ keyboards/redox/keymaps/tw1t611/readme.md | 1 + 3 files changed, 54 insertions(+) create mode 100644 keyboards/redox/keymaps/tw1t611/config.h create mode 100644 keyboards/redox/keymaps/tw1t611/keymap.c create mode 100644 keyboards/redox/keymaps/tw1t611/readme.md diff --git a/keyboards/redox/keymaps/tw1t611/config.h b/keyboards/redox/keymaps/tw1t611/config.h new file mode 100644 index 000000000000..2110642c54ed --- /dev/null +++ b/keyboards/redox/keymaps/tw1t611/config.h @@ -0,0 +1,17 @@ +#pragma once + +/* Use I2C or Serial, not both */ +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 14 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 diff --git a/keyboards/redox/keymaps/tw1t611/keymap.c b/keyboards/redox/keymaps/tw1t611/keymap.c new file mode 100644 index 000000000000..1309831b2376 --- /dev/null +++ b/keyboards/redox/keymaps/tw1t611/keymap.c @@ -0,0 +1,36 @@ +#include QMK_KEYBOARD_H +#include "keymap_german.h" + +enum { + QWERTZ = 0, + MOD, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [QWERTZ] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + _______ ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_ESC ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,_______ , _______ ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,DE_AE , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_TAB ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_BSPC , KC_DEL ,KC_H ,KC_J ,KC_K ,KC_L ,DE_EQL ,DE_OE , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + DE_UNDS ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_LCTL ,KC_BSPC , KC_DEL ,KC_RCTL ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,DE_SS ,DE_UE , + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ , KC_LALT , KC_SPC ,KC_LSFT , MO(MOD) ,KC_ENT , KC_LGUI , _______ ,_______ ,_______ ,_______ + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + ), + [MOD] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + KC_F12 ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_F11, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + DE_CIRC ,DE_QUOT ,DE_DQOT ,DE_LCBR ,DE_RCBR ,DE_GRV ,RGB_MOD , RESET ,DE_PERC ,DE_PLUS ,DE_MINS ,DE_ASTR ,DE_SLSH ,DE_BSLS , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + DE_TILD ,DE_EXLM ,DE_DLR ,DE_LPRN ,DE_RPRN ,DE_AMPR ,RGB_TOG , _______ ,KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT ,DE_QST ,DE_PIPE , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,DE_AT ,DE_EURO ,DE_LBRC ,DE_RBRC ,_______ ,RGB_M_P ,_______ , _______ ,_______ ,DE_HASH ,DE_LESS ,DE_SCLN ,DE_COLN ,DE_MORE ,DE_PARA , + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ , _______ , _______ ,_______ , _______ ,_______ , _______ , _______ ,_______ ,_______ ,_______ + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + ) +}; diff --git a/keyboards/redox/keymaps/tw1t611/readme.md b/keyboards/redox/keymaps/tw1t611/readme.md new file mode 100644 index 000000000000..1bb928f58df5 --- /dev/null +++ b/keyboards/redox/keymaps/tw1t611/readme.md @@ -0,0 +1 @@ +# Keymap for Redox by tw1t611 From 6fd88c15565f88ce1e595358ea98ecc1121fa26b Mon Sep 17 00:00:00 2001 From: Daniel Shields <1530706+shieldsd@users.noreply.github.com> Date: Fri, 8 Nov 2019 18:31:36 +0000 Subject: [PATCH 290/316] [Keymap] Remove dynamic macro customization now it's a core feature. (#7301) --- keyboards/model01/keymaps/dshields/keymap.c | 7 +++---- keyboards/planck/keymaps/dshields/keymap.c | 5 ++--- users/dshields/config.h | 1 + users/dshields/dshields.c | 5 ----- users/dshields/dshields.h | 6 ------ users/dshields/rules.mk | 1 + 6 files changed, 7 insertions(+), 18 deletions(-) diff --git a/keyboards/model01/keymaps/dshields/keymap.c b/keyboards/model01/keymaps/dshields/keymap.c index 981f1081837e..7dbfaf0cfb8c 100644 --- a/keyboards/model01/keymaps/dshields/keymap.c +++ b/keyboards/model01/keymaps/dshields/keymap.c @@ -1,13 +1,12 @@ #include QMK_KEYBOARD_H #include "dshields.h" -#include "dynamic_macro.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [DEF] = LAYOUT( RESET , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , _______, KC_GRV , KC_Q , KC_W , KC_E , KC_R , KC_T , RGB_TOG, _______, KC_Y , KC_U , KC_I , KC_O , KC_P , KC_EQL , KC_PGUP, KC_A , KC_S , KC_D , KC_F , KC_G , KC_TAB , KC_ENT , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, - KC_PGDN, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_ESC , DM_PLAY, KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_MINS, + KC_PGDN, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_ESC , DM_PLY1, KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_MINS, OSMLCTL, OSMRCTL, KC_BSPC, KC_SPC , KC_LGUI, OSMRALT, @@ -16,9 +15,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [FUN] = LAYOUT( EEP_RST, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , - KC_TAB , _______, KC_MS_U, _______, KC_BTN3, _______, RGB_MOD, DM_STRT, _______, KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, KC_F12 , + KC_TAB , _______, KC_MS_U, _______, KC_BTN3, _______, RGB_MOD, DM_REC1, _______, KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, KC_F12 , KC_HOME, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN1, _______, RGB_HUI, _______, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, _______, _______, - KC_END , KC_PSCR, KC_INS , _______, KC_BTN2, _______, RGB_HUD, DM_STOP, _______, _______, _______, _______, KC_BSLS, KC_PIPE, + KC_END , KC_PSCR, KC_INS , _______, KC_BTN2, _______, RGB_HUD, DM_RSTP, _______, _______, _______, _______, KC_BSLS, KC_PIPE, _______, _______, KC_DEL , KC_ENT , _______, _______, diff --git a/keyboards/planck/keymaps/dshields/keymap.c b/keyboards/planck/keymaps/dshields/keymap.c index 030e094a7e57..f18102ee2b58 100644 --- a/keyboards/planck/keymaps/dshields/keymap.c +++ b/keyboards/planck/keymaps/dshields/keymap.c @@ -1,12 +1,11 @@ #include QMK_KEYBOARD_H #include "dshields.h" -#include "dynamic_macro.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [DEF] = LAYOUT_planck_grid( KC_Q, KC_W, KC_E, KC_R, KC_T, KC_ESC, KC_BSPC, KC_Y, KC_U, KC_I, KC_O, KC_P , KC_A, KC_S, KC_D, KC_F, KC_G, KC_TAB, KC_ENT, KC_H, KC_J, KC_K, KC_L, KC_SCLN, - KC_Z, KC_X, KC_C, KC_V, KC_B, OSMLSFT, DM_PLAY, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, + KC_Z, KC_X, KC_C, KC_V, KC_B, OSMLSFT, DM_PLY1, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, OSMLCTL, KC_LGUI, OSMLALT, OSL_FUN, OSL_LWR, MT_SPC, MT_SPC, OSL_RSE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), [LWR] = LAYOUT_planck_grid( @@ -24,7 +23,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [FUN] = LAYOUT_planck_grid( KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, RESET, EEP_RST, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 , KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, _______, _______, _______, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, - LGT_TOG, LGT_MOD, LGT_BRT, LGT_INC, LGT_DEC, DM_STRT, DM_STOP, _______, _______, KC_BTN1, KC_BTN2, KC_BTN3, + LGT_TOG, LGT_MOD, LGT_BRT, LGT_INC, LGT_DEC, DM_REC1, DM_RSTP, _______, _______, KC_BTN1, KC_BTN2, KC_BTN3, _______, _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R ) }; diff --git a/users/dshields/config.h b/users/dshields/config.h index d92f787e4173..aa108147631a 100644 --- a/users/dshields/config.h +++ b/users/dshields/config.h @@ -6,6 +6,7 @@ #define ONESHOT_TIMEOUT 3000 #define RETRO_TAPPING #define BACKLIGHT_BREATHING +#define DYNAMIC_MACRO_NO_NESTING #define MOUSEKEY_INTERVAL 20 #define MOUSEKEY_DELAY 0 diff --git a/users/dshields/dshields.c b/users/dshields/dshields.c index bc88cae561d6..8f432a317c48 100644 --- a/users/dshields/dshields.c +++ b/users/dshields/dshields.c @@ -1,12 +1,7 @@ #include "quantum.h" #include "dshields.h" -extern bool process_record_dynamic_macro(uint16_t keycode, keyrecord_t *record); - bool process_record_user(uint16_t keycode, keyrecord_t *record) { - if (!process_record_dynamic_macro(keycode, record)) { - return false; - } if (keycode == KC_ESC && record->event.pressed) { bool rc = true; uint8_t mods = 0; diff --git a/users/dshields/dshields.h b/users/dshields/dshields.h index d8f76e8c0088..e1aa07a5db5d 100644 --- a/users/dshields/dshields.h +++ b/users/dshields/dshields.h @@ -1,10 +1,5 @@ #pragma once -// dynamic macro keys -#define DM_PLAY DYN_MACRO_PLAY1 -#define DM_STRT DYN_REC_START1 -#define DM_STOP DYN_REC_STOP - // one-shot layer keys #define OSL_RSE OSL(RSE) #define OSL_LWR OSL(LWR) @@ -45,4 +40,3 @@ #endif enum layers { DEF, LWR, RSE, FUN }; -enum keycodes { DYNAMIC_MACRO_RANGE = SAFE_RANGE }; diff --git a/users/dshields/rules.mk b/users/dshields/rules.mk index 8a7c82cd449c..abfbe5e40e8a 100644 --- a/users/dshields/rules.mk +++ b/users/dshields/rules.mk @@ -8,6 +8,7 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend API_SYSEX_ENABLE = no SPACE_CADET_ENABLE = no LEADER_ENABLE = no +DYNAMIC_MACRO_ENABLE = yes LINK_TIME_OPTIMIZATION_ENABLE = yes From 680d401faf03737b01f595b8800c211c0d130db6 Mon Sep 17 00:00:00 2001 From: Jonathan Rascher Date: Fri, 8 Nov 2019 15:43:02 -0600 Subject: [PATCH 291/316] Support RGBLIGHT_SLEEP when ChibiOS boards suspend (#7280) Copypasta from the AVR suspend implementation with a Teensy-specific hack removed --- tmk_core/common/chibios/suspend.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/tmk_core/common/chibios/suspend.c b/tmk_core/common/chibios/suspend.c index c0f9c28d443d..5be1b767779a 100644 --- a/tmk_core/common/chibios/suspend.c +++ b/tmk_core/common/chibios/suspend.c @@ -15,6 +15,13 @@ # include "backlight.h" #endif +#if defined(RGBLIGHT_SLEEP) && defined(RGBLIGHT_ENABLE) +# include "rgblight.h" +extern rgblight_config_t rgblight_config; +static bool rgblight_enabled; +static bool is_suspended; +#endif + /** \brief suspend idle * * FIXME: needs doc @@ -43,6 +50,16 @@ void suspend_power_down(void) { // TODO: figure out what to power down and how // shouldn't power down TPM/FTM if we want a breathing LED // also shouldn't power down USB +#if defined(RGBLIGHT_SLEEP) && defined(RGBLIGHT_ENABLE) +# ifdef RGBLIGHT_ANIMATIONS + rgblight_timer_disable(); +# endif + if (!is_suspended) { + is_suspended = true; + rgblight_enabled = rgblight_config.enable; + rgblight_disable_noeeprom(); + } +#endif suspend_power_down_kb(); // on AVR, this enables the watchdog for 15ms (max), and goes to @@ -104,5 +121,14 @@ void suspend_wakeup_init(void) { #ifdef BACKLIGHT_ENABLE backlight_init(); #endif /* BACKLIGHT_ENABLE */ +#if defined(RGBLIGHT_SLEEP) && defined(RGBLIGHT_ENABLE) + is_suspended = false; + if (rgblight_enabled) { + rgblight_enable_noeeprom(); + } +# ifdef RGBLIGHT_ANIMATIONS + rgblight_timer_enable(); +# endif +#endif suspend_wakeup_init_kb(); } From 31eee6b05db4d4ae9c36514c8e00e32c093a9f50 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Fri, 8 Nov 2019 21:43:30 +0000 Subject: [PATCH 292/316] Initial firmware for Retro75 (#7294) * Initial firmware for Retro75 * Update readme to match new template guidelines --- keyboards/retro_75/chconf.h | 524 ++++++++++++++++++ keyboards/retro_75/config.h | 249 +++++++++ keyboards/retro_75/halconf.h | 353 ++++++++++++ keyboards/retro_75/info.json | 15 + keyboards/retro_75/keymaps/default/keymap.c | 22 + .../retro_75/keymaps/split_backspace/keymap.c | 22 + keyboards/retro_75/mcuconf.h | 171 ++++++ keyboards/retro_75/readme.md | 15 + keyboards/retro_75/retro_75.c | 1 + keyboards/retro_75/retro_75.h | 61 ++ keyboards/retro_75/rules.mk | 54 ++ 11 files changed, 1487 insertions(+) create mode 100644 keyboards/retro_75/chconf.h create mode 100644 keyboards/retro_75/config.h create mode 100644 keyboards/retro_75/halconf.h create mode 100644 keyboards/retro_75/info.json create mode 100644 keyboards/retro_75/keymaps/default/keymap.c create mode 100644 keyboards/retro_75/keymaps/split_backspace/keymap.c create mode 100644 keyboards/retro_75/mcuconf.h create mode 100644 keyboards/retro_75/readme.md create mode 100644 keyboards/retro_75/retro_75.c create mode 100644 keyboards/retro_75/retro_75.h create mode 100644 keyboards/retro_75/rules.mk diff --git a/keyboards/retro_75/chconf.h b/keyboards/retro_75/chconf.h new file mode 100644 index 000000000000..99fa8ce39822 --- /dev/null +++ b/keyboards/retro_75/chconf.h @@ -0,0 +1,524 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/chconf.h + * @brief Configuration file template. + * @details A copy of this file must be placed in each project directory, it + * contains the application specific kernel settings. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#define CH_CFG_ST_RESOLUTION 32 + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#define CH_CFG_ST_FREQUENCY 10000 + +/** + * @brief Time delta constant for the tick-less mode. + * @note If this value is zero then the system uses the classic + * periodic tick. This value represents the minimum number + * of ticks that is safe to specify in a timeout directive. + * The value one is not valid, timeouts are rounded up to + * this value. + */ +#define CH_CFG_ST_TIMEDELTA 2 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel parameters and options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Round robin interval. + * @details This constant is the number of system ticks allowed for the + * threads before preemption occurs. Setting this value to zero + * disables the preemption for threads with equal priority and the + * round robin becomes cooperative. Note that higher priority + * threads can still preempt, the kernel is always preemptive. + * @note Disabling the round robin preemption makes the kernel more compact + * and generally faster. + * @note The round robin preemption is not supported in tickless mode and + * must be set to zero in that case. + */ +#define CH_CFG_TIME_QUANTUM 0 + +/** + * @brief Managed RAM size. + * @details Size of the RAM area to be managed by the OS. If set to zero + * then the whole available RAM is used. The core memory is made + * available to the heap allocator and/or can be used directly through + * the simplified core memory allocator. + * + * @note In order to let the OS manage the whole RAM the linker script must + * provide the @p __heap_base__ and @p __heap_end__ symbols. + * @note Requires @p CH_CFG_USE_MEMCORE. + */ +#define CH_CFG_MEMCORE_SIZE 0 + +/** + * @brief Idle thread automatic spawn suppression. + * @details When this option is activated the function @p chSysInit() + * does not spawn the idle thread. The application @p main() + * function becomes the idle thread and must implement an + * infinite loop. + */ +#define CH_CFG_NO_IDLE_THREAD FALSE + +/* Use __WFI in the idle thread for waiting. Does lower the power + * consumption. */ +#define CORTEX_ENABLE_WFI_IDLE TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Performance options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief OS optimization. + * @details If enabled then time efficient rather than space efficient code + * is used when two possible implementations exist. + * + * @note This is not related to the compiler optimization options. + * @note The default is @p TRUE. + */ +#define CH_CFG_OPTIMIZE_SPEED FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Subsystem options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Time Measurement APIs. + * @details If enabled then the time measurement APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_TM FALSE + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_REGISTRY TRUE + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_WAITEXIT TRUE + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_SEMAPHORES TRUE + +/** + * @brief Semaphores queuing mode. + * @details If enabled then the threads are enqueued on semaphores by + * priority rather than in FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MUTEXES TRUE + +/** + * @brief Enables recursive behavior on mutexes. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @note The default is @p FALSE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE + +/** + * @brief Conditional Variables APIs. + * @details If enabled then the conditional variables APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_CONDVARS TRUE + +/** + * @brief Conditional Variables APIs with timeout. + * @details If enabled then the conditional variables APIs with timeout + * specification are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_CONDVARS. + */ +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_EVENTS TRUE + +/** + * @brief Events Flags APIs with timeout. + * @details If enabled then the events APIs with timeout specification + * are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_EVENTS. + */ +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MESSAGES TRUE + +/** + * @brief Synchronous Messages queuing mode. + * @details If enabled then messages are served by priority rather than in + * FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_MESSAGES. + */ +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE + +/** + * @brief Mailboxes APIs. + * @details If enabled then the asynchronous messages (mailboxes) APIs are + * included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_MAILBOXES TRUE + +/** + * @brief Core Memory Manager APIs. + * @details If enabled then the core memory manager APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMCORE FALSE + +/** + * @brief Heap Allocator APIs. + * @details If enabled then the memory heap allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or + * @p CH_CFG_USE_SEMAPHORES. + * @note Mutexes are recommended. + */ +#define CH_CFG_USE_HEAP FALSE + +/** + * @brief Memory Pools Allocator APIs. + * @details If enabled then the memory pools allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMPOOLS FALSE + +/** + * @brief Dynamic Threads APIs. + * @details If enabled then the dynamic threads creation APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_WAITEXIT. + * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. + */ +#define CH_CFG_USE_DYNAMIC FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_STATISTICS FALSE + +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_SYSTEM_STATE_CHECK FALSE + +/** + * @brief Debug option, parameters checks. + * @details If enabled then the checks on the API functions input + * parameters are activated. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_CHECKS FALSE + +/** + * @brief Debug option, consistency checks. + * @details If enabled then all the assertions in the kernel code are + * activated. This includes consistency checks inside the kernel, + * runtime anomalies and port-defined checks. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_ASSERTS FALSE + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_BUFFER_SIZE 128 + +/** + * @brief Debug option, stack checks. + * @details If enabled then a runtime stack check is performed. + * + * @note The default is @p FALSE. + * @note The stack check is performed in a architecture/port dependent way. + * It may not be implemented or some ports. + * @note The default failure mode is to halt the system with the global + * @p panic_msg variable set to @p NULL. + */ +#define CH_DBG_ENABLE_STACK_CHECK FALSE + +/** + * @brief Debug option, stacks initialization. + * @details If enabled then the threads working area is filled with a byte + * value when a thread is created. This can be useful for the + * runtime measurement of the used stack. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_FILL_THREADS FALSE + +/** + * @brief Debug option, threads profiling. + * @details If enabled then a field is added to the @p thread_t structure that + * counts the system ticks occurred while executing the thread. + * + * @note The default is @p FALSE. + * @note This debug option is not currently compatible with the + * tickless mode. + */ +#define CH_DBG_THREADS_PROFILING FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Threads descriptor structure extension. + * @details User fields added to the end of the @p thread_t structure. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p chThdInit() API. + * + * @note It is invoked from within @p chThdInit() and implicitly from all + * the threads creation APIs. + */ +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads finalization hook. + * @details User finalization code added to the @p chThdExit() API. + */ +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ + /* Add threads finalization code here.*/ \ +} + +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* Context switch code here.*/ \ +} + +/** + * @brief ISR enter hook. + */ +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} + +/** + * @brief ISR exit hook. + */ +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} + +/** + * @brief Idle thread enter hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to activate a power saving mode. + */ +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ +} + +/** + * @brief Idle thread leave hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to deactivate a power saving mode. + */ +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ +} + +/** + * @brief Idle Loop hook. + * @details This hook is continuously invoked by the idle thread loop. + */ +#define CH_CFG_IDLE_LOOP_HOOK() { \ + /* Idle loop code here.*/ \ +} + +/** + * @brief System tick event hook. + * @details This hook is invoked in the system tick handler immediately + * after processing the virtual timers queue. + */ +#define CH_CFG_SYSTEM_TICK_HOOK() { \ + /* System tick event code here.*/ \ +} + +/** + * @brief System halt hook. + * @details This hook is invoked in case to a system halting error before + * the system is halted. + */ +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ + /* System halt code here.*/ \ +} + +/** + * @brief Trace hook. + * @details This hook is invoked each time a new record is written in the + * trace buffer. + */ +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} + +/** @} */ + +/*===========================================================================*/ +/* Port-specific settings (override port settings defaulted in chcore.h). */ +/*===========================================================================*/ + +#endif /* CHCONF_H */ + +/** @} */ diff --git a/keyboards/retro_75/config.h b/keyboards/retro_75/config.h new file mode 100644 index 000000000000..a6b8ec672f3e --- /dev/null +++ b/keyboards/retro_75/config.h @@ -0,0 +1,249 @@ +/* +Copyright 2019 zvecr + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x5275 +#define DEVICE_VER 0x0001 +#define MANUFACTURER PheonixStarr +#define PRODUCT Retro75 +#define DESCRIPTION A custom 75% keyboard + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 16 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { A8, B15, B14, B13, B12, B8 } +#define MATRIX_COL_PINS { A5, A4, A3, F0, C15, C14, C13, A6, B11, B10, B2, B1, B0, A7, A14, A15 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN A9 +// #ifdef RGB_DI_PIN +#define RGBLED_NUM 18 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +#define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * 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 + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/retro_75/halconf.h b/keyboards/retro_75/halconf.h new file mode 100644 index 000000000000..8b9724b1a30e --- /dev/null +++ b/keyboards/retro_75/halconf.h @@ -0,0 +1,353 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef _HALCONF_H_ +#define _HALCONF_H_ + +#include "mcuconf.h" + +/** + * @brief Enables the PAL subsystem. + */ +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) +#define HAL_USE_PAL TRUE +#endif + +/** + * @brief Enables the ADC subsystem. + */ +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) +#define HAL_USE_ADC FALSE +#endif + +/** + * @brief Enables the CAN subsystem. + */ +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE +#endif + +/** + * @brief Enables the EXT subsystem. + */ +#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) +#define HAL_USE_EXT FALSE +#endif + +/** + * @brief Enables the GPT subsystem. + */ +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT FALSE +#endif + +/** + * @brief Enables the I2C subsystem. + */ +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C FALSE +#endif + +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + +/** + * @brief Enables the ICU subsystem. + */ +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif + +/** + * @brief Enables the MAC subsystem. + */ +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif + +/** + * @brief Enables the MMC_SPI subsystem. + */ +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif + +/** + * @brief Enables the PWM subsystem. + */ +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM FALSE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC FALSE +#endif + +/** + * @brief Enables the SDC subsystem. + */ +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif + +/** + * @brief Enables the SERIAL subsystem. + */ +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL FALSE +#endif + +/** + * @brief Enables the SERIAL over USB subsystem. + */ +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the UART subsystem. + */ +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) +#define HAL_USE_UART FALSE +#endif + +/** + * @brief Enables the USB subsystem. + */ +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) +#define HAL_USE_USB TRUE +#endif + +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + +/*===========================================================================*/ +/* ADC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) +#define ADC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define ADC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* CAN driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Sleep mode related APIs inclusion switch. + */ +#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/*===========================================================================*/ +/* I2C driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the mutual exclusion APIs on the I2C bus. + */ +#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define I2C_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* MAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) +#define MAC_USE_ZERO_COPY FALSE +#endif + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) +#define MAC_USE_EVENTS TRUE +#endif + +/*===========================================================================*/ +/* MMC_SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + * This option is recommended also if the SPI driver does not + * use a DMA channel and heavily loads the CPU. + */ +#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) +#define MMC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SDC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Number of initialization attempts before rejecting the card. + * @note Attempts are performed at 10mS intervals. + */ +#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) +#define SDC_INIT_RETRY 100 +#endif + +/** + * @brief Include support for MMC cards. + * @note MMC support is not yet implemented so this option must be kept + * at @p FALSE. + */ +#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) +#define SDC_MMC_SUPPORT FALSE +#endif + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + */ +#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) +#define SDC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SERIAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SERIAL_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Serial buffers size. + * @details Configuration parameter, you can change the depth of the queue + * buffers depending on the requirements of your application. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_BUFFERS_SIZE 16 +#endif + +/*===========================================================================*/ +/* SERIAL_USB driver related setting. */ +/*===========================================================================*/ + +/** + * @brief Serial over USB buffers size. + * @details Configuration parameter, the buffer size must be a multiple of + * the USB data endpoint maximum packet size. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/*===========================================================================*/ +/* SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* USB driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif + +#endif /* _HALCONF_H_ */ + +/** @} */ diff --git a/keyboards/retro_75/info.json b/keyboards/retro_75/info.json new file mode 100644 index 000000000000..6a6253c37580 --- /dev/null +++ b/keyboards/retro_75/info.json @@ -0,0 +1,15 @@ +{ + "keyboard_name": "Retro75", + "url": "", + "maintainer": "zvecr", + "width": 16, + "height": 6.25, + "layouts": { + "LAYOUT": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1.5, "y":0}, {"label":"F2", "x":2.5, "y":0}, {"label":"F3", "x":3.5, "y":0}, {"label":"F4", "x":4.5, "y":0}, {"label":"F5", "x":6, "y":0}, {"label":"F6", "x":7, "y":0}, {"label":"F7", "x":8, "y":0}, {"label":"F8", "x":9, "y":0}, {"label":"F9", "x":10.5, "y":0}, {"label":"F10", "x":11.5, "y":0}, {"label":"F11", "x":12.5, "y":0}, {"label":"F12", "x":13.5, "y":0}, {"label":"Prt Sc", "x":15, "y":0}, {"label":"~", "x":0, "y":1.25}, {"label":"!", "x":1, "y":1.25}, {"label":"@", "x":2, "y":1.25}, {"label":"#", "x":3, "y":1.25}, {"label":"$", "x":4, "y":1.25}, {"label":"%", "x":5, "y":1.25}, {"label":"^", "x":6, "y":1.25}, {"label":"&", "x":7, "y":1.25}, {"label":"*", "x":8, "y":1.25}, {"label":"(", "x":9, "y":1.25}, {"label":")", "x":10, "y":1.25}, {"label":"_", "x":11, "y":1.25}, {"label":"+", "x":12, "y":1.25}, {"x":13, "y":1.25, "w":2}, {"label":"Delete", "x":15, "y":1.25}, {"label":"Tab", "x":0, "y":2.25, "w":1.5}, {"label":"Q", "x":1.5, "y":2.25}, {"label":"W", "x":2.5, "y":2.25}, {"label":"E", "x":3.5, "y":2.25}, {"label":"R", "x":4.5, "y":2.25}, {"label":"T", "x":5.5, "y":2.25}, {"label":"Y", "x":6.5, "y":2.25}, {"label":"U", "x":7.5, "y":2.25}, {"label":"I", "x":8.5, "y":2.25}, {"label":"O", "x":9.5, "y":2.25}, {"label":"P", "x":10.5, "y":2.25}, {"label":"{", "x":11.5, "y":2.25}, {"label":"}", "x":12.5, "y":2.25}, {"label":"|", "x":13.5, "y":2.25, "w":1.5}, {"label":"Page Up", "x":15, "y":2.25}, {"label":"Caps Lock", "x":0, "y":3.25, "w":1.75}, {"label":"A", "x":1.75, "y":3.25}, {"label":"S", "x":2.75, "y":3.25}, {"label":"D", "x":3.75, "y":3.25}, {"label":"F", "x":4.75, "y":3.25}, {"label":"G", "x":5.75, "y":3.25}, {"label":"H", "x":6.75, "y":3.25}, {"label":"J", "x":7.75, "y":3.25}, {"label":"K", "x":8.75, "y":3.25}, {"label":"L", "x":9.75, "y":3.25}, {"label":":", "x":10.75, "y":3.25}, {"label":"\"", "x":11.75, "y":3.25}, {"label":"Enter", "x":12.75, "y":3.25, "w":2.25}, {"label":"Page Down", "x":15, "y":3.25}, {"label":"Shift", "x":0, "y":4.25, "w":2.25}, {"label":"Z", "x":2.25, "y":4.25}, {"label":"X", "x":3.25, "y":4.25}, {"label":"C", "x":4.25, "y":4.25}, {"label":"V", "x":5.25, "y":4.25}, {"label":"B", "x":6.25, "y":4.25}, {"label":"N", "x":7.25, "y":4.25}, {"label":"M", "x":8.25, "y":4.25}, {"label":"<", "x":9.25, "y":4.25}, {"label":">", "x":10.25, "y":4.25}, {"label":"?", "x":11.25, "y":4.25}, {"label":"Shift", "x":12.25, "y":4.25, "w":1.75}, {"label":"\u2191", "x":14, "y":4.25}, {"label":"Fn", "x":15, "y":4.25}, {"label":"Ctrl", "x":0, "y":5.25, "w":1.5}, {"label":"Alt", "x":2.25, "y":5.25, "w":1.5}, {"x":3.75, "y":5.25, "w":7}, {"label":"Alt", "x":10.75, "y":5.25, "w":1.5}, {"label":"\u2190", "x":13, "y":5.25}, {"label":"\u2193", "x":14, "y":5.25}, {"label":"\u2192", "x":15, "y":5.25}] + }, + "LAYOUT_split_bs": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1.5, "y":0}, {"label":"F2", "x":2.5, "y":0}, {"label":"F3", "x":3.5, "y":0}, {"label":"F4", "x":4.5, "y":0}, {"label":"F5", "x":6, "y":0}, {"label":"F6", "x":7, "y":0}, {"label":"F7", "x":8, "y":0}, {"label":"F8", "x":9, "y":0}, {"label":"F9", "x":10.5, "y":0}, {"label":"F10", "x":11.5, "y":0}, {"label":"F11", "x":12.5, "y":0}, {"label":"F12", "x":13.5, "y":0}, {"label":"Prt Sc", "x":15, "y":0}, {"label":"~", "x":0, "y":1.25}, {"label":"!", "x":1, "y":1.25}, {"label":"@", "x":2, "y":1.25}, {"label":"#", "x":3, "y":1.25}, {"label":"$", "x":4, "y":1.25}, {"label":"%", "x":5, "y":1.25}, {"label":"^", "x":6, "y":1.25}, {"label":"&", "x":7, "y":1.25}, {"label":"*", "x":8, "y":1.25}, {"label":"(", "x":9, "y":1.25}, {"label":")", "x":10, "y":1.25}, {"label":"_", "x":11, "y":1.25}, {"label":"+", "x":12, "y":1.25}, {"x":13, "y":1.25}, {"x":14, "y":1.25}, {"label":"Delete", "x":15, "y":1.25}, {"label":"Tab", "x":0, "y":2.25, "w":1.5}, {"label":"Q", "x":1.5, "y":2.25}, {"label":"W", "x":2.5, "y":2.25}, {"label":"E", "x":3.5, "y":2.25}, {"label":"R", "x":4.5, "y":2.25}, {"label":"T", "x":5.5, "y":2.25}, {"label":"Y", "x":6.5, "y":2.25}, {"label":"U", "x":7.5, "y":2.25}, {"label":"I", "x":8.5, "y":2.25}, {"label":"O", "x":9.5, "y":2.25}, {"label":"P", "x":10.5, "y":2.25}, {"label":"{", "x":11.5, "y":2.25}, {"label":"}", "x":12.5, "y":2.25}, {"label":"|", "x":13.5, "y":2.25, "w":1.5}, {"label":"Page Up", "x":15, "y":2.25}, {"label":"Caps Lock", "x":0, "y":3.25, "w":1.75}, {"label":"A", "x":1.75, "y":3.25}, {"label":"S", "x":2.75, "y":3.25}, {"label":"D", "x":3.75, "y":3.25}, {"label":"F", "x":4.75, "y":3.25}, {"label":"G", "x":5.75, "y":3.25}, {"label":"H", "x":6.75, "y":3.25}, {"label":"J", "x":7.75, "y":3.25}, {"label":"K", "x":8.75, "y":3.25}, {"label":"L", "x":9.75, "y":3.25}, {"label":":", "x":10.75, "y":3.25}, {"label":"\"", "x":11.75, "y":3.25}, {"label":"Enter", "x":12.75, "y":3.25, "w":2.25}, {"label":"Page Down", "x":15, "y":3.25}, {"label":"Shift", "x":0, "y":4.25, "w":2.25}, {"label":"Z", "x":2.25, "y":4.25}, {"label":"X", "x":3.25, "y":4.25}, {"label":"C", "x":4.25, "y":4.25}, {"label":"V", "x":5.25, "y":4.25}, {"label":"B", "x":6.25, "y":4.25}, {"label":"N", "x":7.25, "y":4.25}, {"label":"M", "x":8.25, "y":4.25}, {"label":"<", "x":9.25, "y":4.25}, {"label":">", "x":10.25, "y":4.25}, {"label":"?", "x":11.25, "y":4.25}, {"label":"Shift", "x":12.25, "y":4.25, "w":1.75}, {"label":"\u2191", "x":14, "y":4.25}, {"label":"Fn", "x":15, "y":4.25}, {"label":"Ctrl", "x":0, "y":5.25, "w":1.5}, {"label":"Alt", "x":2.25, "y":5.25, "w":1.5}, {"x":3.75, "y":5.25, "w":7}, {"label":"Alt", "x":10.75, "y":5.25, "w":1.5}, {"label":"\u2190", "x":13, "y":5.25}, {"label":"\u2193", "x":14, "y":5.25}, {"label":"\u2192", "x":15, "y":5.25}] + } + } +} \ No newline at end of file diff --git a/keyboards/retro_75/keymaps/default/keymap.c b/keyboards/retro_75/keymaps/default/keymap.c new file mode 100644 index 000000000000..602eb695ba98 --- /dev/null +++ b/keyboards/retro_75/keymaps/default/keymap.c @@ -0,0 +1,22 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, + KC_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_BSPC, KC_DEL, + 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_PGUP, + 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_PGDN, + 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_UP, MO(1), + KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/retro_75/keymaps/split_backspace/keymap.c b/keyboards/retro_75/keymaps/split_backspace/keymap.c new file mode 100644 index 000000000000..58993b8bb34d --- /dev/null +++ b/keyboards/retro_75/keymaps/split_backspace/keymap.c @@ -0,0 +1,22 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_split_bs( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, + KC_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_BSPC, KC_BSPC, KC_DEL, + 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_PGUP, + 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_PGDN, + 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_UP, MO(1), + KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT_split_bs( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/retro_75/mcuconf.h b/keyboards/retro_75/mcuconf.h new file mode 100644 index 000000000000..faca3defdf0e --- /dev/null +++ b/keyboards/retro_75/mcuconf.h @@ -0,0 +1,171 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef _MCUCONF_H_ +#define _MCUCONF_H_ + +/* + * STM32F0xx drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 3...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +#define STM32F0xx_MCUCONF + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_HSI_ENABLED TRUE +#define STM32_HSI14_ENABLED TRUE +#define STM32_HSI48_ENABLED FALSE +#define STM32_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED FALSE +#define STM32_LSE_ENABLED FALSE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSI_DIV2 +#define STM32_PREDIV_VALUE 1 +#define STM32_PLLMUL_VALUE 12 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE STM32_PPRE_DIV1 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_USBSW STM32_USBSW_HSI48 +#define STM32_CECSW STM32_CECSW_HSI +#define STM32_I2C1SW STM32_I2C1SW_HSI +#define STM32_USART1SW STM32_USART1SW_PCLK +#define STM32_RTCSEL STM32_RTCSEL_LSI + +/* + * ADC driver system settings. + */ +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_IRQ_PRIORITY 2 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 2 + +/* + * EXT driver system settings. + */ +#define STM32_EXT_EXTI0_1_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI2_3_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI4_15_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI16_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI17_IRQ_PRIORITY 3 + +/* + * GPT driver system settings. + */ +#define STM32_GPT_USE_TIM1 FALSE +#define STM32_GPT_USE_TIM2 FALSE +#define STM32_GPT_USE_TIM3 FALSE +#define STM32_GPT_USE_TIM14 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 2 +#define STM32_GPT_TIM2_IRQ_PRIORITY 2 +#define STM32_GPT_TIM3_IRQ_PRIORITY 2 +#define STM32_GPT_TIM14_IRQ_PRIORITY 2 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 FALSE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_IRQ_PRIORITY 3 +#define STM32_I2C_I2C2_IRQ_PRIORITY 3 +#define STM32_I2C_USE_DMA TRUE +#define STM32_I2C_I2C1_DMA_PRIORITY 1 +#define STM32_I2C_I2C2_DMA_PRIORITY 1 +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * ICU driver system settings. + */ +#define STM32_ICU_USE_TIM1 FALSE +#define STM32_ICU_USE_TIM2 FALSE +#define STM32_ICU_USE_TIM3 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 3 +#define STM32_ICU_TIM2_IRQ_PRIORITY 3 +#define STM32_ICU_TIM3_IRQ_PRIORITY 3 + +/* + * PWM driver system settings. + */ +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 FALSE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 FALSE +#define STM32_PWM_TIM1_IRQ_PRIORITY 3 +#define STM32_PWM_TIM2_IRQ_PRIORITY 3 +#define STM32_PWM_TIM3_IRQ_PRIORITY 3 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USART1_PRIORITY 3 +#define STM32_SERIAL_USART2_PRIORITY 3 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 FALSE +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_IRQ_PRIORITY 2 +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 2 +#define STM32_ST_USE_TIMER 2 + +/* + * UART driver system settings. + */ +#define STM32_UART_USE_USART1 FALSE +#define STM32_UART_USE_USART2 FALSE +#define STM32_UART_USART1_IRQ_PRIORITY 3 +#define STM32_UART_USART2_IRQ_PRIORITY 3 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_USB1 TRUE +#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE +#define STM32_USB_USB1_LP_IRQ_PRIORITY 3 + +#endif /* _MCUCONF_H_ */ diff --git a/keyboards/retro_75/readme.md b/keyboards/retro_75/readme.md new file mode 100644 index 000000000000..0eb0afff3208 --- /dev/null +++ b/keyboards/retro_75/readme.md @@ -0,0 +1,15 @@ +# Retro75 + +![Retro75](https://i.imgur.com/spS7PHo.jpg) + +A 75% ARM STM32F072 keyboard, with WS2812 LEDs. + +* Keyboard Maintainer: [zvecr](/~https://github.com/zvecr) +* Hardware Supported: Retro75 PCB +* Hardware Availability: Private Group-Buy + +Make example for this keyboard (after setting up your build environment): + + make retro_75:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/retro_75/retro_75.c b/keyboards/retro_75/retro_75.c new file mode 100644 index 000000000000..d47def372064 --- /dev/null +++ b/keyboards/retro_75/retro_75.c @@ -0,0 +1 @@ +#include "retro_75.h" diff --git a/keyboards/retro_75/retro_75.h b/keyboards/retro_75/retro_75.h new file mode 100644 index 000000000000..7a7d10e42ece --- /dev/null +++ b/keyboards/retro_75/retro_75.h @@ -0,0 +1,61 @@ +/* Copyright 2019 zvecr + * + * 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 . + */ +#pragma once + +#include "quantum.h" +#define ____ KC_NO + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + K000, K002, K003, K004, K005, K006, K007, K008, K009, K011, K012, K013, K014, K015, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K115, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K315, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K415, \ + K500, K501, K505, K509, K511, K512, K515 \ +) \ +{ \ + { K000, ____, K002, K003, K004, K005, K006, K007, K008, K009, ____, K011, K012, K013, K014, K015}, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, ____, K115}, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, ____, K215}, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, ____, ____, K315}, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, ____, ____, K415}, \ + { K500, K501, ____, ____, ____, K505, ____, ____, ____, K509, ____, K511, K512, ____, ____, K515}, \ +} + +#define LAYOUT_split_bs( \ + K000, K002, K003, K004, K005, K006, K007, K008, K009, K011, K012, K013, K014, K015, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K315, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K415, \ + K500, K501, K505, K509, K511, K512, K515 \ +) \ +{ \ + { K000, ____, K002, K003, K004, K005, K006, K007, K008, K009, ____, K011, K012, K013, K014, K015}, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115}, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, ____, K215}, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, ____, ____, K315}, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, ____, ____, K415}, \ + { K500, K501, ____, ____, ____, K505, ____, ____, ____, K509, ____, K511, K512, ____, ____, K515}, \ +} diff --git a/keyboards/retro_75/rules.mk b/keyboards/retro_75/rules.mk new file mode 100644 index 000000000000..82a2cfb06f95 --- /dev/null +++ b/keyboards/retro_75/rules.mk @@ -0,0 +1,54 @@ +## chip/board settings +# the next two should match the directories in +# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F0xx +# linker script to use +# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +MCU_LDSCRIPT = STM32F072xB +# startup code to use +# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f0xx +# it should exist either in /os/hal/boards/ +# or /boards +BOARD = ST_STM32F072B_DISCOVERY +# Cortex version +# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 +MCU = cortex-m0 +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +ARMV = 6 +# If you want to be able to jump to bootloader from firmware on STM32 MCUs, +# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in +# ./bootloader_defs.h or in ./boards//bootloader_defs.h (if you have +# a custom board definition that you plan to reuse). +# If you're not setting it here, leave it commented out. +# It is chip dependent, the correct number can be looked up here (page 175): +# http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf +# This also requires a patch to chibios: +# /tmk_core/tool/chibios/ch-bootloader-jump.patch +#STM32_BOOTLOADER_ADDRESS = 0x1FFFC800 + +# Options to pass to dfu-util when flashing +DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave +DFU_SUFFIX_ARGS = -p df11 -v 0483 + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs From 20753706337630c6be4757e322b7da90f5f030cf Mon Sep 17 00:00:00 2001 From: Gregory Gubarev Date: Sat, 9 Nov 2019 04:30:20 +0400 Subject: [PATCH 293/316] [Docs] Create RU ver of getting_started_github (#7225) * Create RU ver of getting_started_github * Update docs/ru-ru/getting_started_github.md * Update docs/ru-ru/getting_started_github.md * Update docs/ru-ru/getting_started_github.md * Update docs/ru-ru/getting_started_github.md * Update docs/ru-ru/getting_started_github.md * Update docs/ru-ru/getting_started_github.md * Update docs/ru-ru/getting_started_github.md * Update docs/ru-ru/getting_started_github.md * Update docs/ru-ru/getting_started_github.md * Update * Updated first frase * Update docs/ru-ru/getting_started_github.md * Update docs/ru-ru/getting_started_github.md * Update docs/ru-ru/getting_started_github.md * Updated Co-Authored-By: Nikita Titov Co-Authored-By: nabokovas --- docs/ru-ru/getting_started_github.md | 58 ++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 docs/ru-ru/getting_started_github.md diff --git a/docs/ru-ru/getting_started_github.md b/docs/ru-ru/getting_started_github.md new file mode 100644 index 000000000000..8a0fd07a2799 --- /dev/null +++ b/docs/ru-ru/getting_started_github.md @@ -0,0 +1,58 @@ +# Как использовать GitHub с QMK + +GitHub может показаться несколько сложным для тех, кто никогда с ним не работал. В данном руководстве будет разобран каждый шаг создания форка, клонирования и отправки пулреквеста в QMK. + +?> В этом руководстве предполагается, что вы в какой-то степени знакомы с работой в командной строке, и в вашей системе установлен git. + +Откройте [страницу QMK на GitHub] (/~https://github.com/qmk/qmk_firmware), и в правом верхнем углу вы увидите кнопку с надписью "Fork": + +![Fork on Github](http://i.imgur.com/8Toomz4.jpg) + +Если вы состоите в какой-либо организации, вам нужно выбрать учетную запись, к которой будет привязан форк. В большинстве случаев это будет личной аккаунт. Как только ваш форк будет завершен (иногда это занимает немного времени), нажмите кнопку "Clone or Download": +![Download from Github](http://i.imgur.com/N1NYcSz.jpg) + +И обязательно выберите "HTTPS", затем выделите ссылку и скопируйте ее: + +![HTTPS link](http://i.imgur.com/eGO0ohO.jpg) + +Теперь введите `git clone` в командную строку, а затем вставьте ссылку: + +``` +user@computer:~$ git clone /~https://github.com/whoeveryouare/qmk_firmware.git +Cloning into 'qmk_firmware'... +remote: Counting objects: 46625, done. +remote: Compressing objects: 100% (2/2), done. +remote: Total 46625 (delta 0), reused 0 (delta 0), pack-reused 46623 +Receiving objects: 100% (46625/46625), 84.47 MiB | 3.14 MiB/s, done. +Resolving deltas: 100% (29362/29362), done. +Checking out files: 100% (2799/2799), done. +``` + +Теперь у вас есть форк QMK на вашем локальном компьютере, и вы можете добавить свою раскладку, скомпилировать ее и прошить ей свою клавиатуру. Как только вы будете довольны своими изменениями, есть возможность добавить, зафиксировать их и сделать коммит в свой форк следующим образом: + +``` +user@computer:~$ git add . +user@computer:~$ git commit -m "adding my keymap" +[master cccb1608] adding my keymap + 1 file changed, 1 insertion(+) + create mode 100644 keyboards/planck/keymaps/mine/keymap.c +user@computer:~$ git push +Counting objects: 1, done. +Delta compression using up to 4 threads. +Compressing objects: 100% (1/1), done. +Writing objects: 100% (1/1), 1.64 KiB | 0 bytes/s, done. +Total 1 (delta 1), reused 0 (delta 0) +remote: Resolving deltas: 100% (1/1), completed with 1 local objects. +To /~https://github.com/whoeveryouare/qmk_firmware.git + + 20043e64...7da94ac5 master -> master +``` + +Ваши изменения теперь существуют в вашем форке на GitHub - если вернуться туда (`/~https://github.com//qmk_firmware`), вы сможете создать "New Pull Request" нажатием на кнопку: + +![New Pull Request](http://i.imgur.com/DxMHpJ8.jpg) + +Здесь вы сможете увидеть, какие именно изменения были внесены, - если все выглядит хорошо, вы можете завершить его, нажав "Create Pull Request": + +![Create Pull Request](http://i.imgur.com/Ojydlaj.jpg) + +После отправки мы можем расспросить вас о ваших изменениях, попросить внести корректировки и в конечном итоге принять их! Спасибо за ваш вклад в QMK :) From c1970e284d9718a62a973442ec9f0801365cff60 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sat, 9 Nov 2019 02:23:26 +0000 Subject: [PATCH 294/316] Fix LAYER_STATE_8BIT compile issues (#7304) --- tmk_core/common/action_layer.c | 2 +- tmk_core/common/action_layer.h | 2 +- tmk_core/common/eeconfig.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tmk_core/common/action_layer.c b/tmk_core/common/action_layer.c index 07d78c56d4f9..4c7d15cd50f9 100644 --- a/tmk_core/common/action_layer.c +++ b/tmk_core/common/action_layer.c @@ -268,7 +268,7 @@ uint8_t layer_switch_get_layer(keypos_t key) { /* fall back to layer 0 */ return 0; #else - return biton32(default_layer_state); + return get_highest_layer(default_layer_state); #endif } diff --git a/tmk_core/common/action_layer.h b/tmk_core/common/action_layer.h index fee9b244df00..b8562f5a46f5 100644 --- a/tmk_core/common/action_layer.h +++ b/tmk_core/common/action_layer.h @@ -23,7 +23,7 @@ along with this program. If not, see . #if defined(LAYER_STATE_8BIT) typedef uint8_t layer_state_t; -# define get_highest_layer(state) biton8(state) +# define get_highest_layer(state) biton(state) #elif defined(LAYER_STATE_16BIT) typedef uint16_t layer_state_t; # define get_highest_layer(state) biton16(state) diff --git a/tmk_core/common/eeconfig.c b/tmk_core/common/eeconfig.c index 4cf4ca3acea5..72f198d6cec9 100644 --- a/tmk_core/common/eeconfig.c +++ b/tmk_core/common/eeconfig.c @@ -2,13 +2,13 @@ #include #include "eeprom.h" #include "eeconfig.h" +#include "action_layer.h" #ifdef STM32_EEPROM_ENABLE # include "hal.h" # include "eeprom_stm32.h" #endif -extern uint32_t default_layer_state; /** \brief eeconfig enable * * FIXME: needs doc From 26ce66e30675ebc785ac3e2e6bd1deeb479cb7e1 Mon Sep 17 00:00:00 2001 From: Rys Sommefeldt Date: Sat, 9 Nov 2019 02:30:44 +0000 Subject: [PATCH 295/316] [Keyboard] Update COD67 support to complete it and add a personal map (#7291) * Update docs for default keymap * Update COD67 docs with fixes and macOS details * Add a personal COD67 2-layer map with RGB control * Enable RGB, NKRO and change firmware format to bin * Swap k0D and k48 to fix backspace on the top row * Add RGB config and tidy up a bit * Finish default map because merlin was full of bbq * Whoops, rogue tabs * Typo fix in the main COD67 readme * Remove empty function defs in keymap * Swap how the backspace key relocation happens * Fix PRODUCT_ID and add a link to software PWM docs * Disable NKRO and bootmagic and enable mouse keys * Better header guard * Whoops, forgot to remote the #endif --- keyboards/gray_studio/cod67/cod67.h | 4 +- keyboards/gray_studio/cod67/config.h | 147 +++--------------- .../cod67/keymaps/default/keymap.c | 8 +- .../cod67/keymaps/default/readme.md | 6 +- .../gray_studio/cod67/keymaps/rys/keymap.c | 23 +++ .../gray_studio/cod67/keymaps/rys/readme.md | 5 + keyboards/gray_studio/cod67/readme.md | 35 +++-- keyboards/gray_studio/cod67/rules.mk | 10 +- 8 files changed, 90 insertions(+), 148 deletions(-) create mode 100644 keyboards/gray_studio/cod67/keymaps/rys/keymap.c create mode 100644 keyboards/gray_studio/cod67/keymaps/rys/readme.md diff --git a/keyboards/gray_studio/cod67/cod67.h b/keyboards/gray_studio/cod67/cod67.h index 2d3911e69c20..ed4a7299718c 100644 --- a/keyboards/gray_studio/cod67/cod67.h +++ b/keyboards/gray_studio/cod67/cod67.h @@ -19,11 +19,11 @@ #include "quantum.h" #define LAYOUT( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K48, \ 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, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D \ + K40, K41, K42, K43, K44, K45, K46, K47, K0D, K49, K4A, K4B, K4C, K4D \ ) \ { \ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ diff --git a/keyboards/gray_studio/cod67/config.h b/keyboards/gray_studio/cod67/config.h index 47b42d8a6015..2231827ba65d 100644 --- a/keyboards/gray_studio/cod67/config.h +++ b/keyboards/gray_studio/cod67/config.h @@ -15,18 +15,17 @@ 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 +#pragma once #include "config_common.h" /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x0000 +#define PRODUCT_ID 0x0C0D #define DEVICE_VER 0x0001 -#define MANUFACTURER Gray -#define PRODUCT cod67 -#define DESCRIPTION 60% Custom Keyboard +#define MANUFACTURER Gray Studio +#define PRODUCT COD67 +#define DESCRIPTION 60% custom keyboard /* key matrix size */ #define MATRIX_ROWS 5 @@ -49,135 +48,27 @@ along with this program. If not, see . /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW +/* D4 is not a PWM pin, but look at timer assisted software PWM if you want something other than toggle + * https://docs.qmk.fm/#/feature_backlight?id=timer-assisted-pwm-implementation + */ #define BACKLIGHT_PIN D4 -#define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN B2 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 20 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 255 + #define RGBLIGHT_SLEEP + #define RGBLIGHT_ANIMATIONS +#endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 -/* define if matrix has ghost (lacks anti-ghosting diodes) */ -//#define MATRIX_HAS_GHOST - -/* number of backlight levels */ - /* 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 -/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. - * This is userful for the Windows task manager shortcut (ctrl+shift+esc). - */ -// #define GRAVE_ESC_CTRL_OVERRIDE - -/* - * Force NKRO - * - * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved - * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the - * makefile for this to work.) - * - * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) - * until the next keyboard reset. - * - * NKRO may prevent your keystrokes from being detected in the BIOS, but it is - * fully operational during normal computer usage. - * - * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) - * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by - * bootmagic, NKRO mode will always be enabled until it is toggled again during a - * power-up. - * - */ -//#define FORCE_NKRO - -/* - * Magic Key Options - * - * Magic keys are hotkey commands that allow control over firmware functions of - * the keyboard. They are best used in combination with the HID Listen program, - * found here: https://www.pjrc.com/teensy/hid_listen.html - * - * The options below allow the magic key functionality to be changed. This is - * useful if your keyboard/keypad is missing keys and you want magic key support. - * - */ - -/* control how magic key switches layers */ -//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true -//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true -//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false - -/* override magic key keymap */ -//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS -//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS -//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM -//#define MAGIC_KEY_HELP1 H -//#define MAGIC_KEY_HELP2 SLASH -//#define MAGIC_KEY_DEBUG D -//#define MAGIC_KEY_DEBUG_MATRIX X -//#define MAGIC_KEY_DEBUG_KBD K -//#define MAGIC_KEY_DEBUG_MOUSE M -//#define MAGIC_KEY_VERSION V -//#define MAGIC_KEY_STATUS S -//#define MAGIC_KEY_CONSOLE C -//#define MAGIC_KEY_LAYER0_ALT1 ESC -//#define MAGIC_KEY_LAYER0_ALT2 GRAVE -//#define MAGIC_KEY_LAYER0 0 -//#define MAGIC_KEY_LAYER1 1 -//#define MAGIC_KEY_LAYER2 2 -//#define MAGIC_KEY_LAYER3 3 -//#define MAGIC_KEY_LAYER4 4 -//#define MAGIC_KEY_LAYER5 5 -//#define MAGIC_KEY_LAYER6 6 -//#define MAGIC_KEY_LAYER7 7 -//#define MAGIC_KEY_LAYER8 8 -//#define MAGIC_KEY_LAYER9 9 -//#define MAGIC_KEY_BOOTLOADER PAUSE -//#define MAGIC_KEY_LOCK CAPS -//#define MAGIC_KEY_EEPROM E -//#define MAGIC_KEY_NKRO N -//#define MAGIC_KEY_SLEEP_LED Z - -/* - * 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 - -/* - * MIDI options - */ - -/* Prevent use of disabled MIDI features in the keymap */ -//#define MIDI_ENABLE_STRICT 1 - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - -#endif diff --git a/keyboards/gray_studio/cod67/keymaps/default/keymap.c b/keyboards/gray_studio/cod67/keymaps/default/keymap.c index 245d7eee6f02..5403bf406f73 100644 --- a/keyboards/gray_studio/cod67/keymaps/default/keymap.c +++ b/keyboards/gray_studio/cod67/keymaps/default/keymap.c @@ -19,10 +19,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT( KC_GESC, 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) + 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_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_TRNS, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_DEL, + KC_LCTL, KC_LGUI, KC_LALT, KC_TRNS, KC_TRNS, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT) }; diff --git a/keyboards/gray_studio/cod67/keymaps/default/readme.md b/keyboards/gray_studio/cod67/keymaps/default/readme.md index cfbf846a9a2e..4b45689de83d 100644 --- a/keyboards/gray_studio/cod67/keymaps/default/readme.md +++ b/keyboards/gray_studio/cod67/keymaps/default/readme.md @@ -1 +1,5 @@ -# The default keymap for cod67 +# The default keymap for a COD67 + +The default map only implements the default layer from the map on [ydkb.io](http://ydkb.io). + +If you want an example of a multi-layer map, look at [rys's map](../rys). diff --git a/keyboards/gray_studio/cod67/keymaps/rys/keymap.c b/keyboards/gray_studio/cod67/keymaps/rys/keymap.c new file mode 100644 index 000000000000..9f1d069b7311 --- /dev/null +++ b/keyboards/gray_studio/cod67/keymaps/rys/keymap.c @@ -0,0 +1,23 @@ +#include QMK_KEYBOARD_H + +enum layers { + _TOP, + _FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_TOP] = LAYOUT( + 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, KC_SLSH, KC_RSFT, KC_UP, KC_DEL, + KC_LCTL, KC_LALT, KC_LGUI, _______, _______, KC_SPC, _______, _______, _______, KC_RGUI, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT + ), + [_FN] = LAYOUT( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, + _______, RGB_TOG, RGB_MOD,RGB_RMOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_TOGG, + _______, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/gray_studio/cod67/keymaps/rys/readme.md b/keyboards/gray_studio/cod67/keymaps/rys/readme.md new file mode 100644 index 000000000000..8214809bba32 --- /dev/null +++ b/keyboards/gray_studio/cod67/keymaps/rys/readme.md @@ -0,0 +1,5 @@ +# Rys's keymap for a COD67 + +The COD67 supports really nice RGB underglow which you can see through the mid diffuser. I've put control for that on layer 1, along with reset on `Space`, backlight toggle on `Enter`, and the function row. The board supports all of the QMK RGB effects. + +Look at the excellent [RGB Lighting](https://docs.qmk.fm/#/feature_rgblight) docs on the QMK site for more controls. diff --git a/keyboards/gray_studio/cod67/readme.md b/keyboards/gray_studio/cod67/readme.md index 7f91cf30d1e5..6e79ffec4a28 100644 --- a/keyboards/gray_studio/cod67/readme.md +++ b/keyboards/gray_studio/cod67/readme.md @@ -1,30 +1,45 @@ # Gray COD67 -The Gray COD67 is a 60% keyboard with a modern and bold design. It features 20 RGB Underglow LED lights and a unique diffuser placement. The COD67 has the most stunning RGB light strip for a custom mechanical keyboard. It also features a center mounted USB C port. +The Gray COD67 is a 60% keyboard with a modern and bold design. It features 20 RGB Underglow LED lights and a unique diffuser placement. The COD67 has the most stunning RGB light strip for a custom mechanical keyboard. It also features a center mounted USB C port. -There were only 75 units made worldwide. +There were only 75 units made worldwide. Keyboard Maintainer: [MechMerlin](/~https://github.com/mechmerlin) Hardware Supported: Gray COD67 Hardware Availability: [Zfrontier](https://en.zfrontier.com/products/cod67) -At this time, flashing ONLY works on Windows systems. +## Bootloader mode -To put in bootloader mode, hold the `Esc` key while plugging in the USB cable. +To put in bootloader mode, hold the `Esc` key while plugging in the USB cable. -The COD67 will show up as a drive. +## Making firmware Make example for this keyboard (after setting up your build environment): - make gray_studio/cod67:default:bin + make gray_studio/cod67:default See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). -Rename the resulting `.bin` file to `cod67.bin`. +## Flashing in Windows -Drag and drop `cod67.bin` to the drive, overwriting the previous `cod67.bin` stored on it. +After putting your COD67 in bootloader mode, it will show up as a drive. -Press the `Esc` key again to reset the board. You are now ready to type! +* Rename the resulting `.bin` file to `COD67.BIN`. +* Drag and drop your new `COD67.BIN` to the drive, overwriting the previous `COD67.BIN` stored on it. +* Wait a few seconds for it to write. The caps lock LED flashes rapidly while writing. +* Press the `Esc` key again to reset the board. You are now ready to type! + +## Flashing in macOS + +After putting your COD67 in bootloader mode, it will show up as a drive. + +* Rename the resulting `.bin` file to `COD67.BIN`. +* Drag the existing `COD67.BIN` file from the drive to the Trash in Finder. +* Empty the Trash in Finder. It's important you do that due to how macOS handles hidden `.Trashes` on removable drives. It needs to be empty to free up flash space. +* Drag and drop your new `COD67.BIN` to the drive. +* Wait a few seconds for it to write. The caps lock LED flashes rapidly while writing. +* Press the `Esc` key or eject the drive in Finder to reset the board. You are now ready to type! ## Notes -The backlight pin is attached to a non PWM pin `D4` so backlight is only on/off. + +The backlight pin is attached to a non PWM pin `D4` so the backlight is only on/off. diff --git a/keyboards/gray_studio/cod67/rules.mk b/keyboards/gray_studio/cod67/rules.mk index 196dfb8c48c9..0bed09539f5b 100644 --- a/keyboards/gray_studio/cod67/rules.mk +++ b/keyboards/gray_studio/cod67/rules.mk @@ -11,19 +11,23 @@ MCU = atmega32u4 # ATmega328P USBasp BOOTLOADER = atmel-dfu # actually lufa-ms +# Mass storage bootloader on the COD67 uses bin files +FIRMWARE_FORMAT = bin + # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable RGB underglow MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID From 5414ff709f2ab6f47b722a70aa2c4d18bed7c458 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Sat, 9 Nov 2019 13:34:25 +1100 Subject: [PATCH 296/316] [Doc] Tidy up compatible MCUs docs (#7295) * Tidy up compatible MCUs docs * ARM chips should have USB * 32KB soft lower limit applies to ARM as well * NXP is the manufacturer name, not Kinetis * Units --- docs/_summary.md | 1 + docs/compatible_microcontrollers.md | 47 ++++++++++++++++++----------- 2 files changed, 30 insertions(+), 18 deletions(-) diff --git a/docs/_summary.md b/docs/_summary.md index dc6e88f95804..808a8de4a0a3 100644 --- a/docs/_summary.md +++ b/docs/_summary.md @@ -33,6 +33,7 @@ * [Keymap Overview](keymap.md) * [Hardware](hardware.md) + * [Compatible Microcontrollers](compatible_microcontrollers.md) * [AVR Processors](hardware_avr.md) * [Drivers](hardware_drivers.md) diff --git a/docs/compatible_microcontrollers.md b/docs/compatible_microcontrollers.md index 6e3f8372c9be..85dd440d37b0 100644 --- a/docs/compatible_microcontrollers.md +++ b/docs/compatible_microcontrollers.md @@ -1,25 +1,36 @@ -# Atmel AVR +# Compatible Microcontrollers -QMK should run on any Atmel AVR processor with enough Flash. It has been tested on the following: +QMK runs on any USB-capable AVR or ARM microcontroller with enough flash space - generally 32kB or more, though it will *just* squeeze into 16kB with most features disabled. -* ATmega32U4 ([PJRC Teensy 2.0](http://www.pjrc.com/teensy/)) -* AT90USB1286 ([PJRC Teensy++ 2.0](http://www.pjrc.com/teensy/)) -* AT90USB1287 ([Atmel USBKEY](http://www.atmel.com/tools/AT90USBKEY.aspx)) -* ATmega168P with using [V-USB](http://www.obdev.at/products/vusb/index.html) -* ATmega328P with using [V-USB](http://www.obdev.at/products/vusb/index.html) -* ATmega32U2 -* AT90USB1286, 646, 647 should work -* AT90USB162 testing... +## Atmel AVR -NOTE: To enable full features of firmware you'll need 32KB flash size. +The following use [LUFA](https://www.fourwalledcubicle.com/LUFA.php) as the USB stack: -Please add any tested microcontrollers to this list. +* [ATmega16U2](https://www.microchip.com/wwwproducts/en/ATmega16U2) / [ATmega32U2](https://www.microchip.com/wwwproducts/en/ATmega32U2) +* [ATmega16U4](https://www.microchip.com/wwwproducts/en/ATmega16U4) / [ATmega32U4](https://www.microchip.com/wwwproducts/en/ATmega32U4) +* [AT90USB64](https://www.microchip.com/wwwproducts/en/AT90USB646) / [AT90USB128](https://www.microchip.com/wwwproducts/en/AT90USB1286) -# ARM +Certain MCUs which do not have native USB will use [V-USB](https://www.obdev.at/products/vusb/index.html) instead: -You can also use any ARM processor that [ChibiOS](http://www.chibios.org) supports. The following processors have been tested: +* [ATmega32A](https://www.microchip.com/wwwproducts/en/ATmega32A) +* [ATmega328P](https://www.microchip.com/wwwproducts/en/ATmega328P) -* [Kinetis MKL26Z64](http://www.nxp.com/products/microcontrollers-and-processors/arm-processors/kinetis-cortex-m-mcus/l-series-ultra-low-power-m0-plus/kinetis-kl2x-48-mhz-usb-ultra-low-power-microcontrollers-mcus-based-on-arm-cortex-m0-plus-core:KL2x) -* [Kinetis MK20DX128](http://www.nxp.com/assets/documents/data/en/data-sheets/K20P64M50SF0.pdf) -* [Kinetis MK20DX128](http://www.nxp.com/assets/documents/data/en/data-sheets/K20P64M50SF0.pdf) -* [Kinetis MK20DX256](http://www.nxp.com/products/microcontrollers-and-processors/arm-processors/kinetis-cortex-m-mcus/k-series-performance-m4/k2x-usb/kinetis-k20-72-mhz-full-speed-usb-mixed-signal-integration-microcontrollers-mcus-based-on-arm-cortex-m4-core:K20_72) +## ARM + +You can also use any ARM chip with USB that [ChibiOS](http://www.chibios.org) supports. Most have plenty of flash. Known to work are: + +### STMicroelectronics (STM32) + + * [STM32F0x2](https://www.st.com/en/microcontrollers-microprocessors/stm32f0x2.html) + * [STM32F103](https://www.st.com/en/microcontrollers-microprocessors/stm32f103.html) + * [STM32F303](https://www.st.com/en/microcontrollers-microprocessors/stm32f303.html) + +### NXP (Kinetis) + + * [MKL26Z64](https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/kl-series-cortex-m0-plus/kinetis-kl2x-72-96-mhz-usb-ultra-low-power-microcontrollers-mcus-based-on-arm-cortex-m0-plus-core:KL2x) + * [MK20DX128](https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/k-series-cortex-m4/k2x-usb/kinetis-k20-50-mhz-full-speed-usb-mixed-signal-integration-microcontrollers-based-on-arm-cortex-m4-core:K20_50) + * [MK20DX256](https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/k-series-cortex-m4/k2x-usb/kinetis-k20-72-mhz-full-speed-usb-mixed-signal-integration-microcontrollers-mcus-based-on-arm-cortex-m4-core:K20_72) + +## Atmel ATSAM + +There is limited support for one of Atmel's ATSAM microcontrollers, that being the [ATSAMD51J18A](https://www.microchip.com/wwwproducts/en/ATSAMD51J18A) used by the [Massdrop keyboards](/~https://github.com/qmk/qmk_firmware/tree/master/keyboards/massdrop). From 2b30776dd0f6dc6571fb741113bc71cea578b971 Mon Sep 17 00:00:00 2001 From: Ivan Smirnov Date: Fri, 8 Nov 2019 19:17:21 -0800 Subject: [PATCH 297/316] [Keymap] Add issmirnov {user, ergodox, levinson} files. (#7239) * Add issmirnov {user, ergodox, levinson} files. There are enough interesting QMK tricks in these layouts that it seems worth it to share with the broader community. Big thanks to Drashna for inspiration, as well as all the wonderful creators of QMK documentation. Some highlights: - Common layout shared between levinson and ergodox_ez - TAP_TOG macro for fast layer switching - Autogenerated keymaps ascii art with git hooks I will do my best to do periodic rolls here, but the source of truth will always be /~https://github.com/issmirnov/qmk-keebs * Incorporate review feedback. - Remove CLEAR_EEPROM in favor of built in EEP_RST - Remove custom handlers for audio on bootup and shutdown - Remove plethora of unneeded includes - Remove deprecated and dupliated config options HUGE thanks to drashna for the review! * Apply suggestions from code review Huge thanks to drashna@ for a very thorough review and the very useful suggestions. Co-Authored-By: Drashna Jaelre * Remove unclear optimization This was an artifact from some other keymap I saw. --- .../levinson/keymaps/issmirnov/README.md | 15 ++ .../keymaps/issmirnov/asci-keymap.txt | 55 ++++ .../levinson/keymaps/issmirnov/build.sh | 2 + .../levinson/keymaps/issmirnov/config.h | 34 +++ .../levinson/keymaps/issmirnov/keymap.c | 124 +++++++++ .../keebio/levinson/keymaps/issmirnov/push.sh | 2 + .../keebio/levinson/keymaps/issmirnov/rgb.c | 61 +++++ .../keebio/levinson/keymaps/issmirnov/rgb.h | 15 ++ .../levinson/keymaps/issmirnov/rules.mk | 14 + .../levinson/keymaps/issmirnov/sounds.h | 9 + .../levinson/keymaps/issmirnov/template.txt | 9 + layouts/community/ergodox/issmirnov/README.md | 49 ++++ .../ergodox/issmirnov/asci-keymap.txt | 95 +++++++ layouts/community/ergodox/issmirnov/build.sh | 2 + layouts/community/ergodox/issmirnov/config.h | 3 + layouts/community/ergodox/issmirnov/keymap.c | 250 ++++++++++++++++++ layouts/community/ergodox/issmirnov/push.sh | 2 + .../community/ergodox/issmirnov/template.txt | 17 ++ users/issmirnov/config.h | 45 ++++ users/issmirnov/issmirnov.c | 43 +++ users/issmirnov/issmirnov.h | 35 +++ users/issmirnov/rows.h | 55 ++++ users/issmirnov/rules.mk | 25 ++ users/issmirnov/tap_tog.c | 52 ++++ users/issmirnov/tap_tog.h | 10 + 25 files changed, 1023 insertions(+) create mode 100644 keyboards/keebio/levinson/keymaps/issmirnov/README.md create mode 100644 keyboards/keebio/levinson/keymaps/issmirnov/asci-keymap.txt create mode 100755 keyboards/keebio/levinson/keymaps/issmirnov/build.sh create mode 100644 keyboards/keebio/levinson/keymaps/issmirnov/config.h create mode 100644 keyboards/keebio/levinson/keymaps/issmirnov/keymap.c create mode 100755 keyboards/keebio/levinson/keymaps/issmirnov/push.sh create mode 100644 keyboards/keebio/levinson/keymaps/issmirnov/rgb.c create mode 100644 keyboards/keebio/levinson/keymaps/issmirnov/rgb.h create mode 100644 keyboards/keebio/levinson/keymaps/issmirnov/rules.mk create mode 100644 keyboards/keebio/levinson/keymaps/issmirnov/sounds.h create mode 100644 keyboards/keebio/levinson/keymaps/issmirnov/template.txt create mode 100644 layouts/community/ergodox/issmirnov/README.md create mode 100644 layouts/community/ergodox/issmirnov/asci-keymap.txt create mode 100755 layouts/community/ergodox/issmirnov/build.sh create mode 100644 layouts/community/ergodox/issmirnov/config.h create mode 100644 layouts/community/ergodox/issmirnov/keymap.c create mode 100755 layouts/community/ergodox/issmirnov/push.sh create mode 100644 layouts/community/ergodox/issmirnov/template.txt create mode 100644 users/issmirnov/config.h create mode 100644 users/issmirnov/issmirnov.c create mode 100644 users/issmirnov/issmirnov.h create mode 100644 users/issmirnov/rows.h create mode 100644 users/issmirnov/rules.mk create mode 100644 users/issmirnov/tap_tog.c create mode 100644 users/issmirnov/tap_tog.h diff --git a/keyboards/keebio/levinson/keymaps/issmirnov/README.md b/keyboards/keebio/levinson/keymaps/issmirnov/README.md new file mode 100644 index 000000000000..1e03e58e712d --- /dev/null +++ b/keyboards/keebio/levinson/keymaps/issmirnov/README.md @@ -0,0 +1,15 @@ +# Levinson + +## Colors + +- /~https://github.com/qmk/qmk_firmware/blob/master/docs/feature_rgblight.md + - main docs. +- /~https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight_list.h + - list of colors +- /~https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight.h + - list of functions for RGB manipulation + +## Troubleshooting + +- When in doubt, flash both sides of the keyboard. For some reason that helps with LEDs and reponsiveness. + - `cd qmk_firmware && make keebio/levinson/rev2:issmirnov:dfu-split-right` diff --git a/keyboards/keebio/levinson/keymaps/issmirnov/asci-keymap.txt b/keyboards/keebio/levinson/keymaps/issmirnov/asci-keymap.txt new file mode 100644 index 000000000000..aa5bd08b3dd4 --- /dev/null +++ b/keyboards/keebio/levinson/keymaps/issmirnov/asci-keymap.txt @@ -0,0 +1,55 @@ + Qwerty +,-----------------------------------. ,-----------------------------------. +| Esc | Q | W | E | R | T | | Y | U | I | O | P |⌘ + d| +|-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| +| Tab | A | S | D | F | G | | H | J | K | L |TapTo|Mo(Na| +|-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| +|⇧(1) | Z | X | C | V | B | | N | M | . |Comma|Tg(Nu| ' | +|-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| +|Ctrl | ⌘⇧ | Alt | Mod | ⌫ | Spc | |Enter| Tab | ↑ | ↓ | ← | → | +`-----------------------------------' ------------------------------------' + + Symb +,-----------------------------------. ,-----------------------------------. +| | - | @ | { | } | ` | | * | ! | | | % | + | Esc | +|-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| +| | ^ | _ | ( | ) | $ | | # | = | : | ; |TapTo| " | +|-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| +| | < | > | [ | ] | ~ | | & | ? | / | \ |Tg(Nu| ' | +|-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| +| | | | | | | | | | Esc | : | % | 🔒 | +`-----------------------------------' ------------------------------------' + + Nump +,-----------------------------------. ,-----------------------------------. +| | No | No |Lgui(| | | | , | 7 | 8 | 9 | |Reset| +|-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| +| | |Lgui(|Lgui(|Lgui(| | | 0 | 4 | 5 | 6 |To(Sy| | +|-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| +| | | | |Audio|Audio| | . | 1 | 2 | 3 |To(Qw| | +|-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| +| | | | | | | | | | | |To(Ov| | +`-----------------------------------' ------------------------------------' + + Overwatch +,-----------------------------------. ,-----------------------------------. +| Tab | Q | W | E | R | T | |To(0)| | | | |Clear| +|-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| +|Ctrl | A | S | D | F | P | |RgbMo|RgbMo|RgbVa|RgbVa| |RgbTo| +|-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| +|Lshif| Z | X | C | V |Grave| |RgbMo|RgbMo|RgbMo|RgbMo|RgbMo|RgbMo| +|-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| +|Ctrl | F9 |Pscre| H | R | ⎵ | |RgbHu|RgbHu|RgbSa|RgbSa|RgbMo|RgbMo| +`-----------------------------------' ------------------------------------' + + Navi +,-----------------------------------. ,-----------------------------------. +| | | | ↑ | | | | | | | | | | +|-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| +| | | ← | ↓ | → | | | |Ctrl | | | | | +|-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| +| | | | | | | | | | | | | | +|-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| +| | | | | |⌘ + d| | Mod | ⌘⇧ | | | | | +`-----------------------------------' ------------------------------------' + diff --git a/keyboards/keebio/levinson/keymaps/issmirnov/build.sh b/keyboards/keebio/levinson/keymaps/issmirnov/build.sh new file mode 100755 index 000000000000..d013083910dd --- /dev/null +++ b/keyboards/keebio/levinson/keymaps/issmirnov/build.sh @@ -0,0 +1,2 @@ +#!/bin/bash +make keebio/levinson/rev2:issmirnov diff --git a/keyboards/keebio/levinson/keymaps/issmirnov/config.h b/keyboards/keebio/levinson/keymaps/issmirnov/config.h new file mode 100644 index 000000000000..89c2f5ebe82c --- /dev/null +++ b/keyboards/keebio/levinson/keymaps/issmirnov/config.h @@ -0,0 +1,34 @@ +#pragma once + +// Use serial comms for split keyboard +// DO NOT enable USE_IDC - board will not respond. +#define USE_SERIAL +//#define USE_I2C + +#ifdef RGBLIGHT_ENABLE + // Enable animations. +5500 bytes + #define RGBLIGHT_ANIMATIONS + + // Map my custom number of LED's + #undef RGBLED_NUM + #define RGBLED_NUM 16 + #define RGBLIGHT_LED_MAP { 0, 1, 2, 3, 4, 5, 6, 7, 15, 14, 13, 12, 11, 10, 9, 8 } // When changed, BE SURE to flash EEPROM on both halves and clear it. + + // DO NOT USE RGBLED_SPLIT - the slave board will stop responding. + + // Turn off RGB when computer sleeps + #define RGBLIGHT_SLEEP + + // custom colors + #define RGB_CLEAR 0x00, 0x00, 0x00 + + // MOD indicators + #define SHFT_LED1 7 + #define GUI_LED1 8 +#endif + +#ifdef AUDIO_ENABLE + #define QMK_SPEAKER C6 + #define C6_AUDIO + #define NO_MUSIC_MODE // Save 2000 bytes +#endif diff --git a/keyboards/keebio/levinson/keymaps/issmirnov/keymap.c b/keyboards/keebio/levinson/keymaps/issmirnov/keymap.c new file mode 100644 index 000000000000..0023b8424fd6 --- /dev/null +++ b/keyboards/keebio/levinson/keymaps/issmirnov/keymap.c @@ -0,0 +1,124 @@ +#include "tap_tog.h" + +#ifdef AUDIO_ENABLE + #include "audio.h" + #include "sounds.h" +#endif + + +#ifdef RGBLIGHT_ENABLE + #include "rgb.h" +#endif + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// Run `./qmk show levinson` from parent dir to see this layer. +[_QWERTY] = LAYOUT_ortho_4x12_wrapper( +KC_ESC , _________________QWERTY_L1_________________, _________________QWERTY_R1_________________ , APPS , +KC_TAB , _________________QWERTY_L2_________________, _________________QWERTY_R2_________________ , MO(_NAVI) , +OSMSFT , _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ , KC_QUOTE , +KC_LCTL , MODSFT , KC_LALT , KC_LGUI , KC_BSPACE , KC_SPC , KC_ENTER , KC_TAB , KC_UP , KC_DOWN , KC_LEFT , KC_RGHT +), // Note: visualizer expects this closing parens to be right at the start of the line. + +// Run `./qmk show levinson` from parent dir to see this layer. +[_SYMB] = LAYOUT_ortho_4x12_wrapper( +_______ , _________________SYMB_L1___________________, _________________SYMB_R1___________________ , KC_ESC , +_______ , _________________SYMB_L2___________________, _________________SYMB_R2___________________ , KC_DQT , +_______ , _________________SYMB_L3___________________, _________________SYMB_R3___________________ , KC_QUOTE , +_______ , ___________________BLANK___________________, _______ , _______ , KC_ESC , KC_COLN , KC_PERC , LOCK +), // Note: visualizer expects this closing parens to be right at the start of the line. + +// Run `./qmk show levinson` from parent dir to see this layer. +[_NUMP] = LAYOUT_ortho_4x12_wrapper( +_______ , _________________NUMP_L1___________________ , _________________NUMP_R1___________________ , RESET , +_______ , _________________NUMP_L2___________________ , _________________NUMP_R2___________________ , _______ , +_______ , _________________NUMP_L3___________________ , _________________NUMP_R3___________________ , _______ , +_______ , ___________________BLANK___________________ , _______ , _______ , _______ , _______ , TO(_OVERWATCH) , _______ +), // Note: visualizer expects this closing parens to be right at the start of the line. + +// Run `./qmk show levinson` from parent dir to see this layer. +[_OVERWATCH] = LAYOUT_ortho_4x12_wrapper( +______________OVERWATCH_L1_________________ , TO(0) , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , EEP_RST , +______________OVERWATCH_L2_________________ , RGB_MODE_FORWARD , RGB_MODE_REVERSE , RGB_VAI , RGB_VAD , XXXXXXX , RGB_TOG , +______________OVERWATCH_L3_________________ , RGB_MODE_PLAIN , RGB_MODE_BREATHE , RGB_MODE_RAINBOW , RGB_MODE_SWIRL , RGB_MODE_SNAKE , RGB_MODE_XMAS , +______________OVERWATCH_L4_________________ , KC_SPACE, RGB_HUI , RGB_HUD , RGB_SAI , RGB_SAD , RGB_MODE_RGBTEST , RGB_MODE_GRADIENT +), // Note: visualizer expects this closing parens to be right at the start of the line. + +// Run `./qmk show levinson` from parent dir to see this layer. +[_NAVI] = LAYOUT_ortho_4x12_wrapper( +XXXXXXX , _________________NAVI_L1___________________ , _________________NAVI_R1___________________ , XXXXXXX , +XXXXXXX , _________________NAVI_L2___________________ , _________________NAVI_R2___________________ , XXXXXXX , +XXXXXXX , _________________NAVI_L3___________________ , _________________NAVI_R3___________________ , XXXXXXX , +XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , APPS , KC_LGUI , MODSFT , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX +), // Note: visualizer expects this closing parens to be right at the start of the line. + +}; + +// called by QMK during key processing before the actual key event is handled. Useful for macros. +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case LOCK: + if (record->event.pressed) { + rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL); + } + return true; // Let QMK send the press/release events + break; + + case TAP_TOG_LAYER: + process_tap_tog(_SYMB,record); + return false; + break; + default: + tap_tog_count = 0; // reset counter. + tap_tog_layer_other_key_pressed = true; // always set this to true, TAP_TOG_LAYER handlers will handle interpreting this + break; + } + return true; +} + + +// Runs constantly in the background, in a loop every 100ms or so. +// Best used for LED status output triggered when user isn't actively typing. +void matrix_scan_user(void) { + #ifdef RGBLIGHT_ENABLE + matrix_scan_rgb(); + #endif // RGBLIGHT_ENABLE +} + +// only runs when when the layer is changed, good for updating LED's and clearing sticky state +// RGB modes: /~https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight.h +uint32_t layer_state_set_user(uint32_t state) { + #ifdef RGBLIGHT_ENABLE + layer_state_set_rgb(state); + #endif + uint8_t layer = biton32(state); + combo_enable(); // by default, enable combos. + switch (layer) { + case 0: + break; + case 1: + clear_mods(); + break; + case 2: + clear_mods(); + break; + case _OVERWATCH: + clear_mods(); + combo_disable(); // We don't want combos in overwatch + #ifdef AUDIO_ENABLE + // PLAY_SONG(song_overwatch); + #endif + break; + default: + break; + } + return state; +}; + +// Runs boot tasks for keyboard. +// Plays a welcome song and clears RGB state. +void matrix_init_user(void) { + #ifdef RGBLIGHT_ENABLE + keyboard_post_init_rgb(); + #endif +} diff --git a/keyboards/keebio/levinson/keymaps/issmirnov/push.sh b/keyboards/keebio/levinson/keymaps/issmirnov/push.sh new file mode 100755 index 000000000000..58eb115f894d --- /dev/null +++ b/keyboards/keebio/levinson/keymaps/issmirnov/push.sh @@ -0,0 +1,2 @@ +#!/bin/bash +make keebio/levinson/rev2:issmirnov:dfu-split-left diff --git a/keyboards/keebio/levinson/keymaps/issmirnov/rgb.c b/keyboards/keebio/levinson/keymaps/issmirnov/rgb.c new file mode 100644 index 000000000000..de3a5342c05e --- /dev/null +++ b/keyboards/keebio/levinson/keymaps/issmirnov/rgb.c @@ -0,0 +1,61 @@ +#include "rgb.h" + +// TODO gate this debugging header +#include + +// Wired up in layer_state_set_user in keymap.c +layer_state_t layer_state_set_rgb(layer_state_t state) { + switch (get_highest_layer(state)) { + case _QWERTY: + rgblight_mode(RGBLIGHT_MODE_STATIC_LIGHT); + rgblight_sethsv_noeeprom(RGB_CLEAR); + break; + case _SYMB: + rgblight_sethsv_noeeprom_red(); + break; + case _NUMP: + rgblight_sethsv_noeeprom_green(); + break; + case _OVERWATCH: + rgblight_sethsv_noeeprom_blue(); + // TODO set up animated rainbow swirl with overwatch colors. + // rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_SWIRL); + // rgblight_effect_breathing(&animation_status); + // rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3); + break; + case _NAVI: + rgblight_sethsv_noeeprom(HSV_AZURE); + break; + default: // for any other layers, or the default layer + break; + } + return state; +} + + +void keyboard_post_init_rgb(void) { + rgblight_enable(); + rgblight_mode(RGBLIGHT_MODE_STATIC_LIGHT); + rgblight_setrgb(RGB_CLEAR); + uprintf("Reset RGB colors"); +} + +void matrix_scan_rgb(void) { + set_rgb_indicators(get_mods(), get_oneshot_mods()); +} + +void set_rgb_indicators(uint8_t this_mod, uint8_t this_osm) { + if (biton32(layer_state) == _QWERTY) { + if ((this_mod | this_osm) & MOD_MASK_SHIFT) { + rgblight_setrgb_gold_at(SHFT_LED1); + } else { + rgblight_setrgb_at(RGB_CLEAR, SHFT_LED1); + } + + if ((this_mod | this_osm) & MOD_MASK_GUI) { + rgblight_setrgb_purple_at(GUI_LED1); + } else { + rgblight_setrgb_at(RGB_CLEAR, GUI_LED1); + } + } +} diff --git a/keyboards/keebio/levinson/keymaps/issmirnov/rgb.h b/keyboards/keebio/levinson/keymaps/issmirnov/rgb.h new file mode 100644 index 000000000000..254d3cbac09d --- /dev/null +++ b/keyboards/keebio/levinson/keymaps/issmirnov/rgb.h @@ -0,0 +1,15 @@ +#pragma once +#include "quantum.h" +#include "issmirnov.h" + +// Welcome animation when keyboard boots +void keyboard_post_init_rgb(void); + +// If rgb enabled, set underglow for layer +uint32_t layer_state_set_rgb(uint32_t state); + +// Enhance matrix scan code. Note: keep this light, since it runs every 100ms +void matrix_scan_rgb(void); + +// Light up SHIFT and GUI indicator when pressed. +void set_rgb_indicators(uint8_t this_mod, uint8_t this_osm); diff --git a/keyboards/keebio/levinson/keymaps/issmirnov/rules.mk b/keyboards/keebio/levinson/keymaps/issmirnov/rules.mk new file mode 100644 index 000000000000..6cbed2f770c8 --- /dev/null +++ b/keyboards/keebio/levinson/keymaps/issmirnov/rules.mk @@ -0,0 +1,14 @@ +# Enable RGB underglow +# https://beta.docs.qmk.fm/features/feature_rgblight +RGBLIGHT_ENABLE = yes # +5500 bytes +ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) + # Include my fancy rgb functions source here + SRC += rgb.c +endif + +# Disable backlight, since I use RGB underglow. +# https://beta.docs.qmk.fm/features/feature_backlight +BACKLIGHT_ENABLE = no + +# Control piezo speaker on C6 +AUDIO_ENABLE = yes # +4000 bytes diff --git a/keyboards/keebio/levinson/keymaps/issmirnov/sounds.h b/keyboards/keebio/levinson/keymaps/issmirnov/sounds.h new file mode 100644 index 000000000000..dac9d276c1b0 --- /dev/null +++ b/keyboards/keebio/levinson/keymaps/issmirnov/sounds.h @@ -0,0 +1,9 @@ +// ................................................................ Audio Sounds +#pragma once +#ifdef AUDIO_ENABLE +// Songs come from quantum/audio/song_list.h +float song_startup [][2] = SONG(STARTUP_SOUND); +float song_goodbye [][2] = SONG(GOODBYE_SOUND); +float song_overwatch[][2] = SONG(OVERWATCH_THEME); +#undef AUDIO_VOICES +#endif diff --git a/keyboards/keebio/levinson/keymaps/issmirnov/template.txt b/keyboards/keebio/levinson/keymaps/issmirnov/template.txt new file mode 100644 index 000000000000..8787cee7b579 --- /dev/null +++ b/keyboards/keebio/levinson/keymaps/issmirnov/template.txt @@ -0,0 +1,9 @@ +,-----------------------------------. ,-----------------------------------. +| 0 | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 10 | 11 | +|-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| +| 12 | 13 | 14 | 15 | 16 | 17 | | 18 | 19 | 20 | 21 | 22 | 23 | +|-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| +| 24 | 25 | 26 | 27 | 28 | 29 | | 30 | 31 | 32 | 33 | 34 | 35 | +|-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| +| 36 | 37 | 38 | 39 | 40 | 41 | | 42 | 43 | 44 | 45 | 46 | 47 | +`-----------------------------------' ------------------------------------' diff --git a/layouts/community/ergodox/issmirnov/README.md b/layouts/community/ergodox/issmirnov/README.md new file mode 100644 index 000000000000..564edfe31d94 --- /dev/null +++ b/layouts/community/ergodox/issmirnov/README.md @@ -0,0 +1,49 @@ +# Ivan's Ergodox Config + + +## Details about the layout + +- Shift and Cmd are One Shot Modifiers, so tapping them once will apply them to the next key. When tapped twice they will lock, until tapped again to clear. +- When switching to other layers, any stuck modifiers are cleared in order to avoid unintended key combos +- There are a few leader key combinations. Right now, `KC_LEAD` + `s` will open my wiki homepage. +- All transparent keys have been replaced with noops to avoid layer bleeding. + +## Initial Setup + +### QMK + +``` +brew tap osx-cross/avr +brew tap PX4/homebrew-px4 +brew update +brew install avr-gcc +brew install dfu-programmer +brew install gcc-arm-none-eabi +brew install avrdude + +git clone /~https://github.com/qmk/qmk_firmware.git +git clone /~https://github.com/issmirnov/ergodox-layout.git \ + layouts/community/ergodox/ismirnov +``` + +### Teensy utils + +Download and add both of these to $PATH + +- [hid_listen](https://www.pjrc.com/teensy/hid_listen.html) +- [teensy loader cli](https://www.pjrc.com/teensy/loader_cli.html) + +## Flashing + +``` +make ergodox_ez:ismirnov +teensy_loader_cli -mmcu=atmega32u4 -w -v ergodox_ez_ismirnov.hex + +# or just +make ergodox_ez:ismirnov:flash +``` + +## Gotchas + +- If you get error: `dyld: Library not loaded: /usr/local/opt/isl/lib/libisl.15.dylib` then do `brew reinstall avr-gcc` +- If `hid_listen` just prints out a ton of dots, update makefile with `CONSOLE_ENABLE = yes` diff --git a/layouts/community/ergodox/issmirnov/asci-keymap.txt b/layouts/community/ergodox/issmirnov/asci-keymap.txt new file mode 100644 index 000000000000..9b023f6641dc --- /dev/null +++ b/layouts/community/ergodox/issmirnov/asci-keymap.txt @@ -0,0 +1,95 @@ + Qwerty +,--------------------------------------------. ,--------------------------------------------. +| Escape | 1 | 2 | 3 | 4 | 5 | ! | | = | 6 | 7 | 8 | 9 | 0 | Escape | +|--------+-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----+--------| +|Lctl(Spa| Q | W | E | R | T | * | | + | Y | U | I | O | P |Lgui(Spa| +|--------+-----+-----+-----+-----+-----| | | |-----+-----+-----+-----+-----+--------| +| Tab | A | S | D | F | G |-----| |-----| H | J | K | L |TapTo|Mo(Navi)| +|--------+-----+-----+-----+-----+-----| / | | - |-----+-----+-----+-----+-----+--------| +|Osm(ModL| Z | X | C | V | B | | | | N | M | . |Comma|Tg(Nu| ' | +`--------+-----+-----+-----+-----+-----------' `-----------+-----+-----+-----+-----+--------' + |Ctrl |Lsft(|Lsft(| Alt | Mod | |Escap| : | % | |Lgui(| + `-----------------------------' ,-----------. ,-----------. `-----------------------------' + | | | | ← | → | + ,-----|-----|-----| |-----+-----+-----. + | | | | | ↑ | | | + | ⎵ | ⌫ |-----| |-----| Tab |Enter| + | | | Del | | ↓ | | | + `-----------------' `-----------------' + + Symb +,--------------------------------------------. ,--------------------------------------------. +| Escape | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | | +|--------+-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----+--------| +| | - | @ | { | } | ` | * | | + | * | ! | | | % | + |Mo(Navi)| +|--------+-----+-----+-----+-----+-----| | | |-----+-----+-----+-----+-----+--------| +| Tab | ^ | _ | ( | ) | $ |-----| |-----| # | = | : | ; |TapTo| Dquo | +|--------+-----+-----+-----+-----+-----| / | | - |-----+-----+-----+-----+-----+--------| +| Lshift | < | > | [ | ] | ~ | | | | & | ? | / | \ |Tg(Nu| ' | +`--------+-----+-----+-----+-----+-----------' `-----------+-----+-----+-----+-----+--------' + |Ctrl |Lsft(|Lsft(| Alt |WkspL| |Escap| : | % | | | + `-----------------------------' ,-----------. ,-----------. `-----------------------------' + | | | | ← | → | + ,-----|-----|-----| |-----+-----+-----. + | | | | | ↑ | | | + |WkspR| ⌫ |-----| |-----| Tab |Enter| + | | | Del | | ↓ | | | + `-----------------' `-----------------' + + Nump +,--------------------------------------------. ,--------------------------------------------. +| | | | | | | | | = | | | | | | Reset | +|--------+-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----+--------| +| | No | No |Lgui(| | | * | | + | , | 7 | 8 | 9 | | | +|--------+-----+-----+-----+-----+-----| | | |-----+-----+-----+-----+-----+--------| +| Tab | |Lgui(|Lgui(|Lgui(| |-----| |-----| 0 | 4 | 5 | 6 |To(Sy| | +|--------+-----+-----+-----+-----+-----| / | | - |-----+-----+-----+-----+-----+--------| +| | | | |Audio|Audio| | | | . | 1 | 2 | 3 |To(Qw| | +`--------+-----+-----+-----+-----+-----------' `-----------+-----+-----+-----+-----+--------' + |To(0)| | | | | | 0 | | |To(3)| | + `-----------------------------' ,-----------. ,-----------. `-----------------------------' + | | | | ← | → | + ,-----|-----|-----| |-----+-----+-----. + | | | | | ↑ | | | + | ⎵ | ⌫ |-----| |-----| Alt |Shift| + | | | Del | | ↓ | | | + `-----------------' `-----------------' + + Overwatch +,--------------------------------------------. ,--------------------------------------------. +| Escape | 1 | 2 | 3 | 4 | 5 |To(0)| | | | | | | | | +|--------+-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----+--------| +| Tab | Q | W | E | R | T | | | | | | | | | | +|--------+-----+-----+-----+-----+-----| | | |-----+-----+-----+-----+-----+--------| +| Ctrl | A | S | D | F | P |-----| |-----| | | | | | | +|--------+-----+-----+-----+-----+-----| | | |-----+-----+-----+-----+-----+--------| +| Lshift | Z | X | C | V |Grave| | | | | | | | | | +`--------+-----+-----+-----+-----+-----------' `-----------+-----+-----+-----+-----+--------' + |Ctrl | F9 |Pscre| H | R | | | | | | | + `-----------------------------' ,-----------. ,-----------. `-----------------------------' + | | | | | | + ,-----|-----|-----| |-----+-----+-----. + | | | | | | | | + | ⎵ | |-----| |-----| | | + | | | | | | | | + `-----------------' `-----------------' + + Navi +,--------------------------------------------. ,--------------------------------------------. +| Escape | 1 | 2 | 3 | 4 | 5 | 6 | | | | | | | | | +|--------+-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----+--------| +| | | | ↑ | | | | | | | | | | | | +|--------+-----+-----+-----+-----+-----| | | |-----+-----+-----+-----+-----+--------| +| | | ← | ↓ | → | |-----| |-----| |Ctrl | | | | | +|--------+-----+-----+-----+-----+-----| | | |-----+-----+-----+-----+-----+--------| +| | | | | | | | | | | | | | | | +`--------+-----+-----+-----+-----+-----------' `-----------+-----+-----+-----+-----+--------' + | | | | |WkspL| | ⌘⇧ | | | | | + `-----------------------------' ,-----------. ,-----------. `-----------------------------' + | | | | | | + ,-----|-----|-----| |-----+-----+-----. + | | | | | | | | + |WkspR| |-----| |-----| | Mod | + | | | | | | | | + `-----------------' `-----------------' + diff --git a/layouts/community/ergodox/issmirnov/build.sh b/layouts/community/ergodox/issmirnov/build.sh new file mode 100755 index 000000000000..7bb694d8a74d --- /dev/null +++ b/layouts/community/ergodox/issmirnov/build.sh @@ -0,0 +1,2 @@ +#!/bin/bash +make ergodox_ez:issmirnov diff --git a/layouts/community/ergodox/issmirnov/config.h b/layouts/community/ergodox/issmirnov/config.h new file mode 100644 index 000000000000..fe62a7d1dff0 --- /dev/null +++ b/layouts/community/ergodox/issmirnov/config.h @@ -0,0 +1,3 @@ +// Reference: https://beta.docs.qmk.fm/reference/config-options +// and /~https://github.com/qmk/qmk_firmware/blob/master/docs/config_options.md +#include QMK_KEYBOARD_CONFIG_H diff --git a/layouts/community/ergodox/issmirnov/keymap.c b/layouts/community/ergodox/issmirnov/keymap.c new file mode 100644 index 000000000000..ce853f3d32a3 --- /dev/null +++ b/layouts/community/ergodox/issmirnov/keymap.c @@ -0,0 +1,250 @@ +#include QMK_KEYBOARD_H + +// Custom user includes +#include "issmirnov.h" +#include "tap_tog.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_QWERTY] = LAYOUT_ergodox_wrapper( +KC_ESCAPE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_EXLM, +LCTL(KC_SPACE), _________________QWERTY_L1_________________, KC_ASTR, +KC_TAB, _________________QWERTY_L2_________________, +OSM(MOD_LSFT), _________________QWERTY_L3_________________, KC_SLASH, +KC_LCTL, LSFT(KC_LGUI), LSFT(KC_LALT), KC_LALT, KC_LGUI, + XXXXXXX, XXXXXXX, + XXXXXXX, + KC_SPACE, KC_BSPACE, KC_DEL, + +KC_EQL , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_ESCAPE , +KC_PLUS , _________________QWERTY_R1_________________ , LGUI(KC_SPACE) , + _________________QWERTY_R2_________________ , MO(_NAVI) , +KC_MINS , _________________QWERTY_R3_________________ , KC_QUOTE , +KC_ESCAPE , KC_COLN , KC_PERC , XXXXXXX , LGUI(KC_L) , + +KC_LEFT, KC_RGHT, +KC_UP, +KC_DOWN, KC_TAB, KC_ENTER +), + + // layer 1 +[_SYMB] = LAYOUT_ergodox_wrapper( +KC_ESCAPE , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , +XXXXXXX , _________________SYMB_L1___________________ ,KC_ASTR , +KC_TAB , _________________SYMB_L2___________________, +KC_LSHIFT , _________________SYMB_L3___________________, KC_SLASH , +KC_LCTL , LSFT(KC_LGUI) , LSFT(KC_LALT) , KC_LALT , WKSP_LEFT , + + XXXXXXX, XXXXXXX, + XXXXXXX, + WKSP_RIGHT, KC_BSPACE, KC_DEL, + +KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , XXXXXXX , +KC_PLUS , _________________SYMB_R1___________________ , MO(_NAVI) , + _________________SYMB_R2___________________ , KC_DQUO , +KC_MINS , _________________SYMB_R3___________________ , KC_QUOTE , +KC_ESCAPE , KC_COLN , KC_PERC , XXXXXXX , XXXXXXX , + +KC_LEFT, KC_RGHT, +KC_UP, +KC_DOWN, KC_TAB, KC_ENTER +), + + // layer 2 +[_NUMP] = LAYOUT_ergodox_wrapper( +XXXXXXX , ___________________XXXXX___________________, XXXXXXX , +XXXXXXX , _________________NUMP_L1___________________ , KC_ASTR , +KC_TAB , _________________NUMP_L2___________________ , +XXXXXXX , _________________NUMP_L3___________________ , KC_SLASH , +TO(0) , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + + XXXXXXX , XXXXXXX , + XXXXXXX , + KC_SPACE , KC_BSPACE , KC_DEL , + +KC_EQL , ___________________XXXXX___________________ , RESET , +KC_PLUS , _________________NUMP_R1___________________ , XXXXXXX , + _________________NUMP_R2___________________ , XXXXXXX , +KC_MINS , _________________NUMP_R3___________________ , XXXXXXX , + KC_0 , XXXXXXX , XXXXXXX , TO(3) , XXXXXXX , + +KC_LEFT, KC_RGHT, +KC_UP, +KC_DOWN, KC_LALT, KC_LSFT +), + + // layer 3 +[_OVERWATCH] = LAYOUT_ergodox_wrapper( +KC_ESCAPE, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , TO(0) , +______________OVERWATCH_L1_________________ , XXXXXXX , +______________OVERWATCH_L2_________________ , +______________OVERWATCH_L3_________________ , XXXXXXX , +______________OVERWATCH_L4_________________ , + +XXXXXXX , XXXXXXX , +XXXXXXX , +KC_SPACE , XXXXXXX , XXXXXXX , + + +_______, _______, _______, _______, _______, _______, _______, +_______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, +_______, _______, _______, _______, _______, _______, _______, +_______, _______, _______, _______, _______, + +_______, _______, +_______, +_______, _______, _______ + +), +// layer 4 +[_NAVI] = LAYOUT_ergodox_wrapper( +KC_ESCAPE, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , +XXXXXXX, _________________NAVI_L1___________________ , XXXXXXX , +XXXXXXX, _________________NAVI_L2___________________ , +XXXXXXX, _________________NAVI_L3___________________ , XXXXXXX , +XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, WKSP_LEFT, + +XXXXXXX , XXXXXXX , +XXXXXXX , +WKSP_RIGHT , XXXXXXX , XXXXXXX , + + +_______, _______, _______, _______, _______, _______, _______, +_______, _________________NAVI_R1___________________, _______, + _________________NAVI_R2___________________, _______, +_______, _________________NAVI_R3___________________, _______, +MODSFT, _______, _______, _______, _______, + +_______, _______, +_______, +_______, _______, KC_LGUI + +), +}; + + +// called by QMK during key processing before the actual key event is handled. Useful for macros. +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + uint8_t layer = biton32(layer_state); + switch (keycode) { + case TAP_TOG_LAYER: + process_tap_tog(_SYMB,record); + return false; + break; + + case WKSP_LEFT: + // Only if TAP_TOG_LAYER is being held right now do we want to do actions. + if (record->event.pressed && (!tap_tog_layer_toggled_on || layer == _NAVI)) { + tap_code16(LGUI(LSFT(KC_Z))); + tap_tog_layer_other_key_pressed = true; // Add flag so layer resets + } + break; + case WKSP_RIGHT: + // Only if TAP_TOG_LAYER is being held right now do we want to do actions. + if (record->event.pressed && (!tap_tog_layer_toggled_on || layer == _NAVI)) { + tap_code16(LGUI(LSFT(KC_X))); + tap_tog_layer_other_key_pressed = true; // Add flag so layer resets + } + break; + default: + tap_tog_count = 0; // reset counter. + tap_tog_layer_other_key_pressed = true; // always set this to true, TAP_TOG_LAYER handlers will handle interpreting this + break; + } + return true; +} + +// Runs constantly in the background, in a loop every 100ms or so. +// Best used for LED status output triggered when user isn't actively typing. +void matrix_scan_user(void) { + uint8_t layer = biton32(layer_state); + if (layer == 0) { + // Set up LED indicators for stuck modifier keys. + // /~https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/report.h#L118 + switch (keyboard_report->mods) { + case MOD_BIT(KC_LSFT): // LSHIFT + ergodox_right_led_1_set (LED_BRIGHTNESS_LO); + ergodox_right_led_1_on (); + ergodox_right_led_2_set (LED_BRIGHTNESS_LO); + ergodox_right_led_2_on (); + ergodox_right_led_3_set (LED_BRIGHTNESS_HI); + ergodox_right_led_3_off (); + break; + + case MOD_BIT(KC_LGUI): // LGUI + ergodox_right_led_1_set (LED_BRIGHTNESS_HI); + ergodox_right_led_1_off (); + ergodox_right_led_2_set (LED_BRIGHTNESS_LO); + ergodox_right_led_2_on (); + ergodox_right_led_3_set (LED_BRIGHTNESS_LO); + ergodox_right_led_3_on (); + break; + + case MOD_BIT(KC_LSFT) ^ MOD_BIT(KC_LGUI): + ergodox_right_led_1_set (70); + ergodox_right_led_1_on (); + ergodox_right_led_2_set (70); + ergodox_right_led_2_on (); + ergodox_right_led_3_set (70); + ergodox_right_led_3_on (); + break; + + default: // reset leds + ergodox_right_led_1_set (LED_BRIGHTNESS_HI); + ergodox_right_led_1_off (); + ergodox_right_led_2_set (LED_BRIGHTNESS_HI); + ergodox_right_led_2_off (); + ergodox_right_led_3_set (LED_BRIGHTNESS_HI); + ergodox_right_led_3_off (); + } + } +} + +// only runs when when the layer is changed, good for updating LED's and clearing sticky state +uint32_t layer_state_set_user(uint32_t state) { + uint8_t layer = biton32(state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + + combo_enable(); // by default, enable combos. + switch (layer) { + case 0: + break; + case 1: + clear_mods(); + ergodox_right_led_1_on(); + break; + case 2: + clear_mods(); + ergodox_right_led_2_on(); + break; + case _OVERWATCH: + clear_mods(); + combo_disable(); // We don't want combos in overwatch + ergodox_right_led_3_on(); + break; + case 4: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + break; + case 5: + ergodox_right_led_1_on(); + ergodox_right_led_3_on(); + break; + case 6: + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + break; + case 7: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + break; + default: + break; + } + return state; +}; diff --git a/layouts/community/ergodox/issmirnov/push.sh b/layouts/community/ergodox/issmirnov/push.sh new file mode 100755 index 000000000000..1a6c7c447866 --- /dev/null +++ b/layouts/community/ergodox/issmirnov/push.sh @@ -0,0 +1,2 @@ +#!/bin/bash +make ergodox_ez:issmirnov:teensy diff --git a/layouts/community/ergodox/issmirnov/template.txt b/layouts/community/ergodox/issmirnov/template.txt new file mode 100644 index 000000000000..35c7920a1145 --- /dev/null +++ b/layouts/community/ergodox/issmirnov/template.txt @@ -0,0 +1,17 @@ +,--------------------------------------------. ,--------------------------------------------. +| 0 | 1 | 2 | 3 | 4 | 5 | 6 | | 38 | 39 | 40 | 41 | 42 | 43 | 44 | +|--------+-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----+--------| +| 7 | 8 | 9 | 10 | 11 | 12 | 13 | | 45 | 46 | 47 | 48 | 49 | 50 | 51 | +|--------+-----+-----+-----+-----+-----| | | |-----+-----+-----+-----+-----+--------| +| 14 | 15 | 16 | 17 | 18 | 19 |-----| |-----| 52 | 53 | 54 | 55 | 56 | 57 | +|--------+-----+-----+-----+-----+-----| 26 | | 58 |-----+-----+-----+-----+-----+--------| +| 20 | 21 | 22 | 23 | 24 | 25 | | | | 59 | 60 | 61 | 62 | 63 | 64 | +`--------+-----+-----+-----+-----+-----------' `-----------+-----+-----+-----+-----+--------' + | 27 | 28 | 29 | 30 | 31 | | 65 | 66 | 67 | 68 | 69 | + `-----------------------------' ,-----------. ,-----------. `-----------------------------' + | 32 | 33 | | 70 | 71 | + ,-----|-----|-----| |-----+-----+-----. + | | | 34 | | 72 | | | + | 35 | 36 |-----| |-----| 74 | 75 | + | | | 37 | | 73 | | | + `-----------------' `-----------------' diff --git a/users/issmirnov/config.h b/users/issmirnov/config.h new file mode 100644 index 000000000000..664ebfe8a38c --- /dev/null +++ b/users/issmirnov/config.h @@ -0,0 +1,45 @@ +#pragma once + +// Allows sending more than one key per scan. Useful for chords. +#define QMK_KEYS_PER_SCAN 4 + +// how long before a tap becomes a hold +#undef TAPPING_TERM +#define TAPPING_TERM 100 + +// makes tap and hold keys work better for fast typers who don't want +// tapping term set above 500 +#define PERMISSIVE_HOLD + +// tap anyway, even after TAPPING_TERM, if there was no other key +// interruption between press and release +#define RETRO_TAPPING + +// how many taps before triggering the toggle +#undef ONESHOT_TAP_TOGGLE +#define ONESHOT_TAP_TOGGLE 2 + +// how long before oneshot modifier key times out (currently only shift) +#undef ONESHOT_TIMEOUT +#define ONESHOT_TIMEOUT 2000 + +// Enable combos for vim +#define COMBO_COUNT 5 // Specify the number of combos used. BE SURE TO INCREMENT AS NEEDED +#define COMBO_TERM 50 // window in milliseconds to trigger combo + +// Allow more than 4 keys to be sent to the system. Useful for gaming. +// #define FORCE_NKRO + +// Save 200 bytes on unused keycodes +#undef LOCKING_SUPPORT_ENABLE +#undef LOCKING_RESYNC_ENABLE + +// Enable HID_listen commands. +#define NO_DEBUG +#undef NO_PRINT +#define USER_PRINT + +// Note: Defining the following does not have any impact on space: +// - NO_ACTION_MACRO +// - NO_ACTION_FUNCTION +// - DISABLE_LEADER diff --git a/users/issmirnov/issmirnov.c b/users/issmirnov/issmirnov.c new file mode 100644 index 000000000000..665afbcfd7da --- /dev/null +++ b/users/issmirnov/issmirnov.c @@ -0,0 +1,43 @@ +#include "issmirnov.h" + +enum combo_events { + JK_ESC, + DF_CLN, + SD_SLASH, + XC_COPY, + XV_PASTE +}; + + +const uint16_t PROGMEM jk_combo[] = {KC_J, KC_K, COMBO_END}; +const uint16_t PROGMEM df_combo[] = {KC_D, KC_F, COMBO_END}; +const uint16_t PROGMEM sd_combo[] = {KC_S, KC_D, COMBO_END}; +const uint16_t PROGMEM copy_combo[] = {KC_X, KC_C, COMBO_END}; +const uint16_t PROGMEM paste_combo[] = {KC_X, KC_V, COMBO_END}; + + +// BE SURE TO UPDATE THE CONFIG.H "COMBO_COUNT" value when you add elements here! +combo_t key_combos[COMBO_COUNT] = { + COMBO(jk_combo, KC_ESC), + COMBO(df_combo, KC_COLON), + COMBO(sd_combo, KC_SLASH), + [XC_COPY] = COMBO_ACTION(copy_combo), + [XV_PASTE] = COMBO_ACTION(paste_combo), +}; + + +void process_combo_event(uint8_t combo_index, bool pressed) { + switch(combo_index) { + case XC_COPY: + if (pressed) { + tap_code16(LCTL(KC_C)); + } + break; + + case XV_PASTE: + if (pressed) { + tap_code16(LCTL(KC_V)); + } + break; + } +} diff --git a/users/issmirnov/issmirnov.h b/users/issmirnov/issmirnov.h new file mode 100644 index 000000000000..eef80dfc471f --- /dev/null +++ b/users/issmirnov/issmirnov.h @@ -0,0 +1,35 @@ +#pragma once + +#include QMK_KEYBOARD_H + +#include "rows.h" + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers +enum { + _QWERTY = 0, + _SYMB, + _NUMP, + _OVERWATCH, + _NAVI +}; + +enum custom_keycodes { + PLACEHOLDER = SAFE_RANGE, + TAP_TOG_LAYER, + CLEAR_EEPROM, + WKSP_LEFT, // Smart key that only activates when we are momentarily in a layer + WKSP_RIGHT, // Smart key that only activates when we are momentarily in a layer +}; + + +#define LOWER MO(_SYMB) +#define RAISE MO(_NUMP) + +#define CTL_SPC MT(MOD_LCTL, KC_SPC) +#define OSMSFT OSM(MOD_LSFT) +#define LOCK LGUI(KC_L) +#define MODSFT LSFT(KC_LGUI) +#define APPS LGUI(KC_SPC) diff --git a/users/issmirnov/rows.h b/users/issmirnov/rows.h new file mode 100644 index 000000000000..d35af2175c9d --- /dev/null +++ b/users/issmirnov/rows.h @@ -0,0 +1,55 @@ +#pragma once + +#include QMK_KEYBOARD_H + +// This wrapper is required in order to expand the row macro inside the keymap configs. +#define LAYOUT_ergodox_wrapper(...) LAYOUT_ergodox(__VA_ARGS__) +#define LAYOUT_ortho_4x12_wrapper(...) LAYOUT_ortho_4x12(__VA_ARGS__) + +// Share common config. We'll skip the mod rows and func rows. +// Note, it's also really neat the way the scoping works. Since we perform the expansion in the keymap.c file +// so we can use our enums for custom keycodes +#define _________________QWERTY_L1_________________ KC_Q , KC_W , KC_E , KC_R , KC_T +#define _________________QWERTY_L2_________________ KC_A , KC_S , KC_D , KC_F , KC_G +#define _________________QWERTY_L3_________________ KC_Z , KC_X , KC_C , KC_V , KC_B + +#define _________________QWERTY_R1_________________ KC_Y , KC_U , KC_I , KC_O , KC_P +#define _________________QWERTY_R2_________________ KC_H , KC_J , KC_K , KC_L , TAP_TOG_LAYER +#define _________________QWERTY_R3_________________ KC_N , KC_M , KC_DOT , KC_COMMA , TG(_NUMP) + +#define ___________________BLANK___________________ _______ , _______ , _______ , _______ , _______ +#define ___________________XXXXX___________________ XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX + +#define _________________SYMB_L1___________________ KC_MINS , KC_AT , KC_LCBR , KC_RCBR , KC_GRV +#define _________________SYMB_L2___________________ KC_CIRC , KC_UNDS , KC_LPRN , KC_RPRN , KC_DLR +#define _________________SYMB_L3___________________ KC_LABK , KC_RABK , KC_LBRACKET , KC_RBRACKET , KC_TILD + +#define _________________SYMB_R1___________________ KC_ASTR , KC_EXLM , KC_PIPE , KC_PERC , KC_PLUS +#define _________________SYMB_R2___________________ KC_HASH , KC_EQL , KC_COLN , KC_SCLN , TAP_TOG_LAYER +#define _________________SYMB_R3___________________ KC_AMPR , KC_QUES , KC_SLASH , KC_BSLASH , TG(_NUMP) + + +#define _________________NUMP_L1___________________ KC_NO , KC_NO , LGUI(KC_UP) , XXXXXXX , XXXXXXX +#define _________________NUMP_L2___________________ XXXXXXX , LGUI(KC_LEFT) , LGUI(KC_DOWN) , LGUI(KC_RIGHT) , XXXXXXX +#define _________________NUMP_L3___________________ XXXXXXX , XXXXXXX , XXXXXXX , KC_AUDIO_VOL_DOWN , KC_AUDIO_VOL_UP + +#define _________________NUMP_R1___________________ KC_COMM , KC_7 , KC_8 , KC_9 , XXXXXXX +#define _________________NUMP_R2___________________ KC_0 , KC_4 , KC_5 , KC_6 , TO(_SYMB) +#define _________________NUMP_R3___________________ KC_DOT , KC_1 , KC_2 , KC_3 , TO(_QWERTY) + +// Note: These are 6x1 blocks, since modifiers are also adjusted. +#define ______________OVERWATCH_L1_________________ KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T +#define ______________OVERWATCH_L2_________________ KC_LCTL , KC_A , KC_S , KC_D , KC_F , KC_P +#define ______________OVERWATCH_L3_________________ KC_LSHIFT , KC_Z , KC_X , KC_C , KC_V , KC_GRAVE +// Ergodox only has 5 keys on bottom row: +#define ______________OVERWATCH_L4_________________ KC_LCTL , KC_F9 , KC_PSCREEN , KC_H , KC_R + + + +#define _________________NAVI_L1___________________ XXXXXXX , XXXXXXX , KC_UP , XXXXXXX , XXXXXXX +#define _________________NAVI_L2___________________ XXXXXXX , KC_LEFT , KC_DOWN , KC_RGHT , XXXXXXX +#define _________________NAVI_L3___________________ XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX + +#define _________________NAVI_R1___________________ XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX +#define _________________NAVI_R2___________________ XXXXXXX , KC_LCTL , XXXXXXX , XXXXXXX , XXXXXXX +#define _________________NAVI_R3___________________ XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX diff --git a/users/issmirnov/rules.mk b/users/issmirnov/rules.mk new file mode 100644 index 000000000000..096d7b4c0d1e --- /dev/null +++ b/users/issmirnov/rules.mk @@ -0,0 +1,25 @@ + +SRC += tap_tog.c +SRC += issmirnov.c + +# https://www.reddit.com/r/olkb/comments/bmpgjm/programming_help/ +# Should shave 2000 bytes +LINK_TIME_OPTIMIZATION_ENABLE = yes + +# Enable debugging only when needed. +CONSOLE_ENABLE = yes # +400 bytes (hid_listen support) + +# Enable combo keys for vim usage. +# /~https://github.com/qmk/qmk_firmware/blob/master/docs/feature_combo.md +COMBO_ENABLE = yes + +# This allows the keyboard to tell the host OS that up to 248 keys are held down at once +NKRO_ENABLE = no # note: also needs FORCE_NKRO in config.h + +# Disable unused features to save on space +# https://thomasbaart.nl/2018/12/01/reducing-firmware-size-in-qmk/ +MOUSEKEY_ENABLE = no # 2000 bytes +BOOTMAGIC_ENABLE = no +COMMAND_ENABLE = no # https://beta.docs.qmk.fm/features/feature_command +UNICODE_ENABLE = no # Unicode +SWAP_HANDS_ENABLE = no # Allow swapping hands of keyboard diff --git a/users/issmirnov/tap_tog.c b/users/issmirnov/tap_tog.c new file mode 100644 index 000000000000..02cea08b1d64 --- /dev/null +++ b/users/issmirnov/tap_tog.c @@ -0,0 +1,52 @@ +#include QMK_KEYBOARD_H + +#include "tap_tog.h" + +bool tap_tog_layer_other_key_pressed = false; +bool tap_tog_layer_toggled_on = false; +uint8_t tap_tog_count = 0; + +void process_tap_tog(uint8_t layer, keyrecord_t *record) { + tap_tog_count++; + // press + if (record->event.pressed) { + + // TTL has already been pressed and we are toggled into that layer + // so now we need to leave + if(tap_tog_layer_toggled_on) { + layer_clear(); + tap_tog_layer_toggled_on = false; + } + + // this means we're in our default layer + // so switch the layer immediately + // whether we'll switch back when it's released depends on if a button gets pressed while this is held down + else { + // switch layer + layer_on(layer); + tap_tog_layer_other_key_pressed = false; // if this becomes true before it gets released, it will act as a held modifier + } + } + + // release + else { + // if it was used as a held modifier (like traditional shift) + if(tap_tog_layer_other_key_pressed) { + // switch layer back + layer_clear(); + } + // if it was used as a toggle button + else { + // next time, it will turn layer off + tap_tog_layer_toggled_on = true; + + // If it's been tapped twice, reset the toggle flag. + // Otherwise, we get stuck oscillating between this code block and the + // pressed && TTL_toggled_on block. + if (tap_tog_count >= 4 ) { + tap_tog_count = 0; + tap_tog_layer_toggled_on = false; + } + } + } +} diff --git a/users/issmirnov/tap_tog.h b/users/issmirnov/tap_tog.h new file mode 100644 index 000000000000..f59711f0439a --- /dev/null +++ b/users/issmirnov/tap_tog.h @@ -0,0 +1,10 @@ +#pragma once + +#include "issmirnov.h" + +extern bool tap_tog_layer_other_key_pressed; // set to true if any key pressed while TAP_TOG_LAYER held down +extern bool tap_tog_layer_toggled_on; // will become true if no keys are pressed while TTL held down +extern uint8_t tap_tog_count; // number of presses on TAP_TOG_LAYER button. + +// Tap dance analog with momentary toggle when held, switch when tapped +void process_tap_tog(uint8_t layer, keyrecord_t *record); From 63d899d1adef561490620e3b69cc2c0d25f29c74 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Fri, 8 Nov 2019 20:09:54 -0800 Subject: [PATCH 298/316] [GitHub] Update issue templates (#7303) * Update issue templates * Create config.yml * Update bug_report.md * Update other_issues.md * Update feature_request.md * Wordsmithing and type fixes --- .github/ISSUE_TEMPLATE/blank.md | 8 +++++++- .github/ISSUE_TEMPLATE/bug_report.md | 7 ++++++- .github/ISSUE_TEMPLATE/config.yml | 8 ++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 7 ++++++- .github/ISSUE_TEMPLATE/other_issues.md | 7 ++++++- 5 files changed, 33 insertions(+), 4 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/config.yml diff --git a/.github/ISSUE_TEMPLATE/blank.md b/.github/ISSUE_TEMPLATE/blank.md index 50a32034d6e1..5644802ef534 100644 --- a/.github/ISSUE_TEMPLATE/blank.md +++ b/.github/ISSUE_TEMPLATE/blank.md @@ -1,5 +1,11 @@ --- name: Blank issue -about: If you're 100% sure that you don't need one of the other issue templates, use this one instead. +about: If you're 100% sure that you don't need one of the other issue templates, use + this one instead. +title: '' +labels: help wanted, question +assignees: '' --- + + diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 3c35416e043f..2e64ef16dd7b 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,7 +1,12 @@ --- name: Bug report -about: Create a report to help us improve the QMK Firmware +about: Create a report to help us improve QMK Firmware. +title: "[Bug] " +labels: bug, help wanted, discussion +assignees: '' + --- + diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 000000000000..0d4ca035c8e4 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,8 @@ +blank_issues_enabled: false +contact_links: + - name: QMK Discord + url: https://discord.gg/Uq7gcHh + about: Ask questions, discuss issues and features. Chill. + - name: OLKB Subreddit + url: https://www.reddit.com/r/olkb + about: All things OLKB and QMK. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 01aeb26cec30..f7eaa825b87e 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,7 +1,12 @@ --- name: Feature request -about: Suggest a new feature or changes to existing features +about: Suggest a new feature or changes to existing features. +title: "[Feature Request] " +labels: enhancement, help wanted, discussion +assignees: '' + --- + diff --git a/.github/ISSUE_TEMPLATE/other_issues.md b/.github/ISSUE_TEMPLATE/other_issues.md index 7c4891ac31d7..a0060a8ca6b6 100644 --- a/.github/ISSUE_TEMPLATE/other_issues.md +++ b/.github/ISSUE_TEMPLATE/other_issues.md @@ -1,7 +1,12 @@ --- name: Other issues -about: Anything else that doesn't fall into the above categories. +about: Anything else that doesn't fall into the above categories. +title: '' +labels: help wanted, question, discussion +assignees: '' + --- + From f3f1bb166a283d1894afbeb2a81efa2da97de5c2 Mon Sep 17 00:00:00 2001 From: codecoffeecode Date: Fri, 8 Nov 2019 20:15:16 -0800 Subject: [PATCH 299/316] [Keymap] Adding keymaps for Niu Mini and BDN9 (#7299) * niu-mini * fix * media controls were off by one * Adding some function keys * bdn9 and some other stuff * Fixed mouse functions on bdn9 -- the acceleration related macros are NOT optional * ported over foo to codecoffeecode niu_mini keymap * removing foobar * removing foobar, moving config changes to my folder only * limiting rule changes to my folder * Simplifying config.h and rules.mk * not really sure why this didn't commit the first time but... * Fixed up the Niu Mini * Update keyboards/keebio/bdn9/keymaps/codecoffeecode/config.h Adding missed #pragma once to the top of my config.h for bdn9 Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Switching from SEND_STRING() to tap_code16 * Simplifying -> didn't need macros for Ctrl+(Home|End) --- keyboards/keebio/bdn9/config.h | 2 +- .../bdn9/keymaps/codecoffeecode/config.h | 12 ++ .../bdn9/keymaps/codecoffeecode/keymap.c | 57 ++++++++++ .../bdn9/keymaps/codecoffeecode/rules.mk | 2 + keyboards/keebio/bdn9/rules.mk | 2 +- .../niu_mini/keymaps/codecoffeecode/keymap.c | 103 ++++++++++++++++++ .../niu_mini/keymaps/codecoffeecode/readme.md | 5 + 7 files changed, 181 insertions(+), 2 deletions(-) create mode 100644 keyboards/keebio/bdn9/keymaps/codecoffeecode/config.h create mode 100644 keyboards/keebio/bdn9/keymaps/codecoffeecode/keymap.c create mode 100644 keyboards/keebio/bdn9/keymaps/codecoffeecode/rules.mk create mode 100644 keyboards/niu_mini/keymaps/codecoffeecode/keymap.c create mode 100644 keyboards/niu_mini/keymaps/codecoffeecode/readme.md diff --git a/keyboards/keebio/bdn9/config.h b/keyboards/keebio/bdn9/config.h index 641dc5736194..40c8a1d77a88 100644 --- a/keyboards/keebio/bdn9/config.h +++ b/keyboards/keebio/bdn9/config.h @@ -64,4 +64,4 @@ along with this program. If not, see . /* 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 +#define LOCKING_RESYNC_ENABLE \ No newline at end of file diff --git a/keyboards/keebio/bdn9/keymaps/codecoffeecode/config.h b/keyboards/keebio/bdn9/keymaps/codecoffeecode/config.h new file mode 100644 index 000000000000..5b8b369bc385 --- /dev/null +++ b/keyboards/keebio/bdn9/keymaps/codecoffeecode/config.h @@ -0,0 +1,12 @@ +#pragma once + +/* For USB nonsense in various OSs */ +#define TAP_CODE_DELAY 10 + +/* For constant mouse speed */ +#define MOUSEKEY_DELAY 300 +#define MOUSEKEY_INTERVAL 50 +#define MOUSEKEY_MAX_SPEED 1 +#define MOUSEKEY_TIME_TO_MAX 0 +#define MOUSEKEY_WHEEL_MAX_SPEED 1 +#define MOUSEKEY_WHEEL_TIME_TO_MAX 0 diff --git a/keyboards/keebio/bdn9/keymaps/codecoffeecode/keymap.c b/keyboards/keebio/bdn9/keymaps/codecoffeecode/keymap.c new file mode 100644 index 000000000000..9747dbf22345 --- /dev/null +++ b/keyboards/keebio/bdn9/keymaps/codecoffeecode/keymap.c @@ -0,0 +1,57 @@ +/* Copyright 2019 Danny Nguyen + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + | Knob 1: Scrl Dn/Up | | Knob 2: Vol Dn/Up | + | Press: Mute | Up | Press: Play/Pause | + | Left | Down | Right | + | Media Previous | MO(1)| Media Next | + */ + [0] = LAYOUT( + KC_MUTE, KC_UP, KC_MPLY, + KC_LEFT, KC_DOWN, KC_RIGHT, + KC_MPRV, MO(1), KC_MNXT + ), + /* + | RESET | Home | Media Stop | + | | End | | + | CTRL_END | | CTRL_HOME | + */ + [1] = LAYOUT( + RESET , KC_HOME, KC_STOP, + _______, KC_END, _______, + LCTL(KC_END), _______, LCTL(KC_HOME) + ), +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + if (clockwise) { + tap_code(KC_MS_WH_UP); + } else { + tap_code(KC_MS_WH_DOWN); + } + } + else if (index == 1) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } +} diff --git a/keyboards/keebio/bdn9/keymaps/codecoffeecode/rules.mk b/keyboards/keebio/bdn9/keymaps/codecoffeecode/rules.mk new file mode 100644 index 000000000000..e910b7bea5d2 --- /dev/null +++ b/keyboards/keebio/bdn9/keymaps/codecoffeecode/rules.mk @@ -0,0 +1,2 @@ +MOUSEKEY_ENABLE = yes +CTPC = yes \ No newline at end of file diff --git a/keyboards/keebio/bdn9/rules.mk b/keyboards/keebio/bdn9/rules.mk index 8b4bb334eb2f..a548334074c2 100644 --- a/keyboards/keebio/bdn9/rules.mk +++ b/keyboards/keebio/bdn9/rules.mk @@ -31,4 +31,4 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) -ENCODER_ENABLE = yes +ENCODER_ENABLE = yes \ No newline at end of file diff --git a/keyboards/niu_mini/keymaps/codecoffeecode/keymap.c b/keyboards/niu_mini/keymaps/codecoffeecode/keymap.c new file mode 100644 index 000000000000..7c794b203786 --- /dev/null +++ b/keyboards/niu_mini/keymaps/codecoffeecode/keymap.c @@ -0,0 +1,103 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Layer 0 + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | Caps | Alt |Layer1| Space |Layer2| Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ + [0] = LAYOUT_planck_mit( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + KC_LCTL, KC_LGUI, KC_CAPS, KC_LALT, MO(1), KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + + /* Layer 1 + * ,-----------------------------------------------------------------------------------. + * | ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | Vol- | Vol+ | Mute | | | | F11 | F12 | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Reset| | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ + [1] = LAYOUT_planck_mit( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL, + _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, _______, KC_F11, KC_F12, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /* Layer 2 (r_ Indicates RGB Controls) + * ,-----------------------------------------------------------------------------------. + * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | |r_TOG |r_Mode|r_Hue+|r_Hue-| | | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |BL_TOG|BL_STEP| | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ + [2] = LAYOUT_planck_mit( + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, BL_TOGG, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + + +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 (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { + + } else { + + } + + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + + } else { + + } + + if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { + + } else { + + } + + if (IS_LED_ON(usb_led, USB_LED_COMPOSE)) { + + } else { + + } + + if (IS_LED_ON(usb_led, USB_LED_KANA)) { + + } else { + + } + +} diff --git a/keyboards/niu_mini/keymaps/codecoffeecode/readme.md b/keyboards/niu_mini/keymaps/codecoffeecode/readme.md new file mode 100644 index 000000000000..661e24c9fa8e --- /dev/null +++ b/keyboards/niu_mini/keymaps/codecoffeecode/readme.md @@ -0,0 +1,5 @@ +## CodeCoffeeCode's 40% Keymap + +- Added Delete to Layer 1 +- Swapped Tab and Esc like on the Planck EZ +- Put all the Arrows on the bottom row, moving the Forward Slash to beside Enter \ No newline at end of file From 78205e64a7053746b1491c0d39dbb300a55f3248 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Sat, 9 Nov 2019 15:17:36 +1100 Subject: [PATCH 300/316] [Keyboard] Fix readme make examples for some Kingly Keys boards (#7308) --- keyboards/kingly_keys/romac/readme.md | 2 +- keyboards/kingly_keys/romac_plus/readme.md | 2 +- keyboards/kingly_keys/ropro/readme.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/keyboards/kingly_keys/romac/readme.md b/keyboards/kingly_keys/romac/readme.md index 98ed21502af7..bc01d14f2256 100644 --- a/keyboards/kingly_keys/romac/readme.md +++ b/keyboards/kingly_keys/romac/readme.md @@ -11,6 +11,6 @@ A “Plaid” Inspired 12-Key (3x4) Macropad. Make example for this keyboard (after setting up your build environment): - make romac:default + make kingly_keys/romac:default See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/kingly_keys/romac_plus/readme.md b/keyboards/kingly_keys/romac_plus/readme.md index 4411701ca928..aede33b142b0 100644 --- a/keyboards/kingly_keys/romac_plus/readme.md +++ b/keyboards/kingly_keys/romac_plus/readme.md @@ -11,6 +11,6 @@ An Upgraded “Plaid” Inspired 12-Key (3x4) Macropad With Fancy Features. Make example for this keyboard (after setting up your build environment): - make romac_plus:default + make kingly_keys/romac_plus:default See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/kingly_keys/ropro/readme.md b/keyboards/kingly_keys/ropro/readme.md index 0a90c87f8a5f..21b05679eb05 100644 --- a/keyboards/kingly_keys/ropro/readme.md +++ b/keyboards/kingly_keys/ropro/readme.md @@ -11,6 +11,6 @@ Hardware Availability: [Kingly-Keys.xyz](https://kingly-keys.xyz/) - (Through GB Make example for this keyboard (after setting up your build environment): - make ropro:default + make kingly_keys/ropro:default See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs) From 60e4921378d879eed110f801328e9642f35fa1e9 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Sat, 9 Nov 2019 07:51:39 -0800 Subject: [PATCH 301/316] Unify RGB and RGBW commands (#7297) * Fix unicode in comments Co-Authored-By: fauxpark * Remove separate RGBW implementation for a unified function * Set White to 0 in RGBW LEDs This is just to get this working, later, proper brightness can be handled elsewhere. * Use us instead of nanoseconds(?) since it renders correctly on web * Remove RGBW function from arm/ws2812.h * Remove RGBW function from arm/ws2812.c * Formatting changes * Add doc info --- docs/config_options.md | 4 ++-- drivers/arm/ws2812.c | 11 +++-------- drivers/arm/ws2812.h | 3 +-- drivers/avr/ws2812.c | 22 +++++++--------------- drivers/avr/ws2812.h | 3 +-- drivers/avr/ws2812_i2c.c | 12 ++++-------- quantum/rgb_matrix_drivers.c | 3 +++ quantum/rgblight.c | 28 ++++++++++++++++++++++++---- 8 files changed, 45 insertions(+), 41 deletions(-) diff --git a/docs/config_options.md b/docs/config_options.md index c44a47178cee..0cf3fb78a696 100644 --- a/docs/config_options.md +++ b/docs/config_options.md @@ -196,8 +196,8 @@ If you define these options you will enable the associated feature, which may in * units to step when in/decreasing saturation * `#define RGBLIGHT_VAL_STEP 12` * units to step when in/decreasing value (brightness) -* `#define RGBW_BB_TWI` - * bit-bangs TWI to EZ RGBW LEDs (only required for Ergodox EZ) +* `#define RGBW` + * Enables RGBW LED support ## Mouse Key Options diff --git a/drivers/arm/ws2812.c b/drivers/arm/ws2812.c index b076eff33002..fa702fca98b1 100644 --- a/drivers/arm/ws2812.c +++ b/drivers/arm/ws2812.c @@ -84,17 +84,12 @@ void ws2812_setleds(LED_TYPE *ledarray, uint16_t leds) { sendByte(ledarray[i].g); sendByte(ledarray[i].r); sendByte(ledarray[i].b); +#ifdef RGBW + sendByte(ledarray[i].w); +#endif } wait_ns(RES); chSysUnlock(); } - -// Setleds for SK6812RGBW -void ws2812_setleds_rgbw(LED_TYPE *ledarray, uint16_t leds) { -// not supported - for now error out if its enabled -#ifdef RGBW -# error "RGBW not supported" -#endif -} diff --git a/drivers/arm/ws2812.h b/drivers/arm/ws2812.h index bf5c9fd0f187..41c22a00b886 100644 --- a/drivers/arm/ws2812.h +++ b/drivers/arm/ws2812.h @@ -11,7 +11,6 @@ * The functions will perform the following actions: * - Set the data-out pin as output * - Send out the LED data - * - Wait 50�s to reset the LEDs + * - Wait 50us to reset the LEDs */ void ws2812_setleds(LED_TYPE *ledarray, uint16_t number_of_leds); -void ws2812_setleds_rgbw(LED_TYPE *ledarray, uint16_t number_of_leds); diff --git a/drivers/avr/ws2812.c b/drivers/avr/ws2812.c index 5c733c4ab0db..dc7e8d48a824 100644 --- a/drivers/avr/ws2812.c +++ b/drivers/avr/ws2812.c @@ -36,7 +36,6 @@ void ws2812_sendarray(uint8_t *array, uint16_t length); void ws2812_sendarray_mask(uint8_t *array, uint16_t length, uint8_t pinmask); - #ifdef RGBW_BB_TWI // Port for the I2C @@ -146,16 +145,6 @@ void inline ws2812_setleds(LED_TYPE *ledarray, uint16_t leds) { } void inline ws2812_setleds_pin(LED_TYPE *ledarray, uint16_t leds, uint8_t pinmask) { - // ws2812_DDRREG |= pinmask; // Enable DDR - // new universal format (DDR) - _SFR_IO8((RGB_DI_PIN >> 4) + 1) |= pinmask; - - ws2812_sendarray_mask((uint8_t *)ledarray, leds + leds + leds, pinmask); - _delay_us(50); -} - -// Setleds for SK6812RGBW -void inline ws2812_setleds_rgbw(LED_TYPE *ledarray, uint16_t leds) { #ifdef RGBW_BB_TWI uint8_t sreg_prev, twcr_prev; sreg_prev = SREG; @@ -176,15 +165,18 @@ void inline ws2812_setleds_rgbw(LED_TYPE *ledarray, uint16_t leds) { SREG = sreg_prev; TWCR = twcr_prev; #endif - - // ws2812_DDRREG |= _BV(ws2812_pin); // Enable DDR + // ws2812_DDRREG |= pinmask; // Enable DDR // new universal format (DDR) - _SFR_IO8((RGB_DI_PIN >> 4) + 1) |= _BV(RGB_DI_PIN & 0xF); + _SFR_IO8((RGB_DI_PIN >> 4) + 1) |= pinmask; - ws2812_sendarray_mask((uint8_t *)ledarray, leds << 2, _BV(RGB_DI_PIN & 0xF)); + ws2812_sendarray_mask((uint8_t *)ledarray, leds * sizeof(LED_TYPE), pinmask); #ifndef RGBW_BB_TWI +# ifdef RGBW _delay_us(80); +# else + _delay_us(50); +# endif #endif } diff --git a/drivers/avr/ws2812.h b/drivers/avr/ws2812.h index 9652b94bbea3..b869fb28c808 100644 --- a/drivers/avr/ws2812.h +++ b/drivers/avr/ws2812.h @@ -34,8 +34,7 @@ * The functions will perform the following actions: * - Set the data-out pin as output * - Send out the LED data - * - Wait 50�s to reset the LEDs + * - Wait 50us to reset the LEDs */ void ws2812_setleds(LED_TYPE *ledarray, uint16_t number_of_leds); void ws2812_setleds_pin(LED_TYPE *ledarray, uint16_t number_of_leds, uint8_t pinmask); -void ws2812_setleds_rgbw(LED_TYPE *ledarray, uint16_t number_of_leds); diff --git a/drivers/avr/ws2812_i2c.c b/drivers/avr/ws2812_i2c.c index 8525a026c7f8..1c332e24b602 100644 --- a/drivers/avr/ws2812_i2c.c +++ b/drivers/avr/ws2812_i2c.c @@ -1,6 +1,10 @@ #include "ws2812.h" #include "i2c_master.h" +#ifdef RGBW +# error "RGBW not supported" +#endif + #ifndef WS2812_ADDRESS # define WS2812_ADDRESS 0xb0 #endif @@ -21,11 +25,3 @@ void ws2812_setleds(LED_TYPE *ledarray, uint16_t leds) { i2c_transmit(WS2812_ADDRESS, (uint8_t *)ledarray, sizeof(LED_TYPE) * leds, WS2812_TIMEOUT); } - -// Setleds for SK6812RGBW -void ws2812_setleds_rgbw(LED_TYPE *ledarray, uint16_t leds) { -// not supported - for now error out if its enabled -#ifdef RGBW -# error "RGBW not supported" -#endif -} diff --git a/quantum/rgb_matrix_drivers.c b/quantum/rgb_matrix_drivers.c index 503f97014f8e..9729a3064e33 100644 --- a/quantum/rgb_matrix_drivers.c +++ b/quantum/rgb_matrix_drivers.c @@ -112,6 +112,9 @@ static inline void setled(int i, uint8_t r, uint8_t g, uint8_t b) { led[i].r = r; led[i].g = g; led[i].b = b; +# ifdef RGBW + led[i].w = 0; +# endif } static void setled_all(uint8_t r, uint8_t g, uint8_t b) { diff --git a/quantum/rgblight.c b/quantum/rgblight.c index 1c197827f293..a4cbe513e17b 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c @@ -126,6 +126,9 @@ void setrgb(uint8_t r, uint8_t g, uint8_t b, LED_TYPE *led1) { (*led1).r = r; (*led1).g = g; (*led1).b = b; +#ifdef RGBW + (*led1).w = 0; +#endif } void rgblight_check_config(void) { @@ -514,6 +517,9 @@ void rgblight_setrgb(uint8_t r, uint8_t g, uint8_t b) { led[i].r = r; led[i].g = g; led[i].b = b; +#ifdef RGBW + led[i].w = 0; +#endif } rgblight_set(); } @@ -526,6 +532,9 @@ void rgblight_setrgb_at(uint8_t r, uint8_t g, uint8_t b, uint8_t index) { led[index].r = r; led[index].g = g; led[index].b = b; +#ifdef RGBW + led[index].w = 0; +#endif rgblight_set(); } @@ -560,6 +569,9 @@ void rgblight_setrgb_range(uint8_t r, uint8_t g, uint8_t b, uint8_t start, uint8 led[i].r = r; led[i].g = g; led[i].b = b; +#ifdef RGBW + led[i].w = 0; +#endif } rgblight_set(); wait_ms(1); @@ -595,6 +607,9 @@ void rgblight_set(void) { led[i].r = 0; led[i].g = 0; led[i].b = 0; +# ifdef RGBW + led[i].w = 0; +# endif } } # ifdef RGBLIGHT_LED_MAP @@ -606,11 +621,7 @@ void rgblight_set(void) { # else start_led = led + clipping_start_pos; # endif -# ifdef RGBW - ws2812_setleds_rgbw(start_led, num_leds); -# else ws2812_setleds(start_led, num_leds); -# endif } #endif @@ -908,6 +919,9 @@ void rgblight_effect_snake(animation_status_t *anim) { ledp->r = 0; ledp->g = 0; ledp->b = 0; +# ifdef RGBW + ledp->w = 0; +# endif for (j = 0; j < RGBLIGHT_EFFECT_SNAKE_LENGTH; j++) { k = pos + j * increment; if (k > RGBLED_NUM) { @@ -965,6 +979,9 @@ void rgblight_effect_knight(animation_status_t *anim) { led[i].r = 0; led[i].g = 0; led[i].b = 0; +# ifdef RGBW + led[i].w = 0; +# endif } // Determine which LEDs should be lit up for (i = 0; i < RGBLIGHT_EFFECT_KNIGHT_LED_NUM; i++) { @@ -976,6 +993,9 @@ void rgblight_effect_knight(animation_status_t *anim) { led[cur].r = 0; led[cur].g = 0; led[cur].b = 0; +# ifdef RGBW + led[cur].w = 0; +# endif } } rgblight_set(); From 1d4287cb9535a8ba7ab5d2aa0846167f34fc5b67 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sun, 10 Nov 2019 17:02:46 +0000 Subject: [PATCH 302/316] Fix chibios when mouse and nkro disabled (#7312) --- tmk_core/protocol/chibios/usb_main.c | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/tmk_core/protocol/chibios/usb_main.c b/tmk_core/protocol/chibios/usb_main.c index c8a6bbb43f0d..f7bfa20b2e33 100644 --- a/tmk_core/protocol/chibios/usb_main.c +++ b/tmk_core/protocol/chibios/usb_main.c @@ -379,7 +379,6 @@ static void set_led_transfer_cb(USBDriver *usbp) { /* Callback for SETUP request on the endpoint 0 (control) */ static bool usb_request_hook_cb(USBDriver *usbp) { const USBDescriptor *dp; - int has_report_id; /* usbp->setup fields: * 0: bmRequestType (bitmask) @@ -432,26 +431,17 @@ static bool usb_request_hook_cb(USBDriver *usbp) { switch (usbp->setup[1]) { /* bRequest */ case HID_SET_REPORT: switch (usbp->setup[4]) { /* LSB(wIndex) (check MSB==0 and wLength==1?) */ - case KEYBOARD_INTERFACE: #if defined(SHARED_EP_ENABLE) && !defined(KEYBOARD_SHARED_EP) case SHARED_INTERFACE: + usbSetupTransfer(usbp, set_report_buf, sizeof(set_report_buf), set_led_transfer_cb); + return TRUE; + break; #endif + + case KEYBOARD_INTERFACE: /* keyboard_led_stats = * keyboard_led_stats needs be word (or dword), otherwise we get an exception on F0 */ - has_report_id = 0; -#if defined(SHARED_EP_ENABLE) - if (usbp->setup[4] == SHARED_INTERFACE) { - has_report_id = 1; - } -#endif - if (usbp->setup[4] == KEYBOARD_INTERFACE && !keyboard_protocol) { - has_report_id = 0; - } - if (has_report_id) { - usbSetupTransfer(usbp, set_report_buf, sizeof(set_report_buf), set_led_transfer_cb); - } else { - usbSetupTransfer(usbp, (uint8_t *)&keyboard_led_stats, 1, NULL); - } + usbSetupTransfer(usbp, (uint8_t *)&keyboard_led_stats, 1, NULL); return TRUE; break; } From e87434aa32de977f6e6672abff80386a10d65fb6 Mon Sep 17 00:00:00 2001 From: "T.Shinohara" Date: Mon, 11 Nov 2019 02:15:38 +0900 Subject: [PATCH 303/316] [Keymap] Shino3/shiro Add Mac Keymaps (#7319) * add keyboard new macro pad "Kuro" * change main readme.md * remove not used code from default/keymap.c * Remove unnecessary code * Supports info.json * removed back slash and not used functions. * update at product link. add japanese messages. * Merge All * [Shiro]Add MacKeymap --- keyboards/shiro/keymaps/default_mac/config.h | 19 +++++++ keyboards/shiro/keymaps/default_mac/keymap.c | 50 +++++++++++++++++++ keyboards/shiro/keymaps/default_mac/readme.md | 1 + 3 files changed, 70 insertions(+) create mode 100644 keyboards/shiro/keymaps/default_mac/config.h create mode 100644 keyboards/shiro/keymaps/default_mac/keymap.c create mode 100644 keyboards/shiro/keymaps/default_mac/readme.md diff --git a/keyboards/shiro/keymaps/default_mac/config.h b/keyboards/shiro/keymaps/default_mac/config.h new file mode 100644 index 000000000000..369388adad83 --- /dev/null +++ b/keyboards/shiro/keymaps/default_mac/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 T.Shinohara + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/shiro/keymaps/default_mac/keymap.c b/keyboards/shiro/keymaps/default_mac/keymap.c new file mode 100644 index 000000000000..58ee063704a7 --- /dev/null +++ b/keyboards/shiro/keymaps/default_mac/keymap.c @@ -0,0 +1,50 @@ +/* Copyright 2019 T.Shinohara + * + * 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 . + */ +#include QMK_KEYBOARD_H + +enum layer_number { + _NUMBER = 0, + _CURSOL, + _MOUSE +}; + +#define NUMBER TO(_NUMBER) +#define CURSOL TO(_CURSOL) +#define MOUSE TO(_MOUSE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_NUMBER] = LAYOUT( + NUMBER, CURSOL, MOUSE, + KC_P7, KC_P8, KC_P9, + KC_P4, KC_P5, KC_P6, + KC_P1, KC_P2, KC_P3, + KC_P0, KC_BSPC, KC_ENT + ), + [_CURSOL] = LAYOUT( + NUMBER, CURSOL, MOUSE, + KC_HOME, KC_UP, KC_PGUP, + KC_LEFT, KC_ESC, KC_RIGHT, + KC_END, KC_DOWN, KC_PGDN, + KC_DEL, KC_BSPC, KC_ENT + ), + [_MOUSE] = LAYOUT( + NUMBER, CURSOL, MOUSE, + LGUI(KC_X), LGUI(KC_C), LGUI(KC_V), + LGUI(KC_Z), LGUI(KC_F), KC_AGIN, + XXXXXXX, XXXXXXX, XXXXXXX, + KC_DEL, KC_BSPC, KC_ENT + ), +}; diff --git a/keyboards/shiro/keymaps/default_mac/readme.md b/keyboards/shiro/keymaps/default_mac/readme.md new file mode 100644 index 000000000000..715ddd3358c1 --- /dev/null +++ b/keyboards/shiro/keymaps/default_mac/readme.md @@ -0,0 +1 @@ +# The default keymap for Shiro \ No newline at end of file From 54d8251f6f82886c0a83d76d2ecb8bee930611c4 Mon Sep 17 00:00:00 2001 From: tarnjotsingh <26198161+tarnjotsingh@users.noreply.github.com> Date: Sun, 10 Nov 2019 21:45:03 +0000 Subject: [PATCH 304/316] [Keymap] UK ISO keymap for DZ60 (#7322) * New custom ISO keymap for DZ60 * New custom ISO keymap for DZ60 * Adding relative path for keymap image * Removed reference to PNG and updated the README accordingly. * Improving on the README some more after reading up on the guidelines for keymaps --- keyboards/dz60/keymaps/tarnjotsingh/keymap.c | 7 ++++++ .../dz60/keymaps/tarnjotsingh/layers.json | 1 + keyboards/dz60/keymaps/tarnjotsingh/readme.md | 24 +++++++++++++++++++ 3 files changed, 32 insertions(+) create mode 100644 keyboards/dz60/keymaps/tarnjotsingh/keymap.c create mode 100644 keyboards/dz60/keymaps/tarnjotsingh/layers.json create mode 100644 keyboards/dz60/keymaps/tarnjotsingh/readme.md diff --git a/keyboards/dz60/keymaps/tarnjotsingh/keymap.c b/keyboards/dz60/keymaps/tarnjotsingh/keymap.c new file mode 100644 index 000000000000..a6de97fdbabb --- /dev/null +++ b/keyboards/dz60/keymaps/tarnjotsingh/keymap.c @@ -0,0 +1,7 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_60_iso(KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_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_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_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_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RGUI, KC_LALT, KC_RCTL), + [1] = LAYOUT_60_iso(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_DEL, KC_TRNS, KC_MUTE, KC_VOLU, KC_MPLY, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, KC_VOLD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_INS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MRWD, KC_MFFD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_HOME, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_TRNS), + [2] = LAYOUT_60_iso(KC_TRNS, KC_TRNS, KC_TRNS, 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_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BL_DEC, BL_TOGG, BL_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) +}; diff --git a/keyboards/dz60/keymaps/tarnjotsingh/layers.json b/keyboards/dz60/keymaps/tarnjotsingh/layers.json new file mode 100644 index 000000000000..7fec50a1d033 --- /dev/null +++ b/keyboards/dz60/keymaps/tarnjotsingh/layers.json @@ -0,0 +1 @@ +[["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_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_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_LCTL", "KC_LGUI", "KC_LALT", "KC_SPC", "MO(1)", "KC_RGUI", "KC_LALT", "KC_RCTL"], ["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_DEL", "KC_TRNS", "KC_MUTE", "KC_VOLU", "KC_MPLY", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_UP", "KC_PSCR", "KC_SLCK", "KC_PAUS", "KC_TRNS", "KC_TRNS", "KC_VOLD", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_PGUP", "KC_LEFT", "KC_DOWN", "KC_RGHT", "KC_TRNS", "KC_INS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_MRWD", "KC_MFFD", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_PGDN", "KC_HOME", "KC_END", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "MO(2)", "KC_TRNS"], ["KC_TRNS", "KC_TRNS", "KC_TRNS", "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_MOD", "RGB_HUI", "RGB_HUD", "RGB_SAI", "RGB_SAD", "RGB_VAI", "RGB_VAD", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "BL_DEC", "BL_TOGG", "BL_INC", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS"]] \ No newline at end of file diff --git a/keyboards/dz60/keymaps/tarnjotsingh/readme.md b/keyboards/dz60/keymaps/tarnjotsingh/readme.md new file mode 100644 index 000000000000..c54426966316 --- /dev/null +++ b/keyboards/dz60/keymaps/tarnjotsingh/readme.md @@ -0,0 +1,24 @@ +# DZ60 ISO Keymap + +Custom keymap for UK ISO keyboard layouts. +This includes 3 different layers. + +- Layer 0: + - Standard ISO layout with main modifier key, for accessing layer 1, to the right of the space bar. +- Layer 1: + - Layer that gives you access to pretty much everything else like the arrow keys. +- Layer 2; + - Standalone layer only for modifying the lighting on the board. Keys for this purpose are mapped in the locations used by the default dz60 layout. + - You can access this layer by holding MO(1) (next to the space bar) followed by holding MO(2) which where the Left Alt key is positioned. + +![dz60-iso-keymap](https://i.imgur.com/UV0t6aL.png) + +Make the kaymap for this keyboard (after setting up your build environment): + + make dz60:tarnjotsingh + +Then flash it by running: + + make dz60:tarnjotsingh:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). From b2b947f815dd4930b12851faf1b42ceb12aab6ee Mon Sep 17 00:00:00 2001 From: Xyverz Date: Mon, 11 Nov 2019 00:02:01 -0800 Subject: [PATCH 305/316] [Keymap] Sol rework (#7317) * Added WOW layer * Initial commit for this branch. Still a work in progress. * Added Rorschach keyboard layout. * Simplified keymap Removed the media layer to help simplify things. Also corrected some keymap mistakes in the Qwerty and Colemak layers. * Added ErgoTravel keymap. * reverted to previous layout. * Added Sol keyboard layout. * Minor changes to keymap. * more changes * Added sol graphic by Kagerufu and Cardiactuna * Added colemak layer because I can. * more changes to sol layout * Streamlined Sol layout * minor tweaks to sol layout * further revisions to sol keymap. * Removing deprecated #include statements from my keymaps * Standardizing keymap `include` lines. * Minor change to keymap. Swapped ESC with GRV on all alpha layers. * Tweaks to Atreus62 Keymap Added a layer for FPS RPG Loot Shooters. * Fixed readme.md for Atreus keymap. Replaced "Keymap" with "Layer" in illustrations for continuity's sake * More readme.md clean-up More clarification in the Atreus readme file. * Next verse, same as the first. * Changes to Sol layout Bringing my Sol layout more in line with my other Orthos. * Fixed keymap GUI. Replaced left-hand "RGUI" with "LGUI" on all layers as it should be. * Added ALPS64 keymap * Formatting corrections * fixes to config.h and keymap.c * Fixed errors This commit fixes a pathing issue in keyboards/orthodox/keymaps/xyverz/config.h and removes an stupid comma at the end of each LAYOUT stanza in keyboards/rgbkb/sol/keymaps/xyverz/keymap.c left there by me. * Fixed orthodox keymap config.h file I hope this one fixes the problem. *sigh* * Making suggested changes for PR#6192 Thanks to noroadsleft, fauxpark, and drashna. Still have more work to do, but at least these suggestions have been applied. * Fixing build errors Travis has shown me the error of my ways... * More fixes and corrections Those pesky semicolons... * More Fixes. * Removing unneeded code snippet. * fixed omitted semicolons * Code updates to my keymaps Updating the code for my Iris, Atreus62, and Atreus keymaps. * Fixed Atreus62 Keymap I forgot to add in the aliases for LOWER, RAISE, and ADJUST. * Added userspace Also made changes to Atreus62 Keymap to turn the red LEDs off on the ProMicro * Fixing code that disables LEDs on ProMicros Also tidied up my ErgoTravel keymap. * Moving userspace to new branch Moving my userspace to a new branch for the sake of keeping things clean on the master branch. * Added F13-F15 to Atreus62 Layout. * Update readme.md. * Updated Phantom keymap to current keymap standards * Phantom keymap updates Further updates - tidying and removing cruft. Thank you zvecr on Discord for the help! * Standards Updates Bringing my Kinesis keymap up to current code standards * Adding a readme * Bring GH60 code to standard * Utilizing layouts for 60_ansi and tkl_ansi Moving my GH60 and Phantom keymaps into layouts/community/ * Alps64 layout removal Removing my Alps64 keymap now that I've setup my 60_ansi layout. * Moved Clueboard layout to community/66_ansi. * Additions to 66_ansi config.h * Bringing keymaps up to standard. * More updates to keymaps. * Syntax updates * Revert "Syntax updates" This reverts commit a892b2d9fcc0d4ba8fc22d676d5414120cc2c183. * Moved WIP keymaps Moved my WIP keymaps to my wip_keymaps branch to keep my master clean * Updates requested by noroadsleft * more changes per noroadsleft More fixes as requested by noroadsleft. Further tidy-up and standardization of my keymap code. * Reworked Sol Keymap Reworking the Sol keymap to bring it more or less up to current standards and to accurately depict the correct layer on the OLED display. * Final tweaks to sol keymap ... for now. --- keyboards/rgbkb/sol/keymaps/xyverz/keymap.c | 411 +++++++++++--------- keyboards/rgbkb/sol/keymaps/xyverz/rules.mk | 5 +- 2 files changed, 225 insertions(+), 191 deletions(-) diff --git a/keyboards/rgbkb/sol/keymaps/xyverz/keymap.c b/keyboards/rgbkb/sol/keymaps/xyverz/keymap.c index f5cf9ed3c81a..e38663dbb351 100644 --- a/keyboards/rgbkb/sol/keymaps/xyverz/keymap.c +++ b/keyboards/rgbkb/sol/keymaps/xyverz/keymap.c @@ -1,13 +1,9 @@ #include QMK_KEYBOARD_H + #ifdef PROTOCOL_LUFA #include "lufa.h" #include "split_util.h" #endif -#ifdef SSD1306OLED - #include "common/ssd1306.h" -#endif - -extern keymap_config_t keymap_config; #ifdef RGBLIGHT_ENABLE //Following line allows macro to read current RGB settings @@ -16,10 +12,6 @@ extern rgblight_config_t rgblight_config; extern uint8_t is_master; -// 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. enum layer_number { _DVORAK = 0, _DESTINY, @@ -38,13 +30,14 @@ enum custom_keycodes { LOWER, RAISE, ADJUST, - BACKLIT, - RGBRST + RGBRST, + RGB_MENU }; -enum macro_keycodes { - KC_SAMPLEMACRO, -}; +// Aliases to make the keymap clearer. +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define ADJUST MO(_ADJUST) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_DVORAK] = LAYOUT( \ @@ -53,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_RCTL, KC_A, KC_O, KC_E, KC_U, KC_I, XXXXXXX, XXXXXXX, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \ KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, XXXXXXX, XXXXXXX, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, \ KC_GRV, KC_LGUI, KC_LEFT, KC_RGHT, LOWER, KC_LCTL, KC_LALT, KC_RALT, KC_RCTL, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_RCTL, \ - KC_BSPC, KC_RGUI, KC_ENT, KC_SPC \ + KC_BSPC, KC_LGUI, KC_ENT, KC_SPC \ ), @@ -63,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_RCTL, KC_A, KC_O, KC_E, KC_U, KC_I, XXXXXXX, XXXXXXX, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \ KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, XXXXXXX, XXXXXXX, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, \ KC_GRV, KC_LGUI, KC_LEFT, KC_RGHT, LOWER, KC_LCTL, KC_LALT, KC_RALT, KC_RCTL, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_RCTL, \ - KC_BSPC, KC_RGUI, KC_ENT, KC_SPC \ + KC_BSPC, KC_DEL, KC_ENT, KC_SPC \ ), @@ -73,7 +66,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_RCTL, KC_A, KC_S, KC_D, KC_F, KC_G, XXXXXXX, XXXXXXX, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, XXXXXXX, XXXXXXX, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ KC_GRV, KC_LGUI, KC_LEFT, KC_RGHT, LOWER, KC_LCTL, KC_LALT, KC_RALT, KC_RCTL, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_RCTL, \ - KC_BSPC, KC_RGUI, KC_ENT, KC_SPC \ + KC_BSPC, KC_LGUI, KC_ENT, KC_SPC \ ), [_COLEMAK] = LAYOUT( \ @@ -82,7 +75,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_RCTL, KC_A, KC_R, KC_S, KC_T, KC_G, XXXXXXX, XXXXXXX, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_D, KC_V, XXXXXXX, XXXXXXX, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ KC_GRV, KC_LGUI, KC_LEFT, KC_RGHT, LOWER, KC_LCTL, KC_LALT, KC_RALT, KC_RCTL, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_RCTL, \ - KC_BSPC, KC_RGUI, KC_ENT, KC_SPC \ + KC_BSPC, KC_LGUI, KC_ENT, KC_SPC \ ), [_LOWER] = LAYOUT( \ @@ -103,228 +96,266 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_DEL, _______, _______, KC_INS \ ), - /* ADJUST - * ,------------------------------------------------. ,------------------------------------------------. - * | F11 | F1 | F2 | F3 | F4 | F5 | RESET| | | F6 | F7 | F8 | F9 | F10 | F12 | - * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| - * | | |QWERTY|COLEMK|DVORAK|DESTNY| | | | | PrSc | ScLk | NmLk | | | - * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| - * | | | Mute | Vol- | Vol+ | | | | |RGBTOG|RGBMOD| HUI | SAI | VAI | | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | | | Prev | Play | Next | | | | | |RGBRMD| HUD | SAD | VAD | | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | | | | Home | End | | | | | | PgUp | PgDn | | | | - * `------+------+------+------+------+------+------| |------+------+------+------+------+------+------' - * | Del | | | | Ins | - * `-------------' `-------------' - */ - [_ADJUST] = LAYOUT( \ _______, _______, _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_NLCK, _______, _______, \ KC_CAPS, _______, QWERTY, COLEMAK, DVORAK, DESTINY, XXXXXXX, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, \ - _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, _______, RGB_RMOD,RGB_HUD, RGB_SAD, RGB_VAD, _______, \ + _______, _______, _______, RGB_SPI, RGB_SPD, _______, XXXXXXX, XXXXXXX, _______, RGB_RMOD,RGB_HUD, RGB_SAD, RGB_VAD, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ KC_DEL, _______, _______, KC_INS \ ) }; - - -// define variables for reactive RGB -bool TOG_STATUS = false; -int RGB_current_mode; - -// Setting ADJ layer RGB back to default -void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { - if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) { - #ifdef RGBLIGHT_ENABLE - //rgblight_mode(RGB_current_mode); - #endif - layer_on(layer3); - } else { - layer_off(layer3); - } -} - layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); -} +}; + bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { + if (record->event.pressed) { + switch (keycode) { case DVORAK: - if (record->event.pressed) { set_single_persistent_default_layer(_DVORAK); - } + return false; + case DESTINY: + set_single_persistent_default_layer(_DESTINY); + return false; + case QWERTY: + set_single_persistent_default_layer(_QWERTY); return false; case COLEMAK: - if (record->event.pressed) { set_single_persistent_default_layer(_COLEMAK); - } return false; - case QWERTY: + case RGBRST: +#if defined(RGBLIGHT_ENABLE) + eeconfig_update_rgblight_default(); + rgblight_enable(); +#elif defined(RGB_MATRIX_ENABLE) + eeconfig_update_rgb_matrix_default(); +#endif + return false; +#if defined(RGB_MATRIX_ENABLE) && defined(KEYBOARD_rgbkb_sol_rev2) + case RGB_TOG: if (record->event.pressed) { - set_single_persistent_default_layer(_QWERTY); + rgb_matrix_increase_flags(); } return false; - -/* - Commenting this out since I removed the layer, but I want this in here for reference. - - case FN: +#endif + case RGB_MENU: +#ifdef RGB_OLED_MENU if (record->event.pressed) { - //not sure how to have keyboard check mode and set it to a variable, so my work around - //uses another variable that would be set to true after the first time a reactive key is pressed. - if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false + if (get_mods() & MOD_MASK_SHIFT) { + rgb_encoder_state = (rgb_encoder_state - 1); + if (rgb_encoder_state > 5) { + rgb_encoder_state = 5; + } } else { - TOG_STATUS = !TOG_STATUS; - #ifdef RGBLIGHT_ENABLE - //rgblight_mode(15); - #endif + rgb_encoder_state = (rgb_encoder_state + 1) % 6; } - layer_on(_FN); - } else { - #ifdef RGBLIGHT_ENABLE - //rgblight_mode(RGB_current_mode); // revert RGB to initial mode prior to RGB mode change - #endif - layer_off(_FN); - TOG_STATUS = false; } +#endif return false; - break; - */ - case ADJUST: - if (record->event.pressed) { - layer_on(_ADJUST); - } else { - layer_off(_ADJUST); - } - return false; - break; - //led operations - RGB mode change now updates the RGB_current_mode to allow the right RGB mode to be set after reactive keys are released - case RGBRST: - #ifdef RGBLIGHT_ENABLE - if (record->event.pressed) { - eeconfig_update_rgblight_default(); - rgblight_enable(); - RGB_current_mode = rgblight_config.mode; - } - #endif - break; + } } return true; +}; + +// For RGBRST Keycode +#if defined(RGB_MATRIX_ENABLE) +void rgb_matrix_increase_flags(void) +{ + switch (rgb_matrix_get_flags()) { + case LED_FLAG_ALL: { + rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER); + rgb_matrix_set_color_all(0, 0, 0); + } + break; + case LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER: { + rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); + rgb_matrix_set_color_all(0, 0, 0); + } + break; + case LED_FLAG_UNDERGLOW: { + rgb_matrix_set_flags(LED_FLAG_NONE); + rgb_matrix_disable_noeeprom(); + } + break; + default: { + rgb_matrix_set_flags(LED_FLAG_ALL); + rgb_matrix_enable_noeeprom(); + } + break; + } } -void matrix_init_user(void) { - #ifdef RGBLIGHT_ENABLE - RGB_current_mode = rgblight_config.mode; - #endif - //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h - #ifdef SSD1306OLED - iota_gfx_init(!has_usb()); // turns on the display - #endif +void rgb_matrix_decrease_flags(void) +{ + switch (rgb_matrix_get_flags()) { + case LED_FLAG_ALL: { + rgb_matrix_set_flags(LED_FLAG_NONE); + rgb_matrix_disable_noeeprom(); + } + break; + case LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER: { + rgb_matrix_set_flags(LED_FLAG_ALL); + rgb_matrix_set_color_all(0, 0, 0); + } + break; + case LED_FLAG_UNDERGLOW: { + rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER); + rgb_matrix_set_color_all(0, 0, 0); + } + break; + default: { + rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); + rgb_matrix_enable_noeeprom(); + } + break; + } } +#endif +#ifdef RGB_OLED_MENU +uint8_t rgb_encoder_state = 4; -//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h -#ifdef SSD1306OLED +typedef void (*rgb_matrix_f)(void); -// hook point for 'led_test' keymap -// 'default' keymap's led_test_init() is empty function, do nothing -// 'led_test' keymap's led_test_init() force rgblight_mode_noeeprom(35); -__attribute__ ((weak)) -void led_test_init(void) {} +const rgb_matrix_f rgb_matrix_functions[6][2] = { + { rgb_matrix_increase_hue, rgb_matrix_decrease_hue }, + { rgb_matrix_increase_sat, rgb_matrix_decrease_sat }, + { rgb_matrix_increase_val, rgb_matrix_decrease_val }, + { rgb_matrix_increase_speed, rgb_matrix_decrease_speed }, + { rgb_matrix_step, rgb_matrix_step_reverse }, + { rgb_matrix_increase_flags, rgb_matrix_decrease_flags } +}; +#endif -void matrix_scan_user(void) { - led_test_init(); - iota_gfx_task(); // this is what updates the display continuously -} +#ifdef ENCODER_ENABLE + +static pin_t encoders_pad_a[] = ENCODERS_PAD_A; +#define NUMBER_OF_ENCODERS (sizeof(encoders_pad_a)/sizeof(pin_t)) + +const uint16_t PROGMEM encoders[][NUMBER_OF_ENCODERS * 2][2] = { + [_QWERTY] = ENCODER_LAYOUT( \ + KC_VOLU, KC_VOLD, + KC_VOLU, KC_VOLD + ), + [_COLEMAK] = ENCODER_LAYOUT( \ + _______, _______, + _______, _______ + ), + [_FN] = ENCODER_LAYOUT( \ + _______, _______, + _______, _______ + ), + [_ADJ] = ENCODER_LAYOUT( \ + _______, _______, + _______, _______ + ) +}; -void matrix_update(struct CharacterMatrix *dest, - const struct CharacterMatrix *source) { - if (memcmp(dest->display, source->display, sizeof(dest->display))) { - memcpy(dest->display, source->display, sizeof(dest->display)); - dest->dirty = true; +void encoder_update_user(uint8_t index, bool clockwise) { + if (!is_keyboard_master()) + return; + +#ifdef RGB_OLED_MENU + if (index == RGB_OLED_MENU) { + (*rgb_matrix_functions[rgb_encoder_state][clockwise])(); + } else +#endif + { + uint8_t layer = biton32(layer_state); + uint16_t keycode = encoders[layer][index][clockwise]; + while (keycode == KC_TRANSPARENT && layer > 0) + { + layer--; + if ((layer_state & (1 << layer)) != 0) + keycode = encoders[layer][index][clockwise]; + } + if (keycode != KC_TRANSPARENT) + tap_code16(keycode); } } +#endif -//assign the right code to your layers for OLED display -#define L_BASE 0 -#define L_FN (1<<_FN) -#define L_ADJ (1<<_ADJ) - -static void render_logo(struct CharacterMatrix *matrix) { +// OLED Driver Logic +#ifdef OLED_DRIVER_ENABLE + oled_rotation_t oled_init_user(oled_rotation_t rotation) { + if (is_keyboard_master()) + return OLED_ROTATION_270; + return rotation; +} - static char logo[]={ +static void render_logo(void) { + static const char PROGMEM sol_logo[] = { 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, - 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4, - 0}; - matrix_write(matrix, logo); - //matrix_write_P(&matrix, PSTR(" Split keyboard kit")); + 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0 + }; + oled_write_P(sol_logo, false); } - - -void render_status(struct CharacterMatrix *matrix) { - +static void render_status(void) { // Render to mode icon - static char logo[][2][3]={{{0x95,0x96,0},{0xb5,0xb6,0}},{{0x97,0x98,0},{0xb7,0xb8,0}}}; - if(keymap_config.swap_lalt_lgui==false){ - matrix_write(matrix, logo[0][0]); - matrix_write_P(matrix, PSTR("\n")); - matrix_write(matrix, logo[0][1]); - }else{ - matrix_write(matrix, logo[1][0]); - matrix_write_P(matrix, PSTR("\n")); - matrix_write(matrix, logo[1][1]); + static const char PROGMEM sol_icon[] = { + 0x9b,0x9c,0x9d,0x9e,0x9f, + 0xbb,0xbc,0xbd,0xbe,0xbf, + 0xdb,0xdc,0xdd,0xde,0xdf,0 + }; + oled_write_P(sol_icon, false); + + // Define layers here + oled_write_P(PSTR(" Layer-----"), false); + uint8_t layer = layer_state ? biton(layer_state) : biton32(default_layer_state); + switch (layer) { + case _DVORAK: + oled_write_P(PSTR("DVRAK"), false); + break; + case _DESTINY: + oled_write_P(PSTR("DSTNY"), false); + break; + case _QWERTY: + oled_write_P(PSTR("QWRTY"), false); + break; + case _COLEMAK: + oled_write_P(PSTR("COLMK"), false); + break; + case _LOWER: + oled_write_P(PSTR("LOWER"), false); + break; + case _RAISE: + oled_write_P(PSTR("RAISE"), false); + break; + case _ADJUST: + oled_write_P(PSTR("ADJST"), false); + break; + default: + oled_write_P(PSTR("UNDEF"), false); } - // Define layers here, Have not worked out how to have text displayed for each layer. Copy down the number you see and add a case for it below - char buf[40]; - snprintf(buf,sizeof(buf), "Undef-%ld", layer_state); - matrix_write_P(matrix, PSTR("\nLayer: ")); - switch (layer_state) { - case L_BASE: - matrix_write_P(matrix, PSTR("Default")); - break; - /* case L_FN: - matrix_write_P(matrix, PSTR("FN")); - break; */ - case L_ADJ: - /* case L_ADJ_TRI: */ - matrix_write_P(matrix, PSTR("ADJ")); - break; - default: - matrix_write(matrix, buf); - } - // Host Keyboard LED Status - char led[40]; - snprintf(led, sizeof(led), "\n%s %s %s", - (IS_HOST_LED_ON(USB_LED_NUM_LOCK)) ? "NUMLOCK" : " ", - (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) ? "CAPS" : " ", - (IS_HOST_LED_ON(USB_LED_SCROLL_LOCK)) ? "SCLK" : " "); - matrix_write(matrix, led); -} - - -void iota_gfx_task_user(void) { - struct CharacterMatrix matrix; - -#if DEBUG_TO_SCREEN - if (debug_enable) { - return; - } + uint8_t led_state = host_keyboard_leds(); + oled_write_P(PSTR("-----"), false); + oled_write_P(IS_LED_ON(led_state, USB_LED_NUM_LOCK) ? PSTR("NUMLK") : PSTR(" "), false); + oled_write_P(IS_LED_ON(led_state, USB_LED_CAPS_LOCK) ? PSTR("CAPLK") : PSTR(" "), false); + oled_write_P(IS_LED_ON(led_state, USB_LED_SCROLL_LOCK) ? PSTR("SCRLK") : PSTR(" "), false); + +#ifdef RGB_OLED_MENU + static char buffer[31] = { 0 }; + snprintf(buffer, sizeof(buffer), "h%3d s%3d v%3d s%3d m%3d e%3d ", rgb_matrix_config.hsv.h, rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v, rgb_matrix_config.speed, rgb_matrix_config.mode, rgb_matrix_get_flags()); + buffer[4 + rgb_encoder_state * 5] = '<'; + + oled_write_P(PSTR("-----"), false); + oled_write(buffer, false); #endif +} - matrix_clear(&matrix); - if(is_master){ - render_status(&matrix); - }else{ - render_logo(&matrix); +void oled_task_user(void) { + if (is_keyboard_master()) { + render_status(); + } else { + render_logo(); + oled_scroll_left(); } - matrix_update(&display, &matrix); } -#endif +#endif \ No newline at end of file diff --git a/keyboards/rgbkb/sol/keymaps/xyverz/rules.mk b/keyboards/rgbkb/sol/keymaps/xyverz/rules.mk index bdec5946d6fd..903d4619b06b 100644 --- a/keyboards/rgbkb/sol/keymaps/xyverz/rules.mk +++ b/keyboards/rgbkb/sol/keymaps/xyverz/rules.mk @@ -20,8 +20,11 @@ SWAP_HANDS_ENABLE = no # Enable one-hand typing ENCODER_ENABLE_CUSTOM = no # Enable rotary encoder AUDIO_ENABLE = no -OLED_ENABLE = yes # OLED_ENABLE +OLED_ENABLE = no # OLED_ENABLE IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone) +DEFAULT_FOLDER = rgbkb/sol/rev1 +ENCODER_ENABLE = no +OLED_DRIVER_ENABLE = yes # Do not edit past here From 1d550552cab30ef49b5935bdd31bf2f659255c19 Mon Sep 17 00:00:00 2001 From: Jonathan Cameron Date: Mon, 11 Nov 2019 09:26:14 -0800 Subject: [PATCH 306/316] [Keyboard] Added French layer to handwired/2x5keypad (#7313) * Added new 2x5 Keypad with 3 LEDs to indicate the selected layer. By Jonathan Cameron. * Minor refactor from suggestions from qmk team * Added * Moved to 'handwired' directory * Update readme.md * Update readme.md * Update readme.md * Update keyboards/handwired/2x5keypad/readme.md Co-Authored-By: fauxpark * Switch to image offsite * Moved image offsite * Update keyboards/handwired/2x5keypad/keymaps/default/keymap.h Co-Authored-By: fauxpark * Update keyboards/handwired/2x5keypad/2x5keypad.h Co-Authored-By: fauxpark * Moved functions into .c file per suggestions * Cosmetic * Fixed function called, per suggestions. * Update keyboards/handwired/2x5keypad/2x5keypad.h Ok Co-Authored-By: fauxpark * Moved LED functions to the top level since they can be used it various flavors * Declare those moved LED functions! * Update keyboards/handwired/2x5keypad/config.h Co-Authored-By: Drashna Jaelre * First cut at French support * Added French layer (green) for accented and special French characters * Added french layer * Fixed typo * Updated to get more reasonable tap function --- keyboards/handwired/2x5keypad/config.h | 6 +- .../2x5keypad/keymaps/default/keymap.c | 123 ++++++++++++++++-- keyboards/handwired/2x5keypad/rules.mk | 16 ++- 3 files changed, 122 insertions(+), 23 deletions(-) diff --git a/keyboards/handwired/2x5keypad/config.h b/keyboards/handwired/2x5keypad/config.h index 6d09b5ed00f6..35a0fda8d1a9 100644 --- a/keyboards/handwired/2x5keypad/config.h +++ b/keyboards/handwired/2x5keypad/config.h @@ -37,6 +37,9 @@ /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE +/* Tap dancing params */ +#define TAPPING_TERM 250 + /* key combination for command */ /* DISABLED #define IS_COMMAND() ( \ @@ -44,9 +47,6 @@ ) */ -/* prevent stuck modifiers */ - - #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 0 diff --git a/keyboards/handwired/2x5keypad/keymaps/default/keymap.c b/keyboards/handwired/2x5keypad/keymaps/default/keymap.c index 808824f3a254..91a0e28f6a98 100644 --- a/keyboards/handwired/2x5keypad/keymaps/default/keymap.c +++ b/keyboards/handwired/2x5keypad/keymaps/default/keymap.c @@ -7,27 +7,116 @@ enum layers { NORMAL_LAYER = 0, MEDIA_LAYER, TBD_LAYER2, - TBD_LAYER3 + FRENCH_LAYER }; +/* Enum for the tap dancing keys */ +enum tap_codes { + A_Q, E_Q, E_U, E_E, + A_Y, I_I, O_C, U_U +}; + +#define FR_A_GRAVE "00E0" +#define FR_A_HAT "00E2" + +#define FR_C_CIRCUM "00E7" + +#define FR_E_AIGU "00E9" +#define FR_E_GRAVE "00E8" +#define FR_E_HAT "00EA" +#define FR_E_UMLAUT "00EB" + +#define FR_I_HAT "00EE" +#define FR_I_UMLAUT "00EF" + +#define FR_O_HAT "00F4" + +#define FR_U_GRAVE "00F9" +#define FR_U_HAT "00FB" +#define FR_U_UMLAUT "00FC" + +#define FR_Y_UMLAUT "00FF" + +#define FR_L_QUOTE "00AB" +#define FR_R_QUOTE "00BB" + +void send_french_unicode_char(uint8_t count, char *once, char *twice) +{ + if (count <= 1) + send_unicode_hex_string(once); + else + send_unicode_hex_string(twice); +} + +void dance_a_q(qk_tap_dance_state_t *state, void *user_data) +{ + send_french_unicode_char(state->count, FR_A_GRAVE, FR_L_QUOTE); +} + +void dance_e_q(qk_tap_dance_state_t *state, void *user_data) +{ + send_french_unicode_char(state->count, FR_E_AIGU, FR_R_QUOTE); +} + +void dance_e_u(qk_tap_dance_state_t *state, void *user_data) +{ + send_french_unicode_char(state->count, FR_E_GRAVE, FR_U_GRAVE); +} + +void dance_e_e(qk_tap_dance_state_t *state, void *user_data) +{ + send_french_unicode_char(state->count, FR_E_HAT, FR_E_UMLAUT); +} + +void dance_a_y(qk_tap_dance_state_t *state, void *user_data) +{ + send_french_unicode_char(state->count, FR_A_HAT, FR_Y_UMLAUT); +} + +void dance_i_i(qk_tap_dance_state_t *state, void *user_data) +{ + send_french_unicode_char(state->count, FR_I_HAT, FR_I_UMLAUT); +} + +void dance_o_c(qk_tap_dance_state_t *state, void *user_data) +{ + send_french_unicode_char(state->count, FR_O_HAT, FR_C_CIRCUM); +} + +void dance_u_u(qk_tap_dance_state_t *state, void *user_data) +{ + send_french_unicode_char(state->count, FR_U_HAT, FR_U_UMLAUT); +} + +/* Define the tap dance actions for the french characters */ +qk_tap_dance_action_t tap_dance_actions[] = { + [A_Q] = ACTION_TAP_DANCE_FN(dance_a_q), + [E_Q] = ACTION_TAP_DANCE_FN(dance_e_q), + [E_U] = ACTION_TAP_DANCE_FN(dance_e_u), + [E_E] = ACTION_TAP_DANCE_FN(dance_e_e), + + [A_Y] = ACTION_TAP_DANCE_FN(dance_a_y), + [I_I] = ACTION_TAP_DANCE_FN(dance_i_i), + [O_C] = ACTION_TAP_DANCE_FN(dance_o_c), + [U_U] = ACTION_TAP_DANCE_FN(dance_u_u) +}; + + + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [NORMAL_LAYER]= - LAYOUT(TO(1), WIN_TAB, KC_HOME, KC_UP, KC_END, - WIN_LOCK, KC_MUTE, KC_LEFT, KC_DOWN, KC_RGHT), + [NORMAL_LAYER] = LAYOUT(TO(1), WIN_TAB, KC_HOME, KC_UP, KC_END, + WIN_LOCK, KC_MUTE, KC_LEFT, KC_DOWN, KC_RGHT), - [MEDIA_LAYER]= - LAYOUT(TO(2), KC_CALC, KC_MPRV, KC_MNXT, KC_VOLU, - KC_TRNS, KC_TRNS, KC_MSTP, KC_MPLY, KC_VOLD), + [MEDIA_LAYER] = LAYOUT(TO(2), KC_CALC, KC_MPRV, KC_MNXT, KC_VOLU, + KC_TRNS, KC_TRNS, KC_MSTP, KC_MPLY, KC_VOLD), - [TBD_LAYER2]= - LAYOUT(TO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + [TBD_LAYER2] = LAYOUT(TO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - [TBD_LAYER3]= - LAYOUT(TO(0), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) + [FRENCH_LAYER] = LAYOUT(TO(0), TD(A_Q), TD(E_Q), TD(E_U), TD(E_E), + KC_TRNS, TD(A_Y), TD(I_I), TD(O_C), TD(U_U)) }; @@ -44,6 +133,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { */ +void matrix_init_user(void) +{ + set_unicode_input_mode(UC_WINC); /* See https://jayliu50.github.io/qmk-cheatsheet/ */ +} + + layer_state_t layer_state_set_user(layer_state_t state) { turn_off_leds(); @@ -61,7 +156,7 @@ layer_state_t layer_state_set_user(layer_state_t state) turn_on_led(BLUE_LED); break; - case TBD_LAYER3: + case FRENCH_LAYER: turn_on_led(GREEN_LED); break; } diff --git a/keyboards/handwired/2x5keypad/rules.mk b/keyboards/handwired/2x5keypad/rules.mk index b7027cd9e9da..e62a0f24a82f 100644 --- a/keyboards/handwired/2x5keypad/rules.mk +++ b/keyboards/handwired/2x5keypad/rules.mk @@ -11,13 +11,17 @@ MCU = atmega32u4 # ATmega328P USBasp BOOTLOADER = caterina + +AUDIO_ENABLE = no +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE= no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +CONSOLE_ENABLE= no # Console for debug +EXTRAKEY_ENABLE = yes # Audio control and System control +MOUSEKEY_ENABLE = yes # Mouse keys NKRO_ENABLE = yes # USB Nkey Rollover - -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -AUDIO_ENABLE = no + RGBLIGHT_ENABLE = no +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +UNICODE_ENABLE = yes +TAP_DANCE_ENABLE = yes From 543e612003b17d5542102957aa53ea2d5c6727ed Mon Sep 17 00:00:00 2001 From: Josh Hinnebusch Date: Mon, 11 Nov 2019 12:27:57 -0500 Subject: [PATCH 307/316] [Keyboard] add sm68 (#7279) * add sm68 * update rules.mk to decrease final size (hopefully) * update rules.mk * update json * update per PR comments * remove custom keycodes from keymap * update layout names in keymap * change layout names * Update keyboards/hineybush/sm68/info.json Co-Authored-By: fauxpark * Update keyboards/hineybush/sm68/info.json Co-Authored-By: fauxpark * Update keyboards/hineybush/sm68/info.json Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * update readme --- keyboards/hineybush/sm68/config.h | 241 ++++++++++++++++++ keyboards/hineybush/sm68/info.json | 15 ++ .../hineybush/sm68/keymaps/default/config.h | 19 ++ .../hineybush/sm68/keymaps/default/keymap.c | 45 ++++ .../hineybush/sm68/keymaps/default/readme.md | 1 + keyboards/hineybush/sm68/readme.md | 15 ++ keyboards/hineybush/sm68/rules.mk | 32 +++ keyboards/hineybush/sm68/sm68.c | 50 ++++ keyboards/hineybush/sm68/sm68.h | 59 +++++ 9 files changed, 477 insertions(+) create mode 100644 keyboards/hineybush/sm68/config.h create mode 100644 keyboards/hineybush/sm68/info.json create mode 100644 keyboards/hineybush/sm68/keymaps/default/config.h create mode 100644 keyboards/hineybush/sm68/keymaps/default/keymap.c create mode 100644 keyboards/hineybush/sm68/keymaps/default/readme.md create mode 100644 keyboards/hineybush/sm68/readme.md create mode 100644 keyboards/hineybush/sm68/rules.mk create mode 100644 keyboards/hineybush/sm68/sm68.c create mode 100644 keyboards/hineybush/sm68/sm68.h diff --git a/keyboards/hineybush/sm68/config.h b/keyboards/hineybush/sm68/config.h new file mode 100644 index 000000000000..f41f5bc2d529 --- /dev/null +++ b/keyboards/hineybush/sm68/config.h @@ -0,0 +1,241 @@ +/* +Copyright 2019 hineybush + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x04D8 +#define PRODUCT_ID 0xEC9F +#define DEVICE_VER 0x0001 +#define MANUFACTURER hineybush keyboards +#define PRODUCT sm68 +#define DESCRIPTION PCB for switchmod keyboards projects + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 16 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { B2, B1, B0, D4, D1 } +#define MATRIX_COL_PINS { E6, F0, F1, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D3, D2 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + + +#define RGB_DI_PIN D0 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 16 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ + /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS + /*== or choose animations ==*/ + #define RGBLIGHT_EFFECT_BREATHING + #define RGBLIGHT_EFFECT_RAINBOW_MOOD + #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT + #define RGBLIGHT_EFFECT_RGB_TEST + #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * 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 + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/hineybush/sm68/info.json b/keyboards/hineybush/sm68/info.json new file mode 100644 index 000000000000..1db400d6637f --- /dev/null +++ b/keyboards/hineybush/sm68/info.json @@ -0,0 +1,15 @@ +{ + "keyboard_name": "sm68", + "url": "", + "maintainer": "hineybush", + "width": 17.5, + "height": 5, + "layouts": { + "LAYOUT_68_ansi_split_bs_rshift": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Insert", "x":15.5, "y":0}, {"x":16.5, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Delete", "x":15.5, "y":1}, {"x":16.5, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"\u2191", "x":15.5, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Ctrl", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"\u2190", "x":14.5, "y":4}, {"label":"\u2193", "x":15.5, "y":4}, {"label":"\u2192", "x":16.5, "y":4}] + }, + "LAYOUT_68_ansi_split_rshift": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"x":15.5, "y":0}, {"x":16.5, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"x":15.5, "y":1}, {"x":16.5, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"\u2191", "x":15.5, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Ctrl", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"\u2190", "x":14.5, "y":4}, {"label":"\u2193", "x":15.5, "y":4}, {"label":"\u2192", "x":16.5, "y":4}] + } + } +} diff --git a/keyboards/hineybush/sm68/keymaps/default/config.h b/keyboards/hineybush/sm68/keymaps/default/config.h new file mode 100644 index 000000000000..89865cef3527 --- /dev/null +++ b/keyboards/hineybush/sm68/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 hineybush + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/hineybush/sm68/keymaps/default/keymap.c b/keyboards/hineybush/sm68/keymaps/default/keymap.c new file mode 100644 index 000000000000..3d0a1a4e9711 --- /dev/null +++ b/keyboards/hineybush/sm68/keymaps/default/keymap.c @@ -0,0 +1,45 @@ +/* Copyright 2019 hineybush + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_68_ansi_split_rshift( + 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_HOME, KC_PGUP, + 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_END, KC_PGDN, + 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, KC_SLSH, KC_RSFT, MO(1), KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [_FN] = LAYOUT_68_ansi_split_rshift( + KC_TRNS, KC_TRNS, 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_MOD, + 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_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + + diff --git a/keyboards/hineybush/sm68/keymaps/default/readme.md b/keyboards/hineybush/sm68/keymaps/default/readme.md new file mode 100644 index 000000000000..90031c3b02e1 --- /dev/null +++ b/keyboards/hineybush/sm68/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for sm68 diff --git a/keyboards/hineybush/sm68/readme.md b/keyboards/hineybush/sm68/readme.md new file mode 100644 index 000000000000..6c38158bc70e --- /dev/null +++ b/keyboards/hineybush/sm68/readme.md @@ -0,0 +1,15 @@ +# sm68 + +Image TBA + +Exact keyboard support TBA by switchmod keyboards + +* Keyboard Maintainer: [hineybush](/~https://github.com/hineybush) +* Hardware Supported: SM68 PCB +* Hardware Availability: TBA + +Make example for this keyboard (after setting up your build environment): + + make hineybush/sm68:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/hineybush/sm68/rules.mk b/keyboards/hineybush/sm68/rules.mk new file mode 100644 index 000000000000..49f5ca7fdcab --- /dev/null +++ b/keyboards/hineybush/sm68/rules.mk @@ -0,0 +1,32 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/hineybush/sm68/sm68.c b/keyboards/hineybush/sm68/sm68.c new file mode 100644 index 000000000000..5aa3c85bbc7d --- /dev/null +++ b/keyboards/hineybush/sm68/sm68.c @@ -0,0 +1,50 @@ +/* Copyright 2019 hineybush + * + * 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 . + */ + +#include "sm68.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* +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/hineybush/sm68/sm68.h b/keyboards/hineybush/sm68/sm68.h new file mode 100644 index 000000000000..81d25c12fa5d --- /dev/null +++ b/keyboards/hineybush/sm68/sm68.h @@ -0,0 +1,59 @@ +/* Copyright 2019 hineybush + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +/* This is a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +// split backspace +#define LAYOUT_68_ansi_split_bs_rshift( \ + k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k113, k014, k015, \ + k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k213, k114, k115, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, \ + k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k314, \ + k400, k401, k402, k404, k408, k409, k410, k413, k414, k415 \ +) \ +{ \ + { k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k014, k015 }, \ + { k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, k114, k115 }, \ + { k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213, KC_NO, KC_NO}, \ + { k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, KC_NO, k314, KC_NO}, \ + { k400, k401, k402, KC_NO,k404,KC_NO, KC_NO,k408, k409, k410, KC_NO, KC_NO, KC_NO,k413, k414, k415} \ +} + +// full backspace +#define LAYOUT_68_ansi_split_rshift( \ + k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k113, k014, k015, \ + k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k213, k114, k115, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, \ + k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k314, \ + k400, k401, k402, k404, k408, k409, k410, k413, k414, k415 \ +) \ +{ \ + { k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012,KC_NO, k014, k015 }, \ + { k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, k114, k115 }, \ + { k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213, KC_NO, KC_NO}, \ + { k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, KC_NO, k314, KC_NO}, \ + { k400, k401, k402, KC_NO,k404,KC_NO, KC_NO,k408, k409, k410, KC_NO, KC_NO, KC_NO,k413, k414, k415} \ +} From f48986dda29f9ca4a88d4b4da9ba00dd7864914e Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Mon, 11 Nov 2019 21:06:14 +0000 Subject: [PATCH 308/316] Remove force of debug on within rgblight - causes lockups waiting for hid_listen (#7330) --- quantum/rgblight.c | 1 - 1 file changed, 1 deletion(-) diff --git a/quantum/rgblight.c b/quantum/rgblight.c index a4cbe513e17b..80f276139c75 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c @@ -189,7 +189,6 @@ void rgblight_init(void) { return; } - debug_enable = 1; // Debug ON! dprintf("rgblight_init called.\n"); dprintf("rgblight_init start!\n"); if (!eeconfig_is_enabled()) { From 80713a8a5802dfc28fe0c602ae73b40e3de800d4 Mon Sep 17 00:00:00 2001 From: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Tue, 12 Nov 2019 07:27:48 +0900 Subject: [PATCH 309/316] Japanese translation of newbs.md and related documents. (#7300) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add docs/ja/newbs.md * Update docs/ja/newbs.md * Updated newbs.md * Updated newbs.md * add docs/ja/newbs_learn_more_resources.md * Update docs/ja/newbs.md * update link info 他人まかせ :-) * add docs/ja/newbs_testing_debugging.md * Update docs/ja/newbs_testing_debugging.md * Update docs/ja/newbs_testing_debugging.md * add docs/ja/newbs_building_firmware.md * update docs/ja/newbs_building_firmware.md * Update docs/ja/newbs_testing_debugging.md * Update docs/ja/newbs_building_firmware.md * Update docs/ja/newbs_building_firmware.md * Japanese translation of docs/newbs_getting_started.md * renamed: docs/QMK入門.md -> docs/ja/newbs_getting_started.md * update docs/ja/newbs_getting_started.md * add ja/newbs_best_practices.md There are no plans to translate this file. With the completion of #7231, I will open a new PR. * Update docs/ja/newbs_getting_started.md * Update docs/ja/newbs_getting_started.md * Update docs/ja/newbs_getting_started.md * Update docs/ja/newbs_getting_started.md * Update docs/ja/newbs_getting_started.md * Update docs/ja/newbs_getting_started.md * Update docs/ja/newbs_getting_started.md * Update docs/ja/newbs_getting_started.md * Update docs/ja/newbs_getting_started.md * Update docs/ja/newbs_getting_started.md * Update docs/ja/newbs_getting_started.md * Update docs/ja/newbs_getting_started.md * Update docs/ja/newbs_getting_started.md * Update docs/ja/newbs_getting_started.md * Update docs/ja/newbs_getting_started.md * Update docs/ja/newbs_getting_started.md * Update docs/ja/newbs_getting_started.md * Update docs/ja/newbs_getting_started.md * Update docs/ja/newbs_getting_started.md * Update docs/ja/newbs_getting_started.md * Update docs/ja/newbs_getting_started.md * Update docs/ja/newbs_getting_started.md * Update docs/ja/newbs_getting_started.md * add docs/ja/newbs_flashing.md * add docs/ja/newbs_building_firmware_configurator.md * Update docs/ja/newbs_getting_started.md * Update docs/ja/newbs_getting_started.md * Update docs/ja/newbs_building_firmware_configurator.md * Update docs/ja/newbs_building_firmware_configurator.md * Update docs/ja/newbs_building_firmware_configurator.md * Update docs/ja/newbs_building_firmware_configurator.md * Update docs/ja/newbs_building_firmware_configurator.md * Update docs/ja/newbs_building_firmware_configurator.md * Update docs/ja/newbs_flashing.md * Update docs/ja/newbs_building_firmware_configurator.md * Update docs/ja/newbs_building_firmware_configurator.md * Update docs/ja/newbs_building_firmware_configurator.md * Update docs/ja/newbs_building_firmware_configurator.md * Update docs/ja/newbs_building_firmware_configurator.md * Update docs/ja/newbs_building_firmware_configurator.md * Update docs/ja/newbs_building_firmware_configurator.md * Update docs/ja/newbs_building_firmware_configurator.md * Update docs/ja/newbs_building_firmware_configurator.md * Update docs/ja/newbs_building_firmware_configurator.md * Update docs/ja/newbs_building_firmware_configurator.md * Update docs/ja/newbs_building_firmware_configurator.md * Update docs/ja/newbs_flashing.md * Update docs/ja/newbs_flashing.md * Update docs/ja/newbs_flashing.md * Update docs/ja/newbs_flashing.md * Update docs/ja/newbs_flashing.md * Update docs/ja/newbs_flashing.md * Update docs/ja/newbs_flashing.md * Update docs/ja/newbs_flashing.md * Update docs/ja/newbs_flashing.md * Update docs/ja/newbs_flashing.md * update docs/ja/newbs_flashing.md * change original log format * update docs/ja/newbs_flashing.md * Update docs/ja/newbs_getting_started.md * Update docs/ja/newbs_building_firmware_configurator.md * Update docs/ja/newbs_building_firmware_configurator.md * Update docs/ja/newbs_flashing.md * Update docs/ja/newbs_flashing.md * Update docs/ja/newbs_flashing.md * Update docs/ja/newbs_flashing.md * Update docs/ja/newbs_flashing.md * Update docs/ja/newbs_flashing.md * Update docs/ja/newbs_flashing.md * Update docs/ja/newbs_flashing.md * Update docs/ja/newbs_flashing.md * Update docs/ja/newbs_flashing.md * Update docs/ja/newbs_flashing.md * Update docs/ja/newbs_flashing.md * Update docs/ja/newbs_flashing.md * Update docs/ja/newbs_flashing.md * Update docs/ja/newbs_flashing.md * Update docs/ja/newbs_flashing.md * Update docs/ja/newbs_flashing.md * Update docs/ja/newbs_flashing.md * copy docs/_langs.md and docs/index.html from #7248 Co-Authored-By: shela Co-Authored-By: takashiski Co-Authored-By: Takuya Urakawa --- docs/_langs.md | 1 + docs/index.html | 2 + docs/ja/newbs.md | 40 ++ docs/ja/newbs_best_practices.md | 168 ++++++++ docs/ja/newbs_building_firmware.md | 98 +++++ .../newbs_building_firmware_configurator.md | 112 +++++ docs/ja/newbs_flashing.md | 399 ++++++++++++++++++ docs/ja/newbs_getting_started.md | 121 ++++++ docs/ja/newbs_learn_more_resources.md | 31 ++ docs/ja/newbs_testing_debugging.md | 106 +++++ 10 files changed, 1078 insertions(+) create mode 100644 docs/ja/newbs.md create mode 100644 docs/ja/newbs_best_practices.md create mode 100644 docs/ja/newbs_building_firmware.md create mode 100644 docs/ja/newbs_building_firmware_configurator.md create mode 100644 docs/ja/newbs_flashing.md create mode 100644 docs/ja/newbs_getting_started.md create mode 100644 docs/ja/newbs_learn_more_resources.md create mode 100644 docs/ja/newbs_testing_debugging.md diff --git a/docs/_langs.md b/docs/_langs.md index 7a7f127a9768..b318687d04c1 100644 --- a/docs/_langs.md +++ b/docs/_langs.md @@ -5,3 +5,4 @@ - [:fr: Français](/fr-fr/) - [:he: עברית](/he-il/) - [:ru: Русский](/ru-ru/) + - [:ja: 日本語](/ja/) diff --git a/docs/index.html b/docs/index.html index 0cee19ecd69e..d2ba99897c78 100644 --- a/docs/index.html +++ b/docs/index.html @@ -41,11 +41,13 @@ placeholder: { '/es/': 'Buscar', '/zh-cn/': '搜索', + '/ja/': '検索', '/': 'Search' }, noData: { '/es/': '¡Ningún resultado!', '/zh-cn/': '没有结果!', + '/ja/': '見つかりません!', '/': 'No results!' }, depth: 6 diff --git a/docs/ja/newbs.md b/docs/ja/newbs.md new file mode 100644 index 000000000000..ec6e278eecae --- /dev/null +++ b/docs/ja/newbs.md @@ -0,0 +1,40 @@ +# QMK 初心者ガイド + + + +QMK は、メカニカルキーボード用の強力なオープンソースファームウェアです。 +QMK を使用して、シンプルかつ強力な方法でキーボードをカスタマイズできます。 +完全な初心者からプログラマーに至るまで、あらゆるスキルレベルの人々が QMK を使用してキーボードをカスタマイズしています。 +このガイドは、あなたのスキルにかかわらず、同じことを行う手助けをします。 + +お使いのキーボードで QMK を実行できるかどうか不明ですか? +もし作成したキーボードがメカニカルキーボードの場合、実行できる可能性が高いです。 +QMK は[多くの趣味のキーボード](http://qmk.fm/keyboards/)をサポートしているため、もし現在のキーボードで QMK を実行できない場合でも、ニーズに合ったキーボードを見つけるのに問題はないはずです。 + +## 概要 + +このガイドには7つの主要なセクションがあります。 + +* [はじめに](newbs_getting_started.md) +* [コマンドラインを使用して初めてのファームウェアを構築する](newbs_building_firmware.md) +* [オンライン GUI を使用して初めてのファームウェアを構築する](newbs_building_firmware_configurator.md) +* [ファームウェアを書きこむ](newbs_flashing.md) +* [テストとデバッグ](newbs_testing_debugging.md) +* [Git の最良の慣行](newbs_best_practices.md) +* [さらに学ぶための学習リソース](newbs_learn_more_resources.md) + +このガイドは、これまでソフトウェアをコンパイルしたことがない人を支援することに特化しています。 +その観点から選択と推奨を行います。 +これらの手順の多くには代替方法があり、これらの代替方法のほとんどをサポートしています。 +タスクを達成する方法について疑問がある場合は、[案内を求めることができます](getting_started_getting_help.md)。 + +## 追加のリソース(英語) + +* [Thomas Baart's QMK Basics Blog](https://thomasbaart.nl/category/mechanical-keyboards/firmware/qmk/qmk-basics/) – 新規ユーザ視点から見た QMK ファームウェアの基本的な使用方法をカバーしたユーザ作成のブログ。 + +## 追加のリソース(日本語) + +_日本語のリソース情報を募集中です。_ diff --git a/docs/ja/newbs_best_practices.md b/docs/ja/newbs_best_practices.md new file mode 100644 index 000000000000..ebb7d0fabebf --- /dev/null +++ b/docs/ja/newbs_best_practices.md @@ -0,0 +1,168 @@ +# Best Practices + + + +## Or, "How I Learned to Stop Worrying and Love Git." + +This document aims to instruct novices in the best ways to have a smooth experience in contributing to QMK. We will walk through the process of contributing to QMK, detailing some ways to make this task easier, and then later we'll break some things in order to teach you how to fix them. + +This document assumes a few things: + +1. You have a GitHub account, and have [forked the qmk_firmware repository](getting_started_github.md) to your account. +2. You've [set up your build environment](newbs_getting_started.md?id=environment-setup). + + +## Your fork's master: Update Often, Commit Never + +It is highly recommended for QMK development, regardless of what is being done or where, to keep your `master` branch updated, but ***never*** commit to it. Instead, do all your changes in a development branch and issue pull requests from your branches when you're developing. + +To reduce the chances of merge conflicts — instances where two or more users have edited the same part of a file concurrently — keep your `master` branch relatively up-to-date, and start any new developments by creating a new branch. + +### Updating your master branch + +To keep your `master` branch updated, it is recommended to add the QMK Firmware repository ("repo") as a remote repository in git. To do this, open your Git command line interface and enter: + +``` +git remote add upstream /~https://github.com/qmk/qmk_firmware.git +``` + +To verify that the repository has been added, run `git remote -v`, which should return the following: + +``` +$ git remote -v +origin /~https://github.com//qmk_firmware.git (fetch) +origin /~https://github.com//qmk_firmware.git (push) +upstream /~https://github.com/qmk/qmk_firmware.git (fetch) +upstream /~https://github.com/qmk/qmk_firmware.git (push) +``` + +Now that this is done, you can check for updates to the repo by running `git fetch upstream`. This retrieves the branches and tags — collectively referred to as "refs" — from the QMK repo, which now has the nickname `upstream`. We can now compare the data on our fork `origin` to that held by QMK. + +To update your fork's master, run the following, hitting the Enter key after each line: + +``` +git checkout master +git fetch upstream +git pull upstream master +git push origin master +``` + +This switches you to your `master` branch, retrieves the refs from the QMK repo, downloads the current QMK `master` branch to your computer, and then uploads it to your fork. + +### Making Changes + +To make changes, create a new branch by entering: + +``` +git checkout -b dev_branch +git push --set-upstream origin dev_branch +``` + +This creates a new branch named `dev_branch`, checks it out, and then saves the new branch to your fork. The `--set-upstream` argument tells git to use your fork and the `dev_branch` branch every time you use `git push` or `git pull` from this branch. It only needs to be used on the first push; after that, you can safely use `git push` or `git pull`, without the rest of the arguments. + +!> With `git push`, you can use `-u` in place of `--set-upstream` — `-u` is an alias for `--set-upstream`. + +You can name your branch nearly anything you want, though it is recommended to name it something related to the changes you are going to make. + +By default `git checkout -b` will base your new branch on the branch that is checked out. You can base your new branch on an existing branch that is not checked out by adding the name of the existing branch to the command: + +``` +git checkout -b dev_branch master +``` + +Now that you have a development branch, open your text editor and make whatever changes you need to make. It is recommended to make many small commits to your branch; that way, any change that causes issues can be more easily traced and undone if needed. To make your changes, edit and save any files that need to be updated, add them to Git's *staging area*, and then commit them to your branch: + +``` +git add path/to/updated_file +git commit -m "My commit message." +``` + +`git add` adds files that have been changed to Git's *staging area*, which is Git's "loading zone." This contains the changes that are going to be *committed* by `git commit`, which saves the changes to the repo. Use descriptive commit messages so you can know what was changed at a glance. + +!> If you've changed a lot of files, but all the files are part of the same change, you can use `git add .` to add all the changed files that are in your current directory, rather than having to add each file individually. + +### Publishing Your Changes + +The last step is to push your changes to your fork. To do this, enter `git push`. Git now publishes the current state of `dev_branch` to your fork. + + +## Resolving Merge Conflicts + +Sometimes when your work in a branch takes a long time to complete, changes that have been made by others conflict with changes you have made to your branch when you open a pull request. This is called a *merge conflict*, and is what happens when multiple people edit the same parts of the same files. + +### Rebasing Your Changes + +A *rebase* is Git's way of taking changes that were applied at one point, reversing them, and then applying the same changes to another point. In the case of a merge conflict, you can rebase your branch to grab the changes that were made between when you created your branch and the present time. + +To start, run the following: + +``` +git fetch upstream +git rev-list --left-right --count HEAD...upstream/master +``` + +The `git rev-list` command entered here returns the number of commits that differ between the current branch and QMK's master branch. We run `git fetch` first to make sure we have the refs that represent the current state of the upstream repo. The output of the `git rev-list` command entered returns two numbers: + +``` +$ git rev-list --left-right --count HEAD...upstream/master +7 35 +``` + +The first number represents the number of commits on the current branch since it was created, and the second number is the number of commits made to `upstream/master` since the current branch was created, and thus, the changes that are not recorded in the current branch. + +Now that the current states of both the current branch and the upstream repo are known, we can start a rebase operation: + +``` +git rebase upstream/master +``` + +This tells Git to undo the commits on the current branch, and then reapply them against QMK's master branch. + +``` +$ git rebase upstream/master +First, rewinding head to replay your work on top of it... +Applying: Commit #1 +Using index info to reconstruct a base tree... +M conflicting_file_1.txt +Falling back to patching base and 3-way merge... +Auto-merging conflicting_file_1.txt +CONFLICT (content): Merge conflict in conflicting_file_1.txt +error: Failed to merge in the changes. +hint: Use 'git am --show-current-patch' to see the failed patch +Patch failed at 0001 Commit #1 + +Resolve all conflicts manually, mark them as resolved with +"git add/rm ", then run "git rebase --continue". +You can instead skip this commit: run "git rebase --skip". +To abort and get back to the state before "git rebase", run "git rebase --abort". +``` + +This tells us that we have a merge conflict, and gives the name of the file with the conflict. Open the conflicting file in your text editor, and somewhere in the file, you'll find something like this: + +``` +<<<<<<< HEAD +

For help with any issues, email us at support@webhost.us.

+======= +

Need help? Email support@webhost.us.

+>>>>>>> Commit #1 +``` + +The line `<<<<<<< HEAD` marks the beginning of a merge conflict, and the `>>>>>>> Commit #1` line marks the end, with the conflicting sections separated by `=======`. The part on the `HEAD` side is from the QMK master version of the file, and the part marked with the commit message is from the current branch and commit. + +Because Git tracks *changes to files* rather than the contents of the files directly, if Git can't find the text that was in the file previous to the commit that was made, it won't know how to edit the file. Re-editing the file will solve the conflict. Make your changes, and then save the file. + +``` +

Need help? Email support@webhost.us.

+``` + +Now run: + +``` +git add conflicting_file_1.txt +git rebase --continue +``` + +Git logs the changes to the conflicting file, and continues applying the commits from our branch until it reaches the end. diff --git a/docs/ja/newbs_building_firmware.md b/docs/ja/newbs_building_firmware.md new file mode 100644 index 000000000000..32a7903fd407 --- /dev/null +++ b/docs/ja/newbs_building_firmware.md @@ -0,0 +1,98 @@ +# 初めてのファームウェアを構築する(コマンドライン版) + + + +ビルド環境をセットアップしたので、カスタムファームウェアのビルドを開始する準備ができました。 +ガイドのこのセクションでは、ファイルマネージャ、テキストエディタ、ターミナルウィンドウの3つのプログラム間を行き来します。 +キーボードファームウェアが完成して満足するまで、この3つすべてを開いたままにします。 + +ガイドの最初の部分を読んだ後でターミナルウィンドウを閉じて再度開いていた場合は、ターミナルが正しいディレクトリにあるように `cd qmk_firmware` を忘れないでください。 + +## キーマップフォルダに移動する + +あなたのキーボードの `keymaps`フォルダに移動することから始めます。 + +macOS または Windows を使用している場合は、キーマップフォルダを簡単に開くために使用できるコマンドがあります。 + +### macOS: + +``` open keyboards//keymaps ``` + +### Windows: + +``` start .\\keyboards\\\\keymaps ``` + +## `default` キーマップのコピーを作成する + +`keymaps` フォルダを開いたら、`default`フォルダのコピーを作成します。 +フォルダには、あなたの GitHub でのユーザー名と同じ名前を付けることを強くお勧めしますが、小文字、数字、アンダースコアのみが含まれている限り、任意の名前を使用できます。 + +この手順を自動化するために、`new_keymap.sh`スクリプトを実行する方法もあります。 + +`qmk_firmware/util` ディレクトリに移動して、次を入力します。 + +``` +./new_keymap.sh +``` + +たとえば、John という名前のユーザーが 1up60hse の新しいキーマップを作成しようとするには、次のように入力します。 + +``` +./new_keymap.sh 1upkeyboards/1up60hse john +``` + +## あなたの好みのテキストエディタで `keymap.c` を開く + +`keymap.c`を開きます。 +このファイル内には、キーボードの動作を制御する構造があります。 +`keymap.c`の上部には、キーマップを読みやすくする `define` と `enum` があります。 +さらに下には、次のような行があります。 + + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +この行はレイヤーのリストの開始を表わしています。 +その下には、`LAYOUT` または `KEYMAP` のいずれかを含む行があり、これらの行はレイヤーの開始を表わしています。 +その行の下には、その特定のレイヤーを構成するキーのリストがあります。 + +!> キーマップファイルを編集するときは、カンマを追加したり削除したりしないように注意してください。そうするとファームウェアのコンパイルができなくなり、余分であったり欠落していたりするカンマがどこにあるのかを容易に把握できない場合があります。 + +## 好みに合わせてレイアウトをカスタマイズ + +納得のいくまでこのステップを繰り返します。 +気になる点をひとつづつ変更して試すのもよし、全部作りなおすのもよし。 +あるレイヤー全体が必要ない場合はレイヤーを削除することもでき、必要があれば、合計 32 個までレイヤーを追加することもできます。 +ここで定義できる内容については、次のドキュメントを参照してください。 + +* [キーコード](keycodes.md) +* [機能](features.md) +* [FAQ](faq.md) + +?> キーマップがどのように機能するかを感じながら、各変更を小さくしてください。大きな変更は、発生する問題のデバッグを困難にします。 + +## ファームウェアをビルドする + +キーマップの変更が完了したら、ファームウェアをビルドする必要があります。これを行うには、ターミナルウィンドウに戻り、ビルドコマンドを実行します: + + make : + +たとえば、キーマップの名前が "xyverz" で、rev5 planck のキーマップを作成している場合、次のコマンドを使用します: + + make planck/rev5:xyverz + +これがコンパイルされる間、どのファイルがコンパイルされているかを知らせる多くの出力が画面に表示されます。 +次のような出力で終わるはずです。 + +``` +Linking: .build/planck_rev5_xyverz.elf [OK] +Creating load file for flashing: .build/planck_rev5_xyverz.hex [OK] +Copying planck_rev5_xyverz.hex to qmk_firmware folder [OK] +Checking file size of planck_rev5_xyverz.hex [OK] + * File size is fine - 18392/28672 +``` + +## ファームウェアを書きこむ + +[「ファームウェアを書きこむ」](newbs_flashing.md) に移動して、キーボードに新しいファームウェアを書き込む方法を学習します。 diff --git a/docs/ja/newbs_building_firmware_configurator.md b/docs/ja/newbs_building_firmware_configurator.md new file mode 100644 index 000000000000..0716e26ea9ca --- /dev/null +++ b/docs/ja/newbs_building_firmware_configurator.md @@ -0,0 +1,112 @@ +# QMK Configurator + + + +[QMK Configurator](https://config.qmk.fm) は、QMKファームウェアの hex ファイルを生成するオンライングラフィカルユーザーインターフェイスです。 + +?> **次の手順を順番に実行してください。** + +[Video Tutorial](https://youtu.be/tx54jkRC9ZY) を見てください。 + +QMK Configurator は Chrome/Firefox で最適に動作します。 + +!> **KLE や kbfirmware などの他のツールのファイルは、QMK Configurator と互換性がありません。それらをロードしたり、インポートしたりしないでください。QMK Configurator は異なるツールです。** + +## キーボードを選ぶ + +ドロップダウンボックスをクリックして、キーマップを作成するキーボードを選択します。 + +?> **キーボードに複数のバージョンがある場合は、正しいバージョンを選択してください。** + +大事なことなのでもう一度言います。 + +!> **正しいバージョンを選択してください!** + +キーボードが QMK を搭載していると宣伝されていてもリストにない場合は、開発者がまだ作業中か、私たちがまだマージするきっかけがなかった可能性があります。 +アクティブな [Pull Request](/~https://github.com/qmk/qmk_firmware/pulls?q=is%3Aopen+is%3Apr+label%3Akeyboard) がない場合、[qmk_firmware](/~https://github.com/qmk/qmk_firmware/issues)で報告して、その特定のキーボードのサポートをリクエストします。 +製作者自身の github アカウントにある QMK 搭載キーボードもあります。 +それも再確認してください。 + +## キーボードのレイアウトを選択する + +作成したいと思うキーマップに最も近いレイアウトを選択します。一部のキーボードには、まだ十分なレイアウトまたは正しいレイアウトが定義されていません。これらは将来サポートされる予定です。 + +## キーマップの名前 + +お好みの名前をキーマップにつけます。 + +?> コンパイル時に問題が発生した場合は、もしかすると QMK ファームウェアリポジトリに既に同じ名前が存在しているのかもしれません、名前を変更してみてください。 + +## キーマップを作る + +キーコード入力は3つの方法で実行できます。 +1. ドラッグ・アンド・ドロップ +2. レイアウト上の空の場所をクリックして、希望するキーコードをクリックします +3. レイアウト上の空の場所をクリックして、キーボードの物理キーを押します + +マウスをキーの上に置くと、そのキーコードの機能の短い説明文が出ます。より詳細な説明については以下を見てください。 + +[Basic Keycode Reference](https://docs.qmk.fm/#/keycodes_basic) +[Advanced Keycode Reference](https://docs.qmk.fm/#/feature_advanced_keycodes) + +キーマップをサポートするレイアウトが見つからない場合、例えばスペースバーが3分割されていたり、バックスペースが2分割されていたり、シフトが2分割されているような場合、それらを全て埋めてください。 + +### 例: + +3分割のスペースバー: 全てスペースバーで埋めます。 + +2分割のバックスペース: 両方ともバックスペースで埋めます。 + +2分割の右シフト: 両方とも右シフトで埋めます。 + +左シフトとISOサポート用に1つずつ: 両方とも左シフトで埋めます。 + +5分割だが4キーのみ: 以前やったことがある人を推測して確認するか尋ねてください。 + +## 後日のためにキーマップを保存する + +キーマップに満足するか、または後で作業したい場合は、`Export Keymap' ボタンを押します。上記で選択した名前に .json が追加されたキーマップが保存されます。 + +後日、`Import Keymap` ボタンを押すことで、この .json ファイルをロードできます。 + +!> **注意:** このファイルは、kbfirmware.com またはその他のツールに使用される .jsonファイルと同じ形式ではありません。これらのツールにこれを使用したり、QMK Configurator でこれらのツールの .json を使用しようとすると、キーボードが **爆発** する可能性があります。 + +## ファームウェアファイルを生成する + +緑色の `Compile` ボタンを押します。 + +コンパイルが完了すると、緑色の `Download Firmware` ボタンを押すことができます。 + +## キーボードに書き込む(フラッシュする) + +[ファームウェアを書きこむ](newbs_flashing.md) を参照してください。 + +## トラブルシューティング + +#### 私の .json ファイルが動きません + +.json ファイルが QMK Configurator で作ったものの場合、おめでとうございます。バグに遭遇しました。 [qmk_configurator](/~https://github.com/qmk/qmk_configurator/issues) で報告してください。 + +そうでない場合は、... 他の .json ファイルを使用しないようにという、上に書いた注意書きを見逃してませんか? + +#### レイアウトに余分なスペースがありますか?どうすればいいですか? + +もしスペースバーが3つに分かれている場合は、全てスペースバーで埋めるのが最善の方法です。バックスペースやシフトについても同じことができます。 + +#### キーコードってなに? + +以下を見てください。 + +[Basic Keycode Reference](https://docs.qmk.fm/#/keycodes_basic) +[Advanced Keycode Reference](https://docs.qmk.fm/#/feature_advanced_keycodes) + +#### コンパイルできません + +キーマップの他のレイヤーを再確認して、ランダムなキーが存在しないことを確認してください。 + +## 問題とバグ + +私たちは利用者の依頼やバグレポートを常に受け入れています。[qmk_configurator](/~https://github.com/qmk/qmk_configurator/issues) で報告してください。 diff --git a/docs/ja/newbs_flashing.md b/docs/ja/newbs_flashing.md new file mode 100644 index 000000000000..54569e122587 --- /dev/null +++ b/docs/ja/newbs_flashing.md @@ -0,0 +1,399 @@ +# ファームウェアを書きこむ + + + +カスタムファームウェアは出来たので、キーボードに書き込みたくなるでしょう/フラッシュしたくなるでしょう。 + +## QMK Toolbox を使ってキーボードに書き込む + +キーボードに書き込む最も簡単な方法は [QMK Toolbox](/~https://github.com/qmk/qmk_toolbox/releases) を使うことです。 + +ただし、QMK Toolbox は、現在は Windows と macOS でしか使えません。 +Linuxを使用している場合(および、コマンドラインでファームウェアを書き込みたい場合)は、下の方で概説する[方法](newbs_flashing.md#コマンドラインでファームウェアを書き込む)で行なう必要があります。 + +### QMK Toolbox にファイルをロードする + +まず QMK Toolbox アプリケーションを起動します。 +Finder またはエクスプローラーでファームウェアのファイルを探します。 +ファイル名は `.hex` または `.bin` のどちらかの形式です。 +ビルド時に QMK は、キーボードに適した形式のものを `qmk_firmware` のトップフォルダにコピーしているはずです。 + +Windows か macOS を使用しているときは現在のファームウェアフォルダをエクスプローラーか Finder で簡単に開くためのコマンドがあります。 + +#### Windows + +``` +start . +``` + +#### macOS + +``` +open . +``` + +ファームウェアファイルは常に以下の命名形式に従っています。 + +``` +_.{bin,hex} +``` + +例えば、`plank/rev5` の `default` キーマップのファイル名は以下のようになります。 + +``` +planck_rev5_default.hex +``` + +ファームウェアファイルを見つけたら、QMK Toolbox の "Local file" ボックスにドラッグするか、"Open" をクリックしてファームウェアファイルを指定します。 + +### キーボードを DFU (Bootloader) モードにする + +ファームウェアを書き込むには、キーボードを普段とは違う特別な状態、フラッシュモードにする必要があります。 +このモードでは、キーボードはキーボードとしての機能をはたしません。 +ファームウェアの書き込み中にキーボードのケーブルを抜いたり、書き込みプロセスを中断したりしないことが非常に重要です。 + +キーボードによって、この特別なモードに入る方法は異なります。 +キーボードが現在 QMK または TMK を実行しており、キーボードメーカーから具体的な指示が与えられていない場合は、次を順番に試してください。 + +* 両方のシフトキーを押しながら、`Pause` キーを押す +* 両方のシフトキーを押しながら、`B` キーを押す +* キーボードのケーブルを抜いて、スペースバーとBを同時に押しながら、キーボードを再び接続し、1秒待ってからキーを放す +* 基板(PCB)に付けられている物理的な `RESET` ボタンを押す +* PCB 上の `BOOT0` か `RESET` のラベルの付いたヘッダピンを探し、PCB 接続中にそれらを互いにショートする + +うまくいけば、QMK Toolboxに次のようなメッセージが表示されます。 + +``` +*** Clueboard - Clueboard 66% HotSwap disconnected -- 0xC1ED:0x2390 +*** DFU device connected +``` + +### キーボードへの書き込み + +QMK Toolbox の `Flash` ボタンをクリックします。 +次のような出力が表示されます。 + +``` +*** Clueboard - Clueboard 66% HotSwap disconnected -- 0xC1ED:0x2390 +*** DFU device connected +*** Attempting to flash, please don't remove device +>>> dfu-programmer atmega32u4 erase --force + Erasing flash... Success + Checking memory from 0x0 to 0x6FFF... Empty. +>>> dfu-programmer atmega32u4 flash /Users/skully/qmk_firmware/clueboard_66_hotswap_gen1_skully.hex + Checking memory from 0x0 to 0x55FF... Empty. + 0% 100% Programming 0x5600 bytes... + [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success + 0% 100% Reading 0x7000 bytes... + [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success + Validating... Success + 0x5600 bytes written into 0x7000 bytes memory (76.79%). +>>> dfu-programmer atmega32u4 reset + +*** DFU device disconnected +*** Clueboard - Clueboard 66% HotSwap connected -- 0xC1ED:0x2390 +``` + +## コマンドラインでファームウェアを書き込む + +これは、以前のものと比較して非常に単純になりました。 +ファームウェアをコンパイルして書き込む準備ができたら、ターミナルウィンドウを開いてビルドコマンドを実行します。 + + make ::flash + +たとえば、キーマップの名前が xyverz で、rev5 planck のキーマップを作成している場合、次のコマンドを使用します。 + + make planck/rev5:xyverz:flash + +これにより、キーボードの構成が確認され、指定されたブートローダに基づいてキーボードへの書き込みが試行されます。 +これはあなたがキーボードが使用するブートローダを知る必要がないことを意味します。 +コマンドをただ実行して、コマンド自身に難しい処理を任せます。 + +ただし、これはキーボードごとに設定されているブートローダに依存します。 +もしこの情報が設定されていない場合、または使用しているキーボードのファームウェアの書き込みにサポートしていないターゲットが設定されている場合、次のエラーが表示されます。 + + WARNING: This board's bootloader is not specified or is not supported by the ":flash" target at this time. + +この場合、あなたは明示的にブートローダを指定する方法を使わなければなりません。 + +ブートローダは主に 5 種類のものが使われています。 +Pro Micro とそのクローンは Caterina を、Teensy は HalfKay を、OLKBの AVR ボードは QMK-DFU を、その他の ATmega32U4 ボードは DFU を、そして多くの ARM ボードは ARM DFU を使います。 + +より詳しいブートローダの情報は、[Flashing Instructions and Bootloader Information](flashing.md) にあります。 + +使用しているブートローダがわかっているならば、ファームウェアをコンパイルするときに、実は `make` コマンドにブートローダを指定するテキストを追加して、書き込みプロセスを自動化できます。 + +### DFU + +DFU ブートローダの場合、ファームウェアをコンパイルして書き込む準備ができたら、ターミナルウィンドウを開いてビルドコマンドを実行します。 + + make ::dfu + +たとえば、キーマップの名前が xyverz で、rev5 planck のキーマップを作成している場合、次のコマンドを使用します。 + + make planck/rev5:xyverz:dfu + +コンパイルが終了すると、以下の出力になるはずです。 + +``` +Linking: .build/planck_rev5_xyverz.elf [OK] +Creating load file for flashing: .build/planck_rev5_xyverz.hex [OK] +Copying planck_rev5_xyverz.hex to qmk_firmware folder [OK] +Checking file size of planck_rev5_xyverz.hex + * File size is fine - 18574/28672 + ``` + +ここまでくると、ビルドスクリプトは5秒ごとに DFU ブートローダを探します。 +デバイスが見つかるか、あなたがキャンセルするまで、以下を繰り返します。 + + dfu-programmer: no device present. + Error: Bootloader not found. Trying again in 5s. + +これを実行したら、コントローラーをリセットする必要があります。 +そして下のような出力が表示されます。 + +``` +*** Attempting to flash, please don't remove device +>>> dfu-programmer atmega32u4 erase --force + Erasing flash... Success + Checking memory from 0x0 to 0x6FFF... Empty. +>>> dfu-programmer atmega32u4 flash /Users/skully/qmk_firmware/clueboard_66_hotswap_gen1_skully.hex + Checking memory from 0x0 to 0x55FF... Empty. + 0% 100% Programming 0x5600 bytes... + [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success + 0% 100% Reading 0x7000 bytes... + [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success + Validating... Success + 0x5600 bytes written into 0x7000 bytes memory (76.79%). +>>> dfu-programmer atmega32u4 reset +``` + +?> `dfu-programmer:no device present` など、これに関する問題がある場合は、[よくある質問](faq_build.md) を参照してください。 + +#### DFU コマンド + +ファームウェアを DFU デバイスに書き込むために使用できる DFU コマンドがいくつかあります。 + +* `:dfu` - これが通常のオプションで、DFUデバイスが使用可能になるまで待機したのちファームウェアを書き込みます。5秒ごとに、DFUデバイスが存在するかチェックしています。 +* `:dfu-ee` - 通常の hex ファイルの代わりに `eep` ファイルを書き込みます。これを使用するのはまれです。 +* `:dfu-split-left` - デフォルトオプション (`:dfu`) と同様に、通常のファームウェアが書き込まれます。ただし、分割キーボードの「左側の」 EEPROMファイルも書き込まれます。_これは、Elite C ベースの分割キーボードに最適です。_ +* `:dfu-split-right` - デフォルトオプション (`:dfu`) と同様に、通常のファームウェアが書き込まれます。ただし、分割キーボードの「右側の」EEPROMファイルも書き込まれます。_これは、Elite C ベースの分割キーボードに最適です。_ + + +### Caterina + +Arduino ボードとそれらのクローンの場合(たとえば SparkFun ProMicro)、ファームウェアをコンパイルして書き込む準備ができたら、ターミナルウィンドウを開いてビルドコマンドを実行します。 + + make ::avrdude + +たとえば、キーマップの名前が xyverz で、rev2 Lets Split のキーマップを作成している場合、次のコマンドを使用します。 + + make lets_split/rev2:xyverz:avrdude + +ファームウェアのコンパイルが完了すると、以下のように出力されます。 + +``` +Linking: .build/lets_split_rev2_xyverz.elf [OK] +Creating load file for flashing: .build/lets_split_rev2_xyverz.hex [OK] +Checking file size of lets_split_rev2_xyverz.hex [OK] + * File size is fine - 27938/28672 +Detecting USB port, reset your controller now.............. +``` + +この時点で、キーボードをリセットすると、スクリプトがブートローダを検出し、キーボードに書き込みます。出力は次のようになります。 + +``` +Detected controller on USB port at /dev/ttyS15 + +Connecting to programmer: . +Found programmer: Id = "CATERIN"; type = S + Software Version = 1.0; No Hardware Version given. +Programmer supports auto addr increment. +Programmer supports buffered memory access with buffersize=128 bytes. + +Programmer supports the following devices: + Device code: 0x44 + +avrdude.exe: AVR device initialized and ready to accept instructions + +Reading | ################################################## | 100% 0.00s + +avrdude.exe: Device signature = 0x1e9587 (probably m32u4) +avrdude.exe: NOTE: "flash" memory has been specified, an erase cycle will be performed + To disable this feature, specify the -D option. +avrdude.exe: erasing chip +avrdude.exe: reading input file "./.build/lets_split_rev2_xyverz.hex" +avrdude.exe: input file ./.build/lets_split_rev2_xyverz.hex auto detected as Intel Hex +avrdude.exe: writing flash (27938 bytes): + +Writing | ################################################## | 100% 2.40s + +avrdude.exe: 27938 bytes of flash written +avrdude.exe: verifying flash memory against ./.build/lets_split_rev2_xyverz.hex: +avrdude.exe: load data flash data from input file ./.build/lets_split_rev2_xyverz.hex: +avrdude.exe: input file ./.build/lets_split_rev2_xyverz.hex auto detected as Intel Hex +avrdude.exe: input file ./.build/lets_split_rev2_xyverz.hex contains 27938 bytes +avrdude.exe: reading on-chip flash data: + +Reading | ################################################## | 100% 0.43s + +avrdude.exe: verifying ... +avrdude.exe: 27938 bytes of flash verified + +avrdude.exe: safemode: Fuses OK (E:CB, H:D8, L:FF) + +avrdude.exe done. Thank you. +``` +うまくいかない時は、以下のようにする必要があるかもしれません。 + + sudo make ::avrdude + + +#### Caterina コマンド + +ファームウェアを DFU デバイスに書き込むために使用できる DFU コマンドがいくつかあります。 + +* `:avrdude` - これが通常のオプションで、Caterina デバイスが(新しい COM ポートを検出して)使用可能になるまで待機し、ファームウェアを書き込みます。 +* `:avrdude-loop` - これは `:avrdude` と同じです。ただし書き込みが終了すると再び Caterina デバイスの書き込み待ちに戻ります。これは何台ものデバイスへの書き込みに便利です。_Control+C を押して、手動でこの繰り返しを終了させる必要があります。_ +* `:avrdude-split-left` - デフォルトオプション(`:avrdude`)と同様に通常のファームウェアが書き込まれます。ただし、分割キーボードの「左側の」EEPROMファイルもフラッシュされます。 _これは、Pro Micro ベースの分割キーボードに最適です。_ +* `:avrdude-split-right` - デフォルトオプション(`:avrdude`)と同様に通常のファームウェアが書き込まれます。ただし、分割キーボードの「右側の」EEPROMファイルもフラッシュされます。 _これは、Pro Micro ベースの分割キーボードに最適です。_ + +### HalfKay + +PJRC デバイス(Teensy シリーズ)の場合、ファームウェアをコンパイルして書き込む準備ができたら、ターミナルウィンドウを開いてビルドコマンドを実行します。 + + make ::teensy + +たとえば、キーマップの名前が xyverz で、Ergodox または Ergodox EZ のキーマップを作成している場合、次のコマンドを使用します。 + + make ergodox_ez:xyverz:teensy + +ファームウェアのコンパイルが完了すると、以下のように出力されます。 + +``` +Linking: .build/ergodox_ez_xyverz.elf [OK] +Creating load file for flashing: .build/ergodox_ez_xyverz.hex [OK] +Checking file size of ergodox_ez_xyverz.hex [OK] + * File size is fine - 25584/32256 + Teensy Loader, Command Line, Version 2.1 +Read "./.build/ergodox_ez_xyverz.hex": 25584 bytes, 79.3% usage +Waiting for Teensy device... + (hint: press the reset button) + ``` + +この時点で、キーボードをリセットします。すると、次のような出力が表示されます。 + + ``` + Found HalfKay Bootloader +Read "./.build/ergodox_ez_xyverz.hex": 28532 bytes, 88.5% usage +Programming............................................................................................................................................................................ +................................................... +Booting +``` + +### STM32 (ARM) + +主な ARM ボード (Proton C, Planck Rev 6, Preonic Rev 3 を含む)の場合、ファームウェアをコンパイルして書き込む準備ができたら、ターミナルウィンドウを開いてビルドコマンドを実行します。 + + make ::dfu-util + +たとえば、キーマップの名前が xyverz で、Planck Revision 6 のキーマップを作成している場合、次のコマンドを使用し、(コンパイルが終わる前に)キーボードを再起動してブートローダを起動します: + + make planck/rev6:xyverz:dfu-util + +ファームウェアのコンパイルが完了すると、以下のように出力されます。 + +``` +Linking: .build/planck_rev6_xyverz.elf [OK] +Creating binary load file for flashing: .build/planck_rev6_xyverz.bin [OK] +Creating load file for flashing: .build/planck_rev6_xyverz.hex [OK] + +Size after: + text data bss dec hex filename + 0 41820 0 41820 a35c .build/planck_rev6_xyverz.hex + +Copying planck_rev6_xyverz.bin to qmk_firmware folder [OK] +dfu-util 0.9 + +Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc. +Copyright 2010-2016 Tormod Volden and Stefan Schmidt +This program is Free Software and has ABSOLUTELY NO WARRANTY +Please report bugs to http://sourceforge.net/p/dfu-util/tickets/ + +Invalid DFU suffix signature +A valid DFU suffix will be required in a future dfu-util release!!! +Opening DFU capable USB device... +ID 0483:df11 +Run-time device DFU version 011a +Claiming USB DFU Interface... +Setting Alternate Setting #0 ... +Determining device status: state = dfuERROR, status = 10 +dfuERROR, clearing status +Determining device status: state = dfuIDLE, status = 0 +dfuIDLE, continuing +DFU mode device DFU version 011a +Device returned transfer size 2048 +DfuSe interface name: "Internal Flash " +Downloading to address = 0x08000000, size = 41824 +Download [=========================] 100% 41824 bytes +Download done. +File downloaded successfully +Transitioning to dfuMANIFEST state +``` + +#### STM32 コマンド + +ファームウェアを STM32 デバイスに書き込むために使用できる DFU コマンドがいくつかあります。 + +* `:dfu-util` - STM32 デバイスに書き込むためのデフォルトコマンドで、STM32 ブートローダが見つかるまで待機します。 +* `:dfu-util-split-left` - デフォルトのオプション (`:dfu-util`) と同様に、通常のファームウェアが書き込まれます。 ただし、分割キーボードの「左側の」EEPROM の設定も行われます。 +* `:dfu-util-split-right` - デフォルトのオプション (`:dfu-util`) と同様に、通常のファームウェアが書き込まれます。 ただし、分割キーボードの「右側の」EEPROM の設定も行われます。 +* `:st-link-cli` - dfu-util ではなく、ST-LINK の CLI ユーティリティを介してファームウェアを書き込めます。 + +### BootloadHID + +Bootmapper Client(BMC)/bootloadHID/ATmega32A ベースのキーボードの場合、ファームウェアをコンパイルして書き込む準備ができたら、ターミナルウィンドウを開いてビルドコマンドを実行します。 + + make ::bootloaderHID + +たとえば、キーマップの名前が xyverz で、jj40 のキーマップを作成している場合、次のコマンドを使用します。 + + make jj40:xyverz:bootloaderHID + +ファームウェアのコンパイルが完了すると、以下のように出力されます。 + +``` +Linking: .build/jj40_default.elf [OK] +Creating load file for flashing: .build/jj40_default.hex [OK] +Copying jj40_default.hex to qmk_firmware folder [OK] +Checking file size of jj40_default.hex [OK] + * The firmware size is fine - 21920/28672 (6752 bytes free) +``` + +ここまでくると、ビルドスクリプトは5秒ごとに DFU ブートローダを探します。 +デバイスが見つかるか、あなたがキャンセルするまで、以下を繰り返します。 + +``` +Error opening HIDBoot device: The specified device was not found +Trying again in 5s. +``` + +これを実行したら、コントローラーをリセットする必要があります。 +そして下のような出力が表示されます。 + +``` +Page size = 128 (0x80) +Device size = 32768 (0x8000); 30720 bytes remaining +Uploading 22016 (0x5600) bytes starting at 0 (0x0) +0x05580 ... 0x05600 +``` + +## テストしましょう! + +おめでとうございます! カスタムファームウェアがキーボードにプログラムされました! + +使ってみて、すべてがあなたの望むように動作するかどうか確認してください。 +この初心者ガイドを完全なものにするために [テストとデバッグ](newbs_testing_debugging.md) を書いたので、カスタム機能のトラブルシューティング方法については、こちらをご覧ください。 diff --git a/docs/ja/newbs_getting_started.md b/docs/ja/newbs_getting_started.md new file mode 100644 index 000000000000..653922b6e8af --- /dev/null +++ b/docs/ja/newbs_getting_started.md @@ -0,0 +1,121 @@ +# イントロダクション + + + +キーボードにはプロセッサが入っており、それはコンピュータに入っているものと大して違わないものです。 +このプロセッサでは、キーボードのボタンの押し下げの検出を担当しキーボードのどのボタンが押されている/離されているかのレポートをコンピュータに送信するソフトウェアが動作しています。 +QMK は、そのソフトウェアの役割を果たし、ボタンの押下を検出しその情報をホストコンピュータに渡します。 +カスタムキーマップを作るということは、キーボード上で動くプログラムを作るということなのです。 + +QMK は、簡単なことは簡単に、そして、難しいことを可能なことにすることで、あなたの手にたくさんのパワーをもたらします。 +パワフルなキーマップを作るためにプログラムを作成する方法を知る必要はありません。いくつかのシンプルな文法に従うだけでOKです。 + +# はじめに + +キーマップをビルドする前に、いくつかのソフトウェアをインストールしてビルド環境を構築する必要があります。 +ファームウェアをコンパイルするキーボードの数に関わらず、この作業を一度だけ実行する必要があります。 + +もし、GUI で作業をしたい場合、オンラインで作業できる [QMK Configurator](https://config.qmk.fm) を使ってください。 +使い方は [Building Your First Firmware using the online GUI](newbs_building_firmware_configurator.md) を参照してください。 + +## ソフトウェアのダウンロード + +### テキストエディタ + +GUI を使わない場合、プレーンテキストを編集・保存できるエディタが必要です。 +Windows の場合、メモ帳が使えます。Linux の場合、gedit が使えます。 +どちらもシンプルですが機能的なテキストエディタです。 +macOS では、デフォルトのテキストエディットアプリに注意してください。_フォーマット_ メニューから _標準テキストにする_ を選択しない限り、プレーンテキストとして保存されません。 + +[Sublime Text](https://www.sublimetext.com/) や [VS Code](https://code.visualstudio.com/) のような専用のテキストエディタをダウンロードしてインストールすることもできます。これらのプログラムはコードを編集するために特別に作成されているため、これはプラットフォームに関係なくベストな方法です。 + +?> どのエディタを使えば良いか分からない場合、Laurence Bradford が書いたこの記事 [a great introduction](https://learntocodewith.me/programming/basics/text-editors/) を読んでください。 + +### QMK Toolbox + +QMK Toolbox は、Windows と macOS で使える GUI を備えたプログラムで、カスタムキーボードのプログラミングとデバッグの両方ができます。 +このプログラムは、キーボードに簡単にファームウェアを書き込んだり、出力されるデバッグメッセージを確認する際に、かけがえのないものであることがわかるでしょう。 + +[QMK Toolbox の最新版](/~https://github.com/qmk/qmk_toolbox/releases/latest) + +* Windows 版: `qmk_toolbox.exe` (portable) または `qmk_toolbox_install.exe` (installer) +* macOS 版: `QMK.Toolbox.app.zip` (portable) または `QMK.Toolbox.pkg` (installer) + +## 環境構築 + +私たちは、QMK を可能な限り簡単に構築できるように努力しています。 +Linux か Unix 環境を用意するだけで、QMK に残りをインストールさせることができます。 + +?> もし、Linux か Unix のコマンドを使ったことがない場合、こちらで基本的な概念や各種コマンドを学んでください。これらの教材で QMK を使うのに必要なことを学ぶことができます。 + +[Must Know Linux Commands](https://www.guru99.com/must-know-linux-commands.html)
+[Some Basic Unix Commands](https://www.tjhsst.edu/~dhyatt/superap/unixcmd.html) + +### Windows + +MSYS2 と Git のインストールが必要です。 + +* [MSYS2 homepage](http://www.msys2.org) の手順に従って MSYS2 をインストールします。 +* 開いている MSYS2 の全ターミナル画面を閉じて、新しい MSYS2 MinGW 64-bit のターミナル画面を開きます。 +* `pacman -S git` を実行して Git をインストールします。 + +### macOS + +[Homebrew homepage](https://brew.sh) の手順に従って Homebrew をインストールしてください。 + +Homebrew をインストールしたら、以下の _QMK の設定_ に進んでください。そのステップでは、他のパッケージをインストールするスクリプトを実行します。 + +### Linux + +Git のインストールが必要です。既にインストールされている可能性は高いですが、そうでない場合、次のコマンドでインストールできます。 + +* Debian / Ubuntu / Devuan: `apt-get install git` +* Fedora / Red Hat / CentOS: `yum install git` +* Arch: `pacman -S git` + +?> 全てのプラットフォームにおいて、Docker を使うことも可能です。[詳細はこちらをクリックしてください](getting_started_build_tools.md#docker)。 + +## QMK の設定 + +Linux/Unix 環境が準備できたら QMK のダウンロードの準備は完了です。Git を使用して QMK のリポジトリを「クローン」することで QMK をダウンロードします。ターミナルか MSYS2 MinGW ウィンドウを開いて、このガイドの残りの部分では開いたままにします。そのウィンドウ内で、次の2つのコマンドを実行します。 + +```shell +git clone --recurse-submodules /~https://github.com/qmk/qmk_firmware.git +cd qmk_firmware +``` + +?> 既に [GitHub の使いかた](getting_started_github.md)を知っているなら、clone ではなく fork を勧めます。この一文の意味が分からない場合、このメッセージは無視してかまいません。 + +QMK には、必要な残りの設定を手助けするスクリプトが含まれています。 +セットアップ作業を完了させるため、次のコマンドを実行します。 + + util/qmk_install.sh + +## ビルド環境の確認 + +これで QMK のビルド環境が用意できましたので、キーボードのファームウェアをビルドできます。 +キーボードのデフォルトキーマップをビルドすることから始めます。次の形式のコマンドでビルドできるはずです。 + + make :default + +例)Clueboard 66% のファームウェアをビルドする + + make clueboard/66/rev3:default + +大量の出力の最後に次のように出力されると完了です。 + +``` +Linking: .build/clueboard_66_rev3_default.elf [OK] +Creating load file for flashing: .build/clueboard_66_rev3_default.hex [OK] +Copying clueboard_66_rev3_default.hex to qmk_firmware folder [OK] +Checking file size of clueboard_66_rev3_default.hex [OK] + * The firmware size is fine - 26356/28672 (2316 bytes free) +``` + +# キーマップの作成 + +これであなた専用のキーマップを作成する準備ができました! +次は [Building Your First Firmware](newbs_building_firmware.md) で専用のキーマップを作成します。 diff --git a/docs/ja/newbs_learn_more_resources.md b/docs/ja/newbs_learn_more_resources.md new file mode 100644 index 000000000000..3247d04f7ea7 --- /dev/null +++ b/docs/ja/newbs_learn_more_resources.md @@ -0,0 +1,31 @@ +# 学習リソース + + + +これらのリソースは、QMKコミュニティの新しいメンバーに、初心者向けドキュメントで提供されている情報に対する理解を深めることを目的としています。 + +## Git に関するリース: + +### 英語 + +* [Great General Tutorial](https://www.codecademy.com/learn/learn-git) +* [Git Game To Learn From Examples](https://learngitbranching.js.org/) +* [Git Resources to Learn More About Github](getting_started_github.md) +* [Git Resources Aimed Specifically toward QMK](contributing.md) + +### 日本語 + +_日本語のリソース情報を募集中です。_ + +## コマンドラインに関するリソース: + +### 英語 + +* [Good General Tutorial on Command Line](https://www.codecademy.com/learn/learn-the-command-line) + +### 日本語 + +_日本語のリソース情報を募集中です。_ diff --git a/docs/ja/newbs_testing_debugging.md b/docs/ja/newbs_testing_debugging.md new file mode 100644 index 000000000000..04905755ce9c --- /dev/null +++ b/docs/ja/newbs_testing_debugging.md @@ -0,0 +1,106 @@ +# テストとデバッグ + + + +カスタムファームウェアをキーボードへ書き込んだら、テストする準備が整います。運が良ければ全て問題なく動作しているはずですが、もしそうでなければこのドキュメントがどこが悪いのか調べるのに役立ちます。 + +## テスト + +通常、キーボードをテストするのは非常に簡単です。全てのキーをひとつずつ押して、期待されるキーが送信されていることを確認します。キーを押したことを見逃さないためのプログラムもあります。 + +メモ: これらのプログラムはQMKによって提供・承認されたものではありません。 + +* [QMK Configurator](https://config.qmk.fm/#/test/) (Web Based) +* [Switch Hitter](https://web.archive.org/web/20190413233743/https://elitekeyboards.com/switchhitter.php) (Windows Only) +* [Keyboard Viewer](https://www.imore.com/how-use-keyboard-viewer-your-mac) (Mac Only) +* [Keyboard Tester](http://www.keyboardtester.com) (Web Based) +* [Keyboard Checker](http://keyboardchecker.com) (Web Based) + +## デバッグ + +`rules.mk`へ`CONSOLE_ENABLE = yes`の設定をするとキーボードはデバッグ情報を出力します。デフォルトの出力は非常に限られたものですが、デバッグモードをオンにすることでデバッグ情報の量を増やすことが出来ます。キーマップの`DEBUG`キーコードを使用するか、デバッグモードを有効にする [Command](feature_command.md) 機能を使用するか、以下のコードをキーマップに追加します。 + +```c +void keyboard_post_init_user(void) { + // Customise these values to desired behaviour + debug_enable=true; + debug_matrix=true; + //debug_keyboard=true; + //debug_mouse=true; +} +``` + +### QMK Toolboxを使ったデバッグ + +互換性のある環境では、[QMK Toolbox](/~https://github.com/qmk/qmk_toolbox)を使うことでキーボードからのデバッグメッセージを表示できます。 + +### hid_listenを使ったデバッグ + +ターミナルベースの方法がお好みですか?PJRCが提供する[hid_listen](https://www.pjrc.com/teensy/hid_listen.html)もデバッグメッセージの表示に使用できます。ビルド済みの実行ファイルはWindows, Linux, MacOS用が用意されています。 + + + +## 独自のデバッグメッセージを送信する + +[custom code](custom_quantum_functions.md)内からデバッグメッセージを出力すると便利な場合があります。それはとても簡単です。ファイルの先頭に`print.h`のインクルードを追加します: + + #include + +そのあとは、いくつかの異なったprint関数を使用することが出来ます。 + +* `print("string")`: シンプルな文字列を出力します +* `uprintf("%s string", var)`: フォーマットされた文字列を出力します +* `dprint("string")` デバッグモードが有効な場合のみ、シンプルな文字列を出力します +* `dprintf("%s string", var)`: デバッグモードが有効な場合のみ、フォーマットされた文字列を出力します + +## デバッグの例 + +以下は現実世界での実際のデバッグ手法の例を集めたものです。追加情報は[Debugging/Troubleshooting QMK](faq_debug.md)を参照してください。 + +### マトリックス上のどの場所でキー押下が起こったか? + +移植する、PCBの問題を診断する場合、キー入力が正しくスキャンされているかどうかを確認することが役立つ場合があります。この手法でのロギングを有効化するには、`keymap.c`へ以下のコードを追加します。 + +```c +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + // コンソールが有効化されている場合、マトリックス上の位置とキー押下状態を出力します +#ifdef CONSOLE_ENABLE + uprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed); +#endif + return true; +} +``` + +出力の例 +```text +Waiting for device:....... +Listening: +KL: kc: 169, col: 0, row: 0, pressed: 1 +KL: kc: 169, col: 0, row: 0, pressed: 0 +KL: kc: 174, col: 1, row: 0, pressed: 1 +KL: kc: 174, col: 1, row: 0, pressed: 0 +KL: kc: 172, col: 2, row: 0, pressed: 1 +KL: kc: 172, col: 2, row: 0, pressed: 0 +``` + +### キースキャンにかかる時間の測定 + +パフォーマンスの問題をテストする場合、スイッチマトリックスをスキャンする頻度を知ることが役立ちます。この手法でのロギングを有効化するには`config.h`へ以下のコードを追加します。 + + +```c +#define DEBUG_MATRIX_SCAN_RATE +``` + +出力例 +```text + > matrix scan frequency: 315 + > matrix scan frequency: 313 + > matrix scan frequency: 316 + > matrix scan frequency: 316 + > matrix scan frequency: 316 + > matrix scan frequency: 316 +``` From af683fc2cac2811fa54dfca74f4cedc4278d0ba1 Mon Sep 17 00:00:00 2001 From: Xyverz Date: Mon, 11 Nov 2019 15:11:56 -0800 Subject: [PATCH 310/316] [Keymap] Added macro (#7331) Added MACLOCK macro, which sends CMD+CTRL+Q to perform a screen lock on macs running Mojave or newer. --- keyboards/atreus62/keymaps/xyverz/keymap.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/keyboards/atreus62/keymaps/xyverz/keymap.c b/keyboards/atreus62/keymaps/xyverz/keymap.c index 52b01885065b..4babed4c11f7 100644 --- a/keyboards/atreus62/keymaps/xyverz/keymap.c +++ b/keyboards/atreus62/keymaps/xyverz/keymap.c @@ -29,6 +29,7 @@ 0.5 - Converted keymap to LAYOUT standard. 0.6 - Swapped ESC and GRV in all layers. 0.7 - Brought code up to current standards. + 0.8 - Added MACLOCK macro. TODO: @@ -51,6 +52,7 @@ enum atreus52_keycodes { DVORAK = SAFE_RANGE, QWERTY, COLEMAK, WOW, DESTINY, LOW #define LOWER MO(_LOWER) #define RAISE MO(_RAISE) #define ADJUST MO(_ADJUST) +#define MACLOCK LGUI(LCTL(KC_Q)) // clang-format off const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -99,14 +101,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TILD, KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PIPE, KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, KC_PLUS, KC_LCBR, KC_RCBR, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, - _______, _______, KC_HOME, KC_END, _______, KC_DEL, _______, _______, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ + _______, _______, KC_HOME, KC_END, _______, KC_DEL, MACLOCK, _______, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ ), [_RAISE] = LAYOUT ( KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12, KC_TILD, KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BSLS, KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, KC_EQL, KC_LBRC, KC_RBRC, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, - _______, _______, KC_HOME, KC_END, _______, KC_DEL, _______, _______, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ + _______, _______, KC_HOME, KC_END, _______, KC_DEL, MACLOCK, _______, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ ), [_ADJUST] = LAYOUT ( _______, _______, _______, KC_F13, KC_F14, KC_F15, _______, _______, _______, _______, _______, _______, From e75919960fc53d16b6d8281018689aec3e62da1b Mon Sep 17 00:00:00 2001 From: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Mon, 11 Nov 2019 20:32:09 -0500 Subject: [PATCH 311/316] [Keymap] minor config changes (#7334) --- keyboards/hs60/v2/keymaps/stanrc85/config.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/keyboards/hs60/v2/keymaps/stanrc85/config.h b/keyboards/hs60/v2/keymaps/stanrc85/config.h index 5aab3098c7df..d61e6bde4f11 100644 --- a/keyboards/hs60/v2/keymaps/stanrc85/config.h +++ b/keyboards/hs60/v2/keymaps/stanrc85/config.h @@ -7,7 +7,7 @@ // disable backlight after timeout in minutes, 0 = no timeout #undef RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT -#define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 10 +#define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 20 #undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_0 #undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 @@ -39,3 +39,5 @@ #define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 } #define RGB_BACKLIGHT_COLOR_2 { .h = 150, .s = 255 } + +#define RGB_MATRIX_KEYPRESSES From 3f6426ff5f14d1cdac9af935aaf175d3dbca3592 Mon Sep 17 00:00:00 2001 From: Stephen Hogsten Date: Mon, 11 Nov 2019 18:27:20 -0800 Subject: [PATCH 312/316] disable deprecated actions (#7211) * disable deprecated actions * wrap no action with link time optimization test * fix link time optimization check --- quantum/template/avr/config.h | 7 +++++-- quantum/template/ps2avrgb/config.h | 6 ++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/quantum/template/avr/config.h b/quantum/template/avr/config.h index 304a54ae59a9..7e4a014495e4 100644 --- a/quantum/template/avr/config.h +++ b/quantum/template/avr/config.h @@ -190,9 +190,12 @@ along with this program. If not, see . //#define NO_ACTION_LAYER //#define NO_ACTION_TAPPING //#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION +/* disable these deprecated features by default */ +#ifndef LINK_TIME_OPTIMIZATION_ENABLE + #define NO_ACTION_MACRO + #define NO_ACTION_FUNCTION +#endif /* * MIDI options */ diff --git a/quantum/template/ps2avrgb/config.h b/quantum/template/ps2avrgb/config.h index f6d7c25e0449..4deb719f5a66 100644 --- a/quantum/template/ps2avrgb/config.h +++ b/quantum/template/ps2avrgb/config.h @@ -44,6 +44,12 @@ along with this program. If not, see . #define NO_UART 1 +/* disable these deprecated features by default */ +#ifndef LINK_TIME_OPTIMIZATION_ENABLE + #define NO_ACTION_MACRO + #define NO_ACTION_FUNCTION +#endif + /* key combination for magic key command */ /* defined by default; to change, uncomment and set to the combination you want */ // #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) From b252cce18fd474562510be5fc1e401287d747cd3 Mon Sep 17 00:00:00 2001 From: marhalloweenvt Date: Tue, 12 Nov 2019 12:04:35 +0700 Subject: [PATCH 313/316] [Keyboard] Add new keyboard Symmetry60 (#7327) * [Keyboard] Add new keyboard Symmetry60 * Add new keyboard Symmetry60 * Fix Typo * Update keyboards/handwired/symmetry60/config.h Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/handwired/symmetry60/readme.md Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/handwired/symmetry60/readme.md Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/handwired/symmetry60/readme.md Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/handwired/symmetry60/rules.mk Co-Authored-By: Drashna Jaelre * Update keyboards/handwired/symmetry60/symmetry60.h Co-Authored-By: Drashna Jaelre * Update keyboards/handwired/symmetry60/symmetry60.h Co-Authored-By: Drashna Jaelre * Update keyboards/handwired/symmetry60/symmetry60.h Co-Authored-By: Drashna Jaelre * Update readme.md * Update keymap.c * Update keymap.c * Update keymap.c * Update rules.mk * Update symmetry60.c * Update keyboards/handwired/symmetry60/rules.mk Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> --- keyboards/handwired/symmetry60/config.h | 71 ++++++++++++++++ keyboards/handwired/symmetry60/info.json | 83 +++++++++++++++++++ .../symmetry60/keymaps/default/config.h | 19 +++++ .../symmetry60/keymaps/default/keymap.c | 26 ++++++ .../symmetry60/keymaps/default/readme.md | 1 + keyboards/handwired/symmetry60/readme.md | 13 +++ keyboards/handwired/symmetry60/rules.mk | 36 ++++++++ keyboards/handwired/symmetry60/symmetry60.c | 16 ++++ keyboards/handwired/symmetry60/symmetry60.h | 42 ++++++++++ 9 files changed, 307 insertions(+) create mode 100644 keyboards/handwired/symmetry60/config.h create mode 100644 keyboards/handwired/symmetry60/info.json create mode 100644 keyboards/handwired/symmetry60/keymaps/default/config.h create mode 100644 keyboards/handwired/symmetry60/keymaps/default/keymap.c create mode 100644 keyboards/handwired/symmetry60/keymaps/default/readme.md create mode 100644 keyboards/handwired/symmetry60/readme.md create mode 100644 keyboards/handwired/symmetry60/rules.mk create mode 100644 keyboards/handwired/symmetry60/symmetry60.c create mode 100644 keyboards/handwired/symmetry60/symmetry60.h diff --git a/keyboards/handwired/symmetry60/config.h b/keyboards/handwired/symmetry60/config.h new file mode 100644 index 000000000000..ee72208afc7c --- /dev/null +++ b/keyboards/handwired/symmetry60/config.h @@ -0,0 +1,71 @@ +/* +Copyright 2019 Marhalloweenvt + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Marhalloweenvt +#define PRODUCT Symmetry60 +#define DESCRIPTION A Boardwalk-inspired keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } +#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, B6, B5, B4, D7, D6, D4, E6 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define RGB_DI_PIN B1 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 14 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 diff --git a/keyboards/handwired/symmetry60/info.json b/keyboards/handwired/symmetry60/info.json new file mode 100644 index 000000000000..f33c28b0c5c9 --- /dev/null +++ b/keyboards/handwired/symmetry60/info.json @@ -0,0 +1,83 @@ +{ + "Keyboard_name": "Symmetry60", + "url": "", + "maintainer": "marhalloweenvt", + "width": 14, + "height": 5, + "layouts": { + "LAYOUT_ortho_5x14": { + "layout": [ + {"label":"K00", "x":0, "y":0, "w":1.5}, + {"label":"K01", "x":1.5, "y":0}, + {"label":"K02", "x":2.5, "y":0}, + {"label":"K03", "x":3.5, "y":0}, + {"label":"K04", "x":4.5, "y":0}, + {"label":"K05", "x":5.5, "y":0}, + {"label":"K06", "x":6.5, "y":0}, + {"label":"K07", "x":7.5, "y":0}, + {"label":"K08", "x":8.5, "y":0}, + {"label":"K09", "x":9.5, "y":0}, + {"label":"K0A", "x":10.5, "y":0}, + {"label":"K0B", "x":11.5, "y":0}, + {"label":"K0C", "x":12.5, "y":0}, + {"label":"K0D", "x":13.5, "y":0, "w":1.5}, + {"label":"K10", "x":0, "y":1, "w":1.5}, + {"label":"K11", "x":1.5, "y":1}, + {"label":"K12", "x":2.5, "y":1}, + {"label":"K13", "x":3.5, "y":1}, + {"label":"K14", "x":4.5, "y":1}, + {"label":"K15", "x":5.5, "y":1}, + {"label":"K16", "x":6.5, "y":1}, + {"label":"K17", "x":7.5, "y":1}, + {"label":"K18", "x":8.5, "y":1}, + {"label":"K19", "x":9.5, "y":1}, + {"label":"K1A", "x":10.5, "y":1}, + {"label":"K1B", "x":11.5, "y":1}, + {"label":"K1C", "x":12.5, "y":1}, + {"label":"K1D", "x":13.5, "y":1, "w":1.5}, + {"label":"K20", "x":0, "y":2, "w":1.5}, + {"label":"K21", "x":1.5, "y":2}, + {"label":"K22", "x":2.5, "y":2}, + {"label":"K23", "x":3.5, "y":2}, + {"label":"K24", "x":4.5, "y":2}, + {"label":"K25", "x":5.5, "y":2}, + {"label":"K26", "x":6.5, "y":2}, + {"label":"K27", "x":7.5, "y":2}, + {"label":"K28", "x":8.5, "y":2}, + {"label":"K29", "x":9.5, "y":2}, + {"label":"K2A", "x":10.5, "y":2}, + {"label":"K2B", "x":11.5, "y":2}, + {"label":"K2C", "x":12.5, "y":2}, + {"label":"K2D", "x":13.5, "y":2, "w":1.5}, + {"label":"K30", "x":0, "y":3, "w":1.5}, + {"label":"K31", "x":1.5, "y":3}, + {"label":"K32", "x":2.5, "y":3}, + {"label":"K33", "x":3.5, "y":3}, + {"label":"K34", "x":4.5, "y":3}, + {"label":"K35", "x":5.5, "y":3}, + {"label":"K36", "x":6.5, "y":3}, + {"label":"K37", "x":7.5, "y":3}, + {"label":"K38", "x":8.5, "y":3}, + {"label":"K39", "x":9.5, "y":3}, + {"label":"K3A", "x":10.5, "y":3}, + {"label":"K3B", "x":11.5, "y":3}, + {"label":"K3C", "x":12.5, "y":3}, + {"label":"K3D", "x":13.5, "y":3, "w":1.5}, + {"label":"K40", "x":0, "y":4, "w":1.5}, + {"label":"K41", "x":1.5, "y":4}, + {"label":"K42", "x":2.5, "y":4}, + {"label":"K43", "x":3.5, "y":4}, + {"label":"K44", "x":4.5, "y":4}, + {"label":"K45", "x":5.5, "y":4}, + {"label":"K46", "x":6.5, "y":4}, + {"label":"K47", "x":7.5, "y":4}, + {"label":"K48", "x":8.5, "y":4}, + {"label":"K49", "x":9.5, "y":4}, + {"label":"K4A", "x":10.5, "y":4}, + {"label":"K4B", "x":11.5, "y":4}, + {"label":"K4C", "x":12.5, "y":4}, + {"label":"K4D", "x":13.5, "y":4, "w":1.5} + ] + } + } +} diff --git a/keyboards/handwired/symmetry60/keymaps/default/config.h b/keyboards/handwired/symmetry60/keymaps/default/config.h new file mode 100644 index 000000000000..7b52e1dd0374 --- /dev/null +++ b/keyboards/handwired/symmetry60/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 marhalloweenvt + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/handwired/symmetry60/keymaps/default/keymap.c b/keyboards/handwired/symmetry60/keymaps/default/keymap.c new file mode 100644 index 000000000000..696069895124 --- /dev/null +++ b/keyboards/handwired/symmetry60/keymaps/default/keymap.c @@ -0,0 +1,26 @@ +/* Copyright 2019 marhalloweenvt + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ortho_5x14( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_DEL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_RCTL + ), +}; diff --git a/keyboards/handwired/symmetry60/keymaps/default/readme.md b/keyboards/handwired/symmetry60/keymaps/default/readme.md new file mode 100644 index 000000000000..db25aa3bf21a --- /dev/null +++ b/keyboards/handwired/symmetry60/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for symmetry60 diff --git a/keyboards/handwired/symmetry60/readme.md b/keyboards/handwired/symmetry60/readme.md new file mode 100644 index 000000000000..5a4de934fe53 --- /dev/null +++ b/keyboards/handwired/symmetry60/readme.md @@ -0,0 +1,13 @@ +# SYMMETRY60 + +A keyboard inspired by Boardwalk + +* Keyboard Maintainer: [marhalloweenvt](/~https://github.com/marhalloweenvt) +* Hardware Supported: Symmetry60 PCB +* Hardware Availability: Symmetry60 PCB + +Make example for this keyboard (after setting up your build environment): + + make handwired/symmetry60:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/handwired/symmetry60/rules.mk b/keyboards/handwired/symmetry60/rules.mk new file mode 100644 index 000000000000..6830cc690553 --- /dev/null +++ b/keyboards/handwired/symmetry60/rules.mk @@ -0,0 +1,36 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: /~https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs +LTO_ENABLE = yes # Use link time optimization + +LAYOUTS = ortho_5x14 diff --git a/keyboards/handwired/symmetry60/symmetry60.c b/keyboards/handwired/symmetry60/symmetry60.c new file mode 100644 index 000000000000..70828297c7f7 --- /dev/null +++ b/keyboards/handwired/symmetry60/symmetry60.c @@ -0,0 +1,16 @@ +/* Copyright 2019 marhalloweenvt + * + * 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 . + */ +#include "symmetry60.h" diff --git a/keyboards/handwired/symmetry60/symmetry60.h b/keyboards/handwired/symmetry60/symmetry60.h new file mode 100644 index 000000000000..138e5bb2342f --- /dev/null +++ b/keyboards/handwired/symmetry60/symmetry60.h @@ -0,0 +1,42 @@ +/* Copyright 2019 marhalloweenvt + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_ortho_5x14( \ + 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, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D \ +) \ +{ \ + { 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, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D }, \ +} + From 5421ba11dedd9912967b1fa5ed1f664687221143 Mon Sep 17 00:00:00 2001 From: skullY Date: Tue, 12 Nov 2019 17:17:12 -0800 Subject: [PATCH 314/316] Add support for newer versions of clang-format, if installed --- lib/python/qmk/cli/cformat.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/python/qmk/cli/cformat.py b/lib/python/qmk/cli/cformat.py index d2382bdbdeab..17ca91b3b508 100644 --- a/lib/python/qmk/cli/cformat.py +++ b/lib/python/qmk/cli/cformat.py @@ -2,6 +2,7 @@ """ import os import subprocess +from shutil import which from milc import cli @@ -11,10 +12,18 @@ def cformat(cli): """Format C code according to QMK's style. """ + # Determine which version of clang-format to use clang_format = ['clang-format', '-i'] + for clang_version in [10, 9, 8, 7]: + binary = 'clang-format-%d' % clang_version + if which(binary): + clang_format[0] = binary + break # Find the list of files to format - if not cli.args.files: + if cli.args.files: + cli.args.files = [os.path.join(os.environ['ORIG_CWD'], file) for file in cli.args.files] + else: for dir in ['drivers', 'quantum', 'tests', 'tmk_core']: for dirpath, dirnames, filenames in os.walk(dir): if 'tmk_core/protocol/usb_hid' in dirpath: From d1b6c11b7f4cc24c50d2b640a94925acf6450da6 Mon Sep 17 00:00:00 2001 From: skullY Date: Tue, 12 Nov 2019 17:21:33 -0800 Subject: [PATCH 315/316] When checking program returncodes treat both 0 and 1 as installed --- lib/python/qmk/cli/doctor.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/python/qmk/cli/doctor.py b/lib/python/qmk/cli/doctor.py index 309de0c6712a..c2723bfcbbdc 100755 --- a/lib/python/qmk/cli/doctor.py +++ b/lib/python/qmk/cli/doctor.py @@ -24,8 +24,7 @@ def doctor(cli): cli.log.info('QMK Doctor is checking your environment.') # Make sure the basic CLI tools we need are available and can be executed. - binaries = ['dfu-programmer', 'avrdude', 'dfu-util', 'avr-gcc', 'arm-none-eabi-gcc'] - binaries += glob('bin/qmk-*') + binaries = ['dfu-programmer', 'avrdude', 'dfu-util', 'avr-gcc', 'arm-none-eabi-gcc', 'bin/qmk'] ok = True for binary in binaries: @@ -34,10 +33,10 @@ def doctor(cli): cli.log.error("{fg_red}QMK can't find %s in your path.", binary) ok = False else: - try: - subprocess.run([binary, '--version'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=5, check=True) + check = subprocess.run([binary, '--version'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=5) + if check.returncode in [0, 1]: cli.log.info('Found {fg_cyan}%s', binary) - except subprocess.CalledProcessError: + else: cli.log.error("{fg_red}Can't run `%s --version`", binary) ok = False From 79edb7c5942108774e667c172550a1519c5543ac Mon Sep 17 00:00:00 2001 From: skullY Date: Tue, 12 Nov 2019 17:27:08 -0800 Subject: [PATCH 316/316] Small CLI cleanups * yapf changes * Fix the cformat test * Make the normpath test work when run from / * `qmk config`: Mark `--read-only` as arg_only --- lib/python/qmk/cli/config.py | 2 +- lib/python/qmk/cli/list/keyboards.py | 1 + lib/python/qmk/errors.py | 1 - lib/python/qmk/tests/attrdict.py | 1 - lib/python/qmk/tests/test_cli_commands.py | 2 +- lib/python/qmk/tests/test_qmk_path.py | 2 +- 6 files changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/python/qmk/cli/config.py b/lib/python/qmk/cli/config.py index d6c774e65164..c4ee20cba5bd 100644 --- a/lib/python/qmk/cli/config.py +++ b/lib/python/qmk/cli/config.py @@ -12,7 +12,7 @@ def print_config(section, key): cli.echo('%s.%s{fg_cyan}={fg_reset}%s', section, key, cli.config[section][key]) -@cli.argument('-ro', '--read-only', action='store_true', help='Operate in read-only mode.') +@cli.argument('-ro', '--read-only', arg_only=True, action='store_true', help='Operate in read-only mode.') @cli.argument('configs', nargs='*', arg_only=True, help='Configuration options to read or write.') @cli.subcommand("Read and write configuration settings.") def config(cli): diff --git a/lib/python/qmk/cli/list/keyboards.py b/lib/python/qmk/cli/list/keyboards.py index 53a7af75c668..2a29ccb146a7 100644 --- a/lib/python/qmk/cli/list/keyboards.py +++ b/lib/python/qmk/cli/list/keyboards.py @@ -6,6 +6,7 @@ from milc import cli + @cli.subcommand("List the keyboards currently defined within QMK") def list_keyboards(cli): """List the keyboards currently defined within QMK diff --git a/lib/python/qmk/errors.py b/lib/python/qmk/errors.py index f9bf5b9af9e1..4a8a91556b80 100644 --- a/lib/python/qmk/errors.py +++ b/lib/python/qmk/errors.py @@ -1,6 +1,5 @@ class NoSuchKeyboardError(Exception): """Raised when we can't find a keyboard/keymap directory. """ - def __init__(self, message): self.message = message diff --git a/lib/python/qmk/tests/attrdict.py b/lib/python/qmk/tests/attrdict.py index 391c75c4e1c8..a2584b923337 100644 --- a/lib/python/qmk/tests/attrdict.py +++ b/lib/python/qmk/tests/attrdict.py @@ -3,7 +3,6 @@ class AttrDict(dict): This should only be used to mock objects for unit testing. Please do not use this outside of qmk.tests. """ - def __init__(self, *args, **kwargs): super(AttrDict, self).__init__(*args, **kwargs) self.__dict__ = self diff --git a/lib/python/qmk/tests/test_cli_commands.py b/lib/python/qmk/tests/test_cli_commands.py index 9a9dc4b958af..55b8d253f7ff 100644 --- a/lib/python/qmk/tests/test_cli_commands.py +++ b/lib/python/qmk/tests/test_cli_commands.py @@ -7,7 +7,7 @@ def check_subcommand(command, *args): def test_cformat(): - assert check_subcommand('cformat', 'tmk_core/common/backlight.c').returncode == 0 + assert check_subcommand('cformat', 'tmk_core/common/keyboard.c').returncode == 0 def test_compile(): diff --git a/lib/python/qmk/tests/test_qmk_path.py b/lib/python/qmk/tests/test_qmk_path.py index 94dbf3a6a6a2..d6961a0f652f 100644 --- a/lib/python/qmk/tests/test_qmk_path.py +++ b/lib/python/qmk/tests/test_qmk_path.py @@ -10,4 +10,4 @@ def test_keymap_onekey_pytest(): def test_normpath(): path = qmk.path.normpath('lib/python') - assert path == os.environ['ORIG_CWD'] + '/lib/python' + assert path == os.path.join(os.environ['ORIG_CWD'], 'lib/python')