mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-08-05 14:08:39 +00:00
Compare commits
242 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
64c957d907 | ||
![]() |
9eb7b7919f | ||
![]() |
103d904fab | ||
![]() |
c5707708ed | ||
![]() |
cd9262d7b2 | ||
![]() |
6e984a8b5e | ||
![]() |
2898699804 | ||
![]() |
2bfac351ed | ||
![]() |
2c0bc5ed6b | ||
![]() |
4aaa4b3428 | ||
![]() |
90046af17f | ||
![]() |
27b512d9f5 | ||
![]() |
9153ff59d4 | ||
![]() |
ac7a9e3c66 | ||
![]() |
ea47be936b | ||
![]() |
5b5f452bf9 | ||
![]() |
be666b2d8a | ||
![]() |
d6cc90d027 | ||
![]() |
3527efcbd2 | ||
![]() |
3e45bc775e | ||
![]() |
aff5c49ee9 | ||
![]() |
7f4f0f7685 | ||
![]() |
b1ed855871 | ||
![]() |
563ce3f225 | ||
![]() |
38e01a7480 | ||
![]() |
54b572159f | ||
![]() |
6f80217958 | ||
![]() |
e76bf17d36 | ||
![]() |
6cb2d7ba6d | ||
![]() |
526bc4c7cc | ||
![]() |
484c85bd0d | ||
![]() |
a7b1b146d1 | ||
![]() |
7b5fa4b13e | ||
![]() |
c71c078dff | ||
![]() |
134a69f4ad | ||
![]() |
40383089d0 | ||
![]() |
7f0def77a2 | ||
![]() |
b7688590b8 | ||
![]() |
0c0e208a36 | ||
![]() |
3ddec14eb8 | ||
![]() |
46b4b4407f | ||
![]() |
c2390bf321 | ||
![]() |
c043edd138 | ||
![]() |
cc7bf108a9 | ||
![]() |
bb1b441325 | ||
![]() |
e2f60eba2f | ||
![]() |
8443481aea | ||
![]() |
d9abb833e5 | ||
![]() |
2c6c483096 | ||
![]() |
6b46c06018 | ||
![]() |
c0859ac096 | ||
![]() |
93b004c943 | ||
![]() |
fbcbf44926 | ||
![]() |
3744a2b641 | ||
![]() |
cfba216541 | ||
![]() |
0c1256e60a | ||
![]() |
b7d2a9f980 | ||
![]() |
ee1be3e5b5 | ||
![]() |
8e0444618f | ||
![]() |
de78d9e1ff | ||
![]() |
08e9fc142c | ||
![]() |
41dee98ec4 | ||
![]() |
72d4e4bfd7 | ||
![]() |
2149f3b588 | ||
![]() |
33483b440c | ||
![]() |
fc921a9c54 | ||
![]() |
7e56c4bcb1 | ||
![]() |
2c3706611f | ||
![]() |
5e52eda0ca | ||
![]() |
7bbd299fba | ||
![]() |
ea1fe35ae7 | ||
![]() |
4d98c69e02 | ||
![]() |
ff8b1b9c69 | ||
![]() |
af84f0ff86 | ||
![]() |
f0863286cc | ||
![]() |
b21c592f1e | ||
![]() |
ca35647535 | ||
![]() |
afd5cda4a0 | ||
![]() |
30c3f3b2bd | ||
![]() |
6395853148 | ||
![]() |
1586548b4f | ||
![]() |
29830f306f | ||
![]() |
af55ef8418 | ||
![]() |
374ed67e87 | ||
![]() |
f3cbb7bd6e | ||
![]() |
5eb8f3f6b5 | ||
![]() |
b13162f7fd | ||
![]() |
df33618b26 | ||
![]() |
fdeec29636 | ||
![]() |
40bf3a2ce9 | ||
![]() |
3054c7bda0 | ||
![]() |
584a7a0395 | ||
![]() |
8181c8dc97 | ||
![]() |
06f1901783 | ||
![]() |
e59f331268 | ||
![]() |
9eedaa8802 | ||
![]() |
eeda99bf2e | ||
![]() |
20e134e681 | ||
![]() |
398204b2a0 | ||
![]() |
5ec327ad99 | ||
![]() |
6172e55489 | ||
![]() |
3ec4a00bfc | ||
![]() |
72bd17f290 | ||
![]() |
11439c4326 | ||
![]() |
ff5fcedb10 | ||
![]() |
2527fe879f | ||
![]() |
45591ee443 | ||
![]() |
8f790948e5 | ||
![]() |
a49d98e665 | ||
![]() |
4f1f52b53b | ||
![]() |
91a4a63ac7 | ||
![]() |
039434caf9 | ||
![]() |
bb5262de07 | ||
![]() |
cb149650ef | ||
![]() |
4446f86bfd | ||
![]() |
306f23dc51 | ||
![]() |
118d5cc03f | ||
![]() |
8f02375cc6 | ||
![]() |
155e9310ff | ||
![]() |
9739d6ba0a | ||
![]() |
161ffa0af6 | ||
![]() |
02d44beb44 | ||
![]() |
80dfd34fe4 | ||
![]() |
8c3054777a | ||
![]() |
6c6bbff600 | ||
![]() |
641bbeb41a | ||
![]() |
60f9abca12 | ||
![]() |
25892301d4 | ||
![]() |
1ae07f657a | ||
![]() |
dd03ac3893 | ||
![]() |
e83c62a002 | ||
![]() |
48933811c5 | ||
![]() |
119b02c540 | ||
![]() |
388de9bc07 | ||
![]() |
89b80b79d5 | ||
![]() |
9e6ee47779 | ||
![]() |
e8f730595c | ||
![]() |
cc45f62d75 | ||
![]() |
24b17c9619 | ||
![]() |
ca39fa8222 | ||
![]() |
2cef75cbb3 | ||
![]() |
4e78d28b4b | ||
![]() |
f6c0d999b9 | ||
![]() |
baf69ee89d | ||
![]() |
28fbf84cc5 | ||
![]() |
8b6cdd1788 | ||
![]() |
d46d304395 | ||
![]() |
b11c332477 | ||
![]() |
200ee8e797 | ||
![]() |
7c63c0a950 | ||
![]() |
a5a46f3d36 | ||
![]() |
fb900e2ad1 | ||
![]() |
930e1dfc4c | ||
![]() |
cce19d265d | ||
![]() |
a003be1e9c | ||
![]() |
3bef186ea6 | ||
![]() |
e5380795b9 | ||
![]() |
4a5e68f4f2 | ||
![]() |
e99615b2ac | ||
![]() |
090c30212e | ||
![]() |
753f57ee00 | ||
![]() |
fd3b0787ed | ||
![]() |
16302be5ad | ||
![]() |
b8db0b26b1 | ||
![]() |
614b3a0f7c | ||
![]() |
11eaccdbce | ||
![]() |
13ad650136 | ||
![]() |
2ad2b73d68 | ||
![]() |
3e698a54ea | ||
![]() |
6d78d45ca1 | ||
![]() |
c9159effc0 | ||
![]() |
7749f4590f | ||
![]() |
5b7260fc53 | ||
![]() |
afb4a43677 | ||
![]() |
ca9262ca3d | ||
![]() |
0f2108c905 | ||
![]() |
45dca4bc40 | ||
![]() |
3f96ba0113 | ||
![]() |
2fb14845d5 | ||
![]() |
21bc230dfd | ||
![]() |
42c9fd2625 | ||
![]() |
4e5f921496 | ||
![]() |
dee2faf387 | ||
![]() |
a5b43b35fe | ||
![]() |
57678238a9 | ||
![]() |
8ad561c8f0 | ||
![]() |
58670ef4b7 | ||
![]() |
fd0f78254d | ||
![]() |
04de0533b8 | ||
![]() |
368de26996 | ||
![]() |
161afe2e54 | ||
![]() |
ff3369ac5d | ||
![]() |
59b2be6200 | ||
![]() |
b3d6426aa9 | ||
![]() |
d0da43fbdc | ||
![]() |
7d4955b2c4 | ||
![]() |
d115abfd8d | ||
![]() |
d6b7ca04f2 | ||
![]() |
0677e64655 | ||
![]() |
20130e010b | ||
![]() |
86a7687a87 | ||
![]() |
538874f90f | ||
![]() |
8a330b33ff | ||
![]() |
6d0dc910d9 | ||
![]() |
106de349fb | ||
![]() |
59dc31a737 | ||
![]() |
4099536c0e | ||
![]() |
4bb28d2df0 | ||
![]() |
ac4fd5e99e | ||
![]() |
3a0f3a5bd0 | ||
![]() |
da1afe152a | ||
![]() |
fe982caf5d | ||
![]() |
5d47231f2a | ||
![]() |
d5a06aec83 | ||
![]() |
dbc7761688 | ||
![]() |
0db6bb10e0 | ||
![]() |
1fd4546fff | ||
![]() |
064d9e2175 | ||
![]() |
a90331aec2 | ||
![]() |
0b0c98929b | ||
![]() |
75a51659ab | ||
![]() |
5803012eda | ||
![]() |
8c033497c6 | ||
![]() |
d7f1e072a8 | ||
![]() |
b10aad45b6 | ||
![]() |
81ce35c10a | ||
![]() |
fbf59ba2e5 | ||
![]() |
87e6d01374 | ||
![]() |
fff6f22cf6 | ||
![]() |
8b85ec2a98 | ||
![]() |
3b42cff516 | ||
![]() |
6d2730eeff | ||
![]() |
a495326aed | ||
![]() |
a152ad3145 | ||
![]() |
1904319745 | ||
![]() |
55c3214877 | ||
![]() |
dd7534ccca | ||
![]() |
e4dfcf896e | ||
![]() |
6983c71efd | ||
![]() |
929e6a3231 | ||
![]() |
82c02d9b8d | ||
![]() |
d79b5e67b6 |
5
.github/ISSUE_TEMPLATE/blank.md
vendored
Normal file
5
.github/ISSUE_TEMPLATE/blank.md
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
name: Blank issue
|
||||
about: If you're 100% sure that you don't need one of the other issue templates, use this one instead.
|
||||
|
||||
---
|
31
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
31
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve the QMK Firmware
|
||||
---
|
||||
<!-- Provide a general summary of the bug in the Title above -->
|
||||
|
||||
<!-- This template is entirely option and can be removed, but is here to help both you and us. -->
|
||||
<!-- This text and anything on lines wrapped like this one will not show up in the final text. This text is to help us and you. -->
|
||||
|
||||
**Describe the bug**
|
||||
|
||||
<!-- A clear and concise description of what the bug is. -->
|
||||
|
||||
**System Information**
|
||||
- Keyboard:
|
||||
- Revision (if applicable):
|
||||
- Operating System:
|
||||
- avr-gcc version:
|
||||
<!-- Run `avr-gcc --version` to find out -->
|
||||
- arm gcc version:
|
||||
<!-- Run `arm-none-eabi-gcc --version` to find out -->
|
||||
- QMK Firmware version:
|
||||
<!-- You can run `git describe --abbrev=0 --tags` to find this out -->
|
||||
- Any keyboard related software installed?
|
||||
- [ ] Auto Hot Key
|
||||
- [ ] Karabiner
|
||||
- [ ] Other
|
||||
|
||||
**Additional context**
|
||||
|
||||
<!-- Add any other context about the problem here. -->
|
19
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
19
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest a new feature or changes to existing features
|
||||
---
|
||||
<!--- Provide a general summary of the changes you want in the Title above -->
|
||||
|
||||
<!-- This template is entirely option and can be removed, but is here to help both you and us. -->
|
||||
<!-- This text and anything on lines wrapped like this one will not show up in the final text. This text is to help us and you. -->
|
||||
|
||||
## Feature Request Type
|
||||
|
||||
- [ ] Core Functionality
|
||||
- [ ] Add-on hardware support (e.g. audio, RGB, OLED screen, etc.)
|
||||
- [ ] Alteration (enhancement/optimization) of existing Feature(s)
|
||||
- [ ] New behavior
|
||||
|
||||
## Description
|
||||
|
||||
<!-- A few sentences describing what it is that you'd like to see. Additional information (such as links to spec sheets, licensing info, other related issues or PR's, etc) would be helpful. -->
|
9
.github/ISSUE_TEMPLATE/other_issues.md
vendored
Normal file
9
.github/ISSUE_TEMPLATE/other_issues.md
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
---
|
||||
name: Other issues
|
||||
about: Anything else that doesn't fall into the above categories.
|
||||
---
|
||||
<!--- Provide a general summary of the changes you want in the Title above -->
|
||||
|
||||
<!-- This text and anything on lines wrapped like this one will not show up in the final text. This text is to help us and you. -->
|
||||
|
||||
<!-- Please check https://docs.qmk.fm/#/support for additional resources first. If that doesn't answer your question, check the bug report option, as that may be more appropriate. -->
|
32
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
32
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
<!--- Provide a general summary of your changes in the Title above -->
|
||||
|
||||
<!--- This template is entirely option and can be removed, but is here to help both you and us. -->
|
||||
<!--- This text and anything on lines wrapped like this one will not show up in the final text. This text is to help us and you. -->
|
||||
|
||||
## Description
|
||||
<!--- Describe your changes in detail -->
|
||||
|
||||
## Types of changes
|
||||
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
|
||||
- [ ] Core
|
||||
- [ ] Bugfix
|
||||
- [ ] New Feature
|
||||
- [ ] Enhancement/Optimization
|
||||
- [ ] Keyboard (addition or update)
|
||||
- [ ] Keymap/Layout/Userspace (addition or update)
|
||||
- [ ] Documentation
|
||||
|
||||
|
||||
## Issues Fixed or Closed by this PR
|
||||
|
||||
*
|
||||
|
||||
## Checklist:
|
||||
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
|
||||
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
|
||||
- [ ] My code follows the code style of this project.
|
||||
- [ ] My change requires a change to the documentation.
|
||||
- [ ] I have updated the documentation accordingly.
|
||||
- [ ] I have read the **CONTRIBUTING** document. (https://docs.qmk.fm/#/contributing)
|
||||
- [ ] I have added tests to cover my changes.
|
||||
- [ ] I have tested the changes and verified that they work and don't break anything (as well as I can manage).
|
@@ -19,6 +19,7 @@ install:
|
||||
before_script:
|
||||
- avr-gcc --version
|
||||
script:
|
||||
- git rev-parse --short HEAD
|
||||
- make test:all AUTOGEN=false
|
||||
- bash util/travis_build.sh
|
||||
- bash util/travis_docs.sh
|
||||
@@ -33,7 +34,7 @@ addons:
|
||||
- diffutils
|
||||
- dos2unix
|
||||
- doxygen
|
||||
after_success:
|
||||
after_success:
|
||||
bash util/travis_compiled_push.sh
|
||||
notifications:
|
||||
webhooks:
|
||||
|
41
Dockerfile
41
Dockerfile
@@ -1,28 +1,29 @@
|
||||
FROM debian:jessie
|
||||
MAINTAINER Erik Dasque <erik@frenchguys.com>
|
||||
FROM debian
|
||||
|
||||
RUN apt-get update && apt-get install --no-install-recommends -y build-essential \
|
||||
RUN apt-get update && apt-get install --no-install-recommends -y \
|
||||
avr-libc \
|
||||
avrdude \
|
||||
binutils-arm-none-eabi \
|
||||
binutils-avr \
|
||||
build-essential \
|
||||
dfu-programmer \
|
||||
dfu-util \
|
||||
gcc \
|
||||
gcc-arm-none-eabi \
|
||||
gcc-avr \
|
||||
git \
|
||||
libnewlib-arm-none-eabi \
|
||||
software-properties-common \
|
||||
unzip \
|
||||
wget \
|
||||
zip \
|
||||
gcc-avr \
|
||||
binutils-avr \
|
||||
avr-libc \
|
||||
dfu-programmer \
|
||||
dfu-util \
|
||||
gcc-arm-none-eabi \
|
||||
binutils-arm-none-eabi \
|
||||
libnewlib-arm-none-eabi \
|
||||
git \
|
||||
software-properties-common \
|
||||
avrdude \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ENV keyboard=ergodox
|
||||
ENV subproject=ez
|
||||
ENV keymap=default
|
||||
ENV KEYBOARD=ergodox_ez
|
||||
ENV KEYMAP=default
|
||||
|
||||
VOLUME /qmk
|
||||
WORKDIR /qmk
|
||||
CMD make clean ; make keyboard=${keyboard} subproject=${subproject} keymap=${keymap}
|
||||
VOLUME /qmk_firmware
|
||||
WORKDIR /qmk_firmware
|
||||
COPY . .
|
||||
|
||||
CMD make $KEYBOARD:$KEYMAP
|
||||
|
@@ -34,6 +34,10 @@ $(error MASTER does not have a valid value(left/right))
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef SKIP_VERSION
|
||||
OPT_DEFS += -DSKIP_VERSION
|
||||
endif
|
||||
|
||||
# Determine which subfolders exist.
|
||||
KEYBOARD_FOLDER_PATH_1 := $(KEYBOARD)
|
||||
KEYBOARD_FOLDER_PATH_2 := $(patsubst %/,%,$(dir $(KEYBOARD_FOLDER_PATH_1)))
|
||||
@@ -278,6 +282,7 @@ ifneq ("$(wildcard $(KEYMAP_PATH)/config.h)","")
|
||||
endif
|
||||
|
||||
# # project specific files
|
||||
SRC += $(patsubst %.c,%.clib,$(LIB_SRC))
|
||||
SRC += $(KEYBOARD_SRC) \
|
||||
$(KEYMAP_C) \
|
||||
$(QUANTUM_SRC)
|
||||
@@ -296,6 +301,7 @@ include $(TMK_PATH)/protocol.mk
|
||||
include $(TMK_PATH)/common.mk
|
||||
include bootloader.mk
|
||||
|
||||
SRC += $(patsubst %.c,%.clib,$(QUANTUM_LIB_SRC))
|
||||
SRC += $(TMK_COMMON_SRC)
|
||||
OPT_DEFS += $(TMK_COMMON_DEFS)
|
||||
EXTRALDFLAGS += $(TMK_COMMON_LDFLAGS)
|
||||
|
@@ -21,5 +21,4 @@ COMMON_VPATH += $(QUANTUM_PATH)/keymap_extras
|
||||
COMMON_VPATH += $(QUANTUM_PATH)/audio
|
||||
COMMON_VPATH += $(QUANTUM_PATH)/process_keycode
|
||||
COMMON_VPATH += $(QUANTUM_PATH)/api
|
||||
COMMON_VPATH += $(QUANTUM_PATH)/split_common
|
||||
COMMON_VPATH += $(DRIVER_PATH)
|
||||
|
@@ -225,6 +225,13 @@ ifeq ($(strip $(ENCODER_ENABLE)), yes)
|
||||
OPT_DEFS += -DENCODER_ENABLE
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(HAPTIC_ENABLE)), DRV2605L)
|
||||
COMMON_VPATH += $(DRIVER_PATH)/haptic
|
||||
SRC += DRV2605L.c
|
||||
SRC += i2c_master.c
|
||||
OPT_DEFS += -DDRV2605L
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(HD44780_ENABLE)), yes)
|
||||
SRC += drivers/avr/hd44780.c
|
||||
OPT_DEFS += -DHD44780_ENABLE
|
||||
@@ -240,6 +247,8 @@ ifeq ($(strip $(LEADER_ENABLE)), yes)
|
||||
OPT_DEFS += -DLEADER_ENABLE
|
||||
endif
|
||||
|
||||
include $(DRIVER_PATH)/qwiic/qwiic.mk
|
||||
|
||||
QUANTUM_SRC:= \
|
||||
$(QUANTUM_DIR)/quantum.c \
|
||||
$(QUANTUM_DIR)/keymap_common.c \
|
||||
@@ -256,7 +265,8 @@ 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
|
||||
$(QUANTUM_DIR)/split_common/split_util.c
|
||||
QUANTUM_LIB_SRC += $(QUANTUM_DIR)/split_common/i2c.c
|
||||
QUANTUM_LIB_SRC += $(QUANTUM_DIR)/split_common/serial.c
|
||||
COMMON_VPATH += $(QUANTUM_PATH)/split_common
|
||||
endif
|
||||
|
4
docs/LANGS.md
Normal file
4
docs/LANGS.md
Normal file
@@ -0,0 +1,4 @@
|
||||
# Languages
|
||||
|
||||
* [English](/)
|
||||
* [Chinese](zh/)
|
@@ -43,6 +43,7 @@
|
||||
|
||||
* [Features](features.md)
|
||||
* [Basic Keycodes](keycodes_basic.md)
|
||||
* [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md)
|
||||
* [Quantum Keycodes](quantum_keycodes.md)
|
||||
* [Advanced Keycodes](feature_advanced_keycodes.md)
|
||||
* [Audio](feature_audio.md)
|
||||
@@ -74,7 +75,6 @@
|
||||
* [Thermal Printer](feature_thermal_printer.md)
|
||||
* [Unicode](feature_unicode.md)
|
||||
* [Userspace](feature_userspace.md)
|
||||
* [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md)
|
||||
|
||||
* For Makers and Modders
|
||||
* [Hand Wiring Guide](hand_wire.md)
|
||||
@@ -88,6 +88,7 @@
|
||||
|
||||
* Other Topics
|
||||
* [Using Eclipse with QMK](eclipse.md)
|
||||
* [Support](support.md)
|
||||
|
||||
* QMK Internals (In Progress)
|
||||
* [Defines](internals_defines.md)
|
||||
|
@@ -43,6 +43,7 @@
|
||||
|
||||
* [Features](features.md)
|
||||
* [Basic Keycodes](keycodes_basic.md)
|
||||
* [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md)
|
||||
* [Quantum Keycodes](quantum_keycodes.md)
|
||||
* [Advanced Keycodes](feature_advanced_keycodes.md)
|
||||
* [Audio](feature_audio.md)
|
||||
@@ -74,7 +75,6 @@
|
||||
* [Thermal Printer](feature_thermal_printer.md)
|
||||
* [Unicode](feature_unicode.md)
|
||||
* [Userspace](feature_userspace.md)
|
||||
* [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md)
|
||||
|
||||
* For Makers and Modders
|
||||
* [Hand Wiring Guide](hand_wire.md)
|
||||
@@ -88,6 +88,7 @@
|
||||
|
||||
* Other Topics
|
||||
* [Using Eclipse with QMK](eclipse.md)
|
||||
* [Support](support.md)
|
||||
|
||||
* QMK Internals (In Progress)
|
||||
* [Defines](internals_defines.md)
|
||||
|
@@ -143,6 +143,11 @@ If you define these options you will enable the associated feature, which may in
|
||||
* Breaks any Tap Toggle functionality (`TT` or the One Shot Tap Toggle)
|
||||
* `#define LEADER_TIMEOUT 300`
|
||||
* how long before the leader key times out
|
||||
* If you're having issues finishing the sequence before it times out, you may need to increase the timeout setting. Or you may want to enable the `LEADER_PER_KEY_TIMING` option, which resets the timeout after each key is tapped.
|
||||
* `#define LEADER_PER_KEY_TIMING`
|
||||
* sets the timer for leader key chords to run on each key press rather than overall
|
||||
* `#define LEADER_KEY_STRICT_KEY_PROCESSING`
|
||||
* Disables keycode filtering for Mod-Tap and Layer-Tap keycodes. Eg, if you enable this, you would need to specify `MT(MOD_CTL, KC_A)` if you want to use `KC_A`.
|
||||
* `#define ONESHOT_TIMEOUT 300`
|
||||
* how long before oneshot times out
|
||||
* `#define ONESHOT_TAP_TOGGLE 2`
|
||||
@@ -160,6 +165,8 @@ If you define these options you will enable the associated feature, which may in
|
||||
* Set this to the number of combos that you're using in the [Combo](feature_combo.md) feature.
|
||||
* `#define COMBO_TERM 200`
|
||||
* how long for the Combo keys to be detected. Defaults to `TAPPING_TERM` if not defined.
|
||||
* `#define TAP_CODE_DELAY 100`
|
||||
* Sets the delay between `register_code` and `unregister_code`, if you're having issues with it registering properly (common on VUSB boards). The value is in milliseconds.
|
||||
|
||||
## RGB Light Configuration
|
||||
|
||||
@@ -190,12 +197,48 @@ If you define these options you will enable the associated feature, which may in
|
||||
|
||||
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.
|
||||
|
||||
### Setting Handedness
|
||||
|
||||
One thing to remember, the side that the USB port is plugged into is always the master half. The side not plugged into USB is the slave.
|
||||
|
||||
There are a few different ways to set handedness for split keyboards (listed in order of precedence):
|
||||
|
||||
1. Set `SPLIT_HAND_PIN`: Reads a pin to determine handedness. If pin is high, it's the left side, if low, the half is determined to be the right side
|
||||
2. Set `EE_HANDS` and flash `eeprom-lefthand.eep`/`eeprom-righthand.eep` to each half
|
||||
3. Set `MASTER_RIGHT`: Half that is plugged into the USB port is determined to be the master and right half (inverse of the default)
|
||||
4. Default: The side that is plugged into the USB port is the master half and is assumed to be the left half. The slave side is the right half
|
||||
|
||||
* `#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 if you leave `SPLIT_HAND_PIN` undefined, then you can still use the EE_HANDS method or MASTER_LEFT / MASTER_RIGHT defines like the stock Let's Split uses.
|
||||
|
||||
* `#define EE_HANDS` (only works if `SPLIT_HAND_PIN` is not defined)
|
||||
* Reads the handedness value stored in the EEPROM after `eeprom-lefthand.eep`/`eeprom-righthand.eep` has been flashed to their respective halves.
|
||||
|
||||
* `#define MASTER_RIGHT`
|
||||
* Master half is defined to be the right half.
|
||||
|
||||
### Other Options
|
||||
|
||||
* `#define USE_I2C`
|
||||
* For using I2C instead of Serial (defaults to serial)
|
||||
|
||||
* `#define SOFT_SERIAL_PIN D0`
|
||||
* When using serial, define this. `D0` or `D1`,`D2`,`D3`,`E6`.
|
||||
|
||||
* `#define MATRIX_ROW_PINS_RIGHT { <row pins> }`
|
||||
* `#define MATRIX_COL_PINS_RIGHT { <col pins> }`
|
||||
* If you want to specify a different pinout for the right half than the left half, you can define `MATRIX_ROW_PINS_RIGHT`/`MATRIX_COL_PINS_RIGHT`. Currently, the size of `MATRIX_ROW_PINS` must be the same as `MATRIX_ROW_PINS_RIGHT` and likewise for the definition of columns.
|
||||
|
||||
* `#define SELECT_SOFT_SERIAL_SPEED <speed>` (default speed is 1)
|
||||
* Sets the protocol speed when using serial communication
|
||||
* Speeds:
|
||||
* 0: about 189kbps (Experimental only)
|
||||
* 1: about 137kbps (default)
|
||||
* 2: about 75kbps
|
||||
* 3: about 39kbps
|
||||
* 4: about 26kbps
|
||||
* 5: about 20kbps
|
||||
|
||||
# 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.
|
||||
@@ -247,6 +290,8 @@ Use these to enable or disable building certain features. The more you have enab
|
||||
* Enable the audio subsystem.
|
||||
* `RGBLIGHT_ENABLE`
|
||||
* Enable keyboard underlight functionality
|
||||
* `LEADER_ENABLE`
|
||||
* Enable leader key chording
|
||||
* `MIDI_ENABLE`
|
||||
* MIDI controls
|
||||
* `UNICODE_ENABLE`
|
||||
|
@@ -211,20 +211,3 @@ here real_mods lost state for 'physical left shift'.
|
||||
|
||||
weak_mods is ORed with real_mods when keyboard report is sent.
|
||||
https://github.com/tmk/tmk_core/blob/master/common/action_util.c#L57
|
||||
|
||||
## Timer Functionality
|
||||
|
||||
It's possible to start timers and read values for time-specific events - here's an example:
|
||||
|
||||
```c
|
||||
static uint16_t key_timer;
|
||||
key_timer = timer_read();
|
||||
|
||||
if (timer_elapsed(key_timer) < 100) {
|
||||
// do something if less than 100ms have passed
|
||||
} else {
|
||||
// do something if 100ms or more have passed
|
||||
}
|
||||
```
|
||||
|
||||
It's best to declare the `static uint16_t key_timer;` at the top of the file, outside of any code blocks you're using it in.
|
||||
|
@@ -21,7 +21,7 @@ Additionally, if at least one right-handed modifier is specified in a Mod Tap or
|
||||
|
||||
# Switching and Toggling Layers
|
||||
|
||||
These functions allow you to activate layers in various ways. Note that layers are not generally independent layouts -- multiple layers can be activated at once, and it's typical for layers to use `KC_TRNS` to allow keypresses to pass through to lower layers. For a detailed explanation of layers, see [Keymap Overview](keymap.md#keymap-and-layers)
|
||||
These functions allow you to activate layers in various ways. Note that layers are not generally independent layouts -- multiple layers can be activated at once, and it's typical for layers to use `KC_TRNS` to allow keypresses to pass through to lower layers. For a detailed explanation of layers, see [Keymap Overview](keymap.md#keymap-and-layers) When using momentary layer switching with MO(), LM(), TT(), or LT(), make sure to leave the key on the above layers transparent or it may not work as intended.
|
||||
|
||||
* `DF(layer)` - switches the default layer. The default layer is the always-active base layer that other layers stack on top of. See below for more about the default layer. This might be used to switch from QWERTY to Dvorak layout. (Note that this is a temporary switch that only persists until the keyboard loses power. To modify the default layer in a persistent way requires deeper customization, such as calling the `set_single_persistent_default_layer` function inside of [process_record_user](custom_quantum_functions.md#programming-the-behavior-of-any-keycode).)
|
||||
* `MO(layer)` - momentarily activates *layer*. As soon as you let go of the key, the layer is deactivated.
|
||||
@@ -68,7 +68,7 @@ These allow you to combine a modifier with a keycode. When pressed, the keydown
|
||||
|`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` |
|
||||
|`RALT(kc)`|`ALGR(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` |
|
||||
@@ -92,7 +92,7 @@ The modifiers this keycode and `OSM()` accept are prefixed with `MOD_`, not `KC_
|
||||
|`MOD_LGUI`|Left GUI (Windows/Command/Meta key) |
|
||||
|`MOD_RCTL`|Right Control |
|
||||
|`MOD_RSFT`|Right Shift |
|
||||
|`MOD_RALT`|Right Alt |
|
||||
|`MOD_RALT`|Right Alt (AltGr) |
|
||||
|`MOD_RGUI`|Right GUI (Windows/Command/Meta key) |
|
||||
|`MOD_HYPR`|Hyper (Left Control, Shift, Alt and GUI)|
|
||||
|`MOD_MEH` |Meh (Left Control, Shift, and Alt) |
|
||||
@@ -161,8 +161,13 @@ For one shot mods, you need to call `set_oneshot_mods(MOD)` to set it, or `clear
|
||||
|
||||
!> If you're having issues with OSM translating over Remote Desktop Connection, this can be fixed by opening the settings, going to the "Local Resources" tap, and in the keyboard section, change the drop down to "On this Computer". This will fix the issue and allow OSM to function properly over Remote Desktop.
|
||||
|
||||
# Tap-Hold Configuration Options
|
||||
|
||||
# Permissive Hold
|
||||
While Tap-Hold options are fantastic, they are not without their issues. We have tried to configure them with reasonal defaults, but that may still cause issues for some people.
|
||||
|
||||
These options let you modify the behavior of the Tap-Hold keys.
|
||||
|
||||
## Permissive Hold
|
||||
|
||||
As of [PR#1359](https://github.com/qmk/qmk_firmware/pull/1359/), there is a new `config.h` option:
|
||||
|
||||
@@ -185,7 +190,7 @@ Normally, if you do all this within the `TAPPING_TERM` (default: 200ms) this wil
|
||||
|
||||
?> If you have `Ignore Mod Tap Interrupt` enabled, as well, this will modify how both work. The regular key has the modifier added if the first key is released first or if both keys are held longer than the `TAPPING_TERM`.
|
||||
|
||||
# Ignore Mod Tap Interrupt
|
||||
## Ignore Mod Tap Interrupt
|
||||
|
||||
To enable this setting, add this to your `config.h`:
|
||||
|
||||
@@ -211,7 +216,7 @@ Normally, this would send `X` (`SHIFT`+`x`). With `Ignore Mod Tap Interrupt` ena
|
||||
|
||||
?> If you have `Permissive Hold` enabled, as well, this will modify how both work. The regular key has the modifier added if the first key is released first or if both keys are held longer than the `TAPPING_TERM`.
|
||||
|
||||
# Tapping Force Hold
|
||||
## Tapping Force Hold
|
||||
|
||||
To enable `tapping force hold`, add the following to your `config.h`:
|
||||
|
||||
@@ -235,7 +240,7 @@ With `TAPPING_FORCE_HOLD`, the second press will be interpreted as a Shift, allo
|
||||
|
||||
!> `TAPPING_FORCE_HOLD` will break anything that uses tapping toggles (Such as the `TT` layer keycode, and the One Shot Tapping Toggle).
|
||||
|
||||
# Retro Tapping
|
||||
## Retro Tapping
|
||||
|
||||
To enable `retro tapping`, add the following to your `config.h`:
|
||||
|
||||
|
@@ -61,10 +61,19 @@ It's advised that you wrap all audio features in `#ifdef AUDIO_ENABLE` / `#endif
|
||||
|
||||
The available keycodes for audio are:
|
||||
|
||||
* `AU_ON` - Turn audio mode on
|
||||
* `AU_OFF` - Turn audio mode off
|
||||
* `AU_TOG` - Toggle audio mode
|
||||
* `AU_ON` - Turn Audio Feature on
|
||||
* `AU_OFF` - Turn Audio Feature off
|
||||
* `AU_TOG` - Toggle Audio Feature state
|
||||
|
||||
!> These keycodes turn all of the audio functionality on and off. Turning it off means that audio feedback, audio clicky, music mode, etc. are disabled, completely.
|
||||
|
||||
## ARM Audio Volume
|
||||
|
||||
For ARM devices, you can adjust the DAC sample values. If your board is too loud for you or your coworkers, you can set the max using `DAC_SAMPLE_MAX` in your `config.h`:
|
||||
|
||||
```c
|
||||
#define DAC_SAMPLE_MAX 65535U
|
||||
```
|
||||
|
||||
## Music Mode
|
||||
|
||||
@@ -151,7 +160,7 @@ You can configure the default, min and max frequencies, the stepping and built i
|
||||
|
||||
## MIDI Functionality
|
||||
|
||||
This is still a WIP, but check out `quantum/keymap_midi.c` to see what's happening. Enable from the Makefile.
|
||||
This is still a WIP, but check out `quantum/process_keycode/process_midi.c` to see what's happening. Enable from the Makefile.
|
||||
|
||||
|
||||
## Audio Keycodes
|
||||
|
@@ -13,7 +13,7 @@ and this to your `config.h`:
|
||||
Each PAD_A/B variable defines an array so multiple encoders can be defined, e.g.:
|
||||
|
||||
#define ENCODERS_PAD_A { encoder1a, encoder2a }
|
||||
#define ENCODERS_PAD_B { encoder1a, encoder2b }
|
||||
#define ENCODERS_PAD_B { encoder1b, encoder2b }
|
||||
|
||||
If your encoder's clockwise directions are incorrect, you can swap the A & B pad definitions.
|
||||
|
||||
|
@@ -5,10 +5,11 @@ If you've ever used Vim, you know what a Leader key is. If not, you're about to
|
||||
That's what `KC_LEAD` does. Here's an example:
|
||||
|
||||
1. Pick a key on your keyboard you want to use as the Leader key. Assign it the keycode `KC_LEAD`. This key would be dedicated just for this -- it's a single action key, can't be used for anything else.
|
||||
2. Include the line `#define LEADER_TIMEOUT 300` in your config.h. The 300 there is 300ms -- that's how long you have for the sequence of keys following the leader. You can tweak this value for comfort, of course.
|
||||
3. Within your `matrix_scan_user` function, do something like this:
|
||||
2. Include the line `#define LEADER_TIMEOUT 300` in your `config.h`. This sets the timeout for the `KC_LEAD` key. Specifically, when you press the `KC_LEAD` key, you only have a certain amount of time to complete the Leader Key sequence. The `300` here sets that to 300ms, and you can increase this value to give you more time to hit the sequence. But any keys pressed during this timeout are intercepted and not sent, so you may want to keep this value low. .
|
||||
* By default, this timeout is how long after pressing `KC_LEAD` to complete your entire sequence. This may be very low for some people. So you may want to increase this timeout. Optionally, you may want to enable the `LEADER_PER_KEY_TIMING` option, which resets the timeout after each key is tapped. This allows you to maintain a low value here, but still be able to use the longer sequences. To enable this option, add `#define LEADER_PER_KEY_TIMING` to your `config.h`.
|
||||
3. Within your `matrix_scan_user` function, add something like this:
|
||||
|
||||
```
|
||||
```c
|
||||
LEADER_EXTERNS();
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
@@ -44,6 +45,102 @@ Each of these accepts one or more keycodes as arguments. This is an important po
|
||||
|
||||
To add support for Leader Key you simply need to add a single line to your keymap's `rules.mk`:
|
||||
|
||||
```
|
||||
```make
|
||||
LEADER_ENABLE = yes
|
||||
```
|
||||
|
||||
## Per Key Timing on Leader keys
|
||||
|
||||
Rather than relying on an incredibly high timeout for long leader key strings or those of us without 200wpm typing skills, we can enable per key timing to ensure that each key pressed provides us with more time to finish our stroke. This is incredibly helpful with leader key emulation of tap dance (read: multiple taps of the same key like C, C, C).
|
||||
|
||||
In order to enable this, place this in your `config.h`:
|
||||
```c
|
||||
#define LEADER_PER_KEY_TIMING
|
||||
```
|
||||
|
||||
After this, it's recommended that you lower your `LEADER_TIMEOUT` to something less that 300ms.
|
||||
|
||||
```c
|
||||
#define LEADER_TIMEOUT 250
|
||||
```
|
||||
|
||||
Now, something like this won't seem impossible to do without a 1000MS leader key timeout:
|
||||
|
||||
```c
|
||||
SEQ_THREE_KEYS(KC_C, KC_C, KC_C) {
|
||||
SEND_STRING("Per key timing is great!!!");
|
||||
}
|
||||
```
|
||||
|
||||
## Strict Key Processing
|
||||
|
||||
By default, the Leader Key feature will filter the keycode out of [`Mod-Tap`](feature_advanced_keycodes.md#mod-tap) and [`Layer Tap`](feature_advanced_keycodes.md#switching-and-toggling-layers) functions when checking for the Leader sequences. That means if you're using `LT(3, KC_A)`, it will pick this up as `KC_A` for the sequence, rather than `LT(3, KC_A)`, giving a more expected behavior for newer users.
|
||||
|
||||
While, this may be fine for most, if you want to specify the whole keycode (eg, `LT(3, KC_A)` from the example above) in the sequence, you can enable this by added `#define LEADER_KEY_STRICT_KEY_PROCESSING` to your `config.h` file. This well then disable the filtering, and you'll need to specify the whole keycode.
|
||||
|
||||
## Customization
|
||||
|
||||
The Leader Key feature has some additional customization to how the Leader Key feature works. It has two functions that can be called at certain parts of the process. Namely `leader_start()` and `leader_end()`.
|
||||
|
||||
The `leader_start()` function is called when you tap the `KC_LEAD` key, and the `leader_end()` function is called when either the leader sequence is completed, or the leader timeout is hit.
|
||||
|
||||
You can add these functions to your code (`keymap.c` usually) to add feedback to the Leader sequences (such as beeping or playing music).
|
||||
|
||||
```c
|
||||
void leader_start(void) {
|
||||
// sequence started
|
||||
}
|
||||
|
||||
void leader_end(void) {
|
||||
// sequence ended (no success/failuer detection)
|
||||
}
|
||||
```
|
||||
|
||||
### Example
|
||||
|
||||
This example will play the Mario "One Up" sound when you hit `KC_LEAD` to start the Leader Sequence, and will play "All Star" if it completes successfully or "Rick Roll" you if it fails.
|
||||
|
||||
```c
|
||||
bool did_leader_succeed;
|
||||
#ifdef AUDIO_ENABLE
|
||||
float leader_start[][2] = SONG(ONE_UP_SOUND );
|
||||
float leader_succeed[][2] = SONG(ALL_STAR);
|
||||
float leader_fail[][2] = SONG(RICK_ROLL);
|
||||
#endif
|
||||
LEADER_EXTERNS();
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
LEADER_DICTIONARY() {
|
||||
did_leader_succeed = leading = false;
|
||||
|
||||
SEQ_ONE_KEY(KC_E) {
|
||||
// Anything you can do in a macro.
|
||||
SEND_STRING(SS_LCTRL(SS_LSFT("t")));
|
||||
did_leader_succeed = true;
|
||||
} else
|
||||
SEQ_TWO_KEYS(KC_E, KC_D) {
|
||||
SEND_STRING(SS_LGUI("r")"cmd"SS_TAP(KC_ENTER)SS_LCTRL("c"));
|
||||
did_leader_succeed = true;
|
||||
}
|
||||
leader_end();
|
||||
}
|
||||
}
|
||||
|
||||
void leader_start(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(leader_start);
|
||||
#endif
|
||||
}
|
||||
|
||||
void leader_end(void) {
|
||||
if (did_leader_succeed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(leader_succeed);
|
||||
#endif
|
||||
} else {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(leader_fail);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
```
|
||||
|
@@ -12,24 +12,28 @@ Here is an example `keymap.c` for a two-key keyboard:
|
||||
|
||||
```c
|
||||
enum custom_keycodes {
|
||||
MY_CUSTOM_MACRO = SAFE_RANGE
|
||||
QMKBEST = SAFE_RANGE,
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
if (record->event.pressed) {
|
||||
switch(keycode) {
|
||||
case MY_CUSTOM_MACRO:
|
||||
SEND_STRING("QMK is the best thing ever!"); // this is our macro!
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
switch (keycode) {
|
||||
case QMKBEST:
|
||||
if (record->event.pressed) {
|
||||
// when keycode QMKBEST is pressed
|
||||
SEND_STRING("QMK is the best thing ever!");
|
||||
} else {
|
||||
// when keycode QMKBEST is released
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = {
|
||||
{MY_CUSTOM_MACRO, KC_ESC}
|
||||
}
|
||||
[0] = {
|
||||
{QMKBEST, KC_ESC}
|
||||
}
|
||||
};
|
||||
```
|
||||
|
||||
@@ -37,7 +41,7 @@ What happens here is this:
|
||||
We first define a new custom keycode in the range not occupied by any other keycodes.
|
||||
Then we use the `process_record_user` function, which is called whenever a key is pressed or released, to check if our custom keycode has been activated.
|
||||
If yes, we send the string `"QMK is the best thing ever!"` to the computer via the `SEND_STRING` macro (this is a C preprocessor macro, not to be confused with QMK macros).
|
||||
We return `false` to indicate to the caller that the key press we just processed need not be processed any further.
|
||||
We return `true` to indicate to the caller that the key press we just processed should continue to be processed as normal (as we didn't replace or alter the functionality).
|
||||
Finally, we define the keymap so that the first button activates our macro and the second button is just an escape button.
|
||||
|
||||
You might want to add more than one macro.
|
||||
@@ -45,28 +49,42 @@ You can do that by adding another keycode and adding another case to the switch
|
||||
|
||||
```c
|
||||
enum custom_keycodes {
|
||||
MY_CUSTOM_MACRO = SAFE_RANGE,
|
||||
MY_OTHER_MACRO
|
||||
QMKBEST = SAFE_RANGE,
|
||||
QMKURL,
|
||||
MY_OTHER_MACRO
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
if (record->event.pressed) {
|
||||
switch(keycode) {
|
||||
case MY_CUSTOM_MACRO:
|
||||
SEND_STRING("QMK is the best thing ever!");
|
||||
return false;
|
||||
case MY_OTHER_MACRO:
|
||||
SEND_STRING(SS_LCTRL("ac")); // selects all and copies
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
switch (keycode) {
|
||||
case QMKBEST:
|
||||
if (record->event.pressed) {
|
||||
// when keycode QMKBEST is pressed
|
||||
SEND_STRING("QMK is the best thing ever!");
|
||||
} else {
|
||||
// when keycode QMKBEST is released
|
||||
}
|
||||
break;
|
||||
case QMKURL:
|
||||
if (record->event.pressed) {
|
||||
// when keycode QMKURL is pressed
|
||||
SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER));
|
||||
} else {
|
||||
// when keycode QMKURL is released
|
||||
}
|
||||
break;
|
||||
case MY_OTHER_MACRO:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING(SS_LCTRL("ac")); // selects all and copies
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = {
|
||||
{MY_CUSTOM_MACRO, MY_OTHER_MACRO}
|
||||
}
|
||||
[0] = {
|
||||
{MY_CUSTOM_MACRO, MY_OTHER_MACRO}
|
||||
}
|
||||
};
|
||||
```
|
||||
|
||||
@@ -136,21 +154,21 @@ By default QMK assumes you don't have any macros. To define your macros you crea
|
||||
|
||||
```c
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
if (record->event.pressed) {
|
||||
switch(id) {
|
||||
case 0:
|
||||
return MACRO(D(LSFT), T(H), U(LSFT), T(I), D(LSFT), T(1), U(LSFT), END);
|
||||
case 1:
|
||||
return MACRO(D(LSFT), T(B), U(LSFT), T(Y), T(E), D(LSFT), T(1), U(LSFT), END);
|
||||
}
|
||||
}
|
||||
return MACRO_NONE;
|
||||
if (record->event.pressed) {
|
||||
switch(id) {
|
||||
case 0:
|
||||
return MACRO(D(LSFT), T(H), U(LSFT), T(I), D(LSFT), T(1), U(LSFT), END);
|
||||
case 1:
|
||||
return MACRO(D(LSFT), T(B), U(LSFT), T(Y), T(E), D(LSFT), T(1), U(LSFT), END);
|
||||
}
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
```
|
||||
|
||||
This defines two macros which will be run when the key they are assigned to is pressed. If instead you'd like them to run when the key is released you can change the if statement:
|
||||
|
||||
if (!record->event.pressed) {
|
||||
if (!record->event.pressed) {
|
||||
|
||||
### Macro Commands
|
||||
|
||||
@@ -169,21 +187,21 @@ Use the `M()` function within your `KEYMAP()` to call a macro. For example, here
|
||||
|
||||
```c
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = KEYMAP(
|
||||
M(0), M(1)
|
||||
),
|
||||
[0] = KEYMAP(
|
||||
M(0), M(1)
|
||||
),
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
if (record->event.pressed) {
|
||||
switch(id) {
|
||||
case 0:
|
||||
return MACRO(D(LSFT), T(H), U(LSFT), T(I), D(LSFT), T(1), U(LSFT), END);
|
||||
case 1:
|
||||
return MACRO(D(LSFT), T(B), U(LSFT), T(Y), T(E), D(LSFT), T(1), U(LSFT), END);
|
||||
}
|
||||
}
|
||||
return MACRO_NONE;
|
||||
if (record->event.pressed) {
|
||||
switch(id) {
|
||||
case 0:
|
||||
return MACRO(D(LSFT), T(H), U(LSFT), T(I), D(LSFT), T(1), U(LSFT), END);
|
||||
case 1:
|
||||
return MACRO(D(LSFT), T(B), U(LSFT), T(Y), T(E), D(LSFT), T(1), U(LSFT), END);
|
||||
}
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
```
|
||||
|
||||
@@ -198,9 +216,9 @@ If you have a bunch of macros you want to refer to from your keymap while keepin
|
||||
#define M_BYE M(1)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = KEYMAP(
|
||||
M_HI, M_BYE
|
||||
),
|
||||
[0] = KEYMAP(
|
||||
M_HI, M_BYE
|
||||
),
|
||||
};
|
||||
```
|
||||
|
||||
@@ -213,11 +231,11 @@ There are some functions you may find useful in macro-writing. Keep in mind that
|
||||
This is a boolean value that can be tested to see if the switch is being pressed or released. An example of this is
|
||||
|
||||
```c
|
||||
if (record->event.pressed) {
|
||||
// on keydown
|
||||
} else {
|
||||
// on keyup
|
||||
}
|
||||
if (record->event.pressed) {
|
||||
// on keydown
|
||||
} else {
|
||||
// on keyup
|
||||
}
|
||||
```
|
||||
|
||||
### `register_code(<kc>);`
|
||||
@@ -232,6 +250,8 @@ Parallel to `register_code` function, this sends the `<kc>` keyup event to the c
|
||||
|
||||
This will send `register_code(<kc>)` and then `unregister_code(<kc>)`. This is useful if you want to send both the press and release events ("tap" the key, rather than hold it).
|
||||
|
||||
If you're having issues with taps (un)registering, you can add a delay between the register and unregister events by setting `#define TAP_CODE_DELAY 100` in your `config.h` file. The value is in milliseconds.
|
||||
|
||||
### `clear_keyboard();`
|
||||
|
||||
This will clear all mods and keys currently pressed.
|
||||
@@ -250,16 +270,16 @@ This example defines a macro which sends `Ctrl-C` when pressed down, and `Ctrl-V
|
||||
|
||||
```c
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
switch(id) {
|
||||
case 0: {
|
||||
if (record->event.pressed) {
|
||||
return MACRO( D(LCTL), T(C), U(LCTL), END );
|
||||
} else {
|
||||
return MACRO( D(LCTL), T(V), U(LCTL), END );
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return MACRO_NONE;
|
||||
switch(id) {
|
||||
case 0: {
|
||||
if (record->event.pressed) {
|
||||
return MACRO( D(LCTL), T(C), U(LCTL), END );
|
||||
} else {
|
||||
return MACRO( D(LCTL), T(V), U(LCTL), END );
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
```
|
||||
|
@@ -63,8 +63,6 @@ Changing the **Value** sets the overall brightness.
|
||||
|`RGB_MODE_GRADIENT`|`RGB_M_G` |Static gradient animation mode |
|
||||
|`RGB_MODE_RGBTEST` |`RGB_M_T` |Red, Green, Blue test animation mode |
|
||||
|
||||
?> For backwards compatibility, `RGB_SMOD` is another alias of `RGB_MOD`.
|
||||
|
||||
## Configuration
|
||||
|
||||
Your RGB lighting can be configured by placing these `#define`s in your `config.h`:
|
||||
@@ -163,6 +161,24 @@ If you need to change your RGB lighting in code, for example in a macro to chang
|
||||
|`rgblight_sethsv(h, s, v)` |Set all LEDs to the given HSV value where `h` is between 0 and 360 and `s`/`v` are between 0 and 255 |
|
||||
|`rgblight_sethsv_noeeprom(h, s, v)`|Set all LEDs to the given HSV value where `h` is between 0 and 360 and `s`/`v` are between 0 and 255 (not written to EEPROM) |
|
||||
|`rgblight_sethsv_at(h, s, v, led)` |Set a single LED to the given HSV value, where `h` is between 0 and 360, `s`/`v` are between 0 and 255, and `led` is between 0 and `RGBLED_NUM` (not written to EEPROM)|
|
||||
|`rgblight_toggle()` |Toggle all LEDs between on and off |
|
||||
|`rgblight_toggle_noeeprom()` |Toggle all LEDs between on and off (not written to EEPROM) |
|
||||
|`rgblight_step()` |Change the mode to the next RGB animation in the list of enabled RGB animations |
|
||||
|`rgblight_step_noeeprom()` |Change the mode to the next RGB animation in the list of enabled RGB animations (not written to EEPROM) |
|
||||
|`rgblight_step_reverse()` |Change the mode to the previous RGB animation in the list of enabled RGB animations |
|
||||
|`rgblight_step_reverse_noeeprom()` |Change the mode to the previous RGB animation in the list of enabled RGB animations (not written to EEPROM) |
|
||||
|`rgblight_increase_hue()` |Increase the hue for all LEDs. This wraps around at maximum hue |
|
||||
|`rgblight_increase_hue_noeeprom()` |Increase the hue for all LEDs. This wraps around at maximum hue (not written to EEPROM) |
|
||||
|`rgblight_decrease_hue()` |Decrease the hue for all LEDs. This wraps around at minimum hue |
|
||||
|`rgblight_decrease_hue_noeeprom()` |Decrease the hue for all LEDs. This wraps around at minimum hue (not written to EEPROM) |
|
||||
|`rgblight_increase_sat()` |Increase the saturation for all LEDs. This wraps around at maximum saturation |
|
||||
|`rgblight_increase_sat_noeeprom()` |Increase the saturation for all LEDs. This wraps around at maximum saturation (not written to EEPROM) |
|
||||
|`rgblight_decrease_sat()` |Decrease the saturation for all LEDs. This wraps around at minimum saturation |
|
||||
|`rgblight_decrease_sat_noeeprom()` |Decrease the saturation for all LEDs. This wraps around at minimum saturation (not written to EEPROM) |
|
||||
|`rgblight_increase_val()` |Increase the value for all LEDs. This wraps around at maximum value |
|
||||
|`rgblight_increase_val_noeeprom()` |Increase the value for all LEDs. This wraps around at maximum value (not written to EEPROM) |
|
||||
|`rgblight_decrease_val()` |Decrease the value for all LEDs. This wraps around at minimum value |
|
||||
|`rgblight_decrease_val_noeeprom()` |Decrease the value for all LEDs. This wraps around at minimum value (not written to EEPROM) |
|
||||
|
||||
Additionally, [`rgblight_list.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight_list.h) defines several predefined shortcuts for various colors. Feel free to add to this list!
|
||||
|
||||
|
@@ -185,29 +185,11 @@ Below is a specific example:
|
||||
|
||||
## Setup
|
||||
|
||||
You will need a few things that can be used for 'Quad Function Tap-Dance'. The suggested setup is to create a user directory for yourself. This directory will contain rules.mk `<your_name>.c` and `<your_name>.h`. This directory should be called `<your_name>`, and located in the top level `users` directory. There should already be a few examples to look at there.
|
||||
You will need a few things that can be used for 'Quad Function Tap-Dance'.
|
||||
|
||||
### In `/qmk_firmware/users/<your_name>/rules.mk`
|
||||
|
||||
Put the following:
|
||||
```c
|
||||
TAP_DANCE_ENABLE = yes
|
||||
SRC += your_name.c
|
||||
```
|
||||
|
||||
Pretty simple. It is a nice way to keep some rules common on all your keymaps.
|
||||
|
||||
|
||||
### In `/qmk_firmware/users/<your_name>/<your_name>.h`
|
||||
|
||||
You will need a few things in this file:
|
||||
You'll need to add these to the top of your `keymap.c` file, before your keymap.
|
||||
|
||||
```c
|
||||
#pragma once
|
||||
|
||||
#include "quantum.h"
|
||||
#include "process_keycode/process_tap_dance.h"
|
||||
|
||||
typedef struct {
|
||||
bool is_press_action;
|
||||
int state;
|
||||
@@ -234,18 +216,12 @@ int cur_dance (qk_tap_dance_state_t *state);
|
||||
//for the x tap dance. Put it here so it can be used in any keymap
|
||||
void x_finished (qk_tap_dance_state_t *state, void *user_data);
|
||||
void x_reset (qk_tap_dance_state_t *state, void *user_data);
|
||||
|
||||
```
|
||||
|
||||
### In `/qmk_firmware/users/<your_name>/<your_name>.c`
|
||||
|
||||
And then in your user's `.c` file you implement the functions above:
|
||||
Now, at the bottom of your `keymap.c` file, you'll need to add the following:
|
||||
|
||||
```c
|
||||
#include "<your_name>.h"
|
||||
#include "quantum.h"
|
||||
#include "action.h"
|
||||
#include "process_keycode/process_tap_dance.h"
|
||||
|
||||
/* Return an integer that corresponds to what kind of tap dance should be executed.
|
||||
*
|
||||
* How to figure out tap dance state: interrupted and pressed.
|
||||
@@ -335,4 +311,6 @@ qk_tap_dance_action_t tap_dance_actions[] = {
|
||||
};
|
||||
```
|
||||
|
||||
And then simply use `TD(X_CTL)` anywhere in your keymap after including `<your_name>.h`.
|
||||
And then simply use `TD(X_CTL)` anywhere in your keymap.
|
||||
|
||||
If you want to implement this in your userspace, then you may want to check out how [DanielGGordon](https://github.com/qmk/qmk_firmware/tree/master/users/gordon) has implemented this in their userspace.
|
||||
|
@@ -1,94 +1,154 @@
|
||||
# Unicode Support
|
||||
|
||||
There are three Unicode keymap definition method available in QMK:
|
||||
There are three Unicode keymap definition methods available in QMK:
|
||||
|
||||
## UNICODE_ENABLE
|
||||
## `UNICODE_ENABLE`
|
||||
|
||||
Supports Unicode input up to 0xFFFF. The keycode function is `UC(n)` in keymap file, where *n* is a 4 digit hexadecimal.
|
||||
Supports Unicode up to `0x7FFF`. This covers characters for most modern languages, as well as symbols, but it doesn't cover emoji. The keycode function is `UC(c)` in the keymap file, where _c_ is the code point's number (preferably hexadecimal, up to 4 digits long). For example: `UC(0x45B)`, `UC(0x30C4)`.
|
||||
|
||||
## UNICODEMAP_ENABLE
|
||||
## `UNICODEMAP_ENABLE`
|
||||
|
||||
Supports Unicode up to 0xFFFFFFFF. You need to maintain a separate mapping table `const uint32_t PROGMEM unicode_map[] = {...}` in your keymap file. The keycode function is `X(n)` where *n* is the array index of the mapping table.
|
||||
Supports Unicode up to `0x10FFFF` (all possible code points). You need to maintain a separate mapping table `const uint32_t PROGMEM unicode_map[] = {...}` in your keymap file. The keycode function is `X(i)`, where _i_ is an array index into the mapping table. The table may contain at most 1024 entries.
|
||||
|
||||
And you may want to have an enum to make reference easier. So you'd want to add something like this to your keymap:
|
||||
You may want to have an enum to make referencing easier. So, you could add something like this to your keymap file:
|
||||
|
||||
```c
|
||||
enum unicode_name {
|
||||
BANG, // ‽
|
||||
IRONY, // ⸮
|
||||
SNEK // snke 🐍
|
||||
enum unicode_names {
|
||||
BANG,
|
||||
IRONY,
|
||||
SNEK,
|
||||
};
|
||||
|
||||
const uint32_t PROGMEM unicode_map[] = {
|
||||
[BANG] = 0x0203D, // ‽
|
||||
[IRONY] = 0x02E2E, // ⸮
|
||||
[SNEK] = 0x1F40D // snke 🐍
|
||||
}:
|
||||
[BANG] = 0x203D, // ‽
|
||||
[IRONY] = 0x2E2E, // ⸮
|
||||
[SNEK] = 0x1F40D, // 🐍
|
||||
};
|
||||
```
|
||||
|
||||
Make sure that the order for both matches.
|
||||
Then you can use `X(BANG)` etc. in your keymap.
|
||||
|
||||
## UCIS_ENABLE
|
||||
## `UCIS_ENABLE`
|
||||
|
||||
Supports Unicode up to 0xFFFFFFFF. As with `UNICODE_MAP`, you may want to main a mapping table in your keymap file. However, there is no keycodes for this feature, you will have to add a keycode or function to call `qk_ucis_start()`. Once you've run that, you can just type the text for your unicode, and then hit space or enter to complete it, or ESC to cancel it. And if it matches an entry in your table, it will automatically "backspace" the trigger word (from your table) and then will input the unicode sequence.
|
||||
Supports Unicode up to `0x10FFFF` (all possible code points). As with `UNICODEMAP`, you need to maintain a mapping table in your keymap file. However, there are no built-in keycodes for this feature — you will have to add a keycode or function that calls `qk_ucis_start()`. Once this function's been called, you can type the corresponding mnemonic for your character, then hit Space or Enter to complete it, or Esc to cancel. If the mnemonic matches an entry in your table, the typed text will automatically be erased and the corresponding Unicode character inserted.
|
||||
|
||||
For instance, you would need to have a table like this in your keymap:
|
||||
For instance, you would define a table like this in your keymap file:
|
||||
|
||||
```c
|
||||
const qk_ucis_symbol_t ucis_symbol_table[] = UCIS_TABLE
|
||||
(
|
||||
UCIS_SYM("poop", 0x1f4a9),
|
||||
UCIS_SYM("rofl", 0x1f923),
|
||||
UCIS_SYM("kiss", 0x1f619)
|
||||
const qk_ucis_symbol_t ucis_symbol_table[] = UCIS_TABLE(
|
||||
UCIS_SYM("poop", 0x1F4A9), // 💩
|
||||
UCIS_SYM("rofl", 0x1F923), // 🤣
|
||||
UCIS_SYM("kiss", 0x1F619) // 😙
|
||||
);
|
||||
```
|
||||
|
||||
You run the function, and then type "rofl" and hit enter, it should backspace remove "rofl" and input the `0x1f923` unicode.
|
||||
You call `qk_ucis_start()`, then type "rofl" and hit Enter. QMK should erase the "rofl" text and input the laughing emoji.
|
||||
|
||||
### Customization
|
||||
|
||||
There are several functions that you can add to your keymap to customize the functionality of this feature.
|
||||
There are several functions that you can define in your keymap to customize the functionality of this feature.
|
||||
|
||||
* `void qk_ucis_start_user(void)` - This runs when you run the "start" function, and can be used to provide feedback. By default, it types out a keyboard emoji.
|
||||
* `void qk_ucis_success(uint8_t symbol_index)` - This runs when the unicode input has matched something, and has completed. Default doesn't do anything.
|
||||
* `void qk_ucis_symbol_fallback (void)` - This runs if the input text doesn't match anything. The default function falls back to trying that input as a unicode code.
|
||||
* `void qk_ucis_start_user(void)` – This runs when you call the "start" function, and can be used to provide feedback. By default, it types out a keyboard emoji.
|
||||
* `void qk_ucis_success(uint8_t symbol_index)` – This runs when the input has matched something and has completed. By default, it doesn't do anything.
|
||||
* `void qk_ucis_symbol_fallback (void)` – This runs when the input doesn't match anything. By default, it falls back to trying that input as a Unicode code.
|
||||
|
||||
The default code for these are:
|
||||
You can find the default implementations of these functions in [`process_ucis.c`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_ucis.c).
|
||||
|
||||
## Input Modes
|
||||
|
||||
Unicode input in QMK works by inputting a sequence of characters to the OS, sort of like a macro. Unfortunately, the way this is done differs for each platform. Specifically, each platform requires a different combination of keys to trigger Unicode input. Therefore, a corresponding input mode has to be set in QMK.
|
||||
|
||||
The following input modes are available:
|
||||
|
||||
* **`UC_OSX`**: Mac OS X built-in Unicode hex input. Supports code points up to `0xFFFF` (`0x10FFFF` with `UNICODEMAP`).
|
||||
|
||||
To enable, go to _System Preferences > Keyboard > Input Sources_, add _Unicode Hex Input_ to the list (it's under _Other_), then activate it from the input dropdown in the Menu Bar.
|
||||
By default, this mode uses the left Option key (`KC_LALT`), but this can be changed by defining [`UNICODE_OSX_KEY`](#input-key-configuration) with another keycode.
|
||||
|
||||
* **`UC_LNX`**: Linux built-in IBus Unicode input. Supports code points up to `0x10FFFF` (all possible code points).
|
||||
|
||||
Enabled by default and works almost anywhere on IBus-enabled distros. Without IBus, this mode works under GTK apps, but rarely anywhere else.
|
||||
|
||||
* **`UC_WIN`**: _(not recommended)_ Windows built-in hex numpad Unicode input. Supports code points up to `0xFFFF`.
|
||||
|
||||
To enable, create a registry key under `HKEY_CURRENT_USER\Control Panel\Input Method\EnableHexNumpad` of type `REG_SZ` called `EnableHexNumpad` and set its value to `1`. This can be done from the Command Prompt by running `reg add "HKCU\Control Panel\Input Method" -v EnableHexNumpad -t REG_SZ -d 1` with administrator privileges. Afterwards, reboot.
|
||||
This mode is not recommended because of reliability and compatibility issues; use the `UC_WINC` mode instead.
|
||||
|
||||
* **`UC_BSD`**: _(non implemented)_ Unicode input under BSD. Not implemented at this time. If you're a BSD user and want to help add support for it, please [open an issue on GitHub](https://github.com/qmk/qmk_firmware/issues).
|
||||
|
||||
* **`UC_WINC`**: Windows Unicode input using [WinCompose](https://github.com/samhocevar/wincompose). As of v0.8.2, supports code points up to `0xFFFFF` (all currently assigned code points).
|
||||
|
||||
To enable, install the [latest release](https://github.com/samhocevar/wincompose/releases/latest). Once installed, WinCompose will automatically run on startup. Works reliably under all version of Windows supported by the app.
|
||||
By default, this mode uses the right Alt key (`KC_RALT`), but this can be changed in the WinCompose settings and by defining [`UNICODE_WINC_KEY`](#input-key-configuration) with another keycode.
|
||||
|
||||
### Switching Input Modes
|
||||
|
||||
There are two ways to set the input mode for Unicode: by keycode or by function. Keep in mind that both methods write to persistent storage (EEPROM), and are loaded each time the keyboard starts. So once you've set it the first time, you don't need to set it again unless you want to change it, or you've reset the EEPROM settings.
|
||||
|
||||
You can switch the input mode at any time by using one of the following keycodes. The easiest way is to add the ones you use to your keymap.
|
||||
|
||||
|Keycode |Alias |Input mode |Description |
|
||||
|-----------------------|---------|-------------|-----------------------------------------|
|
||||
|`UNICODE_MODE_FORWARD` |`UC_MOD` | |Cycles forwards through the available modes. [(Disabled by default)](#input-method-cycling)|
|
||||
|`UNICODE_MODE_REVERSE` |`UC_RMOD`| |Cycles forwards through the available modes. [(Disabled by default)](#input-method-cycling)|
|
||||
|`UNICODE_MODE_OSX` |`UC_M_OS`|`UC_OSX` |Switch to Mac OS X input. |
|
||||
|`UNICODE_MODE_LNX` |`UC_M_LN`|`UC_LNX` |Switch to Linux input. |
|
||||
|`UNICODE_MODE_WIN` |`UC_M_WI`|`UC_WIN` |Switch to Windows input. |
|
||||
|`UNICODE_MODE_BSD` |`UC_M_BS`|`UC_BSD` |Switch to BSD input (not implemented). |
|
||||
|`UNICODE_MODE_WINC` |`UC_M_WC`|`UC_WINC` |Switch to Windows input using WinCompose.|
|
||||
|
||||
You can also switch the input mode by calling `set_unicode_input_mode(x)` in your code, where _x_ is one of the above input mode constants (e.g. `UC_LNX`). Since the function only needs to be called once, it's recommended that you do it in `eeconfig_init_user` (or a similar function). For example:
|
||||
|
||||
```c
|
||||
void qk_ucis_start_user(void) { // outputs keyboard emoji
|
||||
unicode_input_start();
|
||||
register_hex(0x2328);
|
||||
unicode_input_finish();
|
||||
}
|
||||
|
||||
void qk_ucis_success(uint8_t symbol_index) {
|
||||
}
|
||||
|
||||
void qk_ucis_symbol_fallback (void) { // falls back to manual unicode entry
|
||||
for (uint8_t i = 0; i < qk_ucis_state.count - 1; i++) {
|
||||
uint8_t code = qk_ucis_state.codes[i];
|
||||
register_code(code);
|
||||
unregister_code(code);
|
||||
wait_ms(UNICODE_TYPE_DELAY);
|
||||
}
|
||||
void eeconfig_init_user(void) {
|
||||
set_unicode_input_mode(UC_LNX);
|
||||
}
|
||||
```
|
||||
|
||||
## Unicode Input methods
|
||||
### Audio Feedback
|
||||
|
||||
Unicode input in QMK works by inputting a sequence of characters to the OS,
|
||||
sort of like macro. Unfortunately, each OS has different ideas on how Unicode is input.
|
||||
If you have the [Audio feature](feature_audio.md) enabled on the board, you can set melodies to be played when you press the above keys. That way you can have some audio feedback when switching input modes.
|
||||
|
||||
This is the current list of Unicode input method in QMK:
|
||||
For instance, you can add these definitions to your `config.h` file:
|
||||
|
||||
* __UC_OSX__: MacOS Unicode Hex Input support. Works only up to 0xFFFF. Disabled by default. To enable: go to System Preferences -> Keyboard -> Input Sources, and enable Unicode Hex.
|
||||
* __UC_OSX_RALT__: Same as UC_OSX, but sends the Right Alt key for unicode input
|
||||
* __UC_LNX__: Unicode input method under Linux. Works up to 0xFFFFF. Should work almost anywhere on ibus enabled distros. Without ibus, this works under GTK apps, but rarely anywhere else.
|
||||
* __UC_WIN__: (not recommended) Windows built-in Unicode input. To enable: create registry key under `HKEY_CURRENT_USER\Control Panel\Input Method\EnableHexNumpad` of type `REG_SZ` called `EnableHexNumpad`, set its value to 1, and reboot. This method is not recommended because of reliability and compatibility issue, use WinCompose method below instead.
|
||||
* __UC_WINC__: Windows Unicode input using WinCompose. Requires [WinCompose](https://github.com/samhocevar/wincompose). Works reliably under many (all?) variations of Windows.
|
||||
```c
|
||||
#define UNICODE_SONG_OSX COIN_SOUND
|
||||
#define UNICODE_SONG_LNX UNICODE_LINUX
|
||||
#define UNICODE_SONG_BSD MARIO_GAMEOVER
|
||||
#define UNICODE_SONG_WIN UNICODE_WINDOWS
|
||||
#define UNICODE_SONG_WINC UNICODE_WINDOWS
|
||||
```
|
||||
|
||||
At some point, you need to call `set_unicode_input_mode(x)` to set the correct unicode method. This sets the method that is used to send the unicode, and stores it in EEPROM, so you only need to call this once.
|
||||
### Additional Customization
|
||||
|
||||
Because Unicode is such a large and variable feature, there are a number of options that you can customize to work better on your system.
|
||||
|
||||
#### Start and Finish input functions
|
||||
|
||||
The functions for starting and finishing Unicode input on your platform can be overridden locally. Possible uses include customizing input mode behavior if you don't use the default keys, or adding extra visual/audio feedback to Unicode input.
|
||||
|
||||
* `void unicode_input_start(void)` – This sends the initial sequence that tells your platform to enter Unicode input mode. For example, it presses Ctrl+Shift+U on Linux and holds the Option key on Mac.
|
||||
* `void unicode_input_finish(void)` – This is called to exit Unicode input mode, for example by pressing Space or releasing the Option key.
|
||||
|
||||
You can find the default implementations of these functions in [`process_unicode_common.c`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_unicode_common.c).
|
||||
|
||||
|
||||
#### Input Key Configuration
|
||||
|
||||
Additionally, you can customize the keys used to trigger the unicode input for macOS and WinCompose by adding defines to your `config.h`
|
||||
|
||||
```c
|
||||
#define UNICODE_OSX_KEY KC_LALT
|
||||
#define UNICODE_WINC_KEY KC_RALT
|
||||
```
|
||||
|
||||
#### Input Method Cycling
|
||||
|
||||
Also, you can choose which input methods are availble for cycling through. By default, this is disabled. But if you want to enabled it, then limiting it to just those modes makes sense. Note that `UNICODE_SELECTED_MODES` define is comma delimited.
|
||||
|
||||
```c
|
||||
#define UNICODE_SELECTED_MODES UC_OSX, UC_LNX, UC_WIN, UC_BSD, UC_WINC
|
||||
```
|
||||
|
||||
## `send_unicode_hex_string`
|
||||
|
||||
|
@@ -123,24 +123,27 @@ If you have trouble and want to ask for help, it is useful to generate a *Win_Ch
|
||||
|
||||
## Docker
|
||||
|
||||
If this is a bit complex for you, Docker might be the turn-key solution you need. After installing [Docker](https://www.docker.com/products/docker), run the following command at the root of the QMK folder to build a keyboard/keymap:
|
||||
|
||||
If this is a bit complex for you, Docker might be the turn-key solution you need. After installing [Docker CE](https://docs.docker.com/install/#supported-platforms), run the following command from the `qmk_firmware` directory to build a keyboard/keymap:
|
||||
```bash
|
||||
# You'll run this every time you want to build a keymap
|
||||
# modify the keymap and keyboard assignment to compile what you want
|
||||
# defaults are ergodox/default
|
||||
util/docker_build.sh keyboard:keymap
|
||||
# For example: util/docker_build.sh ergodox_ez:steno
|
||||
```
|
||||
This will compile the targeted keyboard/keymap and leave the resulting `.hex` or `.bin` file in the QMK directory for you to flash. If `:keymap` is omitted, the `default` keymap is used. Note that the parameter format is the same as when building with `make`.
|
||||
|
||||
docker run -e keymap=gwen -e keyboard=ergodox_ez --rm -v $('pwd'):/qmk:rw edasque/qmk_firmware
|
||||
You can also start the script without any parameters, in which case it will ask you to input the build parameters one by one, which you may find easier to use:
|
||||
```bash
|
||||
util/docker_build.sh
|
||||
# Reads parameters as input (leave blank for defaults)
|
||||
```
|
||||
|
||||
On Windows Docker seems to have issues with the VOLUME tag in Dockerfile, and `$('pwd')` won't print a Windows compliant path; use full path instead, like this:
|
||||
|
||||
There is also support for building _and_ flashing the keyboard straight from Docker by specifying the `target` as well:
|
||||
```bash
|
||||
docker run -e keymap=default -e keyboard=ergodox_ez --rm -v D:/Users/Sacapuces/Documents/Repositories/qmk:/qmk:rw edasque/qmk_firmware
|
||||
|
||||
util/docker_build.sh keyboard:keymap:target
|
||||
# For example: util/docker_build.sh planck/rev6:default:dfu-util
|
||||
```
|
||||
If you're on Linux, this should work out of the box. On Windows and macOS, it requires [Docker Machine](http://gw.tnode.com/docker/docker-machine-with-usb-support-on-windows-macos/) to be running. This is tedious to set up, so it's not recommended; use QMK Toolbox instead.
|
||||
|
||||
This will compile the targeted keyboard/keymap and leave it in your QMK directory for you to flash.
|
||||
!> Docker for Windows requires [Hyper-V](https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v) to be enabled. This means that it cannot work on versions of Windows which don't have Hyper-V, such as Windows 7, Windows 8 and **Windows 10 Home**.
|
||||
|
||||
## Vagrant
|
||||
If you have any problems building the firmware, you can try using a tool called Vagrant. It will set up a virtual computer with a known configuration that's ready-to-go for firmware building. OLKB does NOT host the files for this virtual computer. Details on how to set up Vagrant are in the [vagrant guide](getting_started_vagrant.md).
|
||||
|
@@ -93,19 +93,17 @@ This enables MIDI sending and receiving with your keyboard. To enter MIDI send m
|
||||
|
||||
`UNICODE_ENABLE`
|
||||
|
||||
This allows you to send unicode symbols via `UC(<unicode>)` in your keymap. Only codes up to 0x7FFF are currently supported.
|
||||
This allows you to send Unicode characters using `UC(<code point>)` in your keymap. Code points up to `0x7FFF` are supported. This covers characters for most modern languages, as well as symbols, but it doesn't cover emoji.
|
||||
|
||||
`UNICODEMAP_ENABLE`
|
||||
|
||||
This allows sending unicode symbols using `X(<unicode>)` in your keymap. Codes
|
||||
up to 0xFFFFFFFF are supported, including emojis. You will need to maintain
|
||||
a separate mapping table in your keymap file.
|
||||
This allows you to send Unicode characters using `X(<map index>)` in your keymap. You will need to maintain a mapping table in your keymap file. All possible code points (up to `0x10FFFF`) are supported.
|
||||
|
||||
Known limitations:
|
||||
- Under Mac OS, only codes up to 0xFFFF are supported.
|
||||
- Under Linux ibus, only codes up to 0xFFFFF are supported (but anything important is still under this limit for now).
|
||||
`UCIS_ENABLE`
|
||||
|
||||
Characters out of range supported by the OS will be ignored.
|
||||
This allows you to send Unicode characters by inputting a mnemonic corresponding to the character you want to send. You will need to maintain a mapping table in your keymap file. All possible code points (up to `0x10FFFF`) are supported.
|
||||
|
||||
For further details, as well as limitations, see the [Unicode page](feature_unicode.md).
|
||||
|
||||
`BLUETOOTH_ENABLE`
|
||||
|
||||
@@ -117,7 +115,7 @@ This allows you output audio on the C6 pin (needs abstracting). See the [audio p
|
||||
|
||||
`FAUXCLICKY_ENABLE`
|
||||
|
||||
Uses buzzer to emulate clicky switches. A cheap imitation of the Cherry blue switches. By default, uses the C6 pin, same as AUDIO_ENABLE.
|
||||
Uses buzzer to emulate clicky switches. A cheap imitation of the Cherry blue switches. By default, uses the C6 pin, same as `AUDIO_ENABLE`.
|
||||
|
||||
`VARIABLE_TRACE`
|
||||
|
||||
|
@@ -25,7 +25,8 @@
|
||||
placeholder: 'Search Documentation...',
|
||||
noData: 'We could not find any documents matching your search.',
|
||||
depth: 6
|
||||
}
|
||||
},
|
||||
fallbackLanguages: ['zh']
|
||||
}
|
||||
</script>
|
||||
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
|
||||
|
261
docs/keycode.txt
261
docs/keycode.txt
@@ -1,261 +0,0 @@
|
||||
Keycode Symbol Table
|
||||
====================
|
||||
Keycodes are defined in `common/keycode.h`.
|
||||
Range of 00-A4 and E0-E7 are identical with HID Usage:
|
||||
<http://www.usb.org/developers/hidpage/Hut1_12v2.pdf>
|
||||
Virtual keycodes are defined out of above range to support special actions.
|
||||
|
||||
|
||||
Keycode Symbol Short name Description
|
||||
--------------------------------------------------------------------------------
|
||||
KC_NO 00 Reserved (no event indicated)
|
||||
KC_ROLL_OVER 01 Keyboard ErrorRollOver
|
||||
KC_POST_FAIL 02 Keyboard POSTFail
|
||||
KC_UNDEFINED 03 Keyboard ErrorUndefined
|
||||
KC_A 04 Keyboard a and A
|
||||
KC_B 05 Keyboard b and B
|
||||
KC_C 06 Keyboard c and C
|
||||
KC_D 07 Keyboard d and D
|
||||
KC_E 08 Keyboard e and E
|
||||
KC_F 09 Keyboard f and F
|
||||
KC_G 0A Keyboard g and G
|
||||
KC_H 0B Keyboard h and H
|
||||
KC_I 0C Keyboard i and I
|
||||
KC_J 0D Keyboard j and J
|
||||
KC_K 0E Keyboard k and K
|
||||
KC_L 0F Keyboard l and L
|
||||
KC_M 10 Keyboard m and M
|
||||
KC_N 11 Keyboard n and N
|
||||
KC_O 12 Keyboard o and O
|
||||
KC_P 13 Keyboard p and P
|
||||
KC_Q 14 Keyboard q and Q
|
||||
KC_R 15 Keyboard r and R
|
||||
KC_S 16 Keyboard s and S
|
||||
KC_T 17 Keyboard t and T
|
||||
KC_U 18 Keyboard u and U
|
||||
KC_V 19 Keyboard v and V
|
||||
KC_W 1A Keyboard w and W
|
||||
KC_X 1B Keyboard x and X
|
||||
KC_Y 1C Keyboard y and Y
|
||||
KC_Z 1D Keyboard z and Z
|
||||
KC_1 1E Keyboard 1 and !
|
||||
KC_2 1F Keyboard 2 and @
|
||||
KC_3 20 Keyboard 3 and #
|
||||
KC_4 21 Keyboard 4 and $
|
||||
KC_5 22 Keyboard 5 and %
|
||||
KC_6 23 Keyboard 6 and ^
|
||||
KC_7 24 Keyboard 7 and &
|
||||
KC_8 25 Keyboard 8 and *
|
||||
KC_9 26 Keyboard 9 and (
|
||||
KC_0 27 Keyboard 0 and )
|
||||
KC_ENTER KC_ENT 28 Keyboard Return (ENTER)
|
||||
KC_ESCAPE KC_ESC 29 Keyboard ESCAPE
|
||||
KC_BSPACE KC_BSPC 2A Keyboard DELETE (Backspace)
|
||||
KC_TAB 2B Keyboard Tab
|
||||
KC_SPACE KC_SPC 2C Keyboard Spacebar
|
||||
KC_MINUS KC_MINS 2D Keyboard - and (underscore)
|
||||
KC_EQUAL KC_EQL 2E Keyboard = and +
|
||||
KC_LBRACKET KC_LBRC 2F Keyboard [ and {
|
||||
KC_RBRACKET KC_RBRC 30 Keyboard ] and }
|
||||
KC_BSLASH KC_BSLS 31 Keyboard \ and |
|
||||
KC_NONUS_HASH KC_NUHS 32 Keyboard Non-US # and ~
|
||||
KC_SCOLON KC_SCLN 33 Keyboard ; and :
|
||||
KC_QUOTE KC_QUOT 34 Keyboard ‘ and “
|
||||
KC_GRAVE KC_GRV 35 Keyboard Grave Accent and Tilde
|
||||
KC_COMMA KC_COMM 36 Keyboard , and <
|
||||
KC_DOT 37 Keyboard . and >
|
||||
KC_SLASH KC_SLSH 38 Keyboard / and ?
|
||||
KC_CAPSLOCK KC_CAPS 39 Keyboard Caps Lock
|
||||
KC_F1 3A Keyboard F1
|
||||
KC_F2 3B Keyboard F2
|
||||
KC_F3 3C Keyboard F3
|
||||
KC_F4 3D Keyboard F4
|
||||
KC_F5 3E Keyboard F5
|
||||
KC_F6 3F Keyboard F6
|
||||
KC_F7 40 Keyboard F7
|
||||
KC_F8 41 Keyboard F8
|
||||
KC_F9 42 Keyboard F9
|
||||
KC_F10 43 Keyboard F10
|
||||
KC_F11 44 Keyboard F11
|
||||
KC_F12 45 Keyboard F12
|
||||
KC_PSCREEN KC_PSCR 46 Keyboard PrintScreen
|
||||
KC_SCROLLLOCK KC_SLCK 47 Keyboard Scroll Lock
|
||||
KC_PAUSE KC_PAUS 48 Keyboard Pause
|
||||
KC_INSERT KC_INS 49 Keyboard Insert
|
||||
KC_HOME 4A Keyboard Home
|
||||
KC_PGUP 4B Keyboard PageUp
|
||||
KC_DELETE KC_DEL 4C Keyboard Delete Forward
|
||||
KC_END 4D Keyboard End
|
||||
KC_PGDOWN KC_PGDN 4E Keyboard PageDown
|
||||
KC_RIGHT KC_RGHT 4F Keyboard RightArrow
|
||||
KC_LEFT 50 Keyboard LeftArrow
|
||||
KC_DOWN 51 Keyboard DownArrow
|
||||
KC_UP 52 Keyboard UpArrow
|
||||
KC_NUMLOCK KC_NLCK 53 Keypad Num Lock and Clear
|
||||
KC_KP_SLASH KC_PSLS 54 Keypad /
|
||||
KC_KP_ASTERISK KC_PAST 55 Keypad *
|
||||
KC_KP_MINUS KC_PMNS 56 Keypad -
|
||||
KC_KP_PLUS KC_PPLS 57 Keypad +
|
||||
KC_KP_ENTER KC_PENT 58 Keypad ENTER
|
||||
KC_KP_1 KC_P1 59 Keypad 1 and End
|
||||
KC_KP_2 KC_P2 5A Keypad 2 and Down Arrow
|
||||
KC_KP_3 KC_P3 5B Keypad 3 and PageDn
|
||||
KC_KP_4 KC_P4 5C Keypad 4 and Left Arrow
|
||||
KC_KP_5 KC_P5 5D Keypad 5
|
||||
KC_KP_6 KC_P6 5E Keypad 6 and Right Arrow
|
||||
KC_KP_7 KC_P7 5F Keypad 7 and Home
|
||||
KC_KP_8 KC_P8 60 Keypad 8 and Up Arrow
|
||||
KC_KP_9 KC_P9 61 Keypad 9 and PageUp
|
||||
KC_KP_0 KC_P0 62 Keypad 0 and Insert
|
||||
KC_KP_DOT KC_PDOT 63 Keypad . and Delete
|
||||
KC_NONUS_BSLASH KC_NUBS 64 Keyboard Non-US \ and |
|
||||
KC_APPLICATION KC_APP 65 Keyboard Application
|
||||
KC_POWER 66 Keyboard Power
|
||||
KC_KP_EQUAL KC_PEQL 67 Keypad =
|
||||
KC_F13 68 Keyboard F13
|
||||
KC_F14 69 Keyboard F14
|
||||
KC_F15 6A Keyboard F15
|
||||
KC_F16 6B Keyboard F16
|
||||
KC_F17 6C Keyboard F17
|
||||
KC_F18 6D Keyboard F18
|
||||
KC_F19 6E Keyboard F19
|
||||
KC_F20 6F Keyboard F20
|
||||
KC_F21 70 Keyboard F21
|
||||
KC_F22 71 Keyboard F22
|
||||
KC_F23 72 Keyboard F23
|
||||
KC_F24 73 Keyboard F24
|
||||
KC_EXECUTE 74 Keyboard Execute
|
||||
KC_HELP 75 Keyboard Help
|
||||
KC_MENU 76 Keyboard Menu
|
||||
KC_SELECT 77 Keyboard Select
|
||||
KC_STOP 78 Keyboard Stop
|
||||
KC_AGAIN 79 Keyboard Again
|
||||
KC_UNDO 7A Keyboard Undo
|
||||
KC_CUT 7B Keyboard Cut
|
||||
KC_COPY 7C Keyboard Copy
|
||||
KC_PASTE 7D Keyboard Paste
|
||||
KC_FIND 7E Keyboard Find
|
||||
KC__MUTE 7F Keyboard Mute
|
||||
KC__VOLUP 80 Keyboard Volume Up
|
||||
KC__VOLDOWN 81 Keyboard Volume Down
|
||||
KC_LOCKING_CAPS 82 Keyboard Locking Caps Lock
|
||||
KC_LOCKING_NUM 83 Keyboard Locking Num Lock
|
||||
KC_LOCKING_SCROLL 84 Keyboard Locking Scroll Lock
|
||||
KC_KP_COMMA KC_PCMM 85 Keypad Comma
|
||||
KC_KP_EQUAL_AS400 86 Keypad Equal Sign
|
||||
KC_INT1 KC_RO 87 Keyboard International115
|
||||
KC_INT2 KC_KANA 88 Keyboard International216
|
||||
KC_INT3 KC_JYEN 89 Keyboard International317
|
||||
KC_INT4 KC_HENK 8A Keyboard International418
|
||||
KC_INT5 KC_MHEN 8B Keyboard International519
|
||||
KC_INT6 8C Keyboard International620
|
||||
KC_INT7 8D Keyboard International721
|
||||
KC_INT8 8E Keyboard International822
|
||||
KC_INT9 8F Keyboard International922
|
||||
KC_LANG1 90 Keyboard LANG125
|
||||
KC_LANG2 91 Keyboard LANG226
|
||||
KC_LANG3 92 Keyboard LANG330
|
||||
KC_LANG4 93 Keyboard LANG431
|
||||
KC_LANG5 94 Keyboard LANG532
|
||||
KC_LANG6 95 Keyboard LANG68
|
||||
KC_LANG7 96 Keyboard LANG78
|
||||
KC_LANG8 97 Keyboard LANG88
|
||||
KC_LANG9 98 Keyboard LANG98
|
||||
KC_ALT_ERASE 99 Keyboard Alternate Erase
|
||||
KC_SYSREQ 9A Keyboard SysReq/Attention
|
||||
KC_CANCEL 9B Keyboard Cancel
|
||||
KC_CLEAR 9C Keyboard Clear
|
||||
KC_PRIOR 9D Keyboard Prior
|
||||
KC_RETURN 9E Keyboard Return
|
||||
KC_SEPARATOR 9F Keyboard Separator
|
||||
KC_OUT A0 Keyboard Out
|
||||
KC_OPER A1 Keyboard Oper
|
||||
KC_CLEAR_AGAIN A2 Keyboard Clear/Again
|
||||
KC_CRSEL A3 Keyboard CrSel/Props
|
||||
KC_EXSEL A4 Keyboard ExSel
|
||||
/* Modifiers */
|
||||
KC_LCTRL KC_LCTL E0 Keyboard LeftControl
|
||||
KC_LSHIFT KC_LSFT E1 Keyboard LeftShift
|
||||
KC_LALT E2 Keyboard LeftAlt
|
||||
KC_LGUI E3 Keyboard Left GUI(Windows/Apple/Meta key)
|
||||
KC_RCTRL KC_RCTL E4 Keyboard RightControl
|
||||
KC_RSHIFT KC_RSFT E5 Keyboard RightShift
|
||||
KC_RALT E6 Keyboard RightAlt
|
||||
KC_RGUI E7 Keyboard Right GUI(Windows/Apple/Meta key)
|
||||
|
||||
/*
|
||||
* Virtual keycodes
|
||||
*/
|
||||
/* System Control */
|
||||
KC_SYSTEM_POWER KC_PWR System Power Down
|
||||
KC_SYSTEM_SLEEP KC_SLEP System Sleep
|
||||
KC_SYSTEM_WAKE KC_WAKE System Wake
|
||||
/* Consumer Page */
|
||||
KC_AUDIO_MUTE KC_MUTE
|
||||
KC_AUDIO_VOL_UP KC_VOLU
|
||||
KC_AUDIO_VOL_DOWN KC_VOLD
|
||||
KC_MEDIA_NEXT_TRACK KC_MNXT
|
||||
KC_MEDIA_PREV_TRACK KC_MPRV
|
||||
KC_MEDIA_STOP KC_MSTP
|
||||
KC_MEDIA_PLAY_PAUSE KC_MPLY
|
||||
KC_MEDIA_SELECT KC_MSEL
|
||||
KC_MAIL KC_MAIL
|
||||
KC_CALCULATOR KC_CALC
|
||||
KC_MY_COMPUTER KC_MYCM
|
||||
KC_WWW_SEARCH KC_WSCH
|
||||
KC_WWW_HOME KC_WHOM
|
||||
KC_WWW_BACK KC_WBAK
|
||||
KC_WWW_FORWARD KC_WFWD
|
||||
KC_WWW_STOP KC_WSTP
|
||||
KC_WWW_REFRESH KC_WREF
|
||||
KC_WWW_FAVORITES KC_WFAV
|
||||
/* Mousekey */
|
||||
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 Mouse Acceleration 0
|
||||
KC_MS_ACCEL1 KC_ACL1 Mouse Acceleration 1
|
||||
KC_MS_ACCEL2 KC_ACL2 Mouse Acceleration 2
|
||||
/* Fn key */
|
||||
KC_FN0
|
||||
KC_FN1
|
||||
KC_FN2
|
||||
KC_FN3
|
||||
KC_FN4
|
||||
KC_FN5
|
||||
KC_FN6
|
||||
KC_FN7
|
||||
KC_FN8
|
||||
KC_FN9
|
||||
KC_FN10
|
||||
KC_FN11
|
||||
KC_FN12
|
||||
KC_FN13
|
||||
KC_FN14
|
||||
KC_FN15
|
||||
KC_FN16
|
||||
KC_FN17
|
||||
KC_FN18
|
||||
KC_FN19
|
||||
KC_FN20
|
||||
KC_FN21
|
||||
KC_FN22
|
||||
KC_FN23
|
||||
KC_FN24
|
||||
KC_FN25
|
||||
KC_FN26
|
||||
KC_FN27
|
||||
KC_FN28
|
||||
KC_FN29
|
||||
KC_FN30
|
||||
KC_FN31
|
@@ -177,7 +177,7 @@ This is a reference only. Each group of keys links to the page documenting their
|
||||
|`KC_LGUI` |`KC_LCMD`, `KC_LWIN`|Left GUI (Windows/Command/Meta key) |
|
||||
|`KC_RCTRL` |`KC_RCTL` |Right Control |
|
||||
|`KC_RSHIFT` |`KC_RSFT` |Right Shift |
|
||||
|`KC_RALT` | |Right Alt |
|
||||
|`KC_RALT` |`KC_ALGR` |Right Alt (AltGr) |
|
||||
|`KC_RGUI` |`KC_RCMD`, `KC_RWIN`|Right GUI (Windows/Command/Meta key) |
|
||||
|`KC_SYSTEM_POWER` |`KC_PWR` |System Power Down |
|
||||
|`KC_SYSTEM_SLEEP` |`KC_SLEP` |System Sleep |
|
||||
@@ -203,6 +203,8 @@ This is a reference only. Each group of keys links to the page documenting their
|
||||
|`KC_WWW_FAVORITES` |`KC_WFAV` |Browser Favorites (Windows) |
|
||||
|`KC_MEDIA_FAST_FORWARD`|`KC_MFFD` |Next Track (macOS) |
|
||||
|`KC_MEDIA_REWIND` |`KC_MRWD` |Previous Track (macOS) |
|
||||
|`KC_BRIGHTNESS_UP` |`KC_BRIU` |Brightness Up |
|
||||
|`KC_BRIGHTNESS_DOWN` |`KC_BRID` |Brightness Down |
|
||||
|
||||
## [Quantum Keycodes](quantum_keycodes.md#qmk-keycodes)
|
||||
|
||||
@@ -224,9 +226,9 @@ This is a reference only. Each group of keys links to the page documenting their
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|----------------|---------|----------------------------------|
|
||||
|`AU_ON` | |Audio mode on |
|
||||
|`AU_OFF` | |Audio mode off |
|
||||
|`AU_TOG` | |Toggles Audio mode |
|
||||
|`AU_ON` | |Turns on Audio Feature |
|
||||
|`AU_OFF` | |Turns off Audio Feature |
|
||||
|`AU_TOG` | |Toggles Audio state |
|
||||
|`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 |
|
||||
@@ -286,15 +288,16 @@ This is a reference only. Each group of keys links to the page documenting their
|
||||
|
||||
## [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 |
|
||||
|Key |Description |
|
||||
|----------------|----------------------------------------------------------------------------------|
|
||||
|`DF(layer)` |Set the base (default) layer |
|
||||
|`MO(layer)` |Momentarily turn on `layer` when pressed (requires `KC_TRNS` on destination layer)|
|
||||
|`OSL(layer)` |Momentarily activates `layer` until a key is pressed. See [One Shot Keys](https://docs.qmk.fm/#/feature_advanced_keycodes?id=one-shot-keys) for details. |
|
||||
|`LM(layer, mod)`|Momentarily turn on `layer` (like MO) with `mod` active as well.
|
||||
|`LT(layer, kc)` |Turn on `layer` when held, `kc` when tapped |
|
||||
|`TG(layer)` |Toggle `layer` on or off |
|
||||
|`TO(layer)` |Turn on `layer` when pressed |
|
||||
|`TT(layer)` |Normally acts like MO unless it's tapped multiple times, which toggles `layer` on |
|
||||
|
||||
## [Mouse Keys](feature_mouse_keys.md)
|
||||
|
||||
@@ -329,7 +332,7 @@ This is a reference only. Each group of keys links to the page documenting their
|
||||
|`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` |
|
||||
|`RALT(kc)`|`ALGR(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` |
|
||||
@@ -429,18 +432,6 @@ This is a reference only. Each group of keys links to the page documenting their
|
||||
|`KC_RIGHT_ANGLE_BRACKET`|`KC_RABK`, `KC_GT` |`>` |
|
||||
|`KC_QUESTION` |`KC_QUES` |`?` |
|
||||
|
||||
## [Switching and Toggling Layers](feature_advanced_keycodes.md#switching-and-toggling-layers)
|
||||
|
||||
|Key |Description |
|
||||
|----------------|----------------------------------------------------------------------------------|
|
||||
|`LT(layer, kc)` |Turn on `layer` when held, `kc` when tapped |
|
||||
|`TO(layer)` |Turn on `layer` when pressed |
|
||||
|`MO(layer)` |Momentarily turn on `layer` when pressed (requires `KC_TRNS` on destination layer)|
|
||||
|`DF(layer)` |Set the base (default) layer |
|
||||
|`TG(layer)` |Toggle `layer` on or off |
|
||||
|`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](feature_advanced_keycodes.md#one-shot-keys)
|
||||
|
||||
|Key |Description |
|
||||
@@ -463,7 +454,7 @@ This is a reference only. Each group of keys links to the page documenting their
|
||||
|
||||
## [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|
|
||||
|Key |Description |
|
||||
|-------|---------------------------------------------------------------------------|
|
||||
|`UC(c)`|Send Unicode code point `c` (`UNICODE_ENABLE`) |
|
||||
|`X(i)` |Send Unicode code point at index `i` in `unicode_map` (`UNICODEMAP_ENABLE`)|
|
||||
|
@@ -116,7 +116,7 @@ The basic set of keycodes are based on the [HID Keyboard/Keypad Usage Page (0x07
|
||||
|`KC_LGUI` |`KC_LCMD`, `KC_LWIN`|Left GUI (Windows/Command/Meta key) |
|
||||
|`KC_RCTRL` |`KC_RCTL` |Right Control |
|
||||
|`KC_RSHIFT`|`KC_RSFT` |Right Shift |
|
||||
|`KC_RALT` | |Right Alt |
|
||||
|`KC_RALT` |`KC_ALGR` |Right Alt (AltGr) |
|
||||
|`KC_RGUI` |`KC_RCMD`, `KC_RWIN`|Right GUI (Windows/Command/Meta key)|
|
||||
|
||||
## International
|
||||
@@ -219,6 +219,8 @@ Windows and macOS use different keycodes for "next track" and "previous track".
|
||||
|`KC_WWW_FAVORITES` |`KC_WFAV`|Browser Favorites (Windows) |
|
||||
|`KC_MEDIA_FAST_FORWARD`|`KC_MFFD`|Next Track (macOS) |
|
||||
|`KC_MEDIA_REWIND` |`KC_MRWD`|Previous Track (macOS) |
|
||||
|`KC_BRIGHTNESS_UP` |`KC_BRIU`|Brightness Up |
|
||||
|`KC_BRIGHTNESS_DOWN` |`KC_BRID`|Brightness Down |
|
||||
|
||||
## Number Pad
|
||||
|
||||
|
@@ -6,13 +6,17 @@ Not sure if your keyboard can run QMK? If it's a mechanical keyboard you built y
|
||||
|
||||
## Overview
|
||||
|
||||
There are 5 main sections to this guide:
|
||||
There are 6 main sections to this guide:
|
||||
|
||||
* [Getting Started](newbs_getting_started.md)
|
||||
* [Building Your First Firmware](newbs_building_firmware.md)
|
||||
* [Flashing Firmware](newbs_flashing.md)
|
||||
* [Testing and Debugging](newbs_testing_debugging.md)
|
||||
* [Best Practices](newbs_best_practices.md)
|
||||
* [Git Best Practices](newbs_best_practices.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).
|
||||
|
||||
## Additional Resources
|
||||
|
||||
* [Thomas Baart's QMK Basics Blog](https://thomasbaart.nl/category/mechanical-keyboards/firmware/qmk/qmk-basics/) – A user-created blog covering the basics of how to use QMK Firmware, as seen from a new user's perspective.
|
||||
|
@@ -96,3 +96,24 @@ And to do so, add `reset_keyboard()` to your function or macro, and this will re
|
||||
If you're having issues with Audio, RGB Underglow, backlighting or keys acting weird, then you can reset the EEPROM (persistent setting storage). Bootmagic is one way to do this, but if that isn't enabled, then you can use a custom macro to do so.
|
||||
|
||||
To wipe the EEPROM, run `eeconfig_init()` from your function or macro to reset most of the settings to default.
|
||||
|
||||
## Tap random key
|
||||
|
||||
If you want to send a random character to the host computer, you can use the `tap_random_base64()` function. This [pseudorandomly](https://en.wikipedia.org/wiki/Pseudorandom_number_generator) selects a number between 0 and 63, and then sends a key press based on that selection. (0–25 is `A`–`Z`, 26–51 is `a`–`z`, 52–61 is `0`–`9`, 62 is `+` and 63 is `/`).
|
||||
|
||||
?> Needless to say, but this is _not_ a cryptographically secure method of generating random Base64 keys or passwords.
|
||||
|
||||
## Software Timers
|
||||
|
||||
It's possible to start timers and read values for time-specific events. Here's an example:
|
||||
|
||||
```c
|
||||
static uint16_t key_timer;
|
||||
key_timer = timer_read();
|
||||
|
||||
if (timer_elapsed(key_timer) < 100) {
|
||||
// do something if less than 100ms have passed
|
||||
} else {
|
||||
// do something if 100ms or more have passed
|
||||
}
|
||||
```
|
||||
|
43
docs/support.md
Normal file
43
docs/support.md
Normal file
@@ -0,0 +1,43 @@
|
||||
# Support
|
||||
|
||||
If you need help with something, the best place to get quick support is going to be on our [Discord Server](https://discord.gg/Uq7gcHh). There is usually somebody online, and there are a bunch of very helpful people there.
|
||||
|
||||
Don't forget to read our [Code of Conduct](https://qmk.fm/coc/).
|
||||
|
||||
## Help! I don't know where to start!
|
||||
|
||||
If this is the case, then you should start with our [Newbs Guide](https://docs.qmk.fm/#/newbs). There is a lot of great info there, and that should cover everything you need to get started.
|
||||
|
||||
If that's an issue, hop onto the [QMK Configurator](https://config.qmk.fm), as that will handle a majority of what you need there.
|
||||
|
||||
## Help! I'm having issues flashing!
|
||||
|
||||
First, head to the [Compiling/Flashing FAQ Page](https://docs.qmk.fm/#/faq_build). There is a good deal of info there, and you'll find a bunch of solutions to common issues there.
|
||||
|
||||
## Help, I have an issue that isn't covered by the links above
|
||||
|
||||
Okay, that's fine. Then please check the [open issues in our GitHub](https://github.com/qmk/qmk_firmware/issues) to see if somebody is experiencing the same thing (make sure it's not just similar, but actually the same).
|
||||
|
||||
If you can't find anything, then please open a [new issue](https://github.com/qmk/qmk_firmware/issues/new)!
|
||||
|
||||
## What if I found a bug?
|
||||
|
||||
Then please open an [issue](https://github.com/qmk/qmk_firmware/issues/new), and if you know how to fix it, open up a Pull Request on GitHub with the fix.
|
||||
|
||||
## But `git` and `GitHub` are intimidating!
|
||||
|
||||
Don't worry, we have some pretty nice [Guidelines](https://docs.qmk.fm/#/newbs_best_practices) on how to start using `git` and GitHub to make things easier to develop.
|
||||
|
||||
Additionally, you can find additional `git` and GitHub related links [here](https://docs.qmk.fm/#/newbs_learn_more_resources).
|
||||
|
||||
## I have a Keyboard that I want to add support for
|
||||
|
||||
Awesome! Open up a Pull Request for it. We'll review the code, and merge it!
|
||||
|
||||
### What if I want to do brand it with `QMK`?
|
||||
|
||||
That's amazing! We would love to assist you with that!
|
||||
|
||||
In fact, we have a [whole page](https://qmk.fm/powered/) dedicated to adding QMK Branding to your page and keyboard. This covers pretty much everything you need (knowledge and images) to officially support QMK.
|
||||
|
||||
If you have any questions about this, open an issue or head to [Discord](https://discord.gg/Uq7gcHh).
|
@@ -12,7 +12,7 @@ You can think of QMK as no different from any other computer program. It is star
|
||||
|
||||
The reason for this is the different platforms that QMK supports. The most common platform is `lufa`, which runs on AVR processors such at the atmega32u4. We also support `chibios` and `vusb`.
|
||||
|
||||
We'll focus on AVR processors for the moment, which use the `lufa` platform. You can find the `main()` function in [tmk_core/protocol/lufa/lufa.c](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/tmk_core/protocol/lufa/lufa.c#L1019). If you browse through that function you'll find that it initializes any hardware that has been configured (including USB to the host) and then it starts the core part of the program with a [`while(1)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/tmk_core/protocol/lufa/lufa.c#L1060). This is [The Main Loop](#the-main-loop).
|
||||
We'll focus on AVR processors for the moment, which use the `lufa` platform. You can find the `main()` function in [tmk_core/protocol/lufa/lufa.c](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/tmk_core/protocol/lufa/lufa.c#L1028). If you browse through that function you'll find that it initializes any hardware that has been configured (including USB to the host) and then it starts the core part of the program with a [`while(1)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/tmk_core/protocol/lufa/lufa.c#L1069). This is [The Main Loop](#the-main-loop).
|
||||
|
||||
## The Main Loop
|
||||
|
||||
@@ -22,7 +22,7 @@ This section of code is called "The Main Loop" because it's responsible for loop
|
||||
keyboard_task();
|
||||
```
|
||||
|
||||
This is where all the keyboard specific functionality is dispatched. The source code for `keyboard_task()` can be found in [tmk_core/common/keyboard.c](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/tmk_core/common/keyboard.c#L206), and it is responsible for detecting changes in the matrix and turning status LED's on and off.
|
||||
This is where all the keyboard specific functionality is dispatched. The source code for `keyboard_task()` can be found in [tmk_core/common/keyboard.c](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/tmk_core/common/keyboard.c#L216), and it is responsible for detecting changes in the matrix and turning status LED's on and off.
|
||||
|
||||
Within `keyboard_task()` you'll find code to handle:
|
||||
|
||||
@@ -77,7 +77,7 @@ At the keyboard level we define a C macro (typically named `KEYMAP()`) which map
|
||||
|
||||
Notice how the second block of our `KEYMAP()` macro matches the Matrix Scanning array above? This macro is what will map the matrix scanning array to keycodes. However, if you look at a 17 key numpad you'll notice that it has 3 places where the matrix could have a switch but doesn't, due to larger keys. We have populated those spaces with `KC_NO` so that our keymap definition doesn't have to.
|
||||
|
||||
You can also use this macro to handle unusual matrix layouts, for example the [Clueboard rev 2](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/keyboards/clueboard/66/rev2/rev2.h). Explaining that is outside the scope of this document.
|
||||
You can also use this macro to handle unusual matrix layouts, for example the [Clueboard rev 2](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/keyboards/clueboard/66/rev2/rev2.h). Explaining that is outside the scope of this document.
|
||||
|
||||
##### Keycode Assignment
|
||||
|
||||
@@ -130,31 +130,33 @@ Comparing against our keymap we can see that the pressed key is KC_NLCK. From he
|
||||
|
||||
##### Process Record
|
||||
|
||||
The `process_record()` function itself is deceptively simple, but hidden within is a gateway to overriding functionality at various levels of QMK. The chain of events is listed below, using cluecard whenever we need to look at the keyboard/keymap level functions. Depending on options set in rule.mk or elsewhere, only a subset of the functions below will be included in final firmware.
|
||||
The `process_record()` function itself is deceptively simple, but hidden within is a gateway to overriding functionality at various levels of QMK. The chain of events is listed below, using cluecard whenever we need to look at the keyboard/keymap level functions. Depending on options set in `rules.mk` or elsewhere, only a subset of the functions below will be included in final firmware.
|
||||
|
||||
* [`void process_record(keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/08c682c193f43e5d54df990680ae93fc2e06150a/tmk_core/common/action.c#L172)
|
||||
* [`bool process_record_quantum(keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/08c682c193f43e5d54df990680ae93fc2e06150a/quantum/quantum.c#L193)
|
||||
* [Map this record to a keycode](https://github.com/qmk/qmk_firmware/blob/08c682c193f43e5d54df990680ae93fc2e06150a/quantum/quantum.c#L213)
|
||||
* [`void preprocess_tap_dance(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/08c682c193f43e5d54df990680ae93fc2e06150a/quantum/process_keycode/process_tap_dance.c#L115)
|
||||
* [`bool process_key_lock(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/08c682c193f43e5d54df990680ae93fc2e06150a/quantum/process_keycode/process_key_lock.c#L62)
|
||||
* [`bool process_clicky(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/08c682c193f43e5d54df990680ae93fc2e06150a/quantum/process_keycode/process_clicky.c#L44)
|
||||
* [`bool process_record_kb(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/08c682c193f43e5d54df990680ae93fc2e06150a/keyboards/clueboard/card/card.c#L20)
|
||||
* [`bool process_record_user(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/08c682c193f43e5d54df990680ae93fc2e06150a/keyboards/clueboard/card/keymaps/default/keymap.c#L58)
|
||||
* [`bool process_rgb_matrix(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/fdd0f915271f79b104aa5d216566bcc3fd134e85/quantum/rgb_matrix.c#L139)
|
||||
* [`bool process_midi(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_midi.c#L81)
|
||||
* [`bool process_audio(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_audio.c#L19)
|
||||
* [`bool process_steno(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_steno.c#L160)
|
||||
* [`bool process_music(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_music.c#L114)
|
||||
* [`bool process_tap_dance(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_tap_dance.c#L136)
|
||||
* [`bool process_leader(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_leader.c#L38)
|
||||
* [`bool process_combo(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_combo.c#L115)
|
||||
* [`bool process_unicode(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_unicode.c#L22)
|
||||
* [`bool process_ucis(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_ucis.c#L91)
|
||||
* [`bool process_printer(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_printer.c#L77)
|
||||
* [`bool process_auto_shift(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_auto_shift.c#L94)
|
||||
* [`bool process_unicode_map(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_unicodemap.c#L47)
|
||||
* [`bool process_terminal(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_terminal.c#L264)
|
||||
* [Identify and process quantum specific keycodes](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/quantum.c#L287)
|
||||
* [`void process_record(keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/tmk_core/common/action.c#L172)
|
||||
* [`bool process_record_quantum(keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/quantum.c#L206)
|
||||
* [Map this record to a keycode](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/quantum.c#L226)
|
||||
* [`void preprocess_tap_dance(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_tap_dance.c#L119)
|
||||
* [`bool process_key_lock(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_key_lock.c#L62)
|
||||
* [`bool process_clicky(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_clicky.c#L79)
|
||||
* [`bool process_record_kb(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/keyboards/clueboard/card/card.c#L20)
|
||||
* [`bool process_record_user(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/keyboards/clueboard/card/keymaps/default/keymap.c#L58)
|
||||
* [`bool process_rgb_matrix(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/rgb_matrix.c#L139)
|
||||
* [`bool process_midi(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_midi.c#L81)
|
||||
* [`bool process_audio(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_audio.c#L19)
|
||||
* [`bool process_steno(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_steno.c#L160)
|
||||
* [`bool process_music(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_music.c#L114)
|
||||
* [`bool process_tap_dance(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_tap_dance.c#L141)
|
||||
* [`bool process_unicode_common(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_unicode_common.c#L169)
|
||||
calls one of:
|
||||
* [`bool process_unicode(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_unicode.c#L20)
|
||||
* [`bool process_unicodemap(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_unicodemap.c#L46)
|
||||
* [`bool process_ucis(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_ucis.c#L95)
|
||||
* [`bool process_leader(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_leader.c#L51)
|
||||
* [`bool process_combo(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_combo.c#L115)
|
||||
* [`bool process_printer(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_printer.c#L77)
|
||||
* [`bool process_auto_shift(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_auto_shift.c#L94)
|
||||
* [`bool process_terminal(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_terminal.c#L264)
|
||||
* [Identify and process Quantum-specific keycodes](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/quantum.c#L291)
|
||||
|
||||
At any step during this chain of events a function (such as `process_record_kb()`) can `return false` to halt all further processing.
|
||||
|
||||
|
32
docs/zh/README.md
Normal file
32
docs/zh/README.md
Normal file
@@ -0,0 +1,32 @@
|
||||
# QMK鍵盤固件
|
||||
|
||||
[](https://github.com/qmk/qmk_firmware/tags)
|
||||
[](https://travis-ci.org/qmk/qmk_firmware)
|
||||
[](https://discord.gg/Uq7gcHh)
|
||||
[](https://docs.qmk.fm)
|
||||
[](https://github.com/qmk/qmk_firmware/pulse/monthly)
|
||||
[](https://github.com/qmk/qmk_firmware/)
|
||||
|
||||
## 什麼是QMK固件?
|
||||
|
||||
QMK是一個由社群維護的開源鍵盤韌體,其中包含了QMK Toolbox、qmk.fm和其它文件。QMK韌體是以[tmk\_keyboard](http://github.com/tmk/tmk_keyboard)為基礎,讓一些有用的功能在Atmel AVR控制器實現,使用於[OLKB](https://olkb.com)、[ergodox EZ](http://www.ergodox-ez.com),和[Clueboard](http://clueboard.co/)的產品中。它也被移植到使用ChibiOS的ARM晶片上。你也可以用它來讓你徒手佈線,或是客製的鍵盤PCB發揮功能。
|
||||
|
||||
## 如何得到QMK
|
||||
|
||||
如果你打算貢獻鍵盤佈局,鍵盤或功能QMK,最容易做的事情是[叉通過Github上爬行](https://github.com/qmk/qmk_firmware#fork-destination-box),和克隆你爬在本地進行更改,推動他們,然後打開從你的叉子[拉請求](https://github.com/qmk/qmk_firmware/pulls)。
|
||||
|
||||
否則,您可以直接下載([拉鍊](https://github.com/qmk/qmk_firmware/zipball/master) [焦油](https://github.com/qmk/qmk_firmware/tarball/master)),或者通過GIT中克隆它(`git@github.com:qmk/qmk_firmware.git`)或HTTP(`https://github.com/qmk/qmk_firmware.git`)。
|
||||
|
||||
## 如何編譯
|
||||
|
||||
你可以編譯之前,你需要[安裝環境](getting_started_build_tools.md)用於AVR或/和ARM開發。一旦完成,你會使用`make`命令建立一個鍵盤並用以下符號鍵盤佈局
|
||||
|
||||
make planck/rev4:default
|
||||
|
||||
這將建立`rev4` `planck`的修訂與`default`鍵盤映射。並非所有鍵盤有一個修訂版(也稱為子項目或文件夾),在這種情況下,它可以被省略:
|
||||
|
||||
make preonic:default
|
||||
|
||||
## 如何赶近
|
||||
|
||||
QMK有很多[特點](features.md)探索和很好的協議[參考文獻](http://docs.qmk.fm)挖通的。大部分功能通過修改[鍵盤映射(keymap.md),並改變[鍵碼](keycodes.md)冤大頭。
|
99
docs/zh/_sidebar.md
Normal file
99
docs/zh/_sidebar.md
Normal file
@@ -0,0 +1,99 @@
|
||||
* [完全指南菜鳥](zh/newbs.md)
|
||||
* [入門](zh/newbs_getting_started.md)
|
||||
* [構建第一個固件](zh/newbs_building_firmware.md)
|
||||
* [刷新固件](zh/newbs_flashing.md)
|
||||
* [測試和調試](zh/newbs_testing_debugging.md)
|
||||
* [最佳實踐](zh/newbs_best_practices.md)
|
||||
* [學習資源](zh/newbs_learn_more_resources.md)
|
||||
|
||||
* [QMK基礎](zh/README.md)
|
||||
* [QMK簡介](zh/getting_started_introduction.md)
|
||||
* [特約QMK](zh/contributing.md)
|
||||
* [如何使用Github上](zh/getting_started_github.md)
|
||||
* [獲得幫助](zh/getting_started_getting_help.md)
|
||||
|
||||
* [常問問題](zh/faq.md)
|
||||
* [常問問題](zh/faq_general.md)
|
||||
* [構建/編譯QMK](zh/faq_build.md)
|
||||
* [調試/故障排除QMK](zh/faq_debug.md)
|
||||
* [鍵盤佈局](zh/faq_keymap.md)
|
||||
|
||||
* 詳細指南
|
||||
* [安裝編譯工具](zh/getting_started_build_tools.md)
|
||||
* [流浪漢指南](zh/getting_started_vagrant.md)
|
||||
* [構建/編譯器指令](zh/getting_started_make_guide.md)
|
||||
* [刷新固件](zh/flashing.md)
|
||||
* [定制功能](zh/custom_quantum_functions.md)
|
||||
* [鍵盤映射概述](zh/keymap.md)
|
||||
|
||||
* [硬件](zh/hardware.md)
|
||||
* [AVR處理器](zh/hardware_avr.md)
|
||||
* [司機](zh/hardware_drivers.md)
|
||||
|
||||
* 參考
|
||||
* [Keyboard Guidelines](zh/hardware_keyboard_guidelines.md)
|
||||
* [Config Options](zh/config_options.md)
|
||||
* [Keycodes](zh/keycodes.md)
|
||||
* [Documentation Best Practices](zh/documentation_best_practices.md)
|
||||
* [Documentation Templates](zh/documentation_templates.md)
|
||||
* [Glossary](zh/reference_glossary.md)
|
||||
* [Unit Testing](zh/unit_testing.md)
|
||||
* [Useful Functions](zh/ref_functions.md)
|
||||
* [Configurator Support](zh/reference_configurator_support.md)
|
||||
|
||||
* [特點](zh/features.md)
|
||||
* [Basic Keycodes](zh/keycodes_basic.md)
|
||||
* [Quantum Keycodes](zh/quantum_keycodes.md)
|
||||
* [Advanced Keycodes](zh/feature_advanced_keycodes.md)
|
||||
* [Audio](zh/feature_audio.md)
|
||||
* [Auto Shift](zh/feature_auto_shift.md)
|
||||
* [Backlight](zh/feature_backlight.md)
|
||||
* [Bluetooth](zh/feature_bluetooth.md)
|
||||
* [Bootmagic](zh/feature_bootmagic.md)
|
||||
* [Combos](zh/feature_combo)
|
||||
* [Command](zh/feature_command.md)
|
||||
* [Dynamic Macros](zh/feature_dynamic_macros.md)
|
||||
* [Encoders](zh/feature_encoders.md)
|
||||
* [Grave Escape](zh/feature_grave_esc.md)
|
||||
* [Key Lock](zh/feature_key_lock.md)
|
||||
* [Layouts](zh/feature_layouts.md)
|
||||
* [Leader Key](zh/feature_leader_key.md)
|
||||
* [Macros](zh/feature_macros.md)
|
||||
* [Mouse Keys](zh/feature_mouse_keys.md)
|
||||
* [One Shot Keys](zh/feature_advanced_keycodes.md#one-shot-keys)
|
||||
* [Pointing Device](zh/feature_pointing_device.md)
|
||||
* [PS/2 Mouse](zh/feature_ps2_mouse.md)
|
||||
* [RGB Lighting](zh/feature_rgblight.md)
|
||||
* [RGB Matrix](zh/feature_rgb_matrix.md)
|
||||
* [Space Cadet Shift](zh/feature_space_cadet_shift.md)
|
||||
* [Space Cadet Shift Enter](zh/feature_space_cadet_shift_enter.md)
|
||||
* [Stenography](zh/feature_stenography.md)
|
||||
* [Swap Hands](zh/feature_swap_hands.md)
|
||||
* [Tap Dance](zh/feature_tap_dance.md)
|
||||
* [Terminal](zh/feature_terminal.md)
|
||||
* [Thermal Printer](zh/feature_thermal_printer.md)
|
||||
* [Unicode](zh/feature_unicode.md)
|
||||
* [Userspace](zh/feature_userspace.md)
|
||||
* [US ANSI Shifted Keys](zh/keycodes_us_ansi_shifted.md)
|
||||
|
||||
* 對於製造商和遊戲模組
|
||||
* [Hand Wiring Guide](zh/hand_wire.md)
|
||||
* [ISP Flashing Guide](zh/isp_flashing_guide.md)
|
||||
* [ARM Debugging Guide](zh/arm_debugging.md)
|
||||
* [I2C Driver](zh/i2c_driver.md)
|
||||
|
||||
* 為了更深入的了解
|
||||
* [How Keyboards Work](zh/how_keyboards_work.md)
|
||||
* [Understanding QMK](zh/understanding_qmk.md)
|
||||
|
||||
* 其它主題
|
||||
* [Using Eclipse with QMK](zh/eclipse.md)
|
||||
|
||||
* QMK內部(進行中)
|
||||
* [Defines](zh/internals_defines.md)
|
||||
* [Input Callback Reg](zh/internals_input_callback_reg.md)
|
||||
* [Midi Device](zh/internals_midi_device.md)
|
||||
* [Midi Device Setup Process](zh/internals_midi_device_setup_process.md)
|
||||
* [Midi Util](zh/internals_midi_util.md)
|
||||
* [Send Functions](zh/internals_send_functions.md)
|
||||
* [Sysex Tools](zh/internals_sysex_tools.md)
|
@@ -32,7 +32,7 @@
|
||||
|
||||
static uint8_t i2c_address;
|
||||
|
||||
// This configures the I2C clock to 400Mhz assuming a 72Mhz clock
|
||||
// This configures the I2C clock to 400khz assuming a 72Mhz clock
|
||||
// For more info : https://www.st.com/en/embedded-software/stsw-stm32126.html
|
||||
static const I2CConfig i2cconfig = {
|
||||
STM32_TIMINGR_PRESC(15U) |
|
||||
@@ -45,12 +45,14 @@ static const I2CConfig i2cconfig = {
|
||||
__attribute__ ((weak))
|
||||
void i2c_init(void)
|
||||
{
|
||||
setPinInput(B6); // Try releasing special pins for a short time
|
||||
setPinInput(B7);
|
||||
chThdSleepMilliseconds(10);
|
||||
// Try releasing special pins for a short time
|
||||
palSetPadMode(GPIOB, 6, PAL_MODE_INPUT);
|
||||
palSetPadMode(GPIOB, 7, PAL_MODE_INPUT);
|
||||
|
||||
palSetPadMode(GPIOB, 6, PAL_MODE_ALTERNATE(4) | PAL_STM32_OTYPE_OPENDRAIN | PAL_STM32_PUPDR_PULLUP);
|
||||
palSetPadMode(GPIOB, 7, PAL_MODE_ALTERNATE(4) | PAL_STM32_OTYPE_OPENDRAIN | PAL_STM32_PUPDR_PULLUP);
|
||||
chThdSleepMilliseconds(10);
|
||||
|
||||
palSetPadMode(GPIOB, 6, PAL_MODE_ALTERNATE(4) | PAL_STM32_OTYPE_OPENDRAIN);
|
||||
palSetPadMode(GPIOB, 7, PAL_MODE_ALTERNATE(4) | PAL_STM32_OTYPE_OPENDRAIN);
|
||||
|
||||
//i2cInit(); //This is invoked by halInit() so no need to redo it.
|
||||
}
|
||||
|
@@ -34,6 +34,7 @@ void i2c_init(void);
|
||||
uint8_t i2c_start(uint8_t address);
|
||||
uint8_t i2c_transmit(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout);
|
||||
uint8_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout);
|
||||
uint8_t i2c_transmit_receive(uint8_t address, uint8_t * tx_body, uint16_t tx_length, uint8_t * rx_body, uint16_t rx_length);
|
||||
uint8_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout);
|
||||
uint8_t i2c_readReg(uint8_t devaddr, uint8_t* regaddr, uint8_t* data, uint16_t length, uint16_t timeout);
|
||||
uint8_t i2c_stop(uint16_t timeout);
|
||||
|
129
drivers/haptic/DRV2605L.c
Normal file
129
drivers/haptic/DRV2605L.c
Normal file
@@ -0,0 +1,129 @@
|
||||
/* Copyright 2018 ishtob
|
||||
* Driver for DRV2605L written for QMK
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General 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 "DRV2605L.h"
|
||||
#include "print.h"
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
|
||||
|
||||
uint8_t DRV2605L_transfer_buffer[20];
|
||||
uint8_t DRV2605L_tx_register[0];
|
||||
uint8_t DRV2605L_read_buffer[0];
|
||||
uint8_t DRV2605L_read_register;
|
||||
|
||||
|
||||
void DRV_write(uint8_t drv_register, uint8_t settings) {
|
||||
DRV2605L_transfer_buffer[0] = drv_register;
|
||||
DRV2605L_transfer_buffer[1] = settings;
|
||||
i2c_transmit(DRV2605L_BASE_ADDRESS << 1, DRV2605L_transfer_buffer, 2, 100);
|
||||
}
|
||||
|
||||
uint8_t DRV_read(uint8_t regaddress) {
|
||||
DRV2605L_tx_register[0] = regaddress;
|
||||
if (MSG_OK != i2c_transmit_receive(DRV2605L_BASE_ADDRESS << 1,
|
||||
DRV2605L_tx_register, 1,
|
||||
DRV2605L_read_buffer, 1
|
||||
)){
|
||||
printf("err reading reg \n");
|
||||
}
|
||||
DRV2605L_read_register = (uint8_t)DRV2605L_read_buffer[0];
|
||||
return DRV2605L_read_register;
|
||||
}
|
||||
|
||||
void DRV_init(void)
|
||||
{
|
||||
i2c_init();
|
||||
i2c_start(DRV2605L_BASE_ADDRESS);
|
||||
|
||||
/* 0x07 sets DRV2605 into calibration mode */
|
||||
DRV_write(DRV_MODE,0x07);
|
||||
|
||||
// DRV_write(DRV_FEEDBACK_CTRL,0xB6);
|
||||
|
||||
#if FB_ERM_LRA == 0
|
||||
/* ERM settings */
|
||||
DRV_write(DRV_RATED_VOLT, (RATED_VOLTAGE/21.33)*1000);
|
||||
#if ERM_OPEN_LOOP == 0
|
||||
DRV_write(DRV_OVERDRIVE_CLAMP_VOLT, (((V_PEAK*(DRIVE_TIME+BLANKING_TIME+IDISS_TIME))/0.02133)/(DRIVE_TIME-0.0003)));
|
||||
#elif ERM_OPEN_LOOP == 1
|
||||
DRV_write(DRV_OVERDRIVE_CLAMP_VOLT, (V_PEAK/0.02196));
|
||||
#endif
|
||||
#elif FB_ERM_LRA == 1
|
||||
DRV_write(DRV_RATED_VOLT, ((V_RMS * sqrt(1 - ((4 * ((150+(SAMPLE_TIME*50))*0.000001)) + 0.0003)* F_LRA)/0.02071)));
|
||||
#if LRA_OPEN_LOOP == 0
|
||||
DRV_write(DRV_OVERDRIVE_CLAMP_VOLT, ((V_PEAK/sqrt(1-(F_LRA*0.0008))/0.02133)));
|
||||
#elif LRA_OPEN_LOOP == 1
|
||||
DRV_write(DRV_OVERDRIVE_CLAMP_VOLT, (V_PEAK/0.02196));
|
||||
#endif
|
||||
#endif
|
||||
|
||||
DRVREG_FBR FB_SET;
|
||||
FB_SET.Bits.ERM_LRA = FB_ERM_LRA;
|
||||
FB_SET.Bits.BRAKE_FACTOR = FB_BRAKEFACTOR;
|
||||
FB_SET.Bits.LOOP_GAIN =FB_LOOPGAIN;
|
||||
FB_SET.Bits.BEMF_GAIN = 0; /* auto-calibration populates this field*/
|
||||
DRV_write(DRV_FEEDBACK_CTRL, (uint8_t) FB_SET.Byte);
|
||||
DRVREG_CTRL1 C1_SET;
|
||||
C1_SET.Bits.C1_DRIVE_TIME = DRIVE_TIME;
|
||||
C1_SET.Bits.C1_AC_COUPLE = AC_COUPLE;
|
||||
C1_SET.Bits.C1_STARTUP_BOOST = STARTUP_BOOST;
|
||||
DRV_write(DRV_CTRL_1, (uint8_t) C1_SET.Byte);
|
||||
DRVREG_CTRL2 C2_SET;
|
||||
C2_SET.Bits.C2_BIDIR_INPUT = BIDIR_INPUT;
|
||||
C2_SET.Bits.C2_BRAKE_STAB = BRAKE_STAB;
|
||||
C2_SET.Bits.C2_SAMPLE_TIME = SAMPLE_TIME;
|
||||
C2_SET.Bits.C2_BLANKING_TIME = BLANKING_TIME;
|
||||
C2_SET.Bits.C2_IDISS_TIME = IDISS_TIME;
|
||||
DRV_write(DRV_CTRL_2, (uint8_t) C2_SET.Byte);
|
||||
DRVREG_CTRL3 C3_SET;
|
||||
C3_SET.Bits.C3_LRA_OPEN_LOOP = LRA_OPEN_LOOP;
|
||||
C3_SET.Bits.C3_N_PWM_ANALOG = N_PWM_ANALOG;
|
||||
C3_SET.Bits.C3_LRA_DRIVE_MODE = LRA_DRIVE_MODE;
|
||||
C3_SET.Bits.C3_DATA_FORMAT_RTO = DATA_FORMAT_RTO;
|
||||
C3_SET.Bits.C3_SUPPLY_COMP_DIS = SUPPLY_COMP_DIS;
|
||||
C3_SET.Bits.C3_ERM_OPEN_LOOP = ERM_OPEN_LOOP;
|
||||
C3_SET.Bits.C3_NG_THRESH = NG_THRESH;
|
||||
DRV_write(DRV_CTRL_3, (uint8_t) C3_SET.Byte);
|
||||
DRVREG_CTRL4 C4_SET;
|
||||
C4_SET.Bits.C4_ZC_DET_TIME = ZC_DET_TIME;
|
||||
C4_SET.Bits.C4_AUTO_CAL_TIME = AUTO_CAL_TIME;
|
||||
DRV_write(DRV_CTRL_4, (uint8_t) C4_SET.Byte);
|
||||
DRV_write(DRV_LIB_SELECTION,LIB_SELECTION);
|
||||
//start autocalibration
|
||||
DRV_write(DRV_GO, 0x01);
|
||||
|
||||
/* 0x00 sets DRV2605 out of standby and to use internal trigger
|
||||
* 0x01 sets DRV2605 out of standby and to use external trigger */
|
||||
DRV_write(DRV_MODE,0x00);
|
||||
|
||||
/* 0x06: LRA library */
|
||||
DRV_write(DRV_WAVEFORM_SEQ_1, 0x01);
|
||||
|
||||
/* 0xB9: LRA, 4x brake factor, medium gain, 7.5x back EMF
|
||||
* 0x39: ERM, 4x brake factor, medium gain, 1.365x back EMF */
|
||||
|
||||
/* TODO: setup auto-calibration as part of initiation */
|
||||
|
||||
}
|
||||
|
||||
void DRV_pulse(uint8_t sequence)
|
||||
{
|
||||
DRV_write(DRV_GO, 0x00);
|
||||
DRV_write(DRV_WAVEFORM_SEQ_1, sequence);
|
||||
DRV_write(DRV_GO, 0x01);
|
||||
}
|
394
drivers/haptic/DRV2605L.h
Normal file
394
drivers/haptic/DRV2605L.h
Normal file
@@ -0,0 +1,394 @@
|
||||
/* Copyright 2018 ishtob
|
||||
* Driver for DRV2605L written for QMK
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General 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/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "i2c_master.h"
|
||||
|
||||
/* Initialization settings
|
||||
|
||||
* Feedback Control Settings */
|
||||
#ifndef FB_ERM_LRA
|
||||
#define FB_ERM_LRA 1 /* For ERM:0 or LRA:1*/
|
||||
#endif
|
||||
#ifndef FB_BRAKEFACTOR
|
||||
#define FB_BRAKEFACTOR 3 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */
|
||||
#endif
|
||||
#ifndef FB_LOOPGAIN
|
||||
#define FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */
|
||||
#endif
|
||||
|
||||
#ifndef RATED_VOLTAGE
|
||||
#define RATED_VOLTAGE 2 /* 2v as safe range in case device voltage is not set */
|
||||
#ifndef V_PEAK
|
||||
#define V_PEAK 2.8
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* LRA specific settings */
|
||||
#if FB_ERM_LRA == 1
|
||||
#ifndef V_RMS
|
||||
#define V_RMS 2.0
|
||||
#endif
|
||||
#ifndef V_PEAK
|
||||
#define V_PEAK 2.1
|
||||
#endif
|
||||
#ifndef F_LRA
|
||||
#define F_LRA 205
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Library Selection */
|
||||
#ifndef LIB_SELECTION
|
||||
#if FB_ERM_LRA == 1
|
||||
#define LIB_SELECTION 6 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */
|
||||
#else
|
||||
#define LIB_SELECTION 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Control 1 register settings */
|
||||
#ifndef DRIVE_TIME
|
||||
#define DRIVE_TIME 25
|
||||
#endif
|
||||
#ifndef AC_COUPLE
|
||||
#define AC_COUPLE 0
|
||||
#endif
|
||||
#ifndef STARTUP_BOOST
|
||||
#define STARTUP_BOOST 1
|
||||
#endif
|
||||
|
||||
/* Control 2 Settings */
|
||||
#ifndef BIDIR_INPUT
|
||||
#define BIDIR_INPUT 1
|
||||
#endif
|
||||
#ifndef BRAKE_STAB
|
||||
#define BRAKE_STAB 1 /* Loopgain is reduced when braking is almost complete to improve stability */
|
||||
#endif
|
||||
#ifndef SAMPLE_TIME
|
||||
#define SAMPLE_TIME 3
|
||||
#endif
|
||||
#ifndef BLANKING_TIME
|
||||
#define BLANKING_TIME 1
|
||||
#endif
|
||||
#ifndef IDISS_TIME
|
||||
#define IDISS_TIME 1
|
||||
#endif
|
||||
|
||||
/* Control 3 settings */
|
||||
#ifndef NG_THRESH
|
||||
#define NG_THRESH 2
|
||||
#endif
|
||||
#ifndef ERM_OPEN_LOOP
|
||||
#define ERM_OPEN_LOOP 1
|
||||
#endif
|
||||
#ifndef SUPPLY_COMP_DIS
|
||||
#define SUPPLY_COMP_DIS 0
|
||||
#endif
|
||||
#ifndef DATA_FORMAT_RTO
|
||||
#define DATA_FORMAT_RTO 0
|
||||
#endif
|
||||
#ifndef LRA_DRIVE_MODE
|
||||
#define LRA_DRIVE_MODE 0
|
||||
#endif
|
||||
#ifndef N_PWM_ANALOG
|
||||
#define N_PWM_ANALOG 0
|
||||
#endif
|
||||
#ifndef LRA_OPEN_LOOP
|
||||
#define LRA_OPEN_LOOP 0
|
||||
#endif
|
||||
|
||||
/* Control 4 settings */
|
||||
#ifndef ZC_DET_TIME
|
||||
#define ZC_DET_TIME 0
|
||||
#endif
|
||||
#ifndef AUTO_CAL_TIME
|
||||
#define AUTO_CAL_TIME 3
|
||||
#endif
|
||||
|
||||
/* register defines -------------------------------------------------------- */
|
||||
#define DRV2605L_BASE_ADDRESS 0x5A /* DRV2605L Base address */
|
||||
#define DRV_STATUS 0x00
|
||||
#define DRV_MODE 0x01
|
||||
#define DRV_RTP_INPUT 0x02
|
||||
#define DRV_LIB_SELECTION 0x03
|
||||
#define DRV_WAVEFORM_SEQ_1 0x04
|
||||
#define DRV_WAVEFORM_SEQ_2 0x05
|
||||
#define DRV_WAVEFORM_SEQ_3 0x06
|
||||
#define DRV_WAVEFORM_SEQ_4 0x07
|
||||
#define DRV_WAVEFORM_SEQ_5 0x08
|
||||
#define DRV_WAVEFORM_SEQ_6 0x09
|
||||
#define DRV_WAVEFORM_SEQ_7 0x0A
|
||||
#define DRV_WAVEFORM_SEQ_8 0x0B
|
||||
#define DRV_GO 0x0C
|
||||
#define DRV_OVERDRIVE_TIME_OFFSET 0x0D
|
||||
#define DRV_SUSTAIN_TIME_OFFSET_P 0x0E
|
||||
#define DRV_SUSTAIN_TIME_OFFSET_N 0x0F
|
||||
#define DRV_BRAKE_TIME_OFFSET 0x10
|
||||
#define DRV_AUDIO_2_VIBE_CTRL 0x11
|
||||
#define DRV_AUDIO_2_VIBE_MIN_IN 0x12
|
||||
#define DRV_AUDIO_2_VIBE_MAX_IN 0x13
|
||||
#define DRV_AUDIO_2_VIBE_MIN_OUTDRV 0x14
|
||||
#define DRV_AUDIO_2_VIBE_MAX_OUTDRV 0x15
|
||||
#define DRV_RATED_VOLT 0x16
|
||||
#define DRV_OVERDRIVE_CLAMP_VOLT 0x17
|
||||
#define DRV_AUTO_CALIB_COMP_RESULT 0x18
|
||||
#define DRV_AUTO_CALIB_BEMF_RESULT 0x19
|
||||
#define DRV_FEEDBACK_CTRL 0x1A
|
||||
#define DRV_CTRL_1 0x1B
|
||||
#define DRV_CTRL_2 0x1C
|
||||
#define DRV_CTRL_3 0x1D
|
||||
#define DRV_CTRL_4 0x1E
|
||||
#define DRV_CTRL_5 0x1F
|
||||
#define DRV_OPEN_LOOP_PERIOD 0x20
|
||||
#define DRV_VBAT_VOLT_MONITOR 0x21
|
||||
#define DRV_LRA_RESONANCE_PERIOD 0x22
|
||||
|
||||
void DRV_init(void);
|
||||
void DRV_write(const uint8_t drv_register, const uint8_t settings);
|
||||
uint8_t DRV_read(const uint8_t regaddress);
|
||||
void DRV_pulse(const uint8_t sequence);
|
||||
|
||||
|
||||
typedef enum DRV_EFFECT{
|
||||
clear_sequence = 0,
|
||||
strong_click = 1,
|
||||
strong_click_60 = 2,
|
||||
strong_click_30 = 3,
|
||||
sharp_click = 4,
|
||||
sharp_click_60 = 5,
|
||||
sharp_click_30 = 6,
|
||||
soft_bump = 7,
|
||||
soft_bump_60 = 8,
|
||||
soft_bump_30 = 9,
|
||||
dbl_click = 10,
|
||||
dbl_click_60 = 11,
|
||||
trp_click = 12,
|
||||
soft_fuzz = 13,
|
||||
strong_buzz = 14,
|
||||
alert_750ms = 15,
|
||||
alert_1000ms = 16,
|
||||
strong_click1 = 17,
|
||||
strong_click2_80 = 18,
|
||||
strong_click3_60 = 19,
|
||||
strong_click4_30 = 20,
|
||||
medium_click1 = 21,
|
||||
medium_click2_80 = 22,
|
||||
medium_click3_60 = 23,
|
||||
sharp_tick1 = 24,
|
||||
sharp_tick2_80 = 25,
|
||||
sharp_tick3_60 = 26,
|
||||
sh_dblclick_str = 27,
|
||||
sh_dblclick_str_80 = 28,
|
||||
sh_dblclick_str_60 = 29,
|
||||
sh_dblclick_str_30 = 30,
|
||||
sh_dblclick_med = 31,
|
||||
sh_dblclick_med_80 = 32,
|
||||
sh_dblclick_med_60 = 33,
|
||||
sh_dblsharp_tick = 34,
|
||||
sh_dblsharp_tick_80 = 35,
|
||||
sh_dblsharp_tick_60 = 36,
|
||||
lg_dblclick_str = 37,
|
||||
lg_dblclick_str_80 = 38,
|
||||
lg_dblclick_str_60 = 39,
|
||||
lg_dblclick_str_30 = 40,
|
||||
lg_dblclick_med = 41,
|
||||
lg_dblclick_med_80 = 42,
|
||||
lg_dblclick_med_60 = 43,
|
||||
lg_dblsharp_tick = 44,
|
||||
lg_dblsharp_tick_80 = 45,
|
||||
lg_dblsharp_tick_60 = 46,
|
||||
buzz = 47,
|
||||
buzz_80 = 48,
|
||||
buzz_60 = 49,
|
||||
buzz_40 = 50,
|
||||
buzz_20 = 51,
|
||||
pulsing_strong = 52,
|
||||
pulsing_strong_80 = 53,
|
||||
pulsing_medium = 54,
|
||||
pulsing_medium_80 = 55,
|
||||
pulsing_sharp = 56,
|
||||
pulsing_sharp_80 = 57,
|
||||
transition_click = 58,
|
||||
transition_click_80 = 59,
|
||||
transition_click_60 = 60,
|
||||
transition_click_40 = 61,
|
||||
transition_click_20 = 62,
|
||||
transition_click_10 = 63,
|
||||
transition_hum = 64,
|
||||
transition_hum_80 = 65,
|
||||
transition_hum_60 = 66,
|
||||
transition_hum_40 = 67,
|
||||
transition_hum_20 = 68,
|
||||
transition_hum_10 = 69,
|
||||
transition_rampdown_long_smooth1 = 70,
|
||||
transition_rampdown_long_smooth2 = 71,
|
||||
transition_rampdown_med_smooth1 = 72,
|
||||
transition_rampdown_med_smooth2 = 73,
|
||||
transition_rampdown_short_smooth1 = 74,
|
||||
transition_rampdown_short_smooth2 = 75,
|
||||
transition_rampdown_long_sharp1 = 76,
|
||||
transition_rampdown_long_sharp2 = 77,
|
||||
transition_rampdown_med_sharp1 = 78,
|
||||
transition_rampdown_med_sharp2 = 79,
|
||||
transition_rampdown_short_sharp1 = 80,
|
||||
transition_rampdown_short_sharp2 = 81,
|
||||
transition_rampup_long_smooth1 = 82,
|
||||
transition_rampup_long_smooth2 = 83,
|
||||
transition_rampup_med_smooth1 = 84,
|
||||
transition_rampup_med_smooth2 = 85,
|
||||
transition_rampup_short_smooth1 = 86,
|
||||
transition_rampup_short_smooth2 = 87,
|
||||
transition_rampup_long_sharp1 = 88,
|
||||
transition_rampup_long_sharp2 = 89,
|
||||
transition_rampup_med_sharp1 = 90,
|
||||
transition_rampup_med_sharp2 = 91,
|
||||
transition_rampup_short_sharp1 = 92,
|
||||
transition_rampup_short_sharp2 = 93,
|
||||
transition_rampdown_long_smooth1_50 = 94,
|
||||
transition_rampdown_long_smooth2_50 = 95,
|
||||
transition_rampdown_med_smooth1_50 = 96,
|
||||
transition_rampdown_med_smooth2_50 = 97,
|
||||
transition_rampdown_short_smooth1_50 = 98,
|
||||
transition_rampdown_short_smooth2_50 = 99,
|
||||
transition_rampdown_long_sharp1_50 = 100,
|
||||
transition_rampdown_long_sharp2_50 = 101,
|
||||
transition_rampdown_med_sharp1_50 = 102,
|
||||
transition_rampdown_med_sharp2_50 = 103,
|
||||
transition_rampdown_short_sharp1_50 = 104,
|
||||
transition_rampdown_short_sharp2_50 = 105,
|
||||
transition_rampup_long_smooth1_50 = 106,
|
||||
transition_rampup_long_smooth2_50 = 107,
|
||||
transition_rampup_med_smooth1_50 = 108,
|
||||
transition_rampup_med_smooth2_50 = 109,
|
||||
transition_rampup_short_smooth1_50 = 110,
|
||||
transition_rampup_short_smooth2_50 = 111,
|
||||
transition_rampup_long_sharp1_50 = 112,
|
||||
transition_rampup_long_sharp2_50 = 113,
|
||||
transition_rampup_med_sharp1_50 = 114,
|
||||
transition_rampup_med_sharp2_50 = 115,
|
||||
transition_rampup_short_sharp1_50 = 116,
|
||||
transition_rampup_short_sharp2_50 = 117,
|
||||
long_buzz_for_programmatic_stopping = 118,
|
||||
smooth_hum1_50 = 119,
|
||||
smooth_hum2_40 = 120,
|
||||
smooth_hum3_30 = 121,
|
||||
smooth_hum4_20 = 122,
|
||||
smooth_hum5_10 = 123,
|
||||
} DRV_EFFECT;
|
||||
|
||||
/* Register bit array unions */
|
||||
|
||||
typedef union DRVREG_STATUS { /* register 0x00 */
|
||||
uint8_t Byte;
|
||||
struct {
|
||||
uint8_t OC_DETECT :1; /* set to 1 when overcurrent event is detected */
|
||||
uint8_t OVER_TEMP :1; /* set to 1 when device exceeds temp threshold */
|
||||
uint8_t FB_STS :1; /* set to 1 when feedback controller has timed out */
|
||||
/* auto-calibration routine and diagnostic result
|
||||
* result | auto-calibation | diagnostic |
|
||||
* 0 | passed | actuator func normal |
|
||||
* 1 | failed | actuator func fault* |
|
||||
* * actuator is not present or is shorted, timing out, or giving out–of-range back-EMF */
|
||||
uint8_t DIAG_RESULT :1;
|
||||
uint8_t :1;
|
||||
uint8_t DEVICE_ID :3; /* Device IDs 3: DRV2605 4: DRV2604 5: DRV2604L 6: DRV2605L */
|
||||
} Bits;
|
||||
} DRVREG_STATUS;
|
||||
|
||||
typedef union DRVREG_MODE { /* register 0x01 */
|
||||
uint8_t Byte;
|
||||
struct {
|
||||
uint8_t MODE :3; /* Mode setting */
|
||||
uint8_t :3;
|
||||
uint8_t STANDBY :1; /* 0:standby 1:ready */
|
||||
} Bits;
|
||||
} DRVREG_MODE;
|
||||
|
||||
typedef union DRVREG_WAIT {
|
||||
uint8_t Byte;
|
||||
struct {
|
||||
uint8_t WAIT_MODE :1; /* Set to 1 to interpret as wait for next 7 bits x10ms */
|
||||
uint8_t WAIT_TIME :7;
|
||||
} Bits;
|
||||
} DRVREG_WAIT;
|
||||
|
||||
typedef union DRVREG_FBR{ /* register 0x1A */
|
||||
uint8_t Byte;
|
||||
struct {
|
||||
uint8_t BEMF_GAIN :2;
|
||||
uint8_t LOOP_GAIN :2;
|
||||
uint8_t BRAKE_FACTOR :3;
|
||||
uint8_t ERM_LRA :1;
|
||||
} Bits;
|
||||
} DRVREG_FBR;
|
||||
|
||||
typedef union DRVREG_CTRL1{ /* register 0x1B */
|
||||
uint8_t Byte;
|
||||
struct {
|
||||
uint8_t C1_DRIVE_TIME :5;
|
||||
uint8_t C1_AC_COUPLE :1;
|
||||
uint8_t :1;
|
||||
uint8_t C1_STARTUP_BOOST :1;
|
||||
} Bits;
|
||||
} DRVREG_CTRL1;
|
||||
|
||||
typedef union DRVREG_CTRL2{ /* register 0x1C */
|
||||
uint8_t Byte;
|
||||
struct {
|
||||
uint8_t C2_IDISS_TIME :2;
|
||||
uint8_t C2_BLANKING_TIME :2;
|
||||
uint8_t C2_SAMPLE_TIME :2;
|
||||
uint8_t C2_BRAKE_STAB :1;
|
||||
uint8_t C2_BIDIR_INPUT :1;
|
||||
} Bits;
|
||||
} DRVREG_CTRL2;
|
||||
|
||||
typedef union DRVREG_CTRL3{ /* register 0x1D */
|
||||
uint8_t Byte;
|
||||
struct {
|
||||
uint8_t C3_LRA_OPEN_LOOP :1;
|
||||
uint8_t C3_N_PWM_ANALOG :1;
|
||||
uint8_t C3_LRA_DRIVE_MODE :1;
|
||||
uint8_t C3_DATA_FORMAT_RTO :1;
|
||||
uint8_t C3_SUPPLY_COMP_DIS :1;
|
||||
uint8_t C3_ERM_OPEN_LOOP :1;
|
||||
uint8_t C3_NG_THRESH :2;
|
||||
} Bits;
|
||||
} DRVREG_CTRL3;
|
||||
|
||||
typedef union DRVREG_CTRL4{ /* register 0x1E */
|
||||
uint8_t Byte;
|
||||
struct {
|
||||
uint8_t C4_OTP_PROGRAM :1;
|
||||
uint8_t :1;
|
||||
uint8_t C4_OTP_STATUS :1;
|
||||
uint8_t :1;
|
||||
uint8_t C4_AUTO_CAL_TIME :2;
|
||||
uint8_t C4_ZC_DET_TIME :2;
|
||||
} Bits;
|
||||
} DRVREG_CTRL4;
|
||||
|
||||
typedef union DRVREG_CTRL5{ /* register 0x1F */
|
||||
uint8_t Byte;
|
||||
struct {
|
||||
uint8_t C5_IDISS_TIME :2;
|
||||
uint8_t C5_BLANKING_TIME :2;
|
||||
uint8_t C5_PLAYBACK_INTERVAL :1;
|
||||
uint8_t C5_LRA_AUTO_OPEN_LOOP :1;
|
||||
uint8_t C5_AUTO_OL_CNT :2;
|
||||
} Bits;
|
||||
} DRVREG_CTRL5;
|
@@ -24,10 +24,10 @@
|
||||
#include "wait.h"
|
||||
#endif
|
||||
|
||||
#include "is31fl3733.h"
|
||||
#include <string.h>
|
||||
#include "i2c_master.h"
|
||||
#include "progmem.h"
|
||||
#include "rgb_matrix.h"
|
||||
|
||||
// This is a 7-bit address, that gets left-shifted and bit 0
|
||||
// set to 0 for write, 1 for read (as per I2C protocol)
|
||||
|
691
drivers/qwiic/micro_oled.c
Normal file
691
drivers/qwiic/micro_oled.c
Normal file
@@ -0,0 +1,691 @@
|
||||
/* Jim Lindblom @ SparkFun Electronics
|
||||
* October 26, 2014
|
||||
* https://github.com/sparkfun/Micro_OLED_Breakout/tree/master/Firmware/Arduino/libraries/SFE_MicroOLED
|
||||
*
|
||||
* Modified by:
|
||||
* Emil Varughese @ Edwin Robotics Pvt. Ltd.
|
||||
* July 27, 2015
|
||||
* https://github.com/emil01/SparkFun_Micro_OLED_Arduino_Library/
|
||||
*
|
||||
* This code was heavily based around the MicroView library, written by GeekAmmo
|
||||
* (https://github.com/geekammo/MicroView-Arduino-Library).
|
||||
*
|
||||
* Adapted for QMK by:
|
||||
* Jack Humbert <jack.humb@gmail.com>
|
||||
* October 11, 2018
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General 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 "micro_oled.h"
|
||||
#include <stdlib.h>
|
||||
#include "util/font5x7.h"
|
||||
#include "util/font8x16.h"
|
||||
#include "string.h"
|
||||
|
||||
#define TOTALFONTS 2
|
||||
const unsigned char * fonts_pointer[]= { font5x7, font8x16 };
|
||||
|
||||
uint8_t foreColor,drawMode,fontWidth, fontHeight, fontType, fontStartChar, fontTotalChar, cursorX, cursorY;
|
||||
uint16_t fontMapWidth;
|
||||
|
||||
#define _BV(x) (1 << (x))
|
||||
#define swap(a, b) { uint8_t t = a; a = b; b = t; }
|
||||
|
||||
uint8_t micro_oled_transfer_buffer[20];
|
||||
static uint8_t micro_oled_screen_current[LCDWIDTH*LCDWIDTH/8] = { 0 };
|
||||
|
||||
/* LCD Memory organised in 64 horizontal pixel and 6 rows of byte
|
||||
B B .............B -----
|
||||
y y .............y \
|
||||
t t .............t \
|
||||
e e .............e \
|
||||
0 1 .............63 \
|
||||
\
|
||||
D0 D0.............D0 \
|
||||
D1 D1.............D1 / ROW 0
|
||||
D2 D2.............D2 /
|
||||
D3 D3.............D3 /
|
||||
D4 D4.............D4 /
|
||||
D5 D5.............D5 /
|
||||
D6 D6.............D6 /
|
||||
D7 D7.............D7 ----
|
||||
*/
|
||||
|
||||
#if LCDWIDTH == 64
|
||||
#if LCDWIDTH == 48
|
||||
static uint8_t micro_oled_screen_buffer[] = {
|
||||
// QMK Logo - generated at http://www.majer.ch/lcd/adf_bitmap.php
|
||||
//64x48 image
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0xF0, 0xF0, 0x00, 0x00, 0x00, 0xF0, 0xF0, 0x00, 0x00,
|
||||
0x00, 0xF0, 0xF0, 0x00, 0x00, 0x00, 0xF0, 0xF0, 0x00, 0x00,
|
||||
0x00, 0xF0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x60,
|
||||
0xF8, 0xFE, 0xFE, 0xFF, 0xFF, 0xFF, 0x1F, 0x1F, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x1F, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x1F, 0xFF, 0xFF, 0xFF, 0xFE,
|
||||
0xFE, 0xF8, 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x8C, 0x8C, 0x8C, 0x8C, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00,
|
||||
0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8C, 0x8C, 0x8C, 0x8C,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x31, 0x31, 0x31, 0x31, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xF8, 0xF1, 0xE3, 0xE7, 0xCF,
|
||||
0xCF, 0xCF, 0xCF, 0x00, 0x00, 0xCF, 0xCF, 0xCF, 0xC7, 0xE7,
|
||||
0xE3, 0xF1, 0xF8, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0x31, 0x31, 0x31, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06,
|
||||
0x06, 0x06, 0x1F, 0x7F, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xF8, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0x7F, 0x7F, 0x1F, 0x06, 0x06, 0x06, 0x06, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00,
|
||||
0x00, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00,
|
||||
0x00, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
#endif
|
||||
#elif LCDWIDTH == 128
|
||||
#if LCDHEIGHT == 32
|
||||
static uint8_t micro_oled_screen_buffer[LCDWIDTH*LCDWIDTH/8] = {
|
||||
//128x32 qmk image
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x80, 0xC0, 0xE0, 0xE0, 0xFC, 0xFC, 0xE0, 0xFC, 0xFC,
|
||||
0xE0, 0xF0, 0xFC, 0xE0, 0xE0, 0xFC, 0xE0, 0xE0, 0xFC, 0xFC,
|
||||
0xE0, 0xE0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0xF0, 0x10, 0x10, 0x30, 0xE0, 0x00, 0x00,
|
||||
0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00,
|
||||
0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x80,
|
||||
0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x00, 0x00,
|
||||
0x80, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80,
|
||||
0x80, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0xB2, 0xB2, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x03, 0xFF, 0xFF, 0xFF, 0x03,
|
||||
0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x03, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xB7, 0xB2, 0xB2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x1F, 0x02, 0x02, 0x03, 0x01, 0x00, 0x06, 0x1F, 0x10,
|
||||
0x10, 0x10, 0x1F, 0x06, 0x00, 0x03, 0x1E, 0x18, 0x0F, 0x01,
|
||||
0x0F, 0x18, 0x1E, 0x01, 0x00, 0x0F, 0x1F, 0x12, 0x02, 0x12,
|
||||
0x13, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x0E, 0x1F, 0x12,
|
||||
0x02, 0x12, 0x13, 0x00, 0x00, 0x1F, 0x10, 0x10, 0x10, 0x1F,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x48, 0x4D, 0x4D, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFE, 0xF8, 0xF9, 0xF3, 0xF3, 0xC0, 0x80, 0xF3,
|
||||
0xF3, 0xF3, 0xF9, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xED,
|
||||
0x4D, 0x4D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0xFE, 0x20, 0x10, 0x10, 0xE0, 0xC0, 0x00, 0x70, 0xC0,
|
||||
0x00, 0x80, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x0C,
|
||||
0x04, 0x04, 0x04, 0x04, 0x1C, 0xF0, 0x00, 0x00, 0xFC, 0x0C,
|
||||
0x38, 0xE0, 0x00, 0x00, 0xC0, 0x38, 0x0C, 0xFC, 0x00, 0x00,
|
||||
0xFC, 0xFC, 0x60, 0x90, 0x0C, 0x04, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, 0x07, 0x3F,
|
||||
0x3F, 0x07, 0x3F, 0x3F, 0x07, 0x0F, 0x3F, 0x07, 0x07, 0x3F,
|
||||
0x07, 0x07, 0x3F, 0x3F, 0x07, 0x07, 0x03, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07,
|
||||
0x06, 0x04, 0x04, 0x07, 0x01, 0x00, 0x00, 0x13, 0x1E, 0x03,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x06, 0x04, 0x04,
|
||||
0x04, 0x04, 0x07, 0x0D, 0x08, 0x00, 0x07, 0x00, 0x00, 0x01,
|
||||
0x07, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x07,
|
||||
0x00, 0x01, 0x03, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00
|
||||
};
|
||||
#elif LCDHEIGHT == 64
|
||||
static uint8_t micro_oled_screen_buffer[LCDWIDTH*LCDWIDTH/8] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xC0,
|
||||
0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00,
|
||||
0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xC0, 0xC0, 0xC0, 0xC0, 0xF8, 0xFC, 0xFC, 0xFE, 0xFE, 0xFF,
|
||||
0x7F, 0x7E, 0xFE, 0xFF, 0xFF, 0xFE, 0xFE, 0x7F, 0x7F, 0xFE,
|
||||
0xFE, 0xFF, 0xFF, 0xFE, 0x7E, 0x7F, 0xFF, 0xFE, 0xFE, 0xFC,
|
||||
0xFC, 0xF8, 0xC0, 0xC0, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x88, 0x88, 0x88, 0xDD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xDD, 0x88, 0x88, 0x88, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x99, 0x99, 0x99, 0x99, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFE, 0xF8, 0xF0, 0xF3, 0xF3, 0xE7, 0xE7, 0x00,
|
||||
0x00, 0xE7, 0xE7, 0xF3, 0xF3, 0xF0, 0xF8, 0xFE, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0x99, 0x99, 0x99, 0x99, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x0F, 0x1F, 0x3F,
|
||||
0x3F, 0x3F, 0xFF, 0xFF, 0x3F, 0x3F, 0xFF, 0xFF, 0x3F, 0x3F,
|
||||
0xFF, 0xFF, 0x3F, 0x3F, 0xFF, 0xFF, 0x3F, 0x3F, 0xFF, 0xFF,
|
||||
0x3F, 0x3F, 0x3F, 0x1F, 0x0F, 0x01, 0x01, 0x01, 0x01, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x03, 0x01, 0x00, 0x00, 0x03, 0x01, 0x00,
|
||||
0x80, 0x03, 0x03, 0x00, 0x00, 0x01, 0x03, 0x00, 0x80, 0x01,
|
||||
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0xFF, 0x11, 0x11, 0x11, 0x0E, 0x00, 0x70,
|
||||
0x88, 0x04, 0x04, 0x04, 0xF8, 0x00, 0x00, 0x3C, 0xE0, 0xC0,
|
||||
0x38, 0x1C, 0xE0, 0x80, 0x70, 0x0C, 0x00, 0xF8, 0xAC, 0x24,
|
||||
0x24, 0x3C, 0x30, 0x00, 0x00, 0xFC, 0x0C, 0x04, 0x00, 0xF8,
|
||||
0xAC, 0x24, 0x24, 0x2C, 0x30, 0x00, 0x70, 0xDC, 0x04, 0x04,
|
||||
0x88, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
|
||||
0x8C, 0x04, 0x04, 0xF8, 0x00, 0x04, 0x3C, 0xE0, 0x80, 0xF0,
|
||||
0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x83, 0x01, 0x01,
|
||||
0x01, 0x81, 0xFE, 0x3C, 0x00, 0x00, 0xFF, 0x03, 0x0E, 0x70,
|
||||
0xC0, 0xE0, 0x38, 0x06, 0x03, 0xFF, 0x00, 0x00, 0xFF, 0x18,
|
||||
0x38, 0x66, 0xC3, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01,
|
||||
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01,
|
||||
0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01,
|
||||
0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x04, 0x03,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
|
||||
0x01, 0x01, 0x01, 0x01, 0x03, 0x02, 0x00, 0x01, 0x00, 0x00,
|
||||
0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01,
|
||||
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
//TODO: generate bitmap of QMK logo here
|
||||
#endif
|
||||
#else
|
||||
//catchall for custom screen szies
|
||||
static uint8_t micro_oled_screen_buffer[LCDWIDTH*LCDWIDTH/8] = {0};
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
void micro_oled_init(void) {
|
||||
|
||||
i2c_init();
|
||||
i2c_start(I2C_ADDRESS_SA0_1);
|
||||
|
||||
// Display Init sequence for 64x48 OLED module
|
||||
send_command(DISPLAYOFF); // 0xAE
|
||||
|
||||
send_command(SETDISPLAYCLOCKDIV); // 0xD5
|
||||
send_command(0x80); // the suggested ratio 0x80
|
||||
|
||||
send_command(SETMULTIPLEX); // 0xA8
|
||||
send_command(LCDHEIGHT - 1);
|
||||
|
||||
send_command(SETDISPLAYOFFSET); // 0xD3
|
||||
send_command(0x00); // no offset
|
||||
|
||||
send_command(SETSTARTLINE | 0x00); // line #0
|
||||
|
||||
send_command(CHARGEPUMP); // enable charge pump
|
||||
send_command(0x14);
|
||||
|
||||
send_command(NORMALDISPLAY); // 0xA6
|
||||
send_command(DISPLAYALLONRESUME); // 0xA4
|
||||
|
||||
//display at regular orientation
|
||||
send_command(SEGREMAP | 0x1);
|
||||
send_command(COMSCANDEC);
|
||||
|
||||
//rotate display 180
|
||||
#ifdef micro_oled_rotate_180
|
||||
send_command(SEGREMAP);
|
||||
send_command(COMSCANINC);
|
||||
#endif
|
||||
|
||||
send_command(MEMORYMODE);
|
||||
send_command(0x10);
|
||||
|
||||
send_command(SETCOMPINS); // 0xDA
|
||||
if (LCDHEIGHT > 32) {
|
||||
send_command(0x12);
|
||||
} else {
|
||||
send_command(0x02);
|
||||
}
|
||||
send_command(SETCONTRAST); // 0x81
|
||||
send_command(0x8F);
|
||||
|
||||
send_command(SETPRECHARGE); // 0xd9
|
||||
send_command(0xF1);
|
||||
|
||||
send_command(SETVCOMDESELECT); // 0xDB
|
||||
send_command(0x40);
|
||||
|
||||
send_command(DISPLAYON); //--turn on oled panel
|
||||
clear_screen(); // Erase hardware memory inside the OLED controller to avoid random data in memory.
|
||||
send_buffer();
|
||||
}
|
||||
|
||||
void send_command(uint8_t command) {
|
||||
micro_oled_transfer_buffer[0] = I2C_COMMAND;
|
||||
micro_oled_transfer_buffer[1] = command;
|
||||
i2c_transmit(I2C_ADDRESS_SA0_1 << 1, micro_oled_transfer_buffer, 2, 100);
|
||||
}
|
||||
|
||||
void send_data(uint8_t data) {
|
||||
micro_oled_transfer_buffer[0] = I2C_DATA;
|
||||
micro_oled_transfer_buffer[1] = data;
|
||||
i2c_transmit(I2C_ADDRESS_SA0_1 << 1, micro_oled_transfer_buffer, 2, 100);
|
||||
}
|
||||
|
||||
/** \brief Set SSD1306 page address.
|
||||
Send page address command and address to the SSD1306 OLED controller.
|
||||
*/
|
||||
void set_page_address(uint8_t address) {
|
||||
address = (0xB0 | address);
|
||||
send_command(address);
|
||||
}
|
||||
|
||||
/** \brief Set SSD1306 column address.
|
||||
Send column address command and address to the SSD1306 OLED controller.
|
||||
*/
|
||||
void set_column_address(uint8_t address) {
|
||||
send_command( ( 0x10 | (address >> 4) ) + ((128 - LCDWIDTH) >> 8) );
|
||||
send_command( 0x0F & address );
|
||||
}
|
||||
|
||||
/** \brief Clear SSD1306's memory.
|
||||
To clear GDRAM inside the LCD controller.
|
||||
*/
|
||||
void clear_screen(void) {
|
||||
for (int i=0;i<8; i++) {
|
||||
set_page_address(i);
|
||||
set_column_address(0);
|
||||
for (int j=0; j<0x80; j++) {
|
||||
send_data(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** \brief Clear SSD1306's memory.
|
||||
To clear GDRAM inside the LCD controller.
|
||||
*/
|
||||
void clear_buffer(void) {
|
||||
//384
|
||||
memset(micro_oled_screen_buffer, 0, LCDWIDTH*LCDWIDTH/8);
|
||||
}
|
||||
|
||||
/** \brief Invert display.
|
||||
The PIXEL_ON color of the display will turn to PIXEL_OFF and the PIXEL_OFF will turn to PIXEL_ON.
|
||||
*/
|
||||
void invert_screen(bool invert) {
|
||||
if (invert) {
|
||||
send_command(INVERTDISPLAY);
|
||||
} else {
|
||||
send_command(NORMALDISPLAY);
|
||||
}
|
||||
}
|
||||
|
||||
/** \brief Set contrast.
|
||||
OLED contract value from 0 to 255. Note: Contrast level is not very obvious.
|
||||
*/
|
||||
void set_contrast(uint8_t contrast) {
|
||||
send_command(SETCONTRAST); // 0x81
|
||||
send_command(contrast);
|
||||
}
|
||||
|
||||
/** \brief Transfer display buffer.
|
||||
Sends the updated buffer to the controller - the current status is checked before to save i2c exectution time
|
||||
*/
|
||||
void send_buffer(void) {
|
||||
uint8_t i, j;
|
||||
|
||||
uint8_t page_addr = 0xFF;
|
||||
for (i = 0; i < LCDHEIGHT/8; i++) {
|
||||
uint8_t col_addr = 0xFF;
|
||||
for (j = 0; j < LCDWIDTH; j++) {
|
||||
if (micro_oled_screen_buffer[i*LCDWIDTH+j] != micro_oled_screen_current[i*LCDWIDTH+j]) {
|
||||
if (page_addr != i) {
|
||||
set_page_address(i);
|
||||
}
|
||||
if (col_addr != j) {
|
||||
set_column_address(j);
|
||||
}
|
||||
send_data(micro_oled_screen_buffer[i*LCDWIDTH+j]);
|
||||
micro_oled_screen_current[i*LCDWIDTH+j] = micro_oled_screen_buffer[i*LCDWIDTH+j];
|
||||
col_addr = j + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** \brief Draw pixel with color and mode.
|
||||
Draw color pixel in the screen buffer's x,y position with NORM or XOR draw mode.
|
||||
*/
|
||||
void draw_pixel(uint8_t x, uint8_t y, uint8_t color, uint8_t mode) {
|
||||
if ((x<0) || (x>=LCDWIDTH) || (y<0) || (y>=LCDHEIGHT))
|
||||
return;
|
||||
|
||||
if (mode == XOR) {
|
||||
if (color == PIXEL_ON)
|
||||
micro_oled_screen_buffer[x + (y/8)*LCDWIDTH] ^= _BV((y%8));
|
||||
} else {
|
||||
if (color == PIXEL_ON)
|
||||
micro_oled_screen_buffer[x + (y/8)*LCDWIDTH] |= _BV((y%8));
|
||||
else
|
||||
micro_oled_screen_buffer[x + (y/8)*LCDWIDTH] &= ~_BV((y%8));
|
||||
}
|
||||
}
|
||||
|
||||
/** \brief Draw line with color and mode.
|
||||
Draw line using color and mode from x0,y0 to x1,y1 of the screen buffer.
|
||||
*/
|
||||
void draw_line(uint8_t x0, uint8_t y0, uint8_t x1, uint8_t y1, uint8_t color, uint8_t mode) {
|
||||
uint8_t steep = abs(y1 - y0) > abs(x1 - x0);
|
||||
if (steep) {
|
||||
swap(x0, y0);
|
||||
swap(x1, y1);
|
||||
}
|
||||
|
||||
if (x0 > x1) {
|
||||
swap(x0, x1);
|
||||
swap(y0, y1);
|
||||
}
|
||||
|
||||
uint8_t dx, dy;
|
||||
dx = x1 - x0;
|
||||
dy = abs(y1 - y0);
|
||||
|
||||
int8_t err = dx / 2;
|
||||
int8_t ystep;
|
||||
|
||||
if (y0 < y1) {
|
||||
ystep = 1;
|
||||
} else {
|
||||
ystep = -1;}
|
||||
|
||||
for (; x0<x1; x0++) {
|
||||
if (steep) {
|
||||
draw_pixel(y0, x0, color, mode);
|
||||
} else {
|
||||
draw_pixel(x0, y0, color, mode);
|
||||
}
|
||||
err -= dy;
|
||||
if (err < 0) {
|
||||
y0 += ystep;
|
||||
err += dx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** \brief Draw horizontal line with color and mode.
|
||||
Draw horizontal line using color and mode from x,y to x+width,y of the screen buffer.
|
||||
*/
|
||||
void draw_line_hori(uint8_t x, uint8_t y, uint8_t width, uint8_t color, uint8_t mode) {
|
||||
draw_line(x,y,x+width,y,color,mode);
|
||||
}
|
||||
|
||||
/** \brief Draw vertical line.
|
||||
Draw vertical line using current fore color and current draw mode from x,y to x,y+height of the screen buffer.
|
||||
*/
|
||||
void draw_line_vert(uint8_t x, uint8_t y, uint8_t height, bool color, uint8_t mode) {
|
||||
draw_line(x,y,x,y+height,color,mode);
|
||||
}
|
||||
|
||||
/** \brief Draw rectangle with color and mode.
|
||||
Draw rectangle using color and mode from x,y to x+width,y+height of the screen buffer.
|
||||
*/
|
||||
void draw_rect(uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint8_t color, uint8_t mode) {
|
||||
uint8_t tempHeight;
|
||||
|
||||
draw_line_hori(x,y, width, color, mode);
|
||||
draw_line_hori(x,y+height-1, width, color, mode);
|
||||
|
||||
tempHeight=height-2;
|
||||
|
||||
// skip drawing vertical lines to avoid overlapping of pixel that will
|
||||
// affect XOR plot if no pixel in between horizontal lines
|
||||
if (tempHeight<1) return;
|
||||
|
||||
draw_line_vert(x,y+1, tempHeight, color, mode);
|
||||
draw_line_vert(x+width-1, y+1, tempHeight, color, mode);
|
||||
}
|
||||
|
||||
/** \brief Draw rectangle with color and mode.
|
||||
Draw rectangle using color and mode from x,y to x+width,y+height of the screen buffer.
|
||||
*/
|
||||
void draw_rect_soft(uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint8_t color, uint8_t mode) {
|
||||
uint8_t tempHeight;
|
||||
|
||||
draw_line_hori(x+1,y, width-2, color, mode);
|
||||
draw_line_hori(x+1,y+height-1, width-2, color, mode);
|
||||
|
||||
tempHeight=height-2;
|
||||
|
||||
// skip drawing vertical lines to avoid overlapping of pixel that will
|
||||
// affect XOR plot if no pixel in between horizontal lines
|
||||
if (tempHeight<1) return;
|
||||
|
||||
draw_line_vert(x,y+1, tempHeight, color, mode);
|
||||
draw_line_vert(x+width-1, y+1, tempHeight, color, mode);
|
||||
}
|
||||
|
||||
/** \brief Draw filled rectangle with color and mode.
|
||||
Draw filled rectangle using color and mode from x,y to x+width,y+height of the screen buffer.
|
||||
*/
|
||||
void draw_rect_filled(uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint8_t color, uint8_t mode) {
|
||||
// TODO - need to optimise the memory map draw so that this function will not call pixel one by one
|
||||
for (int i=x; i<x+width;i++) {
|
||||
draw_line_vert(i,y, height, color, mode);
|
||||
}
|
||||
}
|
||||
|
||||
/** \brief Draw filled rectangle with color and mode.
|
||||
Draw filled rectangle using color and mode from x,y to x+width,y+height of the screen buffer.
|
||||
*/
|
||||
void draw_rect_filled_soft(uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint8_t color, uint8_t mode) {
|
||||
// TODO - need to optimise the memory map draw so that this function will not call pixel one by one
|
||||
for (int i=x; i<x+width;i++) {
|
||||
if (i == x || i == (x + width - 1))
|
||||
draw_line_vert(i, y+1, height-2, color, mode);
|
||||
else
|
||||
draw_line_vert(i, y, height, color, mode);
|
||||
}
|
||||
}
|
||||
|
||||
/** \brief Draw character with color and mode.
|
||||
Draw character c using color and draw mode at x,y.
|
||||
*/
|
||||
void draw_char(uint8_t x, uint8_t y, uint8_t c, uint8_t color, uint8_t mode, uint8_t font) {
|
||||
// TODO - New routine to take font of any height, at the moment limited to font height in multiple of 8 pixels
|
||||
|
||||
uint8_t rowsToDraw,row, tempC;
|
||||
uint8_t i,j,temp;
|
||||
uint16_t charPerBitmapRow,charColPositionOnBitmap,charRowPositionOnBitmap,charBitmapStartPosition;
|
||||
|
||||
if ((font>=TOTALFONTS) || (font<0))
|
||||
return;
|
||||
|
||||
uint8_t fontType = font;
|
||||
uint8_t fontWidth = pgm_read_byte(fonts_pointer[fontType]+0);
|
||||
uint8_t fontHeight = pgm_read_byte(fonts_pointer[fontType]+1);
|
||||
uint8_t fontStartChar = pgm_read_byte(fonts_pointer[fontType]+2);
|
||||
uint8_t fontTotalChar = pgm_read_byte(fonts_pointer[fontType]+3);
|
||||
uint16_t fontMapWidth = (pgm_read_byte(fonts_pointer[fontType]+4)*100)+pgm_read_byte(fonts_pointer[fontType]+5); // two bytes values into integer 16
|
||||
|
||||
if ((c<fontStartChar) || (c>(fontStartChar+fontTotalChar-1))) // no bitmap for the required c
|
||||
return;
|
||||
|
||||
tempC=c-fontStartChar;
|
||||
|
||||
// each row (in datasheet is call page) is 8 bits high, 16 bit high character will have 2 rows to be drawn
|
||||
rowsToDraw=fontHeight/8; // 8 is LCD's page size, see SSD1306 datasheet
|
||||
if (rowsToDraw<=1) rowsToDraw=1;
|
||||
|
||||
// the following draw function can draw anywhere on the screen, but SLOW pixel by pixel draw
|
||||
if (rowsToDraw==1) {
|
||||
for (i=0;i<fontWidth+1;i++) {
|
||||
if (i==fontWidth) // this is done in a weird way because for 5x7 font, there is no margin, this code add a margin after col 5
|
||||
temp=0;
|
||||
else
|
||||
temp=pgm_read_byte(fonts_pointer[fontType]+FONTHEADERSIZE+(tempC*fontWidth)+i);
|
||||
|
||||
for (j=0;j<8;j++) { // 8 is the LCD's page height (see datasheet for explanation)
|
||||
if (temp & 0x1) {
|
||||
draw_pixel(x+i, y+j, color,mode);
|
||||
}
|
||||
else {
|
||||
draw_pixel(x+i, y+j, !color,mode);
|
||||
}
|
||||
|
||||
temp >>=1;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// font height over 8 bit
|
||||
// take character "0" ASCII 48 as example
|
||||
charPerBitmapRow = fontMapWidth/fontWidth; // 256/8 =32 char per row
|
||||
charColPositionOnBitmap = tempC % charPerBitmapRow; // =16
|
||||
charRowPositionOnBitmap = (int)(tempC/charPerBitmapRow); // =1
|
||||
charBitmapStartPosition = (charRowPositionOnBitmap * fontMapWidth * (fontHeight/8)) + (charColPositionOnBitmap * fontWidth) ;
|
||||
|
||||
// each row on LCD is 8 bit height (see datasheet for explanation)
|
||||
for(row=0;row<rowsToDraw;row++) {
|
||||
for (i=0; i<fontWidth;i++) {
|
||||
temp=pgm_read_byte(fonts_pointer[fontType]+FONTHEADERSIZE+(charBitmapStartPosition+i+(row*fontMapWidth)));
|
||||
for (j=0;j<8;j++) { // 8 is the LCD's page height (see datasheet for explanation)
|
||||
if (temp & 0x1) {
|
||||
draw_pixel(x+i,y+j+(row*8), color, mode);
|
||||
}
|
||||
else {
|
||||
draw_pixel(x+i,y+j+(row*8), !color, mode);
|
||||
}
|
||||
temp >>=1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void draw_string(uint8_t x, uint8_t y, char * string, uint8_t color, uint8_t mode, uint8_t font) {
|
||||
|
||||
if ((font>=TOTALFONTS) || (font<0))
|
||||
return;
|
||||
|
||||
uint8_t fontType = font;
|
||||
uint8_t fontWidth = pgm_read_byte(fonts_pointer[fontType]+0);
|
||||
|
||||
uint8_t cur_x = x;
|
||||
for (int i = 0; i < strlen(string); i++) {
|
||||
draw_char(cur_x, y, string[i], color, mode, font);
|
||||
cur_x += fontWidth + 1;
|
||||
}
|
||||
|
||||
}
|
134
drivers/qwiic/micro_oled.h
Normal file
134
drivers/qwiic/micro_oled.h
Normal file
@@ -0,0 +1,134 @@
|
||||
/* Jim Lindblom @ SparkFun Electronics
|
||||
* October 26, 2014
|
||||
* https://github.com/sparkfun/Micro_OLED_Breakout/tree/master/Firmware/Arduino/libraries/SFE_MicroOLED
|
||||
*
|
||||
* Modified by:
|
||||
* Emil Varughese @ Edwin Robotics Pvt. Ltd.
|
||||
* July 27, 2015
|
||||
* https://github.com/emil01/SparkFun_Micro_OLED_Arduino_Library/
|
||||
*
|
||||
* This code was heavily based around the MicroView library, written by GeekAmmo
|
||||
* (https://github.com/geekammo/MicroView-Arduino-Library).
|
||||
*
|
||||
* Adapted for QMK by:
|
||||
* Jack Humbert <jack.humb@gmail.com>
|
||||
* October 11, 2018
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General 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/>.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "qwiic.h"
|
||||
|
||||
void micro_oled_init(void);
|
||||
|
||||
void send_command(uint8_t command);
|
||||
void send_data(uint8_t data);
|
||||
void set_page_address(uint8_t address);
|
||||
void set_column_address(uint8_t address);
|
||||
void clear_screen(void);
|
||||
void clear_buffer(void);
|
||||
void send_buffer(void);
|
||||
void draw_pixel(uint8_t x, uint8_t y, uint8_t color, uint8_t mode);
|
||||
void draw_line(uint8_t x0, uint8_t y0, uint8_t x1, uint8_t y1, uint8_t color, uint8_t mode);
|
||||
void draw_line_hori(uint8_t x, uint8_t y, uint8_t width, uint8_t color, uint8_t mode);
|
||||
void draw_line_vert(uint8_t x, uint8_t y, uint8_t height, bool color, uint8_t mode);
|
||||
void draw_rect(uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint8_t color, uint8_t mode);
|
||||
void draw_rect_soft(uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint8_t color, uint8_t mode);
|
||||
void draw_rect_filled(uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint8_t color, uint8_t mode);
|
||||
void draw_rect_filled_soft(uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint8_t color, uint8_t mode);
|
||||
void draw_char(uint8_t x, uint8_t y, uint8_t c, uint8_t color, uint8_t mode, uint8_t font);
|
||||
void draw_string(uint8_t x, uint8_t y, char * string, uint8_t color, uint8_t mode, uint8_t font);
|
||||
|
||||
#define I2C_ADDRESS_SA0_0 0b0111100
|
||||
#ifndef I2C_ADDRESS_SA0_1
|
||||
#define I2C_ADDRESS_SA0_1 0b0111101
|
||||
#endif
|
||||
#define I2C_COMMAND 0x00
|
||||
#define I2C_DATA 0x40
|
||||
#define PIXEL_OFF 0
|
||||
#define PIXEL_ON 1
|
||||
|
||||
#ifndef LCDWIDTH
|
||||
#define LCDWIDTH 64
|
||||
#endif
|
||||
#ifndef LCDWIDTH
|
||||
#define LCDHEIGHT 48
|
||||
#endif
|
||||
#define FONTHEADERSIZE 6
|
||||
|
||||
#define NORM 0
|
||||
#define XOR 1
|
||||
|
||||
#define PAGE 0
|
||||
#define ALL 1
|
||||
|
||||
#define WIDGETSTYLE0 0
|
||||
#define WIDGETSTYLE1 1
|
||||
#define WIDGETSTYLE2 2
|
||||
|
||||
#define SETCONTRAST 0x81
|
||||
#define DISPLAYALLONRESUME 0xA4
|
||||
#define DISPLAYALLON 0xA5
|
||||
#define NORMALDISPLAY 0xA6
|
||||
#define INVERTDISPLAY 0xA7
|
||||
#define DISPLAYOFF 0xAE
|
||||
#define DISPLAYON 0xAF
|
||||
#define SETDISPLAYOFFSET 0xD3
|
||||
#define SETCOMPINS 0xDA
|
||||
#define SETVCOMDESELECT 0xDB
|
||||
#define SETDISPLAYCLOCKDIV 0xD5
|
||||
#define SETPRECHARGE 0xD9
|
||||
#define SETMULTIPLEX 0xA8
|
||||
#define SETLOWCOLUMN 0x00
|
||||
#define SETHIGHCOLUMN 0x10
|
||||
#define SETSTARTLINE 0x40
|
||||
#define MEMORYMODE 0x20
|
||||
#define COMSCANINC 0xC0
|
||||
#define COMSCANDEC 0xC8
|
||||
#define SEGREMAP 0xA0
|
||||
#define CHARGEPUMP 0x8D
|
||||
#define EXTERNALVCC 0x01
|
||||
#define SWITCHCAPVCC 0x02
|
||||
|
||||
// Scroll
|
||||
#define ACTIVATESCROLL 0x2F
|
||||
#define DEACTIVATESCROLL 0x2E
|
||||
#define SETVERTICALSCROLLAREA 0xA3
|
||||
#define RIGHTHORIZONTALSCROLL 0x26
|
||||
#define LEFT_HORIZONTALSCROLL 0x27
|
||||
#define VERTICALRIGHTHORIZONTALSCROLL 0x29
|
||||
#define VERTICALLEFTHORIZONTALSCROLL 0x2A
|
||||
|
||||
typedef enum CMD {
|
||||
CMD_CLEAR, //0
|
||||
CMD_INVERT, //1
|
||||
CMD_CONTRAST, //2
|
||||
CMD_DISPLAY, //3
|
||||
CMD_SETCURSOR, //4
|
||||
CMD_PIXEL, //5
|
||||
CMD_LINE, //6
|
||||
CMD_LINEH, //7
|
||||
CMD_LINEV, //8
|
||||
CMD_RECT, //9
|
||||
CMD_RECTFILL, //10
|
||||
CMD_CIRCLE, //11
|
||||
CMD_CIRCLEFILL, //12
|
||||
CMD_DRAWCHAR, //13
|
||||
CMD_DRAWBITMAP, //14
|
||||
CMD_GETLCDWIDTH, //15
|
||||
CMD_GETLCDHEIGHT, //16
|
||||
CMD_SETCOLOR, //17
|
||||
CMD_SETDRAWMODE //18
|
||||
} commCommand_t;
|
31
drivers/qwiic/qwiic.c
Normal file
31
drivers/qwiic/qwiic.c
Normal file
@@ -0,0 +1,31 @@
|
||||
/* Copyright 2018 Jack Humbert <jack.humb@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/>.
|
||||
*/
|
||||
#include "qwiic.h"
|
||||
|
||||
void qwiic_init(void) {
|
||||
#ifdef QWIIC_JOYSTIIC_ENABLE
|
||||
joystiic_init();
|
||||
#endif
|
||||
#ifdef QWIIC_MICRO_OLED_ENABLE
|
||||
micro_oled_init();
|
||||
#endif
|
||||
}
|
||||
|
||||
void qwiic_task(void) {
|
||||
#ifdef QWIIC_JOYSTIIC_ENABLE
|
||||
joystiic_task();
|
||||
#endif
|
||||
}
|
28
drivers/qwiic/qwiic.h
Normal file
28
drivers/qwiic/qwiic.h
Normal file
@@ -0,0 +1,28 @@
|
||||
/* Copyright 2018 Jack Humbert <jack.humb@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/>.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "i2c_master.h"
|
||||
|
||||
#ifdef QWIIC_JOYSTIIC_ENABLE
|
||||
#include "joystiic.h"
|
||||
#endif
|
||||
#ifdef QWIIC_MICRO_OLED_ENABLE
|
||||
#include "micro_oled.h"
|
||||
#endif
|
||||
|
||||
void qwiic_init(void);
|
||||
void qwiic_task(void);
|
18
drivers/qwiic/qwiic.mk
Normal file
18
drivers/qwiic/qwiic.mk
Normal file
@@ -0,0 +1,18 @@
|
||||
ifneq ($(strip $(QWIIC_ENABLE)),)
|
||||
COMMON_VPATH += $(DRIVER_PATH)/qwiic
|
||||
OPT_DEFS += -DQWIIC_ENABLE
|
||||
SRC += qwiic.c
|
||||
ifeq ($(filter "i2c_master.c", $(SRC)),)
|
||||
SRC += i2c_master.c
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(filter JOYSTIIC, $(QWIIC_ENABLE)),)
|
||||
OPT_DEFS += -DQWIIC_JOYSTIIC_ENABLE
|
||||
SRC += joystiic.c
|
||||
endif
|
||||
|
||||
ifneq ($(filter MICRO_OLED, $(QWIIC_ENABLE)),)
|
||||
OPT_DEFS += -DQWIIC_MICRO_OLED_ENABLE
|
||||
SRC += micro_oled.c
|
||||
endif
|
288
drivers/qwiic/util/font5x7.h
Normal file
288
drivers/qwiic/util/font5x7.h
Normal file
@@ -0,0 +1,288 @@
|
||||
/******************************************************************************
|
||||
font5x7.h
|
||||
Definition for small font
|
||||
|
||||
This file was imported from the MicroView library, written by GeekAmmo
|
||||
(https://github.com/geekammo/MicroView-Arduino-Library), and released under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
Foundation, either version 3 of the License, or (at your option) any later
|
||||
version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General 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/>.
|
||||
|
||||
Modified by:
|
||||
Emil Varughese @ Edwin Robotics Pvt. Ltd.
|
||||
July 27, 2015
|
||||
https://github.com/emil01/SparkFun_Micro_OLED_Arduino_Library/
|
||||
|
||||
******************************************************************************/
|
||||
#pragma once
|
||||
|
||||
#include "progmem.h"
|
||||
|
||||
// Standard ASCII 5x7 font
|
||||
static const unsigned char font5x7[] PROGMEM = {
|
||||
// first row defines - FONTWIDTH, FONTHEIGHT, ASCII START CHAR, TOTAL CHARACTERS, FONT MAP WIDTH HIGH, FONT MAP WIDTH LOW (2,56 meaning 256)
|
||||
5,8,0,255,12,75,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x3E, 0x5B, 0x4F, 0x5B, 0x3E,
|
||||
0x3E, 0x6B, 0x4F, 0x6B, 0x3E,
|
||||
0x1C, 0x3E, 0x7C, 0x3E, 0x1C,
|
||||
0x18, 0x3C, 0x7E, 0x3C, 0x18,
|
||||
0x1C, 0x57, 0x7D, 0x57, 0x1C,
|
||||
0x1C, 0x5E, 0x7F, 0x5E, 0x1C,
|
||||
0x00, 0x18, 0x3C, 0x18, 0x00,
|
||||
0xFF, 0xE7, 0xC3, 0xE7, 0xFF,
|
||||
0x00, 0x18, 0x24, 0x18, 0x00,
|
||||
0xFF, 0xE7, 0xDB, 0xE7, 0xFF,
|
||||
0x30, 0x48, 0x3A, 0x06, 0x0E,
|
||||
0x26, 0x29, 0x79, 0x29, 0x26,
|
||||
0x40, 0x7F, 0x05, 0x05, 0x07,
|
||||
0x40, 0x7F, 0x05, 0x25, 0x3F,
|
||||
0x5A, 0x3C, 0xE7, 0x3C, 0x5A,
|
||||
0x7F, 0x3E, 0x1C, 0x1C, 0x08,
|
||||
0x08, 0x1C, 0x1C, 0x3E, 0x7F,
|
||||
0x14, 0x22, 0x7F, 0x22, 0x14,
|
||||
0x5F, 0x5F, 0x00, 0x5F, 0x5F,
|
||||
0x06, 0x09, 0x7F, 0x01, 0x7F,
|
||||
0x00, 0x66, 0x89, 0x95, 0x6A,
|
||||
0x60, 0x60, 0x60, 0x60, 0x60,
|
||||
0x94, 0xA2, 0xFF, 0xA2, 0x94,
|
||||
0x08, 0x04, 0x7E, 0x04, 0x08,
|
||||
0x10, 0x20, 0x7E, 0x20, 0x10,
|
||||
0x08, 0x08, 0x2A, 0x1C, 0x08,
|
||||
0x08, 0x1C, 0x2A, 0x08, 0x08,
|
||||
0x1E, 0x10, 0x10, 0x10, 0x10,
|
||||
0x0C, 0x1E, 0x0C, 0x1E, 0x0C,
|
||||
0x30, 0x38, 0x3E, 0x38, 0x30,
|
||||
0x06, 0x0E, 0x3E, 0x0E, 0x06,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x5F, 0x00, 0x00,
|
||||
0x00, 0x07, 0x00, 0x07, 0x00,
|
||||
0x14, 0x7F, 0x14, 0x7F, 0x14,
|
||||
0x24, 0x2A, 0x7F, 0x2A, 0x12,
|
||||
0x23, 0x13, 0x08, 0x64, 0x62,
|
||||
0x36, 0x49, 0x56, 0x20, 0x50,
|
||||
0x00, 0x08, 0x07, 0x03, 0x00,
|
||||
0x00, 0x1C, 0x22, 0x41, 0x00,
|
||||
0x00, 0x41, 0x22, 0x1C, 0x00,
|
||||
0x2A, 0x1C, 0x7F, 0x1C, 0x2A,
|
||||
0x08, 0x08, 0x3E, 0x08, 0x08,
|
||||
0x00, 0x80, 0x70, 0x30, 0x00,
|
||||
0x08, 0x08, 0x08, 0x08, 0x08,
|
||||
0x00, 0x00, 0x60, 0x60, 0x00,
|
||||
0x20, 0x10, 0x08, 0x04, 0x02,
|
||||
0x3E, 0x51, 0x49, 0x45, 0x3E,
|
||||
0x00, 0x42, 0x7F, 0x40, 0x00,
|
||||
0x72, 0x49, 0x49, 0x49, 0x46,
|
||||
0x21, 0x41, 0x49, 0x4D, 0x33,
|
||||
0x18, 0x14, 0x12, 0x7F, 0x10,
|
||||
0x27, 0x45, 0x45, 0x45, 0x39,
|
||||
0x3C, 0x4A, 0x49, 0x49, 0x31,
|
||||
0x41, 0x21, 0x11, 0x09, 0x07,
|
||||
0x36, 0x49, 0x49, 0x49, 0x36,
|
||||
0x46, 0x49, 0x49, 0x29, 0x1E,
|
||||
0x00, 0x00, 0x14, 0x00, 0x00,
|
||||
0x00, 0x40, 0x34, 0x00, 0x00,
|
||||
0x00, 0x08, 0x14, 0x22, 0x41,
|
||||
0x14, 0x14, 0x14, 0x14, 0x14,
|
||||
0x00, 0x41, 0x22, 0x14, 0x08,
|
||||
0x02, 0x01, 0x59, 0x09, 0x06,
|
||||
0x3E, 0x41, 0x5D, 0x59, 0x4E,
|
||||
0x7C, 0x12, 0x11, 0x12, 0x7C,
|
||||
0x7F, 0x49, 0x49, 0x49, 0x36,
|
||||
0x3E, 0x41, 0x41, 0x41, 0x22,
|
||||
0x7F, 0x41, 0x41, 0x41, 0x3E,
|
||||
0x7F, 0x49, 0x49, 0x49, 0x41,
|
||||
0x7F, 0x09, 0x09, 0x09, 0x01,
|
||||
0x3E, 0x41, 0x41, 0x51, 0x73,
|
||||
0x7F, 0x08, 0x08, 0x08, 0x7F,
|
||||
0x00, 0x41, 0x7F, 0x41, 0x00,
|
||||
0x20, 0x40, 0x41, 0x3F, 0x01,
|
||||
0x7F, 0x08, 0x14, 0x22, 0x41,
|
||||
0x7F, 0x40, 0x40, 0x40, 0x40,
|
||||
0x7F, 0x02, 0x1C, 0x02, 0x7F,
|
||||
0x7F, 0x04, 0x08, 0x10, 0x7F,
|
||||
0x3E, 0x41, 0x41, 0x41, 0x3E,
|
||||
0x7F, 0x09, 0x09, 0x09, 0x06,
|
||||
0x3E, 0x41, 0x51, 0x21, 0x5E,
|
||||
0x7F, 0x09, 0x19, 0x29, 0x46,
|
||||
0x26, 0x49, 0x49, 0x49, 0x32,
|
||||
0x03, 0x01, 0x7F, 0x01, 0x03,
|
||||
0x3F, 0x40, 0x40, 0x40, 0x3F,
|
||||
0x1F, 0x20, 0x40, 0x20, 0x1F,
|
||||
0x3F, 0x40, 0x38, 0x40, 0x3F,
|
||||
0x63, 0x14, 0x08, 0x14, 0x63,
|
||||
0x03, 0x04, 0x78, 0x04, 0x03,
|
||||
0x61, 0x59, 0x49, 0x4D, 0x43,
|
||||
0x00, 0x7F, 0x41, 0x41, 0x41,
|
||||
0x02, 0x04, 0x08, 0x10, 0x20,
|
||||
0x00, 0x41, 0x41, 0x41, 0x7F,
|
||||
0x04, 0x02, 0x01, 0x02, 0x04,
|
||||
0x40, 0x40, 0x40, 0x40, 0x40,
|
||||
0x00, 0x03, 0x07, 0x08, 0x00,
|
||||
0x20, 0x54, 0x54, 0x78, 0x40,
|
||||
0x7F, 0x28, 0x44, 0x44, 0x38,
|
||||
0x38, 0x44, 0x44, 0x44, 0x28,
|
||||
0x38, 0x44, 0x44, 0x28, 0x7F,
|
||||
0x38, 0x54, 0x54, 0x54, 0x18,
|
||||
0x00, 0x08, 0x7E, 0x09, 0x02,
|
||||
0x18, 0xA4, 0xA4, 0x9C, 0x78,
|
||||
0x7F, 0x08, 0x04, 0x04, 0x78,
|
||||
0x00, 0x44, 0x7D, 0x40, 0x00,
|
||||
0x20, 0x40, 0x40, 0x3D, 0x00,
|
||||
0x7F, 0x10, 0x28, 0x44, 0x00,
|
||||
0x00, 0x41, 0x7F, 0x40, 0x00,
|
||||
0x7C, 0x04, 0x78, 0x04, 0x78,
|
||||
0x7C, 0x08, 0x04, 0x04, 0x78,
|
||||
0x38, 0x44, 0x44, 0x44, 0x38,
|
||||
0xFC, 0x18, 0x24, 0x24, 0x18,
|
||||
0x18, 0x24, 0x24, 0x18, 0xFC,
|
||||
0x7C, 0x08, 0x04, 0x04, 0x08,
|
||||
0x48, 0x54, 0x54, 0x54, 0x24,
|
||||
0x04, 0x04, 0x3F, 0x44, 0x24,
|
||||
0x3C, 0x40, 0x40, 0x20, 0x7C,
|
||||
0x1C, 0x20, 0x40, 0x20, 0x1C,
|
||||
0x3C, 0x40, 0x30, 0x40, 0x3C,
|
||||
0x44, 0x28, 0x10, 0x28, 0x44,
|
||||
0x4C, 0x90, 0x90, 0x90, 0x7C,
|
||||
0x44, 0x64, 0x54, 0x4C, 0x44,
|
||||
0x00, 0x08, 0x36, 0x41, 0x00,
|
||||
0x00, 0x00, 0x77, 0x00, 0x00,
|
||||
0x00, 0x41, 0x36, 0x08, 0x00,
|
||||
0x02, 0x01, 0x02, 0x04, 0x02,
|
||||
0x3C, 0x26, 0x23, 0x26, 0x3C,
|
||||
0x1E, 0xA1, 0xA1, 0x61, 0x12,
|
||||
0x3A, 0x40, 0x40, 0x20, 0x7A,
|
||||
0x38, 0x54, 0x54, 0x55, 0x59,
|
||||
0x21, 0x55, 0x55, 0x79, 0x41,
|
||||
0x21, 0x54, 0x54, 0x78, 0x41,
|
||||
0x21, 0x55, 0x54, 0x78, 0x40,
|
||||
0x20, 0x54, 0x55, 0x79, 0x40,
|
||||
0x0C, 0x1E, 0x52, 0x72, 0x12,
|
||||
0x39, 0x55, 0x55, 0x55, 0x59,
|
||||
0x39, 0x54, 0x54, 0x54, 0x59,
|
||||
0x39, 0x55, 0x54, 0x54, 0x58,
|
||||
0x00, 0x00, 0x45, 0x7C, 0x41,
|
||||
0x00, 0x02, 0x45, 0x7D, 0x42,
|
||||
0x00, 0x01, 0x45, 0x7C, 0x40,
|
||||
0xF0, 0x29, 0x24, 0x29, 0xF0,
|
||||
0xF0, 0x28, 0x25, 0x28, 0xF0,
|
||||
0x7C, 0x54, 0x55, 0x45, 0x00,
|
||||
0x20, 0x54, 0x54, 0x7C, 0x54,
|
||||
0x7C, 0x0A, 0x09, 0x7F, 0x49,
|
||||
0x32, 0x49, 0x49, 0x49, 0x32,
|
||||
0x32, 0x48, 0x48, 0x48, 0x32,
|
||||
0x32, 0x4A, 0x48, 0x48, 0x30,
|
||||
0x3A, 0x41, 0x41, 0x21, 0x7A,
|
||||
0x3A, 0x42, 0x40, 0x20, 0x78,
|
||||
0x00, 0x9D, 0xA0, 0xA0, 0x7D,
|
||||
0x39, 0x44, 0x44, 0x44, 0x39,
|
||||
0x3D, 0x40, 0x40, 0x40, 0x3D,
|
||||
0x3C, 0x24, 0xFF, 0x24, 0x24,
|
||||
0x48, 0x7E, 0x49, 0x43, 0x66,
|
||||
0x2B, 0x2F, 0xFC, 0x2F, 0x2B,
|
||||
0xFF, 0x09, 0x29, 0xF6, 0x20,
|
||||
0xC0, 0x88, 0x7E, 0x09, 0x03,
|
||||
0x20, 0x54, 0x54, 0x79, 0x41,
|
||||
0x00, 0x00, 0x44, 0x7D, 0x41,
|
||||
0x30, 0x48, 0x48, 0x4A, 0x32,
|
||||
0x38, 0x40, 0x40, 0x22, 0x7A,
|
||||
0x00, 0x7A, 0x0A, 0x0A, 0x72,
|
||||
0x7D, 0x0D, 0x19, 0x31, 0x7D,
|
||||
0x26, 0x29, 0x29, 0x2F, 0x28,
|
||||
0x26, 0x29, 0x29, 0x29, 0x26,
|
||||
0x30, 0x48, 0x4D, 0x40, 0x20,
|
||||
0x38, 0x08, 0x08, 0x08, 0x08,
|
||||
0x08, 0x08, 0x08, 0x08, 0x38,
|
||||
0x2F, 0x10, 0xC8, 0xAC, 0xBA,
|
||||
0x2F, 0x10, 0x28, 0x34, 0xFA,
|
||||
0x00, 0x00, 0x7B, 0x00, 0x00,
|
||||
0x08, 0x14, 0x2A, 0x14, 0x22,
|
||||
0x22, 0x14, 0x2A, 0x14, 0x08,
|
||||
0xAA, 0x00, 0x55, 0x00, 0xAA,
|
||||
0xAA, 0x55, 0xAA, 0x55, 0xAA,
|
||||
0x00, 0x00, 0x00, 0xFF, 0x00,
|
||||
0x10, 0x10, 0x10, 0xFF, 0x00,
|
||||
0x14, 0x14, 0x14, 0xFF, 0x00,
|
||||
0x10, 0x10, 0xFF, 0x00, 0xFF,
|
||||
0x10, 0x10, 0xF0, 0x10, 0xF0,
|
||||
0x14, 0x14, 0x14, 0xFC, 0x00,
|
||||
0x14, 0x14, 0xF7, 0x00, 0xFF,
|
||||
0x00, 0x00, 0xFF, 0x00, 0xFF,
|
||||
0x14, 0x14, 0xF4, 0x04, 0xFC,
|
||||
0x14, 0x14, 0x17, 0x10, 0x1F,
|
||||
0x10, 0x10, 0x1F, 0x10, 0x1F,
|
||||
0x14, 0x14, 0x14, 0x1F, 0x00,
|
||||
0x10, 0x10, 0x10, 0xF0, 0x00,
|
||||
0x00, 0x00, 0x00, 0x1F, 0x10,
|
||||
0x10, 0x10, 0x10, 0x1F, 0x10,
|
||||
0x10, 0x10, 0x10, 0xF0, 0x10,
|
||||
0x00, 0x00, 0x00, 0xFF, 0x10,
|
||||
0x10, 0x10, 0x10, 0x10, 0x10,
|
||||
0x10, 0x10, 0x10, 0xFF, 0x10,
|
||||
0x00, 0x00, 0x00, 0xFF, 0x14,
|
||||
0x00, 0x00, 0xFF, 0x00, 0xFF,
|
||||
0x00, 0x00, 0x1F, 0x10, 0x17,
|
||||
0x00, 0x00, 0xFC, 0x04, 0xF4,
|
||||
0x14, 0x14, 0x17, 0x10, 0x17,
|
||||
0x14, 0x14, 0xF4, 0x04, 0xF4,
|
||||
0x00, 0x00, 0xFF, 0x00, 0xF7,
|
||||
0x14, 0x14, 0x14, 0x14, 0x14,
|
||||
0x14, 0x14, 0xF7, 0x00, 0xF7,
|
||||
0x14, 0x14, 0x14, 0x17, 0x14,
|
||||
0x10, 0x10, 0x1F, 0x10, 0x1F,
|
||||
0x14, 0x14, 0x14, 0xF4, 0x14,
|
||||
0x10, 0x10, 0xF0, 0x10, 0xF0,
|
||||
0x00, 0x00, 0x1F, 0x10, 0x1F,
|
||||
0x00, 0x00, 0x00, 0x1F, 0x14,
|
||||
0x00, 0x00, 0x00, 0xFC, 0x14,
|
||||
0x00, 0x00, 0xF0, 0x10, 0xF0,
|
||||
0x10, 0x10, 0xFF, 0x10, 0xFF,
|
||||
0x14, 0x14, 0x14, 0xFF, 0x14,
|
||||
0x10, 0x10, 0x10, 0x1F, 0x00,
|
||||
0x00, 0x00, 0x00, 0xF0, 0x10,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xF0, 0xF0, 0xF0, 0xF0, 0xF0,
|
||||
0xFF, 0xFF, 0xFF, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0xFF, 0xFF,
|
||||
0x0F, 0x0F, 0x0F, 0x0F, 0x0F,
|
||||
0x38, 0x44, 0x44, 0x38, 0x44,
|
||||
0x7C, 0x2A, 0x2A, 0x3E, 0x14,
|
||||
0x7E, 0x02, 0x02, 0x06, 0x06,
|
||||
0x02, 0x7E, 0x02, 0x7E, 0x02,
|
||||
0x63, 0x55, 0x49, 0x41, 0x63,
|
||||
0x38, 0x44, 0x44, 0x3C, 0x04,
|
||||
0x40, 0x7E, 0x20, 0x1E, 0x20,
|
||||
0x06, 0x02, 0x7E, 0x02, 0x02,
|
||||
0x99, 0xA5, 0xE7, 0xA5, 0x99,
|
||||
0x1C, 0x2A, 0x49, 0x2A, 0x1C,
|
||||
0x4C, 0x72, 0x01, 0x72, 0x4C,
|
||||
0x30, 0x4A, 0x4D, 0x4D, 0x30,
|
||||
0x30, 0x48, 0x78, 0x48, 0x30,
|
||||
0xBC, 0x62, 0x5A, 0x46, 0x3D,
|
||||
0x3E, 0x49, 0x49, 0x49, 0x00,
|
||||
0x7E, 0x01, 0x01, 0x01, 0x7E,
|
||||
0x2A, 0x2A, 0x2A, 0x2A, 0x2A,
|
||||
0x44, 0x44, 0x5F, 0x44, 0x44,
|
||||
0x40, 0x51, 0x4A, 0x44, 0x40,
|
||||
0x40, 0x44, 0x4A, 0x51, 0x40,
|
||||
0x00, 0x00, 0xFF, 0x01, 0x03,
|
||||
0xE0, 0x80, 0xFF, 0x00, 0x00,
|
||||
0x08, 0x08, 0x6B, 0x6B, 0x08,
|
||||
0x36, 0x12, 0x36, 0x24, 0x36,
|
||||
0x06, 0x0F, 0x09, 0x0F, 0x06,
|
||||
0x00, 0x00, 0x18, 0x18, 0x00,
|
||||
0x00, 0x00, 0x10, 0x10, 0x00,
|
||||
0x30, 0x40, 0xFF, 0x01, 0x01,
|
||||
0x00, 0x1F, 0x01, 0x01, 0x1E,
|
||||
0x00, 0x19, 0x1D, 0x17, 0x12,
|
||||
0x00, 0x3C, 0x3C, 0x3C, 0x3C,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00
|
||||
};
|
127
drivers/qwiic/util/font8x16.h
Normal file
127
drivers/qwiic/util/font8x16.h
Normal file
@@ -0,0 +1,127 @@
|
||||
/******************************************************************************
|
||||
font8x16.h
|
||||
Definition for medium font
|
||||
|
||||
This file was imported from the MicroView library, written by GeekAmmo
|
||||
(https://github.com/geekammo/MicroView-Arduino-Library), and released under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
Foundation, either version 3 of the License, or (at your option) any later
|
||||
version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General 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/>.
|
||||
|
||||
Modified by:
|
||||
Emil Varughese @ Edwin Robotics Pvt. Ltd.
|
||||
July 27, 2015
|
||||
https://github.com/emil01/SparkFun_Micro_OLED_Arduino_Library/
|
||||
******************************************************************************/
|
||||
#pragma once
|
||||
|
||||
#include "progmem.h"
|
||||
|
||||
static const unsigned char font8x16[] PROGMEM = {
|
||||
// first row defines - FONTWIDTH, FONTHEIGHT, ASCII START CHAR, TOTAL CHARACTERS, FONT MAP WIDTH HIGH, FONT MAP WIDTH LOW (2,56 meaning 256)
|
||||
8,16,32,96,2,56,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0xD0, 0xBE, 0x90, 0xD0, 0xBE, 0x90, 0x00,
|
||||
0x00, 0x1C, 0x62, 0xFF, 0xC2, 0x80, 0x00, 0x00, 0x0C, 0x12, 0x92, 0x4C, 0xB0, 0x88, 0x06, 0x00,
|
||||
0x80, 0x7C, 0x62, 0xB2, 0x1C, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x0E, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0xE0, 0x18, 0x04, 0x02, 0x02, 0x00, 0x00, 0x00, 0x02, 0x02, 0x04, 0x18, 0xE0, 0x00, 0x00,
|
||||
0x00, 0x24, 0x18, 0x7E, 0x18, 0x24, 0x00, 0x00, 0x80, 0x80, 0x80, 0xF0, 0x80, 0x80, 0x80, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x60, 0x18, 0x06, 0x00, 0x00,
|
||||
0xF8, 0x04, 0xC2, 0x32, 0x0C, 0xF8, 0x00, 0x00, 0x00, 0x04, 0x04, 0xFE, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x02, 0x82, 0x42, 0x22, 0x1C, 0x00, 0x00, 0x00, 0x02, 0x22, 0x22, 0x22, 0xDC, 0x00, 0x00,
|
||||
0xC0, 0xA0, 0x98, 0x84, 0xFE, 0x80, 0x80, 0x00, 0x00, 0x1E, 0x12, 0x12, 0x22, 0xC2, 0x00, 0x00,
|
||||
0xF8, 0x44, 0x22, 0x22, 0x22, 0xC0, 0x00, 0x00, 0x00, 0x02, 0x02, 0xC2, 0x32, 0x0A, 0x06, 0x00,
|
||||
0x00, 0x8C, 0x52, 0x22, 0x52, 0x8C, 0x00, 0x00, 0x3C, 0x42, 0x42, 0x42, 0x26, 0xF8, 0x00, 0x00,
|
||||
0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00,
|
||||
0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00,
|
||||
0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x02, 0x82, 0x42, 0x22, 0x1C, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
|
||||
0x00, 0x04, 0x04, 0x0F, 0x04, 0x03, 0x00, 0x00, 0x04, 0x02, 0x01, 0x03, 0x04, 0x04, 0x03, 0x00,
|
||||
0x03, 0x04, 0x04, 0x04, 0x05, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x03, 0x06, 0x08, 0x10, 0x10, 0x00, 0x00, 0x00, 0x10, 0x10, 0x08, 0x06, 0x03, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x16, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x01, 0x03, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x04, 0x04, 0x07, 0x04, 0x04, 0x00, 0x00,
|
||||
0x00, 0x07, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00,
|
||||
0x01, 0x02, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x03, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00,
|
||||
0x00, 0x00, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x0E, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x04, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00,
|
||||
0x04, 0x02, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xF8, 0x04, 0x72, 0x8A, 0xFA, 0x84, 0x78, 0x00, 0x00, 0xC0, 0x38, 0x06, 0x38, 0xC0, 0x00, 0x00,
|
||||
0x00, 0xFE, 0x22, 0x22, 0x22, 0xDC, 0x00, 0x00, 0xF8, 0x04, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00,
|
||||
0xFE, 0x02, 0x02, 0x02, 0x04, 0xF8, 0x00, 0x00, 0x00, 0xFE, 0x22, 0x22, 0x22, 0x22, 0x00, 0x00,
|
||||
0x00, 0xFE, 0x22, 0x22, 0x22, 0x22, 0x00, 0x00, 0xF8, 0x04, 0x02, 0x02, 0x22, 0xE2, 0x00, 0x00,
|
||||
0xFE, 0x20, 0x20, 0x20, 0x20, 0xFE, 0x00, 0x00, 0x00, 0x02, 0x02, 0xFE, 0x02, 0x02, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x02, 0x02, 0xFE, 0x00, 0x00, 0xFE, 0x40, 0xB0, 0x08, 0x04, 0x02, 0x00, 0x00,
|
||||
0x00, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x0C, 0x70, 0x80, 0x70, 0x0C, 0xFE, 0x00,
|
||||
0xFE, 0x0C, 0x30, 0xC0, 0x00, 0xFE, 0x00, 0x00, 0xF8, 0x04, 0x02, 0x02, 0x04, 0xF8, 0x00, 0x00,
|
||||
0xFE, 0x42, 0x42, 0x42, 0x22, 0x1C, 0x00, 0x00, 0xF8, 0x04, 0x02, 0x02, 0x04, 0xF8, 0x00, 0x00,
|
||||
0x00, 0xFE, 0x42, 0x42, 0xA2, 0x1C, 0x00, 0x00, 0x00, 0x1C, 0x22, 0x42, 0x42, 0x80, 0x00, 0x00,
|
||||
0x02, 0x02, 0x02, 0xFE, 0x02, 0x02, 0x02, 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00,
|
||||
0x06, 0x38, 0xC0, 0x00, 0xC0, 0x38, 0x06, 0x00, 0x3E, 0xC0, 0xF0, 0x0E, 0xF0, 0xC0, 0x3E, 0x00,
|
||||
0x00, 0x06, 0x98, 0x60, 0x98, 0x06, 0x00, 0x00, 0x00, 0x06, 0x18, 0xE0, 0x18, 0x06, 0x00, 0x00,
|
||||
0x02, 0x02, 0xC2, 0x32, 0x0A, 0x06, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x02, 0x02, 0x02, 0x02, 0x00,
|
||||
0x00, 0x06, 0x18, 0x60, 0x80, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x02, 0xFE, 0x00, 0x00, 0x00,
|
||||
0x40, 0x30, 0x0C, 0x0C, 0x30, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x01, 0x02, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x06, 0x01, 0x01, 0x01, 0x01, 0x01, 0x06, 0x00,
|
||||
0x00, 0x07, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00,
|
||||
0x07, 0x04, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x07, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00,
|
||||
0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x04, 0x07, 0x00, 0x00,
|
||||
0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x04, 0x07, 0x04, 0x04, 0x00, 0x00,
|
||||
0x00, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x07, 0x00, 0x00, 0x01, 0x02, 0x04, 0x00, 0x00,
|
||||
0x00, 0x07, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x07, 0x00, 0x00, 0x01, 0x00, 0x00, 0x07, 0x00,
|
||||
0x07, 0x00, 0x00, 0x00, 0x03, 0x07, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00,
|
||||
0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x0C, 0x12, 0x11, 0x10, 0x00,
|
||||
0x00, 0x07, 0x00, 0x00, 0x01, 0x06, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00,
|
||||
0x00, 0x00, 0x01, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00,
|
||||
0x00, 0x06, 0x01, 0x00, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
|
||||
0x06, 0x05, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x10, 0x10, 0x10, 0x10, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x00, 0x10, 0x10, 0x10, 0x10, 0x1F, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00,
|
||||
0x00, 0x00, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0xF0, 0x00, 0x00,
|
||||
0x00, 0xFE, 0x20, 0x10, 0x10, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00,
|
||||
0x00, 0xE0, 0x10, 0x10, 0x10, 0xFE, 0x00, 0x00, 0x00, 0xE0, 0x90, 0x90, 0x90, 0xE0, 0x00, 0x00,
|
||||
0x00, 0x20, 0xFC, 0x22, 0x22, 0x22, 0x02, 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0xF0, 0x00, 0x00,
|
||||
0x00, 0xFE, 0x20, 0x10, 0x10, 0xE0, 0x00, 0x00, 0x10, 0x10, 0xF2, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x10, 0x10, 0x10, 0xF2, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x80, 0x40, 0x20, 0x10, 0x00, 0x00,
|
||||
0x00, 0x02, 0x02, 0xFE, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x20, 0x10, 0xF0, 0x20, 0x10, 0xF0, 0x00,
|
||||
0x00, 0xF0, 0x20, 0x10, 0x10, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0xE0, 0x00, 0x00,
|
||||
0x00, 0xF0, 0x20, 0x10, 0x10, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0xF0, 0x00, 0x00,
|
||||
0x00, 0xF0, 0x20, 0x10, 0x10, 0x70, 0x00, 0x00, 0x00, 0x60, 0x90, 0x90, 0x90, 0x20, 0x00, 0x00,
|
||||
0x00, 0x20, 0x20, 0xFC, 0x20, 0x20, 0x20, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x00,
|
||||
0x00, 0x70, 0x80, 0x00, 0x80, 0x70, 0x00, 0x00, 0xF0, 0x00, 0xC0, 0x30, 0xC0, 0x00, 0xF0, 0x00,
|
||||
0x00, 0x30, 0xC0, 0xC0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x30, 0xC0, 0x00, 0x80, 0x70, 0x00, 0x00,
|
||||
0x00, 0x10, 0x10, 0x90, 0x50, 0x30, 0x00, 0x00, 0x00, 0x80, 0x80, 0x7E, 0x02, 0x02, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x7E, 0x80, 0x80, 0x00, 0x00,
|
||||
0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x02, 0x07, 0x00, 0x00,
|
||||
0x00, 0x07, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00,
|
||||
0x00, 0x03, 0x04, 0x04, 0x02, 0x07, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00,
|
||||
0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x24, 0x24, 0x22, 0x1F, 0x00, 0x00,
|
||||
0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x04, 0x04, 0x00, 0x00, 0x00,
|
||||
0x20, 0x20, 0x20, 0x20, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x01, 0x02, 0x04, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x07, 0x04, 0x04, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00,
|
||||
0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00,
|
||||
0x00, 0x3F, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x02, 0x3F, 0x00, 0x00,
|
||||
0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x00, 0x00, 0x03, 0x04, 0x04, 0x02, 0x07, 0x00, 0x00,
|
||||
0x00, 0x00, 0x03, 0x04, 0x03, 0x00, 0x00, 0x00, 0x01, 0x06, 0x01, 0x00, 0x01, 0x06, 0x01, 0x00,
|
||||
0x00, 0x06, 0x01, 0x01, 0x06, 0x00, 0x00, 0x00, 0x20, 0x20, 0x31, 0x0E, 0x03, 0x00, 0x00, 0x00,
|
||||
0x00, 0x06, 0x05, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x10, 0x10, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x1F, 0x00, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
};
|
@@ -18,34 +18,26 @@
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT_60_ansi(
|
||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||
KC_EQL, KC_BSPC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O,
|
||||
KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H,
|
||||
KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B,
|
||||
KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC,
|
||||
KC_RALT, KC_RGUI, MO(1), KC_LCTL
|
||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_LCTL
|
||||
),
|
||||
|
||||
[1] = LAYOUT_60_ansi(
|
||||
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10,
|
||||
KC_F11, KC_F12, KC_DEL, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN,
|
||||
KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_HOME, KC_PGUP, KC_TRNS,
|
||||
KC_TRNS, KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END,
|
||||
KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_TRNS, KC_TRNS
|
||||
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL,
|
||||
KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS,
|
||||
KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_HOME, KC_PGUP, KC_TRNS,
|
||||
KC_TRNS, KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_TRNS, KC_TRNS
|
||||
),
|
||||
|
||||
[2] = LAYOUT_60_ansi(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, RESET, BL_TOGG, BL_INC, BL_DEC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI,
|
||||
RGB_SAI, RGB_VAI, RGB_SPI, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET,
|
||||
BL_TOGG, BL_INC, BL_DEC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@@ -27,6 +27,8 @@
|
||||
#define DESCRIPTION A split 50 key keyboard
|
||||
|
||||
#define USE_SERIAL
|
||||
/* serial.c configuration for split keyboard */
|
||||
#define SOFT_SERIAL_PIN D0
|
||||
|
||||
/* Select hand configuration */
|
||||
#define MASTER_LEFT
|
||||
|
@@ -28,6 +28,9 @@
|
||||
|
||||
#define USE_SERIAL
|
||||
|
||||
/* serial.c configuration for split keyboard */
|
||||
#define SOFT_SERIAL_PIN D0
|
||||
|
||||
/* Select hand configuration */
|
||||
#define MASTER_LEFT
|
||||
//#define MASTER_RIGHT
|
||||
|
@@ -28,6 +28,9 @@
|
||||
|
||||
#define USE_SERIAL
|
||||
|
||||
/* serial.c configuration for split keyboard */
|
||||
#define SOFT_SERIAL_PIN D0
|
||||
|
||||
/* Select hand configuration */
|
||||
#define MASTER_LEFT
|
||||
//#define MASTER_RIGHT
|
||||
|
192
keyboards/40percentclub/i75/config.h
Normal file
192
keyboards/40percentclub/i75/config.h
Normal file
@@ -0,0 +1,192 @@
|
||||
/* Copyright 2018
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General 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/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x0A0C
|
||||
#define DEVICE_VER 0x0175
|
||||
#define MANUFACTURER di0ib
|
||||
#define PRODUCT i75
|
||||
#define DESCRIPTION i75 15x5 ortholinear keyboard
|
||||
|
||||
/* 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
|
||||
|
||||
/*
|
||||
* HD44780 LCD Display Configuration
|
||||
*/
|
||||
/*
|
||||
#define LCD_LINES 2 //< number of visible lines of the display
|
||||
#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display
|
||||
|
||||
#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode
|
||||
|
||||
#if LCD_IO_MODE
|
||||
#define LCD_PORT PORTB //< port for the LCD lines
|
||||
#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0
|
||||
#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1
|
||||
#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2
|
||||
#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3
|
||||
#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0
|
||||
#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1
|
||||
#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2
|
||||
#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3
|
||||
#define LCD_RS_PORT LCD_PORT //< port for RS line
|
||||
#define LCD_RS_PIN 3 //< pin for RS line
|
||||
#define LCD_RW_PORT LCD_PORT //< port for RW line
|
||||
#define LCD_RW_PIN 2 //< pin for RW line
|
||||
#define LCD_E_PORT LCD_PORT //< port for Enable line
|
||||
#define LCD_E_PIN 1 //< pin for Enable line
|
||||
#endif
|
||||
*/
|
||||
|
||||
/* Bootmagic Lite key configuration */
|
||||
// #define BOOTMAGIC_LITE_ROW 0
|
||||
// #define BOOTMAGIC_LITE_COLUMN 0
|
43
keyboards/40percentclub/i75/i75.c
Normal file
43
keyboards/40percentclub/i75/i75.c
Normal file
@@ -0,0 +1,43 @@
|
||||
/* Copyright 2018
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General 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 "i75.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);
|
||||
}
|
24
keyboards/40percentclub/i75/i75.h
Normal file
24
keyboards/40percentclub/i75/i75.h
Normal file
@@ -0,0 +1,24 @@
|
||||
/* Copyright 2018
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General 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/>.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#ifdef KEYBOARD_40percentclub_i75_promicro
|
||||
#include "promicro.h"
|
||||
#elif KEYBOARD_40percentclub_i75_teensy2
|
||||
#include "teensy2.h"
|
||||
#endif
|
12
keyboards/40percentclub/i75/info.json
Normal file
12
keyboards/40percentclub/i75/info.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"keyboard_name": "i75",
|
||||
"url": "",
|
||||
"maintainer": "qmk",
|
||||
"width": 15,
|
||||
"height": 5,
|
||||
"layouts": {
|
||||
"LAYOUT_ortho_5x15": {
|
||||
"layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, {"x":13, "y":1}, {"x":14, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":12, "y":2}, {"x":13, "y":2}, {"x":14, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":6, "y":3}, {"x":7, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}, {"x":12, "y":3}, {"x":13, "y":3}, {"x":14, "y":3}, {"x":0, "y":4}, {"x":1, "y":4}, {"x":2, "y":4}, {"x":3, "y":4}, {"x":4, "y":4}, {"x":5, "y":4}, {"x":6, "y":4}, {"x":7, "y":4}, {"x":8, "y":4}, {"x":9, "y":4}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}]
|
||||
}
|
||||
}
|
||||
}
|
19
keyboards/40percentclub/i75/keymaps/default/config.h
Normal file
19
keyboards/40percentclub/i75/keymaps/default/config.h
Normal file
@@ -0,0 +1,19 @@
|
||||
/* Copyright 2018
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General 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/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
// place overrides here
|
66
keyboards/40percentclub/i75/keymaps/default/keymap.c
Normal file
66
keyboards/40percentclub/i75/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,66 @@
|
||||
/* Copyright 2018
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General 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
|
||||
|
||||
// Defines the keycodes used by our macros in process_record_user
|
||||
enum custom_keycodes {
|
||||
QMKBEST = SAFE_RANGE,
|
||||
QMKURL
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT_ortho_5x15( \
|
||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, \
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_DEL, \
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_ENT, KC_PGUP, \
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_UP, KC_PGDN, \
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \
|
||||
),
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QMKBEST:
|
||||
if (record->event.pressed) {
|
||||
// when keycode QMKBEST is pressed
|
||||
SEND_STRING("QMK is the best thing ever!");
|
||||
} else {
|
||||
// when keycode QMKBEST is released
|
||||
}
|
||||
break;
|
||||
case QMKURL:
|
||||
if (record->event.pressed) {
|
||||
// when keycode QMKURL is pressed
|
||||
SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER));
|
||||
} else {
|
||||
// when keycode QMKURL is released
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
|
||||
}
|
||||
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
|
||||
}
|
1
keyboards/40percentclub/i75/keymaps/default/readme.md
Normal file
1
keyboards/40percentclub/i75/keymaps/default/readme.md
Normal file
@@ -0,0 +1 @@
|
||||
# The default keymap for i75
|
40
keyboards/40percentclub/i75/promicro/config.h
Normal file
40
keyboards/40percentclub/i75/promicro/config.h
Normal file
@@ -0,0 +1,40 @@
|
||||
/* Copyright 2018
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General 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/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 9
|
||||
#define MATRIX_COLS 9
|
||||
|
||||
/*
|
||||
* Keyboard Matrix Assignments
|
||||
*
|
||||
* Change this to how you wired your keyboard
|
||||
* COLS: AVR pins used for columns, left to right
|
||||
* ROWS: AVR pins used for rows, top to bottom
|
||||
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
||||
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
||||
*
|
||||
*/
|
||||
#define MATRIX_ROW_PINS { B4, E6, D7, C6, D4, D0, D1, D2, D3 }
|
||||
#define MATRIX_COL_PINS { B5, B6, B2, B3, B1, F7, F6, F5, F4 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
|
||||
#define DIODE_DIRECTION COL2ROW
|
16
keyboards/40percentclub/i75/promicro/promicro.c
Normal file
16
keyboards/40percentclub/i75/promicro/promicro.c
Normal file
@@ -0,0 +1,16 @@
|
||||
/* Copyright 2018
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General 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 "i75.h"
|
47
keyboards/40percentclub/i75/promicro/promicro.h
Normal file
47
keyboards/40percentclub/i75/promicro/promicro.h
Normal file
@@ -0,0 +1,47 @@
|
||||
/* Copyright 2018
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General 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/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "i75.h"
|
||||
#include "quantum.h"
|
||||
|
||||
/* This a shortcut to help you visually see your layout.
|
||||
*
|
||||
* The first section contains all of the arguments representing the physical
|
||||
* layout of the board and position of the keys.
|
||||
*
|
||||
* The second converts the arguments into a two-dimensional array which
|
||||
* represents the switch matrix.
|
||||
*/
|
||||
#define LAYOUT_ortho_5x15( \
|
||||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K10, K11, K12, K13, K14, K15, \
|
||||
K16, K17, K18, K20, K21, K22, K23, K24, K25, K26, K27, K28, K30, K31, K32, \
|
||||
K33, K34, K35, K36, K37, K38, K40, K41, K42, K43, K44, K45, K46, K47, K48, \
|
||||
K50, K51, K52, K53, K54, K55, K56, K57, K58, K60, K61, K62, K63, K64, K65, \
|
||||
K66, K67, K68, K70, K71, K72, K73, K74, K75, K76, K77, K78, K80, K81, K82 \
|
||||
) \
|
||||
{ \
|
||||
{ K00, K01, K02, K03, K04, K05, K06, K07, K08 }, \
|
||||
{ K10, K11, K12, K13, K14, K15, K16, K17, K18 }, \
|
||||
{ K20, K21, K22, K23, K24, K25, K26, K27, K28 }, \
|
||||
{ K30, K31, K32, K33, K34, K35, K36, K37, K38 }, \
|
||||
{ K40, K41, K42, K43, K44, K45, K46, K47, K48 }, \
|
||||
{ K50, K51, K52, K53, K54, K55, K56, K57, K58 }, \
|
||||
{ K60, K61, K62, K63, K64, K65, K66, K67, K68 }, \
|
||||
{ K70, K71, K72, K73, K74, K75, K76, K77, K78 }, \
|
||||
{ K80, K81, K82 } \
|
||||
}
|
58
keyboards/40percentclub/i75/promicro/rules.mk
Normal file
58
keyboards/40percentclub/i75/promicro/rules.mk
Normal file
@@ -0,0 +1,58 @@
|
||||
# MCU name
|
||||
MCU = atmega32u4
|
||||
|
||||
# Processor frequency.
|
||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||
# automatically to create a 32-bit value in your source code.
|
||||
#
|
||||
# This will be an integer division of F_USB below, as it is sourced by
|
||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||
# does not *change* the processor frequency - it should merely be updated to
|
||||
# reflect the processor speed set externally so that the code can use accurate
|
||||
# software delays.
|
||||
F_CPU = 16000000
|
||||
|
||||
|
||||
#
|
||||
# LUFA specific
|
||||
#
|
||||
# Target architecture (see library "Board Types" documentation).
|
||||
ARCH = AVR8
|
||||
|
||||
# Input clock frequency.
|
||||
# This will define a symbol, F_USB, in all source code files equal to the
|
||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||
# at the end, this will be done automatically to create a 32-bit value in your
|
||||
# source code.
|
||||
#
|
||||
# If no clock division is performed on the input clock inside the AVR (via the
|
||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||
F_USB = $(F_CPU)
|
||||
|
||||
# Interrupt driven control endpoint task(+60)
|
||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
|
||||
|
||||
# Bootloader selection
|
||||
# Teensy halfkay
|
||||
# Pro Micro caterina
|
||||
# Atmel DFU atmel-dfu
|
||||
# LUFA DFU lufa-dfu
|
||||
# QMK DFU qmk-dfu
|
||||
# atmega32a bootloadHID
|
||||
BOOTLOADER = caterina
|
||||
|
||||
|
||||
# If you don't know the bootloader type, then you can specify the
|
||||
# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
|
||||
# Teensy halfKay 512
|
||||
# Teensy++ halfKay 1024
|
||||
# Atmel DFU loader 4096
|
||||
# LUFA bootloader 4096
|
||||
# USBaspLoader 2048
|
||||
# OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
28
keyboards/40percentclub/i75/readme.md
Normal file
28
keyboards/40percentclub/i75/readme.md
Normal file
@@ -0,0 +1,28 @@
|
||||
# i75
|
||||
|
||||

|
||||
===
|
||||
|
||||
5x15 grid layout, multiple controllers supported
|
||||
- Pro Micro
|
||||
- PJRC Teensy 2.0
|
||||
- PJRC Teensy LC/3.2 (**NB: Not currently ported**)
|
||||
|
||||
The matrix is a 9x9 grid. This uses all of the available pins on the Pro Micro. The other controllers have pins left over. The serial pins and pins connected to LEDs were avoided if possible.
|
||||
|
||||
* [The original TMK firmware](https://github.com/di0ib/tmk_keyboard/tree/master/keyboard/i75_ProMicro)
|
||||
|
||||
Keyboard Maintainer: QMK Community
|
||||
Hardware Supported: i75 PCB
|
||||
Hardware Availability: [i75 project on 40% Keyboards](http://www.40percent.club/2016/11/i75.html)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make 40percentclub/i75:default
|
||||
|
||||
If you would like to use one of the alternative controllers:
|
||||
|
||||
make 40percentclub/i75/promicro:default
|
||||
make 40percentclub/i75/teensy2:default
|
||||
|
||||
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
23
keyboards/40percentclub/i75/rules.mk
Normal file
23
keyboards/40percentclub/i75/rules.mk
Normal file
@@ -0,0 +1,23 @@
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = yes # Console for debug(+400)
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
NKRO_ENABLE = no # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
|
||||
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||
HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
|
||||
|
||||
LAYOUTS = ortho_5x15
|
||||
DEFAULT_FOLDER = 40percentclub/i75/promicro
|
40
keyboards/40percentclub/i75/teensy2/config.h
Normal file
40
keyboards/40percentclub/i75/teensy2/config.h
Normal file
@@ -0,0 +1,40 @@
|
||||
/* Copyright 2018
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General 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/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 9
|
||||
#define MATRIX_COLS 9
|
||||
|
||||
/*
|
||||
* Keyboard Matrix Assignments
|
||||
*
|
||||
* Change this to how you wired your keyboard
|
||||
* COLS: AVR pins used for columns, left to right
|
||||
* ROWS: AVR pins used for rows, top to bottom
|
||||
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
||||
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
||||
*
|
||||
*/
|
||||
#define MATRIX_ROW_PINS { D3, D2, D1, D0, B7, B3, B2, B1, B0 }
|
||||
#define MATRIX_COL_PINS { C6, C7, D6, D7, B5, B6, F7, F6, F5 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
|
||||
#define DIODE_DIRECTION COL2ROW
|
58
keyboards/40percentclub/i75/teensy2/rules.mk
Normal file
58
keyboards/40percentclub/i75/teensy2/rules.mk
Normal file
@@ -0,0 +1,58 @@
|
||||
# MCU name
|
||||
MCU = atmega32u4
|
||||
|
||||
# Processor frequency.
|
||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||
# automatically to create a 32-bit value in your source code.
|
||||
#
|
||||
# This will be an integer division of F_USB below, as it is sourced by
|
||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||
# does not *change* the processor frequency - it should merely be updated to
|
||||
# reflect the processor speed set externally so that the code can use accurate
|
||||
# software delays.
|
||||
F_CPU = 16000000
|
||||
|
||||
|
||||
#
|
||||
# LUFA specific
|
||||
#
|
||||
# Target architecture (see library "Board Types" documentation).
|
||||
ARCH = AVR8
|
||||
|
||||
# Input clock frequency.
|
||||
# This will define a symbol, F_USB, in all source code files equal to the
|
||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||
# at the end, this will be done automatically to create a 32-bit value in your
|
||||
# source code.
|
||||
#
|
||||
# If no clock division is performed on the input clock inside the AVR (via the
|
||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||
F_USB = $(F_CPU)
|
||||
|
||||
# Interrupt driven control endpoint task(+60)
|
||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
|
||||
|
||||
# Bootloader selection
|
||||
# Teensy halfkay
|
||||
# Pro Micro caterina
|
||||
# Atmel DFU atmel-dfu
|
||||
# LUFA DFU lufa-dfu
|
||||
# QMK DFU qmk-dfu
|
||||
# atmega32a bootloadHID
|
||||
BOOTLOADER = halfkay
|
||||
|
||||
|
||||
# If you don't know the bootloader type, then you can specify the
|
||||
# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
|
||||
# Teensy halfKay 512
|
||||
# Teensy++ halfKay 1024
|
||||
# Atmel DFU loader 4096
|
||||
# LUFA bootloader 4096
|
||||
# USBaspLoader 2048
|
||||
# OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
16
keyboards/40percentclub/i75/teensy2/teensy2.c
Normal file
16
keyboards/40percentclub/i75/teensy2/teensy2.c
Normal file
@@ -0,0 +1,16 @@
|
||||
/* Copyright 2018
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General 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 "i75.h"
|
47
keyboards/40percentclub/i75/teensy2/teensy2.h
Normal file
47
keyboards/40percentclub/i75/teensy2/teensy2.h
Normal file
@@ -0,0 +1,47 @@
|
||||
/* Copyright 2018
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General 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/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "i75.h"
|
||||
#include "quantum.h"
|
||||
|
||||
/* This a shortcut to help you visually see your layout.
|
||||
*
|
||||
* The first section contains all of the arguments representing the physical
|
||||
* layout of the board and position of the keys.
|
||||
*
|
||||
* The second converts the arguments into a two-dimensional array which
|
||||
* represents the switch matrix.
|
||||
*/
|
||||
#define LAYOUT_ortho_5x15( \
|
||||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K10, K11, K12, K13, K14, K15, \
|
||||
K16, K17, K18, K20, K21, K22, K23, K24, K25, K26, K27, K28, K30, K31, K32, \
|
||||
K33, K34, K35, K36, K37, K38, K40, K41, K42, K43, K44, K45, K46, K47, K48, \
|
||||
K50, K51, K52, K53, K54, K55, K56, K57, K58, K60, K61, K62, K63, K64, K65, \
|
||||
K66, K67, K68, K70, K71, K72, K73, K74, K75, K76, K77, K78, K80, K81, K82 \
|
||||
) \
|
||||
{ \
|
||||
{ K00, K01, K02, K03, K04, K05, K06, K07, K08 }, \
|
||||
{ K10, K11, K12, K13, K14, K15, K16, K17, K18 }, \
|
||||
{ K20, K21, K22, K23, K24, K25, K26, K27, K28 }, \
|
||||
{ K30, K31, K32, K33, K34, K35, K36, K37, K38 }, \
|
||||
{ K40, K41, K42, K43, K44, K45, K46, K47, K48 }, \
|
||||
{ K50, K51, K52, K53, K54, K55, K56, K57, K58 }, \
|
||||
{ K60, K61, K62, K63, K64, K65, K66, K67, K68 }, \
|
||||
{ K70, K71, K72, K73, K74, K75, K76, K77, K78 }, \
|
||||
{ K80, K81, K82 } \
|
||||
}
|
221
keyboards/40percentclub/nori/config.h
Normal file
221
keyboards/40percentclub/nori/config.h
Normal file
@@ -0,0 +1,221 @@
|
||||
/* Copyright 2018
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General 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/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x0A0C
|
||||
#define DEVICE_VER 0x0444
|
||||
#define MANUFACTURER di0ib
|
||||
#define PRODUCT The nori Keyboard
|
||||
#define DESCRIPTION A modular compact keyboard
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 4
|
||||
#define MATRIX_COLS 12
|
||||
|
||||
/*
|
||||
* Keyboard Matrix Assignments
|
||||
*
|
||||
* Change this to how you wired your keyboard
|
||||
* COLS: AVR pins used for columns, left to right
|
||||
* ROWS: AVR pins used for rows, top to bottom
|
||||
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
||||
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
||||
*
|
||||
*/
|
||||
#define MATRIX_ROW_PINS { D3, D2, D1, D0 }
|
||||
#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6, D4, C6, D7, E6 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
#define BACKLIGHT_PIN B5
|
||||
//#define BACKLIGHT_BREATHING
|
||||
#define BACKLIGHT_LEVELS 3
|
||||
|
||||
// enable RGB underglow
|
||||
#define RGB_DI_PIN B4
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
#define RGBLED_NUM 10
|
||||
#define RGBLIGHT_HUE_STEP 8
|
||||
#define RGBLIGHT_SAT_STEP 8
|
||||
#define RGBLIGHT_VAL_STEP 8
|
||||
|
||||
/* 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
|
||||
|
||||
/*
|
||||
* 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
|
||||
*/
|
117
keyboards/40percentclub/nori/info.json
Normal file
117
keyboards/40percentclub/nori/info.json
Normal file
@@ -0,0 +1,117 @@
|
||||
{
|
||||
"keyboard_name": "nori",
|
||||
"url": "",
|
||||
"maintainer": "qmk",
|
||||
"width": 12,
|
||||
"height": 4,
|
||||
"layouts": {
|
||||
"LAYOUT_ortho_4x4": {
|
||||
"key_count": 16,
|
||||
"layout": [
|
||||
{ "w": 1, "x": 0, "y": 0 },
|
||||
{ "w": 1, "x": 1, "y": 0 },
|
||||
{ "w": 1, "x": 2, "y": 0 },
|
||||
{ "w": 1, "x": 3, "y": 0 },
|
||||
{ "w": 1, "x": 0, "y": 1 },
|
||||
{ "w": 1, "x": 1, "y": 1 },
|
||||
{ "w": 1, "x": 2, "y": 1 },
|
||||
{ "w": 1, "x": 3, "y": 1 },
|
||||
{ "w": 1, "x": 0, "y": 2 },
|
||||
{ "w": 1, "x": 1, "y": 2 },
|
||||
{ "w": 1, "x": 2, "y": 2 },
|
||||
{ "w": 1, "x": 3, "y": 2 },
|
||||
{ "w": 1, "x": 0, "y": 3 },
|
||||
{ "w": 1, "x": 1, "y": 3 },
|
||||
{ "w": 1, "x": 2, "y": 3 },
|
||||
{ "w": 1, "x": 3, "y": 3 } ]
|
||||
},
|
||||
"LAYOUT_ortho_4x8": {
|
||||
"key_count": 32,
|
||||
"layout": [
|
||||
{ "w": 1, "x": 0, "y": 0 },
|
||||
{ "w": 1, "x": 1, "y": 0 },
|
||||
{ "w": 1, "x": 2, "y": 0 },
|
||||
{ "w": 1, "x": 3, "y": 0 },
|
||||
{ "w": 1, "x": 4, "y": 0 },
|
||||
{ "w": 1, "x": 5, "y": 0 },
|
||||
{ "w": 1, "x": 6, "y": 0 },
|
||||
{ "w": 1, "x": 7, "y": 0 },
|
||||
{ "w": 1, "x": 0, "y": 1 },
|
||||
{ "w": 1, "x": 1, "y": 1 },
|
||||
{ "w": 1, "x": 2, "y": 1 },
|
||||
{ "w": 1, "x": 3, "y": 1 },
|
||||
{ "w": 1, "x": 4, "y": 1 },
|
||||
{ "w": 1, "x": 5, "y": 1 },
|
||||
{ "w": 1, "x": 6, "y": 1 },
|
||||
{ "w": 1, "x": 7, "y": 1 },
|
||||
{ "w": 1, "x": 0, "y": 2 },
|
||||
{ "w": 1, "x": 1, "y": 2 },
|
||||
{ "w": 1, "x": 2, "y": 2 },
|
||||
{ "w": 1, "x": 3, "y": 2 },
|
||||
{ "w": 1, "x": 4, "y": 2 },
|
||||
{ "w": 1, "x": 5, "y": 2 },
|
||||
{ "w": 1, "x": 6, "y": 2 },
|
||||
{ "w": 1, "x": 7, "y": 2 },
|
||||
{ "w": 1, "x": 0, "y": 3 },
|
||||
{ "w": 1, "x": 1, "y": 3 },
|
||||
{ "w": 1, "x": 2, "y": 3 },
|
||||
{ "w": 1, "x": 3, "y": 3 },
|
||||
{ "w": 1, "x": 4, "y": 3 },
|
||||
{ "w": 1, "x": 5, "y": 3 },
|
||||
{ "w": 1, "x": 6, "y": 3 },
|
||||
{ "w": 1, "x": 7, "y": 3 } ]
|
||||
},
|
||||
"LAYOUT_ortho_4x12": {
|
||||
"key_count": 48,
|
||||
"layout": [
|
||||
{ "w": 1, "x": 0, "y": 0 },
|
||||
{ "w": 1, "x": 1, "y": 0 },
|
||||
{ "w": 1, "x": 2, "y": 0 },
|
||||
{ "w": 1, "x": 3, "y": 0 },
|
||||
{ "w": 1, "x": 4, "y": 0 },
|
||||
{ "w": 1, "x": 5, "y": 0 },
|
||||
{ "w": 1, "x": 6, "y": 0 },
|
||||
{ "w": 1, "x": 7, "y": 0 },
|
||||
{ "w": 1, "x": 8, "y": 0 },
|
||||
{ "w": 1, "x": 9, "y": 0 },
|
||||
{ "w": 1, "x": 10, "y": 0 },
|
||||
{ "w": 1, "x": 11, "y": 0 },
|
||||
{ "w": 1, "x": 0, "y": 1 },
|
||||
{ "w": 1, "x": 1, "y": 1 },
|
||||
{ "w": 1, "x": 2, "y": 1 },
|
||||
{ "w": 1, "x": 3, "y": 1 },
|
||||
{ "w": 1, "x": 4, "y": 1 },
|
||||
{ "w": 1, "x": 5, "y": 1 },
|
||||
{ "w": 1, "x": 6, "y": 1 },
|
||||
{ "w": 1, "x": 7, "y": 1 },
|
||||
{ "w": 1, "x": 8, "y": 1 },
|
||||
{ "w": 1, "x": 9, "y": 1 },
|
||||
{ "w": 1, "x": 10, "y": 1 },
|
||||
{ "w": 1, "x": 11, "y": 1 },
|
||||
{ "w": 1, "x": 0, "y": 2 },
|
||||
{ "w": 1, "x": 1, "y": 2 },
|
||||
{ "w": 1, "x": 2, "y": 2 },
|
||||
{ "w": 1, "x": 3, "y": 2 },
|
||||
{ "w": 1, "x": 4, "y": 2 },
|
||||
{ "w": 1, "x": 5, "y": 2 },
|
||||
{ "w": 1, "x": 6, "y": 2 },
|
||||
{ "w": 1, "x": 7, "y": 2 },
|
||||
{ "w": 1, "x": 8, "y": 2 },
|
||||
{ "w": 1, "x": 9, "y": 2 },
|
||||
{ "w": 1, "x": 10, "y": 2 },
|
||||
{ "w": 1, "x": 11, "y": 2 },
|
||||
{ "w": 1, "x": 0, "y": 3 },
|
||||
{ "w": 1, "x": 1, "y": 3 },
|
||||
{ "w": 1, "x": 2, "y": 3 },
|
||||
{ "w": 1, "x": 3, "y": 3 },
|
||||
{ "w": 1, "x": 4, "y": 3 },
|
||||
{ "w": 1, "x": 5, "y": 3 },
|
||||
{ "w": 1, "x": 6, "y": 3 },
|
||||
{ "w": 1, "x": 7, "y": 3 },
|
||||
{ "w": 1, "x": 8, "y": 3 },
|
||||
{ "w": 1, "x": 9, "y": 3 },
|
||||
{ "w": 1, "x": 10, "y": 3 },
|
||||
{ "w": 1, "x": 11, "y": 3 } ]
|
||||
}
|
||||
}
|
||||
}
|
23
keyboards/40percentclub/nori/keymaps/default/config.h
Normal file
23
keyboards/40percentclub/nori/keymaps/default/config.h
Normal file
@@ -0,0 +1,23 @@
|
||||
/* Copyright 2018
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General 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/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
// place overrides here
|
||||
#define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
|
||||
SONG(COLEMAK_SOUND), \
|
||||
SONG(DVORAK_SOUND) \
|
||||
}
|
159
keyboards/40percentclub/nori/keymaps/default/keymap.c
Normal file
159
keyboards/40percentclub/nori/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,159 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||
// entirely and just use numbers.
|
||||
#define _QWERTY 0
|
||||
#define _COLEMAK 1
|
||||
#define _DVORAK 2
|
||||
#define _LOWER 3
|
||||
#define _RAISE 4
|
||||
#define _ADJUST 16
|
||||
|
||||
enum custom_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
COLEMAK,
|
||||
DVORAK,
|
||||
};
|
||||
|
||||
#define LOWER MO(_LOWER)
|
||||
#define RAISE MO(_RAISE)
|
||||
#define ADJUST MO(_ADJUST)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Qwerty
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Esc | A | S | D | F | G | H | J | K | L | ; | " |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* |Adjust| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = LAYOUT_ortho_4x12(
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
|
||||
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
|
||||
ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
|
||||
),
|
||||
|
||||
/* Colemak
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Esc | A | R | S | T | D | H | N | E | I | O | ' |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_COLEMAK] = LAYOUT_ortho_4x12( \
|
||||
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \
|
||||
KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
|
||||
ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
|
||||
),
|
||||
|
||||
/* Dvorak
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Tab | ' | , | . | P | Y | F | G | C | R | L | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Esc | A | O | E | U | I | D | H | T | N | S | / |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_DVORAK] = LAYOUT_ortho_4x12( \
|
||||
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \
|
||||
KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \
|
||||
KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \
|
||||
ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
|
||||
),
|
||||
|
||||
/* Lower
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_LOWER] = LAYOUT_ortho_4x12( \
|
||||
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \
|
||||
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
|
||||
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
|
||||
),
|
||||
|
||||
/* Raise
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_RAISE] = LAYOUT_ortho_4x12( \
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \
|
||||
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
|
||||
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
|
||||
),
|
||||
|
||||
/* Adjust (Lower + Raise)
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | Reset| | | | | | | | | | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_ADJUST] = LAYOUT_ortho_4x12( \
|
||||
_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \
|
||||
_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||
)
|
||||
|
||||
|
||||
};
|
||||
|
||||
uint32_t layer_state_set_user(uint32_t state) {
|
||||
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
case COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_COLEMAK);
|
||||
}
|
||||
return false;
|
||||
case DVORAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_DVORAK);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
1
keyboards/40percentclub/nori/keymaps/default/readme.md
Normal file
1
keyboards/40percentclub/nori/keymaps/default/readme.md
Normal file
@@ -0,0 +1 @@
|
||||
# The default keymap
|
21
keyboards/40percentclub/nori/keymaps/macro/config.h
Normal file
21
keyboards/40percentclub/nori/keymaps/macro/config.h
Normal file
@@ -0,0 +1,21 @@
|
||||
/* Copyright 2018
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General 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/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
// place overrides here
|
||||
#undef RGBLED_NUM
|
||||
#define RGBLED_NUM 4
|
41
keyboards/40percentclub/nori/keymaps/macro/keymap.c
Normal file
41
keyboards/40percentclub/nori/keymaps/macro/keymap.c
Normal file
@@ -0,0 +1,41 @@
|
||||
/* Copyright 2018
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General 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_ortho_4x4( /* Base */
|
||||
KC_INT1, KC_INT2, KC_INT3, KC_INT5, \
|
||||
KC_F13, KC_F14, KC_F15, KC_F16, \
|
||||
KC_F17, KC_F18, KC_F19, KC_F20, \
|
||||
KC_F21, KC_F22, KC_F23, KC_F24 \
|
||||
),
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
|
||||
}
|
||||
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
|
||||
}
|
1
keyboards/40percentclub/nori/keymaps/macro/readme.md
Normal file
1
keyboards/40percentclub/nori/keymaps/macro/readme.md
Normal file
@@ -0,0 +1 @@
|
||||
# The default single board macro keymap for nori
|
43
keyboards/40percentclub/nori/nori.c
Normal file
43
keyboards/40percentclub/nori/nori.c
Normal file
@@ -0,0 +1,43 @@
|
||||
/* Copyright 2018
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General 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 "nori.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);
|
||||
}
|
69
keyboards/40percentclub/nori/nori.h
Normal file
69
keyboards/40percentclub/nori/nori.h
Normal file
@@ -0,0 +1,69 @@
|
||||
/* Copyright 2018
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General 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/>.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "quantum.h"
|
||||
#define ___ KC_NO
|
||||
|
||||
#define LAYOUT_ortho_4x4( \
|
||||
K00, K01, K02, K03, \
|
||||
K10, K11, K12, K13, \
|
||||
K20, K21, K22, K23, \
|
||||
K30, K31, K32, K33 \
|
||||
) \
|
||||
{ \
|
||||
{ K00, K01, K02, K03, ___, ___, ___, ___, ___, ___, ___, ___ }, \
|
||||
{ K10, K11, K12, K13, ___, ___, ___, ___, ___, ___, ___, ___ }, \
|
||||
{ K20, K21, K22, K23, ___, ___, ___, ___, ___, ___, ___, ___ }, \
|
||||
{ K30, K31, K32, K33, ___, ___, ___, ___, ___, ___, ___, ___ } \
|
||||
}
|
||||
#define LAYOUT_ortho_4x8( \
|
||||
K00, K01, K02, K03, K04, K05, K06, K07, \
|
||||
K10, K11, K12, K13, K14, K15, K16, K17, \
|
||||
K20, K21, K22, K23, K24, K25, K26, K27, \
|
||||
K30, K31, K32, K33, K34, K35, K36, K37\
|
||||
) \
|
||||
{ \
|
||||
{ K00, K01, K02, K03, K04, K05, K06, K07, ___, ___, ___, ___ }, \
|
||||
{ K10, K11, K12, K13, K14, K15, K16, K17, ___, ___, ___, ___ }, \
|
||||
{ K20, K21, K22, K23, K24, K25, K26, K27, ___, ___, ___, ___ }, \
|
||||
{ K30, K31, K32, K33, K34, K35, K35, K37, ___, ___, ___, ___ } \
|
||||
}
|
||||
#define LAYOUT_ortho_4x12( \
|
||||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0a, K0b, \
|
||||
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1a, K1b, \
|
||||
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b, \
|
||||
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3a, K3b \
|
||||
) \
|
||||
{ \
|
||||
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0a, K0b }, \
|
||||
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1a, K1b }, \
|
||||
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b }, \
|
||||
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3a, K3b } \
|
||||
}
|
||||
|
||||
#define LAYOUT_kc_ortho_4x12( \
|
||||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0a, K0b, \
|
||||
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1a, K1b, \
|
||||
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b, \
|
||||
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3a, K3b \
|
||||
) \
|
||||
{ \
|
||||
{ KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, KC_##K09, KC_##K0a, KC_##K0b }, \
|
||||
{ KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, KC_##K19, KC_##K1a, KC_##K1b }, \
|
||||
{ KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, KC_##K29, KC_##K2a, KC_##K2b }, \
|
||||
{ KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, KC_##K38, KC_##K39, KC_##K3a, KC_##K3b } \
|
||||
}
|
18
keyboards/40percentclub/nori/readme.md
Normal file
18
keyboards/40percentclub/nori/readme.md
Normal file
@@ -0,0 +1,18 @@
|
||||
# nori
|
||||
|
||||

|
||||
===
|
||||
|
||||
A 4x12 matrix using 3 modular 4x4 matrix boards and powered by a Pro Micro.
|
||||
|
||||
this one is using a Pro Micro. The Pro Micro has less data pins available so only 3 boards can be connected instead of 4. There are 2 pins left over, I used one (B5) for a backlight circuit like on a Gherkin. The other data pin (B4) is left for possible use with a WS2812B strip.
|
||||
|
||||
Keyboard Maintainer: QMK Community
|
||||
Hardware Supported: nori PCB
|
||||
Hardware Availability: [nori project on 40% Keyboards](https://www.40percent.club/2018/10/nori.html)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make 40percentclub/nori:default
|
||||
|
||||
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
82
keyboards/40percentclub/nori/rules.mk
Normal file
82
keyboards/40percentclub/nori/rules.mk
Normal file
@@ -0,0 +1,82 @@
|
||||
# MCU name
|
||||
MCU = atmega32u4
|
||||
|
||||
# Processor frequency.
|
||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||
# automatically to create a 32-bit value in your source code.
|
||||
#
|
||||
# This will be an integer division of F_USB below, as it is sourced by
|
||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||
# does not *change* the processor frequency - it should merely be updated to
|
||||
# reflect the processor speed set externally so that the code can use accurate
|
||||
# software delays.
|
||||
F_CPU = 16000000
|
||||
|
||||
|
||||
#
|
||||
# LUFA specific
|
||||
#
|
||||
# Target architecture (see library "Board Types" documentation).
|
||||
ARCH = AVR8
|
||||
|
||||
# Input clock frequency.
|
||||
# This will define a symbol, F_USB, in all source code files equal to the
|
||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||
# at the end, this will be done automatically to create a 32-bit value in your
|
||||
# source code.
|
||||
#
|
||||
# If no clock division is performed on the input clock inside the AVR (via the
|
||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||
F_USB = $(F_CPU)
|
||||
|
||||
# Interrupt driven control endpoint task(+60)
|
||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
|
||||
|
||||
# Bootloader selection
|
||||
# Teensy halfkay
|
||||
# Pro Micro caterina
|
||||
# Atmel DFU atmel-dfu
|
||||
# LUFA DFU lufa-dfu
|
||||
# QMK DFU qmk-dfu
|
||||
# atmega32a bootloadHID
|
||||
BOOTLOADER = caterina
|
||||
|
||||
|
||||
# If you don't know the bootloader type, then you can specify the
|
||||
# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
|
||||
# Teensy halfKay 512
|
||||
# Teensy++ halfKay 1024
|
||||
# Atmel DFU loader 4096
|
||||
# LUFA bootloader 4096
|
||||
# USBaspLoader 2048
|
||||
# OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||
|
||||
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default
|
||||
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
|
||||
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||
HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
|
||||
|
||||
LAYOUTS = ortho_4x4 ortho_4x8 ortho_4x12
|
@@ -1,3 +0,0 @@
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
||||
|
@@ -1,3 +0,0 @@
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
||||
|
35
keyboards/alpha/keymaps/vderm/README.md
Normal file
35
keyboards/alpha/keymaps/vderm/README.md
Normal file
@@ -0,0 +1,35 @@
|
||||
# Alpha 28-Key Keyboard Alternate Keymap
|
||||
Alternate keymap for [Alpha 28-key keyboard](https://github.com/qmk/qmk_firmware/tree/master/keyboards/alpha).
|
||||
|
||||
## How-to
|
||||
Assuming you've followed all the instructions from the original post, put my "keymap.c" file in "$qmk-firmware-folder$/keyboards/alpha/keymaps/vderm/" and then run your make command ("make alpha:vderm" while in $qmk-firmware-folder$ where this folder is what you've downloaded from the official github page) to compile the hex file to upload to your microcontroller. I've also uploaded my hex file.
|
||||
|
||||
## Description
|
||||
Instead of going up and down layers like in the original Alpha keyboard, I've made the bottom row keys all have alternate functions:
|
||||
+ Like in the original Alpha28 keymap, the 2U spacebar is a shift key when held down and space when tapped
|
||||
+ Z and M are Ctrl keys when held down or Z and M when tapped
|
||||
+ X and N are Alt keys
|
||||
+ C activates the function keys layer (arrows, page up/dn, esc, tab, etc.)
|
||||
+ V activates the characters and numbers layer
|
||||
+ C and V combined activated the F-keys layer (F1, F2, F3, etc.)
|
||||
+ The enter key is an enter key in the home layer, backspace in the function keys and characters/numbers layer and a delete in the F-keys layer
|
||||
+ While in the other layers, the bottom row acts like a "regular" bottom modified row: ctrl, alt, winkey
|
||||
|
||||
## Keymap
|
||||

|
||||
|
||||
## Build Images
|
||||
Here is my keyboard.
|
||||
+ Switches: Aliaz Silent Switches (Tactile), PCB mount, 80g from [KBDfans](https://kbdfans.cn/collections/aliaz-switches/products/pre-orderaliaz-silent-switch-tactile?variant=2519899832333)
|
||||
+ PCB board: ordered from JLCPCB, in white
|
||||
+ Keycaps: ebay, can't find link :S
|
||||
+ Bottom plate: I cut a piece of canary wood that was laying around, needs to be varnished; I also need to actually screw the pcb to the wood instead of relying on double-sided tape
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
Good luck on your build!
|
||||
//vderm
|
1422
keyboards/alpha/keymaps/vderm/alpha_vderm.hex
Normal file
1422
keyboards/alpha/keymaps/vderm/alpha_vderm.hex
Normal file
File diff suppressed because it is too large
Load Diff
34
keyboards/alpha/keymaps/vderm/keymap.c
Normal file
34
keyboards/alpha/keymaps/vderm/keymap.c
Normal file
@@ -0,0 +1,34 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
#define HOME 0
|
||||
#define FN 1
|
||||
#define FNCHAR 2
|
||||
#define FKEYS 3
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[HOME] = LAYOUT(
|
||||
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,
|
||||
KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT,
|
||||
MT(MOD_LCTL, KC_Z), MT(MOD_LALT, KC_X), LT(1, KC_C), LT(2, KC_V), MT(MOD_LSFT, KC_SPC), MT(MOD_RGUI,KC_B), MT(MOD_RALT, KC_N), MT(MOD_RCTL, KC_M)),
|
||||
|
||||
[FN] = LAYOUT(
|
||||
KC_ESC, KC__MUTE, KC_VOLD, KC_VOLU, KC_MPLY, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_NO,
|
||||
KC_TAB, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_BSPC,
|
||||
KC_LCTL, KC_LALT, KC_TRNS, MO(3), MT(MOD_LSFT, KC_SPC), KC_RGUI, KC_RALT, KC_RCTL),
|
||||
|
||||
[FNCHAR] = LAYOUT(
|
||||
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,
|
||||
KC_GRV,KC_NO,KC_MINS,KC_EQL,KC_BSLS,KC_LBRC,KC_RBRC,KC_SCLN,KC_QUOT,KC_BSPC,
|
||||
KC_LCTL, KC_LALT, MO(3), KC_TRNS, MT(MOD_LSFT, KC_SPC), KC_COMM, KC_DOT, KC_SLSH),
|
||||
|
||||
[FKEYS] = LAYOUT(
|
||||
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10,
|
||||
KC_F11,KC_F12,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_DEL,
|
||||
KC_LCTL, KC_LALT, KC_TRNS, KC_TRNS, MT(MOD_LSFT, KC_SPC), KC_RGUI, KC_RALT, KC_RCTL),
|
||||
};
|
||||
|
||||
void matrix_init_user(void) {
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
}
|
@@ -94,16 +94,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
K34, K35, K44, K45, K54, K55, K64, K65, K75, K05, K15, K16, K25, K24, \
|
||||
K32, K33, K43, K52, K53, K63, K73, K74, K03, K04, K13, K14, K23, \
|
||||
K31, K42, K51, K61, K62, K71, K72, K01, K02, K11, K12, K21, \
|
||||
K30, K40, K50, K60, K70, K00, K20 \
|
||||
K30, K40, K50, K60, K00, K10, K20 \
|
||||
) { \
|
||||
{ K00, K01, K02, K03, K04, K05, K06, K07 }, \
|
||||
{ KC_NO, K11, K12, K13, K14, K15, K16, K17 }, \
|
||||
{ K10, K11, K12, K13, K14, K15, K16, K17 }, \
|
||||
{ K20, K21, KC_NO, K23, K24, K25, KC_NO, K27 }, \
|
||||
{ K30, K31, K32, K33, K34, K35, K36, K37 }, \
|
||||
{ K40, KC_NO, K42, K43, K44, K45, K46, K47 }, \
|
||||
{ K50, K51, K52, K53, K54, K55, K56, K57 }, \
|
||||
{ K60, K61, K62, K63, K64, K65, K66, K67 }, \
|
||||
{ K70, K71, K72, K73, K74, K75, K76, K77 } \
|
||||
{ KC_NO, K71, K72, K73, K74, K75, K76, K77 } \
|
||||
}
|
||||
|
||||
#define LAYOUT_kc( \
|
||||
|
@@ -1,31 +1,32 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
enum keyboard_layers {
|
||||
_BL = 0, // Base Layer
|
||||
_FL // Function Layer
|
||||
};
|
||||
|
||||
// Custom #defined keycodes (shorter macros for readability)
|
||||
#define KC_CTES CTL_T(KC_ESC)
|
||||
#define KC_RSUP RSFT_T(KC_UP)
|
||||
#define KC_FNDN LT(_FL, KC_DOWN)
|
||||
#define KC_RGLT RCMD_T(KC_LEFT)
|
||||
#define KC_RCRT RCTL_T(KC_RIGHT)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* 0: qwerty */
|
||||
LAYOUT_all(
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, _______, KC_BSPC,
|
||||
KC_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,
|
||||
CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
||||
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RSFT_T(KC_UP), _______,
|
||||
MO(1), KC_LALT, KC_LGUI, KC_SPC, _______, RGUI_T(KC_LEFT), RALT_T(KC_DOWN), LT(2, KC_RIGHT)
|
||||
[_BL] = LAYOUT_aek_103(
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
|
||||
KC_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_CTES, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSUP,
|
||||
MO(_FL), KC_LALT, KC_LGUI, KC_SPC, KC_RGLT, KC_FNDN, KC_RCRT
|
||||
),
|
||||
/* 1: fn1 */
|
||||
LAYOUT_all(
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, _______,
|
||||
_______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_END, KC_PGDOWN, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
/* 2: fn2 */
|
||||
LAYOUT_all(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET,
|
||||
_______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______,
|
||||
_______, _______, _______, DEBUG, _______, _______, _______, _______, _______, _______, KC_SCROLLLOCK, KC_PAUSE, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
}
|
||||
;
|
||||
[_FL] = LAYOUT_aek_103(
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL,
|
||||
_______, KC_HOME, KC_UP, KC_END, _______, _______, _______, _______, KC_MUTE, _______, _______, KC_PGDN, KC_PGUP, RESET,
|
||||
_______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, KC_SLCK, KC_VOLD, KC_VOLU, KC_PAUS, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______
|
||||
)
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {};
|
||||
|
@@ -10,6 +10,3 @@ AUDIO_ENABLE ?= no
|
||||
RGBLIGHT_ENABLE ?= yes
|
||||
UNICODE_ENABLE ?= yes
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
||||
|
@@ -18,7 +18,3 @@ RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
||||
|
@@ -18,6 +18,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
||||
|
121
keyboards/at101_blackheart/info.json
Normal file
121
keyboards/at101_blackheart/info.json
Normal file
@@ -0,0 +1,121 @@
|
||||
{
|
||||
"keyboard_name": "AT101 Blackheart PCB",
|
||||
"keyboard_folder": "at101_blackheart",
|
||||
"url": "https://deskthority.net/group-buys-f50/programmable-vintage-board-pcbs-omnikey-at101-and-z-150-t19325.html",
|
||||
"maintainer": "qmk, blindassassin111",
|
||||
"width": 22.5,
|
||||
"height": 6.5,
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
{"label":"Esc", "x":0, "y":0},
|
||||
{"label":"F1", "x":2, "y":0},
|
||||
{"label":"F2", "x":3, "y":0},
|
||||
{"label":"F3", "x":4, "y":0},
|
||||
{"label":"F4", "x":5, "y":0},
|
||||
{"label":"F5", "x":6.5, "y":0},
|
||||
{"label":"F6", "x":7.5, "y":0},
|
||||
{"label":"F7", "x":8.5, "y":0},
|
||||
{"label":"F8", "x":9.5, "y":0},
|
||||
{"label":"F9", "x":11, "y":0},
|
||||
{"label":"F10", "x":12, "y":0},
|
||||
{"label":"F11", "x":13, "y":0},
|
||||
{"label":"F12", "x":14, "y":0},
|
||||
{"label":"Print Screen", "x":15.25, "y":0},
|
||||
{"label":"Scroll Lock", "x":16.25, "y":0},
|
||||
{"label":"Pause", "x":17.25, "y":0},
|
||||
{"label":"Grave", "x":0, "y":1.5},
|
||||
{"label":"1", "x":1, "y":1.5},
|
||||
{"label":"2", "x":2, "y":1.5},
|
||||
{"label":"3", "x":3, "y":1.5},
|
||||
{"label":"4", "x":4, "y":1.5},
|
||||
{"label":"5", "x":5, "y":1.5},
|
||||
{"label":"6", "x":6, "y":1.5},
|
||||
{"label":"7", "x":7, "y":1.5},
|
||||
{"label":"8", "x":8, "y":1.5},
|
||||
{"label":"9", "x":9, "y":1.5},
|
||||
{"label":"0", "x":10, "y":1.5},
|
||||
{"label":"-", "x":11, "y":1.5},
|
||||
{"label":"=", "x":12, "y":1.5},
|
||||
{"label":"Backspace", "x":13, "y":1.5, "w":2},
|
||||
{"label":"Insert", "x":15.25, "y":1.5},
|
||||
{"label":"Home", "x":16.25, "y":1.5},
|
||||
{"label":"Page Up", "x":17.25, "y":1.5},
|
||||
{"label":"Num Lock", "x":18.5, "y":1.5},
|
||||
{"label":"Keypad /", "x":19.5, "y":1.5},
|
||||
{"label":"Keypad *", "x":20.5, "y":1.5},
|
||||
{"label":"Keypad -", "x":21.5, "y":1.5},
|
||||
{"label":"Tab", "x":0, "y":2.5, "w":1.5},
|
||||
{"label":"Q", "x":1.5, "y":2.5},
|
||||
{"label":"W", "x":2.5, "y":2.5},
|
||||
{"label":"E", "x":3.5, "y":2.5},
|
||||
{"label":"R", "x":4.5, "y":2.5},
|
||||
{"label":"T", "x":5.5, "y":2.5},
|
||||
{"label":"Y", "x":6.5, "y":2.5},
|
||||
{"label":"U", "x":7.5, "y":2.5},
|
||||
{"label":"I", "x":8.5, "y":2.5},
|
||||
{"label":"O", "x":9.5, "y":2.5},
|
||||
{"label":"P", "x":10.5, "y":2.5},
|
||||
{"label":"LBracket", "x":11.5, "y":2.5},
|
||||
{"label":"RBracket]", "x":12.5, "y":2.5},
|
||||
{"label":"Backslash", "x":13.5, "y":2.5, "w":1.5},
|
||||
{"label":"Delete", "x":15.25, "y":2.5},
|
||||
{"label":"End", "x":16.25, "y":2.5},
|
||||
{"label":"Page Down", "x":17.25, "y":2.5},
|
||||
{"label":"Keypad 7", "x":18.5, "y":2.5},
|
||||
{"label":"Keypad 8", "x":19.5, "y":2.5},
|
||||
{"label":"Keypad 9", "x":20.5, "y":2.5},
|
||||
{"label":"Keypad +", "x":21.5, "y":2.5},
|
||||
{"label":"Caps Lock", "x":0, "y":3.5, "w":1.75},
|
||||
{"label":"A", "x":1.75, "y":3.5},
|
||||
{"label":"S", "x":2.75, "y":3.5},
|
||||
{"label":"D", "x":3.75, "y":3.5},
|
||||
{"label":"F", "x":4.75, "y":3.5},
|
||||
{"label":"G", "x":5.75, "y":3.5},
|
||||
{"label":"H", "x":6.75, "y":3.5},
|
||||
{"label":"J", "x":7.75, "y":3.5},
|
||||
{"label":"K", "x":8.75, "y":3.5},
|
||||
{"label":"L", "x":9.75, "y":3.5},
|
||||
{"label":"Semicolon", "x":10.75, "y":3.5},
|
||||
{"label":"Quote", "x":11.75, "y":3.5},
|
||||
{"label":"Enter", "x":12.75, "y":3.5, "w":2.25},
|
||||
{"label":"Keypad 4", "x":18.5, "y":3.5},
|
||||
{"label":"Keypad 5", "x":19.5, "y":3.5},
|
||||
{"label":"Keypad 6", "x":20.5, "y":3.5},
|
||||
{"label":"Keypad =", "x":21.5, "y":3.5},
|
||||
{"label":"LShift", "x":0, "y":4.5, "w":1.25},
|
||||
{"label":"ISO Backslash", "x":1.25, "y":4.5},
|
||||
{"label":"Z", "x":2.25, "y":4.5},
|
||||
{"label":"X", "x":3.25, "y":4.5},
|
||||
{"label":"C", "x":4.25, "y":4.5},
|
||||
{"label":"V", "x":5.25, "y":4.5},
|
||||
{"label":"B", "x":6.25, "y":4.5},
|
||||
{"label":"N", "x":7.25, "y":4.5},
|
||||
{"label":"M", "x":8.25, "y":4.5},
|
||||
{"label":"Comma", "x":9.25, "y":4.5},
|
||||
{"label":"Period", "x":10.25, "y":4.5},
|
||||
{"label":"Slash", "x":11.25, "y":4.5},
|
||||
{"label":"RShift", "x":12.25, "y":4.5, "w":1.75},
|
||||
{"label":"Fn", "x":14, "y":4.5},
|
||||
{"label":"Up", "x":16.25, "y":4.5},
|
||||
{"label":"Keypad 1", "x":18.5, "y":4.5},
|
||||
{"label":"Keypad 2", "x":19.5, "y":4.5},
|
||||
{"label":"Keypad 3", "x":20.5, "y":4.5},
|
||||
{"label":"Keypad Enter", "x":21.5, "y":4.5, "h":2},
|
||||
{"label":"LCtrl", "x":0, "y":5.5, "w":1.25},
|
||||
{"label":"LGUI", "x":1.25, "y":5.5, "w":1.25},
|
||||
{"label":"LAlt", "x":2.5, "y":5.5, "w":1.25},
|
||||
{"label":"Space", "x":3.75, "y":5.5, "w":6.25},
|
||||
{"label":"RAlt", "x":10, "y":5.5, "w":1.25},
|
||||
{"label":"RGUI", "x":11.25, "y":5.5, "w":1.25},
|
||||
{"label":"Menu", "x":12.5, "y":5.5, "w":1.25},
|
||||
{"label":"RCtrl", "x":13.75, "y":5.5, "w":1.25},
|
||||
{"label":"Left", "x":15.25, "y":5.5},
|
||||
{"label":"Down", "x":16.25, "y":5.5},
|
||||
{"label":"Right", "x":17.25, "y":5.5},
|
||||
{"label":"Keypad 0", "x":18.5, "y":5.5, "w":2},
|
||||
{"label":"Keypad .", "x":20.5, "y":5.5}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,5 +1,6 @@
|
||||
AT101 Blackheart PCB
|
||||
===
|
||||
# AT101 Blackheart PCB
|
||||
|
||||

|
||||
|
||||
A replacement PCB for AT101 keyboards.
|
||||
|
||||
@@ -11,4 +12,4 @@ Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make at101_blackheart: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.
|
||||
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||
|
@@ -61,7 +61,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#define RGB_DI_PIN F5 // The pin the LED strip is connected to
|
||||
#define RGBLED_NUM 6 // Number of LEDs in your strip
|
||||
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
#define QMK_ESC_OUTPUT B7 // usually COL
|
||||
#define QMK_ESC_INPUT B3 // usually ROW
|
||||
#define QMK_LED E6
|
||||
|
@@ -13,6 +13,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
||||
|
@@ -1,16 +1,153 @@
|
||||
{
|
||||
"keyboard_name": "Baguette",
|
||||
"url": "",
|
||||
"maintainer": "qmk",
|
||||
"bootloader": "atmel-dfu",
|
||||
"width": 19.75,
|
||||
"height": 6.5,
|
||||
"layouts": {
|
||||
"LAYOUT_ansi": {
|
||||
"layout": [{"label":"~", "x":3.25, "y":1.5}, {"label":"!", "x":4.25, "y":1.5}, {"label":"@", "x":5.25, "y":1.5}, {"label":"#", "x":6.25, "y":1.5}, {"label":"$", "x":7.25, "y":1.5}, {"label":"%", "x":8.25, "y":1.5}, {"label":"^", "x":9.25, "y":1.5}, {"label":"&", "x":10.25, "y":1.5}, {"label":"*", "x":11.25, "y":1.5}, {"label":"(", "x":12.25, "y":1.5}, {"label":")", "x":13.25, "y":1.5}, {"label":"_", "x":14.25, "y":1.5}, {"label":"+", "x":15.25, "y":1.5}, {"label":"|", "x":16.25, "y":1.5}, {"label":"Del", "x":17.25, "y":1.5}, {"label":"Insert", "x":18.75, "y":1.5}, {"label":"Tab", "x":3.25, "y":2.5, "w":1.5}, {"label":"Q", "x":4.75, "y":2.5}, {"label":"W", "x":5.75, "y":2.5}, {"label":"E", "x":6.75, "y":2.5}, {"label":"R", "x":7.75, "y":2.5}, {"label":"T", "x":8.75, "y":2.5}, {"label":"Y", "x":9.75, "y":2.5}, {"label":"U", "x":10.75, "y":2.5}, {"label":"I", "x":11.75, "y":2.5}, {"label":"O", "x":12.75, "y":2.5}, {"label":"P", "x":13.75, "y":2.5}, {"label":"{", "x":14.75, "y":2.5}, {"label":"}", "x":15.75, "y":2.5}, {"label":"|", "x":16.75, "y":2.5, "w":1.5}, {"label":"Delete", "x":18.75, "y":2.5}, {"label":"Control", "x":3.25, "y":3.5, "w":1.75}, {"label":"A", "x":5, "y":3.5}, {"label":"S", "x":6, "y":3.5}, {"label":"D", "x":7, "y":3.5}, {"label":"F", "x":8, "y":3.5}, {"label":"G", "x":9, "y":3.5}, {"label":"H", "x":10, "y":3.5}, {"label":"J", "x":11, "y":3.5}, {"label":"K", "x":12, "y":3.5}, {"label":"L", "x":13, "y":3.5}, {"label":":", "x":14, "y":3.5}, {"label":"\"", "x":15, "y":3.5}, {"label":"Enter", "x":16, "y":3.5, "w":2.25}, {"x":3.25, "y":4.5, "w":1.25}, {"x":4.5, "y":4.5}, {"label":"Z", "x":5.5, "y":4.5}, {"label":"X", "x":6.5, "y":4.5}, {"label":"C", "x":7.5, "y":4.5}, {"label":"V", "x":8.5, "y":4.5}, {"label":"B", "x":9.5, "y":4.5}, {"label":"N", "x":10.5, "y":4.5}, {"label":"M", "x":11.5, "y":4.5}, {"label":"<", "x":12.5, "y":4.5}, {"label":">", "x":13.5, "y":4.5}, {"label":"?", "x":14.5, "y":4.5}, {"x":15.5, "y":4.5}, {"label":"Shift", "x":16.5, "y":4.5, "w":1.25}, {"label":"\u2191", "x":17.75, "y":4.5}, {"label":"Win", "x":4.5, "y":5.5}, {"label":"Alt", "x":5.5, "y":5.5, "w":1.25}, {"x":6.75, "y":5.5, "w":6.25}, {"label":"Ctrl", "x":13, "y":5.5, "w":1.25}, {"label":"Fn", "x":14.25, "y":5.5}, {"label":"\u2190", "x":16.75, "y":5.5}, {"label":"\u2193", "x":17.75, "y":5.5}, {"label":"\u2192", "x":18.75, "y":5.5}]
|
||||
},
|
||||
"LAYOUT_iso": {
|
||||
"layout": [{"label":"~", "x":3.25, "y":1.5}, {"label":"!", "x":4.25, "y":1.5}, {"label":"@", "x":5.25, "y":1.5}, {"label":"#", "x":6.25, "y":1.5}, {"label":"$", "x":7.25, "y":1.5}, {"label":"%", "x":8.25, "y":1.5}, {"label":"^", "x":9.25, "y":1.5}, {"label":"&", "x":10.25, "y":1.5}, {"label":"*", "x":11.25, "y":1.5}, {"label":"(", "x":12.25, "y":1.5}, {"label":")", "x":13.25, "y":1.5}, {"label":"_", "x":14.25, "y":1.5}, {"label":"+", "x":15.25, "y":1.5}, {"label":"|", "x":16.25, "y":1.5}, {"label":"Del", "x":17.25, "y":1.5}, {"label":"Insert", "x":18.75, "y":1.5}, {"label":"Tab", "x":3.25, "y":2.5, "w":1.5}, {"label":"Q", "x":4.75, "y":2.5}, {"label":"W", "x":5.75, "y":2.5}, {"label":"E", "x":6.75, "y":2.5}, {"label":"R", "x":7.75, "y":2.5}, {"label":"T", "x":8.75, "y":2.5}, {"label":"Y", "x":9.75, "y":2.5}, {"label":"U", "x":10.75, "y":2.5}, {"label":"I", "x":11.75, "y":2.5}, {"label":"O", "x":12.75, "y":2.5}, {"label":"P", "x":13.75, "y":2.5}, {"label":"{", "x":14.75, "y":2.5}, {"label":"}", "x":15.75, "y":2.5}, {"label":"Enter", "x":17, "y":2.5, "w":1.25, "h":2}, {"label":"Delete", "x":18.75, "y":2.5}, {"label":"Control", "x":3.25, "y":3.5, "w":1.75}, {"label":"A", "x":5, "y":3.5}, {"label":"S", "x":6, "y":3.5}, {"label":"D", "x":7, "y":3.5}, {"label":"F", "x":8, "y":3.5}, {"label":"G", "x":9, "y":3.5}, {"label":"H", "x":10, "y":3.5}, {"label":"J", "x":11, "y":3.5}, {"label":"K", "x":12, "y":3.5}, {"label":"L", "x":13, "y":3.5}, {"label":":", "x":14, "y":3.5}, {"label":"\"", "x":15, "y":3.5}, {"x":16, "y":3.5}, {"x":3.25, "y":4.5, "w":1.25}, {"x":4.5, "y":4.5}, {"label":"Z", "x":5.5, "y":4.5}, {"label":"X", "x":6.5, "y":4.5}, {"label":"C", "x":7.5, "y":4.5}, {"label":"V", "x":8.5, "y":4.5}, {"label":"B", "x":9.5, "y":4.5}, {"label":"N", "x":10.5, "y":4.5}, {"label":"M", "x":11.5, "y":4.5}, {"label":"<", "x":12.5, "y":4.5}, {"label":">", "x":13.5, "y":4.5}, {"label":"?", "x":14.5, "y":4.5}, {"x":15.5, "y":4.5}, {"label":"Shift", "x":16.5, "y":4.5, "w":1.25}, {"label":"\u2191", "x":17.75, "y":4.5}, {"label":"Win", "x":4.5, "y":5.5}, {"label":"Alt", "x":5.5, "y":5.5, "w":1.25}, {"x":6.75, "y":5.5, "w":6.25}, {"label":"Ctrl", "x":13, "y":5.5, "w":1.25}, {"label":"Fn", "x":14.25, "y":5.5}, {"label":"\u2190", "x":16.75, "y":5.5}, {"label":"\u2193", "x":17.75, "y":5.5}, {"label":"\u2192", "x":18.75, "y":5.5}]
|
||||
}
|
||||
"keyboard_name": "Baguette",
|
||||
"url": "",
|
||||
"maintainer": "qmk",
|
||||
"bootloader": "atmel-dfu",
|
||||
"width": 16.5,
|
||||
"height": 5,
|
||||
"layouts": {
|
||||
"LAYOUT_ansi": {
|
||||
"layout": [
|
||||
{"label":"`", "x":0, "y":0},
|
||||
{"label":"1", "x":1, "y":0},
|
||||
{"label":"2", "x":2, "y":0},
|
||||
{"label":"3", "x":3, "y":0},
|
||||
{"label":"4", "x":4, "y":0},
|
||||
{"label":"5", "x":5, "y":0},
|
||||
{"label":"6", "x":6, "y":0},
|
||||
{"label":"7", "x":7, "y":0},
|
||||
{"label":"8", "x":8, "y":0},
|
||||
{"label":"9", "x":9, "y":0},
|
||||
{"label":"0", "x":10, "y":0},
|
||||
{"label":"-", "x":11, "y":0},
|
||||
{"label":"=", "x":12, "y":0},
|
||||
{"label":"Backspace", "x":13, "y":0},
|
||||
{"label":"Backspace2", "x":14, "y":0},
|
||||
{"label":"Insert", "x":15.5, "y":0},
|
||||
{"label":"Tab", "x":0, "y":1, "w":1.5},
|
||||
{"label":"Q", "x":1.5, "y":1},
|
||||
{"label":"W", "x":2.5, "y":1},
|
||||
{"label":"E", "x":3.5, "y":1},
|
||||
{"label":"R", "x":4.5, "y":1},
|
||||
{"label":"T", "x":5.5, "y":1},
|
||||
{"label":"Y", "x":6.5, "y":1},
|
||||
{"label":"U", "x":7.5, "y":1},
|
||||
{"label":"I", "x":8.5, "y":1},
|
||||
{"label":"O", "x":9.5, "y":1},
|
||||
{"label":"P", "x":10.5, "y":1},
|
||||
{"label":"[", "x":11.5, "y":1},
|
||||
{"label":"]", "x":12.5, "y":1},
|
||||
{"label":"\\", "x":13.5, "y":1, "w":1.5},
|
||||
{"label":"Delete", "x":15.5, "y":1},
|
||||
{"label":"Caps Lock", "x":0, "y":2, "w":1.75},
|
||||
{"label":"A", "x":1.75, "y":2},
|
||||
{"label":"S", "x":2.75, "y":2},
|
||||
{"label":"D", "x":3.75, "y":2},
|
||||
{"label":"F", "x":4.75, "y":2},
|
||||
{"label":"G", "x":5.75, "y":2},
|
||||
{"label":"H", "x":6.75, "y":2},
|
||||
{"label":"J", "x":7.75, "y":2},
|
||||
{"label":"K", "x":8.75, "y":2},
|
||||
{"label":"L", "x":9.75, "y":2},
|
||||
{"label":";", "x":10.75, "y":2},
|
||||
{"label":"'", "x":11.75, "y":2},
|
||||
{"label":"Enter", "x":12.75, "y":2, "w":2.25},
|
||||
{"label":"Shift", "x":0, "y":3, "w":1.25},
|
||||
{"label":"ISO \\", "x":1.25, "y":3},
|
||||
{"label":"Z", "x":2.25, "y":3},
|
||||
{"label":"X", "x":3.25, "y":3},
|
||||
{"label":"C", "x":4.25, "y":3},
|
||||
{"label":"V", "x":5.25, "y":3},
|
||||
{"label":"B", "x":6.25, "y":3},
|
||||
{"label":"N", "x":7.25, "y":3},
|
||||
{"label":"M", "x":8.25, "y":3},
|
||||
{"label":",", "x":9.25, "y":3},
|
||||
{"label":".", "x":10.25, "y":3},
|
||||
{"label":"/", "x":11.25, "y":3},
|
||||
{"label":"JP RO", "x":12.25, "y":3},
|
||||
{"label":"Shift", "x":13.25, "y":3, "w":1.25},
|
||||
{"label":"Up", "x":14.5, "y":3},
|
||||
{"label":"GUI", "x":1.25, "y":4},
|
||||
{"label":"Alt", "x":2.25, "y":4, "w":1.25},
|
||||
{"label":"Space", "x":3.5, "y":4, "w":6.25},
|
||||
{"label":"Ctrl", "x":9.75, "y":4, "w":1.25},
|
||||
{"label":"Fn", "x":11, "y":4},
|
||||
{"label":"Left", "x":13.5, "y":4},
|
||||
{"label":"Down", "x":14.5, "y":4},
|
||||
{"label":"Right", "x":15.5, "y":4}
|
||||
]
|
||||
},
|
||||
|
||||
"LAYOUT_iso": {
|
||||
"layout": [
|
||||
{"label":"`", "x":0, "y":0},
|
||||
{"label":"1", "x":1, "y":0},
|
||||
{"label":"2", "x":2, "y":0},
|
||||
{"label":"3", "x":3, "y":0},
|
||||
{"label":"4", "x":4, "y":0},
|
||||
{"label":"5", "x":5, "y":0},
|
||||
{"label":"6", "x":6, "y":0},
|
||||
{"label":"7", "x":7, "y":0},
|
||||
{"label":"8", "x":8, "y":0},
|
||||
{"label":"9", "x":9, "y":0},
|
||||
{"label":"0", "x":10, "y":0},
|
||||
{"label":"-", "x":11, "y":0},
|
||||
{"label":"=", "x":12, "y":0},
|
||||
{"label":"Backspace", "x":13, "y":0},
|
||||
{"label":"Backspace2", "x":14, "y":0},
|
||||
{"label":"Insert", "x":15.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":"Delete", "x":15.5, "y":1},
|
||||
{"label":"Caps Lock", "x":0, "y":2, "w":1.75},
|
||||
{"label":"A", "x":1.75, "y":2},
|
||||
{"label":"S", "x":2.75, "y":2},
|
||||
{"label":"D", "x":3.75, "y":2},
|
||||
{"label":"F", "x":4.75, "y":2},
|
||||
{"label":"G", "x":5.75, "y":2},
|
||||
{"label":"H", "x":6.75, "y":2},
|
||||
{"label":"J", "x":7.75, "y":2},
|
||||
{"label":"K", "x":8.75, "y":2},
|
||||
{"label":"L", "x":9.75, "y":2},
|
||||
{"label":";", "x":10.75, "y":2},
|
||||
{"label":"'", "x":11.75, "y":2},
|
||||
{"label":"ISO #", "x":12.75, "y":2},
|
||||
{"label":"Enter", "x":13.75, "y":2, "w":1.25, "h":2},
|
||||
{"label":"Shift", "x":0, "y":3, "w":1.25},
|
||||
{"label":"ISO \\", "x":1.25, "y":3},
|
||||
{"label":"Z", "x":2.25, "y":3},
|
||||
{"label":"X", "x":3.25, "y":3},
|
||||
{"label":"C", "x":4.25, "y":3},
|
||||
{"label":"V", "x":5.25, "y":3},
|
||||
{"label":"B", "x":6.25, "y":3},
|
||||
{"label":"N", "x":7.25, "y":3},
|
||||
{"label":"M", "x":8.25, "y":3},
|
||||
{"label":",", "x":9.25, "y":3},
|
||||
{"label":".", "x":10.25, "y":3},
|
||||
{"label":"/", "x":11.25, "y":3},
|
||||
{"label":"JP_RO", "x":12.25, "y":3},
|
||||
{"label":"Shift", "x":13.25, "y":3, "w":1.25},
|
||||
{"label":"Up", "x":14.5, "y":3},
|
||||
{"label":"GUI", "x":1.25, "y":4},
|
||||
{"label":"Alt", "x":2.25, "y":4, "w":1.25},
|
||||
{"label":"Space", "x":3.5, "y":4, "w":6.25},
|
||||
{"label":"Ctrl", "x":9.75, "y":4, "w":1.25},
|
||||
{"label":"Fn", "x":11, "y":4},
|
||||
{"label":"Left", "x":13.5, "y":4},
|
||||
{"label":"Down", "x":14.5, "y":4},
|
||||
{"label":"Right", "x":15.5, "y":4}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -29,7 +29,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,BL_INC, BL_DEC, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,RGB_SMOD,KC_TRNS,BL_ON, BL_OFF, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,RGB_MOD,KC_TRNS,BL_ON, BL_OFF, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS
|
||||
),
|
||||
/* You can copy this layer as base for a new fn layer * /
|
||||
|
20
keyboards/bigswitch/keymaps/333fred/config.h
Normal file
20
keyboards/bigswitch/keymaps/333fred/config.h
Normal file
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
Copyright 2018 Fredric Silberberg (333fred)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General 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/>.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
// Long tapping term on the big switch, because it takes so long to press
|
||||
#define TAPPING_TERM 500
|
123
keyboards/bigswitch/keymaps/333fred/keymap.c
Normal file
123
keyboards/bigswitch/keymaps/333fred/keymap.c
Normal file
@@ -0,0 +1,123 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
typedef enum {
|
||||
SINGLE_TAP, SINGLE_HOLD, DOUBLE, TRIPLE, QUAD
|
||||
} tap_dance_state_enum;
|
||||
|
||||
enum {
|
||||
TD_KEY = 0
|
||||
};
|
||||
|
||||
static tap_dance_state_enum tap_dance_state;
|
||||
static bool tap_dance_active = false;
|
||||
static uint16_t timer;
|
||||
|
||||
void dance_cycle(bool override_timer) {
|
||||
if (tap_dance_active)
|
||||
{
|
||||
if (timer_elapsed(timer) > 100 || override_timer)
|
||||
{
|
||||
switch (tap_dance_state)
|
||||
{
|
||||
case SINGLE_HOLD:
|
||||
{
|
||||
rgblight_increase_hue_noeeprom();
|
||||
break;
|
||||
}
|
||||
|
||||
case DOUBLE:
|
||||
{
|
||||
rgblight_step_noeeprom();
|
||||
break;
|
||||
}
|
||||
|
||||
case TRIPLE:
|
||||
{
|
||||
rgblight_toggle_noeeprom();
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
// Not needed
|
||||
break;
|
||||
}
|
||||
|
||||
timer = timer_read();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void dance_finished(qk_tap_dance_state_t *state, void* user_data) {
|
||||
// Determine the current state
|
||||
switch (state->count)
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
if (state->interrupted || state->pressed == 0) tap_dance_state = SINGLE_TAP;
|
||||
else tap_dance_state = SINGLE_HOLD;
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
tap_dance_state = DOUBLE;
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
tap_dance_state = TRIPLE;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
tap_dance_state = QUAD;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
switch (tap_dance_state)
|
||||
{
|
||||
case SINGLE_TAP:
|
||||
{
|
||||
// VS Build: CTRL+SHIFT+B
|
||||
send_string_with_delay_P(PSTR(SS_DOWN(X_LCTRL) SS_DOWN(X_LSHIFT) "b" SS_UP(X_LSHIFT) SS_UP(X_LCTRL)), 10);
|
||||
tap_dance_active = false;
|
||||
break;
|
||||
}
|
||||
|
||||
case SINGLE_HOLD:
|
||||
case DOUBLE:
|
||||
case TRIPLE:
|
||||
{
|
||||
// These are handled by the matrix_scan, which will register the appropriate rgb
|
||||
// functions every scan
|
||||
tap_dance_active = true;
|
||||
timer = timer_read();
|
||||
dance_cycle(true);
|
||||
break;
|
||||
}
|
||||
|
||||
case QUAD:
|
||||
{
|
||||
// Reprogram
|
||||
reset_keyboard();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void dance_reset(qk_tap_dance_state_t *state, void* user_data)
|
||||
{
|
||||
tap_dance_active = false;
|
||||
}
|
||||
|
||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||
[TD_KEY] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, dance_finished, dance_reset)
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT(TD(TD_KEY))
|
||||
};
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
dance_cycle(false);
|
||||
}
|
5
keyboards/bigswitch/keymaps/333fred/rules.mk
Normal file
5
keyboards/bigswitch/keymaps/333fred/rules.mk
Normal file
@@ -0,0 +1,5 @@
|
||||
# I'm not using things from my userpace in this one
|
||||
USER_NAME = disable
|
||||
|
||||
RGBLIGHT_ENABLE = yes
|
||||
TAP_DANCE_ENABLE = yes
|
@@ -26,13 +26,13 @@ F_CPU = 12000000
|
||||
|
||||
# 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
|
||||
# different sizes, comment this out, and the correct address will be loaded
|
||||
# automatically (+60). See bootloader.mk for all options.
|
||||
BOOTLOADER = bootloadHID
|
||||
|
||||
# build options
|
||||
BOOTMAGIC_ENABLE = yes
|
||||
MOUSEKEY_ENABLE = yes
|
||||
BOOTMAGIC_ENABLE = full
|
||||
MOUSEKEY_ENABLE = no
|
||||
EXTRAKEY_ENABLE = yes
|
||||
CONSOLE_ENABLE = yes
|
||||
COMMAND_ENABLE = yes
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user