mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-08-14 18:44:37 +00:00
Compare commits
145 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
501f2fdef1 | ||
![]() |
5b5d74a267 | ||
![]() |
6c4b6531fe | ||
![]() |
82bb47a2f1 | ||
![]() |
9517d90e84 | ||
![]() |
79d992d1e7 | ||
![]() |
cd67074f72 | ||
![]() |
01c7108db5 | ||
![]() |
f440111b4b | ||
![]() |
56933b9b9f | ||
![]() |
e03d72d71e | ||
![]() |
563723392f | ||
![]() |
2ae700c8c8 | ||
![]() |
666861dd6f | ||
![]() |
35f922df73 | ||
![]() |
af03b92246 | ||
![]() |
d354b1f0a4 | ||
![]() |
95022bc366 | ||
![]() |
399be2a9b3 | ||
![]() |
ab2a43edb0 | ||
![]() |
d17caeb8ec | ||
![]() |
10f7f6009d | ||
![]() |
9346bd6f80 | ||
![]() |
a5a1f860c0 | ||
![]() |
3a69d688f2 | ||
![]() |
e2e6ff43ab | ||
![]() |
b953a585d6 | ||
![]() |
dfeba3f9b6 | ||
![]() |
df3a81b31e | ||
![]() |
f1b082320e | ||
![]() |
8d6ad23b09 | ||
![]() |
a6a1289003 | ||
![]() |
644dd9c388 | ||
![]() |
3076f86dc1 | ||
![]() |
6b1f96dca8 | ||
![]() |
c59f87a5d7 | ||
![]() |
08bf9f9e74 | ||
![]() |
cba76092eb | ||
![]() |
5cf70f3993 | ||
![]() |
54b932e844 | ||
![]() |
9971caa632 | ||
![]() |
15faffacf4 | ||
![]() |
e3888281f4 | ||
![]() |
1e7661651c | ||
![]() |
f05b1b54a9 | ||
![]() |
59832e7654 | ||
![]() |
0f086df89f | ||
![]() |
6ab0a6e796 | ||
![]() |
c1dc676d28 | ||
![]() |
138c3e7042 | ||
![]() |
a5a65fb1e2 | ||
![]() |
fc85ebecd4 | ||
![]() |
2989f9ce2b | ||
![]() |
bcab02b654 | ||
![]() |
3aae5300e2 | ||
![]() |
41347cdcec | ||
![]() |
33802ab5cd | ||
![]() |
eaa8c18174 | ||
![]() |
3a77ef5fa3 | ||
![]() |
1124e51b11 | ||
![]() |
c7dab4bb25 | ||
![]() |
cc08e3082e | ||
![]() |
02fb0de59b | ||
![]() |
8724a70c4c | ||
![]() |
485e4524f4 | ||
![]() |
ce91dd4bf3 | ||
![]() |
5909c243d4 | ||
![]() |
67976da039 | ||
![]() |
05ac139a29 | ||
![]() |
81164c1663 | ||
![]() |
c66df16644 | ||
![]() |
15385d4113 | ||
![]() |
16d55b14b7 | ||
![]() |
c41c8ff780 | ||
![]() |
c21d5a0973 | ||
![]() |
3afe0ea9b9 | ||
![]() |
1c0e8a6bb4 | ||
![]() |
10d9e8ed37 | ||
![]() |
d9613e6a33 | ||
![]() |
9c2cfe5c27 | ||
![]() |
f98e983141 | ||
![]() |
feae8f2980 | ||
![]() |
35b329052c | ||
![]() |
e8a65baf41 | ||
![]() |
d82e002737 | ||
![]() |
c78ef391dc | ||
![]() |
1bf657be41 | ||
![]() |
8897ab9b11 | ||
![]() |
50611bd814 | ||
![]() |
86b0acbae0 | ||
![]() |
24a741649d | ||
![]() |
0a9476bc2a | ||
![]() |
3fadfb565d | ||
![]() |
66b5c5eff2 | ||
![]() |
6e97a4c8b9 | ||
![]() |
429474d1c3 | ||
![]() |
6f9934c669 | ||
![]() |
c84650a147 | ||
![]() |
30afa1ccd3 | ||
![]() |
b8443863c0 | ||
![]() |
c731628946 | ||
![]() |
ca9edc5fe3 | ||
![]() |
a952bf2d31 | ||
![]() |
44d1b2e717 | ||
![]() |
8ddbb19df1 | ||
![]() |
95fd2ce81a | ||
![]() |
23222625c2 | ||
![]() |
4368611bfd | ||
![]() |
ccb15c2d29 | ||
![]() |
628d4a91b9 | ||
![]() |
9454f98099 | ||
![]() |
64572b5c4b | ||
![]() |
776d1adc76 | ||
![]() |
386cff8cf5 | ||
![]() |
e7497b3fba | ||
![]() |
6dc2d5956f | ||
![]() |
88a783a8a7 | ||
![]() |
3aef2bef8f | ||
![]() |
078586b21a | ||
![]() |
7bdc41b025 | ||
![]() |
66d52d8cd2 | ||
![]() |
0f8b0d971f | ||
![]() |
3270cbeb46 | ||
![]() |
ad9674c5af | ||
![]() |
e4aadf2c05 | ||
![]() |
f00402a2f3 | ||
![]() |
e1e13c53ac | ||
![]() |
1512e07817 | ||
![]() |
ad5cbe5982 | ||
![]() |
58f2e0439e | ||
![]() |
ddcb1794fa | ||
![]() |
adfd34c451 | ||
![]() |
3c156e130b | ||
![]() |
10782789be | ||
![]() |
cf3b683232 | ||
![]() |
a8967778d4 | ||
![]() |
503b762538 | ||
![]() |
88c09aa892 | ||
![]() |
69bb9b7386 | ||
![]() |
f3394139de | ||
![]() |
3e0789c961 | ||
![]() |
2ffac90c99 | ||
![]() |
e6a13e0b1c | ||
![]() |
aaea5e24b6 | ||
![]() |
b337ba798e |
33
.github/workflows/auto_tag.yaml
vendored
Normal file
33
.github/workflows/auto_tag.yaml
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
name: Essential files modified
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- quantum/**/*
|
||||
- tmk_core/**/*
|
||||
- drivers/**/*
|
||||
- tests/**/*
|
||||
- util/**/*
|
||||
- platforms/**/*
|
||||
- Makefile
|
||||
- '*.mk'
|
||||
|
||||
jobs:
|
||||
tag:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
# protect against those who develop with their fork on master
|
||||
if: github.repository == 'qmk/qmk_firmware'
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Bump version and push tag
|
||||
uses: anothrNick/github-tag-action@1.26.0
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
DEFAULT_BUMP: 'patch'
|
42
.github/workflows/develop_api.yml
vendored
Normal file
42
.github/workflows/develop_api.yml
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
name: Update Develop API Data
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- develop
|
||||
paths:
|
||||
- 'keyboards/**'
|
||||
- 'layouts/community/**'
|
||||
|
||||
jobs:
|
||||
api_data:
|
||||
runs-on: ubuntu-latest
|
||||
container: qmkfm/base_container
|
||||
|
||||
# protect against those who work in their fork on develop
|
||||
if: github.repository == 'qmk/qmk_firmware'
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 1
|
||||
persist-credentials: false
|
||||
|
||||
- name: Generate API Data
|
||||
run: qmk generate-api
|
||||
|
||||
- name: Install rsync
|
||||
run: |
|
||||
apt-get update && apt-get install -y rsync
|
||||
|
||||
- name: Upload API Data
|
||||
uses: JamesIves/github-pages-deploy-action@3.7.1
|
||||
with:
|
||||
ACCESS_TOKEN: ${{ secrets.API_TOKEN_GITHUB }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
BRANCH: main
|
||||
FOLDER: api_data/v1
|
||||
CLEAN: true
|
||||
GIT_CONFIG_EMAIL: hello@qmk.fm
|
||||
REPOSITORY_NAME: qmk/qmk_keyboards_devel
|
||||
TARGET_FOLDER: v1
|
37
.github/workflows/develop_update.yml
vendored
Normal file
37
.github/workflows/develop_update.yml
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
name: Update develop after master merge
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
|
||||
jobs:
|
||||
develop_update:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
if: github.repository == 'qmk/qmk_firmware'
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Checkout develop
|
||||
run: |
|
||||
git fetch origin master develop
|
||||
git checkout develop
|
||||
|
||||
- name: Check if branch locked
|
||||
id: check_locked
|
||||
uses: andstor/file-existence-action@v1
|
||||
with:
|
||||
files: ".locked"
|
||||
|
||||
- name: Update develop from master
|
||||
if: steps.check_locked.outputs.files_exists == 'false'
|
||||
run: |
|
||||
git config --global user.name "QMK Bot"
|
||||
git config --global user.email "hello@qmk.fm"
|
||||
git merge origin/master
|
||||
git push origin develop
|
34
.github/workflows/format.yaml
vendored
Normal file
34
.github/workflows/format.yaml
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
name: Format Codebase
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
generate:
|
||||
runs-on: ubuntu-latest
|
||||
container: qmkfm/base_container
|
||||
|
||||
# protect against those who develop with their fork on master
|
||||
if: github.repository == 'qmk/qmk_firmware'
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
apt-get update && apt-get install -y dos2unix
|
||||
|
||||
- name: Format files
|
||||
run: |
|
||||
bin/qmk cformat
|
||||
bin/qmk pyformat
|
||||
bin/qmk fileformat
|
||||
|
||||
- name: Commit files
|
||||
uses: stefanzweifel/git-auto-commit-action@v4
|
||||
with:
|
||||
commit_message: "Format code according to conventions for ${GITHUB_SHA}"
|
||||
commit_user_name: QMK Bot
|
||||
commit_user_email: hello@qmk.fm
|
@@ -19,7 +19,6 @@ addons:
|
||||
- llvm-toolchain-trusty-7
|
||||
packages:
|
||||
- diffutils
|
||||
- dos2unix
|
||||
- clang-format-7
|
||||
- libstdc++-7-dev
|
||||
script:
|
||||
|
24
Makefile
24
Makefile
@@ -272,11 +272,24 @@ endef
|
||||
define PARSE_RULE
|
||||
RULE := $1
|
||||
COMMANDS :=
|
||||
REQUIRE_PLATFORM_KEY :=
|
||||
# If the rule starts with all, then continue the parsing from
|
||||
# PARSE_ALL_KEYBOARDS
|
||||
ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,all),true)
|
||||
KEYBOARD_RULE=all
|
||||
$$(eval $$(call PARSE_ALL_KEYBOARDS))
|
||||
else ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,all-avr),true)
|
||||
KEYBOARD_RULE=all
|
||||
REQUIRE_PLATFORM_KEY := avr
|
||||
$$(eval $$(call PARSE_ALL_KEYBOARDS))
|
||||
else ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,all-chibios),true)
|
||||
KEYBOARD_RULE=all
|
||||
REQUIRE_PLATFORM_KEY := chibios
|
||||
$$(eval $$(call PARSE_ALL_KEYBOARDS))
|
||||
else ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,all-arm_atsam),true)
|
||||
KEYBOARD_RULE=all
|
||||
REQUIRE_PLATFORM_KEY := arm_atsam
|
||||
$$(eval $$(call PARSE_ALL_KEYBOARDS))
|
||||
else ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,test),true)
|
||||
$$(eval $$(call PARSE_TEST))
|
||||
# If the rule starts with the name of a known keyboard, then continue
|
||||
@@ -447,7 +460,7 @@ define PARSE_KEYMAP
|
||||
# Format it in bold
|
||||
KB_SP := $(BOLD)$$(KB_SP)$(NO_COLOR)
|
||||
# Specify the variables that we are passing forward to submake
|
||||
MAKE_VARS := KEYBOARD=$$(CURRENT_KB) KEYMAP=$$(CURRENT_KM)
|
||||
MAKE_VARS := KEYBOARD=$$(CURRENT_KB) KEYMAP=$$(CURRENT_KM) REQUIRE_PLATFORM_KEY=$$(REQUIRE_PLATFORM_KEY)
|
||||
# And the first part of the make command
|
||||
MAKE_CMD := $$(MAKE) -r -R -C $(ROOT_DIR) -f build_keyboard.mk $$(MAKE_TARGET)
|
||||
# The message to display
|
||||
@@ -466,6 +479,8 @@ define BUILD
|
||||
LOG=$$$$($$(MAKE_CMD) $$(MAKE_VARS) SILENT=true 2>&1) ; \
|
||||
if [ $$$$? -gt 0 ]; \
|
||||
then $$(PRINT_ERROR_PLAIN); \
|
||||
elif [ "$$$$LOG" = "skipped" ] ; \
|
||||
then $$(PRINT_SKIPPED_PLAIN); \
|
||||
elif [ "$$$$LOG" != "" ] ; \
|
||||
then $$(PRINT_WARNING_PLAIN); \
|
||||
else \
|
||||
@@ -637,12 +652,13 @@ else
|
||||
endif
|
||||
ifndef SKIP_VERSION
|
||||
BUILD_DATE := $(shell date +"%Y-%m-%d-%H:%M:%S")
|
||||
else
|
||||
BUILD_DATE := 2020-01-01-00:00:00
|
||||
endif
|
||||
|
||||
$(shell echo '#define QMK_VERSION "$(GIT_VERSION)"' > $(ROOT_DIR)/quantum/version.h)
|
||||
$(shell echo '#define QMK_BUILDDATE "$(BUILD_DATE)"' >> $(ROOT_DIR)/quantum/version.h)
|
||||
$(shell echo '#define CHIBIOS_VERSION "$(CHIBIOS_VERSION)"' >> $(ROOT_DIR)/quantum/version.h)
|
||||
$(shell echo '#define CHIBIOS_CONTRIB_VERSION "$(CHIBIOS_CONTRIB_VERSION)"' >> $(ROOT_DIR)/quantum/version.h)
|
||||
else
|
||||
BUILD_DATE := NA
|
||||
endif
|
||||
|
||||
include $(ROOT_DIR)/testlist.mk
|
||||
|
@@ -317,6 +317,13 @@ SRC += $(TMK_COMMON_SRC)
|
||||
OPT_DEFS += $(TMK_COMMON_DEFS)
|
||||
EXTRALDFLAGS += $(TMK_COMMON_LDFLAGS)
|
||||
|
||||
SKIP_COMPILE := no
|
||||
ifneq ($(REQUIRE_PLATFORM_KEY),)
|
||||
ifneq ($(REQUIRE_PLATFORM_KEY),$(PLATFORM_KEY))
|
||||
SKIP_COMPILE := yes
|
||||
endif
|
||||
endif
|
||||
|
||||
include $(TMK_PATH)/$(PLATFORM_KEY).mk
|
||||
ifneq ($(strip $(PROTOCOL)),)
|
||||
include $(TMK_PATH)/protocol/$(strip $(shell echo $(PROTOCOL) | tr '[:upper:]' '[:lower:]')).mk
|
||||
@@ -352,7 +359,13 @@ $(KEYBOARD_OUTPUT)_INC := $(PROJECT_INC) $(GFXINC)
|
||||
$(KEYBOARD_OUTPUT)_CONFIG := $(PROJECT_CONFIG)
|
||||
|
||||
# Default target.
|
||||
ifeq ($(SKIP_COMPILE),no)
|
||||
all: build check-size
|
||||
else
|
||||
all:
|
||||
echo "skipped" >&2
|
||||
endif
|
||||
|
||||
build: elf cpfirmware
|
||||
check-size: build
|
||||
objs-size: build
|
||||
|
@@ -49,6 +49,7 @@ endif
|
||||
|
||||
include common_features.mk
|
||||
include $(TMK_PATH)/common.mk
|
||||
include $(QUANTUM_PATH)/sequencer/tests/rules.mk
|
||||
include $(QUANTUM_PATH)/serial_link/tests/rules.mk
|
||||
ifneq ($(filter $(FULL_TESTS),$(TEST)),)
|
||||
include build_full_test.mk
|
||||
|
@@ -21,4 +21,5 @@ COMMON_VPATH += $(QUANTUM_PATH)/keymap_extras
|
||||
COMMON_VPATH += $(QUANTUM_PATH)/audio
|
||||
COMMON_VPATH += $(QUANTUM_PATH)/process_keycode
|
||||
COMMON_VPATH += $(QUANTUM_PATH)/api
|
||||
COMMON_VPATH += $(QUANTUM_PATH)/sequencer
|
||||
COMMON_VPATH += $(DRIVER_PATH)
|
||||
|
@@ -21,6 +21,11 @@ QUANTUM_SRC += \
|
||||
$(QUANTUM_DIR)/keymap_common.c \
|
||||
$(QUANTUM_DIR)/keycode_config.c
|
||||
|
||||
ifeq ($(strip $(DEBUG_MATRIX_SCAN_RATE_ENABLE)), yes)
|
||||
OPT_DEFS += -DDEBUG_MATRIX_SCAN_RATE
|
||||
CONSOLE_ENABLE = yes
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(API_SYSEX_ENABLE)), yes)
|
||||
OPT_DEFS += -DAPI_SYSEX_ENABLE
|
||||
OPT_DEFS += -DAPI_ENABLE
|
||||
@@ -39,6 +44,13 @@ ifeq ($(strip $(AUDIO_ENABLE)), yes)
|
||||
SRC += $(QUANTUM_DIR)/audio/luts.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(SEQUENCER_ENABLE)), yes)
|
||||
OPT_DEFS += -DSEQUENCER_ENABLE
|
||||
MUSIC_ENABLE = yes
|
||||
SRC += $(QUANTUM_DIR)/sequencer/sequencer.c
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_sequencer.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(MIDI_ENABLE)), yes)
|
||||
OPT_DEFS += -DMIDI_ENABLE
|
||||
MUSIC_ENABLE = yes
|
||||
@@ -156,12 +168,14 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
|
||||
endif
|
||||
endif
|
||||
|
||||
VALID_MATRIX_TYPES := yes IS31FL3731 IS31FL3733 IS31FL3737 IS31FL3741 WS2812 custom
|
||||
|
||||
LED_MATRIX_ENABLE ?= no
|
||||
ifneq ($(strip $(LED_MATRIX_ENABLE)), no)
|
||||
ifeq ($(filter $(LED_MATRIX_ENABLE),$(VALID_MATRIX_TYPES)),)
|
||||
$(error LED_MATRIX_ENABLE="$(LED_MATRIX_ENABLE)" is not a valid matrix type)
|
||||
VALID_LED_MATRIX_TYPES := IS31FL3731 custom
|
||||
# TODO: IS31FL3733 IS31FL3737 IS31FL3741
|
||||
|
||||
ifeq ($(strip $(LED_MATRIX_ENABLE)), yes)
|
||||
ifeq ($(filter $(LED_MATRIX_DRIVER),$(VALID_LED_MATRIX_TYPES)),)
|
||||
$(error LED_MATRIX_DRIVER="$(LED_MATRIX_DRIVER)" is not a valid matrix type)
|
||||
else
|
||||
BACKLIGHT_ENABLE = yes
|
||||
BACKLIGHT_DRIVER = custom
|
||||
@@ -169,21 +183,22 @@ ifneq ($(strip $(LED_MATRIX_ENABLE)), no)
|
||||
SRC += $(QUANTUM_DIR)/led_matrix.c
|
||||
SRC += $(QUANTUM_DIR)/led_matrix_drivers.c
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(LED_MATRIX_ENABLE)), IS31FL3731)
|
||||
OPT_DEFS += -DIS31FL3731
|
||||
COMMON_VPATH += $(DRIVER_PATH)/issi
|
||||
SRC += is31fl3731-simple.c
|
||||
QUANTUM_LIB_SRC += i2c_master.c
|
||||
ifeq ($(strip $(LED_MATRIX_DRIVER)), IS31FL3731)
|
||||
OPT_DEFS += -DIS31FL3731 -DSTM32_I2C -DHAL_USE_I2C=TRUE
|
||||
COMMON_VPATH += $(DRIVER_PATH)/issi
|
||||
SRC += is31fl3731-simple.c
|
||||
QUANTUM_LIB_SRC += i2c_master.c
|
||||
endif
|
||||
endif
|
||||
|
||||
RGB_MATRIX_ENABLE ?= no
|
||||
VALID_RGB_MATRIX_TYPES := IS31FL3731 IS31FL3733 IS31FL3737 IS31FL3741 WS2812 custom
|
||||
|
||||
ifneq ($(strip $(RGB_MATRIX_ENABLE)), no)
|
||||
ifeq ($(filter $(RGB_MATRIX_ENABLE),$(VALID_MATRIX_TYPES)),)
|
||||
$(error RGB_MATRIX_ENABLE="$(RGB_MATRIX_ENABLE)" is not a valid matrix type)
|
||||
endif
|
||||
ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes)
|
||||
ifeq ($(filter $(RGB_MATRIX_DRIVER),$(VALID_RGB_MATRIX_TYPES)),)
|
||||
$(error "$(RGB_MATRIX_DRIVER)" is not a valid matrix type)
|
||||
endif
|
||||
OPT_DEFS += -DRGB_MATRIX_ENABLE
|
||||
ifneq (,$(filter $(MCU), atmega16u2 atmega32u2))
|
||||
# ATmegaxxU2 does not have hardware MUL instruction - lib8tion must be told to use software multiplication routines
|
||||
@@ -194,51 +209,47 @@ endif
|
||||
SRC += $(QUANTUM_DIR)/rgb_matrix_drivers.c
|
||||
CIE1931_CURVE := yes
|
||||
RGB_KEYCODES_ENABLE := yes
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes)
|
||||
RGB_MATRIX_ENABLE := IS31FL3731
|
||||
endif
|
||||
ifeq ($(strip $(RGB_MATRIX_DRIVER)), IS31FL3731)
|
||||
OPT_DEFS += -DIS31FL3731 -DSTM32_I2C -DHAL_USE_I2C=TRUE
|
||||
COMMON_VPATH += $(DRIVER_PATH)/issi
|
||||
SRC += is31fl3731.c
|
||||
QUANTUM_LIB_SRC += i2c_master.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(RGB_MATRIX_ENABLE)), IS31FL3731)
|
||||
OPT_DEFS += -DIS31FL3731 -DSTM32_I2C -DHAL_USE_I2C=TRUE
|
||||
COMMON_VPATH += $(DRIVER_PATH)/issi
|
||||
SRC += is31fl3731.c
|
||||
QUANTUM_LIB_SRC += i2c_master.c
|
||||
endif
|
||||
ifeq ($(strip $(RGB_MATRIX_DRIVER)), IS31FL3733)
|
||||
OPT_DEFS += -DIS31FL3733 -DSTM32_I2C -DHAL_USE_I2C=TRUE
|
||||
COMMON_VPATH += $(DRIVER_PATH)/issi
|
||||
SRC += is31fl3733.c
|
||||
QUANTUM_LIB_SRC += i2c_master.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(RGB_MATRIX_ENABLE)), IS31FL3733)
|
||||
OPT_DEFS += -DIS31FL3733 -DSTM32_I2C -DHAL_USE_I2C=TRUE
|
||||
COMMON_VPATH += $(DRIVER_PATH)/issi
|
||||
SRC += is31fl3733.c
|
||||
QUANTUM_LIB_SRC += i2c_master.c
|
||||
endif
|
||||
ifeq ($(strip $(RGB_MATRIX_DRIVER)), IS31FL3737)
|
||||
OPT_DEFS += -DIS31FL3737 -DSTM32_I2C -DHAL_USE_I2C=TRUE
|
||||
COMMON_VPATH += $(DRIVER_PATH)/issi
|
||||
SRC += is31fl3737.c
|
||||
QUANTUM_LIB_SRC += i2c_master.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(RGB_MATRIX_ENABLE)), IS31FL3737)
|
||||
OPT_DEFS += -DIS31FL3737 -DSTM32_I2C -DHAL_USE_I2C=TRUE
|
||||
COMMON_VPATH += $(DRIVER_PATH)/issi
|
||||
SRC += is31fl3737.c
|
||||
QUANTUM_LIB_SRC += i2c_master.c
|
||||
endif
|
||||
ifeq ($(strip $(RGB_MATRIX_DRIVER)), IS31FL3741)
|
||||
OPT_DEFS += -DIS31FL3741 -DSTM32_I2C -DHAL_USE_I2C=TRUE
|
||||
COMMON_VPATH += $(DRIVER_PATH)/issi
|
||||
SRC += is31fl3741.c
|
||||
QUANTUM_LIB_SRC += i2c_master.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(RGB_MATRIX_ENABLE)), IS31FL3741)
|
||||
OPT_DEFS += -DIS31FL3741 -DSTM32_I2C -DHAL_USE_I2C=TRUE
|
||||
COMMON_VPATH += $(DRIVER_PATH)/issi
|
||||
SRC += is31fl3741.c
|
||||
QUANTUM_LIB_SRC += i2c_master.c
|
||||
endif
|
||||
ifeq ($(strip $(RGB_MATRIX_DRIVER)), WS2812)
|
||||
OPT_DEFS += -DWS2812
|
||||
WS2812_DRIVER_REQUIRED := yes
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(RGB_MATRIX_ENABLE)), WS2812)
|
||||
OPT_DEFS += -DWS2812
|
||||
WS2812_DRIVER_REQUIRED := yes
|
||||
endif
|
||||
ifeq ($(strip $(RGB_MATRIX_CUSTOM_KB)), yes)
|
||||
OPT_DEFS += -DRGB_MATRIX_CUSTOM_KB
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(RGB_MATRIX_CUSTOM_KB)), yes)
|
||||
OPT_DEFS += -DRGB_MATRIX_CUSTOM_KB
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(RGB_MATRIX_CUSTOM_USER)), yes)
|
||||
OPT_DEFS += -DRGB_MATRIX_CUSTOM_USER
|
||||
ifeq ($(strip $(RGB_MATRIX_CUSTOM_USER)), yes)
|
||||
OPT_DEFS += -DRGB_MATRIX_CUSTOM_USER
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(RGB_KEYCODES_ENABLE)), yes)
|
||||
@@ -444,11 +455,14 @@ ifeq ($(strip $(SPLIT_KEYBOARD)), yes)
|
||||
# Functions added via QUANTUM_LIB_SRC are only included in the final binary if they're called.
|
||||
# Unused functions are pruned away, which is why we can add multiple drivers here without bloat.
|
||||
ifeq ($(PLATFORM),AVR)
|
||||
QUANTUM_LIB_SRC += i2c_master.c \
|
||||
i2c_slave.c
|
||||
ifneq ($(NO_I2C),yes)
|
||||
QUANTUM_LIB_SRC += i2c_master.c \
|
||||
i2c_slave.c
|
||||
endif
|
||||
endif
|
||||
|
||||
SERIAL_DRIVER ?= bitbang
|
||||
OPT_DEFS += -DSERIAL_DRIVER_$(strip $(shell echo $(SERIAL_DRIVER) | tr '[:lower:]' '[:upper:]'))
|
||||
ifeq ($(strip $(SERIAL_DRIVER)), bitbang)
|
||||
QUANTUM_LIB_SRC += serial.c
|
||||
else
|
||||
|
150
docs/ChangeLog/20201128.md
Normal file
150
docs/ChangeLog/20201128.md
Normal file
@@ -0,0 +1,150 @@
|
||||
# QMK Breaking Change - 2020 Nov 28 Changelog
|
||||
|
||||
Four times a year QMK runs a process for merging Breaking Changes. A Breaking Change is any change which modifies how QMK behaves in a way that is incompatible or potentially dangerous. We limit these changes to 4 times per year so that users can have confidence that updating their QMK tree will not break their keymaps.
|
||||
|
||||
|
||||
## Changes Requiring User Action :id=changes-requiring-user-action
|
||||
|
||||
### Relocated Keyboards :id-relocated-keyboards
|
||||
|
||||
#### Reduce Helix keyboard build variation ([#8669](https://github.com/qmk/qmk_firmware/pull/8669))
|
||||
|
||||
The build commands for the Helix keyboard are:
|
||||
|
||||
```
|
||||
make <helix_build_name>:<keymap_name>
|
||||
```
|
||||
|
||||
For `<helix_build_name>`, specify the one in the rightmost column of the table below, such as `helix`,` helix/pico`.
|
||||
|
||||
| before Oct 17 2019 | Oct 17 2019 | Mar 10 2020 | Nov 28 2020 |
|
||||
| ---------------------|-------------------------|-------------------------| ------------------------|
|
||||
| helix/rev1 | helix/rev1 | helix/rev1 | helix/rev1 |
|
||||
| helix/pico | helix/pico | helix/pico | helix/pico |
|
||||
| | helix/pico/back | helix/pico/back | helix/pico/back |
|
||||
| | helix/pico/under | helix/pico/under | helix/pico/under |
|
||||
| | | helix/pico/sc | -- |
|
||||
| | | helix/pico/sc/back | helix/pico/sc |
|
||||
| | | helix/pico/sc/under | -- |
|
||||
| helix/rev2 (=helix) | helix/rev2 (=helix) | helix/rev2 (=helix) | -- |
|
||||
| | helix/rev2/back | helix/rev2/back | -- |
|
||||
| | helix/rev2/back/oled | helix/rev2/back/oled | ( --> helix/rev2/back) |
|
||||
| | helix/rev2/oled | helix/rev2/oled | helix/rev2 (=helix) |
|
||||
| | helix/rev2/oled/back | helix/rev2/oled/back | helix/rev2/back |
|
||||
| | helix/rev2/oled/under | helix/rev2/oled/under | helix/rev2/under |
|
||||
| | | helix/rev2/sc | -- |
|
||||
| | | helix/rev2/sc/back | -- |
|
||||
| | | helix/rev2/sc/oled | -- |
|
||||
| | | helix/rev2/sc/oledback | helix/rev2/sc |
|
||||
| | | helix/rev2/sc/oledunder | -- |
|
||||
| | | helix/rev2/sc/under | -- |
|
||||
| | helix/rev2/under | helix/rev2/under | -- |
|
||||
| | helix/rev2/under/oled | helix/rev2/under/oled | ( --> helix/rev2/under) |
|
||||
|
||||
#### Update the Speedo firmware for v3.0 ([#10657](https://github.com/qmk/qmk_firmware/pull/10657))
|
||||
|
||||
The Speedo keyboard has moved to `cozykeys/speedo/v2` as the designer prepares to release the Speedo v3.0.
|
||||
|
||||
| Previous Name | New Name |
|
||||
| :------------ | :------------------------- |
|
||||
| speedo | cozykeys/speedo/v2 |
|
||||
| -- | cozykeys/speedo/v3 **new** |
|
||||
|
||||
#### Maartenwut/Maarten name change to evyd13/Evy ([#10274](https://github.com/qmk/qmk_firmware/pull/10274))
|
||||
|
||||
Maartenwut has rebranded as @evyd13, and all released Maartenwut boards have moved.
|
||||
|
||||
| Previous Name | New Name |
|
||||
| :--------------------- | :----------------- |
|
||||
| maartenwut/atom47/rev2 | evyd13/atom47/rev2 |
|
||||
| maartenwut/atom47/rev3 | evyd13/atom47/rev3 |
|
||||
| maartenwut/eon40 | evyd13/eon40 |
|
||||
| maartenwut/eon65 | evyd13/eon65 |
|
||||
| maartenwut/eon75 | evyd13/eon75 |
|
||||
| maartenwut/eon87 | evyd13/eon87 |
|
||||
| maartenwut/eon95 | evyd13/eon95 |
|
||||
| maartenwut/gh80_1800 | evyd13/gh80_1800 |
|
||||
| maartenwut/gh80_3700 | evyd13/gh80_3700 |
|
||||
| maartenwut/minitomic | evyd13/minitomic |
|
||||
| maartenwut/mx5160 | evyd13/mx5160 |
|
||||
| maartenwut/nt660 | evyd13/nt660 |
|
||||
| maartenwut/omrontkl | evyd13/omrontkl |
|
||||
| maartenwut/plain60 | evyd13/plain60 |
|
||||
| maartenwut/pockettype | evyd13/pockettype |
|
||||
| maartenwut/quackfire | evyd13/quackfire |
|
||||
| maartenwut/solheim68 | evyd13/solheim68 |
|
||||
| maartenwut/ta65 | evyd13/ta65 |
|
||||
| maartenwut/wasdat | evyd13/wasdat |
|
||||
| maartenwut/wasdat_code | evyd13/wasdat_code |
|
||||
| maartenwut/wonderland | evyd13/wonderland |
|
||||
|
||||
#### Xelus Valor and Dawn60 Refactors ([#10512](https://github.com/qmk/qmk_firmware/pull/10512), [#10584](https://github.com/qmk/qmk_firmware/pull/10584))
|
||||
|
||||
The Valor and Dawn60 keyboards by Xelus22 both now require their revisions to be specified when compiling.
|
||||
|
||||
| Previous Name | New Name |
|
||||
| :------------ | :---------------- |
|
||||
| xelus/dawn60 | xelus/dawn60/rev1 |
|
||||
| xelus/valor | xelus/valor/rev1 |
|
||||
|
||||
|
||||
### Updated Keyboard Codebases :id=keyboard-updates
|
||||
|
||||
#### AEboards EXT65 Refactor ([#10820](https://github.com/qmk/qmk_firmware/pull/10820))
|
||||
|
||||
The EXT65 codebase has been reworked so keymaps can be used with either revision.
|
||||
|
||||
|
||||
## Core Changes :id=core-changes
|
||||
|
||||
### Fixes :id=core-fixes
|
||||
|
||||
* Reconnect the USB if users wake up a computer from the keyboard to restore the USB state ([#10088](https://github.com/qmk/qmk_firmware/pull/10088))
|
||||
* Fix cursor position bug in oled_write_raw functions ([#10800](https://github.com/qmk/qmk_firmware/pull/10800))
|
||||
|
||||
### Additions and Enhancements :id=core-additions
|
||||
|
||||
* Allow MATRIX_ROWS to be greater than 32 ([#10183](https://github.com/qmk/qmk_firmware/pull/10183))
|
||||
* Add support for soft serial to ATmega32U2 ([#10204](https://github.com/qmk/qmk_firmware/pull/10204))
|
||||
* Allow direct control of MIDI velocity value ([#9940](https://github.com/qmk/qmk_firmware/pull/9940))
|
||||
* Joystick 16-bit support ([#10439](https://github.com/qmk/qmk_firmware/pull/10439))
|
||||
* Allow encoder resolutions to be set per encoder ([#10259](https://github.com/qmk/qmk_firmware/pull/10259))
|
||||
* Share button state from mousekey to pointing_device ([#10179](https://github.com/qmk/qmk_firmware/pull/10179))
|
||||
* Add advanced/efficient RGB Matrix Indicators ([#8564](https://github.com/qmk/qmk_firmware/pull/8564))
|
||||
* OLED display update interval support ([#10388](https://github.com/qmk/qmk_firmware/pull/10388))
|
||||
* Per-Key Retro Tapping ([#10622](https://github.com/qmk/qmk_firmware/pull/10622))
|
||||
* Allow backlight duty cycle limit ([#10260](https://github.com/qmk/qmk_firmware/pull/10260))
|
||||
* Add step sequencer feature ([#9703](https://github.com/qmk/qmk_firmware/pull/9703))
|
||||
* Added `add_oneshot_mods` & `del_oneshot_mods` ([#10549](https://github.com/qmk/qmk_firmware/pull/10549))
|
||||
* Add AT90USB support for serial.c ([#10706](https://github.com/qmk/qmk_firmware/pull/10706))
|
||||
* Auto shift: support repeats and early registration (#9826)
|
||||
|
||||
### Clean-ups and Optimizations :id=core-optimizations
|
||||
|
||||
* Haptic and solenoid cleanup ([#9700](https://github.com/qmk/qmk_firmware/pull/9700))
|
||||
* XD75 cleanup ([#10524](https://github.com/qmk/qmk_firmware/pull/10524))
|
||||
* Minor change to behavior allowing display updates to continue between task ticks ([#10750](https://github.com/qmk/qmk_firmware/pull/10750))
|
||||
* Change some GPIO manipulations in matrix.c to be atomic ([#10491](https://github.com/qmk/qmk_firmware/pull/10491))
|
||||
* combine repeated lines of code for ATmega32U2, ATmega16U2, ATmega328 and ATmega328P ([#10837](https://github.com/qmk/qmk_firmware/pull/10837))
|
||||
* Remove references to HD44780 ([#10735](https://github.com/qmk/qmk_firmware/pull/10735))
|
||||
|
||||
|
||||
## QMK Infrastructure and Internals :id=qmk-internals
|
||||
|
||||
* Add ability to build a subset of all keyboards based on platform. ([#10420](https://github.com/qmk/qmk_firmware/pull/10420))
|
||||
* Initialise EEPROM drivers at startup, instead of upon first execution ([#10438](https://github.com/qmk/qmk_firmware/pull/10438))
|
||||
* Make bootloader_jump weak for ChibiOS ([#10417](https://github.com/qmk/qmk_firmware/pull/10417))
|
||||
* Support for STM32 GPIOF,G,H,I,J,K ([#10206](https://github.com/qmk/qmk_firmware/pull/10206))
|
||||
* Add milc as a dependency and remove the installed milc ([#10563](https://github.com/qmk/qmk_firmware/pull/10563))
|
||||
* ChibiOS upgrade: early init conversions ([#10214](https://github.com/qmk/qmk_firmware/pull/10214))
|
||||
* ChibiOS upgrade: configuration file migrator ([#9952](https://github.com/qmk/qmk_firmware/pull/9952))
|
||||
* Add definition based on currently-selected serial driver. ([#10716](https://github.com/qmk/qmk_firmware/pull/10716))
|
||||
* Allow for modification of output RGB values when using rgblight/rgb_matrix. ([#10638](https://github.com/qmk/qmk_firmware/pull/10638))
|
||||
* Allow keyboards/keymaps to execute code at each main loop iteration ([#10530](https://github.com/qmk/qmk_firmware/pull/10530))
|
||||
* qmk cformat ([#10767](https://github.com/qmk/qmk_firmware/pull/10767))
|
||||
* Add a Make variable to easily enable DEBUG_MATRIX_SCAN_RATE on the command line ([#10824](https://github.com/qmk/qmk_firmware/pull/10824))
|
||||
* update Chibios OS USB for the OTG driver ([#8893](https://github.com/qmk/qmk_firmware/pull/8893))
|
||||
* Fixup version.h writing when using `SKIP_VERSION=yes` ([#10972](https://github.com/qmk/qmk_firmware/pull/10972), [#10974](https://github.com/qmk/qmk_firmware/pull/10974))
|
||||
* Rename ledmatrix.h to match .c file ([#7949](https://github.com/qmk/qmk_firmware/pull/7949))
|
||||
* Split RGB_MATRIX_ENABLE into _ENABLE and _DRIVER ([#10231](https://github.com/qmk/qmk_firmware/pull/10231))
|
||||
* Split LED_MATRIX_ENABLE into _ENABLE and _DRIVER ([#10840](https://github.com/qmk/qmk_firmware/pull/10840))
|
@@ -80,6 +80,7 @@
|
||||
* [One Shot Keys](one_shot_keys.md)
|
||||
* [Pointing Device](feature_pointing_device.md)
|
||||
* [Raw HID](feature_rawhid.md)
|
||||
* [Sequencer](feature_sequencer.md)
|
||||
* [Swap Hands](feature_swap_hands.md)
|
||||
* [Tap Dance](feature_tap_dance.md)
|
||||
* [Tap-Hold Configuration](tap_hold.md)
|
||||
@@ -119,6 +120,7 @@
|
||||
* [Overview](breaking_changes.md)
|
||||
* [My Pull Request Was Flagged](breaking_changes_instructions.md)
|
||||
* History
|
||||
* [2020 Nov 28](ChangeLog/20201128.md)
|
||||
* [2020 Aug 29](ChangeLog/20200829.md)
|
||||
* [2020 May 30](ChangeLog/20200530.md)
|
||||
* [2020 Feb 29](ChangeLog/20200229.md)
|
||||
|
@@ -6,6 +6,7 @@ The breaking change period is when we will merge PR's that change QMK in dangero
|
||||
|
||||
## What has been included in past Breaking Changes?
|
||||
|
||||
* [2020 Nov 28](ChangeLog/20201128.md)
|
||||
* [2020 Aug 29](ChangeLog/20200829.md)
|
||||
* [2020 May 30](ChangeLog/20200530.md)
|
||||
* [2020 Feb 29](ChangeLog/20200229.md)
|
||||
@@ -13,16 +14,16 @@ The breaking change period is when we will merge PR's that change QMK in dangero
|
||||
|
||||
## When is the next Breaking Change?
|
||||
|
||||
The next Breaking Change is scheduled for November 28, 2020.
|
||||
The next Breaking Change is scheduled for February 27, 2021.
|
||||
|
||||
### Important Dates
|
||||
|
||||
* [x] 2020 Aug 29 - `develop` is created. It will be rebased weekly.
|
||||
* [ ] 2020 Oct 31 - `develop` closed to new PR's.
|
||||
* [ ] 2020 Oct 31 - Call for testers.
|
||||
* [ ] 2020 Nov 26 - `master` is locked, no PR's merged.
|
||||
* [ ] 2020 Nov 28 - Merge `develop` to `master`.
|
||||
* [ ] 2020 Nov 28 - `master` is unlocked. PR's can be merged again.
|
||||
* [x] 2020 Nov 28 - `develop` is created. Each push to `master` is subsequently merged to `develop`
|
||||
* [ ] 2021 Jan 30 - `develop` closed to new PR's.
|
||||
* [ ] 2021 Jan 30 - Call for testers.
|
||||
* [ ] 2021 Feb 25 - `master` is locked, no PR's merged.
|
||||
* [ ] 2021 Feb 27 - Merge `develop` to `master`.
|
||||
* [ ] 2021 Feb 27 - `master` is unlocked. PR's can be merged again.
|
||||
|
||||
## What changes will be included?
|
||||
|
||||
@@ -39,21 +40,6 @@ Criteria for acceptance:
|
||||
|
||||
This section documents various processes we use when running the Breaking Changes process.
|
||||
|
||||
## Rebase `develop` from `master`
|
||||
|
||||
This is run every Friday while `develop` is open.
|
||||
|
||||
Process:
|
||||
|
||||
```
|
||||
cd qmk_firmware
|
||||
git checkout master
|
||||
git pull --ff-only
|
||||
git checkout develop
|
||||
git rebase master
|
||||
git push --force
|
||||
```
|
||||
|
||||
## Creating the `develop` branch
|
||||
|
||||
This happens immediately after the previous `develop` branch is merged.
|
||||
|
@@ -29,7 +29,9 @@ This level contains all of the options for that particular keymap. If you wish t
|
||||
|
||||
This is a C header file that is one of the first things included, and will persist over the whole project (if included). Lots of variables can be set here and accessed elsewhere. The `config.h` file shouldn't be including other `config.h` files, or anything besides this:
|
||||
|
||||
#include "config_common.h"
|
||||
```c
|
||||
#include "config_common.h"
|
||||
```
|
||||
|
||||
|
||||
## Hardware Options
|
||||
@@ -135,6 +137,8 @@ If you define these options you will enable the associated feature, which may in
|
||||
* `#define RETRO_TAPPING`
|
||||
* tap anyway, even after TAPPING_TERM, if there was no other key interruption between press and release
|
||||
* See [Retro Tapping](tap_hold.md#retro-tapping) for details
|
||||
* `#define RETRO_TAPPING_PER_KEY`
|
||||
* enables handling for per key `RETRO_TAPPING` settings
|
||||
* `#define TAPPING_TOGGLE 2`
|
||||
* how many taps before triggering the toggle
|
||||
* `#define PERMISSIVE_HOLD`
|
||||
|
@@ -185,6 +185,14 @@ This function gets called at every matrix scan, which is basically as often as t
|
||||
|
||||
You should use this function if you need custom matrix scanning code. It can also be used for custom status output (such as LEDs or a display) or other functionality that you want to trigger regularly even when the user isn't typing.
|
||||
|
||||
# Keyboard housekeeping
|
||||
|
||||
* Keyboard/Revision: `void housekeeping_task_kb(void)`
|
||||
* Keymap: `void housekeeping_task_user(void)`
|
||||
|
||||
This function gets called at the end of all QMK processing, before starting the next iteration. You can safely assume that QMK has dealt with the last matrix scan at the time that these functions are invoked -- layer states have been updated, USB reports have been sent, LEDs have been updated, and displays have been drawn.
|
||||
|
||||
Similar to `matrix_scan_*`, these are called as often as the MCU can handle. To keep your board responsive, it's suggested to do as little as possible during these function calls, potentially throtting their behaviour if you do indeed require implementing something special.
|
||||
|
||||
# Keyboard Idling/Wake Code
|
||||
|
||||
|
@@ -41,7 +41,9 @@ Bevorzugst Du es lieber auf der Befehlszeile zu debuggen? Dafür eignet sich das
|
||||
|
||||
Manchmal ist es hilfreich Debug-Nachrichten innerhalb deines eigenen [Custom Codes](de/custom_quantum_functions.md) zu drucken. Das ist ziemlich einfach. Beginne damit `print.h` am Anfang deiner Datei zu inkludieren:
|
||||
|
||||
#include <print.h>
|
||||
```c
|
||||
#include "print.h"
|
||||
```
|
||||
|
||||
Danach stehen dir verschiedene Druck-Funktionen zur Verfügung:
|
||||
|
||||
|
@@ -41,7 +41,9 @@ Para plataformas compatibles, [QMK Toolbox](https://github.com/qmk/qmk_toolbox)
|
||||
|
||||
A veces, es útil imprimir mensajes de depuración desde tu [código personalizado](custom_quantum_functions.md). Hacerlo es bastante simple. Comienza incluyendo `print.h` al principio de tu fichero:
|
||||
|
||||
#include <print.h>
|
||||
```c
|
||||
#include "print.h"
|
||||
```
|
||||
|
||||
Después de eso puedes utilzar algunas funciones print diferentes:
|
||||
|
||||
|
@@ -15,25 +15,31 @@ problem.
|
||||
When you tap a key, it stays depressed for a short period of time before it is
|
||||
then released. This depressed time is a different length for everyone. Auto Shift
|
||||
defines a constant `AUTO_SHIFT_TIMEOUT` which is typically set to twice your
|
||||
normal pressed state time. When you press a key, a timer starts and then stops
|
||||
when you release the key. If the time depressed is greater than or equal to the
|
||||
`AUTO_SHIFT_TIMEOUT`, then a shifted version of the key is emitted. If the time
|
||||
is less than the `AUTO_SHIFT_TIMEOUT` time, then the normal state is emitted.
|
||||
normal pressed state time. When you press a key, a timer starts, and if you
|
||||
have not released the key after the `AUTO_SHIFT_TIMEOUT` period, then a shifted
|
||||
version of the key is emitted. If the time is less than the `AUTO_SHIFT_TIMEOUT`
|
||||
time, or you press another key, then the normal state is emitted.
|
||||
|
||||
If `AUTO_SHIFT_REPEAT` is defined, there is keyrepeat support. Holding the key
|
||||
down will repeat the shifted key, though this can be disabled with
|
||||
`AUTO_SHIFT_NO_AUTO_REPEAT`. If you want to repeat the normal key, then tap it
|
||||
once then immediately (within `TAPPING_TERM`) hold it down again (this works
|
||||
with the shifted value as well if auto-repeat is disabled).
|
||||
|
||||
## Are There Limitations to Auto Shift?
|
||||
|
||||
Yes, unfortunately.
|
||||
|
||||
1. Key repeat will cease to work. For example, before if you wanted 20 'a'
|
||||
characters, you could press and hold the 'a' key for a second or two. This no
|
||||
longer works with Auto Shift because it is timing your depressed time instead
|
||||
of emitting a depressed key state to your operating system.
|
||||
2. You will have characters that are shifted when you did not intend on shifting, and
|
||||
other characters you wanted shifted, but were not. This simply comes down to
|
||||
practice. As we get in a hurry, we think we have hit the key long enough
|
||||
for a shifted version, but we did not. On the other hand, we may think we are
|
||||
tapping the keys, but really we have held it for a little longer than
|
||||
anticipated.
|
||||
You will have characters that are shifted when you did not intend on shifting, and
|
||||
other characters you wanted shifted, but were not. This simply comes down to
|
||||
practice. As we get in a hurry, we think we have hit the key long enough for a
|
||||
shifted version, but we did not. On the other hand, we may think we are tapping
|
||||
the keys, but really we have held it for a little longer than anticipated.
|
||||
|
||||
Additionally, with keyrepeat the desired shift state can get mixed up. It will
|
||||
always 'belong' to the last key pressed. For example, keyrepeating a capital
|
||||
and then tapping something lowercase (whether or not it's an Auto Shift key)
|
||||
will result in the capital's *key* still being held, but shift not.
|
||||
|
||||
## How Do I Enable Auto Shift?
|
||||
|
||||
@@ -103,6 +109,14 @@ Do not Auto Shift numeric keys, zero through nine.
|
||||
|
||||
Do not Auto Shift alpha characters, which include A through Z.
|
||||
|
||||
### AUTO_SHIFT_REPEAT (simple define)
|
||||
|
||||
Enables keyrepeat.
|
||||
|
||||
### AUTO_SHIFT_NO_AUTO_REPEAT (simple define)
|
||||
|
||||
Disables automatically keyrepeating when `AUTO_SHIFT_TIMEOUT` is exceeded.
|
||||
|
||||
## Using Auto Shift Setup
|
||||
|
||||
This will enable you to define three keys temporarily to increase, decrease and report your `AUTO_SHIFT_TIMEOUT`.
|
||||
|
@@ -62,14 +62,15 @@ Valid driver values are `pwm`, `software`, `custom` or `no`. See below for help
|
||||
|
||||
To configure the backlighting, `#define` these in your `config.h`:
|
||||
|
||||
|Define |Default |Description |
|
||||
|---------------------|-------------|-------------------------------------------------------------------------------------|
|
||||
|`BACKLIGHT_PIN` |*Not defined*|The pin that controls the LED(s) |
|
||||
|`BACKLIGHT_LEVELS` |`3` |The number of brightness levels (maximum 31 excluding off) |
|
||||
|`BACKLIGHT_CAPS_LOCK`|*Not defined*|Enable Caps Lock indicator using backlight (for keyboards without dedicated LED) |
|
||||
|`BACKLIGHT_BREATHING`|*Not defined*|Enable backlight breathing, if supported |
|
||||
|`BREATHING_PERIOD` |`6` |The length of one backlight "breath" in seconds |
|
||||
|`BACKLIGHT_ON_STATE` |`1` |The state of the backlight pin when the backlight is "on" - `1` for high, `0` for low|
|
||||
| Define | Default | Description |
|
||||
|------------------------|---------------|-------------------------------------------------------------------------------------------------------------------|
|
||||
| `BACKLIGHT_PIN` | *Not defined* | The pin that controls the LED(s) |
|
||||
| `BACKLIGHT_LEVELS` | `3` | The number of brightness levels (maximum 31 excluding off) |
|
||||
| `BACKLIGHT_CAPS_LOCK` | *Not defined* | Enable Caps Lock indicator using backlight (for keyboards without dedicated LED) |
|
||||
| `BACKLIGHT_BREATHING` | *Not defined* | Enable backlight breathing, if supported |
|
||||
| `BREATHING_PERIOD` | `6` | The length of one backlight "breath" in seconds |
|
||||
| `BACKLIGHT_ON_STATE` | `1` | The state of the backlight pin when the backlight is "on" - `1` for high, `0` for low |
|
||||
| `BACKLIGHT_LIMIT_VAL ` | `255` | The maximum duty cycle of the backlight -- `255` allows for full brightness, any lower will decrease the maximum. |
|
||||
|
||||
Unless you are designing your own keyboard, you generally should not need to change the `BACKLIGHT_PIN` or `BACKLIGHT_ON_STATE`.
|
||||
|
||||
|
@@ -32,13 +32,20 @@ Additionally, the resolution, which defines how many pulses the encoder register
|
||||
#define ENCODER_RESOLUTION 4
|
||||
```
|
||||
|
||||
It can also be defined per-encoder, by instead defining:
|
||||
|
||||
```c
|
||||
#define ENCODER_RESOLUTIONS { 4, 2 }
|
||||
```
|
||||
|
||||
## Split Keyboards
|
||||
|
||||
If you are using different pinouts for the encoders on each half of a split keyboard, you can define the pinout for the right half like this:
|
||||
If you are using different pinouts for the encoders on each half of a split keyboard, you can define the pinout (and optionally, resolutions) for the right half like this:
|
||||
|
||||
```c
|
||||
#define ENCODERS_PAD_A_RIGHT { encoder1a, encoder2a }
|
||||
#define ENCODERS_PAD_B_RIGHT { encoder1b, encoder2b }
|
||||
#define ENCODER_RESOLUTIONS_RIGHT { 2, 4 }
|
||||
```
|
||||
|
||||
## Callbacks
|
||||
|
@@ -42,14 +42,21 @@ First you will need a build a circuit to drive the solenoid through a mosfet as
|
||||
[Wiring diagram provided by Adafruit](https://playground.arduino.cc/uploads/Learning/solenoid_driver.pdf)
|
||||
|
||||
|
||||
| Settings | Default | Description |
|
||||
|--------------------------|---------------|-------------------------------------------------------|
|
||||
|`SOLENOID_PIN` | *Not defined* |Configures the pin that the Solenoid is connected to. |
|
||||
|`SOLENOID_DEFAULT_DWELL` | `12` ms |Configures the default dwell time for the solenoid. |
|
||||
|`SOLENOID_MIN_DWELL` | `4` ms |Sets the lower limit for the dwell. |
|
||||
|`SOLENOID_MAX_DWELL` | `100` ms |Sets the upper limit for the dwell. |
|
||||
| Settings | Default | Description |
|
||||
|----------------------------|----------------------|-------------------------------------------------------|
|
||||
|`SOLENOID_PIN` | *Not defined* |Configures the pin that the Solenoid is connected to. |
|
||||
|`SOLENOID_DEFAULT_DWELL` | `12` ms |Configures the default dwell time for the solenoid. |
|
||||
|`SOLENOID_MIN_DWELL` | `4` ms |Sets the lower limit for the dwell. |
|
||||
|`SOLENOID_MAX_DWELL` | `100` ms |Sets the upper limit for the dwell. |
|
||||
|`SOLENOID_DWELL_STEP_SIZE` | `1` ms |The step size to use when `HPT_DWL*` keycodes are sent |
|
||||
|`SOLENOID_DEFAULT_BUZZ` | `0` (disabled) |On HPT_RST buzz is set "on" if this is "1" |
|
||||
|`SOLENOID_BUZZ_ACTUATED` | `SOLENOID_MIN_DWELL` |Actuated-time when the solenoid is in buzz mode |
|
||||
|`SOLENOID_BUZZ_NONACTUATED` | `SOLENOID_MIN_DWELL` |Non-Actuated-time when the solenoid is in buzz mode |
|
||||
|
||||
?> Dwell time is how long the "plunger" stays activated. The dwell time changes how the solenoid sounds.
|
||||
* If solenoid buzz is off, then dwell time is how long the "plunger" stays activated. The dwell time changes how the solenoid sounds.
|
||||
* If solenoid buzz is on, then dwell time sets the length of the buzz, while `SOLENOID_BUZZ_ACTUATED` and `SOLENOID_BUZZ_NONACTUATED` set the (non-)actuation times withing the buzz period.
|
||||
* With the current implementation, for any of the above time settings, the precision of these settings may be affected by how fast the keyboard is able to scan the matrix.
|
||||
Therefore, if the keyboards scanning routine is slow, it may be preferable to set `SOLENOID_DWELL_STEP_SIZE` to a value slightly smaller than the time it takes to scan the keyboard.
|
||||
|
||||
Beware that some pins may be powered during bootloader (ie. A13 on the STM32F303 chip) and will result in the solenoid kept in the on state through the whole flashing process. This may overheat and damage the solenoid. If you find that the pin the solenoid is connected to is triggering the solenoid during bootloader/DFU, select another pin.
|
||||
|
||||
|
@@ -141,6 +141,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
}
|
||||
```
|
||||
|
||||
### Axis Resolution
|
||||
|
||||
By default, the resolution of each axis is 8 bit, giving a range of -127 to +127. If you need higher precision, you can increase it by defining eg. `JOYSTICK_AXES_RESOLUTION 12` in your `config.h`. The resolution must be between 8 and 16.
|
||||
|
||||
Note that the supported AVR MCUs have a 10-bit ADC, and 12-bit for most STM32 MCUs.
|
||||
|
||||
### Triggering Joystick Buttons
|
||||
|
||||
Joystick buttons are normal Quantum keycodes, defined as `JS_BUTTON0` to `JS_BUTTON31`, depending on the number of buttons you have configured.
|
||||
|
@@ -10,7 +10,8 @@ If you want to use RGB LED's you should use the [RGB Matrix Subsystem](feature_r
|
||||
|
||||
There is basic support for addressable LED matrix lighting with the I2C IS31FL3731 RGB controller. To enable it, add this to your `rules.mk`:
|
||||
|
||||
LED_MATRIX_ENABLE = IS31FL3731
|
||||
LED_MATRIX_ENABLE = yes
|
||||
LED_MATRIX_DRIVER = IS31FL3731
|
||||
|
||||
You can use between 1 and 4 IS31FL3731 IC's. Do not specify `LED_DRIVER_ADDR_<N>` defines for IC's that are not present on your keyboard. You can define the following items in `config.h`:
|
||||
|
||||
|
@@ -182,7 +182,9 @@ Which would send Left Control+`a` (Left Control down, `a`, Left Control up) - no
|
||||
|
||||
By default, it assumes a US keymap with a QWERTY layout; if you want to change that (e.g. if your OS uses software Colemak), include this somewhere in your keymap:
|
||||
|
||||
#include <sendstring_colemak.h>
|
||||
```c
|
||||
#include "sendstring_colemak.h"
|
||||
```
|
||||
|
||||
### Strings in Memory
|
||||
|
||||
|
@@ -140,3 +140,7 @@ To use constant speed mode, you must at least define `MK_COMBINED` in your keyma
|
||||
```c
|
||||
#define MK_COMBINED
|
||||
```
|
||||
|
||||
## Use with PS/2 Mouse and Pointing Device
|
||||
|
||||
Mouse keys button state is shared with [PS/2 mouse](feature_ps2_mouse.md) and [pointing device](feature_pointing_device.md) so mouse keys button presses can be used for clicks and drags.
|
||||
|
@@ -150,6 +150,7 @@ void oled_task_user(void) {
|
||||
|`OLED_IC` |`OLED_IC_SSD1306`|Set to `OLED_IC_SH1106` if you're using the SH1106 OLED controller. |
|
||||
|`OLED_COLUMN_OFFSET` |`0` |(SH1106 only.) Shift output to the right this many pixels.<br />Useful for 128x64 displays centered on a 132x64 SH1106 IC.|
|
||||
|`OLED_BRIGHTNESS` |`255` |The default brightness level of the OLED, from 0 to 255. |
|
||||
|`OLED_UPDATE_INTERVAL` |`0` |Set the time interval for updating the OLED display in ms. This will improve the matrix scan rate. |
|
||||
|
||||
## 128x64 & Custom sized OLED Displays
|
||||
|
||||
|
@@ -11,7 +11,8 @@ If you want to use single color LED's you should use the [LED Matrix Subsystem](
|
||||
There is basic support for addressable RGB matrix lighting with the I2C IS31FL3731 RGB controller. To enable it, add this to your `rules.mk`:
|
||||
|
||||
```makefile
|
||||
RGB_MATRIX_ENABLE = IS31FL3731
|
||||
RGB_MATRIX_ENABLE = yes
|
||||
RGB_MATRIX_DRIVER = IS31FL3731
|
||||
```
|
||||
|
||||
Configure the hardware via your `config.h`:
|
||||
@@ -62,7 +63,8 @@ Where `Cx_y` is the location of the LED in the matrix defined by [the datasheet]
|
||||
There is basic support for addressable RGB matrix lighting with the I2C IS31FL3733 RGB controller. To enable it, add this to your `rules.mk`:
|
||||
|
||||
```makefile
|
||||
RGB_MATRIX_ENABLE = IS31FL3733
|
||||
RGB_MATRIX_ENABLE = yes
|
||||
RGB_MATRIX_DRIVER = IS31FL3733
|
||||
```
|
||||
|
||||
Configure the hardware via your `config.h`:
|
||||
@@ -112,7 +114,8 @@ Where `X_Y` is the location of the LED in the matrix defined by [the datasheet](
|
||||
There is basic support for addressable RGB matrix lighting with a WS2811/WS2812{a,b,c} addressable LED strand. To enable it, add this to your `rules.mk`:
|
||||
|
||||
```makefile
|
||||
RGB_MATRIX_ENABLE = WS2812
|
||||
RGB_MATRIX_ENABLE = yes
|
||||
RGB_MATRIX_DRIVER = WS2812
|
||||
```
|
||||
|
||||
Configure the hardware via your `config.h`:
|
||||
@@ -482,6 +485,14 @@ void rgb_matrix_indicators_kb(void) {
|
||||
}
|
||||
```
|
||||
|
||||
In addition, there are the advanced indicator functions. These are aimed at those with heavily customized displays, where rendering every LED per cycle is expensive. Such as some of the "drashna" layouts. This includes a special macro to help make this easier to use: `RGB_MATRIX_INDICATOR_SET_COLOR(i, r, g, b)`.
|
||||
|
||||
```c
|
||||
void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
|
||||
RGB_MATRIX_INDICATOR_SET_COLOR(index, red, green, blue);
|
||||
}
|
||||
```
|
||||
|
||||
### Suspended state :id=suspended-state
|
||||
To use the suspend feature, make sure that `#define RGB_DISABLE_WHEN_USB_SUSPENDED true` is added to the `config.h` file.
|
||||
|
||||
|
88
docs/feature_sequencer.md
Normal file
88
docs/feature_sequencer.md
Normal file
@@ -0,0 +1,88 @@
|
||||
# Sequencer
|
||||
|
||||
Since QMK has experimental support for MIDI, you can now turn your keyboard into a [step sequencer](https://en.wikipedia.org/wiki/Music_sequencer#Step_sequencers)!
|
||||
|
||||
!> **IMPORTANT:** This feature is highly experimental, it has only been tested on a Planck EZ so far. Also, the scope will be limited to support the drum machine use-case to start with.
|
||||
|
||||
## Enable the step sequencer
|
||||
|
||||
Add the following line to your `rules.mk`:
|
||||
|
||||
```make
|
||||
SEQUENCER_ENABLE = yes
|
||||
```
|
||||
|
||||
By default the sequencer has 16 steps, but you can override this setting in your `config.h`:
|
||||
|
||||
```c
|
||||
#define SEQUENCER_STEPS 32
|
||||
```
|
||||
|
||||
## Tracks
|
||||
|
||||
You can program up to 8 independent tracks with the step sequencer. Select the tracks you want to edit, enable or disable some steps, and start the sequence!
|
||||
|
||||
## Resolutions
|
||||
|
||||
While the tempo defines the absolute speed at which the sequencer goes through the steps, the resolution defines the granularity of these steps (from coarser to finer).
|
||||
|
||||
|Resolution |Description |
|
||||
|---------- |----------- |
|
||||
|`SQ_RES_2` |Every other beat |
|
||||
|`SQ_RES_2T` |Every 1.5 beats |
|
||||
|`SQ_RES_4` |Every beat |
|
||||
|`SQ_RES_4T` |Three times per 2 beats|
|
||||
|`SQ_RES_8` |Twice per beat |
|
||||
|`SQ_RES_8T` |Three times per beat |
|
||||
|`SQ_RES_16` |Four times per beat |
|
||||
|`SQ_RES_16T` |Six times per beat |
|
||||
|`SQ_RES_32` |Eight times per beat |
|
||||
|
||||
## Keycodes
|
||||
|
||||
|Keycode |Description |
|
||||
|------- |----------- |
|
||||
|`SQ_ON` |Start the step sequencer |
|
||||
|`SQ_OFF` |Stop the step sequencer |
|
||||
|`SQ_TOG` |Toggle the step sequencer playback |
|
||||
|`SQ_SALL`|Enable all the steps |
|
||||
|`SQ_SCLR`|Disable all the steps |
|
||||
|`SQ_S(n)`|Toggle the step `n` |
|
||||
|`SQ_TMPD`|Decrease the tempo |
|
||||
|`SQ_TMPU`|Increase the tempo |
|
||||
|`SQ_R(n)`|Set the resolution to n |
|
||||
|`SQ_RESD`|Change to the slower resolution |
|
||||
|`SQ_RESU`|Change to the faster resolution |
|
||||
|`SQ_T(n)`|Set `n` as the only active track or deactivate all |
|
||||
|
||||
## Functions
|
||||
|
||||
|Function |Description |
|
||||
|-------- |----------- |
|
||||
|`bool is_sequencer_on(void);` |Return whether the sequencer is playing |
|
||||
|`void sequencer_toggle(void);` |Toggle the step sequencer playback |
|
||||
|`void sequencer_on(void);` |Start the step sequencer |
|
||||
|`void sequencer_off(void);` |Stop the step sequencer |
|
||||
|`bool is_sequencer_step_on(uint8_t step);` |Return whether the step is currently enabled |
|
||||
|`void sequencer_set_step(uint8_t step, bool value);` |Enable or disable the step |
|
||||
|`void sequencer_set_step_on();` |Enable the step |
|
||||
|`void sequencer_set_step_off();` |Disable the step |
|
||||
|`void sequencer_toggle_step(uint8_t step);` |Toggle the step |
|
||||
|`void sequencer_set_all_steps(bool value);` |Enable or disable all the steps |
|
||||
|`void sequencer_set_all_steps_on();` |Enable all the steps |
|
||||
|`void sequencer_set_all_steps_off();` |Disable all the steps |
|
||||
|`uint8_t sequencer_get_tempo(void);` |Return the current tempo |
|
||||
|`void sequencer_set_tempo(uint8_t tempo);` |Set the tempo to `tempo` (between 1 and 255) |
|
||||
|`void sequencer_increase_tempo(void);` |Increase the tempo |
|
||||
|`void sequencer_decrease_tempo(void);` |Decrease the tempo |
|
||||
|`sequencer_resolution_t sequencer_get_resolution(void);` |Return the current resolution |
|
||||
|`void sequencer_set_resolution(sequencer_resolution_t resolution);` |Set the resolution to `resolution` |
|
||||
|`void sequencer_increase_resolution(void);` |Change to the faster resolution |
|
||||
|`void sequencer_decrease_resolution(void);` |Change to the slower resolution |
|
||||
|`bool is_sequencer_track_active(uint8_t track);` |Return whether the track is active |
|
||||
|`void sequencer_set_track_activation(uint8_t track, bool value);` |Activate or deactivate the `track` |
|
||||
|`void sequencer_toggle_track_activation(uint8_t track);` |Toggle the `track` |
|
||||
|`void sequencer_activate_track(uint8_t track);` |Activate the `track` |
|
||||
|`void sequencer_deactivate_track(uint8_t track);` |Deactivate the `track` |
|
||||
|`void sequencer_toggle_single_active_track(uint8_t track);` |Set `track` as the only active track or deactivate all |
|
||||
|
@@ -237,6 +237,26 @@ This sets the maximum timeout when detecting master/slave when using `SPLIT_USB_
|
||||
```
|
||||
This sets the poll frequency when detecting master/slave when using `SPLIT_USB_DETECT`
|
||||
|
||||
## Hardware Considerations and Mods
|
||||
|
||||
While most any Pro Micro can be used, micro controllers like the AVR Teensys and most (if not all) ARM boards require the Split USB Detect.
|
||||
|
||||
However, with the Teensy 2.0 and Teensy++ 2.0, there is a simple hardware mod that you can perform to add VBUS detection, so you don't need the Split USB detection option.
|
||||
|
||||
You'll only need a few things:
|
||||
|
||||
* A knife (x-acto knife, ideally)
|
||||
* A solder station or hot air station
|
||||
* An appropriate Schottky diode, such as the [PMEG2005EH](https://www.digikey.com/en/products/detail/nexperia-usa-inc/PMEG2005EH,115/1589924)
|
||||
|
||||
You'll need to cut the small trace between the 5V and center pads on the back of the Teensy.
|
||||
|
||||
Once you have done that, you will want to solder the diode from the 5V pad to the center pad.
|
||||
|
||||
You may need to use the 5V pad from the regulator block above as the pads were too small and placed too closely together to place the Schottky diode properly.
|
||||
|
||||

|
||||
|
||||
## Additional Resources
|
||||
|
||||
Nicinabox has a [very nice and detailed guide](https://github.com/nicinabox/lets-split-guide) for the Let's Split keyboard, that covers most everything you need to know, including troubleshooting information.
|
||||
|
@@ -184,7 +184,7 @@ If you wanted to consolidate macros and other functions into your userspace for
|
||||
|
||||
First, you'd want to go through all of your `keymap.c` files and replace `process_record_user` with `process_record_keymap` instead. This way, you can still use keyboard specific codes on those boards, and use your custom "global" keycodes as well. You'll also want to replace `SAFE_RANGE` with `NEW_SAFE_RANGE` so that you wont have any overlapping keycodes
|
||||
|
||||
Then add `#include <name.h>` to all of your keymap.c files. This allows you to use these new keycodes without having to redefine them in each keymap.
|
||||
Then add `#include "<name>.h"` to all of your keymap.c files. This allows you to use these new keycodes without having to redefine them in each keymap.
|
||||
|
||||
Once you've done that, you'll want to set the keycode definitions that you need to the `<name>.h` file. For instance:
|
||||
```c
|
||||
|
@@ -42,7 +42,9 @@ Vous préférez une solution basée sur le terminal? [hid_listen](https://www.pj
|
||||
|
||||
Parfois, il est utile d'afficher des messages de débugage depuis votre [code custom](custom_quantum_functions.md). Le faire est assez simple. Commencez par ajouter `print.h` au début de votre fichier:
|
||||
|
||||
#include <print.h>
|
||||
```c
|
||||
#include "print.h"
|
||||
```
|
||||
|
||||
Une fois fait, vous pouvez utiliser les fonctions print suivantes:
|
||||
|
||||
|
@@ -21,3 +21,22 @@ The following functions can provide basic control of GPIOs and are found in `qua
|
||||
## Advanced Settings :id=advanced-settings
|
||||
|
||||
Each microcontroller can have multiple advanced settings regarding its GPIO. This abstraction layer does not limit the use of architecture-specific functions. Advanced users should consult the datasheet of their desired device and include any needed libraries. For AVR, the standard avr/io.h library is used; for STM32, the ChibiOS [PAL library](http://chibios.sourceforge.net/docs3/hal/group___p_a_l.html) is used.
|
||||
|
||||
## Atomic Operation
|
||||
|
||||
The above functions are not always guaranteed to work atomically. Therefore, if you want to prevent interruptions in the middle of operations when using multiple combinations of the above functions, use the following `ATOMIC_BLOCK_FORCEON` macro.
|
||||
|
||||
eg.
|
||||
```c
|
||||
void some_function() {
|
||||
// some process
|
||||
ATOMIC_BLOCK_FORCEON {
|
||||
// Atomic Processing
|
||||
}
|
||||
// some process
|
||||
}
|
||||
```
|
||||
|
||||
`ATOMIC_BLOCK_FORCEON` forces interrupts to be disabled before the block is executed, without regard to whether they are enabled or disabled. Then, after the block is executed, the interrupt is enabled.
|
||||
|
||||
Note that `ATOMIC_BLOCK_FORCEON` can therefore be used if you know that interrupts are enabled before the execution of the block, or if you know that it is OK to enable interrupts at the completion of the block.
|
||||
|
@@ -34,7 +34,9 @@ QMK での全ての利用可能な設定にはデフォルトがあります。
|
||||
|
||||
これは最初に include されるものの 1 つである C ヘッダファイルで、プロジェクト全体(もし含まれる場合)にわたって持続します。多くの変数をここで設定し、他の場所からアクセスすることができます。`config.h` ファイルでは、以下のもの以外の、他の `config.h` ファイルやその他のファイルの include をしないでください:
|
||||
|
||||
#include "config_common.h"
|
||||
```c
|
||||
#include "config_common.h"
|
||||
```
|
||||
|
||||
|
||||
## ハードウェアオプション
|
||||
|
@@ -15,7 +15,8 @@ RGB LED を使いたい場合は、代わりに [RGB マトリックスサブシ
|
||||
|
||||
I2C IS31FL3731 RGB コントローラを使ったアドレス指定可能な LED マトリックスライトのための基本的なサポートがあります:有効にするには、`rules.mk` に以下を追加します:
|
||||
|
||||
LED_MATRIX_ENABLE = IS31FL3731
|
||||
LED_MATRIX_ENABLE = yes
|
||||
LED_MATRIX_DRIVER = IS31FL3731
|
||||
|
||||
1から4個の IS31FL3731 IC を使うことができます。キーボード上に存在しない IC の `LED_DRIVER_ADDR_<N>` 定義を指定しないでください。`config.h` に以下の項目を定義することができます:
|
||||
|
||||
|
@@ -187,7 +187,9 @@ void post_process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
|
||||
デフォルトでは、QWERTY レイアウトの US キーマップを想定しています; それを変更したい場合(例えば OS がソフトウェア Colemak を使う場合)、キーマップのどこかに以下を含めます:
|
||||
|
||||
#include <sendstring_colemak.h>
|
||||
```c
|
||||
#include "sendstring_colemak.h"
|
||||
```
|
||||
|
||||
### メモリ内の文字列
|
||||
|
||||
|
@@ -189,7 +189,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
|
||||
最初に、全ての `keymap.c` ファイルを調べ、代わりに `process_record_user` を `process_record_keymap` に置き換えます。この方法では、これらのキーボードでキーボード固有のコードを使用でき、カスタムの "global" キーコードも使うことができます。また、`SAFE_RANGE` を `NEW_SAFE_RANGE` に置き換えて、キーコードが重複しないようにすることもできます。
|
||||
|
||||
次に、全ての keymap.c ファイルに `#include <name.h>` を追加します。これにより、各キーマップでそれらを再定義することなく新しいキーコードを使うことができます。
|
||||
次に、全ての keymap.c ファイルに `#include "<name>.h"` を追加します。これにより、各キーマップでそれらを再定義することなく新しいキーコードを使うことができます。
|
||||
|
||||
それが完了したら、必要なキーコードの定義を `<name>.h` ファイルに設定します。例えば:
|
||||
```c
|
||||
|
@@ -45,7 +45,9 @@ void keyboard_post_init_user(void) {
|
||||
|
||||
[custom code](ja/custom_quantum_functions.md)内からデバッグメッセージを出力すると便利な場合があります。それはとても簡単です。ファイルの先頭に`print.h`のインクルードを追加します:
|
||||
|
||||
#include <print.h>
|
||||
```c
|
||||
#include "print.h"
|
||||
```
|
||||
|
||||
そのあとは、いくつかの異なった print 関数を使用することが出来ます。
|
||||
|
||||
|
@@ -60,9 +60,12 @@ After Homebrew is installed run this command:
|
||||
|
||||
You will need to install Git and Python. It's very likely that you already have both, but if not, one of the following commands should install them:
|
||||
|
||||
* Debian / Ubuntu / Devuan: `sudo apt install git python3 python3-pip`
|
||||
* Fedora / Red Hat / CentOS: `sudo yum install git python3 python3-pip`
|
||||
* Arch / Manjaro: `sudo pacman -S git python python-pip python-setuptools libffi`
|
||||
* Debian / Ubuntu / Devuan: `sudo apt install -y git python3-pip`
|
||||
* Fedora / Red Hat / CentOS: `sudo yum -y install git python3-pip`
|
||||
* Arch / Manjaro: `sudo pacman --needed --noconfirm -S git python-pip libffi`
|
||||
* Void: `sudo xbps-install -y git python3-pip`
|
||||
* Solus: `sudo eopkg -y install git python3`
|
||||
* Sabayon: `sudo equo install dev-vcs/git dev-python/pip`
|
||||
|
||||
Install the global CLI to bootstrap your system:
|
||||
|
||||
|
@@ -36,7 +36,9 @@ Prefer a terminal based solution? [hid_listen](https://www.pjrc.com/teensy/hid_l
|
||||
|
||||
Sometimes it's useful to print debug messages from within your [custom code](custom_quantum_functions.md). Doing so is pretty simple. Start by including `print.h` at the top of your file:
|
||||
|
||||
#include <print.h>
|
||||
```c
|
||||
#include "print.h"
|
||||
```
|
||||
|
||||
After that you can use a few different print functions:
|
||||
|
||||
|
@@ -22,7 +22,7 @@ Sometimes, you want to activate a one-shot key as part of a macro or tap dance r
|
||||
|
||||
For one shot layers, you need to call `set_oneshot_layer(LAYER, ONESHOT_START)` on key down, and `clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED)` on key up. If you want to cancel the oneshot, call `reset_oneshot_layer()`.
|
||||
|
||||
For one shot mods, you need to call `set_oneshot_mods(MOD)` to set it, or `clear_oneshot_mods()` to cancel it.
|
||||
For one shot mods, you need to call `set_oneshot_mods(MOD_BIT(KC_*))` to set it, or `clear_oneshot_mods()` to cancel it.
|
||||
|
||||
!> 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.
|
||||
|
||||
|
@@ -179,6 +179,25 @@ Holding and releasing a dual function key without pressing another key will resu
|
||||
|
||||
For instance, holding and releasing `LT(2, KC_SPACE)` without hitting another key will result in nothing happening. With this enabled, it will send `KC_SPACE` instead.
|
||||
|
||||
For more granular control of this feature, you can add the following to your `config.h`:
|
||||
|
||||
```c
|
||||
#define RETRO_TAPPING_PER_KEY
|
||||
```
|
||||
|
||||
You can then add the following function to your keymap:
|
||||
|
||||
```c
|
||||
bool get_retro_tapping(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case LT(2, KC_SPACE):
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Why do we include the key record for the per key functions?
|
||||
|
||||
One thing that you may notice is that we include the key record for all of the "per key" functions, and may be wondering why we do that.
|
||||
|
@@ -28,6 +28,17 @@ The default setting is 280 µs, which should work for most cases, but this can b
|
||||
#define WS2812_TRST_US 80
|
||||
```
|
||||
|
||||
#### Byte Order
|
||||
|
||||
Some variants of the WS2812 may have their color components in a different physical or logical order. For example, the WS2812B-2020 has physically swapped red and green LEDs, which causes the wrong color to be displayed, because the default order of the bytes sent over the wire is defined as GRB.
|
||||
In this case, you can change the byte order by defining `WS2812_BYTE_ORDER` as one of the following values:
|
||||
|
||||
| Byte order | Known devices |
|
||||
|-----------------------------------|-------------------------------|
|
||||
| `WS2812_BYTE_ORDER_GRB` (default) | Most WS2812's, SK6812, SK6805 |
|
||||
| `WS2812_BYTE_ORDER_RGB` | WS2812B-2020 |
|
||||
|
||||
|
||||
### Bitbang
|
||||
Default driver, the absence of configuration assumes this driver. To configure it, add this to your rules.mk:
|
||||
|
||||
|
@@ -34,7 +34,9 @@ void keyboard_post_init_user(void) {
|
||||
|
||||
有时用[custom code](custom_quantum_functions.md)发送自定义调试信息很有用. 这么做很简单. 首先在你文件头部包含`print.h`:
|
||||
|
||||
#include <print.h>
|
||||
```c
|
||||
#include "print.h"
|
||||
```
|
||||
|
||||
之后,您可以使用一些不同的打印功能:
|
||||
|
||||
|
@@ -20,50 +20,111 @@
|
||||
|
||||
#ifdef SOFT_SERIAL_PIN
|
||||
|
||||
# ifdef __AVR_ATmega32U4__
|
||||
// if using ATmega32U4 I2C, can not use PD0 and PD1 in soft serial.
|
||||
# ifdef USE_AVR_I2C
|
||||
# if SOFT_SERIAL_PIN == D0 || SOFT_SERIAL_PIN == D1
|
||||
# error Using ATmega32U4 I2C, so can not use PD0, PD1
|
||||
# endif
|
||||
# if !(defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__) || defined(__AVR_ATmega16U2__) || defined(__AVR_ATmega32U2__) || defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__))
|
||||
# error serial.c is not supported for the currently selected MCU
|
||||
# endif
|
||||
// if using ATmega32U4/2, AT90USBxxx I2C, can not use PD0 and PD1 in soft serial.
|
||||
# if defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__) || defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__)
|
||||
# if defined(USE_AVR_I2C) && (SOFT_SERIAL_PIN == D0 || SOFT_SERIAL_PIN == D1)
|
||||
# error Using I2C, so can not use PD0, PD1
|
||||
# endif
|
||||
# endif
|
||||
// PD0..PD3, common config
|
||||
# if SOFT_SERIAL_PIN == D0
|
||||
# define EIMSK_BIT _BV(INT0)
|
||||
# define EICRx_BIT (~(_BV(ISC00) | _BV(ISC01)))
|
||||
# define SERIAL_PIN_INTERRUPT INT0_vect
|
||||
# define EICRx EICRA
|
||||
# elif SOFT_SERIAL_PIN == D1
|
||||
# define EIMSK_BIT _BV(INT1)
|
||||
# define EICRx_BIT (~(_BV(ISC10) | _BV(ISC11)))
|
||||
# define SERIAL_PIN_INTERRUPT INT1_vect
|
||||
# define EICRx EICRA
|
||||
# elif SOFT_SERIAL_PIN == D2
|
||||
# define EIMSK_BIT _BV(INT2)
|
||||
# define EICRx_BIT (~(_BV(ISC20) | _BV(ISC21)))
|
||||
# define SERIAL_PIN_INTERRUPT INT2_vect
|
||||
# define EICRx EICRA
|
||||
# elif SOFT_SERIAL_PIN == D3
|
||||
# define EIMSK_BIT _BV(INT3)
|
||||
# define EICRx_BIT (~(_BV(ISC30) | _BV(ISC31)))
|
||||
# define SERIAL_PIN_INTERRUPT INT3_vect
|
||||
# define EICRx EICRA
|
||||
# endif
|
||||
|
||||
# define setPinInputHigh(pin) (DDRx_ADDRESS(pin) &= ~_BV((pin)&0xF), PORTx_ADDRESS(pin) |= _BV((pin)&0xF))
|
||||
# define setPinOutput(pin) (DDRx_ADDRESS(pin) |= _BV((pin)&0xF))
|
||||
# define writePinHigh(pin) (PORTx_ADDRESS(pin) |= _BV((pin)&0xF))
|
||||
# define writePinLow(pin) (PORTx_ADDRESS(pin) &= ~_BV((pin)&0xF))
|
||||
# define readPin(pin) ((bool)(PINx_ADDRESS(pin) & _BV((pin)&0xF)))
|
||||
// ATmegaxxU2 specific config
|
||||
# if defined(__AVR_ATmega16U2__) || defined(__AVR_ATmega32U2__)
|
||||
// PD4(INT5), PD6(INT6), PD7(INT7), PC7(INT4)
|
||||
# if SOFT_SERIAL_PIN == D4
|
||||
# define EIMSK_BIT _BV(INT5)
|
||||
# define EICRx_BIT (~(_BV(ISC50) | _BV(ISC51)))
|
||||
# define SERIAL_PIN_INTERRUPT INT5_vect
|
||||
# define EICRx EICRB
|
||||
# elif SOFT_SERIAL_PIN == D6
|
||||
# define EIMSK_BIT _BV(INT6)
|
||||
# define EICRx_BIT (~(_BV(ISC60) | _BV(ISC61)))
|
||||
# define SERIAL_PIN_INTERRUPT INT6_vect
|
||||
# define EICRx EICRB
|
||||
# elif SOFT_SERIAL_PIN == D7
|
||||
# define EIMSK_BIT _BV(INT7)
|
||||
# define EICRx_BIT (~(_BV(ISC70) | _BV(ISC71)))
|
||||
# define SERIAL_PIN_INTERRUPT INT7_vect
|
||||
# define EICRx EICRB
|
||||
# elif SOFT_SERIAL_PIN == C7
|
||||
# define EIMSK_BIT _BV(INT4)
|
||||
# define EICRx_BIT (~(_BV(ISC40) | _BV(ISC41)))
|
||||
# define SERIAL_PIN_INTERRUPT INT4_vect
|
||||
# define EICRx EICRB
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# if SOFT_SERIAL_PIN >= D0 && SOFT_SERIAL_PIN <= D3
|
||||
# if SOFT_SERIAL_PIN == D0
|
||||
# define EIMSK_BIT _BV(INT0)
|
||||
# define EICRx_BIT (~(_BV(ISC00) | _BV(ISC01)))
|
||||
# define SERIAL_PIN_INTERRUPT INT0_vect
|
||||
# elif SOFT_SERIAL_PIN == D1
|
||||
# define EIMSK_BIT _BV(INT1)
|
||||
# define EICRx_BIT (~(_BV(ISC10) | _BV(ISC11)))
|
||||
# define SERIAL_PIN_INTERRUPT INT1_vect
|
||||
# elif SOFT_SERIAL_PIN == D2
|
||||
# define EIMSK_BIT _BV(INT2)
|
||||
# define EICRx_BIT (~(_BV(ISC20) | _BV(ISC21)))
|
||||
# define SERIAL_PIN_INTERRUPT INT2_vect
|
||||
# elif SOFT_SERIAL_PIN == D3
|
||||
# define EIMSK_BIT _BV(INT3)
|
||||
# define EICRx_BIT (~(_BV(ISC30) | _BV(ISC31)))
|
||||
# define SERIAL_PIN_INTERRUPT INT3_vect
|
||||
# endif
|
||||
// ATmegaxxU4 specific config
|
||||
# if defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__)
|
||||
// PE6(INT6)
|
||||
# if SOFT_SERIAL_PIN == E6
|
||||
# define EIMSK_BIT _BV(INT6)
|
||||
# define EICRx_BIT (~(_BV(ISC60) | _BV(ISC61)))
|
||||
# define SERIAL_PIN_INTERRUPT INT6_vect
|
||||
# define EICRx EICRB
|
||||
# endif
|
||||
# endif
|
||||
|
||||
// AT90USBxxx specific config
|
||||
# if defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__)
|
||||
// PE4..PE7(INT4..INT7)
|
||||
# if SOFT_SERIAL_PIN == E4
|
||||
# define EIMSK_BIT _BV(INT4)
|
||||
# define EICRx_BIT (~(_BV(ISC40) | _BV(ISC41)))
|
||||
# define SERIAL_PIN_INTERRUPT INT4_vect
|
||||
# define EICRx EICRB
|
||||
# elif SOFT_SERIAL_PIN == E5
|
||||
# define EIMSK_BIT _BV(INT5)
|
||||
# define EICRx_BIT (~(_BV(ISC50) | _BV(ISC51)))
|
||||
# define SERIAL_PIN_INTERRUPT INT5_vect
|
||||
# define EICRx EICRB
|
||||
# elif SOFT_SERIAL_PIN == E6
|
||||
# define EIMSK_BIT _BV(INT6)
|
||||
# define EICRx_BIT (~(_BV(ISC60) | _BV(ISC61)))
|
||||
# define SERIAL_PIN_INTERRUPT INT6_vect
|
||||
# else
|
||||
# error invalid SOFT_SERIAL_PIN value
|
||||
# define EICRx EICRB
|
||||
# elif SOFT_SERIAL_PIN == E7
|
||||
# define EIMSK_BIT _BV(INT7)
|
||||
# define EICRx_BIT (~(_BV(ISC70) | _BV(ISC71)))
|
||||
# define SERIAL_PIN_INTERRUPT INT7_vect
|
||||
# define EICRx EICRB
|
||||
# endif
|
||||
|
||||
# else
|
||||
# error serial.c now support ATmega32U4 only
|
||||
# endif
|
||||
|
||||
# ifndef SERIAL_PIN_INTERRUPT
|
||||
# error invalid SOFT_SERIAL_PIN value
|
||||
# endif
|
||||
|
||||
# define setPinInputHigh(pin) (DDRx_ADDRESS(pin) &= ~_BV((pin)&0xF), PORTx_ADDRESS(pin) |= _BV((pin)&0xF))
|
||||
# define setPinOutput(pin) (DDRx_ADDRESS(pin) |= _BV((pin)&0xF))
|
||||
# define writePinHigh(pin) (PORTx_ADDRESS(pin) |= _BV((pin)&0xF))
|
||||
# define writePinLow(pin) (PORTx_ADDRESS(pin) &= ~_BV((pin)&0xF))
|
||||
# define readPin(pin) ((bool)(PINx_ADDRESS(pin) & _BV((pin)&0xF)))
|
||||
|
||||
# define ALWAYS_INLINE __attribute__((always_inline))
|
||||
# define NO_INLINE __attribute__((noinline))
|
||||
# define _delay_sub_us(x) __builtin_avr_delay_cycles(x)
|
||||
@@ -210,15 +271,9 @@ void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size) {
|
||||
Transaction_table_size = (uint8_t)sstd_table_size;
|
||||
serial_input_with_pullup();
|
||||
|
||||
// Enable INT0-INT3,INT6
|
||||
// Enable INT0-INT7
|
||||
EIMSK |= EIMSK_BIT;
|
||||
# if SOFT_SERIAL_PIN == E6
|
||||
// Trigger on falling edge of INT6
|
||||
EICRB &= EICRx_BIT;
|
||||
# else
|
||||
// Trigger on falling edge of INT0-INT3
|
||||
EICRA &= EICRx_BIT;
|
||||
# endif
|
||||
EICRx &= EICRx_BIT;
|
||||
}
|
||||
|
||||
// Used by the sender to synchronize timing with the reciver.
|
||||
|
@@ -140,27 +140,33 @@ spi_status_t spi_read() {
|
||||
}
|
||||
|
||||
spi_status_t spi_transmit(const uint8_t *data, uint16_t length) {
|
||||
spi_status_t status = SPI_STATUS_ERROR;
|
||||
spi_status_t status;
|
||||
|
||||
for (uint16_t i = 0; i < length; i++) {
|
||||
status = spi_write(data[i]);
|
||||
|
||||
if (status < 0) {
|
||||
return status;
|
||||
}
|
||||
}
|
||||
|
||||
return status;
|
||||
return SPI_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
spi_status_t spi_receive(uint8_t *data, uint16_t length) {
|
||||
spi_status_t status = SPI_STATUS_ERROR;
|
||||
spi_status_t status;
|
||||
|
||||
for (uint16_t i = 0; i < length; i++) {
|
||||
status = spi_read();
|
||||
|
||||
if (status > 0) {
|
||||
if (status >= 0) {
|
||||
data[i] = status;
|
||||
} else {
|
||||
return status;
|
||||
}
|
||||
}
|
||||
|
||||
return (status < 0) ? status : SPI_STATUS_SUCCESS;
|
||||
return SPI_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
void spi_stop(void) {
|
||||
|
@@ -16,7 +16,7 @@
|
||||
|
||||
#include "quantum.h"
|
||||
#include "analog.h"
|
||||
#include "ch.h"
|
||||
#include <ch.h>
|
||||
#include <hal.h>
|
||||
|
||||
#if !HAL_USE_ADC
|
||||
|
@@ -58,18 +58,23 @@ static i2c_status_t chibios_to_qmk(const msg_t* status) {
|
||||
}
|
||||
|
||||
__attribute__((weak)) void i2c_init(void) {
|
||||
// Try releasing special pins for a short time
|
||||
palSetPadMode(I2C1_SCL_BANK, I2C1_SCL, PAL_MODE_INPUT);
|
||||
palSetPadMode(I2C1_SDA_BANK, I2C1_SDA, PAL_MODE_INPUT);
|
||||
static bool is_initialised = false;
|
||||
if (!is_initialised) {
|
||||
is_initialised = true;
|
||||
|
||||
chThdSleepMilliseconds(10);
|
||||
// Try releasing special pins for a short time
|
||||
palSetPadMode(I2C1_SCL_BANK, I2C1_SCL, PAL_MODE_INPUT);
|
||||
palSetPadMode(I2C1_SDA_BANK, I2C1_SDA, PAL_MODE_INPUT);
|
||||
|
||||
chThdSleepMilliseconds(10);
|
||||
#if defined(USE_GPIOV1)
|
||||
palSetPadMode(I2C1_SCL_BANK, I2C1_SCL, I2C1_SCL_PAL_MODE);
|
||||
palSetPadMode(I2C1_SDA_BANK, I2C1_SDA, I2C1_SDA_PAL_MODE);
|
||||
palSetPadMode(I2C1_SCL_BANK, I2C1_SCL, I2C1_SCL_PAL_MODE);
|
||||
palSetPadMode(I2C1_SDA_BANK, I2C1_SDA, I2C1_SDA_PAL_MODE);
|
||||
#else
|
||||
palSetPadMode(I2C1_SCL_BANK, I2C1_SCL, PAL_MODE_ALTERNATE(I2C1_SCL_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN);
|
||||
palSetPadMode(I2C1_SDA_BANK, I2C1_SDA, PAL_MODE_ALTERNATE(I2C1_SDA_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN);
|
||||
palSetPadMode(I2C1_SCL_BANK, I2C1_SCL, PAL_MODE_ALTERNATE(I2C1_SCL_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN);
|
||||
palSetPadMode(I2C1_SDA_BANK, I2C1_SDA, PAL_MODE_ALTERNATE(I2C1_SDA_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
i2c_status_t i2c_start(uint8_t address) {
|
||||
|
@@ -24,7 +24,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "ch.h"
|
||||
#include <ch.h>
|
||||
#include <hal.h>
|
||||
|
||||
#ifdef I2C1_BANK
|
||||
|
@@ -6,7 +6,7 @@
|
||||
#include "serial.h"
|
||||
#include "wait.h"
|
||||
|
||||
#include "hal.h"
|
||||
#include <hal.h>
|
||||
|
||||
// TODO: resolve/remove build warnings
|
||||
#if defined(RGBLIGHT_ENABLE) && defined(RGBLED_SPLIT) && defined(PROTOCOL_CHIBIOS) && defined(WS2812_DRIVER_BITBANG)
|
||||
|
@@ -2,8 +2,8 @@
|
||||
#include "serial.h"
|
||||
#include "printf.h"
|
||||
|
||||
#include "ch.h"
|
||||
#include "hal.h"
|
||||
#include <ch.h>
|
||||
#include <hal.h>
|
||||
|
||||
#ifndef USART_CR1_M0
|
||||
# define USART_CR1_M0 USART_CR1_M // some platforms (f1xx) dont have this so
|
||||
|
@@ -22,21 +22,26 @@ static pin_t currentSlavePin = NO_PIN;
|
||||
static SPIConfig spiConfig = {false, NULL, 0, 0, 0, 0};
|
||||
|
||||
__attribute__((weak)) void spi_init(void) {
|
||||
// Try releasing special pins for a short time
|
||||
palSetPadMode(PAL_PORT(SPI_SCK_PIN), PAL_PAD(SPI_SCK_PIN), PAL_MODE_INPUT);
|
||||
palSetPadMode(PAL_PORT(SPI_MOSI_PIN), PAL_PAD(SPI_MOSI_PIN), PAL_MODE_INPUT);
|
||||
palSetPadMode(PAL_PORT(SPI_MISO_PIN), PAL_PAD(SPI_MISO_PIN), PAL_MODE_INPUT);
|
||||
static bool is_initialised = false;
|
||||
if (!is_initialised) {
|
||||
is_initialised = true;
|
||||
|
||||
chThdSleepMilliseconds(10);
|
||||
// Try releasing special pins for a short time
|
||||
palSetPadMode(PAL_PORT(SPI_SCK_PIN), PAL_PAD(SPI_SCK_PIN), PAL_MODE_INPUT);
|
||||
palSetPadMode(PAL_PORT(SPI_MOSI_PIN), PAL_PAD(SPI_MOSI_PIN), PAL_MODE_INPUT);
|
||||
palSetPadMode(PAL_PORT(SPI_MISO_PIN), PAL_PAD(SPI_MISO_PIN), PAL_MODE_INPUT);
|
||||
|
||||
chThdSleepMilliseconds(10);
|
||||
#if defined(USE_GPIOV1)
|
||||
palSetPadMode(PAL_PORT(SPI_SCK_PIN), PAL_PAD(SPI_SCK_PIN), PAL_MODE_STM32_ALTERNATE_PUSHPULL);
|
||||
palSetPadMode(PAL_PORT(SPI_MOSI_PIN), PAL_PAD(SPI_MOSI_PIN), PAL_MODE_STM32_ALTERNATE_PUSHPULL);
|
||||
palSetPadMode(PAL_PORT(SPI_MISO_PIN), PAL_PAD(SPI_MISO_PIN), PAL_MODE_STM32_ALTERNATE_PUSHPULL);
|
||||
palSetPadMode(PAL_PORT(SPI_SCK_PIN), PAL_PAD(SPI_SCK_PIN), PAL_MODE_STM32_ALTERNATE_PUSHPULL);
|
||||
palSetPadMode(PAL_PORT(SPI_MOSI_PIN), PAL_PAD(SPI_MOSI_PIN), PAL_MODE_STM32_ALTERNATE_PUSHPULL);
|
||||
palSetPadMode(PAL_PORT(SPI_MISO_PIN), PAL_PAD(SPI_MISO_PIN), PAL_MODE_STM32_ALTERNATE_PUSHPULL);
|
||||
#else
|
||||
palSetPadMode(PAL_PORT(SPI_SCK_PIN), PAL_PAD(SPI_SCK_PIN), PAL_MODE_ALTERNATE(SPI_SCK_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL | PAL_STM32_OSPEED_HIGHEST);
|
||||
palSetPadMode(PAL_PORT(SPI_MOSI_PIN), PAL_PAD(SPI_MOSI_PIN), PAL_MODE_ALTERNATE(SPI_MOSI_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL | PAL_STM32_OSPEED_HIGHEST);
|
||||
palSetPadMode(PAL_PORT(SPI_MISO_PIN), PAL_PAD(SPI_MISO_PIN), PAL_MODE_ALTERNATE(SPI_MISO_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL | PAL_STM32_OSPEED_HIGHEST);
|
||||
palSetPadMode(PAL_PORT(SPI_SCK_PIN), PAL_PAD(SPI_SCK_PIN), PAL_MODE_ALTERNATE(SPI_SCK_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL | PAL_STM32_OSPEED_HIGHEST);
|
||||
palSetPadMode(PAL_PORT(SPI_MOSI_PIN), PAL_PAD(SPI_MOSI_PIN), PAL_MODE_ALTERNATE(SPI_MOSI_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL | PAL_STM32_OSPEED_HIGHEST);
|
||||
palSetPadMode(PAL_PORT(SPI_MISO_PIN), PAL_PAD(SPI_MISO_PIN), PAL_MODE_ALTERNATE(SPI_MISO_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL | PAL_STM32_OSPEED_HIGHEST);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
bool spi_start(pin_t slavePin, bool lsbFirst, uint8_t mode, uint16_t divisor) {
|
||||
|
@@ -18,7 +18,7 @@
|
||||
|
||||
#include <ch.h>
|
||||
#include <hal.h>
|
||||
#include <quantum.h>
|
||||
#include "quantum.h"
|
||||
|
||||
#ifndef SPI_DRIVER
|
||||
# define SPI_DRIVER SPID2
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#include "quantum.h"
|
||||
#include "ws2812.h"
|
||||
#include "ch.h"
|
||||
#include "hal.h"
|
||||
#include <ch.h>
|
||||
#include <hal.h>
|
||||
|
||||
/* Adapted from https://github.com/bigjosh/SimpleNeoPixelDemo/ */
|
||||
|
||||
@@ -89,9 +89,16 @@ void ws2812_setleds(LED_TYPE *ledarray, uint16_t leds) {
|
||||
|
||||
for (uint8_t i = 0; i < leds; i++) {
|
||||
// WS2812 protocol dictates grb order
|
||||
#if (WS2812_BYTE_ORDER == WS2812_BYTE_ORDER_GRB)
|
||||
sendByte(ledarray[i].g);
|
||||
sendByte(ledarray[i].r);
|
||||
sendByte(ledarray[i].b);
|
||||
#elif (WS2812_BYTE_ORDER == WS2812_BYTE_ORDER_RGB)
|
||||
sendByte(ledarray[i].r);
|
||||
sendByte(ledarray[i].g);
|
||||
sendByte(ledarray[i].b);
|
||||
#endif
|
||||
|
||||
#ifdef RGBW
|
||||
sendByte(ledarray[i].w);
|
||||
#endif
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#include "ws2812.h"
|
||||
#include "quantum.h"
|
||||
#include "hal.h"
|
||||
#include <hal.h>
|
||||
|
||||
/* Adapted from https://github.com/joewa/WS2812-LED-Driver_ChibiOS/ */
|
||||
|
||||
@@ -107,6 +107,7 @@
|
||||
*/
|
||||
#define WS2812_BIT(led, byte, bit) (24 * (led) + 8 * (byte) + (7 - (bit)))
|
||||
|
||||
#if (WS2812_BYTE_ORDER == WS2812_BYTE_ORDER_GRB)
|
||||
/**
|
||||
* @brief Determine the index in @ref ws2812_frame_buffer "the frame buffer" of a given red bit
|
||||
*
|
||||
@@ -117,7 +118,7 @@
|
||||
*
|
||||
* @return The bit index
|
||||
*/
|
||||
#define WS2812_RED_BIT(led, bit) WS2812_BIT((led), 1, (bit))
|
||||
# define WS2812_RED_BIT(led, bit) WS2812_BIT((led), 1, (bit))
|
||||
|
||||
/**
|
||||
* @brief Determine the index in @ref ws2812_frame_buffer "the frame buffer" of a given green bit
|
||||
@@ -129,7 +130,7 @@
|
||||
*
|
||||
* @return The bit index
|
||||
*/
|
||||
#define WS2812_GREEN_BIT(led, bit) WS2812_BIT((led), 0, (bit))
|
||||
# define WS2812_GREEN_BIT(led, bit) WS2812_BIT((led), 0, (bit))
|
||||
|
||||
/**
|
||||
* @brief Determine the index in @ref ws2812_frame_buffer "the frame buffer" of a given blue bit
|
||||
@@ -141,7 +142,45 @@
|
||||
*
|
||||
* @return The bit index
|
||||
*/
|
||||
#define WS2812_BLUE_BIT(led, bit) WS2812_BIT((led), 2, (bit))
|
||||
# define WS2812_BLUE_BIT(led, bit) WS2812_BIT((led), 2, (bit))
|
||||
|
||||
#elif (WS2812_BYTE_ORDER == WS2812_BYTE_ORDER_RGB)
|
||||
/**
|
||||
* @brief Determine the index in @ref ws2812_frame_buffer "the frame buffer" of a given red bit
|
||||
*
|
||||
* @note The red byte is the middle byte in the color packet
|
||||
*
|
||||
* @param[in] led: The led index [0, @ref RGBLED_NUM)
|
||||
* @param[in] bit: The bit number [0, 7]
|
||||
*
|
||||
* @return The bit index
|
||||
*/
|
||||
# define WS2812_RED_BIT(led, bit) WS2812_BIT((led), 0, (bit))
|
||||
|
||||
/**
|
||||
* @brief Determine the index in @ref ws2812_frame_buffer "the frame buffer" of a given green bit
|
||||
*
|
||||
* @note The red byte is the first byte in the color packet
|
||||
*
|
||||
* @param[in] led: The led index [0, @ref RGBLED_NUM)
|
||||
* @param[in] bit: The bit number [0, 7]
|
||||
*
|
||||
* @return The bit index
|
||||
*/
|
||||
# define WS2812_GREEN_BIT(led, bit) WS2812_BIT((led), 1, (bit))
|
||||
|
||||
/**
|
||||
* @brief Determine the index in @ref ws2812_frame_buffer "the frame buffer" of a given blue bit
|
||||
*
|
||||
* @note The red byte is the last byte in the color packet
|
||||
*
|
||||
* @param[in] led: The led index [0, @ref RGBLED_NUM)
|
||||
* @param[in] bit: The bit index [0, 7]
|
||||
*
|
||||
* @return The bit index
|
||||
*/
|
||||
# define WS2812_BLUE_BIT(led, bit) WS2812_BIT((led), 2, (bit))
|
||||
#endif
|
||||
|
||||
/* --- PRIVATE VARIABLES ---------------------------------------------------- */
|
||||
|
||||
|
@@ -62,9 +62,15 @@ static uint8_t get_protocol_eq(uint8_t data, int pos) {
|
||||
static void set_led_color_rgb(LED_TYPE color, int pos) {
|
||||
uint8_t* tx_start = &txbuf[PREAMBLE_SIZE];
|
||||
|
||||
#if (WS2812_BYTE_ORDER == WS2812_BYTE_ORDER_GRB)
|
||||
for (int j = 0; j < 4; j++) tx_start[BYTES_FOR_LED * pos + j] = get_protocol_eq(color.g, j);
|
||||
for (int j = 0; j < 4; j++) tx_start[BYTES_FOR_LED * pos + BYTES_FOR_LED_BYTE + j] = get_protocol_eq(color.r, j);
|
||||
for (int j = 0; j < 4; j++) tx_start[BYTES_FOR_LED * pos + BYTES_FOR_LED_BYTE * 2 + j] = get_protocol_eq(color.b, j);
|
||||
#elif (WS2812_BYTE_ORDER == WS2812_BYTE_ORDER_RGB)
|
||||
for (int j = 0; j < 4; j++) tx_start[BYTES_FOR_LED * pos + j] = get_protocol_eq(color.r, j);
|
||||
for (int j = 0; j < 4; j++) tx_start[BYTES_FOR_LED * pos + BYTES_FOR_LED_BYTE + j] = get_protocol_eq(color.g, j);
|
||||
for (int j = 0; j < 4; j++) tx_start[BYTES_FOR_LED * pos + BYTES_FOR_LED_BYTE * 2 + j] = get_protocol_eq(color.b, j);
|
||||
#endif
|
||||
}
|
||||
|
||||
void ws2812_init(void) {
|
||||
|
@@ -42,14 +42,6 @@
|
||||
# include "debug.h"
|
||||
#endif // DEBUG_EEPROM_OUTPUT
|
||||
|
||||
static inline void init_i2c_if_required(void) {
|
||||
static int done = 0;
|
||||
if (!done) {
|
||||
i2c_init();
|
||||
done = 1;
|
||||
}
|
||||
}
|
||||
|
||||
static inline void fill_target_address(uint8_t *buffer, const void *addr) {
|
||||
uintptr_t p = (uintptr_t)addr;
|
||||
for (int i = 0; i < EXTERNAL_EEPROM_ADDRESS_SIZE; ++i) {
|
||||
@@ -58,7 +50,7 @@ static inline void fill_target_address(uint8_t *buffer, const void *addr) {
|
||||
}
|
||||
}
|
||||
|
||||
void eeprom_driver_init(void) {}
|
||||
void eeprom_driver_init(void) { i2c_init(); }
|
||||
|
||||
void eeprom_driver_erase(void) {
|
||||
#if defined(CONSOLE_ENABLE) && defined(DEBUG_EEPROM_OUTPUT)
|
||||
@@ -80,7 +72,6 @@ void eeprom_read_block(void *buf, const void *addr, size_t len) {
|
||||
uint8_t complete_packet[EXTERNAL_EEPROM_ADDRESS_SIZE];
|
||||
fill_target_address(complete_packet, addr);
|
||||
|
||||
init_i2c_if_required();
|
||||
i2c_transmit(EXTERNAL_EEPROM_I2C_ADDRESS((uintptr_t)addr), complete_packet, EXTERNAL_EEPROM_ADDRESS_SIZE, 100);
|
||||
i2c_receive(EXTERNAL_EEPROM_I2C_ADDRESS((uintptr_t)addr), buf, len, 100);
|
||||
|
||||
@@ -98,7 +89,6 @@ void eeprom_write_block(const void *buf, void *addr, size_t len) {
|
||||
uint8_t * read_buf = (uint8_t *)buf;
|
||||
uintptr_t target_addr = (uintptr_t)addr;
|
||||
|
||||
init_i2c_if_required();
|
||||
while (len > 0) {
|
||||
uintptr_t page_offset = target_addr % EXTERNAL_EEPROM_PAGE_SIZE;
|
||||
int write_length = EXTERNAL_EEPROM_PAGE_SIZE - page_offset;
|
||||
|
@@ -55,14 +55,6 @@
|
||||
# include "debug.h"
|
||||
#endif // CONSOLE_ENABLE
|
||||
|
||||
static void init_spi_if_required(void) {
|
||||
static int done = 0;
|
||||
if (!done) {
|
||||
spi_init();
|
||||
done = 1;
|
||||
}
|
||||
}
|
||||
|
||||
static bool spi_eeprom_start(void) { return spi_start(EXTERNAL_EEPROM_SPI_SLAVE_SELECT_PIN, EXTERNAL_EEPROM_SPI_LSBFIRST, EXTERNAL_EEPROM_SPI_MODE, EXTERNAL_EEPROM_SPI_CLOCK_DIVISOR); }
|
||||
|
||||
static spi_status_t spi_eeprom_wait_while_busy(int timeout) {
|
||||
@@ -91,7 +83,7 @@ static void spi_eeprom_transmit_address(uintptr_t addr) {
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
void eeprom_driver_init(void) {}
|
||||
void eeprom_driver_init(void) { spi_init(); }
|
||||
|
||||
void eeprom_driver_erase(void) {
|
||||
#if defined(CONSOLE_ENABLE) && defined(DEBUG_EEPROM_OUTPUT)
|
||||
@@ -110,8 +102,6 @@ void eeprom_driver_erase(void) {
|
||||
}
|
||||
|
||||
void eeprom_read_block(void *buf, const void *addr, size_t len) {
|
||||
init_spi_if_required();
|
||||
|
||||
//-------------------------------------------------
|
||||
// Wait for the write-in-progress bit to be cleared
|
||||
bool res = spi_eeprom_start();
|
||||
@@ -154,8 +144,6 @@ void eeprom_read_block(void *buf, const void *addr, size_t len) {
|
||||
}
|
||||
|
||||
void eeprom_write_block(const void *buf, void *addr, size_t len) {
|
||||
init_spi_if_required();
|
||||
|
||||
bool res;
|
||||
uint8_t * read_buf = (uint8_t *)buf;
|
||||
uintptr_t target_addr = (uintptr_t)addr;
|
||||
|
@@ -17,7 +17,7 @@
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "hal.h"
|
||||
#include <hal.h>
|
||||
#include "eeprom_driver.h"
|
||||
#include "eeprom_stm32_L0_L1.h"
|
||||
|
||||
|
@@ -33,11 +33,18 @@ void haptic_init(void) {
|
||||
eeconfig_init();
|
||||
}
|
||||
haptic_config.raw = eeconfig_read_haptic();
|
||||
if (haptic_config.mode < 1) {
|
||||
haptic_config.mode = 1;
|
||||
}
|
||||
if (!haptic_config.mode) {
|
||||
dprintf("No haptic config found in eeprom, setting default configs\n");
|
||||
#ifdef SOLENOID_ENABLE
|
||||
solenoid_set_dwell(haptic_config.dwell);
|
||||
#endif
|
||||
if ((haptic_config.raw == 0)
|
||||
#ifdef SOLENOID_ENABLE
|
||||
|| (haptic_config.dwell == 0)
|
||||
#endif
|
||||
) {
|
||||
// this will be called, if the eeprom is not corrupt,
|
||||
// but the previous firmware didn't have haptic enabled,
|
||||
// or the previous firmware didn't have solenoid enabled,
|
||||
// and the current one has solenoid enabled.
|
||||
haptic_reset();
|
||||
}
|
||||
#ifdef SOLENOID_ENABLE
|
||||
@@ -118,25 +125,37 @@ void haptic_mode_decrease(void) {
|
||||
}
|
||||
|
||||
void haptic_dwell_increase(void) {
|
||||
uint8_t dwell = haptic_config.dwell + 1;
|
||||
#ifdef SOLENOID_ENABLE
|
||||
int16_t next_dwell = ((int16_t)haptic_config.dwell) + SOLENOID_DWELL_STEP_SIZE;
|
||||
if (haptic_config.dwell >= SOLENOID_MAX_DWELL) {
|
||||
dwell = 1;
|
||||
// if it's already at max, we wrap back to min
|
||||
next_dwell = SOLENOID_MIN_DWELL;
|
||||
} else if (next_dwell > SOLENOID_MAX_DWELL) {
|
||||
// if we overshoot the max, then cap at max
|
||||
next_dwell = SOLENOID_MAX_DWELL;
|
||||
}
|
||||
solenoid_set_dwell(dwell);
|
||||
solenoid_set_dwell(next_dwell);
|
||||
#else
|
||||
int16_t next_dwell = ((int16_t)haptic_config.dwell) + 1;
|
||||
#endif
|
||||
haptic_set_dwell(dwell);
|
||||
haptic_set_dwell(next_dwell);
|
||||
}
|
||||
|
||||
void haptic_dwell_decrease(void) {
|
||||
uint8_t dwell = haptic_config.dwell - 1;
|
||||
#ifdef SOLENOID_ENABLE
|
||||
if (haptic_config.dwell < SOLENOID_MIN_DWELL) {
|
||||
dwell = SOLENOID_MAX_DWELL;
|
||||
int16_t next_dwell = ((int16_t)haptic_config.dwell) - SOLENOID_DWELL_STEP_SIZE;
|
||||
if (haptic_config.dwell <= SOLENOID_MIN_DWELL) {
|
||||
// if it's already at min, we wrap to max
|
||||
next_dwell = SOLENOID_MAX_DWELL;
|
||||
} else if (next_dwell < SOLENOID_MIN_DWELL) {
|
||||
// if we go below min, then we cap to min
|
||||
next_dwell = SOLENOID_MIN_DWELL;
|
||||
}
|
||||
solenoid_set_dwell(dwell);
|
||||
solenoid_set_dwell(next_dwell);
|
||||
#else
|
||||
int16_t next_dwell = ((int16_t)haptic_config.dwell) - 1;
|
||||
#endif
|
||||
haptic_set_dwell(dwell);
|
||||
haptic_set_dwell(next_dwell);
|
||||
}
|
||||
|
||||
void haptic_reset(void) {
|
||||
@@ -150,6 +169,12 @@ void haptic_reset(void) {
|
||||
#ifdef SOLENOID_ENABLE
|
||||
uint8_t dwell = SOLENOID_DEFAULT_DWELL;
|
||||
haptic_config.dwell = dwell;
|
||||
haptic_config.buzz = SOLENOID_DEFAULT_BUZZ;
|
||||
solenoid_set_dwell(dwell);
|
||||
#else
|
||||
// This is to trigger haptic_reset again, if solenoid is enabled in the future.
|
||||
haptic_config.dwell = 0;
|
||||
haptic_config.buzz = 0;
|
||||
#endif
|
||||
eeconfig_update_haptic(haptic_config.raw);
|
||||
xprintf("haptic_config.feedback = %u\n", haptic_config.feedback);
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <timer.h>
|
||||
#include "timer.h"
|
||||
#include "solenoid.h"
|
||||
#include "haptic.h"
|
||||
|
||||
@@ -32,14 +32,6 @@ void solenoid_buzz_off(void) { haptic_set_buzz(0); }
|
||||
|
||||
void solenoid_set_buzz(int buzz) { haptic_set_buzz(buzz); }
|
||||
|
||||
void solenoid_dwell_minus(uint8_t solenoid_dwell) {
|
||||
if (solenoid_dwell > 0) solenoid_dwell--;
|
||||
}
|
||||
|
||||
void solenoid_dwell_plus(uint8_t solenoid_dwell) {
|
||||
if (solenoid_dwell < SOLENOID_MAX_DWELL) solenoid_dwell++;
|
||||
}
|
||||
|
||||
void solenoid_set_dwell(uint8_t dwell) { solenoid_dwell = dwell; }
|
||||
|
||||
void solenoid_stop(void) {
|
||||
@@ -73,7 +65,7 @@ void solenoid_check(void) {
|
||||
|
||||
// Check whether to buzz the solenoid on and off
|
||||
if (haptic_config.buzz) {
|
||||
if (elapsed / SOLENOID_MIN_DWELL % 2 == 0) {
|
||||
if ((elapsed % (SOLENOID_BUZZ_ACTUATED + SOLENOID_BUZZ_NONACTUATED)) < SOLENOID_BUZZ_ACTUATED) {
|
||||
if (!solenoid_buzzing) {
|
||||
solenoid_buzzing = true;
|
||||
writePinHigh(SOLENOID_PIN);
|
||||
|
@@ -29,6 +29,22 @@
|
||||
# define SOLENOID_MIN_DWELL 4
|
||||
#endif
|
||||
|
||||
#ifndef SOLENOID_DWELL_STEP_SIZE
|
||||
# define SOLENOID_DWELL_STEP_SIZE 1
|
||||
#endif
|
||||
|
||||
#ifndef SOLENOID_DEFAULT_BUZZ
|
||||
# define SOLENOID_DEFAULT_BUZZ 0
|
||||
#endif
|
||||
|
||||
#ifndef SOLENOID_BUZZ_ACTUATED
|
||||
# define SOLENOID_BUZZ_ACTUATED SOLENOID_MIN_DWELL
|
||||
#endif
|
||||
|
||||
#ifndef SOLENOID_BUZZ_NONACTUATED
|
||||
# define SOLENOID_BUZZ_NONACTUATED SOLENOID_MIN_DWELL
|
||||
#endif
|
||||
|
||||
#ifndef SOLENOID_PIN
|
||||
# error SOLENOID_PIN not defined
|
||||
#endif
|
||||
@@ -37,8 +53,6 @@ void solenoid_buzz_on(void);
|
||||
void solenoid_buzz_off(void);
|
||||
void solenoid_set_buzz(int buzz);
|
||||
|
||||
void solenoid_dwell_minus(uint8_t solenoid_dwell);
|
||||
void solenoid_dwell_plus(uint8_t solenoid_dwell);
|
||||
void solenoid_set_dwell(uint8_t dwell);
|
||||
|
||||
void solenoid_stop(void);
|
||||
|
@@ -63,7 +63,7 @@ uint8_t g_twi_transfer_buffer[20];
|
||||
// buffers and the transfers in IS31FL3731_write_pwm_buffer() but it's
|
||||
// probably not worth the extra complexity.
|
||||
uint8_t g_pwm_buffer[LED_DRIVER_COUNT][144];
|
||||
bool g_pwm_buffer_update_required = false;
|
||||
bool g_pwm_buffer_update_required[LED_DRIVER_COUNT] = {false};
|
||||
|
||||
/* There's probably a better way to init this... */
|
||||
#if LED_DRIVER_COUNT == 1
|
||||
@@ -75,7 +75,7 @@ uint8_t g_led_control_registers[LED_DRIVER_COUNT][18] = {{0}, {0}, {0}};
|
||||
#elif LED_DRIVER_COUNT == 4
|
||||
uint8_t g_led_control_registers[LED_DRIVER_COUNT][18] = {{0}, {0}, {0}, {0}};
|
||||
#endif
|
||||
bool g_led_control_registers_update_required = false;
|
||||
bool g_led_control_registers_update_required[LED_DRIVER_COUNT] = {false};
|
||||
|
||||
// This is the bit pattern in the LED control registers
|
||||
// (for matrix A, add one to register for matrix B)
|
||||
@@ -190,8 +190,8 @@ void IS31FL3731_set_value(int index, uint8_t value) {
|
||||
is31_led led = g_is31_leds[index];
|
||||
|
||||
// Subtract 0x24 to get the second index of g_pwm_buffer
|
||||
g_pwm_buffer[led.driver][led.v - 0x24] = value;
|
||||
g_pwm_buffer_update_required = true;
|
||||
g_pwm_buffer[led.driver][led.v - 0x24] = value;
|
||||
g_pwm_buffer_update_required[led.driver] = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -213,20 +213,21 @@ void IS31FL3731_set_led_control_register(uint8_t index, bool value) {
|
||||
g_led_control_registers[led.driver][control_register] &= ~(1 << bit_value);
|
||||
}
|
||||
|
||||
g_led_control_registers_update_required = true;
|
||||
g_led_control_registers_update_required[led.driver] = true;
|
||||
}
|
||||
|
||||
void IS31FL3731_update_pwm_buffers(uint8_t addr, uint8_t index) {
|
||||
if (g_pwm_buffer_update_required) {
|
||||
if (g_pwm_buffer_update_required[index]) {
|
||||
IS31FL3731_write_pwm_buffer(addr, g_pwm_buffer[index]);
|
||||
g_pwm_buffer_update_required = false;
|
||||
g_pwm_buffer_update_required[index] = false;
|
||||
}
|
||||
}
|
||||
|
||||
void IS31FL3731_update_led_control_registers(uint8_t addr, uint8_t index) {
|
||||
if (g_led_control_registers_update_required) {
|
||||
if (g_led_control_registers_update_required[index]) {
|
||||
for (int i = 0; i < 18; i++) {
|
||||
IS31FL3731_write_register(addr, i, g_led_control_registers[index][i]);
|
||||
}
|
||||
g_led_control_registers_update_required[index] = false;
|
||||
}
|
||||
}
|
||||
|
@@ -119,6 +119,9 @@ uint32_t oled_timeout;
|
||||
#if OLED_SCROLL_TIMEOUT > 0
|
||||
uint32_t oled_scroll_timeout;
|
||||
#endif
|
||||
#if OLED_UPDATE_INTERVAL > 0
|
||||
uint16_t oled_update_timeout;
|
||||
#endif
|
||||
|
||||
// Internal variables to reduce math instructions
|
||||
|
||||
@@ -268,6 +271,10 @@ static void rotate_90(const uint8_t *src, uint8_t *dest) {
|
||||
}
|
||||
|
||||
void oled_render(void) {
|
||||
if (!oled_initialized) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Do we have work to do?
|
||||
oled_dirty &= OLED_ALL_BLOCKS_MASK;
|
||||
if (!oled_dirty || oled_scrolling) {
|
||||
@@ -468,8 +475,9 @@ void oled_write_raw_byte(const char data, uint16_t index) {
|
||||
}
|
||||
|
||||
void oled_write_raw(const char *data, uint16_t size) {
|
||||
if (size > OLED_MATRIX_SIZE) size = OLED_MATRIX_SIZE;
|
||||
for (uint16_t i = 0; i < size; i++) {
|
||||
uint16_t cursor_start_index = oled_cursor - &oled_buffer[0];
|
||||
if ((size + cursor_start_index) > OLED_MATRIX_SIZE) size = OLED_MATRIX_SIZE - cursor_start_index;
|
||||
for (uint16_t i = cursor_start_index; i < cursor_start_index + size; i++) {
|
||||
if (oled_buffer[i] == data[i]) continue;
|
||||
oled_buffer[i] = data[i];
|
||||
oled_dirty |= ((OLED_BLOCK_TYPE)1 << (i / OLED_BLOCK_SIZE));
|
||||
@@ -511,8 +519,9 @@ void oled_write_ln_P(const char *data, bool invert) {
|
||||
}
|
||||
|
||||
void oled_write_raw_P(const char *data, uint16_t size) {
|
||||
if (size > OLED_MATRIX_SIZE) size = OLED_MATRIX_SIZE;
|
||||
for (uint16_t i = 0; i < size; i++) {
|
||||
uint16_t cursor_start_index = oled_cursor - &oled_buffer[0];
|
||||
if ((size + cursor_start_index) > OLED_MATRIX_SIZE) size = OLED_MATRIX_SIZE - cursor_start_index;
|
||||
for (uint16_t i = cursor_start_index; i < cursor_start_index + size; i++) {
|
||||
uint8_t c = pgm_read_byte(data++);
|
||||
if (oled_buffer[i] == c) continue;
|
||||
oled_buffer[i] = c;
|
||||
@@ -522,6 +531,10 @@ void oled_write_raw_P(const char *data, uint16_t size) {
|
||||
#endif // defined(__AVR__)
|
||||
|
||||
bool oled_on(void) {
|
||||
if (!oled_initialized) {
|
||||
return oled_active;
|
||||
}
|
||||
|
||||
#if OLED_TIMEOUT > 0
|
||||
oled_timeout = timer_read32() + OLED_TIMEOUT;
|
||||
#endif
|
||||
@@ -538,6 +551,10 @@ bool oled_on(void) {
|
||||
}
|
||||
|
||||
bool oled_off(void) {
|
||||
if (!oled_initialized) {
|
||||
return !oled_active;
|
||||
}
|
||||
|
||||
static const uint8_t PROGMEM display_off[] = {I2C_CMD, DISPLAY_OFF};
|
||||
if (oled_active) {
|
||||
if (I2C_TRANSMIT_P(display_off) != I2C_STATUS_SUCCESS) {
|
||||
@@ -552,6 +569,10 @@ bool oled_off(void) {
|
||||
bool is_oled_on(void) { return oled_active; }
|
||||
|
||||
uint8_t oled_set_brightness(uint8_t level) {
|
||||
if (!oled_initialized) {
|
||||
return oled_brightness;
|
||||
}
|
||||
|
||||
uint8_t set_contrast[] = {I2C_CMD, CONTRAST, level};
|
||||
if (oled_brightness != level) {
|
||||
if (I2C_TRANSMIT(set_contrast) != I2C_STATUS_SUCCESS) {
|
||||
@@ -591,6 +612,10 @@ void oled_scroll_set_speed(uint8_t speed) {
|
||||
}
|
||||
|
||||
bool oled_scroll_right(void) {
|
||||
if (!oled_initialized) {
|
||||
return oled_scrolling;
|
||||
}
|
||||
|
||||
// Dont enable scrolling if we need to update the display
|
||||
// This prevents scrolling of bad data from starting the scroll too early after init
|
||||
if (!oled_dirty && !oled_scrolling) {
|
||||
@@ -605,6 +630,10 @@ bool oled_scroll_right(void) {
|
||||
}
|
||||
|
||||
bool oled_scroll_left(void) {
|
||||
if (!oled_initialized) {
|
||||
return oled_scrolling;
|
||||
}
|
||||
|
||||
// Dont enable scrolling if we need to update the display
|
||||
// This prevents scrolling of bad data from starting the scroll too early after init
|
||||
if (!oled_dirty && !oled_scrolling) {
|
||||
@@ -619,6 +648,10 @@ bool oled_scroll_left(void) {
|
||||
}
|
||||
|
||||
bool oled_scroll_off(void) {
|
||||
if (!oled_initialized) {
|
||||
return !oled_scrolling;
|
||||
}
|
||||
|
||||
if (oled_scrolling) {
|
||||
static const uint8_t PROGMEM display_scroll_off[] = {I2C_CMD, DEACTIVATE_SCROLL};
|
||||
if (I2C_TRANSMIT_P(display_scroll_off) != I2C_STATUS_SUCCESS) {
|
||||
@@ -650,9 +683,16 @@ void oled_task(void) {
|
||||
return;
|
||||
}
|
||||
|
||||
#if OLED_UPDATE_INTERVAL > 0
|
||||
if (timer_elapsed(oled_update_timeout) >= OLED_UPDATE_INTERVAL) {
|
||||
oled_update_timeout = timer_read();
|
||||
oled_set_cursor(0, 0);
|
||||
oled_task_user();
|
||||
}
|
||||
#else
|
||||
oled_set_cursor(0, 0);
|
||||
|
||||
oled_task_user();
|
||||
#endif
|
||||
|
||||
#if OLED_SCROLL_TIMEOUT > 0
|
||||
if (oled_dirty && oled_scrolling) {
|
||||
|
@@ -28,7 +28,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "micro_oled.h"
|
||||
#include <print.h>
|
||||
#include "print.h"
|
||||
#include <stdlib.h>
|
||||
#include "util/font5x7.h"
|
||||
#include "util/font8x16.h"
|
||||
|
@@ -8,8 +8,9 @@
|
||||
#ifndef _GDISP_LLD_BOARD_H
|
||||
#define _GDISP_LLD_BOARD_H
|
||||
|
||||
#define ST7565_LCD_BIAS ST7565_LCD_BIAS_9 // actually 6
|
||||
#define ST7565_ADC ST7565_ADC_NORMAL
|
||||
#include "quantum.h"
|
||||
|
||||
#define ST7565_LCD_BIAS ST7565_LCD_BIAS_7
|
||||
#define ST7565_COM_SCAN ST7565_COM_SCAN_DEC
|
||||
#define ST7565_PAGE_ORDER 0, 1, 2, 3
|
||||
/*
|
||||
@@ -17,19 +18,12 @@
|
||||
* #define ST7565_PAGE_ORDER 4,5,6,7,0,1,2,3
|
||||
*/
|
||||
|
||||
#define ST7565_GPIOPORT GPIOC
|
||||
#define ST7565_PORT PORTC
|
||||
#define ST7565_A0_PIN 7
|
||||
#define ST7565_RST_PIN 8
|
||||
#define ST7565_MOSI_PIN 6
|
||||
#define ST7565_SLCK_PIN 5
|
||||
#define ST7565_SS_PIN 4
|
||||
#define ST7565_A0_PIN C7
|
||||
#define ST7565_RST_PIN C8
|
||||
#define ST7565_MOSI_PIN C6
|
||||
#define ST7565_SCLK_PIN C5
|
||||
#define ST7565_SS_PIN C4
|
||||
|
||||
#define palSetPadModeRaw(portname, bits) ST7565_PORT->PCR[ST7565_##portname##_PIN] = bits
|
||||
|
||||
#define palSetPadModeNamed(portname, portmode) palSetPadMode(ST7565_GPIOPORT, ST7565_##portname##_PIN, portmode)
|
||||
|
||||
#define ST7565_SPI_MODE PORTx_PCRn_DSE | PORTx_PCRn_MUX(2)
|
||||
// DSPI Clock and Transfer Attributes
|
||||
// Frame Size: 8 bits
|
||||
// MSB First
|
||||
@@ -38,9 +32,9 @@ static const SPIConfig spi1config = {
|
||||
// Operation complete callback or @p NULL.
|
||||
.end_cb = NULL,
|
||||
// The chip select line port - when not using pcs.
|
||||
.ssport = ST7565_GPIOPORT,
|
||||
.ssport = PAL_PORT(ST7565_SS_PIN),
|
||||
// brief The chip select line pad number - when not using pcs.
|
||||
.sspad = ST7565_SS_PIN,
|
||||
.sspad = PAL_PAD(ST7565_SS_PIN),
|
||||
// SPI initialization data.
|
||||
.tar0 = SPIx_CTARn_FMSZ(7) // Frame size = 8 bytes
|
||||
| SPIx_CTARn_ASC(1) // After SCK Delay Scaler (min 50 ns) = 55.56ns
|
||||
@@ -66,13 +60,14 @@ static GFXINLINE void release_bus(GDisplay *g) {
|
||||
|
||||
static GFXINLINE void init_board(GDisplay *g) {
|
||||
(void)g;
|
||||
palSetPadModeNamed(A0, PAL_MODE_OUTPUT_PUSHPULL);
|
||||
palSetPad(ST7565_GPIOPORT, ST7565_A0_PIN);
|
||||
palSetPadModeNamed(RST, PAL_MODE_OUTPUT_PUSHPULL);
|
||||
palSetPad(ST7565_GPIOPORT, ST7565_RST_PIN);
|
||||
palSetPadModeRaw(MOSI, ST7565_SPI_MODE);
|
||||
palSetPadModeRaw(SLCK, ST7565_SPI_MODE);
|
||||
palSetPadModeNamed(SS, PAL_MODE_OUTPUT_PUSHPULL);
|
||||
setPinOutput(ST7565_A0_PIN);
|
||||
writePinHigh(ST7565_A0_PIN);
|
||||
setPinOutput(ST7565_RST_PIN);
|
||||
writePinHigh(ST7565_RST_PIN);
|
||||
setPinOutput(ST7565_SS_PIN);
|
||||
|
||||
palSetPadMode(PAL_PORT(ST7565_MOSI_PIN), PAL_PAD(ST7565_MOSI_PIN), PAL_MODE_ALTERNATIVE_2);
|
||||
palSetPadMode(PAL_PORT(ST7565_SCLK_PIN), PAL_PAD(ST7565_SCLK_PIN), PAL_MODE_ALTERNATIVE_2);
|
||||
|
||||
spiInit();
|
||||
spiStart(&SPID1, &spi1config);
|
||||
@@ -83,19 +78,18 @@ static GFXINLINE void post_init_board(GDisplay *g) { (void)g; }
|
||||
|
||||
static GFXINLINE void setpin_reset(GDisplay *g, bool_t state) {
|
||||
(void)g;
|
||||
if (state) {
|
||||
palClearPad(ST7565_GPIOPORT, ST7565_RST_PIN);
|
||||
} else {
|
||||
palSetPad(ST7565_GPIOPORT, ST7565_RST_PIN);
|
||||
}
|
||||
writePin(ST7565_RST_PIN, !state);
|
||||
}
|
||||
|
||||
static GFXINLINE void enter_data_mode(GDisplay *g) { palSetPad(ST7565_GPIOPORT, ST7565_A0_PIN); }
|
||||
|
||||
static GFXINLINE void enter_cmd_mode(GDisplay *g) { palClearPad(ST7565_GPIOPORT, ST7565_A0_PIN); }
|
||||
|
||||
static GFXINLINE void write_data(GDisplay *g, uint8_t *data, uint16_t length) {
|
||||
static GFXINLINE void write_cmd(GDisplay *g, gU8 cmd) {
|
||||
(void)g;
|
||||
writePinLow(ST7565_A0_PIN);
|
||||
spiSend(&SPID1, 1, &cmd);
|
||||
}
|
||||
|
||||
static GFXINLINE void write_data(GDisplay *g, gU8 *data, gU16 length) {
|
||||
(void)g;
|
||||
writePinHigh(ST7565_A0_PIN);
|
||||
spiSend(&SPID1, length, data);
|
||||
}
|
||||
|
||||
|
@@ -1,3 +1,3 @@
|
||||
GFXINC += drivers/ugfx/gdisp/st7565
|
||||
GFXSRC += drivers/ugfx/gdisp/st7565/gdisp_lld_ST7565.c
|
||||
GDISP_DRIVER_LIST += GDISPVMT_ST7565_QMK
|
||||
GDISP_DRIVER_LIST += GDISPVMT_ST7565_QMK
|
||||
|
@@ -49,31 +49,15 @@
|
||||
# define ST7565_COM_SCAN ST7565_COM_SCAN_INC
|
||||
# endif
|
||||
# ifndef ST7565_PAGE_ORDER
|
||||
# define ST7565_PAGE_ORDER 0, 1, 2, 3
|
||||
# define ST7565_PAGE_ORDER 0, 1, 2, 3, 4, 5, 6, 7
|
||||
# endif
|
||||
|
||||
/*===========================================================================*/
|
||||
/* Driver local functions. */
|
||||
/*===========================================================================*/
|
||||
|
||||
typedef struct {
|
||||
bool_t buffer2;
|
||||
uint8_t data_pos;
|
||||
uint8_t data[16];
|
||||
uint8_t ram[GDISP_SCREEN_HEIGHT * GDISP_SCREEN_WIDTH / 8];
|
||||
} PrivData;
|
||||
|
||||
// Some common routines and macros
|
||||
# define PRIV(g) ((PrivData *)g->priv)
|
||||
# define RAM(g) (PRIV(g)->ram)
|
||||
|
||||
static GFXINLINE void write_cmd(GDisplay *g, uint8_t cmd) { PRIV(g)->data[PRIV(g)->data_pos++] = cmd; }
|
||||
|
||||
static GFXINLINE void flush_cmd(GDisplay *g) {
|
||||
write_data(g, PRIV(g)->data, PRIV(g)->data_pos);
|
||||
PRIV(g)->data_pos = 0;
|
||||
}
|
||||
|
||||
# define RAM(g) ((gU8 *)g->priv)
|
||||
# define write_cmd2(g, cmd1, cmd2) \
|
||||
{ \
|
||||
write_cmd(g, cmd1); \
|
||||
@@ -106,9 +90,10 @@ static GFXINLINE void flush_cmd(GDisplay *g) {
|
||||
|
||||
LLDSPEC bool_t gdisp_lld_init(GDisplay *g) {
|
||||
// The private area is the display surface.
|
||||
g->priv = gfxAlloc(sizeof(PrivData));
|
||||
PRIV(g)->buffer2 = false;
|
||||
PRIV(g)->data_pos = 0;
|
||||
g->priv = gfxAlloc(GDISP_SCREEN_HEIGHT * GDISP_SCREEN_WIDTH / 8);
|
||||
if (!g->priv) {
|
||||
return gFalse;
|
||||
}
|
||||
|
||||
// Initialise the board interface
|
||||
init_board(g);
|
||||
@@ -119,25 +104,33 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) {
|
||||
setpin_reset(g, FALSE);
|
||||
gfxSleepMilliseconds(20);
|
||||
acquire_bus(g);
|
||||
enter_cmd_mode(g);
|
||||
|
||||
write_cmd(g, ST7565_RESET);
|
||||
write_cmd(g, ST7565_LCD_BIAS);
|
||||
write_cmd(g, ST7565_ADC);
|
||||
write_cmd(g, ST7565_COM_SCAN);
|
||||
|
||||
write_cmd(g, ST7565_RESISTOR_RATIO | 0x1);
|
||||
write_cmd2(g, ST7565_CONTRAST, GDISP_INITIAL_CONTRAST);
|
||||
|
||||
// turn on internal power supply (VC=1, VR=1, VF=1)
|
||||
write_cmd(g, ST7565_POWER_CONTROL | 0x07);
|
||||
|
||||
write_cmd(g, ST7565_INVERT_DISPLAY);
|
||||
write_cmd(g, ST7565_ALLON_NORMAL);
|
||||
|
||||
write_cmd(g, ST7565_START_LINE | 0);
|
||||
|
||||
write_cmd2(g, ST7565_CONTRAST, GDISP_INITIAL_CONTRAST * 64 / 101);
|
||||
write_cmd(g, ST7565_RESISTOR_RATIO | 0x1);
|
||||
|
||||
// turn on voltage converter (VC=1, VR=0, VF=0)
|
||||
write_cmd(g, ST7565_POWER_CONTROL | 0x04);
|
||||
delay_ms(50);
|
||||
|
||||
// turn on voltage regulator (VC=1, VR=1, VF=0)
|
||||
write_cmd(g, ST7565_POWER_CONTROL | 0x06);
|
||||
delay_ms(50);
|
||||
|
||||
// turn on voltage follower (VC=1, VR=1, VF=1)
|
||||
write_cmd(g, ST7565_POWER_CONTROL | 0x07);
|
||||
delay_ms(50);
|
||||
|
||||
write_cmd(g, ST7565_DISPLAY_ON);
|
||||
write_cmd(g, ST7565_ALLON_NORMAL);
|
||||
write_cmd(g, ST7565_INVERT_DISPLAY); // Disable Inversion of display.
|
||||
|
||||
write_cmd(g, ST7565_RMW);
|
||||
flush_cmd(g);
|
||||
|
||||
// Finish Init
|
||||
post_init_board(g);
|
||||
@@ -163,22 +156,14 @@ LLDSPEC void gdisp_lld_flush(GDisplay *g) {
|
||||
if (!(g->flags & GDISP_FLG_NEEDFLUSH)) return;
|
||||
|
||||
acquire_bus(g);
|
||||
enter_cmd_mode(g);
|
||||
unsigned dstOffset = (PRIV(g)->buffer2 ? 4 : 0);
|
||||
for (p = 0; p < 4; p++) {
|
||||
write_cmd(g, ST7565_PAGE | (p + dstOffset));
|
||||
gU8 pagemap[] = {ST7565_PAGE_ORDER};
|
||||
for (p = 0; p < sizeof(pagemap); p++) {
|
||||
write_cmd(g, ST7565_PAGE | pagemap[p]);
|
||||
write_cmd(g, ST7565_COLUMN_MSB | 0);
|
||||
write_cmd(g, ST7565_COLUMN_LSB | 0);
|
||||
write_cmd(g, ST7565_RMW);
|
||||
flush_cmd(g);
|
||||
enter_data_mode(g);
|
||||
write_data(g, RAM(g) + (p * GDISP_SCREEN_WIDTH), GDISP_SCREEN_WIDTH);
|
||||
enter_cmd_mode(g);
|
||||
}
|
||||
unsigned line = (PRIV(g)->buffer2 ? 32 : 0);
|
||||
write_cmd(g, ST7565_START_LINE | line);
|
||||
flush_cmd(g);
|
||||
PRIV(g)->buffer2 = !PRIV(g)->buffer2;
|
||||
release_bus(g);
|
||||
|
||||
g->flags &= ~GDISP_FLG_NEEDFLUSH;
|
||||
@@ -243,6 +228,7 @@ LLDSPEC color_t gdisp_lld_get_pixel_color(GDisplay *g) {
|
||||
}
|
||||
# endif
|
||||
|
||||
# if GDISP_HARDWARE_BITFILLS
|
||||
LLDSPEC void gdisp_lld_blit_area(GDisplay *g) {
|
||||
uint8_t *buffer = (uint8_t *)g->p.ptr;
|
||||
int linelength = g->p.cx;
|
||||
@@ -268,6 +254,7 @@ LLDSPEC void gdisp_lld_blit_area(GDisplay *g) {
|
||||
}
|
||||
g->flags |= GDISP_FLG_NEEDFLUSH;
|
||||
}
|
||||
# endif
|
||||
|
||||
# if GDISP_NEED_CONTROL && GDISP_HARDWARE_CONTROL
|
||||
LLDSPEC void gdisp_lld_control(GDisplay *g) {
|
||||
@@ -279,16 +266,12 @@ LLDSPEC void gdisp_lld_control(GDisplay *g) {
|
||||
case powerSleep:
|
||||
case powerDeepSleep:
|
||||
acquire_bus(g);
|
||||
enter_cmd_mode(g);
|
||||
write_cmd(g, ST7565_DISPLAY_OFF);
|
||||
flush_cmd(g);
|
||||
release_bus(g);
|
||||
break;
|
||||
case powerOn:
|
||||
acquire_bus(g);
|
||||
enter_cmd_mode(g);
|
||||
write_cmd(g, ST7565_DISPLAY_ON);
|
||||
flush_cmd(g);
|
||||
release_bus(g);
|
||||
break;
|
||||
default:
|
||||
@@ -318,12 +301,11 @@ LLDSPEC void gdisp_lld_control(GDisplay *g) {
|
||||
return;
|
||||
|
||||
case GDISP_CONTROL_CONTRAST:
|
||||
g->g.Contrast = (unsigned)g->p.ptr & 63;
|
||||
if ((unsigned)g->p.ptr > 100) g->p.ptr = (void *)100;
|
||||
acquire_bus(g);
|
||||
enter_cmd_mode(g);
|
||||
write_cmd2(g, ST7565_CONTRAST, g->g.Contrast);
|
||||
flush_cmd(g);
|
||||
write_cmd2(g, ST7565_CONTRAST, ((((unsigned)g->p.ptr) << 6) / 101) & 0x3F);
|
||||
release_bus(g);
|
||||
g->g.Contrast = (unsigned)g->p.ptr;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@@ -16,19 +16,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "1up60hte.h"
|
||||
|
||||
void keyboard_pre_init_kb(void) {
|
||||
// put your keyboard start-up code here
|
||||
// runs once when the firmware starts up
|
||||
setPinOutput(B6);
|
||||
keyboard_pre_init_user();
|
||||
}
|
||||
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
|
||||
writePinLow(B6);
|
||||
} else {
|
||||
writePinHigh(B6);
|
||||
}
|
||||
led_set_user(usb_led);
|
||||
}
|
@@ -40,6 +40,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
/* COL2ROW or ROW2COL */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
#define LED_CAPS_LOCK_PIN B6
|
||||
#define LED_PIN_ON_STATE 0
|
||||
|
||||
/* number of backlight levels */
|
||||
#define BACKLIGHT_PIN B7
|
||||
#ifdef BACKLIGHT_PIN
|
||||
|
@@ -25,7 +25,8 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
NKRO_ENABLE = no # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
|
||||
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||
RGB_MATRIX_ENABLE = WS2812
|
||||
RGB_MATRIX_ENABLE = yes
|
||||
RGB_MATRIX_DRIVER = WS2812
|
||||
MIDI_ENABLE = no # MIDI support
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
|
@@ -17,6 +17,12 @@
|
||||
/* Set 0 if debouncing isn't needed */
|
||||
#define DEBOUNCE 5
|
||||
|
||||
#ifndef CONVERT_TO_PROTON_C
|
||||
# define LED_NUM_LOCK_PIN B0 // RXLED
|
||||
# define LED_CAPS_LOCK_PIN D5 // TXLED
|
||||
# define LED_PIN_ON_STATE 0
|
||||
#endif
|
||||
|
||||
/* Underglow options */
|
||||
#define RGB_DI_PIN B1
|
||||
#ifdef RGB_DI_PIN
|
||||
|
@@ -1,21 +1 @@
|
||||
#include "v1.h"
|
||||
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
#ifndef CONVERT_TO_PROTON_C
|
||||
/* Map RXLED to USB_LED_NUM_LOCK */
|
||||
if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
|
||||
setPinOutput(B0);
|
||||
writePinLow(B0);
|
||||
} else {
|
||||
setPinInput(B0);
|
||||
}
|
||||
|
||||
/* Map TXLED to USB_LED_CAPS_LOCK */
|
||||
if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
|
||||
setPinOutput(D5);
|
||||
writePinLow(D5);
|
||||
} else {
|
||||
setPinInput(D5);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
79
keyboards/4pplet/bootleg/info.json
Normal file
79
keyboards/4pplet/bootleg/info.json
Normal file
@@ -0,0 +1,79 @@
|
||||
{
|
||||
"keyboard_name": "bootleg Rev A",
|
||||
"url": "https://github.com/4pplet/bootlegs",
|
||||
"maintainer": "4pplet",
|
||||
"width": 15,
|
||||
"height": 5,
|
||||
"layouts": {
|
||||
"LAYOUT_all": {
|
||||
"layout": [
|
||||
{ "label": "Esc", "x": 0, "y": 0 },
|
||||
{ "label": "!", "x": 1, "y": 0 },
|
||||
{ "label": "@", "x": 2, "y": 0 },
|
||||
{ "label": "#", "x": 3, "y": 0 },
|
||||
{ "label": "$", "x": 4, "y": 0 },
|
||||
{ "label": "%", "x": 5, "y": 0 },
|
||||
{ "label": "^", "x": 6, "y": 0 },
|
||||
{ "label": "&", "x": 7, "y": 0 },
|
||||
{ "label": "*", "x": 8, "y": 0 },
|
||||
{ "label": "(", "x": 9, "y": 0 },
|
||||
{ "label": ")", "x": 10, "y": 0 },
|
||||
{ "label": "_", "x": 11, "y": 0 },
|
||||
{ "label": "+", "x": 12, "y": 0 },
|
||||
{ "label": "|", "x": 13, "y": 0 },
|
||||
{ "label": "~", "x": 14, "y": 0 },
|
||||
{ "label": "Tab", "x": 0, "y": 1, "w": 1.5 },
|
||||
{ "label": "Q", "x": 1.5, "y": 1 },
|
||||
{ "label": "W", "x": 2.5, "y": 1 },
|
||||
{ "label": "E", "x": 3.5, "y": 1 },
|
||||
{ "label": "R", "x": 4.5, "y": 1 },
|
||||
{ "label": "T", "x": 5.5, "y": 1 },
|
||||
{ "label": "Y", "x": 6.5, "y": 1 },
|
||||
{ "label": "U", "x": 7.5, "y": 1 },
|
||||
{ "label": "I", "x": 8.5, "y": 1 },
|
||||
{ "label": "O", "x": 9.5, "y": 1 },
|
||||
{ "label": "P", "x": 10.5, "y": 1 },
|
||||
{ "label": "{", "x": 11.5, "y": 1 },
|
||||
{ "label": "}", "x": 12.5, "y": 1 },
|
||||
{ "label": "Backsp.", "x": 13.5, "y": 1, "w": 1.5 },
|
||||
{ "label": "Caps Lock", "x": 0, "y": 2, "w": 1.75 },
|
||||
{ "label": "A", "x": 1.75, "y": 2 },
|
||||
{ "label": "S", "x": 2.75, "y": 2 },
|
||||
{ "label": "D", "x": 3.75, "y": 2 },
|
||||
{ "label": "F", "x": 4.75, "y": 2 },
|
||||
{ "label": "G", "x": 5.75, "y": 2 },
|
||||
{ "label": "H", "x": 6.75, "y": 2 },
|
||||
{ "label": "J", "x": 7.75, "y": 2 },
|
||||
{ "label": "K", "x": 8.75, "y": 2 },
|
||||
{ "label": "L", "x": 9.75, "y": 2 },
|
||||
{ "label": ":", "x": 10.75, "y": 2 },
|
||||
{ "label": "\"", "x": 11.75, "y": 2 },
|
||||
{ "label": "Enter", "x": 12.75, "y": 2, "w": 2.25 },
|
||||
{ "label": "Shift", "x": 0, "y": 3, "w": 1.25 },
|
||||
{ "label": "|", "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": "Shift", "x": 12.25, "y": 3, "w": 1.75 },
|
||||
{ "label": "Fn", "x": 14, "y": 3, "w": 1 },
|
||||
{ "label": "Ctrl", "x": 0, "y": 4, "w": 1.25 },
|
||||
{ "label": "Win", "x": 1.25, "y": 4, "w": 1.25 },
|
||||
{ "label": "Alt", "x": 2.5, "y": 4, "w": 1.25 },
|
||||
{ "label": "Space1", "x": 3.75, "y": 4, "w": 2.25 },
|
||||
{ "label": "Space2", "x": 6, "y": 4, "w": 1.25 },
|
||||
{ "label": "Space3", "x": 7.25, "y": 4, "w": 2.75 },
|
||||
{ "label": "Alt", "x": 10, "y": 4, "w": 1.25 },
|
||||
{ "label": "Menu", "x": 11.25, "y": 4, "w": 1.25 },
|
||||
{ "label": "Win", "x": 12.5, "y": 4, "w": 1.25 },
|
||||
{ "label": "Ctrl", "x": 13.75, "y": 4, "w": 1.25 }
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
34
keyboards/4pplet/bootleg/keymaps/default/keymap.c
Normal file
34
keyboards/4pplet/bootleg/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
Copyright 2020 Stefan Sundin "4pplet" <4pplet@protonmail.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 QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
// main layer
|
||||
[0] = LAYOUT_all(
|
||||
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_NO, KC_BSPC,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||
KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
||||
KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_NO,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_APP, MO(1)),
|
||||
// basic function layer
|
||||
[1] = LAYOUT_all(
|
||||
RESET, 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_UP, 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_LEFT, KC_DOWN, KC_RIGHT, 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,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
|
||||
};
|
48
keyboards/4pplet/bootleg/keymaps/via/keymap.c
Normal file
48
keyboards/4pplet/bootleg/keymaps/via/keymap.c
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
Copyright 2020 Stefan Sundin "4pplet" <4pplet@protonmail.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 QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
// main layer
|
||||
[0] = LAYOUT_all(
|
||||
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_NO, KC_BSPC,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||
KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
||||
KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_NO,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_APP, MO(1)),
|
||||
// basic function layer
|
||||
[1] = LAYOUT_all(
|
||||
RESET, 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_UP, 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_LEFT, KC_DOWN, KC_RIGHT, 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,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
// extra layer for VIA
|
||||
[2] = LAYOUT_all(
|
||||
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, 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, 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),
|
||||
// extra layer for VIA
|
||||
[3] = LAYOUT_all(
|
||||
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, 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, 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)
|
||||
};
|
12
keyboards/4pplet/bootleg/readme.md
Normal file
12
keyboards/4pplet/bootleg/readme.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# bootleg
|
||||
|
||||
A 60% PCB for non tray-mount keyboards
|
||||
|
||||
* Keyboard Maintainer: [4pplet](https://github.com/4pplet)
|
||||
* Hardware Supported: bootleg Rev A
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make 4pplet/bootleg/rev_a: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).
|
42
keyboards/4pplet/bootleg/rev_a/config.h
Normal file
42
keyboards/4pplet/bootleg/rev_a/config.h
Normal file
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
Copyright 2020 Stefan Sundin "4pplet" <4pplet@protonmail.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 "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0x4444
|
||||
#define PRODUCT_ID 0x0004
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER 4pplet
|
||||
#define PRODUCT bootleg Rev A
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 5
|
||||
#define MATRIX_COLS 15
|
||||
// ROWS: Top to bottom, COLS: Left to right
|
||||
#define MATRIX_ROW_PINS {D0,C2,C4,D4,D2}
|
||||
#define MATRIX_COL_PINS {C5,C6,C7,B7,B6,B5,B4,B3,B2,B1,B0,D6,D5,D3,D1}
|
||||
|
||||
/* COL2ROW or ROW2COL */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/* Set 0 if debouncing isn't needed */
|
||||
#define DEBOUNCE 5
|
||||
|
||||
#define QMK_ESC_OUTPUT C4 // usually COL
|
||||
#define QMK_ESC_INPUT D0 // usually ROW
|
12
keyboards/4pplet/bootleg/rev_a/readme.md
Normal file
12
keyboards/4pplet/bootleg/rev_a/readme.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# bootleg
|
||||
|
||||
A 60% PCB for non tray-mount keyboards
|
||||
|
||||
* Keyboard Maintainer: [4pplet](https://github.com/4pplet)
|
||||
* Hardware Supported: bootleg Rev A
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make 4pplet/bootleg/rev_a: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).
|
17
keyboards/4pplet/bootleg/rev_a/rev_a.c
Normal file
17
keyboards/4pplet/bootleg/rev_a/rev_a.c
Normal file
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
Copyright 2020 Stefan Sundin "4pplet" <4pplet@protonmail.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 "rev_a.h"
|
34
keyboards/4pplet/bootleg/rev_a/rev_a.h
Normal file
34
keyboards/4pplet/bootleg/rev_a/rev_a.h
Normal file
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
Copyright 2020 Stefan Sundin "4pplet" <4pplet@protonmail.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 "quantum.h"
|
||||
|
||||
#define LAYOUT_all( \
|
||||
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \
|
||||
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1d, k1e, \
|
||||
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, \
|
||||
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, k3e, \
|
||||
k40, k41, k43, k45, k47, k48, k4a, k4b, k4d, k4e \
|
||||
) \
|
||||
{ \
|
||||
{k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e}, \
|
||||
{k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1d, k1e}, \
|
||||
{k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d}, \
|
||||
{k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, k3e}, \
|
||||
{k40, k41, k43, k45, k47, k48, k4a, k4b, k4d, k4e } \
|
||||
}
|
22
keyboards/4pplet/bootleg/rev_a/rules.mk
Normal file
22
keyboards/4pplet/bootleg/rev_a/rules.mk
Normal file
@@ -0,0 +1,22 @@
|
||||
# MCU name
|
||||
MCU = atmega32u2
|
||||
|
||||
# Bootloader selection
|
||||
BOOTLOADER = atmel-dfu
|
||||
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
||||
MOUSEKEY_ENABLE = no # Mouse keys
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||
CONSOLE_ENABLE = no # Console for debug
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
NKRO_ENABLE = no # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth
|
||||
AUDIO_ENABLE = no # Audio output
|
79
keyboards/4pplet/waffling60/info.json
Normal file
79
keyboards/4pplet/waffling60/info.json
Normal file
@@ -0,0 +1,79 @@
|
||||
{
|
||||
"keyboard_name": "Waffling60 Rev A",
|
||||
"url": "https://github.com/4pplet/waffling60",
|
||||
"maintainer": "4pplet",
|
||||
"width": 15,
|
||||
"height": 5,
|
||||
"layouts": {
|
||||
"LAYOUT_all": {
|
||||
"layout": [
|
||||
{ "label": "Esc", "x": 0, "y": 0 },
|
||||
{ "label": "!", "x": 1, "y": 0 },
|
||||
{ "label": "@", "x": 2, "y": 0 },
|
||||
{ "label": "#", "x": 3, "y": 0 },
|
||||
{ "label": "$", "x": 4, "y": 0 },
|
||||
{ "label": "%", "x": 5, "y": 0 },
|
||||
{ "label": "^", "x": 6, "y": 0 },
|
||||
{ "label": "&", "x": 7, "y": 0 },
|
||||
{ "label": "*", "x": 8, "y": 0 },
|
||||
{ "label": "(", "x": 9, "y": 0 },
|
||||
{ "label": ")", "x": 10, "y": 0 },
|
||||
{ "label": "_", "x": 11, "y": 0 },
|
||||
{ "label": "+", "x": 12, "y": 0 },
|
||||
{ "label": "|", "x": 13, "y": 0 },
|
||||
{ "label": "~", "x": 14, "y": 0 },
|
||||
{ "label": "Tab", "x": 0, "y": 1, "w": 1.5 },
|
||||
{ "label": "Q", "x": 1.5, "y": 1 },
|
||||
{ "label": "W", "x": 2.5, "y": 1 },
|
||||
{ "label": "E", "x": 3.5, "y": 1 },
|
||||
{ "label": "R", "x": 4.5, "y": 1 },
|
||||
{ "label": "T", "x": 5.5, "y": 1 },
|
||||
{ "label": "Y", "x": 6.5, "y": 1 },
|
||||
{ "label": "U", "x": 7.5, "y": 1 },
|
||||
{ "label": "I", "x": 8.5, "y": 1 },
|
||||
{ "label": "O", "x": 9.5, "y": 1 },
|
||||
{ "label": "P", "x": 10.5, "y": 1 },
|
||||
{ "label": "{", "x": 11.5, "y": 1 },
|
||||
{ "label": "}", "x": 12.5, "y": 1 },
|
||||
{ "label": "Backsp.", "x": 13.5, "y": 1, "w": 1.5 },
|
||||
{ "label": "Caps Lock", "x": 0, "y": 2, "w": 1.75 },
|
||||
{ "label": "A", "x": 1.75, "y": 2 },
|
||||
{ "label": "S", "x": 2.75, "y": 2 },
|
||||
{ "label": "D", "x": 3.75, "y": 2 },
|
||||
{ "label": "F", "x": 4.75, "y": 2 },
|
||||
{ "label": "G", "x": 5.75, "y": 2 },
|
||||
{ "label": "H", "x": 6.75, "y": 2 },
|
||||
{ "label": "J", "x": 7.75, "y": 2 },
|
||||
{ "label": "K", "x": 8.75, "y": 2 },
|
||||
{ "label": "L", "x": 9.75, "y": 2 },
|
||||
{ "label": ":", "x": 10.75, "y": 2 },
|
||||
{ "label": "\"", "x": 11.75, "y": 2 },
|
||||
{ "label": "Enter", "x": 12.75, "y": 2, "w": 2.25 },
|
||||
{ "label": "Shift", "x": 0, "y": 3, "w": 1.25 },
|
||||
{ "label": "|", "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": "Shift", "x": 12.25, "y": 3, "w": 1.75 },
|
||||
{ "label": "Fn", "x": 14, "y": 3, "w": 1 },
|
||||
{ "label": "Ctrl", "x": 0, "y": 4, "w": 1.25 },
|
||||
{ "label": "Win", "x": 1.25, "y": 4, "w": 1.25 },
|
||||
{ "label": "Alt", "x": 2.5, "y": 4, "w": 1.25 },
|
||||
{ "label": "Space1", "x": 3.75, "y": 4, "w": 2.25 },
|
||||
{ "label": "Space2", "x": 6, "y": 4, "w": 1.25 },
|
||||
{ "label": "Space3", "x": 7.25, "y": 4, "w": 2.75 },
|
||||
{ "label": "Alt", "x": 10, "y": 4, "w": 1.25 },
|
||||
{ "label": "Menu", "x": 11.25, "y": 4, "w": 1.25 },
|
||||
{ "label": "Win", "x": 12.5, "y": 4, "w": 1.25 },
|
||||
{ "label": "Ctrl", "x": 13.75, "y": 4, "w": 1.25 }
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,3 +1,19 @@
|
||||
/*
|
||||
Copyright 2020 Stefan Sundin "4pplet" <4pplet@protonmail.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 QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
@@ -1,3 +1,19 @@
|
||||
/*
|
||||
Copyright 2020 Stefan Sundin "4pplet" <4pplet@protonmail.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 QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
@@ -29,4 +45,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
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, 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)
|
||||
};
|
||||
};
|
@@ -9,6 +9,7 @@ More info: https://geekhack.org/index.php?topic=103531.0
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make 4pplet/steezy60/rev_a:default
|
||||
make 4pplet/waffling60/rev_a:default
|
||||
make 4pplet/waffling60/rev_b: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).
|
||||
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).
|
||||
|
14
keyboards/4pplet/waffling60/rev_a/readme.md
Normal file
14
keyboards/4pplet/waffling60/rev_a/readme.md
Normal file
@@ -0,0 +1,14 @@
|
||||
# waffling60
|
||||
|
||||
A 60% PCB for MX switches, one hot swap and one solder-pcb version with decent layout support.
|
||||
|
||||
More info: https://geekhack.org/index.php?topic=103531.0
|
||||
|
||||
* Keyboard Maintainer: [4pplet](https://github.com/4pplet)
|
||||
* Hardware Supported: [waffling60](https://github.com/4pplet/waffling60)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make 4pplet/waffling60/rev_a: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).
|
55
keyboards/4pplet/waffling60/rev_b/config.h
Normal file
55
keyboards/4pplet/waffling60/rev_b/config.h
Normal file
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
Copyright 2020 Stefan Sundin "4pplet" <4pplet@protonmail.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 "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0x4444
|
||||
#define PRODUCT_ID 0x0005
|
||||
#define DEVICE_VER 0x0002
|
||||
#define MANUFACTURER 4pplet
|
||||
#define PRODUCT waffling60 Rev B
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 5
|
||||
#define MATRIX_COLS 14
|
||||
// ROWS: Top to bottom, COLS: Left to right
|
||||
|
||||
#define MATRIX_ROW_PINS {C2,D0,B0,D6,D5}
|
||||
#define MATRIX_COL_PINS {C4,C5,D2,C6,C7,B7,B6,B5,B4,B3,B2,B1,D1,D4}
|
||||
|
||||
/* COL2ROW or ROW2COL */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/* define if matrix has ghost */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
/* Set 0 if debouncing isn't needed */
|
||||
#define DEBOUNCE 5
|
||||
|
||||
#define QMK_ESC_OUTPUT C2 // usually COL
|
||||
#define QMK_ESC_INPUT C4 // usually ROW
|
||||
|
||||
#define RGB_DI_PIN D3
|
||||
#define RGBLED_NUM 1
|
||||
#define BACKLIGHT_LEVELS 5
|
||||
|
||||
#define RGBLIGHT_HUE_STEP 8
|
||||
#define RGBLIGHT_SAT_STEP 8
|
||||
#define RGBLIGHT_VAL_STEP 8
|
||||
#define RGBLIGHT_ANIMATIONS
|
14
keyboards/4pplet/waffling60/rev_b/readme.md
Normal file
14
keyboards/4pplet/waffling60/rev_b/readme.md
Normal file
@@ -0,0 +1,14 @@
|
||||
# waffling60
|
||||
|
||||
A 60% PCB for MX switches, one hot swap and one solder-pcb version with decent layout support.
|
||||
|
||||
More info: https://geekhack.org/index.php?topic=103531.0
|
||||
|
||||
* Keyboard Maintainer: [4pplet](https://github.com/4pplet)
|
||||
* Hardware Supported: [waffling60](https://github.com/4pplet/waffling60)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make 4pplet/waffling60/rev_b: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).
|
33
keyboards/4pplet/waffling60/rev_b/rev_b.c
Normal file
33
keyboards/4pplet/waffling60/rev_b/rev_b.c
Normal file
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
Copyright 2020 Stefan Sundin "4pplet" <4pplet@protonmail.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 "rev_b.h"
|
||||
|
||||
bool led_update_kb(led_t led_state) {
|
||||
bool res = led_update_user(led_state);
|
||||
if(CAPS_LOCK_ENABLE){
|
||||
if(res) {
|
||||
if(led_state.caps_lock){
|
||||
rgblight_enable();
|
||||
rgblight_mode(1);
|
||||
rgblight_sethsv_noeeprom(CAPS_LOCK_COLOR);
|
||||
}
|
||||
else
|
||||
rgblight_disable_noeeprom();
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
38
keyboards/4pplet/waffling60/rev_b/rev_b.h
Normal file
38
keyboards/4pplet/waffling60/rev_b/rev_b.h
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
Copyright 2020 Stefan Sundin "4pplet" <4pplet@protonmail.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
|
||||
|
||||
// defines to set RGB-led behaviour. Off by default
|
||||
#define CAPS_LOCK_ENABLE false
|
||||
#define CAPS_LOCK_COLOR HSV_ORANGE
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#define LAYOUT_all( \
|
||||
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k1d, \
|
||||
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k2c, \
|
||||
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, \
|
||||
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \
|
||||
k40, k41, k42, k44, k46, k48, k4a, k4b, k4c, k4d \
|
||||
) \
|
||||
{ \
|
||||
{k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d}, \
|
||||
{k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d}, \
|
||||
{k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d}, \
|
||||
{k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d}, \
|
||||
{k40, k41, k42, KC_NO, k44, KC_NO, k46, KC_NO, k48, KC_NO, k4a, k4b, k4c, k4d}, \
|
||||
}
|
22
keyboards/4pplet/waffling60/rev_b/rules.mk
Normal file
22
keyboards/4pplet/waffling60/rev_b/rules.mk
Normal file
@@ -0,0 +1,22 @@
|
||||
# MCU name
|
||||
MCU = atmega32u2
|
||||
|
||||
# Bootloader selection
|
||||
BOOTLOADER = atmel-dfu
|
||||
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
||||
MOUSEKEY_ENABLE = no # Mouse keys
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||
CONSOLE_ENABLE = no # Console for debug
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
NKRO_ENABLE = no # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth
|
||||
AUDIO_ENABLE = no # Audio output
|
86
keyboards/acekeyboard/titan60/config.h
Normal file
86
keyboards/acekeyboard/titan60/config.h
Normal file
@@ -0,0 +1,86 @@
|
||||
/*
|
||||
Copyright 2020 MechMerlin
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xACE1 // Ace
|
||||
#define PRODUCT_ID 0x5449 // TI
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER Acekeyboard
|
||||
#define PRODUCT titan60
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 5
|
||||
#define MATRIX_COLS 14
|
||||
|
||||
/*
|
||||
* Keyboard Matrix Assignments
|
||||
*
|
||||
* Change this to how you wired your keyboard
|
||||
* COLS: AVR pins used for columns, left to right
|
||||
* ROWS: AVR pins used for rows, top to bottom
|
||||
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
||||
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
// 0 1 2 3 4 5 6 7 8 9 A B C D
|
||||
#define MATRIX_ROW_PINS { B1, B2, B3, F0, F1 }
|
||||
#define MATRIX_COL_PINS { F4, F7, F5, F6, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3}
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* COL2ROW, ROW2COL */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/*
|
||||
* Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
|
||||
*/
|
||||
#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
|
||||
|
||||
#define BACKLIGHT_PIN B7
|
||||
#define BACKLIGHT_LEVELS 3
|
||||
#define BACKLIGHT_BREATHING
|
||||
|
||||
#define RGB_DI_PIN D2
|
||||
#ifdef RGB_DI_PIN
|
||||
# define RGBLED_NUM 14
|
||||
# define RGBLIGHT_HUE_STEP 8
|
||||
# define RGBLIGHT_SAT_STEP 8
|
||||
# define RGBLIGHT_VAL_STEP 8
|
||||
# define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
|
||||
# define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
|
||||
# define RGBLIGHT_ANIMATIONS
|
||||
#endif
|
||||
|
||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||
#define DEBOUNCE 5
|
||||
|
||||
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
/* 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
|
||||
|
||||
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
32
keyboards/acekeyboard/titan60/info.json
Normal file
32
keyboards/acekeyboard/titan60/info.json
Normal file
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"keyboard_name": "Titan60",
|
||||
"url": "",
|
||||
"maintainer": "qmk",
|
||||
"width": 15,
|
||||
"height": 5,
|
||||
"layouts": {
|
||||
"LAYOUT_all_ansi_std": {
|
||||
"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, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":2.75}, {"x":6.5, "y":4, "w":1.25}, {"x":7.75, "y":4, "w":2.25}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}]
|
||||
},
|
||||
|
||||
"LAYOUT_all_ansi_2u_lshift": {
|
||||
"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, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":2}, {"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, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":2.75}, {"x":6.5, "y":4, "w":1.25}, {"x":7.75, "y":4, "w":2.25}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}]
|
||||
},
|
||||
|
||||
"LAYOUT_60_ansi": {
|
||||
"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, "w":2}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":2.75}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"x":12.5, "y":4, "w":1.25}, {"x":13.75, "y":4, "w":1.25}]
|
||||
},
|
||||
|
||||
"LAYOUT_60_ansi_tsangan": {
|
||||
"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, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":0, "y":4, "w":1.5}, {"x":1.5, "y":4}, {"x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"x":11, "y":4, "w":1.5}, {"x":12.5, "y":4}, {"x":13.5, "y":4, "w":1.5}]
|
||||
},
|
||||
|
||||
"LAYOUT_60_ansi_split_bs_rshift": {
|
||||
"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, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"x":12.5, "y":4, "w":1.25}, {"x":13.75, "y":4, "w":1.25}]
|
||||
},
|
||||
|
||||
"LAYOUT_60_ansi_split_spacebar": {
|
||||
"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, "w":2}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":2.75}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":2.75}, {"x":6.5, "y":4, "w":1.25}, {"x":7.75, "y":4, "w":2.25}, {"x":10, "y":4, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"x":12.5, "y":4, "w":1.25}, {"x":13.75, "y":4, "w":1.25}]
|
||||
}
|
||||
}
|
||||
}
|
48
keyboards/acekeyboard/titan60/keymaps/default/keymap.c
Normal file
48
keyboards/acekeyboard/titan60/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
Copyright 2020 MechMerlin
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/*
|
||||
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
|
||||
* │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│
|
||||
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
|
||||
* │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │
|
||||
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤
|
||||
* │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │
|
||||
* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤
|
||||
* │ Shift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift │
|
||||
* ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
|
||||
* │Ctrl│GUI │Alt │ │ Alt│ GUI│Menu│Ctrl│
|
||||
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
|
||||
*/
|
||||
[0] = LAYOUT_60_ansi(
|
||||
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_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_B,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RALT, KC_RGUI, KC_RCTL
|
||||
),
|
||||
|
||||
[1] = LAYOUT_60_ansi(
|
||||
KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, 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, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
};
|
64
keyboards/acekeyboard/titan60/keymaps/via/keymap.c
Normal file
64
keyboards/acekeyboard/titan60/keymaps/via/keymap.c
Normal file
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
Copyright 2020 MechMerlin
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/*
|
||||
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
|
||||
* │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│
|
||||
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
|
||||
* │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │
|
||||
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤
|
||||
* │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │
|
||||
* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤
|
||||
* │ Shift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift │
|
||||
* ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
|
||||
* │Ctrl│GUI │Alt │ │ Alt│ GUI│Menu│Ctrl│
|
||||
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
|
||||
*/
|
||||
[0] = LAYOUT_60_ansi(
|
||||
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_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, MO(1), KC_RALT, KC_RGUI, KC_RCTL
|
||||
),
|
||||
|
||||
[1] = LAYOUT_60_ansi(
|
||||
KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, 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, 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, KC_TRNS, KC_TRNS, 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, 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, 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, KC_TRNS, KC_TRNS
|
||||
),
|
||||
|
||||
[3] = 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, 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, 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, KC_TRNS, KC_TRNS
|
||||
)
|
||||
};
|
3
keyboards/acekeyboard/titan60/keymaps/via/rules.mk
Normal file
3
keyboards/acekeyboard/titan60/keymaps/via/rules.mk
Normal file
@@ -0,0 +1,3 @@
|
||||
VIA_ENABLE = yes
|
||||
LTO_ENABLE = yes
|
||||
|
17
keyboards/acekeyboard/titan60/readme.md
Normal file
17
keyboards/acekeyboard/titan60/readme.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# titan60
|
||||
|
||||
60% custom keyboard originally meant for the Saturn 60
|
||||
|
||||
* Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin)
|
||||
* Hardware Supported: Titan 60 PCB
|
||||
* Hardware Availability: [Acekeyboard](https://acekeyboard.co/)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make acekeyboard/titan60:default
|
||||
|
||||
Flashing example for this keyboard:
|
||||
|
||||
make acekeyboard/titan60:default:flash
|
||||
|
||||
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).
|
22
keyboards/acekeyboard/titan60/rules.mk
Normal file
22
keyboards/acekeyboard/titan60/rules.mk
Normal file
@@ -0,0 +1,22 @@
|
||||
# MCU name
|
||||
MCU = atmega32u4
|
||||
|
||||
# Bootloader selection
|
||||
BOOTLOADER = atmel-dfu
|
||||
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||
CONSOLE_ENABLE = no # Console for debug
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
NKRO_ENABLE = no # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth
|
||||
AUDIO_ENABLE = no # Audio output
|
18
keyboards/acekeyboard/titan60/titan60.c
Normal file
18
keyboards/acekeyboard/titan60/titan60.c
Normal file
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
Copyright 2020 MechMerlin
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "titan60.h"
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user