aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar MakotoKurauchi <pluis@me.com>2018-04-25 01:43:57 +0900
committerGravatar Drashna Jaelre <drashna@live.com>2018-04-24 09:43:57 -0700
commitd1481172bc865ae42b52bbd325ff31c9a5b7e470 (patch)
tree012b5bab4ab266a4122da5e942cd3b6b5a636ffb
parentf440bbbc1124b18ad0cad31976558905d8c15fc0 (diff)
downloadqmk_firmware-d1481172bc865ae42b52bbd325ff31c9a5b7e470.tar.gz
Helix oled rgb compile sw (#2606)
* 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
-rw-r--r--keyboards/helix/rev2/config.h2
-rw-r--r--keyboards/helix/rev2/keymaps/default/config.h24
-rw-r--r--keyboards/helix/rev2/keymaps/default/readme.md144
-rw-r--r--keyboards/helix/rev2/keymaps/default/readme_jp.md98
-rw-r--r--keyboards/helix/rev2/keymaps/default/rules.mk60
5 files changed, 304 insertions, 24 deletions
diff --git a/keyboards/helix/rev2/config.h b/keyboards/helix/rev2/config.h
index 590562776..e8ad1b9be 100644
--- a/keyboards/helix/rev2/config.h
+++ b/keyboards/helix/rev2/config.h
@@ -56,7 +56,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* ws2812 RGB LED */
#define RGB_DI_PIN D3
#define RGBLIGHT_TIMER
-#define RGBLED_NUM 12 // Number of LEDs
+//#define RGBLED_NUM 12 // Number of LEDs. see ./keymaps/default/config.h
#define ws2812_PORTREG PORTD
#define ws2812_DDRREG DDRD
diff --git a/keyboards/helix/rev2/keymaps/default/config.h b/keyboards/helix/rev2/keymaps/default/config.h
index 53ff0b3ca..66c9b9e8b 100644
--- a/keyboards/helix/rev2/keymaps/default/config.h
+++ b/keyboards/helix/rev2/keymaps/default/config.h
@@ -36,11 +36,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// #define EE_HANDS
// Helix keyboard OLED support
-//#define SSD1306OLED
+// see ./rules.mk: OLED_ENABLE=yes or no
+#ifdef OLED_ENABLE
+ #define SSD1306OLED
+#endif
/* Select rows configuration */
// Rows are 4 or 5
-#define HELIX_ROWS 5
+// #define HELIX_ROWS 5 see ./rules.mk
/* key matrix size */
// Rows are doubled-up
@@ -62,12 +65,19 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define TAPPING_FORCE_HOLD
#define TAPPING_TERM 100
+// Helix 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
+#ifdef RGBLED_BACK
+ #if HELIX_ROWS == 4
+ #define RGBLED_NUM 25
+ #elif HELIX_ROWS == 5
+ #define RGBLED_NUM 32
+ #endif
+#else
+ #define RGBLED_NUM 6
+#endif
-#undef RGBLED_NUM
-#define RGBLIGHT_ANIMATIONS
-// Helix keyboard : see ./rules.mk: RGBLIGHT_ENABLE = yes or no
-// Helix keyboard : RGBLED_NUM 6 or 32
-#define RGBLED_NUM 6
#if RGBLED_NUM <= 6
#define RGBLIGHT_LIMIT_VAL 255
#else
diff --git a/keyboards/helix/rev2/keymaps/default/readme.md b/keyboards/helix/rev2/keymaps/default/readme.md
index 02888855b..307e5c30b 100644
--- a/keyboards/helix/rev2/keymaps/default/readme.md
+++ b/keyboards/helix/rev2/keymaps/default/readme.md
@@ -1,25 +1,141 @@
-SSD1306 OLED Display via I2C
-======
+# The Default Helix Layout
+## Layout
-Features
---------
+### Qwerty
-Some features supported by the firmware:
+```
+ ,-----------------------------------------. ,-----------------------------------------.
+ | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del |
+ |------+------+------+------+------+------| |------+------+------+------+------+------|
+ | Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp |
+ |------+------+------+------+------+------| |------+------+------+------+------+------|
+ | Ctrl | A | S | D | F | G | | H | J | K | L | ; | ' |
+ |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ | Shift| Z | X | C | V | B | [ | ] | N | M | , | . | / |Enter |
+ |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ |Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right |
+ `-------------------------------------------------------------------------------------------------'
+```
+### Colemak
+```
+ ,-----------------------------------------. ,-----------------------------------------.
+ | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del |
+ |------+------+------+------+------+------| |------+------+------+------+------+------|
+ | Tab | Q | W | F | P | G | | J | L | U | Y | ; | Bksp |
+ |------+------+------+------+------+------| |------+------+------+------+------+------|
+ | Ctrl | A | R | S | T | D | | H | N | E | I | O | ' |
+ |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ | Shift| Z | X | C | V | B | [ | ] | K | M | , | . | / |Enter |
+ |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ |Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right |
+ `-------------------------------------------------------------------------------------------------'
+```
-* I2C connection between the two halves is required as the OLED display will use this connection as well. Note this
- requires pull-up resistors on the data and clock lines.
-* OLED display will connect from either side
+### Dvorak
+```
+ ,-----------------------------------------. ,-----------------------------------------.
+ | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Bksp |
+ |------+------+------+------+------+------| |------+------+------+------+------+------|
+ | Tab | ' | , | . | P | Y | | F | G | C | R | L | Del |
+ |------+------+------+------+------+------| |------+------+------+------+------+------|
+ | Ctrl | A | O | E | U | I | | D | H | T | N | S | / |
+ |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ | Shift| ; | Q | J | K | X | [ | ] | B | M | W | V | Z |Enter |
+ |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ |Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right |
+ `-------------------------------------------------------------------------------------------------'
+```
+## Layers
-Wiring
-------
+|Priority|number|name|description|
+| ---- | ---- | --- | --- |
+|high|16|Adjust|Functions|
+||4|Raise|Numeric charactors|
+||3|Lower|Other charactors|
+||2|Dvorak|Dvorak leyout|
+||1|Colemak|Colemak leyout|
+|low|0|Qwerty|QWERTY leyout(base)|
+### Lower
+```
+ ,-----------------------------------------. ,-----------------------------------------.
+ | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | |
+ |------+------+------+------+------+------| |------+------+------+------+------+------|
+ | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | |
+ |------+------+------+------+------+------| |------+------+------+------+------+------|
+ | | F1 | F2 | F3 | F4 | F5 | | F6 | _ | + | { | } | | |
+ |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ | | F7 | F8 | F9 | F10 | F11 | ( | ) | F12 | | | Home | End | |
+ |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ | | | | | | | | | | | Next | Vol- | Vol+ | Play |
+ `-------------------------------------------------------------------------------------------------'
+```
-Work in progress...
+### Raise
+```
+ ,-----------------------------------------. ,-----------------------------------------.
+ | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Bksp |
+ |------+------+------+------+------+------| |------+------+------+------+------+------|
+ | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del |
+ |------+------+------+------+------+------| |------+------+------+------+------+------|
+ | | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ |
+ |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ | | F7 | F8 | F9 | F10 | F11 | | | F12 | | |PageDn|PageUp| |
+ |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ | | | | | | | | | | | Next | Vol- | Vol+ | Play |
+ `-------------------------------------------------------------------------------------------------'
+```
+### Adjust (Lower + Raise)
+```
+ ,-----------------------------------------. ,-----------------------------------------.
+ | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 |
+ |------+------+------+------+------+------| |------+------+------+------+------+------|
+ | | Reset|RGBRST| | | | | | | | | | Del |
+ |------+------+------+------+------+------| |------+------+------+------+------+------|
+ | | | |Aud on|Audoff| Mac | | Win |Qwerty|Colemk|Dvorak| | |
+ |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ | | | | | | | | | | |RGB ON| HUE+ | SAT+ | VAL+ |
+ |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ | | | | | | | | | | | MODE | HUE- | SAT- | VAL- |
+ `-------------------------------------------------------------------------------------------------'
+```
-OLED Configuration
--------------------------------
+## Customize
+
+see `qmk_firmware/keyboards/helix/rev2/keymaps/default/rules.mk`
+
+```
+# Helix keyboard customize
+# you can edit follows 5 Variables
+# jp: 以下の5つの変数を必要に応じて編集します。
+HELIX_ROWS = 5 # Helix Rows is 4 or 5
+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
+
+```
+## Compile
+
+go to qmk top directory.
+```
+$ cd qmk_firmware
+```
+
+build
+```
+$ make helix:default
+```
+
+flash to keyboard
+```
+$ make helix:default:avrdude
+```
+
+## Link
+* more detail wrote in Japanese [helix/Doc/firmware_jp.md](https://github.com/MakotoKurauchi/helix/blob/master/Doc/firmware_jp.md)
+* [Helix top](https://github.com/MakotoKurauchi/helix)
-Work in progress...
diff --git a/keyboards/helix/rev2/keymaps/default/readme_jp.md b/keyboards/helix/rev2/keymaps/default/readme_jp.md
new file mode 100644
index 000000000..88ffc02ff
--- /dev/null
+++ b/keyboards/helix/rev2/keymaps/default/readme_jp.md
@@ -0,0 +1,98 @@
+# The Default Helix Layout
+## 配列
+
+### Qwerty配列
+
+```
+ ,-----------------------------------------. ,-----------------------------------------.
+ | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del |
+ |------+------+------+------+------+------| |------+------+------+------+------+------|
+ | Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp |
+ |------+------+------+------+------+------| |------+------+------+------+------+------|
+ | Ctrl | A | S | D | F | G | | H | J | K | L | ; | ' |
+ |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ | Shift| Z | X | C | V | B | [ | ] | N | M | , | . | / |Enter |
+ |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ |Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right |
+ `-------------------------------------------------------------------------------------------------'
+```
+
+他の配列(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 をつけたり、
+RGB バックライトまたは、RGB Underglow をつけた場合は、
+`qmk_firmware/keyboards/helix/rev2/keymaps/default/rules.mk` の以下の部分を編集して機能を有効化してください。
+
+```
+# Helix keyboard customize
+# you can edit follows 5 Variables
+# jp: 以下の5つの変数を必要に応じて編集します。
+HELIX_ROWS = 5 # Helix Rows is 4 or 5
+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
+
+```
+
+## 4行版Helix に対応する
+
+rules.mk の下記の部分を編集して 5 を 4 に変更してください。
+
+```
+HELIX_ROWS = 4 # Helix Rows is 4 or 5
+```
+
+## RGB バックライトを有効にする
+
+rules.mk の下記の部分を編集して no を yes に変更してください。
+
+```
+LED_BACK_ENABLE = yes # LED backlight (Enable WS2812 RGB underlight.)
+```
+
+## RGB Underglow を有効にする
+
+rules.mk の下記の部分を編集して no を yes に変更してください。
+```
+LED_UNDERGLOW_ENABLE = yes # LED underglow (Enable WS2812 RGB underlight.)
+```
+
+## OLEDを有効にする
+
+rules.mk の下記の部分を編集して no を yes に変更してください。
+```
+OLED_ENABLE = yes # OLED_ENABLE
+```
+
+## リンク
+
+* さらに詳細は、[こちら helix/Doc/firmware_jp.md](https://github.com/MakotoKurauchi/helix/blob/master/Doc/firmware_jp.md)をご覧ください。
+* [Helix top](https://github.com/MakotoKurauchi/helix)
diff --git a/keyboards/helix/rev2/keymaps/default/rules.mk b/keyboards/helix/rev2/keymaps/default/rules.mk
index dc4187c08..976529ef9 100644
--- a/keyboards/helix/rev2/keymaps/default/rules.mk
+++ b/keyboards/helix/rev2/keymaps/default/rules.mk
@@ -14,14 +14,70 @@ 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
-# Helix keyboard : see ./config.h: RGBLED_NUM 6 or 32
-# Helix keyboard : RGBLIGHT_ENABLE = no or yes
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))
+endef
+
+# Helix keyboard customize
+# you can edit follows 5 Variables
+# jp: 以下の5つの変数を必要に応じて編集します。
+HELIX_ROWS = 5 # Helix Rows is 4 or 5
+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
+
+#### LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE.
+#### Do not enable these with audio at the same time.
+
+# 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 $(LED_ANIMATIONS)), yes)
+ OPT_DEFS += -DRGBLIGHT_ANIMATIONS
+endif
+
+ifeq ($(strip $(OLED_ENABLE)), yes)
+ OPT_DEFS += -DOLED_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
ifndef QUANTUM_DIR
include ../../../../Makefile
endif
+
+# Uncomment these for debugging
+# $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE))
+# $(info -- OPT_DEFS=$(OPT_DEFS))
+# $(info )