From e5f201edb426b01537abd659e1ca317260d87654 Mon Sep 17 00:00:00 2001 From: Biacco42 Date: Sun, 12 Aug 2018 05:22:32 +0900 Subject: Keymap: Port ergo42/biacco keymap to Helix pico (#3585) * Port ergo42/biacco keymap to Helix pico * Fix for review --- keyboards/helix/pico/keymaps/biacco/config.h | 29 +++++++ keyboards/helix/pico/keymaps/biacco/keymap.c | 118 +++++++++++++++++++++++++ keyboards/helix/pico/keymaps/biacco/rules.mk | 125 +++++++++++++++++++++++++++ 3 files changed, 272 insertions(+) create mode 100644 keyboards/helix/pico/keymaps/biacco/config.h create mode 100644 keyboards/helix/pico/keymaps/biacco/keymap.c create mode 100644 keyboards/helix/pico/keymaps/biacco/rules.mk (limited to 'keyboards/helix/pico') diff --git a/keyboards/helix/pico/keymaps/biacco/config.h b/keyboards/helix/pico/keymaps/biacco/config.h new file mode 100644 index 000000000..776eecfb6 --- /dev/null +++ b/keyboards/helix/pico/keymaps/biacco/config.h @@ -0,0 +1,29 @@ +/* +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 + +// place overrides here + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(STARTUP_SOUND) + #define AUDIO_CLICKY +#endif + diff --git a/keyboards/helix/pico/keymaps/biacco/keymap.c b/keyboards/helix/pico/keymaps/biacco/keymap.c new file mode 100644 index 000000000..b4ee4fcaa --- /dev/null +++ b/keyboards/helix/pico/keymaps/biacco/keymap.c @@ -0,0 +1,118 @@ +#include QMK_KEYBOARD_H +#include "bootloader.h" +#ifdef PROTOCOL_LUFA +#include "lufa.h" +#include "split_util.h" +#endif +#ifdef AUDIO_ENABLE + #include "audio.h" +#endif +#ifdef SSD1306OLED + #include "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 { + BASE = 0, + META, + SYMB, + GAME +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO +//Macros + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Qwerty + * ,-----------------------------------------. ,-----------------------------------------. + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | @ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Alt | A | S | D | F | G | | H | J | K | L | ; | : | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | | N | M | , | . | / |\/Sft | + * |------+------+------+------+------+------+-------------+------+------+------+------+------+------| + * | Ctrl | GUI | App | PrtSc| ESC/ |Space/|Tab/ |Back |Enter/| Del |PrtSc |=>GAME|=>SYMB| \ | + * | | | | | ~SYMB|RCtrl |Shift |Space |~META | | | | | | + * `-------------------------------------------------------------------------------------------------' + */ + +[BASE] = LAYOUT( \ + 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_LALT, 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_T(KC_RO) , \ + KC_LCTL, KC_LGUI, KC_APP, KC_PSCR, LT(SYMB, KC_ESC), RCTL_T(KC_SPC), SFT_T(KC_TAB), KC_BSPC, LT(META, KC_ENT), KC_DELT, KC_PSCR, TG(GAME), TG(SYMB), KC_JYEN \ + ), + + /* META + * ,-----------------------------------------. ,-----------------------------------------. + * | 1 | 2 | 3 | 4 | 5 | 6 | | 7 | 8 | 9 | 0 | - | ^ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Alt | F1 | |Muhen | Henk | | | Left | Down | Up |Right | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Sft | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 |\/Sft | + * |------+------+------+------+------+------+-------------+------+------+------+------+------+------| + * | Ctrl | GUI | App |PrtSc |ESC/ |Space/|Tab/ |Back |Enter/| Del |Reset |=>GAME|=>SYMB| \ | + * | | | | |~SYMB |RCtrl |Shift |Space |~META | | | | | | + * `-------------------------------------------------------------------------------------------------' + */ + [META] = LAYOUT( \ + 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_F1, XXXXXXX, KC_MHEN, KC_HENK, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, XXXXXXX, \ + _______, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, SFT_T(KC_RO), \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, _______, _______ \ + ), + + /* SYMB + * ,-----------------------------------------. ,-----------------------------------------. + * | ! | " | # | $ | % | & | | ' | ( | ) | ~ | = | ~ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Alt | | | | | | | ( | ) | { | } | + | * | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Sft | | | | | | | [ | ] | < | > | ? | \ | + * |------+------+------+------+------+------+-------------+------+------+------+------+------+------| + * | Ctrl | GUI | App |PrtSc |ESC/ |Space/|Tab/ |Back |Enter/| Del |PrtSc |=>GAME|=>SYMB| \ | + * | | | | |~SYMB |RCtrl |Shift |Space |~META | | | | | | + * `-------------------------------------------------------------------------------------------------' + */ + [SYMB] = LAYOUT( \ + 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), S(KC_MINS), S(KC_EQL), \ + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, S(KC_8), S(KC_9), S(KC_RBRC), S(KC_BSLS), S(KC_SCLN), S(KC_QUOT), \ + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RBRC, KC_BSLS, S(KC_COMM), S(KC_DOT), S(KC_SLSH), S(KC_RO), \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + + /* GAME + * ,-----------------------------------------. ,-----------------------------------------. + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | @ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Alt | A | S | D | F | G | | H | J | K | L | ; | : | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Sft | Z | X | C | V | B | | N | M | , | . | / |\/Sft | + * |------+------+------+------+------+------+-------------+------+------+------+------+------+------| + * | Ctrl | GUI | App |PrtSc | ESC |Space |Tab |Back |Enter | Del |PrtSc |=>GAME|=>SYMB| \ | + * | | | | | | | |Space | | | | | | | + * `-------------------------------------------------------------------------------------------------' + */ + [GAME] = LAYOUT( \ + 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_LALT, 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_T(KC_RO), \ + KC_LCTRL, KC_LGUI, KC_APP, KC_PSCR, KC_ESC, KC_SPC, KC_TAB, KC_BSPC, KC_ENT, KC_DELT, KC_PSCR, _______, _______, KC_JYEN \ + ) + +}; diff --git a/keyboards/helix/pico/keymaps/biacco/rules.mk b/keyboards/helix/pico/keymaps/biacco/rules.mk new file mode 100644 index 000000000..0a720002d --- /dev/null +++ b/keyboards/helix/pico/keymaps/biacco/rules.mk @@ -0,0 +1,125 @@ + +# 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 = 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. Do not enable this with audio at the same time. +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 += -DRGBLIGHT_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 ) -- cgit v1.2.3 From 743449472e58651ec8111e6f70811103fb0a28bd Mon Sep 17 00:00:00 2001 From: Joe Wasson Date: Mon, 17 Sep 2018 10:48:02 -0700 Subject: Make `PREVENT_STUCK_MODIFIERS` the default (#3107) * Remove chording as it is not documented, not used, and needs work. * Make Leader Key an optional feature. * Switch from `PREVENT_STUCK_MODIFIERS` to `STRICT_LAYER_RELEASE` * Remove `#define PREVENT_STUCK_MODIFIERS` from keymaps. --- keyboards/helix/pico/config.h | 1 - 1 file changed, 1 deletion(-) (limited to 'keyboards/helix/pico') diff --git a/keyboards/helix/pico/config.h b/keyboards/helix/pico/config.h index b49f0173b..41edfcbc2 100644 --- a/keyboards/helix/pico/config.h +++ b/keyboards/helix/pico/config.h @@ -28,7 +28,6 @@ along with this program. If not, see . #define DESCRIPTION A split keyboard for the cheap makers -#define PREVENT_STUCK_MODIFIERS #define TAPPING_FORCE_HOLD #define TAPPING_TERM 100 -- cgit v1.2.3 From 79bff502471d8fd534e9266954a184aa0f7d55c3 Mon Sep 17 00:00:00 2001 From: MakotoKurauchi Date: Thu, 11 Oct 2018 04:53:18 +0900 Subject: Keymaps: Helix rgblight mode update (#4091) * Helix each keymap's using rgblight mode symbol instead magic number No change in build result. * Helix pico keymaps: make rgblight modes selectable. No change in build result. * Helix rev2 keymaps: make rgblight modes selectable. No change in build result. * fixed Helix froggy/keymap.c: invalid rgblight mode value 0 to 1 (=RGBLIGHT_MODE_STATIC_LIGHT) * Deselect RGB_TEST and ALTERNATING in Helix rev2,pico keymaps config.h. --- keyboards/helix/pico/keymaps/biacco/config.h | 14 ++++++++++++++ keyboards/helix/pico/keymaps/biacco/rules.mk | 2 +- keyboards/helix/pico/keymaps/default/config.h | 15 +++++++++++++++ keyboards/helix/pico/keymaps/default/keymap.c | 4 ++-- keyboards/helix/pico/keymaps/default/rules.mk | 2 +- 5 files changed, 33 insertions(+), 4 deletions(-) (limited to 'keyboards/helix/pico') diff --git a/keyboards/helix/pico/keymaps/biacco/config.h b/keyboards/helix/pico/keymaps/biacco/config.h index 776eecfb6..765318519 100644 --- a/keyboards/helix/pico/keymaps/biacco/config.h +++ b/keyboards/helix/pico/keymaps/biacco/config.h @@ -27,3 +27,17 @@ along with this program. If not, see . #define AUDIO_CLICKY #endif +// If you need more program area, try select and reduce rgblight modes to use. + +// 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/helix/pico/keymaps/biacco/rules.mk b/keyboards/helix/pico/keymaps/biacco/rules.mk index 0a720002d..4f264fa95 100644 --- a/keyboards/helix/pico/keymaps/biacco/rules.mk +++ b/keyboards/helix/pico/keymaps/biacco/rules.mk @@ -92,7 +92,7 @@ ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) endif ifeq ($(strip $(LED_ANIMATIONS)), yes) - OPT_DEFS += -DRGBLIGHT_ANIMATIONS + OPT_DEFS += -DLED_ANIMATIONS endif ifeq ($(strip $(OLED_ENABLE)), yes) diff --git a/keyboards/helix/pico/keymaps/default/config.h b/keyboards/helix/pico/keymaps/default/config.h index 6084b0970..20dfc9f98 100644 --- a/keyboards/helix/pico/keymaps/default/config.h +++ b/keyboards/helix/pico/keymaps/default/config.h @@ -28,4 +28,19 @@ along with this program. If not, see . #define AUDIO_CLICKY #endif +// If you need more program area, try select and reduce rgblight modes to use. + +// 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 + #endif /* CONFIG_USER_H */ diff --git a/keyboards/helix/pico/keymaps/default/keymap.c b/keyboards/helix/pico/keymaps/default/keymap.c index 75221d485..4c5878517 100644 --- a/keyboards/helix/pico/keymaps/default/keymap.c +++ b/keyboards/helix/pico/keymaps/default/keymap.c @@ -238,7 +238,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } else { TOG_STATUS = !TOG_STATUS; #ifdef RGBLIGHT_ENABLE - //rgblight_mode(16); + //rgblight_mode(RGBLIGHT_MODE_SNAKE + 1); #endif } layer_on(_LOWER); @@ -261,7 +261,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } else { TOG_STATUS = !TOG_STATUS; #ifdef RGBLIGHT_ENABLE - //rgblight_mode(15); + //rgblight_mode(RGBLIGHT_MODE_SNAKE); #endif } layer_on(_RAISE); diff --git a/keyboards/helix/pico/keymaps/default/rules.mk b/keyboards/helix/pico/keymaps/default/rules.mk index afb124068..b1e219537 100644 --- a/keyboards/helix/pico/keymaps/default/rules.mk +++ b/keyboards/helix/pico/keymaps/default/rules.mk @@ -92,7 +92,7 @@ ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) endif ifeq ($(strip $(LED_ANIMATIONS)), yes) - OPT_DEFS += -DRGBLIGHT_ANIMATIONS + OPT_DEFS += -DLED_ANIMATIONS endif ifeq ($(strip $(OLED_ENABLE)), yes) -- cgit v1.2.3 From 4665e4ffffcdfc6fe6f498928963adc64f6fefd7 Mon Sep 17 00:00:00 2001 From: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Tue, 23 Oct 2018 03:38:05 +0900 Subject: Keyboard: Helix serial.c, split_scom.c bug fix and update (#4191) * helix/serial.c add support PD1,PD3,PE6 and configuration simplify * Add comment about ATmega32U4 I2C * Add compile time check for ATmega32U4 I2C * change TAB code to 8 SPACE code * Helix serial.c PORTD,PD0 test. OK OK PD0 - PD1 OK PD2 - PD3 - PE6 * Helix serial.c PORTD,PD1 test. OK OK PD0 OK PD1 OK PD2 - PD3 - PE6 * Helix serial.c PORTD,PD3 test. OK OK PD0 OK PD1 OK PD2 OK PD3 - PE6 * Helix serial.c PORTE,PD6 test. OK OK PD0 OK PD1 OK PD2 OK PD3 OK PE6 * Helix serial.c: PD0,PD1,PD3,PE6 all test end * Helix serial.c: rename SOFT_SERIAL_PORT to SOFT_SERIAL_PIN * Helix serial.c add debug code * Helix serial.c: add transaction ID range check * Helix serial.c debug code update * Helix serial.c debug code update * Helix serial.c: Strict checking of the value of tid. * adjust the delay of serial.c * Helix serial.c: remove debug code * remove EXTRAFLAGS += -DCONSOLE_ENABLE from five_rows/rules.mk tmk_core/common.mk has >ifeq ($(strip $(CONSOLE_ENABLE)), yes) > TMK_COMMON_DEFS += -DCONSOLE_ENABLE * Fix error handling in split_scomm.c * add some comment to serial.c * add some comment about SELECT_SOFT_SERIAL_SPEED --- keyboards/helix/pico/serial_config.h | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'keyboards/helix/pico') diff --git a/keyboards/helix/pico/serial_config.h b/keyboards/helix/pico/serial_config.h index 82c6e4e83..fc8736d47 100644 --- a/keyboards/helix/pico/serial_config.h +++ b/keyboards/helix/pico/serial_config.h @@ -1,16 +1,9 @@ -#ifndef SOFT_SERIAL_CONFIG_H -#define SOFT_SERIAL_CONFIG_H +//// #error rev2 serial config +#ifndef SOFT_SERIAL_PIN /* Soft Serial defines */ -#define SERIAL_PIN_DDR DDRD -#define SERIAL_PIN_PORT PORTD -#define SERIAL_PIN_INPUT PIND -#define SERIAL_PIN_MASK _BV(PD2) -#define SERIAL_PIN_INTERRUPT INT2_vect +#define SOFT_SERIAL_PIN D2 #define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 #define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2 - -//// #error rev2 serial config - -#endif /* SOFT_SERIAL_CONFIG_H */ +#endif -- cgit v1.2.3 From 00b6f14821f44ead75504e28d7fed26791cb2875 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Mon, 22 Oct 2018 08:57:37 -0700 Subject: Replace outdated RGB/Audio information --- keyboards/helix/pico/keymaps/biacco/rules.mk | 2 +- keyboards/helix/pico/keymaps/default/rules.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'keyboards/helix/pico') diff --git a/keyboards/helix/pico/keymaps/biacco/rules.mk b/keyboards/helix/pico/keymaps/biacco/rules.mk index 4f264fa95..d6b36580e 100644 --- a/keyboards/helix/pico/keymaps/biacco/rules.mk +++ b/keyboards/helix/pico/keymaps/biacco/rules.mk @@ -14,7 +14,7 @@ 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. Do not enable this with audio at the same time. +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SWAP_HANDS_ENABLE = no # Enable one-hand typing define HELIX_CUSTOMISE_MSG diff --git a/keyboards/helix/pico/keymaps/default/rules.mk b/keyboards/helix/pico/keymaps/default/rules.mk index b1e219537..c5ee8acb2 100644 --- a/keyboards/helix/pico/keymaps/default/rules.mk +++ b/keyboards/helix/pico/keymaps/default/rules.mk @@ -14,7 +14,7 @@ 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. Do not enable this with audio at the same time. +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SWAP_HANDS_ENABLE = no # Enable one-hand typing define HELIX_CUSTOMISE_MSG -- cgit v1.2.3 From 7e99d869deb57251dc15620beff34d5fd53066e4 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Mon, 22 Oct 2018 10:26:19 -0700 Subject: Remove all of the deprecated RGB defines Fixes #3641 --- keyboards/helix/pico/config.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'keyboards/helix/pico') diff --git a/keyboards/helix/pico/config.h b/keyboards/helix/pico/config.h index 41edfcbc2..b8822e227 100644 --- a/keyboards/helix/pico/config.h +++ b/keyboards/helix/pico/config.h @@ -83,10 +83,8 @@ along with this program. If not, see . /* ws2812 RGB LED */ #define RGB_DI_PIN D3 -#define RGBLIGHT_TIMER + //#define RGBLED_NUM 12 // Number of LEDs. see ./keymaps/default/config.h -#define ws2812_PORTREG PORTD -#define ws2812_DDRREG DDRD // Helix keyboard RGB LED support //#define RGBLIGHT_ANIMATIONS : see ./rules.mk: LED_ANIMATIONS = yes or no -- cgit v1.2.3 From 2b7decbaeb020c5320ada182552e633deec77ff7 Mon Sep 17 00:00:00 2001 From: comaid <44457151+comaid@users.noreply.github.com> Date: Tue, 13 Nov 2018 05:20:50 +0900 Subject: Fix up screen off timer of helix (#4347) * Fix up screen off timer of helix * Fix Up ScreenOffInterval exceeded uint16_t * Fix Up never waking up once screen off if in case of matrix are not dirty * Changing referenIng incorrect constant name * OLED_ENABLED => SSD1306OLED * Improve internal processing of process_record_kb() * Use the return value of process_record_gfx() * Move a include statement into #ifdef block Move #include "ssd1306.h` statement into #ifdef block * Move process_record_kbI() Move process_record_kb() from helix.c to rev1.c/rev2.c/pico.c * Move process_record_kb() --- keyboards/helix/pico/pico.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'keyboards/helix/pico') diff --git a/keyboards/helix/pico/pico.c b/keyboards/helix/pico/pico.c index 5e248ccff..bb8ba9ca2 100644 --- a/keyboards/helix/pico/pico.c +++ b/keyboards/helix/pico/pico.c @@ -2,6 +2,12 @@ #ifdef SSD1306OLED +#include "ssd1306.h" + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + return process_record_gfx(keycode,record) && 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); -- cgit v1.2.3 From a054b5a06c00cf148fa416fae8f5a56586a10876 Mon Sep 17 00:00:00 2001 From: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Wed, 28 Nov 2018 00:22:47 +0900 Subject: Fix Helix ws2812.c listed more than once warning. (#4499) Remove `SRC += ws2812.c` from helix/rev2/rules.mk and helix/pico/rules.mk. Because it will be added in common_features.mk. --- keyboards/helix/pico/rules.mk | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'keyboards/helix/pico') diff --git a/keyboards/helix/pico/rules.mk b/keyboards/helix/pico/rules.mk index c994ac8de..75bf0a5ef 100644 --- a/keyboards/helix/pico/rules.mk +++ b/keyboards/helix/pico/rules.mk @@ -1,3 +1,2 @@ -SRC += pico/matrix.c \ - pico/split_util.c \ - ws2812.c +SRC += pico/matrix.c +SRC += pico/split_util.c -- cgit v1.2.3 From 19043197459c5c8ed4a7039f1a4c1da180da45e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Wed, 28 Nov 2018 00:34:06 +0100 Subject: Remove RGB_SMOD alias and replace uses with RGB_MOD (#4319) --- keyboards/helix/pico/keymaps/default/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards/helix/pico') diff --git a/keyboards/helix/pico/keymaps/default/keymap.c b/keyboards/helix/pico/keymaps/default/keymap.c index 4c5878517..5273bb4a0 100644 --- a/keyboards/helix/pico/keymaps/default/keymap.c +++ b/keyboards/helix/pico/keymaps/default/keymap.c @@ -164,7 +164,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, AU_ON, AU_OFF, MU_TOG, MU_MOD, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ _______, CK_TOGG, CK_RST, CK_UP, CK_DOWN, _______, _______, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SMOD,RGB_HUD, RGB_SAD, RGB_VAD \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD \ ) }; -- cgit v1.2.3 From 29830f306f682f731d64950eba43953d95503967 Mon Sep 17 00:00:00 2001 From: MakotoKurauchi Date: Fri, 21 Dec 2018 01:55:03 +0900 Subject: Keyboard: Pr/helixpico add layout kc (#4686) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add some comment about Helix customize and auto-setup RGBLIGHT_LIMIT_VAL * add define USB_MAX_POWER_CONSUMPTION * Helix keyboard OLED, RGBLIGHT enable/disable control integrate into rules.mk rules.mk: add 4 Variables for compile control. # Helix keyboard customize # you can edit follows 4 Variables # jp: 以下の4つの変数を必要に応じて編集します。 OLED_ENABLE = no # OLED_ENABLE 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 config.h: auto set RGBLED_NUM by HELIX_ROWS and rules.mk's define * HELIX_ROWS define move from config.h to rules.mk * add readme.md * rename readme.md to readme_jp.md * add readme.md and modify readme_jp.md * change helix/ssd1306.c for select glcdfont.c position * add variable LOCAL_GLCDFONT into each keymaps rules.mk * Add iPhone/iPad LED support to Helix default keymap * renumber _ADJUST for shrink program size * Fix Helix i2c wrong bit rate * add helix serial debug code * serial debug macro move from config.h to serial.h * helix serial.c debugging... * refine debug macros * add some comments * add SELECT_SERIAL_SPEED * add comments * debugging sync_send/sync_recv * add very high speed * fix sync_send/sync_recv * fix com. start and switch send/recv * debug mode off * remove debug codes * temporary change, compiling C, C++ and ASM without -g * helix config.h refine * Revert "temporary change, compiling C, C++ and ASM without -g" This reverts commit e9730cbbfd94fbcf792d992e3a1a65ad279b24d6. * add change_reciver2sender()/change_sender2reciver() This is a change to improve readability. * txled, rxled off in matrix_init() * add serial_send_packet() / serial_recive_packet() This is a change to reduce object size. * add serial_low() at ISR() top * add __attribute__((always_inline)) to some functions * modify serial_send_packet()/serial_recive_packet() A little, object size reduction. A little, speedup. * add debug code to helix/serial.c * Adjust sampling timing of serial signal being received * add split_scomm.c/split_scomm.h and change serial.c/serial.h serial.c was divided into 2 layers, split_scom.c and serial.c. The upper layer split_scomm.c is called from matrix.c. The lower layer serial.c accesses the hardware. * add split_scomm.c/split_scomm.h into helix/rev1 * reduce object size helix/rev2/matrix.c * remove checksum check, add parity check * force occur parity error for test * parity test ok. remove test code * change some comment & add skip code when buffer_size == 0 * serial.c: multiple types of transaction support Add 4 bits transaction-type field at packet top. Select Transaction Descriptor Table entry by transaction-type. * helix serial master-slave transaction optimize Using multi-type transaction feature of serial.c, communication contents between master slaves were optimized. * add debug code for retry * add comment into each config.h * fix ISR status drop * add a debug macro 'debug_retry_chg()' * reduce led_test size * remove debug code from helix/serial.c and etc. * helix:five_rows change TAPPING_TERM value 140 * Improved compatibility with let's split of serial.c. Finish helix/serial.c improvement. - The difference with the original let's split's serial.c - It's high-speed about 4 times. - Stable bi-directional data transfer. (Helix need master to slave transfer) - serial.h was divided 2 files, serial_config.h and sereial.h - With multiple types of transaction support, communication contents can be optimized. (NEW flexible API) - USE OLD Simple APIs (compatible with let's split serial.c) - files : - serial_config.h -- hardware configuration (need include by config.h) - serial.c/serial.h -- serial communication - USE NEW flexible APIs. (Support multi-type transaction function.) serial.c was divided into 2 layers, split_scom.c and serial.c. The upper layer split_scomm.c is called from matrix.c. The lower layer serial.c accesses the hardware. - files - split_scomm.c -- communication buffer is defined in here. call by matrix.c. - split_scomm.h -- buffer size is defined in here. include by matrix.c, split_util.c - serial_config.h -- hardware configuration (need include by config.h) To use the NEW API, specify #define SERIAL_USE_MULTI_TRANSACTION - serial.c/serial.h -- serial communication lower layer - NEW APIs for serial.c / serial.h (The lower layer) // 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; // initiator is transaction start side void soft_serial_initiator_init(SSTD_t *sstd_table); // target is interrupt accept side void soft_serial_target_init(SSTD_t *sstd_table); int soft_serial_transaction(int sstd_index); int soft_serial_get_and_clean_target_status(int sstd_index); - NEW APIs for split_scomm.c / split_scomm.h (The upper layer) move from old serial.c the following buffer and functions serial_slave_buffer[] serial_master_buffer[] void serial_master_init(void) void serial_slave_init(void) int serial_update_buffers(void) define SERIAL_xxxxx_BUFFER_LENGTH move from serial_config.h to split_scomm.h * fix comment typo * Fix the value of helix:five_rows variable HELIX_ROWS to 5. * led_test rules.mk some change * Separate common parts of helix/rev2/keymaps/*/rules.mk into helix/rev2/keymaps_common.mk * helix/rev2/keymaps/edvorakjp/rules.mk use helix/rev2/keymaps_common.mk * Separate common parts of helix/pico/keymaps/*/rules.mk into helix/pico/keymaps_common.mk * Helix each keymap's using rgblight mode symbol instead magic number No change in build result. * Helix pico keymaps: make rgblight modes selectable. No change in build result. * Helix rev2 keymaps: make rgblight modes selectable. No change in build result. * fixed Helix froggy/keymap.c: invalid rgblight mode value 0 to 1 (=RGBLIGHT_MODE_STATIC_LIGHT) * Deselect RGB_TEST and ALTERNATING in Helix rev2,pico keymaps config.h. * Merge branch 'master' of https://github.com/qmk/qmk_firmware * revert 955dcbc * delete keymaps_common.mk * add LAYOUT_kc() to keyboards/helix/pico/pico.h --- keyboards/helix/pico/pico.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'keyboards/helix/pico') diff --git a/keyboards/helix/pico/pico.h b/keyboards/helix/pico/pico.h index a3d658daa..153132775 100644 --- a/keyboards/helix/pico/pico.h +++ b/keyboards/helix/pico/pico.h @@ -62,4 +62,18 @@ } #endif +#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, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, L35, L36, R36, R30, R31, R32, R33, R34, R35 \ + ) \ + LAYOUT( \ + KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \ + 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, \ + 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 -- cgit v1.2.3 From 30c3f3b2bd9c68ba8bba644fcfa97152a4834c03 Mon Sep 17 00:00:00 2001 From: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Fri, 21 Dec 2018 02:50:51 +0900 Subject: Keymap: Add Helix/pico keymap 'mtei' (#4696) * add pico keymap 'mtei' * num layer key change --- keyboards/helix/pico/keymaps/mtei/config.h | 52 +++ keyboards/helix/pico/keymaps/mtei/keymap.c | 496 +++++++++++++++++++++++++++++ keyboards/helix/pico/keymaps/mtei/rules.mk | 129 ++++++++ 3 files changed, 677 insertions(+) create mode 100644 keyboards/helix/pico/keymaps/mtei/config.h create mode 100644 keyboards/helix/pico/keymaps/mtei/keymap.c create mode 100644 keyboards/helix/pico/keymaps/mtei/rules.mk (limited to 'keyboards/helix/pico') diff --git a/keyboards/helix/pico/keymaps/mtei/config.h b/keyboards/helix/pico/keymaps/mtei/config.h new file mode 100644 index 000000000..c5812de8d --- /dev/null +++ b/keyboards/helix/pico/keymaps/mtei/config.h @@ -0,0 +1,52 @@ +/* +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 . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +// place overrides here + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(STARTUP_SOUND) + #define AUDIO_CLICKY +#endif + +#undef TAPPING_TERM +#define TAPPING_TERM 300 +#define PERMISSIVE_HOLD +/* when TAPPING_TERM >= 500 same effect PERMISSIVE_HOLD. + see tmk_core/common/action_tapping.c */ + +// If you need more program area, try select and reduce rgblight modes to use. + +// 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 + +#endif /* CONFIG_USER_H */ diff --git a/keyboards/helix/pico/keymaps/mtei/keymap.c b/keyboards/helix/pico/keymaps/mtei/keymap.c new file mode 100644 index 000000000..27bf06243 --- /dev/null +++ b/keyboards/helix/pico/keymaps/mtei/keymap.c @@ -0,0 +1,496 @@ +#include QMK_KEYBOARD_H +#include "bootloader.h" +#ifdef PROTOCOL_LUFA +#include "lufa.h" +#include "split_util.h" +#endif +#ifdef AUDIO_ENABLE + #include "audio.h" +#endif +#ifdef SSD1306OLED + #include "ssd1306.h" +#endif +#ifdef CONSOLE_ENABLE + #include +#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 { + _QWERTY = 0, + _COLEMAK, + _DVORAK, + _EUCALYN, + _NUML, + _NUMR, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + EUCALYN, + NUML, + NUMR, + KC_xEISU, + KC_xKANA, + KC_ZERO2, + RGBRST +}; + +//Macros +#define KC_LOWER MO(_LOWER) +#define KC_NUML LT(_NUML,KC_SPC) +#define KC_NUMR LT(_NUMR,KC_SPC) +#define KC_RABS LT(_RAISE,KC_BSPC) +#define KC_RAEN LT(_RAISE,KC_ENT) +#define KC_____ _______ +#define KC_XXXX XXXXXXX +#define KC_ADJ MO(_ADJUST) +#define KC_LSMI LSFT(KC_MINS) +#define KC_LSEQ LSFT(KC_EQL) +#define KC_LSRB LSFT(KC_RBRC) +#define KC_LSLB LSFT(KC_LBRC) +#define KC_LSGR LSFT(KC_GRV) +#define KC_LSQT LSFT(KC_QUOT) +#define ___ _______ +#define KC_S0 LSFT(KC_0) +#define KC_S1 LSFT(KC_1) +#define KC_S2 LSFT(KC_2) +#define KC_S3 LSFT(KC_3) +#define KC_S4 LSFT(KC_4) +#define KC_S5 LSFT(KC_5) +#define KC_S6 LSFT(KC_6) +#define KC_S7 LSFT(KC_7) +#define KC_S8 LSFT(KC_8) +#define KC_S9 LSFT(KC_9) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Qwerty + * ,-----------------------------------------. ,-----------------------------------------. + * | ESC | Q | W | E | R | T | | Y | U | I | O | P | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Ctrl | A | S | D | F | G | | H | J | K | L | ; | Ctrl | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | | N | M | , | . | / | Shift| + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * |Lower | Lower| Caps | Alt | GUI | Space| BS | Enter| Space| GUI | Alt | Menu |Lower |Lower | + * `-------------------------------------------------------------------------------------------------' + */ + [_QWERTY] = LAYOUT_kc( \ + ESC, Q, W, E, R, T, Y, U, I, O, P, BSLS, \ + LCTL, A, S, D, F, G, H, J, K, L, SCLN, RCTL, \ + LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, RSFT, \ + LOWER,LOWER, CAPS, LALT, LGUI,NUML, RABS, RAEN,NUMR, RGUI, RALT, APP,LOWER, LOWER \ + ), + + /* Colemak + * ,-----------------------------------------. ,-----------------------------------------. + * | ESC | Q | W | F | P | G | | J | L | U | Y | ; | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Ctrl | A | R | S | T | D | | H | N | E | I | O | Ctrl | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | | K | M | , | . | / | Shift| + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * |Lower | Lower| Caps | Alt | GUI | Space| BS | Enter| Space| GUI | Alt | Menu |Lower |Lower | + * `-------------------------------------------------------------------------------------------------' + */ + [_COLEMAK] = LAYOUT_kc( \ + ESC, Q, W, F, P, G, J, L, U, Y, SCLN, BSLS, \ + LCTL, A, R, S, T, D, H, N, E, I, O, RCTL, \ + LSFT, Z, X, C, V, B, K, M, COMM, DOT, SLSH, RSFT, \ + LOWER,LOWER, CAPS, LALT, LGUI,NUML, RABS, RAEN,NUMR, RGUI, RALT, APP,LOWER, LOWER \ + ), + + /* Dvorak + * ,-----------------------------------------. ,-----------------------------------------. + * | ESC | ' | , | . | P | Y | | F | G | C | R | L | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Ctrl | A | O | E | U | I | | D | H | T | N | S | Ctrl | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | | B | M | W | V | Z | Shift| + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * |Lower | Lower| Caps | Alt | GUI | Space| BS | Enter| Space| GUI | Alt | Menu |Lower |Lower | + * `-------------------------------------------------------------------------------------------------' + */ + [_DVORAK] = LAYOUT_kc( \ + ESC, QUOT, COMM, DOT, P, Y, F, G, C, R, L, BSLS, \ + LCTL, A, O, E, U, I, D, H, T, N, S, RCTL, \ + LSFT, SCLN, Q, J, K, X, B, M, W, V, Z, RSFT, \ + LOWER,LOWER, CAPS, LALT, LGUI,NUML, RABS, RAEN,NUMR, RGUI, RALT, APP,LOWER, LOWER \ + ), + + /* Eucalyn (http://eucalyn.hatenadiary.jp/entry/about-eucalyn-layout) + * ,-----------------------------------------. ,-----------------------------------------. + * | ESC | Q | W | , | . | ; | | M | R | D | Y | P | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Ctrl | A | O | E | I | U | | G | T | K | S | N | Ctrl | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Shift| Z | X | C | V | F | | B | H | J | L | / | Shift| + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * |Lower | Lower| Caps | Alt | GUI | Space| BS | Enter| Space| GUI | Alt | Menu |Lower |Lower | + * `-------------------------------------------------------------------------------------------------' + */ + [_EUCALYN] = LAYOUT_kc( \ + ESC, Q, W, COMM, DOT, SCLN, M, R, D, Y, P, BSLS, \ + LCTL, A, O, E, I, U, G, T, K, S, N, RCTL, \ + LSFT, Z, X, C, V, F, B, H, J, L, SLSH, RSFT, \ + LOWER,LOWER, CAPS, LALT, LGUI,NUML, RABS, RAEN,NUMR, RGUI, RALT, APP,LOWER, LOWER \ + ), + + /* Num + * ,-----------------------------------------. ,-----------------------------------------. + * | | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | + * `-------------------------------------------------------------------------------------------------' + */ + [_NUML] = LAYOUT_kc( \ + ____, S1, S2, S3, S4, S5, S6, S7, S8, S9, S0, ____, \ + ____, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, F12, \ + ____, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, \ + ____, ____, ____, ____, ____, ____, ____, ____, SPC, ____, ____, ____, ____, ____ \ + ), + + [_NUMR] = LAYOUT_kc( \ + ____, S1, S2, S3, S4, S5, S6, S7, S8, S9, S0, ____, \ + ____, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, F12, \ + ____, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, \ + ____, ____, ____, ____, ____, SPC, ____, ____, ____, ____, ____, ____, ____, ____ \ + ), + + /* Lower + * ,-----------------------------------------. ,-----------------------------------------. + * | | |Pause | ScrLk| Ins | | | | Ins | ScrLk|Pause | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | PgUp | | Up |Delete| Home | | Home |Delete| Up | | PgUp | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | PgDn | Left | Down | Right| End | | End | Left | Down | Right| PgDn | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | PrtSc| | | |Adjust|Adjust| | | | PrtSc| | | + * `-------------------------------------------------------------------------------------------------' + */ + [_LOWER] = LAYOUT_kc( \ + XXXX, XXXX, PAUS, SLCK, INS, XXXX, XXXX, INS, SLCK, PAUS, XXXX, ____, \ + ____, HOME, XXXX, UP, DEL, PGUP, PGUP, DEL, UP, XXXX, HOME, ____, \ + ____, END, LEFT, DOWN, RGHT, PGDN, PGDN, LEFT, DOWN, RGHT, END, ____, \ + ____, ____, PSCR, ____, ____, ____, ADJ, ADJ, ____, ____, ____, PSCR, ____, ____ \ + ), + + /* Raise + * ,-----------------------------------------. ,-----------------------------------------. + * | TAB | | | | _ | - | | = | + | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | EISU | | | | { | [ | | ] | } | | | | KANA | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | ~ | ` | | ' | " | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | + * `-------------------------------------------------------------------------------------------------' + */ + [_RAISE] = LAYOUT_kc( \ + TAB, XXXX, XXXX, XXXX, LSMI, MINS, EQL, LSEQ, XXXX, XXXX, XXXX, XXXX, \ + xEISU, XXXX, XXXX, XXXX, LSLB, LBRC, RBRC, LSRB, XXXX, XXXX, XXXX, xKANA, \ + XXXX, XXXX, XXXX, XXXX, LSGR, GRV, QUOT, LSQT, XXXX, XXXX, XXXX, XXXX, \ + ADJ, ADJ, XXXX, ____, ____, XXXX, ____, ____, XXXX, ____, ____, XXXX, ADJ, ADJ \ + ), + + /* Adjust (Lower + Raise) + * ,-----------------------------------------. ,-----------------------------------------. + * | | Reset|RGBRST|RGB ON|Aud on| Win | | Win | |Qwerty|Euclyn|Colemk|Dvorak| + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | HUE+ | SAT+ | VAL+ |RGB md|Audoff| Mac | | Mac | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | HUE- | SAT- | VAL- | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | + * `-------------------------------------------------------------------------------------------------' + */ + [_ADJUST] = LAYOUT( \ + XXXXXXX, RESET, RGBRST, RGB_TOG, AU_ON, AG_SWAP, AG_SWAP, XXXXXXX, QWERTY, EUCALYN, COLEMAK, DVORAK, \ + RGB_HUI, RGB_SAI, RGB_VAI, RGB_MOD, AU_OFF, AG_NORM, AG_NORM, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, ___,___, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______ \ + ) +}; + +#ifdef AUDIO_ENABLE + +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +float tone_plover[][2] = SONG(PLOVER_SOUND); +float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND); +float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); +#endif + +static int current_default_layer; + +uint32_t default_layer_state_set_kb(uint32_t state) { + // 1<<_QWERTY - 1 == 1 - 1 == _QWERTY (=0) + // 1<<_COLEMAK - 1 == 2 - 1 == _COLEMAK (=1) + current_default_layer = state - 1; + // 1<<_DVORAK - 2 == 4 - 2 == _DVORAK (=2) + if ( current_default_layer == 3 ) current_default_layer -= 1; + // 1<<_EUCALYN - 5 == 8 - 5 == _EUCALYN (=3) + if ( current_default_layer == 7 ) current_default_layer -= 4; + return state; +} + +void update_base_layer(int base) +{ + if( current_default_layer != base ) { + eeconfig_update_default_layer(1UL<event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_qwerty); + #endif + update_base_layer(_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_colemak); + #endif + update_base_layer(_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_dvorak); + #endif + update_base_layer(_DVORAK); + } + return false; + break; + case EUCALYN: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_dvorak); + #endif + update_base_layer(_EUCALYN); + } + return false; + break; + case KC_xEISU: + 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); + } + return false; + break; + case KC_xKANA: + if (record->event.pressed) { + if(keymap_config.swap_lalt_lgui==false){ + register_code(KC_LANG1); + }else{ + SEND_STRING(SS_LALT("`")); + } + } else { + unregister_code(KC_LANG1); + } + return false; + break; + case RGBRST: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + } + #endif + break; + } + return true; +} + +void matrix_init_user(void) { + #ifdef AUDIO_ENABLE + startup_user(); + #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 +} + + +#ifdef AUDIO_ENABLE + +void startup_user() +{ + _delay_ms(50); // gets rid of tick +} + +void shutdown_user() +{ + _delay_ms(150); + stop_all_notes(); +} + +void music_on_user(void) +{ + music_scale_user(); +} + +void music_scale_user(void) +{ + PLAY_SONG(music_scale); +} + +#endif + + +//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h +#ifdef SSD1306OLED + +void matrix_scan_user(void) { + 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; + } +} + +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); +#if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_ANIMATIONS) + char buf[30]; + if(rgblight_config.enable) { + snprintf(buf, sizeof(buf), " LED %2d: %d,%d,%d ", + rgblight_config.mode, + rgblight_config.hue/RGBLIGHT_HUE_STEP, + rgblight_config.sat/RGBLIGHT_SAT_STEP, + rgblight_config.val/RGBLIGHT_VAL_STEP); + matrix_write(matrix, buf); + } +#endif + //matrix_write_P(&matrix, PSTR(" Split keyboard kit")); +} + +static const char Qwerty_name[] PROGMEM = " Qwerty"; +static const char Colemak_name[] PROGMEM = " Colemak"; +static const char Dvorak_name[] PROGMEM = " Dvorak"; +static const char Eucalyn_name[] PROGMEM = " Eucalyn"; + +static const char NumL_name[] PROGMEM = ":NumL"; +static const char NumR_name[] PROGMEM = ":NumR"; +static const char Lower_name[] PROGMEM = ":Func"; +static const char Raise_name[] PROGMEM = ":Extra"; +static const char Adjust_name[] PROGMEM = ":Adjust"; + +static const char *layer_names[] = { + [_QWERTY] = Qwerty_name, + [_COLEMAK] = Colemak_name, + [_DVORAK] = Dvorak_name, + [_EUCALYN] = Eucalyn_name, + + [_NUML] = NumL_name, + [_NUMR] = NumR_name, + [_LOWER] = Lower_name, + [_RAISE] = Raise_name, + [_ADJUST] = Adjust_name +}; + +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 + int name_num; + uint32_t lstate; + matrix_write_P(matrix, layer_names[current_default_layer]); + matrix_write_P(matrix, PSTR("\n")); + for( lstate = layer_state, name_num = 0; + lstate && name_num < sizeof(layer_names)/sizeof(char *); + lstate >>=1, name_num++ ) { + if( (lstate & 1) != 0 ) { + if( layer_names[name_num] ) { + matrix_write_P(matrix, layer_names[name_num]); + } + } + } + + // Host Keyboard LED Status + char led[40]; + snprintf(led, sizeof(led), "\n%s %s %s", + (host_keyboard_leds() & (1< 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 + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif + +# Uncomment these for debugging +# $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) +# $(info -- OPT_DEFS=$(OPT_DEFS)) +# $(info ) -- cgit v1.2.3