Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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 | ||
|
|
94e94ffb5b | ||
|
|
cfc9a358c5 | ||
|
|
e4236278b5 | ||
|
|
81a17f4270 | ||
|
|
bb9fbd66e9 | ||
|
|
5edce6ba26 | ||
|
|
91b44016f9 | ||
|
|
45e16fd543 | ||
|
|
a7afaa36a1 | ||
|
|
d7c1b890f1 | ||
|
|
0dee334bce | ||
|
|
a422309354 | ||
|
|
683ba8b8d4 | ||
|
|
aae3b35c0f | ||
|
|
abf1902ff5 | ||
|
|
aa90cf1da8 | ||
|
|
7595f53856 | ||
|
|
8af767cb1d | ||
|
|
a9f65b760a | ||
|
|
53f11668a3 | ||
|
|
2ef68a84b6 | ||
|
|
489bee0ee4 | ||
|
|
ed8d1d1ae7 | ||
|
|
f38a3b7408 | ||
|
|
16fe4b8b77 | ||
|
|
84ca67f158 | ||
|
|
cb80b59e93 | ||
|
|
95bbd799a4 | ||
|
|
1ff5ee255f | ||
|
|
9cd3ffa5ba | ||
|
|
ff7f70314e | ||
|
|
db829c9453 |
No files matched your search
@@ -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/[email protected]
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
DEFAULT_BUMP: 'patch'
|
||||||
@@ -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/[email protected]
|
||||||
|
with:
|
||||||
|
ACCESS_TOKEN: ${{ secrets.API_TOKEN_GITHUB }}
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
BRANCH: main
|
||||||
|
FOLDER: api_data/v1
|
||||||
|
CLEAN: true
|
||||||
|
GIT_CONFIG_EMAIL: [email protected]
|
||||||
|
REPOSITORY_NAME: qmk/qmk_keyboards_devel
|
||||||
|
TARGET_FOLDER: v1
|
||||||
@@ -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 "[email protected]"
|
||||||
|
git merge origin/master
|
||||||
|
git push origin develop
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
name: Generate Docs
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
paths:
|
||||||
|
- 'tmk_core/**'
|
||||||
|
- 'quantum/**'
|
||||||
|
- 'platforms/**'
|
||||||
|
- 'docs/**'
|
||||||
|
- '.github/workflows/docs.yml'
|
||||||
|
|
||||||
|
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
|
||||||
|
with:
|
||||||
|
fetch-depth: 1
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
apt-get update && apt-get install -y rsync nodejs npm doxygen
|
||||||
|
npm install -g moxygen
|
||||||
|
|
||||||
|
- name: Build docs
|
||||||
|
run: |
|
||||||
|
qmk --verbose generate-docs
|
||||||
|
|
||||||
|
- name: Deploy
|
||||||
|
uses: JamesIves/[email protected]
|
||||||
|
with:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
BASE_BRANCH: master
|
||||||
|
BRANCH: gh-pages
|
||||||
|
FOLDER: .build/docs
|
||||||
|
GIT_CONFIG_EMAIL: [email protected]
|
||||||
@@ -46,6 +46,10 @@ jobs:
|
|||||||
echo "linting ${KB}"
|
echo "linting ${KB}"
|
||||||
|
|
||||||
qmk lint --keyboard ${KB} && qmk info -l --keyboard ${KB}
|
qmk lint --keyboard ${KB} && qmk info -l --keyboard ${KB}
|
||||||
|
exit_code=$(($exit_code + $?))
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
if [[ $exit_code -gt 255 ]]; then
|
||||||
|
exit 255
|
||||||
|
fi
|
||||||
exit $exit_code
|
exit $exit_code
|
||||||
@@ -18,21 +18,16 @@ addons:
|
|||||||
- ubuntu-toolchain-r-test
|
- ubuntu-toolchain-r-test
|
||||||
- llvm-toolchain-trusty-7
|
- llvm-toolchain-trusty-7
|
||||||
packages:
|
packages:
|
||||||
- pandoc
|
|
||||||
- diffutils
|
- diffutils
|
||||||
- dos2unix
|
- dos2unix
|
||||||
- doxygen
|
|
||||||
- clang-format-7
|
- clang-format-7
|
||||||
- libstdc++-7-dev
|
- libstdc++-7-dev
|
||||||
install:
|
|
||||||
- npm install -g moxygen
|
|
||||||
script:
|
script:
|
||||||
- git fetch --depth=50 origin $TRAVIS_BRANCH:$TRAVIS_BRANCH
|
- git fetch --depth=50 origin $TRAVIS_BRANCH:$TRAVIS_BRANCH
|
||||||
- git rev-parse --short HEAD
|
- git rev-parse --short HEAD
|
||||||
- git diff --name-only HEAD $TRAVIS_BRANCH
|
- git diff --name-only HEAD $TRAVIS_BRANCH
|
||||||
- bash util/travis_test.sh
|
- bash util/travis_test.sh
|
||||||
- bash util/travis_build.sh
|
- bash util/travis_build.sh
|
||||||
- bash util/travis_docs.sh
|
|
||||||
after_script:
|
after_script:
|
||||||
bash util/travis_compiled_push.sh
|
bash util/travis_compiled_push.sh
|
||||||
notifications:
|
notifications:
|
||||||
|
|||||||
@@ -272,11 +272,24 @@ endef
|
|||||||
define PARSE_RULE
|
define PARSE_RULE
|
||||||
RULE := $1
|
RULE := $1
|
||||||
COMMANDS :=
|
COMMANDS :=
|
||||||
|
REQUIRE_PLATFORM_KEY :=
|
||||||
# If the rule starts with all, then continue the parsing from
|
# If the rule starts with all, then continue the parsing from
|
||||||
# PARSE_ALL_KEYBOARDS
|
# PARSE_ALL_KEYBOARDS
|
||||||
ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,all),true)
|
ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,all),true)
|
||||||
KEYBOARD_RULE=all
|
KEYBOARD_RULE=all
|
||||||
$$(eval $$(call PARSE_ALL_KEYBOARDS))
|
$$(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)
|
else ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,test),true)
|
||||||
$$(eval $$(call PARSE_TEST))
|
$$(eval $$(call PARSE_TEST))
|
||||||
# If the rule starts with the name of a known keyboard, then continue
|
# If the rule starts with the name of a known keyboard, then continue
|
||||||
@@ -447,7 +460,7 @@ define PARSE_KEYMAP
|
|||||||
# Format it in bold
|
# Format it in bold
|
||||||
KB_SP := $(BOLD)$$(KB_SP)$(NO_COLOR)
|
KB_SP := $(BOLD)$$(KB_SP)$(NO_COLOR)
|
||||||
# Specify the variables that we are passing forward to submake
|
# 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
|
# And the first part of the make command
|
||||||
MAKE_CMD := $$(MAKE) -r -R -C $(ROOT_DIR) -f build_keyboard.mk $$(MAKE_TARGET)
|
MAKE_CMD := $$(MAKE) -r -R -C $(ROOT_DIR) -f build_keyboard.mk $$(MAKE_TARGET)
|
||||||
# The message to display
|
# The message to display
|
||||||
@@ -466,6 +479,8 @@ define BUILD
|
|||||||
LOG=$$$$($$(MAKE_CMD) $$(MAKE_VARS) SILENT=true 2>&1) ; \
|
LOG=$$$$($$(MAKE_CMD) $$(MAKE_VARS) SILENT=true 2>&1) ; \
|
||||||
if [ $$$$? -gt 0 ]; \
|
if [ $$$$? -gt 0 ]; \
|
||||||
then $$(PRINT_ERROR_PLAIN); \
|
then $$(PRINT_ERROR_PLAIN); \
|
||||||
|
elif [ "$$$$LOG" = "skipped" ] ; \
|
||||||
|
then $$(PRINT_SKIPPED_PLAIN); \
|
||||||
elif [ "$$$$LOG" != "" ] ; \
|
elif [ "$$$$LOG" != "" ] ; \
|
||||||
then $$(PRINT_WARNING_PLAIN); \
|
then $$(PRINT_WARNING_PLAIN); \
|
||||||
else \
|
else \
|
||||||
@@ -637,12 +652,13 @@ else
|
|||||||
endif
|
endif
|
||||||
ifndef SKIP_VERSION
|
ifndef SKIP_VERSION
|
||||||
BUILD_DATE := $(shell date +"%Y-%m-%d-%H:%M:%S")
|
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_VERSION "$(GIT_VERSION)"' > $(ROOT_DIR)/quantum/version.h)
|
||||||
$(shell echo '#define QMK_BUILDDATE "$(BUILD_DATE)"' >> $(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_VERSION "$(CHIBIOS_VERSION)"' >> $(ROOT_DIR)/quantum/version.h)
|
||||||
$(shell echo '#define CHIBIOS_CONTRIB_VERSION "$(CHIBIOS_CONTRIB_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
|
include $(ROOT_DIR)/testlist.mk
|
||||||
@@ -317,6 +317,13 @@ SRC += $(TMK_COMMON_SRC)
|
|||||||
OPT_DEFS += $(TMK_COMMON_DEFS)
|
OPT_DEFS += $(TMK_COMMON_DEFS)
|
||||||
EXTRALDFLAGS += $(TMK_COMMON_LDFLAGS)
|
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
|
include $(TMK_PATH)/$(PLATFORM_KEY).mk
|
||||||
ifneq ($(strip $(PROTOCOL)),)
|
ifneq ($(strip $(PROTOCOL)),)
|
||||||
include $(TMK_PATH)/protocol/$(strip $(shell echo $(PROTOCOL) | tr '[:upper:]' '[:lower:]')).mk
|
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)
|
$(KEYBOARD_OUTPUT)_CONFIG := $(PROJECT_CONFIG)
|
||||||
|
|
||||||
# Default target.
|
# Default target.
|
||||||
|
ifeq ($(SKIP_COMPILE),no)
|
||||||
all: build check-size
|
all: build check-size
|
||||||
|
else
|
||||||
|
all:
|
||||||
|
echo "skipped" >&2
|
||||||
|
endif
|
||||||
|
|
||||||
build: elf cpfirmware
|
build: elf cpfirmware
|
||||||
check-size: build
|
check-size: build
|
||||||
objs-size: build
|
objs-size: build
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ endif
|
|||||||
|
|
||||||
include common_features.mk
|
include common_features.mk
|
||||||
include $(TMK_PATH)/common.mk
|
include $(TMK_PATH)/common.mk
|
||||||
|
include $(QUANTUM_PATH)/sequencer/tests/rules.mk
|
||||||
include $(QUANTUM_PATH)/serial_link/tests/rules.mk
|
include $(QUANTUM_PATH)/serial_link/tests/rules.mk
|
||||||
ifneq ($(filter $(FULL_TESTS),$(TEST)),)
|
ifneq ($(filter $(FULL_TESTS),$(TEST)),)
|
||||||
include build_full_test.mk
|
include build_full_test.mk
|
||||||
|
|||||||
@@ -21,4 +21,5 @@ COMMON_VPATH += $(QUANTUM_PATH)/keymap_extras
|
|||||||
COMMON_VPATH += $(QUANTUM_PATH)/audio
|
COMMON_VPATH += $(QUANTUM_PATH)/audio
|
||||||
COMMON_VPATH += $(QUANTUM_PATH)/process_keycode
|
COMMON_VPATH += $(QUANTUM_PATH)/process_keycode
|
||||||
COMMON_VPATH += $(QUANTUM_PATH)/api
|
COMMON_VPATH += $(QUANTUM_PATH)/api
|
||||||
|
COMMON_VPATH += $(QUANTUM_PATH)/sequencer
|
||||||
COMMON_VPATH += $(DRIVER_PATH)
|
COMMON_VPATH += $(DRIVER_PATH)
|
||||||
+69
-54
@@ -17,9 +17,15 @@ SERIAL_PATH := $(QUANTUM_PATH)/serial_link
|
|||||||
|
|
||||||
QUANTUM_SRC += \
|
QUANTUM_SRC += \
|
||||||
$(QUANTUM_DIR)/quantum.c \
|
$(QUANTUM_DIR)/quantum.c \
|
||||||
|
$(QUANTUM_DIR)/led.c \
|
||||||
$(QUANTUM_DIR)/keymap_common.c \
|
$(QUANTUM_DIR)/keymap_common.c \
|
||||||
$(QUANTUM_DIR)/keycode_config.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)
|
ifeq ($(strip $(API_SYSEX_ENABLE)), yes)
|
||||||
OPT_DEFS += -DAPI_SYSEX_ENABLE
|
OPT_DEFS += -DAPI_SYSEX_ENABLE
|
||||||
OPT_DEFS += -DAPI_ENABLE
|
OPT_DEFS += -DAPI_ENABLE
|
||||||
@@ -38,6 +44,13 @@ ifeq ($(strip $(AUDIO_ENABLE)), yes)
|
|||||||
SRC += $(QUANTUM_DIR)/audio/luts.c
|
SRC += $(QUANTUM_DIR)/audio/luts.c
|
||||||
endif
|
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)
|
ifeq ($(strip $(MIDI_ENABLE)), yes)
|
||||||
OPT_DEFS += -DMIDI_ENABLE
|
OPT_DEFS += -DMIDI_ENABLE
|
||||||
MUSIC_ENABLE = yes
|
MUSIC_ENABLE = yes
|
||||||
@@ -155,12 +168,14 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
VALID_MATRIX_TYPES := yes IS31FL3731 IS31FL3733 IS31FL3737 IS31FL3741 WS2812 custom
|
|
||||||
|
|
||||||
LED_MATRIX_ENABLE ?= no
|
LED_MATRIX_ENABLE ?= no
|
||||||
ifneq ($(strip $(LED_MATRIX_ENABLE)), no)
|
VALID_LED_MATRIX_TYPES := IS31FL3731 custom
|
||||||
ifeq ($(filter $(LED_MATRIX_ENABLE),$(VALID_MATRIX_TYPES)),)
|
# TODO: IS31FL3733 IS31FL3737 IS31FL3741
|
||||||
$(error LED_MATRIX_ENABLE="$(LED_MATRIX_ENABLE)" is not a valid matrix type)
|
|
||||||
|
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
|
else
|
||||||
BACKLIGHT_ENABLE = yes
|
BACKLIGHT_ENABLE = yes
|
||||||
BACKLIGHT_DRIVER = custom
|
BACKLIGHT_DRIVER = custom
|
||||||
@@ -168,21 +183,22 @@ ifneq ($(strip $(LED_MATRIX_ENABLE)), no)
|
|||||||
SRC += $(QUANTUM_DIR)/led_matrix.c
|
SRC += $(QUANTUM_DIR)/led_matrix.c
|
||||||
SRC += $(QUANTUM_DIR)/led_matrix_drivers.c
|
SRC += $(QUANTUM_DIR)/led_matrix_drivers.c
|
||||||
endif
|
endif
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(strip $(LED_MATRIX_ENABLE)), IS31FL3731)
|
ifeq ($(strip $(LED_MATRIX_DRIVER)), IS31FL3731)
|
||||||
OPT_DEFS += -DIS31FL3731
|
OPT_DEFS += -DIS31FL3731 -DSTM32_I2C -DHAL_USE_I2C=TRUE
|
||||||
COMMON_VPATH += $(DRIVER_PATH)/issi
|
COMMON_VPATH += $(DRIVER_PATH)/issi
|
||||||
SRC += is31fl3731-simple.c
|
SRC += is31fl3731-simple.c
|
||||||
QUANTUM_LIB_SRC += i2c_master.c
|
QUANTUM_LIB_SRC += i2c_master.c
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
RGB_MATRIX_ENABLE ?= no
|
RGB_MATRIX_ENABLE ?= no
|
||||||
|
VALID_RGB_MATRIX_TYPES := IS31FL3731 IS31FL3733 IS31FL3737 IS31FL3741 WS2812 custom
|
||||||
|
|
||||||
ifneq ($(strip $(RGB_MATRIX_ENABLE)), no)
|
ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes)
|
||||||
ifeq ($(filter $(RGB_MATRIX_ENABLE),$(VALID_MATRIX_TYPES)),)
|
ifeq ($(filter $(RGB_MATRIX_DRIVER),$(VALID_RGB_MATRIX_TYPES)),)
|
||||||
$(error RGB_MATRIX_ENABLE="$(RGB_MATRIX_ENABLE)" is not a valid matrix type)
|
$(error "$(RGB_MATRIX_DRIVER)" is not a valid matrix type)
|
||||||
endif
|
endif
|
||||||
OPT_DEFS += -DRGB_MATRIX_ENABLE
|
OPT_DEFS += -DRGB_MATRIX_ENABLE
|
||||||
ifneq (,$(filter $(MCU), atmega16u2 atmega32u2))
|
ifneq (,$(filter $(MCU), atmega16u2 atmega32u2))
|
||||||
# ATmegaxxU2 does not have hardware MUL instruction - lib8tion must be told to use software multiplication routines
|
# ATmegaxxU2 does not have hardware MUL instruction - lib8tion must be told to use software multiplication routines
|
||||||
@@ -193,51 +209,47 @@ endif
|
|||||||
SRC += $(QUANTUM_DIR)/rgb_matrix_drivers.c
|
SRC += $(QUANTUM_DIR)/rgb_matrix_drivers.c
|
||||||
CIE1931_CURVE := yes
|
CIE1931_CURVE := yes
|
||||||
RGB_KEYCODES_ENABLE := yes
|
RGB_KEYCODES_ENABLE := yes
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes)
|
ifeq ($(strip $(RGB_MATRIX_DRIVER)), IS31FL3731)
|
||||||
RGB_MATRIX_ENABLE := IS31FL3731
|
OPT_DEFS += -DIS31FL3731 -DSTM32_I2C -DHAL_USE_I2C=TRUE
|
||||||
endif
|
COMMON_VPATH += $(DRIVER_PATH)/issi
|
||||||
|
SRC += is31fl3731.c
|
||||||
|
QUANTUM_LIB_SRC += i2c_master.c
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(strip $(RGB_MATRIX_ENABLE)), IS31FL3731)
|
ifeq ($(strip $(RGB_MATRIX_DRIVER)), IS31FL3733)
|
||||||
OPT_DEFS += -DIS31FL3731 -DSTM32_I2C -DHAL_USE_I2C=TRUE
|
OPT_DEFS += -DIS31FL3733 -DSTM32_I2C -DHAL_USE_I2C=TRUE
|
||||||
COMMON_VPATH += $(DRIVER_PATH)/issi
|
COMMON_VPATH += $(DRIVER_PATH)/issi
|
||||||
SRC += is31fl3731.c
|
SRC += is31fl3733.c
|
||||||
QUANTUM_LIB_SRC += i2c_master.c
|
QUANTUM_LIB_SRC += i2c_master.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(strip $(RGB_MATRIX_ENABLE)), IS31FL3733)
|
ifeq ($(strip $(RGB_MATRIX_DRIVER)), IS31FL3737)
|
||||||
OPT_DEFS += -DIS31FL3733 -DSTM32_I2C -DHAL_USE_I2C=TRUE
|
OPT_DEFS += -DIS31FL3737 -DSTM32_I2C -DHAL_USE_I2C=TRUE
|
||||||
COMMON_VPATH += $(DRIVER_PATH)/issi
|
COMMON_VPATH += $(DRIVER_PATH)/issi
|
||||||
SRC += is31fl3733.c
|
SRC += is31fl3737.c
|
||||||
QUANTUM_LIB_SRC += i2c_master.c
|
QUANTUM_LIB_SRC += i2c_master.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(strip $(RGB_MATRIX_ENABLE)), IS31FL3737)
|
ifeq ($(strip $(RGB_MATRIX_DRIVER)), IS31FL3741)
|
||||||
OPT_DEFS += -DIS31FL3737 -DSTM32_I2C -DHAL_USE_I2C=TRUE
|
OPT_DEFS += -DIS31FL3741 -DSTM32_I2C -DHAL_USE_I2C=TRUE
|
||||||
COMMON_VPATH += $(DRIVER_PATH)/issi
|
COMMON_VPATH += $(DRIVER_PATH)/issi
|
||||||
SRC += is31fl3737.c
|
SRC += is31fl3741.c
|
||||||
QUANTUM_LIB_SRC += i2c_master.c
|
QUANTUM_LIB_SRC += i2c_master.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(strip $(RGB_MATRIX_ENABLE)), IS31FL3741)
|
ifeq ($(strip $(RGB_MATRIX_DRIVER)), WS2812)
|
||||||
OPT_DEFS += -DIS31FL3741 -DSTM32_I2C -DHAL_USE_I2C=TRUE
|
OPT_DEFS += -DWS2812
|
||||||
COMMON_VPATH += $(DRIVER_PATH)/issi
|
WS2812_DRIVER_REQUIRED := yes
|
||||||
SRC += is31fl3741.c
|
endif
|
||||||
QUANTUM_LIB_SRC += i2c_master.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(strip $(RGB_MATRIX_ENABLE)), WS2812)
|
ifeq ($(strip $(RGB_MATRIX_CUSTOM_KB)), yes)
|
||||||
OPT_DEFS += -DWS2812
|
OPT_DEFS += -DRGB_MATRIX_CUSTOM_KB
|
||||||
WS2812_DRIVER_REQUIRED := yes
|
endif
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(strip $(RGB_MATRIX_CUSTOM_KB)), yes)
|
ifeq ($(strip $(RGB_MATRIX_CUSTOM_USER)), yes)
|
||||||
OPT_DEFS += -DRGB_MATRIX_CUSTOM_KB
|
OPT_DEFS += -DRGB_MATRIX_CUSTOM_USER
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(strip $(RGB_MATRIX_CUSTOM_USER)), yes)
|
|
||||||
OPT_DEFS += -DRGB_MATRIX_CUSTOM_USER
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(strip $(RGB_KEYCODES_ENABLE)), yes)
|
ifeq ($(strip $(RGB_KEYCODES_ENABLE)), yes)
|
||||||
@@ -443,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.
|
# 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.
|
# Unused functions are pruned away, which is why we can add multiple drivers here without bloat.
|
||||||
ifeq ($(PLATFORM),AVR)
|
ifeq ($(PLATFORM),AVR)
|
||||||
QUANTUM_LIB_SRC += i2c_master.c \
|
ifneq ($(NO_I2C),yes)
|
||||||
i2c_slave.c
|
QUANTUM_LIB_SRC += i2c_master.c \
|
||||||
|
i2c_slave.c
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
SERIAL_DRIVER ?= bitbang
|
SERIAL_DRIVER ?= bitbang
|
||||||
|
OPT_DEFS += -DSERIAL_DRIVER_$(strip $(shell echo $(SERIAL_DRIVER) | tr '[:lower:]' '[:upper:]'))
|
||||||
ifeq ($(strip $(SERIAL_DRIVER)), bitbang)
|
ifeq ($(strip $(SERIAL_DRIVER)), bitbang)
|
||||||
QUANTUM_LIB_SRC += serial.c
|
QUANTUM_LIB_SRC += serial.c
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -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)
|
* [One Shot Keys](one_shot_keys.md)
|
||||||
* [Pointing Device](feature_pointing_device.md)
|
* [Pointing Device](feature_pointing_device.md)
|
||||||
* [Raw HID](feature_rawhid.md)
|
* [Raw HID](feature_rawhid.md)
|
||||||
|
* [Sequencer](feature_sequencer.md)
|
||||||
* [Swap Hands](feature_swap_hands.md)
|
* [Swap Hands](feature_swap_hands.md)
|
||||||
* [Tap Dance](feature_tap_dance.md)
|
* [Tap Dance](feature_tap_dance.md)
|
||||||
* [Tap-Hold Configuration](tap_hold.md)
|
* [Tap-Hold Configuration](tap_hold.md)
|
||||||
@@ -105,6 +106,7 @@
|
|||||||
* [Encoders](feature_encoders.md)
|
* [Encoders](feature_encoders.md)
|
||||||
* [Haptic Feedback](feature_haptic_feedback.md)
|
* [Haptic Feedback](feature_haptic_feedback.md)
|
||||||
* [Joystick](feature_joystick.md)
|
* [Joystick](feature_joystick.md)
|
||||||
|
* [LED Indicators](feature_led_indicators.md)
|
||||||
* [Proton C Conversion](proton_c_conversion.md)
|
* [Proton C Conversion](proton_c_conversion.md)
|
||||||
* [PS/2 Mouse](feature_ps2_mouse.md)
|
* [PS/2 Mouse](feature_ps2_mouse.md)
|
||||||
* [Split Keyboard](feature_split_keyboard.md)
|
* [Split Keyboard](feature_split_keyboard.md)
|
||||||
@@ -118,6 +120,7 @@
|
|||||||
* [Overview](breaking_changes.md)
|
* [Overview](breaking_changes.md)
|
||||||
* [My Pull Request Was Flagged](breaking_changes_instructions.md)
|
* [My Pull Request Was Flagged](breaking_changes_instructions.md)
|
||||||
* History
|
* History
|
||||||
|
* [2020 Nov 28](ChangeLog/20201128.md)
|
||||||
* [2020 Aug 29](ChangeLog/20200829.md)
|
* [2020 Aug 29](ChangeLog/20200829.md)
|
||||||
* [2020 May 30](ChangeLog/20200530.md)
|
* [2020 May 30](ChangeLog/20200530.md)
|
||||||
* [2020 Feb 29](ChangeLog/20200229.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?
|
## What has been included in past Breaking Changes?
|
||||||
|
|
||||||
|
* [2020 Nov 28](ChangeLog/20201128.md)
|
||||||
* [2020 Aug 29](ChangeLog/20200829.md)
|
* [2020 Aug 29](ChangeLog/20200829.md)
|
||||||
* [2020 May 30](ChangeLog/20200530.md)
|
* [2020 May 30](ChangeLog/20200530.md)
|
||||||
* [2020 Feb 29](ChangeLog/20200229.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?
|
## 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
|
### Important Dates
|
||||||
|
|
||||||
* [x] 2020 Aug 29 - `develop` is created. It will be rebased weekly.
|
* [x] 2020 Nov 28 - `develop` is created. Each push to `master` is subsequently merged to `develop`
|
||||||
* [ ] 2020 Oct 31 - `develop` closed to new PR's.
|
* [ ] 2021 Jan 30 - `develop` closed to new PR's.
|
||||||
* [ ] 2020 Oct 31 - Call for testers.
|
* [ ] 2021 Jan 30 - Call for testers.
|
||||||
* [ ] 2020 Nov 26 - `master` is locked, no PR's merged.
|
* [ ] 2021 Feb 25 - `master` is locked, no PR's merged.
|
||||||
* [ ] 2020 Nov 28 - Merge `develop` to `master`.
|
* [ ] 2021 Feb 27 - Merge `develop` to `master`.
|
||||||
* [ ] 2020 Nov 28 - `master` is unlocked. PR's can be merged again.
|
* [ ] 2021 Feb 27 - `master` is unlocked. PR's can be merged again.
|
||||||
|
|
||||||
## What changes will be included?
|
## 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.
|
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
|
## Creating the `develop` branch
|
||||||
|
|
||||||
This happens immediately after the previous `develop` branch is merged.
|
This happens immediately after the previous `develop` branch is merged.
|
||||||
|
|||||||
@@ -286,6 +286,16 @@ This command starts a local HTTP server which you can use for browsing or improv
|
|||||||
qmk docs [-p PORT]
|
qmk docs [-p PORT]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## `qmk generate-docs`
|
||||||
|
|
||||||
|
This command allows you to generate QMK documentation locally. It can be uses for general browsing or improving the docs. External tools such as [serve](https://www.npmjs.com/package/serve) can be used to browse the generated files.
|
||||||
|
|
||||||
|
**Usage**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk generate-docs
|
||||||
|
```
|
||||||
|
|
||||||
## `qmk kle2json`
|
## `qmk kle2json`
|
||||||
|
|
||||||
This command allows you to convert from raw KLE data to QMK Configurator JSON. It accepts either an absolute file path, or a file name in the current directory. By default it will not overwrite `info.json` if it is already present. Use the `-f` or `--force` flag to overwrite.
|
This command allows you to convert from raw KLE data to QMK Configurator JSON. It accepts either an absolute file path, or a file name in the current directory. By default it will not overwrite `info.json` if it is already present. Use the `-f` or `--force` flag to overwrite.
|
||||||
|
|||||||
@@ -135,6 +135,8 @@ If you define these options you will enable the associated feature, which may in
|
|||||||
* `#define RETRO_TAPPING`
|
* `#define RETRO_TAPPING`
|
||||||
* tap anyway, even after TAPPING_TERM, if there was no other key interruption between press and release
|
* tap anyway, even after TAPPING_TERM, if there was no other key interruption between press and release
|
||||||
* See [Retro Tapping](tap_hold.md#retro-tapping) for details
|
* 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`
|
* `#define TAPPING_TOGGLE 2`
|
||||||
* how many taps before triggering the toggle
|
* how many taps before triggering the toggle
|
||||||
* `#define PERMISSIVE_HOLD`
|
* `#define PERMISSIVE_HOLD`
|
||||||
|
|||||||
@@ -88,108 +88,6 @@ keyrecord_t record {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
# LED Control
|
|
||||||
|
|
||||||
QMK provides methods to read 5 of the LEDs defined in the HID spec:
|
|
||||||
|
|
||||||
* Num Lock
|
|
||||||
* Caps Lock
|
|
||||||
* Scroll Lock
|
|
||||||
* Compose
|
|
||||||
* Kana
|
|
||||||
|
|
||||||
There are two ways to get the lock LED state:
|
|
||||||
|
|
||||||
* by implementing `bool led_update_kb(led_t led_state)` or `_user(led_t led_state)`; or
|
|
||||||
* by calling `led_t host_keyboard_led_state()`
|
|
||||||
|
|
||||||
!> `host_keyboard_led_state()` may already reflect a new value before `led_update_user()` is called.
|
|
||||||
|
|
||||||
Two more deprecated functions exist that provide the LED state as a `uint8_t`:
|
|
||||||
|
|
||||||
* `uint8_t led_set_kb(uint8_t usb_led)` and `_user(uint8_t usb_led)`
|
|
||||||
* `uint8_t host_keyboard_leds()`
|
|
||||||
|
|
||||||
## `led_update_user()`
|
|
||||||
|
|
||||||
This function will be called when the state of one of those 5 LEDs changes. It receives the LED state as a struct parameter.
|
|
||||||
|
|
||||||
By convention, return `true` from `led_update_user()` to get the `led_update_kb()` hook to run its code, and
|
|
||||||
return `false` when you would prefer not to run the code in `led_update_kb()`.
|
|
||||||
|
|
||||||
Some examples include:
|
|
||||||
|
|
||||||
- overriding the LEDs to use them for something else like layer indication
|
|
||||||
- return `false` because you do not want the `_kb()` function to run, as it would override your layer behavior.
|
|
||||||
- play a sound when an LED turns on or off.
|
|
||||||
- return `true` because you want the `_kb` function to run, and this is in addition to the default LED behavior.
|
|
||||||
|
|
||||||
?> Because the `led_set_*` functions return `void` instead of `bool`, they do not allow for overriding the keyboard LED control, and thus it's recommended to use `led_update_*` instead.
|
|
||||||
|
|
||||||
### Example `led_update_kb()` Implementation
|
|
||||||
|
|
||||||
```c
|
|
||||||
bool led_update_kb(led_t led_state) {
|
|
||||||
bool res = led_update_user(led_state);
|
|
||||||
if(res) {
|
|
||||||
// writePin sets the pin high for 1 and low for 0.
|
|
||||||
// In this example the pins are inverted, setting
|
|
||||||
// it low/0 turns it on, and high/1 turns the LED off.
|
|
||||||
// This behavior depends on whether the LED is between the pin
|
|
||||||
// and VCC or the pin and GND.
|
|
||||||
writePin(B0, !led_state.num_lock);
|
|
||||||
writePin(B1, !led_state.caps_lock);
|
|
||||||
writePin(B2, !led_state.scroll_lock);
|
|
||||||
writePin(B3, !led_state.compose);
|
|
||||||
writePin(B4, !led_state.kana);
|
|
||||||
}
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Example `led_update_user()` Implementation
|
|
||||||
|
|
||||||
This incomplete example would play a sound if Caps Lock is turned on or off. It returns `true`, because you also want the LEDs to maintain their state.
|
|
||||||
|
|
||||||
```c
|
|
||||||
#ifdef AUDIO_ENABLE
|
|
||||||
float caps_on[][2] = SONG(CAPS_LOCK_ON_SOUND);
|
|
||||||
float caps_off[][2] = SONG(CAPS_LOCK_OFF_SOUND);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
bool led_update_user(led_t led_state) {
|
|
||||||
#ifdef AUDIO_ENABLE
|
|
||||||
static uint8_t caps_state = 0;
|
|
||||||
if (caps_state != led_state.caps_lock) {
|
|
||||||
led_state.caps_lock ? PLAY_SONG(caps_on) : PLAY_SONG(caps_off);
|
|
||||||
caps_state = led_state.caps_lock;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### `led_update_*` Function Documentation
|
|
||||||
|
|
||||||
* Keyboard/Revision: `bool led_update_kb(led_t led_state)`
|
|
||||||
* Keymap: `bool led_update_user(led_t led_state)`
|
|
||||||
|
|
||||||
## `host_keyboard_led_state()`
|
|
||||||
|
|
||||||
Call this function to get the last received LED state as a `led_t`. This is useful for reading the LED state outside `led_update_*`, e.g. in [`matrix_scan_user()`](#matrix-scanning-code).
|
|
||||||
|
|
||||||
## Setting Physical LED State
|
|
||||||
|
|
||||||
Some keyboard implementations provide convenience methods for setting the state of the physical LEDs.
|
|
||||||
|
|
||||||
### Ergodox Boards
|
|
||||||
|
|
||||||
The Ergodox implementations provide `ergodox_right_led_1`/`2`/`3_on`/`off()` to turn individual LEDs on or off, as well as `ergodox_right_led_on`/`off(uint8_t led)` to turn them on or off by their index.
|
|
||||||
|
|
||||||
In addition, it is possible to specify the brightness level of all LEDs with `ergodox_led_all_set(uint8_t n)`; of individual LEDs with `ergodox_right_led_1`/`2`/`3_set(uint8_t n)`; or by index with `ergodox_right_led_set(uint8_t led, uint8_t n)`.
|
|
||||||
|
|
||||||
Ergodox boards also define `LED_BRIGHTNESS_LO` for the lowest brightness and `LED_BRIGHTNESS_HI` for the highest brightness (which is the default).
|
|
||||||
|
|
||||||
# Keyboard Initialization Code
|
# Keyboard Initialization Code
|
||||||
|
|
||||||
There are several steps in the keyboard initialization process. Depending on what you want to do, it will influence which function you should use.
|
There are several steps in the keyboard initialization process. Depending on what you want to do, it will influence which function you should use.
|
||||||
@@ -287,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.
|
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
|
# Keyboard Idling/Wake Code
|
||||||
|
|
||||||
|
|||||||
+28
-14
@@ -15,25 +15,31 @@ problem.
|
|||||||
When you tap a key, it stays depressed for a short period of time before it is
|
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
|
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
|
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
|
normal pressed state time. When you press a key, a timer starts, and if you
|
||||||
when you release the key. If the time depressed is greater than or equal to the
|
have not released the key after the `AUTO_SHIFT_TIMEOUT` period, then a shifted
|
||||||
`AUTO_SHIFT_TIMEOUT`, then a shifted version of the key is emitted. If the time
|
version of the key is emitted. If the time is less than the `AUTO_SHIFT_TIMEOUT`
|
||||||
is less than the `AUTO_SHIFT_TIMEOUT` time, then the normal state is emitted.
|
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?
|
## Are There Limitations to Auto Shift?
|
||||||
|
|
||||||
Yes, unfortunately.
|
Yes, unfortunately.
|
||||||
|
|
||||||
1. Key repeat will cease to work. For example, before if you wanted 20 'a'
|
You will have characters that are shifted when you did not intend on shifting, and
|
||||||
characters, you could press and hold the 'a' key for a second or two. This no
|
other characters you wanted shifted, but were not. This simply comes down to
|
||||||
longer works with Auto Shift because it is timing your depressed time instead
|
practice. As we get in a hurry, we think we have hit the key long enough for a
|
||||||
of emitting a depressed key state to your operating system.
|
shifted version, but we did not. On the other hand, we may think we are tapping
|
||||||
2. You will have characters that are shifted when you did not intend on shifting, and
|
the keys, but really we have held it for a little longer than anticipated.
|
||||||
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
|
Additionally, with keyrepeat the desired shift state can get mixed up. It will
|
||||||
for a shifted version, but we did not. On the other hand, we may think we are
|
always 'belong' to the last key pressed. For example, keyrepeating a capital
|
||||||
tapping the keys, but really we have held it for a little longer than
|
and then tapping something lowercase (whether or not it's an Auto Shift key)
|
||||||
anticipated.
|
will result in the capital's *key* still being held, but shift not.
|
||||||
|
|
||||||
## How Do I Enable Auto Shift?
|
## 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.
|
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
|
## Using Auto Shift Setup
|
||||||
|
|
||||||
This will enable you to define three keys temporarily to increase, decrease and report your `AUTO_SHIFT_TIMEOUT`.
|
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`:
|
To configure the backlighting, `#define` these in your `config.h`:
|
||||||
|
|
||||||
|Define |Default |Description |
|
| Define | Default | Description |
|
||||||
|---------------------|-------------|-------------------------------------------------------------------------------------|
|
|------------------------|---------------|-------------------------------------------------------------------------------------------------------------------|
|
||||||
|`BACKLIGHT_PIN` |*Not defined*|The pin that controls the LED(s) |
|
| `BACKLIGHT_PIN` | *Not defined* | The pin that controls the LED(s) |
|
||||||
|`BACKLIGHT_LEVELS` |`3` |The number of brightness levels (maximum 31 excluding off) |
|
| `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_CAPS_LOCK` | *Not defined* | Enable Caps Lock indicator using backlight (for keyboards without dedicated LED) |
|
||||||
|`BACKLIGHT_BREATHING`|*Not defined*|Enable backlight breathing, if supported |
|
| `BACKLIGHT_BREATHING` | *Not defined* | Enable backlight breathing, if supported |
|
||||||
|`BREATHING_PERIOD` |`6` |The length of one backlight "breath" in seconds |
|
| `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_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`.
|
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
|
#define ENCODER_RESOLUTION 4
|
||||||
```
|
```
|
||||||
|
|
||||||
|
It can also be defined per-encoder, by instead defining:
|
||||||
|
|
||||||
|
```c
|
||||||
|
#define ENCODER_RESOLUTIONS { 4, 2 }
|
||||||
|
```
|
||||||
|
|
||||||
## Split Keyboards
|
## 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
|
```c
|
||||||
#define ENCODERS_PAD_A_RIGHT { encoder1a, encoder2a }
|
#define ENCODERS_PAD_A_RIGHT { encoder1a, encoder2a }
|
||||||
#define ENCODERS_PAD_B_RIGHT { encoder1b, encoder2b }
|
#define ENCODERS_PAD_B_RIGHT { encoder1b, encoder2b }
|
||||||
|
#define ENCODER_RESOLUTIONS_RIGHT { 2, 4 }
|
||||||
```
|
```
|
||||||
|
|
||||||
## Callbacks
|
## 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)
|
[Wiring diagram provided by Adafruit](https://playground.arduino.cc/uploads/Learning/solenoid_driver.pdf)
|
||||||
|
|
||||||
|
|
||||||
| Settings | Default | Description |
|
| Settings | Default | Description |
|
||||||
|--------------------------|---------------|-------------------------------------------------------|
|
|----------------------------|----------------------|-------------------------------------------------------|
|
||||||
|`SOLENOID_PIN` | *Not defined* |Configures the pin that the Solenoid is connected to. |
|
|`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_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_MIN_DWELL` | `4` ms |Sets the lower limit for the dwell. |
|
||||||
|`SOLENOID_MAX_DWELL` | `100` ms |Sets the upper 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.
|
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
|
### 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.
|
Joystick buttons are normal Quantum keycodes, defined as `JS_BUTTON0` to `JS_BUTTON31`, depending on the number of buttons you have configured.
|
||||||
|
|||||||
@@ -0,0 +1,116 @@
|
|||||||
|
# LED Indicators
|
||||||
|
|
||||||
|
QMK provides methods to read 5 of the LEDs defined in the HID spec:
|
||||||
|
|
||||||
|
* Num Lock
|
||||||
|
* Caps Lock
|
||||||
|
* Scroll Lock
|
||||||
|
* Compose
|
||||||
|
* Kana
|
||||||
|
|
||||||
|
There are three ways to get the lock LED state:
|
||||||
|
* by specifying configuration options within `config.h`
|
||||||
|
* by implementing `bool led_update_kb(led_t led_state)` or `_user(led_t led_state)`; or
|
||||||
|
* by calling `led_t host_keyboard_led_state()`
|
||||||
|
|
||||||
|
!> `host_keyboard_led_state()` may already reflect a new value before `led_update_user()` is called.
|
||||||
|
|
||||||
|
Two more deprecated functions exist that provide the LED state as a `uint8_t`:
|
||||||
|
|
||||||
|
* `uint8_t led_set_kb(uint8_t usb_led)` and `_user(uint8_t usb_led)`
|
||||||
|
* `uint8_t host_keyboard_leds()`
|
||||||
|
|
||||||
|
## Configuration Options
|
||||||
|
|
||||||
|
To configure the indicators, `#define` these in your `config.h`:
|
||||||
|
|
||||||
|
|Define |Default |Description |
|
||||||
|
|---------------------|-------------|-------------------------------------------|
|
||||||
|
|`LED_NUM_LOCK_PIN` |*Not defined*|The pin that controls the `Num Lock` LED |
|
||||||
|
|`LED_CAPS_LOCK_PIN` |*Not defined*|The pin that controls the `Caps Lock` LED |
|
||||||
|
|`LED_SCROLL_LOCK_PIN`|*Not defined*|The pin that controls the `Scroll Lock` LED|
|
||||||
|
|`LED_COMPOSE_PIN` |*Not defined*|The pin that controls the `Compose` LED |
|
||||||
|
|`LED_KANA_PIN` |*Not defined*|The pin that controls the `Kana` LED |
|
||||||
|
|`LED_PIN_ON_STATE` |`1` |The state of the indicator pins when the LED is "on" - `1` for high, `0` for low|
|
||||||
|
|
||||||
|
Unless you are designing your own keyboard, you generally should not need to change the above config options.
|
||||||
|
|
||||||
|
## `led_update_*()`
|
||||||
|
|
||||||
|
When the configuration options do not provide enough flexibility, the API hooks provided allow custom control of the LED behavior. These functions will be called when the state of one of those 5 LEDs changes. It receives the LED state as a struct parameter.
|
||||||
|
|
||||||
|
By convention, return `true` from `led_update_user()` to get the `led_update_kb()` hook to run its code, and
|
||||||
|
return `false` when you would prefer not to run the code in `led_update_kb()`.
|
||||||
|
|
||||||
|
Some examples include:
|
||||||
|
|
||||||
|
- overriding the LEDs to use them for something else like layer indication
|
||||||
|
- return `false` because you do not want the `_kb()` function to run, as it would override your layer behavior.
|
||||||
|
- play a sound when an LED turns on or off.
|
||||||
|
- return `true` because you want the `_kb` function to run, and this is in addition to the default LED behavior.
|
||||||
|
|
||||||
|
?> Because the `led_set_*` functions return `void` instead of `bool`, they do not allow for overriding the keyboard LED control, and thus it's recommended to use `led_update_*` instead.
|
||||||
|
|
||||||
|
### Example `led_update_kb()` Implementation
|
||||||
|
|
||||||
|
```c
|
||||||
|
bool led_update_kb(led_t led_state) {
|
||||||
|
bool res = led_update_user(led_state);
|
||||||
|
if(res) {
|
||||||
|
// writePin sets the pin high for 1 and low for 0.
|
||||||
|
// In this example the pins are inverted, setting
|
||||||
|
// it low/0 turns it on, and high/1 turns the LED off.
|
||||||
|
// This behavior depends on whether the LED is between the pin
|
||||||
|
// and VCC or the pin and GND.
|
||||||
|
writePin(B0, !led_state.num_lock);
|
||||||
|
writePin(B1, !led_state.caps_lock);
|
||||||
|
writePin(B2, !led_state.scroll_lock);
|
||||||
|
writePin(B3, !led_state.compose);
|
||||||
|
writePin(B4, !led_state.kana);
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Example `led_update_user()` Implementation
|
||||||
|
|
||||||
|
This incomplete example would play a sound if Caps Lock is turned on or off. It returns `true`, because you also want the LEDs to maintain their state.
|
||||||
|
|
||||||
|
```c
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
float caps_on[][2] = SONG(CAPS_LOCK_ON_SOUND);
|
||||||
|
float caps_off[][2] = SONG(CAPS_LOCK_OFF_SOUND);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
bool led_update_user(led_t led_state) {
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
static uint8_t caps_state = 0;
|
||||||
|
if (caps_state != led_state.caps_lock) {
|
||||||
|
led_state.caps_lock ? PLAY_SONG(caps_on) : PLAY_SONG(caps_off);
|
||||||
|
caps_state = led_state.caps_lock;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### `led_update_*` Function Documentation
|
||||||
|
|
||||||
|
* Keyboard/Revision: `bool led_update_kb(led_t led_state)`
|
||||||
|
* Keymap: `bool led_update_user(led_t led_state)`
|
||||||
|
|
||||||
|
## `host_keyboard_led_state()`
|
||||||
|
|
||||||
|
Call this function to get the last received LED state as a `led_t`. This is useful for reading the LED state outside `led_update_*`, e.g. in [`matrix_scan_user()`](#matrix-scanning-code).
|
||||||
|
|
||||||
|
## Setting Physical LED State
|
||||||
|
|
||||||
|
Some keyboard implementations provide convenience methods for setting the state of the physical LEDs.
|
||||||
|
|
||||||
|
### Ergodox Boards
|
||||||
|
|
||||||
|
The Ergodox implementations provide `ergodox_right_led_1`/`2`/`3_on`/`off()` to turn individual LEDs on or off, as well as `ergodox_right_led_on`/`off(uint8_t led)` to turn them on or off by their index.
|
||||||
|
|
||||||
|
In addition, it is possible to specify the brightness level of all LEDs with `ergodox_led_all_set(uint8_t n)`; of individual LEDs with `ergodox_right_led_1`/`2`/`3_set(uint8_t n)`; or by index with `ergodox_right_led_set(uint8_t led, uint8_t n)`.
|
||||||
|
|
||||||
|
Ergodox boards also define `LED_BRIGHTNESS_LO` for the lowest brightness and `LED_BRIGHTNESS_HI` for the highest brightness (which is the default).
|
||||||
@@ -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`:
|
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`:
|
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`:
|
||||||
|
|
||||||
|
|||||||
@@ -140,3 +140,7 @@ To use constant speed mode, you must at least define `MK_COMBINED` in your keyma
|
|||||||
```c
|
```c
|
||||||
#define MK_COMBINED
|
#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_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_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_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
|
## 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`:
|
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
|
```makefile
|
||||||
RGB_MATRIX_ENABLE = IS31FL3731
|
RGB_MATRIX_ENABLE = yes
|
||||||
|
RGB_MATRIX_DRIVER = IS31FL3731
|
||||||
```
|
```
|
||||||
|
|
||||||
Configure the hardware via your `config.h`:
|
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`:
|
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
|
```makefile
|
||||||
RGB_MATRIX_ENABLE = IS31FL3733
|
RGB_MATRIX_ENABLE = yes
|
||||||
|
RGB_MATRIX_DRIVER = IS31FL3733
|
||||||
```
|
```
|
||||||
|
|
||||||
Configure the hardware via your `config.h`:
|
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`:
|
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
|
```makefile
|
||||||
RGB_MATRIX_ENABLE = WS2812
|
RGB_MATRIX_ENABLE = yes
|
||||||
|
RGB_MATRIX_DRIVER = WS2812
|
||||||
```
|
```
|
||||||
|
|
||||||
Configure the hardware via your `config.h`:
|
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
|
### 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.
|
To use the suspend feature, make sure that `#define RGB_DISABLE_WHEN_USB_SUSPENDED true` is added to the `config.h` file.
|
||||||
|
|
||||||
|
|||||||
@@ -41,6 +41,8 @@ Changing the **Hue** cycles around the circle.<br>
|
|||||||
Changing the **Saturation** moves between the inner and outer sections of the wheel, affecting the intensity of the color.<br>
|
Changing the **Saturation** moves between the inner and outer sections of the wheel, affecting the intensity of the color.<br>
|
||||||
Changing the **Value** sets the overall brightness.<br>
|
Changing the **Value** sets the overall brightness.<br>
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
## Keycodes
|
## Keycodes
|
||||||
|
|
||||||
|Key |Aliases |Description |
|
|Key |Aliases |Description |
|
||||||
|
|||||||
@@ -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`
|
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
|
## 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.
|
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.
|
||||||
|
|||||||
@@ -46,6 +46,7 @@
|
|||||||
'/unicode': '/feature_unicode',
|
'/unicode': '/feature_unicode',
|
||||||
'/python_development': '/cli_development',
|
'/python_development': '/cli_development',
|
||||||
'/getting_started_build_tools':'/newbs_getting_started',
|
'/getting_started_build_tools':'/newbs_getting_started',
|
||||||
|
'/tutorial':'/newbs',
|
||||||
},
|
},
|
||||||
basePath: '/',
|
basePath: '/',
|
||||||
name: 'QMK Firmware',
|
name: 'QMK Firmware',
|
||||||
|
|||||||
@@ -21,3 +21,22 @@ The following functions can provide basic control of GPIOs and are found in `qua
|
|||||||
## Advanced Settings :id=advanced-settings
|
## 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.
|
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.
|
||||||
@@ -15,7 +15,8 @@ RGB LED を使いたい場合は、代わりに [RGB マトリックスサブシ
|
|||||||
|
|
||||||
I2C IS31FL3731 RGB コントローラを使ったアドレス指定可能な LED マトリックスライトのための基本的なサポートがあります:有効にするには、`rules.mk` に以下を追加します:
|
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` に以下の項目を定義することができます:
|
1から4個の IS31FL3731 IC を使うことができます。キーボード上に存在しない IC の `LED_DRIVER_ADDR_<N>` 定義を指定しないでください。`config.h` に以下の項目を定義することができます:
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,33 @@
|
|||||||
|
# Quantum Mechanical Keyboard Firmware
|
||||||
|
|
||||||
|
[](https://github.com/qmk/qmk_firmware/tags)
|
||||||
|
[](https://travis-ci.org/qmk/qmk_firmware)
|
||||||
|
[](https://discord.gg/Uq7gcHh)
|
||||||
|
[](https://docs.qmk.fm)
|
||||||
|
[](https://github.com/qmk/qmk_firmware/pulse/monthly)
|
||||||
|
[](https://github.com/qmk/qmk_firmware/)
|
||||||
|
|
||||||
|
## QMK Firmware 란?
|
||||||
|
|
||||||
|
QMK(*Quantum Mechanical Keyboard 양자 기계식 키보드*)란 QMK 컴워어, QMK 툴박스, qmk.fm 를 관리하고 있는 오픈소스 커뮤니티 입니다. QMK펌웨어는 [tmk\_keyboard](http://github.com/tmk/tmk_keyboard)를 바탕으로 만들어진 키보드펌웨어이며, Atmel AVR컨트롤러와 [OLKB 제품군](http://olkb.com) [ErgoDox EZ](http://www.ergodox-ez.com), 그리고 [Clueboard 제품군](http://clueboard.co/) 이용할때 매우 편리합니다. 또한 QMK는 ChibiOS를 사용하여 ARM기반의 컨트롤러로도 사용할수 있습니다. 마지막으로 QMK는 커스텀회로와 핸드와이어드 키보드을 작동시키는데에도 사용가능합니다.
|
||||||
|
|
||||||
|
|
||||||
|
## 설치하기
|
||||||
|
|
||||||
|
만약 당신이 QMK에 키보드, 키맵, 또는 새로운 기능을 추가하고싶다면, 가장쉬운 방법은 Github를 통해 [저장소(REPO)를 추가하고]((https://github.com/qmk/qmk_firmware#fork-destination-box)) 로컬에서 변화 또는 수정하고, [PULL REQUEST](https://github.com/qmk/qmk_firmware/pulls)을 통해 업로드 할수 있습니다.
|
||||||
|
|
||||||
|
또다른 방법으로는, 직접 파일들 로컬로 다운로드 하거나([zip](https://github.com/qmk/qmk_firmware/zipball/master), [tar](https://github.com/qmk/qmk_firmware/tarball/master)), git (`[email protected]:qmk/qmk_firmware.git`), https (`https://github.com/qmk/qmk_firmware.git`)을 통해 클론을 만들수 있습니다.
|
||||||
|
|
||||||
|
## 컴파일
|
||||||
|
|
||||||
|
먼저 컴파일을 하기전 AVR 이나 ARM [개발환경](getting_started_build_tools.md)을 구축해야 합니다. 모든준비가 끝났다면 `make`를 다음과 같이 키보드와 키맵을 선택하여 컴파일 할 수 있습니다.
|
||||||
|
|
||||||
|
make planck/rev4:default
|
||||||
|
|
||||||
|
이 커맨드는 `rev4`버전의 `planck`를 `default`키맵으로 컴파일 할것입니다. 다만 모든 키보드는 파일, 수정본 또는 세부프로젝트를 가지고있지 않음으로 수정본 부분을 생략될수 있습니다.
|
||||||
|
|
||||||
|
make preonic:default
|
||||||
|
|
||||||
|
## 커스터마이징
|
||||||
|
|
||||||
|
QMK는 사용할 수 있는 매우 다양한 [기능](features.md)과 체계화된 [참고자료](http://docs.qmk.fm)들이 있습니다. 그중 대부분은 [키맵](keymap.md)을 수정하거나 [키코드](keycodes.md)를 변경하는데에 특화되어 있습니다.
|
||||||
@@ -0,0 +1,156 @@
|
|||||||
|
# 컴파일 도구 설치
|
||||||
|
|
||||||
|
이 페이지는 QMK 컴파일 환경을 설치하는 방법을 설명합니다. 이 페이지는 AVR 프로세서들(예를 들면 atmega32u4와 비슷한)을 위한 가이드를 제공합니다
|
||||||
|
|
||||||
|
<!-- FIXME: We should have ARM instructions somewhere. -->
|
||||||
|
|
||||||
|
|
||||||
|
**노트:** 만약 당신이 처음 시작한다면 [입문자를 위한 가이드](newbs.md)페이지를 확인하세요.
|
||||||
|
|
||||||
|
계속하기전에 당신의 서브모듈(외부라이브러리)이 최신인지 `make git-submodule`을 사용하여 확인하세요.
|
||||||
|
|
||||||
|
## 리눅스
|
||||||
|
|
||||||
|
당신이 항상 최신 파일을 가지고 있는지는 `sudo util/qmk_install.sh`을 이용하여 간단히 확인할 수 있습니다. 이 명령어는 당신이 필요한 모든 속성물(dependencies)를 설치할 것입니다. **이 명령어는 `apt-get upgrade`를 사용합니다**
|
||||||
|
|
||||||
|
또한 당신의 직접 필요한 것들을 설치할 수도 있습니다. 하지만 이 자료는 항상 최신의 자료을 가지고 있지 않습니다.
|
||||||
|
|
||||||
|
현재로써 필요한 것은 다음과 같습니다. 하지만 당신이 하는 작업에 따라 당신은 다음 패키지를 다 쓰지 않을 수도 있습니다. 또한 환경에 따라 모든 다음 패키지는 다른이름으로 존재하거나, 없을 수도 있습니다.
|
||||||
|
|
||||||
|
```
|
||||||
|
build-essential
|
||||||
|
gcc
|
||||||
|
unzip
|
||||||
|
wget
|
||||||
|
zip
|
||||||
|
gcc-avr
|
||||||
|
binutils-avr
|
||||||
|
avr-libc
|
||||||
|
dfu-programmer
|
||||||
|
dfu-util
|
||||||
|
gcc-arm-none-eabi
|
||||||
|
binutils-arm-none-eabi
|
||||||
|
libnewlib-arm-none-eabi
|
||||||
|
git
|
||||||
|
```
|
||||||
|
|
||||||
|
당신이 사용하는 패키지 매니져에서 이러한 방법으로 설치하십시요.
|
||||||
|
|
||||||
|
데비안 / 우분투 예시:
|
||||||
|
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install gcc unzip wget zip gcc-avr binutils-avr avr-libc dfu-programmer dfu-util gcc-arm-none-eabi binutils-arm-none-eabi libnewlib-arm-none-eabi
|
||||||
|
|
||||||
|
페도라 / 레드햇 예시:
|
||||||
|
|
||||||
|
sudo dnf install gcc unzip wget zip dfu-util dfu-programmer avr-gcc avr-libc binutils-avr32-linux-gnu arm-none-eabi-gcc-cs arm-none-eabi-binutils-cs arm-none-eabi-newlib
|
||||||
|
|
||||||
|
아치 / 맨자로(Manjaro) 예시:
|
||||||
|
|
||||||
|
pacman -S base-devel gcc unzip wget zip avr-gcc avr-binutils avr-libc dfu-util arm-none-eabi-gcc arm-none-eabi-binutils arm-none-eabi-newlib git dfu-programmer dfu-util
|
||||||
|
|
||||||
|
## 닉스 (NIX)
|
||||||
|
|
||||||
|
만약 당신이 [NixOS](https://nixos.org/)를 사용중이거나 NIX를 리눅스 또는 맥에서 사용중이라면 `nix-shell`를 root 디렉토리에서 사용하여 컴파일 환경의 구축할 수 있습니다.
|
||||||
|
|
||||||
|
기본적으로 다음 커맨드는 AVR과 ARM 컴파일러를 설치할것입니다. 만약 필요 없다면 `avr` 또는 `arm`을 인수에서 해제할 수 있습니다.
|
||||||
|
|
||||||
|
nix-shell --arg arm false
|
||||||
|
|
||||||
|
## 맥
|
||||||
|
당신이 홈브루([homebrew](http://brew.sh/))를 사용한다면, 다음을 입력하세요.
|
||||||
|
|
||||||
|
brew tap osx-cross/avr
|
||||||
|
brew tap PX4/homebrew-px4
|
||||||
|
brew update
|
||||||
|
brew install avr-gcc@7
|
||||||
|
brew link --force avr-gcc@7
|
||||||
|
brew install dfu-programmer
|
||||||
|
brew install dfu-util
|
||||||
|
brew install gcc-arm-none-eabi
|
||||||
|
brew install avrdude
|
||||||
|
|
||||||
|
이 방법을 가장 추천합니다. 만약 홈브루가 없다면 커맨드라인 환경에서 매우 편한 [Homebrew](http://brew.sh/)를 다운받는 것을 추천합니다. 참고로 `avr-gcc@7`를 설치하는 중 `make`과 `make install`는 대개 20분 넘게 걸리고 CPU 사용량이 높아집니다.
|
||||||
|
|
||||||
|
## msys2를 사용하는 윈도우 (추천)
|
||||||
|
윈도우 비스타 부터 최신버젼까지 가장추천되는 환경은 [msys2](http://www.msys2.org)를 이용하는 것입니다. (윈도우 7과 윈도우 10에서 모두 테스트되었음)
|
||||||
|
|
||||||
|
* 이 사이트에 있는 설명을 이용해 msys2를 설치하세요: http://www.msys2.org
|
||||||
|
* ``MSYS2 MingGW 64-bit`` 를 여세요
|
||||||
|
* QMK폴더로 이동하세요. c드라이브 루트에 있는경우:
|
||||||
|
* `$ cd /c/qmk_firmware`
|
||||||
|
* `util/qmk_install.sh`을 실행시키고 나오는데요 따라하세요
|
||||||
|
|
||||||
|
### 크리에이터 업데이트
|
||||||
|
만약 당신의 윈도우 10이 크리에이터 업데이트 버전 또는 더 높은 버전이라면 바로 컴파일과 프로그램 업로드(flashing)를 할 수 있습니다. 크리에이터 업데이트 전 버전이라면 컴파일만 가능합니다. 만약 당신이 잘 모르겠거나 업데이트된 버전이 아니라면 [이 링크](https://support.microsoft.com/en-us/instantanswers/d4efb316-79f0-1aa1-9ef3-dcada78f3fa0/get-the-windows-10-creators-update)를 확인해 보십시오.
|
||||||
|
|
||||||
|
### 리눅스용 윈도우 하위 시스템 사용 (Windows10 Subsystem for Linux)
|
||||||
|
크리에이터 업데이트에 추가로 만약 당신이 리눅스용 윈도우 하위 시스템이 필요하다면 이 링크에서 다운받으십시오: [설명](http://www.howtogeek.com/249966/how-to-install-and-use-the-linux-bash-shell-on-windows-10/)
|
||||||
|
|
||||||
|
만약 당신이 이미 리눅스용 윈도우 하위 시스템을 Anniversary업데이트를 통해 받았다면 이 링크에서 16.04LTS로 업데이트 하는것을 추천합니다. 왜냐하면 업데이트 없이는 일부키보드가 14.04LTS에 포함되있는 도구들로 컴파일되지 않을수 있기때문입니다 : [WSL 업데이트](https://betanews.com/2017/04/14/upgrade-windows-subsystem-for-linux/)
|
||||||
|
|
||||||
|
|
||||||
|
### Git
|
||||||
|
만약 당신이 이미 파일을 로컬로 복제하였다면 이 섹션을 무시하십시요.
|
||||||
|
|
||||||
|
당신은 파일을 기본적인 git을 사용하여 로컬로 복제해야 합니다. **주의, WSL Git을 사용하면 안됩니다** [Git](https://git-scm.com/download/win) 이 링크에서 git을 다운받고 설치하십시오.
|
||||||
|
그리고 [기본설정](https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup), 유저네임과 이메일을 설정하는 것은 만약 당신이 온라인에 기여할 계획이라면 매우 중요합니다.
|
||||||
|
|
||||||
|
Git의 설치가 완료되었다면 Git Bash커맨드을 열고 당신의 복제 QMK파일이 있는 위치로 이동하고 `git clone --recurse-submodules https://github.com/qmk/qmk_firmware`를 실행 시키십니오. 이 커맨드는 새로운 `qmk_firmware`폴더를 이미 존재하는 것의 하위 폴더설정으로 생성할 것입니다.
|
||||||
|
|
||||||
|
### 도구(Toolchain) 설정
|
||||||
|
기본적으로 도구설정은 리눅스용 윈도우 하위 시스템이 설치될때 자동으로 설정됩니다. 하지만 수동적으로 하고 싶다면 여기 설명이 있습니다. (If you want to do everything manually, there are no other instructions than the scripts themselves, but you can always open issues and ask for more information. )
|
||||||
|
|
||||||
|
1. "Bash On Ubuntu On Windows" 을 실행시키십시오.
|
||||||
|
2. 당신이 `qmk_firmware`를 복제한 위치로 가십시오. WSL(리눅스용 윈도우 하위 시스템 사용)에서 `/mnt/`로 시작되는 패스를 찾으십시오. 즉 당신은 다음과 같은 형식으로 입력해야 합니다. `cd /mnt/c/path/to/qmk_firmware` (Note that the paths start with `/mnt/`in the WSL, so you have to write for example `cd /mnt/c/path/to/qmk_firmware`.)
|
||||||
|
3. `util/wsl_install.sh`를 실행시키고 화면에 나오는 지시를 따르십니오.
|
||||||
|
4. Bash command window를 재실행 시키십시오.
|
||||||
|
5. 이로써 당신은 컴파일과 프로그램 업로드(flashing)을 위한 준비가 모두 끝났습니다.
|
||||||
|
|
||||||
|
### 중요한 참고사항
|
||||||
|
*`util/wsl_install.sh` 명령어를 다시 실행시켜 최신 업데이트를 다운받을 수 있습니다.
|
||||||
|
* QMK 폴더의 위치는 윈도우 파일시스템을 기반으로 해야 됩니다. WSL는 외부실행파일를 작동 시킬수 없기 때문이죠.
|
||||||
|
* WSL의 Git은 윈도우용 Git과 **호환되지 않습니다**
|
||||||
|
* 파일을 수정하는 것은 WSL안과 밖에서 모두 가능합니다 하지만 만약 .makefile 혹은 .sh를 수정한다면 유닉스 라인엔딩(Unix line endings)을 지원하는 에디터를 사용하는지 확인하십이오. 그렇지 않다면 컴파일이 되지않을 수도 있습니다.
|
||||||
|
|
||||||
|
## 윈두우 (비스타 혹은 더 최신) (비추천)
|
||||||
|
|
||||||
|
이 섹션은 윈도우 비스타 혹은 더 최신버젼을 위한 오래된 설명입니다. [MSYS2](#windows-with-msys2-recommended)를 사용하는 것을 더 추천합니다.
|
||||||
|
|
||||||
|
1. WinAVR을 설치하였다면 먼저 삭제하십시오.
|
||||||
|
2. [MHV AVR Tools](https://infernoembedded.com/sites/default/files/project/MHV_AVR_Tools_20131101.exe)을 설치하십시오. (Disable smatch, but **be sure to leave the option to add the tools to the PATH checked**)
|
||||||
|
3. 만약 당신이 Infinity을 기반으로 하는 키보드에 프로그램 업로드를(flashing) 할거라면 dfu-util을 설치해야 합니다, [Input Club](https://github.com/kiibohd/controller/wiki/Loading-DFU-Firmware) 를 참고 하십시오.
|
||||||
|
4. [MinGW](https://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download)를 설치하십시오. 설치중 윈도우화면에서 GUI 추가 설치 옵션을 해재하십니오. **기본 설치 위치를 바꾸지 마십시오.** 이 명령어는 기본위치를 기반으로 하고 있습니다.
|
||||||
|
5. 레파지토리를 복제하십시오. [이 링크로 압축파일을 받고 앞축해제 하십시오.](https://github.com/qmk/qmk_firmware/archive/master.zip) 윈도우 탐색기에서 다운받은 파일을 여십시오.
|
||||||
|
6. `\util` 폴더를 여십시오.
|
||||||
|
7. `1-setup-path-win` .bat파일을 더블클릭해서 실행시키시오. 유저 계정 설정 변경을 허용해야될 수도 있습니다. 스페이스바를 눌러 설치가 성공적으로 완료되었다는 메세지를 닫을 수 있습니다.
|
||||||
|
8. `2-setup-environment-win` .bat파일에 우클릭해서 '관리자 권한으로 실행'으로 실행시키십시오. 이 작업을 꽤 오래 걸릴 수도 있습니다. 또한 드라이버 설정을 승인해야 될 수도 있습니다. 하지만 이 모든것이 끝나면 당신의 시스템의 설정이 모두 끝났습니다.
|
||||||
|
|
||||||
|
만약 이 작업을 하는데에 문제가 있어 도움받고 싶다면 *Win_Check_Output.txt*을 생성하는 것이 도움이 될것입니다. 이 파일은 `Win_Check.bat`을 `\util`폴더에서 실행시켜 생성할 수 있습니다.
|
||||||
|
|
||||||
|
## 도커(Docker)
|
||||||
|
만약 위작업들이 당신에게 좀 어렵게 느껴졌다면 도커(Docker)가 당신을 위한 최선일 수도 있습니다(의역). [Docker CE](https://docs.docker.com/install/#supported-platforms)를 설치한뒤 아래 커맨드를 `qmk_firmware` 디랙토리에서 실행시켜 키보드 또는 키맵을 생성시킵니다.
|
||||||
|
```bash
|
||||||
|
util/docker_build.sh keyboard:keymap
|
||||||
|
# 예: util/docker_build.sh ergodox_ez:steno
|
||||||
|
```
|
||||||
|
이 커맨드는 원하는 키보드 또는 키맵을 컴파일하고 `.hex`또는 `.bin`파일을 프로그램 업로드를(flashing) 위해 QMK디랙토리에 생성할것입니다. 만약 `:keymap`이 생략된다면 `default`이 기본을로 사용됩니다. 참고로 여기서 사용되는 인수는 `make` 커맨드를 사용하여 컴파일할때와 동일합니다.
|
||||||
|
|
||||||
|
|
||||||
|
또한 스크립트를 그냥 아무 인수 없이도 사용가능합니다. 그렇게 된다면 프로그램은 하나씩 자동으로 인수입력을 요구 할것입니다. 어쩌면 이방법이 더 쉬울 수도 있습니다.
|
||||||
|
```bash
|
||||||
|
util/docker_build.sh
|
||||||
|
# 인수을 입력받습니다.(아무것도 쓰지 않고 놔두는면 기본값으로 설정됩니다)
|
||||||
|
```
|
||||||
|
|
||||||
|
다음과 같이 `target`를 사용하여 컴파일과 프로그램 업로드(flashing)을 동시에 할수도 있습니다.
|
||||||
|
```bash
|
||||||
|
util/docker_build.sh keyboard:keymap:target
|
||||||
|
# 예: util/docker_build.sh planck/rev6:default:dfu-util
|
||||||
|
```
|
||||||
|
만약 당시이 리눅스를 사용한다면 이 커맨드들은 추가 설정 없이 바로 작동할 것입니다. 하지만 위도우 또는 맥 환경에서는 [Docker Machine](http://gw.tnode.com/docker/docker-machine-with-usb-support-on-windows-macos/)를 사용하여야 이 커맨드들을 사용가능합니다. Docker Machine설정은 꽤 지루하고 짜증남으로 추천하지 않고 [QMK Toolbox](https://github.com/qmk/qmk_toolbox)를 사용하는 것을 추천합니다.
|
||||||
|
|
||||||
|
!> 윈도우에서 독커는 [Hyper-V](https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v)을 활성화 설정하여야 사용가능합니다. 즉, 도커는 Hyper-V를 지원하지 않는 윈도우 7, 윈도우 8, 그리고 **윈도우 10 홈**과 같은 윈도우 버전에서 사용할수 없다는 것을 의미합니다.
|
||||||
|
|
||||||
|
## Vagrant
|
||||||
|
만약 컴웨어를 사용하는데 문제가 있다면 Vagrant라는 이름의 툴을 사용해 볼 수 있습니다. 이 툴은 가상환경을 세팅해줌과 동시에 컴웨어를 사용하는데에 필요한 모든 설정을 해줄 것입니다. OLKB는 가상환경에 파일을 호스팅하지 않습니다. [Vagrant 가이드](getting_started_vagrant.md)에서 더 많은 정보를 확인할 수 있습니다.
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
# 도움 받기
|
||||||
|
|
||||||
|
QMK에서 도움을 받는 방법은 다양합니다.
|
||||||
|
|
||||||
|
**주의, 아래 링크들은 영어로 이루어져 있으며 영어 사용이 가능해야 편리하게 이용할 수 있습니다.**
|
||||||
|
|
||||||
|
## 디스코드 실시간 채팅
|
||||||
|
|
||||||
|
[QMK 디스코드 서버](https://discord.gg/Uq7gcHh)에서 QMK 개발자들과 실시간으로 대화를 나눌수있습니다. 이 디스코드에는 펌웨어, 툴박스, 하드웨어, 그리고 컨피겨레이터(configurator)에 관한 특별화된 채널이 운영되고 있습니다.
|
||||||
|
|
||||||
|
## OLKB 서브레딧
|
||||||
|
|
||||||
|
공식 QMK 포럼은 [reddit.com](https://reddit.com) 에 [/r/olkb](https://reddit.com/r/olkb)입니다.
|
||||||
|
|
||||||
|
## Github 이슈
|
||||||
|
|
||||||
|
[issue on GitHub](https://github.com/qmk/qmk_firmware/issues)에서 문제를 보고 할 수 있습니다. 이 링크는 문제가 오랜 시간을 필요로하거나 디버깅를 요구 할때 매우 유용합니다.
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
# QMK와 함께 Github를 사용하는 방법
|
||||||
|
|
||||||
|
Github can be a little tricky to those that aren't familiar with it - this guide will walk through each step of forking, cloning, and submitting a pull request with QMK.
|
||||||
|
|
||||||
|
Github는 자주 사용하는 사람이 아니면 좀 여려울수도 있습니다. 이 문서는 Github를 사용하는데 필요한 forking, cloning 그리고 submitting a pull request with QMK를 설명할 것입니다.
|
||||||
|
|
||||||
|
?> 이 가이드는 당신이 git커맨드를 사용하는데 익숙하고 git환경을 당신의 시스템이 설치하였다는 전제하에 작성되었습니다.
|
||||||
|
|
||||||
|
아래와 같이 [QMK Github 페이지](https://github.com/qmk/qmk_firmware)에서 당신은 "Fork"라고 쓰여있는 버튼을 볼 수 있습니다
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
만약 당신이 어느기관 소속이고, 무슨 계정을 사용할것인지 골라야 한다면 개인 계정을 사용하는 것을 추천합니다.
|
||||||
|
"Fork"가 성공적으로 끝났다면 아래 보이는 "Clone or Download"를 눌러야 합니다.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
"HTTPS"채크 했는지 확인하고 나와 있는 링크를 복사하세요.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
여기거 부터 커맨드라인을 사용합니다. 커맨드 라인에서 `git clone `을 치고 복사한 링크를 붙여넣은후 실행시키세요.
|
||||||
|
|
||||||
|
```
|
||||||
|
user@computer:~$ git clone https://github.com/whoeveryouare/qmk_firmware.git
|
||||||
|
Cloning into 'qmk_firmware'...
|
||||||
|
remote: Counting objects: 46625, done.
|
||||||
|
remote: Compressing objects: 100% (2/2), done.
|
||||||
|
remote: Total 46625 (delta 0), reused 0 (delta 0), pack-reused 46623
|
||||||
|
Receiving objects: 100% (46625/46625), 84.47 MiB | 3.14 MiB/s, done.
|
||||||
|
Resolving deltas: 100% (29362/29362), done.
|
||||||
|
Checking out files: 100% (2799/2799), done.
|
||||||
|
```
|
||||||
|
|
||||||
|
당신은 이제 모든파일이 로컬시스템이 추가 되었습니다 그리고 이제 키맵을 추가하거나 컴파일, 프로그램 업로드(flashing)를 할 수 있습니다.
|
||||||
|
모든 추가 변경을 만든 뒤에는 add, commit, and push를 사용하여 당신의 Folk에 추가 할 수 있습니다.
|
||||||
|
|
||||||
|
```
|
||||||
|
user@computer:~$ git add .
|
||||||
|
user@computer:~$ git commit -m "adding my keymap"
|
||||||
|
[master cccb1608] adding my keymap
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
create mode 100644 keyboards/planck/keymaps/mine/keymap.c
|
||||||
|
user@computer:~$ git push
|
||||||
|
Counting objects: 1, done.
|
||||||
|
Delta compression using up to 4 threads.
|
||||||
|
Compressing objects: 100% (1/1), done.
|
||||||
|
Writing objects: 100% (1/1), 1.64 KiB | 0 bytes/s, done.
|
||||||
|
Total 1 (delta 1), reused 0 (delta 0)
|
||||||
|
remote: Resolving deltas: 100% (1/1), completed with 1 local objects.
|
||||||
|
To https://github.com/whoeveryouare/qmk_firmware.git
|
||||||
|
+ 20043e64...7da94ac5 master -> master
|
||||||
|
```
|
||||||
|
|
||||||
|
이로써 당신이 만든 모든 변경들이 당신의 Github의 Folk에 추가 되었습니다. (`https://github.com/<whoeveryouare>/qmk_firmware`)에서 확인하고 "New Pull Request"를 눌러 변경사항을 QMK에 업로드할수 있습니다.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
이 버튼을 누르면 당신이 만든 모든 변경사항들이 보여질 것입니다. 만약 모든 변경사항이 맘에 든다면 "Create Pull Request"를 눌러 요청을 확정할수 있습니다.
|
||||||
|
|
||||||
|
**요청사항이 확정된다고 변경사항이 바로 적용되는 것은 아닙니다.**
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
요청을 한뒤 QMK개발자들은 댓글로 무엇이 변경되었는지 등을 물어 볼수있지만 끝에는 매인 디랙토리로 업로드 될것입니다.
|
||||||
|
|
||||||
|
**"Thanks for contributing to QMK :)"**
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
# The Complete Newbs Guide To QMK
|
# The QMK Tutorial
|
||||||
|
|
||||||
Your computer keyboard has a processor inside of it, similar to the one inside your computer. This processor runs software that is responsible for detecting button presses and informing the computer when keys are pressed. QMK Firmware fills the role of that software, detecting button presses and passing that information on to the host computer. When you build your custom keymap, you are creating an executable program for your keyboard.
|
Your computer keyboard has a processor inside of it, similar to the one inside your computer. This processor runs software that is responsible for detecting button presses and informing the computer when keys are pressed. QMK Firmware fills the role of that software, detecting button presses and passing that information on to the host computer. When you build your custom keymap, you are creating an executable program for your keyboard.
|
||||||
|
|
||||||
|
|||||||
@@ -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:
|
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`
|
* Debian / Ubuntu / Devuan: `sudo apt install -y git python3-pip`
|
||||||
* Fedora / Red Hat / CentOS: `sudo yum install git python3 python3-pip`
|
* Fedora / Red Hat / CentOS: `sudo yum -y install git python3-pip`
|
||||||
* Arch / Manjaro: `sudo pacman -S git python python-pip python-setuptools libffi`
|
* 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:
|
Install the global CLI to bootstrap your system:
|
||||||
|
|
||||||
|
|||||||
@@ -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 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.
|
!> 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.
|
||||||
|
|
||||||
|
|||||||
@@ -73,6 +73,7 @@ https://github.com/qmk/qmk_firmware/pulls?q=is%3Apr+is%3Aclosed+label%3Akeyboard
|
|||||||
- commented-out functions removed too
|
- commented-out functions removed too
|
||||||
- `matrix_init_board()` etc. migrated to `keyboard_pre_init_kb()`, see: [keyboard_pre_init*](https://docs.qmk.fm/#/custom_quantum_functions?id=keyboard_pre_init_-function-documentation)
|
- `matrix_init_board()` etc. migrated to `keyboard_pre_init_kb()`, see: [keyboard_pre_init*](https://docs.qmk.fm/#/custom_quantum_functions?id=keyboard_pre_init_-function-documentation)
|
||||||
- prefer `CUSTOM_MATRIX = lite` if custom matrix used, allows for standard debounce, see [custom matrix 'lite'](https://docs.qmk.fm/#/custom_matrix?id=lite)
|
- prefer `CUSTOM_MATRIX = lite` if custom matrix used, allows for standard debounce, see [custom matrix 'lite'](https://docs.qmk.fm/#/custom_matrix?id=lite)
|
||||||
|
- prefer LED indicator [Configuration Options](https://docs.qmk.fm/#/feature_led_indicators?id=configuration-options) to custom `led_update_*()` implementations where possible
|
||||||
- `keyboard.h`
|
- `keyboard.h`
|
||||||
- `#include "quantum.h"` appears at the top
|
- `#include "quantum.h"` appears at the top
|
||||||
- `LAYOUT` macros should use standard definitions if applicable
|
- `LAYOUT` macros should use standard definitions if applicable
|
||||||
|
|||||||
@@ -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 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?
|
## 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.
|
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
|
#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
|
### Bitbang
|
||||||
Default driver, the absence of configuration assumes this driver. To configure it, add this to your rules.mk:
|
Default driver, the absence of configuration assumes this driver. To configure it, add this to your rules.mk:
|
||||||
|
|
||||||
|
|||||||
+97
-42
@@ -20,50 +20,111 @@
|
|||||||
|
|
||||||
#ifdef SOFT_SERIAL_PIN
|
#ifdef SOFT_SERIAL_PIN
|
||||||
|
|
||||||
# ifdef __AVR_ATmega32U4__
|
# 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__))
|
||||||
// if using ATmega32U4 I2C, can not use PD0 and PD1 in soft serial.
|
# error serial.c is not supported for the currently selected MCU
|
||||||
# ifdef USE_AVR_I2C
|
# endif
|
||||||
# if SOFT_SERIAL_PIN == D0 || SOFT_SERIAL_PIN == D1
|
// if using ATmega32U4/2, AT90USBxxx I2C, can not use PD0 and PD1 in soft serial.
|
||||||
# error Using ATmega32U4 I2C, so can not use PD0, PD1
|
# if defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__) || defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__)
|
||||||
# endif
|
# if defined(USE_AVR_I2C) && (SOFT_SERIAL_PIN == D0 || SOFT_SERIAL_PIN == D1)
|
||||||
|
# error Using I2C, so can not use PD0, PD1
|
||||||
# endif
|
# 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))
|
// ATmegaxxU2 specific config
|
||||||
# define setPinOutput(pin) (DDRx_ADDRESS(pin) |= _BV((pin)&0xF))
|
# if defined(__AVR_ATmega16U2__) || defined(__AVR_ATmega32U2__)
|
||||||
# define writePinHigh(pin) (PORTx_ADDRESS(pin) |= _BV((pin)&0xF))
|
// PD4(INT5), PD6(INT6), PD7(INT7), PC7(INT4)
|
||||||
# define writePinLow(pin) (PORTx_ADDRESS(pin) &= ~_BV((pin)&0xF))
|
# if SOFT_SERIAL_PIN == D4
|
||||||
# define readPin(pin) ((bool)(PINx_ADDRESS(pin) & _BV((pin)&0xF)))
|
# 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
|
// ATmegaxxU4 specific config
|
||||||
# if SOFT_SERIAL_PIN == D0
|
# if defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__)
|
||||||
# define EIMSK_BIT _BV(INT0)
|
// PE6(INT6)
|
||||||
# define EICRx_BIT (~(_BV(ISC00) | _BV(ISC01)))
|
# if SOFT_SERIAL_PIN == E6
|
||||||
# define SERIAL_PIN_INTERRUPT INT0_vect
|
# define EIMSK_BIT _BV(INT6)
|
||||||
# elif SOFT_SERIAL_PIN == D1
|
# define EICRx_BIT (~(_BV(ISC60) | _BV(ISC61)))
|
||||||
# define EIMSK_BIT _BV(INT1)
|
# define SERIAL_PIN_INTERRUPT INT6_vect
|
||||||
# define EICRx_BIT (~(_BV(ISC10) | _BV(ISC11)))
|
# define EICRx EICRB
|
||||||
# define SERIAL_PIN_INTERRUPT INT1_vect
|
# endif
|
||||||
# elif SOFT_SERIAL_PIN == D2
|
# endif
|
||||||
# define EIMSK_BIT _BV(INT2)
|
|
||||||
# define EICRx_BIT (~(_BV(ISC20) | _BV(ISC21)))
|
// AT90USBxxx specific config
|
||||||
# define SERIAL_PIN_INTERRUPT INT2_vect
|
# if defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__)
|
||||||
# elif SOFT_SERIAL_PIN == D3
|
// PE4..PE7(INT4..INT7)
|
||||||
# define EIMSK_BIT _BV(INT3)
|
# if SOFT_SERIAL_PIN == E4
|
||||||
# define EICRx_BIT (~(_BV(ISC30) | _BV(ISC31)))
|
# define EIMSK_BIT _BV(INT4)
|
||||||
# define SERIAL_PIN_INTERRUPT INT3_vect
|
# define EICRx_BIT (~(_BV(ISC40) | _BV(ISC41)))
|
||||||
# endif
|
# 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
|
# elif SOFT_SERIAL_PIN == E6
|
||||||
# define EIMSK_BIT _BV(INT6)
|
# define EIMSK_BIT _BV(INT6)
|
||||||
# define EICRx_BIT (~(_BV(ISC60) | _BV(ISC61)))
|
# define EICRx_BIT (~(_BV(ISC60) | _BV(ISC61)))
|
||||||
# define SERIAL_PIN_INTERRUPT INT6_vect
|
# define SERIAL_PIN_INTERRUPT INT6_vect
|
||||||
# else
|
# define EICRx EICRB
|
||||||
# error invalid SOFT_SERIAL_PIN value
|
# 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
|
# endif
|
||||||
|
|
||||||
# else
|
|
||||||
# error serial.c now support ATmega32U4 only
|
|
||||||
# endif
|
# 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 ALWAYS_INLINE __attribute__((always_inline))
|
||||||
# define NO_INLINE __attribute__((noinline))
|
# define NO_INLINE __attribute__((noinline))
|
||||||
# define _delay_sub_us(x) __builtin_avr_delay_cycles(x)
|
# 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;
|
Transaction_table_size = (uint8_t)sstd_table_size;
|
||||||
serial_input_with_pullup();
|
serial_input_with_pullup();
|
||||||
|
|
||||||
// Enable INT0-INT3,INT6
|
// Enable INT0-INT7
|
||||||
EIMSK |= EIMSK_BIT;
|
EIMSK |= EIMSK_BIT;
|
||||||
# if SOFT_SERIAL_PIN == E6
|
EICRx &= EICRx_BIT;
|
||||||
// Trigger on falling edge of INT6
|
|
||||||
EICRB &= EICRx_BIT;
|
|
||||||
# else
|
|
||||||
// Trigger on falling edge of INT0-INT3
|
|
||||||
EICRA &= EICRx_BIT;
|
|
||||||
# endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Used by the sender to synchronize timing with the reciver.
|
// 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 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++) {
|
for (uint16_t i = 0; i < length; i++) {
|
||||||
status = spi_write(data[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 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++) {
|
for (uint16_t i = 0; i < length; i++) {
|
||||||
status = spi_read();
|
status = spi_read();
|
||||||
|
|
||||||
if (status > 0) {
|
if (status >= 0) {
|
||||||
data[i] = status;
|
data[i] = status;
|
||||||
|
} else {
|
||||||
|
return status;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return (status < 0) ? status : SPI_STATUS_SUCCESS;
|
return SPI_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
void spi_stop(void) {
|
void spi_stop(void) {
|
||||||
|
|||||||
@@ -58,18 +58,23 @@ static i2c_status_t chibios_to_qmk(const msg_t* status) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
__attribute__((weak)) void i2c_init(void) {
|
__attribute__((weak)) void i2c_init(void) {
|
||||||
// Try releasing special pins for a short time
|
static bool is_initialised = false;
|
||||||
palSetPadMode(I2C1_SCL_BANK, I2C1_SCL, PAL_MODE_INPUT);
|
if (!is_initialised) {
|
||||||
palSetPadMode(I2C1_SDA_BANK, I2C1_SDA, PAL_MODE_INPUT);
|
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)
|
#if defined(USE_GPIOV1)
|
||||||
palSetPadMode(I2C1_SCL_BANK, I2C1_SCL, I2C1_SCL_PAL_MODE);
|
palSetPadMode(I2C1_SCL_BANK, I2C1_SCL, I2C1_SCL_PAL_MODE);
|
||||||
palSetPadMode(I2C1_SDA_BANK, I2C1_SDA, I2C1_SDA_PAL_MODE);
|
palSetPadMode(I2C1_SDA_BANK, I2C1_SDA, I2C1_SDA_PAL_MODE);
|
||||||
#else
|
#else
|
||||||
palSetPadMode(I2C1_SCL_BANK, I2C1_SCL, PAL_MODE_ALTERNATE(I2C1_SCL_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);
|
palSetPadMode(I2C1_SDA_BANK, I2C1_SDA, PAL_MODE_ALTERNATE(I2C1_SDA_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN);
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
i2c_status_t i2c_start(uint8_t address) {
|
i2c_status_t i2c_start(uint8_t address) {
|
||||||
|
|||||||
@@ -22,21 +22,26 @@ static pin_t currentSlavePin = NO_PIN;
|
|||||||
static SPIConfig spiConfig = {false, NULL, 0, 0, 0, 0};
|
static SPIConfig spiConfig = {false, NULL, 0, 0, 0, 0};
|
||||||
|
|
||||||
__attribute__((weak)) void spi_init(void) {
|
__attribute__((weak)) void spi_init(void) {
|
||||||
// Try releasing special pins for a short time
|
static bool is_initialised = false;
|
||||||
palSetPadMode(PAL_PORT(SPI_SCK_PIN), PAL_PAD(SPI_SCK_PIN), PAL_MODE_INPUT);
|
if (!is_initialised) {
|
||||||
palSetPadMode(PAL_PORT(SPI_MOSI_PIN), PAL_PAD(SPI_MOSI_PIN), PAL_MODE_INPUT);
|
is_initialised = true;
|
||||||
palSetPadMode(PAL_PORT(SPI_MISO_PIN), PAL_PAD(SPI_MISO_PIN), PAL_MODE_INPUT);
|
|
||||||
|
|
||||||
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)
|
#if defined(USE_GPIOV1)
|
||||||
palSetPadMode(PAL_PORT(SPI_SCK_PIN), PAL_PAD(SPI_SCK_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_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_MISO_PIN), PAL_PAD(SPI_MISO_PIN), PAL_MODE_STM32_ALTERNATE_PUSHPULL);
|
||||||
#else
|
#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_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_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_MISO_PIN), PAL_PAD(SPI_MISO_PIN), PAL_MODE_ALTERNATE(SPI_MISO_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL | PAL_STM32_OSPEED_HIGHEST);
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool spi_start(pin_t slavePin, bool lsbFirst, uint8_t mode, uint16_t divisor) {
|
bool spi_start(pin_t slavePin, bool lsbFirst, uint8_t mode, uint16_t divisor) {
|
||||||
|
|||||||
@@ -89,9 +89,16 @@ void ws2812_setleds(LED_TYPE *ledarray, uint16_t leds) {
|
|||||||
|
|
||||||
for (uint8_t i = 0; i < leds; i++) {
|
for (uint8_t i = 0; i < leds; i++) {
|
||||||
// WS2812 protocol dictates grb order
|
// WS2812 protocol dictates grb order
|
||||||
|
#if (WS2812_BYTE_ORDER == WS2812_BYTE_ORDER_GRB)
|
||||||
sendByte(ledarray[i].g);
|
sendByte(ledarray[i].g);
|
||||||
sendByte(ledarray[i].r);
|
sendByte(ledarray[i].r);
|
||||||
sendByte(ledarray[i].b);
|
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
|
#ifdef RGBW
|
||||||
sendByte(ledarray[i].w);
|
sendByte(ledarray[i].w);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -107,6 +107,7 @@
|
|||||||
*/
|
*/
|
||||||
#define WS2812_BIT(led, byte, bit) (24 * (led) + 8 * (byte) + (7 - (bit)))
|
#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
|
* @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
|
* @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
|
* @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
|
* @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
|
* @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
|
* @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 ---------------------------------------------------- */
|
/* --- 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) {
|
static void set_led_color_rgb(LED_TYPE color, int pos) {
|
||||||
uint8_t* tx_start = &txbuf[PREAMBLE_SIZE];
|
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 + 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 + 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);
|
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) {
|
void ws2812_init(void) {
|
||||||
|
|||||||
@@ -42,14 +42,6 @@
|
|||||||
# include "debug.h"
|
# include "debug.h"
|
||||||
#endif // DEBUG_EEPROM_OUTPUT
|
#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) {
|
static inline void fill_target_address(uint8_t *buffer, const void *addr) {
|
||||||
uintptr_t p = (uintptr_t)addr;
|
uintptr_t p = (uintptr_t)addr;
|
||||||
for (int i = 0; i < EXTERNAL_EEPROM_ADDRESS_SIZE; ++i) {
|
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) {
|
void eeprom_driver_erase(void) {
|
||||||
#if defined(CONSOLE_ENABLE) && defined(DEBUG_EEPROM_OUTPUT)
|
#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];
|
uint8_t complete_packet[EXTERNAL_EEPROM_ADDRESS_SIZE];
|
||||||
fill_target_address(complete_packet, addr);
|
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_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);
|
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;
|
uint8_t * read_buf = (uint8_t *)buf;
|
||||||
uintptr_t target_addr = (uintptr_t)addr;
|
uintptr_t target_addr = (uintptr_t)addr;
|
||||||
|
|
||||||
init_i2c_if_required();
|
|
||||||
while (len > 0) {
|
while (len > 0) {
|
||||||
uintptr_t page_offset = target_addr % EXTERNAL_EEPROM_PAGE_SIZE;
|
uintptr_t page_offset = target_addr % EXTERNAL_EEPROM_PAGE_SIZE;
|
||||||
int write_length = EXTERNAL_EEPROM_PAGE_SIZE - page_offset;
|
int write_length = EXTERNAL_EEPROM_PAGE_SIZE - page_offset;
|
||||||
|
|||||||
@@ -55,14 +55,6 @@
|
|||||||
# include "debug.h"
|
# include "debug.h"
|
||||||
#endif // CONSOLE_ENABLE
|
#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 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) {
|
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) {
|
void eeprom_driver_erase(void) {
|
||||||
#if defined(CONSOLE_ENABLE) && defined(DEBUG_EEPROM_OUTPUT)
|
#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) {
|
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
|
// Wait for the write-in-progress bit to be cleared
|
||||||
bool res = spi_eeprom_start();
|
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) {
|
void eeprom_write_block(const void *buf, void *addr, size_t len) {
|
||||||
init_spi_if_required();
|
|
||||||
|
|
||||||
bool res;
|
bool res;
|
||||||
uint8_t * read_buf = (uint8_t *)buf;
|
uint8_t * read_buf = (uint8_t *)buf;
|
||||||
uintptr_t target_addr = (uintptr_t)addr;
|
uintptr_t target_addr = (uintptr_t)addr;
|
||||||
|
|||||||
+39
-14
@@ -33,11 +33,18 @@ void haptic_init(void) {
|
|||||||
eeconfig_init();
|
eeconfig_init();
|
||||||
}
|
}
|
||||||
haptic_config.raw = eeconfig_read_haptic();
|
haptic_config.raw = eeconfig_read_haptic();
|
||||||
if (haptic_config.mode < 1) {
|
#ifdef SOLENOID_ENABLE
|
||||||
haptic_config.mode = 1;
|
solenoid_set_dwell(haptic_config.dwell);
|
||||||
}
|
#endif
|
||||||
if (!haptic_config.mode) {
|
if ((haptic_config.raw == 0)
|
||||||
dprintf("No haptic config found in eeprom, setting default configs\n");
|
#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();
|
haptic_reset();
|
||||||
}
|
}
|
||||||
#ifdef SOLENOID_ENABLE
|
#ifdef SOLENOID_ENABLE
|
||||||
@@ -118,25 +125,37 @@ void haptic_mode_decrease(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void haptic_dwell_increase(void) {
|
void haptic_dwell_increase(void) {
|
||||||
uint8_t dwell = haptic_config.dwell + 1;
|
|
||||||
#ifdef SOLENOID_ENABLE
|
#ifdef SOLENOID_ENABLE
|
||||||
|
int16_t next_dwell = ((int16_t)haptic_config.dwell) + SOLENOID_DWELL_STEP_SIZE;
|
||||||
if (haptic_config.dwell >= SOLENOID_MAX_DWELL) {
|
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
|
#endif
|
||||||
haptic_set_dwell(dwell);
|
haptic_set_dwell(next_dwell);
|
||||||
}
|
}
|
||||||
|
|
||||||
void haptic_dwell_decrease(void) {
|
void haptic_dwell_decrease(void) {
|
||||||
uint8_t dwell = haptic_config.dwell - 1;
|
|
||||||
#ifdef SOLENOID_ENABLE
|
#ifdef SOLENOID_ENABLE
|
||||||
if (haptic_config.dwell < SOLENOID_MIN_DWELL) {
|
int16_t next_dwell = ((int16_t)haptic_config.dwell) - SOLENOID_DWELL_STEP_SIZE;
|
||||||
dwell = SOLENOID_MAX_DWELL;
|
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
|
#endif
|
||||||
haptic_set_dwell(dwell);
|
haptic_set_dwell(next_dwell);
|
||||||
}
|
}
|
||||||
|
|
||||||
void haptic_reset(void) {
|
void haptic_reset(void) {
|
||||||
@@ -150,6 +169,12 @@ void haptic_reset(void) {
|
|||||||
#ifdef SOLENOID_ENABLE
|
#ifdef SOLENOID_ENABLE
|
||||||
uint8_t dwell = SOLENOID_DEFAULT_DWELL;
|
uint8_t dwell = SOLENOID_DEFAULT_DWELL;
|
||||||
haptic_config.dwell = 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
|
#endif
|
||||||
eeconfig_update_haptic(haptic_config.raw);
|
eeconfig_update_haptic(haptic_config.raw);
|
||||||
xprintf("haptic_config.feedback = %u\n", haptic_config.feedback);
|
xprintf("haptic_config.feedback = %u\n", haptic_config.feedback);
|
||||||
|
|||||||
@@ -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_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_set_dwell(uint8_t dwell) { solenoid_dwell = dwell; }
|
||||||
|
|
||||||
void solenoid_stop(void) {
|
void solenoid_stop(void) {
|
||||||
@@ -73,7 +65,7 @@ void solenoid_check(void) {
|
|||||||
|
|
||||||
// Check whether to buzz the solenoid on and off
|
// Check whether to buzz the solenoid on and off
|
||||||
if (haptic_config.buzz) {
|
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) {
|
if (!solenoid_buzzing) {
|
||||||
solenoid_buzzing = true;
|
solenoid_buzzing = true;
|
||||||
writePinHigh(SOLENOID_PIN);
|
writePinHigh(SOLENOID_PIN);
|
||||||
|
|||||||
@@ -29,6 +29,22 @@
|
|||||||
# define SOLENOID_MIN_DWELL 4
|
# define SOLENOID_MIN_DWELL 4
|
||||||
#endif
|
#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
|
#ifndef SOLENOID_PIN
|
||||||
# error SOLENOID_PIN not defined
|
# error SOLENOID_PIN not defined
|
||||||
#endif
|
#endif
|
||||||
@@ -37,8 +53,6 @@ void solenoid_buzz_on(void);
|
|||||||
void solenoid_buzz_off(void);
|
void solenoid_buzz_off(void);
|
||||||
void solenoid_set_buzz(int buzz);
|
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_set_dwell(uint8_t dwell);
|
||||||
|
|
||||||
void solenoid_stop(void);
|
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
|
// buffers and the transfers in IS31FL3731_write_pwm_buffer() but it's
|
||||||
// probably not worth the extra complexity.
|
// probably not worth the extra complexity.
|
||||||
uint8_t g_pwm_buffer[LED_DRIVER_COUNT][144];
|
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... */
|
/* There's probably a better way to init this... */
|
||||||
#if LED_DRIVER_COUNT == 1
|
#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
|
#elif LED_DRIVER_COUNT == 4
|
||||||
uint8_t g_led_control_registers[LED_DRIVER_COUNT][18] = {{0}, {0}, {0}, {0}};
|
uint8_t g_led_control_registers[LED_DRIVER_COUNT][18] = {{0}, {0}, {0}, {0}};
|
||||||
#endif
|
#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
|
// This is the bit pattern in the LED control registers
|
||||||
// (for matrix A, add one to register for matrix B)
|
// (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];
|
is31_led led = g_is31_leds[index];
|
||||||
|
|
||||||
// Subtract 0x24 to get the second index of g_pwm_buffer
|
// Subtract 0x24 to get the second index of g_pwm_buffer
|
||||||
g_pwm_buffer[led.driver][led.v - 0x24] = value;
|
g_pwm_buffer[led.driver][led.v - 0x24] = value;
|
||||||
g_pwm_buffer_update_required = true;
|
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[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) {
|
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]);
|
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) {
|
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++) {
|
for (int i = 0; i < 18; i++) {
|
||||||
IS31FL3731_write_register(addr, i, g_led_control_registers[index][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
|
#if OLED_SCROLL_TIMEOUT > 0
|
||||||
uint32_t oled_scroll_timeout;
|
uint32_t oled_scroll_timeout;
|
||||||
#endif
|
#endif
|
||||||
|
#if OLED_UPDATE_INTERVAL > 0
|
||||||
|
uint16_t oled_update_timeout;
|
||||||
|
#endif
|
||||||
|
|
||||||
// Internal variables to reduce math instructions
|
// 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) {
|
void oled_render(void) {
|
||||||
|
if (!oled_initialized) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Do we have work to do?
|
// Do we have work to do?
|
||||||
oled_dirty &= OLED_ALL_BLOCKS_MASK;
|
oled_dirty &= OLED_ALL_BLOCKS_MASK;
|
||||||
if (!oled_dirty || oled_scrolling) {
|
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) {
|
void oled_write_raw(const char *data, uint16_t size) {
|
||||||
if (size > OLED_MATRIX_SIZE) size = OLED_MATRIX_SIZE;
|
uint16_t cursor_start_index = oled_cursor - &oled_buffer[0];
|
||||||
for (uint16_t i = 0; i < size; i++) {
|
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;
|
if (oled_buffer[i] == data[i]) continue;
|
||||||
oled_buffer[i] = data[i];
|
oled_buffer[i] = data[i];
|
||||||
oled_dirty |= ((OLED_BLOCK_TYPE)1 << (i / OLED_BLOCK_SIZE));
|
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) {
|
void oled_write_raw_P(const char *data, uint16_t size) {
|
||||||
if (size > OLED_MATRIX_SIZE) size = OLED_MATRIX_SIZE;
|
uint16_t cursor_start_index = oled_cursor - &oled_buffer[0];
|
||||||
for (uint16_t i = 0; i < size; i++) {
|
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++);
|
uint8_t c = pgm_read_byte(data++);
|
||||||
if (oled_buffer[i] == c) continue;
|
if (oled_buffer[i] == c) continue;
|
||||||
oled_buffer[i] = c;
|
oled_buffer[i] = c;
|
||||||
@@ -522,6 +531,10 @@ void oled_write_raw_P(const char *data, uint16_t size) {
|
|||||||
#endif // defined(__AVR__)
|
#endif // defined(__AVR__)
|
||||||
|
|
||||||
bool oled_on(void) {
|
bool oled_on(void) {
|
||||||
|
if (!oled_initialized) {
|
||||||
|
return oled_active;
|
||||||
|
}
|
||||||
|
|
||||||
#if OLED_TIMEOUT > 0
|
#if OLED_TIMEOUT > 0
|
||||||
oled_timeout = timer_read32() + OLED_TIMEOUT;
|
oled_timeout = timer_read32() + OLED_TIMEOUT;
|
||||||
#endif
|
#endif
|
||||||
@@ -538,6 +551,10 @@ bool oled_on(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool oled_off(void) {
|
bool oled_off(void) {
|
||||||
|
if (!oled_initialized) {
|
||||||
|
return !oled_active;
|
||||||
|
}
|
||||||
|
|
||||||
static const uint8_t PROGMEM display_off[] = {I2C_CMD, DISPLAY_OFF};
|
static const uint8_t PROGMEM display_off[] = {I2C_CMD, DISPLAY_OFF};
|
||||||
if (oled_active) {
|
if (oled_active) {
|
||||||
if (I2C_TRANSMIT_P(display_off) != I2C_STATUS_SUCCESS) {
|
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; }
|
bool is_oled_on(void) { return oled_active; }
|
||||||
|
|
||||||
uint8_t oled_set_brightness(uint8_t level) {
|
uint8_t oled_set_brightness(uint8_t level) {
|
||||||
|
if (!oled_initialized) {
|
||||||
|
return oled_brightness;
|
||||||
|
}
|
||||||
|
|
||||||
uint8_t set_contrast[] = {I2C_CMD, CONTRAST, level};
|
uint8_t set_contrast[] = {I2C_CMD, CONTRAST, level};
|
||||||
if (oled_brightness != level) {
|
if (oled_brightness != level) {
|
||||||
if (I2C_TRANSMIT(set_contrast) != I2C_STATUS_SUCCESS) {
|
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) {
|
bool oled_scroll_right(void) {
|
||||||
|
if (!oled_initialized) {
|
||||||
|
return oled_scrolling;
|
||||||
|
}
|
||||||
|
|
||||||
// Dont enable scrolling if we need to update the display
|
// Dont enable scrolling if we need to update the display
|
||||||
// This prevents scrolling of bad data from starting the scroll too early after init
|
// This prevents scrolling of bad data from starting the scroll too early after init
|
||||||
if (!oled_dirty && !oled_scrolling) {
|
if (!oled_dirty && !oled_scrolling) {
|
||||||
@@ -605,6 +630,10 @@ bool oled_scroll_right(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool oled_scroll_left(void) {
|
bool oled_scroll_left(void) {
|
||||||
|
if (!oled_initialized) {
|
||||||
|
return oled_scrolling;
|
||||||
|
}
|
||||||
|
|
||||||
// Dont enable scrolling if we need to update the display
|
// Dont enable scrolling if we need to update the display
|
||||||
// This prevents scrolling of bad data from starting the scroll too early after init
|
// This prevents scrolling of bad data from starting the scroll too early after init
|
||||||
if (!oled_dirty && !oled_scrolling) {
|
if (!oled_dirty && !oled_scrolling) {
|
||||||
@@ -619,6 +648,10 @@ bool oled_scroll_left(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool oled_scroll_off(void) {
|
bool oled_scroll_off(void) {
|
||||||
|
if (!oled_initialized) {
|
||||||
|
return !oled_scrolling;
|
||||||
|
}
|
||||||
|
|
||||||
if (oled_scrolling) {
|
if (oled_scrolling) {
|
||||||
static const uint8_t PROGMEM display_scroll_off[] = {I2C_CMD, DEACTIVATE_SCROLL};
|
static const uint8_t PROGMEM display_scroll_off[] = {I2C_CMD, DEACTIVATE_SCROLL};
|
||||||
if (I2C_TRANSMIT_P(display_scroll_off) != I2C_STATUS_SUCCESS) {
|
if (I2C_TRANSMIT_P(display_scroll_off) != I2C_STATUS_SUCCESS) {
|
||||||
@@ -650,9 +683,16 @@ void oled_task(void) {
|
|||||||
return;
|
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_set_cursor(0, 0);
|
||||||
|
|
||||||
oled_task_user();
|
oled_task_user();
|
||||||
|
#endif
|
||||||
|
|
||||||
#if OLED_SCROLL_TIMEOUT > 0
|
#if OLED_SCROLL_TIMEOUT > 0
|
||||||
if (oled_dirty && oled_scrolling) {
|
if (oled_dirty && oled_scrolling) {
|
||||||
|
|||||||
@@ -8,8 +8,9 @@
|
|||||||
#ifndef _GDISP_LLD_BOARD_H
|
#ifndef _GDISP_LLD_BOARD_H
|
||||||
#define _GDISP_LLD_BOARD_H
|
#define _GDISP_LLD_BOARD_H
|
||||||
|
|
||||||
#define ST7565_LCD_BIAS ST7565_LCD_BIAS_9 // actually 6
|
#include "quantum.h"
|
||||||
#define ST7565_ADC ST7565_ADC_NORMAL
|
|
||||||
|
#define ST7565_LCD_BIAS ST7565_LCD_BIAS_7
|
||||||
#define ST7565_COM_SCAN ST7565_COM_SCAN_DEC
|
#define ST7565_COM_SCAN ST7565_COM_SCAN_DEC
|
||||||
#define ST7565_PAGE_ORDER 0, 1, 2, 3
|
#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_PAGE_ORDER 4,5,6,7,0,1,2,3
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define ST7565_GPIOPORT GPIOC
|
#define ST7565_A0_PIN C7
|
||||||
#define ST7565_PORT PORTC
|
#define ST7565_RST_PIN C8
|
||||||
#define ST7565_A0_PIN 7
|
#define ST7565_MOSI_PIN C6
|
||||||
#define ST7565_RST_PIN 8
|
#define ST7565_SCLK_PIN C5
|
||||||
#define ST7565_MOSI_PIN 6
|
#define ST7565_SS_PIN C4
|
||||||
#define ST7565_SLCK_PIN 5
|
|
||||||
#define ST7565_SS_PIN 4
|
|
||||||
|
|
||||||
#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
|
// DSPI Clock and Transfer Attributes
|
||||||
// Frame Size: 8 bits
|
// Frame Size: 8 bits
|
||||||
// MSB First
|
// MSB First
|
||||||
@@ -38,9 +32,9 @@ static const SPIConfig spi1config = {
|
|||||||
// Operation complete callback or @p NULL.
|
// Operation complete callback or @p NULL.
|
||||||
.end_cb = NULL,
|
.end_cb = NULL,
|
||||||
// The chip select line port - when not using pcs.
|
// 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.
|
// brief The chip select line pad number - when not using pcs.
|
||||||
.sspad = ST7565_SS_PIN,
|
.sspad = PAL_PAD(ST7565_SS_PIN),
|
||||||
// SPI initialization data.
|
// SPI initialization data.
|
||||||
.tar0 = SPIx_CTARn_FMSZ(7) // Frame size = 8 bytes
|
.tar0 = SPIx_CTARn_FMSZ(7) // Frame size = 8 bytes
|
||||||
| SPIx_CTARn_ASC(1) // After SCK Delay Scaler (min 50 ns) = 55.56ns
|
| 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) {
|
static GFXINLINE void init_board(GDisplay *g) {
|
||||||
(void)g;
|
(void)g;
|
||||||
palSetPadModeNamed(A0, PAL_MODE_OUTPUT_PUSHPULL);
|
setPinOutput(ST7565_A0_PIN);
|
||||||
palSetPad(ST7565_GPIOPORT, ST7565_A0_PIN);
|
writePinHigh(ST7565_A0_PIN);
|
||||||
palSetPadModeNamed(RST, PAL_MODE_OUTPUT_PUSHPULL);
|
setPinOutput(ST7565_RST_PIN);
|
||||||
palSetPad(ST7565_GPIOPORT, ST7565_RST_PIN);
|
writePinHigh(ST7565_RST_PIN);
|
||||||
palSetPadModeRaw(MOSI, ST7565_SPI_MODE);
|
setPinOutput(ST7565_SS_PIN);
|
||||||
palSetPadModeRaw(SLCK, ST7565_SPI_MODE);
|
|
||||||
palSetPadModeNamed(SS, PAL_MODE_OUTPUT_PUSHPULL);
|
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();
|
spiInit();
|
||||||
spiStart(&SPID1, &spi1config);
|
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) {
|
static GFXINLINE void setpin_reset(GDisplay *g, bool_t state) {
|
||||||
(void)g;
|
(void)g;
|
||||||
if (state) {
|
writePin(ST7565_RST_PIN, !state);
|
||||||
palClearPad(ST7565_GPIOPORT, ST7565_RST_PIN);
|
|
||||||
} else {
|
|
||||||
palSetPad(ST7565_GPIOPORT, ST7565_RST_PIN);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static GFXINLINE void enter_data_mode(GDisplay *g) { palSetPad(ST7565_GPIOPORT, ST7565_A0_PIN); }
|
static GFXINLINE void write_cmd(GDisplay *g, gU8 cmd) {
|
||||||
|
|
||||||
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) {
|
|
||||||
(void)g;
|
(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);
|
spiSend(&SPID1, length, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
GFXINC += drivers/ugfx/gdisp/st7565
|
GFXINC += drivers/ugfx/gdisp/st7565
|
||||||
GFXSRC += drivers/ugfx/gdisp/st7565/gdisp_lld_ST7565.c
|
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
|
# define ST7565_COM_SCAN ST7565_COM_SCAN_INC
|
||||||
# endif
|
# endif
|
||||||
# ifndef ST7565_PAGE_ORDER
|
# 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
|
# endif
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* Driver local functions. */
|
/* 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
|
// Some common routines and macros
|
||||||
# define PRIV(g) ((PrivData *)g->priv)
|
# define RAM(g) ((gU8 *)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 write_cmd2(g, cmd1, cmd2) \
|
# define write_cmd2(g, cmd1, cmd2) \
|
||||||
{ \
|
{ \
|
||||||
write_cmd(g, cmd1); \
|
write_cmd(g, cmd1); \
|
||||||
@@ -106,9 +90,10 @@ static GFXINLINE void flush_cmd(GDisplay *g) {
|
|||||||
|
|
||||||
LLDSPEC bool_t gdisp_lld_init(GDisplay *g) {
|
LLDSPEC bool_t gdisp_lld_init(GDisplay *g) {
|
||||||
// The private area is the display surface.
|
// The private area is the display surface.
|
||||||
g->priv = gfxAlloc(sizeof(PrivData));
|
g->priv = gfxAlloc(GDISP_SCREEN_HEIGHT * GDISP_SCREEN_WIDTH / 8);
|
||||||
PRIV(g)->buffer2 = false;
|
if (!g->priv) {
|
||||||
PRIV(g)->data_pos = 0;
|
return gFalse;
|
||||||
|
}
|
||||||
|
|
||||||
// Initialise the board interface
|
// Initialise the board interface
|
||||||
init_board(g);
|
init_board(g);
|
||||||
@@ -119,25 +104,33 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) {
|
|||||||
setpin_reset(g, FALSE);
|
setpin_reset(g, FALSE);
|
||||||
gfxSleepMilliseconds(20);
|
gfxSleepMilliseconds(20);
|
||||||
acquire_bus(g);
|
acquire_bus(g);
|
||||||
enter_cmd_mode(g);
|
|
||||||
|
|
||||||
write_cmd(g, ST7565_RESET);
|
|
||||||
write_cmd(g, ST7565_LCD_BIAS);
|
write_cmd(g, ST7565_LCD_BIAS);
|
||||||
write_cmd(g, ST7565_ADC);
|
write_cmd(g, ST7565_ADC);
|
||||||
write_cmd(g, ST7565_COM_SCAN);
|
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_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);
|
write_cmd(g, ST7565_RMW);
|
||||||
flush_cmd(g);
|
|
||||||
|
|
||||||
// Finish Init
|
// Finish Init
|
||||||
post_init_board(g);
|
post_init_board(g);
|
||||||
@@ -163,22 +156,14 @@ LLDSPEC void gdisp_lld_flush(GDisplay *g) {
|
|||||||
if (!(g->flags & GDISP_FLG_NEEDFLUSH)) return;
|
if (!(g->flags & GDISP_FLG_NEEDFLUSH)) return;
|
||||||
|
|
||||||
acquire_bus(g);
|
acquire_bus(g);
|
||||||
enter_cmd_mode(g);
|
gU8 pagemap[] = {ST7565_PAGE_ORDER};
|
||||||
unsigned dstOffset = (PRIV(g)->buffer2 ? 4 : 0);
|
for (p = 0; p < sizeof(pagemap); p++) {
|
||||||
for (p = 0; p < 4; p++) {
|
write_cmd(g, ST7565_PAGE | pagemap[p]);
|
||||||
write_cmd(g, ST7565_PAGE | (p + dstOffset));
|
|
||||||
write_cmd(g, ST7565_COLUMN_MSB | 0);
|
write_cmd(g, ST7565_COLUMN_MSB | 0);
|
||||||
write_cmd(g, ST7565_COLUMN_LSB | 0);
|
write_cmd(g, ST7565_COLUMN_LSB | 0);
|
||||||
write_cmd(g, ST7565_RMW);
|
write_cmd(g, ST7565_RMW);
|
||||||
flush_cmd(g);
|
|
||||||
enter_data_mode(g);
|
|
||||||
write_data(g, RAM(g) + (p * GDISP_SCREEN_WIDTH), GDISP_SCREEN_WIDTH);
|
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);
|
release_bus(g);
|
||||||
|
|
||||||
g->flags &= ~GDISP_FLG_NEEDFLUSH;
|
g->flags &= ~GDISP_FLG_NEEDFLUSH;
|
||||||
@@ -243,6 +228,7 @@ LLDSPEC color_t gdisp_lld_get_pixel_color(GDisplay *g) {
|
|||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
# if GDISP_HARDWARE_BITFILLS
|
||||||
LLDSPEC void gdisp_lld_blit_area(GDisplay *g) {
|
LLDSPEC void gdisp_lld_blit_area(GDisplay *g) {
|
||||||
uint8_t *buffer = (uint8_t *)g->p.ptr;
|
uint8_t *buffer = (uint8_t *)g->p.ptr;
|
||||||
int linelength = g->p.cx;
|
int linelength = g->p.cx;
|
||||||
@@ -268,6 +254,7 @@ LLDSPEC void gdisp_lld_blit_area(GDisplay *g) {
|
|||||||
}
|
}
|
||||||
g->flags |= GDISP_FLG_NEEDFLUSH;
|
g->flags |= GDISP_FLG_NEEDFLUSH;
|
||||||
}
|
}
|
||||||
|
# endif
|
||||||
|
|
||||||
# if GDISP_NEED_CONTROL && GDISP_HARDWARE_CONTROL
|
# if GDISP_NEED_CONTROL && GDISP_HARDWARE_CONTROL
|
||||||
LLDSPEC void gdisp_lld_control(GDisplay *g) {
|
LLDSPEC void gdisp_lld_control(GDisplay *g) {
|
||||||
@@ -279,16 +266,12 @@ LLDSPEC void gdisp_lld_control(GDisplay *g) {
|
|||||||
case powerSleep:
|
case powerSleep:
|
||||||
case powerDeepSleep:
|
case powerDeepSleep:
|
||||||
acquire_bus(g);
|
acquire_bus(g);
|
||||||
enter_cmd_mode(g);
|
|
||||||
write_cmd(g, ST7565_DISPLAY_OFF);
|
write_cmd(g, ST7565_DISPLAY_OFF);
|
||||||
flush_cmd(g);
|
|
||||||
release_bus(g);
|
release_bus(g);
|
||||||
break;
|
break;
|
||||||
case powerOn:
|
case powerOn:
|
||||||
acquire_bus(g);
|
acquire_bus(g);
|
||||||
enter_cmd_mode(g);
|
|
||||||
write_cmd(g, ST7565_DISPLAY_ON);
|
write_cmd(g, ST7565_DISPLAY_ON);
|
||||||
flush_cmd(g);
|
|
||||||
release_bus(g);
|
release_bus(g);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -318,12 +301,11 @@ LLDSPEC void gdisp_lld_control(GDisplay *g) {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
case GDISP_CONTROL_CONTRAST:
|
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);
|
acquire_bus(g);
|
||||||
enter_cmd_mode(g);
|
write_cmd2(g, ST7565_CONTRAST, ((((unsigned)g->p.ptr) << 6) / 101) & 0x3F);
|
||||||
write_cmd2(g, ST7565_CONTRAST, g->g.Contrast);
|
|
||||||
flush_cmd(g);
|
|
||||||
release_bus(g);
|
release_bus(g);
|
||||||
|
g->g.Contrast = (unsigned)g->p.ptr;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,19 +16,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "1up60hte.h"
|
#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 */
|
/* COL2ROW or ROW2COL */
|
||||||
#define DIODE_DIRECTION COL2ROW
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
#define LED_CAPS_LOCK_PIN B6
|
||||||
|
#define LED_PIN_ON_STATE 0
|
||||||
|
|
||||||
/* number of backlight levels */
|
/* number of backlight levels */
|
||||||
#define BACKLIGHT_PIN B7
|
#define BACKLIGHT_PIN B7
|
||||||
#ifdef BACKLIGHT_PIN
|
#ifdef BACKLIGHT_PIN
|
||||||
|
|||||||
@@ -25,7 +25,8 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
|||||||
NKRO_ENABLE = no # USB Nkey Rollover
|
NKRO_ENABLE = no # USB Nkey Rollover
|
||||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
|
||||||
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||||
RGB_MATRIX_ENABLE = WS2812
|
RGB_MATRIX_ENABLE = yes
|
||||||
|
RGB_MATRIX_DRIVER = WS2812
|
||||||
MIDI_ENABLE = no # MIDI support
|
MIDI_ENABLE = no # MIDI support
|
||||||
UNICODE_ENABLE = no # Unicode
|
UNICODE_ENABLE = no # Unicode
|
||||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
|||||||
@@ -17,6 +17,12 @@
|
|||||||
/* Set 0 if debouncing isn't needed */
|
/* Set 0 if debouncing isn't needed */
|
||||||
#define DEBOUNCE 5
|
#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 */
|
/* Underglow options */
|
||||||
#define RGB_DI_PIN B1
|
#define RGB_DI_PIN B1
|
||||||
#ifdef RGB_DI_PIN
|
#ifdef RGB_DI_PIN
|
||||||
|
|||||||
@@ -1,21 +1 @@
|
|||||||
#include "v1.h"
|
#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
|
|
||||||
}
|
|
||||||
@@ -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 }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2020 Stefan Sundin "4pplet" <[email protected]>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
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)
|
||||||
|
};
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2020 Stefan Sundin "4pplet" <[email protected]>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
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)
|
||||||
|
};
|
||||||
File renamed without changes.
@@ -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).
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2020 Stefan Sundin "4pplet" <[email protected]>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#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
|
||||||
@@ -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).
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2020 Stefan Sundin "4pplet" <[email protected]>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include "rev_a.h"
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2020 Stefan Sundin "4pplet" <[email protected]>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#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 } \
|
||||||
|
}
|
||||||
@@ -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
|
||||||
@@ -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" <[email protected]>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|||||||
@@ -1,3 +1,19 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2020 Stefan Sundin "4pplet" <[email protected]>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
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, KC_TRNS, KC_TRNS, KC_TRNS,
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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 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).
|
||||||
@@ -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).
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2020 Stefan Sundin "4pplet" <[email protected]>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#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
|
||||||
@@ -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).
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2020 Stefan Sundin "4pplet" <[email protected]>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include "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;
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2020 Stefan Sundin "4pplet" <[email protected]>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#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}, \
|
||||||
|
}
|
||||||
@@ -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
|
||||||
@@ -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
|
||||||
@@ -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}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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
|
||||||
|
),
|
||||||
|
};
|
||||||
@@ -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
|
||||||
|
)
|
||||||
|
};
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
VIA_ENABLE = yes
|
||||||
|
LTO_ENABLE = yes
|
||||||
|
|
||||||
@@ -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).
|
||||||
@@ -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
|
||||||
@@ -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"
|
||||||
@@ -0,0 +1,109 @@
|
|||||||
|
/*
|
||||||
|
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 "quantum.h"
|
||||||
|
|
||||||
|
#define ___ KC_NO
|
||||||
|
|
||||||
|
|
||||||
|
#define LAYOUT_all_ansi_std( \
|
||||||
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k2c, \
|
||||||
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \
|
||||||
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, \
|
||||||
|
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k43, \
|
||||||
|
k40, k41, k42, k44, k46, k48, k4a, k4d, k4b, k4c, k49 \
|
||||||
|
){ \
|
||||||
|
{ 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, ___, ___ }, \
|
||||||
|
{ k40, k41, k42, k43, k44, ___, k46, ___, k48, k49, k4a, k4b, k4c, k4d } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define LAYOUT_all_ansi_2u_lshift( \
|
||||||
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k2c, \
|
||||||
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \
|
||||||
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, \
|
||||||
|
k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k47, k3c, k43, \
|
||||||
|
k40, k41, k42, k44, k46, k48, k4a, k4d, k4b, k4c, k49 \
|
||||||
|
){ \
|
||||||
|
{ 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, ___, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, ___, ___ }, \
|
||||||
|
{ k40, k41, k42, k43, k44, ___, k46, k47, k48, k49, k4a, k4b, k4c, k4d } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define LAYOUT_60_ansi( \
|
||||||
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, \
|
||||||
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \
|
||||||
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, \
|
||||||
|
k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \
|
||||||
|
k40, k41, k42, k46, k4a, k4b, k4c, k4d \
|
||||||
|
){ \
|
||||||
|
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d }, \
|
||||||
|
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d }, \
|
||||||
|
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, ___, k2d }, \
|
||||||
|
{ k30, ___, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, ___, ___ }, \
|
||||||
|
{ k40, k41, k42, ___, ___, ___, k46, ___, ___, ___, k4a, k4b, k4c, k4d } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define LAYOUT_60_ansi_tsangan( \
|
||||||
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k2c, \
|
||||||
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \
|
||||||
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, \
|
||||||
|
k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k43, \
|
||||||
|
k40, k41, k42, k46, 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, ___, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, ___, ___ }, \
|
||||||
|
{ k40, k41, k42, k43, ___, ___, k46, ___, ___, ___, ___, k4b, k4c, k4d } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define LAYOUT_60_ansi_split_bs_rshift( \
|
||||||
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k2c, \
|
||||||
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \
|
||||||
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, \
|
||||||
|
k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k43, \
|
||||||
|
k40, k41, k42, k46, 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, ___, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, ___, ___ }, \
|
||||||
|
{ k40, k41, k42, k43, ___, ___, k46, ___, ___, ___, k4a, k4b, k4c, k4d } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define LAYOUT_60_ansi_split_spacebar( \
|
||||||
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, \
|
||||||
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \
|
||||||
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, \
|
||||||
|
k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \
|
||||||
|
k40, k41, k42, 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, ___, k2d }, \
|
||||||
|
{ k30, ___, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, ___, ___ }, \
|
||||||
|
{ k40, k41, k42, ___, k44, ___, k46, ___, k48, ___, k4a, k4b, k4c, k4d } \
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,714 @@
|
|||||||
|
/*
|
||||||
|
ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file rt/templates/chconf.h
|
||||||
|
* @brief Configuration file template.
|
||||||
|
* @details A copy of this file must be placed in each project directory, it
|
||||||
|
* contains the application specific kernel settings.
|
||||||
|
*
|
||||||
|
* @addtogroup config
|
||||||
|
* @details Kernel related settings and hooks.
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef CHCONF_H
|
||||||
|
#define CHCONF_H
|
||||||
|
|
||||||
|
#define _CHIBIOS_RT_CONF_
|
||||||
|
#define _CHIBIOS_RT_CONF_VER_6_0_
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/**
|
||||||
|
* @name System timers settings
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief System time counter resolution.
|
||||||
|
* @note Allowed values are 16 or 32 bits.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_ST_RESOLUTION)
|
||||||
|
#define CH_CFG_ST_RESOLUTION 32
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief System tick frequency.
|
||||||
|
* @details Frequency of the system timer that drives the system ticks. This
|
||||||
|
* setting also defines the system tick time unit.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_ST_FREQUENCY)
|
||||||
|
#define CH_CFG_ST_FREQUENCY 10000
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Time intervals data size.
|
||||||
|
* @note Allowed values are 16, 32 or 64 bits.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_INTERVALS_SIZE)
|
||||||
|
#define CH_CFG_INTERVALS_SIZE 32
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Time types data size.
|
||||||
|
* @note Allowed values are 16 or 32 bits.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_TIME_TYPES_SIZE)
|
||||||
|
#define CH_CFG_TIME_TYPES_SIZE 32
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Time delta constant for the tick-less mode.
|
||||||
|
* @note If this value is zero then the system uses the classic
|
||||||
|
* periodic tick. This value represents the minimum number
|
||||||
|
* of ticks that is safe to specify in a timeout directive.
|
||||||
|
* The value one is not valid, timeouts are rounded up to
|
||||||
|
* this value.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_ST_TIMEDELTA)
|
||||||
|
#define CH_CFG_ST_TIMEDELTA 2
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/**
|
||||||
|
* @name Kernel parameters and options
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Round robin interval.
|
||||||
|
* @details This constant is the number of system ticks allowed for the
|
||||||
|
* threads before preemption occurs. Setting this value to zero
|
||||||
|
* disables the preemption for threads with equal priority and the
|
||||||
|
* round robin becomes cooperative. Note that higher priority
|
||||||
|
* threads can still preempt, the kernel is always preemptive.
|
||||||
|
* @note Disabling the round robin preemption makes the kernel more compact
|
||||||
|
* and generally faster.
|
||||||
|
* @note The round robin preemption is not supported in tickless mode and
|
||||||
|
* must be set to zero in that case.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_TIME_QUANTUM)
|
||||||
|
#define CH_CFG_TIME_QUANTUM 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Managed RAM size.
|
||||||
|
* @details Size of the RAM area to be managed by the OS. If set to zero
|
||||||
|
* then the whole available RAM is used. The core memory is made
|
||||||
|
* available to the heap allocator and/or can be used directly through
|
||||||
|
* the simplified core memory allocator.
|
||||||
|
*
|
||||||
|
* @note In order to let the OS manage the whole RAM the linker script must
|
||||||
|
* provide the @p __heap_base__ and @p __heap_end__ symbols.
|
||||||
|
* @note Requires @p CH_CFG_USE_MEMCORE.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_MEMCORE_SIZE)
|
||||||
|
#define CH_CFG_MEMCORE_SIZE 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Idle thread automatic spawn suppression.
|
||||||
|
* @details When this option is activated the function @p chSysInit()
|
||||||
|
* does not spawn the idle thread. The application @p main()
|
||||||
|
* function becomes the idle thread and must implement an
|
||||||
|
* infinite loop.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_NO_IDLE_THREAD)
|
||||||
|
#define CH_CFG_NO_IDLE_THREAD FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/**
|
||||||
|
* @name Performance options
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief OS optimization.
|
||||||
|
* @details If enabled then time efficient rather than space efficient code
|
||||||
|
* is used when two possible implementations exist.
|
||||||
|
*
|
||||||
|
* @note This is not related to the compiler optimization options.
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_OPTIMIZE_SPEED)
|
||||||
|
#define CH_CFG_OPTIMIZE_SPEED FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/**
|
||||||
|
* @name Subsystem options
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Time Measurement APIs.
|
||||||
|
* @details If enabled then the time measurement APIs are included in
|
||||||
|
* the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_USE_TM)
|
||||||
|
#define CH_CFG_USE_TM FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Threads registry APIs.
|
||||||
|
* @details If enabled then the registry APIs are included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_USE_REGISTRY)
|
||||||
|
#define CH_CFG_USE_REGISTRY TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Threads synchronization APIs.
|
||||||
|
* @details If enabled then the @p chThdWait() function is included in
|
||||||
|
* the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_USE_WAITEXIT)
|
||||||
|
#define CH_CFG_USE_WAITEXIT TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Semaphores APIs.
|
||||||
|
* @details If enabled then the Semaphores APIs are included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_USE_SEMAPHORES)
|
||||||
|
#define CH_CFG_USE_SEMAPHORES TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Semaphores queuing mode.
|
||||||
|
* @details If enabled then the threads are enqueued on semaphores by
|
||||||
|
* priority rather than in FIFO order.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE. Enable this if you have special
|
||||||
|
* requirements.
|
||||||
|
* @note Requires @p CH_CFG_USE_SEMAPHORES.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
|
||||||
|
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Mutexes APIs.
|
||||||
|
* @details If enabled then the mutexes APIs are included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_USE_MUTEXES)
|
||||||
|
#define CH_CFG_USE_MUTEXES TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables recursive behavior on mutexes.
|
||||||
|
* @note Recursive mutexes are heavier and have an increased
|
||||||
|
* memory footprint.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
* @note Requires @p CH_CFG_USE_MUTEXES.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
|
||||||
|
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Conditional Variables APIs.
|
||||||
|
* @details If enabled then the conditional variables APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
* @note Requires @p CH_CFG_USE_MUTEXES.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_USE_CONDVARS)
|
||||||
|
#define CH_CFG_USE_CONDVARS TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Conditional Variables APIs with timeout.
|
||||||
|
* @details If enabled then the conditional variables APIs with timeout
|
||||||
|
* specification are included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
* @note Requires @p CH_CFG_USE_CONDVARS.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
|
||||||
|
#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Events Flags APIs.
|
||||||
|
* @details If enabled then the event flags APIs are included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_USE_EVENTS)
|
||||||
|
#define CH_CFG_USE_EVENTS TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Events Flags APIs with timeout.
|
||||||
|
* @details If enabled then the events APIs with timeout specification
|
||||||
|
* are included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
* @note Requires @p CH_CFG_USE_EVENTS.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
|
||||||
|
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Synchronous Messages APIs.
|
||||||
|
* @details If enabled then the synchronous messages APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_USE_MESSAGES)
|
||||||
|
#define CH_CFG_USE_MESSAGES TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Synchronous Messages queuing mode.
|
||||||
|
* @details If enabled then messages are served by priority rather than in
|
||||||
|
* FIFO order.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE. Enable this if you have special
|
||||||
|
* requirements.
|
||||||
|
* @note Requires @p CH_CFG_USE_MESSAGES.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
|
||||||
|
#define CH_CFG_USE_MESSAGES_PRIORITY FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Mailboxes APIs.
|
||||||
|
* @details If enabled then the asynchronous messages (mailboxes) APIs are
|
||||||
|
* included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
* @note Requires @p CH_CFG_USE_SEMAPHORES.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_USE_MAILBOXES)
|
||||||
|
#define CH_CFG_USE_MAILBOXES TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Core Memory Manager APIs.
|
||||||
|
* @details If enabled then the core memory manager APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_USE_MEMCORE)
|
||||||
|
#define CH_CFG_USE_MEMCORE FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Heap Allocator APIs.
|
||||||
|
* @details If enabled then the memory heap allocator APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
* @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or
|
||||||
|
* @p CH_CFG_USE_SEMAPHORES.
|
||||||
|
* @note Mutexes are recommended.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_USE_HEAP)
|
||||||
|
#define CH_CFG_USE_HEAP FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Memory Pools Allocator APIs.
|
||||||
|
* @details If enabled then the memory pools allocator APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_USE_MEMPOOLS)
|
||||||
|
#define CH_CFG_USE_MEMPOOLS FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Objects FIFOs APIs.
|
||||||
|
* @details If enabled then the objects FIFOs APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_USE_OBJ_FIFOS)
|
||||||
|
#define CH_CFG_USE_OBJ_FIFOS FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Pipes APIs.
|
||||||
|
* @details If enabled then the pipes APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_USE_PIPES)
|
||||||
|
#define CH_CFG_USE_PIPES FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Dynamic Threads APIs.
|
||||||
|
* @details If enabled then the dynamic threads creation APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
* @note Requires @p CH_CFG_USE_WAITEXIT.
|
||||||
|
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_USE_DYNAMIC)
|
||||||
|
#define CH_CFG_USE_DYNAMIC FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/**
|
||||||
|
* @name Objects factory options
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Objects Factory APIs.
|
||||||
|
* @details If enabled then the objects factory APIs are included in the
|
||||||
|
* kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_USE_FACTORY)
|
||||||
|
#define CH_CFG_USE_FACTORY FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Maximum length for object names.
|
||||||
|
* @details If the specified length is zero then the name is stored by
|
||||||
|
* pointer but this could have unintended side effects.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
|
||||||
|
#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the registry of generic objects.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
|
||||||
|
#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables factory for generic buffers.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
|
||||||
|
#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables factory for semaphores.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_FACTORY_SEMAPHORES)
|
||||||
|
#define CH_CFG_FACTORY_SEMAPHORES FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables factory for mailboxes.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_FACTORY_MAILBOXES)
|
||||||
|
#define CH_CFG_FACTORY_MAILBOXES FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables factory for objects FIFOs.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
|
||||||
|
#define CH_CFG_FACTORY_OBJ_FIFOS FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables factory for Pipes.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
|
||||||
|
#define CH_CFG_FACTORY_PIPES FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/**
|
||||||
|
* @name Debug options
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, kernel statistics.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_DBG_STATISTICS)
|
||||||
|
#define CH_DBG_STATISTICS FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, system state check.
|
||||||
|
* @details If enabled the correct call protocol for system APIs is checked
|
||||||
|
* at runtime.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_DBG_SYSTEM_STATE_CHECK)
|
||||||
|
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, parameters checks.
|
||||||
|
* @details If enabled then the checks on the API functions input
|
||||||
|
* parameters are activated.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_DBG_ENABLE_CHECKS)
|
||||||
|
#define CH_DBG_ENABLE_CHECKS FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, consistency checks.
|
||||||
|
* @details If enabled then all the assertions in the kernel code are
|
||||||
|
* activated. This includes consistency checks inside the kernel,
|
||||||
|
* runtime anomalies and port-defined checks.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_DBG_ENABLE_ASSERTS)
|
||||||
|
#define CH_DBG_ENABLE_ASSERTS FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, trace buffer.
|
||||||
|
* @details If enabled then the trace buffer is activated.
|
||||||
|
*
|
||||||
|
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_DBG_TRACE_MASK)
|
||||||
|
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Trace buffer entries.
|
||||||
|
* @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is
|
||||||
|
* different from @p CH_DBG_TRACE_MASK_DISABLED.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_DBG_TRACE_BUFFER_SIZE)
|
||||||
|
#define CH_DBG_TRACE_BUFFER_SIZE 128
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, stack checks.
|
||||||
|
* @details If enabled then a runtime stack check is performed.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
* @note The stack check is performed in a architecture/port dependent way.
|
||||||
|
* It may not be implemented or some ports.
|
||||||
|
* @note The default failure mode is to halt the system with the global
|
||||||
|
* @p panic_msg variable set to @p NULL.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_DBG_ENABLE_STACK_CHECK)
|
||||||
|
#define CH_DBG_ENABLE_STACK_CHECK FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, stacks initialization.
|
||||||
|
* @details If enabled then the threads working area is filled with a byte
|
||||||
|
* value when a thread is created. This can be useful for the
|
||||||
|
* runtime measurement of the used stack.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_DBG_FILL_THREADS)
|
||||||
|
#define CH_DBG_FILL_THREADS FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, threads profiling.
|
||||||
|
* @details If enabled then a field is added to the @p thread_t structure that
|
||||||
|
* counts the system ticks occurred while executing the thread.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
* @note This debug option is not currently compatible with the
|
||||||
|
* tickless mode.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_DBG_THREADS_PROFILING)
|
||||||
|
#define CH_DBG_THREADS_PROFILING FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/**
|
||||||
|
* @name Kernel hooks
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief System structure extension.
|
||||||
|
* @details User fields added to the end of the @p ch_system_t structure.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_SYSTEM_EXTRA_FIELDS \
|
||||||
|
/* Add threads custom fields here.*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief System initialization hook.
|
||||||
|
* @details User initialization code added to the @p chSysInit() function
|
||||||
|
* just before interrupts are enabled globally.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_SYSTEM_INIT_HOOK() { \
|
||||||
|
/* Add threads initialization code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Threads descriptor structure extension.
|
||||||
|
* @details User fields added to the end of the @p thread_t structure.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_THREAD_EXTRA_FIELDS \
|
||||||
|
/* Add threads custom fields here.*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Threads initialization hook.
|
||||||
|
* @details User initialization code added to the @p _thread_init() function.
|
||||||
|
*
|
||||||
|
* @note It is invoked from within @p _thread_init() and implicitly from all
|
||||||
|
* the threads creation APIs.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
|
||||||
|
/* Add threads initialization code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Threads finalization hook.
|
||||||
|
* @details User finalization code added to the @p chThdExit() API.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_THREAD_EXIT_HOOK(tp) { \
|
||||||
|
/* Add threads finalization code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Context switch hook.
|
||||||
|
* @details This hook is invoked just before switching between threads.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \
|
||||||
|
/* Context switch code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief ISR enter hook.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_IRQ_PROLOGUE_HOOK() { \
|
||||||
|
/* IRQ prologue code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief ISR exit hook.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_IRQ_EPILOGUE_HOOK() { \
|
||||||
|
/* IRQ epilogue code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Idle thread enter hook.
|
||||||
|
* @note This hook is invoked within a critical zone, no OS functions
|
||||||
|
* should be invoked from here.
|
||||||
|
* @note This macro can be used to activate a power saving mode.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_IDLE_ENTER_HOOK() { \
|
||||||
|
/* Idle-enter code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Idle thread leave hook.
|
||||||
|
* @note This hook is invoked within a critical zone, no OS functions
|
||||||
|
* should be invoked from here.
|
||||||
|
* @note This macro can be used to deactivate a power saving mode.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_IDLE_LEAVE_HOOK() { \
|
||||||
|
/* Idle-leave code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Idle Loop hook.
|
||||||
|
* @details This hook is continuously invoked by the idle thread loop.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_IDLE_LOOP_HOOK() { \
|
||||||
|
/* Idle loop code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief System tick event hook.
|
||||||
|
* @details This hook is invoked in the system tick handler immediately
|
||||||
|
* after processing the virtual timers queue.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_SYSTEM_TICK_HOOK() { \
|
||||||
|
/* System tick event code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief System halt hook.
|
||||||
|
* @details This hook is invoked in case to a system halting error before
|
||||||
|
* the system is halted.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \
|
||||||
|
/* System halt code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Trace hook.
|
||||||
|
* @details This hook is invoked each time a new record is written in the
|
||||||
|
* trace buffer.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_TRACE_HOOK(tep) { \
|
||||||
|
/* Trace code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Port-specific settings (override port settings defaulted in chcore.h). */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
#endif /* CHCONF_H */
|
||||||
|
|
||||||
|
/** @} */
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2015 Álvaro "Gondolindrim" Volpato <[email protected]>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0x4150 // AP for AcheronProject
|
||||||
|
#define PRODUCT_ID 0x7641 // LA for Lasgweloth
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER AcheronProect
|
||||||
|
#define PRODUCT Lasgweloth
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 5
|
||||||
|
#define MATRIX_COLS 14
|
||||||
|
|
||||||
|
#define MATRIX_COL_PINS { B12, A2 , A1 , A0 , F1 , F0 , C15, C14, C13, A7 , A6 , A5 , A4 , B7}
|
||||||
|
#define MATRIX_ROW_PINS { B9 , B8 , A3 , B0 , B1 }
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
//#define BACKLIGHT_PIN A6
|
||||||
|
//#define BACKLIGHT_PWM_DRIVER PWMD3
|
||||||
|
//#define BACKLIGHT_PWM_CHANNEL 1
|
||||||
|
//#define BACKLIGHT_PAL_MODE 1
|
||||||
|
//#define BACKLIGHT_LEVELS 6
|
||||||
|
//#define BACKLIGHT_BREATHING
|
||||||
|
//#define BREATHING_PERIOD 6
|
||||||
|
|
||||||
|
/* define if matrix has ghost */
|
||||||
|
//#define MATRIX_HAS_GHOST
|
||||||
|
|
||||||
|
/* Set 0 if debouncing isn't needed */
|
||||||
|
#define DEBOUNCE 5
|
||||||
|
|
||||||
|
/* 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
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Feature disable options
|
||||||
|
* These options are also useful to firmware size reduction.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* disable debug print */
|
||||||
|
//#define NO_DEBUG
|
||||||
|
|
||||||
|
/* disable print */
|
||||||
|
//#define NO_PRINT
|
||||||
|
|
||||||
|
/* disable action features */
|
||||||
|
//#define NO_ACTION_LAYER
|
||||||
|
//#define NO_ACTION_TAPPING
|
||||||
|
//#define NO_ACTION_ONESHOT
|
||||||
|
//#define NO_ACTION_MACRO
|
||||||
|
//#define NO_ACTION_FUNCTION
|
||||||
@@ -0,0 +1,525 @@
|
|||||||
|
/*
|
||||||
|
ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file templates/halconf.h
|
||||||
|
* @brief HAL configuration header.
|
||||||
|
* @details HAL configuration file, this file allows to enable or disable the
|
||||||
|
* various device drivers from your application. You may also use
|
||||||
|
* this file in order to override the device drivers default settings.
|
||||||
|
*
|
||||||
|
* @addtogroup HAL_CONF
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef HALCONF_H
|
||||||
|
#define HALCONF_H
|
||||||
|
|
||||||
|
#define _CHIBIOS_HAL_CONF_
|
||||||
|
#define _CHIBIOS_HAL_CONF_VER_7_0_
|
||||||
|
|
||||||
|
#include "mcuconf.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the PAL subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_PAL TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the ADC subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_ADC FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the CAN subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_CAN FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the cryptographic subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_CRY FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the DAC subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_DAC FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the GPT subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_GPT FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the I2C subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_I2C FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the I2S subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_I2S FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the ICU subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_ICU FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the MAC subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_MAC FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the MMC_SPI subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_MMC_SPI FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the PWM subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_PWM FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the RTC subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_RTC FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the SDC subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_SDC FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the SERIAL subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_SERIAL FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the SERIAL over USB subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_SERIAL_USB FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the SIO subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_SIO FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the SPI subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_SPI FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the TRNG subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_TRNG FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the UART subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_UART FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the USB subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_USB TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the WDG subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_WDG FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the WSPI subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_WSPI FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* PAL driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables synchronous APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
|
||||||
|
#define PAL_USE_CALLBACKS FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables synchronous APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
|
||||||
|
#define PAL_USE_WAIT FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* ADC driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables synchronous APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
|
||||||
|
#define ADC_USE_WAIT TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||||||
|
#define ADC_USE_MUTUAL_EXCLUSION TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* CAN driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sleep mode related APIs inclusion switch.
|
||||||
|
*/
|
||||||
|
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
|
||||||
|
#define CAN_USE_SLEEP_MODE TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enforces the driver to use direct callbacks rather than OSAL events.
|
||||||
|
*/
|
||||||
|
#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
|
||||||
|
#define CAN_ENFORCE_USE_CALLBACKS FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* CRY driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the SW fall-back of the cryptographic driver.
|
||||||
|
* @details When enabled, this option, activates a fall-back software
|
||||||
|
* implementation for algorithms not supported by the underlying
|
||||||
|
* hardware.
|
||||||
|
* @note Fall-back implementations may not be present for all algorithms.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_CRY_USE_FALLBACK FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Makes the driver forcibly use the fall-back implementations.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_CRY_ENFORCE_FALLBACK FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* DAC driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables synchronous APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
|
||||||
|
#define DAC_USE_WAIT TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||||||
|
#define DAC_USE_MUTUAL_EXCLUSION TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* I2C driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the mutual exclusion APIs on the I2C bus.
|
||||||
|
*/
|
||||||
|
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||||||
|
#define I2C_USE_MUTUAL_EXCLUSION TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* MAC driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the zero-copy API.
|
||||||
|
*/
|
||||||
|
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
|
||||||
|
#define MAC_USE_ZERO_COPY FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables an event sources for incoming packets.
|
||||||
|
*/
|
||||||
|
#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__)
|
||||||
|
#define MAC_USE_EVENTS TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* MMC_SPI driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Delays insertions.
|
||||||
|
* @details If enabled this options inserts delays into the MMC waiting
|
||||||
|
* routines releasing some extra CPU time for the threads with
|
||||||
|
* lower priority, this may slow down the driver a bit however.
|
||||||
|
* This option is recommended also if the SPI driver does not
|
||||||
|
* use a DMA channel and heavily loads the CPU.
|
||||||
|
*/
|
||||||
|
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
|
||||||
|
#define MMC_NICE_WAITING TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* SDC driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Number of initialization attempts before rejecting the card.
|
||||||
|
* @note Attempts are performed at 10mS intervals.
|
||||||
|
*/
|
||||||
|
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
|
||||||
|
#define SDC_INIT_RETRY 100
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Include support for MMC cards.
|
||||||
|
* @note MMC support is not yet implemented so this option must be kept
|
||||||
|
* at @p FALSE.
|
||||||
|
*/
|
||||||
|
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
|
||||||
|
#define SDC_MMC_SUPPORT FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Delays insertions.
|
||||||
|
* @details If enabled this options inserts delays into the MMC waiting
|
||||||
|
* routines releasing some extra CPU time for the threads with
|
||||||
|
* lower priority, this may slow down the driver a bit however.
|
||||||
|
*/
|
||||||
|
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
|
||||||
|
#define SDC_NICE_WAITING TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief OCR initialization constant for V20 cards.
|
||||||
|
*/
|
||||||
|
#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
|
||||||
|
#define SDC_INIT_OCR_V20 0x50FF8000U
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief OCR initialization constant for non-V20 cards.
|
||||||
|
*/
|
||||||
|
#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
|
||||||
|
#define SDC_INIT_OCR 0x80100000U
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* SERIAL driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Default bit rate.
|
||||||
|
* @details Configuration parameter, this is the baud rate selected for the
|
||||||
|
* default configuration.
|
||||||
|
*/
|
||||||
|
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
|
||||||
|
#define SERIAL_DEFAULT_BITRATE 38400
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Serial buffers size.
|
||||||
|
* @details Configuration parameter, you can change the depth of the queue
|
||||||
|
* buffers depending on the requirements of your application.
|
||||||
|
* @note The default is 16 bytes for both the transmission and receive
|
||||||
|
* buffers.
|
||||||
|
*/
|
||||||
|
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
|
||||||
|
#define SERIAL_BUFFERS_SIZE 16
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* SERIAL_USB driver related setting. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Serial over USB buffers size.
|
||||||
|
* @details Configuration parameter, the buffer size must be a multiple of
|
||||||
|
* the USB data endpoint maximum packet size.
|
||||||
|
* @note The default is 256 bytes for both the transmission and receive
|
||||||
|
* buffers.
|
||||||
|
*/
|
||||||
|
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
|
||||||
|
#define SERIAL_USB_BUFFERS_SIZE 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Serial over USB number of buffers.
|
||||||
|
* @note The default is 2 buffers.
|
||||||
|
*/
|
||||||
|
#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
|
||||||
|
#define SERIAL_USB_BUFFERS_NUMBER 2
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* SPI driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables synchronous APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
|
||||||
|
#define SPI_USE_WAIT TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables circular transfers APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
|
||||||
|
#define SPI_USE_CIRCULAR FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||||||
|
#define SPI_USE_MUTUAL_EXCLUSION TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Handling method for SPI CS line.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
|
||||||
|
#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* UART driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables synchronous APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
|
||||||
|
#define UART_USE_WAIT FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||||||
|
#define UART_USE_MUTUAL_EXCLUSION FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* USB driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables synchronous APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
|
||||||
|
#define USB_USE_WAIT TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* WSPI driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables synchronous APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
|
||||||
|
#define WSPI_USE_WAIT TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||||||
|
#define WSPI_USE_MUTUAL_EXCLUSION TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* HALCONF_H */
|
||||||
|
|
||||||
|
/** @} */
|
||||||
+35
@@ -0,0 +1,35 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2012,2013 Jun Wako <[email protected]>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[0] = LAYOUT(
|
||||||
|
KC_GESC, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL , KC_BSPC,
|
||||||
|
KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_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_DEL,
|
||||||
|
KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, MO(1) ,
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, KC_RGUI, MO(1) , KC_RCTL
|
||||||
|
),
|
||||||
|
[1] = LAYOUT(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, KC_UP , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
)
|
||||||
|
};
|
||||||
+35
@@ -0,0 +1,35 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2012,2013 Jun Wako <[email protected]>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[0] = LAYOUT(
|
||||||
|
KC_GESC, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL , KC_BSPC,
|
||||||
|
KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_LBRC, KC_RBRC, KC_TILD,
|
||||||
|
KC_LCTL, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_ENT , KC_DEL,
|
||||||
|
KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, MO(1) ,
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, KC_RGUI, MO(1) , KC_RCTL
|
||||||
|
),
|
||||||
|
[1] = LAYOUT(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, KC_UP , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
)
|
||||||
|
};
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2020 Álvaro "Gondolindrim" Volpato <[email protected]>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "lasgweloth.h"
|
||||||
Loaded 100 of 2062 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user