Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a012113d63 | ||
|
|
c691396ae5 | ||
|
|
860f6d65b8 | ||
|
|
85d2d4fee5 | ||
|
|
a57c9648e9 | ||
|
|
e9755521ab | ||
|
|
bbecd276d2 | ||
|
|
4d4b845cf5 | ||
|
|
0fab3bbde3 | ||
|
|
b2877470ce | ||
|
|
e0c9cfad86 | ||
|
|
5a34ec7565 | ||
|
|
237da3ac8d | ||
|
|
ade22f8e2c | ||
|
|
96cb9f4661 | ||
|
|
8f0ec565f4 | ||
|
|
6a4a4a2875 | ||
|
|
5e463086cd | ||
|
|
c37ce43437 | ||
|
|
f2fcffab0d | ||
|
|
aa62b60eaf | ||
|
|
612a418ce9 | ||
|
|
6bdef6b8c2 | ||
|
|
b292d30a25 | ||
|
|
7f0a205232 | ||
|
|
1f5d5e5314 | ||
|
|
8ffeaec3aa | ||
|
|
bbea9dadbc | ||
|
|
81756d7b21 | ||
|
|
c5c112ae29 | ||
|
|
3d7bfae232 | ||
|
|
b666921e25 | ||
|
|
b4f4576631 | ||
|
|
60797c8439 | ||
|
|
3d9fda3629 | ||
|
|
ffa119941c | ||
|
|
ffa5c48430 | ||
|
|
a69b610456 | ||
|
|
2ba6b9ab69 | ||
|
|
5d5fa0dc8c | ||
|
|
2fe2c323c6 | ||
|
|
72fa2cf2fc | ||
|
|
3468f2f4c7 | ||
|
|
4de809535a | ||
|
|
e954dfcf8c | ||
|
|
c7b8e45ba1 | ||
|
|
d9619be499 | ||
|
|
b7cbae8d1f | ||
|
|
f5ebfdabcd | ||
|
|
ed98250e62 | ||
|
|
9c35c5979c | ||
|
|
1236eac4f2 | ||
|
|
de7d1d35c8 | ||
|
|
180d39824b | ||
|
|
82277af884 | ||
|
|
956ba037ef | ||
|
|
9a1613dd1a | ||
|
|
f30d6dd785 | ||
|
|
e3299db9e3 |
No files matched your search
@@ -67,7 +67,7 @@ $(eval $(call NEXT_PATH_ELEMENT))
|
|||||||
# It's really a very simple if else chain, if you squint enough,
|
# It's really a very simple if else chain, if you squint enough,
|
||||||
# but the makefile syntax makes it very verbose.
|
# but the makefile syntax makes it very verbose.
|
||||||
# If we are in a subfolder of keyboards
|
# If we are in a subfolder of keyboards
|
||||||
#
|
#
|
||||||
# *** No longer needed **
|
# *** No longer needed **
|
||||||
#
|
#
|
||||||
# ifeq ($(CURRENT_PATH_ELEMENT),keyboards)
|
# ifeq ($(CURRENT_PATH_ELEMENT),keyboards)
|
||||||
@@ -307,11 +307,6 @@ define PARSE_KEYBOARD
|
|||||||
KEYBOARD_FOLDER_PATH_3 := $$(patsubst %/,%,$$(dir $$(KEYBOARD_FOLDER_PATH_2)))
|
KEYBOARD_FOLDER_PATH_3 := $$(patsubst %/,%,$$(dir $$(KEYBOARD_FOLDER_PATH_2)))
|
||||||
KEYBOARD_FOLDER_PATH_4 := $$(patsubst %/,%,$$(dir $$(KEYBOARD_FOLDER_PATH_3)))
|
KEYBOARD_FOLDER_PATH_4 := $$(patsubst %/,%,$$(dir $$(KEYBOARD_FOLDER_PATH_3)))
|
||||||
KEYBOARD_FOLDER_PATH_5 := $$(patsubst %/,%,$$(dir $$(KEYBOARD_FOLDER_PATH_4)))
|
KEYBOARD_FOLDER_PATH_5 := $$(patsubst %/,%,$$(dir $$(KEYBOARD_FOLDER_PATH_4)))
|
||||||
KEYBOARD_FOLDER_1 := $$(notdir $$(KEYBOARD_FOLDER_PATH_1))
|
|
||||||
KEYBOARD_FOLDER_2 := $$(notdir $$(KEYBOARD_FOLDER_PATH_2))
|
|
||||||
KEYBOARD_FOLDER_3 := $$(notdir $$(KEYBOARD_FOLDER_PATH_3))
|
|
||||||
KEYBOARD_FOLDER_4 := $$(notdir $$(KEYBOARD_FOLDER_PATH_4))
|
|
||||||
KEYBOARD_FOLDER_5 := $$(notdir $$(KEYBOARD_FOLDER_PATH_5))
|
|
||||||
|
|
||||||
KEYMAPS :=
|
KEYMAPS :=
|
||||||
# get a list of all keymaps
|
# get a list of all keymaps
|
||||||
@@ -325,35 +320,35 @@ define PARSE_KEYBOARD
|
|||||||
$$(KEYBOARD_FOLDER_3) $$(KEYBOARD_FOLDER_4) $$(KEYBOARD_FOLDER_5), $$(KEYMAPS)))
|
$$(KEYBOARD_FOLDER_3) $$(KEYBOARD_FOLDER_4) $$(KEYBOARD_FOLDER_5), $$(KEYMAPS)))
|
||||||
|
|
||||||
KEYBOARD_LAYOUTS :=
|
KEYBOARD_LAYOUTS :=
|
||||||
ifneq ("$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_5)/rules.mk)","")
|
ifneq ("$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_5)/rules.mk)","")
|
||||||
LAYOUTS :=
|
LAYOUTS :=
|
||||||
$$(eval include $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_5)/rules.mk)
|
$$(eval include $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_5)/rules.mk)
|
||||||
KEYBOARD_LAYOUTS := $$(sort $$(LAYOUTS) $$(KEYBOARD_LAYOUTS))
|
KEYBOARD_LAYOUTS := $$(sort $$(LAYOUTS) $$(KEYBOARD_LAYOUTS))
|
||||||
endif
|
endif
|
||||||
ifneq ("$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_4)/rules.mk)","")
|
ifneq ("$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_4)/rules.mk)","")
|
||||||
LAYOUTS :=
|
LAYOUTS :=
|
||||||
$$(eval include $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_4)/rules.mk)
|
$$(eval include $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_4)/rules.mk)
|
||||||
KEYBOARD_LAYOUTS := $$(sort $$(LAYOUTS) $$(KEYBOARD_LAYOUTS))
|
KEYBOARD_LAYOUTS := $$(sort $$(LAYOUTS) $$(KEYBOARD_LAYOUTS))
|
||||||
endif
|
endif
|
||||||
ifneq ("$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_3)/rules.mk)","")
|
ifneq ("$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_3)/rules.mk)","")
|
||||||
LAYOUTS :=
|
LAYOUTS :=
|
||||||
$$(eval include $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_3)/rules.mk)
|
$$(eval include $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_3)/rules.mk)
|
||||||
KEYBOARD_LAYOUTS := $$(sort $$(LAYOUTS) $$(KEYBOARD_LAYOUTS))
|
KEYBOARD_LAYOUTS := $$(sort $$(LAYOUTS) $$(KEYBOARD_LAYOUTS))
|
||||||
endif
|
endif
|
||||||
ifneq ("$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_2)/rules.mk)","")
|
ifneq ("$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_2)/rules.mk)","")
|
||||||
LAYOUTS :=
|
LAYOUTS :=
|
||||||
$$(eval include $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_2)/rules.mk)
|
$$(eval include $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_2)/rules.mk)
|
||||||
KEYBOARD_LAYOUTS := $$(sort $$(LAYOUTS) $$(KEYBOARD_LAYOUTS))
|
KEYBOARD_LAYOUTS := $$(sort $$(LAYOUTS) $$(KEYBOARD_LAYOUTS))
|
||||||
endif
|
endif
|
||||||
ifneq ("$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_1)/rules.mk)","")
|
ifneq ("$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_1)/rules.mk)","")
|
||||||
LAYOUTS :=
|
LAYOUTS :=
|
||||||
$$(eval include $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_1)/rules.mk)
|
$$(eval include $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_1)/rules.mk)
|
||||||
KEYBOARD_LAYOUTS := $$(sort $$(LAYOUTS) $$(KEYBOARD_LAYOUTS))
|
KEYBOARD_LAYOUTS := $$(sort $$(LAYOUTS) $$(KEYBOARD_LAYOUTS))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
LAYOUT_KEYMAPS :=
|
LAYOUT_KEYMAPS :=
|
||||||
$$(foreach LAYOUT,$$(KEYBOARD_LAYOUTS),$$(eval LAYOUT_KEYMAPS += $$(notdir $$(patsubst %/.,%,$$(wildcard $(ROOT_DIR)/layouts/*/$$(LAYOUT)/*/.)))))
|
$$(foreach LAYOUT,$$(KEYBOARD_LAYOUTS),$$(eval LAYOUT_KEYMAPS += $$(notdir $$(patsubst %/.,%,$$(wildcard $(ROOT_DIR)/layouts/*/$$(LAYOUT)/*/.)))))
|
||||||
|
|
||||||
KEYMAPS := $$(sort $$(KEYMAPS) $$(LAYOUT_KEYMAPS))
|
KEYMAPS := $$(sort $$(KEYMAPS) $$(LAYOUT_KEYMAPS))
|
||||||
|
|
||||||
# if the rule after removing the start of it is empty (we haven't specified a kemap or target)
|
# if the rule after removing the start of it is empty (we haven't specified a kemap or target)
|
||||||
|
|||||||
@@ -3,16 +3,16 @@ include message.mk
|
|||||||
# Directory common source files exist
|
# Directory common source files exist
|
||||||
TOP_DIR = .
|
TOP_DIR = .
|
||||||
TMK_DIR = tmk_core
|
TMK_DIR = tmk_core
|
||||||
TMK_PATH = $(TOP_DIR)/$(TMK_DIR)
|
TMK_PATH = $(TMK_DIR)
|
||||||
LIB_PATH = $(TOP_DIR)/lib
|
LIB_PATH = lib
|
||||||
|
|
||||||
QUANTUM_DIR = quantum
|
QUANTUM_DIR = quantum
|
||||||
QUANTUM_PATH = $(TOP_DIR)/$(QUANTUM_DIR)
|
QUANTUM_PATH = $(QUANTUM_DIR)
|
||||||
|
|
||||||
DRIVER_DIR = drivers
|
DRIVER_DIR = drivers
|
||||||
DRIVER_PATH = $(TOP_DIR)/$(DRIVER_DIR)
|
DRIVER_PATH = $(DRIVER_DIR)
|
||||||
|
|
||||||
BUILD_DIR := $(TOP_DIR)/.build
|
BUILD_DIR := .build
|
||||||
|
|
||||||
COMMON_VPATH := $(TOP_DIR)
|
COMMON_VPATH := $(TOP_DIR)
|
||||||
COMMON_VPATH += $(TMK_PATH)
|
COMMON_VPATH += $(TMK_PATH)
|
||||||
@@ -21,4 +21,5 @@ COMMON_VPATH += $(QUANTUM_PATH)/keymap_extras
|
|||||||
COMMON_VPATH += $(QUANTUM_PATH)/audio
|
COMMON_VPATH += $(QUANTUM_PATH)/audio
|
||||||
COMMON_VPATH += $(QUANTUM_PATH)/process_keycode
|
COMMON_VPATH += $(QUANTUM_PATH)/process_keycode
|
||||||
COMMON_VPATH += $(QUANTUM_PATH)/api
|
COMMON_VPATH += $(QUANTUM_PATH)/api
|
||||||
COMMON_VPATH += $(DRIVER_PATH)
|
COMMON_VPATH += $(QUANTUM_PATH)/split_common
|
||||||
|
COMMON_VPATH += $(DRIVER_PATH)
|
||||||
+19
-1
@@ -197,6 +197,12 @@ ifeq ($(strip $(USB_HID_ENABLE)), yes)
|
|||||||
include $(TMK_DIR)/protocol/usb_hid.mk
|
include $(TMK_DIR)/protocol/usb_hid.mk
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
ifeq ($(strip $(HD44780_ENABLE)), yes)
|
||||||
|
SRC += drivers/avr/hd44780.c
|
||||||
|
OPT_DEFS += -DHD44780_ENABLE
|
||||||
|
endif
|
||||||
|
|
||||||
QUANTUM_SRC:= \
|
QUANTUM_SRC:= \
|
||||||
$(QUANTUM_DIR)/quantum.c \
|
$(QUANTUM_DIR)/quantum.c \
|
||||||
$(QUANTUM_DIR)/keymap_common.c \
|
$(QUANTUM_DIR)/keymap_common.c \
|
||||||
@@ -204,5 +210,17 @@ QUANTUM_SRC:= \
|
|||||||
$(QUANTUM_DIR)/process_keycode/process_leader.c
|
$(QUANTUM_DIR)/process_keycode/process_leader.c
|
||||||
|
|
||||||
ifndef CUSTOM_MATRIX
|
ifndef CUSTOM_MATRIX
|
||||||
QUANTUM_SRC += $(QUANTUM_DIR)/matrix.c
|
ifeq ($(strip $(SPLIT_KEYBOARD)), yes)
|
||||||
|
QUANTUM_SRC += $(QUANTUM_DIR)/split_common/matrix.c
|
||||||
|
else
|
||||||
|
QUANTUM_SRC += $(QUANTUM_DIR)/matrix.c
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(SPLIT_KEYBOARD)), yes)
|
||||||
|
OPT_DEFS += -DSPLIT_KEYBOARD
|
||||||
|
QUANTUM_SRC += $(QUANTUM_DIR)/split_common/split_flags.c \
|
||||||
|
$(QUANTUM_DIR)/split_common/split_util.c \
|
||||||
|
$(QUANTUM_DIR)/split_common/i2c.c \
|
||||||
|
$(QUANTUM_DIR)/split_common/serial.c
|
||||||
endif
|
endif
|
||||||
+6
-2
@@ -55,18 +55,22 @@
|
|||||||
* [Userspace](feature_userspace.md)
|
* [Userspace](feature_userspace.md)
|
||||||
|
|
||||||
* [Keycodes](keycodes.md)
|
* [Keycodes](keycodes.md)
|
||||||
* [Backlight](feature_backlight.md#backlight-keycodes)
|
|
||||||
* [Basic](keycodes_basic.md)
|
* [Basic](keycodes_basic.md)
|
||||||
|
* [Quantum](quantum_keycodes.md)
|
||||||
|
* [Audio](feature_audio.md#audio-keycodes)
|
||||||
|
* [Backlight](feature_backlight.md#backlight-keycodes)
|
||||||
* [Bluetooth](feature_bluetooth.md#bluetooth-keycodes)
|
* [Bluetooth](feature_bluetooth.md#bluetooth-keycodes)
|
||||||
* [Bootmagic](feature_bootmagic.md#bootmagic-keycodes)
|
* [Bootmagic](feature_bootmagic.md#bootmagic-keycodes)
|
||||||
* [Layer Switching](feature_advanced_keycodes.md#switching-and-toggling-layers)
|
* [Layer Switching](feature_advanced_keycodes.md#switching-and-toggling-layers)
|
||||||
* [Mod+Key](feature_advanced_keycodes.md#modifier-keys)
|
* [Mod+Key](feature_advanced_keycodes.md#modifier-keys)
|
||||||
* [Mod Tap](feature_advanced_keycodes.md#mod-tap)
|
* [Mod Tap](feature_advanced_keycodes.md#mod-tap)
|
||||||
|
* [Mouse Keys](feature_mouse_keys.md#mapping-mouse-actions-to-keyboard-keys)
|
||||||
* [One Shot Keys](feature_advanced_keycodes.md#one-shot-keys)
|
* [One Shot Keys](feature_advanced_keycodes.md#one-shot-keys)
|
||||||
* [Quantum](quantum_keycodes.md)
|
|
||||||
* [RGB Light](feature_rgblight.md#rgblight-keycodes)
|
* [RGB Light](feature_rgblight.md#rgblight-keycodes)
|
||||||
|
* [RGB Matrix](feature_rgb_matrix.md#keycodes)
|
||||||
* [Shifted Keys](feature_advanced_keycodes.md#shifted-keycodes)
|
* [Shifted Keys](feature_advanced_keycodes.md#shifted-keycodes)
|
||||||
* [Stenography](feature_stenography.md#keycode-reference)
|
* [Stenography](feature_stenography.md#keycode-reference)
|
||||||
|
* [Swap Hands](feature_swap_hands.md#swap-keycodes)
|
||||||
* [Thermal Printer](feature_thermal_printer.md#thermal-printer-keycodes)
|
* [Thermal Printer](feature_thermal_printer.md#thermal-printer-keycodes)
|
||||||
* [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md)
|
* [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md)
|
||||||
|
|
||||||
|
|||||||
+9
-3
@@ -43,7 +43,9 @@
|
|||||||
* [Pointing Device](feature_pointing_device.md)
|
* [Pointing Device](feature_pointing_device.md)
|
||||||
* [PS/2 Mouse](feature_ps2_mouse.md)
|
* [PS/2 Mouse](feature_ps2_mouse.md)
|
||||||
* [RGB Lighting](feature_rgblight.md)
|
* [RGB Lighting](feature_rgblight.md)
|
||||||
* [Space Cadet](feature_space_cadet.md)
|
* [RGB Matrix](feature_rgb_matrix.md)
|
||||||
|
* [Space Cadet Shift](feature_space_cadet.md)
|
||||||
|
* [Space Cadet Shift Enter](feature_space_shift_cadet.md)
|
||||||
* [Stenography](feature_stenography.md)
|
* [Stenography](feature_stenography.md)
|
||||||
* [Swap Hands](feature_swap_hands.md)
|
* [Swap Hands](feature_swap_hands.md)
|
||||||
* [Tap Dance](feature_tap_dance.md)
|
* [Tap Dance](feature_tap_dance.md)
|
||||||
@@ -53,18 +55,22 @@
|
|||||||
* [Userspace](feature_userspace.md)
|
* [Userspace](feature_userspace.md)
|
||||||
|
|
||||||
* [Keycodes](keycodes.md)
|
* [Keycodes](keycodes.md)
|
||||||
* [Backlight](feature_backlight.md#backlight-keycodes)
|
|
||||||
* [Basic](keycodes_basic.md)
|
* [Basic](keycodes_basic.md)
|
||||||
|
* [Quantum](quantum_keycodes.md)
|
||||||
|
* [Audio](feature_audio.md#audio-keycodes)
|
||||||
|
* [Backlight](feature_backlight.md#backlight-keycodes)
|
||||||
* [Bluetooth](feature_bluetooth.md#bluetooth-keycodes)
|
* [Bluetooth](feature_bluetooth.md#bluetooth-keycodes)
|
||||||
* [Bootmagic](feature_bootmagic.md#bootmagic-keycodes)
|
* [Bootmagic](feature_bootmagic.md#bootmagic-keycodes)
|
||||||
* [Layer Switching](feature_advanced_keycodes.md#switching-and-toggling-layers)
|
* [Layer Switching](feature_advanced_keycodes.md#switching-and-toggling-layers)
|
||||||
* [Mod+Key](feature_advanced_keycodes.md#modifier-keys)
|
* [Mod+Key](feature_advanced_keycodes.md#modifier-keys)
|
||||||
* [Mod Tap](feature_advanced_keycodes.md#mod-tap)
|
* [Mod Tap](feature_advanced_keycodes.md#mod-tap)
|
||||||
|
* [Mouse Keys](feature_mouse_keys.md#mapping-mouse-actions-to-keyboard-keys)
|
||||||
* [One Shot Keys](feature_advanced_keycodes.md#one-shot-keys)
|
* [One Shot Keys](feature_advanced_keycodes.md#one-shot-keys)
|
||||||
* [Quantum](quantum_keycodes.md)
|
|
||||||
* [RGB Light](feature_rgblight.md#rgblight-keycodes)
|
* [RGB Light](feature_rgblight.md#rgblight-keycodes)
|
||||||
|
* [RGB Matrix](feature_rgb_matrix.md#keycodes)
|
||||||
* [Shifted Keys](feature_advanced_keycodes.md#shifted-keycodes)
|
* [Shifted Keys](feature_advanced_keycodes.md#shifted-keycodes)
|
||||||
* [Stenography](feature_stenography.md#keycode-reference)
|
* [Stenography](feature_stenography.md#keycode-reference)
|
||||||
|
* [Swap Hands](feature_swap_hands.md#swap-keycodes)
|
||||||
* [Thermal Printer](feature_thermal_printer.md#thermal-printer-keycodes)
|
* [Thermal Printer](feature_thermal_printer.md#thermal-printer-keycodes)
|
||||||
* [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md)
|
* [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md)
|
||||||
|
|
||||||
|
|||||||
@@ -126,14 +126,18 @@ If you define these options you will enable the associated feature, which may in
|
|||||||
* how long before a tap becomes a hold, if set above 500, a key tapped during the tapping term will turn it into a hold too
|
* how long before a tap becomes a hold, if set above 500, a key tapped during the tapping term will turn it into a hold too
|
||||||
* `#define RETRO_TAPPING`
|
* `#define RETRO_TAPPING`
|
||||||
* tap anyway, even after TAPPING_TERM, if there was no other key interruption between press and release
|
* tap anyway, even after TAPPING_TERM, if there was no other key interruption between press and release
|
||||||
|
* See [Retro Tapping](feature_advanced_keycodes.md#retro-tapping) for details
|
||||||
* `#define TAPPING_TOGGLE 2`
|
* `#define TAPPING_TOGGLE 2`
|
||||||
* how many taps before triggering the toggle
|
* how many taps before triggering the toggle
|
||||||
* `#define PERMISSIVE_HOLD`
|
* `#define PERMISSIVE_HOLD`
|
||||||
* makes tap and hold keys work better for fast typers who don't want tapping term set above 500
|
* makes tap and hold keys work better for fast typers who don't want tapping term set above 500
|
||||||
|
* See [Permissive Hold](feature_advanced_keycodes.md#permissive-hold) for details
|
||||||
* `#define IGNORE_MOD_TAP_INTERRUPT`
|
* `#define IGNORE_MOD_TAP_INTERRUPT`
|
||||||
* makes it possible to do rolling combos (zx) with keys that convert to other keys on hold
|
* makes it possible to do rolling combos (zx) with keys that convert to other keys on hold
|
||||||
|
* See [Mod tap interrupt](feature_advanced_keycodes.md#mod-tap-interrupt) for details
|
||||||
* `#define TAPPING_FORCE_HOLD`
|
* `#define TAPPING_FORCE_HOLD`
|
||||||
* makes it possible to use a dual role key as modifier shortly after having been tapped
|
* makes it possible to use a dual role key as modifier shortly after having been tapped
|
||||||
|
* See [Hold after tap](feature_advanced_keycodes.md#hold-after-tap)
|
||||||
* `#define LEADER_TIMEOUT 300`
|
* `#define LEADER_TIMEOUT 300`
|
||||||
* how long before the leader key times out
|
* how long before the leader key times out
|
||||||
* `#define ONESHOT_TIMEOUT 300`
|
* `#define ONESHOT_TIMEOUT 300`
|
||||||
@@ -175,6 +179,16 @@ If you define these options you will enable the associated feature, which may in
|
|||||||
* `#define MOUSEKEY_MAX_SPEED 7`
|
* `#define MOUSEKEY_MAX_SPEED 7`
|
||||||
* `#define MOUSEKEY_WHEEL_DELAY 0`
|
* `#define MOUSEKEY_WHEEL_DELAY 0`
|
||||||
|
|
||||||
|
## Split Keyboard Options
|
||||||
|
|
||||||
|
Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk
|
||||||
|
|
||||||
|
* `#define SPLIT_HAND_PIN B7`
|
||||||
|
* For using high/low pin to determine handedness, low = right hand, high = left hand. Replace 'B7' with the pin you are using. This is optional and you can still use the EEHANDS method or MASTER_LEFT / MASTER_RIGHT defines like the stock Let's Split uses.
|
||||||
|
|
||||||
|
* `#define USE_I2C`
|
||||||
|
* For using I2C instead of Serial (defaults to serial)
|
||||||
|
|
||||||
# The `rules.mk` File
|
# 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.
|
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.
|
||||||
@@ -228,3 +242,5 @@ Use these to enable or disable building certain features. The more you have enab
|
|||||||
* Unicode
|
* Unicode
|
||||||
* `BLUETOOTH_ENABLE`
|
* `BLUETOOTH_ENABLE`
|
||||||
* Enable Bluetooth with the Adafruit EZ-Key HID
|
* Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
* `SPLIT_KEYBOARD`
|
||||||
|
* Enables split keyboard support (dual MCU like the let's split and bakingpy's boards) and includes all necessary files located at quantum/split_common
|
||||||
@@ -203,3 +203,9 @@ With default settings, `a` will be sent on the first release, then `a` will be s
|
|||||||
With `TAPPING_FORCE_HOLD`, the second press will be interpreted as a Shift, allowing to use it as a modifier shortly after having used it as a tap.
|
With `TAPPING_FORCE_HOLD`, the second press will be interpreted as a Shift, allowing to use it as a modifier shortly after having used it as a tap.
|
||||||
|
|
||||||
!> `TAPPING_FORCE_HOLD` will break anything that uses tapping toggles (Such as the `TT` layer keycode, and the One Shot Tapping Toggle).
|
!> `TAPPING_FORCE_HOLD` will break anything that uses tapping toggles (Such as the `TT` layer keycode, and the One Shot Tapping Toggle).
|
||||||
|
|
||||||
|
# Retro Tapping
|
||||||
|
|
||||||
|
When you hold a dual function key, and haven't pressed anything when you release the key, normally nothing happens. However, if you enable this, if you release the key without pressing another key, it will send the original key, even if it is outside of the tapping term.
|
||||||
|
|
||||||
|
For instance, if you're using `LT(2, KC_SPACE)`, if you hold the key, don't hit anything else and then release it, normally, nothing happens. But with `RETRO_TAPPING` defined in your `config.h`, it will send `KC_SPACE`.
|
||||||
@@ -3,6 +3,7 @@
|
|||||||
Your keyboard can make sounds! If you've got a Planck, Preonic, or basically any AVR keyboard that allows access to certain PWM-capable pins, you can hook up a simple speaker and make it beep. You can use those beeps to indicate layer transitions, modifiers, special keys, or just to play some funky 8bit tunes.
|
Your keyboard can make sounds! If you've got a Planck, Preonic, or basically any AVR keyboard that allows access to certain PWM-capable pins, you can hook up a simple speaker and make it beep. You can use those beeps to indicate layer transitions, modifiers, special keys, or just to play some funky 8bit tunes.
|
||||||
|
|
||||||
Up to two simultaneous audio voices are supported, one driven by timer 1 and another driven by timer 3. The following pins can be defined as audio outputs in config.h:
|
Up to two simultaneous audio voices are supported, one driven by timer 1 and another driven by timer 3. The following pins can be defined as audio outputs in config.h:
|
||||||
|
|
||||||
Timer 1:
|
Timer 1:
|
||||||
`#define B5_AUDIO`
|
`#define B5_AUDIO`
|
||||||
`#define B6_AUDIO`
|
`#define B6_AUDIO`
|
||||||
@@ -58,6 +59,13 @@ PLAY_LOOP(my_song);
|
|||||||
|
|
||||||
It's advised that you wrap all audio features in `#ifdef AUDIO_ENABLE` / `#endif` to avoid causing problems when audio isn't built into the keyboard.
|
It's advised that you wrap all audio features in `#ifdef AUDIO_ENABLE` / `#endif` to avoid causing problems when audio isn't built into the keyboard.
|
||||||
|
|
||||||
|
The available keycodes for audio are:
|
||||||
|
|
||||||
|
* `AU_ON` - Turn audio mode on
|
||||||
|
* `AU_OFF` - Turn audio mode off
|
||||||
|
* `AU_TOG` - Toggle audio mode
|
||||||
|
|
||||||
|
|
||||||
## Music Mode
|
## Music Mode
|
||||||
|
|
||||||
The music mode maps your columns to a chromatic scale, and your rows to octaves. This works best with ortholinear keyboards, but can be made to work with others. All keycodes less than `0xFF` get blocked, so you won't type while playing notes - if you have special keys/mods, those will still work. A work-around for this is to jump to a different layer with KC_NOs before (or after) enabling music mode.
|
The music mode maps your columns to a chromatic scale, and your rows to octaves. This works best with ortholinear keyboards, but can be made to work with others. All keycodes less than `0xFF` get blocked, so you won't type while playing notes - if you have special keys/mods, those will still work. A work-around for this is to jump to a different layer with KC_NOs before (or after) enabling music mode.
|
||||||
@@ -145,6 +153,23 @@ You can configure the default, min and max frequencies, the stepping and built i
|
|||||||
|
|
||||||
This is still a WIP, but check out `quantum/keymap_midi.c` to see what's happening. Enable from the Makefile.
|
This is still a WIP, but check out `quantum/keymap_midi.c` to see what's happening. Enable from the Makefile.
|
||||||
|
|
||||||
|
|
||||||
|
## Audio Keycodes
|
||||||
|
|
||||||
|
|Key |Aliases |Description |
|
||||||
|
|----------------|---------|----------------------------------|
|
||||||
|
|`AU_ON` | |Audio mode on |
|
||||||
|
|`AU_OFF` | |Audio mode off |
|
||||||
|
|`AU_TOG` | |Toggles Audio mode |
|
||||||
|
|`CLICKY_TOGGLE` |`CK_TOGG`|Toggles Audio clicky mode |
|
||||||
|
|`CLICKY_UP` |`CK_UP` |Increases frequency of the clicks |
|
||||||
|
|`CLICKY_DOWN` |`CK_DOWN`|Decreases frequency of the clicks |
|
||||||
|
|`CLICKY_RESET` |`CK_RST` |Resets frequency to default |
|
||||||
|
|`MU_ON` | |Turns on Music Mode |
|
||||||
|
|`MU_OFF` | |Turns off Music Mode |
|
||||||
|
|`MU_TOG` | |Toggles Music Mode |
|
||||||
|
|`MU_MOD` | |Cycles through the music modes |
|
||||||
|
|
||||||
<!-- FIXME: this formatting needs work
|
<!-- FIXME: this formatting needs work
|
||||||
|
|
||||||
## Audio
|
## Audio
|
||||||
|
|||||||
@@ -0,0 +1,56 @@
|
|||||||
|
# HD44780 LCD Displays
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
You will need to configure the pins used by your display and its number of lines and collumn in your keyboards `config.h`.
|
||||||
|
|
||||||
|
Uncomment the section labled HD44780 and change the parameters as needed.
|
||||||
|
````
|
||||||
|
/*
|
||||||
|
* 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
|
||||||
|
````
|
||||||
|
|
||||||
|
Should you need to configure other properties you can copy them from `quantum/hd44780.h` and set them in your `config.h`
|
||||||
|
|
||||||
|
## 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
|
||||||
|
````
|
||||||
|
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.
|
||||||
|
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)
|
||||||
@@ -31,6 +31,20 @@ The reason for this, is that `<name>.h` won't be added in time to add settings (
|
|||||||
|
|
||||||
So you should use the `config.h` for QMK settings, and the `<name>.h` file for user or keymap specific settings.
|
So you should use the `config.h` for QMK settings, and the `<name>.h` file for user or keymap specific settings.
|
||||||
|
|
||||||
|
`/users/<name>/rules.mk` will be included in the build _after_ the `rules.mk` from your keymap. This allows you to have features in your userspace `rules.mk` that depend on individual QMK features that may or may not be available on a specific keyboard. For example, if you have RGB control features shared between all your keyboards that support RGB lighting, you can `define RGB_ENABLE` in your keymap `rules.mk` and then check for the variable in your userspace `rules.mk` like this:
|
||||||
|
```make
|
||||||
|
ifdef RGB_ENABLE
|
||||||
|
# Include my fancy rgb functions source here
|
||||||
|
endif
|
||||||
|
```
|
||||||
|
Because of this, any time you turn on QMK features in your `users/<name>/rules.mk`, you should conditionally enable them only if the flag isn't already defined, like this:
|
||||||
|
```make
|
||||||
|
ifndef TAP_DANCE_ENABLE
|
||||||
|
TAP_DANCE_ENABLE = yes
|
||||||
|
endif
|
||||||
|
```
|
||||||
|
This will ensure that you can explicitly turn off features for an individual keymap.
|
||||||
|
|
||||||
## Readme
|
## Readme
|
||||||
|
|
||||||
Please include authorship (your name, github username, email), and optionally [a license that's GPL compatible](https://www.gnu.org/licenses/license-list.html#GPLCompatibleLicenses).
|
Please include authorship (your name, github username, email), and optionally [a license that's GPL compatible](https://www.gnu.org/licenses/license-list.html#GPLCompatibleLicenses).
|
||||||
@@ -122,4 +136,4 @@ By default the userspace used will be the same as the keymap name. In some situa
|
|||||||
|
|
||||||
```
|
```
|
||||||
USER_NAME := mylayout
|
USER_NAME := mylayout
|
||||||
```
|
```
|
||||||
@@ -9,6 +9,7 @@ QMK has a staggering number of features for building your keyboard. It can take
|
|||||||
* [Backlight](feature_backlight.md) - LED lighting support for your keyboard.
|
* [Backlight](feature_backlight.md) - LED lighting support for your keyboard.
|
||||||
* [Bootmagic](feature_bootmagic.md) - Adjust the behavior of your keyboard using hotkeys.
|
* [Bootmagic](feature_bootmagic.md) - Adjust the behavior of your keyboard using hotkeys.
|
||||||
* [Dynamic Macros](feature_dynamic_macros.md) - Record and playback macros from the keyboard itself.
|
* [Dynamic Macros](feature_dynamic_macros.md) - Record and playback macros from the keyboard itself.
|
||||||
|
* [HD44780 LCD Display](feature_hd44780.md) - Support for LCD character displays using the HD44780 standard.
|
||||||
* [Key Lock](feature_key_lock.md) - Lock a key in the "down" state.
|
* [Key Lock](feature_key_lock.md) - Lock a key in the "down" state.
|
||||||
* [Layouts](feature_layouts.md) - Use one keymap with any keyboard that supports your layout.
|
* [Layouts](feature_layouts.md) - Use one keymap with any keyboard that supports your layout.
|
||||||
* [Leader Key](feature_leader_key.md) - Tap the leader key followed by a sequence to trigger custom behavior.
|
* [Leader Key](feature_leader_key.md) - Tap the leader key followed by a sequence to trigger custom behavior.
|
||||||
|
|||||||
@@ -19,8 +19,7 @@ And be sure to select "HTTPS", and select the link and copy it:
|
|||||||
From here, enter `git clone ` into the command line, and then paste your link:
|
From here, enter `git clone ` into the command line, and then paste your link:
|
||||||
|
|
||||||
```
|
```
|
||||||
**[terminal]
|
user@computer:~$ git clone https://github.com/whoeveryouare/qmk_firmware.git
|
||||||
**[prompt you@computer]**[path ~]**[delimiter $ ]**[command git clone https://github.com/whoeveryouare/qmk_firmware.git]
|
|
||||||
Cloning into 'qmk_firmware'...
|
Cloning into 'qmk_firmware'...
|
||||||
remote: Counting objects: 46625, done.
|
remote: Counting objects: 46625, done.
|
||||||
remote: Compressing objects: 100% (2/2), done.
|
remote: Compressing objects: 100% (2/2), done.
|
||||||
@@ -33,13 +32,12 @@ Checking out files: 100% (2799/2799), done.
|
|||||||
You now have your QMK fork on your local machine, and you can add your keymap, compile it and flash it to your board. Once you're happy with your changes, you can add, commit, and push them to your fork like this:
|
You now have your QMK fork on your local machine, and you can add your keymap, compile it and flash it to your board. Once you're happy with your changes, you can add, commit, and push them to your fork like this:
|
||||||
|
|
||||||
```
|
```
|
||||||
**[terminal]
|
user@computer:~$ git add .
|
||||||
**[prompt you@computer]**[path ~/qmk_firmware]**[delimiter $ ]**[command git add .]
|
user@computer:~$ git commit -m "adding my keymap"
|
||||||
**[prompt you@computer]**[path ~/qmk_firmware]**[delimiter $ ]**[command git commit -m "adding my keymap"]
|
|
||||||
[master cccb1608] adding my keymap
|
[master cccb1608] adding my keymap
|
||||||
1 file changed, 1 insertion(+)
|
1 file changed, 1 insertion(+)
|
||||||
create mode 100644 keyboards/planck/keymaps/mine/keymap.c
|
create mode 100644 keyboards/planck/keymaps/mine/keymap.c
|
||||||
**[prompt you@computer]**[path ~/qmk_firmware]**[delimiter $ ]**[command git push]
|
user@computer:~$ git push
|
||||||
Counting objects: 1, done.
|
Counting objects: 1, done.
|
||||||
Delta compression using up to 4 threads.
|
Delta compression using up to 4 threads.
|
||||||
Compressing objects: 100% (1/1), done.
|
Compressing objects: 100% (1/1), done.
|
||||||
|
|||||||
@@ -6,12 +6,16 @@ This page attempts to explain the basic information you need to know to work wit
|
|||||||
|
|
||||||
QMK is a fork of [Jun Wako](https://github.com/tmk)'s [tmk_keyboard](https://github.com/tmk/tmk_keyboard) project. The original TMK code, with modifications, can be found in the `tmk` folder. The QMK additions to the project may be found in the `quantum` folder. Keyboard projects may be found in the `handwired` and `keyboard` folders.
|
QMK is a fork of [Jun Wako](https://github.com/tmk)'s [tmk_keyboard](https://github.com/tmk/tmk_keyboard) project. The original TMK code, with modifications, can be found in the `tmk` folder. The QMK additions to the project may be found in the `quantum` folder. Keyboard projects may be found in the `handwired` and `keyboard` folders.
|
||||||
|
|
||||||
|
### Userspace Structure
|
||||||
|
|
||||||
|
Within the folder `users` is a directory for each user. This is a place for users to put code that they might use between keyboards. See the docs for [Userspace feature](feature_userspace.md) for more information.
|
||||||
|
|
||||||
### Keyboard Project Structure
|
### Keyboard Project Structure
|
||||||
|
|
||||||
Within the folder `keyboards` and its subfolder `handwired` is a directory for each keyboard project, for example `qmk_firmware/keyboards/clueboard`. Within it you'll find the following structure:
|
Within the folder `keyboards` and its subfolder `handwired` is a directory for each keyboard project, for example `qmk_firmware/keyboards/clueboard`. Within it you'll find the following structure:
|
||||||
|
|
||||||
* `keymaps/`: Different keymaps that can be built
|
* `keymaps/`: Different keymaps that can be built
|
||||||
* `rules.mk`: The file that sets the default "make" options. Do not edit this file directly, instead use a keymap specific `Makefile`
|
* `rules.mk`: The file that sets the default "make" options. Do not edit this file directly, instead use a keymap specific `rules.mk`.
|
||||||
* `config.h`: The file that sets the default compile time options. Do not edit this file directly, instead use a keymap specific `config.h`.
|
* `config.h`: The file that sets the default compile time options. Do not edit this file directly, instead use a keymap specific `config.h`.
|
||||||
|
|
||||||
### Keymap Structure
|
### Keymap Structure
|
||||||
@@ -25,23 +29,26 @@ In every keymap folder, the following files may be found. Only `keymap.c` is req
|
|||||||
|
|
||||||
# The `config.h` File
|
# The `config.h` File
|
||||||
|
|
||||||
There are 2 `config.h` locations:
|
There are 3 possible `config.h` locations:
|
||||||
|
|
||||||
* keyboard (`/keyboards/<keyboard>/config.h`)
|
* keyboard (`/keyboards/<keyboard>/config.h`)
|
||||||
|
* userspace (`/users/<user>/config.h`)
|
||||||
* keymap (`/keyboards/<keyboard>/keymaps/<keymap>/config.h`)
|
* keymap (`/keyboards/<keyboard>/keymaps/<keymap>/config.h`)
|
||||||
|
|
||||||
If the keymap `config.h` exists, that file is included by the build system and the keyboard `config.h` is not included. If you wish to override settings in your keymap's `config.h` you will need to include some glue code:
|
The build system automatically picks up the config files in the above order. If you wish to override any setting set by a previous `config.h` you will need to first include some boilerplate code for the settings you wish to change.
|
||||||
|
|
||||||
```
|
```
|
||||||
#ifndef CONFIG_USER_H
|
#pragma once
|
||||||
#define CONFIG_USER_H
|
|
||||||
|
|
||||||
#include "config_common.h"
|
|
||||||
```
|
```
|
||||||
|
|
||||||
If you want to override a setting from the parent `config.h` file, you need to `#undef` and then `#define` the setting again, like this:
|
Then to override a setting from the previous `config.h` file you must `#undef` and then `#define` the setting again.
|
||||||
|
|
||||||
```c
|
The boilerplate code and setting look like this together:
|
||||||
|
|
||||||
|
```
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
// overrides go here!
|
||||||
#undef MY_SETTING
|
#undef MY_SETTING
|
||||||
#define MY_SETTING 4
|
#define MY_SETTING 4
|
||||||
```
|
```
|
||||||
@@ -133,6 +133,10 @@ This consumes about 5390 bytes.
|
|||||||
|
|
||||||
This enables [key lock](feature_key_lock.md). This consumes an additional 260 bytes.
|
This enables [key lock](feature_key_lock.md). This consumes an additional 260 bytes.
|
||||||
|
|
||||||
|
`SPLIT_KEYBOARD`
|
||||||
|
|
||||||
|
This enables split keyboard support (dual MCU like the let's split and bakingpy's boards) and includes all necessary files located at quantum/split_common
|
||||||
|
|
||||||
## Customizing Makefile Options on a Per-Keymap Basis
|
## Customizing Makefile Options on a Per-Keymap Basis
|
||||||
|
|
||||||
If your keymap directory has a file called `rules.mk` any options you set in that file will take precedence over other `rules.mk` options for your particular keyboard.
|
If your keymap directory has a file called `rules.mk` any options you set in that file will take precedence over other `rules.mk` options for your particular keyboard.
|
||||||
|
|||||||
+118
-87
@@ -191,27 +191,6 @@ This is a reference only. Each group of keys links to the page documenting their
|
|||||||
|`KC_NO` | |Ignore this key (NOOP) |
|
|`KC_NO` | |Ignore this key (NOOP) |
|
||||||
|`KC_TRANSPARENT` |`KC_TRNS` |Use the next lowest non-transparent key |
|
|`KC_TRANSPARENT` |`KC_TRNS` |Use the next lowest non-transparent key |
|
||||||
|
|
||||||
## [Mouse Keys](feature_mouse_keys.md)
|
|
||||||
|
|
||||||
|Key |Aliases |Description |
|
|
||||||
|----------------|---------|---------------------------|
|
|
||||||
|`KC_MS_UP` |`KC_MS_U`|Mouse Cursor Up |
|
|
||||||
|`KC_MS_DOWN` |`KC_MS_D`|Mouse Cursor Down |
|
|
||||||
|`KC_MS_LEFT` |`KC_MS_L`|Mouse Cursor Left |
|
|
||||||
|`KC_MS_RIGHT` |`KC_MS_R`|Mouse Cursor Right |
|
|
||||||
|`KC_MS_BTN1` |`KC_BTN1`|Mouse Button 1 |
|
|
||||||
|`KC_MS_BTN2` |`KC_BTN2`|Mouse Button 2 |
|
|
||||||
|`KC_MS_BTN3` |`KC_BTN3`|Mouse Button 3 |
|
|
||||||
|`KC_MS_BTN4` |`KC_BTN4`|Mouse Button 4 |
|
|
||||||
|`KC_MS_BTN5` |`KC_BTN5`|Mouse Button 5 |
|
|
||||||
|`KC_MS_WH_UP` |`KC_WH_U`|Mouse Wheel Up |
|
|
||||||
|`KC_MS_WH_DOWN` |`KC_WH_D`|Mouse Wheel Down |
|
|
||||||
|`KC_MS_WH_LEFT` |`KC_WH_L`|Mouse Wheel Left |
|
|
||||||
|`KC_MS_WH_RIGHT`|`KC_WH_R`|Mouse Wheel Right |
|
|
||||||
|`KC_MS_ACCEL0` |`KC_ACL0`|Set mouse acceleration to 0|
|
|
||||||
|`KC_MS_ACCEL1` |`KC_ACL1`|Set mouse acceleration to 1|
|
|
||||||
|`KC_MS_ACCEL2` |`KC_ACL2`|Set mouse acceleration to 2|
|
|
||||||
|
|
||||||
## [Quantum Keycodes](quantum_keycodes.md#qmk-keycodes)
|
## [Quantum Keycodes](quantum_keycodes.md#qmk-keycodes)
|
||||||
|
|
||||||
|Key |Aliases |Description |
|
|Key |Aliases |Description |
|
||||||
@@ -227,6 +206,36 @@ This is a reference only. Each group of keys links to the page documenting their
|
|||||||
|`M(n)` | |Call macro `n` |
|
|`M(n)` | |Call macro `n` |
|
||||||
|`MACROTAP(n)`| |Macro-tap `n` idk FIXME |
|
|`MACROTAP(n)`| |Macro-tap `n` idk FIXME |
|
||||||
|
|
||||||
|
## [Audio Keys](feature_audio.md)
|
||||||
|
|
||||||
|
|Key |Aliases |Description |
|
||||||
|
|----------------|---------|----------------------------------|
|
||||||
|
|`AU_ON` | |Audio mode on |
|
||||||
|
|`AU_OFF` | |Audio mode off |
|
||||||
|
|`AU_TOG` | |Toggles Audio mode |
|
||||||
|
|`CLICKY_TOGGLE` |`CK_TOGG`|Toggles Audio clicky mode |
|
||||||
|
|`CLICKY_UP` |`CK_UP` |Increases frequency of the clicks |
|
||||||
|
|`CLICKY_DOWN` |`CK_DOWN`|Decreases frequency of the clicks |
|
||||||
|
|`CLICKY_RESET` |`CK_RST` |Resets frequency to default |
|
||||||
|
|`MU_ON` | |Turns on Music Mode |
|
||||||
|
|`MU_OFF` | |Turns off Music Mode |
|
||||||
|
|`MU_TOG` | |Toggles Music Mode |
|
||||||
|
|`MU_MOD` | |Cycles through the music modes |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [Backlighting](feature_backlight.md)
|
||||||
|
|
||||||
|
|Key |Description |
|
||||||
|
|---------|------------------------------------------|
|
||||||
|
|`BL_TOGG`|Turn the backlight on or off |
|
||||||
|
|`BL_STEP`|Cycle through backlight levels |
|
||||||
|
|`BL_ON` |Set the backlight to max brightness |
|
||||||
|
|`BL_OFF` |Turn the backlight off |
|
||||||
|
|`BL_INC` |Increase the backlight level |
|
||||||
|
|`BL_DEC` |Decrease the backlight level |
|
||||||
|
|`BL_BRTG`|Toggle backlight breathing |
|
||||||
|
|
||||||
## [Bootmagic](feature_bootmagic.md)
|
## [Bootmagic](feature_bootmagic.md)
|
||||||
|
|
||||||
|Key |Aliases |Description |
|
|Key |Aliases |Description |
|
||||||
@@ -251,17 +260,88 @@ This is a reference only. Each group of keys links to the page documenting their
|
|||||||
|`MAGIC_UNSWAP_ALT_GUI` |`AG_NORM`|Unswap Alt and GUI on both sides |
|
|`MAGIC_UNSWAP_ALT_GUI` |`AG_NORM`|Unswap Alt and GUI on both sides |
|
||||||
|`MAGIC_TOGGLE_NKRO` | |Turn NKRO on or off |
|
|`MAGIC_TOGGLE_NKRO` | |Turn NKRO on or off |
|
||||||
|
|
||||||
## [Backlighting](feature_backlight.md)
|
## [Bluetooth](feature_bluetooth.md)
|
||||||
|
|
||||||
|Key |Description |
|
|Key |Description |
|
||||||
|---------|------------------------------------------|
|
|----------|----------------------------------------------|
|
||||||
|`BL_TOGG`|Turn the backlight on or off |
|
|`OUT_AUTO`|Automatically switch between USB and Bluetooth|
|
||||||
|`BL_STEP`|Cycle through backlight levels |
|
|`OUT_USB` |USB only |
|
||||||
|`BL_ON` |Set the backlight to max brightness |
|
|`OUT_BT` |Bluetooth only |
|
||||||
|`BL_OFF` |Turn the backlight off |
|
|
||||||
|`BL_INC` |Increase the backlight level |
|
|
||||||
|`BL_DEC` |Decrease the backlight level |
|
## [Layer Switching](feature_advanced_keycodes.md# Switching and Toggling Layers)
|
||||||
|`BL_BRTG`|Toggle backlight breathing |
|
|
||||||
|
|Key |Description |
|
||||||
|
|-----------------|---------------------------------------------------------------------|
|
||||||
|
|`DF(layer)` |Switches the default layer |
|
||||||
|
|`MO(layer)` |Momentarily activates layer, switches off when you let go |
|
||||||
|
|`LM(layer, mod)` |As `MO(layer)` but with `mod` active |
|
||||||
|
|`LT(layer, kc)` |Momentarily activates layer if held, sends kc if tapped |
|
||||||
|
|`TG(layer)` |Toggles the layer (enables it if no active, and vise versa) |
|
||||||
|
|`TO(layer)` |Activates layer and deactivates all other layers |
|
||||||
|
|`TT(layer)` |Momentarily activates layer if held, toggles it if tapped repeatedly |
|
||||||
|
|
||||||
|
## [Mouse Keys](feature_mouse_keys.md)
|
||||||
|
|
||||||
|
|Key |Aliases |Description |
|
||||||
|
|----------------|---------|---------------------------|
|
||||||
|
|`KC_MS_UP` |`KC_MS_U`|Mouse Cursor Up |
|
||||||
|
|`KC_MS_DOWN` |`KC_MS_D`|Mouse Cursor Down |
|
||||||
|
|`KC_MS_LEFT` |`KC_MS_L`|Mouse Cursor Left |
|
||||||
|
|`KC_MS_RIGHT` |`KC_MS_R`|Mouse Cursor Right |
|
||||||
|
|`KC_MS_BTN1` |`KC_BTN1`|Mouse Button 1 |
|
||||||
|
|`KC_MS_BTN2` |`KC_BTN2`|Mouse Button 2 |
|
||||||
|
|`KC_MS_BTN3` |`KC_BTN3`|Mouse Button 3 |
|
||||||
|
|`KC_MS_BTN4` |`KC_BTN4`|Mouse Button 4 |
|
||||||
|
|`KC_MS_BTN5` |`KC_BTN5`|Mouse Button 5 |
|
||||||
|
|`KC_MS_WH_UP` |`KC_WH_U`|Mouse Wheel Up |
|
||||||
|
|`KC_MS_WH_DOWN` |`KC_WH_D`|Mouse Wheel Down |
|
||||||
|
|`KC_MS_WH_LEFT` |`KC_WH_L`|Mouse Wheel Left |
|
||||||
|
|`KC_MS_WH_RIGHT`|`KC_WH_R`|Mouse Wheel Right |
|
||||||
|
|`KC_MS_ACCEL0` |`KC_ACL0`|Set mouse acceleration to 0|
|
||||||
|
|`KC_MS_ACCEL1` |`KC_ACL1`|Set mouse acceleration to 1|
|
||||||
|
|`KC_MS_ACCEL2` |`KC_ACL2`|Set mouse acceleration to 2|
|
||||||
|
|
||||||
|
## [Modifiers](feature_advanced_keycodes.md#modifier-keys)
|
||||||
|
|
||||||
|
|Key |Aliases |Description |
|
||||||
|
|----------|---------- |----------------------------------------------------|
|
||||||
|
|`KC_HYPR` | |Hold Left Control, Shift, Alt and GUI |
|
||||||
|
|`KC_MEH` | |Hold Left Control, Shift and Alt |
|
||||||
|
|`LCTL(kc)`| |Hold Left Control and press `kc` |
|
||||||
|
|`LSFT(kc)`|`S(kc)` |Hold Left Shift and press `kc` |
|
||||||
|
|`LALT(kc)`| |Hold Left Alt and press `kc` |
|
||||||
|
|`LGUI(kc)`|`LCMD(kc)`, `LWIN(kc)`|Hold Left GUI and press `kc` |
|
||||||
|
|`RCTL(kc)`| |Hold Right Control and press `kc` |
|
||||||
|
|`RSFT(kc)`| |Hold Right Shift and press `kc` |
|
||||||
|
|`RALT(kc)`| |Hold Right Alt and press `kc` |
|
||||||
|
|`RGUI(kc)`|`RCMD(kc)`, `LWIN(kc)`|Hold Right GUI and press `kc` |
|
||||||
|
|`HYPR(kc)`| |Hold Left Control, Shift, Alt and GUI and press `kc`|
|
||||||
|
|`MEH(kc)` | |Hold Left Control, Shift and Alt and press `kc` |
|
||||||
|
|`LCAG(kc)`| |Hold Left Control, Alt and GUI and press `kc` |
|
||||||
|
|`ALTG(kc)`| |Hold Right Control and Alt and press `kc` |
|
||||||
|
|`SGUI(kc)`|`SCMD(kc)`, `SWIN(kc)`|Hold Left Shift and GUI and press `kc` |
|
||||||
|
|`LCA(kc)` | |Hold Left Control and Alt and press `kc` |
|
||||||
|
|
||||||
|
## [Mod-Tap Keys](feature_advanced_keycodes.md#mod-tap)
|
||||||
|
|
||||||
|
|Key |Aliases |Description |
|
||||||
|
|------------|---------------------------------------|-------------------------------------------------------|
|
||||||
|
|`LCTL_T(kc)`|`CTL_T(kc)` |Left Control when held, `kc` when tapped |
|
||||||
|
|`RCTL_T(kc)`| |Right Control when held, `kc` when tapped |
|
||||||
|
|`LSFT_T(kc)`|`SFT_T(kc)` |Left Shift when held, `kc` when tapped |
|
||||||
|
|`RSFT_T(kc)`| |Right Shift when held, `kc` when tapped |
|
||||||
|
|`LALT_T(kc)`|`ALT_T(kc)` |Left Alt when held, `kc` when tapped |
|
||||||
|
|`RALT_T(kc)`|`ALGR_T(kc)` |Right Alt when held, `kc` when tapped |
|
||||||
|
|`LGUI_T(kc)`|`LCMD_T(kc)`, `RWIN_T(kc)`, `GUI_T(kc)`|Left GUI when held, `kc` when tapped |
|
||||||
|
|`RGUI_T(kc)`|`RCMD_T(kc)`, `RWIN_T(kc)` |Right GUI when held, `kc` when tapped |
|
||||||
|
|`C_S_T(kc)` | |Left Control and Shift when held, `kc` when tapped |
|
||||||
|
|`MEH_T(kc)` | |Left Control, Shift and Alt when held, `kc` when tapped|
|
||||||
|
|`LCAG_T(kc)`| |Left Control, Alt and GUI when held, `kc` when tapped |
|
||||||
|
|`RCAG_T(kc)`| |Right Control, Alt and GUI when held, `kc` when tapped |
|
||||||
|
|`ALL_T(kc)` | |Left Control, Shift, Alt and GUI when held, `kc` when tapped - more info [here](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)|
|
||||||
|
|`SCMD_T(kc)`|`SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped |
|
||||||
|
|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped |
|
||||||
|
|
||||||
## [RGB Lighting](feature_rgblight.md)
|
## [RGB Lighting](feature_rgblight.md)
|
||||||
|
|
||||||
@@ -309,55 +389,6 @@ This is a reference only. Each group of keys links to the page documenting their
|
|||||||
|`PRINT_ON` |Start printing everything the user types|
|
|`PRINT_ON` |Start printing everything the user types|
|
||||||
|`PRINT_OFF`|Stop printing everything the user types |
|
|`PRINT_OFF`|Stop printing everything the user types |
|
||||||
|
|
||||||
## [Bluetooth](feature_bluetooth.md)
|
|
||||||
|
|
||||||
|Key |Description |
|
|
||||||
|----------|----------------------------------------------|
|
|
||||||
|`OUT_AUTO`|Automatically switch between USB and Bluetooth|
|
|
||||||
|`OUT_USB` |USB only |
|
|
||||||
|`OUT_BT` |Bluetooth only |
|
|
||||||
|
|
||||||
## [Modifiers](quantum_keycodes.md#modifiers)
|
|
||||||
|
|
||||||
|Key |Aliases |Description |
|
|
||||||
|----------|---------- |----------------------------------------------------|
|
|
||||||
|`KC_HYPR` | |Hold Left Control, Shift, Alt and GUI |
|
|
||||||
|`KC_MEH` | |Hold Left Control, Shift and Alt |
|
|
||||||
|`LCTL(kc)`| |Hold Left Control and press `kc` |
|
|
||||||
|`LSFT(kc)`|`S(kc)` |Hold Left Shift and press `kc` |
|
|
||||||
|`LALT(kc)`| |Hold Left Alt and press `kc` |
|
|
||||||
|`LGUI(kc)`|`LCMD(kc)`, `LWIN(kc)`|Hold Left GUI and press `kc` |
|
|
||||||
|`RCTL(kc)`| |Hold Right Control and press `kc` |
|
|
||||||
|`RSFT(kc)`| |Hold Right Shift and press `kc` |
|
|
||||||
|`RALT(kc)`| |Hold Right Alt and press `kc` |
|
|
||||||
|`RGUI(kc)`|`RCMD(kc)`, `LWIN(kc)`|Hold Right GUI and press `kc` |
|
|
||||||
|`HYPR(kc)`| |Hold Left Control, Shift, Alt and GUI and press `kc`|
|
|
||||||
|`MEH(kc)` | |Hold Left Control, Shift and Alt and press `kc` |
|
|
||||||
|`LCAG(kc)`| |Hold Left Control, Alt and GUI and press `kc` |
|
|
||||||
|`ALTG(kc)`| |Hold Right Control and Alt and press `kc` |
|
|
||||||
|`SGUI(kc)`|`SCMD(kc)`, `SWIN(kc)`|Hold Left Shift and GUI and press `kc` |
|
|
||||||
|`LCA(kc)` | |Hold Left Control and Alt and press `kc` |
|
|
||||||
|
|
||||||
## [Mod-Tap Keys](quantum_keycodes.md#mod-tap-keys)
|
|
||||||
|
|
||||||
|Key |Aliases |Description |
|
|
||||||
|------------|---------------------------------------|-------------------------------------------------------|
|
|
||||||
|`LCTL_T(kc)`|`CTL_T(kc)` |Left Control when held, `kc` when tapped |
|
|
||||||
|`RCTL_T(kc)`| |Right Control when held, `kc` when tapped |
|
|
||||||
|`LSFT_T(kc)`|`SFT_T(kc)` |Left Shift when held, `kc` when tapped |
|
|
||||||
|`RSFT_T(kc)`| |Right Shift when held, `kc` when tapped |
|
|
||||||
|`LALT_T(kc)`|`ALT_T(kc)` |Left Alt when held, `kc` when tapped |
|
|
||||||
|`RALT_T(kc)`|`ALGR_T(kc)` |Right Alt when held, `kc` when tapped |
|
|
||||||
|`LGUI_T(kc)`|`LCMD_T(kc)`, `RWIN_T(kc)`, `GUI_T(kc)`|Left GUI when held, `kc` when tapped |
|
|
||||||
|`RGUI_T(kc)`|`RCMD_T(kc)`, `RWIN_T(kc)` |Right GUI when held, `kc` when tapped |
|
|
||||||
|`C_S_T(kc)` | |Left Control and Shift when held, `kc` when tapped |
|
|
||||||
|`MEH_T(kc)` | |Left Control, Shift and Alt when held, `kc` when tapped|
|
|
||||||
|`LCAG_T(kc)`| |Left Control, Alt and GUI when held, `kc` when tapped |
|
|
||||||
|`RCAG_T(kc)`| |Right Control, Alt and GUI when held, `kc` when tapped |
|
|
||||||
|`ALL_T(kc)` | |Left Control, Shift, Alt and GUI when held, `kc` when tapped - more info [here](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)|
|
|
||||||
|`SCMD_T(kc)`|`SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped |
|
|
||||||
|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped |
|
|
||||||
|
|
||||||
## [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md)
|
## [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md)
|
||||||
|
|
||||||
|Key |Aliases |Description |
|
|Key |Aliases |Description |
|
||||||
@@ -396,19 +427,13 @@ This is a reference only. Each group of keys links to the page documenting their
|
|||||||
|`TT(layer)` |Normally acts like MO unless it's tapped multiple times, which toggles `layer` on |
|
|`TT(layer)` |Normally acts like MO unless it's tapped multiple times, which toggles `layer` on |
|
||||||
|`LM(layer, mod)`|Momentarily turn on `layer` (like MO) with `mod` active as well. |
|
|`LM(layer, mod)`|Momentarily turn on `layer` (like MO) with `mod` active as well. |
|
||||||
|
|
||||||
## [One Shot Keys](quantum_keycodes.md#one-shot-keys)
|
## [One Shot Keys](feature_advanced_keycodes.md#one-shot-keys)
|
||||||
|
|
||||||
|Key |Description |
|
|Key |Description |
|
||||||
|------------|----------------------------------|
|
|------------|----------------------------------|
|
||||||
|`OSM(mod)` |Hold `mod` for one keypress |
|
|`OSM(mod)` |Hold `mod` for one keypress |
|
||||||
|`OSL(layer)`|Switch to `layer` for one keypress|
|
|`OSL(layer)`|Switch to `layer` for one keypress|
|
||||||
|
|
||||||
## [Unicode Support](feature_unicode.md)
|
|
||||||
|
|
||||||
|Key |Aliases| |
|
|
||||||
|------------|-------|-------------------------------------------------|
|
|
||||||
|`UNICODE(n)`|`UC(n)`|Send Unicode character `n` |
|
|
||||||
|`X(n)` | |Send Unicode character `n` via a different method|
|
|
||||||
|
|
||||||
## [Swap Hands](feature_swap_hands.md)
|
## [Swap Hands](feature_swap_hands.md)
|
||||||
|
|
||||||
@@ -421,3 +446,9 @@ This is a reference only. Each group of keys links to the page documenting their
|
|||||||
|`SH_MOFF` |Momentarily turns off swap. |
|
|`SH_MOFF` |Momentarily turns off swap. |
|
||||||
|`SH_TG` |Toggles swap on and off with every key press. |
|
|`SH_TG` |Toggles swap on and off with every key press. |
|
||||||
|`SH_TT` |Toggles with a tap; momentary when held. |
|
|`SH_TT` |Toggles with a tap; momentary when held. |
|
||||||
|
## [Unicode Support](feature_unicode.md)
|
||||||
|
|
||||||
|
|Key |Aliases| |
|
||||||
|
|------------|-------|-------------------------------------------------|
|
||||||
|
|`UNICODE(n)`|`UC(n)`|Send Unicode character `n` |
|
||||||
|
|`X(n)` | |Send Unicode character `n` via a different method|
|
||||||
+3
-1
@@ -1,4 +1,4 @@
|
|||||||
# The Compelete Newbs Guide To QMK
|
# The Complete Newbs Guide To QMK
|
||||||
|
|
||||||
QMK is a powerful Open Source firmware for your mechanical keyboard. You can use QMK to customize your keyboard in ways both simple and powerful. People of all skill levels, from complete newbie to master programmer, have successfully used QMK to customize their keyboard. This guide will help you do the same, no matter your skill level.
|
QMK is a powerful Open Source firmware for your mechanical keyboard. You can use QMK to customize your keyboard in ways both simple and powerful. People of all skill levels, from complete newbie to master programmer, have successfully used QMK to customize their keyboard. This guide will help you do the same, no matter your skill level.
|
||||||
|
|
||||||
@@ -12,5 +12,7 @@ There are 4 main sections to this guide:
|
|||||||
* [Building Your First Firmware](newbs_building_firmware.md)
|
* [Building Your First Firmware](newbs_building_firmware.md)
|
||||||
* [Flashing Firmware](newbs_flashing.md)
|
* [Flashing Firmware](newbs_flashing.md)
|
||||||
* [Testing and Debugging](newbs_testing_debugging.md)
|
* [Testing and Debugging](newbs_testing_debugging.md)
|
||||||
|
* [Learn More with these Resources](newbs_learn_more_resources.md)
|
||||||
|
|
||||||
This guide is focused on helping someone who has never compiled software before. It makes choices and recommendations based on that viewpoint. There are alternative methods for many of these procedures, and we support most of those alternatives. If you have any doubt about how to accomplish a task you can [ask us for guidance](getting_started_getting_help.md).
|
This guide is focused on helping someone who has never compiled software before. It makes choices and recommendations based on that viewpoint. There are alternative methods for many of these procedures, and we support most of those alternatives. If you have any doubt about how to accomplish a task you can [ask us for guidance](getting_started_getting_help.md).
|
||||||
|
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Learning Resources
|
||||||
|
These resources are aimed at giving new members in the qmk community more understanding to the information provided in the newbs docs.
|
||||||
|
|
||||||
|
Git resources:
|
||||||
|
*
|
||||||
|
*[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 Specificly toward QMK](contributing.md)
|
||||||
|
|
||||||
|
|
||||||
|
Command Line resources:
|
||||||
|
*[Good General Tutorial on Command Line](https://www.codecademy.com/learn/learn-the-command-line)
|
||||||
@@ -0,0 +1,592 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
Title: HD44780U LCD library
|
||||||
|
Author: Peter Fleury <pfleury@gmx.ch> http://tinyurl.com/peterfleury
|
||||||
|
License: GNU General Public License Version 3
|
||||||
|
File: $Id: lcd.c,v 1.15.2.2 2015/01/17 12:16:05 peter Exp $
|
||||||
|
Software: AVR-GCC 3.3
|
||||||
|
Target: any AVR device, memory mapped mode only for AT90S4414/8515/Mega
|
||||||
|
|
||||||
|
DESCRIPTION
|
||||||
|
Basic routines for interfacing a HD44780U-based text lcd display
|
||||||
|
|
||||||
|
Originally based on Volker Oth's lcd library,
|
||||||
|
changed lcd_init(), added additional constants for lcd_command(),
|
||||||
|
added 4-bit I/O mode, improved and optimized code.
|
||||||
|
|
||||||
|
Library can be operated in memory mapped mode (LCD_IO_MODE=0) or in
|
||||||
|
4-bit IO port mode (LCD_IO_MODE=1). 8-bit IO port mode not supported.
|
||||||
|
|
||||||
|
Memory mapped mode compatible with Kanda STK200, but supports also
|
||||||
|
generation of R/W signal through A8 address line.
|
||||||
|
|
||||||
|
USAGE
|
||||||
|
See the C include lcd.h file for a description of each function
|
||||||
|
|
||||||
|
*****************************************************************************/
|
||||||
|
#include <inttypes.h>
|
||||||
|
#include <avr/io.h>
|
||||||
|
#include <avr/pgmspace.h>
|
||||||
|
#include <util/delay.h>
|
||||||
|
#include "hd44780.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
** constants/macros
|
||||||
|
*/
|
||||||
|
#define DDR(x) (*(&x - 1)) /* address of data direction register of port x */
|
||||||
|
#if defined(__AVR_ATmega64__) || defined(__AVR_ATmega128__)
|
||||||
|
/* on ATmega64/128 PINF is on port 0x00 and not 0x60 */
|
||||||
|
#define PIN(x) ( &PORTF==&(x) ? _SFR_IO8(0x00) : (*(&x - 2)) )
|
||||||
|
#else
|
||||||
|
#define PIN(x) (*(&x - 2)) /* address of input register of port x */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#if LCD_IO_MODE
|
||||||
|
#define lcd_e_delay() _delay_us(LCD_DELAY_ENABLE_PULSE)
|
||||||
|
#define lcd_e_high() LCD_E_PORT |= _BV(LCD_E_PIN);
|
||||||
|
#define lcd_e_low() LCD_E_PORT &= ~_BV(LCD_E_PIN);
|
||||||
|
#define lcd_e_toggle() toggle_e()
|
||||||
|
#define lcd_rw_high() LCD_RW_PORT |= _BV(LCD_RW_PIN)
|
||||||
|
#define lcd_rw_low() LCD_RW_PORT &= ~_BV(LCD_RW_PIN)
|
||||||
|
#define lcd_rs_high() LCD_RS_PORT |= _BV(LCD_RS_PIN)
|
||||||
|
#define lcd_rs_low() LCD_RS_PORT &= ~_BV(LCD_RS_PIN)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if LCD_IO_MODE
|
||||||
|
#if LCD_LINES==1
|
||||||
|
#define LCD_FUNCTION_DEFAULT LCD_FUNCTION_4BIT_1LINE
|
||||||
|
#else
|
||||||
|
#define LCD_FUNCTION_DEFAULT LCD_FUNCTION_4BIT_2LINES
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
#if LCD_LINES==1
|
||||||
|
#define LCD_FUNCTION_DEFAULT LCD_FUNCTION_8BIT_1LINE
|
||||||
|
#else
|
||||||
|
#define LCD_FUNCTION_DEFAULT LCD_FUNCTION_8BIT_2LINES
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if LCD_CONTROLLER_KS0073
|
||||||
|
#if LCD_LINES==4
|
||||||
|
|
||||||
|
#define KS0073_EXTENDED_FUNCTION_REGISTER_ON 0x2C /* |0|010|1100 4-bit mode, extension-bit RE = 1 */
|
||||||
|
#define KS0073_EXTENDED_FUNCTION_REGISTER_OFF 0x28 /* |0|010|1000 4-bit mode, extension-bit RE = 0 */
|
||||||
|
#define KS0073_4LINES_MODE 0x09 /* |0|000|1001 4 lines mode */
|
||||||
|
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
** function prototypes
|
||||||
|
*/
|
||||||
|
#if LCD_IO_MODE
|
||||||
|
static void toggle_e(void);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
** local functions
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/*************************************************************************
|
||||||
|
delay for a minimum of <us> microseconds
|
||||||
|
the number of loops is calculated at compile-time from MCU clock frequency
|
||||||
|
*************************************************************************/
|
||||||
|
#define delay(us) _delay_us(us)
|
||||||
|
|
||||||
|
|
||||||
|
#if LCD_IO_MODE
|
||||||
|
/* toggle Enable Pin to initiate write */
|
||||||
|
static void toggle_e(void)
|
||||||
|
{
|
||||||
|
lcd_e_high();
|
||||||
|
lcd_e_delay();
|
||||||
|
lcd_e_low();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/*************************************************************************
|
||||||
|
Low-level function to write byte to LCD controller
|
||||||
|
Input: data byte to write to LCD
|
||||||
|
rs 1: write data
|
||||||
|
0: write instruction
|
||||||
|
Returns: none
|
||||||
|
*************************************************************************/
|
||||||
|
#if LCD_IO_MODE
|
||||||
|
static void lcd_write(uint8_t data,uint8_t rs)
|
||||||
|
{
|
||||||
|
unsigned char dataBits ;
|
||||||
|
|
||||||
|
|
||||||
|
if (rs) { /* write data (RS=1, RW=0) */
|
||||||
|
lcd_rs_high();
|
||||||
|
} else { /* write instruction (RS=0, RW=0) */
|
||||||
|
lcd_rs_low();
|
||||||
|
}
|
||||||
|
lcd_rw_low(); /* RW=0 write mode */
|
||||||
|
|
||||||
|
if ( ( &LCD_DATA0_PORT == &LCD_DATA1_PORT) && ( &LCD_DATA1_PORT == &LCD_DATA2_PORT ) && ( &LCD_DATA2_PORT == &LCD_DATA3_PORT )
|
||||||
|
&& (LCD_DATA0_PIN == 0) && (LCD_DATA1_PIN == 1) && (LCD_DATA2_PIN == 2) && (LCD_DATA3_PIN == 3) )
|
||||||
|
{
|
||||||
|
/* configure data pins as output */
|
||||||
|
DDR(LCD_DATA0_PORT) |= 0x0F;
|
||||||
|
|
||||||
|
/* output high nibble first */
|
||||||
|
dataBits = LCD_DATA0_PORT & 0xF0;
|
||||||
|
LCD_DATA0_PORT = dataBits |((data>>4)&0x0F);
|
||||||
|
lcd_e_toggle();
|
||||||
|
|
||||||
|
/* output low nibble */
|
||||||
|
LCD_DATA0_PORT = dataBits | (data&0x0F);
|
||||||
|
lcd_e_toggle();
|
||||||
|
|
||||||
|
/* all data pins high (inactive) */
|
||||||
|
LCD_DATA0_PORT = dataBits | 0x0F;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* configure data pins as output */
|
||||||
|
DDR(LCD_DATA0_PORT) |= _BV(LCD_DATA0_PIN);
|
||||||
|
DDR(LCD_DATA1_PORT) |= _BV(LCD_DATA1_PIN);
|
||||||
|
DDR(LCD_DATA2_PORT) |= _BV(LCD_DATA2_PIN);
|
||||||
|
DDR(LCD_DATA3_PORT) |= _BV(LCD_DATA3_PIN);
|
||||||
|
|
||||||
|
/* output high nibble first */
|
||||||
|
LCD_DATA3_PORT &= ~_BV(LCD_DATA3_PIN);
|
||||||
|
LCD_DATA2_PORT &= ~_BV(LCD_DATA2_PIN);
|
||||||
|
LCD_DATA1_PORT &= ~_BV(LCD_DATA1_PIN);
|
||||||
|
LCD_DATA0_PORT &= ~_BV(LCD_DATA0_PIN);
|
||||||
|
if(data & 0x80) LCD_DATA3_PORT |= _BV(LCD_DATA3_PIN);
|
||||||
|
if(data & 0x40) LCD_DATA2_PORT |= _BV(LCD_DATA2_PIN);
|
||||||
|
if(data & 0x20) LCD_DATA1_PORT |= _BV(LCD_DATA1_PIN);
|
||||||
|
if(data & 0x10) LCD_DATA0_PORT |= _BV(LCD_DATA0_PIN);
|
||||||
|
lcd_e_toggle();
|
||||||
|
|
||||||
|
/* output low nibble */
|
||||||
|
LCD_DATA3_PORT &= ~_BV(LCD_DATA3_PIN);
|
||||||
|
LCD_DATA2_PORT &= ~_BV(LCD_DATA2_PIN);
|
||||||
|
LCD_DATA1_PORT &= ~_BV(LCD_DATA1_PIN);
|
||||||
|
LCD_DATA0_PORT &= ~_BV(LCD_DATA0_PIN);
|
||||||
|
if(data & 0x08) LCD_DATA3_PORT |= _BV(LCD_DATA3_PIN);
|
||||||
|
if(data & 0x04) LCD_DATA2_PORT |= _BV(LCD_DATA2_PIN);
|
||||||
|
if(data & 0x02) LCD_DATA1_PORT |= _BV(LCD_DATA1_PIN);
|
||||||
|
if(data & 0x01) LCD_DATA0_PORT |= _BV(LCD_DATA0_PIN);
|
||||||
|
lcd_e_toggle();
|
||||||
|
|
||||||
|
/* all data pins high (inactive) */
|
||||||
|
LCD_DATA0_PORT |= _BV(LCD_DATA0_PIN);
|
||||||
|
LCD_DATA1_PORT |= _BV(LCD_DATA1_PIN);
|
||||||
|
LCD_DATA2_PORT |= _BV(LCD_DATA2_PIN);
|
||||||
|
LCD_DATA3_PORT |= _BV(LCD_DATA3_PIN);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
#define lcd_write(d,rs) if (rs) *(volatile uint8_t*)(LCD_IO_DATA) = d; else *(volatile uint8_t*)(LCD_IO_FUNCTION) = d;
|
||||||
|
/* rs==0 -> write instruction to LCD_IO_FUNCTION */
|
||||||
|
/* rs==1 -> write data to LCD_IO_DATA */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/*************************************************************************
|
||||||
|
Low-level function to read byte from LCD controller
|
||||||
|
Input: rs 1: read data
|
||||||
|
0: read busy flag / address counter
|
||||||
|
Returns: byte read from LCD controller
|
||||||
|
*************************************************************************/
|
||||||
|
#if LCD_IO_MODE
|
||||||
|
static uint8_t lcd_read(uint8_t rs)
|
||||||
|
{
|
||||||
|
uint8_t data;
|
||||||
|
|
||||||
|
|
||||||
|
if (rs)
|
||||||
|
lcd_rs_high(); /* RS=1: read data */
|
||||||
|
else
|
||||||
|
lcd_rs_low(); /* RS=0: read busy flag */
|
||||||
|
lcd_rw_high(); /* RW=1 read mode */
|
||||||
|
|
||||||
|
if ( ( &LCD_DATA0_PORT == &LCD_DATA1_PORT) && ( &LCD_DATA1_PORT == &LCD_DATA2_PORT ) && ( &LCD_DATA2_PORT == &LCD_DATA3_PORT )
|
||||||
|
&& ( LCD_DATA0_PIN == 0 )&& (LCD_DATA1_PIN == 1) && (LCD_DATA2_PIN == 2) && (LCD_DATA3_PIN == 3) )
|
||||||
|
{
|
||||||
|
DDR(LCD_DATA0_PORT) &= 0xF0; /* configure data pins as input */
|
||||||
|
|
||||||
|
lcd_e_high();
|
||||||
|
lcd_e_delay();
|
||||||
|
data = PIN(LCD_DATA0_PORT) << 4; /* read high nibble first */
|
||||||
|
lcd_e_low();
|
||||||
|
|
||||||
|
lcd_e_delay(); /* Enable 500ns low */
|
||||||
|
|
||||||
|
lcd_e_high();
|
||||||
|
lcd_e_delay();
|
||||||
|
data |= PIN(LCD_DATA0_PORT)&0x0F; /* read low nibble */
|
||||||
|
lcd_e_low();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* configure data pins as input */
|
||||||
|
DDR(LCD_DATA0_PORT) &= ~_BV(LCD_DATA0_PIN);
|
||||||
|
DDR(LCD_DATA1_PORT) &= ~_BV(LCD_DATA1_PIN);
|
||||||
|
DDR(LCD_DATA2_PORT) &= ~_BV(LCD_DATA2_PIN);
|
||||||
|
DDR(LCD_DATA3_PORT) &= ~_BV(LCD_DATA3_PIN);
|
||||||
|
|
||||||
|
/* read high nibble first */
|
||||||
|
lcd_e_high();
|
||||||
|
lcd_e_delay();
|
||||||
|
data = 0;
|
||||||
|
if ( PIN(LCD_DATA0_PORT) & _BV(LCD_DATA0_PIN) ) data |= 0x10;
|
||||||
|
if ( PIN(LCD_DATA1_PORT) & _BV(LCD_DATA1_PIN) ) data |= 0x20;
|
||||||
|
if ( PIN(LCD_DATA2_PORT) & _BV(LCD_DATA2_PIN) ) data |= 0x40;
|
||||||
|
if ( PIN(LCD_DATA3_PORT) & _BV(LCD_DATA3_PIN) ) data |= 0x80;
|
||||||
|
lcd_e_low();
|
||||||
|
|
||||||
|
lcd_e_delay(); /* Enable 500ns low */
|
||||||
|
|
||||||
|
/* read low nibble */
|
||||||
|
lcd_e_high();
|
||||||
|
lcd_e_delay();
|
||||||
|
if ( PIN(LCD_DATA0_PORT) & _BV(LCD_DATA0_PIN) ) data |= 0x01;
|
||||||
|
if ( PIN(LCD_DATA1_PORT) & _BV(LCD_DATA1_PIN) ) data |= 0x02;
|
||||||
|
if ( PIN(LCD_DATA2_PORT) & _BV(LCD_DATA2_PIN) ) data |= 0x04;
|
||||||
|
if ( PIN(LCD_DATA3_PORT) & _BV(LCD_DATA3_PIN) ) data |= 0x08;
|
||||||
|
lcd_e_low();
|
||||||
|
}
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
#define lcd_read(rs) (rs) ? *(volatile uint8_t*)(LCD_IO_DATA+LCD_IO_READ) : *(volatile uint8_t*)(LCD_IO_FUNCTION+LCD_IO_READ)
|
||||||
|
/* rs==0 -> read instruction from LCD_IO_FUNCTION */
|
||||||
|
/* rs==1 -> read data from LCD_IO_DATA */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/*************************************************************************
|
||||||
|
loops while lcd is busy, returns address counter
|
||||||
|
*************************************************************************/
|
||||||
|
static uint8_t lcd_waitbusy(void)
|
||||||
|
|
||||||
|
{
|
||||||
|
register uint8_t c;
|
||||||
|
|
||||||
|
/* wait until busy flag is cleared */
|
||||||
|
while ( (c=lcd_read(0)) & (1<<LCD_BUSY)) {}
|
||||||
|
|
||||||
|
/* the address counter is updated 4us after the busy flag is cleared */
|
||||||
|
delay(LCD_DELAY_BUSY_FLAG);
|
||||||
|
|
||||||
|
/* now read the address counter */
|
||||||
|
return (lcd_read(0)); // return address counter
|
||||||
|
|
||||||
|
}/* lcd_waitbusy */
|
||||||
|
|
||||||
|
|
||||||
|
/*************************************************************************
|
||||||
|
Move cursor to the start of next line or to the first line if the cursor
|
||||||
|
is already on the last line.
|
||||||
|
*************************************************************************/
|
||||||
|
static inline void lcd_newline(uint8_t pos)
|
||||||
|
{
|
||||||
|
register uint8_t addressCounter;
|
||||||
|
|
||||||
|
|
||||||
|
#if LCD_LINES==1
|
||||||
|
addressCounter = 0;
|
||||||
|
#endif
|
||||||
|
#if LCD_LINES==2
|
||||||
|
if ( pos < (LCD_START_LINE2) )
|
||||||
|
addressCounter = LCD_START_LINE2;
|
||||||
|
else
|
||||||
|
addressCounter = LCD_START_LINE1;
|
||||||
|
#endif
|
||||||
|
#if LCD_LINES==4
|
||||||
|
#if KS0073_4LINES_MODE
|
||||||
|
if ( pos < LCD_START_LINE2 )
|
||||||
|
addressCounter = LCD_START_LINE2;
|
||||||
|
else if ( (pos >= LCD_START_LINE2) && (pos < LCD_START_LINE3) )
|
||||||
|
addressCounter = LCD_START_LINE3;
|
||||||
|
else if ( (pos >= LCD_START_LINE3) && (pos < LCD_START_LINE4) )
|
||||||
|
addressCounter = LCD_START_LINE4;
|
||||||
|
else
|
||||||
|
addressCounter = LCD_START_LINE1;
|
||||||
|
#else
|
||||||
|
if ( pos < LCD_START_LINE3 )
|
||||||
|
addressCounter = LCD_START_LINE2;
|
||||||
|
else if ( (pos >= LCD_START_LINE2) && (pos < LCD_START_LINE4) )
|
||||||
|
addressCounter = LCD_START_LINE3;
|
||||||
|
else if ( (pos >= LCD_START_LINE3) && (pos < LCD_START_LINE2) )
|
||||||
|
addressCounter = LCD_START_LINE4;
|
||||||
|
else
|
||||||
|
addressCounter = LCD_START_LINE1;
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
lcd_command((1<<LCD_DDRAM)+addressCounter);
|
||||||
|
|
||||||
|
}/* lcd_newline */
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
** PUBLIC FUNCTIONS
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*************************************************************************
|
||||||
|
Send LCD controller instruction command
|
||||||
|
Input: instruction to send to LCD controller, see HD44780 data sheet
|
||||||
|
Returns: none
|
||||||
|
*************************************************************************/
|
||||||
|
void lcd_command(uint8_t cmd)
|
||||||
|
{
|
||||||
|
lcd_waitbusy();
|
||||||
|
lcd_write(cmd,0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*************************************************************************
|
||||||
|
Send data byte to LCD controller
|
||||||
|
Input: data to send to LCD controller, see HD44780 data sheet
|
||||||
|
Returns: none
|
||||||
|
*************************************************************************/
|
||||||
|
void lcd_data(uint8_t data)
|
||||||
|
{
|
||||||
|
lcd_waitbusy();
|
||||||
|
lcd_write(data,1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*************************************************************************
|
||||||
|
Set cursor to specified position
|
||||||
|
Input: x horizontal position (0: left most position)
|
||||||
|
y vertical position (0: first line)
|
||||||
|
Returns: none
|
||||||
|
*************************************************************************/
|
||||||
|
void lcd_gotoxy(uint8_t x, uint8_t y)
|
||||||
|
{
|
||||||
|
#if LCD_LINES==1
|
||||||
|
lcd_command((1<<LCD_DDRAM)+LCD_START_LINE1+x);
|
||||||
|
#endif
|
||||||
|
#if LCD_LINES==2
|
||||||
|
if ( y==0 )
|
||||||
|
lcd_command((1<<LCD_DDRAM)+LCD_START_LINE1+x);
|
||||||
|
else
|
||||||
|
lcd_command((1<<LCD_DDRAM)+LCD_START_LINE2+x);
|
||||||
|
#endif
|
||||||
|
#if LCD_LINES==4
|
||||||
|
if ( y==0 )
|
||||||
|
lcd_command((1<<LCD_DDRAM)+LCD_START_LINE1+x);
|
||||||
|
else if ( y==1)
|
||||||
|
lcd_command((1<<LCD_DDRAM)+LCD_START_LINE2+x);
|
||||||
|
else if ( y==2)
|
||||||
|
lcd_command((1<<LCD_DDRAM)+LCD_START_LINE3+x);
|
||||||
|
else /* y==3 */
|
||||||
|
lcd_command((1<<LCD_DDRAM)+LCD_START_LINE4+x);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
}/* lcd_gotoxy */
|
||||||
|
|
||||||
|
|
||||||
|
/*************************************************************************
|
||||||
|
*************************************************************************/
|
||||||
|
int lcd_getxy(void)
|
||||||
|
{
|
||||||
|
return lcd_waitbusy();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*************************************************************************
|
||||||
|
Clear display and set cursor to home position
|
||||||
|
*************************************************************************/
|
||||||
|
void lcd_clrscr(void)
|
||||||
|
{
|
||||||
|
lcd_command(1<<LCD_CLR);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*************************************************************************
|
||||||
|
Set cursor to home position
|
||||||
|
*************************************************************************/
|
||||||
|
void lcd_home(void)
|
||||||
|
{
|
||||||
|
lcd_command(1<<LCD_HOME);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*************************************************************************
|
||||||
|
Display character at current cursor position
|
||||||
|
Input: character to be displayed
|
||||||
|
Returns: none
|
||||||
|
*************************************************************************/
|
||||||
|
void lcd_putc(char c)
|
||||||
|
{
|
||||||
|
uint8_t pos;
|
||||||
|
|
||||||
|
|
||||||
|
pos = lcd_waitbusy(); // read busy-flag and address counter
|
||||||
|
if (c=='\n')
|
||||||
|
{
|
||||||
|
lcd_newline(pos);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
#if LCD_WRAP_LINES==1
|
||||||
|
#if LCD_LINES==1
|
||||||
|
if ( pos == LCD_START_LINE1+LCD_DISP_LENGTH ) {
|
||||||
|
lcd_write((1<<LCD_DDRAM)+LCD_START_LINE1,0);
|
||||||
|
}
|
||||||
|
#elif LCD_LINES==2
|
||||||
|
if ( pos == LCD_START_LINE1+LCD_DISP_LENGTH ) {
|
||||||
|
lcd_write((1<<LCD_DDRAM)+LCD_START_LINE2,0);
|
||||||
|
}else if ( pos == LCD_START_LINE2+LCD_DISP_LENGTH ){
|
||||||
|
lcd_write((1<<LCD_DDRAM)+LCD_START_LINE1,0);
|
||||||
|
}
|
||||||
|
#elif LCD_LINES==4
|
||||||
|
if ( pos == LCD_START_LINE1+LCD_DISP_LENGTH ) {
|
||||||
|
lcd_write((1<<LCD_DDRAM)+LCD_START_LINE2,0);
|
||||||
|
}else if ( pos == LCD_START_LINE2+LCD_DISP_LENGTH ) {
|
||||||
|
lcd_write((1<<LCD_DDRAM)+LCD_START_LINE3,0);
|
||||||
|
}else if ( pos == LCD_START_LINE3+LCD_DISP_LENGTH ) {
|
||||||
|
lcd_write((1<<LCD_DDRAM)+LCD_START_LINE4,0);
|
||||||
|
}else if ( pos == LCD_START_LINE4+LCD_DISP_LENGTH ) {
|
||||||
|
lcd_write((1<<LCD_DDRAM)+LCD_START_LINE1,0);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
lcd_waitbusy();
|
||||||
|
#endif
|
||||||
|
lcd_write(c, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
}/* lcd_putc */
|
||||||
|
|
||||||
|
|
||||||
|
/*************************************************************************
|
||||||
|
Display string without auto linefeed
|
||||||
|
Input: string to be displayed
|
||||||
|
Returns: none
|
||||||
|
*************************************************************************/
|
||||||
|
void lcd_puts(const char *s)
|
||||||
|
/* print string on lcd (no auto linefeed) */
|
||||||
|
{
|
||||||
|
register char c;
|
||||||
|
|
||||||
|
while ( (c = *s++) ) {
|
||||||
|
lcd_putc(c);
|
||||||
|
}
|
||||||
|
|
||||||
|
}/* lcd_puts */
|
||||||
|
|
||||||
|
|
||||||
|
/*************************************************************************
|
||||||
|
Display string from program memory without auto linefeed
|
||||||
|
Input: string from program memory be be displayed
|
||||||
|
Returns: none
|
||||||
|
*************************************************************************/
|
||||||
|
void lcd_puts_p(const char *progmem_s)
|
||||||
|
/* print string from program memory on lcd (no auto linefeed) */
|
||||||
|
{
|
||||||
|
register char c;
|
||||||
|
|
||||||
|
while ( (c = pgm_read_byte(progmem_s++)) ) {
|
||||||
|
lcd_putc(c);
|
||||||
|
}
|
||||||
|
|
||||||
|
}/* lcd_puts_p */
|
||||||
|
|
||||||
|
|
||||||
|
/*************************************************************************
|
||||||
|
Initialize display and select type of cursor
|
||||||
|
Input: dispAttr LCD_DISP_OFF display off
|
||||||
|
LCD_DISP_ON display on, cursor off
|
||||||
|
LCD_DISP_ON_CURSOR display on, cursor on
|
||||||
|
LCD_DISP_CURSOR_BLINK display on, cursor on flashing
|
||||||
|
Returns: none
|
||||||
|
*************************************************************************/
|
||||||
|
void lcd_init(uint8_t dispAttr)
|
||||||
|
{
|
||||||
|
#if LCD_IO_MODE
|
||||||
|
/*
|
||||||
|
* Initialize LCD to 4 bit I/O mode
|
||||||
|
*/
|
||||||
|
|
||||||
|
if ( ( &LCD_DATA0_PORT == &LCD_DATA1_PORT) && ( &LCD_DATA1_PORT == &LCD_DATA2_PORT ) && ( &LCD_DATA2_PORT == &LCD_DATA3_PORT )
|
||||||
|
&& ( &LCD_RS_PORT == &LCD_DATA0_PORT) && ( &LCD_RW_PORT == &LCD_DATA0_PORT) && (&LCD_E_PORT == &LCD_DATA0_PORT)
|
||||||
|
&& (LCD_DATA0_PIN == 0 ) && (LCD_DATA1_PIN == 1) && (LCD_DATA2_PIN == 2) && (LCD_DATA3_PIN == 3)
|
||||||
|
&& (LCD_RS_PIN == 4 ) && (LCD_RW_PIN == 5) && (LCD_E_PIN == 6 ) )
|
||||||
|
{
|
||||||
|
/* configure all port bits as output (all LCD lines on same port) */
|
||||||
|
DDR(LCD_DATA0_PORT) |= 0x7F;
|
||||||
|
}
|
||||||
|
else if ( ( &LCD_DATA0_PORT == &LCD_DATA1_PORT) && ( &LCD_DATA1_PORT == &LCD_DATA2_PORT ) && ( &LCD_DATA2_PORT == &LCD_DATA3_PORT )
|
||||||
|
&& (LCD_DATA0_PIN == 0 ) && (LCD_DATA1_PIN == 1) && (LCD_DATA2_PIN == 2) && (LCD_DATA3_PIN == 3) )
|
||||||
|
{
|
||||||
|
/* configure all port bits as output (all LCD data lines on same port, but control lines on different ports) */
|
||||||
|
DDR(LCD_DATA0_PORT) |= 0x0F;
|
||||||
|
DDR(LCD_RS_PORT) |= _BV(LCD_RS_PIN);
|
||||||
|
DDR(LCD_RW_PORT) |= _BV(LCD_RW_PIN);
|
||||||
|
DDR(LCD_E_PORT) |= _BV(LCD_E_PIN);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* configure all port bits as output (LCD data and control lines on different ports */
|
||||||
|
DDR(LCD_RS_PORT) |= _BV(LCD_RS_PIN);
|
||||||
|
DDR(LCD_RW_PORT) |= _BV(LCD_RW_PIN);
|
||||||
|
DDR(LCD_E_PORT) |= _BV(LCD_E_PIN);
|
||||||
|
DDR(LCD_DATA0_PORT) |= _BV(LCD_DATA0_PIN);
|
||||||
|
DDR(LCD_DATA1_PORT) |= _BV(LCD_DATA1_PIN);
|
||||||
|
DDR(LCD_DATA2_PORT) |= _BV(LCD_DATA2_PIN);
|
||||||
|
DDR(LCD_DATA3_PORT) |= _BV(LCD_DATA3_PIN);
|
||||||
|
}
|
||||||
|
delay(LCD_DELAY_BOOTUP); /* wait 16ms or more after power-on */
|
||||||
|
|
||||||
|
/* initial write to lcd is 8bit */
|
||||||
|
LCD_DATA1_PORT |= _BV(LCD_DATA1_PIN); // LCD_FUNCTION>>4;
|
||||||
|
LCD_DATA0_PORT |= _BV(LCD_DATA0_PIN); // LCD_FUNCTION_8BIT>>4;
|
||||||
|
lcd_e_toggle();
|
||||||
|
delay(LCD_DELAY_INIT); /* delay, busy flag can't be checked here */
|
||||||
|
|
||||||
|
/* repeat last command */
|
||||||
|
lcd_e_toggle();
|
||||||
|
delay(LCD_DELAY_INIT_REP); /* delay, busy flag can't be checked here */
|
||||||
|
|
||||||
|
/* repeat last command a third time */
|
||||||
|
lcd_e_toggle();
|
||||||
|
delay(LCD_DELAY_INIT_REP); /* delay, busy flag can't be checked here */
|
||||||
|
|
||||||
|
/* now configure for 4bit mode */
|
||||||
|
LCD_DATA0_PORT &= ~_BV(LCD_DATA0_PIN); // LCD_FUNCTION_4BIT_1LINE>>4
|
||||||
|
lcd_e_toggle();
|
||||||
|
delay(LCD_DELAY_INIT_4BIT); /* some displays need this additional delay */
|
||||||
|
|
||||||
|
/* from now the LCD only accepts 4 bit I/O, we can use lcd_command() */
|
||||||
|
#else
|
||||||
|
/*
|
||||||
|
* Initialize LCD to 8 bit memory mapped mode
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* enable external SRAM (memory mapped lcd) and one wait state */
|
||||||
|
MCUCR = _BV(SRE) | _BV(SRW);
|
||||||
|
|
||||||
|
/* reset LCD */
|
||||||
|
delay(LCD_DELAY_BOOTUP); /* wait 16ms after power-on */
|
||||||
|
lcd_write(LCD_FUNCTION_8BIT_1LINE,0); /* function set: 8bit interface */
|
||||||
|
delay(LCD_DELAY_INIT); /* wait 5ms */
|
||||||
|
lcd_write(LCD_FUNCTION_8BIT_1LINE,0); /* function set: 8bit interface */
|
||||||
|
delay(LCD_DELAY_INIT_REP); /* wait 64us */
|
||||||
|
lcd_write(LCD_FUNCTION_8BIT_1LINE,0); /* function set: 8bit interface */
|
||||||
|
delay(LCD_DELAY_INIT_REP); /* wait 64us */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if KS0073_4LINES_MODE
|
||||||
|
/* Display with KS0073 controller requires special commands for enabling 4 line mode */
|
||||||
|
lcd_command(KS0073_EXTENDED_FUNCTION_REGISTER_ON);
|
||||||
|
lcd_command(KS0073_4LINES_MODE);
|
||||||
|
lcd_command(KS0073_EXTENDED_FUNCTION_REGISTER_OFF);
|
||||||
|
#else
|
||||||
|
lcd_command(LCD_FUNCTION_DEFAULT); /* function set: display lines */
|
||||||
|
#endif
|
||||||
|
lcd_command(LCD_DISP_OFF); /* display off */
|
||||||
|
lcd_clrscr(); /* display clear */
|
||||||
|
lcd_command(LCD_MODE_DEFAULT); /* set entry mode */
|
||||||
|
lcd_command(dispAttr); /* display/cursor control */
|
||||||
|
|
||||||
|
}/* lcd_init */
|
||||||
|
|
||||||
@@ -0,0 +1,371 @@
|
|||||||
|
#ifndef LCD_H
|
||||||
|
#define LCD_H
|
||||||
|
/*************************************************************************
|
||||||
|
Title : C include file for the HD44780U LCD library (lcd.c)
|
||||||
|
Author: Peter Fleury <pfleury@gmx.ch> http://tinyurl.com/peterfleury
|
||||||
|
License: GNU General Public License Version 3
|
||||||
|
File: $Id: lcd.h,v 1.14.2.4 2015/01/20 17:16:07 peter Exp $
|
||||||
|
Software: AVR-GCC 4.x
|
||||||
|
Hardware: any AVR device, memory mapped mode only for AVR with
|
||||||
|
memory mapped interface (AT90S8515/ATmega8515/ATmega128)
|
||||||
|
***************************************************************************/
|
||||||
|
|
||||||
|
/**
|
||||||
|
@mainpage
|
||||||
|
Collection of libraries for AVR-GCC
|
||||||
|
@author Peter Fleury pfleury@gmx.ch http://tinyurl.com/peterfleury
|
||||||
|
@copyright (C) 2015 Peter Fleury, GNU General Public License Version 3
|
||||||
|
|
||||||
|
@file
|
||||||
|
@defgroup pfleury_lcd LCD library <lcd.h>
|
||||||
|
@code #include <lcd.h> @endcode
|
||||||
|
|
||||||
|
@brief Basic routines for interfacing a HD44780U-based character LCD display
|
||||||
|
|
||||||
|
LCD character displays can be found in many devices, like espresso machines, laser printers.
|
||||||
|
The Hitachi HD44780 controller and its compatible controllers like Samsung KS0066U have become an industry standard for these types of displays.
|
||||||
|
|
||||||
|
This library allows easy interfacing with a HD44780 compatible display and can be
|
||||||
|
operated in memory mapped mode (LCD_IO_MODE defined as 0 in the include file lcd.h.) or in
|
||||||
|
4-bit IO port mode (LCD_IO_MODE defined as 1). 8-bit IO port mode is not supported.
|
||||||
|
|
||||||
|
Memory mapped mode is compatible with old Kanda STK200 starter kit, but also supports
|
||||||
|
generation of R/W signal through A8 address line.
|
||||||
|
|
||||||
|
@see The chapter <a href=" http://homepage.hispeed.ch/peterfleury/avr-lcd44780.html" target="_blank">Interfacing a HD44780 Based LCD to an AVR</a>
|
||||||
|
on my home page, which shows example circuits how to connect an LCD to an AVR controller.
|
||||||
|
|
||||||
|
@author Peter Fleury pfleury@gmx.ch http://tinyurl.com/peterfleury
|
||||||
|
|
||||||
|
@version 2.0
|
||||||
|
|
||||||
|
@copyright (C) 2015 Peter Fleury, GNU General Public License Version 3
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <inttypes.h>
|
||||||
|
#include <avr/pgmspace.h>
|
||||||
|
|
||||||
|
#if (__GNUC__ * 100 + __GNUC_MINOR__) < 405
|
||||||
|
#error "This library requires AVR-GCC 4.5 or later, update to newer AVR-GCC compiler !"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/**@{*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* LCD and target specific definitions below can be defined in a separate include file with name lcd_definitions.h instead modifying this file
|
||||||
|
* by adding -D_LCD_DEFINITIONS_FILE to the CDEFS section in the Makefile
|
||||||
|
* All definitions added to the file lcd_definitions.h will override the default definitions from lcd.h
|
||||||
|
*/
|
||||||
|
#ifdef _LCD_DEFINITIONS_FILE
|
||||||
|
#include "lcd_definitions.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Definition for LCD controller type
|
||||||
|
* Use 0 for HD44780 controller, change to 1 for displays with KS0073 controller.
|
||||||
|
*/
|
||||||
|
#ifndef LCD_CONTROLLER_KS0073
|
||||||
|
#define LCD_CONTROLLER_KS0073 0 /**< Use 0 for HD44780 controller, 1 for KS0073 controller */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Definitions for Display Size
|
||||||
|
* Change these definitions to adapt setting to your display
|
||||||
|
*
|
||||||
|
* These definitions can be defined in a separate include file \b lcd_definitions.h instead modifying this file by
|
||||||
|
* adding -D_LCD_DEFINITIONS_FILE to the CDEFS section in the Makefile.
|
||||||
|
* All definitions added to the file lcd_definitions.h will override the default definitions from lcd.h
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#ifndef LCD_LINES
|
||||||
|
#define LCD_LINES 2 /**< number of visible lines of the display */
|
||||||
|
#endif
|
||||||
|
#ifndef LCD_DISP_LENGTH
|
||||||
|
#define LCD_DISP_LENGTH 16 /**< visibles characters per line of the display */
|
||||||
|
#endif
|
||||||
|
#ifndef LCD_LINE_LENGTH
|
||||||
|
#define LCD_LINE_LENGTH 0x40 /**< internal line length of the display */
|
||||||
|
#endif
|
||||||
|
#ifndef LCD_START_LINE1
|
||||||
|
#define LCD_START_LINE1 0x00 /**< DDRAM address of first char of line 1 */
|
||||||
|
#endif
|
||||||
|
#ifndef LCD_START_LINE2
|
||||||
|
#define LCD_START_LINE2 0x40 /**< DDRAM address of first char of line 2 */
|
||||||
|
#endif
|
||||||
|
#ifndef LCD_START_LINE3
|
||||||
|
#define LCD_START_LINE3 0x14 /**< DDRAM address of first char of line 3 */
|
||||||
|
#endif
|
||||||
|
#ifndef LCD_START_LINE4
|
||||||
|
#define LCD_START_LINE4 0x54 /**< DDRAM address of first char of line 4 */
|
||||||
|
#endif
|
||||||
|
#ifndef LCD_WRAP_LINES
|
||||||
|
#define LCD_WRAP_LINES 0 /**< 0: no wrap, 1: wrap at end of visibile line */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Definitions for 4-bit IO mode
|
||||||
|
*
|
||||||
|
* The four LCD data lines and the three control lines RS, RW, E can be on the
|
||||||
|
* same port or on different ports.
|
||||||
|
* Change LCD_RS_PORT, LCD_RW_PORT, LCD_E_PORT if you want the control lines on
|
||||||
|
* different ports.
|
||||||
|
*
|
||||||
|
* Normally the four data lines should be mapped to bit 0..3 on one port, but it
|
||||||
|
* is possible to connect these data lines in different order or even on different
|
||||||
|
* ports by adapting the LCD_DATAx_PORT and LCD_DATAx_PIN definitions.
|
||||||
|
*
|
||||||
|
* Adjust these definitions to your target.\n
|
||||||
|
* These definitions can be defined in a separate include file \b lcd_definitions.h instead modifying this file by
|
||||||
|
* adding \b -D_LCD_DEFINITIONS_FILE to the \b CDEFS section in the Makefile.
|
||||||
|
* All definitions added to the file lcd_definitions.h will override the default definitions from lcd.h
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#define LCD_IO_MODE 1 /**< 0: memory mapped mode, 1: IO port mode */
|
||||||
|
|
||||||
|
#if LCD_IO_MODE
|
||||||
|
|
||||||
|
#ifndef LCD_PORT
|
||||||
|
#define LCD_PORT PORTA /**< port for the LCD lines */
|
||||||
|
#endif
|
||||||
|
#ifndef LCD_DATA0_PORT
|
||||||
|
#define LCD_DATA0_PORT LCD_PORT /**< port for 4bit data bit 0 */
|
||||||
|
#endif
|
||||||
|
#ifndef LCD_DATA1_PORT
|
||||||
|
#define LCD_DATA1_PORT LCD_PORT /**< port for 4bit data bit 1 */
|
||||||
|
#endif
|
||||||
|
#ifndef LCD_DATA2_PORT
|
||||||
|
#define LCD_DATA2_PORT LCD_PORT /**< port for 4bit data bit 2 */
|
||||||
|
#endif
|
||||||
|
#ifndef LCD_DATA3_PORT
|
||||||
|
#define LCD_DATA3_PORT LCD_PORT /**< port for 4bit data bit 3 */
|
||||||
|
#endif
|
||||||
|
#ifndef LCD_DATA0_PIN
|
||||||
|
#define LCD_DATA0_PIN 4 /**< pin for 4bit data bit 0 */
|
||||||
|
#endif
|
||||||
|
#ifndef LCD_DATA1_PIN
|
||||||
|
#define LCD_DATA1_PIN 5 /**< pin for 4bit data bit 1 */
|
||||||
|
#endif
|
||||||
|
#ifndef LCD_DATA2_PIN
|
||||||
|
#define LCD_DATA2_PIN 6 /**< pin for 4bit data bit 2 */
|
||||||
|
#endif
|
||||||
|
#ifndef LCD_DATA3_PIN
|
||||||
|
#define LCD_DATA3_PIN 7 /**< pin for 4bit data bit 3 */
|
||||||
|
#endif
|
||||||
|
#ifndef LCD_RS_PORT
|
||||||
|
#define LCD_RS_PORT LCD_PORT /**< port for RS line */
|
||||||
|
#endif
|
||||||
|
#ifndef LCD_RS_PIN
|
||||||
|
#define LCD_RS_PIN 3 /**< pin for RS line */
|
||||||
|
#endif
|
||||||
|
#ifndef LCD_RW_PORT
|
||||||
|
#define LCD_RW_PORT LCD_PORT /**< port for RW line */
|
||||||
|
#endif
|
||||||
|
#ifndef LCD_RW_PIN
|
||||||
|
#define LCD_RW_PIN 2 /**< pin for RW line */
|
||||||
|
#endif
|
||||||
|
#ifndef LCD_E_PORT
|
||||||
|
#define LCD_E_PORT LCD_PORT /**< port for Enable line */
|
||||||
|
#endif
|
||||||
|
#ifndef LCD_E_PIN
|
||||||
|
#define LCD_E_PIN 1 /**< pin for Enable line */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#elif defined(__AVR_AT90S4414__) || defined(__AVR_AT90S8515__) || defined(__AVR_ATmega64__) || \
|
||||||
|
defined(__AVR_ATmega8515__)|| defined(__AVR_ATmega103__) || defined(__AVR_ATmega128__) || \
|
||||||
|
defined(__AVR_ATmega161__) || defined(__AVR_ATmega162__)
|
||||||
|
/*
|
||||||
|
* memory mapped mode is only supported when the device has an external data memory interface
|
||||||
|
*/
|
||||||
|
#define LCD_IO_DATA 0xC000 /* A15=E=1, A14=RS=1 */
|
||||||
|
#define LCD_IO_FUNCTION 0x8000 /* A15=E=1, A14=RS=0 */
|
||||||
|
#define LCD_IO_READ 0x0100 /* A8 =R/W=1 (R/W: 1=Read, 0=Write */
|
||||||
|
|
||||||
|
#else
|
||||||
|
#error "external data memory interface not available for this device, use 4-bit IO port mode"
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Definitions of delays
|
||||||
|
* Used to calculate delay timers.
|
||||||
|
* Adapt the F_CPU define in the Makefile to the clock frequency in Hz of your target
|
||||||
|
*
|
||||||
|
* These delay times can be adjusted, if some displays require different delays.\n
|
||||||
|
* These definitions can be defined in a separate include file \b lcd_definitions.h instead modifying this file by
|
||||||
|
* adding \b -D_LCD_DEFINITIONS_FILE to the \b CDEFS section in the Makefile.
|
||||||
|
* All definitions added to the file lcd_definitions.h will override the default definitions from lcd.h
|
||||||
|
*/
|
||||||
|
#ifndef LCD_DELAY_BOOTUP
|
||||||
|
#define LCD_DELAY_BOOTUP 16000 /**< delay in micro seconds after power-on */
|
||||||
|
#endif
|
||||||
|
#ifndef LCD_DELAY_INIT
|
||||||
|
#define LCD_DELAY_INIT 5000 /**< delay in micro seconds after initialization command sent */
|
||||||
|
#endif
|
||||||
|
#ifndef LCD_DELAY_INIT_REP
|
||||||
|
#define LCD_DELAY_INIT_REP 64 /**< delay in micro seconds after initialization command repeated */
|
||||||
|
#endif
|
||||||
|
#ifndef LCD_DELAY_INIT_4BIT
|
||||||
|
#define LCD_DELAY_INIT_4BIT 64 /**< delay in micro seconds after setting 4-bit mode */
|
||||||
|
#endif
|
||||||
|
#ifndef LCD_DELAY_BUSY_FLAG
|
||||||
|
#define LCD_DELAY_BUSY_FLAG 4 /**< time in micro seconds the address counter is updated after busy flag is cleared */
|
||||||
|
#endif
|
||||||
|
#ifndef LCD_DELAY_ENABLE_PULSE
|
||||||
|
#define LCD_DELAY_ENABLE_PULSE 1 /**< enable signal pulse width in micro seconds */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Definitions for LCD command instructions
|
||||||
|
* The constants define the various LCD controller instructions which can be passed to the
|
||||||
|
* function lcd_command(), see HD44780 data sheet for a complete description.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* instruction register bit positions, see HD44780U data sheet */
|
||||||
|
#define LCD_CLR 0 /* DB0: clear display */
|
||||||
|
#define LCD_HOME 1 /* DB1: return to home position */
|
||||||
|
#define LCD_ENTRY_MODE 2 /* DB2: set entry mode */
|
||||||
|
#define LCD_ENTRY_INC 1 /* DB1: 1=increment, 0=decrement */
|
||||||
|
#define LCD_ENTRY_SHIFT 0 /* DB2: 1=display shift on */
|
||||||
|
#define LCD_ON 3 /* DB3: turn lcd/cursor on */
|
||||||
|
#define LCD_ON_DISPLAY 2 /* DB2: turn display on */
|
||||||
|
#define LCD_ON_CURSOR 1 /* DB1: turn cursor on */
|
||||||
|
#define LCD_ON_BLINK 0 /* DB0: blinking cursor ? */
|
||||||
|
#define LCD_MOVE 4 /* DB4: move cursor/display */
|
||||||
|
#define LCD_MOVE_DISP 3 /* DB3: move display (0-> cursor) ? */
|
||||||
|
#define LCD_MOVE_RIGHT 2 /* DB2: move right (0-> left) ? */
|
||||||
|
#define LCD_FUNCTION 5 /* DB5: function set */
|
||||||
|
#define LCD_FUNCTION_8BIT 4 /* DB4: set 8BIT mode (0->4BIT mode) */
|
||||||
|
#define LCD_FUNCTION_2LINES 3 /* DB3: two lines (0->one line) */
|
||||||
|
#define LCD_FUNCTION_10DOTS 2 /* DB2: 5x10 font (0->5x7 font) */
|
||||||
|
#define LCD_CGRAM 6 /* DB6: set CG RAM address */
|
||||||
|
#define LCD_DDRAM 7 /* DB7: set DD RAM address */
|
||||||
|
#define LCD_BUSY 7 /* DB7: LCD is busy */
|
||||||
|
|
||||||
|
/* set entry mode: display shift on/off, dec/inc cursor move direction */
|
||||||
|
#define LCD_ENTRY_DEC 0x04 /* display shift off, dec cursor move dir */
|
||||||
|
#define LCD_ENTRY_DEC_SHIFT 0x05 /* display shift on, dec cursor move dir */
|
||||||
|
#define LCD_ENTRY_INC_ 0x06 /* display shift off, inc cursor move dir */
|
||||||
|
#define LCD_ENTRY_INC_SHIFT 0x07 /* display shift on, inc cursor move dir */
|
||||||
|
|
||||||
|
/* display on/off, cursor on/off, blinking char at cursor position */
|
||||||
|
#define LCD_DISP_OFF 0x08 /* display off */
|
||||||
|
#define LCD_DISP_ON 0x0C /* display on, cursor off */
|
||||||
|
#define LCD_DISP_ON_BLINK 0x0D /* display on, cursor off, blink char */
|
||||||
|
#define LCD_DISP_ON_CURSOR 0x0E /* display on, cursor on */
|
||||||
|
#define LCD_DISP_ON_CURSOR_BLINK 0x0F /* display on, cursor on, blink char */
|
||||||
|
|
||||||
|
/* move cursor/shift display */
|
||||||
|
#define LCD_MOVE_CURSOR_LEFT 0x10 /* move cursor left (decrement) */
|
||||||
|
#define LCD_MOVE_CURSOR_RIGHT 0x14 /* move cursor right (increment) */
|
||||||
|
#define LCD_MOVE_DISP_LEFT 0x18 /* shift display left */
|
||||||
|
#define LCD_MOVE_DISP_RIGHT 0x1C /* shift display right */
|
||||||
|
|
||||||
|
/* function set: set interface data length and number of display lines */
|
||||||
|
#define LCD_FUNCTION_4BIT_1LINE 0x20 /* 4-bit interface, single line, 5x7 dots */
|
||||||
|
#define LCD_FUNCTION_4BIT_2LINES 0x28 /* 4-bit interface, dual line, 5x7 dots */
|
||||||
|
#define LCD_FUNCTION_8BIT_1LINE 0x30 /* 8-bit interface, single line, 5x7 dots */
|
||||||
|
#define LCD_FUNCTION_8BIT_2LINES 0x38 /* 8-bit interface, dual line, 5x7 dots */
|
||||||
|
|
||||||
|
|
||||||
|
#define LCD_MODE_DEFAULT ((1<<LCD_ENTRY_MODE) | (1<<LCD_ENTRY_INC) )
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Functions
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
@brief Initialize display and select type of cursor
|
||||||
|
@param dispAttr \b LCD_DISP_OFF display off\n
|
||||||
|
\b LCD_DISP_ON display on, cursor off\n
|
||||||
|
\b LCD_DISP_ON_CURSOR display on, cursor on\n
|
||||||
|
\b LCD_DISP_ON_CURSOR_BLINK display on, cursor on flashing
|
||||||
|
@return none
|
||||||
|
*/
|
||||||
|
extern void lcd_init(uint8_t dispAttr);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
@brief Clear display and set cursor to home position
|
||||||
|
@return none
|
||||||
|
*/
|
||||||
|
extern void lcd_clrscr(void);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
@brief Set cursor to home position
|
||||||
|
@return none
|
||||||
|
*/
|
||||||
|
extern void lcd_home(void);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
@brief Set cursor to specified position
|
||||||
|
|
||||||
|
@param x horizontal position\n (0: left most position)
|
||||||
|
@param y vertical position\n (0: first line)
|
||||||
|
@return none
|
||||||
|
*/
|
||||||
|
extern void lcd_gotoxy(uint8_t x, uint8_t y);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
@brief Display character at current cursor position
|
||||||
|
@param c character to be displayed
|
||||||
|
@return none
|
||||||
|
*/
|
||||||
|
extern void lcd_putc(char c);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
@brief Display string without auto linefeed
|
||||||
|
@param s string to be displayed
|
||||||
|
@return none
|
||||||
|
*/
|
||||||
|
extern void lcd_puts(const char *s);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
@brief Display string from program memory without auto linefeed
|
||||||
|
@param progmem_s string from program memory be be displayed
|
||||||
|
@return none
|
||||||
|
@see lcd_puts_P
|
||||||
|
*/
|
||||||
|
extern void lcd_puts_p(const char *progmem_s);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
@brief Send LCD controller instruction command
|
||||||
|
@param cmd instruction to send to LCD controller, see HD44780 data sheet
|
||||||
|
@return none
|
||||||
|
*/
|
||||||
|
extern void lcd_command(uint8_t cmd);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
@brief Send data byte to LCD controller
|
||||||
|
|
||||||
|
Similar to lcd_putc(), but without interpreting LF
|
||||||
|
@param data byte to send to LCD controller, see HD44780 data sheet
|
||||||
|
@return none
|
||||||
|
*/
|
||||||
|
extern void lcd_data(uint8_t data);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
@brief macros for automatically storing string constant in program memory
|
||||||
|
*/
|
||||||
|
#define lcd_puts_P(__s) lcd_puts_p(PSTR(__s))
|
||||||
|
|
||||||
|
/**@}*/
|
||||||
|
|
||||||
|
#endif //LCD_H
|
||||||
|
|
||||||
Executable
+100
@@ -0,0 +1,100 @@
|
|||||||
|
/* Library made by: g4lvanix
|
||||||
|
* Github repository: https://github.com/g4lvanix/I2C-slave-lib
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <avr/io.h>
|
||||||
|
#include <util/twi.h>
|
||||||
|
#include <avr/interrupt.h>
|
||||||
|
|
||||||
|
#include "i2c_slave.h"
|
||||||
|
|
||||||
|
void i2c_init(uint8_t address){
|
||||||
|
// load address into TWI address register
|
||||||
|
TWAR = (address << 1);
|
||||||
|
// set the TWCR to enable address matching and enable TWI, clear TWINT, enable TWI interrupt
|
||||||
|
TWCR = (1<<TWIE) | (1<<TWEA) | (1<<TWINT) | (1<<TWEN);
|
||||||
|
}
|
||||||
|
|
||||||
|
void i2c_stop(void){
|
||||||
|
// clear acknowledge and enable bits
|
||||||
|
TWCR &= ~( (1<<TWEA) | (1<<TWEN) );
|
||||||
|
}
|
||||||
|
|
||||||
|
ISR(TWI_vect){
|
||||||
|
|
||||||
|
// temporary stores the received data
|
||||||
|
uint8_t data;
|
||||||
|
|
||||||
|
// own address has been acknowledged
|
||||||
|
if( (TWSR & 0xF8) == TW_SR_SLA_ACK ){
|
||||||
|
buffer_address = 0xFF;
|
||||||
|
// clear TWI interrupt flag, prepare to receive next byte and acknowledge
|
||||||
|
TWCR |= (1<<TWIE) | (1<<TWINT) | (1<<TWEA) | (1<<TWEN);
|
||||||
|
}
|
||||||
|
else if( (TWSR & 0xF8) == TW_SR_DATA_ACK ){ // data has been received in slave receiver mode
|
||||||
|
|
||||||
|
// save the received byte inside data
|
||||||
|
data = TWDR;
|
||||||
|
|
||||||
|
// check wether an address has already been transmitted or not
|
||||||
|
if(buffer_address == 0xFF){
|
||||||
|
|
||||||
|
buffer_address = data;
|
||||||
|
|
||||||
|
// clear TWI interrupt flag, prepare to receive next byte and acknowledge
|
||||||
|
TWCR |= (1<<TWIE) | (1<<TWINT) | (1<<TWEA) | (1<<TWEN);
|
||||||
|
}
|
||||||
|
else{ // if a databyte has already been received
|
||||||
|
|
||||||
|
// store the data at the current address
|
||||||
|
rxbuffer[buffer_address] = data;
|
||||||
|
|
||||||
|
// increment the buffer address
|
||||||
|
buffer_address++;
|
||||||
|
|
||||||
|
// if there is still enough space inside the buffer
|
||||||
|
if(buffer_address < 0xFF){
|
||||||
|
// clear TWI interrupt flag, prepare to receive next byte and acknowledge
|
||||||
|
TWCR |= (1<<TWIE) | (1<<TWINT) | (1<<TWEA) | (1<<TWEN);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
// Don't acknowledge
|
||||||
|
TWCR &= ~(1<<TWEA);
|
||||||
|
// clear TWI interrupt flag, prepare to receive last byte.
|
||||||
|
TWCR |= (1<<TWIE) | (1<<TWINT) | (1<<TWEN);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if( (TWSR & 0xF8) == TW_ST_DATA_ACK ){ // device has been addressed to be a transmitter
|
||||||
|
|
||||||
|
// copy data from TWDR to the temporary memory
|
||||||
|
data = TWDR;
|
||||||
|
|
||||||
|
// if no buffer read address has been sent yet
|
||||||
|
if( buffer_address == 0xFF ){
|
||||||
|
buffer_address = data;
|
||||||
|
}
|
||||||
|
|
||||||
|
// copy the specified buffer address into the TWDR register for transmission
|
||||||
|
TWDR = txbuffer[buffer_address];
|
||||||
|
// increment buffer read address
|
||||||
|
buffer_address++;
|
||||||
|
|
||||||
|
// if there is another buffer address that can be sent
|
||||||
|
if(buffer_address < 0xFF){
|
||||||
|
// clear TWI interrupt flag, prepare to send next byte and receive acknowledge
|
||||||
|
TWCR |= (1<<TWIE) | (1<<TWINT) | (1<<TWEA) | (1<<TWEN);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
// Don't acknowledge
|
||||||
|
TWCR &= ~(1<<TWEA);
|
||||||
|
// clear TWI interrupt flag, prepare to receive last byte.
|
||||||
|
TWCR |= (1<<TWIE) | (1<<TWINT) | (1<<TWEN);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
// if none of the above apply prepare TWI to be addressed again
|
||||||
|
TWCR |= (1<<TWIE) | (1<<TWEA) | (1<<TWEN);
|
||||||
|
}
|
||||||
|
}
|
||||||
Executable
+19
@@ -0,0 +1,19 @@
|
|||||||
|
/* Library made by: g4lvanix
|
||||||
|
* Github repository: https://github.com/g4lvanix/I2C-slave-lib
|
||||||
|
|
||||||
|
Info: Inititate the library by giving the required address.
|
||||||
|
Read or write to the necessary buffer according to the opperation.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef I2C_SLAVE_H
|
||||||
|
#define I2C_SLAVE_H
|
||||||
|
|
||||||
|
volatile uint8_t buffer_address;
|
||||||
|
volatile uint8_t txbuffer[0xFF];
|
||||||
|
volatile uint8_t rxbuffer[0xFF];
|
||||||
|
|
||||||
|
void i2c_init(uint8_t address);
|
||||||
|
void i2c_stop(void);
|
||||||
|
ISR(TWI_vect);
|
||||||
|
|
||||||
|
#endif // I2C_SLAVE_H
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
/*
|
||||||
|
This is the c configuration file for the keymap
|
||||||
|
|
||||||
|
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||||
|
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 <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef CONFIG_USER_H
|
||||||
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* Use I2C or Serial, not both */
|
||||||
|
|
||||||
|
#define USE_SERIAL
|
||||||
|
// #define USE_I2C
|
||||||
|
|
||||||
|
/* Select hand configuration */
|
||||||
|
|
||||||
|
#define MASTER_LEFT
|
||||||
|
// #define MASTER_RIGHT
|
||||||
|
// #define EE_HANDS
|
||||||
|
|
||||||
|
|
||||||
|
#define PERMISSIVE_HOLD
|
||||||
|
|
||||||
|
#define PREVENT_STUCK_MODIFIERS
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,87 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
#include "action_layer.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#define _BASE 0
|
||||||
|
#define _QWERTY 1
|
||||||
|
#define _RAISE 2
|
||||||
|
#define _NAVIGATION 3
|
||||||
|
|
||||||
|
|
||||||
|
// Fillers to make layering more clear
|
||||||
|
#define _______ KC_TRNS
|
||||||
|
#define XXXXXXX KC_NO
|
||||||
|
|
||||||
|
//Switch Layouts
|
||||||
|
#define SWBASE M(_BASE)
|
||||||
|
#define SWQWERTY M(_QWERTY)
|
||||||
|
|
||||||
|
// layer access
|
||||||
|
#define RSESPC LT( 2, KC_SPC)
|
||||||
|
#define NAVSPC LT( 3, KC_SPC)
|
||||||
|
|
||||||
|
// Key Combos
|
||||||
|
#define CTRLSFT LCTL(KC_LSFT)
|
||||||
|
#define CTLALTSFT LALT(LCTL(KC_LSFT))
|
||||||
|
#define CTLALTDEL LALT(LCTL(KC_DEL))
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
[_BASE] = LAYOUT( \
|
||||||
|
CTLALTSFT, 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_PSCREEN, KC_PAUSE, KC_CAPS, KC_INSERT, KC_EQL, \
|
||||||
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_HOME, KC_NUMLOCK, KC_KP_SLASH, KC_KP_ASTERISK, KC_LBRC, KC_RBRC, 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_END, KC_P7, KC_P8, KC_P9, KC_PMNS, KC_PGUP, 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_DEL, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_PGDN, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, SFT_T(KC_ENT), KC_P1, KC_P2, KC_P3, KC_UP, KC_BSLASH, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT), \
|
||||||
|
KC_LCTL, CTRLSFT, KC_LGUI, KC_LALT, RSESPC, NAVSPC, KC_LCTL, KC_P0, KC_PDOT, KC_LEFT, KC_DOWN, KC_RGHT, NAVSPC, RSESPC, KC_RALT, KC_RGUI, KC_APPLICATION, KC_RCTL \
|
||||||
|
),
|
||||||
|
[_QWERTY] = LAYOUT( \
|
||||||
|
CTLALTSFT, 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_PSCREEN, KC_PAUSE, KC_CAPS, KC_INSERT, KC_EQL, \
|
||||||
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_HOME, KC_NUMLOCK, KC_KP_SLASH, KC_KP_ASTERISK, KC_LBRC, KC_RBRC, 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_END, KC_P7, KC_P8, KC_P9, KC_PMNS, KC_PGUP, 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_DEL, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_PGDN, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, SFT_T(KC_ENT), KC_P1, KC_P2, KC_P3, KC_UP, KC_BSLASH, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT), \
|
||||||
|
KC_LCTL, CTRLSFT, KC_LGUI, KC_LALT, RSESPC, NAVSPC, KC_LCTL, KC_P0, KC_PDOT, KC_LEFT, KC_DOWN, KC_RGHT, NAVSPC, RSESPC, KC_RALT, KC_RGUI, KC_APPLICATION, KC_RCTL \
|
||||||
|
),
|
||||||
|
[_RAISE] = LAYOUT( \
|
||||||
|
CTLALTDEL, SWBASE, SWQWERTY, 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_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, LCTL(KC_PGUP), KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \
|
||||||
|
KC_DEL, KC_1, KC_2, KC_3, KC_4, KC_5, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, LCTL(KC_PGDN), KC_6, KC_7, KC_8, KC_9, KC_0, _______, \
|
||||||
|
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, LSFT(KC_BSLASH), XXXXXXX, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||||
|
),
|
||||||
|
[_NAVIGATION] = LAYOUT( \
|
||||||
|
CTLALTDEL, SWBASE, SWQWERTY, 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, _______, LCTL(KC_PGUP), XXXXXXX, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, \
|
||||||
|
KC_DEL, _______, XXXXXXX, KC_LSFT, KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, LCTL(KC_PGDN), XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, \
|
||||||
|
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, LSFT(KC_BSLASH), XXXXXXX, XXXXXXX, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
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 _BASE:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
persistent_default_layer_set(1UL<<_BASE);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case _QWERTY:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
persistent_default_layer_set(1UL<<_QWERTY);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return MACRO_NONE;
|
||||||
|
};
|
||||||
@@ -23,7 +23,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
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_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_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_NO, 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_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(1),
|
||||||
KC_CAPS, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_RGUI, KC_RCTL),
|
KC_CAPS, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RGUI, KC_RALT, KC_RALT, KC_RCTL),
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/*rBase layer */
|
||||||
|
[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_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, MO(1),
|
||||||
|
KC_LCTL, KC_LALT, KC_LGUI, KC_LGUI, KC_SPACE, KC_SPACE, KC_RGUI, KC_RGUI, KC_RALT, KC_RCTL, KC_RCTL
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Function layer */
|
||||||
|
[1] = 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, KC_F12, KC_INS, KC_DEL,
|
||||||
|
KC_TRNS, KC_PGUP, KC_UP, KC_PGDN, KC_HOME, KC_AMPR, KC_TILD, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_UP, KC_DEL, KC_BSPC,
|
||||||
|
KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_ASTR, KC_TRNS, KC_TRNS, KC_PGUP, KC_HOME, KC_LEFT, KC_RGHT, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_UNDS, KC_PLUS, KC_LPRN, KC_RPRN, KC_PIPE, KC_TRNS, KC_TRNS, KC_PGDN, KC_END, KC_DOWN, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), MO(2), KC_TRNS
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Reset layer */
|
||||||
|
[2] = LAYOUT(
|
||||||
|
RESET, KC_A, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO
|
||||||
|
),
|
||||||
|
|
||||||
|
};
|
||||||
+4
-13
@@ -23,7 +23,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
|||||||
|
|
||||||
void led_set_kb(uint8_t usb_led) {
|
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
|
||||||
DDRB |= (1<<6);
|
DDRB |= (1<<7);
|
||||||
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
|
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
|
||||||
// output low
|
// output low
|
||||||
DDRB |= (1<<2);
|
DDRB |= (1<<2);
|
||||||
@@ -33,21 +33,12 @@ void led_set_kb(uint8_t usb_led) {
|
|||||||
DDRB &= ~(1<<2);
|
DDRB &= ~(1<<2);
|
||||||
PORTB &= ~(1<<2);
|
PORTB &= ~(1<<2);
|
||||||
}
|
}
|
||||||
// DDRB |= (1<<7);
|
|
||||||
// DDRB |= (1<<1);
|
|
||||||
// DDRB |= (1<<3);
|
|
||||||
// DDRE |= (1<<6);
|
|
||||||
if (usb_led == 0){
|
if (usb_led == 0){
|
||||||
PORTB |= (1<<6);
|
PORTB |= (1<<7);
|
||||||
// PORTB |= (1<<7);
|
|
||||||
// PORTB |= (1<<1);
|
|
||||||
// PORTB |= (1<<3);
|
|
||||||
// PORTE |= (1<<6);
|
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
PORTB &= ~(1<<6);
|
PORTB &= ~(1<<7);
|
||||||
// PORTB &= ~(1<<7);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
led_set_user(usb_led);
|
led_set_user(usb_led);
|
||||||
}
|
}
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
#include "../e6v2.h"
|
#include "../e6v2.h"
|
||||||
|
|
||||||
#define LAYOUT( \
|
#define LAYOUT( \
|
||||||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \
|
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0E, K0D, \
|
||||||
K10, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \
|
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, \
|
K20, 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, \
|
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
/*
|
||||||
|
This is the c configuration file for the keymap
|
||||||
|
|
||||||
|
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||||
|
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 <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef CONFIG_USER_H
|
||||||
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
|
#include "../../config.h"
|
||||||
|
|
||||||
|
/* Use I2C or Serial, not both */
|
||||||
|
|
||||||
|
#define USE_SERIAL
|
||||||
|
// #define USE_I2C
|
||||||
|
|
||||||
|
/* Select hand configuration */
|
||||||
|
|
||||||
|
#define MASTER_LEFT
|
||||||
|
// #define MASTER_RIGHT
|
||||||
|
// #define EE_HANDS
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,112 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
extern keymap_config_t keymap_config;
|
||||||
|
|
||||||
|
#define _QWERTY 0
|
||||||
|
#define _LOWER 1
|
||||||
|
#define _RAISE 2
|
||||||
|
#define _CMOVE 3
|
||||||
|
#define _WIN 4
|
||||||
|
|
||||||
|
// Fillers to make layering more clear
|
||||||
|
#define _______ KC_TRNS
|
||||||
|
#define XXXXXXX KC_NO
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
/* QWERTY
|
||||||
|
* ,------------------------------------------------. ,------------------------------------------------.
|
||||||
|
* | Tab | Q | W | E | R | T | PGUP | | PGDN | Y | U | I | O | P | BSPC |
|
||||||
|
* |------+------+------+------+------+------+------| |-------------+------+------+------+------+------|
|
||||||
|
* | Ctrl | A | S | D | F | G | <- | | -> | H | J | K | L | ; | : |
|
||||||
|
* |------+------+------+------+------+------+------| |------|------+------+------+------+------+------|
|
||||||
|
* | Sft | Z | X | C | V | B | HOME | | END | N | M | , | . | / |ET/SFT|
|
||||||
|
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
||||||
|
* | ESC | WIN | ALT | ALT | GUI |LOWER |Space | |Space |RAISE | GUI | HOME | LEFT | RGHT | CMOVE|
|
||||||
|
* `------------------------------------------------' `------------------------------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
[_QWERTY] = LAYOUT( \
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_PGUP, KC_PGDN, 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_LEFT, KC_RGHT, 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_HOME, KC_END, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RSFT_T(KC_ENT), \
|
||||||
|
KC_ESC, TT(_WIN), KC_LALT, KC_LALT, KC_LGUI, MO(_LOWER), KC_SPC, KC_SPC, MO(_RAISE), KC_RGUI, KC_RCTL, KC_RSFT, KC_RALT, MO(_CMOVE)
|
||||||
|
),
|
||||||
|
|
||||||
|
/* RAISE
|
||||||
|
* ,------------------------------------------------. ,------------------------------------------------.
|
||||||
|
* | GRV | 1 | 2 | 3 | 4 | 5 | HOME | | END | 6 | 7 | 8 | 9 | 0 | DEL |
|
||||||
|
* |------+------+------+------+------+------+------| |-------------+------+------+------+------+------|
|
||||||
|
* | | F1 | F2 | F3 | F4 | F5 | <- | | -> | F6 | MINS | EQL | LBRC | RBRC | BSLS |
|
||||||
|
* |------+------+------+------+------+------+------| |------|------+------+------+------+------+------|
|
||||||
|
* | | F7 | F8 | F9 | F10 | F11 | PGUP | | PGDN | F12 | | | | | |
|
||||||
|
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | |Space | |Space | | | | | | Alt+~|
|
||||||
|
* `------------------------------------------------' `------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_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_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, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RALT(KC_GRV)
|
||||||
|
),
|
||||||
|
|
||||||
|
|
||||||
|
/* LOWER
|
||||||
|
* ,------------------------------------------------. ,------------------------------------------------.
|
||||||
|
* | ~ | ! | @ | # | $ | % | | | | ^ | & | * | ( | ) | DEL |
|
||||||
|
* |------+------+------+------+------+------+------| |-------------+------+------+------+------+------|
|
||||||
|
* | | F1 | F2 | F3 | F4 | F5 | | | UP | F6 | _ | + | { | } | | |
|
||||||
|
* |------+------+------+------+------+------+------| |------|------+------+------+------+------+------|
|
||||||
|
* | | F7 | F8 | F9 | F10 | F11 | | | DOWN | F12 | | PGUP | HOME | UP | END |
|
||||||
|
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | | | PGDN | LEFT | DOWN | RGHT |
|
||||||
|
* `------------------------------------------------' `------------------------------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
[_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_DEL, \
|
||||||
|
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, KC_UP, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
|
||||||
|
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, KC_DOWN, KC_F12, _______, KC_PGUP, KC_HOME, KC_UP, KC_END, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT \
|
||||||
|
),
|
||||||
|
|
||||||
|
/* CMOVE
|
||||||
|
* ,------------------------------------------------. ,------------------------------------------------.
|
||||||
|
* | | | | | | | | | | | | | | | |
|
||||||
|
* |------+------+------+------+------+------+------| |-------------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | | PGUP | HOME | UP | END | |
|
||||||
|
* |------+------+------+------+------+------+------| |------|------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | | PGDN | LEFT | DOWN | RIGHT| |
|
||||||
|
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | | | | | | |
|
||||||
|
* `------------------------------------------------' `------------------------------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
[_CMOVE] = LAYOUT( \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, KC_HOME, KC_UP, KC_END, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||||
|
),
|
||||||
|
|
||||||
|
/* WIN
|
||||||
|
* ,------------------------------------------------. ,------------------------------------------------.
|
||||||
|
* | | | | | | | | | | | | | | | |
|
||||||
|
* |------+------+------+------+------+------+------| |-------------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | | | | | | |
|
||||||
|
* |------+------+------+------+------+------+------| |------|------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | | | | | | |
|
||||||
|
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
||||||
|
* | | | | LGUI | ALT | | | | | | | ALT | | | |
|
||||||
|
* `------------------------------------------------' `------------------------------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
[_WIN] = LAYOUT( \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, KC_LGUI, ALT_T(KC_MHEN), _______, _______, _______, _______, ALT_T(KC_HENK), _______, _______, _______, _______ \
|
||||||
|
),
|
||||||
|
|
||||||
|
};
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
#ifndef ERGODASH_H
|
||||||
|
#define ERGODASH_H
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#ifdef KEYBOARD_ergodash_rev1
|
||||||
|
#include "rev1.h"
|
||||||
|
|
||||||
|
// Used to create a keymap using only KC_ prefixed keys
|
||||||
|
#define LAYOUT_kc( \
|
||||||
|
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, \
|
||||||
|
LT0, LT1, LT2, LT3, LT4, LT5, RT0, RT1, RT2, RT3, RT4, RT5 \
|
||||||
|
) \
|
||||||
|
LAYOUT( \
|
||||||
|
KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##L06, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, KC_##R06, \
|
||||||
|
KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##L16, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, KC_##R16, \
|
||||||
|
KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##L26, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, KC_##R26, \
|
||||||
|
KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L36, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35, KC_##R36, \
|
||||||
|
KC_##LT0, KC_##LT1, KC_##LT2, KC_##LT3, KC_##LT4, KC_##LT5, KC_##RT0, KC_##RT1, KC_##RT2, KC_##RT3, KC_##RT4, KC_##RT5 \
|
||||||
|
)
|
||||||
|
#endif // #ifdef KEYBOARD_ergodash_rev1
|
||||||
|
|
||||||
|
#ifdef KEYBOARD_ergodash_rev2
|
||||||
|
#include "rev2.h"
|
||||||
|
|
||||||
|
// Used to create a keymap using only KC_ prefixed keys
|
||||||
|
#define LAYOUT_kc( \
|
||||||
|
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, L46, R40, R41, R42, R43, R44, R45, R46 \
|
||||||
|
) \
|
||||||
|
LAYOUT( \
|
||||||
|
KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##L06, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, KC_##R06, \
|
||||||
|
KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##L16, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, KC_##R16, \
|
||||||
|
KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##L26, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, KC_##R26, \
|
||||||
|
KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L36, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35, KC_##R36, \
|
||||||
|
KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, KC_##L46, KC_##R40, KC_##R41, KC_##R42, KC_##R43, KC_##R44, KC_##R45, KC_##R46 \
|
||||||
|
)
|
||||||
|
#endif // #ifdef KEYBOARD_ergodash_rev2
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
#ifndef ERGODASH_H
|
|
||||||
#define ERGODASH_H
|
|
||||||
|
|
||||||
#include "quantum.h"
|
|
||||||
|
|
||||||
#ifdef KEYBOARD_ergodash_rev1
|
|
||||||
#include "rev1.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Used to create a keymap using only KC_ prefixed keys
|
|
||||||
#define LAYOUT_kc( \
|
|
||||||
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, \
|
|
||||||
LT0, LT1, LT2, LT3, LT4, LT5, RT0, RT1, RT2, RT3, RT4, RT5 \
|
|
||||||
) \
|
|
||||||
LAYOUT( \
|
|
||||||
KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##L06, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, KC_##R06, \
|
|
||||||
KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##L16, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, KC_##R16, \
|
|
||||||
KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##L26, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, KC_##R26, \
|
|
||||||
KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L36, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35, KC_##R36, \
|
|
||||||
KC_##LT0, KC_##LT1, KC_##LT2, KC_##LT3, KC_##LT4, KC_##LT5, KC_##RT0, KC_##RT1, KC_##RT2, KC_##RT3, KC_##RT4, KC_##RT5 \
|
|
||||||
)
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"keyboard_name": "ErgoDash",
|
"keyboard_name": "ErgoDash rev1",
|
||||||
"url": "",
|
"url": "",
|
||||||
"maintainer": "qmk",
|
"maintainer": "qmk",
|
||||||
"width": 16,
|
"width": 16,
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
#ifndef ERGODASH_H
|
|
||||||
#define ERGODASH_H
|
|
||||||
|
|
||||||
#include "quantum.h"
|
|
||||||
|
|
||||||
#ifdef KEYBOARD_ergodash_rev2
|
|
||||||
#include "rev2.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Used to create a keymap using only KC_ prefixed keys
|
|
||||||
#define LAYOUT_kc( \
|
|
||||||
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, L46, R40, R41, R42, R43, R44, R45, R46 \
|
|
||||||
) \
|
|
||||||
LAYOUT( \
|
|
||||||
KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##L06, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, KC_##R06, \
|
|
||||||
KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##L16, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, KC_##R16, \
|
|
||||||
KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##L26, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, KC_##R26, \
|
|
||||||
KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L36, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35, KC_##R36, \
|
|
||||||
KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, KC_##L46, KC_##R40, KC_##R41, KC_##R42, KC_##R43, KC_##R44, KC_##R45, KC_##R46 \
|
|
||||||
)
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "ErgoDash rev2",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "qmk",
|
||||||
|
"width": 18,
|
||||||
|
"height": 6.25,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"key_count": 70,
|
||||||
|
"layout": [{"label":"L00", "x":0, "y":0.375}, {"label":"L01", "x":1, "y":0.375}, {"label":"L02", "x":2, "y":0.125}, {"label":"L03", "x":3, "y":0}, {"label":"L04", "x":4, "y":0.125}, {"label":"L05", "x":5, "y":0.25}, {"label":"L06", "x":6, "y":0.75}, {"label":"R00", "x":11, "y":0.75}, {"label":"R01", "x":12, "y":0.25}, {"label":"R02", "x":13, "y":0.125}, {"label":"R03", "x":14, "y":0}, {"label":"R04", "x":15, "y":0.125}, {"label":"R05", "x":16, "y":0.375}, {"label":"R06", "x":17, "y":0.375}, {"label":"L10", "x":0, "y":1.375}, {"label":"L11", "x":1, "y":1.375}, {"label":"L12", "x":2, "y":1.125}, {"label":"L13", "x":3, "y":1}, {"label":"L14", "x":4, "y":1.125}, {"label":"L15", "x":5, "y":1.25}, {"label":"L16", "x":6, "y":1.75}, {"label":"R10", "x":11, "y":1.75}, {"label":"R11", "x":12, "y":1.25}, {"label":"R12", "x":13, "y":1.125}, {"label":"R13", "x":14, "y":1}, {"label":"R14", "x":15, "y":1.125}, {"label":"R15", "x":16, "y":1.375}, {"label":"R16", "x":17, "y":1.375}, {"label":"L20", "x":0, "y":2.375}, {"label":"L21", "x":1, "y":2.375}, {"label":"L22", "x":2, "y":2.125}, {"label":"L23", "x":3, "y":2}, {"label":"L24", "x":4, "y":2.125}, {"label":"L25", "x":5, "y":2.25}, {"label":"L26", "x":6, "y":2.75}, {"label":"R20", "x":11, "y":2.75}, {"label":"R21", "x":12, "y":2.25}, {"label":"R22", "x":13, "y":2.125}, {"label":"R23", "x":14, "y":2}, {"label":"R24", "x":15, "y":2.125}, {"label":"R25", "x":16, "y":2.375}, {"label":"R26", "x":17, "y":2.375}, {"label":"L30", "x":0, "y":3.375}, {"label":"L31", "x":1, "y":3.375}, {"label":"L32", "x":2, "y":3.125}, {"label":"L33", "x":3, "y":3}, {"label":"L34", "x":4, "y":3.125}, {"label":"L35", "x":5, "y":3.25}, {"label":"L36", "x":6.5, "y":4.25}, {"label":"R30", "x":10.5, "y":4.25}, {"label":"R31", "x":12, "y":3.25}, {"label":"R32", "x":13, "y":3.125}, {"label":"R33", "x":14, "y":3}, {"label":"R34", "x":15, "y":3.125}, {"label":"R35", "x":16, "y":3.375}, {"label":"R36", "x":17, "y":3.375}, {"label":"L40", "x":0, "y":4.375}, {"label":"L41", "x":1, "y":4.375}, {"label":"L42", "x":2, "y":4.125}, {"label":"L43", "x":3, "y":4}, {"label":"L44", "x":5.5, "y":5.25}, {"label":"L45", "x":6.5, "y":5.25}, {"label":"L46", "x":7.5, "y":4.25, "h":2}, {"label":"R40", "x":9.5, "y":4.25, "h":2}, {"label":"R41", "x":10.5, "y":5.25}, {"label":"R42", "x":11.5, "y":5.25}, {"label":"R43", "x":14, "y":4}, {"label":"R44", "x":15, "y":4.125}, {"label":"R45", "x":16, "y":4.375}, {"label":"R46", "x":17, "y":4.375}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
#ifndef CONFIG_USER_H
|
||||||
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
|
#include "../../config.h"
|
||||||
|
|
||||||
|
#define PREVENT_STUCK_MODIFIERS
|
||||||
|
|
||||||
|
#undef MATRIX_ROW_PINS
|
||||||
|
#undef MATRIX_COL_PINS
|
||||||
|
|
||||||
|
#define MATRIX_ROW_PINS { D4, D5, C7, C6 }
|
||||||
|
#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, D7, D1, B7, D0, B3, B2, B1, B0 }
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,348 @@
|
|||||||
|
#include "atreus50.h"
|
||||||
|
#include "action_layer.h"
|
||||||
|
#include "eeconfig.h"
|
||||||
|
#include "keymap_uk.h"
|
||||||
|
|
||||||
|
extern keymap_config_t keymap_config;
|
||||||
|
|
||||||
|
enum planck_layers {
|
||||||
|
_QWERTY,
|
||||||
|
_MAC,
|
||||||
|
_LOWER,
|
||||||
|
_MLWR,
|
||||||
|
_RAISE,
|
||||||
|
_MRSE,
|
||||||
|
_FUNC,
|
||||||
|
_MFNC,
|
||||||
|
_FUNC2,
|
||||||
|
_MFNC2,
|
||||||
|
_ADJUST,
|
||||||
|
_MOUSE
|
||||||
|
};
|
||||||
|
|
||||||
|
enum planck_keycodes {
|
||||||
|
QWERTY = SAFE_RANGE,
|
||||||
|
MAC,
|
||||||
|
FUNC,
|
||||||
|
MFNC,
|
||||||
|
FUNC2,
|
||||||
|
MFNC2,
|
||||||
|
LOWER,
|
||||||
|
MLWR,
|
||||||
|
RAISE,
|
||||||
|
MRSE,
|
||||||
|
MOUSE,
|
||||||
|
DYNAMIC_MACRO_RANGE
|
||||||
|
};
|
||||||
|
|
||||||
|
#include "dynamic_macro.h"
|
||||||
|
|
||||||
|
// Fillers to make layering more clear
|
||||||
|
#define _______ KC_TRNS
|
||||||
|
#define XXXXXXX KC_NO
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
/* Qwerty
|
||||||
|
* ,-----------------------------------------| |-----------------------------------------.
|
||||||
|
* | Esc | Q | W | E | R | T | | Y | U | I | O | P | Bksp |
|
||||||
|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
* | Tab | A | S | D | F | G | | H | J | K | L | ;: | Enter|
|
||||||
|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
* | Shft | Z | X | C | V | B | | N | M | ,< | .> | /? | Shft |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Fn | Ctrl | Alt | GUI |Lower | Bksp | Ctrl | Alt |Space |Raise | Shift| MENU | Ctrl | Fn2 |
|
||||||
|
* `-------------------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_QWERTY] = KEYMAP(
|
||||||
|
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC ,
|
||||||
|
MT(MOD_LSFT, KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, MT(MOD_RSFT, KC_ENT) ,
|
||||||
|
KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSHIFT ,
|
||||||
|
MO(_FUNC), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, RAISE, KC_LSHIFT, KC_BTN2, KC_RCTL, MO(_FUNC2)
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Function
|
||||||
|
* ,------------------------------------------ |-----------------------------------------.
|
||||||
|
* | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||||
|
* |------+------+------+------+------+------- |------+------+------+------+------+------|
|
||||||
|
* | 1! | 2" | 3£ | 4$ | 5% | 6^ | | 7& | 8* | 9( | 0) | ~ |INSERT|
|
||||||
|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
* | Shift| \| | `¬ | #~ | * | -_ | | =+ | \| | [{ | ]} | '@ |Shift |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Fn | Ctrl | Alt | GUI |Lower | Bksp | Ctrl | Alt |Space |Mouse | MENU | Alt | Ctrl | Fn |
|
||||||
|
* `-------------------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_FUNC] = KEYMAP(
|
||||||
|
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12 ,
|
||||||
|
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, UK_TILD, KC_INSERT ,
|
||||||
|
KC_LSHIFT, KC_NONUS_BSLASH, KC_GRAVE, KC_NONUS_HASH, KC_PAST, KC_MINS, KC_EQL, KC_BSLASH, KC_LBRC, KC_RBRC, KC_QUOT, MT(MOD_RSFT, KC_ENT) ,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, MO(_MOUSE), _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Lower
|
||||||
|
* ,------------------------------------------ |-----------------------------------------.
|
||||||
|
* | 1! | 2" | 3£ | 4$ | 5% | 6^ | | 7& | 8* | 9( | 0) | DEL | Bksp |
|
||||||
|
* |------+------+------+------+------+------- |------+------+------+------+------+------|
|
||||||
|
* | ! | " | £ | $ | % | ^ | | & | * | ( | ) |WrdDel|WrdBks|
|
||||||
|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
* | Shift| \| | `¬ | #~ | '@ | -_ | | =+ | #~ | [{ | ]} | '@ |Shift |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | |Lower | Del | Ctrl | Alt |Space | | Next | Vol- | Vol+ | Play |
|
||||||
|
* `-------------------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_LOWER] = KEYMAP(
|
||||||
|
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, KC_BSPC ,
|
||||||
|
LSFT(KC_1), LSFT(KC_2), LSFT(KC_3), LSFT(KC_4), LSFT(KC_5), LSFT(KC_6), LSFT(KC_7), LSFT(KC_8), LSFT(KC_9), LSFT(KC_0), LCTL(KC_DEL), LCTL(KC_BSPC) ,
|
||||||
|
KC_LSPO, KC_NONUS_BSLASH, KC_GRAVE, KC_NONUS_HASH, KC_QUOT, KC_MINS, KC_EQL, KC_NONUS_HASH, KC_LBRC, KC_RBRC, KC_QUOT, MT(MOD_RSFT, KC_ENT) ,
|
||||||
|
_______, _______, _______, _______, _______, KC_DEL, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Raise
|
||||||
|
* ,------------------------------------------ |-----------------------------------------.
|
||||||
|
* | ` | |WRDSEL| [ | ] | | | | PGUP | HOME |PGDOWN| |PRNTSC|
|
||||||
|
* |------+------+------+------+------+------- |------+------+------+------+------+------|
|
||||||
|
* | ` | | | ( | ) | | | | HOME | UP | END | |ZOOM +|
|
||||||
|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
* | | | | { | } | | | |< | LEFT | DOWN |RIGHT | >| |ZOOM -|
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------+------+------|
|
||||||
|
* | Mouse| | | | | Alt | Ctrl | Alt |Enter |Raise | | | | |
|
||||||
|
* `-------------------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_RAISE] = KEYMAP(
|
||||||
|
KC_GRV, XXXXXXX, M(1), KC_LBRC, KC_RBRC, XXXXXXX, XXXXXXX, KC_PGUP, KC_HOME, KC_PGDOWN, XXXXXXX, KC_PSCREEN ,
|
||||||
|
KC_GRV, XXXXXXX, XXXXXXX, LSFT(KC_9), LSFT(KC_0), XXXXXXX, XXXXXXX, KC_HOME, KC_UP, KC_END, XXXXXXX, LCTL(LSFT(KC_EQL)) ,
|
||||||
|
_______, XXXXXXX, XXXXXXX, LSFT(KC_LBRC), LSFT(KC_RBRC), XXXXXXX, LCTL(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_RIGHT), LCTL(KC_MINS) ,
|
||||||
|
MO(_MOUSE), _______, _______, _______, _______, KC_LALT, _______, _______, KC_ENT, _______, XXXXXXX, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Adjust (Lower + Raise)
|
||||||
|
* ,------------------------------------------ |-----------------------------------------.
|
||||||
|
* | ???? | Reset|Qwerty| | | REC1 | | REC2 | | | | | Del |
|
||||||
|
* |------+------+------+------+------+------- |------+------+------+------+------+------|
|
||||||
|
* | CAPS | | | | | PLAY1| | PLAY2| Mute | Vol+ | Play | | |
|
||||||
|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
* | PC/MC| | | | | STOP | | STOP | Prev | Vol- | Next | | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | | | | | |
|
||||||
|
* `-------------------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_ADJUST] = KEYMAP(
|
||||||
|
M(0), RESET, QWERTY, _______, _______, DYN_REC_START1, DYN_REC_START2, _______, _______, _______, _______, KC_DEL ,
|
||||||
|
KC_CAPS, _______, _______, _______, _______, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, KC_AUDIO_MUTE, KC_AUDIO_VOL_UP, KC_MEDIA_PLAY_PAUSE, _______, _______ ,
|
||||||
|
TG(_MAC), _______, _______, _______, _______, DYN_REC_STOP, DYN_REC_STOP, KC_MEDIA_PREV_TRACK, KC_AUDIO_VOL_DOWN, KC_MEDIA_NEXT_TRACK, _______, _______ ,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Mouse
|
||||||
|
* ,------------------------------------------ |-----------------------------------------.
|
||||||
|
* | ESC | | | | | | | | | | | | |
|
||||||
|
* |------+------+------+------+------+------- |------+------+------+------+------+------|
|
||||||
|
* | ACC0 | ACC1 | ACC2 | | | | | | BTN1 | UP | BTN2 | | |
|
||||||
|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
* | ACC0 | ACC1 | ACC2 | | | | | | LEFT | DOWN |RIGHT | | |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | | | | | |
|
||||||
|
* `-------------------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_MOUSE] = KEYMAP(
|
||||||
|
KC_ESC , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ,
|
||||||
|
KC_MS_ACCEL0, KC_MS_ACCEL1, KC_MS_ACCEL2, _______, _______, _______, _______, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2, _______, _______ ,
|
||||||
|
KC_MS_ACCEL0, KC_MS_ACCEL1, KC_MS_ACCEL2, _______, _______, _______, _______, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, _______, _______ ,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Function 2 (Right hand side)
|
||||||
|
* ,------------------------------------------ |-----------------------------------------.
|
||||||
|
* | | |WRDSEL| | | | | LNDEL| | | | | |
|
||||||
|
* |------+------+------+------+------+------- |------+------+------+------+------+------|
|
||||||
|
* | | | LNSEL| DUP | | | | | |LNJOIN| | | |
|
||||||
|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
* | | UNDO | CUT | COPY | PASTE| | | | | | | | MODE |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | | | | | |
|
||||||
|
* `-------------------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_FUNC2] = KEYMAP(
|
||||||
|
_______, _______, M(1), _______, _______, _______, M(5), _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, M(3), M(7), _______, _______, _______, M(10), _______, _______, _______, _______,
|
||||||
|
_______, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), _______, _______, _______, _______, _______, _______, M(98) ,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
[_MAC] = KEYMAP(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
MFNC, _______, _______, _______, MLWR, _______, _______, _______, _______, MRSE, _______, _______, _______, MFNC2
|
||||||
|
),
|
||||||
|
|
||||||
|
[_MLWR] = KEYMAP(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
[_MRSE] = KEYMAP(
|
||||||
|
_______, _______, M(2), _______, _______, _______, _______, _______, _______, _______, _______, _______ ,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, LCTL(KC_A), _______, LCTL(KC_E), _______, LGUI(KC_EQL) ,
|
||||||
|
_______, _______, _______, _______, _______, _______, LALT(KC_LEFT), _______, _______, _______, LALT(KC_RIGHT), LGUI(KC_MINS) ,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
[_MFNC] = KEYMAP(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, LGUI(KC_PENT) ,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
[_MFNC2] = KEYMAP(
|
||||||
|
_______, _______, M(2), _______, _______, _______, M(6), _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, M(4), M(8), _______, _______, _______, M(10), _______, _______, _______, _______,
|
||||||
|
_______, LGUI(KC_Z), LGUI(KC_X), LGUI(KC_C), LGUI(KC_V), _______, _______, _______, _______, _______, _______, M(99) ,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
)
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
void persistant_default_layer_set(uint16_t default_layer) {
|
||||||
|
eeconfig_update_default_layer(default_layer);
|
||||||
|
default_layer_set(default_layer);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
|
||||||
|
if (!process_record_dynamic_macro(keycode, record)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (keycode) {
|
||||||
|
case QWERTY:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
persistant_default_layer_set(1UL<<_QWERTY);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
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;
|
||||||
|
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;
|
||||||
|
case MLWR:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_LOWER);
|
||||||
|
layer_on(_MLWR);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
} else {
|
||||||
|
layer_off(_LOWER);
|
||||||
|
layer_off(_MLWR);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case MRSE:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_RAISE);
|
||||||
|
layer_on(_MRSE);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
} else {
|
||||||
|
layer_off(_RAISE);
|
||||||
|
layer_off(_MRSE);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case MFNC:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_FUNC);
|
||||||
|
layer_on(_MFNC);
|
||||||
|
} else {
|
||||||
|
layer_off(_FUNC);
|
||||||
|
layer_off(_MFNC);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case MFNC2:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_FUNC2);
|
||||||
|
layer_on(_MFNC2);
|
||||||
|
} else {
|
||||||
|
layer_off(_FUNC2);
|
||||||
|
layer_off(_MFNC2);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
const macro_t *action_get_macro(keyrecord_t *record, uint8_t keycode, uint8_t opt) {
|
||||||
|
// These would trigger when you hit a key mapped as M(0)
|
||||||
|
if (record->event.pressed) {
|
||||||
|
switch(keycode) {
|
||||||
|
case 0: // Some custom string here
|
||||||
|
SEND_STRING("");
|
||||||
|
return false;
|
||||||
|
|
||||||
|
case 1: // Word Select
|
||||||
|
SEND_STRING(SS_DOWN(X_LCTRL) SS_TAP(X_RIGHT) SS_DOWN(X_LSHIFT) SS_TAP(X_LEFT) SS_UP(X_LSHIFT) SS_UP(X_LCTRL));
|
||||||
|
return false;
|
||||||
|
|
||||||
|
case 2: // Word Select Mac
|
||||||
|
SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_RIGHT) SS_DOWN(X_LSHIFT) SS_TAP(X_LEFT) SS_UP(X_LSHIFT) SS_UP(X_LALT));
|
||||||
|
return false;
|
||||||
|
|
||||||
|
case 3: // Line Select
|
||||||
|
SEND_STRING(SS_TAP(X_HOME) SS_DOWN(X_LSHIFT) SS_TAP(X_END) SS_UP(X_LSHIFT));
|
||||||
|
return false;
|
||||||
|
|
||||||
|
case 4: // Line Select Mac
|
||||||
|
SEND_STRING(SS_LCTRL("a") SS_DOWN(X_LSHIFT) SS_LCTRL("e") SS_UP(X_LSHIFT));
|
||||||
|
return false;
|
||||||
|
|
||||||
|
case 5: // Line Delete
|
||||||
|
SEND_STRING(SS_TAP(X_HOME) SS_DOWN(X_LSHIFT) SS_TAP(X_END) SS_UP(X_LSHIFT));
|
||||||
|
SEND_STRING(SS_TAP(X_BSPACE));
|
||||||
|
return false;
|
||||||
|
|
||||||
|
case 6: // Line Delete Mac
|
||||||
|
SEND_STRING(SS_LCTRL("a") SS_DOWN(X_LSHIFT) SS_LCTRL("e") SS_UP(X_LSHIFT));
|
||||||
|
SEND_STRING(SS_TAP(X_BSPACE));
|
||||||
|
return false;
|
||||||
|
|
||||||
|
case 7: // Duplicate Selection
|
||||||
|
SEND_STRING(SS_LCTRL("c") SS_TAP(X_RIGHT) SS_LCTRL("v"));
|
||||||
|
return false;
|
||||||
|
|
||||||
|
case 8: // Duplicate Selection Mac
|
||||||
|
SEND_STRING(SS_LGUI("c") SS_TAP(X_RIGHT) SS_LGUI("v"));
|
||||||
|
return false;
|
||||||
|
|
||||||
|
case 9: // Join line
|
||||||
|
SEND_STRING(SS_TAP(X_END) SS_TAP(X_DELETE));
|
||||||
|
return false;
|
||||||
|
|
||||||
|
case 10: // Join line Mac
|
||||||
|
SEND_STRING(SS_LCTRL("e") SS_TAP(X_DELETE));
|
||||||
|
return false;
|
||||||
|
|
||||||
|
case 98: // Print mode
|
||||||
|
SEND_STRING("PC");
|
||||||
|
return false;
|
||||||
|
|
||||||
|
case 99: // Print mode
|
||||||
|
SEND_STRING("OSX");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return MACRO_NONE;
|
||||||
|
};
|
||||||
@@ -0,0 +1,108 @@
|
|||||||
|
# AJP10304 Custom Atreus50 Layout
|
||||||
|
# Also available for the Planck and JJ40
|
||||||
|
|
||||||
|
**Note:** In the tables below where there are two characters on a key,
|
||||||
|
the second is the output when shift is applied.
|
||||||
|
|
||||||
|
**Note:** The below tables assume a UK layout.
|
||||||
|
|
||||||
|
##### Main Qwerty Layer
|
||||||
|
|
||||||
|
* Tab: when held, operates as shift.
|
||||||
|
* Enter: when held, operates as shift.
|
||||||
|
* MENU: perform right-click
|
||||||
|
|
||||||
|
| | | | | | | | | | | | | | |
|
||||||
|
| ---- |:----:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| ----:|
|
||||||
|
| Esc | Q | W | E | R | T | | | Y | U | I | O | P | Bksp |
|
||||||
|
| Tab | A | S | D | F | G | | | H | J | K | L | ;: | Enter|
|
||||||
|
| Shft | Z | X | C | V | B | | | N | M | ,< | .> | /? | Shft |
|
||||||
|
| Fn | Ctrl | Alt | GUI |Lower | Bksp | Ctrl | Alt |Space |Raise | Shift| MENU | Ctrl | Fn2 |
|
||||||
|
|
||||||
|
##### Function Layer
|
||||||
|
Activated when `fn` held in the above `qwerty` layer.
|
||||||
|
|
||||||
|
| | | | | | | | | | | | | | |
|
||||||
|
| :---: |:----:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:|
|
||||||
|
| F1 | F2 | F3 | F4 | F5 | F6 | | | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||||
|
| 1! | 2" | 3£ | 4$ | 5% | 6^ | | | 7& | 8* | 9( | 0) | ~ |INSERT|
|
||||||
|
| Shift | \| | `¬ | #~ | * | -_ | | | =+ | \| | [{ | ]} | '@ |Shift |
|
||||||
|
| Fn | Ctrl | Alt | GUI |Lower | Bksp | Ctrl | Alt |Space |Mouse | MENU | Alt | Ctrl | Fn2 |
|
||||||
|
|
||||||
|
##### Lower Layer
|
||||||
|
Activated when `Lower` is held in the above `qwerty` layer.
|
||||||
|
|
||||||
|
* Numbers are along the top row, their shifted counterparts are on row 2.
|
||||||
|
* WrdBks: `backspace` with `ctrl` applied. I.e. delete a word.
|
||||||
|
* WrdDel: `delete` with `ctrl` applied. I.e. forward delete a word.
|
||||||
|
|
||||||
|
| | | | | | | | | | | | | | |
|
||||||
|
| :---: |:----:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:|
|
||||||
|
| 1! | 2" | 3£ | 4$ | 5% | 6^ | | | 7& | 8* | 9( | 0) | DEL | Bksp |
|
||||||
|
| ! | " | £ | $ | % | ^ | | | & | * | ( | ) |WrdDel|WrdBks|
|
||||||
|
| Shift | \| | `¬ | #~ | '@ | -_ | | | =+ | #~ | [{ | ]} | '@ |Shift |
|
||||||
|
| | | | |Lower | Del | Ctrl | Alt |Space | | Next | Vol- | Vol+ | Play |
|
||||||
|
|
||||||
|
##### Raise Layer
|
||||||
|
Activated when `Raise` is held in the above `qwerty` layer.
|
||||||
|
|
||||||
|
* Preferred layer for typing brackets.
|
||||||
|
* Allows for cursor navigation to be used solely with the right hand.
|
||||||
|
* WRDSEL: Select the word where the cursor is.
|
||||||
|
* |< and >|: Apply `ctrl` to `left` and `right` respectively for word jumping.
|
||||||
|
|
||||||
|
| | | | | | | | | | | | | | |
|
||||||
|
| :---: |:----:| :---:| :---:| :---:| :---:| :---:| :---:| :---: | :---:| :---:| :---:| :---: | :---:|
|
||||||
|
| ` | |WRDSEL| [ | ] | | | | | PGUP | HOME |PGDOWN| |PRNTSC|
|
||||||
|
| ` | | | ( | ) | | | | | HOME | UP | END | |ZOOM +|
|
||||||
|
| | | | { | } | | | ||<| LEFT | DOWN |RIGHT |>||ZOOM -|
|
||||||
|
| Mouse | | | | | Alt | Ctrl | Alt | Enter |Raise | | | | |
|
||||||
|
|
||||||
|
##### Lower + Raise
|
||||||
|
Activated when `Lower` and `Raise` are held together in the above `qwerty` layer.
|
||||||
|
|
||||||
|
* Audio controls in the same position as cursor keys from the `Raise` layer.
|
||||||
|
* ????: Runs a macro for outputting a text string. Do not use this store passwords.
|
||||||
|
* Reset: Enter bootloader for flashing firmware to the keyboard.
|
||||||
|
* CAPS: Toggle caps lock.
|
||||||
|
* Macro functions: Allows recording of macros. To start recording the macro, press either REC1 or REC2.
|
||||||
|
To finish the recording, press STOP. To replay the macro, press either PLAY1 or PLAY2.
|
||||||
|
* MAC: Toggle MAC OS extensions to layers. This allows MLWR to be enabled with LOWER,
|
||||||
|
MRSE with RAISE, MFNC with FUNC and MFNC2 with FUNC2 respectively.
|
||||||
|
|
||||||
|
| | | | | | | | | | | | | | |
|
||||||
|
| :---: |:----:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:|
|
||||||
|
| ???? | Reset|Qwerty| | | REC1 | | | REC2 | | | | | Del |
|
||||||
|
| CAPS | | | | | PLAY1| | |PLAY2 | Mute | Vol+ | Play | | |
|
||||||
|
| MAC | | | | | STOP1| | |STOP2 | Prev | Vol- | Next | | |
|
||||||
|
| | | | | | | Ctrl | Alt | | | DYN | | | |
|
||||||
|
|
||||||
|
##### Function 2 Layer
|
||||||
|
Activated when `fn` held in the above `qwerty` layer.
|
||||||
|
* WRDSEL: Select the word where the cursor is.
|
||||||
|
* LNDEL: Delete the line where the cursor is.
|
||||||
|
* LNSEL: Select the line where the cursor is.
|
||||||
|
* DUP: Duplicate the selected text.
|
||||||
|
* LNJOIN: Join the line where the cursor is with the following line.
|
||||||
|
* MODE: Print either `PC` or `OSX` depending on what layer mode is active.
|
||||||
|
|
||||||
|
| | | | | | | | | | | | | | |
|
||||||
|
| :---: | :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:|
|
||||||
|
| | |WRDSEL| | | | | | LNDEL| | | | | |
|
||||||
|
| | | LNSEL| DUP | | | | | | |LNJOIN| | | |
|
||||||
|
| | UNDO | CUT | COPY | PASTE| | | | | | | | | MODE |
|
||||||
|
| | | | | | | Ctrl | Alt | | | | | | |
|
||||||
|
|
||||||
|
##### Mouse Layer
|
||||||
|
Activated when `fn` and `raise` held together.
|
||||||
|
|
||||||
|
| | | | | | | | | | | | | | |
|
||||||
|
| :---: | :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:|
|
||||||
|
| ESC | | | | | | | | | | | | | |
|
||||||
|
| ACC0 | ACC1 | ACC2 | | | | | | | BTN1 | UP | BTN2 | | |
|
||||||
|
| ACC0 | ACC1 | ACC2 | | | | | | | LEFT | DOWN | RIGHT| | |
|
||||||
|
| | | | | | | Ctrl | Alt | | | | | | |
|
||||||
|
|
||||||
|
|
||||||
|
##Program Command
|
||||||
|
teensy_loader_cli -w -mmcu=atmega32u4 handwired_atreus50_ajp10304.hex
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
ifndef QUANTUM_DIR
|
||||||
|
include ../../../../Makefile
|
||||||
|
endif
|
||||||
|
|
||||||
|
AUDIO_ENABLE = no
|
||||||
|
MOUSEKEY_ENABLE = yes
|
||||||
|
|
||||||
|
TEMP := $(OPT_DEFS)
|
||||||
|
OPT_DEFS = $(filter-out -DBOOTLOADER_SIZE=4096,$(TEMP))
|
||||||
|
OPT_DEFS += -DBOOTLOADER_SIZE=512
|
||||||
|
|
||||||
|
BOOTLOADER = halfkay
|
||||||
@@ -21,8 +21,22 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#include "config_common.h"
|
#include "config_common.h"
|
||||||
|
|
||||||
#ifdef SUBPROJECT_rev1
|
// GCC include 'config.h" sequence in qmk_firmware/keyboards/helix/
|
||||||
#include "rev1/config.h"
|
// -include keyboards/helix/config.h
|
||||||
#endif
|
// -include keyboards/helix/rev?/config.h
|
||||||
|
// -include keyboards/helix/rev?/keymaps/MAPNAME/config.h
|
||||||
|
// XXXX.c
|
||||||
|
|
||||||
#endif
|
#include <serial_config.h>
|
||||||
|
|
||||||
|
// GCC include search path in qmk_firmare/keyboards/helix/
|
||||||
|
// #include "..." search starts here:
|
||||||
|
// #include <...> search starts here:
|
||||||
|
// keyboards/helix/rev?/keymaps/MAPNAME
|
||||||
|
// keyboards/helix
|
||||||
|
// keyboards/helix/rev?
|
||||||
|
// .
|
||||||
|
// ./tmk_core
|
||||||
|
// ......
|
||||||
|
|
||||||
|
#endif /* CONFIG_H */
|
||||||
@@ -19,8 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#ifndef REV1_CONFIG_H
|
#ifndef REV1_CONFIG_H
|
||||||
#define REV1_CONFIG_H
|
#define REV1_CONFIG_H
|
||||||
|
|
||||||
#include "../config.h"
|
|
||||||
|
|
||||||
/* USB Device descriptor parameter */
|
/* USB Device descriptor parameter */
|
||||||
#define VENDOR_ID 0xFEED
|
#define VENDOR_ID 0xFEED
|
||||||
#define PRODUCT_ID 0x3060
|
#define PRODUCT_ID 0x3060
|
||||||
|
|||||||
@@ -21,8 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#ifndef CONFIG_USER_H
|
#ifndef CONFIG_USER_H
|
||||||
#define CONFIG_USER_H
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
#include "../../config.h"
|
|
||||||
|
|
||||||
/* Use I2C or Serial */
|
/* Use I2C or Serial */
|
||||||
|
|
||||||
#define USE_I2C
|
#define USE_I2C
|
||||||
@@ -37,8 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#define SSD1306OLED
|
#define SSD1306OLED
|
||||||
|
|
||||||
#define USE_SERIAL_PD2
|
|
||||||
|
|
||||||
#define PREVENT_STUCK_MODIFIERS
|
#define PREVENT_STUCK_MODIFIERS
|
||||||
#define TAPPING_FORCE_HOLD
|
#define TAPPING_FORCE_HOLD
|
||||||
#define TAPPING_TERM 100
|
#define TAPPING_TERM 100
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
#ifndef SOFT_SERIAL_CONFIG_H
|
||||||
|
#define SOFT_SERIAL_CONFIG_H
|
||||||
|
|
||||||
|
/* 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 SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2
|
||||||
|
#define SERIAL_MASTER_BUFFER_LENGTH 1
|
||||||
|
|
||||||
|
//// #error rev1/keymaps/OLED_sample serial config
|
||||||
|
|
||||||
|
#endif /* SOFT_SERIAL_CONFIG_H */
|
||||||
@@ -21,8 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#ifndef CONFIG_USER_H
|
#ifndef CONFIG_USER_H
|
||||||
#define CONFIG_USER_H
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
#include "../../config.h"
|
|
||||||
|
|
||||||
/* Use I2C or Serial, not both */
|
/* Use I2C or Serial, not both */
|
||||||
|
|
||||||
#define USE_SERIAL
|
#define USE_SERIAL
|
||||||
@@ -34,4 +32,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
// #define _MASTER_RIGHT
|
// #define _MASTER_RIGHT
|
||||||
// #define EE_HANDS
|
// #define EE_HANDS
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
#define LAYOUT( \
|
#define LAYOUT( \
|
||||||
L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
|
L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
|
||||||
L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
|
L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
|
||||||
L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
|
L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25 \
|
||||||
) \
|
) \
|
||||||
{ \
|
{ \
|
||||||
{ L00, L01, L02, L03, L04, L05 }, \
|
{ L00, L01, L02, L03, L04, L05 }, \
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
#define LAYOUT( \
|
#define LAYOUT( \
|
||||||
L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
|
L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
|
||||||
L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
|
L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
|
||||||
L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
|
L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25 \
|
||||||
) \
|
) \
|
||||||
{ \
|
{ \
|
||||||
{ L00, L01, L02, L03, L04, L05 }, \
|
{ L00, L01, L02, L03, L04, L05 }, \
|
||||||
@@ -147,12 +147,12 @@
|
|||||||
#define LAYOUT_kc( \
|
#define LAYOUT_kc( \
|
||||||
L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
|
L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
|
||||||
L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
|
L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
|
||||||
L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
|
L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25 \
|
||||||
) \
|
) \
|
||||||
LAYOUT( \
|
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_##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_##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_##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 HELIX_ROWS == 4
|
||||||
#define LAYOUT_kc( \
|
#define LAYOUT_kc( \
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
#ifndef SOFT_SERIAL_CONFIG_H
|
||||||
|
#define SOFT_SERIAL_CONFIG_H
|
||||||
|
|
||||||
|
/* Soft Serial defines */
|
||||||
|
#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
|
||||||
|
|
||||||
|
/// #error rev1 serial config
|
||||||
|
|
||||||
|
#endif /* SOFT_SERIAL_CONFIG_H */
|
||||||
@@ -19,8 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#ifndef REV2_CONFIG_H
|
#ifndef REV2_CONFIG_H
|
||||||
#define REV2_CONFIG_H
|
#define REV2_CONFIG_H
|
||||||
|
|
||||||
#include "../config.h"
|
|
||||||
|
|
||||||
/* USB Device descriptor parameter */
|
/* USB Device descriptor parameter */
|
||||||
#define VENDOR_ID 0xFEED
|
#define VENDOR_ID 0xFEED
|
||||||
#define PRODUCT_ID 0x3060
|
#define PRODUCT_ID 0x3060
|
||||||
@@ -37,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
/* Use I2C or Serial */
|
/* Use I2C or Serial */
|
||||||
#define USE_I2C
|
#define USE_I2C
|
||||||
#define USE_SERIAL
|
#define USE_SERIAL
|
||||||
#define USE_SERIAL_PD2
|
|
||||||
//#define USE_MATRIX_I2C
|
//#define USE_MATRIX_I2C
|
||||||
|
|
||||||
/* Select hand configuration */
|
/* Select hand configuration */
|
||||||
|
|||||||
@@ -21,8 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#ifndef CONFIG_USER_H
|
#ifndef CONFIG_USER_H
|
||||||
#define CONFIG_USER_H
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
#include "../../config.h"
|
|
||||||
|
|
||||||
// place overrides here
|
// place overrides here
|
||||||
|
|
||||||
#endif /* CONFIG_USER_H */
|
#endif /* CONFIG_USER_H */
|
||||||
@@ -1,8 +1,6 @@
|
|||||||
#ifndef CONFIG_USER_H
|
#ifndef CONFIG_USER_H
|
||||||
#define CONFIG_USER_H
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
#include "../../config.h"
|
|
||||||
|
|
||||||
#undef TAPPING_FORCE_HOLD
|
#undef TAPPING_FORCE_HOLD
|
||||||
#undef TAPPING_TERM
|
#undef TAPPING_TERM
|
||||||
#define TAPPING_TERM 120
|
#define TAPPING_TERM 120
|
||||||
|
|||||||
@@ -21,8 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#ifndef CONFIG_USER_H
|
#ifndef CONFIG_USER_H
|
||||||
#define CONFIG_USER_H
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
#include "../../config.h"
|
|
||||||
|
|
||||||
// place overrides here
|
// place overrides here
|
||||||
|
|
||||||
#endif /* CONFIG_USER_H */
|
#endif /* CONFIG_USER_H */
|
||||||
@@ -21,8 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#ifndef CONFIG_USER_H
|
#ifndef CONFIG_USER_H
|
||||||
#define CONFIG_USER_H
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
#include "../../config.h"
|
|
||||||
|
|
||||||
/* Use I2C or Serial */
|
/* Use I2C or Serial */
|
||||||
|
|
||||||
#define USE_I2C
|
#define USE_I2C
|
||||||
@@ -59,8 +57,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#error "expected HELIX_ROWS 4 or 5"
|
#error "expected HELIX_ROWS 4 or 5"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define USE_SERIAL_PD2
|
|
||||||
|
|
||||||
#define PREVENT_STUCK_MODIFIERS
|
#define PREVENT_STUCK_MODIFIERS
|
||||||
#define TAPPING_FORCE_HOLD
|
#define TAPPING_FORCE_HOLD
|
||||||
#define TAPPING_TERM 100
|
#define TAPPING_TERM 100
|
||||||
@@ -118,4 +114,21 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define USB_MAX_POWER_CONSUMPTION 100
|
#define USB_MAX_POWER_CONSUMPTION 100
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef MOUSEKEY_ENABLE
|
||||||
|
#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
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* CONFIG_USER_H */
|
#endif /* CONFIG_USER_H */
|
||||||
@@ -159,9 +159,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
|
|
||||||
/* Raise JIS Normal
|
/* Raise JIS Normal
|
||||||
* ,-----------------------------------------. ,-----------------------------------------.
|
* ,-----------------------------------------. ,-----------------------------------------.
|
||||||
* | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 |
|
* | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 |
|
||||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
* | | | | | | | | | | | | Home |PageUp|
|
* | | | | | | | | F12 | | | | Home |PageUp|
|
||||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
* | | | | | | | | | | | | End |PageDn|
|
* | | | | | | | | | | | | End |PageDn|
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
@@ -171,8 +171,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* `-------------------------------------------------------------------------------------------------'
|
* `-------------------------------------------------------------------------------------------------'
|
||||||
*/
|
*/
|
||||||
[_RAISE] = LAYOUT( \
|
[_RAISE] = 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_F1 , KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, \
|
||||||
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_PGUP, \
|
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F12 , XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_PGUP, \
|
||||||
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_END, KC_PGDN, \
|
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_END, KC_PGDN, \
|
||||||
_______, KC_BTN1, KC_BTN2, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_U, XXXXXXX, \
|
_______, KC_BTN1, KC_BTN2, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_U, XXXXXXX, \
|
||||||
_______, _______, _______, _______, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_R \
|
_______, _______, _______, _______, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_R \
|
||||||
@@ -180,9 +180,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
|
|
||||||
/* Raise JIS Exchange L and R
|
/* Raise JIS Exchange L and R
|
||||||
* ,-----------------------------------------. ,-----------------------------------------.
|
* ,-----------------------------------------. ,-----------------------------------------.
|
||||||
* | F7 | F8 | F9 | F10 | F11 | F12 | | F1 | F2 | F3 | F4 | F5 | F6 |
|
* | F6 | F7 | F8 | F9 | F10 | F11 | | | F1 | F2 | F3 | F4 | F5 |
|
||||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
* | | | | | | | | | | | | | |
|
* | F12 | | | | | | | | | | | | |
|
||||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
* | | | | | | | | | | | | | |
|
* | | | | | | | | | | | | | |
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
@@ -192,8 +192,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* `-------------------------------------------------------------------------------------------------'
|
* `-------------------------------------------------------------------------------------------------'
|
||||||
*/
|
*/
|
||||||
[_RAI_E] = LAYOUT( \
|
[_RAI_E] = LAYOUT( \
|
||||||
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F1 , KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, \
|
KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, KC_F1 , KC_F2, KC_F3, KC_F4, KC_F5, \
|
||||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, 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, \
|
||||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_U, XXXXXXX, XXXXXXX, _______, KC_BTN1, KC_BTN2, XXXXXXX, XXXXXXX, XXXXXXX, \
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_U, XXXXXXX, XXXXXXX, _______, KC_BTN1, KC_BTN2, XXXXXXX, XXXXXXX, XXXXXXX, \
|
||||||
_______, _______, XXXXXXX, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, _______, _______, XXXXXXX, _______, XXXXXXX \
|
_______, _______, XXXXXXX, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, _______, _______, XXXXXXX, _______, XXXXXXX \
|
||||||
@@ -221,194 +221,46 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
),
|
),
|
||||||
};
|
};
|
||||||
|
|
||||||
#elif HELIX_ROWS == 4
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|
||||||
// Do it yourself :)
|
|
||||||
};
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#error "undefined keymaps"
|
#error "undefined keymaps"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef SSD1306OLED
|
||||||
|
char keylog[20] = {};
|
||||||
|
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', ' ', '-', ' ', '@', ' ', ' ',
|
||||||
|
' ', ';', ':', ' ', ',', '.', '/', ' ', ' ', ' '};
|
||||||
|
|
||||||
|
inline void set_keylog(uint16_t keycode, keyrecord_t *record)
|
||||||
|
{
|
||||||
|
char name = ' ';
|
||||||
|
uint8_t leds = host_keyboard_leds();
|
||||||
|
|
||||||
|
if (keycode < 60)
|
||||||
|
{
|
||||||
|
name = code_to_name[keycode];
|
||||||
|
}
|
||||||
|
|
||||||
|
// update keylog
|
||||||
|
snprintf(keylog, sizeof(keylog), "\n%dx%d %2x %c %c %c %c",
|
||||||
|
record->event.key.row,
|
||||||
|
record->event.key.col,
|
||||||
|
keycode,
|
||||||
|
name,
|
||||||
|
(leds & (1<<USB_LED_NUM_LOCK)) ? 'N' : ' ',
|
||||||
|
(leds & (1<<USB_LED_CAPS_LOCK)) ? 'C' : ' ',
|
||||||
|
(leds & (1<<USB_LED_SCROLL_LOCK)) ? 'S' : ' '
|
||||||
|
);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef AUDIO_ENABLE
|
#ifdef AUDIO_ENABLE
|
||||||
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||||
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||||
#endif
|
|
||||||
|
|
||||||
// define variables for reactive RGB
|
|
||||||
bool TOG_STATUS = false;
|
|
||||||
int RGB_current_mode;
|
|
||||||
|
|
||||||
void persistent_default_layer_set(uint16_t default_layer) {
|
|
||||||
eeconfig_update_default_layer(default_layer);
|
|
||||||
default_layer_set(default_layer);
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef ADJUST_MACRO_ENABLE
|
|
||||||
// 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)) {
|
|
||||||
#ifdef RGBLIGHT_ENABLE
|
|
||||||
rgblight_mode(RGB_current_mode);
|
|
||||||
#endif
|
|
||||||
layer_on(layer3);
|
|
||||||
} else {
|
|
||||||
layer_off(layer3);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void toggle_lower_raise_layer(bool pressed, uint16_t dist_layer, uint16_t lower_layer, uint16_t raise_layer) {
|
|
||||||
if (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
|
|
||||||
TOG_STATUS = !TOG_STATUS;
|
|
||||||
#ifdef RGBLIGHT_ENABLE
|
|
||||||
if (dist_layer == _LOWER || dist_layer == _LOW_E) {
|
|
||||||
rgblight_mode(16);
|
|
||||||
} else {
|
|
||||||
rgblight_mode(15);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
layer_on(dist_layer);
|
|
||||||
#ifdef ADJUST_MACRO_ENABLE
|
|
||||||
update_tri_layer_RGB(lower_layer, raise_layer, _ADJUST);
|
|
||||||
#endif
|
|
||||||
} else {
|
|
||||||
#ifdef RGBLIGHT_ENABLE
|
|
||||||
rgblight_mode(RGB_current_mode); // revert RGB to initial mode prior to RGB mode change
|
|
||||||
#endif
|
|
||||||
TOG_STATUS = false;
|
|
||||||
layer_off(dist_layer);
|
|
||||||
#ifdef ADJUST_MACRO_ENABLE
|
|
||||||
update_tri_layer_RGB(lower_layer, raise_layer, _ADJUST);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|
||||||
switch (keycode) {
|
|
||||||
case BASE:
|
|
||||||
if (record->event.pressed) {
|
|
||||||
#ifdef AUDIO_ENABLE
|
|
||||||
PLAY_SONG(tone_qwerty);
|
|
||||||
#endif
|
|
||||||
persistent_default_layer_set(1UL<<_BASE);
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
break;
|
|
||||||
case BAS_E:
|
|
||||||
if (record->event.pressed) {
|
|
||||||
#ifdef AUDIO_ENABLE
|
|
||||||
PLAY_SONG(tone_qwerty);
|
|
||||||
#endif
|
|
||||||
persistent_default_layer_set(1UL<<_BAS_E);
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
break;
|
|
||||||
case LOWER:
|
|
||||||
toggle_lower_raise_layer(record->event.pressed, _LOWER, _LOWER, _RAISE);
|
|
||||||
return false;
|
|
||||||
break;
|
|
||||||
case LOW_E:
|
|
||||||
toggle_lower_raise_layer(record->event.pressed, _LOW_E, _LOW_E, _RAI_E);
|
|
||||||
return false;
|
|
||||||
break;
|
|
||||||
case RAISE:
|
|
||||||
toggle_lower_raise_layer(record->event.pressed, _RAISE, _LOWER, _RAISE);
|
|
||||||
return false;
|
|
||||||
break;
|
|
||||||
case RAI_E:
|
|
||||||
toggle_lower_raise_layer(record->event.pressed, _RAI_E, _LOW_E, _RAI_E);
|
|
||||||
return false;
|
|
||||||
break;
|
|
||||||
case ADJUST:
|
|
||||||
if (record->event.pressed) {
|
|
||||||
#ifdef RGBLIGHT_ENABLE
|
|
||||||
rgblight_mode(14);
|
|
||||||
#endif
|
|
||||||
layer_on(_ADJUST);
|
|
||||||
} else {
|
|
||||||
#ifdef RGBLIGHT_ENABLE
|
|
||||||
rgblight_mode(RGB_current_mode);
|
|
||||||
#endif
|
|
||||||
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 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 EISU:
|
|
||||||
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;
|
|
||||||
#ifdef KANA_ENABLE
|
|
||||||
case KANA:
|
|
||||||
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;
|
|
||||||
#endif
|
|
||||||
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;
|
|
||||||
// return process_layer_control(keycode, record, false) ? process_layer_control(keycode, record, true) : true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void matrix_init_user(void) {
|
|
||||||
#ifdef AUDIO_ENABLE
|
|
||||||
startup_user();
|
|
||||||
#endif
|
|
||||||
#ifdef RGBLIGHT_ENABLE
|
|
||||||
RGB_current_mode = rgblight_config.mode;
|
|
||||||
#endif
|
|
||||||
//SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h
|
|
||||||
#ifdef SSD1306OLED
|
|
||||||
TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000));
|
|
||||||
iota_gfx_init(!has_usb()); // turns on the display
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef AUDIO_ENABLE
|
|
||||||
|
|
||||||
void startup_user()
|
void startup_user()
|
||||||
{
|
{
|
||||||
@@ -431,8 +283,168 @@ void music_scale_user(void)
|
|||||||
PLAY_SONG(music_scale);
|
PLAY_SONG(music_scale);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
float tone_qwerty;
|
||||||
|
float music_scale;
|
||||||
|
#define PLAY_SONG(tone)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// define variables for reactive RGB
|
||||||
|
int RGB_current_mode;
|
||||||
|
#ifdef ADJUST_MACRO_ENABLE
|
||||||
|
// 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)) {
|
||||||
|
RGBLIGHT(RGB_current_mode);
|
||||||
|
layer_on(layer3);
|
||||||
|
} else {
|
||||||
|
layer_off(layer3);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#define ADJUST_MACRO(layer1, layer2, layer3) update_tri_layer_RGB(layer1, layer2, layer3)
|
||||||
|
#else
|
||||||
|
#define ADJUST_MACRO(layer1, layer2, layer3)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef RGBLIGHT_ENABLE
|
||||||
|
#define RGBLIGHT(mode) rgblight_mode(mode)
|
||||||
|
#else
|
||||||
|
#define RGBLIGHT(mode)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
inline void persistent_default_layer_set(uint16_t default_layer) {
|
||||||
|
eeconfig_update_default_layer(default_layer);
|
||||||
|
default_layer_set(default_layer);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool TOG_STATUS = false;
|
||||||
|
|
||||||
|
void toggle_lower_raise_layer(bool pressed, uint16_t dist_layer, uint16_t lower_layer, uint16_t raise_layer) {
|
||||||
|
if (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
|
||||||
|
TOG_STATUS = !TOG_STATUS;
|
||||||
|
#ifdef RGBLIGHT_ENABLE
|
||||||
|
rgblight_mode((dist_layer == _LOWER || dist_layer == _LOW_E) ? 16 : 15);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
layer_on(dist_layer);
|
||||||
|
ADJUST_MACRO(lower_layer, raise_layer, _ADJUST);
|
||||||
|
} else {
|
||||||
|
RGBLIGHT(RGB_current_mode); // revert RGB to initial mode prior to RGB mode change
|
||||||
|
TOG_STATUS = false;
|
||||||
|
layer_off(dist_layer);
|
||||||
|
ADJUST_MACRO(lower_layer, raise_layer, _ADJUST);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
#ifdef SSD1306OLED
|
||||||
|
if (record->event.pressed) {
|
||||||
|
set_keylog(keycode, record);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
switch (keycode) {
|
||||||
|
case BASE:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
PLAY_SONG(tone_qwerty);
|
||||||
|
persistent_default_layer_set(1UL<<_BASE);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case BAS_E:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
PLAY_SONG(tone_qwerty);
|
||||||
|
persistent_default_layer_set(1UL<<_BAS_E);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case LOWER:
|
||||||
|
toggle_lower_raise_layer(record->event.pressed, _LOWER, _LOWER, _RAISE);
|
||||||
|
break;
|
||||||
|
case LOW_E:
|
||||||
|
toggle_lower_raise_layer(record->event.pressed, _LOW_E, _LOW_E, _RAI_E);
|
||||||
|
break;
|
||||||
|
case RAISE:
|
||||||
|
toggle_lower_raise_layer(record->event.pressed, _RAISE, _LOWER, _RAISE);
|
||||||
|
break;
|
||||||
|
case RAI_E:
|
||||||
|
toggle_lower_raise_layer(record->event.pressed, _RAI_E, _LOW_E, _RAI_E);
|
||||||
|
break;
|
||||||
|
case ADJUST:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
RGBLIGHT(14);
|
||||||
|
layer_on(_ADJUST);
|
||||||
|
} else {
|
||||||
|
RGBLIGHT(RGB_current_mode);
|
||||||
|
layer_off(_ADJUST);
|
||||||
|
}
|
||||||
|
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 RGB_MOD:
|
||||||
|
#ifdef RGBLIGHT_ENABLE
|
||||||
|
if (record->event.pressed) {
|
||||||
|
rgblight_mode(RGB_current_mode);
|
||||||
|
rgblight_step();
|
||||||
|
RGB_current_mode = rgblight_config.mode;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
break;
|
||||||
|
case EISU:
|
||||||
|
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 KANA_ENABLE
|
||||||
|
case KANA:
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
case RGBRST:
|
||||||
|
#ifdef RGBLIGHT_ENABLE
|
||||||
|
if (record->event.pressed) {
|
||||||
|
eeconfig_update_rgblight_default();
|
||||||
|
rgblight_enable();
|
||||||
|
RGB_current_mode = rgblight_config.mode;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
startup_user();
|
||||||
|
#endif
|
||||||
|
#ifdef RGBLIGHT_ENABLE
|
||||||
|
RGB_current_mode = rgblight_config.mode;
|
||||||
|
#endif
|
||||||
|
//SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h
|
||||||
|
#ifdef SSD1306OLED
|
||||||
|
TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000));
|
||||||
|
iota_gfx_init(!has_usb()); // turns on the display
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h
|
//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h
|
||||||
#ifdef SSD1306OLED
|
#ifdef SSD1306OLED
|
||||||
@@ -441,7 +453,7 @@ void matrix_scan_user(void) {
|
|||||||
iota_gfx_task(); // this is what updates the display continuously
|
iota_gfx_task(); // this is what updates the display continuously
|
||||||
}
|
}
|
||||||
|
|
||||||
void matrix_update(struct CharacterMatrix *dest,
|
inline void matrix_update(struct CharacterMatrix *dest,
|
||||||
const struct CharacterMatrix *source) {
|
const struct CharacterMatrix *source) {
|
||||||
if (memcmp(dest->display, source->display, sizeof(dest->display))) {
|
if (memcmp(dest->display, source->display, sizeof(dest->display))) {
|
||||||
memcpy(dest->display, source->display, sizeof(dest->display));
|
memcpy(dest->display, source->display, sizeof(dest->display));
|
||||||
@@ -459,76 +471,62 @@ void matrix_update(struct CharacterMatrix *dest,
|
|||||||
#define L_RAI_E (1<<_RAI_E)
|
#define L_RAI_E (1<<_RAI_E)
|
||||||
#define L_ADJUST_TRIE (L_ADJUST|L_RAI_E|L_LOW_E)
|
#define L_ADJUST_TRIE (L_ADJUST|L_RAI_E|L_LOW_E)
|
||||||
|
|
||||||
static void render_logo(struct CharacterMatrix *matrix) {
|
const char helix_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};
|
||||||
|
inline void render_logo(struct CharacterMatrix *matrix) {
|
||||||
|
|
||||||
static char logo[]={
|
matrix_write(matrix, helix_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"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char mac_win_logo[][2][3]={{{0x95,0x96,0},{0xb5,0xb6,0}},{{0x97,0x98,0},{0xb7,0xb8,0}}};
|
||||||
|
inline void render_status(struct CharacterMatrix *matrix) {
|
||||||
void render_status(struct CharacterMatrix *matrix) {
|
|
||||||
|
|
||||||
// Render to mode icon
|
// 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){
|
if(keymap_config.swap_lalt_lgui==false){
|
||||||
matrix_write(matrix, logo[0][0]);
|
matrix_write(matrix, mac_win_logo[0][0]);
|
||||||
matrix_write_P(matrix, PSTR("\n"));
|
matrix_write_P(matrix, PSTR("\n"));
|
||||||
matrix_write(matrix, logo[0][1]);
|
matrix_write(matrix, mac_win_logo[0][1]);
|
||||||
} else {
|
} else {
|
||||||
matrix_write(matrix, logo[1][0]);
|
matrix_write(matrix, mac_win_logo[1][0]);
|
||||||
matrix_write_P(matrix, PSTR("\n"));
|
matrix_write_P(matrix, PSTR("\n"));
|
||||||
matrix_write(matrix, logo[1][1]);
|
matrix_write(matrix, mac_win_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
|
// 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[16];
|
char buf[20];
|
||||||
matrix_write_P(matrix, PSTR("\nLayer: "));
|
matrix_write_P(matrix, PSTR("\nLayer: "));
|
||||||
switch (layer_state) {
|
switch (layer_state) {
|
||||||
case L_BASE:
|
case L_BASE:
|
||||||
if (default_layer_state == (1UL<<_BAS_E)) {
|
matrix_write_P(matrix, default_layer_state == (1UL<<_BAS_E) ? PSTR("BaseEx") : PSTR("Base"));
|
||||||
matrix_write_P(matrix, PSTR("Base_Ex"));
|
break;
|
||||||
} else {
|
case L_RAISE:
|
||||||
matrix_write_P(matrix, PSTR("Base"));
|
matrix_write_P(matrix, PSTR("Raise"));
|
||||||
}
|
break;
|
||||||
break;
|
case L_RAI_E:
|
||||||
case L_RAISE:
|
matrix_write_P(matrix, PSTR("RaiseEx"));
|
||||||
matrix_write_P(matrix, PSTR("Raise"));
|
break;
|
||||||
break;
|
case L_LOWER:
|
||||||
case L_RAI_E:
|
matrix_write_P(matrix, PSTR("Lower"));
|
||||||
matrix_write_P(matrix, PSTR("Raise_Ex"));
|
break;
|
||||||
break;
|
case L_LOW_E:
|
||||||
case L_LOWER:
|
matrix_write_P(matrix, PSTR("LowerEx"));
|
||||||
matrix_write_P(matrix, PSTR("Lower"));
|
break;
|
||||||
break;
|
case L_ADJUST:
|
||||||
case L_LOW_E:
|
case L_ADJUST_TRI:
|
||||||
matrix_write_P(matrix, PSTR("Lower_Ex"));
|
case L_ADJUST_TRIE:
|
||||||
break;
|
matrix_write_P(matrix, PSTR("Adjust"));
|
||||||
case L_ADJUST:
|
break;
|
||||||
case L_ADJUST_TRI:
|
default:
|
||||||
case L_ADJUST_TRIE:
|
snprintf(buf, sizeof(buf), "%d", (short)layer_state);
|
||||||
matrix_write_P(matrix, PSTR("Adjust"));
|
matrix_write(matrix, buf);
|
||||||
break;
|
}
|
||||||
default:
|
|
||||||
snprintf(buf, sizeof(buf), "Undef-%d", (short)layer_state);
|
|
||||||
matrix_write(matrix, buf);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Host Keyboard LED Status
|
matrix_write(matrix, keylog);
|
||||||
char led[32];
|
|
||||||
snprintf(led, sizeof(led), "\n%s %s %s",
|
|
||||||
(host_keyboard_leds() & (1<<USB_LED_NUM_LOCK)) ? "NUMLOCK" : " ",
|
|
||||||
(host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) ? "CAPS" : " ",
|
|
||||||
(host_keyboard_leds() & (1<<USB_LED_SCROLL_LOCK)) ? "SCLK" : " ");
|
|
||||||
matrix_write(matrix, led);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void iota_gfx_task_user(void) {
|
void iota_gfx_task_user(void) {
|
||||||
struct CharacterMatrix matrix;
|
struct CharacterMatrix matrix;
|
||||||
|
|
||||||
|
|||||||
@@ -61,9 +61,9 @@ Raise Layer
|
|||||||
|
|
||||||
```
|
```
|
||||||
,-----------------------------------------. ,-----------------------------------------.
|
,-----------------------------------------. ,-----------------------------------------.
|
||||||
| F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 |
|
| | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 |
|
||||||
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
| | | | | | | | | | | | Home |PageUp|
|
| | | | | | | | F12 | | | | Home |PageUp|
|
||||||
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
| | | | | | | | | | | | End |PageDn|
|
| | | | | | | | | | | | End |PageDn|
|
||||||
|------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
|------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
@@ -113,9 +113,9 @@ Raise Layer
|
|||||||
|
|
||||||
```
|
```
|
||||||
,-----------------------------------------.,-----------------------------------------.
|
,-----------------------------------------.,-----------------------------------------.
|
||||||
| F1 | F2 | F3 | F4 | F5 | F6 || F7 | F8 | F9 | F10 | F11 | F12 |
|
| | F1 | F2 | F3 | F4 | F5 || F6 | F7 | F8 | F9 | F10 | F11 |
|
||||||
|------+------+------+------+------+------||------+------+------+------+------+------|
|
|------+------+------+------+------+------||------+------+------+------+------+------|
|
||||||
| | | | | | || | | | | | |
|
| | | | | | || F12 | | | | | |
|
||||||
|------+------+------+------+------+------||------+------+------+------+------+------|
|
|------+------+------+------+------+------||------+------+------+------+------+------|
|
||||||
| | | | | | || | | | | | |
|
| | | | | | || | | | | | |
|
||||||
,------+------+------+------+------+------+------||------+------+------+------+------+------+------.
|
,------+------+------+------+------+------+------||------+------+------+------+------+------+------.
|
||||||
|
|||||||
@@ -67,9 +67,9 @@ Raiseレイヤー
|
|||||||
|
|
||||||
```
|
```
|
||||||
,-----------------------------------------. ,-----------------------------------------.
|
,-----------------------------------------. ,-----------------------------------------.
|
||||||
| F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 |
|
| | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 |
|
||||||
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
| | | | | | | | | | | | Home |PageUp|
|
| | | | | | | | F12 | | | | Home |PageUp|
|
||||||
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
| | | | | | | | | | | | End |PageDn|
|
| | | | | | | | | | | | End |PageDn|
|
||||||
|------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
|------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
@@ -129,9 +129,9 @@ Raiseレイヤー
|
|||||||
|
|
||||||
```
|
```
|
||||||
,-----------------------------------------.,-----------------------------------------.
|
,-----------------------------------------.,-----------------------------------------.
|
||||||
| F1 | F2 | F3 | F4 | F5 | F6 || F7 | F8 | F9 | F10 | F11 | F12 |
|
| | F1 | F2 | F3 | F4 | F5 || F6 | F7 | F8 | F9 | F10 | F11 |
|
||||||
|------+------+------+------+------+------||------+------+------+------+------+------|
|
|------+------+------+------+------+------||------+------+------+------+------+------|
|
||||||
| | | | | | || | | | | | |
|
| | | | | | || F12 | | | | | |
|
||||||
|------+------+------+------+------+------||------+------+------+------+------+------|
|
|------+------+------+------+------+------||------+------+------+------+------+------|
|
||||||
| | | | | | || | | | | | |
|
| | | | | | || | | | | | |
|
||||||
,------+------+------+------+------+------+------||------+------+------+------+------+------+------.
|
,------+------+------+------+------+------+------||------+------+------+------+------+------+------.
|
||||||
|
|||||||
@@ -21,8 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#ifndef CONFIG_USER_H
|
#ifndef CONFIG_USER_H
|
||||||
#define CONFIG_USER_H
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
#include "../../config.h"
|
|
||||||
|
|
||||||
#undef TAPPING_TERM
|
#undef TAPPING_TERM
|
||||||
#define TAPPING_TERM 200
|
#define TAPPING_TERM 200
|
||||||
#define ONESHOT_TAP_TOGGLE 5 /* Tapping this number of times holds the key until tapped this number of times again. */
|
#define ONESHOT_TAP_TOGGLE 5 /* Tapping this number of times holds the key until tapped this number of times again. */
|
||||||
|
|||||||
@@ -21,8 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#ifndef CONFIG_USER_H
|
#ifndef CONFIG_USER_H
|
||||||
#define CONFIG_USER_H
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
#include "../../config.h"
|
|
||||||
|
|
||||||
// place overrides here
|
// place overrides here
|
||||||
|
|
||||||
#endif /* CONFIG_USER_H */
|
#endif /* CONFIG_USER_H */
|
||||||
@@ -30,7 +30,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#include "matrix.h"
|
#include "matrix.h"
|
||||||
#include "split_util.h"
|
#include "split_util.h"
|
||||||
#include "pro_micro.h"
|
#include "pro_micro.h"
|
||||||
#include "config.h"
|
|
||||||
|
|
||||||
#ifdef USE_MATRIX_I2C
|
#ifdef USE_MATRIX_I2C
|
||||||
# include "i2c.h"
|
# include "i2c.h"
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
#ifndef SOFT_SERIAL_CONFIG_H
|
||||||
|
#define SOFT_SERIAL_CONFIG_H
|
||||||
|
|
||||||
|
/* 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 SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2
|
||||||
|
#define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2
|
||||||
|
|
||||||
|
//// #error rev2 serial config
|
||||||
|
|
||||||
|
#endif /* SOFT_SERIAL_CONFIG_H */
|
||||||
@@ -7,7 +7,6 @@
|
|||||||
#include "split_util.h"
|
#include "split_util.h"
|
||||||
#include "matrix.h"
|
#include "matrix.h"
|
||||||
#include "keyboard.h"
|
#include "keyboard.h"
|
||||||
#include "config.h"
|
|
||||||
|
|
||||||
#ifdef USE_MATRIX_I2C
|
#ifdef USE_MATRIX_I2C
|
||||||
# include "i2c.h"
|
# include "i2c.h"
|
||||||
|
|||||||
@@ -110,16 +110,18 @@ void serial_master_init(void) {
|
|||||||
void serial_slave_init(void) {
|
void serial_slave_init(void) {
|
||||||
serial_input_with_pullup();
|
serial_input_with_pullup();
|
||||||
|
|
||||||
#ifndef USE_SERIAL_PD2
|
#if SERIAL_PIN_MASK == _BV(PD0)
|
||||||
// Enable INT0
|
// Enable INT0
|
||||||
EIMSK |= _BV(INT0);
|
EIMSK |= _BV(INT0);
|
||||||
// Trigger on falling edge of INT0
|
// Trigger on falling edge of INT0
|
||||||
EICRA &= ~(_BV(ISC00) | _BV(ISC01));
|
EICRA &= ~(_BV(ISC00) | _BV(ISC01));
|
||||||
#else
|
#elif SERIAL_PIN_MASK == _BV(PD2)
|
||||||
// Enable INT2
|
// Enable INT2
|
||||||
EIMSK |= _BV(INT2);
|
EIMSK |= _BV(INT2);
|
||||||
// Trigger on falling edge of INT2
|
// Trigger on falling edge of INT2
|
||||||
EICRA &= ~(_BV(ISC20) | _BV(ISC21));
|
EICRA &= ~(_BV(ISC20) | _BV(ISC21));
|
||||||
|
#else
|
||||||
|
#error unknown SERIAL_PIN_MASK value
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+14
-23
@@ -1,28 +1,19 @@
|
|||||||
#ifndef MY_SERIAL_H
|
#ifndef SOFT_SERIAL_H
|
||||||
#define MY_SERIAL_H
|
#define SOFT_SERIAL_H
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
/* TODO: some defines for interrupt setup */
|
// ////////////////////////////////////////////
|
||||||
#define SERIAL_PIN_DDR DDRD
|
// Need Soft Serial defines in serial_config.h
|
||||||
#define SERIAL_PIN_PORT PORTD
|
// ////////////////////////////////////////////
|
||||||
#define SERIAL_PIN_INPUT PIND
|
// ex.
|
||||||
|
// #define SERIAL_PIN_DDR DDRD
|
||||||
#ifndef USE_SERIAL_PD2
|
// #define SERIAL_PIN_PORT PORTD
|
||||||
#define SERIAL_PIN_MASK _BV(PD0)
|
// #define SERIAL_PIN_INPUT PIND
|
||||||
#define SERIAL_PIN_INTERRUPT INT0_vect
|
// #define SERIAL_PIN_MASK _BV(PD?) ?=0,2
|
||||||
#else
|
// #define SERIAL_PIN_INTERRUPT INT?_vect ?=0,2
|
||||||
#define SERIAL_PIN_MASK _BV(PD2)
|
// #define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2
|
||||||
#define SERIAL_PIN_INTERRUPT INT2_vect
|
// #define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2
|
||||||
#endif
|
|
||||||
|
|
||||||
#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2
|
|
||||||
#ifdef KEYBOARD_helix_rev1
|
|
||||||
#define SERIAL_MASTER_BUFFER_LENGTH 1
|
|
||||||
#else
|
|
||||||
#define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Buffers for master - slave communication
|
// Buffers for master - slave communication
|
||||||
extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH];
|
extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH];
|
||||||
@@ -33,4 +24,4 @@ void serial_slave_init(void);
|
|||||||
int serial_update_buffers(void);
|
int serial_update_buffers(void);
|
||||||
bool serial_slave_data_corrupt(void);
|
bool serial_slave_data_corrupt(void);
|
||||||
|
|
||||||
#endif
|
#endif /* SOFT_SERIAL_H */
|
||||||
@@ -4,7 +4,6 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "pincontrol.h"
|
#include "pincontrol.h"
|
||||||
#include "config.h"
|
|
||||||
|
|
||||||
enum ssd1306_cmds {
|
enum ssd1306_cmds {
|
||||||
DisplayOff = 0xAE,
|
DisplayOff = 0xAE,
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
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_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_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(HHKB),
|
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(HHKB),
|
||||||
KC_LGUI, KC_LALT, /* */ KC_SPC, KC_RALT, KC_RGUI),
|
KC_LALT, KC_LGUI, /* */ KC_SPC, KC_RGUI, KC_RALT),
|
||||||
|
|
||||||
/* Layer HHKB: HHKB mode (HHKB Fn)
|
/* Layer HHKB: HHKB mode (HHKB Fn)
|
||||||
|------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----|
|
|------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----|
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 Danny Nguyen <danny@keeb.io>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef CONFIG_USER_H
|
||||||
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
#define USE_SERIAL
|
||||||
|
|
||||||
|
#define MASTER_LEFT
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,125 @@
|
|||||||
|
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
extern keymap_config_t keymap_config;
|
||||||
|
|
||||||
|
#define _QWERTY 0
|
||||||
|
#define _LOWER 1
|
||||||
|
#define _RAISE 2
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
QWERTY = SAFE_RANGE,
|
||||||
|
LOWER,
|
||||||
|
RAISE,
|
||||||
|
};
|
||||||
|
|
||||||
|
#define KC_ KC_TRNS
|
||||||
|
#define _______ KC_TRNS
|
||||||
|
|
||||||
|
#define KC_LOWR LOWER
|
||||||
|
#define KC_RASE RAISE
|
||||||
|
#define KC_RST RESET
|
||||||
|
#define KC_DBUG DEBUG
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
[_QWERTY] = LAYOUT_kc(
|
||||||
|
/*
|
||||||
|
* ,-----+-----+-----+-----+-----+-----+ ,-----+-----+-----+-----+-----+-----+
|
||||||
|
* | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ` |
|
||||||
|
* |-----+-----+-----+-----+-----+-----+ +-----+-----+-----+-----+-----+-----+
|
||||||
|
* | TAB | Q | W | E | R | T | | Y | U | I | O | P | BSPC|
|
||||||
|
* +-----+-----+-----+-----+-----+-----+ +-----+-----+-----+-----+-----+-----+
|
||||||
|
* | LCTL| A | S | D | F | G | | H | J | K | L | ; | ' |
|
||||||
|
* +-----+-----+-----+-----+-----+-----+-----. ,-----+-----+-----+-----+-----+-----+-----+
|
||||||
|
* | LSFT| Z | X | C | V | B | / \ | N | M | , | . | / | RSFT|
|
||||||
|
* +-----+-----+-----+--+--+-----+-----+ SPC/ \ ENT+-----+-----+--+--+-----+-----+-----+
|
||||||
|
* \ LGUI| LOWR| / \ | RASE| LALT/
|
||||||
|
* `-----+-----+-----' `-----+-----+----'
|
||||||
|
*/
|
||||||
|
ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , GRV,
|
||||||
|
TAB , Q , W , E , R , T , Y , U , I , O , P ,BSPC,
|
||||||
|
LCTL, A , S , D , F , G , H , J , K , L ,SCLN,QUOT,
|
||||||
|
LSFT, Z , X , C , V , B , , , N , M ,COMM,DOT ,SLSH,RSFT,
|
||||||
|
LGUI,LOWR, SPC , ENT ,RASE,LALT
|
||||||
|
),
|
||||||
|
|
||||||
|
[_LOWER] = LAYOUT_kc(
|
||||||
|
/*
|
||||||
|
* ,-----+-----+-----+-----+-----+-----+ ,-----+-----+-----+-----+-----+-----+
|
||||||
|
* | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | BSPC|
|
||||||
|
* |-----+-----+-----+-----+-----+-----+ +-----+-----+-----+-----+-----+-----+
|
||||||
|
* | RST | 1 | 2 | 3 | 5 | 5 | | 6 | 7 | 8 | 9 | 0 | |
|
||||||
|
* +-----+-----+-----+-----+-----+-----+ +-----+-----+-----+-----+-----+-----+
|
||||||
|
* | DEL | | LEFT| RGHT| UP | [ | | ] | 4 | 5 | 6 | + | | |
|
||||||
|
* +-----+-----+-----+-----+-----+-----+-----. ,-----+-----+-----+-----+-----+-----+-----+
|
||||||
|
* | | | | | DOWN| { | / \ | } | 1 | 2 | 3 | - | |
|
||||||
|
* +-----+-----+-----+--+--+-----+-----+ DEL/ \ DEL+-----+-----+--+--+-----+-----+-----+
|
||||||
|
* \ | | / \ | | 0 /
|
||||||
|
* `-----+-----+-----' `-----+-----+----'
|
||||||
|
*/
|
||||||
|
TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSPC,
|
||||||
|
RST , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , ,
|
||||||
|
DEL , ,LEFT,RGHT, UP ,LBRC, RBRC, P4 , P5 , P6 ,PLUS,PIPE,
|
||||||
|
, , , ,DOWN,LCBR, , ,RCBR, P1 , P2 , P3 ,MINS, ,
|
||||||
|
, ,DEL , DEL , , P0
|
||||||
|
),
|
||||||
|
|
||||||
|
[_RAISE] = LAYOUT_kc(
|
||||||
|
/*
|
||||||
|
* ,-----+-----+-----+-----+-----+-----+ ,-----+-----+-----+-----+-----+-----+
|
||||||
|
* | F12 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 |
|
||||||
|
* |-----+-----+-----+-----+-----+-----+ +-----+-----+-----+-----+-----+-----+
|
||||||
|
* | | ! | @ | # | $ | % | | ^ | & | * | ( | ) | |
|
||||||
|
* +-----+-----+-----+-----+-----+-----+ +-----+-----+-----+-----+-----+-----+
|
||||||
|
* | | Prev| Next| Vol+| PgUp| _ | | = | Home| | | + | \ |
|
||||||
|
* +-----+-----+-----+-----+-----+-----+-----. ,-----+-----+-----+-----+-----+-----+-----+
|
||||||
|
* | Mute| Stop| Play| Vol-| PgDn| - | / \ | + | End | | | |Debug|
|
||||||
|
* +-----+-----+-----+--+--+-----+-----+ / \ +-----+-----+--+--+-----+-----+-----+
|
||||||
|
* \ | | / \ | | 0 /
|
||||||
|
* `-----+-----+-----' `-----+-----+----'
|
||||||
|
*/
|
||||||
|
F12 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,
|
||||||
|
,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN, ,
|
||||||
|
,MPRV,MNXT,VOLU,PGUP,UNDS, EQL ,HOME, , , ,BSLS,
|
||||||
|
MUTE,MSTP,MPLY,VOLD,PGDN,MINS, , ,PLUS,END , , , ,DBUG,
|
||||||
|
, , , , ,
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
|
void persistent_default_layer_set(uint16_t default_layer) {
|
||||||
|
eeconfig_update_default_layer(default_layer);
|
||||||
|
default_layer_set(default_layer);
|
||||||
|
}
|
||||||
|
|
||||||
|
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 LOWER:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_LOWER);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _QWERTY);
|
||||||
|
} else {
|
||||||
|
layer_off(_LOWER);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _QWERTY);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case RAISE:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_RAISE);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _QWERTY);
|
||||||
|
} else {
|
||||||
|
layer_off(_RAISE);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _QWERTY);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
RGBLIGHT_ENABLE = no
|
||||||
|
BACKLIGHT_ENABLE = no
|
||||||
@@ -15,10 +15,7 @@ You should have received a copy of the GNU General Public License
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef CONFIG_USER_H
|
#pragma once
|
||||||
#define CONFIG_USER_H
|
|
||||||
|
|
||||||
#include "config_common.h"
|
|
||||||
|
|
||||||
/* Use I2C or Serial, not both */
|
/* Use I2C or Serial, not both */
|
||||||
|
|
||||||
@@ -52,6 +49,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#endif //RGBLIGHT_ENABLE
|
#endif //RGBLIGHT_ENABLE
|
||||||
#endif //AUDIO_ENABLE
|
#endif //AUDIO_ENABLE
|
||||||
|
|
||||||
|
#define QMK_ESC_OUTPUT F6 // usually COL
|
||||||
|
#define QMK_ESC_INPUT D7 // usually ROW
|
||||||
|
#define QMK_LED B0
|
||||||
|
#define QMK_SPEAKER C6
|
||||||
|
|
||||||
#undef PRODUCT
|
#undef PRODUCT
|
||||||
#ifdef KEYBOARD_iris_rev2
|
#ifdef KEYBOARD_iris_rev2
|
||||||
@@ -64,7 +65,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define CTRL_LED1 7
|
#define CTRL_LED1 7
|
||||||
#define CTRL_LED2 10
|
#define CTRL_LED2 10
|
||||||
|
|
||||||
#define GUI_LED1 8
|
#define ALT_LED1 8
|
||||||
#define GUI_LED2 9
|
#define GUI_LED1 9
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -43,47 +43,47 @@ 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_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, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
|
||||||
[_LOWER] = LAYOUT_wrapper(
|
[_LOWER] = LAYOUT_wrapper(
|
||||||
_______, _________________FUNC_LEFT_________________, _________________FUNC_RIGHT________________, _______,
|
_______, _________________FUNC_LEFT_________________, _________________FUNC_RIGHT________________, _______,
|
||||||
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______,
|
KC_TILD, _________________LOWER_L1__________________, _________________LOWER_R1__________________, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
|
_______, ___________________BLANK___________________, _________________LOWER_R2__________________, KC_PIPE,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______,
|
_______, ___________________BLANK___________________, _______, _______, _________________LOWER_R3__________________, _______,
|
||||||
_______, _______, _______, _______, _______, _______
|
_______, _______, _______, _______, _______, _______
|
||||||
),
|
),
|
||||||
|
|
||||||
[_RAISE] = LAYOUT_wrapper(
|
[_RAISE] = LAYOUT_wrapper(
|
||||||
_______, _________________FUNC_LEFT_________________, _________________FUNC_RIGHT________________, _______,
|
_______, _________________FUNC_LEFT_________________, _________________FUNC_RIGHT________________, _______,
|
||||||
KC_GRV, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, _______,
|
KC_GRV, _________________RAISE_L1__________________, _________________RAISE_R1__________________, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
|
_______, _________________RAISE_L2__________________, _________________RAISE_R2__________________, KC_BSLS,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______,
|
_______, _________________RAISE_L3__________________, _______, _______, _________________RAISE_R3__________________, _______,
|
||||||
_______, _______, _______, _______, _______, _______
|
_______, _______, _______, _______, _______, _______
|
||||||
),
|
),
|
||||||
|
|
||||||
[_ADJUST] = LAYOUT_wrapper(
|
[_ADJUST] = LAYOUT_wrapper(
|
||||||
KC_MAKE, _______, _______, _______, _______, _______, KC_SEC1, KC_SEC2, KC_SEC3, KC_SEC4, KC_SEC5, KC_RST,
|
KC_MAKE, _______, _______, _______, _______, _______, _________________ADJUST_R1_________________, KC_RST,
|
||||||
VRSN, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_TOG, KC_NUKE, _______, _______, _______, _______, EPRM,
|
VRSN, _________________ADJUST_L1_________________, KC_NUKE, _______, _______, _______, _______, EPRM,
|
||||||
_______, _______, CK_TOGG, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, WORKMAN, TG(_MODS),
|
_______, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, TG_MODS,
|
||||||
_______, RGB_SMOD,RGB_HUD, RGB_SAD, RGB_VAD, KC_RGB_T,_______, _______, MG_NKRO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY,
|
_______, _________________ADJUST_L3_________________, TG_GAME, _______, _________________ADJUST_R3_________________, KC_MPLY,
|
||||||
_______, _______, _______, _______, _______, _______
|
_______, _______, _______, _______, _______, _______
|
||||||
)
|
)
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
bool indicator_is_this_led_used(uint8_t index) {
|
void matrix_init_keymap(void) {
|
||||||
switch (index) {
|
DDRD &= ~(1<<5);
|
||||||
#ifdef INDICATOR_LIGHTS
|
PORTD &= ~(1<<5);
|
||||||
case SHFT_LED1:
|
|
||||||
case SHFT_LED2:
|
DDRB &= ~(1<<0);
|
||||||
case CTRL_LED1:
|
PORTB &= ~(1<<0);
|
||||||
case CTRL_LED2:
|
|
||||||
case GUI_LED1:
|
|
||||||
case GUI_LED2:
|
|
||||||
return true;
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
default:
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -13,3 +13,5 @@ SWAP_HANDS_ENABLE = no
|
|||||||
INDICATOR_LIGHTS = yes
|
INDICATOR_LIGHTS = yes
|
||||||
MACROS_ENABLED = no
|
MACROS_ENABLED = no
|
||||||
RGBLIGHT_TWINKLE = yes
|
RGBLIGHT_TWINKLE = yes
|
||||||
|
|
||||||
|
BOOTLOADER = qmk-dfu
|
||||||
@@ -52,6 +52,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#endif //RGBLIGHT_ENABLE
|
#endif //RGBLIGHT_ENABLE
|
||||||
#endif //AUDIO_ENABLE
|
#endif //AUDIO_ENABLE
|
||||||
|
|
||||||
|
#define QMK_ESC_OUTPUT F6 // usually COL
|
||||||
|
#define QMK_ESC_INPUT D7 // usually ROW
|
||||||
|
#define QMK_LED B0
|
||||||
|
#define QMK_SPEAKER C6
|
||||||
|
|
||||||
#undef PRODUCT
|
#undef PRODUCT
|
||||||
#ifdef KEYBOARD_iris_rev2
|
#ifdef KEYBOARD_iris_rev2
|
||||||
@@ -64,7 +68,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define CTRL_LED1 6
|
#define CTRL_LED1 6
|
||||||
#define CTRL_LED2 9
|
#define CTRL_LED2 9
|
||||||
|
|
||||||
#define GUI_LED1 7
|
#define ALT_LED1 7
|
||||||
#define GUI_LED2 8
|
#define GUI_LED1 8
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -1,89 +1 @@
|
|||||||
|
// placeholder
|
||||||
#include QMK_KEYBOARD_H
|
|
||||||
#include "drashna.h"
|
|
||||||
|
|
||||||
#define KC_ALAP ALT_T(KC_APP)
|
|
||||||
#define KC_OSLG OSM(MOD_LGUI)
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|
||||||
|
|
||||||
[_QWERTY] = LAYOUT_wrapper(
|
|
||||||
KC_ESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS,
|
|
||||||
KC_TAB , _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, KC_BSLS,
|
|
||||||
KC_CCCV, _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, KC_QUOT,
|
|
||||||
KC_MLSF, _________________QWERTY_L3_________________, KC_ALAP, KC_OSLG, _________________QWERTY_R3_________________, KC_MRSF,
|
|
||||||
LT(_LOWER,KC_GRV), KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE
|
|
||||||
),
|
|
||||||
[_COLEMAK] = LAYOUT_wrapper(
|
|
||||||
KC_ESC , ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS,
|
|
||||||
KC_TAB , _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, KC_BSLS,
|
|
||||||
KC_CCCV, _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, KC_QUOT,
|
|
||||||
KC_MLSF, _________________COLEMAK_L3________________, KC_ALAP, KC_OSLG, _________________COLEMAK_R3________________, KC_MRSF,
|
|
||||||
LT(_LOWER,KC_GRV), KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE
|
|
||||||
),
|
|
||||||
[_DVORAK] = LAYOUT_wrapper(
|
|
||||||
KC_ESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS,
|
|
||||||
KC_TAB , _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, KC_BSLS,
|
|
||||||
KC_CCCV, _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, KC_QUOT,
|
|
||||||
KC_MLSF, _________________DVORAK_L3_________________, KC_ALAP, KC_OSLG, _________________DVORAK_R3_________________, KC_MRSF,
|
|
||||||
LT(_LOWER,KC_GRV), KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE
|
|
||||||
),
|
|
||||||
[_WORKMAN] = LAYOUT_wrapper(
|
|
||||||
KC_ESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS,
|
|
||||||
KC_TAB , _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, KC_BSLS,
|
|
||||||
KC_CCCV, _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, KC_QUOT,
|
|
||||||
KC_MLSF, _________________WORKMAN_L3________________, KC_ALAP, KC_OSLG, _________________WORKMAN_R3________________, KC_MRSF,
|
|
||||||
LT(_LOWER,KC_GRV), KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE
|
|
||||||
),
|
|
||||||
|
|
||||||
[_MODS] = LAYOUT_wrapper(
|
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
|
||||||
KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RSFT,
|
|
||||||
_______, _______, _______, _______, _______, _______
|
|
||||||
),
|
|
||||||
|
|
||||||
|
|
||||||
[_LOWER] = LAYOUT_wrapper(
|
|
||||||
_______, _________________FUNC_LEFT_________________, _________________FUNC_RIGHT________________, _______,
|
|
||||||
KC_TILD, 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, _______,
|
|
||||||
_______, _______, _______, _______, _______, _______
|
|
||||||
),
|
|
||||||
|
|
||||||
[_RAISE] = LAYOUT_wrapper(
|
|
||||||
_______, _________________FUNC_LEFT_________________, _________________FUNC_RIGHT________________, _______,
|
|
||||||
KC_GRV, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, _______,
|
|
||||||
_______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
|
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______,
|
|
||||||
_______, _______, _______, _______, _______, _______
|
|
||||||
),
|
|
||||||
|
|
||||||
[_ADJUST] = LAYOUT_wrapper(
|
|
||||||
KC_MAKE, _______, _______, _______, _______, _______, KC_SEC1, KC_SEC2, KC_SEC3, KC_SEC4, KC_SEC5, KC_RST,
|
|
||||||
VRSN, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_TOG, KC_NUKE, _______, _______, _______, _______, EPRM,
|
|
||||||
_______, _______, CK_TOGG, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, WORKMAN, TG(_MODS),
|
|
||||||
_______, RGB_SMOD,RGB_HUD, RGB_SAD, RGB_VAD, KC_RGB_T,_______, _______, MG_NKRO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY,
|
|
||||||
_______, _______, _______, _______, _______, _______
|
|
||||||
)
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
bool indicator_is_this_led_used(uint8_t index) {
|
|
||||||
switch (index) {
|
|
||||||
#ifdef INDICATOR_LIGHTS
|
|
||||||
case SHFT_LED1:
|
|
||||||
case SHFT_LED2:
|
|
||||||
case CTRL_LED1:
|
|
||||||
case CTRL_LED2:
|
|
||||||
case GUI_LED1:
|
|
||||||
case GUI_LED2:
|
|
||||||
return true;
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
default:
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -15,3 +15,7 @@ SWAP_HANDS_ENABLE = no
|
|||||||
INDICATOR_LIGHTS = yes
|
INDICATOR_LIGHTS = yes
|
||||||
MACROS_ENABLED = no
|
MACROS_ENABLED = no
|
||||||
RGBLIGHT_TWINKLE = yes
|
RGBLIGHT_TWINKLE = yes
|
||||||
|
|
||||||
|
SRC += ../drashna/keymap.c
|
||||||
|
|
||||||
|
BOOTLOADER = qmk-dfu
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 Danny Nguyen <danny@keeb.io>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef CONFIG_USER_H
|
||||||
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* 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 12
|
||||||
|
#define RGBLIGHT_HUE_STEP 8
|
||||||
|
#define RGBLIGHT_SAT_STEP 8
|
||||||
|
#define RGBLIGHT_VAL_STEP 8
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,139 @@
|
|||||||
|
#include "iris.h"
|
||||||
|
#include "action_layer.h"
|
||||||
|
#include "eeconfig.h"
|
||||||
|
|
||||||
|
extern keymap_config_t keymap_config;
|
||||||
|
|
||||||
|
#define _QWERTY 0
|
||||||
|
#define _LOWER 1
|
||||||
|
#define _RAISE 2
|
||||||
|
#define _ADJUST 16
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
QWERTY = SAFE_RANGE,
|
||||||
|
LOWER,
|
||||||
|
RAISE,
|
||||||
|
ADJUST,
|
||||||
|
};
|
||||||
|
|
||||||
|
#define KC_ KC_TRNS
|
||||||
|
#define _______ KC_TRNS
|
||||||
|
|
||||||
|
#define KC_LOWR LOWER
|
||||||
|
#define KC_RASE RAISE
|
||||||
|
#define KC_RST RESET
|
||||||
|
#define KC_BL_S BL_STEP
|
||||||
|
#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] = {
|
||||||
|
|
||||||
|
[_QWERTY] = LAYOUT_kc(
|
||||||
|
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||||
|
ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC,
|
||||||
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||||
|
TAB , ,COMM,DOT , P , Y , F , G , C , R , L ,DEL ,
|
||||||
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||||
|
LSFT, A , O , E , U , I , D , H , T , N , S ,INS ,
|
||||||
|
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
|
||||||
|
LCTL,QUOT, Q , J , K , X ,HOME, END , B , M , W , V , Z ,RSFT,
|
||||||
|
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
|
||||||
|
LGUI,LOWR,ENT , SPC ,RASE,LALT
|
||||||
|
// `----+----+----' `----+----+----'
|
||||||
|
),
|
||||||
|
|
||||||
|
[_LOWER] = LAYOUT_kc(
|
||||||
|
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||||
|
TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSPC,
|
||||||
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||||
|
RST , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , ,
|
||||||
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||||
|
DEL , ,LEFT,RGHT, UP ,LBRC, RBRC, P4 , P5 , P6 ,PLUS,PIPE,
|
||||||
|
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
|
||||||
|
BL_S, , , ,DOWN,LCBR,LPRN, RPRN,RCBR, P1 , P2 , P3 ,MINS, ,
|
||||||
|
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
|
||||||
|
, ,DEL , DEL , , P0
|
||||||
|
// `----+----+----' `----+----+----'
|
||||||
|
),
|
||||||
|
|
||||||
|
[_RAISE] = LAYOUT_kc(
|
||||||
|
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||||
|
F12 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,
|
||||||
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||||
|
,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN, ,
|
||||||
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||||
|
,MPRV,MNXT,VOLU,PGUP,UNDS, EQL ,HOME, , , ,BSLS,
|
||||||
|
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
|
||||||
|
MUTE,MSTP,MPLY,VOLD,PGDN,MINS, , ,PLUS,END , , , , ,
|
||||||
|
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
|
||||||
|
, , , , ,
|
||||||
|
// `----+----+----' `----+----+----'
|
||||||
|
),
|
||||||
|
|
||||||
|
[_ADJUST] = LAYOUT_kc(
|
||||||
|
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||||
|
, , , , , , , , , , , ,
|
||||||
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||||
|
RTOG,RMOD,RHUI,RSAI,RVAI, , , , , , , ,
|
||||||
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||||
|
,DBUG,RHUD,RSAD,RVAD, , , , , , , ,
|
||||||
|
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
|
||||||
|
BL_S,RST , , , , , , , , , , , , ,
|
||||||
|
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
|
||||||
|
, , , , ,
|
||||||
|
// `----+----+----' `----+----+----'
|
||||||
|
)
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
void persistent_default_layer_set(uint16_t default_layer) {
|
||||||
|
eeconfig_update_default_layer(default_layer);
|
||||||
|
default_layer_set(default_layer);
|
||||||
|
}
|
||||||
|
|
||||||
|
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 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;
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
RGBLIGHT_ENABLE = yes
|
||||||
|
BACKLIGHT_ENABLE = yes
|
||||||
|
|
||||||
|
ifndef QUANTUM_DIR
|
||||||
|
include ../../../../Makefile
|
||||||
|
endif
|
||||||
@@ -1,10 +1,11 @@
|
|||||||
JC65
|
# JC65
|
||||||
===
|
|
||||||
|
|
||||||

|

|
||||||

|

|
||||||
|
|
||||||
The JC65 PCB actually has two revisions: A QMK native version, and a PS2AVRGB version. Jchan offered both PCBs as options during the M65-A Round 1 group buy and are now currently available on [keyclack.com](https://keyclack.com/)
|
The JC65 is the PCB for the Rama M65-A sold through [keyclack.com](https://keyclack.com/). There are two revisions available, a native QMK powered PCB (v32u4) and a PS2AVRGB PCB (v32a), both are available on keyclack.
|
||||||
|
|
||||||
|
QMK is supported for both variants.
|
||||||
|
|
||||||
Make example native QMK version (after setting up your build environment):
|
Make example native QMK version (after setting up your build environment):
|
||||||
|
|
||||||
|
|||||||
@@ -5,13 +5,15 @@ JC65 ps2avrGB
|
|||||||
|
|
||||||
A 65% keyboard with RGB
|
A 65% keyboard with RGB
|
||||||
|
|
||||||
Keyboard Maintainer: [Jason Barnachea](https://github.com/nautxx)
|
Keyboard Maintainer: [Jason Barnachea](https://github.com/nautxx)
|
||||||
|
|
||||||
Hardware Supported: JC65 rev.ps2avrgb
|
Hardware Supported: JC65 rev.ps2avrgb
|
||||||
|
|
||||||
Hardware Availability: [keyclack.com](https://keyclack.com/)
|
Hardware Availability: [keyclack.com](https://keyclack.com/)
|
||||||
|
|
||||||
The JC65 PCB actually has two revisions: A QMK native version, and a PS2AVRGB version. Jchan offered both PCBs as options during the M65-A Round 1 group buy, and were also available choices for the 65% acrylic case group buy. In the near future both PCB versions should be available from keyclack.com when the storefront part opens.
|
The JC65 PCB actually has two revisions: A QMK native version, and a PS2AVRGB version. Jchan offered both PCBs as options during the M65-A Round 1 group buy, and were also available choices for the 65% acrylic case group buy.
|
||||||
|
|
||||||
|
Please note that there have been issues with QMK and PS2AVRGB boards. Random shutdowns and overheating have been reported. As of now, the cause has not been discovered.
|
||||||
|
|
||||||
These docs are for the PS2AVRGB version of the PCB. More info on qmk.fm
|
These docs are for the PS2AVRGB version of the PCB. More info on qmk.fm
|
||||||
|
|
||||||
@@ -23,4 +25,8 @@ Flash example for this keyboard:
|
|||||||
|
|
||||||
bootloadHID -r jc65_v32a_default.hex
|
bootloadHID -r jc65_v32a_default.hex
|
||||||
|
|
||||||
|
Flashing on Windows can be accomplished by downloading [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash)
|
||||||
|
|
||||||
|
To put the PS2AVRGB board into reset, hold down the left control key while plugging in the keyboard.
|
||||||
|
|
||||||
See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information.
|
See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information.
|
||||||
@@ -3,13 +3,13 @@ JC65
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
The JC65 PCB actually has two revisions: A QMK native version, and a PS2AVRGB version. Jchan offered both PCBs as options during the M65-A Round 1 group buy, and were also available choices for the 65% acrylic case group buy. In the near future both PCB versions should be available from keyclack.com when the storefront part opens.
|
The JC65 PCB actually has two revisions: A QMK native version, and a PS2AVRGB version. Jchan offered both PCBs as options during the M65-A Round 1 group buy, and were also available choices for the 65% acrylic case group buy.
|
||||||
|
|
||||||
These docs are for the QMK version of the PCB. [More info on qmk.fm](http://qmk.fm/planck/)
|
These docs are for the QMK version of the PCB. [More info on qmk.fm](http://qmk.fm/planck/)
|
||||||
|
|
||||||
Keyboard Maintainer: [Ethan Madden](https://github.com/jetpacktuxedo)
|
Keyboard Maintainer: [Ethan Madden](https://github.com/jetpacktuxedo)
|
||||||
Hardware Supported: JC65 rev.qmk
|
Hardware Supported: JC65 rev.qmk
|
||||||
Hardware Availability: [keyclack.com](https://keyclack.com/)
|
Hardware Availability: [keyclack.com](https://keyclack.com/)
|
||||||
|
|
||||||
Make example for this keyboard (after setting up your build environment):
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# AJP10304 Custom JJ40 Layout
|
# AJP10304 Custom JJ40 Layout
|
||||||
###Based on my Planck layout of the same name.
|
# Also available for the Atreus50 and Planck
|
||||||
|
|
||||||
**Note:** In the tables below where there are two characters on a key,
|
**Note:** In the tables below where there are two characters on a key,
|
||||||
the second is the output when shift is applied.
|
the second is the output when shift is applied.
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
|
|
||||||
|
|
||||||
#define _______ KC_TRNS
|
#define _______ KC_TRNS
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
@@ -23,101 +21,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
_______, _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, BL_STEP, _______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, BL_STEP, _______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
),
|
),
|
||||||
|
|
||||||
[2] = LAYOUT(
|
|
||||||
_______, M(1), M(2), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
|
||||||
),
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
|
||||||
|
|
||||||
|
|
||||||
switch (id) {
|
|
||||||
|
|
||||||
}
|
|
||||||
return MACRO_NONE;
|
|
||||||
}
|
|
||||||
|
|
||||||
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) {
|
void led_set_user(uint8_t usb_led) {
|
||||||
|
|
||||||
if (usb_led & (1 << USB_LED_NUM_LOCK)) {
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
|
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
|
||||||
DDRB |= (1 << 2); PORTB &= ~(1 << 2);
|
DDRB |= (1 << 2); PORTB &= ~(1 << 2);
|
||||||
} else {
|
} else {
|
||||||
DDRB &= ~(1 << 2); PORTB &= ~(1 << 2);
|
DDRB &= ~(1 << 2); PORTB &= ~(1 << 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if (usb_led & (1 << USB_LED_COMPOSE)) {
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if (usb_led & (1 << USB_LED_KANA)) {
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
enum function_id {
|
|
||||||
SHIFT_ESC,
|
|
||||||
};
|
|
||||||
|
|
||||||
const uint16_t PROGMEM fn_actions[] = {
|
|
||||||
[0] = ACTION_FUNCTION(SHIFT_ESC),
|
|
||||||
};
|
|
||||||
|
|
||||||
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
|
||||||
static uint8_t shift_esc_shift_mask;
|
|
||||||
switch (id) {
|
|
||||||
case SHIFT_ESC:
|
|
||||||
shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK;
|
|
||||||
if (record->event.pressed) {
|
|
||||||
if (shift_esc_shift_mask) {
|
|
||||||
add_key(KC_GRV);
|
|
||||||
send_keyboard_report();
|
|
||||||
} else {
|
|
||||||
add_key(KC_ESC);
|
|
||||||
send_keyboard_report();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (shift_esc_shift_mask) {
|
|
||||||
del_key(KC_GRV);
|
|
||||||
send_keyboard_report();
|
|
||||||
} else {
|
|
||||||
del_key(KC_ESC);
|
|
||||||
send_keyboard_report();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,7 +1,5 @@
|
|||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
|
|
||||||
|
|
||||||
#define _______ KC_TRNS
|
#define _______ KC_TRNS
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
@@ -22,101 +20,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, BL_STEP, _______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, BL_STEP, _______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
),
|
)
|
||||||
|
|
||||||
[2] = LAYOUT(
|
|
||||||
_______, M(1), M(2), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
|
||||||
)
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
|
||||||
|
|
||||||
|
|
||||||
switch (id) {
|
|
||||||
|
|
||||||
}
|
|
||||||
return MACRO_NONE;
|
|
||||||
}
|
|
||||||
|
|
||||||
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) {
|
void led_set_user(uint8_t usb_led) {
|
||||||
|
|
||||||
if (usb_led & (1 << USB_LED_NUM_LOCK)) {
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
|
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
|
||||||
DDRB |= (1 << 2); PORTB &= ~(1 << 2);
|
DDRB |= (1 << 2); PORTB &= ~(1 << 2);
|
||||||
} else {
|
} else {
|
||||||
DDRB &= ~(1 << 2); PORTB &= ~(1 << 2);
|
DDRB &= ~(1 << 2); PORTB &= ~(1 << 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if (usb_led & (1 << USB_LED_COMPOSE)) {
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if (usb_led & (1 << USB_LED_KANA)) {
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
enum function_id {
|
|
||||||
SHIFT_ESC,
|
|
||||||
};
|
|
||||||
|
|
||||||
const uint16_t PROGMEM fn_actions[] = {
|
|
||||||
[0] = ACTION_FUNCTION(SHIFT_ESC),
|
|
||||||
};
|
|
||||||
|
|
||||||
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
|
||||||
static uint8_t shift_esc_shift_mask;
|
|
||||||
switch (id) {
|
|
||||||
case SHIFT_ESC:
|
|
||||||
shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK;
|
|
||||||
if (record->event.pressed) {
|
|
||||||
if (shift_esc_shift_mask) {
|
|
||||||
add_key(KC_GRV);
|
|
||||||
send_keyboard_report();
|
|
||||||
} else {
|
|
||||||
add_key(KC_ESC);
|
|
||||||
send_keyboard_report();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (shift_esc_shift_mask) {
|
|
||||||
del_key(KC_GRV);
|
|
||||||
send_keyboard_report();
|
|
||||||
} else {
|
|
||||||
del_key(KC_ESC);
|
|
||||||
send_keyboard_report();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -13,8 +13,16 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "kbd8x.h"
|
#include "kbd8x.h"
|
||||||
|
|
||||||
|
extern inline void caps_led_off(void);
|
||||||
|
extern inline void caps_led_on(void);
|
||||||
|
extern inline void num_led_off(void);
|
||||||
|
extern inline void num_led_on(void);
|
||||||
|
extern inline void scroll_led_off(void);
|
||||||
|
extern inline void scroll_led_on(void);
|
||||||
|
|
||||||
void matrix_init_kb(void) {
|
void matrix_init_kb(void) {
|
||||||
// put your keyboard start-up code here
|
// put your keyboard start-up code here
|
||||||
// runs once when the firmware starts up
|
// runs once when the firmware starts up
|
||||||
|
|||||||
Executable
+58
@@ -0,0 +1,58 @@
|
|||||||
|
/* Copyright 2018 Maarten Dekkers <[email protected]>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#ifndef CONFIG_H
|
||||||
|
#define CONFIG_H
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xFEED
|
||||||
|
#define PRODUCT_ID 0x6050
|
||||||
|
#define DEVICE_VER 0x0104
|
||||||
|
#define MANUFACTURER Revo
|
||||||
|
#define PRODUCT KMAC Kmini
|
||||||
|
#define DESCRIPTION QMK keyboard firmware for Revo KMAC Mini
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 5
|
||||||
|
#define MATRIX_COLS 17
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Keyboard Matrix Assignments
|
||||||
|
* The KMAC uses a demultiplexer for some of the cols.
|
||||||
|
* See matrix.c for more details.
|
||||||
|
*/
|
||||||
|
#define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 }
|
||||||
|
#define MATRIX_COL_PINS { }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
|
||||||
|
#define DIODE_DIRECTION CUSTOM_MATRIX
|
||||||
|
|
||||||
|
/* number of backlight levels */
|
||||||
|
#define BACKLIGHT_LEVELS 3
|
||||||
|
// #define BACKLIGHT_PIN B7
|
||||||
|
// #define BACKLIGHT_BREATHING
|
||||||
|
|
||||||
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
|
#define DEBOUNCING_DELAY 5
|
||||||
|
|
||||||
|
/* key combination for magic key command */
|
||||||
|
#define IS_COMMAND() ( \
|
||||||
|
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||||
|
)
|
||||||
|
|
||||||
|
#endif
|
||||||
Executable
+12
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "KMAC Mini",
|
||||||
|
"url": "http://kbdmodadmin.cafe24.com/product/detail.html?product_no=12&cate_no=4&display_group=1",
|
||||||
|
"maintainer": "maartenwut",
|
||||||
|
"width": 18.25,
|
||||||
|
"height": 5,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"layout": [{"label":"F1", "x":0, "y":0}, {"label":"F2", "x":1, "y":0}, {"label":"Esc", "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":8.25, "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":"Insert", "x":17.25, "y":0}, {"label":"F3", "x":0, "y":1}, {"label":"F4", "x":1, "y":1}, {"label":"Tab", "x":2.25, "y":1, "w":1.5}, {"label":"Q", "x":3.75, "y":1}, {"label":"W", "x":4.75, "y":1}, {"label":"E", "x":5.75, "y":1}, {"label":"R", "x":6.75, "y":1}, {"label":"T", "x":7.75, "y":1}, {"label":"Y", "x":8.75, "y":1}, {"label":"U", "x":9.75, "y":1}, {"label":"I", "x":10.75, "y":1}, {"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":15.75, "y":1, "w":1.5}, {"label":"Delete", "x":17.25, "y":1}, {"label":"F5", "x":0, "y":2}, {"label":"F6", "x":1, "y":2}, {"label":"Caps Lock", "x":2.25, "y":2, "w":1.75}, {"label":"A", "x":4, "y":2}, {"label":"S", "x":5, "y":2}, {"label":"D", "x":6, "y":2}, {"label":"F", "x":7, "y":2}, {"label":"G", "x":8, "y":2}, {"label":"H", "x":9, "y":2}, {"label":"J", "x":10, "y":2}, {"label":"K", "x":11, "y":2}, {"label":"L", "x":12, "y":2}, {"label":":", "x":13, "y":2}, {"label":"\"", "x":14, "y":2}, {"label":"Enter", "x":15, "y":2, "w":2.25}, {"label":"PgUp", "x":17.25, "y":2}, {"label":"F7", "x":0, "y":3}, {"label":"F8", "x":1, "y":3}, {"label":"Shift", "x":2.25, "y":3, "w":2.25}, {"label":"Z", "x":4.5, "y":3}, {"label":"X", "x":5.5, "y":3}, {"label":"C", "x":6.5, "y":3}, {"label":"V", "x":7.5, "y":3}, {"label":"B", "x":8.5, "y":3}, {"label":"N", "x":9.5, "y":3}, {"label":"M", "x":10.5, "y":3}, {"label":"<", "x":11.5, "y":3}, {"label":">", "x":12.5, "y":3}, {"label":"?", "x":13.5, "y":3}, {"label":"Shift", "x":14.5, "y":3, "w":1.75}, {"label":"\u2191", "x":16.25, "y":3}, {"label":"PgDn", "x":17.25, "y":3}, {"label":"F9", "x":0, "y":4}, {"label":"F10", "x":1, "y":4}, {"label":"Ctrl", "x":2.25, "y":4, "w":1.5}, {"label":"GUI", "x":3.75, "y":4}, {"label":"Alt", "x":4.75, "y":4, "w":1.5}, {"x":6.25, "y":4, "w":7}, {"label":"Fn", "x":13.25, "y":4, "w":1.5}, {"label":"\u2190", "x":15.25, "y":4}, {"label":"\u2193", "x":16.25, "y":4}, {"label":"\u2192", "x":17.25, "y":4}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Executable
+57
@@ -0,0 +1,57 @@
|
|||||||
|
/* Copyright 2018 Maarten Dekkers <[email protected]>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include 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
|
||||||
|
#define _FN 1
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[_MA] = LAYOUT(
|
||||||
|
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_INS, \
|
||||||
|
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_BSLS, KC_DEL, \
|
||||||
|
KC_F5, KC_F6, 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_F7, KC_F8, 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_F9, KC_F10, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, 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, RESET, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
||||||
|
void led_set_user(uint8_t usb_led) {
|
||||||
|
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
|
||||||
|
PORTB &= ~(1<<1); // LO
|
||||||
|
} else {
|
||||||
|
PORTB |= (1<<1); // HI
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
|
||||||
|
}
|
||||||
Executable
+53
@@ -0,0 +1,53 @@
|
|||||||
|
/* Copyright 2018 Maarten Dekkers <[email protected]>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include "kmini.h"
|
||||||
|
|
||||||
|
void matrix_init_kb(void) {
|
||||||
|
// put your keyboard start-up code here
|
||||||
|
// runs once when the firmware starts up
|
||||||
|
led_init_ports();
|
||||||
|
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_init_ports(void) {
|
||||||
|
DDRB |= (1<<1); // OUT
|
||||||
|
DDRB |= (1<<2); // OUT
|
||||||
|
DDRB |= (1<<3); // OUT
|
||||||
|
}
|
||||||
|
|
||||||
|
/* LED pin configuration
|
||||||
|
* Caps Lock: Low B1
|
||||||
|
* Side1: Low B3
|
||||||
|
* Side2: Low B2
|
||||||
|
*/
|
||||||
|
void led_set_kb(uint8_t usb_led) {
|
||||||
|
led_set_user(usb_led);
|
||||||
|
}
|
||||||
|
|
||||||
Executable
+36
@@ -0,0 +1,36 @@
|
|||||||
|
/* Copyright 2018 Maarten Dekkers <[email protected]>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#ifndef KMINI_H
|
||||||
|
#define KMINI_H
|
||||||
|
#define ___ KC_NO
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#define LAYOUT( \
|
||||||
|
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \
|
||||||
|
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, \
|
||||||
|
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2F, K2G, \
|
||||||
|
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3E, K3F, K3G, \
|
||||||
|
K40, K41, K42, K43, K44, K47, K4C, K4E, K4F, K4G \
|
||||||
|
) { \
|
||||||
|
{K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G}, \
|
||||||
|
{K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G}, \
|
||||||
|
{K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, ___, K2F, K2G}, \
|
||||||
|
{K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, ___, K3E, K3F, K3G}, \
|
||||||
|
{K40, K41, K42, K43, K44, ___, ___, K47, ___, ___, ___, ___, K4C, ___, K4E, K4F, K4G}, \
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
Executable
+319
@@ -0,0 +1,319 @@
|
|||||||
|
/* Copyright 2018 Maarten Dekkers <[email protected]>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
#if defined(__AVR__)
|
||||||
|
#include <avr/io.h>
|
||||||
|
#endif
|
||||||
|
#include "wait.h"
|
||||||
|
#include "print.h"
|
||||||
|
#include "debug.h"
|
||||||
|
#include "util.h"
|
||||||
|
#include "matrix.h"
|
||||||
|
#include "timer.h"
|
||||||
|
|
||||||
|
|
||||||
|
/* Set 0 if debouncing isn't needed */
|
||||||
|
#ifndef DEBOUNCING_DELAY
|
||||||
|
# define DEBOUNCING_DELAY 5
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define COL_SHIFTER ((uint32_t)1)
|
||||||
|
|
||||||
|
static uint16_t debouncing_time;
|
||||||
|
static bool debouncing = false;
|
||||||
|
|
||||||
|
|
||||||
|
static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
|
||||||
|
|
||||||
|
/* matrix state(1:on, 0:off) */
|
||||||
|
static matrix_row_t matrix[MATRIX_ROWS];
|
||||||
|
static matrix_row_t matrix_debouncing[MATRIX_ROWS];
|
||||||
|
|
||||||
|
static void init_rows(void);
|
||||||
|
static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col);
|
||||||
|
static void unselect_cols(void);
|
||||||
|
static void select_col(uint8_t col);
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void matrix_init_user(void) {}
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void matrix_scan_user(void) {}
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void matrix_init_kb(void) {
|
||||||
|
matrix_init_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void matrix_scan_kb(void) {
|
||||||
|
matrix_scan_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
uint8_t matrix_rows(void) {
|
||||||
|
return MATRIX_ROWS;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
uint8_t matrix_cols(void) {
|
||||||
|
return MATRIX_COLS;
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_init(void) {
|
||||||
|
unselect_cols();
|
||||||
|
init_rows();
|
||||||
|
|
||||||
|
// initialize matrix state: all keys off
|
||||||
|
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
|
||||||
|
matrix[i] = 0;
|
||||||
|
matrix_debouncing[i] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
matrix_init_quantum();
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t matrix_scan(void)
|
||||||
|
{
|
||||||
|
// Set col, read rows
|
||||||
|
for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) {
|
||||||
|
bool matrix_changed = read_rows_on_col(matrix_debouncing, current_col);
|
||||||
|
if (matrix_changed) {
|
||||||
|
debouncing = true;
|
||||||
|
debouncing_time = timer_read();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) {
|
||||||
|
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
||||||
|
matrix[i] = matrix_debouncing[i];
|
||||||
|
}
|
||||||
|
debouncing = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
matrix_scan_quantum();
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
bool matrix_is_on(uint8_t row, uint8_t col)
|
||||||
|
{
|
||||||
|
return (matrix[row] & ((matrix_row_t)1<col));
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
matrix_row_t matrix_get_row(uint8_t row)
|
||||||
|
{
|
||||||
|
return matrix[row];
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_print(void)
|
||||||
|
{
|
||||||
|
print("\nr/c 0123456789ABCDEFGHIJKLMNOPQRSTUV \n");
|
||||||
|
|
||||||
|
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
|
||||||
|
phex(row); print(": ");
|
||||||
|
print_bin_reverse32(matrix_get_row(row));
|
||||||
|
print("\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t matrix_key_count(void)
|
||||||
|
{
|
||||||
|
uint8_t count = 0;
|
||||||
|
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
||||||
|
count += bitpop32(matrix[i]);
|
||||||
|
}
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
|
||||||
|
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 < MATRIX_ROWS; row_index++)
|
||||||
|
{
|
||||||
|
// Store last value of row prior to reading
|
||||||
|
matrix_row_t last_row_value = current_matrix[row_index];
|
||||||
|
|
||||||
|
// Check row pin state
|
||||||
|
// Use the otherwise unused row: 3, col: 0 for caps lock
|
||||||
|
if (row_index == 2 && current_col == 2) {
|
||||||
|
// Pin E2 uses active low
|
||||||
|
if ((_SFR_IO8(E2 >> 4) & _BV(E2 & 0xF)) == 0)
|
||||||
|
{
|
||||||
|
// Pin LO, set col bit
|
||||||
|
current_matrix[row_index] |= (COL_SHIFTER << current_col);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Pin HI, clear col bit
|
||||||
|
current_matrix[row_index] &= ~(COL_SHIFTER << current_col);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if ((_SFR_IO8(row_pins[row_index] >> 4) & _BV(row_pins[row_index] & 0xF)))
|
||||||
|
{
|
||||||
|
// Pin HI, set col bit
|
||||||
|
current_matrix[row_index] |= (COL_SHIFTER << current_col);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Pin LO, clear col bit
|
||||||
|
current_matrix[row_index] &= ~(COL_SHIFTER << current_col);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Determine if the matrix changed state
|
||||||
|
if ((last_row_value != current_matrix[row_index]) && !(matrix_changed))
|
||||||
|
{
|
||||||
|
matrix_changed = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Unselect cols
|
||||||
|
unselect_cols();
|
||||||
|
|
||||||
|
return matrix_changed;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Row pin configuration
|
||||||
|
* row: 0 1 2 3 4
|
||||||
|
* pin: D0 D1 D2 D3 D5
|
||||||
|
*
|
||||||
|
* Caps lock uses its own pin E2
|
||||||
|
*/
|
||||||
|
static void init_rows(void) {
|
||||||
|
DDRD &= ~((1<<0)| (1<<1) | (1<<2) | (1<<3) | (1<<5)); // IN
|
||||||
|
PORTD &= ~((1<<0)| (1<<1) | (1<<2) | (1<<3) | (1<<5)); // LO
|
||||||
|
|
||||||
|
DDRE &= ~(1<<2); // IN
|
||||||
|
PORTE |= (1<<2); // HI
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Columns 0 - 16
|
||||||
|
* col 0: B5
|
||||||
|
* col 1: B6
|
||||||
|
* These columns use a 74HC237D 3 to 8 bit demultiplexer.
|
||||||
|
* A B C GL1
|
||||||
|
* col / pin: PF0 PF1 PC7 PC6
|
||||||
|
* 2: 0 0 0 1
|
||||||
|
* 3: 1 0 0 1
|
||||||
|
* 4: 0 1 0 1
|
||||||
|
* 5: 1 1 0 1
|
||||||
|
* 6: 0 0 1 1
|
||||||
|
* 7: 1 0 1 1
|
||||||
|
* 8: 0 1 1 1
|
||||||
|
* 9: 1 1 1 1
|
||||||
|
* col 10: E6
|
||||||
|
* col 11: B0
|
||||||
|
* col 12: B7
|
||||||
|
* col 13: D4
|
||||||
|
* col 14: D6
|
||||||
|
* col 15: D7
|
||||||
|
* col 16: B4
|
||||||
|
*/
|
||||||
|
static void unselect_cols(void) {
|
||||||
|
DDRB |= (1<<5) | (1<<6) | (1<<0) | (1<<7) | (1<<4); // OUT
|
||||||
|
PORTB &= ~((1<<5) | (1<<6) | (1<<0) | (1<<7) | (1<<4)); // LO
|
||||||
|
|
||||||
|
DDRD |= (1<<4) | (1<<6) | (1<<7); // OUT
|
||||||
|
PORTD &= ~((1<<4) | (1<<6) | (1<<7)); // LO
|
||||||
|
|
||||||
|
DDRE |= (1<<6); // OUT
|
||||||
|
PORTE &= ~((1<<6)); // LO
|
||||||
|
|
||||||
|
DDRF |= (1<<0) | (1<<1); // OUT
|
||||||
|
PORTF &= ~((1<<0) | (1<<1)); // LO
|
||||||
|
|
||||||
|
DDRC |= (1<<7) | (1<<6); // OUT
|
||||||
|
PORTC &= ~((1<<7) | (1<<6)); // LO
|
||||||
|
}
|
||||||
|
|
||||||
|
static void select_col(uint8_t col)
|
||||||
|
{
|
||||||
|
switch (col) {
|
||||||
|
case 0:
|
||||||
|
PORTB |= (1<<5); // HI
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
PORTB |= (1<<6); // HI
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
PORTC |= (1<<6); // HI
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
PORTC |= (1<<6); // HI
|
||||||
|
PORTF |= (1<<0); // HI
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
PORTC |= (1<<6); // HI
|
||||||
|
PORTF |= (1<<1); // HI
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
PORTC |= (1<<6); // HI
|
||||||
|
PORTF |= (1<<0); // HI
|
||||||
|
PORTF |= (1<<1); // HI
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
PORTC |= (1<<6); // HI
|
||||||
|
PORTC |= (1<<7); // HI
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
PORTC |= (1<<6); // HI
|
||||||
|
PORTF |= (1<<0); // HI
|
||||||
|
PORTC |= (1<<7); // HI
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
PORTC |= (1<<6); // HI
|
||||||
|
PORTF |= (1<<1); // HI
|
||||||
|
PORTC |= (1<<7); // HI
|
||||||
|
break;
|
||||||
|
case 9:
|
||||||
|
PORTC |= (1<<6); // HI
|
||||||
|
PORTF |= (1<<0); // HI
|
||||||
|
PORTF |= (1<<1); // HI
|
||||||
|
PORTC |= (1<<7); // HI
|
||||||
|
break;
|
||||||
|
case 10:
|
||||||
|
PORTE |= (1<<6); // HI
|
||||||
|
break;
|
||||||
|
case 11:
|
||||||
|
PORTB |= (1<<0); // HI
|
||||||
|
break;
|
||||||
|
case 12:
|
||||||
|
PORTB |= (1<<7); // HI
|
||||||
|
break;
|
||||||
|
case 13:
|
||||||
|
PORTD |= (1<<4); // HI
|
||||||
|
break;
|
||||||
|
case 14:
|
||||||
|
PORTD |= (1<<6); // HI
|
||||||
|
break;
|
||||||
|
case 15:
|
||||||
|
PORTD |= (1<<7); // HI
|
||||||
|
break;
|
||||||
|
case 16:
|
||||||
|
PORTB |= (1<<4); // HI
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
Executable
+13
@@ -0,0 +1,13 @@
|
|||||||
|
Kmini keyboard firmware
|
||||||
|
======================
|
||||||
|
|
||||||
|
The Revo Kmini is a 65% keyboard with an additional two columns on the left. It is programmed with the 'KMAC key map', which only works on Windows and according to a [user](https://www.keebtalk.com/t/programming-revo-kmini/2107/7) it cannot map media controls or change the capslock key.
|
||||||
|
|
||||||
|
## Hardware
|
||||||
|
Columns 0, 1 and 10-16 and rows 0-4 are wired directly to the ATmega32u4, and columns 2-9 are wired to the [74HC237D demultiplexer](https://www.mouser.de/datasheet/2/916/74HC237-1319445.pdf). Capslock is on E2 and also triggers a reset if held when plugging the cable in. There are three possible places for leds, which are the capslock key and the two keys above the right arrow key. All three of them are individually controllable. The ATmega32u4 runs on an external crystal on 8mhz, so you'll have to change the bitclock on the ISP programmer if you're unable to read or write the chip.
|
||||||
|
|
||||||
|
## How to build
|
||||||
|
Please read the [documentation](https://docs.qmk.fm).
|
||||||
|
|
||||||
|
## How to flash
|
||||||
|
Hold the capslock key while plugging in the USB and flash the .hex file using QMK Toolbox or Atmel FLIP.
|
||||||
Executable
+71
@@ -0,0 +1,71 @@
|
|||||||
|
# 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 = 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
|
||||||
|
|
||||||
|
|
||||||
|
# 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
|
||||||
|
CUSTOM_MATRIX = yes # Custom matrix file
|
||||||
|
# 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
|
||||||
|
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
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
This is the c configuration file for the keymap
|
||||||
|
|
||||||
|
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||||
|
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 <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef CONFIG_USER_H
|
||||||
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
|
#include "../../config.h"
|
||||||
|
|
||||||
|
/* Select hand configuration */
|
||||||
|
|
||||||
|
#define MASTER_LEFT
|
||||||
|
// #define _MASTER_RIGHT
|
||||||
|
// #define EE_HANDS
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,163 @@
|
|||||||
|
#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 _LOWER 3
|
||||||
|
#define _RAISE 4
|
||||||
|
#define _ADJUST 16
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
QWERTY = SAFE_RANGE,
|
||||||
|
LOWER,
|
||||||
|
RAISE,
|
||||||
|
ADJUST,
|
||||||
|
BACKLIT
|
||||||
|
};
|
||||||
|
|
||||||
|
// Fillers to make layering more clear
|
||||||
|
#define _______ KC_TRNS
|
||||||
|
#define XXXXXXX KC_NO
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
/* Qwerty
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | RESET| 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 |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* |Backlt| Ctrl | GUI | Alt |Lower |Space |Space |Raise | Left | Down | Up |Right |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_QWERTY] = LAYOUT( \
|
||||||
|
RESET, 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, \
|
||||||
|
RGB_TOG, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
|
||||||
|
BACKLIT, KC_LCTL, KC_LGUI, KC_LALT, 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( \
|
||||||
|
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_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( \
|
||||||
|
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 |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | | | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | | |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_ADJUST] = LAYOUT( \
|
||||||
|
_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \
|
||||||
|
_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
void persistent_default_layer_set(uint16_t default_layer) {
|
||||||
|
eeconfig_update_default_layer(default_layer);
|
||||||
|
default_layer_set(default_layer);
|
||||||
|
}
|
||||||
|
|
||||||
|
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 BACKLIT:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
register_code(KC_RSFT);
|
||||||
|
#ifdef BACKLIGHT_ENABLE
|
||||||
|
backlight_step();
|
||||||
|
#endif
|
||||||
|
} else {
|
||||||
|
unregister_code(KC_RSFT);
|
||||||
|
}
|
||||||
|
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;
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Let's Split Eh?
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
This is a split 40% ortho board. It is the exact same footprint and the Let's Split keyboard by wootpatoot. This board has USB-C / RGB Underglow / and is all on-board. Meant as a drop-in replacement for the V2 Let's Split.
|
||||||
|
|
||||||
|
Keyboard Maintainer: [Christopher Poole (That-Canadian)](https://github.com/That-Canadian)
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make lets_split_eh/eh:default
|
||||||
|
|
||||||
|
See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information.
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef CONFIG_H
|
||||||
|
#define CONFIG_H
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xFEED
|
||||||
|
#define PRODUCT_ID 0xE401
|
||||||
|
#define DEVICE_VER 0x0E41
|
||||||
|
#define MANUFACTURER That-Canadian
|
||||||
|
#define PRODUCT Lets Split Eh?
|
||||||
|
#define DESCRIPTION An on-board component Lets Split w/ USB-C
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
// Rows are doubled-up
|
||||||
|
#define MATRIX_ROWS 8
|
||||||
|
#define MATRIX_COLS 6
|
||||||
|
|
||||||
|
/* Set 0 if debouncing isn't needed */
|
||||||
|
#define DEBOUNCING_DELAY 5
|
||||||
|
|
||||||
|
/* key combination for command */
|
||||||
|
#define IS_COMMAND() ( \
|
||||||
|
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||||
|
)
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||||
|
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 <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef EH_CONFIG_H
|
||||||
|
#define EH_CONFIG_H
|
||||||
|
|
||||||
|
// To let configuration know this is of type EH, which will force I2C irregardless of user config
|
||||||
|
#define EH
|
||||||
|
// The 'EH' only uses I2C
|
||||||
|
#define USE_I2C
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* Let's Split EH? pin-out */
|
||||||
|
#define MATRIX_ROW_PINS { B1, B3, D7, B4 }
|
||||||
|
#define MATRIX_COL_PINS { F4, F5, C6, B6, B5, D5 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
#define BACKLIGHT_PIN B7
|
||||||
|
|
||||||
|
/* number of backlight levels */
|
||||||
|
#define BACKLIGHT_LEVELS 3
|
||||||
|
|
||||||
|
/* ws2812 RGB LED */
|
||||||
|
#define RGB_DI_PIN B2
|
||||||
|
#define RGBLED_NUM 6 // Number of LEDs (each hand)
|
||||||
|
|
||||||
|
/* Split Defines */
|
||||||
|
#define SPLIT_HAND_PIN D3
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
#include "lets_split_eh.h"
|
||||||
|
|
||||||
|
void matrix_init_kb(void) {
|
||||||
|
|
||||||
|
// JTAG disable for PORT F. write JTD bit twice within four cycles.
|
||||||
|
MCUCR |= (1<<JTD);
|
||||||
|
MCUCR |= (1<<JTD);
|
||||||
|
|
||||||
|
// Undo init of RX LED, we use that port currently
|
||||||
|
// DDRB &= ~(1<<0);
|
||||||
|
|
||||||
|
matrix_init_user();
|
||||||
|
};
|
||||||
|
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
#ifndef EH_H
|
||||||
|
#define EH_H
|
||||||
|
|
||||||
|
#include "lets_split_eh.h"
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#define LAYOUT( \
|
||||||
|
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, R30, R31, R32, R33, R34, R35 \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ L00, L01, L02, L03, L04, L05 }, \
|
||||||
|
{ L10, L11, L12, L13, L14, L15 }, \
|
||||||
|
{ L20, L21, L22, L23, L24, L25 }, \
|
||||||
|
{ L30, L31, L32, L33, L34, L35 }, \
|
||||||
|
{ R00, R01, R02, R03, R04, R05 }, \
|
||||||
|
{ R10, R11, R12, R13, R14, R15 }, \
|
||||||
|
{ R20, R21, R22, R23, R24, R25 }, \
|
||||||
|
{ R30, R31, R32, R33, R34, R35 } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define LAYOUT_ortho_4x12 LAYOUT
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
BOOTLOADER = atmel-dfu
|
||||||
|
|
||||||
|
BACKLIGHT_ENABLE = yes
|
||||||
|
RGBLIGHT_ENABLE = yes
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
/*
|
||||||
|
This is the c configuration file for the keymap
|
||||||
|
|
||||||
|
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||||
|
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 <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef CONFIG_USER_H
|
||||||
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
|
#include "../../config.h"
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,170 @@
|
|||||||
|
#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 _LOWER 3
|
||||||
|
#define _RAISE 4
|
||||||
|
#define _FUNCTION 15
|
||||||
|
#define _ADJUST 16
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
QWERTY = SAFE_RANGE,
|
||||||
|
LOWER,
|
||||||
|
RAISE,
|
||||||
|
ADJUST
|
||||||
|
};
|
||||||
|
|
||||||
|
// Fillers to make layering more clear
|
||||||
|
#define _______ KC_TRNS
|
||||||
|
#define XXXXXXX KC_NO
|
||||||
|
|
||||||
|
// 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
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | Func | A | S | D | F | G | H | J | K | L | ; | Enter|
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | Shift| Z | X | C | V | B | N | M | , | . | / | ' |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Ctrl | ` | GUI | Alt |Lower | Space |Raise | Left | Down | Up |Right |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_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, \
|
||||||
|
MO(_FUNCTION), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, \
|
||||||
|
OSM(MOD_LSFT), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT, \
|
||||||
|
KC_LCTL, KC_GRV, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Lower
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | Esc | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } |Enter |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | | F7 | F8 | F9 | F10 | F11 | F12 | | | Mute | | | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | |Lower | Bksp | Bksp |Raise | Next | Vol- | Vol+ | Play |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_LOWER] = LAYOUT( \
|
||||||
|
KC_ESC, 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_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_MUTE, _______, KC_PIPE, \
|
||||||
|
_______, _______, _______, _______, _______, KC_BSPC, KC_BSPC, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Raise
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | | 4 | 5 | 6 | + | F5 | F6 | - | = | [ | ] |Enter |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* |Enter | 7 | 8 | 9 | - | F11 | F12 |ISO # |ISO / | Mute | | \ |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | , | 0 | . |Lower | Bksp | Bksp |Raise | Next | Vol- | Vol+ | Play |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_RAISE] = 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_4, KC_5, KC_6, KC_PLUS, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, \
|
||||||
|
KC_ENT, KC_7, KC_8, KC_9, KC_MINS, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_MUTE, _______, KC_BSLS, \
|
||||||
|
_______, KC_COMM, KC_0, KC_DOT, _______, KC_BSPC, KC_BSPC, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Adjust (Lower + Raise)
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* |Taskmg| | | | | | | |RGBVAI|RGBSAI|RGBHUI|caltde|
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | | | | | | | |Qwerty|RGBVAD|RGBSAD|RGBHUD|RGBTOG|
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | | |BLSTEP|
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | | | RESET|
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_ADJUST] = LAYOUT( \
|
||||||
|
TSKMGR, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, RGB_SAI, RGB_HUI, CALTDEL, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, QWERTY, RGB_VAD, RGB_SAD, RGB_HUD, RGB_TOG, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_STEP, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET \
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Function
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | | | | | | | | | Up | | | |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | Left | Down |Right | | |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | Caps | | | | | | | | | | | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | | |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_FUNCTION] = LAYOUT( \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, \
|
||||||
|
KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||||
|
)
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
void persistent_default_layer_set(uint16_t default_layer) {
|
||||||
|
eeconfig_update_default_layer(default_layer);
|
||||||
|
default_layer_set(default_layer);
|
||||||
|
}
|
||||||
|
|
||||||
|
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 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;
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
ifndef QUANTUM_DIR
|
||||||
|
include ../../../../Makefile
|
||||||
|
endif
|
||||||
Loaded 100 of 355 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user