Browse Source

Merge branch 'develop' into sn32_flashing

pull/21228/head
dexter93 9 months ago
committed by GitHub
parent
commit
cc1fe27ea3
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
4270 changed files with 56108 additions and 19793 deletions
  1. +1
    -0
      .github/workflows/feature_branch_update.yml
  2. +1
    -1
      .github/workflows/format.yml
  3. +31
    -1
      .github/workflows/lint.yml
  4. +34
    -38
      builddefs/build_keyboard.mk
  5. +6
    -6
      builddefs/common_features.mk
  6. +1
    -1
      builddefs/common_rules.mk
  7. +1
    -0
      data/mappings/info_config.hjson
  8. +6
    -0
      data/mappings/keyboard_aliases.hjson
  9. +7
    -0
      data/schemas/keyboard.jsonschema
  10. +2
    -2
      docs/coding_conventions_c.md
  11. +2
    -0
      docs/compatible_microcontrollers.md
  12. +2
    -2
      docs/data_driven_config.md
  13. +43
    -4
      docs/feature_auto_shift.md
  14. +9
    -4
      docs/feature_autocorrect.md
  15. +42
    -42
      docs/feature_hd44780.md
  16. +27
    -0
      docs/feature_key_overrides.md
  17. +1
    -1
      docs/feature_layers.md
  18. +2
    -2
      docs/feature_led_matrix.md
  19. +1
    -1
      docs/feature_mouse_keys.md
  20. +2
    -2
      docs/feature_rgb_matrix.md
  21. +0
    -31
      docs/feature_rgblight.md
  22. +30
    -30
      docs/feature_send_string.md
  23. +23
    -0
      docs/flashing.md
  24. +25
    -25
      docs/i2c_driver.md
  25. +2
    -2
      docs/ja/data_driven_config.md
  26. +1
    -0
      docs/pr_checklist.md
  27. +2
    -0
      docs/quantum_keycodes.md
  28. +1
    -1
      docs/quantum_painter.md
  29. +20
    -20
      docs/spi_driver.md
  30. +15
    -0
      docs/squeezing_avr.md
  31. +25
    -0
      docs/tap_hold.md
  32. +16
    -16
      docs/uart_driver.md
  33. +1
    -1
      drivers/backlight/backlight_software.c
  34. +1
    -1
      drivers/led/apa102.c
  35. +4
    -2
      drivers/led/issi/is31fl3733-simple.c
  36. +1
    -1
      drivers/led/issi/is31fl3733-simple.h
  37. +15
    -7
      drivers/led/issi/is31flcommon.c
  38. +3
    -3
      drivers/led/issi/is31flcommon.h
  39. +2
    -2
      drivers/painter/ili9xxx/qp_ili9xxx_opcodes.h
  40. +4
    -5
      drivers/ps2/ps2_mouse.c
  41. +1
    -1
      drivers/sensors/pmw33xx_common.h
  42. +0
    -1
      keyboards/0_sixty/underglow/config.h
  43. +1
    -0
      keyboards/0_sixty/underglow/info.json
  44. +0
    -7
      keyboards/0xcb/1337/config.h
  45. +9
    -0
      keyboards/0xcb/1337/info.json
  46. +0
    -2
      keyboards/0xcb/static/config.h
  47. +3
    -0
      keyboards/0xcb/static/info.json
  48. +0
    -7
      keyboards/0xcb/tutelpad/config.h
  49. +5
    -0
      keyboards/0xcb/tutelpad/info.json
  50. +0
    -2
      keyboards/10bleoledhub/config.h
  51. +3
    -0
      keyboards/10bleoledhub/info.json
  52. +0
    -2
      keyboards/1k/config.h
  53. +3
    -0
      keyboards/1k/info.json
  54. +0
    -5
      keyboards/1upkeyboards/1up60hse/config.h
  55. +6
    -0
      keyboards/1upkeyboards/1up60hse/info.json
  56. +0
    -4
      keyboards/1upkeyboards/1up60hte/config.h
  57. +5
    -0
      keyboards/1upkeyboards/1up60hte/info.json
  58. +0
    -4
      keyboards/1upkeyboards/1up60rgb/config.h
  59. +5
    -0
      keyboards/1upkeyboards/1up60rgb/info.json
  60. +3
    -2
      keyboards/1upkeyboards/1up60rgb/keymaps/default/keymap.c
  61. +3
    -2
      keyboards/1upkeyboards/1up60rgb/keymaps/iso/keymap.c
  62. +3
    -33
      keyboards/1upkeyboards/1up60rgb/keymaps/raffle/keymap.c
  63. +3
    -2
      keyboards/1upkeyboards/1up60rgb/keymaps/tsangan/keymap.c
  64. +70
    -0
      keyboards/1upkeyboards/1upocarina/config.h
  65. +96
    -0
      keyboards/1upkeyboards/1upocarina/info.json
  66. +34
    -0
      keyboards/1upkeyboards/1upocarina/keymaps/default/keymap.c
  67. +1
    -0
      keyboards/1upkeyboards/1upocarina/keymaps/default/rules.mk
  68. +34
    -0
      keyboards/1upkeyboards/1upocarina/keymaps/via/keymap.c
  69. +4
    -0
      keyboards/1upkeyboards/1upocarina/keymaps/via/rules.mk
  70. +22
    -0
      keyboards/1upkeyboards/1upocarina/readme.md
  71. +1
    -0
      keyboards/1upkeyboards/1upocarina/rules.mk
  72. +13
    -0
      keyboards/1upkeyboards/pi40/mit_v1_0/keymaps/miketronic/config.h
  73. +290
    -0
      keyboards/1upkeyboards/pi40/mit_v1_0/keymaps/miketronic/keymap.c
  74. +25
    -0
      keyboards/1upkeyboards/pi40/mit_v1_0/keymaps/miketronic/rules.mk
  75. +1
    -1
      keyboards/1upkeyboards/pi60/info.json
  76. +2
    -2
      keyboards/1upkeyboards/pi60/keymaps/default/keymap.c
  77. +2
    -2
      keyboards/1upkeyboards/pi60/keymaps/via/keymap.c
  78. +0
    -1
      keyboards/1upkeyboards/pi60_hse/config.h
  79. +1
    -6
      keyboards/1upkeyboards/super16/config.h
  80. +6
    -0
      keyboards/1upkeyboards/super16/info.json
  81. +0
    -4
      keyboards/1upkeyboards/sweet16/v1/config.h
  82. +5
    -0
      keyboards/1upkeyboards/sweet16/v1/info.json
  83. +0
    -1
      keyboards/1upkeyboards/sweet16v2/kb2040/config.h
  84. +0
    -5
      keyboards/25keys/aleth42/rev0/config.h
  85. +6
    -0
      keyboards/25keys/aleth42/rev0/info.json
  86. +0
    -5
      keyboards/25keys/aleth42/rev1/config.h
  87. +6
    -0
      keyboards/25keys/aleth42/rev1/info.json
  88. +0
    -5
      keyboards/25keys/cassette42/config.h
  89. +6
    -0
      keyboards/25keys/cassette42/info.json
  90. +0
    -1
      keyboards/25keys/zinc/rev1/config.h
  91. +6
    -0
      keyboards/25keys/zinc/rev1/info.json
  92. +0
    -3
      keyboards/25keys/zinc/rev1/post_config.h
  93. +0
    -1
      keyboards/25keys/zinc/reva/config.h
  94. +6
    -0
      keyboards/25keys/zinc/reva/info.json
  95. +0
    -3
      keyboards/25keys/zinc/reva/post_config.h
  96. +0
    -1
      keyboards/2key2crawl/config.h
  97. +3
    -0
      keyboards/2key2crawl/info.json
  98. +4
    -3
      keyboards/40percentclub/gherkin/keymaps/default/keymap.c
  99. +0
    -40
      keyboards/40percentclub/gherkin/keymaps/mjt/keymap.c
  100. +0
    -4
      keyboards/40percentclub/luddite/config.h

+ 1
- 0
.github/workflows/feature_branch_update.yml View File

@ -18,6 +18,7 @@ jobs:
matrix:
branch:
- xap
- riot
steps:
- uses: actions/checkout@v3


+ 1
- 1
.github/workflows/format.yml View File

@ -35,7 +35,7 @@ jobs:
- name: Get changed files
id: file_changes
uses: tj-actions/changed-files@v36
uses: tj-actions/changed-files@v37
- name: Run qmk formatters
shell: 'bash {0}'


+ 31
- 1
.github/workflows/lint.yml View File

@ -27,7 +27,7 @@ jobs:
- name: Get changed files
id: file_changes
uses: tj-actions/changed-files@v36
uses: tj-actions/changed-files@v37
- name: Print info
run: |
@ -36,6 +36,7 @@ jobs:
echo '${{ steps.file_changes.outputs.all_changed_files}}'
- name: Run qmk lint
if: always()
shell: 'bash {0}'
run: |
QMK_CHANGES=$(echo -e '${{ steps.file_changes.outputs.all_changed_files}}' | sed 's/ /\n/g')
@ -72,3 +73,32 @@ jobs:
exit 255
fi
exit $exit_code
- name: Verify at most one added keyboard
if: always()
shell: 'bash {0}'
run: |
git reset --hard
git clean -xfd
# Get the keyboard list and count for the target branch
git checkout -f ${{ github.base_ref }}
git pull --ff-only
QMK_KEYBOARDS_BASE=$(qmk list-keyboards)
QMK_KEYBOARDS_BASE_COUNT=$(qmk list-keyboards | wc -l)
# Get the keyboard list and count for the PR
git checkout -f ${{ github.head_ref }}
git merge --no-commit --squash ${{ github.base_ref }}
QMK_KEYBOARDS_PR=$(qmk list-keyboards)
QMK_KEYBOARDS_PR_COUNT=$(qmk list-keyboards | wc -l)
echo "::group::Keyboards changes in this PR"
diff -d -U 0 <(echo "$QMK_KEYBOARDS_BASE") <(echo "$QMK_KEYBOARDS_PR") | grep -vE '^(---|\+\+\+|@@)' | sed -e 's@^-@Removed: @g' -e 's@^+@ Added: @g'
echo "::endgroup::"
if [[ $QMK_KEYBOARDS_PR_COUNT -gt $(($QMK_KEYBOARDS_BASE_COUNT + 1)) ]]; then
echo "More than one keyboard added in this PR -- see the PR Checklist."
echo "::error::More than one keyboard added in this PR -- see the PR Checklist."
exit 1
fi

+ 34
- 38
builddefs/build_keyboard.mk View File

@ -27,7 +27,6 @@ QMK_BIN ?= qmk
# Set the filename for the final firmware binary
KEYBOARD_FILESAFE := $(subst /,_,$(KEYBOARD))
TARGET ?= $(KEYBOARD_FILESAFE)_$(KEYMAP)
KEYBOARD_OUTPUT := $(BUILD_DIR)/obj_$(KEYBOARD_FILESAFE)
ifeq ($(strip $(DUMP_CI_METADATA)),yes)
$(info CI Metadata: KEYBOARD=$(KEYBOARD))
@ -44,7 +43,7 @@ endif
# Object files and generated keymap directory
# To put object files in current directory, use a dot (.), do NOT make
# this an empty or blank macro!
KEYMAP_OUTPUT := $(BUILD_DIR)/obj_$(TARGET)
INTERMEDIATE_OUTPUT := $(BUILD_DIR)/obj_$(TARGET)
ifdef SKIP_VERSION
OPT_DEFS += -DSKIP_VERSION
@ -60,7 +59,7 @@ VERSION_H_FLAGS += --skip-git
endif
# Generate the board's version.h file.
$(shell $(QMK_BIN) generate-version-h $(VERSION_H_FLAGS) -q -o $(KEYMAP_OUTPUT)/src/version.h)
$(shell $(QMK_BIN) generate-version-h $(VERSION_H_FLAGS) -q -o $(INTERMEDIATE_OUTPUT)/src/version.h)
# Determine which subfolders exist.
KEYBOARD_FOLDER_PATH_1 := $(KEYBOARD)
@ -121,7 +120,7 @@ MAIN_KEYMAP_PATH_4 := $(KEYBOARD_PATH_4)/keymaps/$(KEYMAP)
MAIN_KEYMAP_PATH_5 := $(KEYBOARD_PATH_5)/keymaps/$(KEYMAP)
# Pull in rules from info.json
INFO_RULES_MK = $(shell $(QMK_BIN) generate-rules-mk --quiet --escape --keyboard $(KEYBOARD) --output $(KEYBOARD_OUTPUT)/src/info_rules.mk)
INFO_RULES_MK = $(shell $(QMK_BIN) generate-rules-mk --quiet --escape --keyboard $(KEYBOARD) --output $(INTERMEDIATE_OUTPUT)/src/info_rules.mk)
include $(INFO_RULES_MK)
# Check for keymap.json first, so we can regenerate keymap.c
@ -161,28 +160,28 @@ endif
# Have we found a keymap.json?
ifneq ("$(wildcard $(KEYMAP_JSON))", "")
KEYMAP_C := $(KEYMAP_OUTPUT)/src/keymap.c
KEYMAP_H := $(KEYMAP_OUTPUT)/src/config.h
KEYMAP_C := $(INTERMEDIATE_OUTPUT)/src/keymap.c
KEYMAP_H := $(INTERMEDIATE_OUTPUT)/src/config.h
# Load the keymap-level rules.mk if exists
-include $(KEYMAP_PATH)/rules.mk
# Load any rules.mk content from keymap.json
INFO_RULES_MK = $(shell $(QMK_BIN) generate-rules-mk --quiet --escape --output $(KEYMAP_OUTPUT)/src/rules.mk $(KEYMAP_JSON))
INFO_RULES_MK = $(shell $(QMK_BIN) generate-rules-mk --quiet --escape --output $(INTERMEDIATE_OUTPUT)/src/rules.mk $(KEYMAP_JSON))
include $(INFO_RULES_MK)
# Add rules to generate the keymap files - indentation here is important
$(KEYMAP_OUTPUT)/src/keymap.c: $(KEYMAP_JSON)
$(INTERMEDIATE_OUTPUT)/src/keymap.c: $(KEYMAP_JSON)
@$(SILENT) || printf "$(MSG_GENERATING) $@" | $(AWK_CMD)
$(eval CMD=$(QMK_BIN) json2c --quiet --output $(KEYMAP_C) $(KEYMAP_JSON))
@$(BUILD_CMD)
$(KEYMAP_OUTPUT)/src/config.h: $(KEYMAP_JSON)
$(INTERMEDIATE_OUTPUT)/src/config.h: $(KEYMAP_JSON)
@$(SILENT) || printf "$(MSG_GENERATING) $@" | $(AWK_CMD)
$(eval CMD=$(QMK_BIN) generate-config-h --quiet --output $(KEYMAP_H) $(KEYMAP_JSON))
@$(BUILD_CMD)
generated-files: $(KEYMAP_OUTPUT)/src/config.h $(KEYMAP_OUTPUT)/src/keymap.c
generated-files: $(INTERMEDIATE_OUTPUT)/src/config.h $(INTERMEDIATE_OUTPUT)/src/keymap.c
endif
@ -323,34 +322,34 @@ ifneq ("$(wildcard $(KEYBOARD_PATH_5)/info.json)","")
INFO_JSON_FILES += $(KEYBOARD_PATH_5)/info.json
endif
CONFIG_H += $(KEYBOARD_OUTPUT)/src/info_config.h
KEYBOARD_SRC += $(KEYBOARD_OUTPUT)/src/default_keyboard.c
CONFIG_H += $(INTERMEDIATE_OUTPUT)/src/info_config.h
KEYBOARD_SRC += $(INTERMEDIATE_OUTPUT)/src/default_keyboard.c
$(KEYBOARD_OUTPUT)/src/info_config.h: $(INFO_JSON_FILES)
$(INTERMEDIATE_OUTPUT)/src/info_config.h: $(INFO_JSON_FILES)
@$(SILENT) || printf "$(MSG_GENERATING) $@" | $(AWK_CMD)
$(eval CMD=$(QMK_BIN) generate-config-h --quiet --keyboard $(KEYBOARD) --output $(KEYBOARD_OUTPUT)/src/info_config.h)
$(eval CMD=$(QMK_BIN) generate-config-h --quiet --keyboard $(KEYBOARD) --output $(INTERMEDIATE_OUTPUT)/src/info_config.h)
@$(BUILD_CMD)
$(KEYBOARD_OUTPUT)/src/default_keyboard.c: $(INFO_JSON_FILES)
$(INTERMEDIATE_OUTPUT)/src/default_keyboard.c: $(INFO_JSON_FILES)
@$(SILENT) || printf "$(MSG_GENERATING) $@" | $(AWK_CMD)
$(eval CMD=$(QMK_BIN) generate-keyboard-c --quiet --keyboard $(KEYBOARD) --output $(KEYBOARD_OUTPUT)/src/default_keyboard.c)
$(eval CMD=$(QMK_BIN) generate-keyboard-c --quiet --keyboard $(KEYBOARD) --output $(INTERMEDIATE_OUTPUT)/src/default_keyboard.c)
@$(BUILD_CMD)
$(KEYBOARD_OUTPUT)/src/default_keyboard.h: $(INFO_JSON_FILES)
$(INTERMEDIATE_OUTPUT)/src/default_keyboard.h: $(INFO_JSON_FILES)
@$(SILENT) || printf "$(MSG_GENERATING) $@" | $(AWK_CMD)
$(eval CMD=$(QMK_BIN) generate-keyboard-h --quiet --keyboard $(KEYBOARD) --include $(FOUND_KEYBOARD_H) --output $(KEYBOARD_OUTPUT)/src/default_keyboard.h)
$(eval CMD=$(QMK_BIN) generate-keyboard-h --quiet --keyboard $(KEYBOARD) --include $(FOUND_KEYBOARD_H) --output $(INTERMEDIATE_OUTPUT)/src/default_keyboard.h)
@$(BUILD_CMD)
generated-files: $(KEYBOARD_OUTPUT)/src/info_config.h $(KEYBOARD_OUTPUT)/src/default_keyboard.c $(KEYBOARD_OUTPUT)/src/default_keyboard.h
generated-files: $(INTERMEDIATE_OUTPUT)/src/info_config.h $(INTERMEDIATE_OUTPUT)/src/default_keyboard.c $(INTERMEDIATE_OUTPUT)/src/default_keyboard.h
generated-files: $(KEYMAP_OUTPUT)/src/info_deps.d
generated-files: $(INTERMEDIATE_OUTPUT)/src/info_deps.d
$(KEYMAP_OUTPUT)/src/info_deps.d:
$(INTERMEDIATE_OUTPUT)/src/info_deps.d:
@$(SILENT) || printf "$(MSG_GENERATING) $@" | $(AWK_CMD)
$(eval CMD=$(QMK_BIN) generate-make-dependencies -kb $(KEYBOARD) -km $(KEYMAP) -o $(KEYMAP_OUTPUT)/src/info_deps.d)
$(eval CMD=$(QMK_BIN) generate-make-dependencies -kb $(KEYBOARD) -km $(KEYMAP) -o $(INTERMEDIATE_OUTPUT)/src/info_deps.d)
@$(BUILD_CMD)
-include $(KEYMAP_OUTPUT)/src/info_deps.d
-include $(INTERMEDIATE_OUTPUT)/src/info_deps.d
.INTERMEDIATE : generated-files
@ -423,8 +422,7 @@ VPATH += $(KEYMAP_PATH)
VPATH += $(USER_PATH)
VPATH += $(KEYBOARD_PATHS)
VPATH += $(COMMON_VPATH)
VPATH += $(KEYBOARD_OUTPUT)/src
VPATH += $(KEYMAP_OUTPUT)/src
VPATH += $(INTERMEDIATE_OUTPUT)/src
include $(BUILDDEFS_PATH)/common_features.mk
include $(BUILDDEFS_PATH)/generic_features.mk
@ -442,10 +440,11 @@ include $(PLATFORM_PATH)/$(PLATFORM_KEY)/platform.mk
-include $(PLATFORM_PATH)/$(PLATFORM_KEY)/flash.mk
ifneq ($(strip $(PROTOCOL)),)
include $(TMK_PATH)/protocol/$(strip $(shell echo $(PROTOCOL) | tr '[:upper:]' '[:lower:]')).mk
PROTOCOL_KEY = $(strip $(shell echo $(PROTOCOL) | tr '[:upper:]' '[:lower:]'))
else
include $(TMK_PATH)/protocol/$(PLATFORM_KEY).mk
PROTOCOL_KEY = $(PLATFORM_KEY)
endif
include $(TMK_PATH)/protocol/$(PROTOCOL_KEY)/$(PROTOCOL_KEY).mk
# Setup definitions based on the selected MCU
$(eval $(call add_qmk_prefix_defs,MCU_ORIG,MCU))
@ -471,17 +470,14 @@ PROJECT_CONFIG := $(CONFIG_H)
CONFIG_H += $(POST_CONFIG_H)
ALL_CONFIGS := $(PROJECT_CONFIG) $(CONFIG_H)
OUTPUTS := $(KEYMAP_OUTPUT) $(KEYBOARD_OUTPUT)
$(KEYMAP_OUTPUT)_SRC := $(SRC)
$(KEYMAP_OUTPUT)_DEFS := $(OPT_DEFS) \
-DQMK_KEYBOARD=\"$(KEYBOARD)\" -DQMK_KEYBOARD_H=\"$(KEYBOARD_OUTPUT)/src/default_keyboard.h\" \
-DQMK_KEYMAP=\"$(KEYMAP)\" -DQMK_KEYMAP_H=\"$(KEYMAP).h\" -DQMK_KEYMAP_CONFIG_H=\"$(KEYMAP_PATH)/config.h\"
$(KEYMAP_OUTPUT)_INC := $(VPATH) $(EXTRAINCDIRS)
$(KEYMAP_OUTPUT)_CONFIG := $(CONFIG_H)
$(KEYBOARD_OUTPUT)_SRC := $(PLATFORM_SRC)
$(KEYBOARD_OUTPUT)_DEFS := $(PROJECT_DEFS)
$(KEYBOARD_OUTPUT)_INC := $(PROJECT_INC)
$(KEYBOARD_OUTPUT)_CONFIG := $(PROJECT_CONFIG)
OUTPUTS := $(INTERMEDIATE_OUTPUT)
$(INTERMEDIATE_OUTPUT)_SRC := $(SRC) $(PLATFORM_SRC)
$(INTERMEDIATE_OUTPUT)_DEFS := $(OPT_DEFS) \
-DQMK_KEYBOARD=\"$(KEYBOARD)\" -DQMK_KEYBOARD_H=\"$(INTERMEDIATE_OUTPUT)/src/default_keyboard.h\" \
-DQMK_KEYMAP=\"$(KEYMAP)\" -DQMK_KEYMAP_H=\"$(KEYMAP).h\" -DQMK_KEYMAP_CONFIG_H=\"$(KEYMAP_PATH)/config.h\" \
$(PROJECT_DEFS)
$(INTERMEDIATE_OUTPUT)_INC := $(VPATH) $(EXTRAINCDIRS) $(PROJECT_INC)
$(INTERMEDIATE_OUTPUT)_CONFIG := $(CONFIG_H) $(PROJECT_CONFIG)
# Default target.
all: build check-size


+ 6
- 6
builddefs/common_features.mk View File

@ -565,18 +565,18 @@ ifeq ($(strip $(BACKLIGHT_ENABLE)), yes)
endif
COMMON_VPATH += $(QUANTUM_DIR)/backlight
COMMON_VPATH += $(DRIVER_PATH)/backlight
SRC += $(QUANTUM_DIR)/backlight/backlight.c
SRC += $(QUANTUM_DIR)/process_keycode/process_backlight.c
OPT_DEFS += -DBACKLIGHT_ENABLE
ifeq ($(strip $(BACKLIGHT_DRIVER)), custom)
OPT_DEFS += -DBACKLIGHT_CUSTOM_DRIVER
else
ifneq ($(strip $(BACKLIGHT_DRIVER)), custom)
SRC += $(QUANTUM_DIR)/backlight/backlight_driver_common.c
ifeq ($(strip $(BACKLIGHT_DRIVER)), pwm)
SRC += $(QUANTUM_DIR)/backlight/backlight_$(PLATFORM_KEY).c
ifeq ($(strip $(BACKLIGHT_DRIVER)), software)
SRC += $(DRIVER_PATH)/backlight/backlight_software.c
else
SRC += $(QUANTUM_DIR)/backlight/backlight_$(strip $(BACKLIGHT_DRIVER)).c
SRC += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/backlight_$(strip $(BACKLIGHT_DRIVER)).c
endif
endif
endif


+ 1
- 1
builddefs/common_rules.mk View File

@ -176,7 +176,7 @@ MOVE_DEP = mv -f $(patsubst %.o,%.td,$@) $(patsubst %.o,%.d,$@)
# For a ChibiOS build, ensure that the board files have the hook overrides injected
define BOARDSRC_INJECT_HOOKS
$(KEYBOARD_OUTPUT)/$(patsubst %.c,%.o,$(patsubst ./%,%,$1)): INIT_HOOK_CFLAGS += -include $(TOP_DIR)/tmk_core/protocol/chibios/init_hooks.h
$(INTERMEDIATE_OUTPUT)/$(patsubst %.c,%.o,$(patsubst ./%,%,$1)): INIT_HOOK_CFLAGS += -include $(TOP_DIR)/tmk_core/protocol/chibios/init_hooks.h
endef
$(foreach LOBJ, $(BOARDSRC), $(eval $(call BOARDSRC_INJECT_HOOKS,$(LOBJ))))


+ 1
- 0
data/mappings/info_config.hjson View File

@ -117,6 +117,7 @@
"RGBLIGHT_LAYER_BLINK": {"info_key": "rgblight.layers.blink", "value_type": "bool"},
"RGBLIGHT_LAYERS": {"info_key": "rgblight.layers.enabled", "value_type": "bool"},
"RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF": {"info_key": "rgblight.layers.override_rgb", "value_type": "bool"},
"RGBLIGHT_LED_MAP": {"info_key": "rgblight.led_map", "value_type": "array.int"},
"RGBLIGHT_LIMIT_VAL": {"info_key": "rgblight.max_brightness", "value_type": "int"},
"RGBLIGHT_MAX_LAYERS": {"info_key": "rgblight.layers.max", "value_type": "int"},
"RGBLIGHT_SAT_STEP": {"info_key": "rgblight.saturation_steps", "value_type": "int"},


+ 6
- 0
data/mappings/keyboard_aliases.hjson View File

@ -212,6 +212,9 @@
"gmmk/pro/iso": {
"target": "gmmk/pro/rev1/iso"
},
"handwired/dactyl_manuform/6x6_kinesis": {
"target": "handwired/dactyl_kinesis"
},
"handwired/ferris": {
"target": "ferris/0_1"
},
@ -868,6 +871,9 @@
"hecomi/alpha": {
"target": "takashiski/hecomi/alpha"
},
"hfdkb/keyboard_sw/k83":{
"target": "inland/kb83"
},
"hid_liber": {
"target": "bpiphany/hid_liber"
},


+ 7
- 0
data/schemas/keyboard.jsonschema View File

@ -71,6 +71,8 @@
"STM32F446",
"STM32G431",
"STM32G474",
"STM32H723",
"STM32H733",
"STM32L412",
"STM32L422",
"STM32L432",
@ -491,6 +493,11 @@
}
},
"led_count": {"$ref": "qmk.definitions.v1#/unsigned_int"},
"led_map": {
"type": "array",
"minItems": 2,
"items": {"$ref": "qmk.definitions.v1#/unsigned_int"}
},
"max_brightness": {"$ref": "qmk.definitions.v1#/unsigned_int_8"},
"pin": {
"$ref": "qmk.definitions.v1#/mcu_pin",


+ 2
- 2
docs/coding_conventions_c.md View File

@ -8,8 +8,8 @@ Most of our style is pretty easy to pick up on, but right now it's not entirely
* Closing Brace: Lined up with the first character of the statement that opens the block
* Else If: Place the closing brace at the beginning of the line and the next opening brace at the end of the same line.
* Optional Braces: Always include optional braces.
* Good: if (condition) { return false; }
* Bad: if (condition) return false;
* Good: `if (condition) { return false; }`
* Bad: `if (condition) return false;`
* We encourage use of C style comments: `/* */`
* Think of them as a story describing the feature
* Use them liberally to explain why particular decisions were made.


+ 2
- 0
docs/compatible_microcontrollers.md View File

@ -43,6 +43,8 @@ You can also use any ARM chip with USB that [ChibiOS](https://www.chibios.org) s
* [STM32F446](https://www.st.com/en/microcontrollers-microprocessors/stm32f446.html)
* [STM32G431](https://www.st.com/en/microcontrollers-microprocessors/stm32g4x1.html)
* [STM32G474](https://www.st.com/en/microcontrollers-microprocessors/stm32g4x4.html)
* [STM32H723](https://www.st.com/en/microcontrollers-microprocessors/stm32h723-733.html)
* [STM32H733](https://www.st.com/en/microcontrollers-microprocessors/stm32h723-733.html)
* [STM32L412](https://www.st.com/en/microcontrollers-microprocessors/stm32l4x2.html)
* [STM32L422](https://www.st.com/en/microcontrollers-microprocessors/stm32l4x2.html)
* [STM32L432](https://www.st.com/en/microcontrollers-microprocessors/stm32l4x2.html)


+ 2
- 2
docs/data_driven_config.md View File

@ -79,8 +79,8 @@ If you are not sure how to edit this file or are not comfortable with Python [op
The final piece of the puzzle is providing your new option to the build system. This is done by generating two files:
* `.build/obj_<keyboard>/src/info_config.h`
* `.build/obj_<keyboard>/src/rules.mk`
* `.build/obj_<keyboard>_<keymap>/src/info_config.h`
* `.build/obj_<keyboard>_<keymap>/src/rules.mk`
These two files are generated by the code here:


+ 43
- 4
docs/feature_auto_shift.md View File

@ -133,7 +133,17 @@ groups in the below fallback switch.
### NO_AUTO_SHIFT_SPECIAL (simple define)
Do not Auto Shift special keys, which include -\_, =+, [{, ]}, ;:, '", ,<, .>,
and /?
/?, and the KC_TAB.
### NO_AUTO_SHIFT_TAB (simple define)
Do not Auto Shift KC_TAB but leave Auto Shift enabled for the other special
characters.
### NO_AUTO_SHIFT_SYMBOLS (simple define)
Do not Auto Shift symbol keys, which include -\_, =+, [{, ]}, ;:, '", ,<, .>,
and /?.
### NO_AUTO_SHIFT_NUMERIC (simple define)
@ -143,9 +153,13 @@ Do not Auto Shift numeric keys, zero through nine.
Do not Auto Shift alpha characters, which include A through Z.
### AUTO_SHIFT_ENTER (simple define)
Auto Shift the enter key.
### Auto Shift Per Key
There are functions that allows you to determine which keys shold be autoshifted, much like the tap-hold keys.
There are functions that allows you to determine which keys should be autoshifted, much like the tap-hold keys.
The first of these, used to simply add a key to Auto Shift, is `get_custom_auto_shifted_key`:
@ -172,9 +186,15 @@ bool get_auto_shifted_key(uint16_t keycode, keyrecord_t *record) {
case KC_1 ... KC_0:
# endif
# ifndef NO_AUTO_SHIFT_SPECIAL
# ifndef NO_AUTO_SHIFT_TAB
case KC_TAB:
case KC_MINUS ... KC_SLASH:
case KC_NONUS_BACKSLASH:
# endif
# ifndef NO_AUTO_SHIFT_SYMBOLS
case AUTO_SHIFT_SYMBOLS:
# endif
# endif
# ifdef AUTO_SHIFT_ENTER
case KC_ENT:
# endif
return true;
}
@ -192,6 +212,25 @@ Enables keyrepeat.
Disables automatically keyrepeating when `AUTO_SHIFT_TIMEOUT` is exceeded.
### AUTO_SHIFT_ALPHA (predefined key group)
A predefined group of keys representing A through Z.
### AUTO_SHIFT_NUMERIC (predefined key group)
A predefined group of keys representing 0 through 9. Note, these are defined as
1 through 0 since that is the order they normally appear in.
### AUTO_SHIFT_SYMBOLS (predefined key group)
A predefined group of keys representing symbolic characters which include -\_, =+, [{, ]}, ;:, '", ,<, .>,
and /?.
### AUTO_SHIFT_SPECIAL (predefined key group)
A predefined group of keys that combines AUTO_SHIFT_SYMBOLS and KC_TAB.
## Custom Shifted Values
Especially on small keyboards, the default shifted value for many keys is not


+ 9
- 4
docs/feature_autocorrect.md View File

@ -198,7 +198,9 @@ bool process_autocorrect_user(uint16_t *keycode, keyrecord_t *record, uint8_t *t
### Apply Autocorrect
Additionally, `apply_autocorrect(uint8_t backspaces, const char *str)` allows for users to add additional handling to the autocorrection, or replace the functionality entirely. This passes on the number of backspaces needed to replace the words, as well as the replacement string (partial word, not the full word).
Additionally, `apply_autocorrect(uint8_t backspaces, const char *str, char *typo, char *correct)` allows for users to add additional handling to the autocorrection, or replace the functionality entirely. This passes on the number of backspaces needed to replace the words, as well as the replacement string (partial word, not the full word), and the typo and corrected strings (complete words).
?> Due to the way code works (no notion of words, just a stream of letters), the `typo` and `correct` strings are a best bet and could be "wrong". For example you may get `wordtpyo` & `wordtypo` instead of the expected `tpyo` & `typo`.
#### Apply Autocorrect Example
@ -209,7 +211,7 @@ This following example will play a sound when a typo is autocorrected and execut
float autocorrect_song[][2] = SONG(TERMINAL_SOUND);
#endif
bool apply_autocorrect(uint8_t backspaces, const char *str) {
bool apply_autocorrect(uint8_t backspaces, const char *str, char *typo, char *correct) {
#ifdef AUDIO_ENABLE
PLAY_SONG(autocorrect_song);
#endif
@ -223,14 +225,17 @@ bool apply_autocorrect(uint8_t backspaces, const char *str) {
?> In this callback function, `return false` will stop the normal processing of autocorrect, which requires manually handling of removing the "bad" characters and typing the new characters.
!> ***IMPORTANT***: `str` is a pointer to `PROGMEM` data for the autocorrection. If you return false, and want to send the string, this needs to use `send_string_P` and not `send_string` or `SEND_STRING`.
!> ***IMPORTANT***: `str` is a pointer to `PROGMEM` data for the autocorrection. If you return false, and want to send the string, this needs to use `send_string_P` and not `send_string` nor `SEND_STRING`.
You can also use `apply_autocorrect` to detect and display the event but allow internal code to execute the autocorrection with `return true`:
```c
bool apply_autocorrect(uint8_t backspaces, const char *str) {
bool apply_autocorrect(uint8_t backspaces, const char *str, char *typo, char *correct) {
#ifdef OLED_ENABLE
oled_write_P(PSTR("Auto-corrected"), false);
#endif
#ifdef CONSOLE_ENABLE
printf("'%s' was corrected to '%s'\n", typo, correct);
#endif
return true;
}


+ 42
- 42
docs/feature_hd44780.md View File

@ -1,6 +1,6 @@
# HD44780 LCD Driver
# HD44780 LCD Driver :id=hd44780-lcd-driver
## Supported Hardware
## Supported Hardware :id=supported-hardware
LCD modules using [HD44780U](https://www.sparkfun.com/datasheets/LCD/HD44780.pdf) IC or equivalent, communicating in 4-bit mode.
@ -11,7 +11,7 @@ LCD modules using [HD44780U](https://www.sparkfun.com/datasheets/LCD/HD44780.pdf
To run these modules at 3.3V, an additional MAX660 voltage converter IC must be soldered on, along with two 10µF capacitors. See [this page](https://www.codrey.com/electronic-circuits/hack-your-16x2-lcd/) for more details.
## Usage
## Usage :id=usage
Add the following to your `rules.mk`:
@ -19,7 +19,7 @@ Add the following to your `rules.mk`:
HD44780_ENABLE = yes
```
## Basic Configuration
## Basic Configuration :id=basic-configuration
Add the following to your `config.h`:
@ -33,9 +33,9 @@ Add the following to your `config.h`:
|`HD44780_DISPLAY_LINES`|`2` |The number of visible lines on the display |
|`HD44780_WRAP_LINES` |*Not defined* |If defined, input characters will wrap to the next line |
## Examples
## Examples :id=examples
### Hello World
### Hello World :id=example-hello-world
Add the following to your `keymap.c`:
@ -46,7 +46,7 @@ void keyboard_post_init_user(void) {
}
```
### Custom Character Definition
### Custom Character Definition :id=example-custom-character
Up to eight custom characters can be defined. This data is stored in the Character Generator RAM (CGRAM), and is not persistent across power cycles.
@ -77,15 +77,15 @@ void keyboard_post_init_user(void) {
}
```
## API
## API :id=api
### `void hd44780_init(bool cursor, bool blink)`
### `void hd44780_init(bool cursor, bool blink)` :id=api-hd44780-init
Initialize the display.
This function should be called only once, before any of the other functions can be called.
#### Arguments
#### Arguments :id=api-hd44780-init-arguments
- `bool cursor`
Whether to show the cursor.
@ -94,7 +94,7 @@ This function should be called only once, before any of the other functions can
---
### `void hd44780_clear(void)`
### `void hd44780_clear(void)` :id=api-hd44780-clear
Clear the display.
@ -102,7 +102,7 @@ This function is called on init.
---
### `void hd44780_home(void)`
### `void hd44780_home(void)` :id=api-hd44780-home
Move the cursor to the home position.
@ -110,13 +110,13 @@ This function is called on init.
---
### `void hd44780_on(bool cursor, bool blink)`
### `void hd44780_on(bool cursor, bool blink)` :id=api-hd44780-on
Turn the display on, and/or set the cursor properties.
This function is called on init.
#### Arguments
#### Arguments :id=api-hd44780-on-arguments
- `bool cursor`
Whether to show the cursor.
@ -125,17 +125,17 @@ This function is called on init.
---
### `void hd44780_off(void)`
### `void hd44780_off(void)` :id=api-hd44780-off
Turn the display off.
---
### `void hd44780_set_cursor(uint8_t col, uint8_t line)`
### `void hd44780_set_cursor(uint8_t col, uint8_t line)` :id=api-hd44780-set-cursor
Move the cursor to the specified position on the display.
#### Arguments
#### Arguments :id=api-hd44780-set-cursor-arguments
- `uint8_t col`
The column number to move to, from 0 to 15 on 16x2 displays.
@ -144,48 +144,48 @@ Move the cursor to the specified position on the display.
---
### `void hd44780_putc(char c)`
### `void hd44780_putc(char c)` :id=api-hd44780-putc
Print a character to the display. The newline character `\n` will move the cursor to the start of the next line.
The exact character shown may depend on the ROM code of your particular display - refer to the datasheet for the full character set.
#### Arguments
#### Arguments :id=api-hd44780-putc-arguments
- `char c`
The character to print.
---
### `void hd44780_puts(const char *s)`
### `void hd44780_puts(const char *s)` :id=api-hd44780-puts
Print a string of characters to the display.
#### Arguments
#### Arguments :id=api-hd44780-puts-arguments
- `const char *s`
The string to print.
---
### `void hd44780_puts_P(const char *s)`
### `void hd44780_puts_P(const char *s)` :id=api-hd44780-puts-p
Print a string of characters from PROGMEM to the display.
On ARM devices, this function is simply an alias of `hd44780_puts()`.
#### Arguments
#### Arguments :id=api-hd44780-puts-p-arguments
- `const char *s`
The PROGMEM string to print (ie. `PSTR("Hello")`).
---
### `void hd44780_define_char(uint8_t index, uint8_t *data)`
### `void hd44780_define_char(uint8_t index, uint8_t *data)` :id=api-hd44780-define-char
Define a custom character.
#### Arguments
#### Arguments :id=api-hd44780-define-char-arguments
- `uint8_t index`
The index of the custom character to define, from 0 to 7.
@ -194,13 +194,13 @@ Define a custom character.
---
### `void hd44780_define_char_P(uint8_t index, const uint8_t *data)`
### `void hd44780_define_char_P(uint8_t index, const uint8_t *data)` :id=api-hd44780-define-char-p
Define a custom character from PROGMEM.
On ARM devices, this function is simply an alias of `hd44780_define_char()`.
#### Arguments
#### Arguments :id=api-hd44780-define-char-p-arguments
- `uint8_t index`
The index of the custom character to define, from 0 to 7.
@ -209,21 +209,21 @@ On ARM devices, this function is simply an alias of `hd44780_define_char()`.
---
### `bool hd44780_busy(void)`
### `bool hd44780_busy(void)` :id=api-hd44780-busy
Indicates whether the display is currently processing, and cannot accept instructions.
#### Return Value
#### Return Value :id=api-hd44780-busy-arguments
`true` if the display is busy.
---
### `void hd44780_write(uint8_t data, bool isData)`
### `void hd44780_write(uint8_t data, bool isData)` :id=api-hd44780-write
Write a byte to the display.
#### Arguments
#### Arguments :id=api-hd44780-write-arguments
- `uint8_t data`
The byte to send to the display.
@ -232,67 +232,67 @@ Write a byte to the display.
---
### `uint8_t hd44780_read(bool isData)`
### `uint8_t hd44780_read(bool isData)` :id=api-hd44780-read
Read a byte from the display.
#### Arguments
#### Arguments :id=api-hd44780-read-arguments
- `bool isData`
Whether to read the current cursor position, or the character at the cursor.
#### Return Value
#### Return Value :id=api-hd44780-read-return
If `isData` is `true`, the returned byte will be the character at the current DDRAM address. Otherwise, it will be the current DDRAM address and the busy flag.
---
### `void hd44780_command(uint8_t command)`
### `void hd44780_command(uint8_t command)` :id=api-hd44780-command
Send a command to the display. Refer to the datasheet and `hd44780.h` for the valid commands and defines.
This function waits for the display to clear the busy flag before sending the command.
#### Arguments
#### Arguments :id=api-hd44780-command-arguments
- `uint8_t command`
The command to send.
---
### `void hd44780_data(uint8_t data)`
### `void hd44780_data(uint8_t data)` :id=api-hd44780-data
Send a byte of data to the display.
This function waits for the display to clear the busy flag before sending the data.
#### Arguments
#### Arguments :id=api-hd44780-data-arguments
- `uint8_t data`
The byte of data to send.
---
### `void hd44780_set_cgram_address(uint8_t address)`
### `void hd44780_set_cgram_address(uint8_t address)` :id=api-hd44780-set-cgram-address
Set the CGRAM address.
This function is used when defining custom characters.
#### Arguments
#### Arguments :id=api-hd44780-set-cgram-address-arguments
- `uint8_t address`
The CGRAM address to move to, from `0x00` to `0x3F`.
---
### `void hd44780_set_ddram_address(uint8_t address)`
### `void hd44780_set_ddram_address(uint8_t address)` :id=api-hd44780-set-ddram-address
Set the DDRAM address.
This function is used when printing characters to the display, and setting the cursor.
#### Arguments
#### Arguments :id=api-hd44780-set-ddram-address-arguments
- `uint8_t address`
The DDRAM address to move to, from `0x00` to `0x7F`.

+ 27
- 0
docs/feature_key_overrides.md View File

@ -225,3 +225,30 @@ The duration of the key repeat delay is controlled with the `KEY_OVERRIDE_REPEAT
## Difference to Combos :id=difference-to-combos
Note that key overrides are very different from [combos](https://docs.qmk.fm/#/feature_combo). Combos require that you press down several keys almost _at the same time_ and can work with any combination of non-modifier keys. Key overrides work like keyboard shortcuts (e.g. `ctrl` + `z`): They take combinations of _multiple_ modifiers and _one_ non-modifier key to then perform some custom action. Key overrides are implemented with much care to behave just like normal keyboard shortcuts would in regards to the order of pressed keys, timing, and interacton with other pressed keys. There are a number of optional settings that can be used to really fine-tune the behavior of each key override as well. Using key overrides also does not delay key input for regular key presses, which inherently happens in combos and may be undesirable.
## Solution to the problem of flashing modifiers :id=neutralize-flashing-modifiers
If the programs you use bind an action to taps of modifier keys (e.g. tapping left GUI to bring up the applications menu or tapping left Alt to focus the menu bar), you may find that using key overrides with suppressed mods falsely triggers those actions. To counteract this, you can define a `DUMMY_MOD_NEUTRALIZER_KEYCODE` in `config.h` that will get sent in between the register and unregister events of a suppressed modifier. That way, the programs on your computer will no longer interpret the mod suppression induced by key overrides as a lone tap of a modifier key and will thus not falsely trigger the undesired action.
Naturally, for this technique to be effective, you must choose a `DUMMY_MOD_NEUTRALIZER_KEYCODE` for which no keyboard shortcuts are bound to. Recommended values are: `KC_RIGHT_CTRL` or `KC_F18`.
Please note that `DUMMY_MOD_NEUTRALIZER_KEYCODE` must be a basic, unmodified, HID keycode so values like `KC_NO`, `KC_TRANSPARENT` or `KC_PIPE` aka `S(KC_BACKSLASH)` are not permitted.
By default, only left Alt and left GUI are neutralized. If you want to change the list of applicable modifier masks, use the following in your `config.h`:
```c
#define MODS_TO_NEUTRALIZE { <mod_mask_1>, <mod_mask_2>, ... }
```
Examples:
```c
#define DUMMY_MOD_NEUTRALIZER_KEYCODE KC_RIGHT_CTRL
// Neutralize left alt and left GUI (Default value)
#define MODS_TO_NEUTRALIZE { MOD_BIT(KC_LEFT_ALT), MOD_BIT(KC_LEFT_GUI) }
// Neutralize left alt, left GUI, right GUI and left Control+Shift
#define MODS_TO_NEUTRALIZE { MOD_BIT(KC_LEFT_ALT), MOD_BIT(KC_LEFT_GUI), MOD_BIT(KC_RIGHT_GUI), MOD_BIT(KC_LEFT_CTRL)|MOD_BIT(KC_LEFT_SHIFT) }
```
!> Do not use `MOD_xxx` constants like `MOD_LSFT` or `MOD_RALT`, since they're 5-bit packed bit-arrays while `MODS_TO_NEUTRALIZE` expects a list of 8-bit packed bit-arrays. Use `MOD_BIT(<kc>)` or `MOD_MASK_xxx` instead.

+ 1
- 1
docs/feature_layers.md View File

@ -64,7 +64,7 @@ There are a number of functions (and variables) related to how you can use or ma
| `layer_move(layer)` | Turns specified layer on, and all other layers off. |
| `layer_on(layer)` | Turns specified layer on, leaves all other layers in existing state. |
| `layer_off(layer)` | Turns specified layer off, leaves all other layers in existing state. |
| `layer_invert(layer)` | Interverts/toggles the state of the specified layer |
| `layer_invert(layer)` | Inverts/toggles the state of the specified layer |
| `layer_or(layer_mask)` | Turns on layers based on matching bits between specifed layer and existing layer state. |
| `layer_and(layer_mask)` | Turns on layers based on matching enabled bits between specifed layer and existing layer state. |
| `layer_xor(layer_mask)` | Turns on layers based on non-matching bits between specifed layer and existing layer state. |


+ 2
- 2
docs/feature_led_matrix.md View File

@ -139,7 +139,7 @@ Currently only 4 drivers are supported, but it would be trivial to support for m
Define these arrays listing all the LEDs in your `<keyboard>.c`:
```c
const is31_led __flash g_is31_leds[LED_MATRIX_LED_COUNT] = {
const is31_led PROGMEM g_is31_leds[LED_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | LED address
@ -158,7 +158,7 @@ Eg `#define ISSI_MANUAL_SCALING 3`
Then Define the array listing all the LEDs you want to override in your `<keyboard>.c`:
```c
const is31_led __flash g_is31_scaling[ISSI_MANUAL_SCALING] = {
const is31_led PROGMEM g_is31_scaling[ISSI_MANUAL_SCALING] = {
* LED Index
* | Scaling
* | | */


+ 1
- 1
docs/feature_mouse_keys.md View File

@ -101,7 +101,7 @@ This is an extension of the accelerated mode. The kinetic mode uses a quadratic
Tips:
* The smoothness of the cursor movement depends on the `MOUSEKEY_INTERVAL` setting. The shorter the interval is set the smoother the movement will be. Setting the value too low makes the cursor unresponsive. Lower settings are possible if the micro processor is fast enough. For example: At an interval of `8` milliseconds, `125` movements per second will be initiated. With a base speed of `1000` each movement will move the cursor by `8` pixels.
* Mouse wheel movements are implemented differently from cursor movements. While it's okay for the cursor to move multiple pixels at once for the mouse wheel this would lead to jerky movements. Instead, the mouse wheel operates at step size `2`. Setting mouse wheel speed is done by adjusting the number of wheel movements per second.
* Mouse wheel movements are implemented differently from cursor movements. While it's okay for the cursor to move multiple pixels at once for the mouse wheel this would lead to jerky movements. Instead, the mouse wheel operates at step size `1`. Setting mouse wheel speed is done by adjusting the number of wheel movements per second.
### Constant mode


+ 2
- 2
docs/feature_rgb_matrix.md View File

@ -386,7 +386,7 @@ Currently only 4 drivers are supported, but it would be trivial to support for m
Define these arrays listing all the LEDs in your `<keyboard>.c`:
```c
const is31_led __flash g_is31_leds[RGB_MATRIX_LED_COUNT] = {
const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
@ -406,7 +406,7 @@ Eg `#define ISSI_MANUAL_SCALING 3`
Then Define the array listing all the LEDs you want to override in your `<keyboard>.c`:
```c
const is31_led __flash g_is31_scaling[ISSI_MANUAL_SCALING] = {
const is31_led PROGMEM g_is31_scaling[ISSI_MANUAL_SCALING] = {
* LED Index
* | R scaling
* | | G scaling


+ 0
- 31
docs/feature_rgblight.md View File

@ -524,37 +524,6 @@ By defining `RGBLIGHT_LED_MAP` as in the example below, you can specify the LED
```
<img src="https://user-images.githubusercontent.com/2170248/55743725-08ad7a80-5a6e-11e9-83ed-126a2b0209fc.JPG" alt="simple mapped" width="50%"/>
For keyboards that use the RGB LEDs as a backlight for each key, you can also define it as in the example below.
```c
// config.h
#define RGBLED_NUM 30
/* RGB LED Conversion macro from physical array to electric array */
#define LED_LAYOUT( \
L00, L01, L02, L03, L04, L05, \
L10, L11, L12, L13, L14, L15, \
L20, L21, L22, L23, L24, L25, \
L30, L31, L32, L33, L34, L35, \
L40, L41, L42, L43, L44, L45 ) \
{ \
L05, L04, L03, L02, L01, L00, \
L10, L11, L12, L13, L14, L15, \
L25, L24, L23, L22, L21, L20, \
L30, L31, L32, L33, L34, L35, \
L46, L45, L44, L43, L42, L41 \
}
/* RGB LED logical order map */
/* Top->Bottom, Right->Left */
#define RGBLIGHT_LED_MAP LED_LAYOUT( \
25, 20, 15, 10, 5, 0, \
26, 21, 16, 11, 6, 1, \
27, 22, 17, 12, 7, 2, \
28, 23, 18, 13, 8, 3, \
29, 24, 19, 14, 9, 4 )
```
## Clipping Range


+ 30
- 30
docs/feature_send_string.md View File

@ -1,4 +1,4 @@
# Send String
# Send String :id=send-string
The Send String API is part of QMK's macro system. It allows for sequences of keystrokes to be sent automatically.
@ -6,7 +6,7 @@ The full ASCII character set is supported, along with all of the keycodes in the
?> Unicode characters are **not** supported with this API -- see the [Unicode](feature_unicode.md) feature instead.
## Usage
## Usage :id=usage
Send String is enabled by default, so there is usually no need for any special setup. However, if it is disabled, add the following to your `rules.mk`:
@ -14,7 +14,7 @@ Send String is enabled by default, so there is usually no need for any special s
SEND_STRING_ENABLE = yes
```
## Basic Configuration
## Basic Configuration :id=basic-configuration
Add the following to your `config.h`:
@ -23,7 +23,7 @@ Add the following to your `config.h`:
|`SENDSTRING_BELL`|*Not defined* |If the [Audio](feature_audio.md) feature is enabled, the `\a` character (ASCII `BEL`) will beep the speaker.|
|`BELL_SOUND` |`TERMINAL_SOUND`|The song to play when the `\a` character is encountered. By default, this is an eighth note of C5. |
## Keycodes
## Keycodes :id=keycodes
The Send String functions accept C string literals, but specific keycodes can be injected with the below macros. All of the keycodes in the [Basic Keycode range](keycodes_basic.md) are supported (as these are the only ones that will actually be sent to the host), but with an `X_` prefix instead of `KC_`.
@ -44,13 +44,13 @@ The following characters are also mapped to their respective keycodes for conven
|`\t` |`\x1B`|`TAB`|`KC_TAB` |
| |`\x7F`|`DEL`|`KC_DELETE` |
### Language Support
### Language Support :id=language-support
By default, Send String assumes your OS keyboard layout is set to US ANSI. If you are using a different keyboard layout, you can [override the lookup tables used to convert ASCII characters to keystrokes](reference_keymap_extras.md#sendstring-support).
## Examples
## Examples :id=examples
### Hello World
### Hello World :id=example-hello-world
A simple custom keycode which types out "Hello, world!" and the Enter key when pressed.
@ -70,7 +70,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
```
### Keycode Injection
### Keycode Injection :id=example-keycode-injection
This example types out opening and closing curly braces, then taps the left arrow key to move the cursor between the two.
@ -84,26 +84,26 @@ This example types Ctrl+A, then Ctrl+C, without releasing Ctrl.
SEND_STRING(SS_LCTL("ac"));
```
## API
## API :id=api
### `void send_string(const char *string)`
### `void send_string(const char *string)` :id=api-send-string
Type out a string of ASCII characters.
This function simply calls `send_string_with_delay(string, 0)`.
#### Arguments
#### Arguments :id=api-send-string-arguments
- `const char *string`
The string to type out.
---
### `void send_string_with_delay(const char *string, uint8_t interval)`
### `void send_string_with_delay(const char *string, uint8_t interval)` :id=api-send-string-with-delay
Type out a string of ASCII characters, with a delay between each character.
#### Arguments
#### Arguments :id=api-send-string-with-delay-arguments
- `const char *string`
The string to type out.
@ -112,26 +112,26 @@ Type out a string of ASCII characters, with a delay between each character.
---
### `void send_string_P(const char *string)`
### `void send_string_P(const char *string)` :id=api-send-string-p
Type out a PROGMEM string of ASCII characters.
On ARM devices, this function is simply an alias for `send_string_with_delay(string, 0)`.
#### Arguments
#### Arguments :id=api-send-string-p-arguments
- `const char *string`
The string to type out.
---
### `void send_string_with_delay_P(const char *string, uint8_t interval)`
### `void send_string_with_delay_P(const char *string, uint8_t interval)` :id=api-send-string-with-delay-p
Type out a PROGMEM string of ASCII characters, with a delay between each character.
On ARM devices, this function is simply an alias for `send_string_with_delay(string, interval)`.
#### Arguments
#### Arguments :id=api-send-string-with-delay-p-arguments
- `const char *string`
The string to type out.
@ -140,76 +140,76 @@ On ARM devices, this function is simply an alias for `send_string_with_delay(str
---
### `void send_char(char ascii_code)`
### `void send_char(char ascii_code)` :id=api-send-char
Type out an ASCII character.
#### Arguments
#### Arguments :id=api-send-char-arguments
- `char ascii_code`
The character to type.
---
### `void send_dword(uint32_t number)`
### `void send_dword(uint32_t number)` :id=api-send-dword
Type out an eight digit (unsigned 32-bit) hexadecimal value.
The format is `[0-9a-f]{8}`, eg. `00000000` through `ffffffff`.
#### Arguments
#### Arguments :id=api-send-dword-arguments
- `uint32_t number`
The value to type, from 0 to 4,294,967,295.
---
### `void send_word(uint16_t number)`
### `void send_word(uint16_t number)` :id=api-send-word
Type out a four digit (unsigned 16-bit) hexadecimal value.
The format is `[0-9a-f]{4}`, eg. `0000` through `ffff`.
#### Arguments
#### Arguments :id=api-send-word-arguments
- `uint16_t number`
The value to type, from 0 to 65,535.
---
### `void send_byte(uint8_t number)`
### `void send_byte(uint8_t number)` :id=api-send-bytes
Type out a two digit (8-bit) hexadecimal value.
The format is `[0-9a-f]{2}`, eg. `00` through `ff`.
#### Arguments
#### Arguments :id=api-send-byte-arguments
- `uint8_t number`
The value to type, from 0 to 255.
---
### `void send_nibble(uint8_t number)`
### `void send_nibble(uint8_t number)` :id=api-send-nibble
Type out a single hexadecimal digit.
The format is `[0-9a-f]{1}`, eg. `0` through `f`.
#### Arguments
#### Arguments :id=api-send-nibble-arguments
- `uint8_t number`
The value to type, from 0 to 15.
---
### `void tap_random_base64(void)`
### `void tap_random_base64(void)` :id=api-tap-random-base64
Type a pseudorandom character from the set `A-Z`, `a-z`, `0-9`, `+` and `/`.
---
### `SEND_STRING(string)`
### `SEND_STRING(string)` :id=api-send-string-macro
Shortcut macro for `send_string_with_delay_P(PSTR(string), 0)`.
@ -217,7 +217,7 @@ On ARM devices, this define evaluates to `send_string_with_delay(string, 0)`.
---
### `SEND_STRING_DELAY(string, interval)`
### `SEND_STRING_DELAY(string, interval)` :id=api-send-string-delay-macro
Shortcut macro for `send_string_with_delay_P(PSTR(string), interval)`.


+ 23
- 0
docs/flashing.md View File

@ -322,6 +322,29 @@ Flashing sequence:
3. Flash a .bin file
4. Reset the device into application mode (may be done automatically)
## WB32 DFU
Some keyboards produced for several commercial brands (GMMK, Akko, MonsGeek, Inland) use this bootloader. The `wb32-dfu-updater` utility is bundled with [QMK MSYS](https://msys.qmk.fm/) and [Glorious's build of QMK Toolbox](https://www.gloriousgaming.com/blogs/guides-resources/gmmk-2-qmk-installation-guide). If neither of these flashing methods is available for your OS, you will likely need to [compile the CLI version from source](https://github.com/WestberryTech/wb32-dfu-updater).
The `info.json` setting for this bootloader is `wb32-dfu`.
Compatible flashers:
* [Glorious's build of QMK Toolbox](https://www.gloriousgaming.com/blogs/guides-resources/gmmk-2-qmk-installation-guide) (recommended GUI)
* [wb32-dfu-updater_cli](https://github.com/WestberryTech/wb32-dfu-updater) / `:flash` target in QMK (recommended command line)
```
wb32-dfu-updater_cli -t -s 0x8000000 -D <filename>
```
Flashing sequence:
1. Enter the bootloader using any of the following methods:
* Tap the `QK_BOOT` keycode
* Press the `RESET` button on the PCB
2. Wait for the OS to detect the device
3. Flash a .bin file
4. Reset the device into application mode (may be done automatically)
## tinyuf2
Keyboards may opt into supporting the tinyuf2 bootloader. This is currently only supported on F303/F401/F411.


+ 25
- 25
docs/i2c_driver.md View File

@ -72,7 +72,7 @@ Configuration-wise, you'll need to set up the peripheral as per your MCU's datas
The following configuration values depend on the specific MCU in use.
### I2Cv1 :id=i2cv1
### I2Cv1 :id=arm-configuration-i2cv1
* STM32F1xx
* STM32F2xx
@ -88,7 +88,7 @@ See [this page](https://www.playembedded.org/blog/stm32-i2c-chibios/#7_I2Cv1_con
|`I2C1_CLOCK_SPEED` |`100000` |
|`I2C1_DUTY_CYCLE` |`STD_DUTY_CYCLE`|
### I2Cv2 :id=i2cv2
### I2Cv2 :id=arm-configuration-i2cv2
* STM32F0xx
* STM32F3xx
@ -105,9 +105,9 @@ See [this page](https://www.playembedded.org/blog/stm32-i2c-chibios/#8_I2Cv2_I2C
|`I2C1_TIMINGR_SCLH` |`38U` |
|`I2C1_TIMINGR_SCLL` |`129U` |
## Functions :id=functions
## API :id=api
### `void i2c_init(void)`
### `void i2c_init(void)` :id=api-i2c-init
Initialize the I2C driver. This function must be called only once, before any of the below functions can be called.
@ -126,28 +126,28 @@ void i2c_init(void) {
---
### `i2c_status_t i2c_start(uint8_t address, uint16_t timeout)`
### `i2c_status_t i2c_start(uint8_t address, uint16_t timeout)` :id=api-i2c-start
Start an I2C transaction.
#### Arguments
#### Arguments :id=api-i2c-start-arguments
- `uint8_t address`
The 7-bit I2C address of the device (ie. without the read/write bit - this will be set automatically).
- `uint16_t timeout`
The time in milliseconds to wait for a response from the target device.
#### Return Value
#### Return Value :id=api-i2c-start-return
`I2C_STATUS_TIMEOUT` if the timeout period elapses, `I2C_STATUS_ERROR` if some other error occurs, otherwise `I2C_STATUS_SUCCESS`.
---
### `i2c_status_t i2c_transmit(uint8_t address, uint8_t *data, uint16_t length, uint16_t timeout)`
### `i2c_status_t i2c_transmit(uint8_t address, uint8_t *data, uint16_t length, uint16_t timeout)` :id=api-i2c-transmit
Send multiple bytes to the selected I2C device.
#### Arguments
#### Arguments :id=api-i2c-transmit-arguments
- `uint8_t address`
The 7-bit I2C address of the device.
@ -158,17 +158,17 @@ Send multiple bytes to the selected I2C device.
- `uint16_t timeout`
The time in milliseconds to wait for a response from the target device.
#### Return Value
#### Return Value :id=api-i2c-transmit-return
`I2C_STATUS_TIMEOUT` if the timeout period elapses, `I2C_STATUS_ERROR` if some other error occurs, otherwise `I2C_STATUS_SUCCESS`.
---
### `i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout)`
### `i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout)` :id=api-i2c-receive
Receive multiple bytes from the selected I2C device.
#### Arguments
#### Arguments :id=api-i2c-receive-arguments
- `uint8_t address`
The 7-bit I2C address of the device.
@ -179,17 +179,17 @@ Receive multiple bytes from the selected I2C device.
- `uint16_t timeout`
The time in milliseconds to wait for a response from the target device.
#### Return Value
#### Return Value :id=api-i2c-receive-return
`I2C_STATUS_TIMEOUT` if the timeout period elapses, `I2C_STATUS_ERROR` if some other error occurs, otherwise `I2C_STATUS_SUCCESS`.
---
### `i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout)`
### `i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout)` :id=api-i2c-writereg
Writes to a register with an 8-bit address on the I2C device.
#### Arguments
#### Arguments :id=api-i2c-writereg-arguments
- `uint8_t devaddr`
The 7-bit I2C address of the device.
@ -202,17 +202,17 @@ Writes to a register with an 8-bit address on the I2C device.
- `uint16_t timeout`
The time in milliseconds to wait for a response from the target device.
#### Return Value
#### Return Value :id=api-i2c-writereg-return
`I2C_STATUS_TIMEOUT` if the timeout period elapses, `I2C_STATUS_ERROR` if some other error occurs, otherwise `I2C_STATUS_SUCCESS`.
---
### `i2c_status_t i2c_writeReg16(uint8_t devaddr, uint16_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout)`
### `i2c_status_t i2c_writeReg16(uint8_t devaddr, uint16_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout)` :id=api-i2c-writereg16
Writes to a register with a 16-bit address (big endian) on the I2C device.
#### Arguments
#### Arguments :id=api-i2c-writereg16-arguments
- `uint8_t devaddr`
The 7-bit I2C address of the device.
@ -225,17 +225,17 @@ Writes to a register with a 16-bit address (big endian) on the I2C device.
- `uint16_t timeout`
The time in milliseconds to wait for a response from the target device.
#### Return Value
#### Return Value :id=api-i2c-writereg16-return
`I2C_STATUS_TIMEOUT` if the timeout period elapses, `I2C_STATUS_ERROR` if some other error occurs, otherwise `I2C_STATUS_SUCCESS`.
---
### `i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout)`
### `i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout)` :id=api-i2c-readreg
Reads from a register with an 8-bit address on the I2C device.
#### Arguments
#### Arguments :id=api-i2c-readreg-arguments
- `uint8_t devaddr`
The 7-bit I2C address of the device.
@ -246,7 +246,7 @@ Reads from a register with an 8-bit address on the I2C device.
- `uint16_t timeout`
The time in milliseconds to wait for a response from the target device.
#### Return Value
#### Return Value :id=api-i2c-readreg-return
`I2C_STATUS_TIMEOUT` if the timeout period elapses, `I2C_STATUS_ERROR` if some other error occurs, otherwise `I2C_STATUS_SUCCESS`.
@ -256,7 +256,7 @@ Reads from a register with an 8-bit address on the I2C device.
Reads from a register with a 16-bit address (big endian) on the I2C device.
#### Arguments
#### Arguments :id=api-i2c-readreg16-arguments
- `uint8_t devaddr`
The 7-bit I2C address of the device.
@ -267,12 +267,12 @@ Reads from a register with a 16-bit address (big endian) on the I2C device.
- `uint16_t timeout`
The time in milliseconds to wait for a response from the target device.
#### Return Value
#### Return Value :id=api-i2c-readreg16-return
`I2C_STATUS_TIMEOUT` if the timeout period elapses, `I2C_STATUS_ERROR` if some other error occurs, otherwise `I2C_STATUS_SUCCESS`.
---
### `i2c_status_t i2c_stop(void)`
### `i2c_status_t i2c_stop(void)` :id=api-i2c-stop
Stop the current I2C transaction.

+ 2
- 2
docs/ja/data_driven_config.md View File

@ -109,8 +109,8 @@ QMK が完全な `info.json` を生成するときはいつでも、`config.h`
パズルの最後のピースは、ビルドシステムに新しいオプションを提供することです。
これは、2つのファイルを生成することによって行われます。
* `.build/obj_<keyboard>/src/info_config.h`
* `.build/obj_<keyboard>/src/rules.mk`
* `.build/obj_<keyboard>_<keymap>/src/info_config.h`
* `.build/obj_<keyboard>_<keymap>/src/rules.mk`
この2つのファイルは、次のコードによって生成されます。


+ 1
- 0
docs/pr_checklist.md View File

@ -132,6 +132,7 @@ https://github.com/qmk/qmk_firmware/pulls?q=is%3Apr+is%3Aclosed+label%3Akeyboard
- if using `MO(1)` and `MO(2)` keycodes together to access a third layer, the [Tri Layer](https://docs.qmk.fm/#/feature_tri_layer) feature should be used, rather than manually implementing this using `layer_on/off()` and `update_tri_layer()` functions in the keymap's `process_record_user()`.
- default (and via) keymaps should be "pristine"
- bare minimum to be used as a "clean slate" for another user to develop their own user-specific keymap
- what does pristine mean? no custom keycodes. no advanced features like tap dance or macros. basic mod taps and home row mods would be acceptable where their use is necessary
- standard layouts preferred in these keymaps, if possible
- should use [encoder map feature](https://docs.qmk.fm/#/feature_encoders?id=encoder-map), rather than `encoder_update_user()`
- default keymap should not enable VIA -- the VIA integration documentation requires a keymap called `via`


+ 2
- 0
docs/quantum_keycodes.md View File

@ -15,3 +15,5 @@ On this page we have documented keycodes between `0x00FF` and `0xFFFF` which are
|`QK_CLEAR_EEPROM`|`EE_CLR` |Reinitializes the keyboard's EEPROM (persistent memory) |
|`QK_MAKE` | |Sends `qmk compile -kb (keyboard) -km (keymap)`, or `qmk flash` if shift is held. Puts keyboard into bootloader mode if shift & control are held |
|`QK_REBOOT` |`QK_RBT` |Resets the keyboard. Does not load the bootloader |
!> Note: `QK_MAKE` requires `#define ENABLE_COMPILE_KEYCODE` in your config.h to function.

+ 1
- 1
docs/quantum_painter.md View File

@ -40,7 +40,7 @@ Supported devices:
| `QUANTUM_PAINTER_NUM_FONTS` | `4` | The maximum number of fonts that can be loaded at any one time. |
| `QUANTUM_PAINTER_CONCURRENT_ANIMATIONS` | `4` | The maximum number of animations that can be executed at the same time. |
| `QUANTUM_PAINTER_LOAD_FONTS_TO_RAM` | `FALSE` | Whether or not fonts should be loaded to RAM. Relevant for fonts stored in off-chip persistent storage, such as external flash. |
| `QUANTUM_PAINTER_PIXDATA_BUFFER_SIZE` | `32` | The limit of the amount of pixel data that can be transmitted in one transaction to the display. Higher values require more RAM on the MCU. |
| `QUANTUM_PAINTER_PIXDATA_BUFFER_SIZE` | `1024` | The limit of the amount of pixel data that can be transmitted in one transaction to the display. Higher values require more RAM on the MCU. |
| `QUANTUM_PAINTER_SUPPORTS_256_PALETTE` | `FALSE` | If 256-color palettes are supported. Requires significantly more RAM on the MCU. |
| `QUANTUM_PAINTER_SUPPORTS_NATIVE_COLORS` | `FALSE` | If native color range is supported. Requires significantly more RAM on the MCU. |
| `QUANTUM_PAINTER_DEBUG` | _unset_ | Prints out significant amounts of debugging information to CONSOLE output. Significant performance degradation, use only for debugging. |


+ 20
- 20
docs/spi_driver.md View File

@ -1,8 +1,8 @@
# SPI Master Driver
# SPI Master Driver :id=spi-master-driver
The SPI Master drivers used in QMK have a set of common functions to allow portability between MCUs.
## AVR Configuration
## AVR Configuration :id=avr-configuration
No special setup is required - just connect the `SS`, `SCK`, `MOSI` and `MISO` pins of your SPI devices to the matching pins on the MCU:
@ -16,7 +16,7 @@ No special setup is required - just connect the `SS`, `SCK`, `MOSI` and `MISO` p
You may use more than one slave select pin, not just the `SS` pin. This is useful when you have multiple devices connected and need to communicate with them individually.
`SPI_SS_PIN` can be passed to `spi_start()` to refer to `SS`.
## ChibiOS/ARM Configuration
## ChibiOS/ARM Configuration :id=arm-configuration
You'll need to determine which pins can be used for SPI -- as an example, STM32 parts generally have multiple SPI peripherals, labeled SPI1, SPI2, SPI3 etc.
@ -49,19 +49,19 @@ Configuration-wise, you'll need to set up the peripheral as per your MCU's datas
As per the AVR configuration, you may choose any other standard GPIO as a slave select pin, which should be supplied to `spi_start()`.
## Functions
## API :id=api
### `void spi_init(void)`
### `void spi_init(void)` :id=api-spi-init
Initialize the SPI driver. This function must be called only once, before any of the below functions can be called.
---
### `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)` :id=api-spi-start
Start an SPI transaction.
#### Arguments
#### Arguments :id=api-spi-start-arguments
- `pin_t slavePin`
The QMK pin to assert as the slave select pin, eg. `B4`.
@ -80,71 +80,71 @@ Start an SPI transaction.
- `uint16_t divisor`
The SPI clock divisor, will be rounded up to the nearest power of two. This number can be calculated by dividing the MCU's clock speed by the desired SPI clock speed. For example, an MCU running at 8 MHz wanting to talk to an SPI device at 4 MHz would set the divisor to `2`.
#### Return Value
#### Return Value :id=api-spi-start-return
`false` if the supplied parameters are invalid or the SPI peripheral is already in use, or `true`.
---
### `spi_status_t spi_write(uint8_t data)`
### `spi_status_t spi_write(uint8_t data)` :id=api-spi-write
Write a byte to the selected SPI device.
#### Arguments
#### Arguments :id=api-spi-write-arguments
- `uint8_t data`
The byte to write.
#### Return Value
#### Return Value :id=api-spi-write-return
`SPI_STATUS_TIMEOUT` if the timeout period elapses, or `SPI_STATUS_SUCCESS`.
---
### `spi_status_t spi_read(void)`
### `spi_status_t spi_read(void)` :id=api-spi-read
Read a byte from the selected SPI device.
#### Return Value
#### Return Value :id=api-spi-read-return
`SPI_STATUS_TIMEOUT` if the timeout period elapses, or the byte read from the device.
---
### `spi_status_t spi_transmit(const uint8_t *data, uint16_t length)`
### `spi_status_t spi_transmit(const uint8_t *data, uint16_t length)` :id=api-spi-transmit
Send multiple bytes to the selected SPI device.
#### Arguments
#### Arguments :id=api-spi-transmit-arguments
- `const uint8_t *data`
A pointer to the data to write from.
- `uint16_t length`
The number of bytes to write. Take care not to overrun the length of `data`.
#### Return Value
#### Return Value :id=api-spi-transmit-return
`SPI_STATUS_TIMEOUT` if the timeout period elapses, `SPI_STATUS_ERROR` if some other error occurs, otherwise `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)` :id=api-spi-receive
Receive multiple bytes from the selected SPI device.
#### Arguments
#### Arguments :id=api-spi-receive-arguments
- `uint8_t *data`
A pointer to the buffer to read into.
- `uint16_t length`
The number of bytes to read. Take care not to overrun the length of `data`.
#### Return Value
#### Return Value :id=api-spi-receive-return
`SPI_STATUS_TIMEOUT` if the timeout period elapses, `SPI_STATUS_ERROR` if some other error occurs, otherwise `SPI_STATUS_SUCCESS`.
---
### `void spi_stop(void)`
### `void spi_stop(void)` :id=api-spi-stop
End the current SPI transaction. This will deassert the slave select pin and reset the endianness, mode and divisor configured by `spi_start()`.

+ 15
- 0
docs/squeezing_avr.md View File

@ -88,6 +88,21 @@ Or if you're not using layers at all, you can outright remove the functionality
#define NO_ACTION_LAYER
```
## Magic keycodes
There are two `__attribute__ ((weak))` placeholder functions available to customize magic keycodes. If you are not using that feature to swap keycodes, such as backslash with backspace, add the following to your `keymap.c` or user space code:
```c
uint16_t keycode_config(uint16_t keycode) {
return keycode;
}
```
Likewise, if you are not using magic keycodes to swap modifiers, such as Control with GUI, add the following to your `keymap.c` or user space code:
```c
uint8_t mod_config(uint8_t mod) {
return mod;
}
```
Both of them will overwrite the placeholder functions with a simple return statement to reduce firmware size.
## OLED tweaks


+ 25
- 0
docs/tap_hold.md View File

@ -460,6 +460,31 @@ bool get_retro_tapping(uint16_t keycode, keyrecord_t *record) {
}
```
If the programs you use bind an action to taps of modifier keys (e.g. tapping left GUI to bring up the applications menu or tapping left Alt to focus the menu bar), you may find that using retro-tapping falsely triggers those actions. To counteract this, you can define a `DUMMY_MOD_NEUTRALIZER_KEYCODE` in `config.h` that will get sent in between the register and unregister events of a held mod-tap key. That way, the programs on your computer will no longer interpret the mod suppression induced by retro-tapping as a lone tap of a modifier key and will thus not falsely trigger the undesired action.
Naturally, for this technique to be effective, you must choose a `DUMMY_MOD_NEUTRALIZER_KEYCODE` for which no keyboard shortcuts are bound to. Recommended values are: `KC_RIGHT_CTRL` or `KC_F18`.
Please note that `DUMMY_MOD_NEUTRALIZER_KEYCODE` must be a basic, unmodified, HID keycode so values like `KC_NO`, `KC_TRANSPARENT` or `KC_PIPE` aka `S(KC_BACKSLASH)` are not permitted.
By default, only left Alt and left GUI are neutralized. If you want to change the list of applicable modifier masks, use the following in your `config.h`:
```c
#define MODS_TO_NEUTRALIZE { <mod_mask_1>, <mod_mask_2>, ... }
```
Examples:
```c
#define DUMMY_MOD_NEUTRALIZER_KEYCODE KC_RIGHT_CTRL
// Neutralize left alt and left GUI (Default value)
#define MODS_TO_NEUTRALIZE { MOD_BIT(KC_LEFT_ALT), MOD_BIT(KC_LEFT_GUI) }
// Neutralize left alt, left GUI, right GUI and left Control+Shift
#define MODS_TO_NEUTRALIZE { MOD_BIT(KC_LEFT_ALT), MOD_BIT(KC_LEFT_GUI), MOD_BIT(KC_RIGHT_GUI), MOD_BIT(KC_LEFT_CTRL)|MOD_BIT(KC_LEFT_SHIFT) }
```
!> Do not use `MOD_xxx` constants like `MOD_LSFT` or `MOD_RALT`, since they're 5-bit packed bit-arrays while `MODS_TO_NEUTRALIZE` expects a list of 8-bit packed bit-arrays. Use `MOD_BIT(<kc>)` or `MOD_MASK_xxx` instead.
### Retro Shift
[Auto Shift,](feature_auto_shift.md) has its own version of `retro tapping` called `retro shift`. It is extremely similar to `retro tapping`, but holding the key past `AUTO_SHIFT_TIMEOUT` results in the value it sends being shifted. Other configurations also affect it differently; see [here](feature_auto_shift.md#retro-shift) for more information.


+ 16
- 16
docs/uart_driver.md View File

@ -1,10 +1,10 @@
# UART Driver
# UART Driver :id=uart-driver
The UART drivers used in QMK have a set of common functions to allow portability between MCUs.
Currently, this driver does not support enabling hardware flow control (the `RTS` and `CTS` pins) if available, but may do so in future.
## AVR Configuration
## AVR Configuration :id=avr-configuration
No special setup is required - just connect the `RX` and `TX` pins of your UART device to the opposite pins on the MCU:
@ -16,7 +16,7 @@ No special setup is required - just connect the `RX` and `TX` pins of your UART
|ATmega32A |`D1`|`D0`|*n/a*|*n/a*|
|ATmega328/P |`D1`|`D0`|*n/a*|*n/a*|
## ChibiOS/ARM Configuration
## ChibiOS/ARM Configuration :id=arm-configuration
You'll need to determine which pins can be used for UART -- as an example, STM32 parts generally have multiple UART peripherals, labeled USART1, USART2, USART3 etc.
@ -47,45 +47,45 @@ Configuration-wise, you'll need to set up the peripheral as per your MCU's datas
|`#define SD1_RTS_PIN` |The pin to use for RTS |`A12` |
|`#define SD1_RTS_PAL_MODE`|The alternate function mode for RTS |`7` |
## Functions
## API :id=api
### `void uart_init(uint32_t baud)`
### `void uart_init(uint32_t baud)` :id=api-uart-init
Initialize the UART driver. This function must be called only once, before any of the below functions can be called.
#### Arguments
#### Arguments :id=api-uart-init-arguments
- `uint32_t baud`
The baud rate to transmit and receive at. This may depend on the device you are communicating with. Common values are 1200, 2400, 4800, 9600, 19200, 38400, 57600, and 115200.
---
### `void uart_write(uint8_t data)`
### `void uart_write(uint8_t data)` :id=api-uart-write
Transmit a single byte.
#### Arguments
#### Arguments :id=api-uart-write-arguments
- `uint8_t data`
The byte to write.
---
### `uint8_t uart_read(void)`
### `uint8_t uart_read(void)` :id=api-uart-read
Receive a single byte.
#### Return Value
#### Return Value :id=api-uart-read-return
The byte read from the receive buffer. This function will block if the buffer is empty (ie. no data to read).
---
### `void uart_transmit(const uint8_t *data, uint16_t length)`
### `void uart_transmit(const uint8_t *data, uint16_t length)` :id=api-uart-transmit
Transmit multiple bytes.
#### Arguments
#### Arguments :id=api-uart-transmit-arguments
- `const uint8_t *data`
A pointer to the data to write from.
@ -94,11 +94,11 @@ Transmit multiple bytes.
---
### `void uart_receive(char *data, uint16_t length)`
### `void uart_receive(char *data, uint16_t length)` :id=api-uart-receive
Receive multiple bytes.
#### Arguments
#### Arguments :id=api-uart-receive-arguments
- `uint8_t *data`
A pointer to the buffer to read into.
@ -107,10 +107,10 @@ Receive multiple bytes.
---
### `bool uart_available(void)`
### `bool uart_available(void)` :id=api-uart-available
Return whether the receive buffer contains data. Call this function to determine if `uart_read()` will return data immediately.
#### Return Value
#### Return Value :id=api-uart-available-return
`true` if the receive buffer length is non-zero.

quantum/backlight/backlight_software.c → drivers/backlight/backlight_software.c View File

@ -1,6 +1,6 @@
#include "quantum.h"
#include "backlight.h"
#include "backlight_driver_common.h"
#include "util.h"
#ifdef BACKLIGHT_BREATHING
# error "Backlight breathing is not available for software PWM. Please disable."

+ 1
- 1
drivers/led/apa102.c View File

@ -16,7 +16,7 @@
*/
#include "apa102.h"
#include "quantum.h"
#include "gpio.h"
#ifndef APA102_NOPS
# if defined(__AVR__)


+ 4
- 2
drivers/led/issi/is31fl3733-simple.c View File

@ -193,8 +193,9 @@ void IS31FL3733_init(uint8_t addr, uint8_t sync) {
}
void IS31FL3733_set_value(int index, uint8_t value) {
is31_led led;
if (index >= 0 && index < LED_MATRIX_LED_COUNT) {
is31_led led = g_is31_leds[index];
memcpy_P(&led, (&g_is31_leds[index]), sizeof(led));
if (g_pwm_buffer[led.driver][led.v] == value) {
return;
@ -211,7 +212,8 @@ void IS31FL3733_set_value_all(uint8_t value) {
}
void IS31FL3733_set_led_control_register(uint8_t index, bool value) {
is31_led led = g_is31_leds[index];
is31_led led;
memcpy_P(&led, (&g_is31_leds[index]), sizeof(led));
uint8_t control_register = led.v / 8;
uint8_t bit_value = led.v % 8;


+ 1
- 1
drivers/led/issi/is31fl3733-simple.h View File

@ -30,7 +30,7 @@ typedef struct is31_led {
uint8_t v;
} __attribute__((packed)) is31_led;
extern const is31_led __flash g_is31_leds[LED_MATRIX_LED_COUNT];
extern const is31_led PROGMEM g_is31_leds[LED_MATRIX_LED_COUNT];
void IS31FL3733_init(uint8_t addr, uint8_t sync);
bool IS31FL3733_write_register(uint8_t addr, uint8_t reg, uint8_t data);


+ 15
- 7
drivers/led/issi/is31flcommon.c View File

@ -133,11 +133,14 @@ void IS31FL_common_update_pwm_register(uint8_t addr, uint8_t index) {
#ifdef ISSI_MANUAL_SCALING
void IS31FL_set_manual_scaling_buffer(void) {
is31_led led;
is31_led scale;
for (int i = 0; i < ISSI_MANUAL_SCALING; i++) {
is31_led scale = g_is31_scaling[i];
memcpy_P(&scale, (&g_is31_scaling[i]), sizeof(scale));
# ifdef RGB_MATRIX_ENABLE
if (scale.driver >= 0 && scale.driver < RGB_MATRIX_LED_COUNT) {
is31_led led = g_is31_leds[scale.driver];
memcpy_P(&led, (&g_is31_leds[scale.driver]), sizeof(led));
if (g_scaling_buffer[led.driver][led.r] = scale.r && g_scaling_buffer[led.driver][led.g] = scale.g && g_scaling_buffer[led.driver][led.b] = scale.b) {
return;
@ -147,7 +150,7 @@ void IS31FL_set_manual_scaling_buffer(void) {
g_scaling_buffer[led.driver][led.b] = scale.b;
# elif defined(LED_MATRIX_ENABLE)
if (scale.driver >= 0 && scale.driver < LED_MATRIX_LED_COUNT) {
is31_led led = g_is31_leds[scale.driver];
memcpy_P(&led, (&g_is31_leds[scale.driver]), sizeof(led));
if (g_scaling_buffer[led.driver][led.v] == scale.v) {
return;
@ -175,7 +178,8 @@ void IS31FL_common_update_scaling_register(uint8_t addr, uint8_t index) {
// Colour is set by adjusting PWM register
void IS31FL_RGB_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
if (index >= 0 && index < RGB_MATRIX_LED_COUNT) {
is31_led led = g_is31_leds[index];
is31_led led;
memcpy_P(&led, (&g_is31_leds[index]), sizeof(led));
g_pwm_buffer[led.driver][led.r] = red;
g_pwm_buffer[led.driver][led.g] = green;
@ -192,7 +196,8 @@ void IS31FL_RGB_set_color_all(uint8_t red, uint8_t green, uint8_t blue) {
// Setup Scaling register that decides the peak current of each LED
void IS31FL_RGB_set_scaling_buffer(uint8_t index, bool red, bool green, bool blue) {
is31_led led = g_is31_leds[index];
is31_led led;
memcpy_P(&led, (&g_is31_leds[index]), sizeof(led));
if (red) {
g_scaling_buffer[led.driver][led.r] = ISSI_SCAL_RED;
} else {
@ -214,7 +219,8 @@ void IS31FL_RGB_set_scaling_buffer(uint8_t index, bool red, bool green, bool blu
#elif defined(LED_MATRIX_ENABLE)
// LED Matrix Specific scripts
void IS31FL_simple_set_scaling_buffer(uint8_t index, bool value) {
is31_led led = g_is31_leds[index];
is31_led led;
memcpy_P(&led, (&g_is31_leds[index]), sizeof(led));
if (value) {
g_scaling_buffer[led.driver][led.v] = ISSI_SCAL_LED;
} else {
@ -225,7 +231,9 @@ void IS31FL_simple_set_scaling_buffer(uint8_t index, bool value) {
void IS31FL_simple_set_brightness(int index, uint8_t value) {
if (index >= 0 && index < LED_MATRIX_LED_COUNT) {
is31_led led = g_is31_leds[index];
is31_led led;
memcpy_P(&led, (&g_is31_leds[index]), sizeof(led));
g_pwm_buffer[led.driver][led.v] = value;
g_pwm_buffer_update_required[led.driver] = true;
}


+ 3
- 3
drivers/led/issi/is31flcommon.h View File

@ -43,7 +43,7 @@ typedef struct is31_led {
uint8_t b;
} __attribute__((packed)) is31_led;
extern const is31_led __flash g_is31_leds[RGB_MATRIX_LED_COUNT];
extern const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT];
#elif defined(LED_MATRIX_ENABLE)
typedef struct is31_led {
@ -51,11 +51,11 @@ typedef struct is31_led {
uint8_t v;
} __attribute__((packed)) is31_led;
extern const is31_led __flash g_is31_leds[LED_MATRIX_LED_COUNT];
extern const is31_led PROGMEM g_is31_leds[LED_MATRIX_LED_COUNT];
#endif
#ifdef ISSI_MANUAL_SCALING
extern const is31_led __flash g_is31_scaling[];
extern const is31_led PROGMEM g_is31_scaling[];
void IS31FL_set_manual_scaling_buffer(void);
#endif


+ 2
- 2
drivers/painter/ili9xxx/qp_ili9xxx_opcodes.h View File

@ -19,8 +19,8 @@
#define ILI9XXX_CMD_SLEEP_OFF 0x11 // Exist sleep mode
#define ILI9XXX_CMD_PARTIAL_ON 0x12 // Enter partial mode
#define ILI9XXX_CMD_PARTIAL_OFF 0x13 // Exit partial mode
#define ILI9XXX_CMD_INVERT_ON 0x20 // Enter inverted mode
#define ILI9XXX_CMD_INVERT_OFF 0x21 // Exit inverted mode
#define ILI9XXX_CMD_INVERT_OFF 0x20 // Exit inverted mode
#define ILI9XXX_CMD_INVERT_ON 0x21 // Enter inverted mode
#define ILI9XXX_SET_GAMMA 0x26 // Set gamma params
#define ILI9XXX_CMD_DISPLAY_OFF 0x28 // Disable display
#define ILI9XXX_CMD_DISPLAY_ON 0x29 // Enable display


+ 4
- 5
drivers/ps2/ps2_mouse.c View File

@ -191,13 +191,12 @@ static inline void ps2_mouse_convert_report_to_hid(report_mouse_t *mouse_report)
#ifdef PS2_MOUSE_INVERT_BUTTONS
// swap left & right buttons
uint8_t needs_left = mouse_report->buttons & PS2_MOUSE_BTN_RIGHT;
uint8_t needs_right = mouse_report->buttons & PS2_MOUSE_BTN_LEFT;
mouse_report->buttons = (mouse_report->buttons & ~(PS2_MOUSE_BTN_MASK)) | (needs_left ? PS2_MOUSE_BTN_LEFT : 0) | (needs_right ? PS2_MOUSE_BTN_RIGHT : 0);
#else
bool needs_left = mouse_report->buttons & (1 << PS2_MOUSE_BTN_RIGHT);
bool needs_right = mouse_report->buttons & (1 << PS2_MOUSE_BTN_LEFT);
mouse_report->buttons = (mouse_report->buttons & ~((1 << PS2_MOUSE_BTN_LEFT) | (1 << PS2_MOUSE_BTN_RIGHT))) | (needs_left << PS2_MOUSE_BTN_LEFT) | (needs_right << PS2_MOUSE_BTN_RIGHT);
#endif
// remove sign and overflow flags
mouse_report->buttons &= PS2_MOUSE_BTN_MASK;
#endif
#ifdef PS2_MOUSE_INVERT_X
mouse_report->x = -mouse_report->x;


+ 1
- 1
drivers/sensors/pmw33xx_common.h View File

@ -10,7 +10,7 @@
#pragma once
#include "quantum.h" //to get is_keyboard_left
#include "keyboard.h"
#include <stdint.h>
#include "spi_master.h"
#include "util.h"


+ 0
- 1
keyboards/0_sixty/underglow/config.h View File

@ -18,7 +18,6 @@
/* underglow */
#define RGBLED_NUM 24
#define RGBLIGHT_EFFECT_BREATHING
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL


+ 1
- 0
keyboards/0_sixty/underglow/info.json View File

@ -10,6 +10,7 @@
"pin": "B6"
},
"rgblight": {
"led_count": 24,
"max_brightness": 185
}
}

+ 0
- 7
keyboards/0xcb/1337/config.h View File

@ -18,13 +18,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// clang-format off
#define TAP_CODE_DELAY 10
#define RGBLED_NUM 4
#define RGBLIGHT_HUE_STEP 8
#define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8
#define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
#define RGBLIGHT_EFFECT_BREATHING
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL


+ 9
- 0
keyboards/0xcb/1337/info.json View File

@ -18,9 +18,18 @@
{"pin_a": "F6", "pin_b": "F5"}
]
},
"qmk": {
"tap_keycode_delay": 10
},
"qmk_lufa_bootloader": {
"led": "B0"
},
"rgblight": {
"saturation_steps": 8,
"brightness_steps": 8,
"led_count": 4,
"sleep": true
},
"ws2812": {
"pin": "D3"
},


+ 0
- 2
keyboards/0xcb/static/config.h View File

@ -16,8 +16,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#define TAP_CODE_DELAY 10
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */


+ 3
- 0
keyboards/0xcb/static/info.json View File

@ -18,6 +18,9 @@
{"pin_a": "D0", "pin_b": "D1"}
]
},
"qmk": {
"tap_keycode_delay": 10
},
"processor": "atmega328p",
"bootloader": "usbasploader",
"layout_aliases": {


+ 0
- 7
keyboards/0xcb/tutelpad/config.h View File

@ -16,13 +16,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
#define RGBLED_NUM 4 // Number of LEDs connected
#define RGBLIGHT_HUE_STEP 10 // The number of steps to cycle through the hue by
#define RGBLIGHT_SAT_STEP 17 // The number of steps to increment the saturation by
#define RGBLIGHT_VAL_STEP 17 // The number of steps to increment the brightness by
#define RGBLIGHT_SLEEP // RGB will switch off when host goes to sleep
#define RGBLIGHT_EFFECT_BREATHING // Enable all additional RGB animation modes
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL


+ 5
- 0
keyboards/0xcb/tutelpad/info.json View File

@ -11,6 +11,11 @@
"bootmagic": {
"matrix": [1, 0]
},
"rgblight": {
"hue_steps": 10,
"led_count": 4,
"sleep": true
},
"ws2812": {
"pin": "D3"
},


+ 0
- 2
keyboards/10bleoledhub/config.h View File

@ -18,8 +18,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.*/
#define SSD1306OLED
#define RGBLED_NUM 4
#define RGBLIGHT_EFFECT_BREATHING
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL


+ 3
- 0
keyboards/10bleoledhub/info.json View File

@ -8,6 +8,9 @@
"pid": "0x7C99",
"device_version": "0.0.1"
},
"rgblight": {
"led_count": 4
},
"ws2812": {
"pin": "B7"
},


+ 0
- 2
keyboards/1k/config.h View File

@ -15,8 +15,6 @@
*/
#pragma once
#define RGBLED_NUM 1
// Save as much space as we can...
#define LAYER_STATE_8BIT
#define NO_ACTION_LAYER


+ 3
- 0
keyboards/1k/info.json View File

@ -8,6 +8,9 @@
"pid": "0x0001",
"device_version": "0.0.1"
},
"rgblight": {
"led_count": 1
},
"ws2812": {
"pin": "B2"
},


+ 0
- 5
keyboards/1upkeyboards/1up60hse/config.h View File

@ -27,11 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGBLIGHT_EFFECT_RGB_TEST
#define RGBLIGHT_EFFECT_ALTERNATING
#define RGBLIGHT_EFFECT_TWINKLE
#define RGBLED_NUM 14
#define RGBLIGHT_HUE_STEP 8
#define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8
#define RGBLIGHT_SLEEP
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE


+ 6
- 0
keyboards/1upkeyboards/1up60hse/info.json View File

@ -18,6 +18,12 @@
"levels": 5,
"breathing": true
},
"rgblight": {
"saturation_steps": 8,
"brightness_steps": 8,
"led_count": 14,
"sleep": true
},
"ws2812": {
"pin": "F0"
},


+ 0
- 4
keyboards/1upkeyboards/1up60hte/config.h View File

@ -34,7 +34,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGBLIGHT_EFFECT_RGB_TEST
#define RGBLIGHT_EFFECT_ALTERNATING
#define RGBLIGHT_EFFECT_TWINKLE
#define RGBLED_NUM 14
#define RGBLIGHT_HUE_STEP 8
#define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8

+ 5
- 0
keyboards/1upkeyboards/1up60hte/info.json View File

@ -20,6 +20,11 @@
"caps_lock": "B6",
"on_state": 0
},
"rgblight": {
"saturation_steps": 8,
"brightness_steps": 8,
"led_count": 14
},
"ws2812": {
"pin": "F0"
},


+ 0
- 4
keyboards/1upkeyboards/1up60rgb/config.h View File

@ -16,7 +16,3 @@
#define RGBLIGHT_EFFECT_RGB_TEST
#define RGBLIGHT_EFFECT_ALTERNATING
#define RGBLIGHT_EFFECT_TWINKLE
#define RGBLED_NUM 16
#define RGBLIGHT_HUE_STEP 8
#define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8

+ 5
- 0
keyboards/1upkeyboards/1up60rgb/info.json View File

@ -17,6 +17,11 @@
"pin": "B6",
"levels": 5
},
"rgblight": {
"saturation_steps": 8,
"brightness_steps": 8,
"led_count": 16
},
"ws2812": {
"pin": "E2"
},


+ 3
- 2
keyboards/1upkeyboards/1up60rgb/keymaps/default/keymap.c View File

@ -18,12 +18,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
void led_set_user(uint8_t usb_led) {
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
bool led_update_user(led_t led_state) {
if (led_state.caps_lock) {
setPinOutput(B2);
writePinLow(B2);
} else {
setPinInput(B2);
writePinLow(B2);
}
return false;
}

+ 3
- 2
keyboards/1upkeyboards/1up60rgb/keymaps/iso/keymap.c View File

@ -18,12 +18,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
void led_set_user(uint8_t usb_led) {
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
bool led_update_user(led_t led_state) {
if (led_state.caps_lock) {
setPinOutput(B2);
writePinLow(B2);
} else {
setPinInput(B2);
writePinLow(B2);
}
return false;
}

+ 3
- 33
keyboards/1upkeyboards/1up60rgb/keymaps/raffle/keymap.c View File

@ -71,42 +71,12 @@ layer_state_t layer_state_set_user(layer_state_t state) {
return update_tri_layer_state(state, _raise, _rgb, _adjust);
}
// scan matrix
void matrix_scan_user(void) {
}
// support for standard mod state keys (caps lock, scroll lock, etc.)
void led_set_user(uint8_t usb_led) {
if (usb_led & (1 << USB_LED_NUM_LOCK)) {
} else {
}
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
bool led_update_user(led_t led_state) {
if (led_state.caps_lock) {
DDRB |= (1 << 2); PORTB &= ~(1 << 2);
} else {
DDRB &= ~(1 << 2); PORTB &= ~(1 << 2);
}
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
} else {
}
if (usb_led & (1 << USB_LED_COMPOSE)) {
} else {
}
if (usb_led & (1 << USB_LED_KANA)) {
} else {
}
return false;
}

+ 3
- 2
keyboards/1upkeyboards/1up60rgb/keymaps/tsangan/keymap.c View File

@ -18,12 +18,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
void led_set_user(uint8_t usb_led) {
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
bool led_update_user(led_t led_state) {
if (led_state.caps_lock) {
setPinOutput(B2);
writePinLow(B2);
} else {
setPinInput(B2);
writePinLow(B2);
}
return false;
}

+ 70
- 0
keyboards/1upkeyboards/1upocarina/config.h View File

@ -0,0 +1,70 @@
/* Copyright 2023 Ziptyze
*
* 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
#define RGB_MATRIX_LED_COUNT 32
#define RGB_MATRIX_KEYPRESSES // reacts to keypresses
# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
// RGB Matrix Animation modes. Explicitly enabled
// For full list of effects, see:
// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects
// # define ENABLE_RGB_MATRIX_ALPHAS_MODS
// # define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
# define ENABLE_RGB_MATRIX_BREATHING
# define ENABLE_RGB_MATRIX_BAND_SAT
# define ENABLE_RGB_MATRIX_BAND_VAL
# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT
# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL
# define ENABLE_RGB_MATRIX_CYCLE_ALL
# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN
# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL
# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL
# define ENABLE_RGB_MATRIX_DUAL_BEACON
# define ENABLE_RGB_MATRIX_RAINBOW_BEACON
# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS
# define ENABLE_RGB_MATRIX_RAINDROPS
# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
# define ENABLE_RGB_MATRIX_HUE_BREATHING
# define ENABLE_RGB_MATRIX_HUE_PENDULUM
# define ENABLE_RGB_MATRIX_HUE_WAVE
// # define ENABLE_RGB_MATRIX_PIXEL_RAIN
// # define ENABLE_RGB_MATRIX_PIXEL_FLOW
// # define ENABLE_RGB_MATRIX_PIXEL_FRACTAL
// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined
# define ENABLE_RGB_MATRIX_TYPING_HEATMAP
// # define ENABLE_RGB_MATRIX_DIGITAL_RAIN
// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
# define ENABLE_RGB_MATRIX_SPLASH
# define ENABLE_RGB_MATRIX_MULTISPLASH
# define ENABLE_RGB_MATRIX_SOLID_SPLASH
# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH

+ 96
- 0
keyboards/1upkeyboards/1upocarina/info.json View File

@ -0,0 +1,96 @@
{
"manufacturer": "1upkeyboards",
"keyboard_name": "1upocarina",
"maintainer": "ziptyze",
"processor": "RP2040",
"bootloader": "rp2040",
"board": "GENERIC_RP_RP2040",
"usb": {
"device_version": "1.0.0",
"pid": "0x5607",
"vid": "0x6F75"
},
"dynamic_keymap": {
"layer_count": 10
},
"features": {
"bootmagic": true,
"command": false,
"console": false,
"encoder": true,
"extrakey": true,
"mousekey": true,
"nkro": false,
"rgb_matrix": true
},
"encoder": {
"enabled": true,
"rotary": [
{
"pin_a": "GP25", "pin_b": "GP26"
}
]
},
"matrix_pins": {
"direct": [
["GP28", "GP29", "GP27", "GP1", "GP2"]
]
},
"ws2812": {
"pin": "GP24"
},
"rgb_matrix": {
"driver": "WS2812",
"layout": [
{ "flags": 4, "matrix": [0, 0], "x": 23, "y": 26 },
{ "flags": 4, "matrix": [0, 1], "x": 62, "y": 26 },
{ "flags": 4, "matrix": [0, 2], "x": 112, "y": 34 },
{ "flags": 4, "matrix": [0, 3], "x": 161, "y": 26 },
{ "flags": 4, "matrix": [0, 4], "x": 200, "y": 26 },
{ "flags": 2, "x": 133, "y": 3 },
{ "flags": 2, "x": 154, "y": 3 },
{ "flags": 2, "x": 174, "y": 3 },
{ "flags": 2, "x": 194, "y": 3 },
{ "flags": 2, "x": 218, "y": 5 },
{ "flags": 2, "x": 221, "y": 19 },
{ "flags": 2, "x": 221, "y": 31 },
{ "flags": 2, "x": 221, "y": 44 },
{ "flags": 2, "x": 217, "y": 58 },
{ "flags": 2, "x": 195, "y": 61 },
{ "flags": 2, "x": 174, "y": 61 },
{ "flags": 2, "x": 154, "y": 61 },
{ "flags": 2, "x": 133, "y": 61 },
{ "flags": 2, "x": 112, "y": 61 },
{ "flags": 2, "x": 91, "y": 61 },
{ "flags": 2, "x": 70, "y": 61 },
{ "flags": 2, "x": 49, "y": 61 },
{ "flags": 2, "x": 28, "y": 61 },
{ "flags": 2, "x": 5, "y": 58 },
{ "flags": 2, "x": 2, "y": 44 },
{ "flags": 2, "x": 2, "y": 31 },
{ "flags": 2, "x": 2, "y": 19 },
{ "flags": 2, "x": 5, "y": 5 },
{ "flags": 2, "x": 28, "y": 3 },
{ "flags": 2, "x": 49, "y": 3 },
{ "flags": 2, "x": 70, "y": 3 },
{ "flags": 2, "x": 91, "y": 3 }
]
},
"layouts": {
"LAYOUT_1x5": {
"layout": [
{ "label": "z", "matrix": [0, 0], "w": 1, "x": 0, "y": 0 },
{ "label": "x", "matrix": [0, 1], "w": 1, "x": 1, "y": 0 },
{ "label": "esc", "matrix": [0, 2], "w": 1, "x": 2, "y": 0 },
{ "label": "c", "matrix": [0, 3], "w": 1, "x": 3, "y": 0 },
{ "label": "v", "matrix": [0, 4], "w": 1, "x": 4, "y": 0 }
]
}
}
}

+ 34
- 0
keyboards/1upkeyboards/1upocarina/keymaps/default/keymap.c View File

@ -0,0 +1,34 @@
/* Copyright 2023 ziptyze
*
* 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_1x5(
KC_Z, KC_X, LT(1, KC_ESC), KC_C, KC_V
),
[1] = LAYOUT_1x5(
RGB_TOG, RGB_MOD, KC_TRNS, RGB_VAD, RGB_VAI
)
};
#if defined(ENCODER_MAP_ENABLE)
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
[0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU)},
[1] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS)}
};
#endif

+ 1
- 0
keyboards/1upkeyboards/1upocarina/keymaps/default/rules.mk View File

@ -0,0 +1 @@
ENCODER_MAP_ENABLE = yes

+ 34
- 0
keyboards/1upkeyboards/1upocarina/keymaps/via/keymap.c View File

@ -0,0 +1,34 @@
/* Copyright 2023 ziptyze
*
* 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_1x5(
KC_Z, KC_X, LT(1, KC_ESC), KC_C, KC_V
),
[1] = LAYOUT_1x5(
RGB_TOG, RGB_MOD, KC_TRNS, RGB_VAD, RGB_VAI
)
};
#if defined(ENCODER_MAP_ENABLE)
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
[0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU)},
[1] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS)}
};
#endif

+ 4
- 0
keyboards/1upkeyboards/1upocarina/keymaps/via/rules.mk View File

@ -0,0 +1,4 @@
VIA_ENABLE = yes
LTO_ENABLE = yes
ENCODER_MAP_ENABLE = yes

+ 22
- 0
keyboards/1upkeyboards/1upocarina/readme.md View File

@ -0,0 +1,22 @@
# 1upocarina
This keyboard is the Ocarina from 1upkeyboards. It is a five button keypad designed for osu. There is an option to add an encoder to the center position, and the keypad features in-switch per-key addressable RGB leds, as well as 27 right angle underglow RGB leds for very bright and smooth lighting effects.
* Keyboard Maintainer: [ziptyze](https://github.com/ziptyze)
Make example for this keyboard (after setting up your build environment):
make 1upkeyboards/1upocarina:default
Flashing example for this keyboard:
make 1upkeyboards/1upocarina: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).
## Bootloader
Enter the bootloader in 2 ways:
* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard
* **Physical reset button**: Hold the button on the back of the PCB and plug in the keyboard

+ 1
- 0
keyboards/1upkeyboards/1upocarina/rules.mk View File

@ -0,0 +1 @@
WS2812_DRIVER = vendor

+ 13
- 0
keyboards/1upkeyboards/pi40/mit_v1_0/keymaps/miketronic/config.h View File

@ -0,0 +1,13 @@
// Copyright 2023 @miketronic -- Mike B <mxb540@gmail.com>
// SPDX-License-Identifier: GPL-2.0+
#pragma once
# define TAPPING_TERM 160
# define TAPPING_TERM_PER_KEY
# define HOLD_ON_OTHER_KEY_PRESS
# define QUICK_TAP_TERM TAPPING_TERM / 2
# define QUICK_TAP_TERM_PER_KEY

+ 290
- 0
keyboards/1upkeyboards/pi40/mit_v1_0/keymaps/miketronic/keymap.c View File

@ -0,0 +1,290 @@
// Copyright 2023 @miketronic -- Mike B <mxb540@gmail.com>
// SPDX-License-Identifier: GPL-2.0+
#include "miketronic.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Workman
*
* TAB Q D R W B J F U P BSPC BSPC
* ESC ESC SYM SYM
*
* TAB A S H T G Y N E O I
* SHIFT EX ENTERENTER
*
* SHIFT| Z X M C V K L SPC SPC / UP |
* , . RIGHT|
*
* FN CTRL OS ALT LOWER RAISE SS CLIP COPY DN
* PASTELEFT
*
*/
[_WM] = LAYOUT_ortho_4x12_wrapper (
RGB_TOG,
_____________WORKMAN_412_001_L_____________, _____________WORKMAN_412_001_R_____________,
_____________WORKMAN_412_002_L_____________, _____________WORKMAN_412_002_R_____________,
_____________WORKMAN_412_003_L_____________, _____________WORKMAN_412_003_R_____________,
_____________WORKMAN_412_004_L_____________, _____________WORKMAN_412_004_R_____________
),
[_QW] = LAYOUT_ortho_4x12_wrapper (
RGB_TOG,
KC_TAB, _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, KC_BSPC,
KC_ESC, _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, KC_QUOT,
KC_LSFT, _________________QWERTY_L3_________________, _________________QWERTY_R3_________________, KC_ENT,
_____________WORKMAN_412_004_L_____________, _____________WORKMAN_412_004_R_____________
),
/* Lower
*
* () [] /\ 7 8 9
*
*
* @ # & % 4 5 6
*
*
* 0 1 2 3 UP
* 0 RIGHT
*
* LOWER BPSC SPC . DN
* ENT LEFT
*
*/
[_LOWER] = LAYOUT_ortho_4x12_wrapper (
KC_MUTE,
_______________LOWER_412_L1________________, _______________LOWER_412_R1________________,
_______________LOWER_412_L2________________, _______________LOWER_412_R2________________,
_______________LOWER_412_L3________________, _______________LOWER_412_R3________________,
_______________LOWER_412_L4________________, _______________LOWER_412_R4________________
),
/* RAISE
*
* BOOT DEBUG MAKE F7 F8 F9 F10
*
*
* RGB | RGB | RGB RGB WM / \ F4 F5 F6 F11
* TOG MOD HUI HUD
*
* RGB RGB RGB RGB QW _ F1 | F2 | F3 F12
* SAI SAD VAI VAD -
*
* RAISE
*
*
*/
[_RAISE] = LAYOUT_ortho_4x12_wrapper (
KC_MUTE,
_______________RAISE_412_L1________________, _______________RAISE_412_R1________________,
_______________RAISE_412_L2________________, _______________RAISE_412_R2________________,
_______________RAISE_412_L3________________, _______________RAISE_412_R3________________,
_________________BLANK_6___________________, _________________BLANK_6___________________
),
/* EXTRAS
*
* ! /\ | [ | ] | ;
*
*
* SHIFT | |EXTRA @ # & % | | ' |
*
*
* , | . | ?
*
*
*
*
*
*/
[_EX] = LAYOUT_ortho_4x12_wrapper (
KC_MUTE,
______________EXTRAS_412_L1________________, ______________EXTRAS_412_R1________________,
______________EXTRAS_412_L2________________, ______________EXTRAS_412_R2________________,
______________EXTRAS_412_L3________________, ______________EXTRAS_412_R3________________,
______________EXTRAS_412_L4________________, ______________EXTRAS_412_R4________________
),
/* FUNCTION
*
* COPY CLIP SS /\ UP DEL
* PASTE
*
* TAB M05 | M06 | M07 M08 LEFT DOWN RIGHT UP
* SHIFT RIGHT
*
* M01 M02 M03 M04 , | . | ? DOWN
* LEFT
*
* RGB1 RGB2 RGB3 RGB4
*
*
*/
[_FN] = LAYOUT_ortho_4x12_wrapper (
KC_MUTE,
_____________FUNCTION_412_L1_______________, _____________FUNCTION_412_R1_______________,
_____________FUNCTION_412_L2_______________, _____________FUNCTION_412_R2_______________,
_____________FUNCTION_412_L3_______________, _____________FUNCTION_412_R3_______________,
_____________FUNCTION_412_L4_______________, _____________FUNCTION_412_R4_______________
),
/* SYMBOLS
*
* | $ | ^ | < | > SYMB SYMB | | [ | ] | - | |
*
*
* | % | : | ; + = ( | ) | _ | |
*
*
* | | & | ' | " | * | # │ │ ! | ? | / | \ | @ | |
*
*
*
*
*
*/
[_SYMB] = LAYOUT_ortho_4x12_wrapper (
KC_MUTE,
_______, _____________SYMBOLS_310_L1________________, _____________SYMBOLS_310_R1________________, _______,
_______, _____________SYMBOLS_310_L2________________, _____________SYMBOLS_310_R2________________, _______,
_______, _____________SYMBOLS_310_L3________________, _____________SYMBOLS_310_R3________________, _______,
_________________BLANK_6___________________, _________________BLANK_6___________________
)
};
#ifndef NUM_DIRECTIONS
# define NUM_DIRECTIONS 2
#endif
#if defined(ENCODER_MAP_ENABLE) && defined(KEYBOARD_1upkeyboards_pi40_mit_v1_0)
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
[_WM] = { ENCODER_CCW_CW(LCTL(KC_V), LCTL(KC_C)) },
[_QW] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
[_LOWER] = { ENCODER_CCW_CW(____, ____) },
[_RAISE] = { ENCODER_CCW_CW(____, ____) },
[_EX] = { ENCODER_CCW_CW(____, ____) },
[_FN] = { ENCODER_CCW_CW(RGB_MOD, RGB_RMOD) },
[_SYMB] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }
};
#endif
#ifdef OLED_ENABLE
bool oled_task_user(void) {
// Host Keyboard Layer Status
oled_write_P(PSTR("Layer: "), false);
switch (get_highest_layer(layer_state)) {
case _LOWER:
oled_write_P(PSTR("LOWER"), false);
break;
case _RAISE:
oled_write_P(PSTR("RAISE"), false);
break;
case _EX:
oled_write_P(PSTR("EXTRA"), false);
break;
case _FN:
oled_write_P(PSTR("FUNCTION"), false);
break;
case _WM:
oled_write_P(PSTR("WORKMAN"), false);
break;
case _SYMB:
oled_write_P(PSTR("SYMBOLS"), false);
break;
default:
// Or use the write_ln shortcut over adding '\n' to the end of your string
oled_write_ln_P(PSTR("HOME"), false);
}
// Host Keyboard LED Status
// led_t led_state = host_keyboard_led_state();
// oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false);
// oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false);
// oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false);
return false;
}
#endif
bool get_hold_on_other_key_press(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case SFT_T(KC_A):
// Do not force the mod-tap key press to be handled as a modifier
// if any other key was pressed while the mod-tap key is held down.
return false;
case TEX:
return false;
case CTRLX:
return false;
case FNZ:
return false;
case MGUI:
return false;
case VLOWER:
return false;
case KRAISE:
return false;
default:
// Force the dual-role key press to be handled as a modifier if any
// other key was pressed while the mod-tap key is held down.
return true;
}
}
#ifdef AUDIO_ENABLE
float leader_start_song[][2] = SONG(ONE_UP_SOUND);
float leader_succeed_song[][2] = SONG(ALL_STAR);
float leader_fail_song[][2] = SONG(RICK_ROLL);
#endif
void matrix_scan_user(void);
void leader_start_user(void) {
#ifdef AUDIO_ENABLE
PLAY_SONG(leader_start_song);
#endif
}
bool did_leader_succeed;
void leader_end_user(void) {
did_leader_succeed = false;
if (leader_sequence_one_key(KC_E)) {
SEND_STRING(SS_LCTL(SS_LSFT("t")));
did_leader_succeed = true;
} else if (leader_sequence_two_keys(KC_E, KC_D)) {
SEND_STRING(SS_LGUI("r") "cmd\n" SS_LCTL("c"));
did_leader_succeed = true;
} else if (leader_sequence_two_keys(KC_A, KC_T)) {
SEND_STRING("@guidehouse.com");
did_leader_succeed = true;
}
#ifdef AUDIO_ENABLE
if (did_leader_succeed) {
PLAY_SONG(leader_succeed_song);
} else {
PLAY_SONG(leader_fail_song);
}
#endif
}

+ 25
- 0
keyboards/1upkeyboards/pi40/mit_v1_0/keymaps/miketronic/rules.mk View File

@ -0,0 +1,25 @@
# Common feature for all keyboards
BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
EXTRAKEY_ENABLE = yes # Audio control and System control
TAP_DANCE_ENABLE = yes # Tap Dance keys
NKRO_ENABLE = yes # Enable N-Key Rollover
MACROS_ENABLED = yes
# Keyboard specific
AUTO_SHIFT_ENABLE = no
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
MOUSEKEY_ENABLE = no # Mouse keys
LEADER_ENABLE = yes
RGB_MATRIX_ENABLE = yes
RGB_MATRIX_DRIVER = WS2812
WS2812_DRIVER = vendor
ENCODER_ENABLE = yes
ENCODER_MAP_ENABLE = yes
OLED_ENABLE = yes
OLED_DRIVER = SSD1306

+ 1
- 1
keyboards/1upkeyboards/pi60/info.json View File

@ -112,7 +112,7 @@
{"label": "'", "matrix": [2, 11], "x": 11.75, "y": 2},
{"label": "ISO'", "matrix": [2, 12], "x": 12.75, "y": 2},
{"label": "Enter", "matrix": [2, 13], "w": 1.25, "x": 13.75, "y": 2},
{"label": "LShift", "matrix": [3, 0], "w": 1.25, "x": 0, "y": 3},
{"label": "LShift", "matrix": [3, 15], "w": 1.25, "x": 0, "y": 3},
{"label": "ISO<>", "matrix": [3, 1], "x": 1.25, "y": 3},
{"label": "Z", "matrix": [3, 2], "x": 2.25, "y": 3},
{"label": "X", "matrix": [3, 3], "x": 3.25, "y": 3},


+ 2
- 2
keyboards/1upkeyboards/pi60/keymaps/default/keymap.c View File

@ -17,12 +17,12 @@
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_60_ansi(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_GRV,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_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_TRNS, KC_ENT,
KC_LSFT, KC_TRNS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, KC_UP, MO(1),
KC_LSFT, KC_TRNS, 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_SPC, KC_SPC, KC_RALT, MO(1), KC_TRNS, KC_APP, KC_RCTL
),


+ 2
- 2
keyboards/1upkeyboards/pi60/keymaps/via/keymap.c View File

@ -17,12 +17,12 @@
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_60_ansi(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_GRV,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_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_TRNS, KC_ENT,
KC_LSFT, KC_TRNS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, KC_UP, MO(1),
KC_LSFT, KC_TRNS, 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_SPC, KC_SPC, KC_RALT, MO(1), KC_TRNS, KC_APP, KC_RCTL
),


+ 0
- 1
keyboards/1upkeyboards/pi60_hse/config.h View File

@ -6,7 +6,6 @@
#define DYNAMIC_KEYMAP_LAYER_COUNT 10
#define RGB_MATRIX_LED_COUNT 16
#define RGBLED_NUM 16
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define RGB_MATRIX_KEYPRESSES
#define RGB_DISABLE_WHEN_USB_SUSPENDED


+ 1
- 6
keyboards/1upkeyboards/super16/config.h View File

@ -17,13 +17,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
# define RGBLED_NUM 16 // Add 12 if attaching the RGB LED ring
# define RGB_MATRIX_LED_COUNT RGBLED_NUM
# define RGB_MATRIX_LED_COUNT 16
# ifdef RGBLIGHT_ENABLE
# define RGBLIGHT_HUE_STEP 8
# define RGBLIGHT_SAT_STEP 8
# define RGBLIGHT_VAL_STEP 8
# define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
# define RGBLIGHT_EFFECT_BREATHING
# define RGBLIGHT_EFFECT_RAINBOW_MOOD
# define RGBLIGHT_EFFECT_RAINBOW_SWIRL


+ 6
- 0
keyboards/1upkeyboards/super16/info.json View File

@ -11,6 +11,12 @@
"ws2812": {
"pin": "D3"
},
"rgblight": {
"saturation_steps": 8,
"brightness_steps": 8,
"led_count": 16,
"sleep": true
},
"rgb_matrix": {
"driver": "WS2812"
},


+ 0
- 4
keyboards/1upkeyboards/sweet16/v1/config.h View File

@ -17,7 +17,3 @@
#define RGBLIGHT_EFFECT_RGB_TEST
#define RGBLIGHT_EFFECT_ALTERNATING
#define RGBLIGHT_EFFECT_TWINKLE
#define RGBLED_NUM 1
#define RGBLIGHT_HUE_STEP 8
#define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8

+ 5
- 0
keyboards/1upkeyboards/sweet16/v1/info.json View File

@ -3,6 +3,11 @@
"pid": "0x0161",
"device_version": "0.0.1"
},
"rgblight": {
"saturation_steps": 8,
"brightness_steps": 8,
"led_count": 1
},
"ws2812": {
"pin": "B1"
},


+ 0
- 1
keyboards/1upkeyboards/sweet16v2/kb2040/config.h View File

@ -19,7 +19,6 @@
#define DYNAMIC_KEYMAP_LAYER_COUNT 10
#define RGB_MATRIX_LED_COUNT 20
#define RGBLED_NUM 20
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define RGB_DISABLE_WHEN_USB_SUSPENDED


+ 0
- 5
keyboards/25keys/aleth42/rev0/config.h View File

@ -17,11 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
#define RGBLED_NUM 6
#define RGBLIGHT_HUE_STEP 8
#define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8
#define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
# define RGBLIGHT_EFFECT_BREATHING
# define RGBLIGHT_EFFECT_RAINBOW_MOOD
# define RGBLIGHT_EFFECT_RAINBOW_SWIRL


+ 6
- 0
keyboards/25keys/aleth42/rev0/info.json View File

@ -13,6 +13,12 @@
{"pin_a": "B5", "pin_b": "B4"}
]
},
"rgblight": {
"saturation_steps": 8,
"brightness_steps": 8,
"led_count": 6,
"sleep": true
},
"ws2812": {
"pin": "C7"
},


+ 0
- 5
keyboards/25keys/aleth42/rev1/config.h View File

@ -17,11 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
#define RGBLED_NUM 8
#define RGBLIGHT_HUE_STEP 8
#define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8
#define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
# define RGBLIGHT_EFFECT_BREATHING
# define RGBLIGHT_EFFECT_RAINBOW_MOOD
# define RGBLIGHT_EFFECT_RAINBOW_SWIRL


+ 6
- 0
keyboards/25keys/aleth42/rev1/info.json View File

@ -13,6 +13,12 @@
{"pin_a": "F5", "pin_b": "F6"}
]
},
"rgblight": {
"saturation_steps": 8,
"brightness_steps": 8,
"led_count": 8,
"sleep": true
},
"ws2812": {
"pin": "B3"
},


+ 0
- 5
keyboards/25keys/cassette42/config.h View File

@ -17,11 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
# define RGBLED_NUM 5
# define RGBLIGHT_HUE_STEP 8
# define RGBLIGHT_SAT_STEP 8
# define RGBLIGHT_VAL_STEP 8
# define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
# define RGBLIGHT_EFFECT_BREATHING
# define RGBLIGHT_EFFECT_RAINBOW_MOOD
# define RGBLIGHT_EFFECT_RAINBOW_SWIRL


+ 6
- 0
keyboards/25keys/cassette42/info.json View File

@ -14,6 +14,12 @@
{"pin_a": "B3", "pin_b": "B1"}
]
},
"rgblight": {
"saturation_steps": 8,
"brightness_steps": 8,
"led_count": 5,
"sleep": true
},
"ws2812": {
"pin": "D3"
},


+ 0
- 1
keyboards/25keys/zinc/rev1/config.h View File

@ -18,7 +18,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
#define QUICK_TAP_TERM 0
#define TAPPING_TERM 100
/* Select hand configuration */
#define MASTER_LEFT


+ 6
- 0
keyboards/25keys/zinc/rev1/info.json View File

@ -8,6 +8,12 @@
"split": {
"soft_serial_pin": "D2"
},
"tapping": {
"term": 100
},
"rgblight": {
"hue_steps": 10
},
"ws2812": {
"pin": "D3"
},


+ 0
- 3
keyboards/25keys/zinc/rev1/post_config.h View File

@ -34,7 +34,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifdef RGBLED_CONT
#define RGBLED_NUM 60
#define RGBLED_SPLIT { 30, 30 }
// #define RGBLIGHT_LED_MAP {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29}
#else
#define RGBLED_NUM 30
#endif
@ -72,8 +71,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#endif
#define RGBLIGHT_VAL_STEP 4
#endif
#define RGBLIGHT_HUE_STEP 10
#define RGBLIGHT_SAT_STEP 17
#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE)
// USB_MAX_POWER_CONSUMPTION value


+ 0
- 1
keyboards/25keys/zinc/reva/config.h View File

@ -18,7 +18,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
#define QUICK_TAP_TERM 0
#define TAPPING_TERM 100
/* Select hand configuration */
#define MASTER_LEFT


+ 6
- 0
keyboards/25keys/zinc/reva/info.json View File

@ -8,6 +8,12 @@
"split": {
"soft_serial_pin": "D2"
},
"tapping": {
"term": 100
},
"rgblight": {
"hue_steps": 10
},
"ws2812": {
"pin": "D3"
},


+ 0
- 3
keyboards/25keys/zinc/reva/post_config.h View File

@ -34,7 +34,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifdef RGBLED_CONT
#define RGBLED_NUM 60
#define RGBLED_SPLIT { 30, 30 }
// #define RGBLIGHT_LED_MAP {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29}
#else
#define RGBLED_NUM 30
#endif
@ -72,8 +71,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#endif
#define RGBLIGHT_VAL_STEP 4
#endif
#define RGBLIGHT_HUE_STEP 10
#define RGBLIGHT_SAT_STEP 17
#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE)
// USB_MAX_POWER_CONSUMPTION value


+ 0
- 1
keyboards/2key2crawl/config.h View File

@ -18,5 +18,4 @@
# define RGBLIGHT_EFFECT_RGB_TEST
# define RGBLIGHT_EFFECT_ALTERNATING
# define RGBLIGHT_EFFECT_TWINKLE
#define RGBLED_NUM 3
#endif

+ 3
- 0
keyboards/2key2crawl/info.json View File

@ -18,6 +18,9 @@
{"pin_a": "D0", "pin_b": "D1", "resolution": 1}
]
},
"rgblight": {
"led_count": 3
},
"ws2812": {
"pin": "C6"
},


+ 4
- 3
keyboards/40percentclub/gherkin/keymaps/default/keymap.c View File

@ -59,16 +59,17 @@ void keyboard_pre_init_user(void) {
setPinOutput(B0);
}
void led_set_user(uint8_t usb_led) {
if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
bool led_update_user(led_t led_state) {
if (led_state.num_lock) {
writePinLow(D5);
} else {
writePinHigh(D5);
}
if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
if (led_state.caps_lock) {
writePinLow(B0);
} else {
writePinHigh(B0);
}
return false;
}

+ 0
- 40
keyboards/40percentclub/gherkin/keymaps/mjt/keymap.c View File

@ -199,9 +199,6 @@ void music_scale_user(void)
#endif
void matrix_scan_user(void) {
}
//Tap Dance Definitions
tap_dance_action_t tap_dance_actions[] = {
//Tap once for Esc, twice for Caps Lock
@ -211,40 +208,3 @@ tap_dance_action_t tap_dance_actions[] = {
[TD_A_TAB] = ACTION_TAP_DANCE_DOUBLE(KC_A, KC_TAB),
[TD_Q_ESC] = ACTION_TAP_DANCE_DOUBLE(KC_Q, KC_ESC)
};
// don't know what this is doing...
/*
void led_set_user(uint8_t usb_led) {
if (usb_led & (1 << USB_LED_NUM_LOCK)) {
DDRD |= (1 << 5); PORTD &= ~(1 << 5);
} else {
DDRD &= ~(1 << 5); PORTD &= ~(1 << 5);
}
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
DDRB |= (1 << 0); PORTB &= ~(1 << 0);
} else {
DDRB &= ~(1 << 0); PORTB &= ~(1 << 0);
}
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
} else {
}
if (usb_led & (1 << USB_LED_COMPOSE)) {
} else {
}
if (usb_led & (1 << USB_LED_KANA)) {
} else {
}
}
*/

+ 0
- 4
keyboards/40percentclub/luddite/config.h View File

@ -17,7 +17,3 @@
# define RGBLIGHT_EFFECT_RGB_TEST
# define RGBLIGHT_EFFECT_ALTERNATING
# define RGBLIGHT_EFFECT_TWINKLE
#define RGBLED_NUM 8 // Number of LEDs
// #define RGBLIGHT_HUE_STEP 10
// #define RGBLIGHT_SAT_STEP 17
// #define RGBLIGHT_VAL_STEP 17

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save