forked from Github/qmk_firmware
Compare commits
122 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
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 | ||
![]() |
168d180a74 | ||
![]() |
7ebed894a8 | ||
![]() |
9ce7374563 | ||
![]() |
2ddabda586 | ||
![]() |
df8b8c5032 | ||
![]() |
a552416ab2 | ||
![]() |
b335a22568 | ||
![]() |
48913153c3 | ||
![]() |
5477bf39bf | ||
![]() |
a345458fa9 | ||
![]() |
aaa311dd20 | ||
![]() |
8ee97f7c99 | ||
![]() |
11f8414401 | ||
![]() |
6ef3359a8a | ||
![]() |
ddaa4c212a | ||
![]() |
0fcaa3b5e1 | ||
![]() |
5b7ac47b1a | ||
![]() |
65f1b08b5b | ||
![]() |
5ef50256d8 | ||
![]() |
56b5e9f23d | ||
![]() |
dab0b35dc3 | ||
![]() |
4a6d668f8a | ||
![]() |
c6042a2636 | ||
![]() |
52857e51ca | ||
![]() |
4081288da1 | ||
![]() |
67adb30edd | ||
![]() |
0b9b2a6376 | ||
![]() |
f28f569600 | ||
![]() |
ebe4c3dbbe | ||
![]() |
e661f1559e | ||
![]() |
df8b564518 | ||
![]() |
0d5a8b048a | ||
![]() |
978fa700d8 | ||
![]() |
03766619d5 | ||
![]() |
3d7428a333 | ||
![]() |
60ca50808f | ||
![]() |
0a8d529d74 | ||
![]() |
c418608c1e | ||
![]() |
956e0bb4b8 | ||
![]() |
218d51094e | ||
![]() |
36d35959c8 | ||
![]() |
0210447c82 | ||
![]() |
7fef5ca240 | ||
![]() |
8906e62c1f | ||
![]() |
5953af3215 | ||
![]() |
e36cbdc786 | ||
![]() |
3f3a1cc9f3 | ||
![]() |
8dd85f73b3 | ||
![]() |
3d6919c3dc | ||
![]() |
db8b547b7d | ||
![]() |
77445afac5 | ||
![]() |
b9bf310b0f | ||
![]() |
1f9ee8b990 | ||
![]() |
090b4a81b9 | ||
![]() |
7eeb8932a1 | ||
![]() |
876377e945 | ||
![]() |
3bbf11d110 | ||
![]() |
3204dec096 | ||
![]() |
d5def73f6e | ||
![]() |
d7881f3504 | ||
![]() |
57fdce91bf | ||
![]() |
40b4f27b03 | ||
![]() |
c197d080c4 | ||
![]() |
df73b74b55 | ||
![]() |
d49e4543b3 | ||
![]() |
a120bbc4de | ||
![]() |
3f886a3efe | ||
![]() |
08c1997db1 |
29
Makefile
29
Makefile
@@ -67,7 +67,7 @@ $(eval $(call NEXT_PATH_ELEMENT))
|
||||
# It's really a very simple if else chain, if you squint enough,
|
||||
# but the makefile syntax makes it very verbose.
|
||||
# If we are in a subfolder of keyboards
|
||||
#
|
||||
#
|
||||
# *** No longer needed **
|
||||
#
|
||||
# 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_4 := $$(patsubst %/,%,$$(dir $$(KEYBOARD_FOLDER_PATH_3)))
|
||||
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 :=
|
||||
# get a list of all keymaps
|
||||
@@ -325,35 +320,35 @@ define PARSE_KEYBOARD
|
||||
$$(KEYBOARD_FOLDER_3) $$(KEYBOARD_FOLDER_4) $$(KEYBOARD_FOLDER_5), $$(KEYMAPS)))
|
||||
|
||||
KEYBOARD_LAYOUTS :=
|
||||
ifneq ("$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_5)/rules.mk)","")
|
||||
ifneq ("$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_5)/rules.mk)","")
|
||||
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))
|
||||
endif
|
||||
ifneq ("$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_4)/rules.mk)","")
|
||||
ifneq ("$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_4)/rules.mk)","")
|
||||
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))
|
||||
endif
|
||||
ifneq ("$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_3)/rules.mk)","")
|
||||
ifneq ("$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_3)/rules.mk)","")
|
||||
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))
|
||||
endif
|
||||
ifneq ("$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_2)/rules.mk)","")
|
||||
ifneq ("$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_2)/rules.mk)","")
|
||||
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))
|
||||
endif
|
||||
ifneq ("$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_1)/rules.mk)","")
|
||||
ifneq ("$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_1)/rules.mk)","")
|
||||
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))
|
||||
endif
|
||||
|
||||
LAYOUT_KEYMAPS :=
|
||||
$$(foreach LAYOUT,$$(KEYBOARD_LAYOUTS),$$(eval LAYOUT_KEYMAPS += $$(notdir $$(patsubst %/.,%,$$(wildcard $(ROOT_DIR)/layouts/*/$$(LAYOUT)/*/.)))))
|
||||
|
||||
|
||||
KEYMAPS := $$(sort $$(KEYMAPS) $$(LAYOUT_KEYMAPS))
|
||||
|
||||
# if the rule after removing the start of it is empty (we haven't specified a kemap or target)
|
||||
|
13
common.mk
13
common.mk
@@ -3,16 +3,16 @@ include message.mk
|
||||
# Directory common source files exist
|
||||
TOP_DIR = .
|
||||
TMK_DIR = tmk_core
|
||||
TMK_PATH = $(TOP_DIR)/$(TMK_DIR)
|
||||
LIB_PATH = $(TOP_DIR)/lib
|
||||
TMK_PATH = $(TMK_DIR)
|
||||
LIB_PATH = lib
|
||||
|
||||
QUANTUM_DIR = quantum
|
||||
QUANTUM_PATH = $(TOP_DIR)/$(QUANTUM_DIR)
|
||||
QUANTUM_PATH = $(QUANTUM_DIR)
|
||||
|
||||
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 += $(TMK_PATH)
|
||||
@@ -21,4 +21,5 @@ COMMON_VPATH += $(QUANTUM_PATH)/keymap_extras
|
||||
COMMON_VPATH += $(QUANTUM_PATH)/audio
|
||||
COMMON_VPATH += $(QUANTUM_PATH)/process_keycode
|
||||
COMMON_VPATH += $(QUANTUM_PATH)/api
|
||||
COMMON_VPATH += $(DRIVER_PATH)
|
||||
COMMON_VPATH += $(QUANTUM_PATH)/split_common
|
||||
COMMON_VPATH += $(DRIVER_PATH)
|
||||
|
@@ -197,6 +197,12 @@ ifeq ($(strip $(USB_HID_ENABLE)), yes)
|
||||
include $(TMK_DIR)/protocol/usb_hid.mk
|
||||
endif
|
||||
|
||||
|
||||
ifeq ($(strip $(HD44780_ENABLE)), yes)
|
||||
SRC += drivers/avr/hd44780.c
|
||||
OPT_DEFS += -DHD44780_ENABLE
|
||||
endif
|
||||
|
||||
QUANTUM_SRC:= \
|
||||
$(QUANTUM_DIR)/quantum.c \
|
||||
$(QUANTUM_DIR)/keymap_common.c \
|
||||
@@ -204,5 +210,17 @@ QUANTUM_SRC:= \
|
||||
$(QUANTUM_DIR)/process_keycode/process_leader.c
|
||||
|
||||
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
|
||||
|
@@ -55,18 +55,22 @@
|
||||
* [Userspace](feature_userspace.md)
|
||||
|
||||
* [Keycodes](keycodes.md)
|
||||
* [Backlight](feature_backlight.md#backlight-keycodes)
|
||||
* [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)
|
||||
* [Bootmagic](feature_bootmagic.md#bootmagic-keycodes)
|
||||
* [Layer Switching](feature_advanced_keycodes.md#switching-and-toggling-layers)
|
||||
* [Mod+Key](feature_advanced_keycodes.md#modifier-keys)
|
||||
* [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)
|
||||
* [Quantum](quantum_keycodes.md)
|
||||
* [RGB Light](feature_rgblight.md#rgblight-keycodes)
|
||||
* [RGB Matrix](feature_rgb_matrix.md#keycodes)
|
||||
* [Shifted Keys](feature_advanced_keycodes.md#shifted-keycodes)
|
||||
* [Stenography](feature_stenography.md#keycode-reference)
|
||||
* [Swap Hands](feature_swap_hands.md#swap-keycodes)
|
||||
* [Thermal Printer](feature_thermal_printer.md#thermal-printer-keycodes)
|
||||
* [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md)
|
||||
|
||||
|
@@ -43,7 +43,9 @@
|
||||
* [Pointing Device](feature_pointing_device.md)
|
||||
* [PS/2 Mouse](feature_ps2_mouse.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)
|
||||
* [Swap Hands](feature_swap_hands.md)
|
||||
* [Tap Dance](feature_tap_dance.md)
|
||||
@@ -53,18 +55,22 @@
|
||||
* [Userspace](feature_userspace.md)
|
||||
|
||||
* [Keycodes](keycodes.md)
|
||||
* [Backlight](feature_backlight.md#backlight-keycodes)
|
||||
* [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)
|
||||
* [Bootmagic](feature_bootmagic.md#bootmagic-keycodes)
|
||||
* [Layer Switching](feature_advanced_keycodes.md#switching-and-toggling-layers)
|
||||
* [Mod+Key](feature_advanced_keycodes.md#modifier-keys)
|
||||
* [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)
|
||||
* [Quantum](quantum_keycodes.md)
|
||||
* [RGB Light](feature_rgblight.md#rgblight-keycodes)
|
||||
* [RGB Matrix](feature_rgb_matrix.md#keycodes)
|
||||
* [Shifted Keys](feature_advanced_keycodes.md#shifted-keycodes)
|
||||
* [Stenography](feature_stenography.md#keycode-reference)
|
||||
* [Swap Hands](feature_swap_hands.md#swap-keycodes)
|
||||
* [Thermal Printer](feature_thermal_printer.md#thermal-printer-keycodes)
|
||||
* [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md)
|
||||
|
||||
|
@@ -123,21 +123,27 @@ If you define these options you will enable the associated feature, which may in
|
||||
## Behaviors That Can Be Configured
|
||||
|
||||
* `#define TAPPING_TERM 200`
|
||||
* how long before a tap becomes a hold
|
||||
* 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`
|
||||
* 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`
|
||||
* how many taps before triggering the toggle
|
||||
* `#define PERMISSIVE_HOLD`
|
||||
* 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`
|
||||
* 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`
|
||||
* 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`
|
||||
* how long before the leader key times out
|
||||
* `#define ONESHOT_TIMEOUT 300`
|
||||
* how long before oneshot times out
|
||||
* `#define ONESHOT_TAP_TOGGLE 2`
|
||||
* how many taps before oneshot toggle is triggered
|
||||
* `#define IGNORE_MOD_TAP_INTERRUPT`
|
||||
* makes it possible to do rolling combos (zx) with keys that convert to other keys on hold
|
||||
* `#define QMK_KEYS_PER_SCAN 4`
|
||||
* Allows sending more than one key per scan. By default, only one key event gets
|
||||
sent via `process_record()` per scan. This has little impact on most typing, but
|
||||
@@ -173,6 +179,16 @@ If you define these options you will enable the associated feature, which may in
|
||||
* `#define MOUSEKEY_MAX_SPEED 7`
|
||||
* `#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
|
||||
|
||||
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.
|
||||
@@ -226,3 +242,5 @@ Use these to enable or disable building certain features. The more you have enab
|
||||
* Unicode
|
||||
* `BLUETOOTH_ENABLE`
|
||||
* 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
|
||||
|
@@ -11,7 +11,7 @@ Third-party contributions help us grow and improve QMK. We want to make the pull
|
||||
|
||||
## I Don't Want to Read This Whole Thing! I Just Have a Question!
|
||||
|
||||
If you'd like to ask questions about QMK you can do so on the [OLKB Subreddit](https://reddit.com/r/olkb) or on [Gitter](https://gitter.im/qmk/qmk_firmware).
|
||||
If you'd like to ask questions about QMK you can do so on the [OLKB Subreddit](https://reddit.com/r/olkb) or on [Discord](https://discord.gg/Uq7gcHh).
|
||||
|
||||
Please keep these things in mind:
|
||||
|
||||
@@ -29,7 +29,7 @@ QMK is largely written in C, with specific features and parts written in C++. It
|
||||
|
||||
# Where Can I Go for Help?
|
||||
|
||||
If you need help you can [open an issue](https://github.com/qmk/qmk_firmware/issues) or [chat on gitter](http://gitter.im/QMK/qmk_firmware).
|
||||
If you need help you can [open an issue](https://github.com/qmk/qmk_firmware/issues) or [chat on Discord](https://discord.gg/Uq7gcHh).
|
||||
|
||||
# How Do I Make a Contribution?
|
||||
|
||||
@@ -124,7 +124,7 @@ We also ask that you follow these guidelines:
|
||||
|
||||
Before you put a lot of work into building your new feature you should make sure you are implementing it in the best way. You can get a basic understanding of QMK by reading [Understanding QMK](understanding_qmk.md), which will take you on a tour of the QMK program flow. From here you should talk to us to get a sense of the best way to implement your idea. There are two main ways to do this:
|
||||
|
||||
* [Chat on Gitter](https://gitter.im/qmk/qmk_firmware)
|
||||
* [Chat on Discord](https://discord.gg/Uq7gcHh)
|
||||
* [Open an Issue](https://github.com/qmk/qmk_firmware/issues/new)
|
||||
|
||||
Feature and Bug Fix PR's affect all keyboards. We are also in the process of restructuring QMK. For this reason it is especially important for significant changes to be discussed before implementation has happened. If you open a PR without talking to us first please be prepared to do some significant rework if your choices do not mesh well with our planned direction.
|
||||
|
@@ -167,7 +167,7 @@ Whenever possible you should customize your keyboard by using `process_record_*(
|
||||
|
||||
### Example `matrix_scan_*` Implementation
|
||||
|
||||
This example has been deliberately omitted. You should understand enough about QMK internals to write this without an example before hooking into such a performance sensitive area. If you need help please [open an issue](https://github.com/qmk/qmk_firmware/issues/new) or [chat with us on gitter](https://gitter.im/qmk/qmk_firmware).
|
||||
This example has been deliberately omitted. You should understand enough about QMK internals to write this without an example before hooking into such a performance sensitive area. If you need help please [open an issue](https://github.com/qmk/qmk_firmware/issues/new) or [chat with us on Discord](https://discord.gg/Uq7gcHh).
|
||||
|
||||
### `matrix_scan_*` Function Documentation
|
||||
|
||||
|
@@ -104,3 +104,17 @@ brew install dfu-programmer
|
||||
brew install gcc-arm-none-eabi
|
||||
brew install avrdude
|
||||
```
|
||||
|
||||
### avr-gcc 8.1 and LUFA
|
||||
|
||||
If you updated your avr-gcc to above 7 you may see errors involving LUFA. For example:
|
||||
|
||||
`lib/lufa/LUFA/Drivers/USB/Class/Device/AudioClassDevice.h:380:5: error: 'const' attribute on function returning 'void'`
|
||||
|
||||
For now, you need to rollback avr-gcc to 7 in brew.
|
||||
|
||||
```
|
||||
brew uninstall --force avr-gcc
|
||||
brew install avr-gcc@7
|
||||
brew link avr-gcc@7
|
||||
```
|
||||
|
@@ -175,3 +175,37 @@ Example: (Tapping Term = 200ms)
|
||||
- SHFT_T(KC_A) Up
|
||||
|
||||
With defaults, if above is typed within tapping term, this will emit `ax`. With permissive hold, if above is typed within tapping term, this will emit `X` (so, Shift+X).
|
||||
|
||||
# Mod tap interrupt
|
||||
|
||||
When a dual role key used for a modifier is quickly followed by another keys, it is interpreted as held even before the tapping term elapsed. This is a problem if a key is used for example inside a rolling combo because the second key will be pressed before the first key is released.
|
||||
|
||||
For example, when trying to type the rolling combo "zx" and z being configured to send Ctrl when hold, z rapidly followed by x actually sends Ctrl-x. That's bad.
|
||||
|
||||
You can disable this behavior by defining `IGNORE_MOD_TAP_INTERRUPT` in `config.h`.
|
||||
|
||||
Note that this only concerns modifiers and not layer switching keys.
|
||||
|
||||
# Hold after tap
|
||||
|
||||
When the user holds a key after tap, this repeats the tapped key rather to hold a modifier key. This allows to use auto repeat for the tapped key. If you prefer to hold a modifier instead, define `TAPPING_FORCE_HOLD` in `config.h`.
|
||||
|
||||
Example:
|
||||
|
||||
- SHFT_T(KC_A) Down
|
||||
- SHFT_T(KC_A) Up
|
||||
- SHFT_T(KC_A) Down
|
||||
- wait more than tapping term...
|
||||
- SHFT_T(KC_A) Up
|
||||
|
||||
With default settings, `a` will be sent on the first release, then `a` will be sent on the second press allowing the computer to trigger its auto repeat function.
|
||||
|
||||
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).
|
||||
|
||||
# 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.
|
||||
|
||||
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:
|
||||
`#define B5_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.
|
||||
|
||||
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
|
||||
|
||||
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.
|
||||
|
||||
|
||||
## 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
|
||||
|
||||
## Audio
|
||||
|
56
docs/feature_hd44780.md
Normal file
56
docs/feature_hd44780.md
Normal file
@@ -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.
|
||||
|
||||
`/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
|
||||
|
||||
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
|
||||
```
|
||||
```
|
||||
|
@@ -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.
|
||||
* [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.
|
||||
* [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.
|
||||
* [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.
|
||||
|
@@ -56,7 +56,7 @@ If you're using [homebrew,](http://brew.sh/) you can use the following commands:
|
||||
brew tap osx-cross/avr
|
||||
brew tap PX4/homebrew-px4
|
||||
brew update
|
||||
brew install avr-gcc
|
||||
brew install avr-gcc@7
|
||||
brew install dfu-programmer
|
||||
brew install gcc-arm-none-eabi
|
||||
brew install avrdude
|
||||
|
@@ -4,13 +4,7 @@ There are a lot of resources for getting help with QMK.
|
||||
|
||||
## Realtime Chat
|
||||
|
||||
You can find QMK developers and users on our main [gitter chat room](https://gitter.im/qmk/qmk_firmware). We also have other rooms for more specific discussion:
|
||||
|
||||
* [Main Firmware Chat](https://gitter.im/qmk/qmk_firmware)
|
||||
* [QMK Toolbox](https://gitter.im/qmk/qmk_toolbox)
|
||||
* [Hardware Design Discussion](https://gitter.im/qmk/qmk_hardware)
|
||||
* [Web Configurator](https://gitter.im/qmk/qmk_configurator)
|
||||
* [Compiler API](https://gitter.im/qmk/qmk_compiler_api)
|
||||
You can find QMK developers and users on our main [Discord server](https://discord.gg/Uq7gcHh). There are specific channels in the server for chatting about the firmware, Toolbox, hardware, and configurator.
|
||||
|
||||
## OLKB Subreddit
|
||||
|
||||
|
@@ -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:
|
||||
|
||||
```
|
||||
**[terminal]
|
||||
**[prompt you@computer]**[path ~]**[delimiter $ ]**[command git clone https://github.com/whoeveryouare/qmk_firmware.git]
|
||||
user@computer:~$ git clone https://github.com/whoeveryouare/qmk_firmware.git
|
||||
Cloning into 'qmk_firmware'...
|
||||
remote: Counting objects: 46625, done.
|
||||
remote: Compressing objects: 100% (2/2), done.
|
||||
@@ -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:
|
||||
|
||||
```
|
||||
**[terminal]
|
||||
**[prompt you@computer]**[path ~/qmk_firmware]**[delimiter $ ]**[command git add .]
|
||||
**[prompt you@computer]**[path ~/qmk_firmware]**[delimiter $ ]**[command git commit -m "adding my keymap"]
|
||||
user@computer:~$ git add .
|
||||
user@computer:~$ git commit -m "adding my keymap"
|
||||
[master cccb1608] adding my keymap
|
||||
1 file changed, 1 insertion(+)
|
||||
create mode 100644 keyboards/planck/keymaps/mine/keymap.c
|
||||
**[prompt you@computer]**[path ~/qmk_firmware]**[delimiter $ ]**[command git push]
|
||||
user@computer:~$ git push
|
||||
Counting objects: 1, done.
|
||||
Delta compression using up to 4 threads.
|
||||
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.
|
||||
|
||||
### 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
|
||||
|
||||
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
|
||||
* `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`.
|
||||
|
||||
### 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
|
||||
|
||||
There are 2 `config.h` locations:
|
||||
There are 3 possible `config.h` locations:
|
||||
|
||||
* keyboard (`/keyboards/<keyboard>/config.h`)
|
||||
* userspace (`/users/<user>/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
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "config_common.h"
|
||||
#pragma once
|
||||
```
|
||||
|
||||
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
|
||||
#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.
|
||||
|
||||
`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
|
||||
|
||||
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.
|
||||
|
205
docs/keycodes.md
205
docs/keycodes.md
@@ -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_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)
|
||||
|
||||
|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` |
|
||||
|`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)
|
||||
|
||||
|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_TOGGLE_NKRO` | |Turn NKRO on or off |
|
||||
|
||||
## [Backlighting](feature_backlight.md)
|
||||
## [Bluetooth](feature_bluetooth.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 |
|
||||
|Key |Description |
|
||||
|----------|----------------------------------------------|
|
||||
|`OUT_AUTO`|Automatically switch between USB and Bluetooth|
|
||||
|`OUT_USB` |USB only |
|
||||
|`OUT_BT` |Bluetooth only |
|
||||
|
||||
|
||||
## [Layer Switching](feature_advanced_keycodes.md# Switching and Toggling Layers)
|
||||
|
||||
|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)
|
||||
|
||||
@@ -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_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)
|
||||
|
||||
|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 |
|
||||
|`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 |
|
||||
|------------|----------------------------------|
|
||||
|`OSM(mod)` |Hold `mod` 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)
|
||||
|
||||
@@ -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_TG` |Toggles swap on and off with every key press. |
|
||||
|`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|
|
||||
|
@@ -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.
|
||||
|
||||
@@ -12,5 +12,7 @@ There are 4 main sections to this guide:
|
||||
* [Building Your First Firmware](newbs_building_firmware.md)
|
||||
* [Flashing Firmware](newbs_flashing.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).
|
||||
|
||||
|
13
docs/newbs_learn_more_resources.md
Normal file
13
docs/newbs_learn_more_resources.md
Normal file
@@ -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)
|
592
drivers/avr/hd44780.c
Normal file
592
drivers/avr/hd44780.c
Normal file
@@ -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 */
|
||||
|
371
drivers/avr/hd44780.h
Normal file
371
drivers/avr/hd44780.h
Normal file
@@ -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
|
||||
|
100
drivers/avr/i2c_slave.c
Executable file
100
drivers/avr/i2c_slave.c
Executable file
@@ -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);
|
||||
}
|
||||
}
|
19
drivers/avr/i2c_slave.h
Executable file
19
drivers/avr/i2c_slave.h
Executable file
@@ -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
|
40
keyboards/al1/al1.c
Normal file
40
keyboards/al1/al1.c
Normal file
@@ -0,0 +1,40 @@
|
||||
/* Copyright 2018 MechMerlin
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "al1.h"
|
||||
|
||||
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||
return process_record_user(keycode, record);
|
||||
}
|
||||
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
CONFIG_LED_IO;
|
||||
print_dec(usb_led);
|
||||
if (usb_led & (1<<USB_LED_CAPS_LOCK))
|
||||
PORTB &= ~(1<<7);
|
||||
else
|
||||
PORTB |= (1<<7);
|
||||
|
||||
if (usb_led & (1<<USB_LED_NUM_LOCK))
|
||||
PORTD &= ~(1<<0);
|
||||
else
|
||||
PORTD |= (1<<0);
|
||||
|
||||
if (usb_led & (1<<USB_LED_SCROLL_LOCK))
|
||||
PORTD &= ~(1<<1);
|
||||
else
|
||||
PORTD |= (1<<1);
|
||||
led_set_user(usb_led);
|
||||
}
|
58
keyboards/al1/al1.h
Normal file
58
keyboards/al1/al1.h
Normal file
@@ -0,0 +1,58 @@
|
||||
/* Copyright 2018 MechMerlin
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef AL1_H
|
||||
#define AL1_H
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#define CONFIG_LED_IO \
|
||||
DDRB |= (1<<7) | (1<<6); \
|
||||
DDRD |= (1<<0) | (1<<1);
|
||||
|
||||
|
||||
#define LAYOUT( \
|
||||
K500, K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K415, K414,\
|
||||
K501, K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K215, K413,\
|
||||
K502, K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, \
|
||||
K503, K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K412,\
|
||||
K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411 \
|
||||
) \
|
||||
{ \
|
||||
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015}, \
|
||||
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115}, \
|
||||
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215}, \
|
||||
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315}, \
|
||||
{ K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K415}, \
|
||||
{ K500, K501, K502, K503, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO} \
|
||||
}
|
||||
|
||||
#define LAYOUT_split_bs( \
|
||||
K500, K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K512, K012, K013, K014, K015, K415, K414, \
|
||||
K501, K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K215, K413,\
|
||||
K502, K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, \
|
||||
K503, K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K412,\
|
||||
K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411 \
|
||||
) \
|
||||
{ \
|
||||
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015}, \
|
||||
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115}, \
|
||||
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215}, \
|
||||
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315}, \
|
||||
{ K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K415}, \
|
||||
{ K500, K501, K502, K503, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K512, KC_NO, KC_NO, KC_NO} \
|
||||
}
|
||||
|
||||
#endif
|
187
keyboards/al1/config.h
Normal file
187
keyboards/al1/config.h
Normal file
@@ -0,0 +1,187 @@
|
||||
/*
|
||||
Copyright 2018 MechMerlin
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <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 Alsoran
|
||||
#define PRODUCT AL1
|
||||
#define DESCRIPTION A custom keyboard
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 7
|
||||
#define MATRIX_COLS 20
|
||||
|
||||
/*
|
||||
* Keyboard Matrix Assignments
|
||||
*
|
||||
* Change this to how you wired your keyboard
|
||||
* COLS: AVR pins used for columns, left to right
|
||||
* ROWS: AVR pins used for rows, top to bottom
|
||||
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
||||
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
||||
*
|
||||
*/
|
||||
|
||||
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
#define BACKLIGHT_PIN B6
|
||||
#define BACKLIGHT_BREATHING
|
||||
#define BACKLIGHT_LEVELS 3
|
||||
|
||||
|
||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||
#define DEBOUNCING_DELAY 5
|
||||
|
||||
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
/* number of backlight levels */
|
||||
|
||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||
#define LOCKING_SUPPORT_ENABLE
|
||||
/* Locking resynchronize hack */
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
|
||||
* This is userful for the Windows task manager shortcut (ctrl+shift+esc).
|
||||
*/
|
||||
// #define GRAVE_ESC_CTRL_OVERRIDE
|
||||
|
||||
/*
|
||||
* Force NKRO
|
||||
*
|
||||
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
|
||||
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
|
||||
* makefile for this to work.)
|
||||
*
|
||||
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
|
||||
* until the next keyboard reset.
|
||||
*
|
||||
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is
|
||||
* fully operational during normal computer usage.
|
||||
*
|
||||
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
|
||||
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
|
||||
* bootmagic, NKRO mode will always be enabled until it is toggled again during a
|
||||
* power-up.
|
||||
*
|
||||
*/
|
||||
//#define FORCE_NKRO
|
||||
|
||||
/*
|
||||
* Magic Key Options
|
||||
*
|
||||
* Magic keys are hotkey commands that allow control over firmware functions of
|
||||
* the keyboard. They are best used in combination with the HID Listen program,
|
||||
* found here: https://www.pjrc.com/teensy/hid_listen.html
|
||||
*
|
||||
* The options below allow the magic key functionality to be changed. This is
|
||||
* useful if your keyboard/keypad is missing keys and you want magic key support.
|
||||
*
|
||||
*/
|
||||
|
||||
/* key combination for magic key command */
|
||||
#define IS_COMMAND() ( \
|
||||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||
)
|
||||
|
||||
/* control how magic key switches layers */
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
|
||||
|
||||
/* override magic key keymap */
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
|
||||
//#define MAGIC_KEY_HELP1 H
|
||||
//#define MAGIC_KEY_HELP2 SLASH
|
||||
//#define MAGIC_KEY_DEBUG D
|
||||
//#define MAGIC_KEY_DEBUG_MATRIX X
|
||||
//#define MAGIC_KEY_DEBUG_KBD K
|
||||
//#define MAGIC_KEY_DEBUG_MOUSE M
|
||||
//#define MAGIC_KEY_VERSION V
|
||||
//#define MAGIC_KEY_STATUS S
|
||||
//#define MAGIC_KEY_CONSOLE C
|
||||
//#define MAGIC_KEY_LAYER0_ALT1 ESC
|
||||
//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
|
||||
//#define MAGIC_KEY_LAYER0 0
|
||||
//#define MAGIC_KEY_LAYER1 1
|
||||
//#define MAGIC_KEY_LAYER2 2
|
||||
//#define MAGIC_KEY_LAYER3 3
|
||||
//#define MAGIC_KEY_LAYER4 4
|
||||
//#define MAGIC_KEY_LAYER5 5
|
||||
//#define MAGIC_KEY_LAYER6 6
|
||||
//#define MAGIC_KEY_LAYER7 7
|
||||
//#define MAGIC_KEY_LAYER8 8
|
||||
//#define MAGIC_KEY_LAYER9 9
|
||||
//#define MAGIC_KEY_BOOTLOADER PAUSE
|
||||
//#define MAGIC_KEY_LOCK CAPS
|
||||
//#define MAGIC_KEY_EEPROM E
|
||||
//#define MAGIC_KEY_NKRO N
|
||||
//#define MAGIC_KEY_SLEEP_LED Z
|
||||
|
||||
/*
|
||||
* Feature disable options
|
||||
* These options are also useful to firmware size reduction.
|
||||
*/
|
||||
|
||||
/* disable debug print */
|
||||
//#define NO_DEBUG
|
||||
|
||||
/* disable print */
|
||||
//#define NO_PRINT
|
||||
|
||||
/* disable action features */
|
||||
//#define NO_ACTION_LAYER
|
||||
//#define NO_ACTION_TAPPING
|
||||
//#define NO_ACTION_ONESHOT
|
||||
//#define NO_ACTION_MACRO
|
||||
//#define NO_ACTION_FUNCTION
|
||||
|
||||
/*
|
||||
* MIDI options
|
||||
*/
|
||||
|
||||
/* Prevent use of disabled MIDI features in the keymap */
|
||||
//#define MIDI_ENABLE_STRICT 1
|
||||
|
||||
/* enable basic MIDI features:
|
||||
- MIDI notes can be sent when in Music mode is on
|
||||
*/
|
||||
//#define MIDI_BASIC
|
||||
|
||||
/* enable advanced MIDI features:
|
||||
- MIDI notes can be added to the keymap
|
||||
- Octave shift and transpose
|
||||
- Virtual sustain, portamento, and modulation wheel
|
||||
- etc.
|
||||
*/
|
||||
//#define MIDI_ADVANCED
|
||||
|
||||
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||
//#define MIDI_TONE_KEYCODE_OCTAVES 1
|
||||
|
||||
#endif
|
16
keyboards/al1/info.json
Normal file
16
keyboards/al1/info.json
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"keyboard_name": "AL1",
|
||||
"url": "",
|
||||
"maintainer": "qmk",
|
||||
"width": 20.5,
|
||||
"height": 5.25,
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Insert", "x":15.25, "y":0}, {"label":"Num Lock", "x":16.5, "y":0}, {"label":"/", "x":17.5, "y":0}, {"label":"*", "x":18.5, "y":0}, {"label":"-", "x":19.5, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Delete", "x":15.25, "y":1}, {"label":"7", "x":16.5, "y":1}, {"label":"8", "x":17.5, "y":1}, {"label":"9", "x":18.5, "y":1}, {"label":"+", "x":19.5, "y":1, "h":2}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"4", "x":16.5, "y":2}, {"label":"5", "x":17.5, "y":2}, {"label":"6", "x":18.5, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"1", "x":16.5, "y":3}, {"label":"2", "x":17.5, "y":3}, {"label":"3", "x":18.5, "y":3}, {"label":"Enter", "x":19.5, "y":3, "h":2}, {"label":"\u2191", "x":15.25, "y":3.25}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4}, {"label":"Alt", "x":2.25, "y":4, "w":1.25}, {"x":3.5, "y":4, "w":7}, {"label":"Alt", "x":10.5, "y":4, "w":1.25}, {"label":"Win", "x":11.75, "y":4}, {"label":"Menu", "x":12.75, "y":4, "w":1.25}, {"label":"0", "x":17.5, "y":4}, {"label":".", "x":18.5, "y":4}, {"label":"\u2190", "x":14.25, "y":4.25}, {"label":"\u2193", "x":15.25, "y":4.25}, {"label":"\u2192", "x":16.25, "y":4.25}]
|
||||
},
|
||||
|
||||
"LAYOUT_split_bs": {
|
||||
"layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Insert", "x":15.25, "y":0}, {"label":"Num Lock", "x":16.5, "y":0}, {"label":"/", "x":17.5, "y":0}, {"label":"*", "x":18.5, "y":0}, {"label":"-", "x":19.5, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Delete", "x":15.25, "y":1}, {"label":"7", "x":16.5, "y":1}, {"label":"8", "x":17.5, "y":1}, {"label":"9", "x":18.5, "y":1}, {"label":"+", "x":19.5, "y":1, "h":2}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"4", "x":16.5, "y":2}, {"label":"5", "x":17.5, "y":2}, {"label":"6", "x":18.5, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"1", "x":16.5, "y":3}, {"label":"2", "x":17.5, "y":3}, {"label":"3", "x":18.5, "y":3}, {"label":"Enter", "x":19.5, "y":3, "h":2}, {"label":"\u2191", "x":15.25, "y":3.25}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4}, {"label":"Alt", "x":2.25, "y":4, "w":1.25}, {"x":3.5, "y":4, "w":7}, {"label":"Alt", "x":10.5, "y":4, "w":1.25}, {"label":"Win", "x":11.75, "y":4}, {"label":"Menu", "x":12.75, "y":4, "w":1.25}, {"label":"0", "x":17.5, "y":4}, {"label":".", "x":18.5, "y":4}, {"label":"\u2190", "x":14.25, "y":4.25}, {"label":"\u2193", "x":15.25, "y":4.25}, {"label":"\u2192", "x":16.25, "y":4.25}]
|
||||
}
|
||||
}
|
||||
}
|
69
keyboards/al1/keymaps/default/keymap.c
Normal file
69
keyboards/al1/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,69 @@
|
||||
/* Copyright 2018 MechMerlin
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT(\
|
||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,\
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DELETE, KC_P7, KC_P8, KC_P9, KC_PPLS,\
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, \
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLSH, KC_RSFT, KC_FN0, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, \
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_FN0, KC_RGUI, KC_RCTRL, KC_LEFT, KC_DOWN, KC_RIGHT, KC_P0, KC_PDOT ),
|
||||
|
||||
[1] = LAYOUT(\
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_BSPC, KC_INS, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,\
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DELETE, KC_P7, KC_P8, KC_P9, KC_PPLS,\
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, \
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLSH, KC_RSFT, KC_FN0, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, \
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_FN0, KC_RGUI, KC_RCTRL, KC_FN1, KC_FN2, KC_FN3, KC_P0, KC_PDOT ),
|
||||
};
|
||||
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
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) {
|
||||
|
||||
}
|
1
keyboards/al1/keymaps/default/readme.md
Normal file
1
keyboards/al1/keymaps/default/readme.md
Normal file
@@ -0,0 +1 @@
|
||||
# The default keymap for al1
|
52
keyboards/al1/keymaps/splitbs/keymap.c
Normal file
52
keyboards/al1/keymaps/splitbs/keymap.c
Normal file
@@ -0,0 +1,52 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT_split_bs(\
|
||||
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_GRAVE, KC_BSPC, KC_INS, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DELETE, KC_P7, KC_P8, KC_P9, KC_PPLS,\
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, \
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLSH, KC_RSFT, KC_FN0, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, \
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_FN0, KC_RGUI, KC_RCTRL, KC_LEFT, KC_DOWN, KC_RIGHT, KC_P0, KC_PDOT ),
|
||||
[1] = LAYOUT_split_bs(\
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_GRAVE, KC_DELETE, KC_INS, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DELETE, KC_P7, KC_P8, KC_P9, KC_PPLS,\
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, \
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLSH, KC_RSFT, KC_FN0, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, \
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_FN0, KC_RGUI, KC_RCTRL, KC_FN1, KC_FN2, KC_FN3, KC_P0, KC_PDOT ),
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
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) {
|
||||
|
||||
}
|
201
keyboards/al1/matrix.c
Normal file
201
keyboards/al1/matrix.c
Normal file
@@ -0,0 +1,201 @@
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <avr/io.h>
|
||||
#include <util/delay.h>
|
||||
#include "print.h"
|
||||
#include "debug.h"
|
||||
#include "util.h"
|
||||
#include "matrix.h"
|
||||
|
||||
#ifndef DEBOUNCING_DELAY
|
||||
# define DEBOUNCING_DELAY 5
|
||||
#endif
|
||||
static uint8_t debouncing = DEBOUNCING_DELAY;
|
||||
|
||||
static matrix_row_t matrix[MATRIX_ROWS];
|
||||
static matrix_row_t matrix_debouncing[MATRIX_ROWS];
|
||||
|
||||
static uint8_t read_rows(void);
|
||||
static void init_rows(void);
|
||||
static void unselect_cols(void);
|
||||
static void select_col(uint8_t col);
|
||||
|
||||
inline uint8_t matrix_rows(void) {
|
||||
return MATRIX_ROWS;
|
||||
}
|
||||
|
||||
inline uint8_t matrix_cols(void) {
|
||||
return MATRIX_COLS;
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_kb(void) {
|
||||
matrix_init_user();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_kb(void) {
|
||||
matrix_scan_user();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_user(void) {
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_user(void) {
|
||||
}
|
||||
|
||||
void matrix_init(void) {
|
||||
// initialize row and col
|
||||
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) {
|
||||
for (uint8_t col = 0; col < MATRIX_COLS; col++) {
|
||||
select_col(col);
|
||||
_delay_us(3);
|
||||
uint8_t rows = read_rows();
|
||||
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
|
||||
bool prev_bit = matrix_debouncing[row] & ((matrix_row_t)1<<col);
|
||||
bool curr_bit = rows & (1<<row);
|
||||
if (prev_bit != curr_bit) {
|
||||
matrix_debouncing[row] ^= ((matrix_row_t)1<<col);
|
||||
debouncing = DEBOUNCING_DELAY;
|
||||
}
|
||||
}
|
||||
unselect_cols();
|
||||
}
|
||||
|
||||
if (debouncing) {
|
||||
if (--debouncing) {
|
||||
_delay_ms(1);
|
||||
} else {
|
||||
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
||||
matrix[i] = matrix_debouncing[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
matrix_scan_quantum();
|
||||
return 1;
|
||||
}
|
||||
|
||||
bool matrix_is_modified(void) {
|
||||
if (debouncing)
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
}
|
||||
|
||||
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 0123456789ABCDEF\n");
|
||||
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
|
||||
xprintf("%02X: %032lb\n", row, bitrev32(matrix_get_row(row)));
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
/* Row pin configuration
|
||||
*
|
||||
* row: 0 1 2 3 4 5
|
||||
* pin: C7 B1 B2 C6 B4 B5
|
||||
*
|
||||
*/
|
||||
static void init_rows(void)
|
||||
{
|
||||
DDRC &= ~0b11000000;
|
||||
DDRB &= ~0b00110110;
|
||||
PORTC |= 0b11000000;
|
||||
PORTB |= 0b00110110;
|
||||
}
|
||||
|
||||
static uint8_t read_rows(void) {
|
||||
return (PINC&(1<<PC7) ? 0 : (1<<0)) |
|
||||
(PINB&(1<<PB1) ? 0 : (1<<1)) |
|
||||
(PINB&(1<<PB2) ? 0 : (1<<2)) |
|
||||
(PINC&(1<<PC6) ? 0 : (1<<3)) |
|
||||
(PINB&(1<<PB4) ? 0 : (1<<4)) |
|
||||
(PINB&(1<<PB5) ? 0 : (1<<5));
|
||||
}
|
||||
|
||||
/* Row pin configuration
|
||||
* pin: D3 D7 D6 D5 D4
|
||||
* row: off 0 x x x x
|
||||
* 0 1 0 0 0 0
|
||||
* 1 1 0 0 0 1
|
||||
* 2 1 0 0 1 0
|
||||
* 3 1 0 0 1 1
|
||||
* 4 1 0 1 0 0
|
||||
* 5 1 0 1 0 1
|
||||
* 6 1 0 1 1 0
|
||||
* 7 1 0 1 1 1
|
||||
* 8 1 1 0 0 0
|
||||
* 9 1 1 0 0 1
|
||||
* 10 1 1 0 1 0
|
||||
* 11 1 1 0 1 1
|
||||
* 12 1 1 1 0 0
|
||||
* 13 1 1 1 0 1
|
||||
* 14 1 1 1 1 0
|
||||
* 15 1 1 1 1 1
|
||||
*/
|
||||
static void unselect_cols(void)
|
||||
{
|
||||
// output high(DDR:1, PORT:1) to unselect
|
||||
DDRB |= (1 << PD3);
|
||||
PORTB |= (1 << PD3);
|
||||
}
|
||||
|
||||
static void select_col(uint8_t col) {
|
||||
DDRD |= (1<<PD3 | 1<<PD4 | 1<<PD5 | 1<<PD6 | 1<<PD7);
|
||||
|
||||
PORTD &= ~(1<<PD3);
|
||||
|
||||
if (col & (1<<0)) {
|
||||
PORTD |= (1<<PD4);
|
||||
}
|
||||
else {
|
||||
PORTD &= ~(1<<PD4);
|
||||
}
|
||||
if (col & (1<<1)) {
|
||||
PORTD |= (1<<PD5);
|
||||
}
|
||||
else {
|
||||
PORTD &= ~(1<<PD5);
|
||||
}
|
||||
if (col & (1<<2)) {
|
||||
PORTD |= (1<<PD6);
|
||||
}
|
||||
else {
|
||||
PORTD &= ~(1<<PD6);
|
||||
}
|
||||
if (col & (1<<3)) {
|
||||
PORTD |= (1<<PD7);
|
||||
}
|
||||
else {
|
||||
PORTD &= ~(1<<PD7);
|
||||
}
|
||||
}
|
16
keyboards/al1/readme.md
Normal file
16
keyboards/al1/readme.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# TriangleLabs AL1
|
||||
|
||||

|
||||
|
||||
Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin), [Olivia](https://github.com/olivia)
|
||||
Hardware Supported: AL1 PCB
|
||||
Hardware Availability: [GroupBuy](https://geekhack.org/index.php?topic=93258.0)
|
||||
|
||||
Ported from [TriangleLab](https://github.com/TriangleLab)'s repo: https://github.com/TriangleLab/AL1-Firmware/tree/master/keyboards/al1
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make al1:default
|
||||
make al1:splitbs
|
||||
|
||||
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.
|
71
keyboards/al1/rules.mk
Normal file
71
keyboards/al1/rules.mk
Normal file
@@ -0,0 +1,71 @@
|
||||
# MCU name
|
||||
#MCU = at90usb1286
|
||||
MCU = atmega32u4
|
||||
|
||||
# Processor frequency.
|
||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||
# automatically to create a 32-bit value in your source code.
|
||||
#
|
||||
# This will be an integer division of F_USB below, as it is sourced by
|
||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||
# does not *change* the processor frequency - it should merely be updated to
|
||||
# reflect the processor speed set externally so that the code can use accurate
|
||||
# software delays.
|
||||
F_CPU = 16000000
|
||||
|
||||
|
||||
#
|
||||
# LUFA specific
|
||||
#
|
||||
# Target architecture (see library "Board Types" documentation).
|
||||
ARCH = AVR8
|
||||
|
||||
# Input clock frequency.
|
||||
# This will define a symbol, F_USB, in all source code files equal to the
|
||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||
# at the end, this will be done automatically to create a 32-bit value in your
|
||||
# source code.
|
||||
#
|
||||
# If no clock division is performed on the input clock inside the AVR (via the
|
||||
# CPU clock adjust registers or the clock 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 = no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = yes # Console for debug(+400)
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
NKRO_ENABLE = no # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
|
||||
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||
|
||||
CUSTOM_MATRIX = yes
|
||||
SRC += matrix.c
|
1
keyboards/amj40/keymaps/jetpacktuxedo/config.h
Normal file
1
keyboards/amj40/keymaps/jetpacktuxedo/config.h
Normal file
@@ -0,0 +1 @@
|
||||
#define PERMISSIVE_HOLD
|
77
keyboards/atreus/keymaps/yttyx/README.md
Normal file
77
keyboards/atreus/keymaps/yttyx/README.md
Normal file
@@ -0,0 +1,77 @@
|
||||
# Overview
|
||||
|
||||
A Balance 12 layout for the Atreus keyboard.
|
||||
|
||||
Balance 12 was created by Sasha Viminitz. Please see [this page](https://mathematicalmulticore.wordpress.com/the-keyboard-layout-project/)
|
||||
for some background on the design of the layout.
|
||||
|
||||
* The variant used here is a mirror of the original for left-handers
|
||||
* The central column of punctuation keys has been moved elsewhere
|
||||
* Home positions for the left and right forefingers are *T* and *A* respectively
|
||||
|
||||
## To build/flash
|
||||
|
||||
> make atreus:yttyx:avrdude
|
||||
|
||||
## Layers
|
||||
|
||||
### Base:
|
||||
|
||||
.----------------------------------. .------------------------------.
|
||||
| P | L | C | D | W | | U | O | Y | K | Q |
|
||||
+------+------+------+-----+-------| |------+-----+-----+-----+-----|
|
||||
| N | R | S | T | M | | A | E | I | H | V |
|
||||
+------+------+------+-----+-------| |------+-----+-----+-----+-----|
|
||||
| Z | J | F | G | B | | , | . | ; | X | - |
|
||||
+------+------+------+-----+-------+---------+------+-----+-----+-----+-----|
|
||||
| Shft | Ctl | Alt | BS | Space | L1 | R1 | Shft | R2 | Win | Ctl | Alt |
|
||||
'---------------------------------------------------------------------------'
|
||||
|
||||
### L1:
|
||||
|
||||
.---------------------------------. .--------------------------------.
|
||||
| 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 |
|
||||
|------+------+------+----+-------| |------+----+-----+------+-------|
|
||||
| Tab | ? | = | - | _ | | ' | " | + | * | Enter |
|
||||
|------+------+------+----+-------| |------+----+-----+------+-------|
|
||||
| Esc | ! | & | | | | , | . | ; | | - |
|
||||
|------+------+------+----+-------+---------+------+----+-----+------+-------|
|
||||
| Shft | Ctrl | Alt | Bk | Space | L1 | R1 | Shft | R2 | Sup | Ctrl | Alt |
|
||||
'----------------------------------------------------------------------------'
|
||||
|
||||
### R1:
|
||||
|
||||
.---------------------------------. .-------------------------------.
|
||||
| < | > | { | } | @ | | $ | <20> | | | R3 |
|
||||
+------+------+-----+-----|-------| |------+----+-----+------+------|
|
||||
| [ | ] | ( | ) | # | | ' | " | ~ | ` | Caps |
|
||||
|------+------+-----+-----+-------| |------+----+-----+------+------|
|
||||
| / | \ | ^ | | | % | | , | . | ; | | PScn |
|
||||
|------+------+-----+-----+-------+---------+------+----+-----+------+------|
|
||||
| Shft | Ctrl | Alt | Del | Space | L1 | R1 | Shft | R2 | Sup | Ctrl | Alt |
|
||||
'---------------------------------------------------------------------------'
|
||||
|
||||
### R2:
|
||||
|
||||
.-----------------------------------. .--------------------.-----------------.
|
||||
| F12 | F11 | F10 | F9 | Copy | | Home | Up | End | PgUp | Insert |
|
||||
|------+------+------+------+-------| |------+------+------+------+----------|
|
||||
| F8 | F7 | F6 | F5 | Paste | | Left | Down | Right| PgDn | Enter |
|
||||
|------+------+------+------+-------| |------+------+------+------+----------|
|
||||
| F4 | F3 | F2 | F1 | Cut | | ^Tab | | Tab | | |
|
||||
|------+------+------+------+-------+---------+------+------+------+------+----------|
|
||||
| Shft | Ctrl | Alt | Del | Undo | L1 | R1 | Shft | R2 | Sup | Ctrl | WinRight |
|
||||
'------------------------------------------------------------------------------------'
|
||||
|
||||
### R3:
|
||||
|
||||
.----------------------------. .------------------------.
|
||||
| RESET | | | | | | | | | | R3 |
|
||||
|-------+----+-----+----+----| |----+----+----+----+----|
|
||||
| | | | | | | | | | | |
|
||||
|-------+----+-----+----+----| |----+----+----+----+----|
|
||||
| | | | | | | | | | | |
|
||||
|-------+----+-----+----+----+---------+----+----+----+----+----|
|
||||
| | | | | | | | | | | | |
|
||||
'---------------------------------------------------------------'
|
||||
|
12
keyboards/atreus/keymaps/yttyx/config.h
Normal file
12
keyboards/atreus/keymaps/yttyx/config.h
Normal file
@@ -0,0 +1,12 @@
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
#define ONESHOT_TIMEOUT 500 // Time (in ms) before the one shot key is released
|
||||
|
||||
// Disable some options to reduce firmware size
|
||||
#define NO_PRINT
|
||||
#define NO_ACTION_TAPPING
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
|
||||
#endif
|
119
keyboards/atreus/keymaps/yttyx/keymap.c
Normal file
119
keyboards/atreus/keymaps/yttyx/keymap.c
Normal file
@@ -0,0 +1,119 @@
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
enum layers {
|
||||
BASE, // Balance Twelve
|
||||
L1, // (momentary)
|
||||
R1, // (momentary)
|
||||
R2, // (momentary)
|
||||
R3 // (momentary)
|
||||
};
|
||||
|
||||
#define xxxxxxx KC_NO
|
||||
#define _______ KC_TRNS
|
||||
|
||||
// Aliases from replicaJunction's atreus layout
|
||||
#define KCX_LST LSFT(KC_TAB)
|
||||
#define KX_COPY LCTL(KC_C)
|
||||
#define KX_CUT LCTL(KC_X)
|
||||
#define KX_PAST LCTL(KC_V)
|
||||
#define KX_UNDO LCTL(KC_Z)
|
||||
|
||||
#define KX_AT LSFT(KC_QUOT)
|
||||
#define KX_PIPE LSFT(KC_NUBS)
|
||||
#define KX_WINR LSFT(LGUI(KC_RGHT)) // Move window to next monitor (Windows)
|
||||
|
||||
|
||||
const uint16_t PROGMEM keymaps[][ MATRIX_ROWS ][ MATRIX_COLS ] = {
|
||||
|
||||
/* Balance Twelve mirror variant (left-handed)
|
||||
.--------------------------------. .------------------------------.
|
||||
| P | L | C | D | W | | U | O | Y | K | Q |
|
||||
+------+------+-----+----+-------| |------+----+-----+------+-----|
|
||||
| N | R | S | T | M | | A | E | I | H | V |
|
||||
+------+------+-----+----+-------| |------+----+-----+------+-----|
|
||||
| Z | J | F | G | B | | , | . | ; | X | - |
|
||||
+------+------+-----+----+-------+---------+------+----+-----+------+-----|
|
||||
| Shft | Ctrl | Alt | Bk | Space | L1 | R1 | Shft | R2 | Win | Ctrl | Alt |
|
||||
'-------------------------------------------------------------------------'
|
||||
*/
|
||||
[BASE] = LAYOUT(
|
||||
KC_P, KC_L, KC_C, KC_D, KC_W, KC_U, KC_O, KC_Y, KC_K, KC_Q,
|
||||
KC_N, KC_R, KC_S, KC_T, KC_M, KC_A, KC_E, KC_I, KC_H, KC_V,
|
||||
KC_Z, KC_J, KC_F, KC_G, KC_B, KC_COMM, KC_DOT, KC_SCLN, KC_X, KC_MINS,
|
||||
KC_LSFT, KC_LCTL, KC_LALT, KC_BSPC, KC_SPC, MO(L1), MO(R1), OSM(MOD_LSFT), MO(R2), KC_LWIN, KC_RCTL, KC_RALT
|
||||
),
|
||||
|
||||
/* L1
|
||||
.---------------------------------. .--------------------------------.
|
||||
| 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 |
|
||||
|------+------+------+----+-------| |------+----+-----+------+-------|
|
||||
| Tab | ? | = | - | _ | | ' | " | + | * | Enter |
|
||||
|------+------+------+----+-------| |------+----+-----+------+-------|
|
||||
| Esc | ! | & | | | | , | . | ; | | - |
|
||||
|------+------+------+----+-------+---------+------+----+-----+------+-------|
|
||||
| Shft | Ctrl | Alt | Bk | Space | L1 | R1 | Shft | R2 | Sup | Ctrl | Alt |
|
||||
'----------------------------------------------------------------------------'
|
||||
*/
|
||||
[L1] = LAYOUT(
|
||||
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,
|
||||
KC_TAB, KC_QUES, KC_EQL, KC_MINS, KC_UNDS, KC_QUOT, LSFT(KC_2), KC_PLUS, KC_ASTR, KC_ENT,
|
||||
KC_ESC, KC_EXLM, KC_AMPR, xxxxxxx, xxxxxxx, _______, _______, _______, xxxxxxx, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
/* R1
|
||||
.---------------------------------. .-------------------------------.
|
||||
| < | > | { | } | @ | | $ | <20> | | | R3 |
|
||||
+------+------+-----+-----|-------| |------+----+-----+------+------|
|
||||
| [ | ] | ( | ) | # | | ' | " | ~ | ` | Caps |
|
||||
|------+------+-----+-----+-------| |------+----+-----+------+------|
|
||||
| / | \ | ^ | | | % | | , | . | ; | | PScn |
|
||||
|------+------+-----+-----+-------+---------+------+----+-----+------+------|
|
||||
| Shft | Ctrl | Alt | Del | Space | L1 | R1 | Shft | R2 | Sup | Ctrl | Alt |
|
||||
'---------------------------------------------------------------------------'
|
||||
*/
|
||||
[R1] = LAYOUT(
|
||||
KC_LABK, KC_RABK, KC_LCBR, KC_RCBR, KX_AT, KC_DLR, KC_HASH, xxxxxxx, xxxxxxx, MO(R3),
|
||||
KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, KC_NUHS, KC_QUOT, LSFT(KC_2), LSFT(KC_NUHS), KC_GRV, KC_CAPS,
|
||||
KC_SLSH, KC_NUBS, KC_CIRC, KX_PIPE, KC_PERC, _______, _______, _______, xxxxxxx, KC_PSCR,
|
||||
_______, _______, _______, KC_DEL, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
/* R2
|
||||
.-----------------------------------. .--------------------.-----------------.
|
||||
| F12 | F11 | F10 | F9 | Copy | | Home | Up | End | PgUp | Insert |
|
||||
|------+------+------+------+-------| |------+------+------+------+----------|
|
||||
| F8 | F7 | F6 | F5 | Paste | | Left | Down | Right| PgDn | Enter |
|
||||
|------+------+------+------+-------| |------+------+------+------+----------|
|
||||
| F4 | F3 | F2 | F1 | Cut | | ^Tab | | Tab | | |
|
||||
|------+------+------+------+-------+---------+------+------+------+------+----------|
|
||||
| Shft | Ctrl | Alt | Del | Undo | L1 | R1 | Shft | R2 | Sup | Ctrl | WinRight |
|
||||
'------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[R2] = LAYOUT(
|
||||
KC_F12, KC_F11, KC_F10, KC_F9, KX_COPY, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_INS,
|
||||
KC_F8, KC_F7, KC_F6, KC_F5, KX_PAST, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_ENT,
|
||||
KC_F4, KC_F3, KC_F2, KC_F1, KX_CUT, KCX_LST, xxxxxxx, KC_TAB, xxxxxxx, xxxxxxx,
|
||||
_______, _______, _______, KC_DEL, KX_UNDO, _______, _______, _______, _______, _______, _______, KX_WINR
|
||||
),
|
||||
|
||||
/* R3
|
||||
.----------------------------. .------------------------.
|
||||
| RESET | | | | | | | | | | R3 |
|
||||
|-------+----+-----+----+----| |----+----+----+----+----|
|
||||
| | | | | | | | | | | |
|
||||
|-------+----+-----+----+----| |----+----+----+----+----|
|
||||
| | | | | | | | | | | |
|
||||
|-------+----+-----+----+----+---------+----+----+----+----+----|
|
||||
| | | | | | | | | | | | |
|
||||
'---------------------------------------------------------------'
|
||||
*/
|
||||
[R3] = LAYOUT(
|
||||
RESET, 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
|
||||
)
|
||||
};
|
||||
|
43
keyboards/bfo9000/keymaps/andylikescandy6x18/config.h
Normal file
43
keyboards/bfo9000/keymaps/andylikescandy6x18/config.h
Normal file
@@ -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
|
87
keyboards/bfo9000/keymaps/andylikescandy6x18/keymap.c
Normal file
87
keyboards/bfo9000/keymaps/andylikescandy6x18/keymap.c
Normal file
@@ -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;
|
||||
};
|
@@ -49,7 +49,7 @@
|
||||
// This a shortcut to help you visually see your layout.
|
||||
// The first section contains all of the arguements
|
||||
// The second converts the arguments into a two-dimensional array
|
||||
#define KC_KEYMAP( \
|
||||
#define LAYOUT_kc( \
|
||||
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, \
|
||||
k12, k13, k14, k15, k16, k17, k18, k19, k20, k21, k22, k23, \
|
||||
k24, k25, k26, k27, k28, k29, k30, k31, k32, k33, k34, k35, \
|
||||
@@ -64,7 +64,7 @@
|
||||
{ KC_##k29, KC_##k41, KC_##k03, KC_##k40, KC_##k37, KC_NO, KC_##k30, KC_##k43, KC_##k08, KC_##k10, KC_##k46, KC_NO }, \
|
||||
}
|
||||
|
||||
#define KEYMAP( \
|
||||
#define LAYOUT( \
|
||||
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, \
|
||||
k12, k13, k14, k15, k16, k17, k18, k19, k20, k21, k22, k23, \
|
||||
k24, k25, k26, k27, k28, k29, k30, k31, k32, k33, k34, k35, \
|
||||
|
13
keyboards/chimera_ergo/info.json
Normal file
13
keyboards/chimera_ergo/info.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"keyboard_name": "Chimera Ergo",
|
||||
"url": "",
|
||||
"maintainer": "qmk",
|
||||
"width": 13,
|
||||
"height": 6,
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"key_count": 52,
|
||||
"layout": [{"label":"k00", "x":0, "y":1}, {"label":"k01", "x":1, "y":0.75}, {"label":"k02", "x":2, "y":0.25}, {"label":"k03", "x":3, "y":0}, {"label":"k04", "x":4, "y":0.25}, {"label":"k05", "x":5, "y":0.5}, {"label":"k06", "x":7, "y":0.5}, {"label":"k07", "x":8, "y":0.25}, {"label":"k08", "x":9, "y":0}, {"label":"k09", "x":10, "y":0.25}, {"label":"k10", "x":11, "y":0.75}, {"label":"k11", "x":12, "y":1}, {"label":"k12", "x":0, "y":2}, {"label":"k13", "x":1, "y":1.75}, {"label":"k14", "x":2, "y":1.25}, {"label":"k15", "x":3, "y":1}, {"label":"k16", "x":4, "y":1.25}, {"label":"k17", "x":5, "y":1.5}, {"label":"k18", "x":7, "y":1.5}, {"label":"k19", "x":8, "y":1.25}, {"label":"k20", "x":9, "y":1}, {"label":"k21", "x":10, "y":1.25}, {"label":"k22", "x":11, "y":1.75}, {"label":"k23", "x":12, "y":2}, {"label":"k24", "x":0, "y":3}, {"label":"k25", "x":1, "y":2.75}, {"label":"k26", "x":2, "y":2.25}, {"label":"k27", "x":3, "y":2}, {"label":"k28", "x":4, "y":2.25}, {"label":"k29", "x":5, "y":2.5}, {"label":"k30", "x":7, "y":2.5}, {"label":"k31", "x":8, "y":2.25}, {"label":"k32", "x":9, "y":2}, {"label":"k33", "x":10, "y":2.25}, {"label":"k34", "x":11, "y":2.75}, {"label":"k35", "x":12, "y":3}, {"label":"k36", "x":0, "y":4}, {"label":"k37", "x":1, "y":3.75}, {"label":"k38", "x":2, "y":3.25}, {"label":"k39", "x":3, "y":3}, {"label":"k40", "x":4, "y":3.25}, {"label":"k41", "x":5, "y":3.5}, {"label":"k42", "x":7, "y":3.5}, {"label":"k43", "x":8, "y":3.25}, {"label":"k44", "x":9, "y":3}, {"label":"k45", "x":10, "y":3.25}, {"label":"k46", "x":11, "y":3.75}, {"label":"k47", "x":12, "y":4}, {"label":"k48", "x":4, "y":4.75}, {"label":"k49", "x":5, "y":5}, {"label":"k50", "x":7, "y":5}, {"label":"k51", "x":8, "y":4.75}]
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,7 +1,7 @@
|
||||
// this is the style you want to emulate.
|
||||
// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
|
||||
|
||||
#include "chimera_ergo.h"
|
||||
#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.
|
||||
@@ -9,30 +9,29 @@
|
||||
// entirely and just use numbers.
|
||||
enum chimera_ergo_layers
|
||||
{
|
||||
_QWERTY,
|
||||
_CAPS,
|
||||
_NUMPAD,
|
||||
_SYMBOLS,
|
||||
_MACROS,
|
||||
_NAV
|
||||
_QWERTY,
|
||||
_CAPS,
|
||||
_NUMPAD,
|
||||
_SYMBOLS,
|
||||
_MACROS,
|
||||
_NAV
|
||||
};
|
||||
|
||||
#define KC_NMPD TG(_NUMPAD)
|
||||
#define KC_SYMB TG(_SYMBOLS)
|
||||
#define KC_SPFN LT(_NAV,KC_EQL)
|
||||
#define KC_SCTL MT(MOD_LCTL, KC_LBRC)
|
||||
#define KC_SCTR MT(MOD_LCTL, KC_RBRC)
|
||||
#define KC_SPLT MT(MOD_LALT, KC_MINS)
|
||||
#define KC_SPRT MT(MOD_LALT, KC_1)
|
||||
#define KC_GBRC MT(MOD_RGUI, KC_RBRC)
|
||||
#define KC_GQOT MT(MOD_LGUI, KC_QUOT)
|
||||
#define KC_MESC LT(_MACROS, KC_ESC)
|
||||
#define KC_INCL M(0)
|
||||
#define KC_PULL M(1)
|
||||
#define KC_PUSH M(2)
|
||||
#define KC_SCAP M(3)
|
||||
#define KC_SCOF M(4)
|
||||
#define KC_CAD LALT(LCTL(KC_DEL))
|
||||
#define SC_NMPD TG(_NUMPAD)
|
||||
#define SC_SYMB TG(_SYMBOLS)
|
||||
#define SC_SPFN LT(_NAV,KC_EQL)
|
||||
#define SC_SCTL MT(MOD_LCTL, KC_LBRC)
|
||||
#define SC_SCTR MT(MOD_LCTL, KC_RBRC)
|
||||
#define SC_SPLT MT(MOD_LALT, KC_MINS)
|
||||
#define SC_SPRT MT(MOD_LALT, KC_1)
|
||||
#define SC_GBRC MT(MOD_RGUI, KC_RBRC)
|
||||
#define SC_MESC LT(_MACROS, KC_ESC)
|
||||
#define SC_INCL M(0)
|
||||
#define SC_PULL M(1)
|
||||
#define SC_PUSH M(2)
|
||||
#define SC_SCAP M(3)
|
||||
#define SC_SCOF M(4)
|
||||
#define SC_CAD LALT(LCTL(KC_DEL))
|
||||
|
||||
#define LONGPRESS_DELAY 150
|
||||
//#define LAYER_TOGGLE_DELAY 300
|
||||
@@ -40,95 +39,57 @@ enum chimera_ergo_layers
|
||||
// Fillers to make layering more clear
|
||||
#define _______ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
#define KC_ KC_TRNS
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[_QWERTY] = KC_KEYMAP(
|
||||
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||
LBRC, 1 ,SCTL,SPLT,SPFN, 5 , 6 ,GBRC,SPRT,SCTR, 0 ,RBRC,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
MESC, Q , W , E , R , T , Y , U , I , O , P ,QUOT,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
TAB , A , S , D , F , G , H , J , K , L ,SCLN,ENT ,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
LSPO, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH,RSPC,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
NMPD,BSPC, SPC ,SYMB
|
||||
// \------------------+----+----/ \---+----+----+--------------/
|
||||
[_QWERTY] = LAYOUT(
|
||||
KC_LBRC, KC_1, SC_SCTL, SC_SPLT, SC_SPFN, KC_5, KC_6, SC_GBRC, SC_SPRT, SC_SCTR, KC_0, KC_RBRC,
|
||||
SC_MESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT,
|
||||
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
|
||||
KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC,
|
||||
SC_NMPD, KC_BSPC, KC_SPC, SC_SYMB
|
||||
),
|
||||
|
||||
[_CAPS] = KC_KEYMAP(
|
||||
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||
,UNDS, , , , , , , , , , ,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
, , , , , , , , , , , ,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
, , , , , , , , , ,COLN, ,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
SCOF, , , , , , , , , , ,SCOF,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
, , ,
|
||||
// \------------------+----+----/ \---+----+----+--------------/
|
||||
[_CAPS] = LAYOUT(
|
||||
_______, KC_UNDS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_COLN, _______,
|
||||
SC_SCOF, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, SC_SCOF,
|
||||
_______, _______, _______, _______
|
||||
),
|
||||
|
||||
[_NUMPAD] = KC_KEYMAP(
|
||||
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||
, , , , , , , , , ,MINS, ,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
, ,COLN, , , , , 7 , 8 , 9 ,ASTR, ,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
, ,DOT , , , , , 4 , 5 , 6 ,PLUS, ,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
, , , , , , , 1 , 2 , 3 ,SLSH, ,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
, , , 0
|
||||
// \------------------+----+----/ \---+----+----+--------------/
|
||||
[_NUMPAD] = LAYOUT(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MINS, _______,
|
||||
_______, _______, KC_COLN, _______, _______, _______, _______, KC_7, KC_8, KC_9, KC_ASTR, _______,
|
||||
_______, _______, KC_DOT , _______, _______, _______, _______, KC_4, KC_5, KC_6, KC_PLUS, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, KC_SLSH, _______,
|
||||
_______, _______, _______, KC_0
|
||||
),
|
||||
|
||||
[_SYMBOLS] = KC_KEYMAP(
|
||||
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||
, , , , , , , , , , , ,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSLS,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
F1 , F2 , F3 , F4 , F5 , F6 , TILD,EQL ,UNDS,LCBR,RCBR, ,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
F7 , F8 , F9 ,F10 ,F11 ,F12 , GRV ,PLUS,MINS,LBRC,RBRC, ,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
PIPE, , ,
|
||||
// \------------------+----+----/ \---+----+----+--------------/
|
||||
[_SYMBOLS] = LAYOUT(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSLS,
|
||||
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_TILD, KC_EQL, KC_UNDS, KC_LCBR, KC_RCBR, _______,
|
||||
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_GRV, KC_PLUS, KC_MINS, KC_LBRC, KC_RBRC, _______,
|
||||
KC_PIPE, _______, _______, _______
|
||||
),
|
||||
|
||||
[_MACROS] = KC_KEYMAP(
|
||||
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||
, , , , , , , , , , , ,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
, , , , , , , ,INCL, , , ,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
, , ,CAD , , , , , , , , ,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
SCAP, , , , , , , ,PULL,PUSH, , ,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
, , ,
|
||||
// \------------------+----+----/ \---+----+----+--------------/
|
||||
[_MACROS] = LAYOUT(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, SC_INCL, _______, _______, _______,
|
||||
_______, _______, _______, SC_CAD, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
SC_SCAP, _______, _______, _______, _______, _______, _______, _______, SC_PULL, SC_PUSH, _______, _______,
|
||||
_______, _______, _______, _______
|
||||
),
|
||||
|
||||
[_NAV] = KC_KEYMAP(
|
||||
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||
, , , , , , , , , , , ,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
, , , , , , ,PGUP, UP ,PGDN,PSCR, ,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
, , , , , , ,LEFT,DOWN,RGHT, , ,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
, , , , , , , , , , , ,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
,DEL , ,
|
||||
// \------------------+----+----/ \---+----+----+--------------/
|
||||
[_NAV] = LAYOUT(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, KC_DEL, _______, _______
|
||||
),
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -175,18 +136,18 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
uint8_t layer = biton32(layer_state);
|
||||
|
||||
|
||||
switch (layer) {
|
||||
case _QWERTY:
|
||||
set_led_green;
|
||||
break;
|
||||
case _QWERTY:
|
||||
set_led_green;
|
||||
break;
|
||||
case _CAPS:
|
||||
set_led_white;
|
||||
break;
|
||||
set_led_white;
|
||||
break;
|
||||
case _NUMPAD:
|
||||
set_led_blue;
|
||||
break;
|
||||
@@ -194,11 +155,11 @@ void matrix_scan_user(void) {
|
||||
set_led_red;
|
||||
break;
|
||||
case _NAV:
|
||||
set_led_magenta;
|
||||
break;
|
||||
set_led_magenta;
|
||||
break;
|
||||
case _MACROS:
|
||||
set_led_cyan;
|
||||
break;
|
||||
set_led_cyan;
|
||||
break;
|
||||
default:
|
||||
set_led_green;
|
||||
break;
|
||||
|
@@ -5,10 +5,7 @@
|
||||
A split wireless 40% ergonomic keyboard
|
||||
|
||||
Keyboard Maintainer: [William Wilson](https://github.com/GlenPickle)
|
||||
|
||||
|
||||
Hardware Supported: Chimera Ergo PCB, WaveShare core nRF51822
|
||||
|
||||
Hardware Supported: Chimera Ergo PCB, WaveShare core nRF51822
|
||||
Hardware Availability: [Gerbers](https://github.com/GlenPickle/Chimera/tree/master/ergo/gerbers)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
@@ -6,7 +6,7 @@
|
||||
"width": 3,
|
||||
"height": 3,
|
||||
"layouts": {
|
||||
"2017": {
|
||||
"LAYOUT": {
|
||||
"key_count": 6,
|
||||
"layout": [{"x":1, "y":0}, {"x":0.5, "y":1}, {"x":1.5, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}]
|
||||
}
|
||||
|
3
keyboards/clueboard/keymaps/xyverz/config.h
Normal file
3
keyboards/clueboard/keymaps/xyverz/config.h
Normal file
@@ -0,0 +1,3 @@
|
||||
#include "../config.h"
|
||||
|
||||
#define TAPPING_TERM 600 // ms
|
43
keyboards/cod67/cod67.c
Normal file
43
keyboards/cod67/cod67.c
Normal file
@@ -0,0 +1,43 @@
|
||||
/* Copyright 2018 MechMerlin
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "cod67.h"
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
// put your keyboard start-up code here
|
||||
// runs once when the firmware starts up
|
||||
|
||||
matrix_init_user();
|
||||
}
|
||||
|
||||
void matrix_scan_kb(void) {
|
||||
// put your looping keyboard code here
|
||||
// runs every cycle (a lot)
|
||||
|
||||
matrix_scan_user();
|
||||
}
|
||||
|
||||
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||
// put your per-action keyboard code here
|
||||
// runs for every action, just before processing by the firmware
|
||||
|
||||
return process_record_user(keycode, record);
|
||||
}
|
||||
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
||||
|
||||
led_set_user(usb_led);
|
||||
}
|
36
keyboards/cod67/cod67.h
Normal file
36
keyboards/cod67/cod67.h
Normal file
@@ -0,0 +1,36 @@
|
||||
/* Copyright 2018 MechMerlin
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef COD67_H
|
||||
#define COD67_H
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#define LAYOUT( \
|
||||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
|
||||
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
|
||||
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \
|
||||
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \
|
||||
K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D \
|
||||
) \
|
||||
{ \
|
||||
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \
|
||||
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \
|
||||
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \
|
||||
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \
|
||||
{ K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D }, \
|
||||
}
|
||||
|
||||
#endif
|
189
keyboards/cod67/config.h
Normal file
189
keyboards/cod67/config.h
Normal file
@@ -0,0 +1,189 @@
|
||||
/*
|
||||
Copyright 2018 MechMerlin
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <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 0x0000
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER Gray
|
||||
#define PRODUCT cod67
|
||||
#define DESCRIPTION 60% Custom Keyboard
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 5
|
||||
#define MATRIX_COLS 14
|
||||
|
||||
/*
|
||||
* Keyboard Matrix Assignments
|
||||
*
|
||||
* Change this to how you wired your keyboard
|
||||
* COLS: AVR pins used for columns, left to right
|
||||
* ROWS: AVR pins used for rows, top to bottom
|
||||
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
||||
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
||||
*
|
||||
*/
|
||||
#define MATRIX_ROW_PINS { C7, C6, B6, B5, B4 }
|
||||
#define MATRIX_COL_PINS { D7, F7, F6, F5, F4, F1, F0, E6, B0, B7, D0, D1, D2, D3 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
#define BACKLIGHT_PIN D4
|
||||
#define BACKLIGHT_LEVELS 3
|
||||
|
||||
|
||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||
#define DEBOUNCING_DELAY 5
|
||||
|
||||
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
/* number of backlight levels */
|
||||
|
||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||
#define LOCKING_SUPPORT_ENABLE
|
||||
/* Locking resynchronize hack */
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
|
||||
* This is userful for the Windows task manager shortcut (ctrl+shift+esc).
|
||||
*/
|
||||
// #define GRAVE_ESC_CTRL_OVERRIDE
|
||||
|
||||
/*
|
||||
* Force NKRO
|
||||
*
|
||||
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
|
||||
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
|
||||
* makefile for this to work.)
|
||||
*
|
||||
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
|
||||
* until the next keyboard reset.
|
||||
*
|
||||
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is
|
||||
* fully operational during normal computer usage.
|
||||
*
|
||||
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
|
||||
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
|
||||
* bootmagic, NKRO mode will always be enabled until it is toggled again during a
|
||||
* power-up.
|
||||
*
|
||||
*/
|
||||
//#define FORCE_NKRO
|
||||
|
||||
/*
|
||||
* Magic Key Options
|
||||
*
|
||||
* Magic keys are hotkey commands that allow control over firmware functions of
|
||||
* the keyboard. They are best used in combination with the HID Listen program,
|
||||
* found here: https://www.pjrc.com/teensy/hid_listen.html
|
||||
*
|
||||
* The options below allow the magic key functionality to be changed. This is
|
||||
* useful if your keyboard/keypad is missing keys and you want magic key support.
|
||||
*
|
||||
*/
|
||||
|
||||
/* key combination for magic key command */
|
||||
#define IS_COMMAND() ( \
|
||||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||
)
|
||||
|
||||
/* control how magic key switches layers */
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
|
||||
|
||||
/* override magic key keymap */
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
|
||||
//#define MAGIC_KEY_HELP1 H
|
||||
//#define MAGIC_KEY_HELP2 SLASH
|
||||
//#define MAGIC_KEY_DEBUG D
|
||||
//#define MAGIC_KEY_DEBUG_MATRIX X
|
||||
//#define MAGIC_KEY_DEBUG_KBD K
|
||||
//#define MAGIC_KEY_DEBUG_MOUSE M
|
||||
//#define MAGIC_KEY_VERSION V
|
||||
//#define MAGIC_KEY_STATUS S
|
||||
//#define MAGIC_KEY_CONSOLE C
|
||||
//#define MAGIC_KEY_LAYER0_ALT1 ESC
|
||||
//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
|
||||
//#define MAGIC_KEY_LAYER0 0
|
||||
//#define MAGIC_KEY_LAYER1 1
|
||||
//#define MAGIC_KEY_LAYER2 2
|
||||
//#define MAGIC_KEY_LAYER3 3
|
||||
//#define MAGIC_KEY_LAYER4 4
|
||||
//#define MAGIC_KEY_LAYER5 5
|
||||
//#define MAGIC_KEY_LAYER6 6
|
||||
//#define MAGIC_KEY_LAYER7 7
|
||||
//#define MAGIC_KEY_LAYER8 8
|
||||
//#define MAGIC_KEY_LAYER9 9
|
||||
//#define MAGIC_KEY_BOOTLOADER PAUSE
|
||||
//#define MAGIC_KEY_LOCK CAPS
|
||||
//#define MAGIC_KEY_EEPROM E
|
||||
//#define MAGIC_KEY_NKRO N
|
||||
//#define MAGIC_KEY_SLEEP_LED Z
|
||||
|
||||
/*
|
||||
* Feature disable options
|
||||
* These options are also useful to firmware size reduction.
|
||||
*/
|
||||
|
||||
/* disable debug print */
|
||||
//#define NO_DEBUG
|
||||
|
||||
/* disable print */
|
||||
//#define NO_PRINT
|
||||
|
||||
/* disable action features */
|
||||
//#define NO_ACTION_LAYER
|
||||
//#define NO_ACTION_TAPPING
|
||||
//#define NO_ACTION_ONESHOT
|
||||
//#define NO_ACTION_MACRO
|
||||
//#define NO_ACTION_FUNCTION
|
||||
|
||||
/*
|
||||
* MIDI options
|
||||
*/
|
||||
|
||||
/* Prevent use of disabled MIDI features in the keymap */
|
||||
//#define MIDI_ENABLE_STRICT 1
|
||||
|
||||
/* enable basic MIDI features:
|
||||
- MIDI notes can be sent when in Music mode is on
|
||||
*/
|
||||
//#define MIDI_BASIC
|
||||
|
||||
/* enable advanced MIDI features:
|
||||
- MIDI notes can be added to the keymap
|
||||
- Octave shift and transpose
|
||||
- Virtual sustain, portamento, and modulation wheel
|
||||
- etc.
|
||||
*/
|
||||
//#define MIDI_ADVANCED
|
||||
|
||||
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||
//#define MIDI_TONE_KEYCODE_OCTAVES 1
|
||||
|
||||
#endif
|
12
keyboards/cod67/info.json
Normal file
12
keyboards/cod67/info.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"keyboard_name": "COD67",
|
||||
"url": "",
|
||||
"maintainer": "qmk",
|
||||
"width": 15,
|
||||
"height": 5,
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"Shift", "x":11.25, "y":3, "w":1.75}, {"x":13, "y":3}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4}, {"label":"Win", "x":1, "y":4}, {"label":"Alt", "x":2, "y":4}, {"x":3, "y":4}, {"x":4, "y":4}, {"x":5, "y":4}, {"x":6, "y":4, "w":2}, {"x":8, "y":4}, {"x":9, "y":4}, {"x":10, "y":4}, {"label":"Alt", "x":11, "y":4}, {"label":"Win", "x":12, "y":4}, {"label":"Menu", "x":13, "y":4}, {"label":"Ctrl", "x":14, "y":4}]
|
||||
}
|
||||
}
|
||||
}
|
63
keyboards/cod67/keymaps/default/keymap.c
Normal file
63
keyboards/cod67/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,63 @@
|
||||
/* Copyright 2018 MechMerlin
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
LAYOUT(
|
||||
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
|
||||
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
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) {
|
||||
|
||||
}
|
1
keyboards/cod67/keymaps/default/readme.md
Normal file
1
keyboards/cod67/keymaps/default/readme.md
Normal file
@@ -0,0 +1 @@
|
||||
# The default keymap for cod67
|
32
keyboards/cod67/readme.md
Normal file
32
keyboards/cod67/readme.md
Normal file
@@ -0,0 +1,32 @@
|
||||
# Gray COD67
|
||||
|
||||

|
||||
|
||||
The Gray COD67 is a 60% keyboard with a modern and bold design. It features 20 RGB Underglow LED lights and a unique diffuser placement. The COD67 has the most stunning RGB light strip for a custom mechanical keyboard. It also features a center mounted USB C port.
|
||||
|
||||
There were only 75 units made worldwide.
|
||||
|
||||
Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin)
|
||||
Hardware Supported: Gray COD67
|
||||
Hardware Availability: [Zfrontier](https://en.zfrontier.com/products/cod67)
|
||||
|
||||
At this time, flashing ONLY works on Windows systems.
|
||||
|
||||
To put in bootloader mode, hold the `Esc` key while plugging in the USB cable.
|
||||
|
||||
The COD67 will show up as a drive.
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make cod67:default:bin
|
||||
|
||||
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.
|
||||
|
||||
Rename the resulting `.bin` file to `cod67.bin`.
|
||||
|
||||
Drag and drop `cod67.bin` to the drive, overwriting the previous `cod67.bin` stored on it.
|
||||
|
||||
Press the `Esc` key again to reset the board. You are now ready to type!
|
||||
|
||||
## Notes
|
||||
The backlight pin is attached to a non PWM pin `D4` so backlight is only on/off.
|
68
keyboards/cod67/rules.mk
Normal file
68
keyboards/cod67/rules.mk
Normal file
@@ -0,0 +1,68 @@
|
||||
# MCU name
|
||||
#MCU = at90usb1286
|
||||
MCU = atmega32u4
|
||||
|
||||
# Processor frequency.
|
||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||
# automatically to create a 32-bit value in your source code.
|
||||
#
|
||||
# This will be an integer division of F_USB below, as it is sourced by
|
||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||
# does not *change* the processor frequency - it should merely be updated to
|
||||
# reflect the processor speed set externally so that the code can use accurate
|
||||
# software delays.
|
||||
F_CPU = 16000000
|
||||
|
||||
|
||||
#
|
||||
# LUFA specific
|
||||
#
|
||||
# Target architecture (see library "Board Types" documentation).
|
||||
ARCH = AVR8
|
||||
|
||||
# Input clock frequency.
|
||||
# This will define a symbol, F_USB, in all source code files equal to the
|
||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||
# at the end, this will be done automatically to create a 32-bit value in your
|
||||
# source code.
|
||||
#
|
||||
# If no clock division is performed on the input clock inside the AVR (via the
|
||||
# CPU clock adjust registers or the clock 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 = no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = yes # Console for debug(+400)
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
NKRO_ENABLE = no # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
|
||||
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
30
keyboards/comet46/comet46.c
Normal file
30
keyboards/comet46/comet46.c
Normal file
@@ -0,0 +1,30 @@
|
||||
#include "comet46.h"
|
||||
|
||||
void uart_init(void) {
|
||||
SERIAL_UART_INIT();
|
||||
}
|
||||
|
||||
void led_init(void) {
|
||||
DDRD |= (1<<1);
|
||||
PORTD |= (1<<1);
|
||||
DDRF |= (1<<4) | (1<<5);
|
||||
PORTF |= (1<<4) | (1<<5);
|
||||
}
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
// put your keyboard start-up code here
|
||||
// runs once when the firmware starts up
|
||||
matrix_init_user();
|
||||
uart_init();
|
||||
led_init();
|
||||
}
|
||||
|
||||
void matrix_scan_kb(void) {
|
||||
// put your looping keyboard code here
|
||||
// runs every cycle (a lot)
|
||||
matrix_scan_user();
|
||||
}
|
||||
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
|
||||
}
|
79
keyboards/comet46/comet46.h
Normal file
79
keyboards/comet46/comet46.h
Normal file
@@ -0,0 +1,79 @@
|
||||
#ifndef COMET46_H
|
||||
#define COMET46_H
|
||||
|
||||
#include "quantum.h"
|
||||
#include "matrix.h"
|
||||
#include "backlight.h"
|
||||
#include <stddef.h>
|
||||
|
||||
#define red_led_off PORTF |= (1<<5)
|
||||
#define red_led_on PORTF &= ~(1<<5)
|
||||
#define blu_led_off PORTF |= (1<<4)
|
||||
#define blu_led_on PORTF &= ~(1<<4)
|
||||
#define grn_led_off PORTD |= (1<<1)
|
||||
#define grn_led_on PORTD &= ~(1<<1)
|
||||
|
||||
#define set_led_off red_led_off; grn_led_off; blu_led_off
|
||||
#define set_led_red red_led_on; grn_led_off; blu_led_off
|
||||
#define set_led_blue red_led_off; grn_led_off; blu_led_on
|
||||
#define set_led_green red_led_off; grn_led_on; blu_led_off
|
||||
#define set_led_yellow red_led_on; grn_led_on; blu_led_off
|
||||
#define set_led_magenta red_led_on; grn_led_off; blu_led_on
|
||||
#define set_led_cyan red_led_off; grn_led_on; blu_led_on
|
||||
#define set_led_white red_led_on; grn_led_on; blu_led_on
|
||||
|
||||
/*
|
||||
#define LED_B 5
|
||||
#define LED_R 6
|
||||
#define LED_G 7
|
||||
|
||||
#define all_leds_off PORTF &= ~(1<<LED_B) & ~(1<<LED_R) & ~(1<<LED_G)
|
||||
|
||||
#define red_led_on PORTF |= (1<<LED_R)
|
||||
#define red_led_off PORTF &= ~(1<<LED_R)
|
||||
#define grn_led_on PORTF |= (1<<LED_G)
|
||||
#define grn_led_off PORTF &= ~(1<<LED_G)
|
||||
#define blu_led_on PORTF |= (1<<LED_B)
|
||||
#define blu_led_off PORTF &= ~(1<<LED_B)
|
||||
|
||||
#define set_led_off PORTF &= ~(1<<LED_B) & ~(1<<LED_R) & ~(1<<LED_G)
|
||||
#define set_led_red PORTF = PORTF & ~(1<<LED_B) & ~(1<<LED_G) | (1<<LED_R)
|
||||
#define set_led_blue PORTF = PORTF & ~(1<<LED_G) & ~(1<<LED_R) | (1<<LED_B)
|
||||
#define set_led_green PORTF = PORTF & ~(1<<LED_B) & ~(1<<LED_R) | (1<<LED_G)
|
||||
#define set_led_yellow PORTF = PORTF & ~(1<<LED_B) | (1<<LED_R) | (1<<LED_G)
|
||||
#define set_led_magenta PORTF = PORTF & ~(1<<LED_G) | (1<<LED_R) | (1<<LED_B)
|
||||
#define set_led_cyan PORTF = PORTF & ~(1<<LED_R) | (1<<LED_B) | (1<<LED_G)
|
||||
#define set_led_white PORTF |= (1<<LED_B) | (1<<LED_R) | (1<<LED_G)
|
||||
*/
|
||||
|
||||
// This a shortcut to help you visually see your layout.
|
||||
// The first section contains all of the arguements
|
||||
// The second converts the arguments into a two-dimensional array
|
||||
#define LAYOUT_kc( \
|
||||
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11,\
|
||||
k12, k13, k14, k15, k16, k17, k18, k19, k20, k21, k22, k23, k24, k25,\
|
||||
k26, k27, k28, k29, k31, k32, k33, k34, k35, k36, k37, k38, k41, k42,\
|
||||
k43, k44, k45, k46, k47, k48 \
|
||||
) \
|
||||
{ \
|
||||
{ KC_##k13, KC_##k01, KC_##k26, KC_##k12, KC_##k00, KC_##k11, KC_##k25, KC_##k42, KC_##k10, KC_##k24}, \
|
||||
{ KC_##k03, KC_##k28, KC_##k14, KC_##k02, KC_##k27, KC_##k41, KC_##k09, KC_##k23, KC_##k38, KC_##k08}, \
|
||||
{ KC_##k31, KC_##k16, KC_##k04, KC_##k29, KC_##k15, KC_##k22, KC_##k37, KC_##k07, KC_##k21, KC_##k36}, \
|
||||
{ KC_NO, KC_##k32, KC_##k17, KC_##k05, KC_##k43, KC_##k48, KC_##k06, KC_##k20, KC_##k35, KC_NO }, \
|
||||
{ KC_NO, KC_##k45, KC_##k33, KC_##k18, KC_##k44, KC_##k47, KC_##k19, KC_##k34, KC_##k46, KC_NO }, \
|
||||
}
|
||||
|
||||
#define LAYOUT( \
|
||||
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11,\
|
||||
k12, k13, k14, k15, k16, k17, k18, k19, k20, k21, k22, k23, k24, k25,\
|
||||
k26, k27, k28, k29, k31, k32, k33, k34, k35, k36, k37, k38, k41, k42,\
|
||||
k43, k44, k45, k46, k47, k48 \
|
||||
) \
|
||||
{ \
|
||||
{ k13, k01, k26, k12, k00, k11, k25, k42, k10, k24}, \
|
||||
{ k03, k28, k14, k02, k27, k41, k09, k23, k38, k08}, \
|
||||
{ k31, k16, k04, k29, k15, k22, k37, k07, k21, k36}, \
|
||||
{ KC_NO, k32, k17, k05, k43, k48, k06, k20, k35, KC_NO }, \
|
||||
{ KC_NO, k45, k33, k18, k44, k47, k19, k34, k46, KC_NO }, \
|
||||
}
|
||||
#endif
|
87
keyboards/comet46/config.h
Normal file
87
keyboards/comet46/config.h
Normal file
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
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 0x6060
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER SatT
|
||||
#define PRODUCT Comet46
|
||||
#define DESCRIPTION qmk keyboard firmware for Comet46
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 5
|
||||
#define MATRIX_COLS 10
|
||||
|
||||
/* define if matrix has ghost */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
/* number of backlight levels */
|
||||
//#define BACKLIGHT_LEVELS 3
|
||||
|
||||
#define ONESHOT_TIMEOUT 500
|
||||
|
||||
|
||||
/* key combination for command */
|
||||
#define IS_COMMAND() ( \
|
||||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||
)
|
||||
|
||||
/*
|
||||
* Feature disable options
|
||||
* These options are also useful to firmware size reduction.
|
||||
*/
|
||||
|
||||
#define PREVENT_STUCK_MODIFIERS
|
||||
|
||||
/* disable debug print */
|
||||
//#define NO_DEBUG
|
||||
|
||||
/* disable print */
|
||||
//#define NO_PRINT
|
||||
|
||||
/* disable action features */
|
||||
//#define NO_ACTION_LAYER
|
||||
//#define NO_ACTION_TAPPING
|
||||
//#define NO_ACTION_ONESHOT
|
||||
//#define NO_ACTION_MACRO
|
||||
//#define NO_ACTION_FUNCTION
|
||||
|
||||
//UART settings for communication with the RF microcontroller
|
||||
#define SERIAL_UART_BAUD 1000000
|
||||
#define SERIAL_UART_DATA UDR1
|
||||
#define SERIAL_UART_UBRR (F_CPU / (16UL * SERIAL_UART_BAUD) - 1)
|
||||
#define SERIAL_UART_TXD_READY (UCSR1A & _BV(UDRE1))
|
||||
#define SERIAL_UART_RXD_PRESENT (UCSR1A & _BV(RXC1))
|
||||
#define SERIAL_UART_INIT() do { \
|
||||
/* baud rate */ \
|
||||
UBRR1L = SERIAL_UART_UBRR; \
|
||||
/* baud rate */ \
|
||||
UBRR1H = SERIAL_UART_UBRR >> 8; \
|
||||
/* enable TX and RX */ \
|
||||
UCSR1B = _BV(TXEN1) | _BV(RXEN1); \
|
||||
/* 8-bit data */ \
|
||||
UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); \
|
||||
} while(0)
|
||||
|
||||
#endif
|
103
keyboards/comet46/keymaps/default/keymap.c
Normal file
103
keyboards/comet46/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,103 @@
|
||||
// this is the style you want to emulate.
|
||||
// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||
// entirely and just use numbers.
|
||||
enum comet46_layers
|
||||
{
|
||||
_QWERTY,
|
||||
_LOWER,
|
||||
_RAISE,
|
||||
};
|
||||
|
||||
enum custom_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
LOWER,
|
||||
RAISE,
|
||||
};
|
||||
|
||||
// Fillers to make layering more clear
|
||||
#define _______ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
#define LOWER MO(_LOWER)
|
||||
#define RAISE MO(_RAISE)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
* ,-----------------------------------------+ +-----------------------------------------.
|
||||
* | Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp |
|
||||
* |------+------+------+------+------+------+------+ +------+------+------+------+------+------+------|
|
||||
* | Ctl | A | S | D | F | G | Esc | | Del | H | J | K | L | ; | " |
|
||||
* |------+------+------+------+------+------+------+ +------+------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | { | | } | N | M | , | . | / | Shift|
|
||||
* |------+------+------+------+------+------+------+ +------+------+------+------+------+-------------|
|
||||
* | GUI | Lower| Space| | Enter| Raise| Alt |
|
||||
* +--------------------/ \--------------------+
|
||||
*/
|
||||
[_QWERTY] = LAYOUT(
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
||||
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_ESC, KC_DEL, 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_LCBR, KC_RCBR, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
|
||||
KC_LGUI, LOWER, KC_SPC, KC_ENT, RAISE, KC_LALT
|
||||
),
|
||||
|
||||
/* Lower
|
||||
* ,-----------------------------------------+ +-----------------------------------------.
|
||||
* | | ! | @ | # | $ | % | | ^ | & | * | ( | ) | |
|
||||
* |------+------+------+------+------+------+------+ +------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | ` | \ | - | = | [ | ] | |
|
||||
* |------+------+------+------+------+------+------+ +------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | ~ | | | _ | + | { | } | |
|
||||
* |------+------+------+------+------+------+------+ +------+------+------+------+------+-------------|
|
||||
* | | | | | | | |
|
||||
* +--------------------/ \--------------------+
|
||||
*/
|
||||
[_LOWER] = LAYOUT(
|
||||
_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, KC_GRV, KC_BSLS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, KC_TILD, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______,
|
||||
_______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
/* Raise
|
||||
* ,-----------------------------------------+ +-----------------------------------------.
|
||||
* | | 1 | 2 | 3 | 4 | 5 | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+ +------+------+------+------+------+------+------|
|
||||
* | | F1 | F2 | F3 | F4 | F5 | F6 | | | Left | Down | Up |Right | End | |
|
||||
* |------+------+------+------+------+------+------+ +------+------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 | | Home | | | | | | |
|
||||
* |------+------+------+------+------+------+------+ +------+------+------+------+------+-------------|
|
||||
* | | | | | | | |
|
||||
* +--------------------/ \--------------------+
|
||||
*/
|
||||
[_RAISE] = LAYOUT(
|
||||
_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
|
||||
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_END, _______,
|
||||
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_HOME, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______,
|
||||
_______, _______, _______, _______, _______, _______
|
||||
)
|
||||
};
|
||||
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
uint8_t layer = biton32(layer_state);
|
||||
switch (layer) {
|
||||
case _QWERTY:
|
||||
set_led_green;
|
||||
break;
|
||||
case _RAISE:
|
||||
set_led_blue;
|
||||
break;
|
||||
case _LOWER:
|
||||
set_led_red;
|
||||
break;
|
||||
default:
|
||||
set_led_green;
|
||||
break;
|
||||
}
|
||||
}
|
142
keyboards/comet46/keymaps/satt/action_pseudo_lut.c
Normal file
142
keyboards/comet46/keymaps/satt/action_pseudo_lut.c
Normal file
@@ -0,0 +1,142 @@
|
||||
#include "quantum.h"
|
||||
#include "action_pseudo_lut.h"
|
||||
|
||||
static uint8_t send_key_shift_bit[SHIFT_BIT_SIZE];
|
||||
|
||||
/*
|
||||
* Pseudo layout action.
|
||||
* This action converts a keycode in order to output the character according to the keymap you specified
|
||||
* still your keyboard layout recognized wrongly on your OS.
|
||||
* Memo: Using other layer keymap to get keycode
|
||||
*/
|
||||
void action_pseudo_lut(keyrecord_t *record, uint8_t base_keymap_id, const uint16_t (*keymap)[2]) {
|
||||
uint8_t prev_shift;
|
||||
uint16_t keycode;
|
||||
uint16_t pseudo_keycode;
|
||||
|
||||
/* get keycode from keymap you specified */
|
||||
keycode = keymap_key_to_keycode(base_keymap_id, record->event.key);
|
||||
|
||||
prev_shift = keyboard_report->mods & (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT));
|
||||
|
||||
if (record->event.pressed) {
|
||||
/* when magic commands entered, keycode does not converted */
|
||||
if (IS_COMMAND()) {
|
||||
if (prev_shift) {
|
||||
add_shift_bit(keycode);
|
||||
}
|
||||
register_code(keycode);
|
||||
return;
|
||||
}
|
||||
|
||||
if (prev_shift) {
|
||||
pseudo_keycode = convert_keycode(keymap, keycode, true);
|
||||
dprintf("pressed: %02X, converted: %04X\n", keycode, pseudo_keycode);
|
||||
add_shift_bit(keycode);
|
||||
|
||||
if (IS_LSFT(pseudo_keycode)) {
|
||||
register_code(QK_LSFT ^ pseudo_keycode);
|
||||
} else {
|
||||
/* delete shift mod temporarily */
|
||||
del_mods(prev_shift);
|
||||
send_keyboard_report();
|
||||
register_code(pseudo_keycode);
|
||||
add_mods(prev_shift);
|
||||
send_keyboard_report();
|
||||
}
|
||||
} else {
|
||||
pseudo_keycode = convert_keycode(keymap, keycode, false);
|
||||
dprintf("pressed: %02X, converted: %04X\n", keycode, pseudo_keycode);
|
||||
|
||||
if (IS_LSFT(pseudo_keycode)) {
|
||||
add_weak_mods(MOD_BIT(KC_LSFT));
|
||||
send_keyboard_report();
|
||||
register_code(QK_LSFT ^ pseudo_keycode);
|
||||
/* on Windows, prevent key repeat to avoid unintended output */
|
||||
unregister_code(QK_LSFT ^ pseudo_keycode);
|
||||
del_weak_mods(MOD_BIT(KC_LSFT));
|
||||
send_keyboard_report();
|
||||
} else {
|
||||
register_code(pseudo_keycode);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (get_shift_bit(keycode)) {
|
||||
del_shift_bit(keycode);
|
||||
pseudo_keycode = convert_keycode(keymap, keycode, true);
|
||||
} else {
|
||||
pseudo_keycode = convert_keycode(keymap, keycode, false);
|
||||
}
|
||||
dprintf("released: %02X, converted: %04X\n", keycode, pseudo_keycode);
|
||||
|
||||
if (IS_LSFT(pseudo_keycode)) {
|
||||
unregister_code(QK_LSFT ^ pseudo_keycode);
|
||||
} else {
|
||||
unregister_code(pseudo_keycode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
uint16_t convert_keycode(const uint16_t (*keymap)[2], uint16_t keycode, bool shift_modded)
|
||||
{
|
||||
uint16_t pseudo_keycode;
|
||||
|
||||
switch (keycode) {
|
||||
case KC_A ... KC_CAPSLOCK:
|
||||
#if defined(__AVR__)
|
||||
if (shift_modded) {
|
||||
pseudo_keycode = pgm_read_word(&keymap[keycode][1]);
|
||||
} else {
|
||||
pseudo_keycode = pgm_read_word(&keymap[keycode][0]);
|
||||
}
|
||||
#else
|
||||
if (shift_modded) {
|
||||
pseudo_keycode = keymap[keycode][1];
|
||||
} else {
|
||||
pseudo_keycode = keymap[keycode][0];
|
||||
}
|
||||
#endif
|
||||
/* if undefined, use got keycode as it is */
|
||||
if (pseudo_keycode == 0x00) {
|
||||
if (shift_modded) {
|
||||
pseudo_keycode = S(keycode);
|
||||
} else {
|
||||
pseudo_keycode = keycode;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (shift_modded) {
|
||||
pseudo_keycode = S(keycode);
|
||||
} else {
|
||||
pseudo_keycode = keycode;
|
||||
}
|
||||
break;
|
||||
}
|
||||
return pseudo_keycode;
|
||||
}
|
||||
|
||||
uint8_t get_shift_bit(uint16_t keycode) {
|
||||
if ((keycode >> 3) < SHIFT_BIT_SIZE) {
|
||||
return send_key_shift_bit[keycode >> 3] & (1 << (keycode & 7));
|
||||
} else {
|
||||
dprintf("get_shift_bit: Can't get shift bit. keycode: %02X\n", keycode);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
void add_shift_bit(uint16_t keycode) {
|
||||
if ((keycode >> 3) < SHIFT_BIT_SIZE) {
|
||||
send_key_shift_bit[keycode >> 3] |= (1 << (keycode & 7));
|
||||
} else {
|
||||
dprintf("add_shift_bit: Can't add shift bit. keycode: %02X\n", keycode);
|
||||
}
|
||||
}
|
||||
|
||||
void del_shift_bit(uint16_t keycode) {
|
||||
if ((keycode >> 3) < SHIFT_BIT_SIZE) {
|
||||
send_key_shift_bit[keycode >> 3] &= ~(1 << (keycode & 7));
|
||||
} else {
|
||||
dprintf("del_shift_bit: Can't delete shift bit. keycode: %02X\n", keycode);
|
||||
}
|
||||
}
|
15
keyboards/comet46/keymaps/satt/action_pseudo_lut.h
Normal file
15
keyboards/comet46/keymaps/satt/action_pseudo_lut.h
Normal file
@@ -0,0 +1,15 @@
|
||||
#ifndef ACTION_PSEUDO_LUT_H
|
||||
#define ACTION_PSEUDO_LUT_H
|
||||
|
||||
#define SHIFT_BIT_SIZE (0xE7 / 8 + 1) // 1bit per 1key
|
||||
|
||||
#define IS_LSFT(kc) ((QK_LSFT & (kc)) == QK_LSFT)
|
||||
|
||||
void action_pseudo_lut(keyrecord_t *, uint8_t, const uint16_t (*)[2]);
|
||||
uint16_t convert_keycode(const uint16_t (*)[2], uint16_t, bool);
|
||||
|
||||
uint8_t get_shift_bit(uint16_t);
|
||||
void add_shift_bit(uint16_t);
|
||||
void del_shift_bit(uint16_t);
|
||||
|
||||
#endif
|
220
keyboards/comet46/keymaps/satt/keymap.c
Normal file
220
keyboards/comet46/keymaps/satt/keymap.c
Normal file
@@ -0,0 +1,220 @@
|
||||
// this is the style you want to emulate.
|
||||
// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "keymap_jis2us.h"
|
||||
#include "action_pseudo_lut.h"
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||
// entirely and just use numbers.
|
||||
enum comet46_layers {
|
||||
_QWERTY,
|
||||
_LOWER,
|
||||
_RAISE,
|
||||
_PSEUDO_US,
|
||||
_PSEUDO_US_LOWER,
|
||||
_PSEUDO_US_RAISE,
|
||||
_ADJUST
|
||||
};
|
||||
|
||||
enum custom_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
PSEUDO_US,
|
||||
};
|
||||
|
||||
#define KC_LWR MO(_LOWER)
|
||||
#define KC_RSE MO(_RAISE)
|
||||
#define KC_P_LW MO(_PSEUDO_US_LOWER)
|
||||
#define KC_P_RS MO(_PSEUDO_US_RAISE)
|
||||
#define KC_QWRT QWERTY
|
||||
#define KC_P_US PSEUDO_US
|
||||
#define KC_SPCT CTL_T(KC_SPC)
|
||||
#define KC_ENSF SFT_T(KC_ENT)
|
||||
#define KC_SFTA SFT_T(KC_A)
|
||||
#define KC_CTSF S(KC_LCTL)
|
||||
#define KC_IMON ALT_T(KC_F13)
|
||||
#define KC_IMOF GUI_T(KC_F14)
|
||||
#define KC_SRO S(KC_RO)
|
||||
#define KC_SYEN S(KC_JYEN)
|
||||
#define KC_CAD LCA(KC_DEL)
|
||||
#define KC_RST RESET
|
||||
|
||||
#define LONGPRESS_DELAY 150
|
||||
|
||||
// Fillers to make layering more clear
|
||||
#define KC_ KC_TRNS
|
||||
#define KC_XXXX KC_NO
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[_QWERTY] = LAYOUT_kc(
|
||||
//,----+----+----+----+----+----+ +----+----+----+----+----+----.
|
||||
ESC , Q , W , E , R , T , Y , U , I , O , P ,DEL ,
|
||||
//|----+----+----+----+----+----+----+ +----+----+----+----+----+----+----|
|
||||
TAB ,SFTA, S , D , F , G ,LPRN, RPRN, H , J , K , L ,SCLN,BSPC,
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
CTSF, Z , X , C , V , B ,LBRC, RBRC, N , M ,COMM,DOT ,SLSH,QUOT,
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
IMOF,LWR ,SPCT, ENSF,RSE ,IMON
|
||||
// +----+----+---/ \---+----+----+
|
||||
),
|
||||
|
||||
[_LOWER] = LAYOUT_kc(
|
||||
//,----+----+----+----+----+----+ +----+----+----+----+----+----.
|
||||
,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN, ,
|
||||
//|----+----+----+----+----+----+----+ +----+----+----+----+----+----+----|
|
||||
, F1 , F2 , F3 , F4 , F5 , F6 , GRV ,BSLS,MINS,EQL ,LBRC,RBRC, ,
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
, F7 , F8 , F9 , F10, F11, F12, TILD,PIPE,UNDS,PLUS,LCBR,RCBR, ,
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
, , , , ,
|
||||
// +----+----+---/ \---+----+----+
|
||||
),
|
||||
|
||||
[_RAISE] = LAYOUT_kc(
|
||||
//,----+----+----+----+----+----+ +----+----+----+----+----+----.
|
||||
, 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , ,
|
||||
//|----+----+----+----+----+----+----+ +----+----+----+----+----+----+----|
|
||||
, , , , , , , XXXX,LEFT,DOWN, UP ,RGHT,END , ,
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
, , , , , , , HOME,XXXX,XXXX,XXXX,XXXX,XXXX, ,
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
, , , , ,
|
||||
// +----+----+---/ \---+----+----+
|
||||
),
|
||||
|
||||
[_PSEUDO_US] = LAYOUT_kc(
|
||||
//,----+----+----+----+----+----+ +----+----+----+----+----+----.
|
||||
ESC , Q , W , E , R , T , Y , U , I , O , P ,DEL ,
|
||||
//|----+----+----+----+----+----+----+ +----+----+----+----+----+----+----|
|
||||
TAB ,SFTA, S , D , F , G ,ASTR, LPRN, H , J , K , L ,FN0 ,BSPC,
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
CTSF, Z , X , C , V , B ,FN0 , FN0 , N , M ,COMM,DOT ,SLSH,FN0 ,
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
IMOF,P_LW,SPCT, ENSF,P_RS,IMON
|
||||
// +----+----+---/ \---+----+----+
|
||||
),
|
||||
|
||||
|
||||
[_PSEUDO_US_LOWER] = LAYOUT_kc(
|
||||
//,----+----+----+----+----+----+ +----+----+----+----+----+----.
|
||||
,EXLM,LBRC,HASH,DLR ,PERC, EQL ,CIRC, DQT,ASTR,LPRN, ,
|
||||
//|----+----+----+----+----+----+----+ +----+----+----+----+----+----+----|
|
||||
, F1 , F2 , F3 , F4 , F5 , F6 , LCBR,JYEN,MINS,UNDS,RBRC,BSLS, ,
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
, F7 , F8 , F9 , F10, F11, F12, PLUS,SYEN,SRO ,COLN,RCBR,PIPE, ,
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
, , , , ,
|
||||
// +----+----+---/ \---+----+----+
|
||||
),
|
||||
|
||||
[_PSEUDO_US_RAISE] = LAYOUT_kc(
|
||||
//,----+----+----+----+----+----+ +----+----+----+----+----+----.
|
||||
, 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , ,
|
||||
//|----+----+----+----+----+----+----+ +----+----+----+----+----+----+----|
|
||||
, , , , , , GRV, XXXX,LEFT,DOWN, UP ,RGHT,END , ,
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
, , , , , , , HOME,XXXX,XXXX,XXXX,XXXX,XXXX, ,
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
, , , , ,
|
||||
// +----+----+---/ \---+----+----+
|
||||
),
|
||||
|
||||
[_ADJUST] = LAYOUT_kc(
|
||||
//,----+----+----+----+----+----+ +----+----+----+----+----+----.
|
||||
, , , , , , , , , , , ,
|
||||
//|----+----+----+----+----+----+----+ +----+----+----+----+----+----+----|
|
||||
, , , , , ,CAD , QWRT, , , , , , ,
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
, , , , , ,RST , P_US, , , , , , ,
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
, , , , ,
|
||||
// +----+----+---/ \---+----+----+
|
||||
)
|
||||
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* user defined action function
|
||||
*/
|
||||
enum function_id {
|
||||
PSEUDO_US_FUNCTION,
|
||||
};
|
||||
|
||||
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
switch (id)
|
||||
{
|
||||
case PSEUDO_US_FUNCTION:
|
||||
action_pseudo_lut(record, _QWERTY, keymap_jis2us);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Fn action definition
|
||||
*/
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[0] = ACTION_FUNCTION(PSEUDO_US_FUNCTION),
|
||||
};
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
uint8_t layer = biton32(layer_state);
|
||||
switch (layer) {
|
||||
case _LOWER:
|
||||
set_led_red;
|
||||
break;
|
||||
case _RAISE:
|
||||
set_led_blue;
|
||||
break;
|
||||
case _PSEUDO_US_LOWER:
|
||||
set_led_yellow;
|
||||
break;
|
||||
case _PSEUDO_US_RAISE:
|
||||
set_led_cyan;
|
||||
break;
|
||||
case _ADJUST:
|
||||
set_led_magenta;
|
||||
break;
|
||||
default:
|
||||
set_led_green;
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
uint32_t layer_state_set_user(uint32_t state) {
|
||||
switch (biton32(state)) {
|
||||
case _PSEUDO_US:
|
||||
return update_tri_layer_state(state, _PSEUDO_US_RAISE, _PSEUDO_US_LOWER, _ADJUST);
|
||||
break;
|
||||
case _PSEUDO_US_LOWER:
|
||||
return update_tri_layer_state(state, _PSEUDO_US_RAISE, _PSEUDO_US_LOWER, _ADJUST);
|
||||
break;
|
||||
case _PSEUDO_US_RAISE:
|
||||
return update_tri_layer_state(state, _PSEUDO_US_RAISE, _PSEUDO_US_LOWER, _ADJUST);
|
||||
break;
|
||||
default:
|
||||
return update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case PSEUDO_US:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_PSEUDO_US);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
32
keyboards/comet46/keymaps/satt/keymap_jis2us.h
Normal file
32
keyboards/comet46/keymaps/satt/keymap_jis2us.h
Normal file
@@ -0,0 +1,32 @@
|
||||
#ifndef KEYMAP_JIS2US_H
|
||||
#define KEYMAP_JIS2US_H
|
||||
|
||||
/* keymap for convert from JIS to US */
|
||||
const uint16_t PROGMEM keymap_jis2us[][2] = {
|
||||
[KC_A ... KC_CAPS] = { 0x00, 0x00 }, /* default value */
|
||||
|
||||
[KC_1] = { KC_1, KC_EXLM }, /* 1 and ! -> 1 and ! */
|
||||
[KC_2] = { KC_2, KC_LBRC }, /* 2 and " -> 2 and @ */
|
||||
[KC_3] = { KC_3, KC_HASH }, /* 3 and # -> 3 and # */
|
||||
[KC_4] = { KC_4, KC_DLR }, /* 4 and $ -> 4 and $ */
|
||||
[KC_5] = { KC_5, KC_PERC }, /* 5 and % -> 5 and % */
|
||||
[KC_6] = { KC_6, KC_EQL }, /* 6 and & -> 6 and ^ */
|
||||
[KC_7] = { KC_7, KC_CIRC }, /* 7 and ' -> 7 and & */
|
||||
[KC_8] = { KC_8, KC_DQT }, /* 8 and ( -> 8 and * */
|
||||
[KC_9] = { KC_9, KC_ASTR }, /* 9 and ) -> 9 and ( */
|
||||
[KC_0] = { KC_0, KC_LPRN }, /* 0 and (no assign) -> 0 and ) */
|
||||
[KC_MINS] = { KC_MINS, S(KC_RO) }, /* - and = -> - and _ */
|
||||
[KC_EQL] = { KC_UNDS, KC_COLN }, /* ^ and ~ -> = and + */
|
||||
[KC_LBRC] = { KC_RBRC, KC_RCBR }, /* @ and ` -> [ and { */
|
||||
[KC_RBRC] = { KC_BSLS, KC_PIPE }, /* [ and { -> ] and } */
|
||||
[KC_BSLS] = { KC_JYEN, S(KC_JYEN) }, /* ] and } -> / and | */
|
||||
[KC_NUHS] = { KC_NUHS, S(KC_NUHS) }, /* (no assign) */
|
||||
[KC_SCLN] = { KC_SCLN, KC_QUOT }, /* ; and + -> ; and : */
|
||||
[KC_QUOT] = { KC_AMPR, KC_AT }, /* : and * -> ' and " */
|
||||
[KC_GRV] = { KC_LCBR, KC_PLUS }, /* (no assign) -> ` and ~ */
|
||||
[KC_COMM] = { KC_COMM, KC_LT }, /* , and < -> , and < */
|
||||
[KC_DOT] = { KC_DOT, KC_GT }, /* . and > -> . and > */
|
||||
[KC_SLSH] = { KC_SLSH, KC_QUES }, /* / and ? -> / and ? */
|
||||
};
|
||||
|
||||
#endif
|
6
keyboards/comet46/keymaps/satt/readme.md
Normal file
6
keyboards/comet46/keymaps/satt/readme.md
Normal file
@@ -0,0 +1,6 @@
|
||||
## Pseudo US Layout
|
||||
|
||||
On a Japanese Windows environment, ANSI keyboards may be recognized wrongly as a JIS keyboard.
|
||||
By using this code, you can use your ANSI keyboard under a JIS keyboard environment without changing the settings and registry of your environment.
|
||||
|
||||
Original code by [Shela](https://github.com/qmk/qmk_firmware/tree/master/keyboards/hhkb/keymaps/shela)
|
26
keyboards/comet46/keymaps/satt/rules.mk
Normal file
26
keyboards/comet46/keymaps/satt/rules.mk
Normal file
@@ -0,0 +1,26 @@
|
||||
SRC += action_pseudo_lut.c
|
||||
|
||||
# Build Options
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = no # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||
ONEHAND_ENABLE = no # Enable one-hand typing
|
||||
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
154
keyboards/comet46/matrix.c
Normal file
154
keyboards/comet46/matrix.c
Normal file
@@ -0,0 +1,154 @@
|
||||
/*
|
||||
Copyright 2012 Jun Wako
|
||||
Copyright 2014 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/>.
|
||||
*/
|
||||
#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"
|
||||
|
||||
#if (MATRIX_COLS <= 8)
|
||||
# define print_matrix_header() print("\nr/c 01234567\n")
|
||||
# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row))
|
||||
# define matrix_bitpop(i) bitpop(matrix[i])
|
||||
# define ROW_SHIFTER ((uint8_t)1)
|
||||
#elif (MATRIX_COLS <= 16)
|
||||
# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n")
|
||||
# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row))
|
||||
# define matrix_bitpop(i) bitpop16(matrix[i])
|
||||
# define ROW_SHIFTER ((uint16_t)1)
|
||||
#elif (MATRIX_COLS <= 32)
|
||||
# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n")
|
||||
# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row))
|
||||
# define matrix_bitpop(i) bitpop32(matrix[i])
|
||||
# define ROW_SHIFTER ((uint32_t)1)
|
||||
#endif
|
||||
|
||||
/* matrix state(1:on, 0:off) */
|
||||
static matrix_row_t matrix[MATRIX_ROWS];
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_kb(void) {
|
||||
matrix_init_user();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_kb(void) {
|
||||
matrix_scan_user();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_user(void) {
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_user(void) {
|
||||
}
|
||||
|
||||
inline
|
||||
uint8_t matrix_rows(void) {
|
||||
return MATRIX_ROWS;
|
||||
}
|
||||
|
||||
inline
|
||||
uint8_t matrix_cols(void) {
|
||||
return MATRIX_COLS;
|
||||
}
|
||||
|
||||
void matrix_init(void) {
|
||||
|
||||
matrix_init_quantum();
|
||||
}
|
||||
|
||||
uint8_t matrix_scan(void)
|
||||
{
|
||||
SERIAL_UART_INIT();
|
||||
|
||||
uint32_t timeout = 0;
|
||||
|
||||
//the s character requests the RF slave to send the matrix
|
||||
SERIAL_UART_DATA = 's';
|
||||
|
||||
//trust the external keystates entirely, erase the last data
|
||||
uint8_t uart_data[11] = {0};
|
||||
|
||||
//there are 10 bytes corresponding to 10 columns, and an end byte
|
||||
for (uint8_t i = 0; i < 11; i++) {
|
||||
//wait for the serial data, timeout if it's been too long
|
||||
//this only happened in testing with a loose wire, but does no
|
||||
//harm to leave it in here
|
||||
while(!SERIAL_UART_RXD_PRESENT){
|
||||
timeout++;
|
||||
if (timeout > 10000){
|
||||
break;
|
||||
}
|
||||
}
|
||||
uart_data[i] = SERIAL_UART_DATA;
|
||||
}
|
||||
|
||||
//check for the end packet, the key state bytes use the LSBs, so 0xE0
|
||||
//will only show up here if the correct bytes were recieved
|
||||
if (uart_data[10] == 0xE0)
|
||||
{
|
||||
//shifting and transferring the keystates to the QMK matrix variable
|
||||
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
||||
matrix[i] = (uint16_t) uart_data[i*2] | (uint16_t) uart_data[i*2+1] << 5;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
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_matrix_header();
|
||||
|
||||
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
|
||||
phex(row); print(": ");
|
||||
print_matrix_row(row);
|
||||
print("\n");
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t matrix_key_count(void)
|
||||
{
|
||||
uint8_t count = 0;
|
||||
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
||||
count += matrix_bitpop(i);
|
||||
}
|
||||
return count;
|
||||
}
|
16
keyboards/comet46/readme.md
Normal file
16
keyboards/comet46/readme.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# Comet46
|
||||
|
||||

|
||||
|
||||
A split wireless 40% column-staggered keyboard
|
||||
|
||||
Keyboard Maintainer: [SatT](https://github.com/satt99)
|
||||
Hardware Supported: Comet46 PCB, atmega32u4, nRF51822
|
||||
Hardware Availability: [Comet46 PCB, case, and receiver](https://github.com/satt99/comet46-hardware)
|
||||
Firmware for nordic MCUs: [SRC and precompiled](https://github.com/satt99/comet46-firmware)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make comet46: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.
|
73
keyboards/comet46/rules.mk
Normal file
73
keyboards/comet46/rules.mk
Normal file
@@ -0,0 +1,73 @@
|
||||
|
||||
OPT_DEFS += -DCOMET46_ORTHO_===PROMICRO
|
||||
COMET46_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \
|
||||
avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB)
|
||||
|
||||
# # project specific files
|
||||
SRC = matrix.c
|
||||
|
||||
|
||||
# MCU name
|
||||
#MCU = at90usb1287
|
||||
MCU = atmega32u4
|
||||
|
||||
# Processor frequency.
|
||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||
# automatically to create a 32-bit value in your source code.
|
||||
#
|
||||
# This will be an integer division of F_USB below, as it is sourced by
|
||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||
# does not *change* the processor frequency - it should merely be updated to
|
||||
# reflect the processor speed set externally so that the code can use accurate
|
||||
# software delays.
|
||||
F_CPU = 16000000
|
||||
|
||||
|
||||
#
|
||||
# LUFA specific
|
||||
#
|
||||
# Target architecture (see library "Board Types" documentation).
|
||||
ARCH = AVR8
|
||||
|
||||
# Input clock frequency.
|
||||
# This will define a symbol, F_USB, in all source code files equal to the
|
||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||
# at the end, this will be done automatically to create a 32-bit value in your
|
||||
# source code.
|
||||
#
|
||||
# If no clock division is performed on the input clock inside the AVR (via the
|
||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||
F_USB = $(F_CPU)
|
||||
|
||||
# Bootloader
|
||||
# This definition is optional, and if your keyboard supports multiple bootloaders of
|
||||
# different sizes, comment this out, and the correct address will be loaded
|
||||
# automatically (+60). See bootloader.mk for all options.
|
||||
BOOTLOADER = caterina
|
||||
|
||||
# Interrupt driven control endpoint task(+60)
|
||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
|
||||
# Build Options
|
||||
# comment out to disable the options.
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = no # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
CUSTOM_MATRIX = yes # Remote matrix from the wireless bridge
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
# SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
|
||||
NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA
|
||||
# BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||
# MIDI_ENABLE = YES # MIDI controls
|
||||
UNICODE_ENABLE = YES # Unicode
|
||||
# BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
|
||||
USB = /dev/ttyACM0
|
@@ -40,13 +40,13 @@
|
||||
*/
|
||||
// The first section contains all of the arguments
|
||||
// The second converts the arguments into a two-dimensional array
|
||||
#define KEYMAP( \
|
||||
k00, k01, k02, k03, \
|
||||
#define LAYOUT_ortho_6x4( \
|
||||
k00, k01, k02, k03, \
|
||||
k10, k11, k12, k13, \
|
||||
k20, k21, k22, k23, \
|
||||
k30, k31, k32, k33, \
|
||||
k40, k41, k42, k43, \
|
||||
k50, k51, k52, k53 \
|
||||
k50, k51, k52, k53 \
|
||||
) \
|
||||
{ \
|
||||
{k00, k01, k02, k03}, \
|
||||
@@ -54,14 +54,27 @@
|
||||
{k20, k21, k22, k23}, \
|
||||
{k30, k31, k32, k33}, \
|
||||
{k40, k41, k42, k43}, \
|
||||
{k50, k51, k52, k53} \
|
||||
{k50, k51, k52, k53} \
|
||||
}
|
||||
|
||||
#define LAYOUT_numpad_6x4( \
|
||||
k00, k01, k02, k03, \
|
||||
k10, k11, k12, k13, \
|
||||
k20, k21, k22, \
|
||||
k30, k31, k32, k23, \
|
||||
k40, k41, k42, \
|
||||
k50, k52, k43 \
|
||||
) \
|
||||
{ \
|
||||
{k00, k01, k02, k03}, \
|
||||
{k10, k11, k12, k13}, \
|
||||
{k20, k21, k22, k23}, \
|
||||
{k30, k31, k32, KC_NO}, \
|
||||
{k40, k41, k42, k43}, \
|
||||
{k50, KC_NO, k52, KC_NO} \
|
||||
}
|
||||
void matrix_init_user(void);
|
||||
void matrix_scan_user(void);
|
||||
/*
|
||||
inline void cospad_bl_led_on(void) { DDRF |= (1<<7); PORTF &= ~(1<<7); }
|
||||
inline void cospad_bl_led_off(void) { DDRF &= ~(1<<7); PORTF &= ~(1<<7); }
|
||||
*/
|
||||
|
||||
inline void cospad_bl_led_on(void) { PORTF &= ~(1<<7); }
|
||||
inline void cospad_bl_led_off(void) { PORTF |= (1<<7); }
|
||||
|
16
keyboards/cospad/info.json
Normal file
16
keyboards/cospad/info.json
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"keyboard_name": "",
|
||||
"url": "",
|
||||
"maintainer": "qmk",
|
||||
"width": 4,
|
||||
"height": 6,
|
||||
"layouts": {
|
||||
"LAYOUT_numpad_6x4": {
|
||||
"layout": [{"label":"Esc", "x":0, "y":0}, {"label":"Tab", "x":1, "y":0}, {"label":"Fn", "x":2, "y":0}, {"label":"Back", "x":3, "y":0}, {"label":"Num Lock", "x":0, "y":1}, {"label":"/", "x":1, "y":1}, {"label":"*", "x":2, "y":1}, {"label":"-", "x":3, "y":1}, {"label":"7", "x":0, "y":2}, {"label":"8", "x":1, "y":2}, {"label":"9", "x":2, "y":2}, {"label":"+", "x":3, "y":2, "h":2}, {"label":"4", "x":0, "y":3}, {"label":"5", "x":1, "y":3}, {"label":"6", "x":2, "y":3}, {"label":"1", "x":0, "y":4}, {"label":"2", "x":1, "y":4}, {"label":"3", "x":2, "y":4}, {"label":"Enter", "x":3, "y":4, "h":2}, {"label":"0", "x":0, "y":5, "w":2}, {"label":".", "x":2, "y":5}]
|
||||
},
|
||||
|
||||
"LAYOUT_ortho_6x4": {
|
||||
"layout": [{"label":"Esc", "x":0, "y":0}, {"label":"Tab", "x":1, "y":0}, {"label":"Fn", "x":2, "y":0}, {"label":"Back", "x":3, "y":0}, {"label":"Num Lock", "x":0, "y":1}, {"label":"/", "x":1, "y":1}, {"label":"*", "x":2, "y":1}, {"label":"-", "x":3, "y":1}, {"label":"7", "x":0, "y":2}, {"label":"8", "x":1, "y":2}, {"label":"9", "x":2, "y":2}, {"label":"+", "x":3, "y":2}, {"label":"4", "x":0, "y":3}, {"label":"5", "x":1, "y":3}, {"label":"6", "x":2, "y":3}, {"x":3, "y":3}, {"label":"1", "x":0, "y":4}, {"label":"2", "x":1, "y":4}, {"label":"3", "x":2, "y":4}, {"label":"Enter", "x":3, "y":4}, {"label":"0", "x":0, "y":5}, {"x":1, "y":5}, {"label":".", "x":2, "y":5}, {"x":3, "y":5}]
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,4 +1,4 @@
|
||||
#include "cospad.h"
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "led.h"
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
@@ -31,13 +31,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* `-------------------'
|
||||
*/
|
||||
|
||||
[_BL] = KEYMAP(
|
||||
[_BL] = LAYOUT_numpad_6x4(
|
||||
KC_ESC, KC_TAB, MO(_FL), KC_BSPC, \
|
||||
KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \
|
||||
KC_P7, KC_P8, KC_P9, KC_PPLS, \
|
||||
KC_P4, KC_P5, KC_P6, KC_NO, \
|
||||
KC_P1, KC_P2, KC_P3, KC_PENT, \
|
||||
KC_P0, KC_NO, KC_PDOT, KC_NO),
|
||||
KC_P7, KC_P8, KC_P9, \
|
||||
KC_P4, KC_P5, KC_P6, KC_PPLS, \
|
||||
KC_P1, KC_P2, KC_P3, \
|
||||
KC_P0, KC_PDOT, KC_PENT),
|
||||
|
||||
/* Keymap _FL: Function Layer
|
||||
* ,-------------------.
|
||||
@@ -54,13 +54,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* | 0 |RST | |
|
||||
* `-------------------'
|
||||
*/
|
||||
[_FL] = KEYMAP(
|
||||
[_FL] = LAYOUT_numpad_6x4(
|
||||
RGB_TOG, KC_TAB, KC_TRNS, KC_BSPC, \
|
||||
RGB_MOD, RGB_M_P, BL_TOGG, KC_PMNS, \
|
||||
RGB_HUD, RGB_HUI, BL_ON, KC_PPLS, \
|
||||
RGB_SAD, RGB_SAI, BL_OFF, KC_NO, \
|
||||
RGB_VAD, RGB_VAI, KC_P3, KC_PENT, \
|
||||
KC_P0, KC_NO, RESET, KC_NO),
|
||||
RGB_HUD, RGB_HUI, BL_ON, \
|
||||
RGB_SAD, RGB_SAI, BL_OFF, KC_PPLS, \
|
||||
RGB_VAD, RGB_VAI, KC_P3, \
|
||||
KC_P0, RESET, KC_PENT),
|
||||
};
|
||||
|
||||
|
||||
|
@@ -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_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_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),
|
||||
|
||||
|
||||
|
||||
|
9
keyboards/dz60/keymaps/macos_arrow/config.h
Normal file
9
keyboards/dz60/keymaps/macos_arrow/config.h
Normal file
@@ -0,0 +1,9 @@
|
||||
#ifndef CONFIG_KEYMAP_H
|
||||
#define CONFIG_KEYMAP_H
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
// Fix KC_GESC conflict with Cmd+Alt+Esc on macos
|
||||
#define GRAVE_ESC_GUI_OVERRIDE
|
||||
|
||||
#endif
|
92
keyboards/dz60/keymaps/macos_arrow/keymap.c
Normal file
92
keyboards/dz60/keymaps/macos_arrow/keymap.c
Normal file
@@ -0,0 +1,92 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
#define ______ KC_TRNS
|
||||
#define _BL 0
|
||||
#define _FL 1
|
||||
#define _ML 2
|
||||
|
||||
enum my_keycodes {
|
||||
BR_UP = SAFE_RANGE,
|
||||
BR_DOWN
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* ,-----------------------------------------------------------------------------------------.
|
||||
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Backspace |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | _FL | A | S | D | F | G | H | J | K | L | ; | ' | Enter |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Shift | Z | X | C | V | B | N | M | , | . | / | _ML | Up |Shift|
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Ctrl | Alt | Gui | Space |Gui/_ML| Alt | Left| Down|Right|
|
||||
* `-----------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_BL] = LAYOUT_2_shifts(
|
||||
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_NO, KC_BSPC,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||
MO(_FL), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
||||
KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(_ML), KC_UP, KC_RSFT,
|
||||
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, LM(_ML, MOD_RGUI), KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT),
|
||||
|
||||
/* ,-----------------------------------------------------------------------------------------.
|
||||
* | ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Del |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | | | | | | UP | | | | | Reset |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | | | | | Left| Down|Right| | | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | | | | | | | | | | | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_FL] = LAYOUT(
|
||||
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ______, KC_DEL,
|
||||
______, ______, ______, ______, ______, ______, ______, ______, KC_UP, ______, ______, ______, ______, RESET,
|
||||
______, ______, ______, ______, ______, ______, ______, KC_LEFT, KC_DOWN, KC_RIGHT, ______, ______, ______,
|
||||
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,
|
||||
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______),
|
||||
|
||||
/* ,-----------------------------------------------------------------------------------------.
|
||||
* | | BR- | BR+ | F3 | F4 | | |PREV |PLAY |NEXT |MUTE | V- | V+ | Eject |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | | | | | | | | | | | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | | | | | | | | | | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | | | | | | | | | | | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_ML] = LAYOUT(
|
||||
______, BR_DOWN, BR_UP, ______, ______, KC_F5, KC_F6, KC_MEDIA_PREV_TRACK, KC_MEDIA_PLAY_PAUSE, KC_MEDIA_NEXT_TRACK, KC_AUDIO_MUTE, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, ______, KC_MEDIA_EJECT,
|
||||
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,
|
||||
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,
|
||||
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,
|
||||
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______),
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
uint8_t key;
|
||||
switch (keycode) {
|
||||
case BR_DOWN:
|
||||
case BR_UP:
|
||||
// Clear the RGUI modifier placed by LM for _ML layer as brightness don't
|
||||
// work with modifiers.
|
||||
key = (keycode == BR_DOWN) ? KC_SLCK : KC_PAUS;
|
||||
if (record->event.pressed) {
|
||||
unregister_mods(MOD_RGUI);
|
||||
add_key(key);
|
||||
send_keyboard_report();
|
||||
} else {
|
||||
del_key(key);
|
||||
send_keyboard_report();
|
||||
}
|
||||
return false; // Skip all further processing of this key
|
||||
default:
|
||||
return true; // Process all other keycodes normally
|
||||
}
|
||||
}
|
70
keyboards/dz60/keymaps/macos_arrow/readme.md
Normal file
70
keyboards/dz60/keymaps/macos_arrow/readme.md
Normal file
@@ -0,0 +1,70 @@
|
||||
# Macos keymap with arrow
|
||||
|
||||
This is a keymap for DZ60 configured with arrows using the layout below:
|
||||
|
||||
[](http://www.keyboard-layout-editor.com/#/gists/07d924064c77c0ff43de6b8a9519f931)
|
||||
|
||||
My build used the following components:
|
||||
* DZ60 PCB
|
||||
* [Stainless steel alu plate option A with 2U left shift](https://www.aliexpress.com/item/Alu-plate-dz60-plate-for-DIY-mechanical-keyboard/32827595666.html) (optional)
|
||||
* [YMDK customized 61 64 68 ANSI keyset](https://www.amazon.com/Customized-Keyset-Profile-Mechanical-Keyboard/dp/B0777LMKKK)
|
||||
* 60 Cherry MX Clear for the main keys + 10 Cherry MX Grey for the large keys
|
||||
* [The wood case for DZ60](https://www.aliexpress.com/item/GH60-Keyboard-Wood-Case-PCB-Board-Position-Plate-Satellite-Axis-And-Walnut-Wood-Wrist-Rest-For/32836566852.html) (optional)
|
||||
|
||||
## Base Layer
|
||||
|
||||
```
|
||||
,-----------------------------------------------------------------------------------------.
|
||||
| Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Backspace |
|
||||
|-----------------------------------------------------------------------------------------+
|
||||
| Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ |
|
||||
|-----------------------------------------------------------------------------------------+
|
||||
| _FL | A | S | D | F | G | H | J | K | L | ; | ' | Enter |
|
||||
|-----------------------------------------------------------------------------------------+
|
||||
| Shift | Z | X | C | V | B | N | M | , | . | / | _ML | Up |Shift|
|
||||
|-----------------------------------------------------------------------------------------+
|
||||
| Ctrl | Alt | Cmd | Space |Cmd/_ML| Alt | Left| Down|Right|
|
||||
`-----------------------------------------------------------------------------------------'
|
||||
```
|
||||
|
||||
* The escape key use `KC_GESC` to get grave accent on any letter with ``Alt+Esc`` and `` ` `` alone with the ``Hyper+Esc``. The `~` is obtained with `Shift+Esc`. `GRAVE_ESC_GUI_OVERRIDE` is define so `Cmd+Alt+Esc` can still work.
|
||||
* The `Caps-Lock` (`Hyper`) key switch to the function layer (`_FL`).
|
||||
* The right `Cmd` key is used to switch to the media layer (`_ML`) when used with keys mapped on that layer (the top row). Any other keys just act as a `Cmd+` that key.
|
||||
|
||||
## Function Layer (_FL)
|
||||
|
||||
```
|
||||
,-----------------------------------------------------------------------------------------.
|
||||
| ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Del |
|
||||
|-----------------------------------------------------------------------------------------+
|
||||
| | | | | | | | | UP | | | | | Reset |
|
||||
|-----------------------------------------------------------------------------------------+
|
||||
| | | | | | | | Left| Down|Right| | | |
|
||||
|-----------------------------------------------------------------------------------------+
|
||||
| | | | | | | | | | | | | | |
|
||||
|-----------------------------------------------------------------------------------------+
|
||||
| | | | | | | | | |
|
||||
`-----------------------------------------------------------------------------------------'
|
||||
```
|
||||
|
||||
The function layer is activated by the `Caps-Lock` (`Hyper`) key to access `F` keys. In addition, the `IJKL` are mapped as cursor keys on that layer.
|
||||
|
||||
## Media Layer (_ML)
|
||||
|
||||
```
|
||||
,-----------------------------------------------------------------------------------------.
|
||||
| | BR- | BR+ | F3 | F4 | | |PREV |PLAY |NEXT |MUTE | V- | V+ | Eject |
|
||||
|-----------------------------------------------------------------------------------------+
|
||||
| | | | | | | | | | | | | | |
|
||||
|-----------------------------------------------------------------------------------------+
|
||||
| | | | | | | | | | | | | |
|
||||
|-----------------------------------------------------------------------------------------+
|
||||
| | | | | | | | | | | | | | |
|
||||
|-----------------------------------------------------------------------------------------+
|
||||
| | | | | | | | | |
|
||||
`-----------------------------------------------------------------------------------------'
|
||||
```
|
||||
|
||||
The media layer is activated by the right `Cmd` (`FN`) key. It contains the typical macos media keys on the top row. Blank keys act as `Cmd+` that key on the base layer.
|
||||
|
||||
|
@@ -1,53 +1 @@
|
||||
#include "e6v2.h"
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
// put your keyboard start-up code here
|
||||
// runs once when the firmware starts up
|
||||
|
||||
matrix_init_user();
|
||||
}
|
||||
|
||||
void matrix_scan_kb(void) {
|
||||
// put your looping keyboard code here
|
||||
// runs every cycle (a lot)
|
||||
|
||||
matrix_scan_user();
|
||||
}
|
||||
|
||||
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||
// put your per-action keyboard code here
|
||||
// runs for every action, just before processing by the firmware
|
||||
|
||||
return process_record_user(keycode, record);
|
||||
}
|
||||
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
||||
DDRB |= (1<<6);
|
||||
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
|
||||
// output low
|
||||
DDRB |= (1<<2);
|
||||
PORTB &= ~(1<<2);
|
||||
} else {
|
||||
// Hi-Z
|
||||
DDRB &= ~(1<<2);
|
||||
PORTB &= ~(1<<2);
|
||||
}
|
||||
// DDRB |= (1<<7);
|
||||
// DDRB |= (1<<1);
|
||||
// DDRB |= (1<<3);
|
||||
// DDRE |= (1<<6);
|
||||
if (usb_led == 0){
|
||||
PORTB |= (1<<6);
|
||||
// PORTB |= (1<<7);
|
||||
// PORTB |= (1<<1);
|
||||
// PORTB |= (1<<3);
|
||||
// PORTE |= (1<<6);
|
||||
}
|
||||
else{
|
||||
PORTB &= ~(1<<6);
|
||||
// PORTB &= ~(1<<7);
|
||||
}
|
||||
|
||||
led_set_user(usb_led);
|
||||
}
|
||||
#include "e6v2.h"
|
@@ -3,64 +3,12 @@
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#define LAYOUT( \
|
||||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \
|
||||
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
|
||||
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \
|
||||
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \
|
||||
K40, K41, K42, K46, K4A, K4B, K4C, K4D \
|
||||
)\
|
||||
{\
|
||||
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \
|
||||
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO }, \
|
||||
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO }, \
|
||||
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO }, \
|
||||
{ K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D, KC_NO }, \
|
||||
}
|
||||
|
||||
#define LAYOUT_60_ansi( \
|
||||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
|
||||
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
|
||||
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \
|
||||
K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \
|
||||
K40, K41, K42, K46, K4A, K4B, K4C, K4D \
|
||||
)\
|
||||
{\
|
||||
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO }, \
|
||||
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO }, \
|
||||
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, KC_NO }, \
|
||||
{ K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, KC_NO, KC_NO }, \
|
||||
{ K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D, KC_NO }, \
|
||||
}
|
||||
|
||||
#define LAYOUT_hhkb( \
|
||||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
|
||||
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
|
||||
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \
|
||||
K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \
|
||||
K41, K42, K46, K4B, K4C \
|
||||
)\
|
||||
{\
|
||||
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO }, \
|
||||
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO }, \
|
||||
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, KC_NO }, \
|
||||
{ K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO }, \
|
||||
{ KC_NO, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, KC_NO, K4B, K4C, KC_NO, KC_NO }, \
|
||||
}
|
||||
|
||||
#define LAYOUT_hhkb_splits( \
|
||||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E,\
|
||||
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
|
||||
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \
|
||||
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \
|
||||
K41, K42, K46, K4B, K4C \
|
||||
)\
|
||||
{\
|
||||
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \
|
||||
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO }, \
|
||||
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, KC_NO }, \
|
||||
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO }, \
|
||||
{ KC_NO, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, KC_NO, K4B, K4C, KC_NO, KC_NO }, \
|
||||
}
|
||||
|
||||
#ifdef KEYBOARD_e6v2_oe
|
||||
#include "oe.h"
|
||||
#endif
|
||||
|
||||
#ifdef KEYBOARD_e6v2_le
|
||||
#include "le.h"
|
||||
#endif
|
||||
|
||||
#endif
|
@@ -1 +0,0 @@
|
||||
#include "../../config.h"
|
@@ -1 +0,0 @@
|
||||
#include "../../config.h"
|
65
keyboards/e6v2/le/config.h
Normal file
65
keyboards/e6v2/le/config.h
Normal file
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
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 0x6060
|
||||
#define DEVICE_VER 0x0002
|
||||
#define MANUFACTURER Exclusive / E-Team
|
||||
#define PRODUCT E6-V2 LE
|
||||
#define DESCRIPTION E6-V2 LE QMK PCB (Mid-Port)
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 5
|
||||
#define MATRIX_COLS 15
|
||||
|
||||
/* QMK E6-V2 PCB default pin-out */
|
||||
#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4 }
|
||||
#define MATRIX_COL_PINS { B5, D0, D1, D2, D3, D4, D5, D6, D7, C6, C7, F4, F5, F6, F7 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
#define RGB_DI_PIN E6
|
||||
#ifdef RGB_DI_PIN
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
#define RGBLED_NUM 12
|
||||
#define RGBLIGHT_HUE_STEP 12
|
||||
#define RGBLIGHT_SAT_STEP 12
|
||||
#define RGBLIGHT_VAL_STEP 12
|
||||
#endif
|
||||
|
||||
#define BACKLIGHT_PIN B6
|
||||
#ifdef BACKLIGHT_PIN
|
||||
#define BACKLIGHT_LEVELS 2
|
||||
#define BACKLIGHT_BREAHTING
|
||||
#define BREATHING_PERIOD 3
|
||||
#endif
|
||||
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
#define DEBOUNCING_DELAY 5
|
||||
|
||||
#define IS_COMMAND() ( \
|
||||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||
)
|
||||
|
||||
|
||||
|
||||
#endif
|
12
keyboards/e6v2/le/info.json
Normal file
12
keyboards/e6v2/le/info.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"keyboard_name": "E6-V2 LE",
|
||||
"url": "",
|
||||
"maintainer": "qmk",
|
||||
"width": 15,
|
||||
"height": 5,
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"x":0, "y":3}, {"x":1, "y":3}, {"label":"Z", "x":2, "y":3}, {"label":"X", "x":3, "y":3}, {"label":"C", "x":4, "y":3}, {"label":"V", "x":5, "y":3}, {"label":"B", "x":6, "y":3}, {"label":"N", "x":7, "y":3}, {"label":"M", "x":8, "y":3}, {"label":"<", "x":9, "y":3}, {"label":">", "x":10, "y":3}, {"label":"?", "x":11, "y":3}, {"x":12, "y":3}, {"x":13, "y":3}, {"x":14, "y":3}, {"x":0, "y":4, "w":1.75}, {"label":"Ctrl", "x":1.75, "y":4, "w":1.25}, {"label":"Win", "x":3, "y":4, "w":1.25}, {"label":"Alt", "x":4.25, "y":4, "w":1.25}, {"x":5.5, "y":4, "w":2.75}, {"x":8.25, "y":4, "w":1.75}, {"x":10, "y":4}, {"label":"Alt", "x":11, "y":4}, {"label":"Win", "x":12, "y":4}, {"label":"Menu", "x":13, "y":4}, {"label":"Ctrl", "x":14, "y":4}]
|
||||
}
|
||||
}
|
||||
}
|
11
keyboards/e6v2/le/keymaps/default/keymap.c
Normal file
11
keyboards/e6v2/le/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,11 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT(
|
||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC,
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
||||
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_DEL,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_MENU, KC_SPACE, KC_SPACE, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT
|
||||
),
|
||||
};
|
31
keyboards/e6v2/le/keymaps/eric/keymap.c
Normal file
31
keyboards/e6v2/le/keymaps/eric/keymap.c
Normal file
@@ -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
|
||||
),
|
||||
|
||||
};
|
44
keyboards/e6v2/le/le.c
Normal file
44
keyboards/e6v2/le/le.c
Normal file
@@ -0,0 +1,44 @@
|
||||
#include "le.h"
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
// put your keyboard start-up code here
|
||||
// runs once when the firmware starts up
|
||||
|
||||
matrix_init_user();
|
||||
}
|
||||
|
||||
void matrix_scan_kb(void) {
|
||||
// put your looping keyboard code here
|
||||
// runs every cycle (a lot)
|
||||
|
||||
matrix_scan_user();
|
||||
}
|
||||
|
||||
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||
// put your per-action keyboard code here
|
||||
// runs for every action, just before processing by the firmware
|
||||
|
||||
return process_record_user(keycode, record);
|
||||
}
|
||||
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
||||
DDRB |= (1<<7);
|
||||
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
|
||||
// output low
|
||||
DDRB |= (1<<2);
|
||||
PORTB &= ~(1<<2);
|
||||
} else {
|
||||
// Hi-Z
|
||||
DDRB &= ~(1<<2);
|
||||
PORTB &= ~(1<<2);
|
||||
}
|
||||
if (usb_led == 0){
|
||||
PORTB |= (1<<7);
|
||||
}
|
||||
else{
|
||||
PORTB &= ~(1<<7);
|
||||
}
|
||||
|
||||
led_set_user(usb_led);
|
||||
}
|
21
keyboards/e6v2/le/le.h
Normal file
21
keyboards/e6v2/le/le.h
Normal file
@@ -0,0 +1,21 @@
|
||||
#ifndef LE_H
|
||||
#define LE_H
|
||||
|
||||
#include "../e6v2.h"
|
||||
|
||||
#define LAYOUT( \
|
||||
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, \
|
||||
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, \
|
||||
K40, K42, K43, K44, K47, K49, K4A, K4B, K4C, K4D, K4E \
|
||||
)\
|
||||
{\
|
||||
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \
|
||||
{ K10, KC_NO, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \
|
||||
{ K20, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO }, \
|
||||
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \
|
||||
{ K40, KC_NO, K42, K43, K44, KC_NO, KC_NO, K47, KC_NO, K49, K4A, K4B, K4C, K4D, K4E }, \
|
||||
}
|
||||
|
||||
#endif
|
17
keyboards/e6v2/le/readme.md
Normal file
17
keyboards/e6v2/le/readme.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# E6-V2 Last Edition (LE)
|
||||
|
||||
These docs are for the QMK version of the PCB. [More info on qmk.fm](http://qmk.fm/)
|
||||
|
||||
Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin)
|
||||
Hardware Supported: E6-V2 LE Mid Port rev.qmk
|
||||
Hardware Availability: [geekhack.org/index.php?topic=90787.0](https://geekhack.org/index.php?topic=90787.0)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make e6v2/le:default
|
||||
|
||||
Or to make and flash:
|
||||
|
||||
make e6v2/le:default:dfu
|
||||
|
||||
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.
|
68
keyboards/e6v2/le/rules.mk
Normal file
68
keyboards/e6v2/le/rules.mk
Normal file
@@ -0,0 +1,68 @@
|
||||
# MCU name
|
||||
#MCU = at90usb1287
|
||||
MCU = atmega32u4
|
||||
|
||||
# Processor frequency.
|
||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||
# automatically to create a 32-bit value in your source code.
|
||||
#
|
||||
# This will be an integer division of F_USB below, as it is sourced by
|
||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||
# does not *change* the processor frequency - it should merely be updated to
|
||||
# reflect the processor speed set externally so that the code can use accurate
|
||||
# software delays.
|
||||
F_CPU = 16000000
|
||||
|
||||
|
||||
#
|
||||
# LUFA specific
|
||||
#
|
||||
# Target architecture (see library "Board Types" documentation).
|
||||
ARCH = AVR8
|
||||
|
||||
# Input clock frequency.
|
||||
# This will define a symbol, F_USB, in all source code files equal to the
|
||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||
# at the end, this will be done automatically to create a 32-bit value in your
|
||||
# source code.
|
||||
#
|
||||
# If no clock division is performed on the input clock inside the AVR (via the
|
||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||
F_USB = $(F_CPU)
|
||||
|
||||
# Interrupt driven control endpoint task(+60)
|
||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
|
||||
|
||||
# Boot Section Size in *bytes*
|
||||
# Teensy halfKay 512
|
||||
# Teensy++ halfKay 1024
|
||||
# Atmel DFU loader 4096
|
||||
# LUFA bootloader 4096
|
||||
# USBaspLoader 2048
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||
|
||||
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default
|
||||
RGBLIGHT_ENABLE = yes
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"keyboard_name": "E6-V2",
|
||||
"keyboard_name": "E6-V2 OE",
|
||||
"url": "",
|
||||
"maintainer": "qmk",
|
||||
"width": 15,
|
53
keyboards/e6v2/oe/oe.c
Normal file
53
keyboards/e6v2/oe/oe.c
Normal file
@@ -0,0 +1,53 @@
|
||||
#include "oe.h"
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
// put your keyboard start-up code here
|
||||
// runs once when the firmware starts up
|
||||
|
||||
matrix_init_user();
|
||||
}
|
||||
|
||||
void matrix_scan_kb(void) {
|
||||
// put your looping keyboard code here
|
||||
// runs every cycle (a lot)
|
||||
|
||||
matrix_scan_user();
|
||||
}
|
||||
|
||||
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||
// put your per-action keyboard code here
|
||||
// runs for every action, just before processing by the firmware
|
||||
|
||||
return process_record_user(keycode, record);
|
||||
}
|
||||
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
||||
DDRB |= (1<<6);
|
||||
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
|
||||
// output low
|
||||
DDRB |= (1<<2);
|
||||
PORTB &= ~(1<<2);
|
||||
} else {
|
||||
// Hi-Z
|
||||
DDRB &= ~(1<<2);
|
||||
PORTB &= ~(1<<2);
|
||||
}
|
||||
// DDRB |= (1<<7);
|
||||
// DDRB |= (1<<1);
|
||||
// DDRB |= (1<<3);
|
||||
// DDRE |= (1<<6);
|
||||
if (usb_led == 0){
|
||||
PORTB |= (1<<6);
|
||||
// PORTB |= (1<<7);
|
||||
// PORTB |= (1<<1);
|
||||
// PORTB |= (1<<3);
|
||||
// PORTE |= (1<<6);
|
||||
}
|
||||
else{
|
||||
PORTB &= ~(1<<6);
|
||||
// PORTB &= ~(1<<7);
|
||||
}
|
||||
|
||||
led_set_user(usb_led);
|
||||
}
|
66
keyboards/e6v2/oe/oe.h
Normal file
66
keyboards/e6v2/oe/oe.h
Normal file
@@ -0,0 +1,66 @@
|
||||
#ifndef OE_H
|
||||
#define OE_H
|
||||
|
||||
#include "../e6v2.h"
|
||||
|
||||
#define LAYOUT( \
|
||||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \
|
||||
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
|
||||
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \
|
||||
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \
|
||||
K40, K41, K42, K46, K4A, K4B, K4C, K4D \
|
||||
)\
|
||||
{\
|
||||
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \
|
||||
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO }, \
|
||||
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO }, \
|
||||
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO }, \
|
||||
{ K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D, KC_NO }, \
|
||||
}
|
||||
|
||||
#define LAYOUT_60_ansi( \
|
||||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
|
||||
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
|
||||
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \
|
||||
K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \
|
||||
K40, K41, K42, K46, K4A, K4B, K4C, K4D \
|
||||
)\
|
||||
{\
|
||||
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO }, \
|
||||
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO }, \
|
||||
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, KC_NO }, \
|
||||
{ K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, KC_NO, KC_NO }, \
|
||||
{ K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D, KC_NO }, \
|
||||
}
|
||||
|
||||
#define LAYOUT_hhkb( \
|
||||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
|
||||
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
|
||||
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \
|
||||
K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \
|
||||
K41, K42, K46, K4B, K4C \
|
||||
)\
|
||||
{\
|
||||
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO }, \
|
||||
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO }, \
|
||||
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, KC_NO }, \
|
||||
{ K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO }, \
|
||||
{ KC_NO, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, KC_NO, K4B, K4C, KC_NO, KC_NO }, \
|
||||
}
|
||||
|
||||
#define LAYOUT_hhkb_splits( \
|
||||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E,\
|
||||
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
|
||||
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \
|
||||
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \
|
||||
K41, K42, K46, K4B, K4C \
|
||||
)\
|
||||
{\
|
||||
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \
|
||||
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO }, \
|
||||
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, KC_NO }, \
|
||||
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO }, \
|
||||
{ KC_NO, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, KC_NO, K4B, K4C, KC_NO, KC_NO }, \
|
||||
}
|
||||
|
||||
#endif
|
17
keyboards/e6v2/oe/readme.md
Normal file
17
keyboards/e6v2/oe/readme.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# E6-V2 Original Edition (OE)
|
||||
|
||||
These docs are for the QMK version of the PCB. [More info on qmk.fm](http://qmk.fm/)
|
||||
|
||||
Keyboard Maintainer: [amnesia0287](https://github.com/amnesia0287)
|
||||
Hardware Supported: E6-V2 OE Mid Port rev.qmk
|
||||
Hardware Availability: [geekhack.org/index.php?topic=90787.0](https://geekhack.org/index.php?topic=90787.0)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make e6v2/oe:default
|
||||
|
||||
Or to make and flash:
|
||||
|
||||
make e6v2/oe:default:dfu
|
||||
|
||||
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.
|
70
keyboards/e6v2/oe/rules.mk
Normal file
70
keyboards/e6v2/oe/rules.mk
Normal file
@@ -0,0 +1,70 @@
|
||||
# MCU name
|
||||
#MCU = at90usb1287
|
||||
MCU = atmega32u4
|
||||
|
||||
# Processor frequency.
|
||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||
# automatically to create a 32-bit value in your source code.
|
||||
#
|
||||
# This will be an integer division of F_USB below, as it is sourced by
|
||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||
# does not *change* the processor frequency - it should merely be updated to
|
||||
# reflect the processor speed set externally so that the code can use accurate
|
||||
# software delays.
|
||||
F_CPU = 16000000
|
||||
|
||||
|
||||
#
|
||||
# LUFA specific
|
||||
#
|
||||
# Target architecture (see library "Board Types" documentation).
|
||||
ARCH = AVR8
|
||||
|
||||
# Input clock frequency.
|
||||
# This will define a symbol, F_USB, in all source code files equal to the
|
||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||
# at the end, this will be done automatically to create a 32-bit value in your
|
||||
# source code.
|
||||
#
|
||||
# If no clock division is performed on the input clock inside the AVR (via the
|
||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||
F_USB = $(F_CPU)
|
||||
|
||||
# Interrupt driven control endpoint task(+60)
|
||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
|
||||
|
||||
# Boot Section Size in *bytes*
|
||||
# Teensy halfKay 512
|
||||
# Teensy++ halfKay 1024
|
||||
# Atmel DFU loader 4096
|
||||
# LUFA bootloader 4096
|
||||
# USBaspLoader 2048
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||
|
||||
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default
|
||||
RGBLIGHT_ENABLE = yes
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
|
||||
LAYOUTS = 60_ansi
|
@@ -1,18 +1,9 @@
|
||||
E6-V2
|
||||
===
|
||||
# E6-V2
|
||||
|
||||
These docs are for the QMK version of the PCB. [More info on qmk.fm](http://qmk.fm/)
|
||||
|
||||
Keyboard Maintainer: [amnesia0287](https://github.com/amnesia0287)
|
||||
Hardware Supported: E6-V2 Mid Port rev.qmk
|
||||
Hardware Availability: [geekhack.org/index.php?topic=90787.0](https://geekhack.org/index.php?topic=90787.0)
|
||||
The E6V2 has been available with either a bootmapper client or QMK powered PCB. During the second round, the QMK powered PCB was redesigned and used different ports and a different switch matrix.
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make e6v2:default
|
||||
|
||||
Or to make and flash:
|
||||
|
||||
make e6v2:default:dfu
|
||||
Please use the appropriate version when making your firmware.
|
||||
|
||||
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.
|
||||
|
@@ -1,70 +1 @@
|
||||
# MCU name
|
||||
#MCU = at90usb1287
|
||||
MCU = atmega32u4
|
||||
|
||||
# Processor frequency.
|
||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||
# automatically to create a 32-bit value in your source code.
|
||||
#
|
||||
# This will be an integer division of F_USB below, as it is sourced by
|
||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||
# does not *change* the processor frequency - it should merely be updated to
|
||||
# reflect the processor speed set externally so that the code can use accurate
|
||||
# software delays.
|
||||
F_CPU = 16000000
|
||||
|
||||
|
||||
#
|
||||
# LUFA specific
|
||||
#
|
||||
# Target architecture (see library "Board Types" documentation).
|
||||
ARCH = AVR8
|
||||
|
||||
# Input clock frequency.
|
||||
# This will define a symbol, F_USB, in all source code files equal to the
|
||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||
# at the end, this will be done automatically to create a 32-bit value in your
|
||||
# source code.
|
||||
#
|
||||
# If no clock division is performed on the input clock inside the AVR (via the
|
||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||
F_USB = $(F_CPU)
|
||||
|
||||
# Interrupt driven control endpoint task(+60)
|
||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
|
||||
|
||||
# Boot Section Size in *bytes*
|
||||
# Teensy halfKay 512
|
||||
# Teensy++ halfKay 1024
|
||||
# Atmel DFU loader 4096
|
||||
# LUFA bootloader 4096
|
||||
# USBaspLoader 2048
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||
|
||||
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default
|
||||
RGBLIGHT_ENABLE = yes
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
|
||||
LAYOUTS = 60_ansi
|
||||
DEFAULT_FOLDER = e6v2/oe
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user