diff --git a/.editorconfig b/.editorconfig
index 3a537d01b284..692a84da6109 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -11,7 +11,8 @@ charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
-[{*.yaml,*.yml}] # To match GitHub Actions formatting
+ # To match GitHub Actions formatting
+[*.{yaml,yml}]
indent_size = 2
[*.md]
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
index 0d4ca035c8e4..f2c70750dba3 100644
--- a/.github/ISSUE_TEMPLATE/config.yml
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -1,7 +1,7 @@
blank_issues_enabled: false
contact_links:
- name: QMK Discord
- url: https://discord.gg/Uq7gcHh
+ url: https://discord.gg/qmk
about: Ask questions, discuss issues and features. Chill.
- name: OLKB Subreddit
url: https://www.reddit.com/r/olkb
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index d402488d407e..868237d95991 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -1,6 +1,5 @@
-
## Description
@@ -15,7 +14,7 @@
- [ ] New feature
- [ ] Enhancement/optimization
- [ ] Keyboard (addition or update)
-- [ ] Keymap/layout/userspace (addition or update)
+- [ ] Keymap/layout (addition or update)
- [ ] Documentation
## Issues Fixed or Closed by This PR
diff --git a/.github/labeler.yml b/.github/labeler.yml
index 95eaa49252dd..270cd1a81369 100644
--- a/.github/labeler.yml
+++ b/.github/labeler.yml
@@ -1,46 +1,56 @@
core:
- - quantum/**/*
- - tmk_core/**/*
- - drivers/**/*
- - tests/**/*
- - util/**/*
- - platforms/**/*
- - builddefs/**/*
- - Makefile
- - '*.mk'
+ - changed-files:
+ - any-glob-to-any-file:
+ - quantum/**
+ - tmk_core/**
+ - drivers/**
+ - tests/**
+ - util/**
+ - platforms/**
+ - builddefs/*.mk
+ - Makefile
+ - '*.mk'
dependencies:
- - any:
- - 'lib/**/*'
- - '!lib/python/**/*'
+ - changed-files:
+ - all-globs-to-any-file:
+ - lib/**
+ - '!lib/python/**'
keyboard:
- - any:
- - 'keyboards/**/*'
- - '!keyboards/**/keymaps/**/*'
+ - changed-files:
+ - all-globs-to-any-file:
+ - keyboards/**
+ - '!keyboards/**/keymaps/**'
keymap:
- - users/**/*
- - layouts/**/*
- - keyboards/**/keymaps/**/*
+ - changed-files:
+ - any-glob-to-any-file:
+ - users/**
+ - layouts/**
+ - keyboards/**/keymaps/**
via:
- - keyboards/**/keymaps/via/*
+ - changed-files:
+ - any-glob-to-any-file:
+ - keyboards/**/keymaps/via/*
cli:
- - requirements.txt
- - lib/python/**/*
+ - changed-files:
+ - any-glob-to-any-file:
+ - requirements.txt
+ - lib/python/**
python:
- - '**/*.py'
+ - changed-files:
+ - any-glob-to-any-file:
+ - '**/*.py'
documentation:
- - docs/**/*
-translation:
- - docs/fr-fr/**/*
- - docs/es/**/*
- - docs/ja/**/*
- - docs/he-il/**/*
- - docs/pt-br/**/*
- - docs/zh-cn/**/*
- - docs/de/**/*
- - docs/ru-ru/**/*
+ - changed-files:
+ - any-glob-to-any-file:
+ - docs/**
+ - builddefs/docsgen/**
CI:
- - .github/**/*
+ - changed-files:
+ - any-glob-to-any-file:
+ - .github/**
dd:
- - data/constants/**/*
- - data/mappings/**/*
- - data/schemas/**/*
+ - changed-files:
+ - any-glob-to-any-file:
+ - data/constants/**
+ - data/mappings/**
+ - data/schemas/**
diff --git a/.github/workflows/auto_approve.yml b/.github/workflows/auto_approve.yml
index 1db1c49a9bb0..d526db397c59 100644
--- a/.github/workflows/auto_approve.yml
+++ b/.github/workflows/auto_approve.yml
@@ -13,8 +13,8 @@ jobs:
if: github.repository == 'qmk/qmk_firmware'
steps:
- - uses: mheap/automatic-approve-action@v1
+ - uses: zvecr/automatic-approve-action@safe_files
with:
token: ${{ secrets.QMK_BOT_TOKEN }}
- workflows: "format.yml,lint.yml,unit_test.yml"
- dangerous_files: "lib/python/,Makefile,paths.mk,builddefs/"
+ workflows: "labeler.yml,lint.yml,docs.yml"
+ safe_files: "keyboards/,docs/"
diff --git a/.github/workflows/ci_build_major_branch.yml b/.github/workflows/ci_build_major_branch.yml
index 77755ba71f41..ddc7cb10d183 100644
--- a/.github/workflows/ci_build_major_branch.yml
+++ b/.github/workflows/ci_build_major_branch.yml
@@ -52,9 +52,9 @@ jobs:
run: |
target_count=$( {
qmk find -km default 2>/dev/null
- qmk find -km via 2>/dev/null
+ # qmk find -km xap 2>/dev/null
} | sort | uniq | wc -l)
- slice_length=$((target_count / ($CONCURRENT_JOBS - 1))) # Err on the side of caution as we're splitting default and via
+ slice_length=$((target_count / ($CONCURRENT_JOBS - 1))) # Err on the side of caution
echo "slice_length=$slice_length" >> $GITHUB_OUTPUT
build_targets:
@@ -63,7 +63,8 @@ jobs:
strategy:
fail-fast: false
matrix:
- keymap: [default, via]
+ keymap: [default]
+ # keymap: [default, xap]
uses: ./.github/workflows/ci_build_major_branch_keymap.yml
with:
branch: ${{ inputs.branch || github.ref_name }}
@@ -77,44 +78,59 @@ jobs:
runs-on: ubuntu-latest
steps:
+ - name: Disable safe.directory check
+ run: |
+ git config --global --add safe.directory '*'
+
+ - name: Checkout QMK Firmware
+ uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+
- name: Download firmwares
uses: actions/download-artifact@v4
with:
pattern: firmware-*
- path: firmwares
+ path: .
merge-multiple: true
+ - name: Generate index page
+ run: |
+ python3 -m pip install -r ./util/ci/requirements.txt
+ ./util/ci/index_generator.py > index.html
+ ./util/ci/firmware_list_generator.py > firmware_list.json
+
- name: Upload to https://ci.qmk.fm/${{ inputs.branch || github.ref_name }}/${{ github.sha }}
uses: jakejarvis/s3-sync-action@master
with:
- args: --acl public-read --follow-symlinks --delete
+ args: --acl public-read --follow-symlinks --delete --exclude '*' --include 'index.html' --include 'firmware_list.json' --include '*.hex' --include '*.bin' --include '*.uf2'
env:
AWS_S3_BUCKET: ${{ vars.CI_QMK_FM_SPACES_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.CI_QMK_FM_SPACES_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.CI_QMK_FM_SPACES_SECRET }}
AWS_REGION: ${{ vars.CI_QMK_FM_SPACES_REGION }}
AWS_S3_ENDPOINT: ${{ vars.CI_QMK_FM_SPACES_ENDPOINT }}
- SOURCE_DIR: firmwares
+ SOURCE_DIR: .
DEST_DIR: ${{ inputs.branch || github.ref_name }}/${{ github.sha }}
- name: Upload to https://ci.qmk.fm/${{ inputs.branch || github.ref_name }}/latest
uses: jakejarvis/s3-sync-action@master
with:
- args: --acl public-read --follow-symlinks --delete
+ args: --acl public-read --follow-symlinks --delete --exclude '*' --include 'index.html' --include 'firmware_list.json' --include '*.hex' --include '*.bin' --include '*.uf2'
env:
AWS_S3_BUCKET: ${{ vars.CI_QMK_FM_SPACES_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.CI_QMK_FM_SPACES_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.CI_QMK_FM_SPACES_SECRET }}
AWS_REGION: ${{ vars.CI_QMK_FM_SPACES_REGION }}
AWS_S3_ENDPOINT: ${{ vars.CI_QMK_FM_SPACES_ENDPOINT }}
- SOURCE_DIR: firmwares
+ SOURCE_DIR: .
DEST_DIR: ${{ inputs.branch || github.ref_name }}/latest
- name: Check if failure marker file exists
id: check_failure_marker
uses: andstor/file-existence-action@v3
with:
- files: firmwares/.failed
+ files: ./.failed
- name: Fail build if needed
if: steps.check_failure_marker.outputs.files_exists == 'true'
diff --git a/.github/workflows/ci_build_major_branch_keymap.yml b/.github/workflows/ci_build_major_branch_keymap.yml
index 0804c9e2d043..2e0f3036a365 100644
--- a/.github/workflows/ci_build_major_branch_keymap.yml
+++ b/.github/workflows/ci_build_major_branch_keymap.yml
@@ -172,10 +172,10 @@ jobs:
targets-${{ inputs.keymap }}
- name: 'CI Discord Notification'
- if: always()
+ if: always() && !cancelled()
working-directory: util/ci/
env:
DISCORD_WEBHOOK: ${{ secrets.CI_DISCORD_WEBHOOK }}
run: |
python3 -m pip install -r requirements.txt
- python3 ./discord-results.py --branch ${{ inputs.branch || github.ref_name }} --keymap ${{ inputs.keymap }} --url ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
+ python3 ./discord-results.py --branch ${{ inputs.branch || github.ref_name }} --sha $(git rev-parse HEAD) --keymap ${{ inputs.keymap }} --url ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
index 25311019c6c9..34319675bfde 100644
--- a/.github/workflows/docs.yml
+++ b/.github/workflows/docs.yml
@@ -7,7 +7,6 @@ on:
push:
branches:
- master
- - vitepress
paths:
- 'builddefs/docsgen/**'
- 'tmk_core/**'
@@ -15,6 +14,11 @@ on:
- 'platforms/**'
- 'docs/**'
- '.github/workflows/docs.yml'
+ pull_request:
+ paths:
+ - 'builddefs/docsgen/**'
+ - 'docs/**'
+ - '.github/workflows/docs.yml'
defaults:
run:
@@ -25,9 +29,6 @@ jobs:
runs-on: ubuntu-latest
container: ghcr.io/qmk/qmk_cli
- # protect against those who develop with their fork on master
- if: github.repository == 'qmk/qmk_firmware' || (github.repository == 'tzarc/qmk_firmware' && github.ref == 'refs/heads/vitepress')
-
steps:
- uses: actions/checkout@v4
with:
@@ -35,10 +36,10 @@ jobs:
- name: Install dependencies
run: |
- apt-get update && apt-get install -y rsync doxygen curl
+ apt-get update && apt-get install -y rsync doxygen
# install nvm
touch $HOME/.bashrc
- curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
+ wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
- name: Install node
run: |
@@ -46,40 +47,19 @@ jobs:
nvm install 20
nvm use 20
corepack enable
- npm install -g moxygen
- name: Build docs
run: |
source $HOME/.bashrc
nvm use 20
qmk --verbose generate-docs
- touch '.build/docs/.nojekyll'
-
- - name: Set CNAME
- if: github.repository == 'qmk/qmk_firmware'
- run: |
- # Override target CNAME
- echo 'docs.qmk.fm' > .build/docs/CNAME
-
- - name: Override CNAME
- if: github.repository == 'tzarc/qmk_firmware'
- run: |
- # Temporarily override target CNAME during development
- echo 'vitepress.qmk.fm' > .build/docs/CNAME
- name: Deploy
- if: github.repository == 'qmk/qmk_firmware'
- uses: JamesIves/github-pages-deploy-action@v4.6.1
+ if: ${{ github.event_name == 'push' && github.repository == 'qmk/qmk_firmware' }}
+ uses: JamesIves/github-pages-deploy-action@v4.7.3
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
folder: .build/docs
git-config-name: QMK Bot
git-config-email: hello@qmk.fm
-
- - name: Deploy
- if: github.repository == 'tzarc/qmk_firmware'
- uses: JamesIves/github-pages-deploy-action@v4.6.1
- with:
- branch: gh-pages
- folder: .build/docs
diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml
index 1d7577dcef21..74c518fe0512 100644
--- a/.github/workflows/format.yml
+++ b/.github/workflows/format.yml
@@ -35,7 +35,7 @@ jobs:
- name: Get changed files
id: file_changes
- uses: tj-actions/changed-files@v44
+ uses: tj-actions/changed-files@v45
with:
use_rest_api: true
diff --git a/.github/workflows/format_push.yml b/.github/workflows/format_push.yml
index ea60fc95b450..c861b2c11128 100644
--- a/.github/workflows/format_push.yml
+++ b/.github/workflows/format_push.yml
@@ -47,7 +47,7 @@ jobs:
git config user.email 'hello@qmk.fm'
- name: Create Pull Request
- uses: peter-evans/create-pull-request@v6
+ uses: peter-evans/create-pull-request@v7
if: ${{ github.repository == 'qmk/qmk_firmware'}}
with:
token: ${{ secrets.QMK_BOT_TOKEN }}
diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml
index fa4b8981add9..2dc354dda201 100644
--- a/.github/workflows/labeler.yml
+++ b/.github/workflows/labeler.yml
@@ -1,18 +1,13 @@
name: "Pull Request Labeler"
-permissions:
- contents: read
- pull-requests: write
-
on:
- pull_request_target:
- types: [opened, synchronize, reopened, ready_for_review, locked]
+- pull_request_target
jobs:
triage:
+ permissions:
+ contents: read
+ pull-requests: write
runs-on: ubuntu-latest
steps:
- - uses: actions/labeler@v4
- with:
- repo-token: "${{ secrets.GITHUB_TOKEN }}"
- configuration-path: '.github/labeler.yml'
+ - uses: actions/labeler@v5
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index 22ddcaba796e..829ca6392c5e 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -27,7 +27,7 @@ jobs:
- name: Get changed files
id: file_changes
- uses: tj-actions/changed-files@v44
+ uses: tj-actions/changed-files@v45
with:
use_rest_api: true
diff --git a/.github/workflows/regen_push.yml b/.github/workflows/regen_push.yml
index 0f0141114134..9a05a9461dfe 100644
--- a/.github/workflows/regen_push.yml
+++ b/.github/workflows/regen_push.yml
@@ -34,7 +34,7 @@ jobs:
git config user.email 'hello@qmk.fm'
- name: Create Pull Request
- uses: peter-evans/create-pull-request@v6
+ uses: peter-evans/create-pull-request@v7
if: ${{ github.repository == 'qmk/qmk_firmware'}}
with:
token: ${{ secrets.QMK_BOT_TOKEN }}
diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml
index ce9bd0f3161e..25649ce94372 100644
--- a/.github/workflows/stale.yml
+++ b/.github/workflows/stale.yml
@@ -45,7 +45,7 @@ jobs:
stale-pr-label: stale
days-before-pr-stale: 45
days-before-pr-close: 30
- exempt-pr-labels: bug,awaiting review,breaking_change,in progress,on hold
+ exempt-pr-labels: bug,awaiting review,breaking_change,in progress,on hold,needs-core-wireless,crippled-firmware
stale-pr-message: >
Thank you for your contribution!
diff --git a/.gitignore b/.gitignore
index 35b128606d7d..20e706a2b59b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -25,6 +25,8 @@
*.la
*.stackdump
*.sym
+index.html
+firmware_list.json
# QMK-specific
api_data/v1
@@ -116,4 +118,5 @@ compile_commands.json
# VIA(L) files that don't belong in QMK repo
via*.json
+/keyboards/**/keymaps/via/*
/keyboards/**/keymaps/vial/*
diff --git a/Doxyfile b/Doxyfile
index 42f2e70c0ec4..f8c60f5f84d6 100644
--- a/Doxyfile
+++ b/Doxyfile
@@ -145,7 +145,7 @@ FILE_PATTERNS = *.c \
RECURSIVE = YES
EXCLUDE =
EXCLUDE_SYMLINKS = NO
-EXCLUDE_PATTERNS = */protocol/arm_atsam/*
+EXCLUDE_PATTERNS =
EXCLUDE_SYMBOLS =
EXAMPLE_PATH =
EXAMPLE_PATTERNS = *
diff --git a/builddefs/build_full_test.mk b/builddefs/build_full_test.mk
index 63f9fea915db..5cae327c6c70 100644
--- a/builddefs/build_full_test.mk
+++ b/builddefs/build_full_test.mk
@@ -21,8 +21,10 @@ $(TEST_OUTPUT)_SRC := \
$(SRC) \
$(QUANTUM_PATH)/keymap_introspection.c \
tests/test_common/matrix.c \
+ tests/test_common/pointing_device_driver.c \
tests/test_common/test_driver.cpp \
tests/test_common/keyboard_report_util.cpp \
+ tests/test_common/mouse_report_util.cpp \
tests/test_common/keycode_util.cpp \
tests/test_common/keycode_table.cpp \
tests/test_common/test_fixture.cpp \
diff --git a/builddefs/build_keyboard.mk b/builddefs/build_keyboard.mk
index f0788e55c99c..7d58c29462ac 100644
--- a/builddefs/build_keyboard.mk
+++ b/builddefs/build_keyboard.mk
@@ -34,10 +34,13 @@ ifeq ($(strip $(DUMP_CI_METADATA)),yes)
endif
# Force expansion
-TARGET := $(TARGET)
+override TARGET := $(TARGET)
ifneq ($(FORCE_LAYOUT),)
- TARGET := $(TARGET)_$(FORCE_LAYOUT)
+ override TARGET := $(TARGET)_$(FORCE_LAYOUT)
+endif
+ifneq ($(CONVERT_TO),)
+ override TARGET := $(TARGET)_$(CONVERT_TO)
endif
# Object files and generated keymap directory
@@ -58,9 +61,6 @@ ifdef SKIP_GIT
VERSION_H_FLAGS += --skip-git
endif
-# Generate the board's version.h file.
-$(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)
KEYBOARD_FOLDER_PATH_2 := $(patsubst %/,%,$(dir $(KEYBOARD_FOLDER_PATH_1)))
@@ -186,7 +186,10 @@ endif
# Have we found a keymap.json?
ifneq ("$(wildcard $(KEYMAP_JSON))", "")
ifneq ("$(wildcard $(KEYMAP_C))", "")
- $(call WARNING_MESSAGE,Keymap is specified as both keymap.json and keymap.c -- keymap.json file wins.)
+ # Allow a separately-found keymap.c next to keymap.json -- the keymap.c
+ # generator will include the other keymap.c in the process, if supplied.
+ OTHER_KEYMAP_C := $(KEYMAP_C)
+ OPT_DEFS += -DOTHER_KEYMAP_C=\"$(OTHER_KEYMAP_C)\"
endif
KEYMAP_PATH := $(KEYMAP_JSON_PATH)
@@ -194,8 +197,10 @@ ifneq ("$(wildcard $(KEYMAP_JSON))", "")
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
+ ifeq ($(OTHER_KEYMAP_C),)
+ # Load the keymap-level rules.mk if exists (and we havent already loaded it for keymap.c)
+ -include $(KEYMAP_PATH)/rules.mk
+ endif
# Load any rules.mk content from keymap.json
INFO_RULES_MK = $(shell $(QMK_BIN) generate-rules-mk --quiet --escape --output $(INTERMEDIATE_OUTPUT)/src/rules.mk $(KEYMAP_JSON))
@@ -212,12 +217,20 @@ $(INTERMEDIATE_OUTPUT)/src/config.h: $(KEYMAP_JSON)
$(eval CMD=$(QMK_BIN) generate-config-h --quiet --output $(KEYMAP_H) $(KEYMAP_JSON))
@$(BUILD_CMD)
-generated-files: $(INTERMEDIATE_OUTPUT)/src/config.h $(INTERMEDIATE_OUTPUT)/src/keymap.c
+$(INTERMEDIATE_OUTPUT)/src/keymap.h: $(KEYMAP_JSON)
+ @$(SILENT) || printf "$(MSG_GENERATING) $@" | $(AWK_CMD)
+ $(eval CMD=$(QMK_BIN) generate-keymap-h --quiet --output $(INTERMEDIATE_OUTPUT)/src/keymap.h $(KEYMAP_JSON))
+ @$(BUILD_CMD)
+
+generated-files: $(INTERMEDIATE_OUTPUT)/src/config.h $(INTERMEDIATE_OUTPUT)/src/keymap.c $(INTERMEDIATE_OUTPUT)/src/keymap.h
endif
include $(BUILDDEFS_PATH)/converters.mk
+# Generate the board's version.h file.
+$(shell $(QMK_BIN) generate-version-h $(VERSION_H_FLAGS) -q -o $(INTERMEDIATE_OUTPUT)/src/version.h)
+
MCU_ORIG := $(MCU)
include $(wildcard $(PLATFORM_PATH)/*/mcu_selection.mk)
diff --git a/builddefs/build_test.mk b/builddefs/build_test.mk
index 2cc1134da5b3..d0de63c6f58b 100644
--- a/builddefs/build_test.mk
+++ b/builddefs/build_test.mk
@@ -47,7 +47,8 @@ PLATFORM:=TEST
PLATFORM_KEY:=test
BOOTLOADER_TYPE:=none
-ifeq ($(strip $(DEBUG)), 1)
+DEBUG ?= 0
+ifneq ($(strip $(DEBUG)), 0)
CONSOLE_ENABLE = yes
endif
diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk
index 3a6f6f6579e1..568156f79b30 100644
--- a/builddefs/common_features.mk
+++ b/builddefs/common_features.mk
@@ -28,6 +28,7 @@ QUANTUM_SRC += \
$(QUANTUM_DIR)/sync_timer.c \
$(QUANTUM_DIR)/logging/debug.c \
$(QUANTUM_DIR)/logging/sendchar.c \
+ $(QUANTUM_DIR)/process_keycode/process_default_layer.c \
VPATH += $(QUANTUM_DIR)/logging
# Fall back to lib/printf if there is no platform provided print
@@ -129,13 +130,13 @@ ifeq ($(strip $(POINTING_DEVICE_ENABLE)), yes)
MOUSE_ENABLE := yes
VPATH += $(QUANTUM_DIR)/pointing_device
SRC += $(QUANTUM_DIR)/pointing_device/pointing_device.c
- SRC += $(QUANTUM_DIR)/pointing_device/pointing_device_drivers.c
SRC += $(QUANTUM_DIR)/pointing_device/pointing_device_auto_mouse.c
ifneq ($(strip $(POINTING_DEVICE_DRIVER)), custom)
SRC += drivers/sensors/$(strip $(POINTING_DEVICE_DRIVER)).c
OPT_DEFS += -DPOINTING_DEVICE_DRIVER_$(strip $(shell echo $(POINTING_DEVICE_DRIVER) | tr '[:lower:]' '[:upper:]'))
endif
OPT_DEFS += -DPOINTING_DEVICE_DRIVER_$(strip $(POINTING_DEVICE_DRIVER))
+ OPT_DEFS += -DPOINTING_DEVICE_DRIVER_NAME=$(strip $(POINTING_DEVICE_DRIVER))
ifeq ($(strip $(POINTING_DEVICE_DRIVER)), adns9800)
SPI_DRIVER_REQUIRED = yes
else ifeq ($(strip $(POINTING_DEVICE_DRIVER)), analog_joystick)
@@ -215,7 +216,7 @@ else
COMMON_VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/flash
COMMON_VPATH += $(DRIVER_PATH)/flash
SRC += eeprom_driver.c eeprom_legacy_emulated_flash.c legacy_flash_ops.c
- else ifneq ($(filter $(MCU_SERIES),STM32F1xx STM32F3xx STM32F4xx STM32L4xx STM32G4xx WB32F3G71xx WB32FQ95xx GD32VF103),)
+ else ifneq ($(filter $(MCU_SERIES),STM32F1xx STM32F3xx STM32F4xx STM32L4xx STM32G4xx WB32F3G71xx WB32FQ95xx AT32F415 GD32VF103),)
# Wear-leveling EEPROM implementation, backed by MCU flash
OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_WEAR_LEVELING
SRC += eeprom_driver.c eeprom_wear_leveling.c
@@ -238,10 +239,6 @@ else
OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_TRANSIENT
SRC += eeprom_driver.c eeprom_transient.c
endif
- else ifeq ($(PLATFORM),ARM_ATSAM)
- # arm_atsam EEPROM
- OPT_DEFS += -DEEPROM_SAMD
- SRC += eeprom_samd.c
else ifeq ($(PLATFORM),TEST)
# Test harness "EEPROM"
OPT_DEFS += -DEEPROM_TEST_HARNESS
@@ -282,18 +279,17 @@ ifneq ($(strip $(WEAR_LEVELING_DRIVER)),none)
endif
endif
-VALID_FLASH_DRIVER_TYPES := spi
+VALID_FLASH_DRIVER_TYPES := spi custom
FLASH_DRIVER ?= none
ifneq ($(strip $(FLASH_DRIVER)), none)
ifeq ($(filter $(FLASH_DRIVER),$(VALID_FLASH_DRIVER_TYPES)),)
$(call CATASTROPHIC_ERROR,Invalid FLASH_DRIVER,FLASH_DRIVER="$(FLASH_DRIVER)" is not a valid flash driver)
else
- OPT_DEFS += -DFLASH_ENABLE
+ OPT_DEFS += -DFLASH_ENABLE -DFLASH_DRIVER -DFLASH_DRIVER_$(strip $(shell echo $(FLASH_DRIVER) | tr '[:lower:]' '[:upper:]'))
+ COMMON_VPATH += $(DRIVER_PATH)/flash
ifeq ($(strip $(FLASH_DRIVER)),spi)
- SPI_DRIVER_REQUIRED = yes
- OPT_DEFS += -DFLASH_DRIVER -DFLASH_SPI
- COMMON_VPATH += $(DRIVER_PATH)/flash
SRC += flash_spi.c
+ SPI_DRIVER_REQUIRED = yes
endif
endif
endif
@@ -311,11 +307,11 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
POST_CONFIG_H += $(QUANTUM_DIR)/rgblight/rgblight_post_config.h
OPT_DEFS += -DRGBLIGHT_ENABLE
OPT_DEFS += -DRGBLIGHT_$(strip $(shell echo $(RGBLIGHT_DRIVER) | tr '[:lower:]' '[:upper:]'))
+ SRC += $(QUANTUM_DIR)/process_keycode/process_underglow.c
SRC += $(QUANTUM_DIR)/color.c
SRC += $(QUANTUM_DIR)/rgblight/rgblight.c
SRC += $(QUANTUM_DIR)/rgblight/rgblight_drivers.c
CIE1931_CURVE := yes
- RGB_KEYCODES_ENABLE := yes
endif
ifeq ($(strip $(RGBLIGHT_DRIVER)), ws2812)
@@ -437,6 +433,13 @@ ifeq ($(strip $(LED_MATRIX_ENABLE)), yes)
SRC += snled27351-mono.c
endif
+ ifeq ($(strip $(LED_MATRIX_CUSTOM_KB)), yes)
+ OPT_DEFS += -DLED_MATRIX_CUSTOM_KB
+ endif
+
+ ifeq ($(strip $(LED_MATRIX_CUSTOM_USER)), yes)
+ OPT_DEFS += -DLED_MATRIX_CUSTOM_USER
+ endif
endif
# Deprecated driver names - do not use
@@ -461,12 +464,16 @@ ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes)
COMMON_VPATH += $(QUANTUM_DIR)/rgb_matrix/animations
COMMON_VPATH += $(QUANTUM_DIR)/rgb_matrix/animations/runners
POST_CONFIG_H += $(QUANTUM_DIR)/rgb_matrix/post_config.h
+
+ # TODO: Remove this
+ SRC += $(QUANTUM_DIR)/process_keycode/process_underglow.c
+
+ SRC += $(QUANTUM_DIR)/process_keycode/process_rgb_matrix.c
SRC += $(QUANTUM_DIR)/color.c
SRC += $(QUANTUM_DIR)/rgb_matrix/rgb_matrix.c
SRC += $(QUANTUM_DIR)/rgb_matrix/rgb_matrix_drivers.c
LIB8TION_ENABLE := yes
CIE1931_CURVE := yes
- RGB_KEYCODES_ENABLE := yes
ifeq ($(strip $(RGB_MATRIX_DRIVER)), aw20216s)
SPI_DRIVER_REQUIRED = yes
@@ -575,10 +582,6 @@ ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes)
endif
endif
-ifeq ($(strip $(RGB_KEYCODES_ENABLE)), yes)
- SRC += $(QUANTUM_DIR)/process_keycode/process_rgb.c
-endif
-
VARIABLE_TRACE ?= no
ifneq ($(strip $(VARIABLE_TRACE)),no)
SRC += $(QUANTUM_DIR)/variable_trace.c
@@ -888,7 +891,7 @@ ifeq ($(strip $(BLUETOOTH_ENABLE)), yes)
OPT_DEFS += -DBLUETOOTH_$(strip $(shell echo $(BLUETOOTH_DRIVER) | tr '[:lower:]' '[:upper:]'))
NO_USB_STARTUP_CHECK := yes
COMMON_VPATH += $(DRIVER_PATH)/bluetooth
- SRC += outputselect.c
+ SRC += outputselect.c process_connection.c
ifeq ($(strip $(BLUETOOTH_DRIVER)), bluefruit_le)
SPI_DRIVER_REQUIRED = yes
@@ -943,7 +946,7 @@ ifeq ($(strip $(WS2812_DRIVER_REQUIRED)), yes)
OPT_DEFS += -DWS2812_$(strip $(shell echo $(WS2812_DRIVER) | tr '[:lower:]' '[:upper:]'))
- SRC += ws2812_$(strip $(WS2812_DRIVER)).c
+ SRC += ws2812.c ws2812_$(strip $(WS2812_DRIVER)).c
ifeq ($(strip $(PLATFORM)), CHIBIOS)
ifeq ($(strip $(WS2812_DRIVER)), pwm)
diff --git a/builddefs/common_rules.mk b/builddefs/common_rules.mk
index cfd261737c06..e45063cfaf5a 100644
--- a/builddefs/common_rules.mk
+++ b/builddefs/common_rules.mk
@@ -43,25 +43,25 @@ ifneq ($(USE_CCACHE),no)
CC_PREFIX ?= ccache
endif
+#---------------- Debug Options ----------------
+
+DEBUG_ENABLE ?= no
+ifeq ($(strip $(DEBUG_ENABLE)),yes)
+ CFLAGS += -ggdb3
+ CXXFLAGS += -ggdb3
+ ASFLAGS += -ggdb3
+# Create a map file when debugging
+ LDFLAGS += -Wl,-Map=$(BUILD_DIR)/$(TARGET).map,--cref
+endif
+
+
#---------------- C Compiler Options ----------------
ifeq ($(strip $(LTO_ENABLE)), yes)
- ifeq ($(PLATFORM),ARM_ATSAM)
- $(info Enabling LTO on arm_atsam-targeting boards is known to have a high likelihood of failure.)
- $(info If unsure, set LTO_ENABLE = no.)
- endif
CDEFS += -flto
CDEFS += -DLTO_ENABLE
endif
-DEBUG_ENABLE ?= yes
-ifeq ($(strip $(SKIP_DEBUG_INFO)),yes)
- DEBUG_ENABLE=no
-endif
-
-ifeq ($(strip $(DEBUG_ENABLE)),yes)
- CFLAGS += -g$(DEBUG)
-endif
CFLAGS += $(CDEFS)
CFLAGS += -O$(OPT)
# add color
@@ -83,9 +83,6 @@ CFLAGS += -fcommon
#---------------- C++ Compiler Options ----------------
-ifeq ($(strip $(DEBUG_ENABLE)),yes)
- CXXFLAGS += -g$(DEBUG)
-endif
CXXFLAGS += $(CXXDEFS)
CXXFLAGS += -O$(OPT)
# to suppress "warning: only initialized variables can be placed into program memory area"
@@ -106,14 +103,10 @@ endif
#---------------- Linker Options ----------------
-CREATE_MAP ?= yes
-ifeq ($(CREATE_MAP),yes)
- LDFLAGS += -Wl,-Map=$(BUILD_DIR)/$(TARGET).map,--cref
-endif
ifeq ($(VERBOSE_LD_CMD),yes)
LDFLAGS += -v
endif
-#LDFLAGS += -Wl,--relax
+
LDFLAGS += $(EXTMEMOPTS)
LDFLAGS += $(patsubst %,-L%,$(EXTRALIBDIRS))
LDFLAGS += -lm
@@ -126,15 +119,11 @@ ADHLNS_ENABLE ?= no
ifeq ($(ADHLNS_ENABLE),yes)
# Avoid "Options to '-Xassembler' do not match" - only specify assembler options at LTO link time
ifeq ($(strip $(LTO_ENABLE)), yes)
- LDFLAGS += -Wa,-adhlns=$(BUILD_DIR)/$(TARGET).lst
+ LDFLAGS += -Wa,-adhlns=$(BUILD_DIR)/$(TARGET).lst
else
- CFLAGS += -Wa,-adhlns=$(@:%.o=%.lst)
+ CFLAGS += -Wa,-adhlns=$(@:%.o=%.lst)
CXXFLAGS += -Wa,-adhlns=$(@:%.o=%.lst)
- ifeq ($(strip $(DEBUG_ENABLE)),yes)
- ASFLAGS = -Wa,-adhlns=$(@:%.o=%.lst),-gstabs,--listing-cont-lines=100
- else
- ASFLAGS = -Wa,-adhlns=$(@:%.o=%.lst),--listing-cont-lines=100
- endif
+ ASFLAGS += -Wa,-adhlns=$(@:%.o=%.lst),--listing-cont-lines=100
endif
endif
diff --git a/builddefs/converters.mk b/builddefs/converters.mk
index 3e77a070f2fb..b1e5a1bed27b 100644
--- a/builddefs/converters.mk
+++ b/builddefs/converters.mk
@@ -32,9 +32,6 @@ ifneq ($(CONVERT_TO),)
PLATFORM_KEY = $(shell echo $(CONVERTER) | cut -d "/" -f2)
- # force setting as value can be from environment
- override TARGET := $(TARGET)_$(CONVERT_TO)
-
# Configure any defaults
OPT_DEFS += -DCONVERT_TO_$(shell echo $(CONVERT_TO) | tr '[:lower:]' '[:upper:]')
OPT_DEFS += -DCONVERTER_TARGET=\"$(CONVERT_TO)\"
diff --git a/builddefs/docsgen/.vitepress/config.mts b/builddefs/docsgen/.vitepress/config.mts
index 289e08ef9196..d2fe2886b213 100644
--- a/builddefs/docsgen/.vitepress/config.mts
+++ b/builddefs/docsgen/.vitepress/config.mts
@@ -33,14 +33,21 @@ export default defineConfig(({ mode }) => {
},
title: 'QMK Firmware',
- nav: [{ text: "Home", link: "./" }],
+ nav: [{ text: "Home", link: "/" }],
search: {
provider: "local",
},
+ editLink: {
+ pattern: 'https://github.com/qmk/qmk_firmware/edit/master/docs/:path'
+ },
+ lastUpdated: true,
+
sidebar: sidebar,
+ externalLinkIcon: true,
+
socialLinks: [
{ icon: { svg: '' }, link: "https://reddit.com/r/olkb" },
{ icon: "discord", link: "https://discord.gg/qmk" },
diff --git a/builddefs/docsgen/package.json b/builddefs/docsgen/package.json
index 435e7481f1f9..21f56d7ddfba 100644
--- a/builddefs/docsgen/package.json
+++ b/builddefs/docsgen/package.json
@@ -1,7 +1,7 @@
{
"license": "GPL-2.0-or-later",
"devDependencies": {
- "vite": "^5.2.10",
+ "vite": "^5.4.12",
"vitepress": "^1.1.0",
"vitepress-plugin-tabs": "^0.5.0",
"vue": "^3.4.24"
diff --git a/builddefs/generic_features.mk b/builddefs/generic_features.mk
index dc34a642307d..f14f44087702 100644
--- a/builddefs/generic_features.mk
+++ b/builddefs/generic_features.mk
@@ -36,6 +36,7 @@ GENERIC_FEATURES = \
HAPTIC \
KEY_LOCK \
KEY_OVERRIDE \
+ LAYER_LOCK \
LEADER \
MAGIC \
MOUSEKEY \
diff --git a/builddefs/show_options.mk b/builddefs/show_options.mk
index 81d8400a8064..1c1a3ebf8e0a 100644
--- a/builddefs/show_options.mk
+++ b/builddefs/show_options.mk
@@ -67,7 +67,6 @@ OTHER_OPTION_NAMES = \
PS2_DRIVER \
RAW_ENABLE \
SWAP_HANDS_ENABLE \
- RING_BUFFERED_6KRO_REPORT_ENABLE \
WATCHDOG_ENABLE \
ERGOINU \
NO_USB_STARTUP_CHECK \
diff --git a/data/constants/keycodes/extras/keycodes_farsi_0.0.1.hjson b/data/constants/keycodes/extras/keycodes_farsi_0.0.1.hjson
new file mode 100644
index 000000000000..d59b6fab2642
--- /dev/null
+++ b/data/constants/keycodes/extras/keycodes_farsi_0.0.1.hjson
@@ -0,0 +1,616 @@
+{
+ "aliases": {
+/*
+ * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
+ * │ │ ۱ │ ۲ │ ۳ │ ۴ │ ۵ │ ۶ │ ۷ │ ۸ │ ۹ │ ۰ │ - │ = │ │
+ * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
+ * │ │ ض │ ص │ ث │ ق │ ف │ غ │ ع │ ه │ خ │ ح │ ج │ چ │ │
+ * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
+ * │ │ ش │ س │ ی │ ب │ ل │ ا │ ت │ ن │ م │ ک │ گ │ \ │ │
+ * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
+ * │ │ < │ ظ │ ط │ ز │ ر │ ذ │ د │ پ │ و │ . │ / │ │
+ * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
+ * │ │ │ │ │ │ │ │ │
+ * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
+ */
+ "KC_GRV": {
+ "key": "FA_ZWJ",
+ "label": "(zero-width joiner)",
+ }
+ "KC_1": {
+ "key": "FA_1A",
+ "label": "۱",
+ }
+ "KC_2": {
+ "key": "FA_2A",
+ "label": "۲",
+ }
+ "KC_3": {
+ "key": "FA_3A",
+ "label": "۳",
+ }
+ "KC_4": {
+ "key": "FA_4A",
+ "label": "۴",
+ }
+ "KC_5": {
+ "key": "FA_5A",
+ "label": "۵",
+ }
+ "KC_6": {
+ "key": "FA_6A",
+ "label": "۶",
+ }
+ "KC_7": {
+ "key": "FA_7A",
+ "label": "۷",
+ }
+ "KC_8": {
+ "key": "FA_8A",
+ "label": "۸",
+ }
+ "KC_9": {
+ "key": "FA_9A",
+ "label": "۹",
+ }
+ "KC_0": {
+ "key": "FA_0A",
+ "label": "۰",
+ }
+ "KC_MINS": {
+ "key": "FA_MINS",
+ "label": "-",
+ }
+ "KC_EQL": {
+ "key": "FA_EQL",
+ "label": "=",
+ }
+ "KC_Q": {
+ "key": "FA_ZAD",
+ "label": "ض",
+ }
+ "KC_W": {
+ "key": "FA_SAD",
+ "label": "ص",
+ }
+ "KC_E": {
+ "key": "FA_SE",
+ "label": "ث",
+ }
+ "KC_R": {
+ "key": "FA_QAF",
+ "label": "ق",
+ }
+ "KC_T": {
+ "key": "FA_FE",
+ "label": "ف",
+ }
+ "KC_Y": {
+ "key": "FA_GHYN",
+ "label": "غ",
+ }
+ "KC_U": {
+ "key": "FA_EYN",
+ "label": "ع",
+ }
+ "KC_I": {
+ "key": "FA_HE",
+ "label": "ه",
+ }
+ "KC_O": {
+ "key": "FA_KHE",
+ "label": "خ",
+ }
+ "KC_P": {
+ "key": "FA_HEJ",
+ "label": "ح",
+ }
+ "KC_LBRC": {
+ "key": "FA_JIM",
+ "label": "ج",
+ }
+ "KC_RBRC": {
+ "key": "FA_CHE",
+ "label": "چ",
+ }
+ "KC_A": {
+ "key": "FA_SHIN",
+ "label": "ش",
+ }
+ "KC_S": {
+ "key": "FA_SIN",
+ "label": "س",
+ }
+ "KC_D": {
+ "key": "FA_YE",
+ "label": "ی",
+ }
+ "KC_F": {
+ "key": "FA_BE",
+ "label": "ب",
+ }
+ "KC_G": {
+ "key": "FA_LAM",
+ "label": "ل",
+ }
+ "KC_H": {
+ "key": "FA_ALEF",
+ "label": "ا",
+ }
+ "KC_J": {
+ "key": "FA_TE",
+ "label": "ت",
+ }
+ "KC_K": {
+ "key": "FA_NOON",
+ "label": "ن",
+ }
+ "KC_L": {
+ "key": "FA_MIM",
+ "label": "م",
+ }
+ "KC_SCLN": {
+ "key": "FA_KAF",
+ "label": "ک",
+ }
+ "KC_QUOT": {
+ "key": "FA_GAF",
+ "label": "گ",
+ }
+ "KC_BSLS": {
+ "key": "FA_BSLS",
+ "label": "\\",
+ }
+ "KC_LT": {
+ "key": "FA_LT",
+ "label": "<",
+ }
+ "KC_Z": {
+ "key": "FA_ZA",
+ "label": "ظ",
+ }
+ "KC_X": {
+ "key": "FA_TA",
+ "label": "ط",
+ }
+ "KC_C": {
+ "key": "FA_ZE",
+ "label": "ز",
+ }
+ "KC_V": {
+ "key": "FA_RE",
+ "label": "ر",
+ }
+ "KC_B": {
+ "key": "FA_ZAL",
+ "label": "ذ",
+ }
+ "KC_N": {
+ "key": "FA_DAL",
+ "label": "د",
+ }
+ "KC_M": {
+ "key": "FA_PE",
+ "label": "پ",
+ }
+ "KC_COMM": {
+ "key": "FA_WAW",
+ "label": "و",
+ }
+ "KC_DOT": {
+ "key": "FA_DOT",
+ "label": ".",
+ }
+ "KC_SLSH": {
+ "key": "FA_SLSH",
+ "label": "/",
+ }
+ "KC_SPC": {
+ "key": "FA_SPC",
+ "label": " ",
+ }
+/* Shifted symbols
+ * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
+ * │ ÷ │ ! │ ٬ │ ٫ │ ﷼ │ ٪ │ × │ ، │ * │ ) │ ( │ ـ │ + │ │
+ * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
+ * │ │ ْ │ ٌ │ ٍ │ ً │ ُ │ ِ │ َ │ ّ │ ] │ [ │ } │ { │ │
+ * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
+ * │ │ ؤ │ ئ │ ي │ إ │ أ │ آ │ ة │ » │ « │ : │ ؛ │ | │ │
+ * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
+ * │ │ > │ ك │ ٓ │ ژ │ ٰ │ │ ٔ │ ء │ │ │ ؟ │ │
+ * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
+ * │ │ │ │ │ │ │ │ │
+ * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
+ */
+ "S(FA_ZWJ)": {
+ "key": "FA_DIV",
+ "label": "÷",
+ }
+ "S(FA_1A)": {
+ "key": "FA_EXLM",
+ "label": "!",
+ }
+ "S(FA_2A)": {
+ "key": "FA_THS",
+ "label": "٬",
+ }
+ "S(FA_3A)": {
+ "key": "FA_DECS",
+ "label": "٫",
+ }
+ "S(FA_4A)": {
+ "key": "FA_RIAL",
+ "label": "﷼",
+ }
+ "S(FA_5A)": {
+ "key": "FA_PRCA",
+ "label": "٪",
+ }
+ "S(FA_6A)": {
+ "key": "FA_MUL",
+ "label": "×",
+ }
+ "S(FA_7A)": {
+ "key": "FA_COMA",
+ "label": "،",
+ }
+ "S(FA_8A)": {
+ "key": "FA_ASTR",
+ "label": "*",
+ }
+ "S(FA_9A)": {
+ "key": "FA_RPRN",
+ "label": ")",
+ }
+ "S(FA_0A)": {
+ "key": "FA_LPRN",
+ "label": "(",
+ }
+ "S(FA_MINS)": {
+ "key": "FA_TATW",
+ "label": "ـ",
+ }
+ "S(FA_EQL)": {
+ "key": "FA_PLUS",
+ "label": "+",
+ }
+ "S(FA_ZAD)": {
+ "key": "FA_SUK",
+ "label": "ْ",
+ }
+ "S(FA_SAD)": {
+ "key": "FA_DMTN",
+ "label": "ٌ",
+ }
+ "S(FA_SE)": {
+ "key": "FA_KSTN",
+ "label": "ٍ",
+ }
+ "S(FA_QAF)": {
+ "key": "FA_FTHN",
+ "label": "ً",
+ }
+ "S(FA_FE)": {
+ "key": "FA_DMM",
+ "label": "ُ",
+ }
+ "S(FA_GHYN)": {
+ "key": "FA_KAS",
+ "label": "ِ",
+ }
+ "S(FA_EYN)": {
+ "key": "FA_FAT",
+ "label": "َ",
+ }
+ "S(FA_HE)": {
+ "key": "FA_TSDD",
+ "label": "",
+ }
+ "S(FA_KHE)": {
+ "key": "FA_RBRC",
+ "label": "]",
+ }
+ "S(FA_HEJ)": {
+ "key": "FA_LBRC",
+ "label": "[",
+ }
+ "S(FA_JIM)": {
+ "key": "FA_RCBR",
+ "label": "}",
+ }
+ "S(FA_CHE)": {
+ "key": "FA_LCBR",
+ "label": "{",
+ }
+ "S(FA_SHIN)": {
+ "key": "FA_HMZV",
+ "label": "ؤ",
+ }
+ "S(FA_SIN)": {
+ "key": "FA_HMZY",
+ "label": "ئ",
+ }
+ "S(FA_YE)": {
+ "key": "FA_YEA",
+ "label": "ي",
+ }
+ "S(FA_BE)": {
+ "key": "FA_HMZU",
+ "label": "إ",
+ }
+ "S(FA_LAM)": {
+ "key": "FA_HMZO",
+ "label": "أ",
+ }
+ "S(FA_ALEF)": {
+ "key": "FA_MALF",
+ "label": "آ",
+ }
+ "S(FA_TE)": {
+ "key": "FA_TEHM",
+ "label": "ة",
+ }
+ "S(FA_NOON)": {
+ "key": "FA_RQOT",
+ "label": "»",
+ }
+ "S(FA_MIM)": {
+ "key": "FA_LQOT",
+ "label": "«",
+ }
+ "S(FA_KAF)": {
+ "key": "FA_COLN",
+ "label": ":",
+ }
+ "S(FA_GAF)": {
+ "key": "FA_SCLA",
+ "label": "؛",
+ }
+ "S(FA_LT)": {
+ "key": "FA_GT",
+ "label": ">",
+ }
+ "S(FA_ZA)": {
+ "key": "FA_KAFA",
+ "label": "ك",
+ }
+ "S(FA_TA)": {
+ "key": "FA_MADO",
+ "label": "ٓ",
+ }
+ "S(FA_ZE)": {
+ "key": "FA_JEH",
+ "label": "ژ",
+ }
+ "S(FA_RE)": {
+ "key": "FA_SUPA",
+ "label": "ٰ",
+ }
+ "S(FA_ZAL)": {
+ "key": "FA_ZWNJ",
+ "label": "(zero-width non-joiner)",
+ }
+ "S(FA_DAL)": {
+ "key": "FA_HMZA",
+ "label": "ٔ",
+ }
+ "S(FA_PE)": {
+ "key": "FA_HMZ",
+ "label": "ء",
+ }
+ "S(FA_SLSH)": {
+ "key": "FA_QSA",
+ "label": "؟",
+ }
+/* AltGr symbols
+ * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
+ * │ ~ │ ` │ @ │ # │ $ │ % │ ^ │ & │ • │ │ │ _ │ − │ │
+ * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
+ * │ │ ° │ │ € │ │ │ │ │ │ │ │ │ │ │
+ * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
+ * │ │ │ │ ى │ │ │ ٱ │ │ ﴾ │ ﴿ │ ; │ " │ ‐ │ │
+ * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
+ * │ │ | │ │ │ │ ٖ │ │ ٕ │ … │ , │ ' │ ? │ │
+ * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
+ * │ │ │ │ │ │ │ │ │
+ * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
+ */
+ "ALGR(FA_ZWJ)": {
+ "key": "FA_TILD",
+ "label": "~",
+ }
+ "ALGR(FA_1A)": {
+ "key": "FA_GRV",
+ "label": "`",
+ }
+ "ALGR(FA_2A)": {
+ "key": "FA_AT",
+ "label": "@",
+ }
+ "ALGR(FA_3A)": {
+ "key": "FA_HASH",
+ "label": "#",
+ }
+ "ALGR(FA_4A)": {
+ "key": "FA_DLR",
+ "label": "$",
+ }
+ "ALGR(FA_5A)": {
+ "key": "FA_PERC",
+ "label": "%",
+ }
+ "ALGR(FA_6A)": {
+ "key": "FA_CIRC",
+ "label": "^",
+ }
+ "ALGR(FA_7A)": {
+ "key": "FA_AMPR",
+ "label": "&",
+ }
+ "ALGR(FA_8A)": {
+ "key": "FA_BULT",
+ "label": "•",
+ }
+ "ALGR(FA_9A)": {
+ "key": "FA_LRM",
+ "label": "(left-to-right mark)",
+ }
+ "ALGR(FA_0A)": {
+ "key": "FA_RLM",
+ "label": "(right-to-left mark)",
+ }
+ "ALGR(FA_MINS)": {
+ "key": "FA_UNDS",
+ "label": "_",
+ }
+ "ALGR(FA_EQL)": {
+ "key": "FA_DMNS",
+ "label": "− (dead)",
+ }
+ "ALGR(FA_ZAD)": {
+ "key": "FA_DEG",
+ "label": "°",
+ }
+ "ALGR(FA_SE)": {
+ "key": "FA_EURO",
+ "label": "€",
+ }
+ "ALGR(FA_HE)": {
+ "key": "FA_LRO",
+ "label": "(left-to-right override)",
+ }
+ "ALGR(FA_KHE)": {
+ "key": "FA_RLO",
+ "label": "(right-to-left override)",
+ }
+ "ALGR(FA_HEJ)": {
+ "key": "FA_PDF",
+ "label": "(pop directional formatting)",
+ }
+ "ALGR(FA_JIM)": {
+ "key": "FA_LRE",
+ "label": "(left-to-right embedding)",
+ }
+ "ALGR(FA_CHE)": {
+ "key": "FA_RLE",
+ "label": "(right-to-left embedding)",
+ }
+ "ALGR(FA_YE)": {
+ "key": "FA_ALFM",
+ "label": "ى",
+ }
+ "ALGR(FA_ALEF)": {
+ "key": "FA_ALFW",
+ "label": "ٱ",
+ }
+ "ALGR(FA_NOON)": {
+ "key": "FA_LORP",
+ "label": "﴾",
+ }
+ "ALGR(FA_MIM)": {
+ "key": "FA_RORP",
+ "label": "﴿",
+ }
+ "ALGR(FA_KAF)": {
+ "key": "FA_SCLN",
+ "label": ";",
+ }
+ "ALGR(FA_GAF)": {
+ "key": "FA_DQT",
+ "label": "\"",
+ }
+ "ALGR(FA_BSLS)": {
+ "key": "FA_MINA",
+ "label": "-",
+ }
+ "ALGR(FA_ZA)": {
+ "key": "FA_PIPE",
+ "label": "|",
+ }
+ "ALGR(FA_RA)": {
+ "key": "FA_SUBA",
+ "label": "ٖ",
+ }
+ "ALGR(FA_DAL)": {
+ "key": "FA_HMZB",
+ "label": "ء",
+ }
+ "ALGR(FA_PE)": {
+ "key": "FA_ELLP",
+ "label": "…",
+ }
+ "ALGR(FA_WAW)": {
+ "key": "FA_COMM",
+ "label": ",",
+ }
+ "ALGR(FA_DOT)": {
+ "key": "FA_QUOT",
+ "label": "'",
+ }
+ "ALGR(FA_SLSH)": {
+ "key": "FA_QUES",
+ "label": "?",
+ }
+/* Shift+AltGr symbols
+ * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
+ * │ │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ │ │ │
+ * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
+ * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
+ * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
+ * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
+ * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
+ * │ │ ¦ │ │ │ │ │ │ │ │ │ │ │ │
+ * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
+ * │ │ │ │ │ │ │ │ │
+ * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
+ */
+ "S(ALGR(FA_1A))": {
+ "key": "FA_1",
+ "label": "1",
+ }
+ "S(ALGR(FA_2A))": {
+ "key": "FA_2",
+ "label": "2",
+ }
+ "S(ALGR(FA_3A))": {
+ "key": "FA_3",
+ "label": "3",
+ }
+ "S(ALGR(FA_4A))": {
+ "key": "FA_4",
+ "label": "4",
+ }
+ "S(ALGR(FA_5A))": {
+ "key": "FA_5",
+ "label": "5",
+ }
+ "S(ALGR(FA_6A))": {
+ "key": "FA_6",
+ "label": "6",
+ }
+ "S(ALGR(FA_7A))": {
+ "key": "FA_7",
+ "label": "7",
+ }
+ "S(ALGR(FA_8A))": {
+ "key": "FA_8",
+ "label": "8",
+ }
+ "S(ALGR(FA_9A))": {
+ "key": "FA_9",
+ "label": "9",
+ }
+ "S(ALGR(FA_0A))": {
+ "key": "FA_0",
+ "label": "0",
+ }
+ "S(ALGR(FA_LT))": {
+ "key": "FA_BRKP",
+ "label": "¦",
+ }
+ "S(ALGR(FA_SPC))": {
+ "key": "FA_NNBS",
+ "label": "(narrow non-breaking space)",
+ }
+ }
+}
diff --git a/data/constants/keycodes/keycodes_0.0.1_basic.hjson b/data/constants/keycodes/keycodes_0.0.1_basic.hjson
index 430211eccae6..66aba7b1fc10 100644
--- a/data/constants/keycodes/keycodes_0.0.1_basic.hjson
+++ b/data/constants/keycodes/keycodes_0.0.1_basic.hjson
@@ -1140,7 +1140,7 @@
"0x00AE": {
"group": "media",
"key": "KC_MEDIA_PLAY_PAUSE",
- "label": "Mute",
+ "label": "Play/Pause Track",
"aliases": [
"KC_MPLY"
]
diff --git a/data/constants/keycodes/keycodes_0.0.1_midi.hjson b/data/constants/keycodes/keycodes_0.0.1_midi.hjson
index b9826f92c968..5ab9ef24d5f9 100644
--- a/data/constants/keycodes/keycodes_0.0.1_midi.hjson
+++ b/data/constants/keycodes/keycodes_0.0.1_midi.hjson
@@ -84,7 +84,7 @@
"group": "midi",
"key": "QK_MIDI_NOTE_G_SHARP_0",
"aliases": [
- "MI_Gs"
+ "MI_Gs",
"MI_Ab"
]
},
@@ -99,7 +99,7 @@
"group": "midi",
"key": "QK_MIDI_NOTE_A_SHARP_0",
"aliases": [
- "MI_As"
+ "MI_As",
"MI_Bb"
]
},
diff --git a/data/constants/keycodes/keycodes_0.0.2_kb.hjson b/data/constants/keycodes/keycodes_0.0.2_kb.hjson
index f9ffc7432d30..28c4a8e8be93 100644
--- a/data/constants/keycodes/keycodes_0.0.2_kb.hjson
+++ b/data/constants/keycodes/keycodes_0.0.2_kb.hjson
@@ -2,131 +2,131 @@
"keycodes": {
"0x7E00": {
"group": "kb",
- "key": "QK_KB_0",
+ "key": "QK_KB_0"
},
"0x7E01": {
"group": "kb",
- "key": "QK_KB_1",
+ "key": "QK_KB_1"
},
"0x7E02": {
"group": "kb",
- "key": "QK_KB_2",
+ "key": "QK_KB_2"
},
"0x7E03": {
"group": "kb",
- "key": "QK_KB_3",
+ "key": "QK_KB_3"
},
"0x7E04": {
"group": "kb",
- "key": "QK_KB_4",
+ "key": "QK_KB_4"
},
"0x7E05": {
"group": "kb",
- "key": "QK_KB_5",
+ "key": "QK_KB_5"
},
"0x7E06": {
"group": "kb",
- "key": "QK_KB_6",
+ "key": "QK_KB_6"
},
"0x7E07": {
"group": "kb",
- "key": "QK_KB_7",
+ "key": "QK_KB_7"
},
"0x7E08": {
"group": "kb",
- "key": "QK_KB_8",
+ "key": "QK_KB_8"
},
"0x7E09": {
"group": "kb",
- "key": "QK_KB_9",
+ "key": "QK_KB_9"
},
"0x7E0A": {
"group": "kb",
- "key": "QK_KB_10",
+ "key": "QK_KB_10"
},
"0x7E0B": {
"group": "kb",
- "key": "QK_KB_11",
+ "key": "QK_KB_11"
},
"0x7E0C": {
"group": "kb",
- "key": "QK_KB_12",
+ "key": "QK_KB_12"
},
"0x7E0D": {
"group": "kb",
- "key": "QK_KB_13",
+ "key": "QK_KB_13"
},
"0x7E0E": {
"group": "kb",
- "key": "QK_KB_14",
+ "key": "QK_KB_14"
},
"0x7E0F": {
"group": "kb",
- "key": "QK_KB_15",
+ "key": "QK_KB_15"
},
"0x7E10": {
"group": "kb",
- "key": "QK_KB_16",
+ "key": "QK_KB_16"
},
"0x7E11": {
"group": "kb",
- "key": "QK_KB_17",
+ "key": "QK_KB_17"
},
"0x7E12": {
"group": "kb",
- "key": "QK_KB_18",
+ "key": "QK_KB_18"
},
"0x7E13": {
"group": "kb",
- "key": "QK_KB_19",
+ "key": "QK_KB_19"
},
"0x7E14": {
"group": "kb",
- "key": "QK_KB_20",
+ "key": "QK_KB_20"
},
"0x7E15": {
"group": "kb",
- "key": "QK_KB_21",
+ "key": "QK_KB_21"
},
"0x7E16": {
"group": "kb",
- "key": "QK_KB_22",
+ "key": "QK_KB_22"
},
"0x7E17": {
"group": "kb",
- "key": "QK_KB_23",
+ "key": "QK_KB_23"
},
"0x7E18": {
"group": "kb",
- "key": "QK_KB_24",
+ "key": "QK_KB_24"
},
"0x7E19": {
"group": "kb",
- "key": "QK_KB_25",
+ "key": "QK_KB_25"
},
"0x7E1A": {
"group": "kb",
- "key": "QK_KB_26",
- },
+ "key": "QK_KB_26"
+ },
"0x7E1B": {
"group": "kb",
- "key": "QK_KB_27",
+ "key": "QK_KB_27"
},
"0x7E1C": {
"group": "kb",
- "key": "QK_KB_28",
+ "key": "QK_KB_28"
},
"0x7E1D": {
"group": "kb",
- "key": "QK_KB_29",
+ "key": "QK_KB_29"
},
"0x7E1E": {
"group": "kb",
- "key": "QK_KB_30",
+ "key": "QK_KB_30"
},
"0x7E1F": {
"group": "kb",
- "key": "QK_KB_31",
- },
+ "key": "QK_KB_31"
+ }
}
}
diff --git a/data/constants/keycodes/keycodes_0.0.2_midi.hjson b/data/constants/keycodes/keycodes_0.0.2_midi.hjson
index c15c2dd4336f..ddf79be96cdd 100644
--- a/data/constants/keycodes/keycodes_0.0.2_midi.hjson
+++ b/data/constants/keycodes/keycodes_0.0.2_midi.hjson
@@ -86,7 +86,7 @@
"group": "midi",
"key": "QK_MIDI_NOTE_G_SHARP_0",
"aliases": [
- "MI_Gs"
+ "MI_Gs",
"MI_Ab"
]
},
@@ -101,7 +101,7 @@
"group": "midi",
"key": "QK_MIDI_NOTE_A_SHARP_0",
"aliases": [
- "MI_As"
+ "MI_As",
"MI_Bb"
]
},
diff --git a/data/constants/keycodes/keycodes_0.0.2_user.hjson b/data/constants/keycodes/keycodes_0.0.2_user.hjson
index 42392dc64935..a30e8e8eed12 100644
--- a/data/constants/keycodes/keycodes_0.0.2_user.hjson
+++ b/data/constants/keycodes/keycodes_0.0.2_user.hjson
@@ -2,131 +2,131 @@
"keycodes": {
"0x7E40": {
"group": "user",
- "key": "QK_USER_0",
+ "key": "QK_USER_0"
},
"0x7E41": {
"group": "user",
- "key": "QK_USER_1",
+ "key": "QK_USER_1"
},
"0x7E42": {
"group": "user",
- "key": "QK_USER_2",
+ "key": "QK_USER_2"
},
"0x7E43": {
"group": "user",
- "key": "QK_USER_3",
+ "key": "QK_USER_3"
},
"0x7E44": {
"group": "user",
- "key": "QK_USER_4",
+ "key": "QK_USER_4"
},
"0x7E45": {
"group": "user",
- "key": "QK_USER_5",
+ "key": "QK_USER_5"
},
"0x7E46": {
"group": "user",
- "key": "QK_USER_6",
+ "key": "QK_USER_6"
},
"0x7E47": {
"group": "user",
- "key": "QK_USER_7",
+ "key": "QK_USER_7"
},
"0x7E48": {
"group": "user",
- "key": "QK_USER_8",
+ "key": "QK_USER_8"
},
"0x7E49": {
"group": "user",
- "key": "QK_USER_9",
+ "key": "QK_USER_9"
},
"0x7E4A": {
"group": "user",
- "key": "QK_USER_10",
+ "key": "QK_USER_10"
},
"0x7E4B": {
"group": "user",
- "key": "QK_USER_11",
+ "key": "QK_USER_11"
},
"0x7E4C": {
"group": "user",
- "key": "QK_USER_12",
+ "key": "QK_USER_12"
},
"0x7E4D": {
"group": "user",
- "key": "QK_USER_13",
+ "key": "QK_USER_13"
},
"0x7E4E": {
"group": "user",
- "key": "QK_USER_14",
+ "key": "QK_USER_14"
},
"0x7E4F": {
"group": "user",
- "key": "QK_USER_15",
+ "key": "QK_USER_15"
},
"0x7E50": {
"group": "user",
- "key": "QK_USER_16",
+ "key": "QK_USER_16"
},
"0x7E51": {
"group": "user",
- "key": "QK_USER_17",
+ "key": "QK_USER_17"
},
"0x7E52": {
"group": "user",
- "key": "QK_USER_18",
+ "key": "QK_USER_18"
},
"0x7E53": {
"group": "user",
- "key": "QK_USER_19",
+ "key": "QK_USER_19"
},
"0x7E54": {
"group": "user",
- "key": "QK_USER_20",
+ "key": "QK_USER_20"
},
"0x7E55": {
"group": "user",
- "key": "QK_USER_21",
+ "key": "QK_USER_21"
},
"0x7E56": {
"group": "user",
- "key": "QK_USER_22",
+ "key": "QK_USER_22"
},
"0x7E57": {
"group": "user",
- "key": "QK_USER_23",
+ "key": "QK_USER_23"
},
"0x7E58": {
"group": "user",
- "key": "QK_USER_24",
+ "key": "QK_USER_24"
},
"0x7E59": {
"group": "user",
- "key": "QK_USER_25",
+ "key": "QK_USER_25"
},
"0x7E5A": {
"group": "user",
- "key": "QK_USER_26",
- },
+ "key": "QK_USER_26"
+ },
"0x7E5B": {
"group": "user",
- "key": "QK_USER_27",
+ "key": "QK_USER_27"
},
"0x7E5C": {
"group": "user",
- "key": "QK_USER_28",
+ "key": "QK_USER_28"
},
"0x7E5D": {
"group": "user",
- "key": "QK_USER_29",
+ "key": "QK_USER_29"
},
"0x7E5E": {
"group": "user",
- "key": "QK_USER_30",
+ "key": "QK_USER_30"
},
"0x7E5F": {
"group": "user",
- "key": "QK_USER_31",
- },
+ "key": "QK_USER_31"
+ }
}
}
diff --git a/data/constants/keycodes/keycodes_0.0.5.hjson b/data/constants/keycodes/keycodes_0.0.5.hjson
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/data/constants/keycodes/keycodes_0.0.5_basic.hjson b/data/constants/keycodes/keycodes_0.0.5_basic.hjson
new file mode 100644
index 000000000000..79b6bf6596ef
--- /dev/null
+++ b/data/constants/keycodes/keycodes_0.0.5_basic.hjson
@@ -0,0 +1,175 @@
+{
+ "keycodes": {
+ "0x00CD": {
+ "group": "mouse",
+ "key": "QK_MOUSE_CURSOR_UP",
+ "label": "Mouse cursor up",
+ "aliases": [
+ "!reset!",
+ "MS_UP"
+ ]
+ },
+ "0x00CE": {
+ "group": "mouse",
+ "key": "QK_MOUSE_CURSOR_DOWN",
+ "label": "Mouse cursor down",
+ "aliases": [
+ "!reset!",
+ "MS_DOWN"
+ ]
+ },
+ "0x00CF": {
+ "group": "mouse",
+ "key": "QK_MOUSE_CURSOR_LEFT",
+ "label": "Mouse cursor left",
+ "aliases": [
+ "!reset!",
+ "MS_LEFT"
+ ]
+ },
+ "0x00D0": {
+ "group": "mouse",
+ "key": "QK_MOUSE_CURSOR_RIGHT",
+ "label": "Mouse cursor right",
+ "aliases": [
+ "!reset!",
+ "MS_RGHT"
+ ]
+ },
+ "0x00D1": {
+ "group": "mouse",
+ "key": "QK_MOUSE_BUTTON_1",
+ "label": "Mouse button 1",
+ "aliases": [
+ "!reset!",
+ "MS_BTN1"
+ ]
+ },
+ "0x00D2": {
+ "group": "mouse",
+ "key": "QK_MOUSE_BUTTON_2",
+ "label": "Mouse button 2",
+ "aliases": [
+ "!reset!",
+ "MS_BTN2"
+ ]
+ },
+ "0x00D3": {
+ "group": "mouse",
+ "key": "QK_MOUSE_BUTTON_3",
+ "label": "Mouse button 3",
+ "aliases": [
+ "!reset!",
+ "MS_BTN3"
+ ]
+ },
+ "0x00D4": {
+ "group": "mouse",
+ "key": "QK_MOUSE_BUTTON_4",
+ "label": "Mouse button 4",
+ "aliases": [
+ "!reset!",
+ "MS_BTN4"
+ ]
+ },
+ "0x00D5": {
+ "group": "mouse",
+ "key": "QK_MOUSE_BUTTON_5",
+ "label": "Mouse button 5",
+ "aliases": [
+ "!reset!",
+ "MS_BTN5"
+ ]
+ },
+ "0x00D6": {
+ "group": "mouse",
+ "key": "QK_MOUSE_BUTTON_6",
+ "label": "Mouse button 6",
+ "aliases": [
+ "!reset!",
+ "MS_BTN6"
+ ]
+ },
+ "0x00D7": {
+ "group": "mouse",
+ "key": "QK_MOUSE_BUTTON_7",
+ "label": "Mouse button 7",
+ "aliases": [
+ "!reset!",
+ "MS_BTN7"
+ ]
+ },
+ "0x00D8": {
+ "group": "mouse",
+ "key": "QK_MOUSE_BUTTON_8",
+ "label": "Mouse button 8",
+ "aliases": [
+ "!reset!",
+ "MS_BTN8"
+ ]
+ },
+ "0x00D9": {
+ "group": "mouse",
+ "key": "QK_MOUSE_WHEEL_UP",
+ "label": "Mouse wheel up",
+ "aliases": [
+ "!reset!",
+ "MS_WHLU"
+ ]
+ },
+ "0x00DA": {
+ "group": "mouse",
+ "key": "QK_MOUSE_WHEEL_DOWN",
+ "label": "Mouse wheel down",
+ "aliases": [
+ "!reset!",
+ "MS_WHLD"
+ ]
+ },
+ "0x00DB": {
+ "group": "mouse",
+ "key": "QK_MOUSE_WHEEL_LEFT",
+ "label": "Mouse wheel left",
+ "aliases": [
+ "!reset!",
+ "MS_WHLL"
+ ]
+ },
+ "0x00DC": {
+ "group": "mouse",
+ "key": "QK_MOUSE_WHEEL_RIGHT",
+ "label": "Mouse wheel right",
+ "aliases": [
+ "!reset!",
+ "MS_WHLR"
+ ]
+ },
+ "0x00DD": {
+ "group": "mouse",
+ "key": "QK_MOUSE_ACCELERATION_0",
+ "label": "Set mouse acceleration to 0",
+ "aliases": [
+ "!reset!",
+ "MS_ACL0"
+ ]
+ },
+ "0x00DE": {
+ "group": "mouse",
+ "key": "QK_MOUSE_ACCELERATION_1",
+ "label": "Set mouse acceleration to 1",
+ "aliases": [
+ "!reset!",
+ "MS_ACL1"
+ ]
+ },
+ "0x00DF": {
+ "group": "mouse",
+ "key": "QK_MOUSE_ACCELERATION_2",
+ "label": "Set mouse acceleration to 2",
+ "aliases": [
+ "!reset!",
+ "MS_ACL2"
+ ]
+ }
+ }
+}
diff --git a/data/constants/keycodes/keycodes_0.0.6.hjson b/data/constants/keycodes/keycodes_0.0.6.hjson
new file mode 100644
index 000000000000..f03ef747a49f
--- /dev/null
+++ b/data/constants/keycodes/keycodes_0.0.6.hjson
@@ -0,0 +1,7 @@
+{
+ "ranges": {
+ "0x52E0/0x001F": {
+ "define": "QK_PERSISTENT_DEF_LAYER"
+ }
+ }
+}
diff --git a/data/constants/keycodes/keycodes_0.0.6_connection.hjson b/data/constants/keycodes/keycodes_0.0.6_connection.hjson
new file mode 100644
index 000000000000..9be110682546
--- /dev/null
+++ b/data/constants/keycodes/keycodes_0.0.6_connection.hjson
@@ -0,0 +1,115 @@
+{
+ "ranges": {
+ "0x7780/0x003F": {
+ "define": "QK_CONNECTION"
+ }
+ }
+ "keycodes": {
+ "0x7780": {
+ "group": "connection",
+ "key": "QK_OUTPUT_AUTO",
+ "aliases": [
+ "OU_AUTO"
+ ]
+ },
+ "0x7781": {
+ "group": "connection",
+ "key": "QK_OUTPUT_NEXT",
+ "aliases": [
+ "OU_NEXT"
+ ]
+ },
+ "0x7782": {
+ "group": "connection",
+ "key": "QK_OUTPUT_PREV",
+ "aliases": [
+ "OU_PREV"
+ ]
+ },
+ "0x7783": {
+ "group": "connection",
+ "key": "QK_OUTPUT_NONE",
+ "aliases": [
+ "OU_NONE"
+ ]
+ },
+ "0x7784": {
+ "group": "connection",
+ "key": "QK_OUTPUT_USB",
+ "aliases": [
+ "OU_USB"
+ ]
+ },
+ "0x7785": {
+ "group": "connection",
+ "key": "QK_OUTPUT_2P4GHZ",
+ "aliases": [
+ "OU_2P4G"
+ ]
+ },
+ "0x7786": {
+ "group": "connection",
+ "key": "QK_OUTPUT_BLUETOOTH",
+ "aliases": [
+ "OU_BT"
+ ]
+ },
+
+ "0x7790": {
+ "group": "connection",
+ "key": "QK_BLUETOOTH_PROFILE_NEXT",
+ "aliases": [
+ "BT_NEXT"
+ ]
+ },
+ "0x7791": {
+ "group": "connection",
+ "key": "QK_BLUETOOTH_PROFILE_PREV",
+ "aliases": [
+ "BT_PREV"
+ ]
+ },
+ "0x7792": {
+ "group": "connection",
+ "key": "QK_BLUETOOTH_UNPAIR",
+ "aliases": [
+ "BT_UNPR"
+ ]
+ }
+ "0x7793": {
+ "group": "connection",
+ "key": "QK_BLUETOOTH_PROFILE1",
+ "aliases": [
+ "BT_PRF1"
+ ]
+ },
+ "0x7794": {
+ "group": "connection",
+ "key": "QK_BLUETOOTH_PROFILE2",
+ "aliases": [
+ "BT_PRF2"
+ ]
+ },
+ "0x7795": {
+ "group": "connection",
+ "key": "QK_BLUETOOTH_PROFILE3",
+ "aliases": [
+ "BT_PRF3"
+ ]
+ },
+ "0x7796": {
+ "group": "connection",
+ "key": "QK_BLUETOOTH_PROFILE4",
+ "aliases": [
+ "BT_PRF4"
+ ]
+ },
+ "0x7797": {
+ "group": "connection",
+ "key": "QK_BLUETOOTH_PROFILE5",
+ "aliases": [
+ "BT_PRF5"
+ ]
+ },
+ }
+}
diff --git a/data/constants/keycodes/keycodes_0.0.6_quantum.hjson b/data/constants/keycodes/keycodes_0.0.6_quantum.hjson
new file mode 100644
index 000000000000..be3285f9e437
--- /dev/null
+++ b/data/constants/keycodes/keycodes_0.0.6_quantum.hjson
@@ -0,0 +1,14 @@
+{
+ "keycodes": {
+ "0x7C20": "!delete!", // old QK_OUTPUT_AUTO
+ "0x7C21": "!delete!", // old QK_OUTPUT_USB
+ "0x7C22": "!delete!", // old QK_OUTPUT_BLUETOOTH
+ "0x7C7B": {
+ "group": "quantum",
+ "key": "QK_LAYER_LOCK",
+ "aliases": [
+ "QK_LLCK"
+ ]
+ }
+ }
+}
diff --git a/data/mappings/defaults.hjson b/data/mappings/defaults.hjson
index 71902c92d68c..32322a030953 100644
--- a/data/mappings/defaults.hjson
+++ b/data/mappings/defaults.hjson
@@ -84,6 +84,11 @@
"board": "STEMCELL",
"bootloader": "tinyuf2",
"processor": "STM32F411"
+ },
+ "svlinky": {
+ "board": "QMK_PM2040",
+ "bootloader": "rp2040",
+ "processor": "RP2040"
}
}
}
diff --git a/data/mappings/info_config.hjson b/data/mappings/info_config.hjson
index b61ca0407145..8d3e3c7f0ee9 100644
--- a/data/mappings/info_config.hjson
+++ b/data/mappings/info_config.hjson
@@ -64,6 +64,9 @@
"WEAR_LEVELING_BACKING_SIZE": {"info_key": "eeprom.wear_leveling.backing_size", "value_type": "int", "to_json": false},
"WEAR_LEVELING_LOGICAL_SIZE": {"info_key": "eeprom.wear_leveling.logical_size", "value_type": "int", "to_json": false},
+ // Layer locking
+ "LAYER_LOCK_IDLE_TIMEOUT": {"info_key": "layer_lock.timeout", "value_type": "int"},
+
// Indicators
"LED_CAPS_LOCK_PIN": {"info_key": "indicators.caps_lock"},
"LED_NUM_LOCK_PIN": {"info_key": "indicators.num_lock"},
@@ -72,6 +75,11 @@
"LED_KANA_PIN": {"info_key": "indicators.kana"},
"LED_PIN_ON_STATE": {"info_key": "indicators.on_state", "value_type": "int"},
+ // Joystick
+ "JOYSTICK_AXIS_COUNT": {"info_key": "joystick.axis_count", "value_type": "int"},
+ "JOYSTICK_AXIS_RESOLUTION": {"info_key": "joystick.axis_resolution", "value_type": "int"},
+ "JOYSTICK_BUTTON_COUNT": {"info_key": "joystick.button_count", "value_type": "int"},
+
// Leader Key
"LEADER_PER_KEY_TIMING": {"info_key": "leader_key.timing", "value_type": "flag"},
"LEADER_KEY_STRICT_KEY_PROCESSING": {"info_key": "leader_key.strict_processing", "value_type": "flag"},
@@ -171,7 +179,7 @@
"SECURE_UNLOCK_TIMEOUT": {"info_key": "secure.unlock_timeout", "value_type": "int"},
// Split Keyboard
- "SOFT_SERIAL_PIN": {"info_key": "split.soft_serial_pin"},
+ "SOFT_SERIAL_PIN": {"info_key": "split.serial.pin"},
"SOFT_SERIAL_SPEED": {"info_key": "split.soft_serial_speed"},
"SPLIT_HAND_MATRIX_GRID": {"info_key": "split.handedness.matrix_grid", "value_type": "array", "to_c": false},
"SPLIT_HAND_PIN": {"info_key": "split.handedness.pin"},
diff --git a/data/mappings/info_rules.hjson b/data/mappings/info_rules.hjson
index 97611bcf587c..64972af63b0e 100644
--- a/data/mappings/info_rules.hjson
+++ b/data/mappings/info_rules.hjson
@@ -25,6 +25,8 @@
"ENCODER_DRIVER": {"info_key": "encoder.driver"},
"FIRMWARE_FORMAT": {"info_key": "build.firmware_format"},
"HAPTIC_DRIVER": {"info_key": "haptic.driver"},
+ "JOYSTICK_DRIVER": {"info_key": "joystick.driver"},
+ "JOYSTICK_ENABLE": {"info_key": "joystick.enabled", "value_type": "bool"},
"KEYBOARD_SHARED_EP": {"info_key": "usb.shared_endpoint.keyboard", "value_type": "bool"},
"LAYOUTS": {"info_key": "community_layouts", "value_type": "list"},
"LED_MATRIX_DRIVER": {"info_key": "led_matrix.driver"},
@@ -41,6 +43,7 @@
"RGB_MATRIX_DRIVER": {"info_key": "rgb_matrix.driver"},
"RGBLIGHT_DRIVER": {"info_key": "rgblight.driver"},
"SECURE_ENABLE": {"info_key": "secure.enabled", "value_type": "bool"},
+ "SERIAL_DRIVER": {"info_key": "split.serial.driver"},
"SPLIT_KEYBOARD": {"info_key": "split.enabled", "value_type": "bool"},
"SPLIT_TRANSPORT": {"info_key": "split.transport.protocol", "to_c": false},
"STENO_ENABLE": {"info_key": "stenography.enabled", "value_type": "bool"},
diff --git a/data/mappings/keyboard_aliases.hjson b/data/mappings/keyboard_aliases.hjson
index 57585aae9235..72f6994c096d 100644
--- a/data/mappings/keyboard_aliases.hjson
+++ b/data/mappings/keyboard_aliases.hjson
@@ -563,6 +563,15 @@
"plain60": {
"target": "evyd13/plain60"
},
+ "planck/ez": {
+ "target": "zsa/planck_ez/base"
+ },
+ "planck/ez/base": {
+ "target": "zsa/planck_ez/base"
+ },
+ "planck/ez/glow": {
+ "target": "zsa/planck_ez/glow"
+ },
"ploopyco/trackball": {
"target": "ploopyco/trackball/rev1_005"
},
@@ -1060,7 +1069,7 @@
"target": "lyso1/lefishe"
},
"lets_split_eh/eh": {
- "target": "maple_computing/lets_split_eh/eh"
+ "target": "maple_computing/lets_split_eh"
},
"ls_60": {
"target": "weirdo/ls_60"
@@ -1080,6 +1089,9 @@
"macro1": {
"target": "laneware/macro1"
},
+ "maple_computing/lets_split_eh/eh": {
+ "target": "maple_computing/lets_split_eh"
+ },
"massdrop/thekey": {
"target": "drop/thekey/v1"
},
@@ -1137,6 +1149,12 @@
"mt980": {
"target": "mt/mt980"
},
+ "mt/ncr80/hotswap": {
+ "target": "mt/ncr80/r2/hotswap"
+ },
+ "mt/ncr80/solder": {
+ "target": "mt/ncr80/r2/solder"
+ },
"nafuda": {
"target": "salicylic_acid3/nafuda"
},
@@ -1347,6 +1365,12 @@
"runner3680/5x8": {
"target": "omkbd/runner3680/5x8"
},
+ "saevus/cor": {
+ "target": "concreteflowers/cor"
+ },
+ "saevus/cor_tkl": {
+ "target": "concreteflowers/cor_tkl"
+ },
"scarletbandana": {
"target": "woodkeys/scarletbandana"
},
@@ -1525,5 +1549,8 @@
},
"kprepublic/jj50": {
"target": "kprepublic/jj50/rev1"
+ },
+ "dnworks/9973": {
+ "target": "dnworks/tkl87"
}
}
diff --git a/data/schemas/definitions.jsonschema b/data/schemas/definitions.jsonschema
index a1fdd2dcc680..76ea8520ac98 100644
--- a/data/schemas/definitions.jsonschema
+++ b/data/schemas/definitions.jsonschema
@@ -16,12 +16,6 @@
"type": "object",
"additionalProperties": {"type": "boolean"}
},
- "build_target": {
- "oneOf": [
- {"$ref": "#/keyboard_keymap_tuple"},
- {"$ref": "#/json_file_path"}
- ]
- },
"filename": {
"type": "string",
"minLength": 1,
@@ -40,7 +34,8 @@
"pattern": "^[0-9a-z_/\\-]+\\.json$"
},
"key_unit": {
- "type": "number"
+ "type": "number",
+ "minimum": 0
},
"keyboard": {
"type": "string",
@@ -52,6 +47,19 @@
{"$ref": "#/keyboard"},
{"$ref": "#/filename"}
],
+ "minItems": 2,
+ "maxItems": 2,
+ "unevaluatedItems": false
+ },
+ "keyboard_keymap_env": {
+ "type": "array",
+ "prefixItems": [
+ {"$ref": "#/keyboard"},
+ {"$ref": "#/filename"},
+ {"$ref": "#/kvp_object"}
+ ],
+ "minItems": 3,
+ "maxItems": 3,
"unevaluatedItems": false
},
"keycode": {
@@ -86,6 +94,10 @@
"maxLength": 7,
"pattern": "^[A-Z][A-Zs_0-9]*$"
},
+ "kvp_object": {
+ "type": "object",
+ "additionalProperties": {"type": "string"}
+ },
"layout_macro": {
"oneOf": [
{
diff --git a/data/schemas/false.jsonschema b/data/schemas/false.jsonschema
deleted file mode 100644
index c508d5366f70..000000000000
--- a/data/schemas/false.jsonschema
+++ /dev/null
@@ -1 +0,0 @@
-false
diff --git a/data/schemas/keyboard.jsonschema b/data/schemas/keyboard.jsonschema
index 9222cde0d16a..389b7cbfcbf9 100644
--- a/data/schemas/keyboard.jsonschema
+++ b/data/schemas/keyboard.jsonschema
@@ -45,7 +45,7 @@
},
"development_board": {
"type": "string",
- "enum": ["promicro", "elite_c", "elite_pi", "proton_c", "kb2040", "promicro_rp2040", "blok", "michi", "bit_c_pro", "stemcell", "bluepill", "blackpill_f401", "blackpill_f411", "bonsai_c4", "helios", "liatris", "imera"]
+ "enum": ["promicro", "elite_c", "elite_pi", "proton_c", "kb2040", "promicro_rp2040", "blok", "michi", "bit_c_pro", "stemcell", "bluepill", "blackpill_f401", "blackpill_f411", "bonsai_c4", "helios", "liatris", "imera", "svlinky"]
},
"pin_compatible": {
"type": "string",
@@ -92,6 +92,7 @@
"GD32VF103",
"WB32F3G71",
"WB32FQ95",
+ "AT32F415",
"atmega16u2",
"atmega32u2",
"atmega16u4",
@@ -216,6 +217,7 @@
"type": "string",
"enum": [
"apm32-dfu",
+ "at32-dfu",
"atmel-dfu",
"bootloadhid",
"caterina",
@@ -342,7 +344,43 @@
"on_state": {"$ref": "qmk.definitions.v1#/bit"}
}
},
+ "joystick": {
+ "type": "object",
+ "properties": {
+ "enabled": {"type": "boolean"},
+ "driver": {"type": "string"},
+ "button_count": {"$ref": "qmk.definitions.v1#/unsigned_int"},
+ "axis_resolution": {"$ref": "qmk.definitions.v1#/unsigned_int"},
+ "axes": {
+ "type": "object",
+ "propertyNames": {"enum": ["x", "y", "z", "rx", "ry", "rz"]}
+ "additionalProperties": {
+ "oneOf": [
+ {
+ "type": "object",
+ "properties": {
+ "input_pin": {"$ref": "qmk.definitions.v1#/mcu_pin"},
+ "low": {"$ref": "qmk.definitions.v1#/unsigned_int"},
+ "rest": {"$ref": "qmk.definitions.v1#/unsigned_int"},
+ "high": {"$ref": "qmk.definitions.v1#/unsigned_int"}
+ }
+ },
+ {
+ "type": "string",
+ "enum": ["virtual"]
+ }
+ ]
+ }
+ }
+ }
+ },
"keycodes": {"$ref": "qmk.definitions.v1#/keycode_decl_array"},
+ "layer_lock": {
+ "type": "object",
+ "properties": {
+ "timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"}
+ }
+ },
"layout_aliases": {
"type": "object",
"additionalProperties": {"$ref": "qmk.definitions.v1#/layout_macro"}
@@ -516,8 +554,8 @@
"minimum": 0
}
},
- "x": {"$ref": "qmk.definitions.v1#/key_unit"},
- "y": {"$ref": "qmk.definitions.v1#/key_unit"},
+ "x": {"$ref": "qmk.definitions.v1#/unsigned_int"},
+ "y": {"$ref": "qmk.definitions.v1#/unsigned_int"},
"flags": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}
}
}
@@ -603,8 +641,8 @@
"minimum": 0
}
},
- "x": {"$ref": "qmk.definitions.v1#/key_unit"},
- "y": {"$ref": "qmk.definitions.v1#/key_unit"},
+ "x": {"$ref": "qmk.definitions.v1#/unsigned_int"},
+ "y": {"$ref": "qmk.definitions.v1#/unsigned_int"},
"flags": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}
}
}
@@ -795,12 +833,26 @@
}
}
},
- "soft_serial_pin": {"$ref": "qmk.definitions.v1#/mcu_pin"},
+ "soft_serial_pin": {
+ "$ref": "qmk.definitions.v1#/mcu_pin",
+ "$comment": "Deprecated: use split.serial.pin instead"
+ },
"soft_serial_speed": {
"type": "integer",
"minimum": 0,
"maximum": 5
},
+ "serial": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "driver": {
+ "type": "string",
+ "enum": ["bitbang", "usart", "vendor"]
+ },
+ "pin": {"$ref": "qmk.definitions.v1#/mcu_pin"}
+ }
+ },
"transport": {
"type": "object",
"additionalProperties": false,
diff --git a/data/schemas/keymap.jsonschema b/data/schemas/keymap.jsonschema
index 7233e896e940..e967e45c53e4 100644
--- a/data/schemas/keymap.jsonschema
+++ b/data/schemas/keymap.jsonschema
@@ -72,10 +72,5 @@
"notes": {
"type": "string"
}
- },
- "required": [
- "keyboard",
- "layout",
- "layers"
- ]
+ }
}
diff --git a/data/schemas/true.jsonschema b/data/schemas/true.jsonschema
deleted file mode 100644
index 27ba77ddaf61..000000000000
--- a/data/schemas/true.jsonschema
+++ /dev/null
@@ -1 +0,0 @@
-true
diff --git a/data/schemas/user_repo_v1.jsonschema b/data/schemas/user_repo_v1.jsonschema
index 6cdf758685c5..69a59bce0072 100644
--- a/data/schemas/user_repo_v1.jsonschema
+++ b/data/schemas/user_repo_v1.jsonschema
@@ -3,6 +3,14 @@
"$id": "qmk.user_repo.v1",
"title": "User Repository Information",
"type": "object",
+ "definitions": {
+ "build_target": {
+ "oneOf": [
+ {"$ref": "qmk.definitions.v1#/keyboard_keymap_tuple"},
+ {"$ref": "qmk.definitions.v1#/json_file_path"}
+ ]
+ },
+ },
"required": [
"userspace_version",
"build_targets"
@@ -15,7 +23,7 @@
"build_targets": {
"type": "array",
"items": {
- "$ref": "qmk.definitions.v1#/build_target"
+ "$ref": "#/definitions/build_target"
}
}
}
diff --git a/data/schemas/user_repo_v1_1.jsonschema b/data/schemas/user_repo_v1_1.jsonschema
new file mode 100644
index 000000000000..5a7ccce0633c
--- /dev/null
+++ b/data/schemas/user_repo_v1_1.jsonschema
@@ -0,0 +1,31 @@
+{
+ "$schema": "https://json-schema.org/draft/2020-12/schema#",
+ "$id": "qmk.user_repo.v1_1",
+ "title": "User Repository Information",
+ "type": "object",
+ "definitions": {
+ "build_target": {
+ "oneOf": [
+ {"$ref": "qmk.definitions.v1#/keyboard_keymap_tuple"},
+ {"$ref": "qmk.definitions.v1#/keyboard_keymap_env"},
+ {"$ref": "qmk.definitions.v1#/json_file_path"}
+ ]
+ },
+ },
+ "required": [
+ "userspace_version",
+ "build_targets"
+ ],
+ "properties": {
+ "userspace_version": {
+ "type": "string",
+ "enum": ["1.1"]
+ },
+ "build_targets": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/build_target"
+ }
+ }
+ }
+}
diff --git a/data/templates/keyboard/keyboard.json b/data/templates/keyboard/keyboard.json
index 65f935fb42a1..94085d7f5a2b 100644
--- a/data/templates/keyboard/keyboard.json
+++ b/data/templates/keyboard/keyboard.json
@@ -2,8 +2,6 @@
"keyboard_name": "%KEYBOARD%",
"maintainer": "%USER_NAME%",
"manufacturer": "%REAL_NAME%",
- "processor": "%MCU%",
- "bootloader": "%BOOTLOADER%",
"diode_direction": "COL2ROW",
"matrix_pins": {
"cols": ["C2"],
diff --git a/docs/ChangeLog/20240526.md b/docs/ChangeLog/20240526.md
index b5e5b3b69389..f7efbc64271f 100644
--- a/docs/ChangeLog/20240526.md
+++ b/docs/ChangeLog/20240526.md
@@ -109,6 +109,16 @@ Essentially, changes were made in the internals of how QMK interacts with USB fo
Compliance checks were run against QMK firmwares for the most popular ARM microcontrollers, as well as suspend/resume tests. As far as we can tell, a whole host of hard-to-reproduce issues are mitigated by this change.
+## Deprecation Notices
+
+In line with the [notice period](../support_deprecation_policy#how-much-advance-notice-will-be-given), deprecation notices for larger items are listed here.
+
+### Migration of VIA keymaps to VIA team control
+
+The QMK team has been in discussion with the VIA maintainers and all VIA-related keymaps in the `qmk_firmware` repository will transition to a `qmk_userspace`-style repository under the VIA team's control at the end of the next breaking changes period. This allows the VIA team to support many more custom keyboard configurations, as well as reduces the turnaround time for any changes to the VIA protocol they wish to make.
+
+At the end of the breaking changes cycle ending 2024-08-25, VIA-enabled keymaps will no longer be accepted into the QMK repository. At the time of migration, any open PRs against `qmk_firmware` which include new VIA-related keymaps will be subsequently be asked to remove those keymaps and instead raise a PR against the userspace repository containing all VIA keymaps.
+
## Full changelist {#full-changelist}
Core:
diff --git a/docs/ChangeLog/20240825.md b/docs/ChangeLog/20240825.md
new file mode 100644
index 000000000000..943347cebcc8
--- /dev/null
+++ b/docs/ChangeLog/20240825.md
@@ -0,0 +1,198 @@
+# QMK Breaking Changes - 2024 August 25 Changelog
+
+## Notable Features
+
+August 2024 brings another maintenance release of QMK. Almost all PRs this cycle were to do with cleanup or re-organization of existing features and code.
+
+One key item is that there are no longer any `via`-enabled keymaps in the QMK repository -- these have all transitioned to an [External Userspace](../newbs_external_userspace) repository under the VIA team's control. Going forward, all PRs to `qmk_firmware` must not contain `via` keymaps; these should instead be redirected to the [VIA QMK Userspace](https://github.com/the-via/qmk_userspace_via) repository.
+
+## Changes Requiring User Action
+
+### Updated Keyboard Codebases
+
+One note with updated keyboard names -- historical keyboard names are still considered valid when using [External Userspace](../newbs_external_userspace) for builds. If you're already using External Userspace, you do not need to move your keymap inside your repository.
+
+| Old Keyboard Name | New Keyboard Name |
+|----------------------------------|-------------------------------|
+| dnworks/9973 | dnworks/tkl87 |
+| maple_computing/lets_split_eh/eh | maple_computing/lets_split_eh |
+| planck/ez/base | zsa/planck_ez/base |
+
+### SparkFun Pro Micro RP2040 converter renamed ([#24192](https://github.com/qmk/qmk_firmware/pull/24192))
+
+The converter for the SparkFun Pro Micro RP2040 has been renamed.
+
+| Old | New |
+|-------------------|-------------------|
+| `promicro_rp2040` | `sparkfun_rp2040` |
+
+This change was made to avoid confusion between the clones named ProMicro RP2040 and the SparkFun Pro Micro RP2040. The clones should be using the `rp2040_ce` option.
+
+### Key Override `keymap.c` signature change ([#24120](https://github.com/qmk/qmk_firmware/pull/24120))
+
+Changes were made to key overrides in order to hook them into the keymap introspection system.
+
+If you're using key overrides, your `keymap.c` will need a change to the signature of your list of key overrides, as well as removing the `NULL` terminator.
+
+For example, you'll need to change existing code from (note the highlighted lines):
+
+```c{1,4-5}
+const key_override_t **key_overrides = (const key_override_t *[]){
+ &my_override_1,
+ &my_override_2,
+ NULL
+};
+```
+
+to:
+
+```c{1,4}
+const key_override_t *key_overrides[] = {
+ &my_override_1,
+ &my_override_2,
+};
+```
+
+### ADNS9800 and PMW33xx firmware upload now opt-in ([#24001](https://github.com/qmk/qmk_firmware/pull/24001))
+
+Due to ambiguity with licensing compatibility, QMK has made the firmware ROM uploads for the ADNS9800 and PMW33xx lines of pointing device sensors temporarily opt-in with the view to removing them. Historically they were included by default, but as of this PR this is now no longer the case.
+
+Please get in touch with the QMK team if your sensor no longer functions without the firmware upload -- so far we've tested each device type and they still seem to function without a new firmware, but this has not been a 100% exhaustive validation.
+
+To re-enable firmware upload for your own builds, add the following to your keymap's `config.h`:
+
+| Sensor | Define |
+|----------|--------------------------------|
+| ADNS9800 | `#define ADNS9800_UPLOAD_SROM` |
+| PMW33xx | `#define PMW33XX_UPLOAD_SROM` |
+
+:::info Note
+If no issues arise during this current breaking changes cycle, these sensor firmware ROMs will be removed from QMK entirely.
+:::
+
+## Deprecation Notices
+
+In line with the [notice period](../support_deprecation_policy#how-much-advance-notice-will-be-given), deprecation notices for larger items are listed here.
+
+### Migration of VIA keymaps to VIA team control
+
+Last breaking changes cycle, the QMK team informed that [`via` keymaps are moving](./20240526#migration-of-via-keymaps-to-via-team-control) to the control of the VIA team. As of this merge, any `via`-enabled keymaps should now be PR'ed to the [VIA QMK Userspace](https://github.com/the-via/qmk_userspace_via) repository.
+
+Any existing or newly-opened PRs against `qmk_firmware` will now be asked to remove any `via`-enabled keymaps from their submissions.
+
+### ADNS9800 and PMW33xx sensor firmware ROM removal
+
+As mentioned above, there's license compatibility issues between QMK and the firmware blobs historically uploaded for the ADNS9800 and PMW33xx sensors. This notice is to inform users that these firmware blobs will almost certainly be removed from QMK in the next breaking changes merge.
+
+As previously noted this does not seem to have any detrimental effect to any of those devices, as they seem to include firmware on-chip without requiring one to be uploaded. Please get in touch with the QMK team on Discord if your sensor is no longer functional.
+
+## Full changelist
+
+Core:
+* EEPROM: Don't erase if we don't have to. Adding eeprom_driver_format abstraction. ([#18332](https://github.com/qmk/qmk_firmware/pull/18332))
+* Generate keymap dd keycodes to header ([#20273](https://github.com/qmk/qmk_firmware/pull/20273))
+* [wear_leveling] efl updates ([#22489](https://github.com/qmk/qmk_firmware/pull/22489))
+* GC9xxx LCD family drivers (GC9107 and GC9A01) ([#23091](https://github.com/qmk/qmk_firmware/pull/23091))
+* [build_test] set CONSOLE_ENABLE=yes if DEBUG > 0 ([#23097](https://github.com/qmk/qmk_firmware/pull/23097))
+* Enhance overlapping mouse keys control ([#23341](https://github.com/qmk/qmk_firmware/pull/23341))
+* APA102: API rework ([#23355](https://github.com/qmk/qmk_firmware/pull/23355))
+* [WIP] Adds bus acquire/release semantics to SPI start/stop. ([#23439](https://github.com/qmk/qmk_firmware/pull/23439))
+* add farsi keymap extras ([#23650](https://github.com/qmk/qmk_firmware/pull/23650))
+* Update atomic GPIO macros in keyboard custom matrix ([#23796](https://github.com/qmk/qmk_firmware/pull/23796))
+* Check LED flags for Pixel Fractal effect ([#23881](https://github.com/qmk/qmk_firmware/pull/23881))
+* Add STM32F405RG ld script for tinyuf2 ([#23885](https://github.com/qmk/qmk_firmware/pull/23885))
+* SPI flash API cleanup, add async erase capability. ([#23894](https://github.com/qmk/qmk_firmware/pull/23894))
+* Add process_keycode handlers for new RGB Matrix and Underglow keycodes ([#23896](https://github.com/qmk/qmk_firmware/pull/23896))
+* Decouple VIA from STM32 L0/L1 EEPROM implementation ([#23901](https://github.com/qmk/qmk_firmware/pull/23901))
+* Normalise mouse keycodes ([#23975](https://github.com/qmk/qmk_firmware/pull/23975))
+* Remove deprecated `led_set_user` ([#23979](https://github.com/qmk/qmk_firmware/pull/23979))
+* Change ADNS9800 and PMW33XX SROM uploads to opt in. ([#24001](https://github.com/qmk/qmk_firmware/pull/24001))
+* Rename encoder pins defines ([#24003](https://github.com/qmk/qmk_firmware/pull/24003))
+* Change suspend condition check order on ChibiOS ([#24020](https://github.com/qmk/qmk_firmware/pull/24020))
+* Tap dance introspection ([#24049](https://github.com/qmk/qmk_firmware/pull/24049))
+* Allow overriding `get_hardware_id()`. ([#24051](https://github.com/qmk/qmk_firmware/pull/24051))
+* Align LUFA suspend logic ([#24055](https://github.com/qmk/qmk_firmware/pull/24055))
+* Add support for key override introspection. ([#24120](https://github.com/qmk/qmk_firmware/pull/24120))
+* Dynamic macro callbacks ([#24142](https://github.com/qmk/qmk_firmware/pull/24142))
+* Rename promicro_rp2040 converter to sparkfun_pm2040 ([#24192](https://github.com/qmk/qmk_firmware/pull/24192))
+* Refactor starlight RGB matrix effects ([#24202](https://github.com/qmk/qmk_firmware/pull/24202))
+* Refactor riverflow RGB matrix loop ([#24203](https://github.com/qmk/qmk_firmware/pull/24203))
+
+CLI:
+* Remove handling of keyboard level keymap templates ([#24234](https://github.com/qmk/qmk_firmware/pull/24234))
+* Small tweaks to keymap generation ([#24240](https://github.com/qmk/qmk_firmware/pull/24240))
+
+Keyboards:
+* refactor: keyboard/ncr80/r2 ([#22670](https://github.com/qmk/qmk_firmware/pull/22670))
+* Implement data driven joysticks ([#22947](https://github.com/qmk/qmk_firmware/pull/22947))
+* Whitefacemountain Ampersand ([#23437](https://github.com/qmk/qmk_firmware/pull/23437))
+* Add TRKeyboard TRK1 keyboard ([#23642](https://github.com/qmk/qmk_firmware/pull/23642))
+* Rename dnworks/9973 to dnworks/tkl87 ([#23692](https://github.com/qmk/qmk_firmware/pull/23692))
+* Update Underglow keycodes ([#23765](https://github.com/qmk/qmk_firmware/pull/23765))
+* Add boardsource/the_q ([#23782](https://github.com/qmk/qmk_firmware/pull/23782))
+* BastardKB: remove legacy board `tbk` ([#23818](https://github.com/qmk/qmk_firmware/pull/23818))
+* Update ZSA Moonlander ([#23911](https://github.com/qmk/qmk_firmware/pull/23911))
+* Move Planck EZ to ZSA vendor folder ([#23917](https://github.com/qmk/qmk_firmware/pull/23917))
+* Migrate SPLIT_HAND_PIN to json ([#23924](https://github.com/qmk/qmk_firmware/pull/23924))
+* Migrate SERIAL_DRIVER to json ([#23925](https://github.com/qmk/qmk_firmware/pull/23925))
+* Migrate RGB Matrix layout for two boards ([#23963](https://github.com/qmk/qmk_firmware/pull/23963))
+* Migrate `led_update_kb` implementations to DD ([#23980](https://github.com/qmk/qmk_firmware/pull/23980))
+* Migrate `led_update_kb` implementations to DD ([#23981](https://github.com/qmk/qmk_firmware/pull/23981))
+* Migrate `led_update_kb` implementations to DD ([#23983](https://github.com/qmk/qmk_firmware/pull/23983))
+* Migrate `led_update_kb` implementations to DD ([#23985](https://github.com/qmk/qmk_firmware/pull/23985))
+* Relocate m256wh VIA logic ([#24006](https://github.com/qmk/qmk_firmware/pull/24006))
+* Relocate winry315 VIA logic ([#24008](https://github.com/qmk/qmk_firmware/pull/24008))
+* Relocate m256ws VIA logic ([#24009](https://github.com/qmk/qmk_firmware/pull/24009))
+* `atreus`: misc cleanups ([#24010](https://github.com/qmk/qmk_firmware/pull/24010))
+* Relocate work_louder VIA logic ([#24011](https://github.com/qmk/qmk_firmware/pull/24011))
+* Relocate xelus/pachi/rgb/rev2 VIA logic ([#24016](https://github.com/qmk/qmk_firmware/pull/24016))
+* Remove custom keycodes from nullbitsco/snap ([#24017](https://github.com/qmk/qmk_firmware/pull/24017))
+* added bear_face/v3 ([#24032](https://github.com/qmk/qmk_firmware/pull/24032))
+* Remove DEFAULT_FOLDER from maple_computing/lets_split_eh ([#24054](https://github.com/qmk/qmk_firmware/pull/24054))
+* refactor bear_face/v1, v2 ([#24060](https://github.com/qmk/qmk_firmware/pull/24060))
+* Convert `eeconfig_init_kb` implementations to config ([#24087](https://github.com/qmk/qmk_firmware/pull/24087))
+* Remove broken keymap from keebio/iris ([#24094](https://github.com/qmk/qmk_firmware/pull/24094))
+* Move LED Matrix LED config to data driven ([#24122](https://github.com/qmk/qmk_firmware/pull/24122))
+* Move split.soft_serial_pin to split.serial.pin ([#24127](https://github.com/qmk/qmk_firmware/pull/24127))
+* Remove pointless `RGB_MATRIX_LED_COUNT`s ([#24133](https://github.com/qmk/qmk_firmware/pull/24133))
+* `hs60/v1`: separate into ANSI and ISO revisions ([#24136](https://github.com/qmk/qmk_firmware/pull/24136))
+* Migrate half-duplex `SERIAL_USART_TX_PIN` to DD ([#24143](https://github.com/qmk/qmk_firmware/pull/24143))
+* Migrate split.soft_serial_pin to split.serial.pin O-Z ([#24146](https://github.com/qmk/qmk_firmware/pull/24146))
+* Migrate split.soft_serial_pin to split.serial.pin 0-H ([#24155](https://github.com/qmk/qmk_firmware/pull/24155))
+* Remove instances of MASTER_LEFT. ([#24163](https://github.com/qmk/qmk_firmware/pull/24163))
+* Rename EC Type-K ([#24180](https://github.com/qmk/qmk_firmware/pull/24180))
+* Migrate split.soft_serial_pin to split.serial.pin H-O ([#24185](https://github.com/qmk/qmk_firmware/pull/24185))
+* Remove split.transport.protocol=serial ([#24191](https://github.com/qmk/qmk_firmware/pull/24191))
+* Refactor use of `matrix_scan_kb` ([#24200](https://github.com/qmk/qmk_firmware/pull/24200))
+* Eliminate use of `#include "../default/keymap.c"`. ([#24215](https://github.com/qmk/qmk_firmware/pull/24215))
+* Remove keyboard level `QK_BOOT` implementations ([#24231](https://github.com/qmk/qmk_firmware/pull/24231))
+* Remove `handwired/pytest/has_template` ([#24232](https://github.com/qmk/qmk_firmware/pull/24232))
+* Refactor opendeck/32 ([#24233](https://github.com/qmk/qmk_firmware/pull/24233))
+* Refactor printedpad ([#24236](https://github.com/qmk/qmk_firmware/pull/24236))
+* Refactor orthocode ([#24237](https://github.com/qmk/qmk_firmware/pull/24237))
+* Remove unnecessary RGB Matrix shutdown hooks ([#24238](https://github.com/qmk/qmk_firmware/pull/24238))
+* Remove all via-enabled keymaps, including `via`. ([#24322](https://github.com/qmk/qmk_firmware/pull/24322))
+
+Keyboard fixes:
+* Fix dogtag/info.json ([#23520](https://github.com/qmk/qmk_firmware/pull/23520))
+* splitkb/kyria: remove `CONVERT_TO` at keyboard level ([#23857](https://github.com/qmk/qmk_firmware/pull/23857))
+* Fixup mt/mt84 ([#23883](https://github.com/qmk/qmk_firmware/pull/23883))
+* Fix for encoders and support ENCODER_MAP_ENABLE on Planck rev7 ([#23967](https://github.com/qmk/qmk_firmware/pull/23967))
+* `handwired/swiftrax/bumblebee`: fix layout name ([#24064](https://github.com/qmk/qmk_firmware/pull/24064))
+* Fixup boardsource/the_q RGB matrix coordinates ([#24086](https://github.com/qmk/qmk_firmware/pull/24086))
+* Various fixes for keyboards not implementing callbacks correctly ([#24092](https://github.com/qmk/qmk_firmware/pull/24092))
+* Various fixes for keyboards not implementing callbacks correctly ([#24116](https://github.com/qmk/qmk_firmware/pull/24116))
+* Remove duplicate calls to `housekeeping_task_user` ([#24201](https://github.com/qmk/qmk_firmware/pull/24201))
+* Fixup `handwired/dactyl_minidox` ([#24253](https://github.com/qmk/qmk_firmware/pull/24253))
+* Fix build failure on zsa/moonlander with DYNAMIC_MACRO_ENABLE ([#24316](https://github.com/qmk/qmk_firmware/pull/24316))
+
+Others:
+* LED drivers: extract documentation from LED/RGB Matrix pages ([#23630](https://github.com/qmk/qmk_firmware/pull/23630))
+* Implement data driven serial driver ([#23923](https://github.com/qmk/qmk_firmware/pull/23923))
+* Remove skipped schema files ([#23987](https://github.com/qmk/qmk_firmware/pull/23987))
+* Update RGBLight (Underglow) keycode names ([#23999](https://github.com/qmk/qmk_firmware/pull/23999))
+
+Bugs:
+* Fix NKRO and Mouse Emulation on arm_atsam ([#23945](https://github.com/qmk/qmk_firmware/pull/23945))
+* Force `dump_lines()` to always use Unix line endings ([#23954](https://github.com/qmk/qmk_firmware/pull/23954))
+* Fixup home link. ([#24068](https://github.com/qmk/qmk_firmware/pull/24068))
diff --git a/docs/ChangeLog/20241124.md b/docs/ChangeLog/20241124.md
new file mode 100644
index 000000000000..f18c5d981ef2
--- /dev/null
+++ b/docs/ChangeLog/20241124.md
@@ -0,0 +1,122 @@
+# QMK Breaking Changes - 2024 November 24 Changelog
+
+## Notable Features
+
+November 2024 brings a relatively lightweight QMK release. As with previous cycles, almost all PRs were related to cleanup or re-organization of aspects of QMK.
+
+One notable item is the removal of `arm_atsam` -- this affects users with `massdrop/ctrl` or `massdrop/alt` keyboards. These have no current replacement, but support for an alternative to the `arm_atsam` backend is nearing completion. Unfortunately the alternative backend didn't make this quarter's list of merges, so there's a temporary removal of these boards. Users who need to build for these targets should stay on the `0.26.x` version of QMK until these boards have been restored.
+
+## Changes Requiring User Action
+
+### Updated Keyboard Codebases
+
+One note with updated keyboard names -- historical keyboard names are still considered valid when using [External Userspace](../newbs_external_userspace) for builds. If you're already using External Userspace, you do not need to move your keymap inside your repository.
+
+| Old Keyboard Name | New Keyboard Name |
+|-------------------|-------------------------|
+| saevus/cor | concreteflowers/cor |
+| saevus/cor_tkl | concreteflowers/cor_tkl |
+
+## Deprecation Notices
+
+In line with the [notice period](../support_deprecation_policy#how-much-advance-notice-will-be-given), deprecation notices for larger items are listed here.
+
+### RGB Keycode Overhaul ([#23679](https://github.com/qmk/qmk_firmware/pull/23679), [#24484](https://github.com/qmk/qmk_firmware/pull/24484), [#24490](https://github.com/qmk/qmk_firmware/pull/24490))
+
+RGB keycodes have been reworked to allow for both rgblight and rgb_matrix to coexist for the handful of boards in the repo with both enabled. Previously, `RGB_xxx` style keycodes were available, but now for rgblight we have `UG_xxx` (underglow), and `RM_xxx` for rgb_matrix. Default keymaps have been updated to reflect whichever system the respective board enables.
+
+Longer-term, `RGB_xxx` style keycodes will be removed, but for now they act as if they're `UG_xxx`, and `UG_xxx` keycodes act upon both rgblight and rgb_matrix simultaneously. Put simply, the existing `RGB_xxx` keycodes act as they always have, giving users time to transition across to the new keycodes instead.
+
+### ADNS9800 and PMW33xx sensor firmware ROM removal ([#24428](https://github.com/qmk/qmk_firmware/pull/24428))
+
+Following on from the last Breaking Changes cycle, Binary blobs for optical sensors have been removed from the QMK codebase. Hooks allowing users to supply their own have been put in place; users wishing to source firmware blobs and integrate them into their keymap may do so. Doing so renders their firmware un-distributable due to licensing incompatibility with the GPL -- as such user firmware containing such blobs must not be distributed.
+
+Please get in touch with the QMK team on Discord if your sensor is no longer functional.
+
+## Full changelist
+
+Core:
+* Refactor F4 ld files to use common files ([#18059](https://github.com/qmk/qmk_firmware/pull/18059))
+* Add LD7032 support to QP. ([#20828](https://github.com/qmk/qmk_firmware/pull/20828))
+* Add combo key repress feature ([#22858](https://github.com/qmk/qmk_firmware/pull/22858))
+* Add Layer Lock feature ([#23430](https://github.com/qmk/qmk_firmware/pull/23430))
+* Added MCU support for ArteryTek AT32F415 ([#23445](https://github.com/qmk/qmk_firmware/pull/23445))
+* Allow codegen of `keymap.json` => `keymap.c` without requiring layers/layout etc. ([#23451](https://github.com/qmk/qmk_firmware/pull/23451))
+* Separate RGBLight/RGB Matrix keycode handling ([#23679](https://github.com/qmk/qmk_firmware/pull/23679))
+* Allow for inverted SPI CS logic ([#23699](https://github.com/qmk/qmk_firmware/pull/23699))
+* Add timer_save and _restore functions. ([#23887](https://github.com/qmk/qmk_firmware/pull/23887))
+* Allow for `get_hardware_id()` to be used for serial number. ([#24053](https://github.com/qmk/qmk_firmware/pull/24053))
+* Segregrate keycode at pre-process record quantum ([#24194](https://github.com/qmk/qmk_firmware/pull/24194))
+* Add ability to poweroff ADNS5050 sensor ([#24223](https://github.com/qmk/qmk_firmware/pull/24223))
+* quantum: util: add bit and bitmask helpers ([#24229](https://github.com/qmk/qmk_firmware/pull/24229))
+* Add new connection keycodes for Bluetooth, 2.4GHz. ([#24251](https://github.com/qmk/qmk_firmware/pull/24251))
+* `usb_device_state`: consolidate usb state handling across implementations ([#24258](https://github.com/qmk/qmk_firmware/pull/24258))
+* Remove global k_rgb_matrix_split ([#24348](https://github.com/qmk/qmk_firmware/pull/24348))
+* util: uf2families: sync with upstream ([#24351](https://github.com/qmk/qmk_firmware/pull/24351))
+* [Maintenance] builddefs: common_rules: overhaul debug information generation ([#24352](https://github.com/qmk/qmk_firmware/pull/24352))
+* Add easier way to set default single layer ([#24376](https://github.com/qmk/qmk_firmware/pull/24376))
+* Tweak OS detect, add OS_DETECTION_SINGLE_REPORT ([#24379](https://github.com/qmk/qmk_firmware/pull/24379))
+* Reinstate global `k_rgb_matrix_split` ([#24388](https://github.com/qmk/qmk_firmware/pull/24388))
+* Bring supported STM32F4 configs in line with F4x1 ([#24413](https://github.com/qmk/qmk_firmware/pull/24413))
+* Extended wheel reports ([#24422](https://github.com/qmk/qmk_firmware/pull/24422))
+* Remove binary blobs from optical sensors. ([#24428](https://github.com/qmk/qmk_firmware/pull/24428))
+* Remove `STM32_PWM_USE_ADVANCED` references ([#24432](https://github.com/qmk/qmk_firmware/pull/24432))
+* Remove `RING_BUFFERED_6KRO_REPORT_ENABLE` due to disuse. ([#24433](https://github.com/qmk/qmk_firmware/pull/24433))
+* Move pointing device driver code ([#24445](https://github.com/qmk/qmk_firmware/pull/24445))
+* Add svlinky converter ([#24449](https://github.com/qmk/qmk_firmware/pull/24449))
+* Update combo user function variable ([#24467](https://github.com/qmk/qmk_firmware/pull/24467))
+* `qmk find`: expand operator support ([#24468](https://github.com/qmk/qmk_firmware/pull/24468))
+* Rename RGB and HSV structs ([#24471](https://github.com/qmk/qmk_firmware/pull/24471))
+* RGBLight: Improve RGB Test animation ([#24477](https://github.com/qmk/qmk_firmware/pull/24477))
+* Change default ARM hardware PWM WS2812 tick frequency to 800kHz ([#24508](https://github.com/qmk/qmk_firmware/pull/24508))
+* Add pointing tests ([#24513](https://github.com/qmk/qmk_firmware/pull/24513))
+* Joystick: add support for 8-way hat switch ([#24515](https://github.com/qmk/qmk_firmware/pull/24515))
+* Refactor Riverflow matrix effect with runner ([#24520](https://github.com/qmk/qmk_firmware/pull/24520))
+* Update Pixel Rain to respect LED range limits ([#24532](https://github.com/qmk/qmk_firmware/pull/24532))
+* Update Jellybean Raindrops to respect LED range limits ([#24534](https://github.com/qmk/qmk_firmware/pull/24534))
+* Refactor Breathing effect with runner ([#24535](https://github.com/qmk/qmk_firmware/pull/24535))
+* Refactor LED Breathing effect with runner ([#24540](https://github.com/qmk/qmk_firmware/pull/24540))
+* Expose rgb_matrix_update_pwm_buffers to be available in keymaps ([#24573](https://github.com/qmk/qmk_firmware/pull/24573))
+* Simple Python script to show polling rate ([#24622](https://github.com/qmk/qmk_firmware/pull/24622))
+* Add keycode PDF(layer) to set the default layer in EEPROM ([#24630](https://github.com/qmk/qmk_firmware/pull/24630))
+* Provide method to save a single default layer in the full range of 0-31 ([#24639](https://github.com/qmk/qmk_firmware/pull/24639))
+
+CLI:
+* Refactor painter arguments to table instead of commandline ([#24456](https://github.com/qmk/qmk_firmware/pull/24456))
+* `qmk new-keyboard`: separate dev board and MCU selection ([#24548](https://github.com/qmk/qmk_firmware/pull/24548))
+* Bump minimum required Python version ([#24554](https://github.com/qmk/qmk_firmware/pull/24554))
+
+Submodule updates:
+* Remove `arm_atsam` platform ([#24337](https://github.com/qmk/qmk_firmware/pull/24337))
+
+Keyboards:
+* add ergodox Community Layout for LAYOUT_ergodox keyboards ([#22963](https://github.com/qmk/qmk_firmware/pull/22963))
+* Cutie Club Fidelity Layout Additions ([#23838](https://github.com/qmk/qmk_firmware/pull/23838))
+* Add Ploopyco functions for host state control ([#23953](https://github.com/qmk/qmk_firmware/pull/23953))
+* Corne rev4 ([#24084](https://github.com/qmk/qmk_firmware/pull/24084))
+* Rename saevus to concreteflowers ([#24249](https://github.com/qmk/qmk_firmware/pull/24249))
+* Remove `60_tsangan_hhkb` community layout ([#24355](https://github.com/qmk/qmk_firmware/pull/24355))
+* add USART configuration to config.h for PS/2 mouse support ([#24398](https://github.com/qmk/qmk_firmware/pull/24398))
+* Add SteelSeries Prime+ mouse ([#24408](https://github.com/qmk/qmk_firmware/pull/24408))
+* Rename RGB/HSV structs: keyboard-level code ([#24476](https://github.com/qmk/qmk_firmware/pull/24476))
+* xiudi/xd002: Remove broken oversized `multilayer_rgb` keymap ([#24480](https://github.com/qmk/qmk_firmware/pull/24480))
+* Update keycodes for keyboards with RGB Matrix ([#24484](https://github.com/qmk/qmk_firmware/pull/24484))
+* Cipulot Updates ([#24539](https://github.com/qmk/qmk_firmware/pull/24539))
+* Update keymaps to use PDF keycode ([#24633](https://github.com/qmk/qmk_firmware/pull/24633))
+* Remove keyboard use of eeconfig_read_default_layer ([#24635](https://github.com/qmk/qmk_firmware/pull/24635))
+
+Keyboard fixes:
+* Fix rendering of `keymap_config.no_gui` within `led_update_kb` ([#24473](https://github.com/qmk/qmk_firmware/pull/24473))
+* Fix duplication of core `GU_TOGG` keycode ([#24474](https://github.com/qmk/qmk_firmware/pull/24474))
+* keebio/nyquist: Remove invalid I2C config ([#24479](https://github.com/qmk/qmk_firmware/pull/24479))
+* horrortroll/nyx/rev1: Fix compilation of custom RGB effect ([#24481](https://github.com/qmk/qmk_firmware/pull/24481))
+
+Others:
+* Improve consistency of syntax within `data/constants/keycodes` ([#24528](https://github.com/qmk/qmk_firmware/pull/24528))
+
+Bugs:
+* WS2812 API rework ([#24364](https://github.com/qmk/qmk_firmware/pull/24364))
+* Backward compatibility for new RGB keycode handling ([#24490](https://github.com/qmk/qmk_firmware/pull/24490))
+* Fix compiliation issues with OS Detection ([#24502](https://github.com/qmk/qmk_firmware/pull/24502))
+* Revert removal of `QK_OUTPUT_AUTO`, fixup docs to reflect. ([#24593](https://github.com/qmk/qmk_firmware/pull/24593))
+* Review fixes for layer lock feature ([#24627](https://github.com/qmk/qmk_firmware/pull/24627))
diff --git a/docs/_aliases.json b/docs/_aliases.json
index a2224bd0d547..0dfcdea1e2f3 100644
--- a/docs/_aliases.json
+++ b/docs/_aliases.json
@@ -4,6 +4,7 @@
"/cli_dev_configuration": "/cli_configuration",
"/dynamic_macros": "/feature_dynamic_macros",
"/feature_common_shortcuts": "/feature_advanced_keycodes",
+ "/flashing_bootloadhid": "/flashing",
"/getting_started_build_tools": "/newbs_getting_started",
"/getting_started_getting_help": "/support",
"/glossary": "/reference_glossary",
@@ -15,6 +16,8 @@
"/tutorial": "/newbs",
"/unicode": "/feature_unicode",
+ "/features/bluetooth": "/features/wireless",
+
"/adc_driver": "/drivers/adc",
"/apa102_driver": "/drivers/apa102",
"/audio_driver": "/drivers/audio",
@@ -23,7 +26,7 @@
"/feature_auto_shift": "/features/auto_shift",
"/feature_autocorrect": "/features/autocorrect",
"/feature_backlight": "/features/backlight",
- "/feature_bluetooth": "/features/bluetooth",
+ "/feature_bluetooth": "/features/wireless",
"/feature_bootmagic": "/features/bootmagic",
"/feature_caps_word": "/features/caps_word",
"/feature_combo": "/features/combo",
diff --git a/docs/_sidebar.json b/docs/_sidebar.json
index b41719e4b327..95601be7ded1 100644
--- a/docs/_sidebar.json
+++ b/docs/_sidebar.json
@@ -21,7 +21,8 @@
{ "text": "Debugging QMK", "link": "/faq_debug" },
{ "text": "Keymap FAQ", "link": "/faq_keymap" },
{ "text": "Squeezing Space from AVR", "link": "/squeezing_avr" },
- { "text": "Glossary", "link": "/reference_glossary" }
+ { "text": "Glossary", "link": "/reference_glossary" },
+ { "text": "License Violations", "link": "/license_violations" }
]
},
{
@@ -64,13 +65,7 @@
"text": "Development Environments",
"items": [{ "text": "Docker Guide", "link": "/getting_started_docker" }]
},
- {
- "text": "Flashing",
- "items": [
- { "text": "Flashing", "link": "/flashing" },
- { "text": "Flashing ATmega32A (ps2avrgb)", "link": "/flashing_bootloadhid" }
- ]
- },
+ { "text": "Flashing", "link": "/flashing" },
{
"text": "IDEs",
"items": [
@@ -129,6 +124,7 @@
{ "text": "Key Lock", "link": "/features/key_lock" },
{ "text": "Key Overrides", "link": "/features/key_overrides" },
{ "text": "Layers", "link": "/feature_layers" },
+ { "text": "Layer Lock", "link": "/features/layer_lock" },
{ "text": "One Shot Keys", "link": "/one_shot_keys" },
{ "text": "OS Detection", "link": "/features/os_detection" },
{ "text": "Raw HID", "link": "/features/rawhid" },
@@ -172,8 +168,7 @@
]
},
{ "text": "Audio", "link": "/features/audio" },
- { "text": "Bluetooth", "link": "/features/bluetooth" },
- { "text": "Bootmagic Lite", "link": "/features/bootmagic" },
+ { "text": "Bootmagic", "link": "/features/bootmagic" },
{ "text": "Converters", "link": "/feature_converters" },
{ "text": "Custom Matrix", "link": "/custom_matrix" },
{ "text": "DIP Switch", "link": "/features/dip_switch" },
@@ -185,7 +180,8 @@
{ "text": "Pointing Device", "link": "/features/pointing_device" },
{ "text": "PS/2 Mouse", "link": "/features/ps2_mouse" },
{ "text": "Split Keyboard", "link": "/features/split_keyboard" },
- { "text": "Stenography", "link": "/features/stenography" }
+ { "text": "Stenography", "link": "/features/stenography" },
+ { "text": "Wireless", "link": "/features/wireless" }
]
},
{
@@ -210,9 +206,10 @@
{ "text": "My Pull Request Was Flagged", "link": "/breaking_changes_instructions" },
{
"text": "Most Recent ChangeLog",
- "link": "/ChangeLog/20240526"
+ "link": "/ChangeLog/20241124"
},
- { "text": "Past Breaking Changes", "link": "/breaking_changes_history" }
+ { "text": "Past Breaking Changes", "link": "/breaking_changes_history" },
+ { "text": "Deprecation Policy", "link": "/support_deprecation_policy" }
]
},
diff --git a/docs/api_development_overview.md b/docs/api_development_overview.md
index e55d0341006b..eb164bec5250 100644
--- a/docs/api_development_overview.md
+++ b/docs/api_development_overview.md
@@ -4,7 +4,7 @@ This page attempts to introduce developers to the QMK Compiler. It does not go i
# Overview
-The QMK Compile API consists of a few movings parts:
+The QMK Compile API consists of a few moving parts:

diff --git a/docs/breaking_changes.md b/docs/breaking_changes.md
index d72a8d476149..132c5943cc15 100644
--- a/docs/breaking_changes.md
+++ b/docs/breaking_changes.md
@@ -10,25 +10,25 @@ Practically, this means QMK merges the `develop` branch into the `master` branch
## What has been included in past Breaking Changes?
+* [2024 Nov 24](ChangeLog/20241124)
+* [2024 Aug 25](ChangeLog/20240825)
* [2024 May 26](ChangeLog/20240526)
-* [2024 Feb 25](ChangeLog/20240225)
-* [2023 Nov 26](ChangeLog/20231126)
* [Older Breaking Changes](breaking_changes_history)
## When is the next Breaking Change?
-The next Breaking Change is scheduled for August 25, 2024.
+The next Breaking Change is scheduled for February 23, 2025.
### Important Dates
-* 2024 May 26 - `develop` is tagged with a new release version. Each push to `master` is subsequently merged to `develop` by GitHub actions.
-* 2024 Jul 28 - `develop` closed to new PRs.
-* 2024 Jul 28 - Call for testers.
-* 2024 Aug 4 - Last day for merges -- after this point `develop` is locked for testing and accepts only bugfixes
-* 2024 Aug 18 - `develop` is locked, only critical bugfix PRs merged.
-* 2024 Aug 22 - `master` is locked, no PRs merged.
-* 2024 Aug 25 - Merge `develop` to `master`.
-* 2024 Aug 25 - `master` is unlocked. PRs can be merged again.
+* 2024 Nov 24 - `develop` is tagged with a new release version. Each push to `master` is subsequently merged to `develop` by GitHub actions.
+* 2025 Jan 26 - `develop` closed to new PRs.
+* 2025 Jan 26 - Call for testers.
+* 2025 Feb 9 - Last day for merges -- after this point `develop` is locked for testing and accepts only bugfixes
+* 2025 Feb 16 - `develop` is locked, only critical bugfix PRs merged.
+* 2024 Nov 21 - `master` is locked, no PRs merged.
+* 2025 Feb 23 - Merge `develop` to `master`.
+* 2025 Feb 23 - `master` is unlocked. PRs can be merged again.
## What changes will be included?
@@ -48,7 +48,7 @@ Criteria for acceptance:
Strongly suggested:
-* The PR has a ChangeLog file describing the changes under `/docs/Changelog/20240526`.
+* The PR has a ChangeLog file describing the changes under `/docs/Changelog/20241124`.
* This should be in Markdown format, with a name in the format `PR12345.md`, substituting the digits for your PRs ID.
* One strong recommendation that the ChangeLog document matches the PR description on GitHub, so as to ensure traceability.
diff --git a/docs/breaking_changes_history.md b/docs/breaking_changes_history.md
index 8c01e35e6889..f877f4263955 100644
--- a/docs/breaking_changes_history.md
+++ b/docs/breaking_changes_history.md
@@ -2,6 +2,8 @@
This page links to all previous changelogs from the QMK Breaking Changes process.
+* [2024 Nov 24](ChangeLog/20241124) - version 0.27.0
+* [2024 Aug 25](ChangeLog/20240825) - version 0.26.0
* [2024 May 26](ChangeLog/20240526) - version 0.25.0
* [2024 Feb 25](ChangeLog/20240225) - version 0.24.0
* [2023 Nov 26](ChangeLog/20231126) - version 0.23.0
diff --git a/docs/breaking_changes_instructions.md b/docs/breaking_changes_instructions.md
index 7bde4b600451..5289016e6391 100644
--- a/docs/breaking_changes_instructions.md
+++ b/docs/breaking_changes_instructions.md
@@ -31,4 +31,4 @@ Commenting on your pull request and being responsive to questions, comments, and
### Ask for Help
-Having your submission flagged may have caught you off guard. If you find yourself intimidated or overwhelmed, let us know. Comment on your pull request, or [reach out to the QMK team on Discord](https://discord.gg/Uq7gcHh).
+Having your submission flagged may have caught you off guard. If you find yourself intimidated or overwhelmed, let us know. Comment on your pull request, or [reach out to the QMK team on Discord](https://discord.gg/qmk).
diff --git a/docs/cli_commands.md b/docs/cli_commands.md
index 7d74d8e6177b..4cd5ae98c390 100644
--- a/docs/cli_commands.md
+++ b/docs/cli_commands.md
@@ -153,20 +153,26 @@ qmk cd
This command allows for searching through keyboard/keymap targets, filtering by specific criteria. `info.json` and `rules.mk` files contribute to the search data, as well as keymap configurations, and the results can be filtered using "dotty" syntax matching the overall `info.json` file format.
-For example, one could search for all keyboards using STM32F411:
+For example, one could search for all keyboards powered by the STM32F411 microcontroller:
```
-qmk find -f 'processor=STM32F411'
+qmk find -f 'processor==STM32F411'
```
-...and one can further constrain the list to keyboards using STM32F411 as well as rgb_matrix support:
+The list can be further constrained by passing additional filter expressions:
```
-qmk find -f 'processor=STM32F411' -f 'features.rgb_matrix=true'
+qmk find -f 'processor==STM32F411' -f 'features.rgb_matrix==true'
```
-The following filter expressions are also supported:
+The following filter expressions are supported:
+ - `key == value`: Match targets where `key` is equal to `value`. May include wildcards such as `*` and `?`.
+ - `key != value`: Match targets where `key` is not `value`. May include wildcards such as `*` and `?`.
+ - `key < value`: Match targets where `key` is a number less than `value`.
+ - `key > value`: Match targets where `key` is a number greater than `value`.
+ - `key <= value`: Match targets where `key` is a number less than or equal to `value`.
+ - `key >= value`: Match targets where `key` is a number greater than or equal to `value`.
- `exists(key)`: Match targets where `key` is present.
- `absent(key)`: Match targets where `key` is not present.
- `contains(key, value)`: Match targets where `key` contains `value`. Can be used for strings, arrays and object keys.
@@ -175,7 +181,7 @@ The following filter expressions are also supported:
You can also list arbitrary values for each matched target with `--print`:
```
-qmk find -f 'processor=STM32F411' -p 'keyboard_name' -p 'features.rgb_matrix'
+qmk find -f 'processor==STM32F411' -p 'keyboard_name' -p 'features.rgb_matrix'
```
**Usage**:
diff --git a/docs/compatible_microcontrollers.md b/docs/compatible_microcontrollers.md
index 785aee30d5cc..f148c39191e1 100644
--- a/docs/compatible_microcontrollers.md
+++ b/docs/compatible_microcontrollers.md
@@ -57,6 +57,10 @@ You can also use any ARM chip with USB that [ChibiOS](https://www.chibios.org) s
* [WB32F3G71xx](http://www.westberrytech.com)
* [WB32FQ95xx](http://www.westberrytech.com)
+### Artery (AT32)
+
+ * [AT32F415](https://www.arterychip.com/en/product/AT32F415.jsp)
+
### NXP (Kinetis)
* [MKL26Z64](https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/kl-series-cortex-m0-plus/kinetis-kl2x-72-96-mhz-usb-ultra-low-power-microcontrollers-mcus-based-on-arm-cortex-m0-plus-core:KL2x)
@@ -75,10 +79,6 @@ You can also use any ARM chip with USB that [ChibiOS](https://www.chibios.org) s
For a detailed overview about the RP2040 support by QMK see the [dedicated RP2040 page](platformdev_rp2040).
-## Atmel ATSAM
-
-There is limited support for one of Atmel's ATSAM microcontrollers, that being the [ATSAMD51J18A](https://www.microchip.com/wwwproducts/en/ATSAMD51J18A) used by the [Massdrop keyboards](https://github.com/qmk/qmk_firmware/tree/master/keyboards/massdrop). However, it is not recommended to design a board with this microcontroller as the support is quite specialized to Massdrop hardware.
-
## RISC-V
### GigaDevice
diff --git a/docs/config_options.md b/docs/config_options.md
index a1ca8c8d503a..90a708dd99c2 100644
--- a/docs/config_options.md
+++ b/docs/config_options.md
@@ -413,7 +413,7 @@ Use these to enable or disable building certain features. The more you have enab
* `MAGIC_ENABLE`
* MAGIC actions (BOOTMAGIC without the boot)
* `BOOTMAGIC_ENABLE`
- * Enable Bootmagic Lite
+ * Enable Bootmagic
* `MOUSEKEY_ENABLE`
* Mouse keys
* `EXTRAKEY_ENABLE`
@@ -426,8 +426,6 @@ Use these to enable or disable building certain features. The more you have enab
* Key combo feature
* `NKRO_ENABLE`
* USB N-Key Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
-* `RING_BUFFERED_6KRO_REPORT_ENABLE`
- * USB 6-Key Rollover - Instead of stopping any new input once 6 keys are pressed, the oldest key is released and the new key is pressed.
* `AUDIO_ENABLE`
* Enable the audio subsystem.
* `KEY_OVERRIDE_ENABLE`
diff --git a/docs/configurator_default_keymaps.md b/docs/configurator_default_keymaps.md
index 40304dc57b78..0dfc41ea21de 100644
--- a/docs/configurator_default_keymaps.md
+++ b/docs/configurator_default_keymaps.md
@@ -54,7 +54,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
[1] = LAYOUT_all(
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, BL_TOGG, BL_DOWN, BL_UP,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, UG_TOGG, UG_NEXT, UG_HUED, UG_HUEU, UG_SATD, UG_SATU, UG_VALD, UG_VALU, BL_TOGG, BL_DOWN, BL_UP,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_MNXT, KC_VOLD,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
@@ -82,7 +82,7 @@ The default keymap uses the `LAYOUT_all` macro, so that will be the value of the
"KC_LCTL", "KC_LGUI", "KC_LALT", "KC_SPC", "KC_RALT", "MO(1)", "KC_RGUI", "KC_RCTL", "KC_LEFT", "KC_DOWN", "KC_RGHT"
],
[
- "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "RGB_TOG", "RGB_MOD", "RGB_HUD", "RGB_HUI", "RGB_SAD", "RGB_SAI", "RGB_VAD", "RGB_VAI", "BL_TOGG", "BL_DOWN", "BL_UP",
+ "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "UG_TOGG", "UG_NEXT", "UG_HUED", "UG_HUEU", "UG_SATD", "UG_SATU", "UG_VALD", "UG_VALU", "BL_TOGG", "BL_DOWN", "BL_UP",
"KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_VOLU",
"KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "QK_BOOT", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_MPLY", "KC_MNXT", "KC_VOLD",
"KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS",
diff --git a/docs/configurator_step_by_step.md b/docs/configurator_step_by_step.md
index 4da9ea04a28a..d0ac268bba89 100644
--- a/docs/configurator_step_by_step.md
+++ b/docs/configurator_step_by_step.md
@@ -16,7 +16,9 @@ I'll say that again because it's important:
**MAKE SURE YOU SELECT THE RIGHT VERSION!**
:::
-If your keyboard has been advertised to be powered by QMK but is not in the list, chances are a developer hasn't gotten to it yet or we haven't had a chance to merge it in yet. File an issue at [qmk_firmware](https://github.com/qmk/qmk_firmware/issues) requesting to support that particular keyboard, if there is no active [Pull Request](https://github.com/qmk/qmk_firmware/pulls?q=is%3Aopen+is%3Apr+label%3Akeyboard) for it. There are also QMK powered keyboards that are in their manufacturer's own GitHub accounts. Double check for that as well.
+Unfortunately if your keyboard has been advertised to be powered by QMK but is not in the list, you will **not** be able to use Configurator to customize your keyboard.
+
+Chances are a developer hasn't gotten round to adding support or we haven't had a chance to merge it in yet. If there is no active [Pull Request](https://github.com/qmk/qmk_firmware/pulls?q=is%3Aopen+is%3Apr+label%3Akeyboard), contact the manufacturer and encourage them to add support.
## Step 2: Select Your Keyboard Layout
diff --git a/docs/contributing.md b/docs/contributing.md
index 14025c2c5058..bbb1997a6f64 100644
--- a/docs/contributing.md
+++ b/docs/contributing.md
@@ -11,7 +11,7 @@ Third-party contributions help us grow and improve QMK. We want to make the pull
## I Don't Want to Read This Whole Thing! I Just Have a Question!
-If you'd like to ask questions about QMK you can do so on the [OLKB Subreddit](https://reddit.com/r/olkb) or on [Discord](https://discord.gg/Uq7gcHh).
+If you'd like to ask questions about QMK you can do so on the [OLKB Subreddit](https://reddit.com/r/olkb) or on [Discord](https://discord.gg/qmk).
Please keep these things in mind:
@@ -29,7 +29,7 @@ QMK is largely written in C, with specific features and parts written in C++. It
# Where Can I Go for Help?
-If you need help you can [open an issue](https://github.com/qmk/qmk_firmware/issues) or [chat on Discord](https://discord.gg/Uq7gcHh).
+If you need help you can [open an issue](https://github.com/qmk/qmk_firmware/issues) or [chat on Discord](https://discord.gg/qmk).
# How Do I Make a Contribution?
@@ -105,7 +105,9 @@ enum my_keycodes {
Before opening a pull request, you can preview your changes if you have set up the development environment by running this command from the `qmk_firmware/` folder:
- qmk docs
+```
+qmk docs
+```
and navigating to `http://localhost:5173/`.
@@ -126,7 +128,7 @@ We also ask that you follow these guidelines:
Before you put a lot of work into building your new feature you should make sure you are implementing it in the best way. You can get a basic understanding of QMK by reading [Understanding QMK](understanding_qmk), which will take you on a tour of the QMK program flow. From here you should talk to us to get a sense of the best way to implement your idea. There are two main ways to do this:
-* [Chat on Discord](https://discord.gg/Uq7gcHh)
+* [Chat on Discord](https://discord.gg/qmk)
* [Open an Issue](https://github.com/qmk/qmk_firmware/issues/new)
Feature and Bug Fix PRs affect all keyboards. We are also in the process of restructuring QMK. For this reason it is especially important for significant changes to be discussed before implementation has happened. If you open a PR without talking to us first please be prepared to do some significant rework if your choices do not mesh well with our planned direction.
diff --git a/docs/custom_quantum_functions.md b/docs/custom_quantum_functions.md
index 729f0cd02834..1479eb53f6c0 100644
--- a/docs/custom_quantum_functions.md
+++ b/docs/custom_quantum_functions.md
@@ -184,7 +184,7 @@ Whenever possible you should customize your keyboard by using `process_record_*(
### Example `matrix_scan_*` Implementation
-This example has been deliberately omitted. You should understand enough about QMK internals to write this without an example before hooking into such a performance sensitive area. If you need help please [open an issue](https://github.com/qmk/qmk_firmware/issues/new) or [chat with us on Discord](https://discord.gg/Uq7gcHh).
+This example has been deliberately omitted. You should understand enough about QMK internals to write this without an example before hooking into such a performance sensitive area. If you need help please [open an issue](https://github.com/qmk/qmk_firmware/issues/new) or [chat with us on Discord](https://discord.gg/qmk).
### `matrix_scan_*` Function Documentation
diff --git a/docs/driver_installation_zadig.md b/docs/driver_installation_zadig.md
index 099376faeb1d..1a5bd1cc3464 100644
--- a/docs/driver_installation_zadig.md
+++ b/docs/driver_installation_zadig.md
@@ -8,8 +8,8 @@ We recommend the use of the [Zadig](https://zadig.akeo.ie/) utility. If you have
## Installation
-Put your keyboard into bootloader mode, either by hitting the `QK_BOOT` keycode (which may be on a different layer), or by pressing the reset switch that's usually located on the underside of the board. If your keyboard has neither, try holding Escape or Space+`B` as you plug it in (see the [Bootmagic Lite](features/bootmagic) docs for more details). Some boards use [Command](features/command) instead of Bootmagic; in this case, you can enter bootloader mode by hitting Left Shift+Right Shift+`B` or Left Shift+Right Shift+Escape at any point while the keyboard is plugged in.
-Some keyboards may have specific instructions for entering the bootloader. For example, the [Bootmagic Lite](features/bootmagic) key (default: Escape) might be on a different key, e.g. Left Control; or the magic combination for Command (default: Left Shift+Right Shift) might require you to hold something else, e.g. Left Control+Right Control. Refer to the board's README file if you are unsure.
+Put your keyboard into bootloader mode, either by hitting the `QK_BOOT` keycode (which may be on a different layer), or by pressing the reset switch that's usually located on the underside of the board. If your keyboard has neither, try holding Escape or Space+`B` as you plug it in (see the [Bootmagic](features/bootmagic) docs for more details). Some boards use [Command](features/command) instead of Bootmagic; in this case, you can enter bootloader mode by hitting Left Shift+Right Shift+`B` or Left Shift+Right Shift+Escape at any point while the keyboard is plugged in.
+Some keyboards may have specific instructions for entering the bootloader. For example, the [Bootmagic](features/bootmagic) key (default: Escape) might be on a different key, e.g. Left Control; or the magic combination for Command (default: Left Shift+Right Shift) might require you to hold something else, e.g. Left Control+Right Control. Refer to the board's README file if you are unsure.
To put a device in bootloader mode with USBaspLoader, tap the `RESET` button while holding down the `BOOT` button.
Alternatively, hold `BOOT` while inserting the USB cable.
@@ -98,6 +98,7 @@ The device name here is the name that appears in Zadig, and may not be what the
|`bootloadhid` |HIDBoot |`16C0:05DF` |HidUsb |
|`usbasploader`|USBasp |`16C0:05DC` |libusbK|
|`apm32-dfu` |APM32 DFU ISP Mode |`314B:0106` |WinUSB |
+|`at32-dfu` |AT32 Bootloader DFU |`2E3C:DF11` |WinUSB |
|`stm32-dfu` |STM32 BOOTLOADER |`0483:DF11` |WinUSB |
|`gd32v-dfu` |GD32V BOOTLOADER |`28E9:0189` |WinUSB |
|`kiibohd` |Kiibohd DFU Bootloader |`1C11:B007` |WinUSB |
diff --git a/docs/drivers/apa102.md b/docs/drivers/apa102.md
index 88868a73b593..197b18869e83 100644
--- a/docs/drivers/apa102.md
+++ b/docs/drivers/apa102.md
@@ -26,20 +26,51 @@ Add the following to your `config.h`:
## API {#api}
-### `void apa102_setleds(rgb_led_t *start_led, uint16_t num_leds)`
+### `void apa102_init(void)` {#api-apa102-init}
-Send RGB data to the APA102 LED chain.
+Initialize the LED driver. This function should be called first.
-#### Arguments {#api-apa102-setleds-arguments}
+---
+
+### `void apa102_set_color(uint16_t index, uint8_t red, uint8_t green, uint8_t blue)` {#api-apa102-set-color}
+
+Set the color of a single LED. This function does not immediately update the LEDs; call `apa102_flush()` after you are finished.
+
+#### Arguments {#api-apa102-set-color-arguments}
+
+ - `uint16_t index`
+ The LED index in the APA102 chain.
+ - `uint8_t red`
+ The red value to set.
+ - `uint8_t green`
+ The green value to set.
+ - `uint8_t blue`
+ The blue value to set.
+
+---
+
+### `void apa102_set_color_all(uint8_t red, uint8_t green, uint8_t blue)` {#api-apa102-set-color-all}
+
+Set the color of all LEDs.
+
+#### Arguments {#api-apa102-set-color-all-arguments}
+
+ - `uint8_t red`
+ The red value to set.
+ - `uint8_t green`
+ The green value to set.
+ - `uint8_t blue`
+ The blue value to set.
+
+---
+
+### `void apa102_flush(void)` {#api-apa102-flush}
- - `rgb_led_t *start_led`
- A pointer to the LED array.
- - `uint16_t num_leds`
- The length of the LED array.
+Flush the PWM values to the LED chain.
---
-### `void apa102_set_brightness(uint8_t brightness)`
+### `void apa102_set_brightness(uint8_t brightness)` {#api-apa102-set-brightness}
Set the global brightness.
diff --git a/docs/drivers/audio.md b/docs/drivers/audio.md
index c764c97369a9..165e61f0655d 100644
--- a/docs/drivers/audio.md
+++ b/docs/drivers/audio.md
@@ -57,27 +57,32 @@ This driver needs one Timer per enabled/used DAC channel, to trigger conversion;
Additionally, in the board config, you'll want to make changes to enable the DACs, GPT for Timers 6, 7 and 8:
-```c
-//halconf.h:
-#define HAL_USE_DAC TRUE
-#define HAL_USE_GPT TRUE
+::: code-group
+```c [halconf.h]
+#pragma once
+
+#define HAL_USE_DAC TRUE // [!code focus]
+#define HAL_USE_GPT TRUE // [!code focus]
+
#include_next
```
+```c [mcuconf.h]
+#pragma once
-```c
-// mcuconf.h:
#include_next
-#undef STM32_DAC_USE_DAC1_CH1
-#define STM32_DAC_USE_DAC1_CH1 TRUE
-#undef STM32_DAC_USE_DAC1_CH2
-#define STM32_DAC_USE_DAC1_CH2 TRUE
-#undef STM32_GPT_USE_TIM6
-#define STM32_GPT_USE_TIM6 TRUE
-#undef STM32_GPT_USE_TIM7
-#define STM32_GPT_USE_TIM7 TRUE
-#undef STM32_GPT_USE_TIM8
-#define STM32_GPT_USE_TIM8 TRUE
+
+#undef STM32_DAC_USE_DAC1_CH1 // [!code focus]
+#define STM32_DAC_USE_DAC1_CH1 TRUE // [!code focus]
+#undef STM32_DAC_USE_DAC1_CH2 // [!code focus]
+#define STM32_DAC_USE_DAC1_CH2 TRUE // [!code focus]
+#undef STM32_GPT_USE_TIM6 // [!code focus]
+#define STM32_GPT_USE_TIM6 TRUE // [!code focus]
+#undef STM32_GPT_USE_TIM7 // [!code focus]
+#define STM32_GPT_USE_TIM7 TRUE // [!code focus]
+#undef STM32_GPT_USE_TIM8 // [!code focus]
+#define STM32_GPT_USE_TIM8 TRUE // [!code focus]
```
+:::
::: tip
Note: DAC1 (A4) uses TIM6, DAC2 (A5) uses TIM7, and the audio state timer uses TIM8 (configurable).
@@ -95,23 +100,28 @@ only needs one timer (GPTD6, Tim6) to trigger the DAC unit to do a conversion; t
Additionally, in the board config, you'll want to make changes to enable the DACs, GPT for Timer 6:
-```c
-//halconf.h:
-#define HAL_USE_DAC TRUE
-#define HAL_USE_GPT TRUE
+::: code-group
+```c [halconf.h]
+#pragma once
+
+#define HAL_USE_DAC TRUE // [!code focus]
+#define HAL_USE_GPT TRUE // [!code focus]
+
#include_next
```
+```c [mcuconf.h]
+#pragma once
-```c
-// mcuconf.h:
#include_next
-#undef STM32_DAC_USE_DAC1_CH1
-#define STM32_DAC_USE_DAC1_CH1 TRUE
-#undef STM32_DAC_USE_DAC1_CH2
-#define STM32_DAC_USE_DAC1_CH2 TRUE
-#undef STM32_GPT_USE_TIM6
-#define STM32_GPT_USE_TIM6 TRUE
+
+#undef STM32_DAC_USE_DAC1_CH1 // [!code focus]
+#define STM32_DAC_USE_DAC1_CH1 TRUE // [!code focus]
+#undef STM32_DAC_USE_DAC1_CH2 // [!code focus]
+#define STM32_DAC_USE_DAC1_CH2 TRUE // [!code focus]
+#undef STM32_GPT_USE_TIM6 // [!code focus]
+#define STM32_GPT_USE_TIM6 TRUE // [!code focus]
```
+:::
### DAC Config
@@ -170,19 +180,25 @@ This driver uses the ChibiOS-PWM system to produce a square-wave on specific out
The hardware directly toggles the pin via its alternate function. See your MCU's data-sheet for which pin can be driven by what timer - looking for TIMx_CHy and the corresponding alternate function.
A configuration example for the STM32F103C8 would be:
-```c
-//halconf.h:
-#define HAL_USE_PWM TRUE
-#define HAL_USE_PAL TRUE
+
+::: code-group
+```c [halconf.h]
+#pragma once
+
+#define HAL_USE_PWM TRUE // [!code focus]
+#define HAL_USE_PAL TRUE // [!code focus]
+
#include_next
```
+```c [mcuconf.h]
+#pragma once
-```c
-// mcuconf.h:
#include_next
-#undef STM32_PWM_USE_TIM1
-#define STM32_PWM_USE_TIM1 TRUE
+
+#undef STM32_PWM_USE_TIM1 // [!code focus]
+#define STM32_PWM_USE_TIM1 TRUE // [!code focus]
```
+:::
If we now target pin A8, looking through the data-sheet of the STM32F103C8, for the timers and alternate functions
- TIM1_CH1 = PA8 <- alternate0
diff --git a/docs/drivers/aw20216s.md b/docs/drivers/aw20216s.md
new file mode 100644
index 000000000000..36a6d63c33be
--- /dev/null
+++ b/docs/drivers/aw20216s.md
@@ -0,0 +1,133 @@
+# AW20216S Driver {#aw20216s-driver}
+
+SPI 18x12 LED matrix driver by Awinic. Supports a maximum of four drivers, each controlling up to 216 single-color LEDs, or 72 RGB LEDs.
+
+[AW20216S Datasheet](https://doc.awinic.com/doc/20230609wm/b6a9c70b-e1bd-495b-925f-bcbed3fc2620.pdf)
+
+## Usage {#usage}
+
+The AW20216S driver code is automatically included if you are using the [RGB Matrix](../features/rgb_matrix) feature with the `aw20216s` driver set, and you would use those APIs instead.
+
+However, if you need to use the driver standalone, add this to your `rules.mk`:
+
+```make
+COMMON_VPATH += $(DRIVER_PATH)/led
+SRC += aw20216s.c
+SPI_DRIVER_REQUIRED = yes
+```
+
+## Basic Configuration {#basic-configuration}
+
+Add the following to your `config.h`:
+
+|Define |Default |Description |
+|-----------------------------|-------------|-------------------------------------------------------------|
+|`AW20216S_CS_PIN_1` |*Not defined*|The GPIO pin connected to the first driver's Chip Select pin |
+|`AW20216S_CS_PIN_2` |*Not defined*|The GPIO pin connected to the second driver's Chip Select pin|
+|`AW20216S_EN_PIN` |*Not defined*|The GPIO pin connected to the drivers' Enable pins |
+|`AW20216S_SPI_MODE` |`0` |The SPI mode to use |
+|`AW20216S_SPI_DIVISOR` |`4` |The SPI divisor to use |
+|`AW20216S_SCALING_MAX` |`150` |The scaling value |
+|`AW20216S_GLOBAL_CURRENT_MAX`|`150` |The global current control value |
+
+### Global Current Control {#global-current-control}
+
+This setting controls the current sunk by the `CSx` pins, from 0 to 255. To adjust it, add the following to your `config.h`:
+
+```c
+#define AW20216S_GLOBAL_CURRENT_MAX 150
+```
+
+## ARM/ChibiOS Configuration {#arm-configuration}
+
+Depending on the ChibiOS board configuration, you may need to [enable and configure SPI](spi#arm-configuration) at the keyboard level.
+
+## LED Mapping {#led-mapping}
+
+In order to use this driver, each output must be mapped to an LED index, by adding the following to your `.c`:
+
+```c
+const aw20216s_led_t PROGMEM g_aw20216s_leds[AW20216S_LED_COUNT] = {
+/* Driver
+ * | R G B */
+ {0, SW1_CS1, SW1_CS2, SW1_CS3},
+ // etc...
+};
+```
+
+In this example, the first LED index on driver 0 has its red channel on `SW1_CS1`, green on `SW1_CS2` and blue on `SW1_CS3`.
+
+These values correspond to the matrix locations as shown in the datasheet on page 16, figure 16.
+
+## API {#api}
+
+### `struct aw20216s_led_t` {#api-aw20216s-led-t}
+
+Contains the PWM register addresses for a single RGB LED.
+
+#### Members {#api-aw20216s-led-t-members}
+
+ - `uint8_t driver`
+ The driver index of the LED, from 0 to 3.
+ - `uint8_t r`
+ The output PWM register address for the LED's red channel.
+ - `uint8_t g`
+ The output PWM register address for the LED's green channel.
+ - `uint8_t b`
+ The output PWM register address for the LED's blue channel.
+
+---
+
+### `void aw20216s_init(pin_t cs_pin)` {#api-aw20216s-init}
+
+Initialize the LED driver. This function should be called first.
+
+#### Arguments {#api-aw20216s-init-arguments}
+
+ - `pin_t cs_pin`
+ The GPIO connected to the Chip Select pin of the LED driver to initialize.
+
+---
+
+### `void aw20216s_set_color(int index, uint8_t red, uint8_t green, uint8_t blue)` {#api-aw20216s-set-color}
+
+Set the color of a single LED. This function does not immediately update the LEDs; call `aw20216s_update_pwm_buffers()` after you are finished.
+
+#### Arguments {#api-aw20216s-set-color-arguments}
+
+ - `int index`
+ The LED index (ie. the index into the `g_aw20216s_leds` array).
+ - `uint8_t red`
+ The red value to set.
+ - `uint8_t green`
+ The green value to set.
+ - `uint8_t blue`
+ The blue value to set.
+
+---
+
+### `void aw20216s_set_color_all(uint8_t red, uint8_t green, uint8_t blue)` {#api-aw20216s-set-color-all}
+
+Set the color of all LEDs.
+
+#### Arguments {#api-aw20216s-set-color-all-arguments}
+
+ - `uint8_t red`
+ The red value to set.
+ - `uint8_t green`
+ The green value to set.
+ - `uint8_t blue`
+ The blue value to set.
+
+---
+
+### `void aw20216s_update_pwm_buffers(pin_t cs_pin, uint8_t index)` {#api-aw20216s-update-pwm-buffers}
+
+Flush the PWM values to the LED driver.
+
+#### Arguments {#api-aw20216s-update-pwm-buffers-arguments}
+
+ - `pin_t cs_pin`
+ The GPIO connected to the Chip Select pin of the driver.
+ - `uint8_t index`
+ The index of the driver.
diff --git a/docs/drivers/eeprom.md b/docs/drivers/eeprom.md
index 82630c501d11..0ae258424f87 100644
--- a/docs/drivers/eeprom.md
+++ b/docs/drivers/eeprom.md
@@ -119,13 +119,14 @@ This driver performs writes to the embedded flash storage embedded in the MCU. I
Configurable options in your keyboard's `config.h`:
-`config.h` override | Default | Description
------------------------------------------|-------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-`#define WEAR_LEVELING_EFL_FIRST_SECTOR` | _unset_ | The first sector on the MCU to use. By default this is not defined and calculated at runtime based on the MCU. However, different flash sizes on MCUs may require custom configuration.
-`#define WEAR_LEVELING_EFL_FLASH_SIZE` | _unset_ | Allows overriding the flash size available for use for wear-leveling. Under normal circumstances this is automatically calculated and should not need to be overridden. Specifying a size larger than the amount actually available in flash will usually prevent the MCU from booting.
-`#define WEAR_LEVELING_LOGICAL_SIZE` | `(backing_size/2)` | Number of bytes "exposed" to the rest of QMK and denotes the size of the usable EEPROM.
-`#define WEAR_LEVELING_BACKING_SIZE` | `2048` | Number of bytes used by the wear-leveling algorithm for its underlying storage, and needs to be a multiple of the logical size.
-`#define BACKING_STORE_WRITE_SIZE` | _automatic_ | The byte width of the underlying write used on the MCU, and is usually automatically determined from the selected MCU family. If an error occurs in the auto-detection, you'll need to consult the MCU's datasheet and determine this value, specifying it directly.
+`config.h` override | Default | Description
+---------------------------------------------------|--------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+`#define WEAR_LEVELING_EFL_FIRST_SECTOR` | _unset_ | The first sector on the MCU to use. By default this is not defined and calculated at runtime based on the MCU. However, different flash sizes on MCUs may require custom configuration.
+`#define WEAR_LEVELING_EFL_FLASH_SIZE` | _unset_ | Allows overriding the flash size available for use for wear-leveling. Under normal circumstances this is automatically calculated and should not need to be overridden. Specifying a size larger than the amount actually available in flash will usually prevent the MCU from booting.
+`#define WEAR_LEVELING_EFL_OMIT_LAST_SECTOR_COUNT` | `0` | Number of sectors to omit at the end of the flash. These sectors will not be allocated to the driver and the usable flash block will be offset, but keeping the set flash size. Useful on devices with bootloaders requiring a check flag at the end of flash to be present in order to confirm a valid, bootable firmware.
+`#define WEAR_LEVELING_LOGICAL_SIZE` | `(backing_size/2)` | Number of bytes "exposed" to the rest of QMK and denotes the size of the usable EEPROM.
+`#define WEAR_LEVELING_BACKING_SIZE` | `2048` | Number of bytes used by the wear-leveling algorithm for its underlying storage, and needs to be a multiple of the logical size.
+`#define BACKING_STORE_WRITE_SIZE` | _automatic_ | The byte width of the underlying write used on the MCU, and is usually automatically determined from the selected MCU family. If an error occurs in the auto-detection, you'll need to consult the MCU's datasheet and determine this value, specifying it directly.
::: warning
If your MCU does not boot after swapping to the EFL wear-leveling driver, it's likely that the flash size is incorrectly detected, usually as an MCU with larger flash and may require overriding.
diff --git a/docs/drivers/gpio.md b/docs/drivers/gpio.md
index 9ce4f2aa20c1..b21a17bc39aa 100644
--- a/docs/drivers/gpio.md
+++ b/docs/drivers/gpio.md
@@ -13,7 +13,7 @@ The following macros provide basic control of GPIOs and are found in `platforms/
|`gpio_set_pin_input_low(pin)` |Set pin as input with builtin pull-down resistor (unavailable on AVR)|
|`gpio_set_pin_output(pin)` |Set pin as output (alias of `gpio_set_pin_output_push_pull`) |
|`gpio_set_pin_output_push_pull(pin)` |Set pin as output, push/pull mode |
-|`gpio_set_pin_output_open_drain(pin)`|Set pin as output, open-drain mode (unavailable on AVR and ATSAM) |
+|`gpio_set_pin_output_open_drain(pin)`|Set pin as output, open-drain mode (unavailable on AVR) |
|`gpio_write_pin_high(pin)` |Set pin level as high, assuming it is an output |
|`gpio_write_pin_low(pin)` |Set pin level as low, assuming it is an output |
|`gpio_write_pin(pin, level)` |Set pin level, assuming it is an output |
diff --git a/docs/drivers/i2c.md b/docs/drivers/i2c.md
index 10949ed59e08..c806a090c56e 100644
--- a/docs/drivers/i2c.md
+++ b/docs/drivers/i2c.md
@@ -54,18 +54,25 @@ The ATmega16/32U2 does not possess I2C functionality, and so cannot use this dri
You'll need to determine which pins can be used for I2C -- a an example, STM32 parts generally have multiple I2C peripherals, labeled I2C1, I2C2, I2C3 etc.
-To enable I2C, modify your board's `halconf.h` to enable I2C:
+To enable I2C, modify your board's `halconf.h` to enable I2C, then modify your board's `mcuconf.h` to enable the peripheral you've chosen:
-```c
-#define HAL_USE_I2C TRUE
+::: code-group
+```c [halconf.h]
+#pragma once
+
+#define HAL_USE_I2C TRUE // [!code focus]
+
+#include_next
```
+```c [mcuconf.h]
+#pragma once
-Then, modify your board's `mcuconf.h` to enable the peripheral you've chosen, for example:
+#include_next
-```c
-#undef STM32_I2C_USE_I2C2
-#define STM32_I2C_USE_I2C2 TRUE
+#undef STM32_I2C_USE_I2C2 // [!code focus]
+#define STM32_I2C_USE_I2C2 TRUE // [!code focus]
```
+:::
|`mcuconf.h` Setting |Description |Default|
|----------------------------|----------------------------------------------------------------------------------|-------|
diff --git a/docs/drivers/is31fl3218.md b/docs/drivers/is31fl3218.md
new file mode 100644
index 000000000000..1c9806912047
--- /dev/null
+++ b/docs/drivers/is31fl3218.md
@@ -0,0 +1,194 @@
+# IS31FL3218 Driver {#is31fl3218-driver}
+
+I²C LED driver by Lumissil. Supports up to 18 single-color LEDs, or 6 RGB LEDs.
+
+[IS31FL3218 Datasheet](https://www.lumissil.com/assets/pdf/core/IS31FL3218_DS.pdf)
+
+## Usage {#usage}
+
+The IS31FL3218 driver code is automatically included if you are using the [LED Matrix](../features/led_matrix) or [RGB Matrix](../features/rgb_matrix) feature with the `is31fl3218` driver set, and you would use those APIs instead.
+
+However, if you need to use the driver standalone, add this to your `rules.mk`:
+
+```make
+COMMON_VPATH += $(DRIVER_PATH)/led/issi
+SRC += is31fl3218-mono.c # For single-color
+SRC += is31fl3218.c # For RGB
+I2C_DRIVER_REQUIRED = yes
+```
+
+## Basic Configuration {#basic-configuration}
+
+Add the following to your `config.h`:
+
+|Define |Default |Description |
+|----------------------------|-------------|---------------------------------------------------|
+|`IS31FL3218_SDB_PIN` |*Not defined*|The GPIO pin connected to the driver's shutdown pin|
+|`IS31FL3218_I2C_TIMEOUT` |`100` |The I²C timeout in milliseconds |
+|`IS31FL3218_I2C_PERSISTENCE`|`0` |The number of times to retry I²C transmissions |
+
+### I²C Addressing {#i2c-addressing}
+
+The IS31FL3218's 7-bit I²C address is `0x54`, available as `IS31FL3218_I2C_ADDRESS`.
+
+## ARM/ChibiOS Configuration {#arm-configuration}
+
+Depending on the ChibiOS board configuration, you may need to [enable and configure I²C](i2c#arm-configuration) at the keyboard level.
+
+## LED Mapping {#led-mapping}
+
+In order to use this driver, each output must be mapped to an LED index, by adding the following to your `.c`:
+
+```c
+const is31fl3218_led_t PROGMEM g_is31fl3218_leds[IS31FL3218_LED_COUNT] = {
+/* R G B */
+ {OUT1, OUT2, OUT3},
+ // etc...
+};
+```
+
+In this example, the red, green and blue channels for the first LED index all have their anodes connected to `VCC`, and their cathodes on the `OUT1`, `OUT2` and `OUT3` pins respectively.
+
+For the single-color driver, the principle is the same, but there is only one channel:
+
+```c
+const is31fl3218_led_t PROGMEM g_is31fl3218_leds[IS31FL3218_LED_COUNT] = {
+/* V */
+ {OUT1},
+ // etc...
+};
+```
+
+## API {#api}
+
+### `struct is31fl3218_led_t` {#api-is31fl3218-led-t}
+
+Contains the PWM register addresses for a single RGB LED.
+
+#### Members {#api-is31fl3218-led-t-members}
+
+ - `uint8_t r`
+ The output PWM register address for the LED's red channel (RGB driver only).
+ - `uint8_t g`
+ The output PWM register address for the LED's green channel (RGB driver only).
+ - `uint8_t b`
+ The output PWM register address for the LED's blue channel (RGB driver only).
+ - `uint8_t v`
+ The output PWM register address for the LED (single-color driver only).
+
+---
+
+### `void is31fl3218_init(void)` {#api-is31fl3218-init}
+
+Initialize the LED driver. This function should be called first.
+
+---
+
+### `void is31fl3218_write_register(uint8_t reg, uint8_t data)` {#api-is31fl3218-write-register}
+
+Set the value of the given register.
+
+#### Arguments {#api-is31fl3218-write-register-arguments}
+
+ - `uint8_t reg`
+ The register address.
+ - `uint8_t data`
+ The value to set.
+
+---
+
+### `void is31fl3218_set_color(int index, uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3218-set-color}
+
+Set the color of a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3218_update_pwm_buffers()` after you are finished.
+
+#### Arguments {#api-is31fl3218-set-color-arguments}
+
+ - `int index`
+ The LED index (ie. the index into the `g_is31fl3218_leds` array).
+ - `uint8_t red`
+ The red value to set.
+ - `uint8_t green`
+ The green value to set.
+ - `uint8_t blue`
+ The blue value to set.
+
+---
+
+### `void is31fl3218_set_color_all(uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3218-set-color-all}
+
+Set the color of all LEDs (RGB driver only).
+
+#### Arguments {#api-is31fl3218-set-color-all-arguments}
+
+ - `uint8_t red`
+ The red value to set.
+ - `uint8_t green`
+ The green value to set.
+ - `uint8_t blue`
+ The blue value to set.
+
+---
+
+### `void is31fl3218_set_value(int index, uint8_t value)` {#api-is31fl3218-set-value}
+
+Set the brightness of a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3218_update_pwm_buffers()` after you are finished.
+
+#### Arguments {#api-is31fl3218-set-value-arguments}
+
+ - `int index`
+ The LED index (ie. the index into the `g_is31fl3218_leds` array).
+ - `uint8_t value`
+ The brightness value to set.
+
+---
+
+### `void is31fl3218_set_value_all(uint8_t value)` {#api-is31fl3218-set-value-all}
+
+Set the brightness of all LEDs (single-color driver only).
+
+#### Arguments {#api-is31fl3218-set-value-all-arguments}
+
+ - `uint8_t value`
+ The brightness value to set.
+
+---
+
+### `void is31fl3218_set_led_control_register(uint8_t index, bool red, bool green, bool blue)` {#api-is31fl3218-set-led-control-register-rgb}
+
+Configure the LED control registers for a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3218_update_led_control_registers()` after you are finished.
+
+#### Arguments {#api-is31fl3218-set-led-control-register-rgb-arguments}
+
+ - `uint8_t index`
+ The LED index (ie. the index into the `g_is31fl3218_leds` array).
+ - `bool red`
+ Enable or disable the red channel.
+ - `bool green`
+ Enable or disable the green channel.
+ - `bool blue`
+ Enable or disable the blue channel.
+
+---
+
+### `void is31fl3218_set_led_control_register(uint8_t index, bool value)` {#api-is31fl3218-set-led-control-register-mono}
+
+Configure the LED control registers for a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3218_update_led_control_registers()` after you are finished.
+
+#### Arguments {#api-is31fl3218-set-led-control-register-mono-arguments}
+
+ - `uint8_t index`
+ The LED index (ie. the index into the `g_is31fl3218_leds` array).
+ - `bool value`
+ Enable or disable the LED.
+
+---
+
+### `void is31fl3218_update_pwm_buffers(void)` {#api-is31fl3218-update-pwm-buffers}
+
+Flush the PWM values to the LED driver.
+
+---
+
+### `void is31fl3218_update_led_control_registers(void)` {#api-is31fl3218-update-led-control-registers}
+
+Flush the LED control register values to the LED driver.
diff --git a/docs/drivers/is31fl3236.md b/docs/drivers/is31fl3236.md
new file mode 100644
index 000000000000..98e05e4abd4f
--- /dev/null
+++ b/docs/drivers/is31fl3236.md
@@ -0,0 +1,228 @@
+# IS31FL3236 Driver {#is31fl3236-driver}
+
+I²C LED driver by Lumissil. Supports a maximum of four drivers, each controlling up to 36 single-color LEDs, or 12 RGB LEDs.
+
+[IS31FL3236 Datasheet](https://www.lumissil.com/assets/pdf/core/IS31FL3236_DS.pdf)
+
+## Usage {#usage}
+
+The IS31FL3236 driver code is automatically included if you are using the [LED Matrix](../features/led_matrix) or [RGB Matrix](../features/rgb_matrix) feature with the `is31fl3236` driver set, and you would use those APIs instead.
+
+However, if you need to use the driver standalone, add this to your `rules.mk`:
+
+```make
+COMMON_VPATH += $(DRIVER_PATH)/led/issi
+SRC += is31fl3236-mono.c # For single-color
+SRC += is31fl3236.c # For RGB
+I2C_DRIVER_REQUIRED = yes
+```
+
+## Basic Configuration {#basic-configuration}
+
+Add the following to your `config.h`:
+
+|Define |Default |Description |
+|----------------------------|-------------|----------------------------------------------------|
+|`IS31FL3236_SDB_PIN` |*Not defined*|The GPIO pin connected to the drivers' shutdown pins|
+|`IS31FL3236_I2C_TIMEOUT` |`100` |The I²C timeout in milliseconds |
+|`IS31FL3236_I2C_PERSISTENCE`|`0` |The number of times to retry I²C transmissions |
+|`IS31FL3236_I2C_ADDRESS_1` |*Not defined*|The I²C address of driver 0 |
+|`IS31FL3236_I2C_ADDRESS_2` |*Not defined*|The I²C address of driver 1 |
+|`IS31FL3236_I2C_ADDRESS_3` |*Not defined*|The I²C address of driver 2 |
+|`IS31FL3236_I2C_ADDRESS_4` |*Not defined*|The I²C address of driver 3 |
+
+### I²C Addressing {#i2c-addressing}
+
+The IS31FL3236 has four possible 7-bit I²C addresses, depending on how the `AD` pin is connected.
+
+To configure this, set the `IS31FL3236_I2C_ADDRESS_n` defines to one of the following in your `config.h`, where *n* denotes the driver index:
+
+|Define |Value |
+|----------------------------|------|
+|`IS31FL3236_I2C_ADDRESS_GND`|`0x3C`|
+|`IS31FL3236_I2C_ADDRESS_SCL`|`0x3D`|
+|`IS31FL3236_I2C_ADDRESS_SDA`|`0x3E`|
+|`IS31FL3236_I2C_ADDRESS_VCC`|`0x3F`|
+
+## ARM/ChibiOS Configuration {#arm-configuration}
+
+Depending on the ChibiOS board configuration, you may need to [enable and configure I²C](i2c#arm-configuration) at the keyboard level.
+
+## LED Mapping {#led-mapping}
+
+In order to use this driver, each output must be mapped to an LED index, by adding the following to your `.c`:
+
+```c
+const is31fl3236_led_t PROGMEM g_is31fl3236_leds[IS31FL3236_LED_COUNT] = {
+/* Driver
+ | R G B */
+ {0, OUT1, OUT2, OUT3},
+ // etc...
+};
+```
+
+In this example, the red, green and blue channels for the first LED index on driver 0 all have their anodes connected to `VCC`, and their cathodes on the `OUT1`, `OUT2` and `OUT3` pins respectively.
+
+For the single-color driver, the principle is the same, but there is only one channel:
+
+```c
+const is31fl3236_led_t PROGMEM g_is31fl3236_leds[IS31FL3236_LED_COUNT] = {
+/* Driver
+ | V */
+ {0, OUT1},
+ // etc...
+};
+```
+
+## API {#api}
+
+### `struct is31fl3236_led_t` {#api-is31fl3236-led-t}
+
+Contains the PWM register addresses for a single RGB LED.
+
+#### Members {#api-is31fl3236-led-t-members}
+
+ - `uint8_t driver`
+ The driver index of the LED, from 0 to 3.
+ - `uint8_t r`
+ The output PWM register address for the LED's red channel (RGB driver only).
+ - `uint8_t g`
+ The output PWM register address for the LED's green channel (RGB driver only).
+ - `uint8_t b`
+ The output PWM register address for the LED's blue channel (RGB driver only).
+ - `uint8_t v`
+ The output PWM register address for the LED (single-color driver only).
+
+---
+
+### `void is31fl3236_init(uint8_t index)` {#api-is31fl3236-init}
+
+Initialize the LED driver. This function should be called first.
+
+#### Arguments {#api-is31fl3236-init-arguments}
+
+ - `uint8_t index`
+ The driver index.
+
+---
+
+### `void is31fl3236_write_register(uint8_t index, uint8_t reg, uint8_t data)` {#api-is31fl3236-write-register}
+
+Set the value of the given register.
+
+#### Arguments {#api-is31fl3236-write-register-arguments}
+
+ - `uint8_t index`
+ The driver index.
+ - `uint8_t reg`
+ The register address.
+ - `uint8_t data`
+ The value to set.
+
+---
+
+### `void is31fl3236_set_color(int index, uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3236-set-color}
+
+Set the color of a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3236_update_pwm_buffers()` after you are finished.
+
+#### Arguments {#api-is31fl3236-set-color-arguments}
+
+ - `int index`
+ The LED index (ie. the index into the `g_is31fl3236_leds` array).
+ - `uint8_t red`
+ The red value to set.
+ - `uint8_t green`
+ The green value to set.
+ - `uint8_t blue`
+ The blue value to set.
+
+---
+
+### `void is31fl3236_set_color_all(uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3236-set-color-all}
+
+Set the color of all LEDs (RGB driver only).
+
+#### Arguments {#api-is31fl3236-set-color-all-arguments}
+
+ - `uint8_t red`
+ The red value to set.
+ - `uint8_t green`
+ The green value to set.
+ - `uint8_t blue`
+ The blue value to set.
+
+---
+
+### `void is31fl3236_set_value(int index, uint8_t value)` {#api-is31fl3236-set-value}
+
+Set the brightness of a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3236_update_pwm_buffers()` after you are finished.
+
+#### Arguments {#api-is31fl3236-set-value-arguments}
+
+ - `int index`
+ The LED index (ie. the index into the `g_is31fl3236_leds` array).
+ - `uint8_t value`
+ The brightness value to set.
+
+---
+
+### `void is31fl3236_set_value_all(uint8_t value)` {#api-is31fl3236-set-value-all}
+
+Set the brightness of all LEDs (single-color driver only).
+
+#### Arguments {#api-is31fl3236-set-value-all-arguments}
+
+ - `uint8_t value`
+ The brightness value to set.
+
+---
+
+### `void is31fl3236_set_led_control_register(uint8_t index, bool red, bool green, bool blue)` {#api-is31fl3236-set-led-control-register-rgb}
+
+Configure the LED control registers for a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3236_update_led_control_registers()` after you are finished.
+
+#### Arguments {#api-is31fl3236-set-led-control-register-rgb-arguments}
+
+ - `uint8_t index`
+ The LED index (ie. the index into the `g_is31fl3236_leds` array).
+ - `bool red`
+ Enable or disable the red channel.
+ - `bool green`
+ Enable or disable the green channel.
+ - `bool blue`
+ Enable or disable the blue channel.
+
+---
+
+### `void is31fl3236_set_led_control_register(uint8_t index, bool value)` {#api-is31fl3236-set-led-control-register-mono}
+
+Configure the LED control registers for a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3236_update_led_control_registers()` after you are finished.
+
+#### Arguments {#api-is31fl3236-set-led-control-register-mono-arguments}
+
+ - `uint8_t index`
+ The LED index (ie. the index into the `g_is31fl3236_leds` array).
+ - `bool value`
+ Enable or disable the LED.
+
+---
+
+### `void is31fl3236_update_pwm_buffers(uint8_t index)` {#api-is31fl3236-update-pwm-buffers}
+
+Flush the PWM values to the LED driver.
+
+#### Arguments {#api-is31fl3236-update-pwm-buffers-arguments}
+
+ - `uint8_t index`
+ The driver index.
+
+---
+
+### `void is31fl3236_update_led_control_registers(uint8_t index)` {#api-is31fl3236-update-led-control-registers}
+
+Flush the LED control register values to the LED driver.
+
+#### Arguments {#api-is31fl3236-update-led-control-registers-arguments}
+
+ - `uint8_t index`
+ The driver index.
diff --git a/docs/drivers/is31fl3729.md b/docs/drivers/is31fl3729.md
new file mode 100644
index 000000000000..32618d82d597
--- /dev/null
+++ b/docs/drivers/is31fl3729.md
@@ -0,0 +1,300 @@
+# IS31FL3729 Driver {#is31fl3729-driver}
+
+I²C 16x8/15x9 LED matrix driver by Lumissil. Supports a maximum of four drivers, each controlling up to 135 single-color LEDs, or 45 RGB LEDs.
+
+[IS31FL3729 Datasheet](https://www.lumissil.com/assets/pdf/core/IS31FL3729_DS.pdf)
+
+## Usage {#usage}
+
+The IS31FL3729 driver code is automatically included if you are using the [LED Matrix](../features/led_matrix) or [RGB Matrix](../features/rgb_matrix) feature with the `is31fl3729` driver set, and you would use those APIs instead.
+
+However, if you need to use the driver standalone, add this to your `rules.mk`:
+
+```make
+COMMON_VPATH += $(DRIVER_PATH)/led/issi
+SRC += is31fl3729-mono.c # For single-color
+SRC += is31fl3729.c # For RGB
+I2C_DRIVER_REQUIRED = yes
+```
+
+## Basic Configuration {#basic-configuration}
+
+Add the following to your `config.h`:
+
+|Define |Default |Description |
+|----------------------------|--------------------------------------|----------------------------------------------------|
+|`IS31FL3729_SDB_PIN` |*Not defined* |The GPIO pin connected to the drivers' shutdown pins|
+|`IS31FL3729_I2C_TIMEOUT` |`100` |The I²C timeout in milliseconds |
+|`IS31FL3729_I2C_PERSISTENCE`|`0` |The number of times to retry I²C transmissions |
+|`IS31FL3729_I2C_ADDRESS_1` |*Not defined* |The I²C address of driver 0 |
+|`IS31FL3729_I2C_ADDRESS_2` |*Not defined* |The I²C address of driver 1 |
+|`IS31FL3729_I2C_ADDRESS_3` |*Not defined* |The I²C address of driver 2 |
+|`IS31FL3729_I2C_ADDRESS_4` |*Not defined* |The I²C address of driver 3 |
+|`IS31FL3729_PWM_FREQUENCY` |`IS31FL3729_PWM_FREQUENCY_32K_HZ` |The PWM frequency of the LEDs |
+|`IS31FL3729_SW_PULLDOWN` |`IS31FL3729_SW_PULLDOWN_2K_OHM_SW_OFF`|The `SWx` pullup resistor value |
+|`IS31FL3729_CS_PULLUP` |`IS31FL3729_CS_PULLUP_2K_OHM_CS_OFF` |The `CSx` pulldown resistor value |
+|`IS31FL3729_GLOBAL_CURRENT` |`0x40` |The global current control value |
+
+### I²C Addressing {#i2c-addressing}
+
+The IS31FL3729 has four possible 7-bit I²C addresses, depending on how the `AD` pin is connected.
+
+To configure this, set the `IS31FL3729_I2C_ADDRESS_n` defines to one of the following in your `config.h`, where *n* denotes the driver index:
+
+|Define |Value |
+|----------------------------|------|
+|`IS31FL3729_I2C_ADDRESS_GND`|`0x34`|
+|`IS31FL3729_I2C_ADDRESS_SCL`|`0x35`|
+|`IS31FL3729_I2C_ADDRESS_SDA`|`0x36`|
+|`IS31FL3729_I2C_ADDRESS_VCC`|`0x37`|
+
+### PWM Frequency {#pwm-frequency}
+
+The PWM frequency can be adjusted by adding the following to your `config.h`:
+
+```c
+#define IS31FL3729_PWM_FREQUENCY IS31FL3729_PWM_FREQUENCY_32K_HZ
+```
+
+Valid values are:
+
+|Define |Frequency |
+|----------------------------------|----------------|
+|`IS31FL3729_PWM_FREQUENCY_55K_HZ` |55 kHz |
+|`IS31FL3729_PWM_FREQUENCY_32K_HZ` |32 kHz (default)|
+|`IS31FL3729_PWM_FREQUENCY_4K_HZ` |4 kHz |
+|`IS31FL3729_PWM_FREQUENCY_2K_HZ` |2 kHz |
+|`IS31FL3729_PWM_FREQUENCY_1K_HZ` |1 kHz |
+|`IS31FL3729_PWM_FREQUENCY_500_HZ` |500 Hz |
+|`IS31FL3729_PWM_FREQUENCY_250_HZ` |250 Hz |
+|`IS31FL3729_PWM_FREQUENCY_80K_HZ` |80 kHz |
+
+### De-Ghosting {#de-ghosting}
+
+These settings control the pulldown and pullup resistor values on the `SWy` and `CSx` pins respectively, for the purposes of eliminating ghosting. Refer to the datasheet (p. 18) for more information on how and why this occurs.
+
+To adjust the resistor values, add the following to your `config.h`:
+
+```c
+#define IS31FL3729_SW_PULLDOWN IS31FL3729_SW_PULLDOWN_2K_OHM_SW_OFF
+#define IS31FL3729_CS_PULLUP IS31FL3729_CS_PULLUP_2K_OHM_CS_OFF
+```
+
+Valid values for `IS31FL3729_SW_PULLDOWN` are:
+
+|Define |Resistance |
+|---------------------------------------|------------------------------|
+|`IS31FL3729_SW_PULLDOWN_0_OHM` |None |
+|`IS31FL3729_SW_PULLDOWN_0K5_OHM_SW_OFF`|0.5 kΩ in SWy off time |
+|`IS31FL3729_SW_PULLDOWN_1K_OHM_SW_OFF` |1 kΩ in SWy off time |
+|`IS31FL3729_SW_PULLDOWN_2K_OHM_SW_OFF` |2 kΩ in SWy off time (default)|
+|`IS31FL3729_SW_PULLDOWN_1K_OHM` |1 kΩ |
+|`IS31FL3729_SW_PULLDOWN_2K_OHM` |2 kΩ |
+|`IS31FL3729_SW_PULLDOWN_4K_OHM` |4 kΩ |
+|`IS31FL3729_SW_PULLDOWN_8K_OHM` |8 kΩ |
+
+Valid values for `IS31FL3729_CS_PULLUP` are:
+
+|Define |Resistance |
+|-------------------------------------|------------------------------|
+|`IS31FL3729_CS_PULLUP_0_OHM` |None |
+|`IS31FL3729_CS_PULLUP_0K5_OHM_CS_OFF`|0.5 kΩ in CSx off time |
+|`IS31FL3729_CS_PULLUP_1K_OHM_CS_OFF` |1 kΩ in CSx off time |
+|`IS31FL3729_CS_PULLUP_2K_OHM_CS_OFF` |2 kΩ in CSx off time (default)|
+|`IS31FL3729_CS_PULLUP_1K_OHM` |1 kΩ |
+|`IS31FL3729_CS_PULLUP_2K_OHM` |2 kΩ |
+|`IS31FL3729_CS_PULLUP_4K_OHM` |4 kΩ |
+|`IS31FL3729_CS_PULLUP_8K_OHM` |8 kΩ |
+
+### Global Current Control {#global-current-control}
+
+This setting controls the current sunk by the `CSx` pins, from 0 to 255. By default, the value is 64, but if you need to adjust it, add the following to your `config.h`:
+
+```c
+#define IS31FL3729_GLOBAL_CURRENT 0x40
+```
+
+## ARM/ChibiOS Configuration {#arm-configuration}
+
+Depending on the ChibiOS board configuration, you may need to [enable and configure I²C](i2c#arm-configuration) at the keyboard level.
+
+## LED Mapping {#led-mapping}
+
+In order to use this driver, each output must be mapped to an LED index, by adding the following to your `.c`:
+
+```c
+const is31fl3729_led_t PROGMEM g_is31fl3729_leds[IS31FL3729_LED_COUNT] = {
+/* Driver
+ * | R G B */
+ {0, SW1_CS1, SW1_CS2, SW1_CS3},
+ // etc...
+};
+```
+
+In this example, the red, green and blue channels for the first LED index on driver 0 all have their anodes connected to the `SW1` pin, and their cathodes on the `CS1`, `CS2` and `CS3` pins respectively.
+
+For the single-color driver, the principle is the same, but there is only one channel:
+
+```c
+const is31fl3729_led_t PROGMEM g_is31fl3729_leds[IS31FL3729_LED_COUNT] = {
+/* Driver
+ * | V */
+ {0, SW1_CS1},
+ // etc...
+};
+```
+
+These values correspond to the register indices as shown in the datasheet on page 12, figure 9.
+
+## API {#api}
+
+### `struct is31fl3729_led_t` {#api-is31fl3729-led-t}
+
+Contains the PWM register addresses for a single RGB LED.
+
+#### Members {#api-is31fl3729-led-t-members}
+
+ - `uint8_t driver`
+ The driver index of the LED, from 0 to 3.
+ - `uint8_t r`
+ The output PWM register address for the LED's red channel (RGB driver only).
+ - `uint8_t g`
+ The output PWM register address for the LED's green channel (RGB driver only).
+ - `uint8_t b`
+ The output PWM register address for the LED's blue channel (RGB driver only).
+ - `uint8_t v`
+ The output PWM register address for the LED (single-color driver only).
+
+---
+
+### `void is31fl3729_init(uint8_t index)` {#api-is31fl3729-init}
+
+Initialize the LED driver. This function should be called first.
+
+#### Arguments {#api-is31fl3729-init-arguments}
+
+ - `uint8_t index`
+ The driver index.
+
+---
+
+### `void is31fl3729_write_register(uint8_t index, uint8_t reg, uint8_t data)` {#api-is31fl3729-write-register}
+
+Set the value of the given register.
+
+#### Arguments {#api-is31fl3729-write-register-arguments}
+
+ - `uint8_t index`
+ The driver index.
+ - `uint8_t reg`
+ The register address.
+ - `uint8_t data`
+ The value to set.
+
+---
+
+### `void is31fl3729_set_color(int index, uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3729-set-color}
+
+Set the color of a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3729_update_pwm_buffers()` after you are finished.
+
+#### Arguments {#api-is31fl3729-set-color-arguments}
+
+ - `int index`
+ The LED index (ie. the index into the `g_is31fl3729_leds` array).
+ - `uint8_t red`
+ The red value to set.
+ - `uint8_t green`
+ The green value to set.
+ - `uint8_t blue`
+ The blue value to set.
+
+---
+
+### `void is31fl3729_set_color_all(uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3729-set-color-all}
+
+Set the color of all LEDs (RGB driver only).
+
+#### Arguments {#api-is31fl3729-set-color-all-arguments}
+
+ - `uint8_t red`
+ The red value to set.
+ - `uint8_t green`
+ The green value to set.
+ - `uint8_t blue`
+ The blue value to set.
+
+---
+
+### `void is31fl3729_set_value(int index, uint8_t value)` {#api-is31fl3729-set-value}
+
+Set the brightness of a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3729_update_pwm_buffers()` after you are finished.
+
+#### Arguments {#api-is31fl3729-set-value-arguments}
+
+ - `int index`
+ The LED index (ie. the index into the `g_is31fl3729_leds` array).
+ - `uint8_t value`
+ The brightness value to set.
+
+---
+
+### `void is31fl3729_set_value_all(uint8_t value)` {#api-is31fl3729-set-value-all}
+
+Set the brightness of all LEDs (single-color driver only).
+
+#### Arguments {#api-is31fl3729-set-value-all-arguments}
+
+ - `uint8_t value`
+ The brightness value to set.
+
+---
+
+### `void is31fl3729_set_scaling_register(uint8_t index, uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3729-set-scaling-register-rgb}
+
+Configure the scaling registers for a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3729_update_scaling_registers()` after you are finished.
+
+#### Arguments {#api-is31fl3729-set-scaling-register-rgb-arguments}
+
+ - `uint8_t index`
+ The LED index (ie. the index into the `g_is31fl3729_leds` array).
+ - `uint8_t red`
+ The scaling value for the red channel.
+ - `uint8_t green`
+ The scaling value for the green channel.
+ - `uint8_t blue`
+ The scaling value for the blue channel.
+
+---
+
+### `void is31fl3729_set_scaling_register(uint8_t index, uint8_t value)` {#api-is31fl3729-set-scaling-register-mono}
+
+Configure the scaling registers for a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3729_update_scaling_registers()` after you are finished.
+
+#### Arguments {#api-is31fl3729-set-scaling-register-mono-arguments}
+
+ - `uint8_t index`
+ The LED index (ie. the index into the `g_is31fl3729_leds` array).
+ - `uint8_t value`
+ The scaling value for the LED.
+
+---
+
+### `void is31fl3729_update_pwm_buffers(uint8_t index)` {#api-is31fl3729-update-pwm-buffers}
+
+Flush the PWM values to the LED driver.
+
+#### Arguments {#api-is31fl3729-update-pwm-buffers-arguments}
+
+ - `uint8_t index`
+ The driver index.
+
+---
+
+### `void is31fl3729_update_scaling_registers(uint8_t index)` {#api-is31fl3729-update-scaling-registers}
+
+Flush the scaling register values to the LED driver.
+
+#### Arguments {#api-is31fl3729-update-scaling-registers-arguments}
+
+ - `uint8_t index`
+ The driver index.
diff --git a/docs/drivers/is31fl3731.md b/docs/drivers/is31fl3731.md
new file mode 100644
index 000000000000..0d928a919ef7
--- /dev/null
+++ b/docs/drivers/is31fl3731.md
@@ -0,0 +1,254 @@
+# IS31FL3731 Driver {#is31fl3731-driver}
+
+I²C Charlieplexed 16x9 LED matrix driver by Lumissil. Supports a maximum of four drivers, each controlling up to 144 single-color LEDs, or 48 RGB LEDs.
+
+[IS31FL3731 Datasheet](https://www.lumissil.com/assets/pdf/core/IS31FL3731_DS.pdf)
+
+## Usage {#usage}
+
+The IS31FL3731 driver code is automatically included if you are using the [LED Matrix](../features/led_matrix) or [RGB Matrix](../features/rgb_matrix) feature with the `is31fl3731` driver set, and you would use those APIs instead.
+
+However, if you need to use the driver standalone, add this to your `rules.mk`:
+
+```make
+COMMON_VPATH += $(DRIVER_PATH)/led/issi
+SRC += is31fl3731-mono.c # For single-color
+SRC += is31fl3731.c # For RGB
+I2C_DRIVER_REQUIRED = yes
+```
+
+## Basic Configuration {#basic-configuration}
+
+Add the following to your `config.h`:
+
+|Define |Default |Description |
+|----------------------------|-------------|----------------------------------------------------|
+|`IS31FL3731_SDB_PIN` |*Not defined*|The GPIO pin connected to the drivers' shutdown pins|
+|`IS31FL3731_I2C_TIMEOUT` |`100` |The I²C timeout in milliseconds |
+|`IS31FL3731_I2C_PERSISTENCE`|`0` |The number of times to retry I²C transmissions |
+|`IS31FL3731_I2C_ADDRESS_1` |*Not defined*|The I²C address of driver 0 |
+|`IS31FL3731_I2C_ADDRESS_2` |*Not defined*|The I²C address of driver 1 |
+|`IS31FL3731_I2C_ADDRESS_3` |*Not defined*|The I²C address of driver 2 |
+|`IS31FL3731_I2C_ADDRESS_4` |*Not defined*|The I²C address of driver 3 |
+|`IS31FL3731_DEGHOST` |*Not defined*|Enable ghost image prevention |
+
+### I²C Addressing {#i2c-addressing}
+
+The IS31FL3731 has four possible 7-bit I²C addresses, depending on how the `AD` pin is connected.
+
+To configure this, set the `IS31FL3731_I2C_ADDRESS_n` defines to one of the following in your `config.h`, where *n* denotes the driver index:
+
+|Define |Value |
+|----------------------------|------|
+|`IS31FL3731_I2C_ADDRESS_GND`|`0x74`|
+|`IS31FL3731_I2C_ADDRESS_SCL`|`0x75`|
+|`IS31FL3731_I2C_ADDRESS_SDA`|`0x76`|
+|`IS31FL3731_I2C_ADDRESS_VCC`|`0x77`|
+
+### De-Ghosting {#de-ghosting}
+
+This setting enables the de-ghosting feature on the IS31FL3731. See this [Application Note](https://www.lumissil.com/assets/pdf/core/IS31FL3731_AN.pdf) (p. 15) for more information.
+
+To enable, add the following to your `config.h`:
+
+```c
+#define IS31FL3731_DEGHOST
+```
+
+## ARM/ChibiOS Configuration {#arm-configuration}
+
+Depending on the ChibiOS board configuration, you may need to [enable and configure I²C](i2c#arm-configuration) at the keyboard level.
+
+## LED Mapping {#led-mapping}
+
+In order to use this driver, each output must be mapped to an LED index, by adding the following to your `.c`:
+
+```c
+const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = {
+/* Driver
+ * | R G B */
+ {0, C1_1, C1_2, C1_3},
+ // etc...
+};
+```
+
+In this example, the red, green and blue channels for the first LED index on driver 0 all have their cathodes connected to the `CA1` pin, and their anodes on the `CA2`, `CA3` and `CA4` pins respectively.
+
+For the single-color driver, the principle is the same, but there is only one channel:
+
+```c
+const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = {
+/* Driver
+ * | V */
+ {0, C1_1},
+ // etc...
+};
+```
+
+These values correspond to the register indices as shown in the datasheet on page 11, figure 8.
+
+## API {#api}
+
+### `struct is31fl3731_led_t` {#api-is31fl3731-led-t}
+
+Contains the PWM register addresses for a single RGB LED.
+
+#### Members {#api-is31fl3731-led-t-members}
+
+ - `uint8_t driver`
+ The driver index of the LED, from 0 to 3.
+ - `uint8_t r`
+ The output PWM register address for the LED's red channel (RGB driver only).
+ - `uint8_t g`
+ The output PWM register address for the LED's green channel (RGB driver only).
+ - `uint8_t b`
+ The output PWM register address for the LED's blue channel (RGB driver only).
+ - `uint8_t v`
+ The output PWM register address for the LED (single-color driver only).
+
+---
+
+### `void is31fl3731_init(uint8_t index)` {#api-is31fl3731-init}
+
+Initialize the LED driver. This function should be called first.
+
+#### Arguments {#api-is31fl3731-init-arguments}
+
+ - `uint8_t index`
+ The driver index.
+
+---
+
+### `void is31fl3731_write_register(uint8_t index, uint8_t reg, uint8_t data)` {#api-is31fl3731-write-register}
+
+Set the value of the given register.
+
+#### Arguments {#api-is31fl3731-write-register-arguments}
+
+ - `uint8_t index`
+ The driver index.
+ - `uint8_t reg`
+ The register address.
+ - `uint8_t data`
+ The value to set.
+
+---
+
+### `void is31fl3731_select_page(uint8_t index, uint8_t page)` {#api-is31fl3731-select-page}
+
+Change the current page for configuring the LED driver.
+
+#### Arguments {#api-is31fl3731-select-page-arguments}
+
+ - `uint8_t index`
+ The driver index.
+ - `uint8_t page`
+ The page number to select.
+
+---
+
+### `void is31fl3731_set_color(int index, uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3731-set-color}
+
+Set the color of a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3731_update_pwm_buffers()` after you are finished.
+
+#### Arguments {#api-is31fl3731-set-color-arguments}
+
+ - `int index`
+ The LED index (ie. the index into the `g_is31fl3731_leds` array).
+ - `uint8_t red`
+ The red value to set.
+ - `uint8_t green`
+ The green value to set.
+ - `uint8_t blue`
+ The blue value to set.
+
+---
+
+### `void is31fl3731_set_color_all(uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3731-set-color-all}
+
+Set the color of all LEDs (RGB driver only).
+
+#### Arguments {#api-is31fl3731-set-color-all-arguments}
+
+ - `uint8_t red`
+ The red value to set.
+ - `uint8_t green`
+ The green value to set.
+ - `uint8_t blue`
+ The blue value to set.
+
+---
+
+### `void is31fl3731_set_value(int index, uint8_t value)` {#api-is31fl3731-set-value}
+
+Set the brightness of a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3731_update_pwm_buffers()` after you are finished.
+
+#### Arguments {#api-is31fl3731-set-value-arguments}
+
+ - `int index`
+ The LED index (ie. the index into the `g_is31fl3731_leds` array).
+ - `uint8_t value`
+ The brightness value to set.
+
+---
+
+### `void is31fl3731_set_value_all(uint8_t value)` {#api-is31fl3731-set-value-all}
+
+Set the brightness of all LEDs (single-color driver only).
+
+#### Arguments {#api-is31fl3731-set-value-all-arguments}
+
+ - `uint8_t value`
+ The brightness value to set.
+
+---
+
+### `void is31fl3731_set_led_control_register(uint8_t index, bool red, bool green, bool blue)` {#api-is31fl3731-set-led-control-register-rgb}
+
+Configure the LED control registers for a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3731_update_led_control_registers()` after you are finished.
+
+#### Arguments {#api-is31fl3731-set-led-control-register-rgb-arguments}
+
+ - `uint8_t index`
+ The LED index (ie. the index into the `g_is31fl3731_leds` array).
+ - `bool red`
+ Enable or disable the red channel.
+ - `bool green`
+ Enable or disable the green channel.
+ - `bool blue`
+ Enable or disable the blue channel.
+
+---
+
+### `void is31fl3731_set_led_control_register(uint8_t index, bool value)` {#api-is31fl3731-set-led-control-register-mono}
+
+Configure the LED control registers for a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3731_update_led_control_registers()` after you are finished.
+
+#### Arguments {#api-is31fl3731-set-led-control-register-mono-arguments}
+
+ - `uint8_t index`
+ The LED index (ie. the index into the `g_is31fl3731_leds` array).
+ - `bool value`
+ Enable or disable the LED.
+
+---
+
+### `void is31fl3731_update_pwm_buffers(uint8_t index)` {#api-is31fl3731-update-pwm-buffers}
+
+Flush the PWM values to the LED driver.
+
+#### Arguments {#api-is31fl3731-update-pwm-buffers-arguments}
+
+ - `uint8_t index`
+ The driver index.
+
+---
+
+### `void is31fl3731_update_led_control_registers(uint8_t index)` {#api-is31fl3731-update-led-control-registers}
+
+Flush the LED control register values to the LED driver.
+
+#### Arguments {#api-is31fl3731-update-led-control-registers-arguments}
+
+ - `uint8_t index`
+ The driver index.
diff --git a/docs/drivers/is31fl3733.md b/docs/drivers/is31fl3733.md
new file mode 100644
index 000000000000..e299f785bda0
--- /dev/null
+++ b/docs/drivers/is31fl3733.md
@@ -0,0 +1,338 @@
+# IS31FL3733 Driver {#is31fl3733-driver}
+
+I²C 12x16 LED matrix driver by Lumissil. Supports a maximum of four drivers, each controlling up to 192 single-color LEDs, or 64 RGB LEDs.
+
+[IS31FL3733 Datasheet](https://www.lumissil.com/assets/pdf/core/IS31FL3733_DS.pdf)
+
+## Usage {#usage}
+
+The IS31FL3733 driver code is automatically included if you are using the [LED Matrix](../features/led_matrix) or [RGB Matrix](../features/rgb_matrix) feature with the `is31fl3733` driver set, and you would use those APIs instead.
+
+However, if you need to use the driver standalone, add this to your `rules.mk`:
+
+```make
+COMMON_VPATH += $(DRIVER_PATH)/led/issi
+SRC += is31fl3733-mono.c # For single-color
+SRC += is31fl3733.c # For RGB
+I2C_DRIVER_REQUIRED = yes
+```
+
+## Basic Configuration {#basic-configuration}
+
+Add the following to your `config.h`:
+
+|Define |Default |Description |
+|----------------------------|---------------------------------|----------------------------------------------------|
+|`IS31FL3733_SDB_PIN` |*Not defined* |The GPIO pin connected to the drivers' shutdown pins|
+|`IS31FL3733_I2C_TIMEOUT` |`100` |The I²C timeout in milliseconds |
+|`IS31FL3733_I2C_PERSISTENCE`|`0` |The number of times to retry I²C transmissions |
+|`IS31FL3733_I2C_ADDRESS_1` |*Not defined* |The I²C address of driver 0 |
+|`IS31FL3733_I2C_ADDRESS_2` |*Not defined* |The I²C address of driver 1 |
+|`IS31FL3733_I2C_ADDRESS_3` |*Not defined* |The I²C address of driver 2 |
+|`IS31FL3733_I2C_ADDRESS_4` |*Not defined* |The I²C address of driver 3 |
+|`IS31FL3733_SYNC_1` |`IS31FL3733_SYNC_NONE` |The sync configuration for driver 0 |
+|`IS31FL3733_SYNC_2` |`IS31FL3733_SYNC_NONE` |The sync configuration for driver 1 |
+|`IS31FL3733_SYNC_3` |`IS31FL3733_SYNC_NONE` |The sync configuration for driver 2 |
+|`IS31FL3733_SYNC_4` |`IS31FL3733_SYNC_NONE` |The sync configuration for driver 3 |
+|`IS31FL3733_PWM_FREQUENCY` |`IS31FL3733_PWM_FREQUENCY_8K4_HZ`|The PWM frequency of the LEDs (IS31FL3733B only) |
+|`IS31FL3733_SW_PULLUP` |`IS31FL3733_PUR_0_OHM` |The `SWx` pullup resistor value |
+|`IS31FL3733_CS_PULLDOWN` |`IS31FL3733_PDR_0_OHM` |The `CSx` pulldown resistor value |
+|`IS31FL3733_GLOBAL_CURRENT` |`0xFF` |The global current control value |
+
+### I²C Addressing {#i2c-addressing}
+
+The IS31FL3733 has 16 possible 7-bit I²C addresses, depending on how the `ADDR1` and `ADDR2` pins are connected.
+
+To configure this, set the `IS31FL3733_I2C_ADDRESS_n` defines to one of the following in your `config.h`, where *n* denotes the driver index:
+
+|Define |Value |
+|--------------------------------|------|
+|`IS31FL3733_I2C_ADDRESS_GND_GND`|`0x50`|
+|`IS31FL3733_I2C_ADDRESS_GND_SCL`|`0x51`|
+|`IS31FL3733_I2C_ADDRESS_GND_SDA`|`0x52`|
+|`IS31FL3733_I2C_ADDRESS_GND_VCC`|`0x53`|
+|`IS31FL3733_I2C_ADDRESS_SCL_GND`|`0x54`|
+|`IS31FL3733_I2C_ADDRESS_SCL_SCL`|`0x55`|
+|`IS31FL3733_I2C_ADDRESS_SCL_SDA`|`0x56`|
+|`IS31FL3733_I2C_ADDRESS_SCL_VCC`|`0x57`|
+|`IS31FL3733_I2C_ADDRESS_SDA_GND`|`0x58`|
+|`IS31FL3733_I2C_ADDRESS_SDA_SCL`|`0x59`|
+|`IS31FL3733_I2C_ADDRESS_SDA_SDA`|`0x5A`|
+|`IS31FL3733_I2C_ADDRESS_SDA_VCC`|`0x5B`|
+|`IS31FL3733_I2C_ADDRESS_VCC_GND`|`0x5C`|
+|`IS31FL3733_I2C_ADDRESS_VCC_SCL`|`0x5D`|
+|`IS31FL3733_I2C_ADDRESS_VCC_SDA`|`0x5E`|
+|`IS31FL3733_I2C_ADDRESS_VCC_VCC`|`0x5F`|
+
+### Multi-Driver Synchronization {#multi-driver-synchronization}
+
+Multiple IS31FL3733 drivers can be synchronized by connecting the `SYNC` pins together. One driver must be designated as the "master", and the others configured as "slave".
+
+To do this, set the `IS31FL3733_SYNC_n` defines accordingly in your `config.h`, where *n* denotes the driver index:
+
+|Define |Value |
+|------------------------|---------------------------|
+|`IS31FL3733_SYNC_NONE` |No synchronization |
+|`IS31FL3733_SYNC_MASTER`|Driver configured as master|
+|`IS31FL3733_SYNC_SLAVE` |Driver configured as slave |
+
+### PWM Frequency {#pwm-frequency}
+
+The PWM frequency can be adjusted (for IS31FL3733B only) by adding the following to your `config.h`:
+
+```c
+#define IS31FL3733_PWM_FREQUENCY IS31FL3733_PWM_FREQUENCY_8K4_HZ
+```
+
+Valid values are:
+
+|Define |Frequency |
+|----------------------------------|-----------------|
+|`IS31FL3733_PWM_FREQUENCY_8K4_HZ` |8.4 kHz (default)|
+|`IS31FL3733_PWM_FREQUENCY_4K2_HZ` |4.2 kHz |
+|`IS31FL3733_PWM_FREQUENCY_26K7_HZ`|26.7 kHz |
+|`IS31FL3733_PWM_FREQUENCY_2K1_HZ` |2.1 kHz |
+|`IS31FL3733_PWM_FREQUENCY_1K05_HZ`|1.05 kHz |
+
+### De-Ghosting {#de-ghosting}
+
+These settings control the pullup and pulldown resistor values on the `SWy` and `CSx` pins respectively, for the purposes of eliminating ghosting. Refer to the datasheet (p. 23) for more information on how and why this occurs.
+
+To adjust the resistor values, add the following to your `config.h`:
+
+```c
+#define IS31FL3733_SW_PULLUP IS31FL3733_PUR_0_OHM
+#define IS31FL3733_CS_PULLDOWN IS31FL3733_PUR_0_OHM
+```
+
+Valid values for `IS31FL3733_SW_PULLUP` are:
+
+|Define |Resistance |
+|------------------------|--------------|
+|`IS31FL3733_PUR_0_OHM` |None (default)|
+|`IS31FL3733_PUR_0K5_OHM`|0.5 kΩ |
+|`IS31FL3733_PUR_1K_OHM` |1 kΩ |
+|`IS31FL3733_PUR_2K_OHM` |2 kΩ |
+|`IS31FL3733_PUR_4K_OHM` |4 kΩ |
+|`IS31FL3733_PUR_8K_OHM` |8 kΩ |
+|`IS31FL3733_PUR_16K_OHM`|16 kΩ |
+|`IS31FL3733_PUR_32K_OHM`|32 kΩ |
+
+Valid values for `IS31FL3733_CS_PULLDOWN` are:
+
+|Define |Resistance |
+|------------------------|--------------|
+|`IS31FL3733_PDR_0_OHM` |None (default)|
+|`IS31FL3733_PDR_0K5_OHM`|0.5 kΩ |
+|`IS31FL3733_PDR_1K_OHM` |1 kΩ |
+|`IS31FL3733_PDR_2K_OHM` |2 kΩ |
+|`IS31FL3733_PDR_4K_OHM` |4 kΩ |
+|`IS31FL3733_PDR_8K_OHM` |8 kΩ |
+|`IS31FL3733_PDR_16K_OHM`|16 kΩ |
+|`IS31FL3733_PDR_32K_OHM`|32 kΩ |
+
+### Global Current Control {#global-current-control}
+
+This setting controls the current sunk by the `CSx` pins, from 0 to 255. By default, the value is the maximum (255), but if you need to lower it, add the following to your `config.h`:
+
+```c
+#define IS31FL3733_GLOBAL_CURRENT 0xFF
+```
+
+## ARM/ChibiOS Configuration {#arm-configuration}
+
+Depending on the ChibiOS board configuration, you may need to [enable and configure I²C](i2c#arm-configuration) at the keyboard level.
+
+## LED Mapping {#led-mapping}
+
+In order to use this driver, each output must be mapped to an LED index, by adding the following to your `.c`:
+
+```c
+const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = {
+/* Driver
+ * | R G B */
+ {0, SW1_CS1, SW1_CS2, SW1_CS3},
+ // etc...
+};
+```
+
+In this example, the red, green and blue channels for the first LED index on driver 0 all have their cathodes connected to the `SW1` pin, and their anodes on the `CS1`, `CS2` and `CS3` pins respectively.
+
+For the single-color driver, the principle is the same, but there is only one channel:
+
+```c
+const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = {
+/* Driver
+ * | V */
+ {0, SW1_CS1},
+ // etc...
+};
+```
+
+These values correspond to the register indices as shown in the datasheet on page 15, figure 9.
+
+## API {#api}
+
+### `struct is31fl3733_led_t` {#api-is31fl3733-led-t}
+
+Contains the PWM register addresses for a single RGB LED.
+
+#### Members {#api-is31fl3733-led-t-members}
+
+ - `uint8_t driver`
+ The driver index of the LED, from 0 to 3.
+ - `uint8_t r`
+ The output PWM register address for the LED's red channel (RGB driver only).
+ - `uint8_t g`
+ The output PWM register address for the LED's green channel (RGB driver only).
+ - `uint8_t b`
+ The output PWM register address for the LED's blue channel (RGB driver only).
+ - `uint8_t v`
+ The output PWM register address for the LED (single-color driver only).
+
+---
+
+### `void is31fl3733_init(uint8_t index)` {#api-is31fl3733-init}
+
+Initialize the LED driver. This function should be called first.
+
+#### Arguments {#api-is31fl3733-init-arguments}
+
+ - `uint8_t index`
+ The driver index.
+
+---
+
+### `void is31fl3733_write_register(uint8_t index, uint8_t reg, uint8_t data)` {#api-is31fl3733-write-register}
+
+Set the value of the given register.
+
+#### Arguments {#api-is31fl3733-write-register-arguments}
+
+ - `uint8_t index`
+ The driver index.
+ - `uint8_t reg`
+ The register address.
+ - `uint8_t data`
+ The value to set.
+
+---
+
+### `void is31fl3733_select_page(uint8_t index, uint8_t page)` {#api-is31fl3733-select-page}
+
+Change the current page for configuring the LED driver.
+
+#### Arguments {#api-is31fl3733-select-page-arguments}
+
+ - `uint8_t index`
+ The driver index.
+ - `uint8_t page`
+ The page number to select.
+
+---
+
+### `void is31fl3733_set_color(int index, uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3733-set-color}
+
+Set the color of a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3733_update_pwm_buffers()` after you are finished.
+
+#### Arguments {#api-is31fl3733-set-color-arguments}
+
+ - `int index`
+ The LED index (ie. the index into the `g_is31fl3733_leds` array).
+ - `uint8_t red`
+ The red value to set.
+ - `uint8_t green`
+ The green value to set.
+ - `uint8_t blue`
+ The blue value to set.
+
+---
+
+### `void is31fl3733_set_color_all(uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3733-set-color-all}
+
+Set the color of all LEDs (RGB driver only).
+
+#### Arguments {#api-is31fl3733-set-color-all-arguments}
+
+ - `uint8_t red`
+ The red value to set.
+ - `uint8_t green`
+ The green value to set.
+ - `uint8_t blue`
+ The blue value to set.
+
+---
+
+### `void is31fl3733_set_value(int index, uint8_t value)` {#api-is31fl3733-set-value}
+
+Set the brightness of a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3733_update_pwm_buffers()` after you are finished.
+
+#### Arguments {#api-is31fl3733-set-value-arguments}
+
+ - `int index`
+ The LED index (ie. the index into the `g_is31fl3733_leds` array).
+ - `uint8_t value`
+ The brightness value to set.
+
+---
+
+### `void is31fl3733_set_value_all(uint8_t value)` {#api-is31fl3733-set-value-all}
+
+Set the brightness of all LEDs (single-color driver only).
+
+#### Arguments {#api-is31fl3733-set-value-all-arguments}
+
+ - `uint8_t value`
+ The brightness value to set.
+
+---
+
+### `void is31fl3733_set_led_control_register(uint8_t index, bool red, bool green, bool blue)` {#api-is31fl3733-set-led-control-register-rgb}
+
+Configure the LED control registers for a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3733_update_led_control_registers()` after you are finished.
+
+#### Arguments {#api-is31fl3733-set-led-control-register-rgb-arguments}
+
+ - `uint8_t index`
+ The LED index (ie. the index into the `g_is31fl3733_leds` array).
+ - `bool red`
+ Enable or disable the red channel.
+ - `bool green`
+ Enable or disable the green channel.
+ - `bool blue`
+ Enable or disable the blue channel.
+
+---
+
+### `void is31fl3733_set_led_control_register(uint8_t index, bool value)` {#api-is31fl3733-set-led-control-register-mono}
+
+Configure the LED control registers for a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3733_update_led_control_registers()` after you are finished.
+
+#### Arguments {#api-is31fl3733-set-led-control-register-mono-arguments}
+
+ - `uint8_t index`
+ The LED index (ie. the index into the `g_is31fl3733_leds` array).
+ - `bool value`
+ Enable or disable the LED.
+
+---
+
+### `void is31fl3733_update_pwm_buffers(uint8_t index)` {#api-is31fl3733-update-pwm-buffers}
+
+Flush the PWM values to the LED driver.
+
+#### Arguments {#api-is31fl3733-update-pwm-buffers-arguments}
+
+ - `uint8_t index`
+ The driver index.
+
+---
+
+### `void is31fl3733_update_led_control_registers(uint8_t index)` {#api-is31fl3733-update-led-control-registers}
+
+Flush the LED control register values to the LED driver.
+
+#### Arguments {#api-is31fl3733-update-led-control-registers-arguments}
+
+ - `uint8_t index`
+ The driver index.
diff --git a/docs/drivers/is31fl3736.md b/docs/drivers/is31fl3736.md
new file mode 100644
index 000000000000..b679a232cd67
--- /dev/null
+++ b/docs/drivers/is31fl3736.md
@@ -0,0 +1,322 @@
+# IS31FL3736 Driver {#is31fl3736-driver}
+
+I²C 12x8 LED matrix driver by Lumissil. Supports a maximum of four drivers, each controlling up to 96 single-color LEDs, or 32 RGB LEDs.
+
+[IS31FL3736 Datasheet](https://www.lumissil.com/assets/pdf/core/IS31FL3736_DS.pdf)
+
+## Usage {#usage}
+
+The IS31FL3736 driver code is automatically included if you are using the [LED Matrix](../features/led_matrix) or [RGB Matrix](../features/rgb_matrix) feature with the `is31fl3736` driver set, and you would use those APIs instead.
+
+However, if you need to use the driver standalone, add this to your `rules.mk`:
+
+```make
+COMMON_VPATH += $(DRIVER_PATH)/led/issi
+SRC += is31fl3736-mono.c # For single-color
+SRC += is31fl3736.c # For RGB
+I2C_DRIVER_REQUIRED = yes
+```
+
+## Basic Configuration {#basic-configuration}
+
+Add the following to your `config.h`:
+
+|Define |Default |Description |
+|----------------------------|---------------------------------|----------------------------------------------------|
+|`IS31FL3736_SDB_PIN` |*Not defined* |The GPIO pin connected to the drivers' shutdown pins|
+|`IS31FL3736_I2C_TIMEOUT` |`100` |The I²C timeout in milliseconds |
+|`IS31FL3736_I2C_PERSISTENCE`|`0` |The number of times to retry I²C transmissions |
+|`IS31FL3736_I2C_ADDRESS_1` |*Not defined* |The I²C address of driver 0 |
+|`IS31FL3736_I2C_ADDRESS_2` |*Not defined* |The I²C address of driver 1 |
+|`IS31FL3736_I2C_ADDRESS_3` |*Not defined* |The I²C address of driver 2 |
+|`IS31FL3736_I2C_ADDRESS_4` |*Not defined* |The I²C address of driver 3 |
+|`IS31FL3736_PWM_FREQUENCY` |`IS31FL3736_PWM_FREQUENCY_8K4_HZ`|The PWM frequency of the LEDs (IS31FL3736B only) |
+|`IS31FL3736_SW_PULLUP` |`IS31FL3736_PUR_0_OHM` |The `SWx` pullup resistor value |
+|`IS31FL3736_CS_PULLDOWN` |`IS31FL3736_PDR_0_OHM` |The `CSx` pulldown resistor value |
+|`IS31FL3736_GLOBAL_CURRENT` |`0xFF` |The global current control value |
+
+### I²C Addressing {#i2c-addressing}
+
+The IS31FL3736 has 16 possible 7-bit I²C addresses, depending on how the `ADDR1` and `ADDR2` pins are connected.
+
+To configure this, set the `IS31FL3736_I2C_ADDRESS_n` defines to one of the following in your `config.h`, where *n* denotes the driver index:
+
+|Define |Value |
+|--------------------------------|------|
+|`IS31FL3736_I2C_ADDRESS_GND_GND`|`0x50`|
+|`IS31FL3736_I2C_ADDRESS_GND_SCL`|`0x51`|
+|`IS31FL3736_I2C_ADDRESS_GND_SDA`|`0x52`|
+|`IS31FL3736_I2C_ADDRESS_GND_VCC`|`0x53`|
+|`IS31FL3736_I2C_ADDRESS_SCL_GND`|`0x54`|
+|`IS31FL3736_I2C_ADDRESS_SCL_SCL`|`0x55`|
+|`IS31FL3736_I2C_ADDRESS_SCL_SDA`|`0x56`|
+|`IS31FL3736_I2C_ADDRESS_SCL_VCC`|`0x57`|
+|`IS31FL3736_I2C_ADDRESS_SDA_GND`|`0x58`|
+|`IS31FL3736_I2C_ADDRESS_SDA_SCL`|`0x59`|
+|`IS31FL3736_I2C_ADDRESS_SDA_SDA`|`0x5A`|
+|`IS31FL3736_I2C_ADDRESS_SDA_VCC`|`0x5B`|
+|`IS31FL3736_I2C_ADDRESS_VCC_GND`|`0x5C`|
+|`IS31FL3736_I2C_ADDRESS_VCC_SCL`|`0x5D`|
+|`IS31FL3736_I2C_ADDRESS_VCC_SDA`|`0x5E`|
+|`IS31FL3736_I2C_ADDRESS_VCC_VCC`|`0x5F`|
+
+### PWM Frequency {#pwm-frequency}
+
+The PWM frequency can be adjusted (for IS31FL3736B only) by adding the following to your `config.h`:
+
+```c
+#define IS31FL3736_PWM_FREQUENCY IS31FL3736_PWM_FREQUENCY_8K4_HZ
+```
+
+Valid values are:
+
+|Define |Frequency |
+|----------------------------------|-----------------|
+|`IS31FL3736_PWM_FREQUENCY_8K4_HZ` |8.4 kHz (default)|
+|`IS31FL3736_PWM_FREQUENCY_4K2_HZ` |4.2 kHz |
+|`IS31FL3736_PWM_FREQUENCY_26K7_HZ`|26.7 kHz |
+|`IS31FL3736_PWM_FREQUENCY_2K1_HZ` |2.1 kHz |
+|`IS31FL3736_PWM_FREQUENCY_1K05_HZ`|1.05 kHz |
+
+### De-Ghosting {#de-ghosting}
+
+These settings control the pullup and pulldown resistor values on the `SWy` and `CSx` pins respectively, for the purposes of eliminating ghosting. Refer to the datasheet (p. 25) for more information on how and why this occurs.
+
+To adjust the resistor values, add the following to your `config.h`:
+
+```c
+#define IS31FL3736_SW_PULLUP IS31FL3736_PUR_0_OHM
+#define IS31FL3736_CS_PULLDOWN IS31FL3736_PDR_0_OHM
+```
+
+Valid values for `IS31FL3736_SW_PULLUP` are:
+
+|Define |Resistance |
+|------------------------|--------------|
+|`IS31FL3736_PUR_0_OHM` |None (default)|
+|`IS31FL3736_PUR_0K5_OHM`|0.5 kΩ |
+|`IS31FL3736_PUR_1K_OHM` |1 kΩ |
+|`IS31FL3736_PUR_2K_OHM` |2 kΩ |
+|`IS31FL3736_PUR_4K_OHM` |4 kΩ |
+|`IS31FL3736_PUR_8K_OHM` |8 kΩ |
+|`IS31FL3736_PUR_16K_OHM`|16 kΩ |
+|`IS31FL3736_PUR_32K_OHM`|32 kΩ |
+
+Valid values for `IS31FL3736_CS_PULLDOWN` are:
+
+|Define |Resistance |
+|------------------------|--------------|
+|`IS31FL3736_PDR_0_OHM` |None (default)|
+|`IS31FL3736_PDR_0K5_OHM`|0.5 kΩ |
+|`IS31FL3736_PDR_1K_OHM` |1 kΩ |
+|`IS31FL3736_PDR_2K_OHM` |2 kΩ |
+|`IS31FL3736_PDR_4K_OHM` |4 kΩ |
+|`IS31FL3736_PDR_8K_OHM` |8 kΩ |
+|`IS31FL3736_PDR_16K_OHM`|16 kΩ |
+|`IS31FL3736_PDR_32K_OHM`|32 kΩ |
+
+### Global Current Control {#global-current-control}
+
+This setting controls the current sunk by the `CSx` pins, from 0 to 255. By default, the value is the maximum (255), but if you need to lower it, add the following to your `config.h`:
+
+```c
+#define IS31FL3736_GLOBAL_CURRENT 0xFF
+```
+
+## ARM/ChibiOS Configuration {#arm-configuration}
+
+Depending on the ChibiOS board configuration, you may need to [enable and configure I²C](i2c#arm-configuration) at the keyboard level.
+
+## LED Mapping {#led-mapping}
+
+In order to use this driver, each output must be mapped to an LED index, by adding the following to your `.c`:
+
+```c
+const is31fl3736_led_t PROGMEM g_is31fl3736_leds[IS31FL3736_LED_COUNT] = {
+/* Driver
+ * | R G B */
+ {0, SW1_CS1, SW1_CS2, SW1_CS3},
+ // etc...
+};
+```
+
+In this example, the red, green and blue channels for the first LED index on driver 0 all have their cathodes connected to the `SW1` pin, and their anodes on the `CS1`, `CS2` and `CS3` pins respectively.
+
+For the single-color driver, the principle is the same, but there is only one channel:
+
+```c
+const is31fl3736_led_t PROGMEM g_is31fl3736_leds[IS31FL3736_LED_COUNT] = {
+/* Driver
+ * | V */
+ {0, SW1_CS1},
+ // etc...
+};
+```
+
+These values correspond to the register indices as shown in the datasheet on page 16, figure 9.
+
+## API {#api}
+
+### `struct is31fl3736_led_t` {#api-is31fl3736-led-t}
+
+Contains the PWM register addresses for a single RGB LED.
+
+#### Members {#api-is31fl3736-led-t-members}
+
+ - `uint8_t driver`
+ The driver index of the LED, from 0 to 3.
+ - `uint8_t r`
+ The output PWM register address for the LED's red channel (RGB driver only).
+ - `uint8_t g`
+ The output PWM register address for the LED's green channel (RGB driver only).
+ - `uint8_t b`
+ The output PWM register address for the LED's blue channel (RGB driver only).
+ - `uint8_t v`
+ The output PWM register address for the LED (single-color driver only).
+
+---
+
+### `void is31fl3736_init(uint8_t index)` {#api-is31fl3736-init}
+
+Initialize the LED driver. This function should be called first.
+
+#### Arguments {#api-is31fl3736-init-arguments}
+
+ - `uint8_t index`
+ The driver index.
+
+---
+
+### `void is31fl3736_write_register(uint8_t index, uint8_t reg, uint8_t data)` {#api-is31fl3736-write-register}
+
+Set the value of the given register.
+
+#### Arguments {#api-is31fl3736-write-register-arguments}
+
+ - `uint8_t index`
+ The driver index.
+ - `uint8_t reg`
+ The register address.
+ - `uint8_t data`
+ The value to set.
+
+---
+
+### `void is31fl3736_select_page(uint8_t index, uint8_t page)` {#api-is31fl3736-select-page}
+
+Change the current page for configuring the LED driver.
+
+#### Arguments {#api-is31fl3736-select-page-arguments}
+
+ - `uint8_t index`
+ The driver index.
+ - `uint8_t page`
+ The page number to select.
+
+---
+
+### `void is31fl3736_set_color(int index, uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3736-set-color}
+
+Set the color of a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3736_update_pwm_buffers()` after you are finished.
+
+#### Arguments {#api-is31fl3736-set-color-arguments}
+
+ - `int index`
+ The LED index (ie. the index into the `g_is31fl3736_leds` array).
+ - `uint8_t red`
+ The red value to set.
+ - `uint8_t green`
+ The green value to set.
+ - `uint8_t blue`
+ The blue value to set.
+
+---
+
+### `void is31fl3736_set_color_all(uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3736-set-color-all}
+
+Set the color of all LEDs (RGB driver only).
+
+#### Arguments {#api-is31fl3736-set-color-all-arguments}
+
+ - `uint8_t red`
+ The red value to set.
+ - `uint8_t green`
+ The green value to set.
+ - `uint8_t blue`
+ The blue value to set.
+
+---
+
+### `void is31fl3736_set_value(int index, uint8_t value)` {#api-is31fl3736-set-value}
+
+Set the brightness of a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3736_update_pwm_buffers()` after you are finished.
+
+#### Arguments {#api-is31fl3736-set-value-arguments}
+
+ - `int index`
+ The LED index (ie. the index into the `g_is31fl3736_leds` array).
+ - `uint8_t value`
+ The brightness value to set.
+
+---
+
+### `void is31fl3736_set_value_all(uint8_t value)` {#api-is31fl3736-set-value-all}
+
+Set the brightness of all LEDs (single-color driver only).
+
+#### Arguments {#api-is31fl3736-set-value-all-arguments}
+
+ - `uint8_t value`
+ The brightness value to set.
+
+---
+
+### `void is31fl3736_set_led_control_register(uint8_t index, bool red, bool green, bool blue)` {#api-is31fl3736-set-led-control-register-rgb}
+
+Configure the LED control registers for a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3736_update_led_control_registers()` after you are finished.
+
+#### Arguments {#api-is31fl3736-set-led-control-register-rgb-arguments}
+
+ - `uint8_t index`
+ The LED index (ie. the index into the `g_is31fl3736_leds` array).
+ - `bool red`
+ Enable or disable the red channel.
+ - `bool green`
+ Enable or disable the green channel.
+ - `bool blue`
+ Enable or disable the blue channel.
+
+---
+
+### `void is31fl3736_set_led_control_register(uint8_t index, bool value)` {#api-is31fl3736-set-led-control-register-mono}
+
+Configure the LED control registers for a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3736_update_led_control_registers()` after you are finished.
+
+#### Arguments {#api-is31fl3736-set-led-control-register-mono-arguments}
+
+ - `uint8_t index`
+ The LED index (ie. the index into the `g_is31fl3736_leds` array).
+ - `bool value`
+ Enable or disable the LED.
+
+---
+
+### `void is31fl3736_update_pwm_buffers(uint8_t index)` {#api-is31fl3736-update-pwm-buffers}
+
+Flush the PWM values to the LED driver.
+
+#### Arguments {#api-is31fl3736-update-pwm-buffers-arguments}
+
+ - `uint8_t index`
+ The driver index.
+
+---
+
+### `void is31fl3736_update_led_control_registers(uint8_t index)` {#api-is31fl3736-update-led-control-registers}
+
+Flush the LED control register values to the LED driver.
+
+#### Arguments {#api-is31fl3736-update-led-control-registers-arguments}
+
+ - `uint8_t index`
+ The driver index.
diff --git a/docs/drivers/is31fl3737.md b/docs/drivers/is31fl3737.md
new file mode 100644
index 000000000000..d23def237ff0
--- /dev/null
+++ b/docs/drivers/is31fl3737.md
@@ -0,0 +1,310 @@
+# IS31FL3737 Driver {#is31fl3737-driver}
+
+I²C 12x12 LED matrix driver by Lumissil. Supports a maximum of four drivers, each controlling up to 144 single-color LEDs, or 48 RGB LEDs.
+
+[IS31FL3737 Datasheet](https://www.lumissil.com/assets/pdf/core/IS31FL3737_DS.pdf)
+
+## Usage {#usage}
+
+The IS31FL3737 driver code is automatically included if you are using the [LED Matrix](../features/led_matrix) or [RGB Matrix](../features/rgb_matrix) feature with the `is31fl3737` driver set, and you would use those APIs instead.
+
+However, if you need to use the driver standalone, add this to your `rules.mk`:
+
+```make
+COMMON_VPATH += $(DRIVER_PATH)/led/issi
+SRC += is31fl3737-mono.c # For single-color
+SRC += is31fl3737.c # For RGB
+I2C_DRIVER_REQUIRED = yes
+```
+
+## Basic Configuration {#basic-configuration}
+
+Add the following to your `config.h`:
+
+|Define |Default |Description |
+|----------------------------|---------------------------------|----------------------------------------------------|
+|`IS31FL3737_SDB_PIN` |*Not defined* |The GPIO pin connected to the drivers' shutdown pins|
+|`IS31FL3737_I2C_TIMEOUT` |`100` |The I²C timeout in milliseconds |
+|`IS31FL3737_I2C_PERSISTENCE`|`0` |The number of times to retry I²C transmissions |
+|`IS31FL3737_I2C_ADDRESS_1` |*Not defined* |The I²C address of driver 0 |
+|`IS31FL3737_I2C_ADDRESS_2` |*Not defined* |The I²C address of driver 1 |
+|`IS31FL3737_I2C_ADDRESS_3` |*Not defined* |The I²C address of driver 2 |
+|`IS31FL3737_I2C_ADDRESS_4` |*Not defined* |The I²C address of driver 3 |
+|`IS31FL3737_PWM_FREQUENCY` |`IS31FL3737_PWM_FREQUENCY_8K4_HZ`|The PWM frequency of the LEDs (IS31FL3737B only) |
+|`IS31FL3737_SW_PULLUP` |`IS31FL3737_PUR_0_OHM` |The `SWx` pullup resistor value |
+|`IS31FL3737_CS_PULLDOWN` |`IS31FL3737_PDR_0_OHM` |The `CSx` pulldown resistor value |
+|`IS31FL3737_GLOBAL_CURRENT` |`0xFF` |The global current control value |
+
+### I²C Addressing {#i2c-addressing}
+
+The IS31FL3737 has four possible 7-bit I²C addresses, depending on how the `ADDR` pin is connected.
+
+To configure this, set the `IS31FL3737_I2C_ADDRESS_n` defines to one of the following in your `config.h`, where *n* denotes the driver index:
+
+|Define |Value |
+|----------------------------|------|
+|`IS31FL3737_I2C_ADDRESS_GND`|`0x50`|
+|`IS31FL3737_I2C_ADDRESS_SCL`|`0x55`|
+|`IS31FL3737_I2C_ADDRESS_SDA`|`0x5A`|
+|`IS31FL3737_I2C_ADDRESS_VCC`|`0x5F`|
+
+### PWM Frequency {#pwm-frequency}
+
+The PWM frequency can be adjusted (for IS31FL3737B only) by adding the following to your `config.h`:
+
+```c
+#define IS31FL3737_PWM_FREQUENCY IS31FL3737_PWM_FREQUENCY_8K4_HZ
+```
+
+Valid values are:
+
+|Define |Frequency |
+|----------------------------------|-----------------|
+|`IS31FL3737_PWM_FREQUENCY_8K4_HZ` |8.4 kHz (default)|
+|`IS31FL3737_PWM_FREQUENCY_4K2_HZ` |4.2 kHz |
+|`IS31FL3737_PWM_FREQUENCY_26K7_HZ`|26.7 kHz |
+|`IS31FL3737_PWM_FREQUENCY_2K1_HZ` |2.1 kHz |
+|`IS31FL3737_PWM_FREQUENCY_1K05_HZ`|1.05 kHz |
+
+### De-Ghosting {#de-ghosting}
+
+These settings control the pullup and pulldown resistor values on the `SWy` and `CSx` pins respectively, for the purposes of eliminating ghosting. Refer to the datasheet (p. 23) for more information on how and why this occurs.
+
+To adjust the resistor values, add the following to your `config.h`:
+
+```c
+#define IS31FL3737_SW_PULLUP IS31FL3737_PUR_0_OHM
+#define IS31FL3737_CS_PULLDOWN IS31FL3737_PDR_0_OHM
+```
+
+Valid values for `IS31FL3737_SW_PULLUP` are:
+
+|Define |Resistance |
+|------------------------|--------------|
+|`IS31FL3737_PUR_0_OHM` |None (default)|
+|`IS31FL3737_PUR_0K5_OHM`|0.5 kΩ |
+|`IS31FL3737_PUR_1K_OHM` |1 kΩ |
+|`IS31FL3737_PUR_2K_OHM` |2 kΩ |
+|`IS31FL3737_PUR_4K_OHM` |4 kΩ |
+|`IS31FL3737_PUR_8K_OHM` |8 kΩ |
+|`IS31FL3737_PUR_16K_OHM`|16 kΩ |
+|`IS31FL3737_PUR_32K_OHM`|32 kΩ |
+
+Valid values for `IS31FL3737_CS_PULLDOWN` are:
+
+|Define |Resistance |
+|------------------------|--------------|
+|`IS31FL3737_PDR_0_OHM` |None (default)|
+|`IS31FL3737_PDR_0K5_OHM`|0.5 kΩ |
+|`IS31FL3737_PDR_1K_OHM` |1 kΩ |
+|`IS31FL3737_PDR_2K_OHM` |2 kΩ |
+|`IS31FL3737_PDR_4K_OHM` |4 kΩ |
+|`IS31FL3737_PDR_8K_OHM` |8 kΩ |
+|`IS31FL3737_PDR_16K_OHM`|16 kΩ |
+|`IS31FL3737_PDR_32K_OHM`|32 kΩ |
+
+### Global Current Control {#global-current-control}
+
+This setting controls the current sunk by the `CSx` pins, from 0 to 255. By default, the value is the maximum (255), but if you need to lower it, add the following to your `config.h`:
+
+```c
+#define IS31FL3737_GLOBAL_CURRENT 0xFF
+```
+
+## ARM/ChibiOS Configuration {#arm-configuration}
+
+Depending on the ChibiOS board configuration, you may need to [enable and configure I²C](i2c#arm-configuration) at the keyboard level.
+
+## LED Mapping {#led-mapping}
+
+In order to use this driver, each output must be mapped to an LED index, by adding the following to your `.c`:
+
+```c
+const is31fl3737_led_t PROGMEM g_is31fl3737_leds[IS31FL3737_LED_COUNT] = {
+/* Driver
+ * | R G B */
+ {0, SW1_CS1, SW1_CS2, SW1_CS3},
+ // etc...
+};
+```
+
+In this example, the red, green and blue channels for the first LED index on driver 0 all have their cathodes connected to the `SW1` pin, and their anodes on the `CS1`, `CS2` and `CS3` pins respectively.
+
+For the single-color driver, the principle is the same, but there is only one channel:
+
+```c
+const is31fl3737_led_t PROGMEM g_is31fl3737_leds[IS31FL3737_LED_COUNT] = {
+/* Driver
+ * | V */
+ {0, SW1_CS1},
+ // etc...
+};
+```
+
+These values correspond to the register indices as shown in the datasheet on page 15, figure 9.
+
+## API {#api}
+
+### `struct is31fl3737_led_t` {#api-is31fl3737-led-t}
+
+Contains the PWM register addresses for a single RGB LED.
+
+#### Members {#api-is31fl3737-led-t-members}
+
+ - `uint8_t driver`
+ The driver index of the LED, from 0 to 3.
+ - `uint8_t r`
+ The output PWM register address for the LED's red channel (RGB driver only).
+ - `uint8_t g`
+ The output PWM register address for the LED's green channel (RGB driver only).
+ - `uint8_t b`
+ The output PWM register address for the LED's blue channel (RGB driver only).
+ - `uint8_t v`
+ The output PWM register address for the LED (single-color driver only).
+
+---
+
+### `void is31fl3737_init(uint8_t index)` {#api-is31fl3737-init}
+
+Initialize the LED driver. This function should be called first.
+
+#### Arguments {#api-is31fl3737-init-arguments}
+
+ - `uint8_t index`
+ The driver index.
+
+---
+
+### `void is31fl3737_write_register(uint8_t index, uint8_t reg, uint8_t data)` {#api-is31fl3737-write-register}
+
+Set the value of the given register.
+
+#### Arguments {#api-is31fl3737-write-register-arguments}
+
+ - `uint8_t index`
+ The driver index.
+ - `uint8_t reg`
+ The register address.
+ - `uint8_t data`
+ The value to set.
+
+---
+
+### `void is31fl3737_select_page(uint8_t index, uint8_t page)` {#api-is31fl3737-select-page}
+
+Change the current page for configuring the LED driver.
+
+#### Arguments {#api-is31fl3737-select-page-arguments}
+
+ - `uint8_t index`
+ The driver index.
+ - `uint8_t page`
+ The page number to select.
+
+---
+
+### `void is31fl3737_set_color(int index, uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3737-set-color}
+
+Set the color of a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3737_update_pwm_buffers()` after you are finished.
+
+#### Arguments {#api-is31fl3737-set-color-arguments}
+
+ - `int index`
+ The LED index (ie. the index into the `g_is31fl3737_leds` array).
+ - `uint8_t red`
+ The red value to set.
+ - `uint8_t green`
+ The green value to set.
+ - `uint8_t blue`
+ The blue value to set.
+
+---
+
+### `void is31fl3737_set_color_all(uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3737-set-color-all}
+
+Set the color of all LEDs (RGB driver only).
+
+#### Arguments {#api-is31fl3737-set-color-all-arguments}
+
+ - `uint8_t red`
+ The red value to set.
+ - `uint8_t green`
+ The green value to set.
+ - `uint8_t blue`
+ The blue value to set.
+
+---
+
+### `void is31fl3737_set_value(int index, uint8_t value)` {#api-is31fl3737-set-value}
+
+Set the brightness of a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3737_update_pwm_buffers()` after you are finished.
+
+#### Arguments {#api-is31fl3737-set-value-arguments}
+
+ - `int index`
+ The LED index (ie. the index into the `g_is31fl3737_leds` array).
+ - `uint8_t value`
+ The brightness value to set.
+
+---
+
+### `void is31fl3737_set_value_all(uint8_t value)` {#api-is31fl3737-set-value-all}
+
+Set the brightness of all LEDs (single-color driver only).
+
+#### Arguments {#api-is31fl3737-set-value-all-arguments}
+
+ - `uint8_t value`
+ The brightness value to set.
+
+---
+
+### `void is31fl3737_set_led_control_register(uint8_t index, bool red, bool green, bool blue)` {#api-is31fl3737-set-led-control-register-rgb}
+
+Configure the LED control registers for a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3737_update_led_control_registers()` after you are finished.
+
+#### Arguments {#api-is31fl3737-set-led-control-register-rgb-arguments}
+
+ - `uint8_t index`
+ The LED index (ie. the index into the `g_is31fl3737_leds` array).
+ - `bool red`
+ Enable or disable the red channel.
+ - `bool green`
+ Enable or disable the green channel.
+ - `bool blue`
+ Enable or disable the blue channel.
+
+---
+
+### `void is31fl3737_set_led_control_register(uint8_t index, bool value)` {#api-is31fl3737-set-led-control-register-mono}
+
+Configure the LED control registers for a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3737_update_led_control_registers()` after you are finished.
+
+#### Arguments {#api-is31fl3737-set-led-control-register-mono-arguments}
+
+ - `uint8_t index`
+ The LED index (ie. the index into the `g_is31fl3737_leds` array).
+ - `bool value`
+ Enable or disable the LED.
+
+---
+
+### `void is31fl3737_update_pwm_buffers(uint8_t index)` {#api-is31fl3737-update-pwm-buffers}
+
+Flush the PWM values to the LED driver.
+
+#### Arguments {#api-is31fl3737-update-pwm-buffers-arguments}
+
+ - `uint8_t index`
+ The driver index.
+
+---
+
+### `void is31fl3737_update_led_control_registers(uint8_t index)` {#api-is31fl3737-update-led-control-registers}
+
+Flush the LED control register values to the LED driver.
+
+#### Arguments {#api-is31fl3737-update-led-control-registers-arguments}
+
+ - `uint8_t index`
+ The driver index.
diff --git a/docs/drivers/is31fl3741.md b/docs/drivers/is31fl3741.md
new file mode 100644
index 000000000000..dce5c08b21b7
--- /dev/null
+++ b/docs/drivers/is31fl3741.md
@@ -0,0 +1,310 @@
+# IS31FL3741 Driver {#is31fl3741-driver}
+
+I²C 39x9 LED matrix driver by Lumissil. Supports a maximum of four drivers, each controlling up to 351 single-color LEDs, or 117 RGB LEDs.
+
+[IS31FL3741A Datasheet](https://www.lumissil.com/assets/pdf/core/IS31FL3741A_DS.pdf)
+
+## Usage {#usage}
+
+The IS31FL3741 driver code is automatically included if you are using the [LED Matrix](../features/led_matrix) or [RGB Matrix](../features/rgb_matrix) feature with the `is31fl3741` driver set, and you would use those APIs instead.
+
+However, if you need to use the driver standalone, add this to your `rules.mk`:
+
+```make
+COMMON_VPATH += $(DRIVER_PATH)/led/issi
+SRC += is31fl3741-mono.c # For single-color
+SRC += is31fl3741.c # For RGB
+I2C_DRIVER_REQUIRED = yes
+```
+
+## Basic Configuration {#basic-configuration}
+
+Add the following to your `config.h`:
+
+|Define |Default |Description |
+|----------------------------|---------------------------------|----------------------------------------------------|
+|`IS31FL3741_SDB_PIN` |*Not defined* |The GPIO pin connected to the drivers' shutdown pins|
+|`IS31FL3741_I2C_TIMEOUT` |`100` |The I²C timeout in milliseconds |
+|`IS31FL3741_I2C_PERSISTENCE`|`0` |The number of times to retry I²C transmissions |
+|`IS31FL3741_I2C_ADDRESS_1` |*Not defined* |The I²C address of driver 0 |
+|`IS31FL3741_I2C_ADDRESS_2` |*Not defined* |The I²C address of driver 1 |
+|`IS31FL3741_I2C_ADDRESS_3` |*Not defined* |The I²C address of driver 2 |
+|`IS31FL3741_I2C_ADDRESS_4` |*Not defined* |The I²C address of driver 3 |
+|`IS31FL3741_CONFIGURATION` |`1` |The value of the configuration register |
+|`IS31FL3741_PWM_FREQUENCY` |`IS31FL3741_PWM_FREQUENCY_29K_HZ`|The PWM frequency of the LEDs (IS31FL3741A only) |
+|`IS31FL3741_SW_PULLUP` |`IS31FL3741_PUR_32K_OHM` |The `SWx` pullup resistor value |
+|`IS31FL3741_CS_PULLDOWN` |`IS31FL3741_PDR_32K_OHM` |The `CSx` pulldown resistor value |
+|`IS31FL3741_GLOBAL_CURRENT` |`0xFF` |The global current control value |
+
+### I²C Addressing {#i2c-addressing}
+
+The IS31FL3741 has four possible 7-bit I²C addresses, depending on how the `ADDR` pin is connected.
+
+To configure this, set the `IS31FL3741_I2C_ADDRESS_n` defines to one of the following in your `config.h`, where *n* denotes the driver index:
+
+|Define |Value |
+|----------------------------|------|
+|`IS31FL3741_I2C_ADDRESS_GND`|`0x30`|
+|`IS31FL3741_I2C_ADDRESS_SCL`|`0x31`|
+|`IS31FL3741_I2C_ADDRESS_SDA`|`0x32`|
+|`IS31FL3741_I2C_ADDRESS_VCC`|`0x33`|
+
+### PWM Frequency {#pwm-frequency}
+
+The PWM frequency can be adjusted (for IS31FL3741A only) by adding the following to your `config.h`:
+
+```c
+#define IS31FL3741_PWM_FREQUENCY IS31FL3741_PWM_FREQUENCY_29K_HZ
+```
+
+Valid values are:
+
+|Define |Frequency |
+|---------------------------------|----------------|
+|`IS31FL3741_PWM_FREQUENCY_29K_HZ`|29 kHz (default)|
+|`IS31FL3741_PWM_FREQUENCY_3K6_HZ`|3.6 kHz |
+|`IS31FL3741_PWM_FREQUENCY_1K8_HZ`|1.8 kHz |
+|`IS31FL3741_PWM_FREQUENCY_900_HZ`|900 Hz |
+
+### De-Ghosting {#de-ghosting}
+
+These settings control the pullup and pulldown resistor values on the `CSx` and `SWy` pins respectively, for the purposes of eliminating ghosting. Refer to the datasheet (p. 18) for more information on how and why this occurs.
+
+To adjust the resistor values, add the following to your `config.h`:
+
+```c
+#define IS31FL3741_SW_PULLUP IS31FL3741_PUR_32K_OHM
+#define IS31FL3741_CS_PULLDOWN IS31FL3741_PDR_32K_OHM
+```
+
+Valid values for `IS31FL3741_SW_PULLUP` are:
+
+|Define |Resistance |
+|------------------------|---------------|
+|`IS31FL3741_PUR_0_OHM` |None |
+|`IS31FL3741_PUR_0K5_OHM`|0.5 kΩ |
+|`IS31FL3741_PUR_1K_OHM` |1 kΩ |
+|`IS31FL3741_PUR_2K_OHM` |2 kΩ |
+|`IS31FL3741_PUR_4K_OHM` |4 kΩ |
+|`IS31FL3741_PUR_8K_OHM` |8 kΩ |
+|`IS31FL3741_PUR_16K_OHM`|16 kΩ |
+|`IS31FL3741_PUR_32K_OHM`|32 kΩ (default)|
+
+Valid values for `IS31FL3741_CS_PULLDOWN` are:
+
+|Define |Resistance |
+|------------------------|---------------|
+|`IS31FL3741_PDR_0_OHM` |None |
+|`IS31FL3741_PDR_0K5_OHM`|0.5 kΩ |
+|`IS31FL3741_PDR_1K_OHM` |1 kΩ |
+|`IS31FL3741_PDR_2K_OHM` |2 kΩ |
+|`IS31FL3741_PDR_4K_OHM` |4 kΩ |
+|`IS31FL3741_PDR_8K_OHM` |8 kΩ |
+|`IS31FL3741_PDR_16K_OHM`|16 kΩ |
+|`IS31FL3741_PDR_32K_OHM`|32 kΩ (default)|
+
+### Global Current Control {#global-current-control}
+
+This setting controls the current sunk by the `CSx` pins, from 0 to 255. By default, the value is the maximum (255), but if you need to lower it, add the following to your `config.h`:
+
+```c
+#define IS31FL3741_GLOBAL_CURRENT 0xFF
+```
+
+## ARM/ChibiOS Configuration {#arm-configuration}
+
+Depending on the ChibiOS board configuration, you may need to [enable and configure I²C](i2c#arm-configuration) at the keyboard level.
+
+## LED Mapping {#led-mapping}
+
+In order to use this driver, each output must be mapped to an LED index, by adding the following to your `.c`:
+
+```c
+const is31fl3741_led_t PROGMEM g_is31fl3741_leds[IS31FL3741_LED_COUNT] = {
+/* Driver
+ * | R G B */
+ {0, SW1_CS1, SW1_CS2, SW1_CS3},
+ // etc...
+};
+```
+
+In this example, the red, green and blue channels for the first LED index on driver 0 all have their anodes connected to the `SW1` pin, and their cathodes on the `CS1`, `CS2` and `CS3` pins respectively.
+
+For the single-color driver, the principle is the same, but there is only one channel:
+
+```c
+const is31fl3741_led_t PROGMEM g_is31fl3741_leds[IS31FL3741_LED_COUNT] = {
+/* Driver
+ * | V */
+ {0, SW1_CS1},
+ // etc...
+};
+```
+
+These values correspond to the register indices as shown in the datasheet on page 12, figure 8.
+
+## API {#api}
+
+### `struct is31fl3741_led_t` {#api-is31fl3741-led-t}
+
+Contains the PWM register addresses for a single RGB LED.
+
+#### Members {#api-is31fl3741-led-t-members}
+
+ - `uint32_t driver`
+ The driver index of the LED, from 0 to 3.
+ - `uint32_t r`
+ The output PWM register address for the LED's red channel (RGB driver only).
+ - `uint32_t g`
+ The output PWM register address for the LED's green channel (RGB driver only).
+ - `uint32_t b`
+ The output PWM register address for the LED's blue channel (RGB driver only).
+ - `uint32_t v`
+ The output PWM register address for the LED (single-color driver only).
+
+---
+
+### `void is31fl3741_init(uint8_t index)` {#api-is31fl3741-init}
+
+Initialize the LED driver. This function should be called first.
+
+#### Arguments {#api-is31fl3741-init-arguments}
+
+ - `uint8_t index`
+ The driver index.
+
+---
+
+### `void is31fl3741_write_register(uint8_t index, uint8_t reg, uint8_t data)` {#api-is31fl3741-write-register}
+
+Set the value of the given register.
+
+#### Arguments {#api-is31fl3741-write-register-arguments}
+
+ - `uint8_t index`
+ The driver index.
+ - `uint8_t reg`
+ The register address.
+ - `uint8_t data`
+ The value to set.
+
+---
+
+### `void is31fl3741_select_page(uint8_t index, uint8_t page)` {#api-is31fl3741-select-page}
+
+Change the current page for configuring the LED driver.
+
+#### Arguments {#api-is31fl3741-select-page-arguments}
+
+ - `uint8_t index`
+ The driver index.
+ - `uint8_t page`
+ The page number to select.
+
+---
+
+### `void is31fl3741_set_color(int index, uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3741-set-color}
+
+Set the color of a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3741_update_pwm_buffers()` after you are finished.
+
+#### Arguments {#api-is31fl3741-set-color-arguments}
+
+ - `int index`
+ The LED index (ie. the index into the `g_is31fl3741_leds` array).
+ - `uint8_t red`
+ The red value to set.
+ - `uint8_t green`
+ The green value to set.
+ - `uint8_t blue`
+ The blue value to set.
+
+---
+
+### `void is31fl3741_set_color_all(uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3741-set-color-all}
+
+Set the color of all LEDs (RGB driver only).
+
+#### Arguments {#api-is31fl3741-set-color-all-arguments}
+
+ - `uint8_t red`
+ The red value to set.
+ - `uint8_t green`
+ The green value to set.
+ - `uint8_t blue`
+ The blue value to set.
+
+---
+
+### `void is31fl3741_set_value(int index, uint8_t value)` {#api-is31fl3741-set-value}
+
+Set the brightness of a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3741_update_pwm_buffers()` after you are finished.
+
+#### Arguments {#api-is31fl3741-set-value-arguments}
+
+ - `int index`
+ The LED index (ie. the index into the `g_is31fl3741_leds` array).
+ - `uint8_t value`
+ The brightness value to set.
+
+---
+
+### `void is31fl3741_set_value_all(uint8_t value)` {#api-is31fl3741-set-value-all}
+
+Set the brightness of all LEDs (single-color driver only).
+
+#### Arguments {#api-is31fl3741-set-value-all-arguments}
+
+ - `uint8_t value`
+ The brightness value to set.
+
+---
+
+### `void is31fl3741_set_led_control_register(uint8_t index, bool red, bool green, bool blue)` {#api-is31fl3741-set-led-control-register-rgb}
+
+Configure the LED control registers for a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3741_update_led_control_registers()` after you are finished.
+
+#### Arguments {#api-is31fl3741-set-led-control-register-rgb-arguments}
+
+ - `uint8_t index`
+ The LED index (ie. the index into the `g_is31fl3741_leds` array).
+ - `bool red`
+ Enable or disable the red channel.
+ - `bool green`
+ Enable or disable the green channel.
+ - `bool blue`
+ Enable or disable the blue channel.
+
+---
+
+### `void is31fl3741_set_led_control_register(uint8_t index, bool value)` {#api-is31fl3741-set-led-control-register-mono}
+
+Configure the LED control registers for a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3741_update_led_control_registers()` after you are finished.
+
+#### Arguments {#api-is31fl3741-set-led-control-register-mono-arguments}
+
+ - `uint8_t index`
+ The LED index (ie. the index into the `g_is31fl3741_leds` array).
+ - `bool value`
+ Enable or disable the LED.
+
+---
+
+### `void is31fl3741_update_pwm_buffers(uint8_t index)` {#api-is31fl3741-update-pwm-buffers}
+
+Flush the PWM values to the LED driver.
+
+#### Arguments {#api-is31fl3741-update-pwm-buffers-arguments}
+
+ - `uint8_t index`
+ The driver index.
+
+---
+
+### `void is31fl3741_update_led_control_registers(uint8_t index)` {#api-is31fl3741-update-led-control-registers}
+
+Flush the LED control register values to the LED driver.
+
+#### Arguments {#api-is31fl3741-update-led-control-registers-arguments}
+
+ - `uint8_t index`
+ The driver index.
diff --git a/docs/drivers/is31fl3742a.md b/docs/drivers/is31fl3742a.md
new file mode 100644
index 000000000000..ebe648cba44d
--- /dev/null
+++ b/docs/drivers/is31fl3742a.md
@@ -0,0 +1,310 @@
+# IS31FL3742A Driver {#is31fl3742a-driver}
+
+I²C 30x6 LED matrix driver by Lumissil. Supports a maximum of four drivers, each controlling up to 180 single-color LEDs, or 60 RGB LEDs.
+
+[IS31FL3742A Datasheet](https://www.lumissil.com/assets/pdf/core/IS31FL3742A_DS.pdf)
+
+## Usage {#usage}
+
+The IS31FL3742A driver code is automatically included if you are using the [LED Matrix](../features/led_matrix) or [RGB Matrix](../features/rgb_matrix) feature with the `is31fl3742a` driver set, and you would use those APIs instead.
+
+However, if you need to use the driver standalone, add this to your `rules.mk`:
+
+```make
+COMMON_VPATH += $(DRIVER_PATH)/led/issi
+SRC += is31fl3742a-mono.c # For single-color
+SRC += is31fl3742a.c # For RGB
+I2C_DRIVER_REQUIRED = yes
+```
+
+## Basic Configuration {#basic-configuration}
+
+Add the following to your `config.h`:
+
+|Define |Default |Description |
+|-----------------------------|----------------------------------|----------------------------------------------------|
+|`IS31FL3742A_SDB_PIN` |*Not defined* |The GPIO pin connected to the drivers' shutdown pins|
+|`IS31FL3742A_I2C_TIMEOUT` |`100` |The I²C timeout in milliseconds |
+|`IS31FL3742A_I2C_PERSISTENCE`|`0` |The number of times to retry I²C transmissions |
+|`IS31FL3742A_I2C_ADDRESS_1` |*Not defined* |The I²C address of driver 0 |
+|`IS31FL3742A_I2C_ADDRESS_2` |*Not defined* |The I²C address of driver 1 |
+|`IS31FL3742A_I2C_ADDRESS_3` |*Not defined* |The I²C address of driver 2 |
+|`IS31FL3742A_I2C_ADDRESS_4` |*Not defined* |The I²C address of driver 3 |
+|`IS31FL3742A_CONFIGURATION` |`0x31` |The value of the configuration register |
+|`IS31FL3742A_PWM_FREQUENCY` |`IS31FL3742A_PWM_FREQUENCY_29K_HZ`|The PWM frequency of the LEDs |
+|`IS31FL3742A_SW_PULLDOWN` |`IS31FL3742A_PDR_8K_OHM` |The `SWx` pulldown resistor value |
+|`IS31FL3742A_CS_PULLUP` |`IS31FL3742A_PUR_8K_OHM` |The `CSx` pullup resistor value |
+|`IS31FL3742A_GLOBAL_CURRENT` |`0xFF` |The global current control value |
+
+### I²C Addressing {#i2c-addressing}
+
+The IS31FL3742A has four possible 7-bit I²C addresses, depending on how the `ADDR` pin is connected.
+
+To configure this, set the `IS31FL3742A_I2C_ADDRESS_n` defines to one of the following in your `config.h`, where *n* denotes the driver index:
+
+|Define |Value |
+|-----------------------------|------|
+|`IS31FL3742A_I2C_ADDRESS_GND`|`0x30`|
+|`IS31FL3742A_I2C_ADDRESS_SCL`|`0x31`|
+|`IS31FL3742A_I2C_ADDRESS_SDA`|`0x32`|
+|`IS31FL3742A_I2C_ADDRESS_VCC`|`0x33`|
+
+### PWM Frequency {#pwm-frequency}
+
+The PWM frequency can be adjusted by adding the following to your `config.h`:
+
+```c
+#define IS31FL3742A_PWM_FREQUENCY IS31FL3742A_PWM_FREQUENCY_29K_HZ
+```
+
+Valid values are:
+
+|Define |Frequency |
+|----------------------------------|----------------|
+|`IS31FL3742A_PWM_FREQUENCY_29K_HZ`|29 kHz (default)|
+|`IS31FL3742A_PWM_FREQUENCY_3K6_HZ`|3.6 kHz |
+|`IS31FL3742A_PWM_FREQUENCY_1K8_HZ`|1.8 kHz |
+|`IS31FL3742A_PWM_FREQUENCY_900_HZ`|900 Hz |
+
+### De-Ghosting {#de-ghosting}
+
+These settings control the pulldown and pullup resistor values on the `SWy` and `CSx` pins respectively, for the purposes of eliminating ghosting. Refer to the datasheet (p. 23) for more information on how and why this occurs.
+
+To adjust the resistor values, add the following to your `config.h`:
+
+```c
+#define IS31FL3742A_SW_PULLDOWN IS31FL3742A_PDR_8K_OHM
+#define IS31FL3742A_CS_PULLUP IS31FL3742A_PUR_8K_OHM
+```
+
+Valid values for `IS31FL3742A_SW_PULLDOWN` are:
+
+|Define |Resistance |
+|-------------------------|--------------|
+|`IS31FL3742A_PDR_0_OHM` |None |
+|`IS31FL3742A_PDR_0K5_OHM`|0.5 kΩ |
+|`IS31FL3742A_PDR_1K_OHM` |1 kΩ |
+|`IS31FL3742A_PDR_2K_OHM` |2 kΩ |
+|`IS31FL3742A_PDR_4K_OHM` |4 kΩ |
+|`IS31FL3742A_PDR_8K_OHM` |8 kΩ (default)|
+|`IS31FL3742A_PDR_16K_OHM`|16 kΩ |
+|`IS31FL3742A_PDR_32K_OHM`|32 kΩ |
+
+Valid values for `IS31FL3742A_CS_PULLUP` are:
+
+|Define |Resistance |
+|-------------------------|--------------|
+|`IS31FL3742A_PUR_0_OHM` |None |
+|`IS31FL3742A_PUR_0K5_OHM`|0.5 kΩ |
+|`IS31FL3742A_PUR_1K_OHM` |1 kΩ |
+|`IS31FL3742A_PUR_2K_OHM` |2 kΩ |
+|`IS31FL3742A_PUR_4K_OHM` |4 kΩ |
+|`IS31FL3742A_PUR_8K_OHM` |8 kΩ (default)|
+|`IS31FL3742A_PUR_16K_OHM`|16 kΩ |
+|`IS31FL3742A_PUR_32K_OHM`|32 kΩ |
+
+### Global Current Control {#global-current-control}
+
+This setting controls the current sunk by the `CSx` pins, from 0 to 255. By default, the value is the maximum (255), but if you need to lower it, add the following to your `config.h`:
+
+```c
+#define IS31FL3742A_GLOBAL_CURRENT 0xFF
+```
+
+## ARM/ChibiOS Configuration {#arm-configuration}
+
+Depending on the ChibiOS board configuration, you may need to [enable and configure I²C](i2c#arm-configuration) at the keyboard level.
+
+## LED Mapping {#led-mapping}
+
+In order to use this driver, each output must be mapped to an LED index, by adding the following to your `.c`:
+
+```c
+const is31fl3742a_led_t PROGMEM g_is31fl3742a_leds[IS31FL3742A_LED_COUNT] = {
+/* Driver
+ * | R G B */
+ {0, SW1_CS1, SW1_CS2, SW1_CS3},
+ // etc...
+};
+```
+
+In this example, the red, green and blue channels for the first LED index on driver 0 all have their anodes connected to the `SW1` pin, and their cathodes on the `CS1`, `CS2` and `CS3` pins respectively.
+
+For the single-color driver, the principle is the same, but there is only one channel:
+
+```c
+const is31fl3742a_led_t PROGMEM g_is31fl3742a_leds[IS31FL3742A_LED_COUNT] = {
+/* Driver
+ * | V */
+ {0, SW1_CS1},
+ // etc...
+};
+```
+
+These values correspond to the register indices as shown in the datasheet on page 12, figure 8.
+
+## API {#api}
+
+### `struct is31fl3742a_led_t` {#api-is31fl3742a-led-t}
+
+Contains the PWM register addresses for a single RGB LED.
+
+#### Members {#api-is31fl3742a-led-t-members}
+
+ - `uint8_t driver`
+ The driver index of the LED, from 0 to 3.
+ - `uint8_t r`
+ The output PWM register address for the LED's red channel (RGB driver only).
+ - `uint8_t g`
+ The output PWM register address for the LED's green channel (RGB driver only).
+ - `uint8_t b`
+ The output PWM register address for the LED's blue channel (RGB driver only).
+ - `uint8_t v`
+ The output PWM register address for the LED (single-color driver only).
+
+---
+
+### `void is31fl3742a_init(uint8_t index)` {#api-is31fl3742a-init}
+
+Initialize the LED driver. This function should be called first.
+
+#### Arguments {#api-is31fl3742a-init-arguments}
+
+ - `uint8_t index`
+ The driver index.
+
+---
+
+### `void is31fl3742a_write_register(uint8_t index, uint8_t reg, uint8_t data)` {#api-is31fl3742a-write-register}
+
+Set the value of the given register.
+
+#### Arguments {#api-is31fl3742a-write-register-arguments}
+
+ - `uint8_t index`
+ The driver index.
+ - `uint8_t reg`
+ The register address.
+ - `uint8_t data`
+ The value to set.
+
+---
+
+### `void is31fl3742a_select_page(uint8_t index, uint8_t page)` {#api-is31fl3742a-select-page}
+
+Change the current page for configuring the LED driver.
+
+#### Arguments {#api-is31fl3742a-select-page-arguments}
+
+ - `uint8_t index`
+ The driver index.
+ - `uint8_t page`
+ The page number to select.
+
+---
+
+### `void is31fl3742a_set_color(int index, uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3742a-set-color}
+
+Set the color of a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3742a_update_pwm_buffers()` after you are finished.
+
+#### Arguments {#api-is31fl3742a-set-color-arguments}
+
+ - `int index`
+ The LED index (ie. the index into the `g_is31fl3742a_leds` array).
+ - `uint8_t red`
+ The red value to set.
+ - `uint8_t green`
+ The green value to set.
+ - `uint8_t blue`
+ The blue value to set.
+
+---
+
+### `void is31fl3742a_set_color_all(uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3742a-set-color-all}
+
+Set the color of all LEDs (RGB driver only).
+
+#### Arguments {#api-is31fl3742a-set-color-all-arguments}
+
+ - `uint8_t red`
+ The red value to set.
+ - `uint8_t green`
+ The green value to set.
+ - `uint8_t blue`
+ The blue value to set.
+
+---
+
+### `void is31fl3742a_set_value(int index, uint8_t value)` {#api-is31fl3742a-set-value}
+
+Set the brightness of a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3742a_update_pwm_buffers()` after you are finished.
+
+#### Arguments {#api-is31fl3742a-set-value-arguments}
+
+ - `int index`
+ The LED index (ie. the index into the `g_is31fl3742a_leds` array).
+ - `uint8_t value`
+ The brightness value to set.
+
+---
+
+### `void is31fl3742a_set_value_all(uint8_t value)` {#api-is31fl3742a-set-value-all}
+
+Set the brightness of all LEDs (single-color driver only).
+
+#### Arguments {#api-is31fl3742a-set-value-all-arguments}
+
+ - `uint8_t value`
+ The brightness value to set.
+
+---
+
+### `void is31fl3742a_set_scaling_register(uint8_t index, uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3742a-set-scaling-register-rgb}
+
+Configure the scaling registers for a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3742a_update_scaling_registers()` after you are finished.
+
+#### Arguments {#api-is31fl3742a-set-scaling-register-rgb-arguments}
+
+ - `uint8_t index`
+ The LED index (ie. the index into the `g_is31fl3742a_leds` array).
+ - `uint8_t red`
+ The scaling value for the red channel.
+ - `uint8_t green`
+ The scaling value for the green channel.
+ - `uint8_t blue`
+ The scaling value for the blue channel.
+
+---
+
+### `void is31fl3742a_set_scaling_register(uint8_t index, uint8_t value)` {#api-is31fl3742a-set-scaling-register-mono}
+
+Configure the scaling register for a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3742a_update_scaling_registers()` after you are finished.
+
+#### Arguments {#api-is31fl3742a-set-scaling-register-mono-arguments}
+
+ - `uint8_t index`
+ The LED index (ie. the index into the `g_is31fl3742a_leds` array).
+ - `uint8_t value`
+ The scaling value for the LED.
+
+---
+
+### `void is31fl3742a_update_pwm_buffers(uint8_t index)` {#api-is31fl3742a-update-pwm-buffers}
+
+Flush the PWM values to the LED driver.
+
+#### Arguments {#api-is31fl3742a-update-pwm-buffers-arguments}
+
+ - `uint8_t index`
+ The driver index.
+
+---
+
+### `void is31fl3742a_update_scaling_registers(uint8_t index)` {#api-is31fl3742a-update-scaling-registers}
+
+Flush the scaling register values to the LED driver.
+
+#### Arguments {#api-is31fl3742a-update-scaling-registers-arguments}
+
+ - `uint8_t index`
+ The driver index.
diff --git a/docs/drivers/is31fl3743a.md b/docs/drivers/is31fl3743a.md
new file mode 100644
index 000000000000..9ca55c5eeb04
--- /dev/null
+++ b/docs/drivers/is31fl3743a.md
@@ -0,0 +1,320 @@
+# IS31FL3743A Driver {#is31fl3743a-driver}
+
+I²C 18x11 LED matrix driver by Lumissil. Supports a maximum of four drivers, each controlling up to 198 single-color LEDs, or 66 RGB LEDs.
+
+[IS31FL3743A Datasheet](https://www.lumissil.com/assets/pdf/core/IS31FL3743A_DS.pdf)
+
+## Usage {#usage}
+
+The IS31FL3743A driver code is automatically included if you are using the [LED Matrix](../features/led_matrix) or [RGB Matrix](../features/rgb_matrix) feature with the `is31fl3743a` driver set, and you would use those APIs instead.
+
+However, if you need to use the driver standalone, add this to your `rules.mk`:
+
+```make
+COMMON_VPATH += $(DRIVER_PATH)/led/issi
+SRC += is31fl3743a-mono.c # For single-color
+SRC += is31fl3743a.c # For RGB
+I2C_DRIVER_REQUIRED = yes
+```
+
+## Basic Configuration {#basic-configuration}
+
+Add the following to your `config.h`:
+
+|Define |Default |Description |
+|-----------------------------|-------------------------------|----------------------------------------------------|
+|`IS31FL3743A_SDB_PIN` |*Not defined* |The GPIO pin connected to the drivers' shutdown pins|
+|`IS31FL3743A_I2C_TIMEOUT` |`100` |The I²C timeout in milliseconds |
+|`IS31FL3743A_I2C_PERSISTENCE`|`0` |The number of times to retry I²C transmissions |
+|`IS31FL3743A_I2C_ADDRESS_1` |*Not defined* |The I²C address of driver 0 |
+|`IS31FL3743A_I2C_ADDRESS_2` |*Not defined* |The I²C address of driver 1 |
+|`IS31FL3743A_I2C_ADDRESS_3` |*Not defined* |The I²C address of driver 2 |
+|`IS31FL3743A_I2C_ADDRESS_4` |*Not defined* |The I²C address of driver 3 |
+|`IS31FL3743A_SYNC_1` |`IS31FL3743A_SYNC_NONE` |The sync configuration for driver 0 |
+|`IS31FL3743A_SYNC_2` |`IS31FL3743A_SYNC_NONE` |The sync configuration for driver 1 |
+|`IS31FL3743A_SYNC_3` |`IS31FL3743A_SYNC_NONE` |The sync configuration for driver 2 |
+|`IS31FL3743A_SYNC_4` |`IS31FL3743A_SYNC_NONE` |The sync configuration for driver 3 |
+|`IS31FL3743A_CONFIGURATION` |`0x01` |The value of the configuration register |
+|`IS31FL3743A_SW_PULLDOWN` |`IS31FL3743A_PDR_2K_OHM_SW_OFF`|The `SWx` pulldown resistor value |
+|`IS31FL3743A_CS_PULLUP` |`IS31FL3743A_PUR_2K_OHM_CS_OFF`|The `CSx` pullup resistor value |
+|`IS31FL3743A_GLOBAL_CURRENT` |`0xFF` |The global current control value |
+
+### I²C Addressing {#i2c-addressing}
+
+The IS31FL3743A has 16 possible 7-bit I²C addresses, depending on how the `ADDR1` and `ADDR2` pins are connected.
+
+To configure this, set the `IS31FL3743A_I2C_ADDRESS_n` defines to one of the following in your `config.h`, where *n* denotes the driver index:
+
+|Define |Value |
+|---------------------------------|------|
+|`IS31FL3743A_I2C_ADDRESS_GND_GND`|`0x20`|
+|`IS31FL3743A_I2C_ADDRESS_GND_SCL`|`0x21`|
+|`IS31FL3743A_I2C_ADDRESS_GND_SDA`|`0x22`|
+|`IS31FL3743A_I2C_ADDRESS_GND_VCC`|`0x23`|
+|`IS31FL3743A_I2C_ADDRESS_SCL_GND`|`0x24`|
+|`IS31FL3743A_I2C_ADDRESS_SCL_SCL`|`0x25`|
+|`IS31FL3743A_I2C_ADDRESS_SCL_SDA`|`0x26`|
+|`IS31FL3743A_I2C_ADDRESS_SCL_VCC`|`0x27`|
+|`IS31FL3743A_I2C_ADDRESS_SDA_GND`|`0x28`|
+|`IS31FL3743A_I2C_ADDRESS_SDA_SCL`|`0x29`|
+|`IS31FL3743A_I2C_ADDRESS_SDA_SDA`|`0x2A`|
+|`IS31FL3743A_I2C_ADDRESS_SDA_VCC`|`0x2B`|
+|`IS31FL3743A_I2C_ADDRESS_VCC_GND`|`0x2C`|
+|`IS31FL3743A_I2C_ADDRESS_VCC_SCL`|`0x2D`|
+|`IS31FL3743A_I2C_ADDRESS_VCC_SDA`|`0x2E`|
+|`IS31FL3743A_I2C_ADDRESS_VCC_VCC`|`0x2F`|
+
+### Multi-Driver Synchronization {#multi-driver-synchronization}
+
+Multiple IS31FL3743A drivers can be synchronized by connecting the `SYNC` pins together. One driver must be designated as the "master", and the others configured as "slave".
+
+To do this, set the `IS31FL3743A_SYNC_n` defines accordingly in your `config.h`, where *n* denotes the driver index:
+
+|Define |Value |
+|-------------------------|---------------------------|
+|`IS31FL3743A_SYNC_NONE` |No synchronization |
+|`IS31FL3743A_SYNC_MASTER`|Driver configured as master|
+|`IS31FL3743A_SYNC_SLAVE` |Driver configured as slave |
+
+### De-Ghosting {#de-ghosting}
+
+These settings control the pulldown and pullup resistor values on the `SWy` and `CSx` pins respectively, for the purposes of eliminating ghosting. Refer to the datasheet (p. 23) for more information on how and why this occurs.
+
+To adjust the resistor values, add the following to your `config.h`:
+
+```c
+#define IS31FL3743A_SW_PULLDOWN IS31FL3743A_PDR_2K_OHM_SW_OFF
+#define IS31FL3743A_CS_PULLUP IS31FL3743A_PUR_2K_OHM_CS_OFF
+```
+
+Valid values for `IS31FL3743A_SW_PULLDOWN` are:
+
+|Define |Resistance |
+|--------------------------------|------------------------------|
+|`IS31FL3743A_PDR_0_OHM` |None (default) |
+|`IS31FL3743A_PDR_0K5_OHM_SW_OFF`|0.5 kΩ in SWx off time |
+|`IS31FL3743A_PDR_1K_OHM_SW_OFF` |1 kΩ in SWx off time |
+|`IS31FL3743A_PDR_2K_OHM_SW_OFF` |2 kΩ in SWx off time (default)|
+|`IS31FL3743A_PDR_1K_OHM` |1 kΩ |
+|`IS31FL3743A_PDR_2K_OHM` |2 kΩ |
+|`IS31FL3743A_PDR_4K_OHM` |4 kΩ |
+|`IS31FL3743A_PDR_8K_OHM` |8 kΩ |
+
+Valid values for `IS31FL3743A_CS_PULLUP` are:
+
+|Define |Resistance |
+|--------------------------------|------------------------------|
+|`IS31FL3743A_PUR_0_OHM` |None (default) |
+|`IS31FL3743A_PUR_0K5_OHM_CS_OFF`|0.5 kΩ in CSy off time |
+|`IS31FL3743A_PUR_1K_OHM_CS_OFF` |1 kΩ in CSy off time |
+|`IS31FL3743A_PUR_2K_OHM_CS_OFF` |2 kΩ in CSy off time (default)|
+|`IS31FL3743A_PUR_1K_OHM` |1 kΩ |
+|`IS31FL3743A_PUR_2K_OHM` |2 kΩ |
+|`IS31FL3743A_PUR_4K_OHM` |4 kΩ |
+|`IS31FL3743A_PUR_8K_OHM` |8 kΩ |
+
+### Global Current Control {#global-current-control}
+
+This setting controls the current sunk by the `CSy` pins, from 0 to 255. By default, the value is the maximum (255), but if you need to lower it, add the following to your `config.h`:
+
+```c
+#define IS31FL3743A_GLOBAL_CURRENT 0xFF
+```
+
+## ARM/ChibiOS Configuration {#arm-configuration}
+
+Depending on the ChibiOS board configuration, you may need to [enable and configure I²C](i2c#arm-configuration) at the keyboard level.
+
+## LED Mapping {#led-mapping}
+
+In order to use this driver, each output must be mapped to an LED index, by adding the following to your `.c`:
+
+```c
+const is31fl3743a_led_t PROGMEM g_is31fl3743a_leds[IS31FL3743A_LED_COUNT] = {
+/* Driver
+ * | R G B */
+ {0, SW1_CS1, SW1_CS2, SW1_CS3},
+ // etc...
+};
+```
+
+In this example, the red, green and blue channels for the first LED index on driver 0 all have their anodes connected to the `SW1` pin, and their cathodes on the `CS1`, `CS2` and `CS3` pins respectively.
+
+For the single-color driver, the principle is the same, but there is only one channel:
+
+```c
+const is31fl3743a_led_t PROGMEM g_is31fl3743a_leds[IS31FL3743A_LED_COUNT] = {
+/* Driver
+ * | V */
+ {0, SW1_CS1},
+ // etc...
+};
+```
+
+These values correspond to the register indices as shown in the datasheet on page 12, figure 8.
+
+## API {#api}
+
+### `struct is31fl3743a_led_t` {#api-is31fl3743a-led-t}
+
+Contains the PWM register addresses for a single RGB LED.
+
+#### Members {#api-is31fl3743a-led-t-members}
+
+ - `uint8_t driver`
+ The driver index of the LED, from 0 to 3.
+ - `uint8_t r`
+ The output PWM register address for the LED's red channel (RGB driver only).
+ - `uint8_t g`
+ The output PWM register address for the LED's green channel (RGB driver only).
+ - `uint8_t b`
+ The output PWM register address for the LED's blue channel (RGB driver only).
+ - `uint8_t v`
+ The output PWM register address for the LED (single-color driver only).
+
+---
+
+### `void is31fl3743a_init(uint8_t index)` {#api-is31fl3743a-init}
+
+Initialize the LED driver. This function should be called first.
+
+#### Arguments {#api-is31fl3743a-init-arguments}
+
+ - `uint8_t index`
+ The driver index.
+
+---
+
+### `void is31fl3743a_write_register(uint8_t index, uint8_t reg, uint8_t data)` {#api-is31fl3743a-write-register}
+
+Set the value of the given register.
+
+#### Arguments {#api-is31fl3743a-write-register-arguments}
+
+ - `uint8_t index`
+ The driver index.
+ - `uint8_t reg`
+ The register address.
+ - `uint8_t data`
+ The value to set.
+
+---
+
+### `void is31fl3743a_select_page(uint8_t index, uint8_t page)` {#api-is31fl3743a-select-page}
+
+Change the current page for configuring the LED driver.
+
+#### Arguments {#api-is31fl3743a-select-page-arguments}
+
+ - `uint8_t index`
+ The driver index.
+ - `uint8_t page`
+ The page number to select.
+
+---
+
+### `void is31fl3743a_set_color(int index, uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3743a-set-color}
+
+Set the color of a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3743a_update_pwm_buffers()` after you are finished.
+
+#### Arguments {#api-is31fl3743a-set-color-arguments}
+
+ - `int index`
+ The LED index (ie. the index into the `g_is31fl3743a_leds` array).
+ - `uint8_t red`
+ The red value to set.
+ - `uint8_t green`
+ The green value to set.
+ - `uint8_t blue`
+ The blue value to set.
+
+---
+
+### `void is31fl3743a_set_color_all(uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3743a-set-color-all}
+
+Set the color of all LEDs (RGB driver only).
+
+#### Arguments {#api-is31fl3743a-set-color-all-arguments}
+
+ - `uint8_t red`
+ The red value to set.
+ - `uint8_t green`
+ The green value to set.
+ - `uint8_t blue`
+ The blue value to set.
+
+---
+
+### `void is31fl3743a_set_value(int index, uint8_t value)` {#api-is31fl3743a-set-value}
+
+Set the brightness of a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3743a_update_pwm_buffers()` after you are finished.
+
+#### Arguments {#api-is31fl3743a-set-value-arguments}
+
+ - `int index`
+ The LED index (ie. the index into the `g_is31fl3743a_leds` array).
+ - `uint8_t value`
+ The brightness value to set.
+
+---
+
+### `void is31fl3743a_set_value_all(uint8_t value)` {#api-is31fl3743a-set-value-all}
+
+Set the brightness of all LEDs (single-color driver only).
+
+#### Arguments {#api-is31fl3743a-set-value-all-arguments}
+
+ - `uint8_t value`
+ The brightness value to set.
+
+---
+
+### `void is31fl3743a_set_scaling_register(uint8_t index, uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3743a-set-scaling-register-rgb}
+
+Configure the scaling registers for a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3743a_update_scaling_registers()` after you are finished.
+
+#### Arguments {#api-is31fl3743a-set-scaling-register-rgb-arguments}
+
+ - `uint8_t index`
+ The LED index (ie. the index into the `g_is31fl3743a_leds` array).
+ - `uint8_t red`
+ The scaling value for the red channel.
+ - `uint8_t green`
+ The scaling value for the green channel.
+ - `uint8_t blue`
+ The scaling value for the blue channel.
+
+---
+
+### `void is31fl3743a_set_scaling_register(uint8_t index, uint8_t value)` {#api-is31fl3743a-set-scaling-register-mono}
+
+Configure the scaling register for a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3743a_update_scaling_registers()` after you are finished.
+
+#### Arguments {#api-is31fl3743a-set-scaling-register-mono-arguments}
+
+ - `uint8_t index`
+ The LED index (ie. the index into the `g_is31fl3743a_leds` array).
+ - `uint8_t value`
+ The scaling value for the LED.
+
+---
+
+### `void is31fl3743a_update_pwm_buffers(uint8_t index)` {#api-is31fl3743a-update-pwm-buffers}
+
+Flush the PWM values to the LED driver.
+
+#### Arguments {#api-is31fl3743a-update-pwm-buffers-arguments}
+
+ - `uint8_t index`
+ The driver index.
+
+---
+
+### `void is31fl3743a_update_scaling_registers(uint8_t index)` {#api-is31fl3743a-update-scaling-registers}
+
+Flush the scaling register values to the LED driver.
+
+#### Arguments {#api-is31fl3743a-update-scaling-registers-arguments}
+
+ - `uint8_t index`
+ The driver index.
diff --git a/docs/drivers/is31fl3745.md b/docs/drivers/is31fl3745.md
new file mode 100644
index 000000000000..f13f029bfedf
--- /dev/null
+++ b/docs/drivers/is31fl3745.md
@@ -0,0 +1,320 @@
+# IS31FL3745 Driver {#is31fl3745-driver}
+
+I²C 18x8 LED matrix driver by Lumissil. Supports a maximum of four drivers, each controlling up to 144 single-color LEDs, or 48 RGB LEDs.
+
+[IS31FL3745 Datasheet](https://www.lumissil.com/assets/pdf/core/IS31FL3745_DS.pdf)
+
+## Usage {#usage}
+
+The IS31FL3745 driver code is automatically included if you are using the [LED Matrix](../features/led_matrix) or [RGB Matrix](../features/rgb_matrix) feature with the `is31fl3745` driver set, and you would use those APIs instead.
+
+However, if you need to use the driver standalone, add this to your `rules.mk`:
+
+```make
+COMMON_VPATH += $(DRIVER_PATH)/led/issi
+SRC += is31fl3745-mono.c # For single-color
+SRC += is31fl3745.c # For RGB
+I2C_DRIVER_REQUIRED = yes
+```
+
+## Basic Configuration {#basic-configuration}
+
+Add the following to your `config.h`:
+
+|Define |Default |Description |
+|----------------------------|------------------------------|----------------------------------------------------|
+|`IS31FL3745_SDB_PIN` |*Not defined* |The GPIO pin connected to the drivers' shutdown pins|
+|`IS31FL3745_I2C_TIMEOUT` |`100` |The I²C timeout in milliseconds |
+|`IS31FL3745_I2C_PERSISTENCE`|`0` |The number of times to retry I²C transmissions |
+|`IS31FL3745_I2C_ADDRESS_1` |*Not defined* |The I²C address of driver 0 |
+|`IS31FL3745_I2C_ADDRESS_2` |*Not defined* |The I²C address of driver 1 |
+|`IS31FL3745_I2C_ADDRESS_3` |*Not defined* |The I²C address of driver 2 |
+|`IS31FL3745_I2C_ADDRESS_4` |*Not defined* |The I²C address of driver 3 |
+|`IS31FL3745_SYNC_1` |`IS31FL3745_SYNC_NONE` |The sync configuration for driver 0 |
+|`IS31FL3745_SYNC_2` |`IS31FL3745_SYNC_NONE` |The sync configuration for driver 1 |
+|`IS31FL3745_SYNC_3` |`IS31FL3745_SYNC_NONE` |The sync configuration for driver 2 |
+|`IS31FL3745_SYNC_4` |`IS31FL3745_SYNC_NONE` |The sync configuration for driver 3 |
+|`IS31FL3745_CONFIGURATION` |`0x31` |The value of the configuration register |
+|`IS31FL3745_SW_PULLDOWN` |`IS31FL3745_PDR_2K_OHM_SW_OFF`|The `SWx` pulldown resistor value |
+|`IS31FL3745_CS_PULLUP` |`IS31FL3745_PUR_2K_OHM_CS_OFF`|The `CSx` pullup resistor value |
+|`IS31FL3745_GLOBAL_CURRENT` |`0xFF` |The global current control value |
+
+### I²C Addressing {#i2c-addressing}
+
+The IS31FL3745 has 16 possible 7-bit I²C addresses, depending on how the `ADDR1` and `ADDR2` pins are connected.
+
+To configure this, set the `IS31FL3745_I2C_ADDRESS_n` defines to one of the following in your `config.h`, where *n* denotes the driver index:
+
+|Define |Value |
+|--------------------------------|------|
+|`IS31FL3745_I2C_ADDRESS_GND_GND`|`0x20`|
+|`IS31FL3745_I2C_ADDRESS_GND_SCL`|`0x21`|
+|`IS31FL3745_I2C_ADDRESS_GND_SDA`|`0x22`|
+|`IS31FL3745_I2C_ADDRESS_GND_VCC`|`0x23`|
+|`IS31FL3745_I2C_ADDRESS_SCL_GND`|`0x24`|
+|`IS31FL3745_I2C_ADDRESS_SCL_SCL`|`0x25`|
+|`IS31FL3745_I2C_ADDRESS_SCL_SDA`|`0x26`|
+|`IS31FL3745_I2C_ADDRESS_SCL_VCC`|`0x27`|
+|`IS31FL3745_I2C_ADDRESS_SDA_GND`|`0x28`|
+|`IS31FL3745_I2C_ADDRESS_SDA_SCL`|`0x29`|
+|`IS31FL3745_I2C_ADDRESS_SDA_SDA`|`0x2A`|
+|`IS31FL3745_I2C_ADDRESS_SDA_VCC`|`0x2B`|
+|`IS31FL3745_I2C_ADDRESS_VCC_GND`|`0x2C`|
+|`IS31FL3745_I2C_ADDRESS_VCC_SCL`|`0x2D`|
+|`IS31FL3745_I2C_ADDRESS_VCC_SDA`|`0x2E`|
+|`IS31FL3745_I2C_ADDRESS_VCC_VCC`|`0x2F`|
+
+### Multi-Driver Synchronization {#multi-driver-synchronization}
+
+Multiple IS31FL3745 drivers can be synchronized by connecting the `SYNC` pins together. One driver must be designated as the "master", and the others configured as "slave".
+
+To do this, set the `IS31FL3745_SYNC_n` defines accordingly in your `config.h`, where *n* denotes the driver index:
+
+|Define |Value |
+|------------------------|---------------------------|
+|`IS31FL3745_SYNC_NONE` |No synchronization |
+|`IS31FL3745_SYNC_MASTER`|Driver configured as master|
+|`IS31FL3745_SYNC_SLAVE` |Driver configured as slave |
+
+### De-Ghosting {#de-ghosting}
+
+These settings control the pulldown and pullup resistor values on the `SWy` and `CSx` pins respectively, for the purposes of eliminating ghosting. Refer to the datasheet (p. 23) for more information on how and why this occurs.
+
+To adjust the resistor values, add the following to your `config.h`:
+
+```c
+#define IS31FL3745_SW_PULLDOWN IS31FL3745_PDR_2K_OHM_SW_OFF
+#define IS31FL3745_CS_PULLUP IS31FL3745_PUR_2K_OHM_CS_OFF
+```
+
+Valid values for `IS31FL3745_SW_PULLDOWN` are:
+
+|Define |Resistance |
+|-------------------------------|------------------------------|
+|`IS31FL3745_PDR_0_OHM` |None (default) |
+|`IS31FL3745_PDR_0K5_OHM_SW_OFF`|0.5 kΩ in SWx off time |
+|`IS31FL3745_PDR_1K_OHM_SW_OFF` |1 kΩ in SWx off time |
+|`IS31FL3745_PDR_2K_OHM_SW_OFF` |2 kΩ in SWx off time (default)|
+|`IS31FL3745_PDR_1K_OHM` |1 kΩ |
+|`IS31FL3745_PDR_2K_OHM` |2 kΩ |
+|`IS31FL3745_PDR_4K_OHM` |4 kΩ |
+|`IS31FL3745_PDR_8K_OHM` |8 kΩ |
+
+Valid values for `IS31FL3745_CS_PULLUP` are:
+
+|Define |Resistance |
+|-------------------------------|------------------------------|
+|`IS31FL3745_PUR_0_OHM` |None (default) |
+|`IS31FL3745_PUR_0K5_OHM_CS_OFF`|0.5 kΩ in CSy off time |
+|`IS31FL3745_PUR_1K_OHM_CS_OFF` |1 kΩ in CSy off time |
+|`IS31FL3745_PUR_2K_OHM_CS_OFF` |2 kΩ in CSy off time (default)|
+|`IS31FL3745_PUR_1K_OHM` |1 kΩ |
+|`IS31FL3745_PUR_2K_OHM` |2 kΩ |
+|`IS31FL3745_PUR_4K_OHM` |4 kΩ |
+|`IS31FL3745_PUR_8K_OHM` |8 kΩ |
+
+### Global Current Control {#global-current-control}
+
+This setting controls the current sunk by the `CSy` pins, from 0 to 255. By default, the value is the maximum (255), but if you need to lower it, add the following to your `config.h`:
+
+```c
+#define IS31FL3745_GLOBAL_CURRENT 0xFF
+```
+
+## ARM/ChibiOS Configuration {#arm-configuration}
+
+Depending on the ChibiOS board configuration, you may need to [enable and configure I²C](i2c#arm-configuration) at the keyboard level.
+
+## LED Mapping {#led-mapping}
+
+In order to use this driver, each output must be mapped to an LED index, by adding the following to your `.c`:
+
+```c
+const is31fl3745_led_t PROGMEM g_is31fl3745_leds[IS31FL3745_LED_COUNT] = {
+/* Driver
+ * | R G B */
+ {0, SW1_CS1, SW1_CS2, SW1_CS3},
+ // etc...
+};
+```
+
+In this example, the red, green and blue channels for the first LED index on driver 0 all have their anodes connected to the `SW1` pin, and their cathodes on the `CS1`, `CS2` and `CS3` pins respectively.
+
+For the single-color driver, the principle is the same, but there is only one channel:
+
+```c
+const is31fl3745_led_t PROGMEM g_is31fl3745_leds[IS31FL3745_LED_COUNT] = {
+/* Driver
+ * | V */
+ {0, SW1_CS1},
+ // etc...
+};
+```
+
+These values correspond to the register indices as shown in the datasheet on page 12, figure 9.
+
+## API {#api}
+
+### `struct is31fl3745_led_t` {#api-is31fl3745-led-t}
+
+Contains the PWM register addresses for a single RGB LED.
+
+#### Members {#api-is31fl3745-led-t-members}
+
+ - `uint8_t driver`
+ The driver index of the LED, from 0 to 3.
+ - `uint8_t r`
+ The output PWM register address for the LED's red channel (RGB driver only).
+ - `uint8_t g`
+ The output PWM register address for the LED's green channel (RGB driver only).
+ - `uint8_t b`
+ The output PWM register address for the LED's blue channel (RGB driver only).
+ - `uint8_t v`
+ The output PWM register address for the LED (single-color driver only).
+
+---
+
+### `void is31fl3745_init(uint8_t index)` {#api-is31fl3745-init}
+
+Initialize the LED driver. This function should be called first.
+
+#### Arguments {#api-is31fl3745-init-arguments}
+
+ - `uint8_t index`
+ The driver index.
+
+---
+
+### `void is31fl3745_write_register(uint8_t index, uint8_t reg, uint8_t data)` {#api-is31fl3745-write-register}
+
+Set the value of the given register.
+
+#### Arguments {#api-is31fl3745-write-register-arguments}
+
+ - `uint8_t index`
+ The driver index.
+ - `uint8_t reg`
+ The register address.
+ - `uint8_t data`
+ The value to set.
+
+---
+
+### `void is31fl3745_select_page(uint8_t index, uint8_t page)` {#api-is31fl3745-select-page}
+
+Change the current page for configuring the LED driver.
+
+#### Arguments {#api-is31fl3745-select-page-arguments}
+
+ - `uint8_t index`
+ The driver index.
+ - `uint8_t page`
+ The page number to select.
+
+---
+
+### `void is31fl3745_set_color(int index, uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3745-set-color}
+
+Set the color of a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3745_update_pwm_buffers()` after you are finished.
+
+#### Arguments {#api-is31fl3745-set-color-arguments}
+
+ - `int index`
+ The LED index (ie. the index into the `g_is31fl3745_leds` array).
+ - `uint8_t red`
+ The red value to set.
+ - `uint8_t green`
+ The green value to set.
+ - `uint8_t blue`
+ The blue value to set.
+
+---
+
+### `void is31fl3745_set_color_all(uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3745-set-color-all}
+
+Set the color of all LEDs (RGB driver only).
+
+#### Arguments {#api-is31fl3745-set-color-all-arguments}
+
+ - `uint8_t red`
+ The red value to set.
+ - `uint8_t green`
+ The green value to set.
+ - `uint8_t blue`
+ The blue value to set.
+
+---
+
+### `void is31fl3745_set_value(int index, uint8_t value)` {#api-is31fl3745-set-value}
+
+Set the brightness of a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3745_update_pwm_buffers()` after you are finished.
+
+#### Arguments {#api-is31fl3745-set-value-arguments}
+
+ - `int index`
+ The LED index (ie. the index into the `g_is31fl3745_leds` array).
+ - `uint8_t value`
+ The brightness value to set.
+
+---
+
+### `void is31fl3745_set_value_all(uint8_t value)` {#api-is31fl3745-set-value-all}
+
+Set the brightness of all LEDs (single-color driver only).
+
+#### Arguments {#api-is31fl3745-set-value-all-arguments}
+
+ - `uint8_t value`
+ The brightness value to set.
+
+---
+
+### `void is31fl3745_set_scaling_register(uint8_t index, uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3745-set-scaling-register-rgb}
+
+Configure the scaling registers for a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3745_update_scaling_registers()` after you are finished.
+
+#### Arguments {#api-is31fl3745-set-scaling-register-rgb-arguments}
+
+ - `uint8_t index`
+ The LED index (ie. the index into the `g_is31fl3745_leds` array).
+ - `uint8_t red`
+ The scaling value for the red channel.
+ - `uint8_t green`
+ The scaling value for the green channel.
+ - `uint8_t blue`
+ The scaling value for the blue channel.
+
+---
+
+### `void is31fl3745_set_scaling_register(uint8_t index, uint8_t value)` {#api-is31fl3745-set-scaling-register-mono}
+
+Configure the scaling register for a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3745_update_scaling_registers()` after you are finished.
+
+#### Arguments {#api-is31fl3745-set-scaling-register-mono-arguments}
+
+ - `uint8_t index`
+ The LED index (ie. the index into the `g_is31fl3745_leds` array).
+ - `uint8_t value`
+ The scaling value for the LED.
+
+---
+
+### `void is31fl3745_update_pwm_buffers(uint8_t index)` {#api-is31fl3745-update-pwm-buffers}
+
+Flush the PWM values to the LED driver.
+
+#### Arguments {#api-is31fl3745-update-pwm-buffers-arguments}
+
+ - `uint8_t index`
+ The driver index.
+
+---
+
+### `void is31fl3745_update_scaling_registers(uint8_t index)` {#api-is31fl3745-update-scaling-registers}
+
+Flush the scaling register values to the LED driver.
+
+#### Arguments {#api-is31fl3745-update-scaling-registers-arguments}
+
+ - `uint8_t index`
+ The driver index.
diff --git a/docs/drivers/is31fl3746a.md b/docs/drivers/is31fl3746a.md
new file mode 100644
index 000000000000..bdd5c1835778
--- /dev/null
+++ b/docs/drivers/is31fl3746a.md
@@ -0,0 +1,327 @@
+# IS31FL3746A Driver {#is31fl3746a-driver}
+
+I²C 18x4 LED matrix driver by Lumissil. Supports a maximum of four drivers, each controlling up to 72 single-color LEDs, or 24 RGB LEDs.
+
+[IS31FL3746A Datasheet](https://www.lumissil.com/assets/pdf/core/IS31FL3746A_DS.pdf)
+
+## Usage {#usage}
+
+The IS31FL3746A driver code is automatically included if you are using the [LED Matrix](../features/led_matrix) or [RGB Matrix](../features/rgb_matrix) feature with the `is31fl3746a` driver set, and you would use those APIs instead.
+
+However, if you need to use the driver standalone, add this to your `rules.mk`:
+
+```make
+COMMON_VPATH += $(DRIVER_PATH)/led/issi
+SRC += is31fl3746a-mono.c # For single-color
+SRC += is31fl3746a.c # For RGB
+I2C_DRIVER_REQUIRED = yes
+```
+
+## Basic Configuration {#basic-configuration}
+
+Add the following to your `config.h`:
+
+|Define |Default |Description |
+|-----------------------------|----------------------------------|----------------------------------------------------|
+|`IS31FL3746A_SDB_PIN` |*Not defined* |The GPIO pin connected to the drivers' shutdown pins|
+|`IS31FL3746A_I2C_TIMEOUT` |`100` |The I²C timeout in milliseconds |
+|`IS31FL3746A_I2C_PERSISTENCE`|`0` |The number of times to retry I²C transmissions |
+|`IS31FL3746A_I2C_ADDRESS_1` |*Not defined* |The I²C address of driver 0 |
+|`IS31FL3746A_I2C_ADDRESS_2` |*Not defined* |The I²C address of driver 1 |
+|`IS31FL3746A_I2C_ADDRESS_3` |*Not defined* |The I²C address of driver 2 |
+|`IS31FL3746A_I2C_ADDRESS_4` |*Not defined* |The I²C address of driver 3 |
+|`IS31FL3746A_CONFIGURATION` |`0x01` |The value of the configuration register |
+|`IS31FL3746A_PWM_FREQUENCY` |`IS31FL3746A_PWM_FREQUENCY_29K_HZ`|The PWM frequency of the LEDs |
+|`IS31FL3746A_SW_PULLDOWN` |`IS31FL3746A_PDR_2K_OHM_SW_OFF` |The `SWx` pulldown resistor value |
+|`IS31FL3746A_CS_PULLUP` |`IS31FL3746A_PUR_2K_OHM_CS_OFF` |The `CSx` pullup resistor value |
+|`IS31FL3746A_GLOBAL_CURRENT` |`0xFF` |The global current control value |
+
+### I²C Addressing {#i2c-addressing}
+
+The IS31FL3746A has 16 possible 7-bit I²C addresses, depending on how the `ADDR1` and `ADDR2` pins are connected.
+
+To configure this, set the `IS31FL3746A_I2C_ADDRESS_n` defines to one of the following in your `config.h`, where *n* denotes the driver index:
+
+|Define |Value |
+|---------------------------------|------|
+|`IS31FL3746A_I2C_ADDRESS_GND_GND`|`0x60`|
+|`IS31FL3746A_I2C_ADDRESS_GND_SCL`|`0x61`|
+|`IS31FL3746A_I2C_ADDRESS_GND_SDA`|`0x62`|
+|`IS31FL3746A_I2C_ADDRESS_GND_VCC`|`0x63`|
+|`IS31FL3746A_I2C_ADDRESS_SCL_GND`|`0x64`|
+|`IS31FL3746A_I2C_ADDRESS_SCL_SCL`|`0x65`|
+|`IS31FL3746A_I2C_ADDRESS_SCL_SDA`|`0x66`|
+|`IS31FL3746A_I2C_ADDRESS_SCL_VCC`|`0x67`|
+|`IS31FL3746A_I2C_ADDRESS_SDA_GND`|`0x68`|
+|`IS31FL3746A_I2C_ADDRESS_SDA_SCL`|`0x69`|
+|`IS31FL3746A_I2C_ADDRESS_SDA_SDA`|`0x6A`|
+|`IS31FL3746A_I2C_ADDRESS_SDA_VCC`|`0x6B`|
+|`IS31FL3746A_I2C_ADDRESS_VCC_GND`|`0x6C`|
+|`IS31FL3746A_I2C_ADDRESS_VCC_SCL`|`0x6D`|
+|`IS31FL3746A_I2C_ADDRESS_VCC_SDA`|`0x6E`|
+|`IS31FL3746A_I2C_ADDRESS_VCC_VCC`|`0x6F`|
+
+### PWM Frequency {#pwm-frequency}
+
+The PWM frequency can be adjusted by adding the following to your `config.h`:
+
+```c
+#define IS31FL3746A_PWM_FREQUENCY IS31FL3746A_PWM_FREQUENCY_29K_HZ
+```
+
+Valid values are:
+
+|Define |Frequency |
+|-----------------------------------|----------------|
+|`IS31FL3746A_PWM_FREQUENCY_29K_HZ` |29 kHz (default)|
+|`IS31FL3746A_PWM_FREQUENCY_14K5_HZ`|14.5 kHz |
+|`IS31FL3746A_PWM_FREQUENCY_7K25_HZ`|7.25 kHz |
+|`IS31FL3746A_PWM_FREQUENCY_3K63_HZ`|3.63 kHz |
+|`IS31FL3746A_PWM_FREQUENCY_1K81_HZ`|1.81 kHz |
+|`IS31FL3746A_PWM_FREQUENCY_906_HZ` |906 Hz |
+|`IS31FL3746A_PWM_FREQUENCY_453_HZ` |453 Hz |
+
+### De-Ghosting {#de-ghosting}
+
+These settings control the pulldown and pullup resistor values on the `SWy` and `CSx` pins respectively, for the purposes of eliminating ghosting. Refer to the datasheet (p. 23) for more information on how and why this occurs.
+
+To adjust the resistor values, add the following to your `config.h`:
+
+```c
+#define IS31FL3746A_SW_PULLDOWN IS31FL3746A_PDR_2K_OHM_SW_OFF
+#define IS31FL3746A_CS_PULLUP IS31FL3746A_PUR_2K_OHM_CS_OFF
+```
+
+Valid values for `IS31FL3746A_SW_PULLDOWN` are:
+
+|Define |Resistance |
+|--------------------------------|------------------------------|
+|`IS31FL3746A_PDR_0_OHM` |None |
+|`IS31FL3746A_PDR_0K5_OHM_SW_OFF`|0.5 kΩ in SWx off time |
+|`IS31FL3746A_PDR_1K_OHM_SW_OFF` |1 kΩ in SWx off time |
+|`IS31FL3746A_PDR_2K_OHM_SW_OFF` |2 kΩ in SWx off time (default)|
+|`IS31FL3746A_PDR_1K_OHM` |1 kΩ |
+|`IS31FL3746A_PDR_2K_OHM` |2 kΩ |
+|`IS31FL3746A_PDR_4K_OHM` |4 kΩ |
+|`IS31FL3746A_PDR_8K_OHM` |8 kΩ |
+
+Valid values for `IS31FL3746A_CS_PULLUP` are:
+
+|Define |Resistance |
+|--------------------------------|------------------------------|
+|`IS31FL3746A_PUR_0_OHM` |None (default) |
+|`IS31FL3746A_PUR_0K5_OHM_CS_OFF`|0.5 kΩ in CSy off time |
+|`IS31FL3746A_PUR_1K_OHM_CS_OFF` |1 kΩ in CSy off time |
+|`IS31FL3746A_PUR_2K_OHM_CS_OFF` |2 kΩ in CSy off time (default)|
+|`IS31FL3746A_PUR_1K_OHM` |1 kΩ |
+|`IS31FL3746A_PUR_2K_OHM` |2 kΩ |
+|`IS31FL3746A_PUR_4K_OHM` |4 kΩ |
+|`IS31FL3746A_PUR_8K_OHM` |8 kΩ |
+
+### Global Current Control {#global-current-control}
+
+This setting controls the current sunk by the `CSy` pins, from 0 to 255. By default, the value is the maximum (255), but if you need to lower it, add the following to your `config.h`:
+
+```c
+#define IS31FL3746A_GLOBAL_CURRENT 0xFF
+```
+
+## ARM/ChibiOS Configuration {#arm-configuration}
+
+Depending on the ChibiOS board configuration, you may need to [enable and configure I²C](i2c#arm-configuration) at the keyboard level.
+
+## LED Mapping {#led-mapping}
+
+In order to use this driver, each output must be mapped to an LED index, by adding the following to your `.c`:
+
+```c
+const is31fl3746a_led_t PROGMEM g_is31fl3746a_leds[IS31FL3746A_LED_COUNT] = {
+/* Driver
+ * | R G B */
+ {0, SW1_CS1, SW1_CS2, SW1_CS3},
+ // etc...
+};
+```
+
+In this example, the red, green and blue channels for the first LED index on driver 0 all have their anodes connected to the `SW1` pin, and their cathodes on the `CS1`, `CS2` and `CS3` pins respectively.
+
+For the single-color driver, the principle is the same, but there is only one channel:
+
+```c
+const is31fl3746a_led_t PROGMEM g_is31fl3746a_leds[IS31FL3746A_LED_COUNT] = {
+/* Driver
+ * | V */
+ {0, SW1_CS1},
+ // etc...
+};
+```
+
+These values correspond to the register indices as shown in the datasheet on page 13, figure 8.
+
+## API {#api}
+
+### `struct is31fl3746a_led_t` {#api-is31fl3746a-led-t}
+
+Contains the PWM register addresses for a single RGB LED.
+
+#### Members {#api-is31fl3746a-led-t-members}
+
+ - `uint8_t driver`
+ The driver index of the LED, from 0 to 3.
+ - `uint8_t r`
+ The output PWM register address for the LED's red channel (RGB driver only).
+ - `uint8_t g`
+ The output PWM register address for the LED's green channel (RGB driver only).
+ - `uint8_t b`
+ The output PWM register address for the LED's blue channel (RGB driver only).
+ - `uint8_t v`
+ The output PWM register address for the LED (single-color driver only).
+
+---
+
+### `void is31fl3746a_init(uint8_t index)` {#api-is31fl3746a-init}
+
+Initialize the LED driver. This function should be called first.
+
+#### Arguments {#api-is31fl3746a-init-arguments}
+
+ - `uint8_t index`
+ The driver index.
+ - `uint8_t sync`
+ Sync configuration of the LED driver.
+
+---
+
+### `void is31fl3746a_write_register(uint8_t index, uint8_t reg, uint8_t data)` {#api-is31fl3746a-write-register}
+
+Set the value of the given register.
+
+#### Arguments {#api-is31fl3746a-write-register-arguments}
+
+ - `uint8_t index`
+ The driver index.
+ - `uint8_t reg`
+ The register address.
+ - `uint8_t data`
+ The value to set.
+
+---
+
+### `void is31fl3746a_select_page(uint8_t index, uint8_t page)` {#api-is31fl3746a-select-page}
+
+Change the current page for configuring the LED driver.
+
+#### Arguments {#api-is31fl3746a-select-page-arguments}
+
+ - `uint8_t index`
+ The driver index.
+ - `uint8_t page`
+ The page number to select.
+
+---
+
+### `void is31fl3746a_set_color(int index, uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3746a-set-color}
+
+Set the color of a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3746a_update_pwm_buffers()` after you are finished.
+
+#### Arguments {#api-is31fl3746a-set-color-arguments}
+
+ - `int index`
+ The LED index (ie. the index into the `g_is31fl3746a_leds` array).
+ - `uint8_t red`
+ The red value to set.
+ - `uint8_t green`
+ The green value to set.
+ - `uint8_t blue`
+ The blue value to set.
+
+---
+
+### `void is31fl3746a_set_color_all(uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3746a-set-color-all}
+
+Set the color of all LEDs (RGB driver only).
+
+#### Arguments {#api-is31fl3746a-set-color-all-arguments}
+
+ - `uint8_t red`
+ The red value to set.
+ - `uint8_t green`
+ The green value to set.
+ - `uint8_t blue`
+ The blue value to set.
+
+---
+
+### `void is31fl3746a_set_value(int index, uint8_t value)` {#api-is31fl3746a-set-value}
+
+Set the brightness of a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3746a_update_pwm_buffers()` after you are finished.
+
+#### Arguments {#api-is31fl3746a-set-value-arguments}
+
+ - `int index`
+ The LED index (ie. the index into the `g_is31fl3746a_leds` array).
+ - `uint8_t value`
+ The brightness value to set.
+
+---
+
+### `void is31fl3746a_set_value_all(uint8_t value)` {#api-is31fl3746a-set-value-all}
+
+Set the brightness of all LEDs (single-color driver only).
+
+#### Arguments {#api-is31fl3746a-set-value-all-arguments}
+
+ - `uint8_t value`
+ The brightness value to set.
+
+---
+
+### `void is31fl3746a_set_scaling_register(uint8_t index, uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3746a-set-scaling-register-rgb}
+
+Configure the scaling registers for a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3746a_update_scaling_registers()` after you are finished.
+
+#### Arguments {#api-is31fl3746a-set-scaling-register-rgb-arguments}
+
+ - `uint8_t index`
+ The LED index (ie. the index into the `g_is31fl3746a_leds` array).
+ - `uint8_t red`
+ The scaling value for the red channel.
+ - `uint8_t green`
+ The scaling value for the green channel.
+ - `uint8_t blue`
+ The scaling value for the blue channel.
+
+---
+
+### `void is31fl3746a_set_scaling_register(uint8_t index, uint8_t value)` {#api-is31fl3746a-set-scaling-register-mono}
+
+Configure the scaling register for a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3746a_update_scaling_registers()` after you are finished.
+
+#### Arguments {#api-is31fl3746a-set-scaling-register-mono-arguments}
+
+ - `uint8_t index`
+ The LED index (ie. the index into the `g_is31fl3746a_leds` array).
+ - `uint8_t value`
+ The scaling value for the LED.
+
+---
+
+### `void is31fl3746a_update_pwm_buffers(uint8_t index)` {#api-is31fl3746a-update-pwm-buffers}
+
+Flush the PWM values to the LED driver.
+
+#### Arguments {#api-is31fl3746a-update-pwm-buffers-arguments}
+
+ - `uint8_t index`
+ The driver index.
+
+---
+
+### `void is31fl3746a_update_scaling_registers(uint8_t index)` {#api-is31fl3746a-update-scaling-registers}
+
+Flush the scaling register values to the LED driver.
+
+#### Arguments {#api-is31fl3746a-update-scaling-registers-arguments}
+
+ - `uint8_t index`
+ The driver index.
diff --git a/docs/drivers/serial.md b/docs/drivers/serial.md
index 364e951b8698..dda75f629a27 100644
--- a/docs/drivers/serial.md
+++ b/docs/drivers/serial.md
@@ -1,6 +1,6 @@
# 'serial' Driver
-The Serial driver powers the [Split Keyboard](../features/split_keyboard) feature. Several implementations are available that cater to the platform and capabilites of MCU in use. Note that none of the drivers support split keyboards with more than two halves.
+The Serial driver powers the [Split Keyboard](../features/split_keyboard) feature. Several implementations are available that cater to the platform and capabilities of MCU in use. Note that none of the drivers support split keyboards with more than two halves.
| Driver | AVR | ARM | Connection between halves |
| --------------------------------------- | ------------------ | ------------------ | --------------------------------------------------------------------------------------------- |
@@ -12,8 +12,6 @@ The Serial driver powers the [Split Keyboard](../features/split_keyboard) featur
Serial in this context should be read as **sending information one bit at a time**, rather than implementing UART/USART/RS485/RS232 standards.
:::
-
-
## Bitbang
This is the Default driver, absence of configuration assumes this driver. It works by [bit banging](https://en.wikipedia.org/wiki/Bit_banging) a GPIO pin using the CPU. It is therefore not as efficient as a dedicated hardware peripheral, which the Half-duplex and Full-duplex drivers use.
@@ -53,11 +51,15 @@ SERIAL_DRIVER = bitbang
#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
```
-3. On ARM platforms you must turn on ChibiOS `PAL_USE_CALLBACKS` feature:
+3. On ARM platforms you must turn on ChibiOS PAL callbacks:
-* In `halconf.h` add the line `#define PAL_USE_CALLBACKS TRUE`.
+```c
+#pragma once
-
+#define PAL_USE_CALLBACKS TRUE // [!code focus]
+
+#include_next
+```
## USART Half-duplex
@@ -117,8 +119,6 @@ For STM32 MCUs several GPIO configuration options can be changed as well. See th
4. Decide either for `SERIAL`, `SIO`, or `PIO` subsystem. See section ["Choosing a driver subsystem"](#choosing-a-driver-subsystem).
-
-
## USART Full-duplex
Targeting ARM boards based on ChibiOS where communication is offloaded to an USART hardware device. The advantages over bitbanging are fast, accurate timings and reduced CPU usage; therefore it is advised to choose this driver over all others where possible. Due to its internal design Full-duplex is slightly more efficient than the Half-duplex driver, but Full-duplex should be primarily chosen if Half-duplex operation is not supported by the controller's USART peripheral.
@@ -179,38 +179,46 @@ For STM32 MCUs several GPIO configuration options, including the ability for `TX
4. Decide either for `SERIAL`, `SIO`, or `PIO` subsystem. See section ["Choosing a driver subsystem"](#choosing-a-driver-subsystem).
-
-
## Choosing a driver subsystem
### The `SERIAL` driver
The `SERIAL` Subsystem is supported for the majority of ChibiOS MCUs and should be used whenever supported. Follow these steps in order to activate it:
-1. In your keyboards `halconf.h` add:
+1. Enable the SERIAL subsystem in the ChibiOS HAL.
-```c
-#define HAL_USE_SERIAL TRUE
-```
+ Add the following to your keyboard's `halconf.h`, creating it if necessary:
-2. In your keyboards `mcuconf.h`: activate the USART peripheral that is used on your MCU. The shown example is for an STM32 MCU, so this will not work on MCUs by other manufacturers. You can find the correct names in the `mcuconf.h` files of your MCU that ship with ChibiOS.
-
-Just below `#include_next ` add:
+ ```c
+ #pragma once
-```c
-#include_next
+ #define HAL_USE_SERIAL TRUE // [!code focus]
-#undef STM32_SERIAL_USE_USARTn
-#define STM32_SERIAL_USE_USARTn TRUE
-```
+ #include_next
+ ```
-Where 'n' matches the peripheral number of your selected USART on the MCU.
+2. Activate the USART peripheral that is used on your MCU. The shown example is for an STM32 MCU, so this will not work on MCUs by other manufacturers. You can find the correct names in the `mcuconf.h` files of your MCU that ship with ChibiOS.
-3. In you keyboards `config.h`: override the default USART `SERIAL` driver if you use a USART peripheral that does not belong to the default selected `SD1` driver. For instance, if you selected `STM32_SERIAL_USE_USART3` the matching driver would be `SD3`.
+ Add the following to your keyboard's `mcuconf.h`, creating it if necessary:
-```c
- #define SERIAL_USART_DRIVER SD3
- ```
+ ```c
+ #pragma once
+
+ #include_next
+
+ #undef STM32_SERIAL_USE_USARTn // [!code focus]
+ #define STM32_SERIAL_USE_USARTn TRUE // [!code focus]
+ ```
+
+ Where *n* matches the peripheral number of your selected USART on the MCU.
+
+3. Override the default USART `SERIAL` driver if you use a USART peripheral that does not belong to the default selected `SD1` driver. For instance, if you selected `STM32_SERIAL_USE_USART3` the matching driver would be `SD3`.
+
+ Add the following to your keyboard's `config.h`:
+
+ ```c
+ #define SERIAL_USART_DRIVER SD3
+ ```
### The `SIO` driver
@@ -218,31 +226,41 @@ The `SIO` Subsystem was added to ChibiOS with the 21.11 release and is only supp
Follow these steps in order to activate it:
-1. In your keyboards `halconf.h` add:
+1. Enable the SIO subsystem in the ChibiOS HAL.
-```c
-#define HAL_USE_SIO TRUE
-```
+ Add the following to your keyboard's `halconf.h`, creating it if necessary:
-2. In your keyboards `mcuconf.h:` activate the USART peripheral that is used on your MCU. The shown example is for an STM32 MCU, so this will not work on MCUs by other manufacturers. You can find the correct names in the `mcuconf.h` files of your MCU that ship with ChibiOS.
-
-Just below `#include_next ` add:
+ ```c
+ #pragma once
-```c
-#include_next
+ #define HAL_USE_SIO TRUE // [!code focus]
-#undef STM32_SIO_USE_USARTn
-#define STM32_SIO_USE_USARTn TRUE
-```
+ #include_next
+ ```
-Where 'n' matches the peripheral number of your selected USART on the MCU.
+2. Activate the USART peripheral that is used on your MCU. The shown example is for an STM32 MCU, so this will not work on MCUs by other manufacturers. You can find the correct names in the `mcuconf.h` files of your MCU that ship with ChibiOS.
-3. In the keyboard's `config.h` file: override the default USART `SIO` driver if you use a USART peripheral that does not belong to the default selected `SIOD1` driver. For instance, if you selected `STM32_SERIAL_USE_USART3` the matching driver would be `SIOD3`.
+ Add the following to your keyboard's `mcuconf.h`, creating it if necessary:
+
+ ```c
+ #pragma once
+
+ #include_next
+
+ #undef STM32_SIO_USE_USARTn // [!code focus]
+ #define STM32_SIO_USE_USARTn TRUE // [!code focus]
+ ```
+
+ Where *n* matches the peripheral number of your selected USART on the MCU.
+
+3. Override the default USART `SIO` driver if you use a USART peripheral that does not belong to the default selected `SIOD1` driver. For instance, if you selected `STM32_SERIAL_USE_USART3` the matching driver would be `SIOD3`.
+
+ Add the following to your keyboard's `config.h`:
+
+ ```c
+ #define SERIAL_USART_DRIVER SIOD3
+ ```
-```c
- #define SERIAL_USART_DRIVER SIOD3
- ```
-
### The `PIO` driver
The `PIO` subsystem is a Raspberry Pi RP2040 specific implementation, using an integrated PIO peripheral and is therefore only available on this MCU. Because of the flexible nature of PIO peripherals, **any** GPIO pin can be used as a `TX` or `RX` pin. Half-duplex and Full-duplex operation modes are fully supported with this driver. Half-duplex uses the built-in pull-ups and GPIO manipulation of the RP2040 to drive the line high by default, thus an external pull-up resistor **is not required**.
@@ -254,8 +272,6 @@ Optionally, the PIO peripheral utilized for split communication can be changed w
The Serial PIO program uses 2 state machines, 13 instructions and the complete interrupt handler of the PIO peripheral it is running on.
-
-
## Advanced Configuration
There are several advanced configuration options that can be defined in your keyboards `config.h` file:
@@ -265,9 +281,11 @@ There are several advanced configuration options that can be defined in your key
If you're having issues or need a higher baudrate with serial communication, you can change the baudrate which in turn controls the communication speed for serial. You want to lower the baudrate if you experience failed transactions.
```c
-#define SELECT_SOFT_SERIAL_SPEED {#}
+#define SELECT_SOFT_SERIAL_SPEED n
```
+Where *n* is one of:
+
| Speed | Bitbang | Half-duplex and Full-duplex |
| ----- | -------------------------- | --------------------------- |
| `0` | 189000 baud (experimental) | 460800 baud |
@@ -287,8 +305,6 @@ This is the default time window in milliseconds in which a successful communicat
#define SERIAL_USART_TIMEOUT 20 // USART driver timeout. default 20
```
-
-
## Troubleshooting
If you're having issues withe serial communication, you can enable debug messages that will give you insights which part of the communication failed. The enable these messages add to your keyboards `config.h` file:
diff --git a/docs/drivers/snled27351.md b/docs/drivers/snled27351.md
new file mode 100644
index 000000000000..1d91182f7c38
--- /dev/null
+++ b/docs/drivers/snled27351.md
@@ -0,0 +1,245 @@
+# SNLED27351 Driver {#snled27351-driver}
+
+I²C 16x12 LED matrix driver by Sonix. Supports a maximum of four drivers, each controlling up to 192 single-color LEDs, or 64 RGB LEDs.
+
+A slightly modified version of this IC is also known as "CKLED2001".
+
+[SNLED27351 Datasheet](https://www.sonix.com.tw/files/1/D235860C0C037C28E050007F01001CBE)
+
+## Usage {#usage}
+
+The SNLED27351 driver code is automatically included if you are using the [LED Matrix](../features/led_matrix) or [RGB Matrix](../features/rgb_matrix) feature with the `snled27351` driver set, and you would use those APIs instead.
+
+However, if you need to use the driver standalone, add this to your `rules.mk`:
+
+```make
+COMMON_VPATH += $(DRIVER_PATH)/led
+SRC += snled27351-mono.c # For single-color
+SRC += snled27351.c # For RGB
+I2C_DRIVER_REQUIRED = yes
+```
+
+## Basic Configuration {#basic-configuration}
+
+Add the following to your `config.h`:
+
+|Define |Default |Description |
+|----------------------------|-------------|----------------------------------------------------|
+|`SNLED27351_SDB_PIN` |*Not defined*|The GPIO pin connected to the drivers' shutdown pins|
+|`SNLED27351_I2C_TIMEOUT` |`100` |The I²C timeout in milliseconds |
+|`SNLED27351_I2C_PERSISTENCE`|`0` |The number of times to retry I²C transmissions |
+|`SNLED27351_I2C_ADDRESS_1` |*Not defined*|The I²C address of driver 0 |
+|`SNLED27351_I2C_ADDRESS_2` |*Not defined*|The I²C address of driver 1 |
+|`SNLED27351_I2C_ADDRESS_3` |*Not defined*|The I²C address of driver 2 |
+|`SNLED27351_I2C_ADDRESS_4` |*Not defined*|The I²C address of driver 3 |
+
+### I²C Addressing {#i2c-addressing}
+
+The SNLED27351 has four possible 7-bit I²C addresses, depending on how the `ADDR` pin is connected.
+
+To configure this, set the `SNLED27351_I2C_ADDRESS_n` defines to one of the following in your `config.h`, where *n* denotes the driver index:
+
+|Define |Value |
+|------------------------------|------|
+|`SNLED27351_I2C_ADDRESS_GND` |`0x74`|
+|`SNLED27351_I2C_ADDRESS_SCL` |`0x75`|
+|`SNLED27351_I2C_ADDRESS_SDA` |`0x76`|
+|`SNLED27351_I2C_ADDRESS_VDDIO`|`0x77`|
+
+## ARM/ChibiOS Configuration {#arm-configuration}
+
+Depending on the ChibiOS board configuration, you may need to [enable and configure I²C](i2c#arm-configuration) at the keyboard level.
+
+## LED Mapping {#led-mapping}
+
+In order to use this driver, each output must be mapped to an LED index, by adding the following to your `.c`:
+
+```c
+const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = {
+/* Driver
+ * | R G B */
+ {0, CB1_CA1, CB1_CA2, CB1_CA3},
+ // etc...
+};
+```
+
+In this example, the red, green and blue channels for the first LED index on driver 0 all have their cathodes connected to the `CB1` pin, and their anodes on the `CA1`, `CA2` and `CA3` pins respectively.
+
+For the single-color driver, the principle is the same, but there is only one channel:
+
+```c
+const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = {
+/* Driver
+ * | V */
+ {0, CB1_CA1},
+ // etc...
+};
+```
+
+These values correspond to the register indices as shown in the datasheet on page 13.
+
+## API {#api}
+
+### `struct snled27351_led_t` {#api-snled27351-led-t}
+
+Contains the PWM register addresses for a single RGB LED.
+
+#### Members {#api-snled27351-led-t-members}
+
+ - `uint8_t driver`
+ The driver index of the LED, from 0 to 3.
+ - `uint8_t r`
+ The output PWM register address for the LED's red channel (RGB driver only).
+ - `uint8_t g`
+ The output PWM register address for the LED's green channel (RGB driver only).
+ - `uint8_t b`
+ The output PWM register address for the LED's blue channel (RGB driver only).
+ - `uint8_t v`
+ The output PWM register address for the LED (single-color driver only).
+
+---
+
+### `void snled27351_init(uint8_t index)` {#api-snled27351-init}
+
+Initialize the LED driver. This function should be called first.
+
+#### Arguments {#api-snled27351-init-arguments}
+
+ - `uint8_t index`
+ The driver index.
+
+---
+
+### `void snled27351_write_register(uint8_t index, uint8_t reg, uint8_t data)` {#api-snled27351-write-register}
+
+Set the value of the given register.
+
+#### Arguments {#api-snled27351-write-register-arguments}
+
+ - `uint8_t index`
+ The driver index.
+ - `uint8_t reg`
+ The register address.
+ - `uint8_t data`
+ The value to set.
+
+---
+
+### `void snled27351_select_page(uint8_t index, uint8_t page)` {#api-snled27351-select-page}
+
+Change the current page for configuring the LED driver.
+
+#### Arguments {#api-snled27351-select-page-arguments}
+
+ - `uint8_t index`
+ The driver index.
+ - `uint8_t page`
+ The page number to select.
+
+---
+
+### `void snled27351_set_color(int index, uint8_t red, uint8_t green, uint8_t blue)` {#api-snled27351-set-color}
+
+Set the color of a single LED (RGB driver only). This function does not immediately update the LEDs; call `snled27351_update_pwm_buffers()` after you are finished.
+
+#### Arguments {#api-snled27351-set-color-arguments}
+
+ - `int index`
+ The LED index (ie. the index into the `g_snled27351_leds` array).
+ - `uint8_t red`
+ The red value to set.
+ - `uint8_t green`
+ The green value to set.
+ - `uint8_t blue`
+ The blue value to set.
+
+---
+
+### `void snled27351_set_color_all(uint8_t red, uint8_t green, uint8_t blue)` {#api-snled27351-set-color-all}
+
+Set the color of all LEDs (RGB driver only).
+
+#### Arguments {#api-snled27351-set-color-all-arguments}
+
+ - `uint8_t red`
+ The red value to set.
+ - `uint8_t green`
+ The green value to set.
+ - `uint8_t blue`
+ The blue value to set.
+
+---
+
+### `void snled27351_set_value(int index, uint8_t value)` {#api-snled27351-set-value}
+
+Set the brightness of a single LED (single-color driver only). This function does not immediately update the LEDs; call `snled27351_update_pwm_buffers()` after you are finished.
+
+#### Arguments {#api-snled27351-set-value-arguments}
+
+ - `int index`
+ The LED index (ie. the index into the `g_snled27351_leds` array).
+ - `uint8_t value`
+ The brightness value to set.
+
+---
+
+### `void snled27351_set_value_all(uint8_t value)` {#api-snled27351-set-value-all}
+
+Set the brightness of all LEDs (single-color driver only).
+
+#### Arguments {#api-snled27351-set-value-all-arguments}
+
+ - `uint8_t value`
+ The brightness value to set.
+
+---
+
+### `void snled27351_set_led_control_register(uint8_t index, bool red, bool green, bool blue)` {#api-snled27351-set-led-control-register-rgb}
+
+Configure the LED control registers for a single LED (RGB driver only). This function does not immediately update the LEDs; call `snled27351_update_led_control_registers()` after you are finished.
+
+#### Arguments {#api-snled27351-set-led-control-register-rgb-arguments}
+
+ - `uint8_t index`
+ The LED index (ie. the index into the `g_snled27351_leds` array).
+ - `bool red`
+ Enable or disable the red channel.
+ - `bool green`
+ Enable or disable the green channel.
+ - `bool blue`
+ Enable or disable the blue channel.
+
+---
+
+### `void snled27351_set_led_control_register(uint8_t index, bool value)` {#api-snled27351-set-led-control-register-mono}
+
+Configure the LED control registers for a single LED (single-color driver only). This function does not immediately update the LEDs; call `snled27351_update_led_control_registers()` after you are finished.
+
+#### Arguments {#api-snled27351-set-led-control-register-mono-arguments}
+
+ - `uint8_t index`
+ The LED index (ie. the index into the `g_snled27351_leds` array).
+ - `bool value`
+ Enable or disable the LED.
+
+---
+
+### `void snled27351_update_pwm_buffers(uint8_t index)` {#api-snled27351-update-pwm-buffers}
+
+Flush the PWM values to the LED driver.
+
+#### Arguments {#api-snled27351-update-pwm-buffers-arguments}
+
+ - `uint8_t index`
+ The driver index.
+
+---
+
+### `void snled27351_update_led_control_registers(uint8_t index)` {#api-snled27351-update-led-control-registers}
+
+Flush the LED control register values to the LED driver.
+
+#### Arguments {#api-snled27351-update-led-control-registers-arguments}
+
+ - `uint8_t index`
+ The driver index.
diff --git a/docs/drivers/spi.md b/docs/drivers/spi.md
index ddc35de8511a..43d2a056d5db 100644
--- a/docs/drivers/spi.md
+++ b/docs/drivers/spi.md
@@ -32,20 +32,27 @@ You may use more than one slave select pin, not just the `SS` pin. This is usefu
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.
-To enable SPI, modify your board's `halconf.h` to enable SPI:
+To enable SPI, modify your board's `halconf.h` to enable SPI, then modify your board's `mcuconf.h` to enable the peripheral you've chosen:
-```c
-#define HAL_USE_SPI TRUE
-#define SPI_USE_WAIT TRUE
-#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
+::: code-group
+```c [halconf.h]
+#pragma once
+
+#define HAL_USE_SPI TRUE // [!code focus]
+#define SPI_USE_WAIT TRUE // [!code focus]
+#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD // [!code focus]
+
+#include_next
```
+```c [mcuconf.h]
+#pragma once
-Then, modify your board's `mcuconf.h` to enable the peripheral you've chosen, for example:
+#include_next
-```c
-#undef STM32_SPI_USE_SPI2
-#define STM32_SPI_USE_SPI2 TRUE
+#undef STM32_SPI_USE_SPI2 // [!code focus]
+#define STM32_SPI_USE_SPI2 TRUE // [!code focus]
```
+:::
Configuration-wise, you'll need to set up the peripheral as per your MCU's datasheet -- the defaults match the pins for a Proton-C, i.e. STM32F303.
diff --git a/docs/drivers/uart.md b/docs/drivers/uart.md
index 23f5b3d6e431..7cc68727eec1 100644
--- a/docs/drivers/uart.md
+++ b/docs/drivers/uart.md
@@ -35,8 +35,12 @@ You'll need to determine which pins can be used for UART -- as an example, STM32
To enable UART, modify your board's `mcuconf.h` to enable the peripheral you've chosen, for example:
```c
-#undef STM32_SERIAL_USE_USART2
-#define STM32_SERIAL_USE_USART2 TRUE
+#pragma once
+
+#include_next
+
+#undef STM32_SERIAL_USE_USART2 // [!code focus]
+#define STM32_SERIAL_USE_USART2 TRUE // [!code focus]
```
Configuration-wise, you'll need to set up the peripheral as per your MCU's datasheet -- the defaults match the pins for a Proton-C, i.e. STM32F303.
diff --git a/docs/drivers/ws2812.md b/docs/drivers/ws2812.md
index 61addf1917ed..4d1e72792818 100644
--- a/docs/drivers/ws2812.md
+++ b/docs/drivers/ws2812.md
@@ -160,15 +160,23 @@ To configure the DI pin for open drain configuration, add the following to your
Depending on the ChibiOS board configuration, you may need to enable SPI at the keyboard level. For STM32, this would look like:
-`halconf.h`:
-```c
-#define HAL_USE_SPI TRUE
+::: code-group
+```c [halconf.h]
+#pragma once
+
+#define HAL_USE_SPI TRUE // [!code focus]
+
+#include_next
```
-`mcuconf.h`:
-```c
-#undef STM32_SPI_USE_SPI1
-#define STM32_SPI_USE_SPI1 TRUE
+```c [mcuconf.h]
+#pragma once
+
+#include_next
+
+#undef STM32_SPI_USE_SPI1 // [!code focus]
+#define STM32_SPI_USE_SPI1 TRUE // [!code focus]
```
+:::
The following `define`s apply only to the `spi` driver:
@@ -213,15 +221,23 @@ The following `#define`s apply only to the PIO driver:
Depending on the ChibiOS board configuration, you may need to enable PWM at the keyboard level. For STM32, this would look like:
-`halconf.h`:
-```c
-#define HAL_USE_PWM TRUE
+::: code-group
+```c [halconf.h]
+#pragma once
+
+#define HAL_USE_PWM TRUE // [!code focus]
+
+#include_next
```
-`mcuconf.h`:
-```c
-#undef STM32_PWM_USE_TIM2
-#define STM32_PWM_USE_TIM2 TRUE
+```c [mcuconf.h]
+#pragma once
+
+#include_next
+
+#undef STM32_PWM_USE_TIM2 // [!code focus]
+#define STM32_PWM_USE_TIM2 TRUE // [!code focus]
```
+:::
The following `#define`s apply only to the `pwm` driver:
@@ -236,18 +252,49 @@ The following `#define`s apply only to the `pwm` driver:
|`WS2812_PWM_COMPLEMENTARY_OUTPUT`|*Not defined* |Whether the PWM output is complementary (`TIMx_CHyN`) |
::: tip
-Using a complementary timer output (`TIMx_CHyN`) is possible only for advanced-control timers (1, 8 and 20 on STM32), and the `STM32_PWM_USE_ADVANCED` option in `mcuconf.h` must be set to `TRUE`. Complementary outputs of general-purpose timers are not supported due to ChibiOS limitations.
+Using a complementary timer output (`TIMx_CHyN`) is possible only for advanced-control timers (1, 8 and 20 on STM32). Complementary outputs of general-purpose timers are not supported due to ChibiOS limitations.
:::
## API {#api}
-### `void ws2812_setleds(rgb_led_t *ledarray, uint16_t number_of_leds)` {#api-ws2812-setleds}
+### `void ws2812_init(void)` {#api-ws2812-init}
+
+Initialize the LED driver. This function should be called first.
+
+---
+
+### `void ws2812_set_color(int index, uint8_t red, uint8_t green, uint8_t blue)` {#api-ws2812-set-color}
+
+Set the color of a single LED. This function does not immediately update the LEDs; call `ws2812_flush()` after you are finished.
+
+#### Arguments {#api-ws2812-set-color-arguments}
+
+ - `int index`
+ The LED index in the WS2812 chain.
+ - `uint8_t red`
+ The red value to set.
+ - `uint8_t green`
+ The green value to set.
+ - `uint8_t blue`
+ The blue value to set.
+
+---
+
+### `void ws812_set_color_all(uint8_t red, uint8_t green, uint8_t blue)` {#api-ws2812-set-color-all}
+
+Set the color of all LEDs.
+
+#### Arguments {#api-ws2812-set-color-all-arguments}
+
+ - `uint8_t red`
+ The red value to set.
+ - `uint8_t green`
+ The green value to set.
+ - `uint8_t blue`
+ The blue value to set.
-Send RGB data to the WS2812 LED chain.
+---
-#### Arguments {#api-ws2812-setleds-arguments}
+### `void ws2812_flush(void)` {#api-ws2812-flush}
- - `rgb_led_t *ledarray`
- A pointer to the LED array.
- - `uint16_t number_of_leds`
- The length of the LED array.
+Flush the PWM values to the LED chain.
diff --git a/docs/faq_debug.md b/docs/faq_debug.md
index 36374974dfd0..35a4160e2765 100644
--- a/docs/faq_debug.md
+++ b/docs/faq_debug.md
@@ -129,7 +129,7 @@ needed for older distros.
## Can't Get Message on Console
Check:
- *hid_listen* finds your device. See above.
-- Enable debug by pressing **Magic**+d. See [Magic Commands](https://github.com/tmk/tmk_keyboard#magic-commands).
+- Enable debug by pressing **Magic**+d. See [Magic Commands](https://github.com/tmk/tmk_keyboard/wiki#magic-commands-for-debug).
- Set `debug_enable=true`. See [Debugging](#debugging)
- Try using `print` function instead of debug print. See **common/print.h**.
- Disconnect other devices with console function. See [Issue #97](https://github.com/tmk/tmk_keyboard/issues/97).
diff --git a/docs/faq_general.md b/docs/faq_general.md
index 69ef4efa17b4..fe26dc3806fd 100644
--- a/docs/faq_general.md
+++ b/docs/faq_general.md
@@ -40,7 +40,7 @@ That's amazing! We would love to assist you with that!
In fact, we have a [whole page](https://qmk.fm/powered/) dedicated to adding QMK Branding to your page and keyboard. This covers pretty much everything you need (knowledge and images) to officially support QMK.
-If you have any questions about this, open an issue or head to [Discord](https://discord.gg/Uq7gcHh).
+If you have any questions about this, open an issue or head to [Discord](https://discord.gg/qmk).
## What Differences Are There Between QMK and TMK?
diff --git a/docs/faq_keymap.md b/docs/faq_keymap.md
index 56ccc6f6ccf5..05bd4fed3e4a 100644
--- a/docs/faq_keymap.md
+++ b/docs/faq_keymap.md
@@ -34,7 +34,7 @@ On first run, the VIA code in the firmware will copy the keymap from flash memor
The simple fix for this is to clear the EEPROM. You can do this in several ways:
-* Hold the Bootmagic Lite key (usually top left/Escape) while plugging the board in, which will also place the board into bootloader mode; then unplug and replug the board.
+* Hold the Bootmagic key (usually top left/Escape) while plugging the board in, which will also place the board into bootloader mode; then unplug and replug the board.
* Press the `QK_CLEAR_EEPROM`/`EE_CLR` keycode if it is accessible on your keymap.
* Place the board into bootloader mode and hit the "Clear EEPROM" button. This may not be available for all bootloaders, and you may need to reflash the board afterwards.
diff --git a/docs/feature_advanced_keycodes.md b/docs/feature_advanced_keycodes.md
index 7f5a10d1c13d..18740044f435 100644
--- a/docs/feature_advanced_keycodes.md
+++ b/docs/feature_advanced_keycodes.md
@@ -11,7 +11,7 @@ These allow you to combine a modifier with a keycode. When pressed, the keydown
|`RCTL(kc)`| |Hold Right Control and press `kc` |
|`RSFT(kc)`| |Hold Right Shift and press `kc` |
|`RALT(kc)`|`ROPT(kc)`, `ALGR(kc)` |Hold Right Alt and press `kc` |
-|`RGUI(kc)`|`RCMD(kc)`, `LWIN(kc)` |Hold Right GUI and press `kc` |
+|`RGUI(kc)`|`RCMD(kc)`, `RWIN(kc)` |Hold Right GUI and press `kc` |
|`LSG(kc)` |`SGUI(kc)`, `SCMD(kc)`, `SWIN(kc)`|Hold Left Shift and GUI and press `kc` |
|`LAG(kc)` | |Hold Left Alt and Left GUI and press `kc` |
|`RSG(kc)` | |Hold Right Shift and Right GUI and press `kc` |
diff --git a/docs/feature_converters.md b/docs/feature_converters.md
index 229d1007ab4c..06cc7b3a11f3 100644
--- a/docs/feature_converters.md
+++ b/docs/feature_converters.md
@@ -10,7 +10,7 @@ The following converters are available at this time:
|------------|-------------------|
| `promicro` | `proton_c` |
| `promicro` | `kb2040` |
-| `promicro` | `promicro_rp2040` |
+| `promicro` | `sparkfun_pm2040` |
| `promicro` | `blok` |
| `promicro` | `bit_c_pro` |
| `promicro` | `stemcell` |
@@ -21,6 +21,7 @@ The following converters are available at this time:
| `promicro` | `liatris` |
| `promicro` | `imera` |
| `promicro` | `michi` |
+| `promicro` | `svlinky` |
| `elite_c` | `stemcell` |
| `elite_c` | `rp2040_ce` |
| `elite_c` | `elite_pi` |
@@ -77,7 +78,7 @@ If a board currently supported in QMK uses a [Pro Micro](https://www.sparkfun.co
|------------------------------------------------------------------------------------------|-------------------|
| [Proton C](https://qmk.fm/proton-c/) | `proton_c` |
| [Adafruit KB2040](https://learn.adafruit.com/adafruit-kb2040) | `kb2040` |
-| [SparkFun Pro Micro - RP2040](https://www.sparkfun.com/products/18288) | `promicro_rp2040` |
+| [SparkFun Pro Micro - RP2040](https://www.sparkfun.com/products/18288) | `sparkfun_pm2040` |
| [Blok](https://boardsource.xyz/store/628b95b494dfa308a6581622) | `blok` |
| [Bit-C PRO](https://nullbits.co/bit-c-pro) | `bit_c_pro` |
| [STeMCell](https://github.com/megamind4089/STeMCell) | `stemcell` |
@@ -87,6 +88,7 @@ If a board currently supported in QMK uses a [Pro Micro](https://www.sparkfun.co
| [Liatris](https://splitkb.com/products/liatris) | `liatris` |
| [Imera](https://splitkb.com/products/imera) | `imera` |
| [Michi](https://github.com/ci-bus/michi-promicro-rp2040) | `michi` |
+| [Svlinky](https://github.com/sadekbaroudi/svlinky) | `svlinky` |
Converter summary:
@@ -94,7 +96,7 @@ Converter summary:
|-------------------|---------------------------------|------------------------------|-------------------------------------|
| `proton_c` | `-e CONVERT_TO=proton_c` | `CONVERT_TO=proton_c` | `#ifdef CONVERT_TO_PROTON_C` |
| `kb2040` | `-e CONVERT_TO=kb2040` | `CONVERT_TO=kb2040` | `#ifdef CONVERT_TO_KB2040` |
-| `promicro_rp2040` | `-e CONVERT_TO=promicro_rp2040` | `CONVERT_TO=promicro_rp2040` | `#ifdef CONVERT_TO_PROMICRO_RP2040` |
+| `sparkfun_pm2040` | `-e CONVERT_TO=sparkfun_pm2040` | `CONVERT_TO=sparkfun_pm2040` | `#ifdef CONVERT_TO_SPARKFUN_PM2040` |
| `blok` | `-e CONVERT_TO=blok` | `CONVERT_TO=blok` | `#ifdef CONVERT_TO_BLOK` |
| `bit_c_pro` | `-e CONVERT_TO=bit_c_pro` | `CONVERT_TO=bit_c_pro` | `#ifdef CONVERT_TO_BIT_C_PRO` |
| `stemcell` | `-e CONVERT_TO=stemcell` | `CONVERT_TO=stemcell` | `#ifdef CONVERT_TO_STEMCELL` |
@@ -105,6 +107,7 @@ Converter summary:
| `liatris` | `-e CONVERT_TO=liatris` | `CONVERT_TO=liatris` | `#ifdef CONVERT_TO_LIATRIS` |
| `imera` | `-e CONVERT_TO=imera` | `CONVERT_TO=imera` | `#ifdef CONVERT_TO_IMERA` |
| `michi` | `-e CONVERT_TO=michi` | `CONVERT_TO=michi` | `#ifdef CONVERT_TO_MICHI` |
+| `svlinky` | `-e CONVERT_TO=svlinky` | `CONVERT_TO=svlinky` | `#ifdef CONVERT_TO_SVLINKY` |
### Proton C {#proton_c}
@@ -135,7 +138,7 @@ The following defaults are based on what has been implemented for [RP2040](platf
| USB Host (e.g. USB-USB converter) | Not supported (USB host code is AVR specific and is not currently supported on ARM) |
| [Split keyboards](features/split_keyboard) | Partial via `PIO` vendor driver - heavily dependent on enabled features |
-### SparkFun Pro Micro - RP2040, Blok, Bit-C PRO and Michi {#promicro_rp2040 }
+### SparkFun Pro Micro - RP2040, Blok, Bit-C PRO and Michi {#sparkfun_pm2040 }
Feature set is identical to [Adafruit KB2040](#kb2040).
@@ -170,6 +173,9 @@ The Bonsai C4 only has one on-board LED (B2), and by default, both the Pro Micro
Feature set is identical to [Adafruit KB2040](#kb2040). VBUS detection is enabled by default for superior split keyboard support. For more information, refer to the [Community Edition pinout](platformdev_rp2040#rp2040_ce) docs.
+### Svlinky {#svlinky}
+
+Feature set is a pro micro equivalent of the [RP2040 Community Edition](#rp2040_ce), except that two of the analog GPIO have been replaced with digital only GPIO. These two were moved to the FPC connector to support the [VIK specification](https://github.com/sadekbaroudi/vik). This means that if you are expecting analog support on all 4 pins as provided on a RP2040 Community Edition pinout, you will not have that. Please see the [Svlinky github page](https://github.com/sadekbaroudi/svlinky) for more details.
## Elite-C
diff --git a/docs/feature_eeprom.md b/docs/feature_eeprom.md
index 2912407ac765..22257b320224 100644
--- a/docs/feature_eeprom.md
+++ b/docs/feature_eeprom.md
@@ -109,7 +109,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
}
```
-And lastly, you want to add the `eeconfig_init_user` function, so that when the EEPROM is reset, you can specify default values, and even custom actions. To force an EEPROM reset, use the `EE_CLR` keycode or [Bootmagic Lite](features/bootmagic) functionallity. For example, if you want to set rgb layer indication by default, and save the default valued.
+And lastly, you want to add the `eeconfig_init_user` function, so that when the EEPROM is reset, you can specify default values, and even custom actions. To force an EEPROM reset, use the `EE_CLR` keycode or [Bootmagic](features/bootmagic) functionallity. For example, if you want to set rgb layer indication by default, and save the default valued.
```c
void eeconfig_init_user(void) { // EEPROM is getting reset!
diff --git a/docs/feature_layers.md b/docs/feature_layers.md
index fe9932fadbe6..da6a28bd8821 100644
--- a/docs/feature_layers.md
+++ b/docs/feature_layers.md
@@ -8,7 +8,8 @@ For a detailed explanation of how the layer stack works, checkout [Keymap Overvi
These functions allow you to activate layers in various ways. Note that layers are not generally independent layouts -- multiple layers can be activated at once, and it's typical for layers to use `KC_TRNS` to allow keypresses to pass through to lower layers. When using momentary layer switching with MO(), LM(), TT(), or LT(), make sure to leave the key on the above layers transparent or it may not work as intended.
-* `DF(layer)` - switches the default layer. The default layer is the always-active base layer that other layers stack on top of. See below for more about the default layer. This might be used to switch from QWERTY to Dvorak layout. (Note that this is a temporary switch that only persists until the keyboard loses power. To modify the default layer in a persistent way requires deeper customization, such as calling the `set_single_persistent_default_layer` function inside of [process_record_user](custom_quantum_functions#programming-the-behavior-of-any-keycode).)
+* `DF(layer)` - switches the default layer. The default layer is the always-active base layer that other layers stack on top of. See below for more about the default layer. This might be used to switch from QWERTY to Dvorak layout. Note that this is a temporary switch that only persists until the keyboard loses power.
+* `PDF(layer)` - sets a persistent default layer. This switch, which will last through a power loss, might be used to switch from QWERTY to Dvorak layout and only switch again when you want to.
* `MO(layer)` - momentarily activates *layer*. As soon as you let go of the key, the layer is deactivated.
* `LM(layer, mod)` - Momentarily activates *layer* (like `MO`), but with modifier(s) *mod* active. Only supports layers 0-15. The modifiers this keycode accept are prefixed with `MOD_`, not `KC_`. These modifiers can be combined using bitwise OR, e.g. `LM(_RAISE, MOD_LCTL | MOD_LALT)`.
* `LT(layer, kc)` - momentarily activates *layer* when held, and sends *kc* when tapped. Only supports layers 0-15.
@@ -17,6 +18,9 @@ These functions allow you to activate layers in various ways. Note that layers a
* `TO(layer)` - activates *layer* and de-activates all other layers (except your default layer). This function is special, because instead of just adding/removing one layer to your active layer stack, it will completely replace your current active layers, uniquely allowing you to replace higher layers with a lower one. This is activated on keydown (as soon as the key is pressed).
* `TT(layer)` - Layer Tap-Toggle. If you hold the key down, *layer* is activated, and then is de-activated when you let go (like `MO`). If you repeatedly tap it, the layer will be toggled on or off (like `TG`). It needs 5 taps by default, but you can change this by defining `TAPPING_TOGGLE` -- for example, `#define TAPPING_TOGGLE 2` to toggle on just two taps.
+See also the [Layer Lock key](features/layer_lock), which locks the highest
+active layer until pressed again.
+
### Caveats {#caveats}
Currently, the `layer` argument of `LT()` is limited to layers 0-15, and the `kc` argument to the [Basic Keycode set](keycodes_basic), meaning you can't use keycodes like `LCTL()`, `KC_TILD`, or anything greater than `0xFF`. This is because QMK uses 16-bit keycodes, of which 4 bits are used for the function identifier and 4 bits for the layer, leaving only 8 bits for the keycode.
@@ -74,6 +78,7 @@ There are a number of functions (and variables) related to how you can use or ma
| `default_layer_and(layer_mask)` | Turns on layers based on matching enabled bits between specifed layer and existing default layer state. |
| `default_layer_xor(layer_mask)` | Turns on layers based on non-matching bits between specifed layer and existing default layer state. |
| `default_layer_debug(layer_mask)` | Prints out the current bit mask and highest active default layer to debugger console. |
+| [`set_single_default_layer(layer)`](ref_functions.md#setting-the-persistent-default-layer) | Sets the default layer, but does _not_ write it to persistent memory (EEPROM). |
| [`set_single_persistent_default_layer(layer)`](ref_functions.md#setting-the-persistent-default-layer) | Sets the default layer and writes it to persistent memory (EEPROM). |
| [`update_tri_layer(x, y, z)`](ref_functions.md#update_tri_layerx-y-z) | Checks if layers `x` and `y` are both on, and sets `z` based on that (on if both on, otherwise off). |
| [`update_tri_layer_state(state, x, y, z)`](ref_functions.md#update_tri_layer_statestate-x-y-z) | Does the same as `update_tri_layer(x, y, z)`, but from `layer_state_set_*` functions. |
diff --git a/docs/feature_macros.md b/docs/feature_macros.md
index 055bb3ff8f72..404eb4b38d94 100644
--- a/docs/feature_macros.md
+++ b/docs/feature_macros.md
@@ -42,38 +42,7 @@ You can define up to 32 macros in a `keymap.json` file, as used by [Configurator
### Selecting Your Host Keyboard Layout
-If you type in a language other than English, or use a non-QWERTY layout like Colemak, Dvorak, or Workman, you may have set your computer's input language to match this layout. This presents a challenge when creating macros - you may need to type different keys to get the same letters! To address this you can add the `host_language` key to your `keymap.json`, like so:
-
-```json
-{
- "keyboard": "handwired/my_macropad",
- "keymap": "my_keymap",
- "host_language": "dvorak",
- "macros": [
- ["Hello, World!"]
- ],
- "layout": "LAYOUT_all",
- "layers": [
- ["QK_MACRO_0"]
- ]
-}
-```
-
-The current list of available languages is:
-
-| belgian | bepo | br_abnt2 | canadian_multilingual |
-|:-------:|:----:|:--------:|:---------------------:|
-| **colemak** | **croatian** | **czech** | **danish** |
-| **dvorak_fr** | **dvorak** | **dvp** | **estonian** |
-| **finnish** | **fr_ch** | **french_afnor** | **french** |
-| **french_osx** | **german_ch** | **german** | **german_osx** |
-| **hungarian** | **icelandic** | **italian** | **italian_osx_ansi** |
-| **italian_osx_iso** | **jis** | **latvian** | **lithuanian_azerty** |
-| **lithuanian_qwerty** | **norman** | **norwegian** | **portuguese** |
-| **portuguese_osx_iso** | **romanian** | **serbian_latin** | **slovak** |
-| **slovenian** | **spanish_dvorak** | **spanish_latin_america** | **spanish** |
-| **swedish** | **turkish_f** | **turkish_q** | **uk** |
-| **us_international** | **workman** | **workman_zxcvm** |
+If you type in a language other than English, or use a non-QWERTY layout like Colemak, Dvorak, or Workman, you may have set your computer's input language to match this layout. This presents a challenge when creating macros — you may need to type different keys to get the same letters! To address this you can use [language-specific keycodes](reference_keymap_extras).
### Macro Basics
@@ -148,7 +117,9 @@ If yes, we send the string `"QMK is the best thing ever!"` to the computer via t
We return `true` to indicate to the caller that the key press we just processed should continue to be processed as normal (as we didn't replace or alter the functionality).
Finally, we define the keymap so that the first button activates our macro and the second button is just an escape button.
-?>It is recommended to use the SAFE_RANGE macro as per [Customizing Functionality](custom_quantum_functions).
+::: tip
+It is recommended to use the SAFE_RANGE macro as per [Customizing Functionality](custom_quantum_functions).
+:::
You might want to add more than one macro.
You can do that by adding another keycode and adding another case to the switch statement, like so:
diff --git a/docs/feature_userspace.md b/docs/feature_userspace.md
index 1e7c3b37cdc6..d19b86cb46c8 100644
--- a/docs/feature_userspace.md
+++ b/docs/feature_userspace.md
@@ -74,8 +74,9 @@ Additionally, `config.h` here will be processed like the same file in your keyma
The reason for this, is that `.h` won't be added in time to add settings (such as `#define TAPPING_TERM 100`), and including the `` file in any `config.h` files will result in compile issues.
-!>You should use the `config.h` for [configuration options](config_options), and the `.h` file for user or keymap specific settings (such as the enum for layer or keycodes)
-
+::: warning
+You should use the `config.h` for [configuration options](config_options), and the `.h` file for user or keymap specific settings (such as the enum for layer or keycodes)
+:::
## Readme (`readme.md`)
diff --git a/docs/features/backlight.md b/docs/features/backlight.md
index 94726756fdb9..20f84ac6b59e 100644
--- a/docs/features/backlight.md
+++ b/docs/features/backlight.md
@@ -161,15 +161,23 @@ Note that the choice of timer may conflict with the [Audio](audio) feature.
Depending on the ChibiOS board configuration, you may need to enable PWM at the keyboard level. For STM32, this would look like:
-`halconf.h`:
-```c
-#define HAL_USE_PWM TRUE
+::: code-group
+```c [halconf.h]
+#pragma once
+
+#define HAL_USE_PWM TRUE // [!code focus]
+
+#include_next
```
-`mcuconf.h`:
-```c
-#undef STM32_PWM_USE_TIM4
-#define STM32_PWM_USE_TIM4 TRUE
+```c [mcuconf.h]
+#pragma once
+
+#include_next
+
+#undef STM32_PWM_USE_TIM4 // [!code focus]
+#define STM32_PWM_USE_TIM4 TRUE // [!code focus]
```
+:::
The following `#define`s apply only to the `pwm` driver:
@@ -187,15 +195,23 @@ Refer to the ST datasheet for your particular MCU to determine these values. For
Depending on the ChibiOS board configuration, you may need to enable general-purpose timers at the keyboard level. For STM32, this would look like:
-`halconf.h`:
-```c
-#define HAL_USE_GPT TRUE
+::: code-group
+```c [halconf.h]
+#pragma once
+
+#define HAL_USE_GPT TRUE // [!code focus]
+
+#include_next
```
-`mcuconf.h`:
-```c
-#undef STM32_GPT_USE_TIM15
-#define STM32_GPT_USE_TIM15 TRUE
+```c [mcuconf.h]
+#pragma once
+
+#include_next
+
+#undef STM32_GPT_USE_TIM15 // [!code focus]
+#define STM32_GPT_USE_TIM15 TRUE // [!code focus]
```
+:::
The following `#define`s apply only to the `timer` driver:
diff --git a/docs/features/combo.md b/docs/features/combo.md
index bdb8c4b15fcb..afe202ad54ac 100644
--- a/docs/features/combo.md
+++ b/docs/features/combo.md
@@ -152,14 +152,15 @@ In order to use these features, the following configuration options and function
| Config Flag | Function | Description |
|-----------------------------|-----------------------------------------------------------|--------------------------------------------------------------------------------------------------------|
-| `COMBO_TERM_PER_COMBO` | uint16_t get_combo_term(uint16_t index, combo_t \*combo) | Optional per-combo timeout window. (default: `COMBO_TERM`) |
-| `COMBO_MUST_HOLD_PER_COMBO` | bool get_combo_must_hold(uint16_t index, combo_t \*combo) | Controls if a given combo should fire immediately on tap or if it needs to be held. (default: `false`) |
-| `COMBO_MUST_TAP_PER_COMBO` | bool get_combo_must_tap(uint16_t index, combo_t \*combo) | Controls if a given combo should fire only if tapped within `COMBO_HOLD_TERM`. (default: `false`) |
-| `COMBO_MUST_PRESS_IN_ORDER_PER_COMBO` | bool get_combo_must_press_in_order(uint16_t index, combo_t \*combo) | Controls if a given combo should fire only if its keys are pressed in order. (default: `true`) |
+| `COMBO_TERM_PER_COMBO` | `uint16_t get_combo_term(uint16_t combo_index, combo_t *combo)` | Optional per-combo timeout window. (default: `COMBO_TERM`) |
+| `COMBO_MUST_HOLD_PER_COMBO` | `bool get_combo_must_hold(uint16_t combo_index, combo_t *combo)` | Controls if a given combo should fire immediately on tap or if it needs to be held. (default: `false`) |
+| `COMBO_MUST_TAP_PER_COMBO` | `bool get_combo_must_tap(uint16_t combo_index, combo_t *combo)` | Controls if a given combo should fire only if tapped within `COMBO_HOLD_TERM`. (default: `false`) |
+| `COMBO_MUST_PRESS_IN_ORDER_PER_COMBO` | `bool get_combo_must_press_in_order(uint16_t combo_index, combo_t *combo)` | Controls if a given combo should fire only if its keys are pressed in order. (default: `true`) |
Examples:
```c
-uint16_t get_combo_term(uint16_t index, combo_t *combo) {
+#ifdef COMBO_TERM_PER_COMBO
+uint16_t get_combo_term(uint16_t combo_index, combo_t *combo) {
// decide by combo->keycode
switch (combo->keycode) {
case KC_X:
@@ -167,7 +168,7 @@ uint16_t get_combo_term(uint16_t index, combo_t *combo) {
}
// or with combo index, i.e. its name from enum.
- switch (index) {
+ switch (combo_index) {
case COMBO_NAME_HERE:
return 9001;
}
@@ -182,8 +183,10 @@ uint16_t get_combo_term(uint16_t index, combo_t *combo) {
return COMBO_TERM;
}
+#endif
-bool get_combo_must_hold(uint16_t index, combo_t *combo) {
+#ifdef COMBO_MUST_HOLD_PER_COMBO
+bool get_combo_must_hold(uint16_t combo_index, combo_t *combo) {
// Same as above, decide by keycode, the combo index, or by the keys in the chord.
if (KEYCODE_IS_MOD(combo->keycode) ||
@@ -192,15 +195,17 @@ bool get_combo_must_hold(uint16_t index, combo_t *combo) {
return true;
}
- switch (index) {
+ switch (combo_index) {
case COMBO_NAME_HERE:
return true;
}
return false;
}
+#endif
-bool get_combo_must_tap(uint16_t index, combo_t *combo) {
+#ifdef COMBO_MUST_TAP_PER_COMBO
+bool get_combo_must_tap(uint16_t combo_index, combo_t *combo) {
// If you want all combos to be tap-only, just uncomment the next line
// return true
@@ -219,7 +224,9 @@ bool get_combo_must_tap(uint16_t index, combo_t *combo) {
return false;
}
+#endif
+#ifdef COMBO_MUST_PRESS_IN_ORDER_PER_COMBO
bool get_combo_must_press_in_order(uint16_t combo_index, combo_t *combo) {
switch (combo_index) {
/* List combos here that you want to only activate if their keys
@@ -231,6 +238,7 @@ bool get_combo_must_press_in_order(uint16_t combo_index, combo_t *combo) {
return false;
}
}
+#endif
```
### Generic hook to (dis)allow a combo activation
@@ -307,6 +315,50 @@ bool process_combo_key_release(uint16_t combo_index, combo_t *combo, uint8_t key
return false;
}
```
+
+### Customizable key repress
+By defining `COMBO_PROCESS_KEY_REPRESS` and implementing `bool process_combo_key_repress(uint16_t combo_index, combo_t *combo, uint8_t key_index, uint16_t keycode)` you can run your custom code when you repress just released key of a combo. By combining it with custom `process_combo_event` we can for example make special handling for Alt+Tab to switch windows, which, on combo F+G activation, registers Alt and presses Tab - then we can switch windows forward by releasing G and pressing it again, or backwards with F key. Here's the full example:
+
+```c
+enum combos {
+ CMB_ALTTAB
+};
+
+const uint16_t PROGMEM combo_alttab[] = {KC_F, KC_G, COMBO_END};
+
+combo_t key_combos[COMBO_LENGTH] = {
+ [CMB_ALTTAB] = COMBO(combo_alttab, KC_NO), // KC_NO to leave processing for process_combo_event
+};
+
+void process_combo_event(uint16_t combo_index, bool pressed) {
+ switch (combo_index) {
+ case CMB_ALTTAB:
+ if (pressed) {
+ register_mods(MOD_LALT);
+ tap_code(KC_TAB);
+ } else {
+ unregister_mods(MOD_LALT);
+ }
+ break;
+ }
+}
+
+bool process_combo_key_repress(uint16_t combo_index, combo_t *combo, uint8_t key_index, uint16_t keycode) {
+ switch (combo_index) {
+ case CMB_ALTTAB:
+ switch (keycode) {
+ case KC_F:
+ tap_code16(S(KC_TAB));
+ return true;
+ case KC_G:
+ tap_code(KC_TAB);
+ return true;
+ }
+ }
+ return false;
+}
+```
+
### Layer independent combos
If you, for example, use multiple base layers for different key layouts, one for QWERTY, and another one for Colemak, you might want your combos to work from the same key positions on all layers. Defining the same combos again for another layout is redundant and takes more memory. The solution is to just check the keycodes from one layer.
diff --git a/docs/features/command.md b/docs/features/command.md
index 7ad45103c786..a6f96dcd835e 100644
--- a/docs/features/command.md
+++ b/docs/features/command.md
@@ -1,6 +1,6 @@
# Command
-Command, formerly known as Magic, is a way to change your keyboard's behavior without having to flash or unplug it to use [Bootmagic Lite](bootmagic). There is a lot of overlap between this functionality and the [Magic Keycodes](../keycodes_magic). Wherever possible we encourage you to use that feature instead of Command.
+Command, formerly known as Magic, is a way to change your keyboard's behavior without having to flash or unplug it to use [Bootmagic](bootmagic). There is a lot of overlap between this functionality and the [Magic Keycodes](../keycodes_magic). Wherever possible we encourage you to use that feature instead of Command.
On some keyboards Command is disabled by default. If this is the case, it must be explicitly enabled in your `rules.mk`:
diff --git a/docs/features/encoders.md b/docs/features/encoders.md
index 3d1cac79af7a..a674eaa4a642 100644
--- a/docs/features/encoders.md
+++ b/docs/features/encoders.md
@@ -9,15 +9,15 @@ ENCODER_ENABLE = yes
and this to your `config.h`:
```c
-#define ENCODERS_PAD_A { B12 }
-#define ENCODERS_PAD_B { B13 }
+#define ENCODER_A_PINS { B12 }
+#define ENCODER_B_PINS { B13 }
```
Each PAD_A/B variable defines an array so multiple encoders can be defined, e.g.:
```c
-#define ENCODERS_PAD_A { encoder1a, encoder2a }
-#define ENCODERS_PAD_B { encoder1b, encoder2b }
+#define ENCODER_A_PINS { encoder1a, encoder2a }
+#define ENCODER_B_PINS { encoder1b, encoder2b }
```
If your encoder's clockwise directions are incorrect, you can swap the A & B pad definitions. They can also be flipped with a define:
@@ -49,8 +49,8 @@ For 4× encoders you also can assign default position if encoder skips pulses wh
If you are using different pinouts for the encoders on each half of a split keyboard, you can define the pinout (and optionally, resolutions) for the right half like this:
```c
-#define ENCODERS_PAD_A_RIGHT { encoder1a, encoder2a }
-#define ENCODERS_PAD_B_RIGHT { encoder1b, encoder2b }
+#define ENCODER_A_PINS_RIGHT { encoder1a, encoder2a }
+#define ENCODER_B_PINS_RIGHT { encoder1b, encoder2b }
#define ENCODER_RESOLUTIONS_RIGHT { 2, 4 }
```
@@ -59,11 +59,11 @@ If the `_RIGHT` definitions aren't specified in your `config.h`, then the non-`_
Additionally, if one side does not have an encoder, you can specify `{}` for the pins/resolution -- for example, a split keyboard with only a right-side encoder:
```c
-#define ENCODERS_PAD_A { }
-#define ENCODERS_PAD_B { }
+#define ENCODER_A_PINS { }
+#define ENCODER_B_PINS { }
#define ENCODER_RESOLUTIONS { }
-#define ENCODERS_PAD_A_RIGHT { B12 }
-#define ENCODERS_PAD_B_RIGHT { B13 }
+#define ENCODER_A_PINS_RIGHT { B12 }
+#define ENCODER_B_PINS_RIGHT { B13 }
#define ENCODER_RESOLUTIONS_RIGHT { 4 }
```
@@ -84,10 +84,10 @@ Your `keymap.c` will then need an encoder mapping defined (for four layers and t
```c
#if defined(ENCODER_MAP_ENABLE)
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
- [0] = { ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
- [1] = { ENCODER_CCW_CW(RGB_HUD, RGB_HUI), ENCODER_CCW_CW(RGB_SAD, RGB_SAI) },
- [2] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI), ENCODER_CCW_CW(RGB_SPD, RGB_SPI) },
- [3] = { ENCODER_CCW_CW(RGB_RMOD, RGB_MOD), ENCODER_CCW_CW(KC_RIGHT, KC_LEFT) },
+ [0] = { ENCODER_CCW_CW(MS_WHLU, MS_WHLD), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
+ [1] = { ENCODER_CCW_CW(UG_HUED, UG_HUEU), ENCODER_CCW_CW(UG_SATD, UG_SATU) },
+ [2] = { ENCODER_CCW_CW(UG_VALD, UG_VALU), ENCODER_CCW_CW(UG_SPDD, UG_SPDU) },
+ [3] = { ENCODER_CCW_CW(UG_PREV, UG_NEXT), ENCODER_CCW_CW(KC_RIGHT, KC_LEFT) },
};
#endif
```
@@ -174,13 +174,13 @@ Multiple encoders may share pins so long as each encoder has a distinct pair of
For example you can support two encoders using only 3 pins like this
```
-#define ENCODERS_PAD_A { B1, B1 }
-#define ENCODERS_PAD_B { B2, B3 }
+#define ENCODER_A_PINS { B1, B1 }
+#define ENCODER_B_PINS { B2, B3 }
```
You could even support three encoders using only three pins (one per encoder) however in this configuration, rotating two encoders which share pins simultaneously will often generate incorrect output. For example:
```
-#define ENCODERS_PAD_A { B1, B1, B2 }
-#define ENCODERS_PAD_B { B2, B3, B3 }
+#define ENCODER_A_PINS { B1, B1, B2 }
+#define ENCODER_B_PINS { B2, B3, B3 }
```
Here rotating Encoder 0 `B1 B2` and Encoder 1 `B1 B3` could be interpreted as rotating Encoder 2 `B2 B3` or `B3 B2` depending on the timing. This may still be a useful configuration depending on your use case
diff --git a/docs/features/joystick.md b/docs/features/joystick.md
index f3fd209d5a9a..cbf6c6daf7e9 100644
--- a/docs/features/joystick.md
+++ b/docs/features/joystick.md
@@ -1,6 +1,6 @@
# Joystick {#joystick}
-This feature provides game controller input as a joystick device supporting up to 6 axes and 32 buttons. Axes can be read either from an [ADC-capable input pin](../drivers/adc), or can be virtual, so that its value is provided by your code.
+This feature provides game controller input as a joystick device supporting up to 6 axes, 32 buttons and a hat switch. Axes can be read either from an [ADC-capable input pin](../drivers/adc), or can be virtual, so that its value is provided by your code.
An analog device such as a [potentiometer](https://en.wikipedia.org/wiki/Potentiometer) found on an analog joystick's axes is based on a voltage divider, where adjusting the movable wiper controls the output voltage which can then be read by the microcontroller's ADC.
@@ -18,6 +18,8 @@ By default the joystick driver is `analog`, but you can change this with:
JOYSTICK_DRIVER = digital
```
+When using `analog` with ARM, [you must use 3.3v with your Joystick](../drivers/adc). Although ARM boards such as the [Helios](https://keeb.supply/products/0xcb-helios) have 5v pin output, the ADC driver does not support it.
+
## Configuration {#configuration}
By default, two axes and eight buttons are defined, with a reported resolution of 8 bits (-127 to +127). This can be changed in your `config.h`:
@@ -35,6 +37,42 @@ By default, two axes and eight buttons are defined, with a reported resolution o
You must define at least one button or axis. Also note that the maximum ADC resolution of the supported AVR MCUs is 10-bit, and 12-bit for most STM32 MCUs.
:::
+### Hat Switch {#hat-switch}
+
+To enable the 8-way hat switch, add the following to your `config.h`:
+
+```c
+#define JOYSTICK_HAS_HAT
+````
+
+The position can be set by calling `joystick_set_hat(value)`. The range of values moves clockwise from the top (ie. north), with the default "center" position represented by a value of `-1`:
+
+```
+ 0
+ 7 N 1
+ NW .--'--. NE
+ / \
+6 W | -1 | E 2
+ \ /
+ SW '--.--' SE
+ 5 S 3
+ 4
+```
+
+Alternatively you can use these predefined names:
+
+|Define |Value|Angle|
+|------------------------|-----|-----|
+|`JOYSTICK_HAT_CENTER` |`-1` | |
+|`JOYSTICK_HAT_NORTH` |`0` |0° |
+|`JOYSTICK_HAT_NORTHEAST`|`1` |45° |
+|`JOYSTICK_HAT_EAST` |`2` |90° |
+|`JOYSTICK_HAT_SOUTHEAST`|`3` |135° |
+|`JOYSTICK_HAT_SOUTH` |`4` |180° |
+|`JOYSTICK_HAT_SOUTHWEST`|`5` |225° |
+|`JOYSTICK_HAT_WEST` |`6` |270° |
+|`JOYSTICK_HAT_NORTHWEST`|`7` |315° |
+
### Axes {#axes}
When defining axes for your joystick, you must provide a definition array typically in your `keymap.c`.
@@ -147,6 +185,8 @@ Contains the state of the joystick.
A bit-packed array containing the joystick button states. The size is calculated as `(JOYSTICK_BUTTON_COUNT - 1) / 8 + 1`.
- `int16_t axes[]`
An array of analog values for each defined axis.
+ - `int8_t hat`
+ The hat switch position.
- `bool dirty`
Whether the current state needs to be sent to the host.
@@ -220,3 +260,14 @@ Set the value of the given axis.
The axis to set the value of.
- `int16_t value`
The value to set.
+
+---
+
+### `void joystick_set_hat(int8_t value)` {#api-joystick-set-hat}
+
+Set the position of the hat switch.
+
+#### Arguments {#api-joystick-set-hat-arguments}
+
+ - `int8_t value`
+ The hat switch position to set.
diff --git a/docs/features/key_overrides.md b/docs/features/key_overrides.md
index 4c568f167919..9b6015175cb3 100644
--- a/docs/features/key_overrides.md
+++ b/docs/features/key_overrides.md
@@ -14,7 +14,7 @@ You can use key overrides in a similar way to momentary layer/fn keys to activat
To enable this feature, you need to add `KEY_OVERRIDE_ENABLE = yes` to your `rules.mk`.
-Then, in your `keymap.c` file, you'll need to define the array `key_overrides`, which defines all key overrides to be used. Each override is a value of type `key_override_t`. The array `key_overrides` is `NULL`-terminated and contains pointers to `key_override_t` values (`const key_override_t **`).
+Then, in your `keymap.c` file, you'll need to define the array `key_overrides`, which defines all key overrides to be used. Each override is a value of type `key_override_t`. The array `key_overrides`contains pointers to `key_override_t` values (`const key_override_t **`).
## Creating Key Overrides {#creating-key-overrides}
@@ -42,9 +42,8 @@ This shows how the mentioned example of sending `delete` when `shift` + `backspa
const key_override_t delete_key_override = ko_make_basic(MOD_MASK_SHIFT, KC_BSPC, KC_DEL);
// This globally defines all key overrides to be used
-const key_override_t **key_overrides = (const key_override_t *[]){
- &delete_key_override,
- NULL // Null terminate the array of overrides!
+const key_override_t *key_overrides[] = {
+ &delete_key_override
};
```
@@ -91,14 +90,13 @@ const key_override_t brightness_up_override = ko_make_with_layers_negmods_and_op
const key_override_t brightness_down_override = ko_make_basic(MOD_MASK_CSA, KC_MPLY, KC_BRID);
// This globally defines all key overrides to be used
-const key_override_t **key_overrides = (const key_override_t *[]){
+const key_override_t *key_overrides[] = {
&next_track_override,
&prev_track_override,
&vol_up_override,
&vol_down_override,
&brightness_up_override,
- &brightness_down_override,
- NULL
+ &brightness_down_override
};
```
@@ -112,10 +110,9 @@ const key_override_t tilde_esc_override = ko_make_basic(MOD_MASK_SHIFT, KC_ESC,
// GUI + esc = `
const key_override_t grave_esc_override = ko_make_basic(MOD_MASK_GUI, KC_ESC, KC_GRV);
-const key_override_t **key_overrides = (const key_override_t *[]){
+const key_override_t *key_overrides[] = {
&tilde_esc_override,
- &grave_esc_override,
- NULL
+ &grave_esc_override
};
```
diff --git a/docs/features/layer_lock.md b/docs/features/layer_lock.md
new file mode 100644
index 000000000000..aaf323acccde
--- /dev/null
+++ b/docs/features/layer_lock.md
@@ -0,0 +1,139 @@
+# Layer Lock
+
+Some [layer switches](../feature_layers#switching-and-toggling-layers) access
+the layer by holding the key, including momentary layer `MO(layer)` and layer
+tap `LT(layer, key)` keys. You may sometimes need to stay on the layer for a
+long period of time. Layer Lock "locks" the current layer to stay on, supposing
+it was accessed by one of:
+
+ * `MO(layer)` momentary layer switch
+ * `LT(layer, key)` layer tap
+ * `OSL(layer)` one-shot layer
+ * `TT(layer)` layer tap toggle
+ * `LM(layer, mod)` layer-mod key (the layer is locked, but not the mods)
+
+Press the Layer Lock key again to unlock the layer. Additionally, when a layer
+is locked, layer switch keys that turn off the layer such as `TO(other_layer)`
+will unlock it.
+
+
+## How do I enable Layer Lock
+
+In your rules.mk, add:
+
+```make
+LAYER_LOCK_ENABLE = yes
+```
+
+Pick a key in your keymap on a layer you intend to lock, and assign it the
+keycode `QK_LAYER_LOCK` (short alias `QK_LLCK`). Note that locking the base
+layer has no effect, so typically, this key is used on layers above the base
+layer.
+
+
+## Example use
+
+Consider a keymap with the following base layer.
+
+
+
+The highlighted key is a momentary layer switch `MO(NAV)`. Holding it accesses a
+navigation layer.
+
+
+
+
+Holding the NAV key is fine for brief use, but awkward to continue holding when
+using navigation functions continuously. The Layer Lock key comes to the rescue:
+
+1. Hold the NAV key, activating the navigation layer.
+2. Tap Layer Lock.
+3. Release NAV. The navigation layer stays on.
+4. Make use of the arrow keys, etc.
+5. Tap Layer Lock or NAV again to turn the navigation layer back off.
+
+A variation that would also work is to put the Layer Lock key on the base layer
+and make other layers transparent (`KC_TRNS`) in that position. Pressing the
+Layer Lock key locks (or unlocks) the highest active layer, regardless of which
+layer the Layer Lock key is on.
+
+
+## Idle timeout
+
+Optionally, Layer Lock may be configured to unlock if the keyboard is idle
+for some time. In config.h, define `LAYER_LOCK_IDLE_TIMEOUT` in units of
+milliseconds:
+
+```c
+#define LAYER_LOCK_IDLE_TIMEOUT 60000 // Turn off after 60 seconds.
+```
+
+
+## Functions
+
+Use the following functions to query and manipulate the layer lock state.
+
+| Function | Description |
+|----------------------------|------------------------------------|
+| `is_layer_locked(layer)` | Checks whether `layer` is locked. |
+| `layer_lock_on(layer)` | Locks and turns on `layer`. |
+| `layer_lock_off(layer)` | Unlocks and turns off `layer`. |
+| `layer_lock_invert(layer)` | Toggles whether `layer` is locked. |
+
+
+## Representing the current Layer Lock state
+
+There is an optional callback `layer_lock_set_user()` that gets called when a
+layer is locked or unlocked. This is useful to represent the current lock state
+for instance by setting an LED. In keymap.c, define
+
+```c
+bool layer_lock_set_user(layer_state_t locked_layers) {
+ // Do something like `set_led(is_layer_locked(NAV));`
+ return true;
+}
+```
+
+The argument `locked_layers` is a bitfield in which the kth bit is on if the kth
+layer is locked. Alternatively, you can use `is_layer_locked(layer)` to check if
+a given layer is locked.
+
+
+## Combine Layer Lock with a mod-tap
+
+It is possible to create a [mod-tap MT key](../mod_tap) that acts as a modifier
+on hold and Layer Lock on tap. Since Layer Lock is not a [basic
+keycode](../keycodes_basic), attempting `MT(mod, QK_LLCK)` is invalid does not
+work directly, yet this effect can be achieved through [changing the tap
+function](../mod_tap#changing-tap-function). For example, the following
+implements a `SFTLLCK` key that acts as Shift on hold and Layer Lock on tap:
+
+```c
+#define SFTLLCK LSFT_T(KC_0)
+
+// Use SFTLLCK in your keymap...
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case SFTLLCK:
+ if (record->tap.count) {
+ if (record->event.pressed) {
+ // Toggle the lock on the highest layer.
+ layer_lock_invert(get_highest_layer(layer_state));
+ }
+ return false;
+ }
+ break;
+
+ // Other macros...
+ }
+ return true;
+}
+```
+
+In the above, `KC_0` is an arbitrary placeholder for the tapping keycode. This
+keycode will never be sent, so any basic keycode will do. In
+`process_record_user()`, the tap press event is changed to toggle the lock on
+the highest layer. Layer Lock can be combined with a [layer-tap LT
+key](../feature_layers#switching-and-toggling-layers) similarly.
+
diff --git a/docs/features/led_indicators.md b/docs/features/led_indicators.md
index 8435c69a5526..211fda258155 100644
--- a/docs/features/led_indicators.md
+++ b/docs/features/led_indicators.md
@@ -21,9 +21,8 @@ There are three ways to get the lock LED state:
The `host_keyboard_led_state()` may reflect an updated state before `led_update_user()` is called.
:::
-Two deprecated functions that provide the LED state as `uint8_t`:
+Deprecated functions that provide the LED state as `uint8_t`:
-* `uint8_t led_set_user(uint8_t usb_led)`
* `uint8_t host_keyboard_leds()`
## Configuration Options
@@ -50,10 +49,6 @@ When the configuration options do not provide enough flexibility, the following
Both receives LED state as a struct parameter. Returning `true` in `led_update_user()` will allow the keyboard level code in `led_update_kb()` to run as well. Returning `false` will override the keyboard level code, depending on how the keyboard level function is set up.
-::: tip
-This boolean return type of `led_update_user` allows for overriding keyboard LED controls, and is thus recommended over the void `led_set_user` function.
-:::
-
### Example of keyboard LED update implementation
This is a template indicator function that can be implemented on keyboard level code:
diff --git a/docs/features/led_matrix.md b/docs/features/led_matrix.md
index fee7b139bce1..756cc11e2bee 100644
--- a/docs/features/led_matrix.md
+++ b/docs/features/led_matrix.md
@@ -4,176 +4,32 @@ This feature allows you to use LED matrices driven by external drivers. It hooks
If you want to use RGB LED's you should use the [RGB Matrix Subsystem](rgb_matrix) instead.
-## Driver configuration {#driver-configuration}
----
-### IS31FL3731 {#is31fl3731}
-
-There is basic support for addressable LED matrix lighting with the I2C IS31FL3731 LED controller. To enable it, add this to your `rules.mk`:
+## Driver Configuration {#driver-configuration}
+
+LED Matrix is an abstraction layer on top of an underlying LED driver API. The list of supported LED drivers is below; see the respective documentation for information on how to configure the driver.
+
+|Driver |Max LEDs|
+|-------------------------------------|--------|
+|[IS31FL3218](../drivers/is31fl3218) |18 |
+|[IS31FL3236](../drivers/is31fl3236) |36 |
+|[IS31FL3729](../drivers/is31fl3729) |135 |
+|[IS31FL3731](../drivers/is31fl3731) |144 |
+|[IS31FL3733](../drivers/is31fl3733) |192 |
+|[IS31FL3736](../drivers/is31fl3736) |96 |
+|[IS31FL3737](../drivers/is31fl3737) |144 |
+|[IS31FL3741](../drivers/is31fl3741) |351 |
+|[IS31FL3742A](../drivers/is31fl3742a)|180 |
+|[IS31FL3743A](../drivers/is31fl3743a)|198 |
+|[IS31FL3745](../drivers/is31fl3745) |144 |
+|[IS31FL3746A](../drivers/is31fl3746a)|72 |
+|[SNLED27351](../drivers/snled27351) |192 |
+
+To assign the LED Matrix driver, add the following to your `rules.mk`, for example:
```make
-LED_MATRIX_ENABLE = yes
-LED_MATRIX_DRIVER = is31fl3731
-```
-
-You can use between 1 and 4 IS31FL3731 IC's. Do not specify `LED_DRIVER_ADDR_` defines for IC's that are not present on your keyboard. You can define the following items in `config.h`:
-
-| Variable | Description | Default |
-|----------|-------------|---------|
-| `IS31FL3731_I2C_TIMEOUT` | (Optional) How long to wait for i2c messages, in milliseconds | 100 |
-| `IS31FL3731_I2C_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 |
-| `LED_MATRIX_LED_COUNT` | (Required) How many LED lights are present across all drivers | |
-| `IS31FL3731_I2C_ADDRESS_1` | (Required) Address for the first LED driver | |
-| `IS31FL3731_I2C_ADDRESS_2` | (Optional) Address for the second LED driver | |
-| `IS31FL3731_I2C_ADDRESS_3` | (Optional) Address for the third LED driver | |
-| `IS31FL3731_I2C_ADDRESS_4` | (Optional) Address for the fourth LED driver | |
-
-Here is an example using 2 drivers.
-
-```c
-// This is a 7-bit address, that gets left-shifted and bit 0
-// set to 0 for write, 1 for read (as per I2C protocol)
-// The address will vary depending on your wiring:
-// 00 AD <-> GND
-// 01 AD <-> SCL
-// 10 AD <-> SDA
-// 11 AD <-> VCC
-// ADDR represents A1:A0 of the 7-bit address.
-// The result is: 0b11101(ADDR)
-#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
-#define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA
-
-#define LED_DRIVER_1_LED_TOTAL 25
-#define LED_DRIVER_2_LED_TOTAL 24
-#define LED_MATRIX_LED_COUNT (LED_DRIVER_1_LED_TOTAL + LED_DRIVER_2_LED_TOTAL)
+LED_MATRIX_DRIVER = is31fl3218
```
-::: warning
-Note the parentheses, this is so when `LED_MATRIX_LED_COUNT` is used in code and expanded, the values are added together before any additional math is applied to them. As an example, `rand() % (LED_DRIVER_1_LED_TOTAL + LED_DRIVER_2_LED_TOTAL)` will give very different results than `rand() % LED_DRIVER_1_LED_TOTAL + LED_DRIVER_2_LED_TOTAL`.
-:::
-
-For split keyboards using `LED_MATRIX_SPLIT` with an LED driver, you can either have the same driver address or different driver addresses. If using different addresses, use `IS31FL3731_I2C_ADDRESS_1` for one and `IS31FL3731_I2C_ADDRESS_2` for the other one. Then, in `g_is31fl3731_leds`, fill out the correct driver index (0 or 1). If using one address, use `IS31FL3731_I2C_ADDRESS_1` for both, and use index 0 for `g_is31fl3731_leds`.
-
-Define these arrays listing all the LEDs in your `.c`:
-
-```c
-const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
- * driver
- * | LED address
- * | | */
- { 0, C1_1 },
- { 0, C1_15 },
- // ...
-}
-```
-
-Where `Cx_y` is the location of the LED in the matrix defined by [the datasheet](https://www.issi.com/WW/pdf/31FL3731.pdf) and the header file `drivers/led/issi/is31fl3731-mono.h`. The `driver` is the index of the driver you defined in your `config.h` (`0`, `1`, `2`, or `3` ).
-
----
-### IS31FLCOMMON {#is31flcommon}
-
-There is basic support for addressable LED matrix lighting with a selection of I2C ISSI Lumissil LED controllers through a shared common driver. To enable it, add this to your `rules.mk`:
-
-```makefile
-LED_MATRIX_ENABLE = yes
-LED_MATRIX_DRIVER =
-```
-
-Where `` is the applicable LED driver chip as below
-
-| Driver Name | Data Sheet | Capability |
-|-------------|------------|------------|
-| `IS31FL3742A` | [datasheet](https://www.lumissil.com/assets/pdf/core/IS31FL3742A_DS.pdf) | 180 LED, 30x6 Matrix |
-| `IS31FL3743A` | [datasheet](https://www.lumissil.com/assets/pdf/core/IS31FL3743A_DS.pdf) | 198 LED, 18x11 Matrix |
-| `IS31FL3745` | [datasheet](https://www.lumissil.com/assets/pdf/core/IS31FL3745_DS.pdf) | 144 LED, 18x8 Matrix |
-| `IS31FL3746A` | [datasheet](https://www.lumissil.com/assets/pdf/core/IS31FL3746A_DS.pdf) | 72 LED, 18x4 Matrix |
-
-You can use between 1 and 4 IC's. Do not specify `DRIVER_ADDR_` define for IC's if not present on your keyboard. The `DRIVER_ADDR_1` default assumes that all Address pins on the controller have been connected to GND. Drivers that have SYNC functionality have the default settings to disable if 1 driver. If more than 1 drivers then `DRIVER_ADDR_1` will be set to Master and the remaiing ones set to Slave.
-
-Configure the hardware via your `config.h`:
-
-| Variable | Description | Default |
-|----------|-------------|---------|
-| `ISSI_TIMEOUT` | (Optional) How long to wait for i2c messages, in milliseconds | 100 |
-| `ISSI_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 |
-| `LED_MATRIX_LED_COUNT` | (Required) How many LED lights are present across all drivers | |
-| `DRIVER_ADDR_1` | (Optional) Address for the first LED driver | |
-| `DRIVER_ADDR_` | (Required) Address for the additional LED drivers | |
-| `ISSI_SSR_` | (Optional) Configuration for the Spread Spectrum Register | |
-| `ISSI_CONFIGURATION` | (Optional) Configuration for the Configuration Register | |
-| `ISSI_GLOBALCURRENT` | (Optional) Configuration for the Global Current Register | 0xFF |
-| `ISSI_PULLDOWNUP` | (Optional) Configuration for the Pull Up & Pull Down Register | |
-| `ISSI_TEMP` | (Optional) Configuration for the Tempature Register | |
-| `ISSI_PWM_ENABLE` | (Optional) Configuration for the PWM Enable Register | |
-| `ISSI_PWM_SET` | (Optional) Configuration for the PWM Setting Register | |
-| `ISSI_SCAL_LED ` | (Optional) Configuration for the LEDs Scaling Registers | 0xFF |
-| `ISSI_MANUAL_SCALING` | (Optional) If you wish to configure the Scaling Registers manually | |
-
-
-Defaults
-
-| Variable | IS31FL3742A | IS31FL3743A | IS31FL3745 | IS31FL3746 |
-|----------|-------------|-------------|------------|------------|
-| `DRIVER_ADDR_1` | 0b0110000 | 0b0100000 | 0b0100000 | 0b1100000 |
-| `ISSI_SSR_1` | 0x00 | 0x00 / 0x60 | 0x00 / 0xC0 | 0x00 |
-| `ISSI_SSR_<2-4>` | 0x00 | 0x40 | 0x80 | 0x00 |
-| `ISSI_CONFIGURATION` | 0x31 | 0x01 | 0x31 | 0x01 |
-| `ISSI_PULLDOWNUP` | 0x55 | 0x33 | 0x33 | 0x33 |
-| `ISSI_TEMP` | N/A | 0x00 | 0x00 | 0x00 |
-| `ISSI_PWM_ENABLE` | N/A | N/A | N/A | 0x00 |
-| `ISSI_PWM_SET` | 0x00 | N/A | N/A | 0x00 |
-
-Here is an example using 2 drivers.
-
-```c
-#define DRIVER_ADDR_2 0b0100001
-
-#define DRIVER_1_LED_TOTAL 66
-#define DRIVER_2_LED_TOTAL 42
-#define LED_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
-```
-::: warning
-Note the parentheses, this is so when `LED_MATRIX_LED_COUNT` is used in code and expanded, the values are added together before any additional math is applied to them. As an example, `rand() % (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)` will give very different results than `rand() % DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL`.
-:::
-
-Currently only 4 drivers are supported, but it would be trivial to support for more. Note that using a combination of different drivers is not supported. All drivers must be of the same model.
-
-Define these arrays listing all the LEDs in your `.c`:
-
-```c
-const is31_led PROGMEM g_is31_leds[LED_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
- * driver
- * | LED address
- * | | */
- { 0, SW1_CS1 },
- { 0, SW1_CS2 },
- // ...
-}
-```
-
-Where `CSx_SWx` is the location of the LED in the matrix defined by the datasheet. The `driver` is the index of the driver you defined in your `config.h` (`0`, `1`, `2`, or `3` for now).
-
-`ISSI_MANUAL_SCALING` is used to override the Scaling for individual LED's. By default they will be set as per `ISSI_SCAL_LED`. In `config.h` set how many LED's you want to manually set scaling for.
-Eg `#define ISSI_MANUAL_SCALING 3`
-
-Then Define the array listing all the LEDs you want to override in your `.c`:
-
-```c
-const is31_led PROGMEM g_is31_scaling[ISSI_MANUAL_SCALING] = {
-/* LED Index
- * | Scaling
- * | | */
- {5, 120},
- {9, 120},
- ....
-}
-```
-
-Where LED Index is the position of the LED in the `g_is31_leds` array. The `scaling` value between 0 and 255 to be written to the Scaling Register.
-
----
-
## Common Configuration {#common-configuration}
From this point forward the configuration is the same for all the drivers. The `led_config_t` struct provides a key electrical matrix to led index lookup table, what the physical position of each LED is on the board, and what type of key or usage the LED if the LED represents. Here is a brief example:
@@ -300,18 +156,11 @@ These modes introduce additional logic that can increase firmware size.
## Custom LED Matrix Effects {#custom-led-matrix-effects}
-By setting `LED_MATRIX_CUSTOM_USER` (and/or `LED_MATRIX_CUSTOM_KB`) in `rules.mk`, new effects can be defined directly from userspace, without having to edit any QMK core files.
-
-To declare new effects, create a new `led_matrix_user/kb.inc` that looks something like this:
-
-`led_matrix_user.inc` should go in the root of the keymap directory.
-`led_matrix_kb.inc` should go in the root of the keyboard directory.
-
-To use custom effects in your code, simply prepend `LED_MATRIX_CUSTOM_` to the effect name specified in `LED_MATRIX_EFFECT()`. For example, an effect declared as `LED_MATRIX_EFFECT(my_cool_effect)` would be referenced with:
+By setting `LED_MATRIX_CUSTOM_USER = yes` in `rules.mk`, new effects can be defined directly from your keymap or userspace, without having to edit any QMK core files. To declare new effects, create a `led_matrix_user.inc` file in the user keymap directory or userspace folder.
-```c
-led_matrix_mode(led_MATRIX_CUSTOM_my_cool_effect);
-```
+::: tip
+Hardware maintainers who want to limit custom effects to a specific keyboard can create a `led_matrix_kb.inc` file in the root of the keyboard directory, and add `LED_MATRIX_CUSTOM_KB = yes` to the keyboard level `rules.mk`.
+:::
```c
// !!! DO NOT ADD #pragma once !!! //
@@ -356,6 +205,12 @@ static bool my_cool_effect2(effect_params_t* params) {
#endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
```
+To switch to your custom effect programmatically, simply call `led_matrix_mode()` and prepend `LED_MATRIX_CUSTOM_` to the effect name your specified in `LED_MATRIX_EFFECT()`. For example, an effect declared as `LED_MATRIX_EFFECT(my_cool_effect)` would be referenced with:
+
+```c
+led_matrix_mode(LED_MATRIX_CUSTOM_my_cool_effect);
+```
+
For inspiration and examples, check out the built-in effects under `quantum/led_matrix/animations/`.
@@ -381,55 +236,6 @@ For inspiration and examples, check out the built-in effects under `quantum/led_
The EEPROM for it is currently shared with the RGB Matrix system (it's generally assumed only one feature would be used at a time).
-### Direct Operation {#direct-operation}
-|Function |Description |
-|--------------------------------------------|-------------|
-|`led_matrix_set_value_all(v)` |Set all of the LEDs to the given value, where `v` is between 0 and 255 (not written to EEPROM) |
-|`led_matrix_set_value(index, v)` |Set a single LED to the given value, where `v` is between 0 and 255, and `index` is between 0 and `LED_MATRIX_LED_COUNT` (not written to EEPROM) |
-
-### Disable/Enable Effects {#disable-enable-effects}
-|Function |Description |
-|--------------------------------------------|-------------|
-|`led_matrix_toggle()` |Toggle effect range LEDs between on and off |
-|`led_matrix_toggle_noeeprom()` |Toggle effect range LEDs between on and off (not written to EEPROM) |
-|`led_matrix_enable()` |Turn effect range LEDs on, based on their previous state |
-|`led_matrix_enable_noeeprom()` |Turn effect range LEDs on, based on their previous state (not written to EEPROM) |
-|`led_matrix_disable()` |Turn effect range LEDs off, based on their previous state |
-|`led_matrix_disable_noeeprom()` |Turn effect range LEDs off, based on their previous state (not written to EEPROM) |
-
-### Change Effect Mode {#change-effect-mode}
-|Function |Description |
-|--------------------------------------------|-------------|
-|`led_matrix_mode(mode)` |Set the mode, if LED animations are enabled |
-|`led_matrix_mode_noeeprom(mode)` |Set the mode, if LED animations are enabled (not written to EEPROM) |
-|`led_matrix_step()` |Change the mode to the next LED animation in the list of enabled LED animations |
-|`led_matrix_step_noeeprom()` |Change the mode to the next LED animation in the list of enabled LED animations (not written to EEPROM) |
-|`led_matrix_step_reverse()` |Change the mode to the previous LED animation in the list of enabled LED animations |
-|`led_matrix_step_reverse_noeeprom()` |Change the mode to the previous LED animation in the list of enabled LED animations (not written to EEPROM) |
-|`led_matrix_increase_speed()` |Increase the speed of the animations |
-|`led_matrix_increase_speed_noeeprom()` |Increase the speed of the animations (not written to EEPROM) |
-|`led_matrix_decrease_speed()` |Decrease the speed of the animations |
-|`led_matrix_decrease_speed_noeeprom()` |Decrease the speed of the animations (not written to EEPROM) |
-|`led_matrix_set_speed(speed)` |Set the speed of the animations to the given value where `speed` is between 0 and 255 |
-|`led_matrix_set_speed_noeeprom(speed)` |Set the speed of the animations to the given value where `speed` is between 0 and 255 (not written to EEPROM) |
-
-### Change Value {#change-value}
-|Function |Description |
-|--------------------------------------------|-------------|
-|`led_matrix_increase_val()` |Increase the value for effect range LEDs. This wraps around at maximum value |
-|`led_matrix_increase_val_noeeprom()` |Increase the value for effect range LEDs. This wraps around at maximum value (not written to EEPROM) |
-|`led_matrix_decrease_val()` |Decrease the value for effect range LEDs. This wraps around at minimum value |
-|`led_matrix_decrease_val_noeeprom()` |Decrease the value for effect range LEDs. This wraps around at minimum value (not written to EEPROM) |
-
-### Query Current Status {#query-current-status}
-|Function |Description |
-|---------------------------------|---------------------------|
-|`led_matrix_is_enabled()` |Gets current on/off status |
-|`led_matrix_get_mode()` |Gets current mode |
-|`led_matrix_get_val()` |Gets current val |
-|`led_matrix_get_speed()` |Gets current speed |
-|`led_matrix_get_suspend_state()` |Gets current suspend state |
-
## Callbacks {#callbacks}
### Indicators {#indicators}
@@ -453,3 +259,293 @@ void led_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
return false;
}
```
+
+## API {#api}
+
+### `void led_matrix_toggle(void)` {#api-led-matrix-toggle}
+
+Toggle LED Matrix on or off.
+
+---
+
+### `void led_matrix_toggle_noeeprom(void)` {#api-led-matrix-toggle-noeeprom}
+
+Toggle LED Matrix on or off. New state is not written to EEPROM.
+
+---
+
+### `void led_matrix_enable(void)` {#api-led-matrix-enable}
+
+Turn LED Matrix on.
+
+---
+
+### `void led_matrix_enable_noeeprom(void)` {#api-led-matrix-enable-noeeprom}
+
+Turn LED Matrix on. New state is not written to EEPROM.
+
+---
+
+### `void led_matrix_disable(void)` {#api-led-matrix-disable}
+
+Turn LED Matrix off.
+
+---
+
+### `void led_matrix_disable_noeeprom(void)` {#api-led-matrix-disable-noeeprom}
+
+Turn LED Matrix off. New state is not written to EEPROM.
+
+---
+
+### `bool led_matrix_is_enabled(void)` {#api-led-matrix-is-enabled}
+
+Get the current enabled state of LED Matrix.
+
+#### Return Value {#api-led-matrix-is-enabled-return}
+
+`true` if LED Matrix is enabled.
+
+---
+
+### `void led_matrix_set_value(uint8_t index, uint8_t v)` {#led-matrix-set-value}
+
+Set the brightness of a single LED.
+
+This function can only be run from within an effect or indicator callback, otherwise the currently running animation will simply overwrite it on the next frame.
+
+#### Arguments {#api-led-matrix-set-value-arguments}
+
+ - `uint8_t index`
+ The LED index, from 0 to `LED_MATRIX_LED_COUNT - 1`.
+ - `uint8_t v`
+ The brightness value to set.
+
+---
+
+### `void led_matrix_set_value_all(uint8_t v)` {#api-led-matrix-set-value-all}
+
+Set the brightness of all LEDs.
+
+This function can only be run from within an effect or indicator callback, otherwise the currently running animation will simply overwrite it on the next frame.
+
+#### Arguments {#api-led-matrix-set-value-all-arguments}
+
+ - `uint8_t v`
+ The brightness value to set.
+
+---
+
+### `void led_matrix_mode(uint8_t mode)` {#api-led-matrix-mode}
+
+Set the currently running effect.
+
+#### Arguments {#api-led-matrix-mode-arguments}
+
+ - `uint8_t mode`
+ The effect to switch to.
+
+---
+
+### `void led_matrix_mode_noeeprom(uint8_t mode)` {#api-led-matrix-mode-noeeprom}
+
+Set the currently running effect. New state is not written to EEPROM.
+
+#### Arguments {#api-led-matrix-mode-noeeprom-arguments}
+
+ - `uint8_t mode`
+ The effect to switch to.
+
+---
+
+### `void led_matrix_step(void)` {#api-led-matrix-step}
+
+Move to the next enabled effect.
+
+---
+
+### `void led_matrix_step_noeeprom(void)` {#api-led-matrix-step-noeeprom}
+
+Move to the next enabled effect. New state is not written to EEPROM.
+
+---
+
+### `void led_matrix_step_reverse(void)` {#api-led-matrix-step-reverse}
+
+Move to the previous enabled effect.
+
+---
+
+### `void led_matrix_step_reverse_noeeprom(void)` {#api-led-matrix-step-reverse-noeeprom}
+
+Move to the previous enabled effect. New state is not written to EEPROM.
+
+---
+
+### `uint8_t led_matrix_get_mode(void)` {#api-led-matrix-get-mode}
+
+Get the currently running effect.
+
+#### Return Value {#api-led-matrix-get-mode-return}
+
+The index of the currently running effect.
+
+---
+
+### `void val_matrix_increase_val(void)` {#api-led-matrix-increase-val}
+
+Increase the global effect brightness.
+
+---
+
+### `void led_matrix_increase_val_noeeprom(void)` {#api-led-matrix-increase-val-noeeprom}
+
+Increase the global effect brightness. New state is not written to EEPROM.
+
+---
+
+### `void led_matrix_decrease_val(void)` {#api-led-matrix-decrease-val}
+
+Decrease the global effect brightness.
+
+---
+
+### `void led_matrix_decrease_val_noeeprom(void)` {#api-led-matrix-decrease-val-noeeprom}
+
+Decrease the global effect brightness. New state is not written to EEPROM.
+
+---
+
+### `uint8_t led_matrix_get_val(void)` {#api-led-matrix-get-val}
+
+Get the current global effect brightness.
+
+#### Return Value {#api-led-matrix-get-val-return}
+
+The current brightness value, from 0 to 255.
+
+---
+
+### `void led_matrix_increase_speed(void)` {#api-led-matrix-increase-speed}
+
+Increase the effect speed.
+
+---
+
+### `void led_matrix_increase_speed_noeeprom(void)` {#api-led-matrix-increase-speed-noeeprom}
+
+Increase the effect speed. New state is not written to EEPROM.
+
+---
+
+### `void led_matrix_decrease_speed(void)` {#api-led-matrix-decrease-speed}
+
+Decrease the effect speed.
+
+---
+
+### `void led_matrix_decrease_speed_noeeprom(void)` {#api-led-matrix-decrease-speed-noeeprom}
+
+Decrease the effect speed. New state is not written to EEPROM.
+
+---
+
+### `void led_matrix_set_speed(uint8_t speed)` {#api-led-matrix-set-speed}
+
+Set the effect speed.
+
+#### Arguments {#api-led-matrix-set-speed-arguments}
+
+ - `uint8_t speed`
+ The new speed to set, from 0 to 255.
+
+---
+
+### `void led_matrix_set_speed_noeeprom(uint8_t speed)` {#api-led-matrix-set-speed-noeeprom}
+
+Set the effect speed. New state is not written to EEPROM.
+
+#### Arguments {#api-led-matrix-set-speed-noeeprom-arguments}
+
+ - `uint8_t speed`
+ The new speed to set, from 0 to 255.
+
+---
+
+### `uint8_t led_matrix_get_speed(void)` {#api-led-matrix-get-speed}
+
+Get the current effect speed.
+
+#### Return Value {#api-led-matrix-get-speed-return}
+
+The current effect speed, from 0 to 255.
+
+---
+
+### `void led_matrix_reload_from_eeprom(void)` {#api-led-matrix-reload-from-eeprom}
+
+Reload the effect configuration (enabled, mode and brightness) from EEPROM.
+
+---
+
+### `bool led_matrix_get_suspend_state(void)` {#api-led-matrix-get-suspend-state}
+
+Get the current suspend state of LED Matrix.
+
+#### Return Value {#api-led-matrix-get-suspend-state-return}
+
+`true` if LED Matrix is currently in the suspended state.
+
+---
+
+### `bool led_matrix_indicators_kb(void)` {#api-led-matrix-indicators-kb}
+
+Keyboard-level callback, invoked after current animation frame is rendered but before it is flushed to the LEDs.
+
+#### Return Value {#api-led-matrix-indicators-kb-return}
+
+Currently unused.
+
+---
+
+### `bool led_matrix_indicators_user(void)` {#api-led-matrix-indicators-user}
+
+Keymap-level callback, invoked after current animation frame is rendered but before it is flushed to the LEDs.
+
+#### Return Value {#api-led-matrix-indicators-user-return}
+
+`true` to continue running the keyboard-level callback.
+
+---
+
+### `bool led_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max)` {#api-led-matrix-indicators-advanced-kb}
+
+Keyboard-level callback, invoked after current animation frame is rendered but before it is flushed to the LEDs.
+
+### Arguments {#api-led-matrix-indicators-advanced-kb-arguments}
+
+ - `uint8_t led_min`
+ The index of the first LED in this batch.
+ - `uint8_t led_max`
+ The index of the last LED in this batch.
+
+#### Return Value {#api-led-matrix-indicators-advanced-kb-return}
+
+Currently unused.
+
+---
+
+### `bool led_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max)` {#api-led-matrix-indicators-advanced-user}
+
+Keymap-level callback, invoked after current animation frame is rendered but before it is flushed to the LEDs.
+
+### Arguments {#api-led-matrix-indicators-advanced-user-arguments}
+
+ - `uint8_t led_min`
+ The index of the first LED in this batch.
+ - `uint8_t led_max`
+ The index of the last LED in this batch.
+
+#### Return Value {#api-led-matrix-indicators-advanced-user-return}
+
+`true` to continue running the keyboard-level callback.
diff --git a/docs/features/mouse_keys.md b/docs/features/mouse_keys.md
index c2b3e98f4241..86b50fa9c8d1 100644
--- a/docs/features/mouse_keys.md
+++ b/docs/features/mouse_keys.md
@@ -18,27 +18,27 @@ MOUSEKEY_ENABLE = yes
In your keymap you can use the following keycodes to map key presses to mouse actions:
-|Key |Aliases |Description |
-|----------------|---------|-----------------|
-|`KC_MS_UP` |`KC_MS_U`|Move cursor up |
-|`KC_MS_DOWN` |`KC_MS_D`|Move cursor down |
-|`KC_MS_LEFT` |`KC_MS_L`|Move cursor left |
-|`KC_MS_RIGHT` |`KC_MS_R`|Move cursor right|
-|`KC_MS_BTN1` |`KC_BTN1`|Press button 1 |
-|`KC_MS_BTN2` |`KC_BTN2`|Press button 2 |
-|`KC_MS_BTN3` |`KC_BTN3`|Press button 3 |
-|`KC_MS_BTN4` |`KC_BTN4`|Press button 4 |
-|`KC_MS_BTN5` |`KC_BTN5`|Press button 5 |
-|`KC_MS_BTN6` |`KC_BTN6`|Press button 6 |
-|`KC_MS_BTN7` |`KC_BTN7`|Press button 7 |
-|`KC_MS_BTN8` |`KC_BTN8`|Press button 8 |
-|`KC_MS_WH_UP` |`KC_WH_U`|Move wheel up |
-|`KC_MS_WH_DOWN` |`KC_WH_D`|Move wheel down |
-|`KC_MS_WH_LEFT` |`KC_WH_L`|Move wheel left |
-|`KC_MS_WH_RIGHT`|`KC_WH_R`|Move wheel right |
-|`KC_MS_ACCEL0` |`KC_ACL0`|Set speed to 0 |
-|`KC_MS_ACCEL1` |`KC_ACL1`|Set speed to 1 |
-|`KC_MS_ACCEL2` |`KC_ACL2`|Set speed to 2 |
+|Key |Aliases |Description |
+|-------------------------|---------|---------------------------|
+|`QK_MOUSE_CURSOR_UP` |`MS_UP` |Mouse cursor up |
+|`QK_MOUSE_CURSOR_DOWN` |`MS_DOWN`|Mouse cursor down |
+|`QK_MOUSE_CURSOR_LEFT` |`MS_LEFT`|Mouse cursor left |
+|`QK_MOUSE_CURSOR_RIGHT` |`MS_RGHT`|Mouse cursor right |
+|`QK_MOUSE_BUTTON_1` |`MS_BTN1`|Mouse button 1 |
+|`QK_MOUSE_BUTTON_2` |`MS_BTN2`|Mouse button 2 |
+|`QK_MOUSE_BUTTON_3` |`MS_BTN3`|Mouse button 3 |
+|`QK_MOUSE_BUTTON_4` |`MS_BTN4`|Mouse button 4 |
+|`QK_MOUSE_BUTTON_5` |`MS_BTN5`|Mouse button 5 |
+|`QK_MOUSE_BUTTON_6` |`MS_BTN6`|Mouse button 6 |
+|`QK_MOUSE_BUTTON_7` |`MS_BTN7`|Mouse button 7 |
+|`QK_MOUSE_BUTTON_8` |`MS_BTN8`|Mouse button 8 |
+|`QK_MOUSE_WHEEL_UP` |`MS_WHLU`|Mouse wheel up |
+|`QK_MOUSE_WHEEL_DOWN` |`MS_WHLD`|Mouse wheel down |
+|`QK_MOUSE_WHEEL_LEFT` |`MS_WHLL`|Mouse wheel left |
+|`QK_MOUSE_WHEEL_RIGHT` |`MS_WHLR`|Mouse wheel right |
+|`QK_MOUSE_ACCELERATION_0`|`MS_ACL0`|Set mouse acceleration to 0|
+|`QK_MOUSE_ACCELERATION_1`|`MS_ACL1`|Set mouse acceleration to 1|
+|`QK_MOUSE_ACCELERATION_2`|`MS_ACL2`|Set mouse acceleration to 2|
## Configuring mouse keys
@@ -106,17 +106,17 @@ Tips:
### Constant mode
-In this mode you can define multiple different speeds for both the cursor and the mouse wheel. There is no acceleration. `KC_ACL0`, `KC_ACL1` and `KC_ACL2` change the cursor and scroll speed to their respective setting.
+In this mode you can define multiple different speeds for both the cursor and the mouse wheel. There is no acceleration. `MS_ACL0`, `MS_ACL1` and `MS_ACL2` change the cursor and scroll speed to their respective setting.
You can choose whether speed selection is momentary or tap-to-select:
* **Momentary:** The chosen speed is only active while you hold the respective key. When the key is raised, mouse keys returns to the unmodified speed.
-* **Tap-to-select:** The chosen speed is activated when you press the respective key and remains active even after the key has been raised. The default speed is that of `KC_ACL1`. There is no unmodified speed.
+* **Tap-to-select:** The chosen speed is activated when you press the respective key and remains active even after the key has been raised. The default speed is that of `MS_ACL1`. There is no unmodified speed.
The default speeds from slowest to fastest are as follows:
-* **Momentary:** `KC_ACL0` < `KC_ACL1` < *unmodified* < `KC_ACL2`
-* **Tap-to-select:** `KC_ACL0` < `KC_ACL1` < `KC_ACL2`
+* **Momentary:** `MS_ACL0` < `MS_ACL1` < *unmodified* < `MS_ACL2`
+* **Tap-to-select:** `MS_ACL0` < `MS_ACL1` < `MS_ACL2`
To use constant speed mode, you must at least define `MK_3_SPEED` in your keymap’s `config.h` file:
@@ -138,32 +138,32 @@ Use the following settings if you want to adjust cursor movement or scrolling:
|`MK_MOMENTARY_ACCEL` |*Not defined*|Enable momentary speed selection |
|`MK_C_OFFSET_UNMOD` |16 |Cursor offset per movement (unmodified) |
|`MK_C_INTERVAL_UNMOD`|16 |Time between cursor movements (unmodified) |
-|`MK_C_OFFSET_0` |1 |Cursor offset per movement (`KC_ACL0`) |
-|`MK_C_INTERVAL_0` |32 |Time between cursor movements (`KC_ACL0`) |
-|`MK_C_OFFSET_1` |4 |Cursor offset per movement (`KC_ACL1`) |
-|`MK_C_INTERVAL_1` |16 |Time between cursor movements (`KC_ACL1`) |
-|`MK_C_OFFSET_2` |32 |Cursor offset per movement (`KC_ACL2`) |
-|`MK_C_INTERVAL_2` |16 |Time between cursor movements (`KC_ACL2`) |
+|`MK_C_OFFSET_0` |1 |Cursor offset per movement (`MS_ACL0`) |
+|`MK_C_INTERVAL_0` |32 |Time between cursor movements (`MS_ACL0`) |
+|`MK_C_OFFSET_1` |4 |Cursor offset per movement (`MS_ACL1`) |
+|`MK_C_INTERVAL_1` |16 |Time between cursor movements (`MS_ACL1`) |
+|`MK_C_OFFSET_2` |32 |Cursor offset per movement (`MS_ACL2`) |
+|`MK_C_INTERVAL_2` |16 |Time between cursor movements (`MS_ACL2`) |
|`MK_W_OFFSET_UNMOD` |1 |Scroll steps per scroll action (unmodified)|
|`MK_W_INTERVAL_UNMOD`|40 |Time between scroll steps (unmodified) |
-|`MK_W_OFFSET_0` |1 |Scroll steps per scroll action (`KC_ACL0`) |
-|`MK_W_INTERVAL_0` |360 |Time between scroll steps (`KC_ACL0`) |
-|`MK_W_OFFSET_1` |1 |Scroll steps per scroll action (`KC_ACL1`) |
-|`MK_W_INTERVAL_1` |120 |Time between scroll steps (`KC_ACL1`) |
-|`MK_W_OFFSET_2` |1 |Scroll steps per scroll action (`KC_ACL2`) |
-|`MK_W_INTERVAL_2` |20 |Time between scroll steps (`KC_ACL2`) |
+|`MK_W_OFFSET_0` |1 |Scroll steps per scroll action (`MS_ACL0`) |
+|`MK_W_INTERVAL_0` |360 |Time between scroll steps (`MS_ACL0`) |
+|`MK_W_OFFSET_1` |1 |Scroll steps per scroll action (`MS_ACL1`) |
+|`MK_W_INTERVAL_1` |120 |Time between scroll steps (`MS_ACL1`) |
+|`MK_W_OFFSET_2` |1 |Scroll steps per scroll action (`MS_ACL2`) |
+|`MK_W_INTERVAL_2` |20 |Time between scroll steps (`MS_ACL2`) |
### Combined mode
-This mode functions like **Accelerated** mode, however, you can hold `KC_ACL0`, `KC_ACL1` and `KC_ACL2`
+This mode functions like **Accelerated** mode, however, you can hold `MS_ACL0`, `MS_ACL1` and `MS_ACL2`
to momentarily (while held) set the cursor and scroll speeds to constant speeds. When no acceleration
keys are held, this mode is identical to **Accelerated** mode, and can be modified using all of the
relevant settings.
-* **KC_ACL0:** This acceleration sets your cursor to the slowest possible speed. This is useful for very
+* **MS_ACL0:** This acceleration sets your cursor to the slowest possible speed. This is useful for very
small and detailed movements of the cursor.
-* **KC_ACL1:** This acceleration sets your cursor to half the maximum (user defined) speed.
-* **KC_ACL2:** This acceleration sets your cursor to the maximum (computer defined) speed. This is
+* **MS_ACL1:** This acceleration sets your cursor to half the maximum (user defined) speed.
+* **MS_ACL2:** This acceleration sets your cursor to the maximum (computer defined) speed. This is
useful for moving the cursor large distances without much accuracy.
To use combined speed mode, you must at least define `MK_COMBINED` in your keymap’s `config.h` file:
@@ -203,6 +203,21 @@ Tips:
* Keep `MOUSEKEY_MOVE_DELTA` at 1. This allows precise movements before the gliding effect starts.
* Mouse wheel options are the same as the default accelerated mode, and do not use inertia.
+### Overlapping mouse key control
+
+When additional overlapping mouse key is pressed, the mouse cursor will continue in a new direction with the same acceleration. The following settings can be used to reset the acceleration with new overlapping keys for more precise control if desired:
+
+|Define |Default |Description |
+|------------------------------|----------------------|-----------------------------------------------------------------------|
+|`MOUSEKEY_OVERLAP_RESET` |undefined |Enables overlapping mouse key control |
+|`MOUSEKEY_OVERLAP_MOVE_DELTA` |`MOUSEKEY_MOVE_DELTA` |Step size of reset movement acceleration |
+|`MOUSEKEY_OVERLAP_WHEEL_DELTA`|`MOUSEKEY_WHEEL_DELTA`|Step size of reset mouse wheel acceleration |
+|`MOUSEKEY_OVERLAP_INTERVAL` |`MOUSEKEY_INTERVAL` |Reset time between cursor movements in milliseconds (Kinetic mode only)|
+
+::: tip
+This feature will not be applied on Inertial mode
+:::
+
## Use with PS/2 Mouse and Pointing Device
Mouse keys button state is shared with [PS/2 mouse](ps2_mouse) and [pointing device](pointing_device) so mouse keys button presses can be used for clicks and drags.
diff --git a/docs/features/os_detection.md b/docs/features/os_detection.md
index d0556d2549d1..880e88d4b934 100644
--- a/docs/features/os_detection.md
+++ b/docs/features/os_detection.md
@@ -70,17 +70,33 @@ The process is done in steps, generating a number of intermediate results until
We therefore resort to debouncing the result until it has been stable for a given amount of milliseconds.
This amount can be configured, in case your board is not stable within the default debouncing time of 200ms.
-## KVM and USB switches
-
-Some KVM and USB switches may not trigger the USB controller on the keyboard to fully reset upon switching machines.
-If your keyboard does not redetect the OS in this situation, you can force the keyboard to reset when the USB initialization event is detected, forcing the USB controller to be reconfigured.
-
## Configuration Options
-* `#define OS_DETECTION_DEBOUNCE 200`
+* `#define OS_DETECTION_DEBOUNCE 250`
* defined the debounce time for OS detection, in milliseconds
+ * defaults to 250ms
* `#define OS_DETECTION_KEYBOARD_RESET`
- * enables the keyboard reset upon a USB device reinitilization, such as switching devices on some KVMs
+ * enables the keyboard reset upon a USB device reinitilization
+ * this setting may help with detection issues when switching between devices on some KVMs (see [Troubleshooting](#troubleshooting))
+* `#define OS_DETECTION_SINGLE_REPORT`
+ * allows the report callbacks to be called only once, when the OS detection result is considered stable
+ * subsequent changes in the detection results, if any, are ignored
+ * this setting may help with delayed stability issues when switching devices on some KVMs (see [Troubleshooting](#troubleshooting))
+
+## Troubleshooting
+
+Some KVMs and USB switches may cause issues when the OS detection is turned on.
+Here is a list of common issues and how to fix them:
+
+* **Problem**: _keyboard won't redetect the OS when switching between machines using a KVM_
+ * **Explanation**: some KVMs keep the USB controller powered on during the switch and OS
+ detection happens when the USB device description is being assembled.
+ * **Solution**: use `OS_DETECTION_KEYBOARD_RESET` to force the keyboard to reset upon switching.
+* **Problem**: _keyboard OS detection callback gets invoked even minuted after startup_
+ * **Explanation**: some OSes, notably macOS on ARM-based Macs, may cause this behavior.
+ The actual cause is not known at this time.'
+ * **Solution**: use `OS_DETECTION_SINGLE_REPORT` to suppress repeated callback invocations.
+
## Debug
diff --git a/docs/features/pointing_device.md b/docs/features/pointing_device.md
index a6bf521a184c..0ecf82c8df67 100644
--- a/docs/features/pointing_device.md
+++ b/docs/features/pointing_device.md
@@ -394,6 +394,7 @@ Ideally, new sensor hardware should be added to `drivers/sensors/` and `quantum/
| Setting | Description | Default |
| ---------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | ------------- |
| `MOUSE_EXTENDED_REPORT` | (Optional) Enables support for extended mouse reports. (-32767 to 32767, instead of just -127 to 127). | _not defined_ |
+| `WHEEL_EXTENDED_REPORT` | (Optional) Enables support for extended wheel reports. (-32767 to 32767, instead of just -127 to 127). | _not defined_ |
| `POINTING_DEVICE_ROTATION_90` | (Optional) Rotates the X and Y data by 90 degrees. | _not defined_ |
| `POINTING_DEVICE_ROTATION_180` | (Optional) Rotates the X and Y data by 180 degrees. | _not defined_ |
| `POINTING_DEVICE_ROTATION_270` | (Optional) Rotates the X and Y data by 270 degrees. | _not defined_ |
diff --git a/docs/features/ps2_mouse.md b/docs/features/ps2_mouse.md
index 90f4cca82757..52443c3ce29b 100644
--- a/docs/features/ps2_mouse.md
+++ b/docs/features/ps2_mouse.md
@@ -90,18 +90,22 @@ PS2_ENABLE = yes
PS2_DRIVER = interrupt
```
-In your keyboard config.h:
+In your keyboard `config.h`:
```c
#define PS2_CLOCK_PIN A8
#define PS2_DATA_PIN A9
```
-And in the chibios specifig halconf.h:
+And in the ChibiOS specific `halconf.h`:
+
```c
-#define PAL_USE_CALLBACKS TRUE
-```
+#pragma once
+#define PAL_USE_CALLBACKS TRUE // [!code focus]
+
+#include_next
+```
### USART Version {#usart-version}
diff --git a/docs/features/repeat_key.md b/docs/features/repeat_key.md
index 53495e0f4d6c..7f2bdc44e655 100644
--- a/docs/features/repeat_key.md
+++ b/docs/features/repeat_key.md
@@ -60,10 +60,10 @@ with mods, like Ctrl + Left ↔ Ctrl + Right Arrow.
|`KC_UP` ↔ `KC_DOWN` | Up ↔ Down Arrow |
|`KC_HOME` ↔ `KC_END` | Home ↔ End |
|`KC_PGUP` ↔ `KC_PGDN` | Page Up ↔ Page Down |
-|`KC_MS_L` ↔ `KC_MS_R` | Mouse Cursor Left ↔ Right |
-|`KC_MS_U` ↔ `KC_MS_D` | Mouse Cursor Up ↔ Down |
-|`KC_WH_L` ↔ `KC_WH_R` | Mouse Wheel Left ↔ Right |
-|`KC_WH_U` ↔ `KC_WH_D` | Mouse Wheel Up ↔ Down |
+|`MS_LEFT` ↔ `MS_RGHT` | Mouse Cursor Left ↔ Right |
+|`MS_UP` ↔ `MS_DOWN` | Mouse Cursor Up ↔ Down |
+|`MS_WHLL` ↔ `MS_WHLR` | Mouse Wheel Left ↔ Right |
+|`MS_WHLU` ↔ `MS_WHLD` | Mouse Wheel Up ↔ Down |
**Misc**
diff --git a/docs/features/rgb_matrix.md b/docs/features/rgb_matrix.md
index f7f693f239fa..0e53ce9c35a9 100644
--- a/docs/features/rgb_matrix.md
+++ b/docs/features/rgb_matrix.md
@@ -4,543 +4,35 @@ This feature allows you to use RGB LED matrices driven by external drivers. It h
If you want to use single color LED's you should use the [LED Matrix Subsystem](led_matrix) instead.
-## Driver configuration {#driver-configuration}
----
-### IS31FL3731 {#is31fl3731}
-
-There is basic support for addressable RGB matrix lighting with the I2C IS31FL3731 RGB controller. To enable it, add this to your `rules.mk`:
+## Driver Configuration {#driver-configuration}
+
+RGB Matrix is an abstraction layer on top of an underlying LED driver API. The list of supported LED drivers is below; see the respective documentation for information on how to configure the driver.
+
+|Driver |Max LEDs|
+|-------------------------------------|--------|
+|[APA102](../drivers/apa102) |? |
+|[AW20216S](../drivers/aw20216s) |72 |
+|[IS31FL3218](../drivers/is31fl3218) |6 |
+|[IS31FL3236](../drivers/is31fl3236) |12 |
+|[IS31FL3729](../drivers/is31fl3729) |45 |
+|[IS31FL3731](../drivers/is31fl3731) |48 |
+|[IS31FL3733](../drivers/is31fl3733) |64 |
+|[IS31FL3736](../drivers/is31fl3736) |32 |
+|[IS31FL3737](../drivers/is31fl3737) |48 |
+|[IS31FL3741](../drivers/is31fl3741) |117 |
+|[IS31FL3742A](../drivers/is31fl3742a)|60 |
+|[IS31FL3743A](../drivers/is31fl3743a)|66 |
+|[IS31FL3745](../drivers/is31fl3745) |48 |
+|[IS31FL3746A](../drivers/is31fl3746a)|24 |
+|[SNLED27351](../drivers/snled27351) |64 |
+|[WS2812](../drivers/ws2812) |? |
+
+To assign the RGB Matrix driver, add the following to your `rules.mk`, for example:
```make
-RGB_MATRIX_ENABLE = yes
-RGB_MATRIX_DRIVER = is31fl3731
+RGB_MATRIX_DRIVER = is31fl3218
```
-You can use between 1 and 4 IS31FL3731 IC's. Do not specify `DRIVER_ADDR_` defines for IC's that are not present on your keyboard. You can define the following items in `config.h`:
-
-| Variable | Description | Default |
-|----------|-------------|---------|
-| `IS31FL3731_I2C_TIMEOUT` | (Optional) How long to wait for i2c messages, in milliseconds | 100 |
-| `IS31FL3731_I2C_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 |
-| `IS31FL3731_DEGHOST` | (Optional) Set this define to enable de-ghosting by halving Vcc during blanking time | |
-| `RGB_MATRIX_LED_COUNT` | (Required) How many RGB lights are present across all drivers | |
-| `IS31FL3731_I2C_ADDRESS_1` | (Required) Address for the first RGB driver | |
-| `IS31FL3731_I2C_ADDRESS_2` | (Optional) Address for the second RGB driver | |
-| `IS31FL3731_I2C_ADDRESS_3` | (Optional) Address for the third RGB driver | |
-| `IS31FL3731_I2C_ADDRESS_4` | (Optional) Address for the fourth RGB driver | |
-
-Here is an example using 2 drivers.
-
-```c
-// This is a 7-bit address, that gets left-shifted and bit 0
-// set to 0 for write, 1 for read (as per I2C protocol)
-// The address will vary depending on your wiring:
-// 00 AD <-> GND
-// 01 AD <-> SCL
-// 10 AD <-> SDA
-// 11 AD <-> VCC
-// ADDR represents A1:A0 of the 7-bit address.
-// The result is: 0b11101(ADDR)
-#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
-#define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA
-
-#define DRIVER_1_LED_TOTAL 25
-#define DRIVER_2_LED_TOTAL 24
-#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
-```
-
-::: warning
-Note the parentheses, this is so when `RGB_MATRIX_LED_COUNT` is used in code and expanded, the values are added together before any additional math is applied to them. As an example, `rand() % (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)` will give very different results than `rand() % DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL`.
-:::
-
-For split keyboards using `RGB_MATRIX_SPLIT` with an LED driver, you can either have the same driver address or different driver addresses. If using different addresses, use `IS31FL3731_I2C_ADDRESS_1` for one and `IS31FL3731_I2C_ADDRESS_2` for the other one. Then, in `g_is31fl3731_leds`, fill out the correct driver index (0 or 1). If using one address, use `IS31FL3731_I2C_ADDRESS_1` for both, and use index 0 for `g_is31fl3731_leds`.
-
-Define these arrays listing all the LEDs in your `.c`:
-
-```c
-const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
- * driver
- * | R location
- * | | G location
- * | | | B location
- * | | | | */
- {0, C1_3, C2_3, C3_3},
- ....
-}
-```
-
-Where `Cx_y` is the location of the LED in the matrix defined by [the datasheet](https://www.issi.com/WW/pdf/31FL3731.pdf) and the header file `drivers/led/issi/is31fl3731.h`. The `driver` is the index of the driver you defined in your `config.h` (`0`, `1`, `2`, or `3`).
-
----
-### IS31FL3733 {#is31fl3733}
-
-There is basic support for addressable RGB matrix lighting with the I2C IS31FL3733 RGB controller. To enable it, add this to your `rules.mk`:
-
-```make
-RGB_MATRIX_ENABLE = yes
-RGB_MATRIX_DRIVER = is31fl3733
-```
-
-You can use between 1 and 4 IS31FL3733 IC's. Do not specify `DRIVER_ADDR_` defines for IC's that are not present on your keyboard. You can define the following items in `config.h`:
-
-| Variable | Description | Default |
-|----------|-------------|---------|
-| `IS31FL3733_I2C_TIMEOUT` | (Optional) How long to wait for i2c messages, in milliseconds | 100 |
-| `IS31FL3733_I2C_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 |
-| `IS31FL3733_PWM_FREQUENCY` | (Optional) PWM Frequency Setting - IS31FL3733B only | 0 |
-| `IS31FL3733_GLOBALCURRENT` | (Optional) Configuration for the Global Current Register | 0xFF |
-| `IS31FL3733_SWPULLUP` | (Optional) Set the value of the SWx lines on-chip de-ghosting resistors | PUR_0R (Disabled) |
-| `IS31FL3733_CSPULLUP` | (Optional) Set the value of the CSx lines on-chip de-ghosting resistors | PUR_0R (Disabled) |
-| `RGB_MATRIX_LED_COUNT` | (Required) How many RGB lights are present across all drivers | |
-| `IS31FL3733_I2C_ADDRESS_1` | (Required) Address for the first RGB driver | |
-| `IS31FL3733_I2C_ADDRESS_2` | (Optional) Address for the second RGB driver | |
-| `IS31FL3733_I2C_ADDRESS_3` | (Optional) Address for the third RGB driver | |
-| `IS31FL3733_I2C_ADDRESS_4` | (Optional) Address for the fourth RGB driver | |
-| `IS31FL3733_SYNC_1` | (Optional) Sync configuration for the first RGB driver | 0 |
-| `IS31FL3733_SYNC_2` | (Optional) Sync configuration for the second RGB driver | 0 |
-| `IS31FL3733_SYNC_3` | (Optional) Sync configuration for the third RGB driver | 0 |
-| `IS31FL3733_SYNC_4` | (Optional) Sync configuration for the fourth RGB driver | 0 |
-
-The IS31FL3733 IC's have on-chip resistors that can be enabled to allow for de-ghosting of the RGB matrix. By default these resistors are not enabled (`IS31FL3733_SWPULLUP`/`IS31FL3733_CSPULLUP` are given the value of `IS31FL3733_PUR_0R`), the values that can be set to enable de-ghosting are as follows:
-
-| `IS31FL3733_SWPULLUP/IS31FL3733_CSPULLUP` | Description |
-|----------------------|-------------|
-| `IS31FL3733_PUR_0R` | (default) Do not use the on-chip resistors/enable de-ghosting |
-| `IS31FL3733_PUR_05KR` | The 0.5k Ohm resistor used during blanking period (t_NOL) |
-| `IS31FL3733_PUR_3KR` | The 3k Ohm resistor used at all times |
-| `IS31FL3733_PUR_4KR` | The 4k Ohm resistor used at all times |
-| `IS31FL3733_PUR_8KR` | The 8k Ohm resistor used at all times |
-| `IS31FL3733_PUR_16KR` | The 16k Ohm resistor used at all times |
-| `IS31FL3733_PUR_32KR` | The 32k Ohm resistor used during blanking period (t_NOL) |
-
-Here is an example using 2 drivers.
-
-```c
-// This is a 7-bit address, that gets left-shifted and bit 0
-// set to 0 for write, 1 for read (as per I2C protocol)
-// The address will vary depending on your wiring:
-// 00 ADDRn <-> GND
-// 01 ADDRn <-> SCL
-// 10 ADDRn <-> SDA
-// 11 ADDRn <-> VCC
-// ADDR1 represents A1:A0 of the 7-bit address.
-// ADDR2 represents A3:A2 of the 7-bit address.
-// The result is: 0b101(ADDR2)(ADDR1)
-#define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND
-#define IS31FL3733_I2C_ADDRESS_2 IS31FL3733_I2C_ADDRESS_GND_VCC
-
-#define DRIVER_1_LED_TOTAL 58
-#define DRIVER_2_LED_TOTAL 10
-#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
-```
-
-::: warning
-Note the parentheses, this is so when `RGB_MATRIX_LED_COUNT` is used in code and expanded, the values are added together before any additional math is applied to them. As an example, `rand() % (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)` will give very different results than `rand() % DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL`.
-:::
-
-Currently only 4 drivers are supported, but it would be trivial to support all 8 combinations.
-
-Define these arrays listing all the LEDs in your `.c`:
-
-```c
-const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
- * driver
- * | R location
- * | | G location
- * | | | B location
- * | | | | */
- {0, SW1_CS1, SW1_CS2, SW1_CS3},
- ....
-}
-```
-
-Where `SWx_CSy` is the location of the LED in the matrix defined by [the datasheet](https://www.issi.com/WW/pdf/31FL3733.pdf) and the header file `drivers/led/issi/is31fl3733.h`. The `driver` is the index of the driver you defined in your `config.h` (`0`, `1`, `2`, or `3` for now).
-
----
-### IS31FL3736 {#is31fl3736}
-
-There is basic support for addressable RGB matrix lighting with the I2C IS31FL3736 RGB controller. To enable it, add this to your `rules.mk`:
-
-```make
-RGB_MATRIX_ENABLE = yes
-RGB_MATRIX_DRIVER = is31fl3736
-```
-You can use between 1 and 4 IS31FL3736 IC's. Do not specify `DRIVER_ADDR_` defines for IC's that are not present on your keyboard.
-
-Configure the hardware via your `config.h`:
-
-| Variable | Description | Default |
-|----------|-------------|---------|
-| `IS31FL3736_I2C_TIMEOUT` | (Optional) How long to wait for i2c messages, in milliseconds | 100 |
-| `IS31FL3736_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 |
-| `IS31FL3736_PWM_FREQUENCY` | (Optional) PWM Frequency Setting - IS31FL3736B only | 0 |
-| `IS31FL3736_GLOBALCURRENT` | (Optional) Configuration for the Global Current Register | 0xFF |
-| `IS31FL3736_SWPULLUP` | (Optional) Set the value of the SWx lines on-chip de-ghosting resistors | PUR_0R (Disabled) |
-| `IS31FL3736_CSPULLUP` | (Optional) Set the value of the CSx lines on-chip de-ghosting resistors | PUR_0R (Disabled) |
-| `RGB_MATRIX_LED_COUNT` | (Required) How many RGB lights are present across all drivers | |
-| `IS31FL3736_I2C_ADDRESS_1` | (Required) Address for the first RGB driver | |
-| `IS31FL3736_I2C_ADDRESS_2` | (Optional) Address for the second RGB driver | |
-| `IS31FL3736_I2C_ADDRESS_3` | (Optional) Address for the third RGB driver | |
-| `IS31FL3736_I2C_ADDRESS_4` | (Optional) Address for the fourth RGB driver | |
-
-The IS31FL3736 IC's have on-chip resistors that can be enabled to allow for de-ghosting of the RGB matrix. By default these resistors are not enabled (`IS31FL3736_SWPULLUP`/`IS31FL3736_CSPULLUP` are given the value of `IS31FL3736_PUR_0R`), the values that can be set to enable de-ghosting are as follows:
-
-| `IS31FL3736_SWPULLUP/IS31FL3736_CSPULLUP` | Description |
-|----------------------|-------------|
-| `IS31FL3736_PUR_0R` | (default) Do not use the on-chip resistors/enable de-ghosting |
-| `IS31FL3736_PUR_05KR` | The 0.5k Ohm resistor used during blanking period (t_NOL) |
-| `IS31FL3736_PUR_1KR` | The 1k Ohm resistor used during blanking period (t_NOL) |
-| `IS31FL3736_PUR_2KR` | The 2k Ohm resistor used during blanking period (t_NOL) |
-| `IS31FL3736_PUR_4KR` | The 4k Ohm resistor used during blanking period (t_NOL) |
-| `IS31FL3736_PUR_8KR` | The 8k Ohm resistor during blanking period (t_NOL) |
-| `IS31FL3736_PUR_16KR` | The 16k Ohm resistor during blanking period (t_NOL) |
-| `IS31FL3736_PUR_32KR` | The 32k Ohm resistor used during blanking period (t_NOL) |
-
-Here is an example using 2 drivers.
-
-```c
-// This is a 7-bit address, that gets left-shifted and bit 0
-// set to 0 for write, 1 for read (as per I2C protocol)
-// The address will vary depending on your wiring:
-// 00 ADDRn <-> GND
-// 01 ADDRn <-> SCL
-// 10 ADDRn <-> SDA
-// 11 ADDRn <-> VCC
-// ADDR1 represents A1:A0 of the 7-bit address.
-// ADDR2 represents A3:A2 of the 7-bit address.
-// The result is: 0b101(ADDR2)(ADDR1)
-#define IS31FL3736_I2C_ADDRESS_1 IS31FL3736_I2C_ADDRESS_GND_GND
-#define IS31FL3736_I2C_ADDRESS_2 IS31FL3736_I2C_ADDRESS_GND_SCL
-
-#define DRIVER_1_LED_TOTAL 30
-#define DRIVER_2_LED_TOTAL 32
-#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
-```
-::: warning
-Note the parentheses, this is so when `RGB_MATRIX_LED_COUNT` is used in code and expanded, the values are added together before any additional math is applied to them. As an example, `rand() % (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)` will give very different results than `rand() % DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL`.
-:::
-
-Define these arrays listing all the LEDs in your `.c`:
-
-```c
-const is31fl3736_led_t PROGMEM g_is31fl3736_leds[IS31FL3736_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
- * driver
- * | R location
- * | | G location
- * | | | B location
- * | | | | */
- {0, SW1_CS1, SW1_CS2, SW1_CS3},
- ....
-}
-```
-### IS31FL3737 {#is31fl3737}
-
-There is basic support for addressable RGB matrix lighting with the I2C IS31FL3737 RGB controller. To enable it, add this to your `rules.mk`:
-
-```make
-RGB_MATRIX_ENABLE = yes
-RGB_MATRIX_DRIVER = is31fl3737
-```
-You can use between 1 and 4 IS31FL3737 IC's. Do not specify `DRIVER_ADDR_` defines for IC's that are not present on your keyboard.
-
-Configure the hardware via your `config.h`:
-
-| Variable | Description | Default |
-|----------|-------------|---------|
-| `IS31FL3737_I2C_TIMEOUT` | (Optional) How long to wait for i2c messages, in milliseconds | 100 |
-| `IS31FL3737_I2C_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 |
-| `IS31FL3737_PWM_FREQUENCY` | (Optional) PWM Frequency Setting - IS31FL3737B only | 0 |
-| `IS31FL3737_GLOBALCURRENT` | (Optional) Configuration for the Global Current Register | 0xFF |
-| `IS31FL3737_SWPULLUP` | (Optional) Set the value of the SWx lines on-chip de-ghosting resistors | PUR_0R (Disabled) |
-| `IS31FL3737_CSPULLUP` | (Optional) Set the value of the CSx lines on-chip de-ghosting resistors | PUR_0R (Disabled) |
-| `RGB_MATRIX_LED_COUNT` | (Required) How many RGB lights are present across all drivers | |
-| `IS31FL3737_I2C_ADDRESS_1` | (Required) Address for the first RGB driver | |
-| `IS31FL3737_I2C_ADDRESS_2` | (Optional) Address for the second RGB driver | |
-| `IS31FL3737_I2C_ADDRESS_3` | (Optional) Address for the third RGB driver | |
-| `IS31FL3737_I2C_ADDRESS_4` | (Optional) Address for the fourth RGB driver | |
-
-The IS31FL3737 IC's have on-chip resistors that can be enabled to allow for de-ghosting of the RGB matrix. By default these resistors are not enabled (`IS31FL3737_SWPULLUP`/`IS31FL3737_CSPULLUP` are given the value of `IS31FL3737_PUR_0R`), the values that can be set to enable de-ghosting are as follows:
-
-| `IS31FL3737_SWPULLUP/IS31FL3737_CSPULLUP` | Description |
-|----------------------|-------------|
-| `IS31FL3737_PUR_0R` | (default) Do not use the on-chip resistors/enable de-ghosting |
-| `IS31FL3737_PUR_05KR` | The 0.5k Ohm resistor used during blanking period (t_NOL) |
-| `IS31FL3737_PUR_1KR` | The 1k Ohm resistor used during blanking period (t_NOL) |
-| `IS31FL3737_PUR_2KR` | The 2k Ohm resistor used during blanking period (t_NOL) |
-| `IS31FL3737_PUR_4KR` | The 4k Ohm resistor used during blanking period (t_NOL) |
-| `IS31FL3737_PUR_8KR` | The 8k Ohm resistor during blanking period (t_NOL) |
-| `IS31FL3737_PUR_16KR` | The 16k Ohm resistor during blanking period (t_NOL) |
-| `IS31FL3737_PUR_32KR` | The 32k Ohm resistor used during blanking period (t_NOL) |
-
-Here is an example using 2 drivers.
-
-```c
-// This is a 7-bit address, that gets left-shifted and bit 0
-// set to 0 for write, 1 for read (as per I2C protocol)
-// The address will vary depending on your wiring:
-// 0000 ADDR <-> GND
-// 0101 ADDR <-> SCL
-// 1010 ADDR <-> SDA
-// 1111 ADDR <-> VCC
-// ADDR represents A3:A0 of the 7-bit address.
-// The result is: 0b101(ADDR)
-#define IS31FL3737_I2C_ADDRESS_1 IS31FL3737_I2C_ADDRESS_GND
-#define IS31FL3737_I2C_ADDRESS_2 IS31FL3737_I2C_ADDRESS_SCL
-
-#define DRIVER_1_LED_TOTAL 30
-#define DRIVER_2_LED_TOTAL 36
-#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
-```
-::: warning
-Note the parentheses, this is so when `RGB_MATRIX_LED_COUNT` is used in code and expanded, the values are added together before any additional math is applied to them. As an example, `rand() % (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)` will give very different results than `rand() % DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL`.
-:::
-
-Define these arrays listing all the LEDs in your `.c`:
-
-```c
-const is31fl3737_led_t PROGMEM g_is31fl3737_leds[IS31FL3737_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
- * driver
- * | R location
- * | | G location
- * | | | B location
- * | | | | */
- {0, SW1_CS1, SW1_CS2, SW1_CS3},
- ....
-}
-```
-
-Where `SWx_CSy` is the location of the LED in the matrix defined by [the datasheet](https://www.issi.com/WW/pdf/31FL3737.pdf) and the header file `drivers/led/issi/is31fl3737.h`. The `driver` is the index of the driver you defined in your `config.h` (Only `0`, `1`, `2`, or `3` for now).
-
----
-### IS31FLCOMMON {#is31flcommon}
-
-There is basic support for addressable RGB matrix lighting with a selection of I2C ISSI Lumissil RGB controllers through a shared common driver. To enable it, add this to your `rules.mk`:
-
-```makefile
-RGB_MATRIX_ENABLE = yes
-RGB_MATRIX_DRIVER =
-```
-
-Where `` is the applicable LED driver chip as below
-
-| Driver Name | Data Sheet | Capability |
-|-------------|------------|------------|
-| `IS31FL3742A` | [datasheet](https://www.lumissil.com/assets/pdf/core/IS31FL3742A_DS.pdf) | 60 RGB, 30x6 Matrix |
-| `IS31FL3743A` | [datasheet](https://www.lumissil.com/assets/pdf/core/IS31FL3743A_DS.pdf) | 66 RGB, 18x11 Matrix |
-| `IS31FL3745` | [datasheet](https://www.lumissil.com/assets/pdf/core/IS31FL3745_DS.pdf) | 48 RGB, 18x8 Matrix |
-| `IS31FL3746A` | [datasheet](https://www.lumissil.com/assets/pdf/core/IS31FL3746A_DS.pdf) | 24 RGB, 18x4 Matrix |
-
-You can use between 1 and 4 IC's. Do not specify `DRIVER_ADDR_` define for IC's if not present on your keyboard. The `DRIVER_ADDR_1` default assumes that all Address pins on the controller have been connected to GND. Drivers that have SYNC functionality have the default settings to disable if 1 driver. If more than 1 drivers then `DRIVER_ADDR_1` will be set to Master and the remaining ones set to Slave.
-
-Configure the hardware via your `config.h`:
-
-| Variable | Description | Default |
-|----------|-------------|---------|
-| `ISSI_TIMEOUT` | (Optional) How long to wait for i2c messages, in milliseconds | 100 |
-| `ISSI_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 |
-| `RGB_MATRIX_LED_COUNT` | (Required) How many RGB lights are present across all drivers | |
-| `DRIVER_ADDR_1` | (Optional) Address for the first RGB driver | |
-| `DRIVER_ADDR_` | (Required) Address for the additional RGB drivers | |
-| `ISSI_SSR_` | (Optional) Configuration for the Spread Spectrum Register | |
-| `ISSI_CONFIGURATION` | (Optional) Configuration for the Configuration Register | |
-| `ISSI_GLOBALCURRENT` | (Optional) Configuration for the Global Current Register | 0xFF |
-| `ISSI_PULLDOWNUP` | (Optional) Configuration for the Pull Up & Pull Down Register | |
-| `ISSI_TEMP` | (Optional) Configuration for the Temperature Register | |
-| `ISSI_PWM_ENABLE` | (Optional) Configuration for the PWM Enable Register | |
-| `ISSI_PWM_SET` | (Optional) Configuration for the PWM Setting Register | |
-| `ISSI_SCAL_RED` | (Optional) Configuration for the RED LEDs in Scaling Registers | 0xFF |
-| `ISSI_SCAL_BLUE` | (Optional) Configuration for the BLUE LEDs in Scaling Registers | 0xFF |
-| `ISSI_SCAL_GREEN` | (Optional) Configuration for the GREEN LEDs in Scaling Registers | 0xFF |
-| `ISSI_MANUAL_SCALING` | (Optional) If you wish to configure the Scaling Registers manually | |
-
-
-Defaults
-
-| Variable | IS31FL3742A | IS31FL3743A | IS31FL3745 | IS31FL3746 |
-|----------|-------------|-------------|------------|------------|
-| `DRIVER_ADDR_1` | 0b0110000 | 0b0100000 | 0b0100000 | 0b1100000 |
-| `ISSI_SSR_1` | 0x00 | 0x00 / 0x60 | 0x00 / 0xC0 | 0x00 |
-| `ISSI_SSR_<2-4>` | 0x00 | 0x40 | 0x80 | 0x00 |
-| `ISSI_CONFIGURATION` | 0x31 | 0x01 | 0x31 | 0x01 |
-| `ISSI_PULLDOWNUP` | 0x55 | 0x33 | 0x33 | 0x33 |
-| `ISSI_TEMP` | N/A | 0x00 | 0x00 | 0x00 |
-| `ISSI_PWM_ENABLE` | N/A | N/A | N/A | 0x00 |
-| `ISSI_PWM_SET` | 0x00 | N/A | N/A | 0x00 |
-
-Here is an example using 2 drivers.
-
-```c
-#define DRIVER_ADDR_2 0b0100001
-
-#define DRIVER_1_LED_TOTAL 66
-#define DRIVER_2_LED_TOTAL 42
-#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
-```
-
-::: warning
-Note the parentheses, this is so when `RGB_MATRIX_LED_COUNT` is used in code and expanded, the values are added together before any additional math is applied to them. As an example, `rand() % (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)` will give very different results than `rand() % DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL`.
-:::
-
-Currently only 4 drivers are supported, but it would be trivial to support for more. Note that using a combination of different drivers is not supported. All drivers must be of the same model.
-
-Define these arrays listing all the LEDs in your `.c`:
-
-```c
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
- * driver
- * | R location
- * | | G location
- * | | | B location
- * | | | | */
- {0, SW1_CS1, SW1_CS2, SW1_CS3},
- ....
-}
-```
-
-Where `CSx_SWx` is the location of the LED in the matrix defined by the datasheet. The `driver` is the index of the driver you defined in your `config.h` (`0`, `1`, `2`, or `3` for now).
-
-`ISSI_MANUAL_SCALING` is used to override the Scaling for individual LED's. By default they will be set as per `ISSI_SCAL_`. In `config.h` set how many LED's you want to manually set scaling for.
-Eg `#define ISSI_MANUAL_SCALING 3`
-
-Then Define the array listing all the LEDs you want to override in your `.c`:
-
-```c
-const is31_led PROGMEM g_is31_scaling[ISSI_MANUAL_SCALING] = {
-/* LED Index
- * | R scaling
- * | | G scaling
- * | | | B scaling
- * | | | | */
- {5, 120, 155, 167},
- {9, 120, 155, 167},
- ....
-}
-```
-
-Where LED Index is the position of the LED in the `g_is31_leds` array. The `scaling` value between 0 and 255 to be written to the Scaling Register.
-
----
-
-### WS2812 {#ws2812}
-
-There is basic support for addressable RGB matrix lighting with a WS2811/WS2812{a,b,c} addressable LED strand. To enable it, add this to your `rules.mk`:
-
-```make
-RGB_MATRIX_ENABLE = yes
-RGB_MATRIX_DRIVER = ws2812
-```
-
-Configure the hardware via your `config.h`:
-
-```c
-// The pin connected to the data pin of the LEDs
-#define WS2812_DI_PIN D7
-// The number of LEDs connected
-#define RGB_MATRIX_LED_COUNT 70
-```
-
-::: tip
-There are additional configuration options for ARM controllers that offer increased performance over the default bitbang driver. Please see [WS2812 Driver](../drivers/ws2812) for more information.
-:::
-
----
-
-### APA102 {#apa102}
-
-There is basic support for APA102 based addressable LED strands. To enable it, add this to your `rules.mk`:
-
-```make
-RGB_MATRIX_ENABLE = yes
-RGB_MATRIX_DRIVER = apa102
-```
-
-Configure the hardware via your `config.h`:
-
-```c
-// The pin connected to the data pin of the LEDs
-#define APA102_DI_PIN D7
-// The pin connected to the clock pin of the LEDs
-#define APA102_CI_PIN D6
-// The number of LEDs connected
-#define RGB_MATRIX_LED_COUNT 70
-```
-
----
-### AW20216S {#aw20216s}
-There is basic support for addressable RGB matrix lighting with the SPI AW20216S RGB controller. To enable it, add this to your `rules.mk`:
-
-```make
-RGB_MATRIX_ENABLE = yes
-RGB_MATRIX_DRIVER = aw20216s
-```
-
-You can use up to 2 AW20216S IC's. Do not specify `DRIVER__xxx` defines for IC's that are not present on your keyboard. You can define the following items in `config.h`:
-
-| Variable | Description | Default |
-|----------|-------------|---------|
-| `AW20216S_CS_PIN_1` | (Required) MCU pin connected to first RGB driver chip select line | B13 |
-| `AW20216S_CS_PIN_2` | (Optional) MCU pin connected to second RGB driver chip select line | |
-| `AW20216S_EN_PIN_1` | (Required) MCU pin connected to first RGB driver hardware enable line | C13 |
-| `AW20216S_EN_PIN_2` | (Optional) MCU pin connected to second RGB driver hardware enable line | |
-| `DRIVER_1_LED_TOTAL` | (Required) How many RGB lights are connected to first RGB driver | |
-| `DRIVER_2_LED_TOTAL` | (Optional) How many RGB lights are connected to second RGB driver | |
-| `RGB_MATRIX_LED_COUNT` | (Required) How many RGB lights are present across all drivers | |
-| `AW20216S_SCALING_MAX` | (Optional) LED current scaling value (0-255, higher values mean LED is brighter at full PWM) | 150 |
-| `AW20216S_GLOBAL_CURRENT_MAX` | (Optional) Driver global current limit (0-255, higher values means the driver may consume more power) | 150 |
-| `AW20216S_SPI_MODE` | (Optional) Mode for SPI communication (0-3, defines polarity and phase of the clock) | 3 |
-| `AW20216S_SPI_DIVISOR` | (Optional) Clock divisor for SPI communication (powers of 2, smaller numbers means faster communication, should not be less than 4) | 4 |
-
-Here is an example using 2 drivers.
-
-```c
-#define AW20216S_CS_PIN_1 B13
-#define AW20216S_CS_PIN_2 B14
-// Hardware enable lines may be connected to the same pin
-#define AW20216S_EN_PIN_1 C13
-#define AW20216S_EN_PIN_2 C13
-
-#define DRIVER_1_LED_TOTAL 66
-#define DRIVER_2_LED_TOTAL 32
-#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
-```
-
-::: warning
-Note the parentheses, this is so when `RGB_MATRIX_LED_COUNT` is used in code and expanded, the values are added together before any additional math is applied to them. As an example, `rand() % (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)` will give very different results than `rand() % DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL`.
-:::
-
-Define these arrays listing all the LEDs in your `.c`:
-
-```c
-const aw20216s_led_t PROGMEM g_aw20216s_leds[AW20216S_LED_COUNT] = {
-/* Each AW20216S channel is controlled by a register at some offset between 0x00
- * and 0xD7 inclusive.
- * See drivers/led/aw20216s.h for the mapping between register offsets and
- * driver pin locations.
- * driver
- * | R location
- * | | G location
- * | | | B location
- * | | | | */
- { 0, SW1_CS1, SW1_CS2, SW1_CS3 },
- { 0, SW1_CS4, SW1_CS5, SW1_CS6 },
- { 0, SW1_CS7, SW1_CS8, SW1_CS9 },
- { 0, SW1_CS10, SW1_CS11, SW1_CS12 },
- { 0, SW1_CS13, SW1_CS14, SW1_CS15 },
- ...
- { 1, SW1_CS1, SW1_CS2, SW1_CS3 },
- { 1, SW1_CS13, SW1_CS14, SW1_CS15 },
- { 1, SW1_CS16, SW1_CS17, SW1_CS18 },
- { 1, SW2_CS4, SW2_CS5, SW2_CS6 },
- ...
-};
-```
-
----
-
## Common Configuration {#common-configuration}
From this point forward the configuration is the same for all the drivers. The `led_config_t` struct provides a key electrical matrix to led index lookup table, what the physical position of each LED is on the board, and what type of key or usage the LED if the LED represents. Here is a brief example:
@@ -589,38 +81,21 @@ As mentioned earlier, the center of the keyboard by default is expected to be `{
## Keycodes {#keycodes}
-All RGB keycodes are currently shared with the RGBLIGHT system:
-
-|Key |Aliases |Description |
-|-------------------|----------|--------------------------------------------------------------------------------------|
-|`RGB_TOG` | |Toggle RGB lighting on or off |
-|`RGB_MODE_FORWARD` |`RGB_MOD` |Cycle through modes, reverse direction when Shift is held |
-|`RGB_MODE_REVERSE` |`RGB_RMOD`|Cycle through modes in reverse, forward direction when Shift is held |
-|`RGB_HUI` | |Increase hue, decrease hue when Shift is held |
-|`RGB_HUD` | |Decrease hue, increase hue when Shift is held |
-|`RGB_SAI` | |Increase saturation, decrease saturation when Shift is held |
-|`RGB_SAD` | |Decrease saturation, increase saturation when Shift is held |
-|`RGB_VAI` | |Increase value (brightness), decrease value when Shift is held |
-|`RGB_VAD` | |Decrease value (brightness), increase value when Shift is held |
-|`RGB_SPI` | |Increase effect speed (does not support eeprom yet), decrease speed when Shift is held|
-|`RGB_SPD` | |Decrease effect speed (does not support eeprom yet), increase speed when Shift is held|
-|`RGB_MODE_PLAIN` |`RGB_M_P` |Static (no animation) mode |
-|`RGB_MODE_BREATHE` |`RGB_M_B` |Breathing animation mode |
-|`RGB_MODE_RAINBOW` |`RGB_M_R` |Full gradient scrolling left to right (uses the `RGB_MATRIX_CYCLE_LEFT_RIGHT` mode) |
-|`RGB_MODE_SWIRL` |`RGB_M_SW`|Full gradient spinning pinwheel around center of keyboard (uses `RGB_MATRIX_CYCLE_PINWHEEL` mode) |
-
-* `RGB_MODE_*` keycodes will generally work, but not all of the modes are currently mapped to the correct effects for the RGB Matrix system.
-
-`RGB_MODE_PLAIN`, `RGB_MODE_BREATHE`, `RGB_MODE_RAINBOW`, and `RGB_MODE_SWIRL` are the only ones that are mapped properly. The rest don't have a direct equivalent, and are not mapped.
-
-::: tip
-`RGB_*` keycodes cannot be used with functions like `tap_code16(RGB_HUD)` as they're not USB HID keycodes. If you wish to replicate similar behaviour in custom code within your firmware (e.g. inside `encoder_update_user()` or `process_record_user()`), the equivalent [RGB functions](#functions) should be used instead.
-:::
-
-
-::: warning
-By default, if you have both the [RGB Light](rgblight) and the RGB Matrix feature enabled, these keycodes will work for both features, at the same time. You can disable the keycode functionality by defining the `*_DISABLE_KEYCODES` option for the specific feature.
-:::
+|Key |Aliases |Description |
+|-------------------------------|---------|-----------------------------------|
+|`QK_RGB_MATRIX_ON` |`RM_ON` |Turn on RGB Matrix |
+|`QK_RGB_MATRIX_OFF` |`RM_OFF` |Turn off RGB Matrix |
+|`QK_RGB_MATRIX_TOGGLE` |`RM_TOGG`|Toggle RGB Matrix on or off |
+|`QK_RGB_MATRIX_MODE_NEXT` |`RM_NEXT`|Cycle through animations |
+|`QK_RGB_MATRIX_MODE_PREVIOUS` |`RM_PREV`|Cycle through animations in reverse|
+|`QK_RGB_MATRIX_HUE_UP` |`RM_HUEU`|Cycle through hue |
+|`QK_RGB_MATRIX_HUE_DOWN` |`RM_HUED`|Cycle through hue in reverse |
+|`QK_RGB_MATRIX_SATURATION_UP` |`RM_SATU`|Increase the saturation |
+|`QK_RGB_MATRIX_SATURATION_DOWN`|`RM_SATD`|Decrease the saturation |
+|`QK_RGB_MATRIX_VALUE_UP` |`RM_VALU`|Increase the brightness level |
+|`QK_RGB_MATRIX_VALUE_DOWN` |`RM_VALD`|Decrease the brightness level |
+|`QK_RGB_MATRIX_SPEED_UP` |`RM_SPDU`|Increase the animation speed |
+|`QK_RGB_MATRIX_SPEED_DOWN` |`RM_SPDD`|Decrease the animation speed |
## RGB Matrix Effects {#rgb-matrix-effects}
@@ -797,7 +272,7 @@ Solid reactive effects will pulse RGB light on key presses with user configurabl
#define RGB_MATRIX_SOLID_REACTIVE_GRADIENT_MODE
```
-Gradient mode will loop through the color wheel hues over time and its duration can be controlled with the effect speed keycodes (`RGB_SPI`/`RGB_SPD`).
+Gradient mode will loop through the color wheel hues over time and its duration can be controlled with the effect speed keycodes (`RM_SPDU`/`RM_SPDD`).
## Custom RGB Matrix Effects {#custom-rgb-matrix-effects}
@@ -807,12 +282,6 @@ By setting `RGB_MATRIX_CUSTOM_USER = yes` in `rules.mk`, new effects can be defi
Hardware maintainers who want to limit custom effects to a specific keyboard can create a `rgb_matrix_kb.inc` file in the root of the keyboard directory, and add `RGB_MATRIX_CUSTOM_KB = yes` to the keyboard level `rules.mk`.
:::
-To use custom effects in your code, simply prepend `RGB_MATRIX_CUSTOM_` to the effect name specified in `RGB_MATRIX_EFFECT()`. For example, an effect declared as `RGB_MATRIX_EFFECT(my_cool_effect)` would be referenced with:
-
-```c
-rgb_matrix_mode(RGB_MATRIX_CUSTOM_my_cool_effect);
-```
-
```c
// !!! DO NOT ADD #pragma once !!! //
@@ -856,6 +325,12 @@ static bool my_cool_effect2(effect_params_t* params) {
#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
```
+To switch to your custom effect programmatically, simply call `rgb_matrix_mode()` and prepend `RGB_MATRIX_CUSTOM_` to the effect name you specified in `RGB_MATRIX_EFFECT()`. For example, an effect declared as `RGB_MATRIX_EFFECT(my_cool_effect)` would be referenced with:
+
+```c
+rgb_matrix_mode(RGB_MATRIX_CUSTOM_my_cool_effect);
+```
+
For inspiration and examples, check out the built-in effects under `quantum/rgb_matrix/animations/`.
@@ -904,7 +379,6 @@ These are defined in [`color.h`](https://github.com/qmk/qmk_firmware/blob/master
#define RGB_MATRIX_DEFAULT_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS // Sets the default brightness value, if none has been set
#define RGB_MATRIX_DEFAULT_SPD 127 // Sets the default animation speed, if none has been set
#define RGB_MATRIX_DEFAULT_FLAGS LED_FLAG_ALL // Sets the default LED flags, if none has been set
-#define RGB_MATRIX_DISABLE_KEYCODES // disables control of rgb matrix by keycodes (must use code functions to control the feature)
#define RGB_MATRIX_SPLIT { X, Y } // (Optional) For split keyboards, the number of LEDs connected on each half. X = left, Y = Right.
// If reactive effects are enabled, you also will want to enable SPLIT_TRANSPORT_MIRROR
#define RGB_TRIGGER_ON_KEYDOWN // Triggers RGB keypress events on key down. This makes RGB control feel more responsive. This may cause RGB to not function properly on some boards
@@ -914,71 +388,6 @@ These are defined in [`color.h`](https://github.com/qmk/qmk_firmware/blob/master
The EEPROM for it is currently shared with the LED Matrix system (it's generally assumed only one feature would be used at a time).
-## Functions {#functions}
-
-### Direct Operation {#direct-operation}
-|Function |Description |
-|--------------------------------------------|-------------|
-|`rgb_matrix_set_color_all(r, g, b)` |Set all of the LEDs to the given RGB value, where `r`/`g`/`b` are between 0 and 255 (not written to EEPROM) |
-|`rgb_matrix_set_color(index, r, g, b)` |Set a single LED to the given RGB value, where `r`/`g`/`b` are between 0 and 255, and `index` is between 0 and `RGB_MATRIX_LED_COUNT` (not written to EEPROM) |
-
-### Disable/Enable Effects {#disable-enable-effects}
-|Function |Description |
-|--------------------------------------------|-------------|
-|`rgb_matrix_toggle()` |Toggle effect range LEDs between on and off |
-|`rgb_matrix_toggle_noeeprom()` |Toggle effect range LEDs between on and off (not written to EEPROM) |
-|`rgb_matrix_enable()` |Turn effect range LEDs on, based on their previous state |
-|`rgb_matrix_enable_noeeprom()` |Turn effect range LEDs on, based on their previous state (not written to EEPROM) |
-|`rgb_matrix_disable()` |Turn effect range LEDs off, based on their previous state |
-|`rgb_matrix_disable_noeeprom()` |Turn effect range LEDs off, based on their previous state (not written to EEPROM) |
-
-### Change Effect Mode {#change-effect-mode}
-|Function |Description |
-|--------------------------------------------|-------------|
-|`rgb_matrix_mode(mode)` |Set the mode, if RGB animations are enabled |
-|`rgb_matrix_mode_noeeprom(mode)` |Set the mode, if RGB animations are enabled (not written to EEPROM) |
-|`rgb_matrix_step()` |Change the mode to the next RGB animation in the list of enabled RGB animations |
-|`rgb_matrix_step_noeeprom()` |Change the mode to the next RGB animation in the list of enabled RGB animations (not written to EEPROM) |
-|`rgb_matrix_step_reverse()` |Change the mode to the previous RGB animation in the list of enabled RGB animations |
-|`rgb_matrix_step_reverse_noeeprom()` |Change the mode to the previous RGB animation in the list of enabled RGB animations (not written to EEPROM) |
-|`rgb_matrix_increase_speed()` |Increase the speed of the animations |
-|`rgb_matrix_increase_speed_noeeprom()` |Increase the speed of the animations (not written to EEPROM) |
-|`rgb_matrix_decrease_speed()` |Decrease the speed of the animations |
-|`rgb_matrix_decrease_speed_noeeprom()` |Decrease the speed of the animations (not written to EEPROM) |
-|`rgb_matrix_set_speed(speed)` |Set the speed of the animations to the given value where `speed` is between 0 and 255 |
-|`rgb_matrix_set_speed_noeeprom(speed)` |Set the speed of the animations to the given value where `speed` is between 0 and 255 (not written to EEPROM) |
-|`rgb_matrix_reload_from_eeprom()` |Reload the effect configuration (enabled, mode and color) from EEPROM |
-
-### Change Color {#change-color}
-|Function |Description |
-|--------------------------------------------|-------------|
-|`rgb_matrix_increase_hue()` |Increase the hue for effect range LEDs. This wraps around at maximum hue |
-|`rgb_matrix_increase_hue_noeeprom()` |Increase the hue for effect range LEDs. This wraps around at maximum hue (not written to EEPROM) |
-|`rgb_matrix_decrease_hue()` |Decrease the hue for effect range LEDs. This wraps around at minimum hue |
-|`rgb_matrix_decrease_hue_noeeprom()` |Decrease the hue for effect range LEDs. This wraps around at minimum hue (not written to EEPROM) |
-|`rgb_matrix_increase_sat()` |Increase the saturation for effect range LEDs. This wraps around at maximum saturation |
-|`rgb_matrix_increase_sat_noeeprom()` |Increase the saturation for effect range LEDs. This wraps around at maximum saturation (not written to EEPROM) |
-|`rgb_matrix_decrease_sat()` |Decrease the saturation for effect range LEDs. This wraps around at minimum saturation |
-|`rgb_matrix_decrease_sat_noeeprom()` |Decrease the saturation for effect range LEDs. This wraps around at minimum saturation (not written to EEPROM) |
-|`rgb_matrix_increase_val()` |Increase the value for effect range LEDs. This wraps around at maximum value |
-|`rgb_matrix_increase_val_noeeprom()` |Increase the value for effect range LEDs. This wraps around at maximum value (not written to EEPROM) |
-|`rgb_matrix_decrease_val()` |Decrease the value for effect range LEDs. This wraps around at minimum value |
-|`rgb_matrix_decrease_val_noeeprom()` |Decrease the value for effect range LEDs. This wraps around at minimum value (not written to EEPROM) |
-|`rgb_matrix_sethsv(h, s, v)` |Set LEDs to the given HSV value where `h`/`s`/`v` are between 0 and 255 |
-|`rgb_matrix_sethsv_noeeprom(h, s, v)` |Set LEDs to the given HSV value where `h`/`s`/`v` are between 0 and 255 (not written to EEPROM) |
-
-### Query Current Status {#query-current-status}
-|Function |Description |
-|---------------------------------|---------------------------|
-|`rgb_matrix_is_enabled()` |Gets current on/off status |
-|`rgb_matrix_get_mode()` |Gets current mode |
-|`rgb_matrix_get_hue()` |Gets current hue |
-|`rgb_matrix_get_sat()` |Gets current sat |
-|`rgb_matrix_get_val()` |Gets current val |
-|`rgb_matrix_get_hsv()` |Gets hue, sat, and val and returns a [`HSV` structure](https://github.com/qmk/qmk_firmware/blob/7ba6456c0b2e041bb9f97dbed265c5b8b4b12192/quantum/color.h#L56-L61)|
-|`rgb_matrix_get_speed()` |Gets current speed |
-|`rgb_matrix_get_suspend_state()` |Gets current suspend state |
-
## Callbacks {#callbacks}
### Indicators {#indicators}
@@ -1069,18 +478,18 @@ This example sets the modifiers to be a specific color based on the layer state.
```c
bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
- HSV hsv = {0, 255, 255};
+ hsv_t hsv = {0, 255, 255};
if (layer_state_is(layer_state, 2)) {
- hsv = {130, 255, 255};
+ hsv = (hsv_t){130, 255, 255};
} else {
- hsv = {30, 255, 255};
+ hsv = (hsv_t){30, 255, 255};
}
if (hsv.v > rgb_matrix_get_val()) {
hsv.v = rgb_matrix_get_val();
}
- RGB rgb = hsv_to_rgb(hsv);
+ rgb_t rgb = hsv_to_rgb(hsv);
for (uint8_t i = led_min; i < led_max; i++) {
if (HAS_FLAGS(g_led_config.flags[i], 0x01)) { // 0x01 == LED_FLAG_MODIFIER
@@ -1117,3 +526,409 @@ void keyboard_post_init_user(void) {
rgb_matrix_sethsv_noeeprom(HSV_OFF);
}
```
+
+## API {#api}
+
+### `void rgb_matrix_toggle(void)` {#api-rgb-matrix-toggle}
+
+Toggle RGB Matrix on or off.
+
+---
+
+### `void rgb_matrix_toggle_noeeprom(void)` {#api-rgb-matrix-toggle-noeeprom}
+
+Toggle RGB Matrix on or off. New state is not written to EEPROM.
+
+---
+
+### `void rgb_matrix_enable(void)` {#api-rgb-matrix-enable}
+
+Turn RGB Matrix on.
+
+---
+
+### `void rgb_matrix_enable_noeeprom(void)` {#api-rgb-matrix-enable-noeeprom}
+
+Turn RGB Matrix on. New state is not written to EEPROM.
+
+---
+
+### `void rgb_matrix_disable(void)` {#api-rgb-matrix-disable}
+
+Turn RGB Matrix off.
+
+---
+
+### `void rgb_matrix_disable_noeeprom(void)` {#api-rgb-matrix-disable-noeeprom}
+
+Turn RGB Matrix off. New state is not written to EEPROM.
+
+---
+
+### `bool rgb_matrix_is_enabled(void)` {#api-rgb-matrix-is-enabled}
+
+Get the current enabled state of RGB Matrix.
+
+#### Return Value {#api-rgb-matrix-is-enabled-return}
+
+`true` if RGB Matrix is enabled.
+
+---
+
+### `void rgb_matrix_set_color(uint8_t index, uint8_t r, uint8_t g, uint8_t b)` {#api-rgb-matrix-set-color}
+
+Set the color of a single LED.
+
+This function can only be run from within an effect or indicator callback, otherwise the currently running animation will simply overwrite it on the next frame.
+
+#### Arguments {#api-rgb-matrix-set-color-arguments}
+
+ - `uint8_t index`
+ The LED index, from 0 to `RGB_MATRIX_LED_COUNT - 1`.
+ - `uint8_t r`
+ The red value to set.
+ - `uint8_t g`
+ The green value to set.
+ - `uint8_t b`
+ The blue value to set.
+
+---
+
+### `void rgb_matrix_set_color_all(uint8_t r, uint8_t g, uint8_t b)` {#api-rgb-matrix-set-color-all}
+
+Set the color of all LEDs.
+
+This function can only be run from within an effect or indicator callback, otherwise the currently running animation will simply overwrite it on the next frame.
+
+#### Arguments {#api-rgb-matrix-set-color-all-arguments}
+
+ - `uint8_t r`
+ The red value to set.
+ - `uint8_t g`
+ The green value to set.
+ - `uint8_t b`
+ The blue value to set.
+
+---
+
+### `void rgb_matrix_mode(uint8_t mode)` {#api-rgb-matrix-mode}
+
+Set the currently running effect.
+
+#### Arguments {#api-rgb-matrix-mode-arguments}
+
+ - `uint8_t mode`
+ The effect to switch to.
+
+---
+
+### `void rgb_matrix_mode_noeeprom(uint8_t mode)` {#api-rgb-matrix-mode-noeeprom}
+
+Set the currently running effect. New state is not written to EEPROM.
+
+#### Arguments {#api-rgb-matrix-mode-noeeprom-arguments}
+
+ - `uint8_t mode`
+ The effect to switch to.
+
+---
+
+### `void rgb_matrix_step(void)` {#api-rgb-matrix-step}
+
+Move to the next enabled effect.
+
+---
+
+### `void rgb_matrix_step_noeeprom(void)` {#api-rgb-matrix-step-noeeprom}
+
+Move to the next enabled effect. New state is not written to EEPROM.
+
+---
+
+### `void rgb_matrix_step_reverse(void)` {#api-rgb-matrix-step-reverse}
+
+Move to the previous enabled effect.
+
+---
+
+### `void rgb_matrix_step_reverse_noeeprom(void)` {#api-rgb-matrix-step-reverse-noeeprom}
+
+Move to the previous enabled effect. New state is not written to EEPROM.
+
+---
+
+### `uint8_t rgb_matrix_get_mode(void)` {#api-rgb-matrix-get-mode}
+
+Get the currently running effect.
+
+#### Return Value {#api-rgb-matrix-get-mode-return}
+
+The index of the currently running effect.
+
+---
+
+### `void rgb_matrix_increase_hue(void)` {#api-rgb-matrix-increase-hue}
+
+Increase the global effect hue.
+
+---
+
+### `void rgb_matrix_increase_hue_noeeprom(void)` {#api-rgb-matrix-increase-hue-noeeprom}
+
+Increase the global effect hue. New state is not written to EEPROM.
+
+---
+
+### `void rgb_matrix_decrease_hue(void)` {#api-rgb-matrix-decrease-hue}
+
+Decrease the global effect hue.
+
+---
+
+### `void rgb_matrix_decrease_hue_noeeprom(void)` {#api-rgb-matrix-decrease-hue-noeeprom}
+
+Decrease the global effect hue. New state is not written to EEPROM.
+
+---
+
+### `uint8_t rgb_matrix_get_hue(void)` {#api-rgb-matrix-get-hue}
+
+Get the current global effect hue.
+
+#### Return Value {#api-rgb-matrix-get-hue-return}
+
+The current hue value, from 0 to 255.
+
+---
+
+### `void rgb_matrix_increase_sat(void)` {#api-rgb-matrix-increase-sat}
+
+Increase the global effect saturation.
+
+---
+
+### `void rgb_matrix_increase_sat_noeeprom(void)` {#api-rgb-matrix-increase-sat-noeeprom}
+
+Increase the global effect saturation. New state is not written to EEPROM.
+
+---
+
+### `void rgb_matrix_decrease_sat(void)` {#api-rgb-matrix-decrease-sat}
+
+Decrease the global effect saturation.
+
+---
+
+### `void rgb_matrix_decrease_sat_noeeprom(void)` {#api-rgb-matrix-decrease-sat-noeeprom}
+
+Decrease the global effect saturation. New state is not written to EEPROM.
+
+---
+
+### `uint8_t rgb_matrix_get_sat(void)` {#api-rgb-matrix-get-sat}
+
+Get the current global effect saturation.
+
+#### Return Value {#api-rgb-matrix-get-sat-return}
+
+The current saturation value, from 0 to 255.
+
+---
+
+### `void rgb_matrix_increase_val(void)` {#api-rgb-matrix-increase-val}
+
+Increase the global effect value (brightness).
+
+---
+
+### `void rgb_matrix_increase_val_noeeprom(void)` {#api-rgb-matrix-increase-val-noeeprom}
+
+Increase the global effect value (brightness). New state is not written to EEPROM.
+
+---
+
+### `void rgb_matrix_decrease_val(void)` {#api-rgb-matrix-decrease-val}
+
+Decrease the global effect value (brightness).
+
+---
+
+### `void rgb_matrix_decrease_val_noeeprom(void)` {#api-rgb-matrix-decrease-val-noeeprom}
+
+Decrease the global effect value (brightness). New state is not written to EEPROM.
+
+---
+
+### `uint8_t rgb_matrix_get_val(void)` {#api-rgb-matrix-get-val}
+
+Get the current global effect value (brightness).
+
+#### Return Value {#api-rgb-matrix-get-val-return}
+
+The current brightness value, from 0 to 255.
+
+---
+
+### `void rgb_matrix_increase_speed(void)` {#api-rgb-matrix-increase-speed}
+
+Increase the effect speed.
+
+---
+
+### `void rgb_matrix_increase_speed_noeeprom(void)` {#api-rgb-matrix-increase-speed-noeeprom}
+
+Increase the effect speed. New state is not written to EEPROM.
+
+---
+
+### `void rgb_matrix_decrease_speed(void)` {#api-rgb-matrix-decrease-speed}
+
+Decrease the effect speed.
+
+---
+
+### `void rgb_matrix_decrease_speed_noeeprom(void)` {#api-rgb-matrix-decrease-speed-noeeprom}
+
+Decrease the effect speed. New state is not written to EEPROM.
+
+---
+
+### `void rgb_matrix_set_speed(uint8_t speed)` {#api-rgb-matrix-set-speed}
+
+Set the effect speed.
+
+#### Arguments {#api-rgb-matrix-set-speed-arguments}
+
+ - `uint8_t speed`
+ The new speed to set, from 0 to 255.
+
+---
+
+### `void rgb_matrix_set_speed_noeeprom(uint8_t speed)` {#api-rgb-matrix-set-speed-noeeprom}
+
+Set the effect speed. New state is not written to EEPROM.
+
+#### Arguments {#api-rgb-matrix-set-speed-noeeprom-arguments}
+
+ - `uint8_t speed`
+ The new speed to set, from 0 to 255.
+
+---
+
+### `uint8_t rgb_matrix_get_speed(void)` {#api-rgb-matrix-get-speed}
+
+Get the current effect speed.
+
+#### Return Value {#api-rgb-matrix-get-speed-return}
+
+The current effect speed, from 0 to 255.
+
+---
+
+### `void rgb_matrix_sethsv(uint8_t h, uint8_t s, uint8_t v)` {#api-rgb-matrix-sethsv}
+
+Set the global effect hue, saturation, and value (brightness).
+
+### Arguments {#api-rgb-matrix-sethsv-arguments}
+
+ - `uint8_t h`
+ The hue to set, from 0 to 255.
+ - `uint8_t s`
+ The saturation to set, from 0 to 255.
+ - `uint8_t v`
+ The value (brightness) to set, from 0 to 255.
+
+---
+
+### `void rgb_matrix_sethsv_noeeprom(uint8_t h, uint8_t s, uint8_t v)` {#api-rgb-matrix-sethsv-noeeprom}
+
+Set the global effect hue, saturation, and value (brightness). New state is not written to EEPROM.
+
+#### Arguments {#api-rgb-matrix-sethsv-noeeprom-arguments}
+
+ - `uint8_t h`
+ The hue to set, from 0 to 255.
+ - `uint8_t s`
+ The saturation to set, from 0 to 255.
+ - `uint8_t v`
+ The value (brightness) to set, from 0 to 255.
+
+---
+
+### `hsv_t rgb_matrix_get_hsv(void)` {#api-rgb-matrix-get-hsv}
+
+Get the current global effect hue, saturation, and value (brightness).
+
+#### Return Value {#api-rgb-matrix-get-hsv-return}
+
+The current effect HSV as an `hsv_t` struct.
+
+---
+
+### `void rgb_matrix_reload_from_eeprom(void)` {#api-rgb-matrix-reload-from-eeprom}
+
+Reload the effect configuration (enabled, mode and color) from EEPROM.
+
+---
+
+### `bool rgb_matrix_get_suspend_state(void)` {#api-rgb-matrix-get-suspend-state}
+
+Get the current suspend state of RGB Matrix.
+
+#### Return Value {#api-rgb-matrix-get-suspend-state-return}
+
+`true` if RGB Matrix is currently in the suspended state.
+
+---
+
+### `bool rgb_matrix_indicators_kb(void)` {#api-rgb-matrix-indicators-kb}
+
+Keyboard-level callback, invoked after current animation frame is rendered but before it is flushed to the LEDs.
+
+#### Return Value {#api-rgb-matrix-indicators-kb-return}
+
+Currently unused.
+
+---
+
+### `bool rgb_matrix_indicators_user(void)` {#api-rgb-matrix-indicators-user}
+
+Keymap-level callback, invoked after current animation frame is rendered but before it is flushed to the LEDs.
+
+#### Return Value {#api-rgb-matrix-indicators-user-return}
+
+`true` to continue running the keyboard-level callback.
+
+---
+
+### `bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max)` {#api-rgb-matrix-indicators-advanced-kb}
+
+Keyboard-level callback, invoked after current animation frame is rendered but before it is flushed to the LEDs.
+
+### Arguments {#api-rgb-matrix-indicators-advanced-kb-arguments}
+
+ - `uint8_t led_min`
+ The index of the first LED in this batch.
+ - `uint8_t led_max`
+ The index of the last LED in this batch.
+
+#### Return Value {#api-rgb-matrix-indicators-advanced-kb-return}
+
+Currently unused.
+
+---
+
+### `bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max)` {#api-rgb-matrix-indicators-advanced-user}
+
+Keymap-level callback, invoked after current animation frame is rendered but before it is flushed to the LEDs.
+
+### Arguments {#api-rgb-matrix-indicators-advanced-user-arguments}
+
+ - `uint8_t led_min`
+ The index of the first LED in this batch.
+ - `uint8_t led_max`
+ The index of the last LED in this batch.
+
+#### Return Value {#api-rgb-matrix-indicators-advanced-user-return}
+
+`true` to continue running the keyboard-level callback.
diff --git a/docs/features/rgblight.md b/docs/features/rgblight.md
index ece1c1046776..4322fe796e7a 100644
--- a/docs/features/rgblight.md
+++ b/docs/features/rgblight.md
@@ -59,35 +59,36 @@ Changing the **Value** sets the overall brightness.
## Keycodes
-|Key |Aliases |Description |
-|-------------------|----------|--------------------------------------------------------------------|
-|`RGB_TOG` | |Toggle RGB lighting on or off |
-|`RGB_MODE_FORWARD` |`RGB_MOD` |Cycle through modes, reverse direction when Shift is held |
-|`RGB_MODE_REVERSE` |`RGB_RMOD`|Cycle through modes in reverse, forward direction when Shift is held|
-|`RGB_HUI` | |Increase hue, decrease hue when Shift is held |
-|`RGB_HUD` | |Decrease hue, increase hue when Shift is held |
-|`RGB_SAI` | |Increase saturation, decrease saturation when Shift is held |
-|`RGB_SAD` | |Decrease saturation, increase saturation when Shift is held |
-|`RGB_VAI` | |Increase value (brightness), decrease value when Shift is held |
-|`RGB_VAD` | |Decrease value (brightness), increase value when Shift is held |
-|`RGB_MODE_PLAIN` |`RGB_M_P `|Static (no animation) mode |
-|`RGB_MODE_BREATHE` |`RGB_M_B` |Breathing animation mode |
-|`RGB_MODE_RAINBOW` |`RGB_M_R` |Rainbow animation mode |
-|`RGB_MODE_SWIRL` |`RGB_M_SW`|Swirl animation mode |
-|`RGB_MODE_SNAKE` |`RGB_M_SN`|Snake animation mode |
-|`RGB_MODE_KNIGHT` |`RGB_M_K` |"Knight Rider" animation mode |
-|`RGB_MODE_XMAS` |`RGB_M_X` |Christmas animation mode |
-|`RGB_MODE_GRADIENT`|`RGB_M_G` |Static gradient animation mode |
-|`RGB_MODE_RGBTEST` |`RGB_M_T` |Red, Green, Blue test animation mode |
-|`RGB_MODE_TWINKLE` |`RGB_M_TW`|Twinkle animation mode |
-
-::: tip
-`RGB_*` keycodes cannot be used with functions like `tap_code16(RGB_HUI)` as they're not USB HID keycodes. If you wish to replicate similar behaviour in custom code within your firmware (e.g. inside `encoder_update_user()` or `process_record_user()`), the equivalent [RGB functions](#functions) should be used instead.
+::: warning
+These keycodes also simultaneously control [RGB Matrix](rgb_matrix), if enabled. This behaviour is in the process of being deprecated, so during this time it is recommended to additionally include the dedicated RGB Matrix keycodes to your keymap, and add `#define RGB_MATRIX_DISABLE_SHARED_KEYCODES` to `config.h`.
:::
+|Key |Aliases |Description |
+|------------------------------|----------|---------------------------------------------------------------------|
+|`QK_UNDERGLOW_TOGGLE` |`UG_TOGG` |Toggle RGB lighting on or off |
+|`QK_UNDERGLOW_MODE_NEXT` |`UG_NEXT` |Cycle through modes, reverse direction when Shift is held |
+|`QK_UNDERGLOW_MODE_PREVIOUS` |`UG_PREV` |Cycle through modes in reverse, forward direction when Shift is held |
+|`QK_UNDERGLOW_HUE_UP` |`UG_HUEU` |Increase hue, decrease hue when Shift is held |
+|`QK_UNDERGLOW_HUE_DOWN` |`UG_HUED` |Decrease hue, increase hue when Shift is held |
+|`QK_UNDERGLOW_SATURATION_UP` |`UG_SATU` |Increase saturation, decrease saturation when Shift is held |
+|`QK_UNDERGLOW_SATURATION_DOWN`|`UG_SATD` |Decrease saturation, increase saturation when Shift is held |
+|`QK_UNDERGLOW_VALUE_UP` |`UG_VALU` |Increase value (brightness), decrease value when Shift is held |
+|`QK_UNDERGLOW_VALUE_DOWN` |`UG_VALD` |Decrease value (brightness), increase value when Shift is held |
+|`QK_UNDERGLOW_SPEED_UP` |`UG_SPDU` |Increase effect speed (brightness), decrease speed when Shift is held|
+|`QK_UNDERGLOW_SPEED_DOWN` |`UG_SPDD` |Decrease effect speed (brightness), increase speed when Shift is held|
+|`RGB_MODE_PLAIN` |`RGB_M_P `|Static (no animation) mode (deprecated) |
+|`RGB_MODE_BREATHE` |`RGB_M_B` |Breathing animation mode (deprecated) |
+|`RGB_MODE_RAINBOW` |`RGB_M_R` |Rainbow animation mode (deprecated) |
+|`RGB_MODE_SWIRL` |`RGB_M_SW`|Swirl animation mode (deprecated) |
+|`RGB_MODE_SNAKE` |`RGB_M_SN`|Snake animation mode (deprecated) |
+|`RGB_MODE_KNIGHT` |`RGB_M_K` |"Knight Rider" animation mode (deprecated) |
+|`RGB_MODE_XMAS` |`RGB_M_X` |Christmas animation mode (deprecated) |
+|`RGB_MODE_GRADIENT` |`RGB_M_G` |Static gradient animation mode (deprecated) |
+|`RGB_MODE_RGBTEST` |`RGB_M_T` |Red, Green, Blue test animation mode (deprecated) |
+|`RGB_MODE_TWINKLE` |`RGB_M_TW`|Twinkle animation mode (deprecated) |
-::: warning
-By default, if you have both the RGB Light and the [RGB Matrix](rgb_matrix) feature enabled, these keycodes will work for both features, at the same time. You can disable the keycode functionality by defining the `*_DISABLE_KEYCODES` option for the specific feature.
+::: tip
+These keycodes cannot be used with functions like `tap_code16()` as they are not USB HID keycodes. If you wish to replicate similar behaviour in custom code within your firmware (e.g. inside `encoder_update_user()` or `process_record_user()`), the equivalent [RGB functions](#functions) should be used instead.
:::
## Configuration
@@ -102,7 +103,6 @@ Your RGB lighting can be configured by placing these `#define`s in your `config.
|`RGBLIGHT_LIMIT_VAL` |`255` |The maximum brightness level |
|`RGBLIGHT_SLEEP` |*Not defined* |If defined, the RGB lighting will be switched off when the host goes to sleep |
|`RGBLIGHT_SPLIT` |*Not defined* |If defined, synchronization functionality for split keyboards is added |
-|`RGBLIGHT_DISABLE_KEYCODES`|*Not defined* |If defined, disables the ability to control RGB Light from the keycodes. You must use code functions to control the feature|
|`RGBLIGHT_DEFAULT_MODE` |`RGBLIGHT_MODE_STATIC_LIGHT`|The default mode to use upon clearing the EEPROM |
|`RGBLIGHT_DEFAULT_HUE` |`0` (red) |The default hue to use upon clearing the EEPROM |
|`RGBLIGHT_DEFAULT_SAT` |`UINT8_MAX` (255) |The default saturation to use upon clearing the EEPROM |
@@ -358,7 +358,7 @@ Lighting layers on split keyboards will require layer state synced to the slave
### Overriding RGB Lighting on/off status
-Normally lighting layers are not shown when RGB Lighting is disabled (e.g. with `RGB_TOG` keycode). If you would like lighting layers to work even when the RGB Lighting is otherwise off, add `#define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF` to your `config.h`.
+Normally lighting layers are not shown when RGB Lighting is disabled (e.g. with `UG_TOGG` keycode). If you would like lighting layers to work even when the RGB Lighting is otherwise off, add `#define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF` to your `config.h`.
### Retain brightness
diff --git a/docs/features/split_keyboard.md b/docs/features/split_keyboard.md
index 6efa1c2a35c3..49582c3946f5 100644
--- a/docs/features/split_keyboard.md
+++ b/docs/features/split_keyboard.md
@@ -417,8 +417,8 @@ This allows you to specify a different set of pins for the matrix on the right s
This allows you to specify a different set of direct pins for the right side.
```c
-#define ENCODERS_PAD_A_RIGHT { encoder1a, encoder2a }
-#define ENCODERS_PAD_B_RIGHT { encoder1b, encoder2b }
+#define ENCODER_A_PINS_RIGHT { encoder1a, encoder2a }
+#define ENCODER_B_PINS_RIGHT { encoder1b, encoder2b }
```
This allows you to specify a different set of encoder pins for the right side.
diff --git a/docs/features/tap_dance.md b/docs/features/tap_dance.md
index 3c4040db224b..8fdd83c18d15 100644
--- a/docs/features/tap_dance.md
+++ b/docs/features/tap_dance.md
@@ -273,12 +273,12 @@ Now, at the bottom of your `keymap.c` file, you'll need to add the following:
* How to figure out tap dance state: interrupted and pressed.
*
* Interrupted: If the state of a dance is "interrupted", that means that another key has been hit
- * under the tapping term. This is typically indicitive that you are trying to "tap" the key.
+ * under the tapping term. This is typically indicative that you are trying to "tap" the key.
*
* Pressed: Whether or not the key is still being pressed. If this value is true, that means the tapping term
* has ended, but the key is still being pressed down. This generally means the key is being "held".
*
- * One thing that is currenlty not possible with qmk software in regards to tap dance is to mimic the "permissive hold"
+ * One thing that is currently not possible with qmk software in regards to tap dance is to mimic the "permissive hold"
* feature. In general, advanced tap dances do not work well if they are used with commonly typed letters.
* For example "A". Tap dances are best used on non-letter keys that are not hit while typing letters.
*
@@ -290,7 +290,7 @@ Now, at the bottom of your `keymap.c` file, you'll need to add the following:
* Not a key that is used frequently to double tap, for example 'tab' is often double tapped in a terminal, or
* in a web form. So 'tab' would be a poor choice for a tap dance.
* Letters used in common words as a double. For example 'p' in 'pepper'. If a tap dance function existed on the
- * letter 'p', the word 'pepper' would be quite frustating to type.
+ * letter 'p', the word 'pepper' would be quite frustrating to type.
*
* For the third point, there does exist the 'TD_DOUBLE_SINGLE_TAP', however this is not fully tested
*
diff --git a/docs/features/tri_layer.md b/docs/features/tri_layer.md
index c32e65caed0f..8c34fc65b34e 100644
--- a/docs/features/tri_layer.md
+++ b/docs/features/tri_layer.md
@@ -14,8 +14,8 @@ For a detailed explanation of how the layer stack works, check out [Keymap Overv
| Keycode | Alias | Description |
|----------------------|-----------|---------------------------------------------------------------------------------------------------------|
-| `QK_TRI_LAYER_LOWER` | `TL_LOWR` | Momentarily enables the "lower" layer. Enables the "adjust" layer if the "upper" layer is also enabled" |
-| `QK_TRI_LAYER_UPPER` | `TL_UPPR` | Momentarily enables the "upper" layer. Enables the "adjust" layer if the "lower" layer is also enabled" |
+| `QK_TRI_LAYER_LOWER` | `TL_LOWR` | Momentarily enables the "lower" layer. Enables the "adjust" layer if the "upper" layer is also enabled. |
+| `QK_TRI_LAYER_UPPER` | `TL_UPPR` | Momentarily enables the "upper" layer. Enables the "adjust" layer if the "lower" layer is also enabled. |
## Configuration
diff --git a/docs/features/bluetooth.md b/docs/features/wireless.md
similarity index 53%
rename from docs/features/bluetooth.md
rename to docs/features/wireless.md
index 1dbf15f4e104..0d73ad3583e1 100644
--- a/docs/features/bluetooth.md
+++ b/docs/features/wireless.md
@@ -1,4 +1,4 @@
-# Bluetooth
+# Wireless / Bluetooth
## Bluetooth Known Supported Hardware
@@ -39,8 +39,20 @@ BLUETOOTH_DRIVER = bluefruit_le # or rn42
This is used when multiple keyboard outputs can be selected. Currently this only allows for switching between USB and Bluetooth on keyboards that support both.
-|Key |Aliases |Description |
-|---------------------|---------|----------------------------------------------|
-|`QK_OUTPUT_AUTO` |`OU_AUTO`|Automatically switch between USB and Bluetooth|
-|`QK_OUTPUT_USB` |`OU_USB` |USB only |
-|`QK_OUTPUT_BLUETOOTH`|`OU_BT` |Bluetooth only |
+| Key | Aliases | Description |
+|-----------------------------|-----------|-----------------------------------------------------------------------------------------------|
+| `QK_OUTPUT_AUTO` | `OU_AUTO` | Automatically switch to USB when plugged in, otherwise use wireless |
+| `QK_OUTPUT_NEXT` | `OU_NEXT` | Cycle forwards through USB, Bluetooth, and 2.4GHz (when available) **(not yet implemented)** |
+| `QK_OUTPUT_PREV` | `OU_PREV` | Cycle backwards through USB, Bluetooth, and 2.4GHz (when available) **(not yet implemented)** |
+| `QK_OUTPUT_NONE` | `OU_NONE` | Disable all output **(not yet implemented)** |
+| `QK_OUTPUT_USB` | `OU_USB` | Output to USB only |
+| `QK_OUTPUT_2P4GHZ` | `OU_2P4G` | Output to 2.4GHz only **(not yet implemented)** |
+| `QK_OUTPUT_BLUETOOTH` | `OU_BT` | Output to Bluetooth only |
+| `QK_BLUETOOTH_PROFILE_NEXT` | `BT_NEXT` | Move to the next Bluetooth profile **(not yet implemented)** |
+| `QK_BLUETOOTH_PROFILE_PREV` | `BT_PREV` | Move to the previous Bluetooth profile **(not yet implemented)** |
+| `QK_BLUETOOTH_UNPAIR` | `BT_UNPR` | Un-pair the current Bluetooth profile **(not yet implemented)** |
+| `QK_BLUETOOTH_PROFILE1` | `BT_PRF1` | Swap to Bluetooth profile #1 **(not yet implemented)** |
+| `QK_BLUETOOTH_PROFILE2` | `BT_PRF2` | Swap to Bluetooth profile #2 **(not yet implemented)** |
+| `QK_BLUETOOTH_PROFILE3` | `BT_PRF3` | Swap to Bluetooth profile #3 **(not yet implemented)** |
+| `QK_BLUETOOTH_PROFILE4` | `BT_PRF4` | Swap to Bluetooth profile #4 **(not yet implemented)** |
+| `QK_BLUETOOTH_PROFILE5` | `BT_PRF5` | Swap to Bluetooth profile #5 **(not yet implemented)** |
diff --git a/docs/flashing.md b/docs/flashing.md
index 798331eb23d1..29dc780aaf03 100644
--- a/docs/flashing.md
+++ b/docs/flashing.md
@@ -53,7 +53,7 @@ QMK maintains [a fork of the LUFA DFU bootloader](https://github.com/qmk/lufa/tr
//#define QMK_LED E6
//#define QMK_SPEAKER C6
```
-Currently we do not recommend making `QMK_ESC` the same key as the one designated for [Bootmagic Lite](features/bootmagic), as holding it down will cause the MCU to loop back and forth between entering and exiting the bootloader.
+Currently we do not recommend making `QMK_ESC` the same key as the one designated for [Bootmagic](features/bootmagic), as holding it down will cause the MCU to loop back and forth between entering and exiting the bootloader.
The manufacturer and product strings are automatically pulled from `config.h`, with " Bootloader" appended to the product string.
@@ -209,7 +209,7 @@ To enable the additional features, add the following defines to your `config.h`:
//#define QMK_SPEAKER C6
```
-Currently we do not recommend making `QMK_ESC` the same key as the one designated for [Bootmagic Lite](features/bootmagic), as holding it down will cause the MCU to loop back and forth between entering and exiting the bootloader.
+Currently we do not recommend making `QMK_ESC` the same key as the one designated for [Bootmagic](features/bootmagic), as holding it down will cause the MCU to loop back and forth between entering and exiting the bootloader.
The manufacturer and product strings are automatically pulled from `config.h`, with " Bootloader" appended to the product string.
@@ -345,6 +345,39 @@ Flashing sequence:
3. Flash a .bin file
4. Reset the device into application mode (may be done automatically)
+## AT32 DFU
+
+All AT32 MCUs come preloaded with a factory bootloader that cannot be modified nor deleted.
+
+To ensure compatibility with the AT32-DFU bootloader, make sure this block is present in your `rules.mk`:
+
+```make
+# Bootloader selection
+BOOTLOADER = at32-dfu
+```
+
+Compatible flashers:
+
+* [dfu-util](https://dfu-util.sourceforge.net/) / `:dfu-util` target in QMK (recommended command line)
+ ```
+ dfu-util -a 0 -d 2E3C:DF11 -s 0x8000000:leave -D
+ ```
+
+Flashing sequence:
+
+1. Enter the bootloader using any of the following methods:
+ * Tap the `QK_BOOT` keycode
+ * If a reset circuit is present, tap the `RESET` button on the PCB; some boards may also have a toggle switch that must be flipped
+ * Otherwise, you need to bridge `BOOT0` to VCC (via `BOOT0` button or jumper), short `RESET` to GND (via `RESET` button or jumper), and then let go of the `BOOT0` bridge
+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)
+
+### `make` Targets
+
+* `:dfu-util`: Waits until an AT32 bootloader device is available, and then flashes the firmware.
+* `:dfu-util-split-left` and `:dfu-util-split-right`: Flashes the firmware as with `:dfu-util`, but also sets the handedness setting in EEPROM.
+
## tinyuf2
Keyboards may opt into supporting the tinyuf2 bootloader. This is currently only supported on F303/F401/F411.
diff --git a/docs/flashing_bootloadhid.md b/docs/flashing_bootloadhid.md
deleted file mode 100644
index 2d1696c6e746..000000000000
--- a/docs/flashing_bootloadhid.md
+++ /dev/null
@@ -1,74 +0,0 @@
-# BootloadHID Flashing Instructions and Bootloader Information
-
-ps2avr(GB) boards use an ATmega32A microcontroller and a different bootloader. It is not flashable using the regular QMK methods.
-
-General flashing sequence:
-
-1. Enter the bootloader using any of the following methods:
- * Tap the `QK_BOOT` keycode (may not work on all devices)
- * Hold the salt key while plugging the keyboard in (usually documented within keyboard readme)
-2. Wait for the OS to detect the device
-3. Flash a .hex file
-4. Reset the device into application mode (may be done automatically)
-
-## bootloadHID Flashing Target
-
-::: tip
-Using the QMK installation script, detailed [here](newbs_getting_started), the required bootloadHID tools should be automatically installed.
-:::
-
-To flash via the command line, use the target `:bootloadhid` by executing the following command:
-
-```
-make ::bootloadhid
-```
-
-## GUI Flashing
-
-### Windows
-1. Download [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash).
-2. Place your keyboard into reset.
-3. Ensure the configured VendorID is `16c0` and ProductID is `05df`
-4. Press the `Find Device` button and ensure that your keyboard is found.
-5. Press the `Open .hex File` button and locate the `.hex` file you created.
-6. Press the `Flash Device` button and wait for the process to complete.
-
-## Command Line Flashing
-
-1. Place your keyboard into reset.
-2. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file.
-
-### Windows Manual Installation
-For MSYS2:
-1. Download the BootloadHID firmware package from https://www.obdev.at/downloads/vusb/bootloadHID.2012-12-08.tar.gz.
-2. Extract contents using a compatible tool, for example 7-Zip.
-3. Add to the MSYS path by copying `commandline/bootloadHID.exe` from the extracted archive to your MSYS2 installation, typically `C:\msys64\usr\bin`.
-
-For native Windows flashing, the `bootloadHID.exe` can be used outside of the MSYS2 environment.
-
-### Linux Manual Installation
-1. Install libusb development dependency:
- ```
- # This depends on OS - for Debian the following works
- sudo apt-get install libusb-dev
- ```
-2. Download the BootloadHID firmware package:
- ```
- wget https://www.obdev.at/downloads/vusb/bootloadHID.2012-12-08.tar.gz -O - | tar -xz -C /tmp
- ```
-3. Build the bootloadHID executable:
- ```
- cd /tmp/bootloadHID.2012-12-08/commandline/
- make
- sudo cp bootloadHID /usr/local/bin
- ```
-
-### MacOS Manual Installation
-1. Install Homebrew by typing the following:
- ```
- /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- ```
-2. Install the following packages:
- ```
- brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb
- ```
diff --git a/docs/getting_started_docker.md b/docs/getting_started_docker.md
index 6e69b17d347b..42322397b4a7 100644
--- a/docs/getting_started_docker.md
+++ b/docs/getting_started_docker.md
@@ -5,6 +5,7 @@ This project includes a Docker workflow that will allow you to build a new firmw
## Requirements
The main prerequisite is a working `docker` or `podman` install.
+
* [Docker CE](https://docs.docker.com/install/#supported-platforms)
* [Podman](https://podman.io/getting-started/installation)
@@ -18,6 +19,7 @@ cd qmk_firmware
```
Run the following command to build a keymap:
+
```
util/docker_build.sh :
# For example: util/docker_build.sh planck/rev6:default
@@ -32,6 +34,8 @@ util/docker_build.sh keyboard:keymap:target
# For example: util/docker_build.sh planck/rev6:default:flash
```
+Note that mass storage bootloaders are not supported by the `flash` target. In this case you will have to manually copy the firmware file to the keyboard.
+
You can also start the script without any parameters, in which case it will ask you to input the build parameters one by one, which you may find easier to use:
```
@@ -46,6 +50,13 @@ By default docker or podman are automatically detected and docker is preferred o
RUNTIME="podman" util/docker_build.sh keyboard:keymap:target
```
+If flashing is not required, it's possible to run the container as unprivileged (on Linux), and without docker-machine (on Windows/macOS):
+
+```
+SKIP_FLASHING_SUPPORT=1 util/docker_build.sh keyboard:keymap:target
+```
+
+
## FAQ
### Why can't I flash on Windows/macOS
diff --git a/docs/hand_wire.md b/docs/hand_wire.md
index cbb917906079..9aeee7512dc6 100644
--- a/docs/hand_wire.md
+++ b/docs/hand_wire.md
@@ -231,7 +231,7 @@ Once you have confirmed that the keyboard is working, if you have used a seperat
If you found this fullfilling you could experiment by adding additional features such as [in switch LEDs](https://geekhack.org/index.php?topic=94258.0), [in switch RGB](https://www.reddit.com/r/MechanicalKeyboards/comments/5s1l5u/photoskeyboard_science_i_made_a_handwired_rgb/), [RGB underglow](https://medium.com/@DavidNZ/hand-wired-custom-keyboard-cdd14429c7b3#.7a1ovebsk) or even an [OLED display!](https://www.reddit.com/r/olkb/comments/5zy7og/adding_ssd1306_oled_display_to_your_build/)
-There are a lot of possibilities inside the firmware - explore [docs.qmk.fm](https://docs.qmk.fm) for a full feature list, and dive into the different keyboards to see how people use all of them. You can always stop by [the OLKB subreddit](https://reddit.com/r/olkb) or [QMK Discord](https://discord.gg/Uq7gcHh) for help!
+There are a lot of possibilities inside the firmware - explore [docs.qmk.fm](https://docs.qmk.fm) for a full feature list, and dive into the different keyboards to see how people use all of them. You can always stop by [the OLKB subreddit](https://reddit.com/r/olkb) or [QMK Discord](https://discord.gg/qmk) for help!
## Links to Other Guides
diff --git a/docs/hardware_keyboard_guidelines.md b/docs/hardware_keyboard_guidelines.md
index de67fa3bc399..7f17c46748d6 100644
--- a/docs/hardware_keyboard_guidelines.md
+++ b/docs/hardware_keyboard_guidelines.md
@@ -111,7 +111,7 @@ The `post_config.h` file can be used for additional post-processing, depending o
#define USB_MAX_POWER_CONSUMPTION 400
#else
// fix iPhone and iPad power adapter issue
- // iOS device need lessthan 100
+ // iOS devices need less than 100
#define USB_MAX_POWER_CONSUMPTION 100
#endif
diff --git a/docs/index.md b/docs/index.md
index 166bdc8ad945..433913adb92c 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -32,7 +32,7 @@ There are a lot of ways you can contribute to the QMK Community. The easiest way
* Help people out on our forums and chat rooms:
* [/r/olkb](https://www.reddit.com/r/olkb/)
- * [Discord Server](https://discord.gg/Uq7gcHh)
+ * [Discord Server](https://discord.gg/qmk)
* Contribute to our documentation by clicking "Edit This Page" at the bottom
* [Report a bug](https://github.com/qmk/qmk_firmware/issues/new/choose)
* [Open a Pull Request](contributing)
diff --git a/docs/keycodes.md b/docs/keycodes.md
index 4c91d98fa7a4..cf170721c814 100644
--- a/docs/keycodes.md
+++ b/docs/keycodes.md
@@ -290,15 +290,27 @@ See also: [Backlighting](features/backlight)
| `QK_BACKLIGHT_DOWN` | `BL_DOWN` | Decrease the backlight level |
| `QK_BACKLIGHT_TOGGLE_BREATHING` | `BL_BRTG` | Toggle backlight breathing |
-## Bluetooth {#bluetooth}
-
-See also: [Bluetooth](features/bluetooth)
-
-|Key |Aliases |Description |
-|---------------------|---------|----------------------------------------------|
-|`QK_OUTPUT_AUTO` |`OU_AUTO`|Automatically switch between USB and Bluetooth|
-|`QK_OUTPUT_USB` |`OU_USB` |USB only |
-|`QK_OUTPUT_BLUETOOTH`|`OU_BT` |Bluetooth only |
+## Wireless/Bluetooth {#bluetooth}
+
+See also: [Wireless](features/wireless)
+
+| Key | Aliases | Description |
+|-----------------------------|-----------|-----------------------------------------------------------------------------------------------|
+| `QK_OUTPUT_AUTO` | `OU_AUTO` | Automatically switch to USB when plugged in, otherwise use wireless |
+| `QK_OUTPUT_NEXT` | `OU_NEXT` | Cycle forwards through USB, Bluetooth, and 2.4GHz (when available) **(not yet implemented)** |
+| `QK_OUTPUT_PREV` | `OU_PREV` | Cycle backwards through USB, Bluetooth, and 2.4GHz (when available) **(not yet implemented)** |
+| `QK_OUTPUT_NONE` | `OU_NONE` | Disable all output **(not yet implemented)** |
+| `QK_OUTPUT_USB` | `OU_USB` | Output to USB only |
+| `QK_OUTPUT_2P4GHZ` | `OU_2P4G` | Output to 2.4GHz only **(not yet implemented)** |
+| `QK_OUTPUT_BLUETOOTH` | `OU_BT` | Output to Bluetooth only |
+| `QK_BLUETOOTH_PROFILE_NEXT` | `BT_NEXT` | Move to the next Bluetooth profile **(not yet implemented)** |
+| `QK_BLUETOOTH_PROFILE_PREV` | `BT_PREV` | Move to the previous Bluetooth profile **(not yet implemented)** |
+| `QK_BLUETOOTH_UNPAIR` | `BT_UNPR` | Un-pair the current Bluetooth profile **(not yet implemented)** |
+| `QK_BLUETOOTH_PROFILE1` | `BT_PRF1` | Swap to Bluetooth profile #1 **(not yet implemented)** |
+| `QK_BLUETOOTH_PROFILE2` | `BT_PRF2` | Swap to Bluetooth profile #2 **(not yet implemented)** |
+| `QK_BLUETOOTH_PROFILE3` | `BT_PRF3` | Swap to Bluetooth profile #3 **(not yet implemented)** |
+| `QK_BLUETOOTH_PROFILE4` | `BT_PRF4` | Swap to Bluetooth profile #4 **(not yet implemented)** |
+| `QK_BLUETOOTH_PROFILE5` | `BT_PRF5` | Swap to Bluetooth profile #5 **(not yet implemented)** |
## Caps Word {#caps-word}
@@ -375,13 +387,22 @@ See also: [Key Lock](features/key_lock)
|---------|--------------------------------------------------------------|
|`QK_LOCK`|Hold down the next key pressed, until the key is pressed again|
+## Layer Lock {#layer-lock}
+
+See also: [Layer Lock](features/layer_lock)
+
+|Key |Aliases |Description |
+|---------------|---------|----------------------------------|
+|`QK_LAYER_LOCK`|`QK_LLCK`|Locks or unlocks the highest layer|
+
## Layer Switching {#layer-switching}
See also: [Layer Switching](feature_layers#switching-and-toggling-layers)
|Key |Description |
|----------------|----------------------------------------------------------------------------------|
-|`DF(layer)` |Set the base (default) layer |
+|`DF(layer)` |Set the base (default) layer until the keyboard loses power |
+|`PDF(layer)` |Set the base (default) layer in EEPROM |
|`MO(layer)` |Momentarily turn on `layer` when pressed (requires `KC_TRNS` on destination layer)|
|`OSL(layer)` |Momentarily activates `layer` until a key is pressed. See [One Shot Keys](one_shot_keys) for details. |
|`LM(layer, mod)`|Momentarily turn on `layer` (like MO) with `mod` active as well. Where `mod` is a mods_bit. Mods can be viewed [here](mod_tap). Example Implementation: `LM(LAYER_1, MOD_LALT)`|
@@ -611,24 +632,27 @@ See also: [MIDI](features/midi)
See also: [Mouse Keys](features/mouse_keys)
-|Key |Aliases |Description |
-|----------------|---------|---------------------------|
-|`KC_MS_UP` |`KC_MS_U`|Mouse Cursor Up |
-|`KC_MS_DOWN` |`KC_MS_D`|Mouse Cursor Down |
-|`KC_MS_LEFT` |`KC_MS_L`|Mouse Cursor Left |
-|`KC_MS_RIGHT` |`KC_MS_R`|Mouse Cursor Right |
-|`KC_MS_BTN1` |`KC_BTN1`|Mouse Button 1 |
-|`KC_MS_BTN2` |`KC_BTN2`|Mouse Button 2 |
-|`KC_MS_BTN3` |`KC_BTN3`|Mouse Button 3 |
-|`KC_MS_BTN4` |`KC_BTN4`|Mouse Button 4 |
-|`KC_MS_BTN5` |`KC_BTN5`|Mouse Button 5 |
-|`KC_MS_WH_UP` |`KC_WH_U`|Mouse Wheel Up |
-|`KC_MS_WH_DOWN` |`KC_WH_D`|Mouse Wheel Down |
-|`KC_MS_WH_LEFT` |`KC_WH_L`|Mouse Wheel Left |
-|`KC_MS_WH_RIGHT`|`KC_WH_R`|Mouse Wheel Right |
-|`KC_MS_ACCEL0` |`KC_ACL0`|Set mouse acceleration to 0|
-|`KC_MS_ACCEL1` |`KC_ACL1`|Set mouse acceleration to 1|
-|`KC_MS_ACCEL2` |`KC_ACL2`|Set mouse acceleration to 2|
+|Key |Aliases |Description |
+|-------------------------|---------|---------------------------|
+|`QK_MOUSE_CURSOR_UP` |`MS_UP` |Mouse cursor up |
+|`QK_MOUSE_CURSOR_DOWN` |`MS_DOWN`|Mouse cursor down |
+|`QK_MOUSE_CURSOR_LEFT` |`MS_LEFT`|Mouse cursor left |
+|`QK_MOUSE_CURSOR_RIGHT` |`MS_RGHT`|Mouse cursor right |
+|`QK_MOUSE_BUTTON_1` |`MS_BTN1`|Mouse button 1 |
+|`QK_MOUSE_BUTTON_2` |`MS_BTN2`|Mouse button 2 |
+|`QK_MOUSE_BUTTON_3` |`MS_BTN3`|Mouse button 3 |
+|`QK_MOUSE_BUTTON_4` |`MS_BTN4`|Mouse button 4 |
+|`QK_MOUSE_BUTTON_5` |`MS_BTN5`|Mouse button 5 |
+|`QK_MOUSE_BUTTON_6` |`MS_BTN6`|Mouse button 6 |
+|`QK_MOUSE_BUTTON_7` |`MS_BTN7`|Mouse button 7 |
+|`QK_MOUSE_BUTTON_8` |`MS_BTN8`|Mouse button 8 |
+|`QK_MOUSE_WHEEL_UP` |`MS_WHLU`|Mouse wheel up |
+|`QK_MOUSE_WHEEL_DOWN` |`MS_WHLD`|Mouse wheel down |
+|`QK_MOUSE_WHEEL_LEFT` |`MS_WHLL`|Mouse wheel left |
+|`QK_MOUSE_WHEEL_RIGHT` |`MS_WHLR`|Mouse wheel right |
+|`QK_MOUSE_ACCELERATION_0`|`MS_ACL0`|Set mouse acceleration to 0|
+|`QK_MOUSE_ACCELERATION_1`|`MS_ACL1`|Set mouse acceleration to 1|
+|`QK_MOUSE_ACCELERATION_2`|`MS_ACL2`|Set mouse acceleration to 2|
## Modifiers {#modifiers}
@@ -701,44 +725,49 @@ See also: [Dynamic Tapping Term](tap_hold#dynamic-tapping-term)
See also: [RGB Lighting](features/rgblight)
-|Key |Aliases |Description |
-|-------------------|----------|--------------------------------------------------------------------|
-|`RGB_TOG` | |Toggle RGB lighting on or off |
-|`RGB_MODE_FORWARD` |`RGB_MOD` |Cycle through modes, reverse direction when Shift is held |
-|`RGB_MODE_REVERSE` |`RGB_RMOD`|Cycle through modes in reverse, forward direction when Shift is held|
-|`RGB_HUI` | |Increase hue, decrease hue when Shift is held |
-|`RGB_HUD` | |Decrease hue, increase hue when Shift is held |
-|`RGB_SAI` | |Increase saturation, decrease saturation when Shift is held |
-|`RGB_SAD` | |Decrease saturation, increase saturation when Shift is held |
-|`RGB_VAI` | |Increase value (brightness), decrease value when Shift is held |
-|`RGB_VAD` | |Decrease value (brightness), increase value when Shift is held |
-|`RGB_MODE_PLAIN` |`RGB_M_P `|Static (no animation) mode |
-|`RGB_MODE_BREATHE` |`RGB_M_B` |Breathing animation mode |
-|`RGB_MODE_RAINBOW` |`RGB_M_R` |Rainbow animation mode |
-|`RGB_MODE_SWIRL` |`RGB_M_SW`|Swirl animation mode |
-|`RGB_MODE_SNAKE` |`RGB_M_SN`|Snake animation mode |
-|`RGB_MODE_KNIGHT` |`RGB_M_K` |"Knight Rider" animation mode |
-|`RGB_MODE_XMAS` |`RGB_M_X` |Christmas animation mode |
-|`RGB_MODE_GRADIENT`|`RGB_M_G` |Static gradient animation mode |
-|`RGB_MODE_RGBTEST` |`RGB_M_T` |Red,Green,Blue test animation mode |
-
-## RGB Matrix Lighting {#rgb-matrix-lighting}
-
-See also: [RGB Matrix Lighting](features/rgb_matrix)
-
-|Key |Aliases |Description |
-|-------------------|----------|--------------------------------------------------------------------------------------|
-|`RGB_TOG` | |Toggle RGB lighting on or off |
-|`RGB_MODE_FORWARD` |`RGB_MOD` |Cycle through modes, reverse direction when Shift is held |
-|`RGB_MODE_REVERSE` |`RGB_RMOD`|Cycle through modes in reverse, forward direction when Shift is held |
-|`RGB_HUI` | |Increase hue, decrease hue when Shift is held |
-|`RGB_HUD` | |Decrease hue, increase hue when Shift is held |
-|`RGB_SAI` | |Increase saturation, decrease saturation when Shift is held |
-|`RGB_SAD` | |Decrease saturation, increase saturation when Shift is held |
-|`RGB_VAI` | |Increase value (brightness), decrease value when Shift is held |
-|`RGB_VAD` | |Decrease value (brightness), increase value when Shift is held |
-|`RGB_SPI` | |Increase effect speed (does not support eeprom yet), decrease speed when Shift is held|
-|`RGB_SPD` | |Decrease effect speed (does not support eeprom yet), increase speed when Shift is held|
+|Key |Aliases |Description |
+|------------------------------|----------|---------------------------------------------------------------------|
+|`QK_UNDERGLOW_TOGGLE` |`UG_TOGG` |Toggle RGB lighting on or off |
+|`QK_UNDERGLOW_MODE_NEXT` |`UG_NEXT` |Cycle through modes, reverse direction when Shift is held |
+|`QK_UNDERGLOW_MODE_PREVIOUS` |`UG_PREV` |Cycle through modes in reverse, forward direction when Shift is held |
+|`QK_UNDERGLOW_HUE_UP` |`UG_HUEU` |Increase hue, decrease hue when Shift is held |
+|`QK_UNDERGLOW_HUE_DOWN` |`UG_HUED` |Decrease hue, increase hue when Shift is held |
+|`QK_UNDERGLOW_SATURATION_UP` |`UG_SATU` |Increase saturation, decrease saturation when Shift is held |
+|`QK_UNDERGLOW_SATURATION_DOWN`|`UG_SATD` |Decrease saturation, increase saturation when Shift is held |
+|`QK_UNDERGLOW_VALUE_UP` |`UG_VALU` |Increase value (brightness), decrease value when Shift is held |
+|`QK_UNDERGLOW_VALUE_DOWN` |`UG_VALD` |Decrease value (brightness), increase value when Shift is held |
+|`QK_UNDERGLOW_SPEED_UP` |`UG_SPDU` |Increase effect speed (brightness), decrease speed when Shift is held|
+|`QK_UNDERGLOW_SPEED_DOWN` |`UG_SPDD` |Decrease effect speed (brightness), increase speed when Shift is held|
+|`RGB_MODE_PLAIN` |`RGB_M_P `|Static (no animation) mode (deprecated) |
+|`RGB_MODE_BREATHE` |`RGB_M_B` |Breathing animation mode (deprecated) |
+|`RGB_MODE_RAINBOW` |`RGB_M_R` |Rainbow animation mode (deprecated) |
+|`RGB_MODE_SWIRL` |`RGB_M_SW`|Swirl animation mode (deprecated) |
+|`RGB_MODE_SNAKE` |`RGB_M_SN`|Snake animation mode (deprecated) |
+|`RGB_MODE_KNIGHT` |`RGB_M_K` |"Knight Rider" animation mode (deprecated) |
+|`RGB_MODE_XMAS` |`RGB_M_X` |Christmas animation mode (deprecated) |
+|`RGB_MODE_GRADIENT` |`RGB_M_G` |Static gradient animation mode (deprecated) |
+|`RGB_MODE_RGBTEST` |`RGB_M_T` |Red, Green, Blue test animation mode (deprecated) |
+|`RGB_MODE_TWINKLE` |`RGB_M_TW`|Twinkle animation mode (deprecated) |
+
+## RGB Matrix {#rgb-matrix}
+
+See also: [RGB Matrix](features/rgb_matrix)
+
+|Key |Aliases |Description |
+|-------------------------------|---------|-----------------------------------|
+|`QK_RGB_MATRIX_ON` |`RM_ON` |Turn on RGB Matrix |
+|`QK_RGB_MATRIX_OFF` |`RM_OFF` |Turn off RGB Matrix |
+|`QK_RGB_MATRIX_TOGGLE` |`RM_TOGG`|Toggle RGB Matrix on or off |
+|`QK_RGB_MATRIX_MODE_NEXT` |`RM_NEXT`|Cycle through animations |
+|`QK_RGB_MATRIX_MODE_PREVIOUS` |`RM_PREV`|Cycle through animations in reverse|
+|`QK_RGB_MATRIX_HUE_UP` |`RM_HUEU`|Cycle through hue |
+|`QK_RGB_MATRIX_HUE_DOWN` |`RM_HUED`|Cycle through hue in reverse |
+|`QK_RGB_MATRIX_SATURATION_UP` |`RM_SATU`|Increase the saturation |
+|`QK_RGB_MATRIX_SATURATION_DOWN`|`RM_SATD`|Decrease the saturation |
+|`QK_RGB_MATRIX_VALUE_UP` |`RM_VALU`|Increase the brightness level |
+|`QK_RGB_MATRIX_VALUE_DOWN` |`RM_VALD`|Decrease the brightness level |
+|`QK_RGB_MATRIX_SPEED_UP` |`RM_SPDU`|Increase the animation speed |
+|`QK_RGB_MATRIX_SPEED_DOWN` |`RM_SPDD`|Decrease the animation speed |
## US ANSI Shifted Symbols {#us-ansi-shifted-symbols}
diff --git a/docs/license_violations.md b/docs/license_violations.md
new file mode 100644
index 000000000000..81a6ba517f76
--- /dev/null
+++ b/docs/license_violations.md
@@ -0,0 +1,98 @@
+# License Violations
+
+QMK Firmware has seen its fair share of license violations, which hurts the community and frustrates the QMK maintainers.
+
+Typical non-compliance includes:
+
+* Not providing any source code
+* Providing "crippled" source code, such as a wired-only firmware for a wireless-capable board
+
+Boards from vendors who don't provide source code are proving to be a significant time sink as the QMK team and other support helpers volunteer their time trying to determine which board someone has before they can help -- and in these cases they can't help. Occasionally this is followed by abuse; something that QMK and its volunteers should not be subjected to, rather redirected to the vendor in question.
+
+The QMK team now actively directs support requests back to each vendor - vendors must provide their own product support for their boards. The QMK team are volunteers, the vendor must not expect the team to act as their support staff.
+
+## Offending Vendors
+
+The QMK team cannot tell you which boards you should or should not purchase, but please consider the lack of license compliance from the following vendors before making your decision. If you wish to look at the boards upstream QMK Firmware currently supports, you can search [here](https://browse.qmk.fm/).
+
+If you own a board from one of the following vendors already, consider asking them for the equivalent QMK source code if it's not already available. With enough customers demanding corresponding source code, vendors may start to change their policies.
+
+| Vendor | Reason |
+|------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| BBB Keyboard | Selling tri-mode boards based on QMK without sources, attempted upstreaming crippled firmware without wireless. |
+| Chosfox | Selling L75 wired/wireless boards based on QMK without sources, just `via.json` provided. Raised on discord over multiple weeks without response. |
+| CIDOO | Selling wired boards based on QMK without sources, just `via.json` provided. |
+| Darmoshark | Selling wired boards based on QMK without sources, just `via.json` provided. |
+| Epomaker | Lots of historical keyboards with `via.json` but no corresponding sources. Wireless code for a small handful provided, pending core cleanup for QMK upstreaming. Most other boards have source nowhere to be seen. |
+| Ergokbd (IFKB) | At least their crkbd clone ships with QMK+Vial, seemingly refuses to disclose sources despite multiple customers requesting them. |
+| iLovBee | Official 30-day copyright source code request issued Sep 11 2024 due to deception on PR, no response received. Ambiguity on PRs -- marketing says wireless, PR author said wired-only, then included wireless code anyway. Seemingly intentionally deceptive. |
+| KiiBOOM | Seems to use the same OEM as Epomaker, same problems. |
+| kprepublic | Makes no attempt to release source code, all boards in QMK are reverse-engineered, created, and supported by the community. New board variants magically appear without telling customers they're incompatible with existing QMK versions, in some cases bricking boards or requiring ISP flashing. |
+| Luminkey | Selling tri-mode boards based on QMK without sources, just `via.json` provided. |
+| Meletrix | Selling tri-mode boards based on QMK without sources, just `via.json` provided. |
+| mmd / Smartmmd / i-game.tech | Ambiguity on PRs -- marketing says wireless, PR author said wired-only, then included wireless code anyway. Seemingly intentionally deceptive. |
+| MyKeyClub | Community-supported JRIS75, vendor was contacted by community members and refused to cooperate. |
+| owlab | Selling wired based on QMK without sources, just `via.json` provided. Ambiguous as to whether or not wireless firmware is based on QMK, given that their configuration tool looks very similar to VIA. |
+| pressplayid | Selling wired and tri-mode boards based on QMK without sources, just `via.json` provided |
+| qwertykeys | Selling wired and tri-mode boards based on QMK without sources, just `via.json` provided. |
+| Redragon | Selling tri-mode boards based on QMK without sources, attempted upstreaming crippled firmware without wireless. |
+| Royal Kludge | PRs for fake boards in order to attain VIA compatibility identified. Lots of other keyboards with `via.json` but no corresponding sources, attempted upstreaming crippled firmware without wireless. Wireless code for some provided, pending core cleanup for QMK upstreaming. PRs including different manufacturer names as well. |
+| Shenzhen Hangsheng | PR submissions with crippled firmware, debating with maintainers about wireless despite marketing material clearly stating tri-mode. |
+| Tacworks | Selling tri-mode boards based on QMK, crippled firmware already merged into QMK without wireless without QMK team realising. |
+| TKD / Vertex | Selling tri-mode boards based on QMK without sources, attempted upstreaming crippled firmware without wireless. |
+| WOBKEY | Selling tri-mode boards based on QMK without sources, attempted upstreaming crippled firmware without wireless. |
+| Weikav | Selling tri-mode boards based on QMK without sources, just `via.json` provided. |
+| Womier | Selling tri-mode boards based on QMK without sources, attempted upstreaming crippled firmware without wireless. |
+| Wuque Studio | Selling wired and tri-mode boards based on QMK without sources, just `via.json` provided. |
+| XVX | Ambiguity on PRs -- marketing says wireless, PR author said wired-only. Seemingly intentionally deceptive. |
+| Zuoya | Selling tri-mode boards based on QMK without sources, just `via.json` provided. |
+
+::: danger Violations
+Links are not provided above as the QMK team does not wish to inadvertently promote purchases of boards in violation of QMK's license.
+:::
+
+## Licensing
+
+QMK Firmware's license requires full disclosure of source code for any firmware which is based on QMK. This includes any of the following scenarios:
+
+* Use of public QMK Firmware, but with "closed source" privately-held board definitions
+* Vendor-customised QMK Firmware, which the vendor keeps private for building their own boards
+* Any other non-QMK firmware which includes portions of QMK Firmware, such as adaptation of `via.c` into any other non-QMK firmware, even if used as a reference when translated to another programming language.
+
+As per the GPL license requirements, vendors must provide entire source code for the as-shipped firmware.
+
+QMK has traditionally been lenient with this clause -- providing source code to the QMK community is necessary but reproducing the exact build may not be possible. QMK has required functionally-equivalent source code to be made available. In rare cases exact code may be requested; vendors must keep copies regardless.
+
+At minimum, vendors must provide the source code through some distribution mechanism. This could potentially be an clearly available downloadable copy of the code online, a fork of QMK Firmware, or even a DVD accompanying the product in the box.
+
+If sources are unable to be provided in a timely fashion, QMK may revoke the vendor's license, effectively rendering them unable to leverage QMK.
+
+Vendors choosing to keep things closed-source because of a desire to have a "competitive edge" compared to other vendors is unacceptable to both QMK and the community, and is a breach of the QMK license. There's no reason to do so; any new or interesting vendor-specific feature will be quickly replicated by other vendors or the community anyway.
+
+## QMK PR Considerations
+
+Vendors who submit PRs to QMK Firmware whilst not providing full sources for all of their license-violating boards will be put on hold until source code for all violating boards is provided. Intentional deception may result in boards being removed from QMK and all future PRs for that manufacturer being denied outright.
+
+Submitting crippled source code in order to attain a merge into QMK Firmware to pave the way for VIA support is unacceptable. This includes submitting a wired-only firmware for a wireless-capable board, or any other PR which does not include key features as-advertised.
+
+Reusing the `VID` and `PID` for multiple boards (such as for two variants, wired and wireless) is an unacceptable scenario as this creates confusion for support. Many customers have flashed boards with the wrong firmware, which could have been avoided if vendors were obvious about their board identification mechanisms.
+
+If there is sufficient ambiguity about a board, supporting evidence will need to be presented to the QMK team. This may include impartial third parties who can demonstrate a board's existence and can confirm its feature set, such as well-known content producers; popular review sites or notable video creators may be leveraged. If such evidence is unavailable, as a last resort the vendor may be required to ship a fully functional board in full retail packaging to QMK maintainers for verification. Engineering samples will not be accepted, as one-off boards have been deceptively used in the past.
+
+PRs submitted to upstream QMK should not expect an instant merge just because source code has been provided -- code from OEMs has historically been of a quality lower than QMK standards, so as per the [PR checklist](https://docs.qmk.fm/pr_checklist) submitters should make the changes as small as possible and be prepared to change their implementation.
+
+## Detection
+
+If the QMK team identifies or is informed of a license violation from a vendor:
+
+* Any current and future PRs for that vendor will be indefinitely put on hold, preventing merge into QMK Firmware, thus preventing any out-of-the-box VIA support
+* Any existing keyboards from the vendor may be removed from QMK Firmware
+* Vendors will be added to the _offending vendors_ list above
+
+Repeated violations may result in that vendor being disallowed from contributing the QMK in its entirety. In the worst case, the QMK team may choose to revoke a vendor's license to use QMK Firmware outright.
+
+## Remediation
+
+Vendors must provide fully-featured source code for each of their identified violations, matching the feature capabilities of their as-shipped products. This will usually be in their own fork of QMK Firmware while awaiting a merge into upstream.
+
+Once all identified violations have been remediated, current and future PRs will no longer be on hold and the vendor will be removed from the offending vendors list above.
diff --git a/docs/mod_tap.md b/docs/mod_tap.md
index 37c2ba3473bc..da2ecc9a854d 100644
--- a/docs/mod_tap.md
+++ b/docs/mod_tap.md
@@ -2,7 +2,7 @@
The Mod-Tap key `MT(mod, kc)` acts like a modifier when held, and a regular keycode when tapped. In other words, you can have a key that sends Escape when you tap it, but functions as a Control or Shift key when you hold it down.
-The modifiers this keycode and `OSM()` accept are prefixed with `MOD_`, not `KC_`:
+The modifiers (`mod`) argument to the `MT()` macro are prefixed with `MOD_`, not `KC_`:
|Modifier |Description |
|----------|----------------------------------------|
diff --git a/docs/newbs.md b/docs/newbs.md
index 64593cbad12c..95cde67f0cdd 100644
--- a/docs/newbs.md
+++ b/docs/newbs.md
@@ -4,7 +4,7 @@ Your computer keyboard has a processor inside of it, similar to the one inside y
QMK tries to put a lot of power into your hands by making easy things easy, and hard things possible. You don't have to know how to program to create powerful keymaps — you only have to follow a few simple syntax rules.
-Not sure if your keyboard can run QMK? If it's a mechanical keyboard you built yourself chances are good it can. We support a [large number of hobbyist boards](https://qmk.fm/keyboards/). If your current keyboard can't run QMK there are a lot of choices out there for boards that do.
+Not sure if your keyboard can run QMK? If it's a mechanical keyboard you built yourself chances are good it can. We support a [large number of hobbyist boards](https://browse.qmk.fm/). If your current keyboard can't run QMK there are a lot of choices out there for boards that do.
::: tip Is This Guide For Me?
If the thought of programming intimidates you, please [take a look at our online GUI](newbs_building_firmware_configurator) instead.
diff --git a/docs/newbs_building_firmware.md b/docs/newbs_building_firmware.md
index f3afd6a89685..f5e529b9cee3 100644
--- a/docs/newbs_building_firmware.md
+++ b/docs/newbs_building_firmware.md
@@ -42,7 +42,7 @@ Look at the output from that command, you should see something like this:
Ψ Created a new keymap called in: /home/me/qmk_firmware/keyboards/clueboard/66/rev3/keymaps/.
```
-This is the location of your new `keymap.c` file.
+This is the location of your new keymap file. Your keyboards default keymap file may be a `.json` file or a `.c` file. If your keymap is a `.json` file it can be converted to a `.c` file using QMK's [`json2c`](cli_commands#qmk-json2c) utility.
## Open `keymap.c` In Your Favorite Text Editor
diff --git a/docs/newbs_flashing.md b/docs/newbs_flashing.md
index e9df397267c6..5d5c1983e196 100644
--- a/docs/newbs_flashing.md
+++ b/docs/newbs_flashing.md
@@ -15,7 +15,7 @@ Different keyboards have different ways to enter this special mode. If your PCB
* Press the physical `RESET` button, usually located on the underside of the PCB
* Locate header pins on the PCB labeled `RESET` and `GND`, and short them together while plugging your PCB in
-If you've attempted all of the above to no avail, and the main chip on the board says `STM32` or `RP2-B1` on it, this may be a bit more complicated. Generally your best bet is to ask on [Discord](https://discord.gg/Uq7gcHh) for assistance. It's likely some photos of the board will be asked for -- if you can get them ready beforehand it'll help move things along!
+If you've attempted all of the above to no avail, and the main chip on the board says `STM32` or `RP2-B1` on it, this may be a bit more complicated. Generally your best bet is to ask on [Discord](https://discord.gg/qmk) for assistance. It's likely some photos of the board will be asked for -- if you can get them ready beforehand it'll help move things along!
Otherwise, you should see a message in yellow, similar to this in QMK Toolbox:
@@ -129,4 +129,4 @@ Congrats! Your custom firmware has been programmed to your keyboard and you're r
With a little bit of luck everything will work perfectly, but if not there are steps that will help you figure out what's wrong.
Testing your keyboard is usually pretty straightforward. Press every single key and make sure it sends the keys you expect. You can use [QMK Configurator](https://config.qmk.fm/#/test/)'s test mode to check your keyboard, even if it doesn't run QMK.
-Still not working? Browse the FAQ topics for more information, or [chat with us on Discord](https://discord.gg/Uq7gcHh).
+Still not working? Browse the FAQ topics for more information, or [chat with us on Discord](https://discord.gg/qmk).
diff --git a/docs/other_vscode.md b/docs/other_vscode.md
index 31208d8f3bfc..ab2b23e96b41 100644
--- a/docs/other_vscode.md
+++ b/docs/other_vscode.md
@@ -177,12 +177,13 @@ You'll need to perform some modifications to the file above in order to target y
Windows builds of QMK Firmware are generally compiled using QMK MSYS, and the path to gdb's location (`C:\\QMK_MSYS\\mingw64\\bin`) needs to be specified under `armToolchainPath` for it to be detected. You may also need to change the GDB path to point at `C:\\QMK_MSYS\\mingw64\\bin\\gdb-multiarch.exe` in the VSCode Cortex-Debug user settings: 
:::
-Optionally, the following modifications should also be made to the keyboard's `rules.mk` file to disable optimisations -- not strictly required but will ensure breakpoints and variable viewing works correctly:
+The following modifications must be made to the keyboard's `rules.mk` file to enable debug information and disable optimisations -- this will ensure breakpoints and variable viewing works correctly:
```makefile
+# Enable debug information in the final binaries
+DEBUG_ENABLE = yes
# Disable optimisations for debugging purposes
LTO_ENABLE = no
OPT = g
-DEBUG = 3
```
At this point, you should build and flash your firmware through normal methods (`qmk compile ...` and `qmk flash ...`).
diff --git a/docs/porting_your_keyboard_to_qmk.md b/docs/porting_your_keyboard_to_qmk.md
index eb45790128d1..737ec4a2cf38 100644
--- a/docs/porting_your_keyboard_to_qmk.md
+++ b/docs/porting_your_keyboard_to_qmk.md
@@ -4,52 +4,51 @@ This page describes the support for [Compatible Microcontrollers](compatible_mic
If you have not yet you should read the [Keyboard Guidelines](hardware_keyboard_guidelines) to get a sense of how keyboards fit into QMK.
-
QMK has a number of features to simplify working with keyboards. For most, you don't have to write a single line of code. To get started, run `qmk new-keyboard`:
```
$ qmk new-keyboard
Ψ Generating a new QMK keyboard directory
-Name Your Keyboard Project
-For more infomation, see:
-https://docs.qmk.fm/hardware_keyboard_guidelines#naming-your-keyboardproject
-
-keyboard Name? mycoolkeeb
-
-Attribution
-Used for maintainer, copyright, etc
-
-Your GitHub Username? [jsmith]
-
-More Attribution
-Used for maintainer, copyright, etc
-
-Your Real Name? [John Smith]
-
-Pick Base Layout
-As a starting point, one of the common layouts can be used to bootstrap the process
-
-Default Layout?
- 1. 60_ansi
-...
- 50. tkl_iso
- 51. none of the above
-Please enter your choice: [51]
-
-What Powers Your Project
-For more infomation, see:
-https://docs.qmk.fm/#/compatible_microcontrollers
-
-MCU?
- 1. atmega32u4
-...
- 22. STM32F303
-Please enter your choice: [12]
+Ψ Name Your Keyboard Project
+Ψ For more information, see:
+https://docs.qmk.fm/hardware_keyboard_guidelines#naming-your-keyboard-project
+Keyboard Name? mycoolkeeb
+Ψ Attribution
+Ψ Used for maintainer, copyright, etc.
+Your GitHub Username? [jsmith]
+Ψ More Attribution
+Ψ Used for maintainer, copyright, etc.
+Your Real Name? [John Smith]
+Ψ Pick Base Layout
+Ψ As a starting point, one of the common layouts can be used to
+bootstrap the process
+Default Layout?
+ 1. 60_abnt2
+ ...
+ 65. none of the above
+Please enter your choice: [65]
+Ψ What Powers Your Project
+Ψ Is your board using a separate development board, such as a Pro Micro,
+or is the microcontroller integrated onto the PCB?
+
+For more information, see:
+https://docs.qmk.fm/compatible_microcontrollers
+Using a Development Board? [y/n] y
+Ψ Select Development Board
+Ψ For more information, see:
+https://docs.qmk.fm/compatible_microcontrollers
+Development Board?
+ 1. bit_c_pro
+ ...
+ 14. promicro
+ ...
+ 18. svlinky
+Please enter your choice: [14]
Ψ Created a new keyboard called mycoolkeeb.
-Ψ To start working on things, `cd` into keyboards/mycoolkeeb,
-Ψ or open the directory in your preferred text editor.
-Ψ And build with qmk compile -kb mycoolkeeb -km default.
+Ψ Build Command: qmk compile -kb mycoolkeeb -km default.
+Ψ Project Location: /Users/jsmith/qmk_firmware/keyboards/mycoolkeeb.
+Ψ Now update the config files to match the hardware!
```
This will create all the files needed to support your new keyboard, and populate the settings with default values. Now you just need to customize it for your keyboard.
@@ -58,13 +57,13 @@ This will create all the files needed to support your new keyboard, and populate
This is where you'll describe your keyboard. Please follow the [Keyboard Readme Template](documentation_templates#keyboard-readmemd-template) when writing your `readme.md`. You're encouraged to place an image at the top of your `readme.md`, please use an external service such as [Imgur](https://imgur.com) to host the images.
-## `info.json`
+## `keyboard.json`
-The `info.json` file is where you configure the hardware and feature set for your keyboard. There are a lot of options that can be placed in that file, too many to list here. For a complete overview of available options see the [Data Driven Configuration Options](reference_info_json) page.
+The `keyboard.json` file is where you configure the hardware and feature set for your keyboard. There are a lot of options that can be placed in that file, too many to list here. For a complete overview of available options see the [Data Driven Configuration Options](reference_info_json) page.
### Hardware Configuration
-At the top of the `info.json` you'll find USB related settings. These control how your keyboard appears to the Operating System. If you don't have a good reason to change you should leave the `usb.vid` as `0xFEED`. For the `usb.pid` you should pick a number that is not yet in use.
+At the top of the `keyboard.json` you'll find USB related settings. These control how your keyboard appears to the Operating System. If you don't have a good reason to change you should leave the `usb.vid` as `0xFEED`. For the `usb.pid` you should pick a number that is not yet in use.
Do change the `manufacturer` and `keyboard_name` lines to accurately reflect your keyboard.
@@ -82,10 +81,11 @@ Do change the `manufacturer` and `keyboard_name` lines to accurately reflect you
Windows and macOS will display the `manufacturer` and `keyboard_name` in the list of USB devices. `lsusb` on Linux instead prefers the values in the list maintained by the [USB ID Repository](http://www.linux-usb.org/usb-ids.html). By default, it will only use `manufacturer` and `keyboard_name` if the list does not contain that `usb.vid` / `usb.pid`. `sudo lsusb -v` will show the values reported by the device, and they are also present in kernel logs after plugging it in.
:::
-
### Matrix Configuration
-The next section of the `info` file deals with your keyboard's matrix. The first thing you should define is which pins on your MCU are connected to rows and columns. To do so simply specify the names of those pins:
+The next section of the `keyboard.json` deals with your keyboard's matrix. The first thing you should define is which pins on your MCU are connected to rows and columns. To do so simply specify the names of those pins:
+
+#### Diode Matrix
```json
"matrix_pins": {
@@ -94,7 +94,7 @@ The next section of the `info` file deals with your keyboard's matrix. The first
},
```
-The size of the `matrix_pins.cols` and `matrix_pins.rows` arrays infer the size of the matrix (previously `MATRIX_ROWS` and `MATRIX_COLS`).
+The matrix dimensions are inferred from the length of the `matrix_pins.cols` and `matrix_pins.rows` arrays (previously specified explicitly in `config.h` with `MATRIX_ROWS` and `MATRIX_COLS`).
Finally, you can specify the direction your diodes point. This can be `COL2ROW` or `ROW2COL`.
@@ -103,54 +103,56 @@ Finally, you can specify the direction your diodes point. This can be `COL2ROW`
```
#### Direct Pin Matrix
-To configure a keyboard where each switch is connected to a separate pin and ground instead of sharing row and column pins, use `matrix_pins.direct`. The mapping defines the pins of each switch in rows and columns, from left to right. The size of the `matrix_pins.direct` array infers the size of the matrix. Use `NO_PIN` to fill in blank spaces. Overrides the behaviour of `diode_direction`, `matrix_pins.cols` and `matrix_pins.rows`.
+
+To configure a keyboard where each switch is connected to a separate pin and ground instead of sharing row and column pins, use `matrix_pins.direct`. This overrides the behaviour of `diode_direction`, `matrix_pins.cols` and `matrix_pins.rows`, and they should not be specified together.
```json
"matrix_pins": {
"direct": [
- ["F1", "E6", "B0", "B2", "B3" ],
- ["F5", "F0", "B1", "B7", "D2" ],
- ["F6", "F7", "C7", "D5", "D3" ],
- ["B5", "C6", "B6", "NO_PIN", "NO_PIN"]
+ ["F1", "E6", "B0", "B2", "B3"],
+ ["F5", "F0", "B1", "B7", "D2"],
+ ["F6", "F7", "C7", "D5", "D3"],
+ ["B5", "C6", "B6", null, null]
]
},
```
-### Layout macros
+Here, the matrix dimensions are inferred directly from the dimensions of the `matrix_pins.direct` array. Since there are no row or column pins to prescribe the matrix dimensions, you can arrange it however you like. Each "row" must contain the same number of "column"s; use `null` to fill in blank spaces, but try to minimize them.
+
+### Layout Macros
-Next is configuring Layout Macro(s). These define the physical arrangement of keys, and its position within the matrix that a switch are connected to. This allows you to have a physical arrangement of keys that differs from the wiring matrix.
+Next is configuring layout macro(s). These define the physical arrangement of keys, and their position within the matrix that switches are connected to. This allows you to have a physical arrangement of keys that differs from the wiring matrix.
```json
"layouts": {
"LAYOUT_ortho_4x4": {
"layout": [
- { "matrix": [0, 0], "x": 0, "y": 0 },
- { "matrix": [0, 1], "x": 1, "y": 0 },
- { "matrix": [0, 2], "x": 2, "y": 0 },
- { "matrix": [0, 3], "x": 3, "y": 0 },
- { "matrix": [1, 0], "x": 0, "y": 1 },
- { "matrix": [1, 1], "x": 1, "y": 1 },
- { "matrix": [1, 2], "x": 2, "y": 1 },
- { "matrix": [1, 3], "x": 3, "y": 1 },
- { "matrix": [2, 0], "x": 0, "y": 2 },
- { "matrix": [2, 1], "x": 1, "y": 2 },
- { "matrix": [2, 2], "x": 2, "y": 2 },
- { "matrix": [2, 3], "x": 3, "y": 2 },
- { "matrix": [3, 0], "x": 0, "y": 3 },
- { "matrix": [3, 1], "x": 1, "y": 3 },
- { "matrix": [3, 2], "x": 2, "y": 3 },
- { "matrix": [3, 3], "x": 3, "y": 3 }
+ {"matrix": [0, 0], "x": 0, "y": 0},
+ {"matrix": [0, 1], "x": 1, "y": 0},
+ {"matrix": [0, 2], "x": 2, "y": 0},
+ {"matrix": [0, 3], "x": 3, "y": 0},
+ {"matrix": [1, 0], "x": 0, "y": 1},
+ {"matrix": [1, 1], "x": 1, "y": 1},
+ {"matrix": [1, 2], "x": 2, "y": 1},
+ {"matrix": [1, 3], "x": 3, "y": 1},
+ {"matrix": [2, 0], "x": 0, "y": 2},
+ {"matrix": [2, 1], "x": 1, "y": 2},
+ {"matrix": [2, 2], "x": 2, "y": 2},
+ {"matrix": [2, 3], "x": 3, "y": 2},
+ {"matrix": [3, 0], "x": 0, "y": 3},
+ {"matrix": [3, 1], "x": 1, "y": 3},
+ {"matrix": [3, 2], "x": 2, "y": 3},
+ {"matrix": [3, 3], "x": 3, "y": 3}
]
}
}
-
```
-In the above example,
+In the above example,
* `LAYOUT_ortho_4x4` defines the name of the layout macro
- * It must conform to the [layout guidelines](hardware_keyboard_guidelines#ltkeyboard_namehgt)
-* `"matrix": [0, 0]` defines the electrical position
+ * It must conform to the [layout guidelines](hardware_keyboard_guidelines#keyboard-name-h)
+* `"matrix": [0, 0]` defines the matrix row and column that the key is associated with
::: tip
See also: [Split Keyboard Layout Macro](features/split_keyboard#layout-macro) and [Matrix to Physical Layout](understanding_qmk#matrix-to-physical-layout-map).
@@ -158,9 +160,10 @@ See also: [Split Keyboard Layout Macro](features/split_keyboard#layout-macro) an
## Additional Configuration
-There are a lot of features that can be turned on or off, configured or tuned. Some of these have yet to be migrated over to [Data Driven Configuration](data_driven_config). The following sections cover the process for when an `info.json` option is unavailable.
+There are a lot of features that can be turned on or off, configured or tuned. Some of these have yet to be migrated over to [Data Driven Configuration](data_driven_config). The following sections cover the process for when a data-driven option is unavailable.
### Configuration Options
+
For available options for `config.h`, you should see the [Config Options](config_options#the-configh-file) page for more details.
### Build Options
diff --git a/docs/pr_checklist.md b/docs/pr_checklist.md
index f7b16e1d8527..268e3b1b116a 100644
--- a/docs/pr_checklist.md
+++ b/docs/pr_checklist.md
@@ -2,7 +2,7 @@
This is a non-exhaustive checklist of what the QMK Collaborators will be checking when reviewing submitted PRs.
-If there are any inconsistencies with these recommendations, you're best off [creating an issue](https://github.com/qmk/qmk_firmware/issues/new) against this document, or getting in touch with a QMK Collaborator on [Discord](https://discord.gg/Uq7gcHh).
+If there are any inconsistencies with these recommendations, you're best off [creating an issue](https://github.com/qmk/qmk_firmware/issues/new) against this document, or getting in touch with a QMK Collaborator on [Discord](https://discord.gg/qmk).
## Requirements for all PRs
@@ -44,12 +44,14 @@ If there are any inconsistencies with these recommendations, you're best off [cr
Note that personal keymap submissions will no longer be accepted. This section applies to manufacturer-supported keymaps. Please see this [issue](https://github.com/qmk/qmk_firmware/issues/22724) for more information.
:::
-- PRs for vendor specific keymaps will be permitted. The naming convention for these should be `default_${vendor}`, `via_${vendor}` i.e. `via_clueboard`.
- - vendor specific keymaps do not necessarily need to be "vanilla" and can be more richly featured than `default` or `via` stock keymaps.
+- PRs for vendor specific keymaps will be permitted. The naming convention for these should be `default_${vendor}` i.e. `default_clueboard`.
+ - vendor specific keymaps do not necessarily need to be "vanilla" and can be more richly featured than `default` stock keymaps.
- `#include QMK_KEYBOARD_H` preferred to including specific board files
- prefer layer enums to #defines
- custom keycode enums must have first entry = `QK_USER`
- some care with spacing (e.g., alignment on commas or first char of keycodes) makes for a much nicer-looking keymap. Spaces are preferred to tabs
+- keymaps should not enable VIA
+ - keymaps targeting VIA support should be submitted to the [VIA QMK Userspace](https://github.com/the-via/qmk_userspace_via) repository
## Keyboard PRs
@@ -88,7 +90,7 @@ https://github.com/qmk/qmk_firmware/pulls?q=is%3Apr+is%3Aclosed+label%3Akeyboard
- RGB Matrix Configuration
- Run `qmk format-json` on this file before submitting your PR. Be sure to append the `-i` flag to directly modify the file, or paste the outputted code into the file.
- `readme.md`
- - must follow the [template](https://github.com/qmk/qmk_firmware/blob/master/data/templates/keyboard/readme)
+ - must follow the [template](https://github.com/qmk/qmk_firmware/blob/master/data/templates/keyboard/readme.md)
- flash command is present, and has `:flash` at end
- valid hardware availability link (unless handwired) -- private groupbuys are okay, but one-off prototypes will be questioned. If open-source, a link to files should be provided.
- clear instructions on how to reset the board into bootloader mode
@@ -136,12 +138,12 @@ https://github.com/qmk/qmk_firmware/pulls?q=is%3Apr+is%3Aclosed+label%3Akeyboard
- `keymaps/default/keymap.c`
- `QMKBEST`/`QMKURL` example macros removed
- if using `MO(1)` and `MO(2)` keycodes together to access a third layer, the [Tri Layer](features/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"
+- default 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](features/encoders#encoder-map), rather than `encoder_update_user()`
- - default keymap should not enable VIA -- the VIA integration documentation requires a keymap called `via`
+ - default keymap should not enable VIA -- keymaps targeting VIA support should be submitted to the [VIA QMK Userspace](https://github.com/the-via/qmk_userspace_via) repository
- submitters can add an example (or bells-and-whistles) keymap showcasing capabilities in the same PR but it shouldn't be embedded in the 'default' keymap
- submitters can also have a "manufacturer-matching" keymap that mirrors existing functionality of the commercial product, if porting an existing board
- Do not include VIA json files in the PR. These do not belong in the QMK repository as they are not used by QMK firmware -- they belong in the [VIA Keyboard Repo](https://github.com/the-via/keyboards)
@@ -174,7 +176,7 @@ Also, specific to ChibiOS:
- all core PRs must now target `develop` branch, which will subsequently be merged back to `master` on the breaking changes timeline
- as indicated above, the smallest set of changes to core components should be included in each PR
- PRs containing multiple areas of change will be asked to be split up and raised separately
- - keyboard and keymap changes should only be included if they affect base keyboard builds, or the default-like `default`, `via`, `default_????` keymaps etc.
+ - keyboard and keymap changes should only be included if they affect base keyboard builds, or the default-like `default`, `default_????` keymaps etc.
- keymap modifications for anything other than the default-like keymaps **should not be included in the initial PR** in order to simplify the review process
- the core PR submitter should submit a followup PR affecting other keymaps after initial PR merge
- large-scale refactoring or consolidation PRs that affect other keymaps (such as renaming keycodes) should always be raised separately
diff --git a/docs/public/.nojekyll b/docs/public/.nojekyll
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/docs/public/CNAME b/docs/public/CNAME
new file mode 100644
index 000000000000..06276c90c406
--- /dev/null
+++ b/docs/public/CNAME
@@ -0,0 +1 @@
+docs.qmk.fm
diff --git a/docs/quantum_painter.md b/docs/quantum_painter.md
index 1d844d0f942f..782d496ff7d1 100644
--- a/docs/quantum_painter.md
+++ b/docs/quantum_painter.md
@@ -28,6 +28,8 @@ Supported devices:
| ILI9341 | RGB LCD | 240x320 | SPI + D/C + RST | `QUANTUM_PAINTER_DRIVERS += ili9341_spi` |
| ILI9486 | RGB LCD | 320x480 | SPI + D/C + RST | `QUANTUM_PAINTER_DRIVERS += ili9486_spi` |
| ILI9488 | RGB LCD | 320x480 | SPI + D/C + RST | `QUANTUM_PAINTER_DRIVERS += ili9488_spi` |
+| LD7032 (SPI) | Monochrome OLED | 128x40 | SPI + D/C + RST | `QUANTUM_PAINTER_DRIVERS += ld7032_spi` |
+| LD7032 (I2C) | Monochrome OLED | 128x40 | I2C | `QUANTUM_PAINTER_DRIVERS += ld7032_i2c` |
| SSD1351 | RGB OLED | 128x128 | SPI + D/C + RST | `QUANTUM_PAINTER_DRIVERS += ssd1351_spi` |
| ST7735 | RGB LCD | 132x162, 80x160 | SPI + D/C + RST | `QUANTUM_PAINTER_DRIVERS += st7735_spi` |
| ST7789 | RGB LCD | 240x320, 240x240 | SPI + D/C + RST | `QUANTUM_PAINTER_DRIVERS += st7789_spi` |
@@ -478,6 +480,40 @@ Native color format mono2 is compatible with SH1106
SSD1306 and SH1106 are almost entirely identical, to the point of being indisinguishable by Quantum Painter. Enable SH1106 support in Quantum Painter and create SH1106 devices in firmware to perform drawing operations on SSD1306 displays.
+==== LD7032
+
+Enabling support for the LD7032 in Quantum Painter is done by adding the following to `rules.mk`:
+
+```make
+QUANTUM_PAINTER_ENABLE = yes
+# For SPI:
+QUANTUM_PAINTER_DRIVERS += ld7032_spi
+# For I2C:
+QUANTUM_PAINTER_DRIVERS += ld7032_i2c
+```
+
+Creating a SH1106 device in firmware can then be done with the following APIs:
+
+```c
+// SPI-based LD7032:
+painter_device_t qp_ld7032_make_spi_device(uint16_t panel_width, uint16_t panel_height, pin_t chip_select_pin, pin_t dc_pin, pin_t reset_pin, uint16_t spi_divisor, int spi_mode);
+// I2C-based LD7032:
+painter_device_t qp_ld7032_make_i2c_device(uint16_t panel_width, uint16_t panel_height, uint8_t i2c_address);
+```
+
+The device handle returned from the `qp_ld7032_make_???_device` function can be used to perform all other drawing operations.
+
+The maximum number of displays of each type can be configured by changing the following in your `config.h` (default is 1):
+
+```c
+// 3 SPI displays:
+#define LD7032_NUM_SPI_DEVICES 3
+// 3 I2C displays:
+#define LD7032_NUM_I2C_DEVICES 3
+```
+
+Native color format mono2 is compatible with LD7032.
+
:::::
===== Surface
diff --git a/docs/ref_functions.md b/docs/ref_functions.md
index 577273c05d34..599515ebc1e1 100644
--- a/docs/ref_functions.md
+++ b/docs/ref_functions.md
@@ -69,7 +69,7 @@ layer_state_t layer_state_set_user(layer_state_t state) {
Do you want to set the default layer, so that it's retained even after you unplug the board? If so, this is the function for you.
-To use this, you would use `set_single_persistent_default_layer(layer)`. If you have a name defined for your layer, you can use that instead (such as _QWERTY, _DVORAK or _COLEMAK).
+To do this, you would use `set_single_persistent_default_layer(layer)`. If you have a name defined for your layer, you can use that instead (such as _QWERTY, _DVORAK or _COLEMAK).
This will set the default layer, update the persistent settings, and play a tune if you have [Audio](features/audio) enabled on your board, and the default layer sounds set.
@@ -82,6 +82,8 @@ To configure the default layer sounds, you would want to define this in your `co
}
```
+If you do not require it to be retained after you unplug the board, use `set_single_default_layer(layer)` instead.
+
::: tip
There are a large number of predefined songs in [quantum/audio/song_list.h](https://github.com/qmk/qmk_firmware/blob/master/quantum/audio/song_list.h) that you can use.
@@ -99,7 +101,7 @@ To reset to the bootloader use `QK_BOOTLOADER` or `QK_BOOT` keycode or `reset_ke
## Wiping the EEPROM (Persistent Storage)
-If you're having issues with Audio, RGB Underglow, backlighting or keys acting weird, then you can reset the EEPROM (persistent setting storage). To force an EEPROM reset, use the [`EE_CLR` keycode](quantum_keycodes) or [Bootmagic Lite](features/bootmagic) functionality. If neither of those are an option, then you can use a custom macro to do so.
+If you're having issues with Audio, RGB Underglow, backlighting or keys acting weird, then you can reset the EEPROM (persistent setting storage). To force an EEPROM reset, use the [`EE_CLR` keycode](quantum_keycodes) or [Bootmagic](features/bootmagic) functionality. If neither of those are an option, then you can use a custom macro to do so.
To wipe the EEPROM, run `eeconfig_init()` from your function or macro to reset most of the settings to default.
diff --git a/docs/reference_configurator_support.md b/docs/reference_configurator_support.md
index dffed5c0c349..d0824c7705eb 100644
--- a/docs/reference_configurator_support.md
+++ b/docs/reference_configurator_support.md
@@ -156,25 +156,25 @@ For more on the `info.json` files, see [`info.json` Format](reference_info_json)
The Configurator's API uses the layout macro and the JSON file we've given it to create a visual representation of the keyboard that has each visual object tied to a specific key, in sequence:
-key in layout macro | JSON object used
-:---: | :----
-k00 | {"label":"Num Lock", "x":0, "y":0}
-k01 | {"label":"/", "x":1, "y":0}
-k02 | {"label":"*", "x":2, "y":0}
-k03 | {"label":"-", "x":3, "y":0}
-k10 | {"label":"7", "x":0, "y":1}
-k11 | {"label":"8", "x":1, "y":1}
-k12 | {"label":"9", "x":2, "y":1}
-k13 | {"label":"+", "x":3, "y":1, "h":2}
-k20 | {"label":"4", "x":0, "y":2}
-k21 | {"label":"5", "x":1, "y":2}
-k22 | {"label":"6", "x":2, "y":2}
-k30 | {"label":"1", "x":0, "y":3}
-k31 | {"label":"2", "x":1, "y":3}
-k32 | {"label":"3", "x":2, "y":3}
-k33 | {"label":"Enter", "x":3, "y":3, "h":2}
-k40 | {"label":"0", "x":0, "y":4, "w":2}
-k42 | {"label":".", "x":2, "y":4}
+| Key in layout macro | JSON object used |
+| ------------------- | ---------------------------------------- |
+| k00 | `{"label":"Num Lock", "x":0, "y":0}` |
+| k01 | `{"label":"/", "x":1, "y":0}` |
+| k02 | `{"label":"*", "x":2, "y":0}` |
+| k03 | `{"label":"-", "x":3, "y":0}` |
+| k10 | `{"label":"7", "x":0, "y":1}` |
+| k11 | `{"label":"8", "x":1, "y":1}` |
+| k12 | `{"label":"9", "x":2, "y":1}` |
+| k13 | `{"label":"+", "x":3, "y":1, "h":2}` |
+| k20 | `{"label":"4", "x":0, "y":2}` |
+| k21 | `{"label":"5", "x":1, "y":2}` |
+| k22 | `{"label":"6", "x":2, "y":2}` |
+| k30 | `{"label":"1", "x":0, "y":3}` |
+| k31 | `{"label":"2", "x":1, "y":3}` |
+| k32 | `{"label":"3", "x":2, "y":3}` |
+| k33 | `{"label":"Enter", "x":3, "y":3, "h":2}` |
+| k40 | `{"label":"0", "x":0, "y":4, "w":2}` |
+| k42 | `{"label":".", "x":2, "y":4}` |
When a user selects the top-left key in the Configurator, and assigns Num Lock to it, the Configurator builds a keymap file with `KC_NUM` as the first key, and so on as the keymap is built. The `label` keys are not used; they are only for the user's reference in identifying specific keys when debugging the `info.json` file.
diff --git a/docs/reference_info_json.md b/docs/reference_info_json.md
index 2db2cd14277a..99ff7b1f7a33 100644
--- a/docs/reference_info_json.md
+++ b/docs/reference_info_json.md
@@ -6,51 +6,51 @@ You can create `info.json` files at every level under `qmk_firmware/keyboards/String Required
* A free-form text string describing the keyboard. This will be used as the USB product string. Can include Unicode characters, escaped to ASCII eg. `\u03A8` (Ψ).
* Example: `"Clueboard 66%"`
-* `maintainer` (Required)
+* `maintainer` StringRequired
* GitHub username of the maintainer, or `qmk` for community maintained boards.
* Example: `"skullydazed"`
-* `manufacturer` (Required)
+* `manufacturer` StringRequired
* A free-form text string describing the keyboard's manufacturer. This will be used as the USB manufacturer string. Can include Unicode characters, escaped to ASCII eg. `\u03A8` (Ψ).
* Example: `"Clueboard"`
-* `url` (Required)
- * A URL to the keyboard's product page, [QMK.fm/keyboards](https://qmk.fm/keyboards) page, or other page describing information about the keyboard.
+* `url` StringRequired
+ * A URL to the keyboard's product page, [QMK Keyboards](https://browse.qmk.fm/) page, or other page describing information about the keyboard.
* Example: `"https://clueboard.co"`
-* `bootloader_instructions`
+* `bootloader_instructions` String
* Instructions for putting the keyboard into a mode that allows for firmware flashing.
* Example: `"Press the button marked RESET on the back of the PCB"`
-* `tags`
+* `tags` Array: String
* A list of tags describing the keyboard.
* Example: `["ortho", "split", "rgb"]`
## Hardware Configuration {#hardware-configuration}
-* `board`
+* `board` String
* Override the default ChibiOS board name (ARM-based keyboards only).
* Example: `"BLACKPILL_STM32_F411"`
-* `bootloader`
+* `bootloader` String
* The bootloader in use on the keyboard. Required if `development_board` is not specified.
-* `development_board`
+* `development_board` String
* The microcontroller development board, if applicable.
* Example: `"promicro"`
-* `pin_compatible`
+* `pin_compatible` String
* The form factor of the development board, if applicable. Must be one of `elite_c`, `promicro`.
-* `processor`
+* `processor` String
* The microcontroller in use on the keyboard. Required if `development_board` is not specified.
## Firmware Configuration {#firmware-configuration}
* `build`
- * `debounce_type`
+ * `debounce_type`String
* The debounce algorithm to use. Must be one of `asym_eager_defer_pk`, `custom`, `sym_defer_g`, `sym_defer_pk`, `sym_defer_pr`, `sym_eager_pk`, `sym_eager_pr`.
- * `firmware_format`
+ * `firmware_format`String
* The format of the final output binary. Must be one of `bin`, `hex`, `uf2`.
- * `lto`
+ * `lto`Boolean
* Enable Link-Time Optimization.
* Default: `false`
-* `features`
+* `features`Object: Boolean
* A dictionary of features to enable or disable.
* Example:
```json
@@ -61,36 +61,36 @@ You can create `info.json` files at every level under `qmk_firmware/keyboards/Boolean
* Enable locking switch support.
* Default: `false`
- * `resync`
+ * `resync` Boolean
* Keep switch state consistent with keyboard LED state.
* Default: `false`
- * `tap_capslock_delay`
+ * `tap_capslock_delay` Number
* The delay between keydown and keyup for Caps Lock tap events in milliseconds.
* Default: `80` (80 ms)
- * `tap_keycode_delay`
+ * `tap_keycode_delay` Number
* The delay between keydown and keyup for tap events in milliseconds.
* Default: `0` (no delay)
* `tapping`
- * `hold_on_other_key_press`
+ * `hold_on_other_key_press` Boolean
* Default: `false`
- * `hold_on_other_key_press_per_key`
+ * `hold_on_other_key_press_per_key` Boolean
* Default: `false`
- * `permissive_hold`
+ * `permissive_hold` Boolean
* Default: `false`
- * `permissive_hold_per_key`
+ * `permissive_hold_per_key` Boolean
* Default: `false`
- * `retro`
+ * `retro` Boolean
* Default: `false`
- * `retro_per_key`
+ * `retro_per_key` Boolean
* Default: `false`
- * `term`
+ * `term` Number
* Default: `200` (200 ms)
- * `term_per_key`
+ * `term_per_key` Boolean
* Default: `false`
- * `toggle`
+ * `toggle` Number
* Default: `5`
## APA102 {#apa102}
@@ -98,11 +98,11 @@ You can create `info.json` files at every level under `qmk_firmware/keyboards/Pin Required
* The GPIO pin connected to `CI` on the first LED in the chain.
- * `data_pin` (Required)
+ * `data_pin` PinRequired
* The GPIO pin connected to `DI` on the first LED in the chain.
- * `default_brightness`
+ * `default_brightness` Number
* The initial global brightness level (independent of the RGB data), from 0 to 31.
* Default: `31`
@@ -112,26 +112,26 @@ Configures the [Audio](features/audio) feature.
* `audio`
* `default`
- * `on`
+ * `on` Boolean
* The default audio enabled state.
* Default: `true`
- * `clicky`
+ * `clicky` Boolean
* The default audio clicky enabled state.
* Default: `true`
- * `driver`
+ * `driver` String
* The driver to use. Must be one of `dac_additive`, `dac_basic`, `pwm_software`, `pwm_hardware`.
- * `macro_beep`
+ * `macro_beep` Boolean
* Play a short beep for `\a` (ASCII `BEL`) characters in Send String macros.
* Default: `false`
- * `pins` (Required)
+ * `pins` Array: PinRequired
* The GPIO pin(s) connected to the speaker(s).
* `power_control`
- * `on_state`
+ * `on_state` 0|1
* The logical GPIO state required to turn the speaker on.
* Default: `1` (on = high)
- * `pin`
+ * `pin` Pin
* The GPIO pin connected to speaker power circuit.
- * `voices`
+ * `voices` Boolean
* Use multiple audio voices.
* Default: `false`
@@ -141,48 +141,48 @@ Configures the [Audio](features/audio) feature.
Configures the [Backlight](features/backlight) feature.
* `backlight`
- * `as_caps_lock`
+ * `as_caps_lock` Boolean
* Use the backlight as a Caps Lock indicator.
* Default: `false`
- * `breathing`
+ * `breathing` Boolean
* Whether backlight breathing is enabled.
* Default: `false`
- * `breathing_period`
+ * `breathing_period` Number
* The length of one backlight breathing cycle in seconds.
* Default: `6` (6 seconds)
* `default`
- * `on`
+ * `on` Boolean
* The default backlight enabled state.
* Default: `true`
- * `breathing`
+ * `breathing` Boolean
* The default backlight breathing state.
* Default: `false`
- * `brightness`
+ * `brightness` Number
* The default brightness level.
* Default: `max_brightness`
- * `driver`
+ * `driver` String
* The driver to use. Must be one of `custom`, `pwm`, `software`, `timer`.
* Default: `"pwm"`
- * `levels`
+ * `levels` Number
* The number of brightness levels (excluding off), from 1 to 31.
* Default: `3`
- * `max_brightness`
+ * `max_brightness` Number
* The maximum PWM value which brightness is scaled to, from 0 to 255.
* Default: `255`
- * `on_state`
+ * `on_state` 0|1
* The logical GPIO state required to turn the LEDs on.
* Default: `1` (on = high)
- * `pin`
+ * `pin` Pin
* The GPIO pin connected to the backlight circuit.
- * `pins`
+ * `pins` Array: Pin
* A list of GPIO pins connected to the backlight LEDs (`software` and `timer` drivers only).
-## Bluetooth {#bluetooth}
+## Wireless/Bluetooth {#bluetooth}
-Configures the [Bluetooth](features/bluetooth) feature.
+Configures the [Wireless](features/wireless) feature.
* `bluetooth`
- * `driver`
+ * `driver` String
* The driver to use. Must be one of `custom`, `bluefruit_le`, `rn42`.
## Bootmagic {#bootmagic}
@@ -190,10 +190,10 @@ Configures the [Bluetooth](features/bluetooth) feature.
Configures the [Bootmagic](features/bootmagic) feature.
* `bootmagic`
- * `enabled`
+ * `enabled` Boolean
* Enables the Bootmagic feature.
* Default: `false`
- * `matrix`
+ * `matrix` Matrix
* The matrix position of the key to check during startup. This should generally be set to the (physically) top left key.
* Default: `[0, 0]`
@@ -202,19 +202,19 @@ Configures the [Bootmagic](features/bootmagic) feature.
Configures the [Caps Word](features/caps_word) feature.
* `caps_word`
- * `both_shifts_turns_on`
+ * `both_shifts_turns_on` Boolean
* Activate Caps Word by pressing both Shift keys.
* Default: `false`
- * `double_tap_shift_turns_on`
+ * `double_tap_shift_turns_on` Boolean
* Activate Caps Word by pressing Left Shift twice.
* Default: `false`
- * `enabled`
+ * `enabled` Boolean
* Enables the Caps Word feature.
* Default: `false`
- * `idle_timeout`
+ * `idle_timeout` Number
* The amount of time before Caps Word automatically deactivates in milliseconds.
* Default: `5000` (5 seconds)
- * `invert_on_shift`
+ * `invert_on_shift` Boolean
* Invert shift state instead of deactivating Caps Word when Shift is pressed.
* Default: `false`
@@ -223,7 +223,7 @@ Configures the [Caps Word](features/caps_word) feature.
Configures the [Combo](features/combo) feature.
* `combo`
- * `term`
+ * `term` Number
* The amount of time to recognize a combo in milliseconds.
* Default: `50` (50 ms)
@@ -232,12 +232,12 @@ Configures the [Combo](features/combo) feature.
Configures the [DIP Switches](features/dip_switch) feature.
* `dip_switch`
- * `enabled`
+ * `enabled` Boolean
* Enable the DIP Switches feature.
* Default: `false`
- * `pins`
+ * `pins` Array: Pin
* A list of GPIO pins connected to the MCU.
- * `matrix_grid`
+ * `matrix_grid` Array: Matrix
* A list of matrix locations in the key matrix.
* Example: `[ [0,6], [1,6], [2,6] ]`
@@ -246,15 +246,15 @@ Configures the [DIP Switches](features/dip_switch) feature.
Configures the [EEPROM](drivers/eeprom) driver.
* `eeprom`
- * `driver`
+ * `driver` String
* The EEPROM backend to use. Must be one of `custom`, `i2c`, `legacy_stm32_flash`, `spi`, `transient`, `vendor`, `wear_leveling`.
* Default: `"vendor"`
* `wear_leveling`
- * `driver`
+ * `driver` String
* The driver to use. Must be one of `embedded_flash`, `legacy`, `rp2040_flash`, `spi_flash`, `custom`.
- * `backing_size`
+ * `backing_size` Number
* Number of bytes used by the wear-leveling algorithm for its underlying storage, and needs to be a multiple of the logical size.
- * `logical_size`
+ * `logical_size` Number
* Number of bytes “exposed” to the rest of QMK and denotes the size of the usable EEPROM.
## Encoder {#encoder}
@@ -262,13 +262,13 @@ Configures the [EEPROM](drivers/eeprom) driver.
Configures the [Encoder](features/encoders) feature.
* `encoder`
- * `rotary`
+ * `rotary` Array: Object
* A list of encoder objects.
- * `pin_a` (Required)
+ * `pin_a` PinRequired
* The GPIO pin connected to the encoder's `A` pin.
- * `pin_b` (Required)
+ * `pin_b` PinRequired
* The GPIO pin connected to the encoder's `B` pin.
- * `resolution`
+ * `resolution` Number
* The number of edge transitions on both pins required to register an input.
* Default: `4`
@@ -277,18 +277,18 @@ Configures the [Encoder](features/encoders) feature.
Configures the [LED Indicators](features/led_indicators) feature.
* `indicators`
- * `caps_lock`
+ * `caps_lock` Pin
* The GPIO pin connected to the Caps Lock LED.
- * `compose`
+ * `compose` Pin
* The GPIO pin connected to the Compose LED.
- * `kana`
+ * `kana` Pin
* The GPIO pin connected to the Kana LED.
- * `num_lock`
+ * `num_lock` Pin
* The GPIO pin connected to the Num Lock LED.
- * `on_state`
+ * `on_state` 0|1
* The logical GPIO state required to turn the LEDs on.
* Default: `1` (on = high)
- * `scroll_lock`
+ * `scroll_lock` Pin
* The GPIO pin connected to the Scroll Lock LED.
## Layouts {#layouts}
@@ -301,10 +301,10 @@ All key positions and rotations are specified in relation to the top-left corner
The ISO enter key is represented by a 1.25u×2uh key. Renderers which utilize info.json layout data (such as `qmk info -l` and the QMK Configurator) should display this key as expected.
-* `community_layouts`
+* `community_layouts` Array: String
* A list of community layouts supported by the keyboard.
* Example: `["60_ansi", "60_iso"]`
-* `layout_aliases`
+* `layout_aliases` Object: String
* A mapping of layout aliases to layout definitions.
* Example:
```json
@@ -313,34 +313,34 @@ The ISO enter key is represented by a 1.25u×2uh key. Renderers which utilize in
"LAYOUT_iso": "LAYOUT_60_iso"
}
```
-* `layouts`
+* `layouts` Object
* A dictionary of layouts supported by the keyboard.
- * `LAYOUT_`
- * `layout`
+ * `LAYOUT_` Object
+ * `layout` Array: Object
* A list of key dictionaries comprising the layout. Each key dictionary contains:
- * `matrix` (Required)
+ * `matrix` MatrixRequired
* The matrix position for the key.
* Example: `[0, 4]` (row 0, column 4)
- * `x` (Required)
+ * `x` KeyUnitRequired
* The absolute position of the key in the horizontal axis, in key units.
- * `y` (Required)
+ * `y` KeyUnitRequired
* The absolute position of the key in the vertical axis, in key units.
- * `h`
+ * `h` KeyUnit
* The height of the key, in key units.
* Default: `1` (1u)
- * `label`
+ * `label` String
* What to name the key. This is *not* a key assignment as in the keymap, but should usually correspond to the keycode for the first layer of the default keymap.
* Example: `"Escape"`
- * `r`
+ * `r` Number
* The rotation angle in degrees. Currently not implemented.
- * `rx`
+ * `rx` Number
* The absolute X position of the rotation axis. Currently not implemented.
- * `ry`
+ * `ry` Number
* The absolute Y position of the rotation axis. Currently not implemented.
- * `w`
+ * `w` KeyUnit
* The width of the key, in key units.
* Default: `1` (1u)
- * `encoder`
+ * `encoder` Number
* The index of an encoder this key should be linked to
* Example: `{"label": "Shift", "matrix": [4, 0], "x": 0, "y": 4.25, "w": 2.25}`
@@ -349,13 +349,13 @@ The ISO enter key is represented by a 1.25u×2uh key. Renderers which utilize in
Configures the [Leader Key](features/leader_key) feature.
* `leader_key`
- * `timing`
+ * `timing` Boolean
* Reset the `timeout` on each keypress.
* Default: `false`
- * `strict_processing`
+ * `strict_processing` Boolean
* Do not extract the tap keycodes from Layer-Tap and Mod-Tap key events.
* Default: `false`
- * `timeout`
+ * `timeout` Number
* The amount of time to complete a leader sequence in milliseconds.
* Default: `300` (300 ms)
@@ -364,7 +364,7 @@ Configures the [Leader Key](features/leader_key) feature.
Configures the [LED Matrix](features/led_matrix) feature.
* `led_matrix`
- * `animations`
+ * `animations` Object: Boolean
* A dictionary of effects to enable or disable. Effects which are absent default to `false`.
* Example:
```json
@@ -374,82 +374,82 @@ Configures the [LED Matrix](features/led_matrix) feature.
"cycle_left_right": false
}
```
- * `center_point`
+ * `center_point` Array: Number
* The centroid (geometric center) of the LEDs. Used for certain effects.
* Default: `[112, 32]`
* `default`
- * `animation`
+ * `animation` String
* The default effect. Must be one of `led_matrix.animations`
* Default: `"solid"`
- * `on`
+ * `on` Boolean
* The default enabled state.
* Default: `true`
- * `val`
+ * `val` Number
* The default brightness level.
* Default: `max_brightness`
- * `speed`
+ * `speed` Number
* The default animation speed.
* Default: `128`
- * `driver` (Required)
+ * `driver` StringRequired
* The driver to use. Must be one of `custom`, `is31fl3218`, `is31fl3731`, `is31fl3733`, `is31fl3736`, `is31fl3737`, `is31fl3741`, `is31fl3742a`, `is31fl3743a`, `is31fl3745`, `is31fl3746a`, `snled27351`.
- * `layout` (Required)
+ * `layout` Array: ObjectRequired
* List of LED configuration dictionaries. Each dictionary contains:
- * `flags` (Required)
+ * `flags` NumberRequired
* A bitfield of flags describing the type of LED.
- * `x` (Required)
+ * `x` NumberRequired
* The position of the LED in the horizontal axis, from 0 to 224.
- * `y` (Required)
+ * `y` NumberRequired
* The position of the LED in the vertical axis, from 0 to 64.
- * `matrix`
+ * `matrix` Matrix
* The key matrix position associated with the LED.
* Example: `[0, 2]`
* Example: `{"matrix": [2, 1], "x": 20, "y": 48, "flags": 2}`
- * `led_flush_limit`
+ * `led_flush_limit` Number
* Limits in milliseconds how frequently an animation will update the LEDs.
* Default: `16`
- * `led_process_limit`
+ * `led_process_limit` Number
* Limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness).
* Default: `led_count / 5`
- * `max_brightness`
+ * `max_brightness` Number
* The maximum value which brightness is scaled to, from 0 to 255.
* Default: `255`
- * `react_on_keyup`
+ * `react_on_keyup` Boolean
* Animations react to keyup instead of keydown.
* Default: `false`
- * `sleep`
+ * `sleep` Boolean
* Turn off the LEDs when the host goes to sleep.
* Default: `false`
- * `speed_steps`
+ * `speed_steps` Number
* The number of speed adjustment steps.
* Default: `16`
- * `split_count`
+ * `split_count` Array: Number
* For split keyboards, the number of LEDs on each half.
* Example: `[16, 16]`
- * `timeout`
+ * `timeout` Number
* The LED activity timeout in milliseconds.
* Default: `0` (no timeout)
- * `val_steps`
+ * `val_steps` Number
* The number of brightness adjustment steps.
* Default: `8`
## Matrix {#matrix}
-* `debounce`
+* `debounce` Number
* The debounce time in milliseconds.
* Default: `5` (5 ms)
-* `diode_direction`
+* `diode_direction` String
* Which way the diodes are "pointing". Unused for `matrix_pins.direct`. Must be one of `COL2ROW`, `ROW2COL`.
* `matrix_pins`
- * `cols`
+ * `cols` Array: Pin
* A list of GPIO pins connected to the matrix columns.
* Example: `["A0", "A1", "A2"]`
- * `custom`
+ * `custom` Boolean
* Whether to use a custom matrix scanning implementation.
* Default: `false`
- * `custom_lite`
+ * `custom_lite` Boolean
* Whether to use a "lite" custom matrix scanning implementation.
* Default: `false`
- * `direct`
+ * `direct` Array: Array: Pin
* A 2-dimensional list of GPIO pins connected to each keyswitch, forming the "matrix" rows and columns.
* Example:
```json
@@ -459,16 +459,16 @@ Configures the [LED Matrix](features/led_matrix) feature.
["C0", "C1", "C2"]
]
```
- * `ghost`
+ * `ghost` Boolean
* Whether the matrix has no anti-ghosting diodes.
* Default: `false`
- * `input_pressed_state`
+ * `input_pressed_state` 0|1
* The logical GPIO state of the input pins when a key is pressed.
* Default: `0` (pressed = low)
- * `io_delay`
+ * `io_delay` Number
* The amount of time to wait between row/col selection and col/row pin reading, in microseconds.
* Default: `30` (30 µs)
- * `rows`
+ * `rows` Array: Pin
* A list of GPIO pins connected to the matrix rows.
* Example: `["B0", "B1", "B2"]`
@@ -477,23 +477,23 @@ Configures the [LED Matrix](features/led_matrix) feature.
Configures the [Mouse Keys](features/mouse_keys) feature.
* `mouse_key`
- * `delay`
- * `enabled`
+ * `delay` Number
+ * `enabled` Boolean
* Enables the Mouse Keys feature.
* Default: `false`
- * `interval`
- * `max_speed`
- * `time_to_max`
- * `wheel_delay`
+ * `interval` Number
+ * `max_speed` Number
+ * `time_to_max` Number
+ * `wheel_delay` Number
## One Shot {#one-shot}
Configures [One Shot keys](one_shot_keys).
* `oneshot`
- * `tap_toggle`
+ * `tap_toggle` Number
* The number of times to tap the key in order to hold it.
- * `timeout`
+ * `timeout` Number
* The amount of time before the key is released in milliseconds.
## PS/2 {#ps2}
@@ -501,30 +501,30 @@ Configures [One Shot keys](one_shot_keys).
Configures the [PS/2](features/ps2_mouse) feature.
* `ps2`
- * `clock_pin`
+ * `clock_pin` Pin
* The GPIO pin connected to `CLK` on the PS/2 device.
- * `data_pin`
+ * `data_pin` Pin
* The GPIO pin connected to `DATA` on the PS/2 device.
- * `driver`
+ * `driver` String
* The PS/2 driver to use. Must be one of `busywait`, `interrupt`, `usart`, `vendor`.
* Default: `"busywait"`
- * `enabled`
+ * `enabled` Boolean
* Enable the PS/2 feature.
* Default: `false`
- * `mouse_enabled`
+ * `mouse_enabled` Boolean
* Enable the PS/2 mouse handling.
* Default: `false`
## QMK LUFA Bootloader {#qmk-lufa-bootloader}
* `qmk_lufa_bootloader`
- * `esc_input` (Required)
+ * `esc_input` PinRequired
* The GPIO pin connected to the designated "exit bootloader" key's row (if `COL2ROW`).
- * `esc_output` (Required)
+ * `esc_output` PinRequired
* The GPIO pin connected to the designated "exit bootloader" key's column (if `COL2ROW`).
- * `led`
+ * `led` Pin
* The GPIO pin connected to an LED to flash.
- * `speaker`
+ * `speaker` Pin
* The GPIO pin connected to a speaker to click (can also be used for a second LED).
## RGBLight {#rgblight}
@@ -532,9 +532,9 @@ Configures the [PS/2](features/ps2_mouse) feature.
Configures the [RGB Lighting](features/rgblight) feature.
* `rgblight`
- * `led_count` (Required)
+ * `led_count` NumberRequired
* The number of LEDs in the chain.
- * `animations`
+ * `animations` Object: Boolean
* A dictionary of effects to enable or disable. Effects which are absent default to `false`.
* Example:
```json
@@ -544,60 +544,60 @@ Configures the [RGB Lighting](features/rgblight) feature.
"snake": false
}
```
- * `brightness_steps`
+ * `brightness_steps` Number
* The number of brightness adjustment steps.
* Default: `17`
* `default`
- * `animation`
+ * `animation` String
* The default effect. Must be one of `rgblight.animations`
* Default: `"static_light"`
- * `on`
+ * `on` Boolean
* The default enabled state.
* Default: `true`
- * `hue`
+ * `hue` Number
* The default hue value.
* Default: `0`
- * `sat`
+ * `sat` Number
* The default saturation value.
* Default: `255`
- * `val`
+ * `val` Number
* The default brightness level.
* Default: `max_brightness`
- * `speed`
+ * `speed` Number
* The default animation speed.
* Default: `0`
- * `driver`
+ * `driver` String
* The driver to use. Must be one of `apa102`, `custom`, `ws2812`.
* Default: `"ws2812"`
- * `hue_steps`
+ * `hue_steps` Number
* The number of hue adjustment steps.
* Default: `8`
* `layers`
- * `blink`
+ * `blink` Boolean
* Enable layer blinking API.
* Default: `false`
- * `enabled`
+ * `enabled` Boolean
* Enable RGB Lighting Layers.
* Default: `false`
- * `max`
+ * `max` Number
* The maximum layer count, from 1 to 32.
* Default: `8`
- * `led_map`
+ * `led_map` Array: Number
* Remap LED indices.
* Example: `[4, 3, 2, 1, 0]`
- * `max_brightness`
+ * `max_brightness` Number
* The maximum value which the HSV "V" component is scaled to, from 0 to 255.
* Default: `255`
- * `saturation_steps`
+ * `saturation_steps` Number
* The number of saturation adjustment steps.
* Default: `17`
- * `sleep`
+ * `sleep` Boolean
* Turn off the LEDs when the host goes to sleep.
* Default: `false`
- * `split`
+ * `split` Boolean
* Enable synchronization between split halves.
* Default: `false`
- * `split_count`
+ * `split_count` Array: Number
* When `rgblight.split` is enabled, the number of LEDs on each half.
* Example: `[10, 10]`
@@ -606,7 +606,7 @@ Configures the [RGB Lighting](features/rgblight) feature.
Configures the [RGB Matrix](features/rgb_matrix) feature.
* `rgb_matrix`
- * `animations`
+ * `animations` Object: Boolean
* A dictionary of effects to enable or disable. Effects which are absent default to `false`.
* Example:
```json
@@ -616,73 +616,73 @@ Configures the [RGB Matrix](features/rgb_matrix) feature.
"cycle_left_right": false
}
```
- * `center_point`
+ * `center_point` Array: Number
* The centroid (geometric center) of the LEDs. Used for certain effects.
* Default: `[112, 32]`
* `default`
- * `animation`
+ * `animation` String
* The default effect. Must be one of `rgb_matrix.animations`
* Default: `"solid_color"`
- * `on`
+ * `on` Boolean
* The default enabled state.
* Default: `true`
- * `hue`
+ * `hue` Number
* The default hue value.
* Default: `0`
- * `sat`
+ * `sat` Number
* The default saturation value.
* Default: `255`
- * `val`
+ * `val` Number
* The default brightness level.
* Default: `max_brightness`
- * `speed`
+ * `speed` Number
* The default animation speed.
* Default: `128`
- * `driver` (Required)
+ * `driver` StringRequired
* The driver to use. Must be one of `aw20216s`, `custom`, `is31fl3218`, `is31fl3236`, `is31fl3729`, `is31fl3731`, `is31fl3733`, `is31fl3736`, `is31fl3737`, `is31fl3741`, `is31fl3742a`, `is31fl3743a`, `is31fl3745`, `is31fl3746a`, `snled27351`, `ws2812`.
- * `hue_steps`
+ * `hue_steps` Number
* The number of hue adjustment steps.
* Default: `8`
- * `layout` (Required)
+ * `layout` Array: ObjectRequired
* List of LED configuration dictionaries. Each dictionary contains:
- * `flags` (Required)
+ * `flags` NumberRequired
* A bitfield of flags describing the type of LED.
- * `x` (Required)
+ * `x` NumberRequired
* The position of the LED in the horizontal axis, from 0 to 224.
- * `y` (Required)
+ * `y` NumberRequired
* The position of the LED in the vertical axis, from 0 to 64.
- * `matrix`
+ * `matrix` Matrix
* The key matrix position associated with the LED.
* Example: `[0, 2]`
* Example: `{"matrix": [2, 1], "x": 20, "y": 48, "flags": 2}`
- * `led_flush_limit`
+ * `led_flush_limit` Number
* Limits in milliseconds how frequently an animation will update the LEDs.
* Default: `16`
- * `led_process_limit`
+ * `led_process_limit` Number
* Limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness).
* Default: `led_count / 5`
- * `max_brightness`
+ * `max_brightness` Number
* The maximum value which the HSV "V" component is scaled to, from 0 to 255.
* Default: `255`
- * `react_on_keyup`
+ * `react_on_keyup` Boolean
* Animations react to keyup instead of keydown.
* Default: `false`
- * `sat_steps`
+ * `sat_steps` Number
* The number of saturation adjustment steps.
* Default: `16`
- * `sleep`
+ * `sleep` Boolean
* Turn off the LEDs when the host goes to sleep.
* Default: `false`
- * `speed_steps`
+ * `speed_steps` Number
* The number of speed adjustment steps.
* Default: `16`
- * `split_count`
+ * `split_count` Array: Number
* For split keyboards, the number of LEDs on each half.
* Example: `[16, 16]`
- * `timeout`
+ * `timeout` Number
* The LED activity timeout in milliseconds.
* Default: `0` (no timeout)
- * `val_steps`
+ * `val_steps` Number
* The number of brightness adjustment steps.
* Default: `16`
@@ -691,16 +691,16 @@ Configures the [RGB Matrix](features/rgb_matrix) feature.
Configures the [Secure](features/secure) feature.
* `secure`
- * `enabled`
+ * `enabled` Boolean
* Enable the Secure feature.
* Default: `false`
- * `idle_timeout`
+ * `idle_timeout` Number
* Timeout while unlocked before returning to the locked state. Set to `0` to disable.
* Default: `60000` (1 minute)
- * `unlock_sequence`
+ * `unlock_sequence` Array: Matrix
* A list of up to five matrix locations comprising the "unlock sequence".
* Example: `[[0, 0], [0, 1], [4, 3]]`
- * `unlock_timeout`
+ * `unlock_timeout` Number
* Timeout for the user to perform the unlock sequence. Set to `0` to disable.
* Default: `5000` (5 seconds)
@@ -716,7 +716,7 @@ Configures the [Split Keyboard](features/split_keyboard) feature.
* `right`
* `pins`
* See [DIP Switches](#dip-switch) config.
- * `enabled`
+ * `enabled` Boolean
* Enable the Split Keyboard feature.
* Default: `false`
* `encoder`
@@ -724,65 +724,69 @@ Configures the [Split Keyboard](features/split_keyboard) feature.
* `rotary`
* See [Encoder](#encoder) config.
* `handedness`
- * `pin`
+ * `pin` Pin
* The GPIO pin connected to determine handedness.
- * `matrix_grid`
+ * `matrix_grid` Array: Pin
* The GPIO pins of the matrix position which determines the handedness.
* Example: `["A1", "B5"]`
* `matrix_pins`
* `right`
* See [Matrix](#matrix) config.
- * `soft_serial_pin`
- * The GPIO pin to use (`serial` transport protocol only).
- * `soft_serial_speed`
+ * `serial`
+ * `driver` String
+ * The driver to use. Must be one of `bitbang`, `usart`, `vendor`.
+ * Default: `"bitbang"`
+ * `pin` Pin
+ * The GPIO pin to use for transmit and receive.
+ * `soft_serial_speed` Number
* The protocol speed, from `0` to `5` (`serial` transport protocol only).
* Default: `1`
* `transport`
- * `protocol`
+ * `protocol` String
* The split transport protocol to use. Must be one of `custom`, `i2c`, `serial`.
* `sync`
- * `activity`
+ * `activity` Boolean
* Mirror the activity timestamps to the secondary half.
* Default: `false`
- * `detected_os`
+ * `detected_os` Boolean
* Mirror the [detected OS](features/os_detection) to the secondary half.
* Default: `false`
- * `haptic`
+ * `haptic` Boolean
* Mirror the haptic state and process haptic feedback to the secondary half.
* Default: `false`
- * `layer_state`
+ * `layer_state` Boolean
* Mirror the layer state to the secondary half.
* Default: `false`
- * `indicators`
+ * `indicators` Boolean
* Mirror the indicator state to the secondary half.
* Default: `false`
- * `matrix_state`
+ * `matrix_state` Boolean
* Mirror the main/primary half's matrix state to the secondary half.
* Default: `false`
- * `modifiers`
+ * `modifiers` Boolean
* Mirror the modifier state to the secondary half.
* Default: `false`
- * `oled`
+ * `oled` Boolean
* Mirror the OLED on/off status to the secondary half.
* Default: `false`
- * `st7565`
+ * `st7565` Boolean
* Mirror the ST7565 on/off status to the secondary half.
* Default: `false`
- * `wpm`
+ * `wpm` Boolean
* Mirror the current WPM value to the secondary half.
* Default: `false`
- * `watchdog`
+ * `watchdog` Boolean
* Reboot the secondary half if it loses connection.
* Default: `false`
- * `watchdog_timeout`
+ * `watchdog_timeout` Number
* The amount of time to wait for communication from the primary half in milliseconds.
* `usb_detect`
- * `enabled`
+ * `enabled` Boolean
* Detect USB connection when determining split half roles.
- * `polling_interval`
+ * `polling_interval` Number
* The polling frequency in milliseconds.
* Default: `10` (10 ms)
- * `timeout`
+ * `timeout` Number
* The amount of time to wait for a USB connection in milliseconds.
* Default: `2000` (2 seconds)
@@ -791,48 +795,48 @@ Configures the [Split Keyboard](features/split_keyboard) feature.
Configures the [Stenography](features/stenography) feature.
* `stenography`
- * `enabled`
+ * `enabled` Boolean
* Enable the Stenography feature.
* Default: `false`
- * `protocol`
+ * `protocol` String
* The Steno protocol to use. Must be one of `all`, `geminipr`, `txbolt`.
* Default: `"all"`
## USB {#usb}
* `usb`
- * `device_version` (Required)
+ * `device_version` StringRequired
* A BCD version number in the format `MM.m.r` (up to `99.9.9`).
* Example: `"1.0.0"`
- * `pid` (Required)
+ * `pid` StringRequired
* The USB product ID as a four-digit hexadecimal number.
* Example: `"0x23B0"`
- * `vid` (Required)
+ * `vid` StringRequired
* The USB vendor ID as a four-digit hexadecimal number.
* Example: `"0xC1ED"`
- * `force_nkro`
+ * `force_nkro` Boolean
* Force NKRO to be active.
* Default: `false`
- * `max_power`
+ * `max_power` Number
* The maximum current draw the host should expect from the device. This does not control the actual current usage.
* Default: `500` (500 mA)
- * `no_startup_check`
+ * `no_startup_check` Boolean
* Disable USB suspend check after keyboard startup.
* Default: `false`
- * `polling_interval`
+ * `polling_interval` Number
* The frequency at which the host should poll the keyboard for reports.
* Default: `1` (1 ms/1000 Hz)
* `shared_endpoint`
- * `keyboard`
+ * `keyboard` Boolean
* Send keyboard reports through the "shared" USB endpoint.
* Default: `false`
- * `mouse`
+ * `mouse` Boolean
* Send mouse reports through the "shared" USB endpoint.
* Default: `true`
- * `suspend_wakeup_delay`
+ * `suspend_wakeup_delay` Number
* The amount of time to wait after sending a wakeup packet, in milliseconds.
* Default: `0` (disabled)
- * `wait_for_enumeration`
+ * `wait_for_enumeration` Boolean
* Force the keyboard to wait for USB enumeration before starting up.
* Default: `false`
@@ -841,17 +845,17 @@ Configures the [Stenography](features/stenography) feature.
Configures the [WS2812](drivers/ws2812) driver.
* `ws2812`
- * `driver`
+ * `driver` String
* The driver to use. Must be one of `bitbang`, `custom`, `i2c`, `pwm`, `spi`, `vendor`.
* Default: `"bitbang"`
- * `pin` (Required)
+ * `pin` PinRequired
* The GPIO pin connected to `DI` on the first LED in the chain (`bitbang`, `pwm`, `spi` and `vendor` drivers only).
- * `i2c_address`
+ * `i2c_address` String
* The I²C address of the WS2812 controller (`i2c` driver only).
* Default: `"0xB0"`
- * `i2c_timeout`
+ * `i2c_timeout` Number
* The I²C timeout in milliseconds (`i2c` driver only).
* Default: `100` (100 ms)
- * `rgbw`
+ * `rgbw` Boolean
* Enable RGBW LEDs.
* Default: `false`
diff --git a/docs/reference_keymap_extras.md b/docs/reference_keymap_extras.md
index 191e0d4ea8de..f6b4b8faf688 100644
--- a/docs/reference_keymap_extras.md
+++ b/docs/reference_keymap_extras.md
@@ -2,9 +2,31 @@
Keyboards are able to support a wide range of languages. However, this support is not actually achieved within the keyboard itself - instead, it sends numerical codes, which the operating system maps to the appropriate characters depending on the user's configured keyboard layout. By default (and per the HID spec), this is the US ANSI layout. For example, when a Swedish person presses the key with the `å` character printed on it, the keyboard is *actually* sending the keycode for `[`.
-Obviously, this can get confusing, so QMK provides language-specific keycode aliases for many keyboard layouts. These won't do much on their own - you still have to set the matching keyboard layout in your OS settings. Think of them more as keycap labels for your keymap.
+Obviously, this can get confusing, so QMK provides language-specific keycode aliases for many keyboard layouts. These are used in place of the `KC_` prefixed ones. They won't do much on their own - you still have to set the matching keyboard layout in your OS settings. Think of them more as keycap labels for your keymap. The language-specific keycode aliases are defined in the files listed in the [Keycodes Header](#header-files) column below.
-Simply `#include` one of the keycode headers below at the top of your `keymap.c`, and assign the keycodes defined in the header in place of the `KC_` prefixed ones.
+## Selecting Your Host Keyboard Layout
+
+To select a host keyboard layout, simply `#include` one of the [keycode headers](#header-files) below at the top of your `keymap.c`. Example:
+
+```c
+#include QMK_KEYBOARD_H
+
+#include "keymap_japanese.h" // [!code focus]
+```
+
+Alternatively, if using `keymap.json`, add the `host_language` key as shown in the following example. The available languages are those with a _Sendstring LUT Header_ entry in one of the [Header Files](#header-files) tables.
+
+```json
+{
+ "keyboard": "handwired/my_macropad",
+ "keymap": "my_keymap",
+ "host_language": "swedish", // [!code focus]
+ "layout": "LAYOUT_all",
+ "layers": [
+ ["SE_ARNG"]
+ ]
+}
+```
## Sendstring Support
@@ -33,6 +55,7 @@ These headers are located in [`quantum/keymap_extras/`](https://github.com/qmk/q
|English (US International) |`keymap_us_international.h` |`sendstring_us_international.h` |
|English (US International, Linux)|`keymap_us_international_linux.h`| |
|Estonian |`keymap_estonian.h` |`sendstring_estonian.h` |
+|Farsi |`keymap_farsi.h` | |
|Finnish |`keymap_finnish.h` |`sendstring_finnish.h` |
|French |`keymap_french.h` |`sendstring_french.h` |
|French (AFNOR) |`keymap_french_afnor.h` |`sendstring_french_afnor.h` |
diff --git a/docs/support.md b/docs/support.md
index 938d9daf7849..4e634fc0eb1e 100644
--- a/docs/support.md
+++ b/docs/support.md
@@ -6,7 +6,7 @@ Please read our [Code of Conduct](https://qmk.fm/coc/) before participating in a
## Realtime Chat
-If you need help with something, the best place to get quick support is going to be on our [Discord Server](https://discord.gg/Uq7gcHh). There is usually somebody online, and there are a bunch of very helpful people there.
+If you need help with something, the best place to get quick support is going to be on our [Discord Server](https://discord.gg/qmk). There is usually somebody online, and there are a bunch of very helpful people there.
## OLKB Subreddit
diff --git a/docs/syllabus.md b/docs/syllabus.md
index 3082f1ebd517..b68ded2d3596 100644
--- a/docs/syllabus.md
+++ b/docs/syllabus.md
@@ -55,7 +55,7 @@ Everything below here requires a lot of foundational knowledge. Besides being ab
* **Advanced Features**
* [Unicode](features/unicode)
* [API](api_overview)
- * [Bootmagic Lite](features/bootmagic)
+ * [Bootmagic](features/bootmagic)
* **Hardware**
* [How Keyboards Work](how_keyboards_work)
* [How A Keyboard Matrix Works](how_a_matrix_works)
diff --git a/drivers/eeprom/eeprom_custom.c-template b/drivers/eeprom/eeprom_custom.c-template
index 5f915f7fab55..fb1f0a3a974e 100644
--- a/drivers/eeprom/eeprom_custom.c-template
+++ b/drivers/eeprom/eeprom_custom.c-template
@@ -23,6 +23,17 @@ void eeprom_driver_init(void) {
/* Any initialisation code */
}
+void eeprom_driver_format(bool erase) {
+ /* If erase=false, then only do the absolute minimum initialisation necessary
+ to make sure that the eeprom driver is usable. It doesn't need to guarantee
+ that the content of the eeprom is reset to any particular value. For many
+ eeprom drivers this may be a no-op.
+
+ If erase=true, then in addition to making sure the eeprom driver is in a
+ usable state, also make sure that it is erased.
+ */
+}
+
void eeprom_driver_erase(void) {
/* Wipe out the EEPROM, setting values to zero */
}
diff --git a/drivers/eeprom/eeprom_driver.c b/drivers/eeprom/eeprom_driver.c
index 885cf2198115..1f3f96f0068c 100644
--- a/drivers/eeprom/eeprom_driver.c
+++ b/drivers/eeprom/eeprom_driver.c
@@ -77,3 +77,9 @@ void eeprom_update_dword(uint32_t *addr, uint32_t value) {
eeprom_write_dword(addr, value);
}
}
+
+void eeprom_driver_format(bool erase) __attribute__((weak));
+void eeprom_driver_format(bool erase) {
+ (void)erase; /* The default implementation assumes that the eeprom must be erased in order to be usable. */
+ eeprom_driver_erase();
+}
diff --git a/drivers/eeprom/eeprom_driver.h b/drivers/eeprom/eeprom_driver.h
index 74592bc8f05c..0c55c497d461 100644
--- a/drivers/eeprom/eeprom_driver.h
+++ b/drivers/eeprom/eeprom_driver.h
@@ -16,7 +16,9 @@
#pragma once
+#include
#include "eeprom.h"
void eeprom_driver_init(void);
+void eeprom_driver_format(bool erase);
void eeprom_driver_erase(void);
diff --git a/drivers/eeprom/eeprom_i2c.c b/drivers/eeprom/eeprom_i2c.c
index 0d3d5ccbe50c..d29aff5f85f7 100644
--- a/drivers/eeprom/eeprom_i2c.c
+++ b/drivers/eeprom/eeprom_i2c.c
@@ -36,6 +36,7 @@
#include "wait.h"
#include "i2c_master.h"
#include "eeprom.h"
+#include "eeprom_driver.h"
#include "eeprom_i2c.h"
// #define DEBUG_EEPROM_OUTPUT
@@ -62,6 +63,13 @@ void eeprom_driver_init(void) {
#endif
}
+void eeprom_driver_format(bool erase) {
+ /* i2c eeproms do not need to be formatted before use */
+ if (erase) {
+ eeprom_driver_erase();
+ }
+}
+
void eeprom_driver_erase(void) {
#if defined(CONSOLE_ENABLE) && defined(DEBUG_EEPROM_OUTPUT)
uint32_t start = timer_read32();
diff --git a/drivers/eeprom/eeprom_spi.c b/drivers/eeprom/eeprom_spi.c
index 51ba25deced5..14f0afa68bec 100644
--- a/drivers/eeprom/eeprom_spi.c
+++ b/drivers/eeprom/eeprom_spi.c
@@ -35,6 +35,7 @@
#include "timer.h"
#include "spi_master.h"
#include "eeprom.h"
+#include "eeprom_driver.h"
#include "eeprom_spi.h"
#define CMD_WREN 6
@@ -92,6 +93,13 @@ void eeprom_driver_init(void) {
spi_init();
}
+void eeprom_driver_format(bool erase) {
+ /* spi eeproms do not need to be formatted before use */
+ if (erase) {
+ eeprom_driver_erase();
+ }
+}
+
void eeprom_driver_erase(void) {
#if defined(CONSOLE_ENABLE) && defined(DEBUG_EEPROM_OUTPUT)
uint32_t start = timer_read32();
diff --git a/drivers/eeprom/eeprom_transient.c b/drivers/eeprom/eeprom_transient.c
index 9dc4289c271b..d9f5db98532b 100644
--- a/drivers/eeprom/eeprom_transient.c
+++ b/drivers/eeprom/eeprom_transient.c
@@ -30,8 +30,13 @@ size_t clamp_length(intptr_t offset, size_t len) {
return len;
}
-void eeprom_driver_init(void) {
- eeprom_driver_erase();
+void eeprom_driver_init(void) {}
+
+void eeprom_driver_format(bool erase) {
+ /* The transient eeprom driver doesn't necessarily need to be formatted before use, and it always starts up filled with zeros, due to placement in the .bss section */
+ if (erase) {
+ eeprom_driver_erase();
+ }
}
void eeprom_driver_erase(void) {
diff --git a/drivers/eeprom/eeprom_wear_leveling.c b/drivers/eeprom/eeprom_wear_leveling.c
index bd77eef35cca..24ca6c3c6b39 100644
--- a/drivers/eeprom/eeprom_wear_leveling.c
+++ b/drivers/eeprom/eeprom_wear_leveling.c
@@ -10,6 +10,12 @@ void eeprom_driver_init(void) {
wear_leveling_init();
}
+void eeprom_driver_format(bool erase) {
+ /* wear leveling requires the write log data structures to be erased before use. */
+ (void)erase;
+ eeprom_driver_erase();
+}
+
void eeprom_driver_erase(void) {
wear_leveling_erase();
}
diff --git a/drivers/encoder/encoder_quadrature.c b/drivers/encoder/encoder_quadrature.c
index cd589bf1e205..086f500391c7 100644
--- a/drivers/encoder/encoder_quadrature.c
+++ b/drivers/encoder/encoder_quadrature.c
@@ -22,7 +22,7 @@
#endif
#undef ENCODER_DEFAULT_PIN_API_IMPL
-#if defined(ENCODERS_PAD_A) && defined(ENCODERS_PAD_B)
+#if defined(ENCODER_A_PINS) && defined(ENCODER_B_PINS)
// Inform the quadrature driver that it needs to implement pin init/read functions
# define ENCODER_DEFAULT_PIN_API_IMPL
#endif
@@ -34,8 +34,8 @@ __attribute__((weak)) uint8_t encoder_quadrature_read_pin(uint8_t index, bool pa
#ifdef ENCODER_DEFAULT_PIN_API_IMPL
-static pin_t encoders_pad_a[NUM_ENCODERS_MAX_PER_SIDE] = ENCODERS_PAD_A;
-static pin_t encoders_pad_b[NUM_ENCODERS_MAX_PER_SIDE] = ENCODERS_PAD_B;
+static pin_t encoders_pad_a[NUM_ENCODERS_MAX_PER_SIDE] = ENCODER_A_PINS;
+static pin_t encoders_pad_b[NUM_ENCODERS_MAX_PER_SIDE] = ENCODER_B_PINS;
__attribute__((weak)) void encoder_wait_pullup_charge(void) {
wait_us(100);
@@ -123,25 +123,25 @@ void encoder_driver_init(void) {
// here, but it's the simplest solution.
memset(encoder_state, 0, sizeof(encoder_state));
memset(encoder_pulses, 0, sizeof(encoder_pulses));
- const pin_t encoders_pad_a_left[] = ENCODERS_PAD_A;
- const pin_t encoders_pad_b_left[] = ENCODERS_PAD_B;
+ const pin_t encoders_pad_a_left[] = ENCODER_A_PINS;
+ const pin_t encoders_pad_b_left[] = ENCODER_B_PINS;
for (uint8_t i = 0; i < thisCount; i++) {
encoders_pad_a[i] = encoders_pad_a_left[i];
encoders_pad_b[i] = encoders_pad_b_left[i];
}
#endif
-#if defined(SPLIT_KEYBOARD) && defined(ENCODERS_PAD_A_RIGHT) && defined(ENCODERS_PAD_B_RIGHT)
+#if defined(SPLIT_KEYBOARD) && defined(ENCODER_A_PINS_RIGHT) && defined(ENCODER_B_PINS_RIGHT)
// Re-initialise the pads if it's the right-hand side
if (!isLeftHand) {
- const pin_t encoders_pad_a_right[] = ENCODERS_PAD_A_RIGHT;
- const pin_t encoders_pad_b_right[] = ENCODERS_PAD_B_RIGHT;
+ const pin_t encoders_pad_a_right[] = ENCODER_A_PINS_RIGHT;
+ const pin_t encoders_pad_b_right[] = ENCODER_B_PINS_RIGHT;
for (uint8_t i = 0; i < thisCount; i++) {
encoders_pad_a[i] = encoders_pad_a_right[i];
encoders_pad_b[i] = encoders_pad_b_right[i];
}
}
-#endif // defined(SPLIT_KEYBOARD) && defined(ENCODERS_PAD_A_RIGHT) && defined(ENCODERS_PAD_B_RIGHT)
+#endif // defined(SPLIT_KEYBOARD) && defined(ENCODER_A_PINS_RIGHT) && defined(ENCODER_B_PINS_RIGHT)
// Encoder resolutions is defined differently in config.h, so concatenate
#if defined(SPLIT_KEYBOARD) && defined(ENCODER_RESOLUTIONS)
diff --git a/drivers/flash/flash.h b/drivers/flash/flash.h
new file mode 100644
index 000000000000..4d6247513987
--- /dev/null
+++ b/drivers/flash/flash.h
@@ -0,0 +1,126 @@
+// Copyright 2024 Nick Brassel (@tzarc)
+// SPDX-License-Identifier: GPL-2.0-or-later
+#pragma once
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include
+#include
+#include
+
+/**
+ * @brief The status of a flash operation.
+ */
+enum {
+ FLASH_STATUS_SUCCESS = 0, //< The operation completed successfully.
+ FLASH_STATUS_ERROR = -1, //< An error occurred during the operation.
+ FLASH_STATUS_TIMEOUT = -2, //< The operation timed out.
+ FLASH_STATUS_BAD_ADDRESS = -3, //< The address is out of bounds.
+ FLASH_STATUS_BUSY = -4, //< The flash is busy.
+};
+
+/**
+ * @brief The status of a flash operation.
+ */
+typedef int16_t flash_status_t;
+
+/**
+ * @brief Initializes the flash driver.
+ *
+ * This function initializes the flash driver and prepares it for use.
+ * It should be called before any other flash-related functions are used.
+ */
+void flash_init(void);
+
+/**
+ * @brief Checks if the flash is busy.
+ *
+ * This function checks if the flash is currently busy with an operation.
+ *
+ * @return FLASH_STATUS_SUCCESS if the flash is not busy, FLASH_STATUS_BUSY if the flash is busy, or FLASH_STATUS_ERROR if an error occurred.
+ */
+flash_status_t flash_is_busy(void);
+
+/**
+ * @brief Initiates a chip erase operation.
+ *
+ * This function does not wait for the flash to become ready.
+ *
+ * @return FLASH_STATUS_SUCCESS if the erase command was successfully sent, FLASH_STATUS_TIMEOUT if the flash is busy, or FLASH_STATUS_ERROR if an error occurred.
+ */
+flash_status_t flash_begin_erase_chip(void);
+
+/**
+ * @brief Waits for the chip erase operation to complete.
+ *
+ * This function waits for the chip erase operation to complete.
+ *
+ * @return FLASH_STATUS_SUCCESS if the chip erase operation completed successfully, FLASH_STATUS_TIMEOUT if the flash was still busy, or FLASH_STATUS_ERROR if an error occurred.
+ */
+flash_status_t flash_wait_erase_chip(void);
+
+/**
+ * @brief Erases the entire flash memory chip.
+ *
+ * This function initiates an erase operation to erase the entire flash memory chip.
+ * It waits for the operation to complete.
+ *
+ * @return FLASH_STATUS_SUCCESS if the erase was successfully executed, FLASH_STATUS_TIMEOUT if the flash is busy, or FLASH_STATUS_ERROR if an error occurred.
+ */
+flash_status_t flash_erase_chip(void);
+
+/**
+ * @brief Erases a block of flash memory.
+ *
+ * This function initiates an erase operation to erase a block of flash memory.
+ * It waits for the operation to complete.
+ *
+ * @param addr The address of the block to erase.
+ *
+ * @return FLASH_STATUS_SUCCESS if the erase was successfully executed, FLASH_STATUS_TIMEOUT if the flash is busy, or FLASH_STATUS_ERROR if an error occurred.
+ */
+flash_status_t flash_erase_block(uint32_t addr);
+
+/**
+ * @brief Erases a sector of flash memory.
+ *
+ * This function initiates an erase operation to erase a sector of flash memory.
+ * It waits for the operation to complete.
+ *
+ * @param addr The address of the sector to erase.
+ *
+ * @return FLASH_STATUS_SUCCESS if the erase was successfully executed, FLASH_STATUS_TIMEOUT if the flash is busy, or FLASH_STATUS_ERROR if an error occurred.
+ */
+flash_status_t flash_erase_sector(uint32_t addr);
+
+/**
+ * @brief Reads a range of flash memory.
+ *
+ * This function reads a range of flash memory into a buffer.
+ *
+ * @param addr The address of the range to read.
+ * @param buf A pointer to the buffer to read the range into.
+ * @param len The length of the range to read.
+ *
+ * @return FLASH_STATUS_SUCCESS if the range was successfully read, FLASH_STATUS_BAD_ADDRESS if the address is out of bounds, FLASH_STATUS_TIMEOUT if the flash is busy, or FLASH_STATUS_ERROR if an error occurred.
+ */
+flash_status_t flash_read_range(uint32_t addr, void *buf, size_t len);
+
+/**
+ * @brief Writes a range of flash memory.
+ *
+ * This function writes a range of flash memory from a buffer.
+ *
+ * @param addr The address of the range to write.
+ * @param buf A pointer to the buffer to write to the range.
+ * @param len The length of the range to write.
+ *
+ * @return FLASH_STATUS_SUCCESS if the range was successfully written, FLASH_STATUS_BAD_ADDRESS if the address is out of bounds, FLASH_STATUS_TIMEOUT if the flash is busy, or FLASH_STATUS_ERROR if an error occurred.
+ */
+flash_status_t flash_write_range(uint32_t addr, const void *buf, size_t len);
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/drivers/flash/flash_spi.c b/drivers/flash/flash_spi.c
index 0c0eb8a99e5b..7226773ff412 100644
--- a/drivers/flash/flash_spi.c
+++ b/drivers/flash/flash_spi.c
@@ -1,22 +1,10 @@
-/*
-Copyright (C) 2021 Westberry Technology (ChangZhou) Corp., Ltd
-
-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 .
-*/
+// Copyright 2021 Westberry Technology (ChangZhou) Corp., Ltd
+// Copyright 2024 Nick Brassel (@tzarc)
+// SPDX-License-Identifier: GPL-2.0-or-later
#include
+#include "flash.h"
#include "util.h"
#include "wait.h"
#include "debug.h"
@@ -69,33 +57,43 @@ static bool spi_flash_start(void) {
return spi_start(EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN, EXTERNAL_FLASH_SPI_LSBFIRST, EXTERNAL_FLASH_SPI_MODE, EXTERNAL_FLASH_SPI_CLOCK_DIVISOR);
}
-static flash_status_t spi_flash_wait_while_busy(void) {
- uint32_t deadline = timer_read32() + EXTERNAL_FLASH_SPI_TIMEOUT;
+static flash_status_t spi_flash_wait_while_busy_multiplier(int multiplier) {
flash_status_t response = FLASH_STATUS_SUCCESS;
- uint8_t retval;
-
+ uint32_t deadline = timer_read32() + ((EXTERNAL_FLASH_SPI_TIMEOUT)*multiplier);
do {
- bool res = spi_flash_start();
- if (!res) {
- dprint("Failed to start SPI! [spi flash wait while busy]\n");
- return FLASH_STATUS_ERROR;
- }
-
- spi_write(FLASH_CMD_RDSR);
-
- retval = (uint8_t)spi_read();
-
- spi_stop();
-
if (timer_read32() >= deadline) {
response = FLASH_STATUS_TIMEOUT;
break;
}
- } while (retval & FLASH_FLAG_WIP);
+ response = flash_is_busy();
+ } while (response == FLASH_STATUS_BUSY);
return response;
}
+static flash_status_t spi_flash_wait_while_busy(void) {
+ return spi_flash_wait_while_busy_multiplier(1);
+}
+
+flash_status_t flash_is_busy(void) {
+ bool res = spi_flash_start();
+ if (!res) {
+ dprint("Failed to start SPI! [spi flash wait while busy]\n");
+ return FLASH_STATUS_ERROR;
+ }
+
+ spi_write(FLASH_CMD_RDSR);
+ spi_status_t status = spi_read();
+ spi_stop();
+
+ if (status < 0) {
+ return status;
+ }
+
+ uint8_t sr = (uint8_t)status;
+ return (sr & FLASH_FLAG_WIP) ? FLASH_STATUS_BUSY : FLASH_STATUS_SUCCESS;
+}
+
static flash_status_t spi_flash_write_enable(void) {
bool res = spi_flash_start();
if (!res) {
@@ -104,7 +102,6 @@ static flash_status_t spi_flash_write_enable(void) {
}
spi_write(FLASH_CMD_WREN);
-
spi_stop();
return FLASH_STATUS_SUCCESS;
@@ -118,7 +115,6 @@ static flash_status_t spi_flash_write_disable(void) {
}
spi_write(FLASH_CMD_WRDI);
-
spi_stop();
return FLASH_STATUS_SUCCESS;
@@ -166,7 +162,7 @@ void flash_init(void) {
spi_init();
}
-flash_status_t flash_erase_chip(void) {
+flash_status_t flash_begin_erase_chip(void) {
flash_status_t response = FLASH_STATUS_SUCCESS;
/* Wait for the write-in-progress bit to be cleared. */
@@ -191,17 +187,28 @@ flash_status_t flash_erase_chip(void) {
}
spi_write(FLASH_CMD_CE);
spi_stop();
+ return FLASH_STATUS_SUCCESS;
+}
- /* Wait for the write-in-progress bit to be cleared.*/
- response = spi_flash_wait_while_busy();
+flash_status_t flash_wait_erase_chip(void) {
+ flash_status_t response = spi_flash_wait_while_busy_multiplier(250); // Chip erase can take a long time, wait 250x the usual timeout
if (response != FLASH_STATUS_SUCCESS) {
dprint("Failed to check WIP flag! [spi flash erase chip]\n");
return response;
}
-
return response;
}
+flash_status_t flash_erase_chip(void) {
+ flash_status_t response = flash_begin_erase_chip();
+ if (response != FLASH_STATUS_SUCCESS) {
+ dprint("Failed to begin erase chip! [spi flash erase chip]\n");
+ return response;
+ }
+
+ return flash_wait_erase_chip();
+}
+
flash_status_t flash_erase_sector(uint32_t addr) {
flash_status_t response = FLASH_STATUS_SUCCESS;
@@ -282,7 +289,7 @@ flash_status_t flash_erase_block(uint32_t addr) {
return response;
}
-flash_status_t flash_read_block(uint32_t addr, void *buf, size_t len) {
+flash_status_t flash_read_range(uint32_t addr, void *buf, size_t len) {
flash_status_t response = FLASH_STATUS_SUCCESS;
uint8_t * read_buf = (uint8_t *)buf;
@@ -313,7 +320,7 @@ flash_status_t flash_read_block(uint32_t addr, void *buf, size_t len) {
return response;
}
-flash_status_t flash_write_block(uint32_t addr, const void *buf, size_t len) {
+flash_status_t flash_write_range(uint32_t addr, const void *buf, size_t len) {
flash_status_t response = FLASH_STATUS_SUCCESS;
uint8_t * write_buf = (uint8_t *)buf;
diff --git a/drivers/flash/flash_spi.h b/drivers/flash/flash_spi.h
index 87460fc210ee..7a979daf0f70 100644
--- a/drivers/flash/flash_spi.h
+++ b/drivers/flash/flash_spi.h
@@ -17,6 +17,8 @@ along with this program. If not, see .
#pragma once
+#include "flash.h"
+
/* All the following default configurations are based on MX25L4006E Nor FLASH. */
/*
@@ -105,32 +107,3 @@ along with this program. If not, see .
The page count of the FLASH, calculated by total FLASH size and page size.
*/
#define EXTERNAL_FLASH_PAGE_COUNT ((EXTERNAL_FLASH_SIZE) / (EXTERNAL_FLASH_PAGE_SIZE))
-
-typedef int16_t flash_status_t;
-
-#define FLASH_STATUS_SUCCESS (0)
-#define FLASH_STATUS_ERROR (-1)
-#define FLASH_STATUS_TIMEOUT (-2)
-#define FLASH_STATUS_BAD_ADDRESS (-3)
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include
-
-void flash_init(void);
-
-flash_status_t flash_erase_chip(void);
-
-flash_status_t flash_erase_block(uint32_t addr);
-
-flash_status_t flash_erase_sector(uint32_t addr);
-
-flash_status_t flash_read_block(uint32_t addr, void *buf, size_t len);
-
-flash_status_t flash_write_block(uint32_t addr, const void *buf, size_t len);
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/drivers/haptic/solenoid.c b/drivers/haptic/solenoid.c
index 346b88bbc47f..ed2a886854e0 100644
--- a/drivers/haptic/solenoid.c
+++ b/drivers/haptic/solenoid.c
@@ -158,7 +158,7 @@ void solenoid_setup(void) {
#endif
gpio_write_pin(solenoid_pads[i], !solenoid_active_state[i]);
gpio_set_pin_output(solenoid_pads[i]);
- if ((!HAPTIC_OFF_IN_LOW_POWER) || (usb_device_state == USB_DEVICE_STATE_CONFIGURED)) {
+ if ((!HAPTIC_OFF_IN_LOW_POWER) || (usb_device_state_get_configure_state() == USB_DEVICE_STATE_CONFIGURED)) {
solenoid_fire(i);
}
}
diff --git a/drivers/lcd/st7565.c b/drivers/lcd/st7565.c
index 4fce40edbe05..cf71c5e5a33d 100644
--- a/drivers/lcd/st7565.c
+++ b/drivers/lcd/st7565.c
@@ -187,6 +187,8 @@ void st7565_render(void) {
st7565_send_data(&st7565_buffer[ST7565_BLOCK_SIZE * update_start], ST7565_BLOCK_SIZE);
+ spi_stop();
+
// Turn on display if it is off
st7565_on();
diff --git a/drivers/led/apa102.c b/drivers/led/apa102.c
index b171b07b12c4..050609263d51 100644
--- a/drivers/led/apa102.c
+++ b/drivers/led/apa102.c
@@ -53,6 +53,7 @@
io_wait; \
} while (0)
+rgb_t apa102_leds[APA102_LED_COUNT];
uint8_t apa102_led_brightness = APA102_DEFAULT_BRIGHTNESS;
static void apa102_send_byte(uint8_t byte) {
@@ -121,14 +122,24 @@ void apa102_init(void) {
gpio_set_pin_output(APA102_CI_PIN);
}
-void apa102_setleds(rgb_led_t *start_led, uint16_t num_leds) {
- rgb_led_t *end = start_led + num_leds;
+void apa102_set_color(uint16_t index, uint8_t red, uint8_t green, uint8_t blue) {
+ apa102_leds[index].r = red;
+ apa102_leds[index].g = green;
+ apa102_leds[index].b = blue;
+}
+
+void apa102_set_color_all(uint8_t red, uint8_t green, uint8_t blue) {
+ for (uint16_t i = 0; i < APA102_LED_COUNT; i++) {
+ apa102_set_color(i, red, green, blue);
+ }
+}
+void apa102_flush(void) {
apa102_start_frame();
- for (rgb_led_t *led = start_led; led < end; led++) {
- apa102_send_frame(led->r, led->g, led->b, apa102_led_brightness);
+ for (uint8_t i = 0; i < APA102_LED_COUNT; i++) {
+ apa102_send_frame(apa102_leds[i].r, apa102_leds[i].g, apa102_leds[i].b, apa102_led_brightness);
}
- apa102_end_frame(num_leds);
+ apa102_end_frame(APA102_LED_COUNT);
}
void apa102_set_brightness(uint8_t brightness) {
diff --git a/drivers/led/apa102.h b/drivers/led/apa102.h
index 5e2f78658be0..42f1344f0c94 100644
--- a/drivers/led/apa102.h
+++ b/drivers/led/apa102.h
@@ -32,17 +32,8 @@
#define APA102_MAX_BRIGHTNESS 31
void apa102_init(void);
-
-/* User Interface
- *
- * Input:
- * start_led: An array of GRB data describing the LED colors
- * num_leds: The number of LEDs to write
- *
- * The functions will perform the following actions:
- * - Set the data-out pin as output
- * - Send out the LED data
- */
-void apa102_setleds(rgb_led_t *start_led, uint16_t num_leds);
+void apa102_set_color(uint16_t index, uint8_t red, uint8_t green, uint8_t blue);
+void apa102_set_color_all(uint8_t red, uint8_t green, uint8_t blue);
+void apa102_flush(void);
void apa102_set_brightness(uint8_t brightness);
diff --git a/drivers/painter/gc9a01/qp_gc9a01_opcodes.h b/drivers/painter/gc9a01/qp_gc9a01_opcodes.h
deleted file mode 100644
index 828e42752b0c..000000000000
--- a/drivers/painter/gc9a01/qp_gc9a01_opcodes.h
+++ /dev/null
@@ -1,77 +0,0 @@
-// Copyright 2021 Paul Cotter (@gr1mr3aver)
-// SPDX-License-Identifier: GPL-2.0-or-later
-#pragma once
-
-////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-// Quantum Painter GC9A01 command opcodes
-////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
-////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-// Level 1 command opcodes
-
-#define GC9A01_GET_ID_INFO 0x04 // Get ID information
-#define GC9A01_GET_STATUS 0x09 // Get status
-#define GC9A01_CMD_SLEEP_ON 0x10 // Enter sleep mode
-#define GC9A01_CMD_SLEEP_OFF 0x11 // Exit sleep mode
-#define GC9A01_CMD_PARTIAL_ON 0x12 // Enter partial mode
-#define GC9A01_CMD_PARTIAL_OFF 0x13 // Exit partial mode
-#define GC9A01_CMD_INVERT_ON 0x20 // Enter inverted mode
-#define GC9A01_CMD_INVERT_OFF 0x21 // Exit inverted mode
-#define GC9A01_CMD_DISPLAY_OFF 0x28 // Disable display
-#define GC9A01_CMD_DISPLAY_ON 0x29 // Enable display
-#define GC9A01_SET_COL_ADDR 0x2A // Set column address
-#define GC9A01_SET_PAGE_ADDR 0x2B // Set page address
-#define GC9A01_SET_MEM 0x2C // Set memory
-#define GC9A01_SET_PARTIAL_AREA 0x30 // Set partial area
-#define GC9A01_SET_VSCROLL 0x33 // Set vertical scroll def
-#define GC9A01_CMD_TEARING_ON 0x34 // Tearing line enabled
-#define GC9A01_CMD_TEARING_OFF 0x35 // Tearing line disabled
-#define GC9A01_SET_MEM_ACS_CTL 0x36 // Set mem access ctl
-#define GC9A01_SET_VSCROLL_ADDR 0x37 // Set vscroll start addr
-#define GC9A01_CMD_IDLE_OFF 0x38 // Exit idle mode
-#define GC9A01_CMD_IDLE_ON 0x39 // Enter idle mode
-#define GC9A01_SET_PIX_FMT 0x3A // Set pixel format
-#define GC9A01_SET_MEM_CONT 0x3C // Set memory continue
-#define GC9A01_SET_TEAR_SCANLINE 0x44 // Set tearing scanline
-#define GC9A01_GET_TEAR_SCANLINE 0x45 // Get tearing scanline
-#define GC9A01_SET_BRIGHTNESS 0x51 // Set brightness
-#define GC9A01_SET_DISPLAY_CTL 0x53 // Set display ctl
-#define GC9A01_GET_ID1 0xDA // Get ID1
-#define GC9A01_GET_ID2 0xDB // Get ID2
-#define GC9A01_GET_ID3 0xDC // Get ID3
-
-////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-// Level 2 command opcodes
-
-#define GC9A01_SET_RGB_IF_SIG_CTL 0xB0 // RGB IF signal ctl
-#define GC9A01_SET_BLANKING_PORCH_CTL 0xB5 // Set blanking porch ctl
-#define GC9A01_SET_FUNCTION_CTL 0xB6 // Set function ctl
-#define GC9A01_SET_TEARING_EFFECT 0xBA // Set backlight ctl 3
-#define GC9A01_SET_IF_CTL 0xF6 // Set interface control
-
-////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-// Level 3 command opcodes
-
-#define GC9A01_SET_FRAME_RATE 0xE8 // Set frame rate
-#define GC9A01_SET_SPI_2DATA 0xE9 // Set frame rate
-#define GC9A01_SET_POWER_CTL_1 0xC1 // Set power ctl 1
-#define GC9A01_SET_POWER_CTL_2 0xC3 // Set power ctl 2
-#define GC9A01_SET_POWER_CTL_3 0xC4 // Set power ctl 3
-#define GC9A01_SET_POWER_CTL_4 0xC9 // Set power ctl 4
-#define GC9A01_SET_POWER_CTL_7 0xA7 // Set power ctl 7
-#define GC9A01_SET_INTER_REG_ENABLE1 0xFE // Enable Inter Register 1
-#define GC9A01_SET_INTER_REG_ENABLE2 0xEF // Enable Inter Register 2
-#define GC9A01_SET_GAMMA1 0xF0 //
-#define GC9A01_SET_GAMMA2 0xF1
-#define GC9A01_SET_GAMMA3 0xF2
-#define GC9A01_SET_GAMMA4 0xF3
-
-////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-// MADCTL Flags
-#define GC9A01_MADCTL_MY 0b10000000
-#define GC9A01_MADCTL_MX 0b01000000
-#define GC9A01_MADCTL_MV 0b00100000
-#define GC9A01_MADCTL_ML 0b00010000
-#define GC9A01_MADCTL_RGB 0b00000000
-#define GC9A01_MADCTL_BGR 0b00001000
-#define GC9A01_MADCTL_MH 0b00000100
diff --git a/drivers/painter/gc9xxx/qp_gc9107.c b/drivers/painter/gc9xxx/qp_gc9107.c
new file mode 100644
index 000000000000..108344da4f20
--- /dev/null
+++ b/drivers/painter/gc9xxx/qp_gc9107.c
@@ -0,0 +1,114 @@
+// Copyright 2024 Fernando Birra
+// SPDX-License-Identifier: GPL-2.0-or-later
+#include "qp_internal.h"
+#include "qp_comms.h"
+#include "qp_gc9107.h"
+#include "qp_gc9xxx_opcodes.h"
+#include "qp_gc9107_opcodes.h"
+#include "qp_tft_panel.h"
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Driver storage
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+tft_panel_dc_reset_painter_device_t gc9107_drivers[GC9107_NUM_DEVICES] = {0};
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Initialization
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+__attribute__((weak)) bool qp_gc9107_init(painter_device_t device, painter_rotation_t rotation) {
+ // A lot of these "unknown" opcodes are sourced from other OSS projects and are seemingly required for this display to function.
+ // clang-format off
+ const uint8_t gc9107_init_sequence[] = {
+ GC9XXX_SET_INTER_REG_ENABLE1, 5, 0,
+ GC9XXX_SET_INTER_REG_ENABLE2, 5, 0,
+ GC9107_SET_FUNCTION_CTL6, 0, 1, GC9107_ALLOW_SET_COMPLEMENT_RGB | 0x08 | GC9107_ALLOW_SET_FRAMERATE,
+ GC9107_SET_COMPLEMENT_RGB, 0, 1, GC9107_COMPLEMENT_WITH_LSB,
+ 0xAB, 0, 1, 0x0E,
+ GC9107_SET_FRAME_RATE, 0, 1, 0x19,
+ GC9XXX_SET_PIXEL_FORMAT, 0, 1, GC9107_PIXEL_FORMAT_16_BPP_IFPF,
+ GC9XXX_CMD_SLEEP_OFF, 120, 0,
+ GC9XXX_CMD_DISPLAY_ON, 20, 0
+ };
+
+ // clang-format on
+ qp_comms_bulk_command_sequence(device, gc9107_init_sequence, sizeof(gc9107_init_sequence));
+
+ // Configure the rotation (i.e. the ordering and direction of memory writes in GRAM)
+ const uint8_t madctl[] = {
+ [QP_ROTATION_0] = GC9XXX_MADCTL_BGR,
+ [QP_ROTATION_90] = GC9XXX_MADCTL_BGR | GC9XXX_MADCTL_MX | GC9XXX_MADCTL_MV,
+ [QP_ROTATION_180] = GC9XXX_MADCTL_BGR | GC9XXX_MADCTL_MX | GC9XXX_MADCTL_MY,
+ [QP_ROTATION_270] = GC9XXX_MADCTL_BGR | GC9XXX_MADCTL_MV | GC9XXX_MADCTL_MY,
+ };
+ qp_comms_command_databyte(device, GC9XXX_SET_MEM_ACS_CTL, madctl[rotation]);
+
+ return true;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Driver vtable
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+const tft_panel_dc_reset_painter_driver_vtable_t gc9107_driver_vtable = {
+ .base =
+ {
+ .init = qp_gc9107_init,
+ .power = qp_tft_panel_power,
+ .clear = qp_tft_panel_clear,
+ .flush = qp_tft_panel_flush,
+ .pixdata = qp_tft_panel_pixdata,
+ .viewport = qp_tft_panel_viewport,
+ .palette_convert = qp_tft_panel_palette_convert_rgb565_swapped,
+ .append_pixels = qp_tft_panel_append_pixels_rgb565,
+ .append_pixdata = qp_tft_panel_append_pixdata,
+ },
+ .num_window_bytes = 2,
+ .swap_window_coords = false,
+ .opcodes =
+ {
+ .display_on = GC9XXX_CMD_DISPLAY_ON,
+ .display_off = GC9XXX_CMD_DISPLAY_OFF,
+ .set_column_address = GC9XXX_SET_COL_ADDR,
+ .set_row_address = GC9XXX_SET_ROW_ADDR,
+ .enable_writes = GC9XXX_SET_MEM,
+ },
+};
+
+#ifdef QUANTUM_PAINTER_GC9107_SPI_ENABLE
+// Factory function for creating a handle to the GC9107 device
+painter_device_t qp_gc9107_make_spi_device(uint16_t panel_width, uint16_t panel_height, pin_t chip_select_pin, pin_t dc_pin, pin_t reset_pin, uint16_t spi_divisor, int spi_mode) {
+ for (uint32_t i = 0; i < GC9107_NUM_DEVICES; ++i) {
+ tft_panel_dc_reset_painter_device_t *driver = &gc9107_drivers[i];
+ if (!driver->base.driver_vtable) {
+ driver->base.driver_vtable = (const painter_driver_vtable_t *)&gc9107_driver_vtable;
+ driver->base.comms_vtable = (const painter_comms_vtable_t *)&spi_comms_with_dc_vtable;
+ driver->base.native_bits_per_pixel = 16; // RGB565
+ driver->base.panel_width = panel_width;
+ driver->base.panel_height = panel_height;
+ driver->base.rotation = QP_ROTATION_0;
+ driver->base.offset_x = 2;
+ driver->base.offset_y = 1;
+
+ // SPI and other pin configuration
+ driver->base.comms_config = &driver->spi_dc_reset_config;
+ driver->spi_dc_reset_config.spi_config.chip_select_pin = chip_select_pin;
+ driver->spi_dc_reset_config.spi_config.divisor = spi_divisor;
+ driver->spi_dc_reset_config.spi_config.lsb_first = false;
+ driver->spi_dc_reset_config.spi_config.mode = spi_mode;
+ driver->spi_dc_reset_config.dc_pin = dc_pin;
+ driver->spi_dc_reset_config.reset_pin = reset_pin;
+ driver->spi_dc_reset_config.command_params_uses_command_pin = false;
+
+ if (!qp_internal_register_device((painter_device_t)driver)) {
+ memset(driver, 0, sizeof(tft_panel_dc_reset_painter_device_t));
+ return NULL;
+ }
+
+ return (painter_device_t)driver;
+ }
+ }
+ return NULL;
+}
+
+#endif // QUANTUM_PAINTER_GC9107_SPI_ENABLE
diff --git a/drivers/painter/gc9xxx/qp_gc9107.h b/drivers/painter/gc9xxx/qp_gc9107.h
new file mode 100644
index 000000000000..b0b08f76654a
--- /dev/null
+++ b/drivers/painter/gc9xxx/qp_gc9107.h
@@ -0,0 +1,37 @@
+// Copyright 2024 Fernando Birra (@gr1mr3aver)
+// SPDX-License-Identifier: GPL-2.0-or-later
+#pragma once
+
+#include "gpio.h"
+#include "qp_internal.h"
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Quantum Painter GC9107 configurables (add to your keyboard's config.h)
+
+#ifndef GC9107_NUM_DEVICES
+/**
+ * @def This controls the maximum number of GC9107 devices that Quantum Painter can communicate with at any one time.
+ * Increasing this number allows for multiple displays to be used.
+ */
+# define GC9107_NUM_DEVICES 1
+#endif
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Quantum Painter GC9107 device factories
+
+#ifdef QUANTUM_PAINTER_GC9107_SPI_ENABLE
+/**
+ * Factory method for an GC9107 SPI LCD device.
+ *
+ * @param panel_width[in] the width of the display panel
+ * @param panel_height[in] the height of the display panel
+ * @param chip_select_pin[in] the GPIO pin used for SPI chip select
+ * @param dc_pin[in] the GPIO pin used for D/C control
+ * @param reset_pin[in] the GPIO pin used for RST
+ * @param spi_divisor[in] the SPI divisor to use when communicating with the display
+ * @param spi_mode[in] the SPI mode to use when communicating with the display
+ * @return the device handle used with all drawing routines in Quantum Painter
+ */
+painter_device_t qp_gc9107_make_spi_device(uint16_t panel_width, uint16_t panel_height, pin_t chip_select_pin, pin_t dc_pin, pin_t reset_pin, uint16_t spi_divisor, int spi_mode);
+
+#endif // QUANTUM_PAINTER_GC9107_SPI_ENABLE
diff --git a/drivers/painter/gc9xxx/qp_gc9107_opcodes.h b/drivers/painter/gc9xxx/qp_gc9107_opcodes.h
new file mode 100644
index 000000000000..e9b308eb49b8
--- /dev/null
+++ b/drivers/painter/gc9xxx/qp_gc9107_opcodes.h
@@ -0,0 +1,135 @@
+// Copyright 2024 Fernando Birra
+// SPDX-License-Identifier: GPL-2.0-or-later
+#pragma once
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Quantum Painter GC9107 command opcodes
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+#define GC9107_GET_POWER_MODE 0x0A // Get power mode
+#define GC9107_GET_MADCTL 0x0B // Get MADCTL
+#define GC9107_GET_PIXEL_FMT 0x0C // Get pixel format
+#define GC9107_GET_IMAGE_FMT 0x0D // Get image format
+#define GC9107_GET_SIGNAL_MODE 0x0E // Get signal mode
+#define GC9107_GET_DIAG_RESULT 0x0F // Get self-diagnostic results
+
+#define GC9107_SET_FRAME_RATE 0xA8 // Set frame rate
+#define GC9107_SET_COMPLEMENT_RGB 0xAC // Set complement Principle RGB
+#define GC9107_SET_BLANK_PORCH 0xAD // Set blank porch control, 0;front_porch[6:0],0;back_porch[6:0]
+#define GC9107_SET_FUNCTION_CTL1 0xB1 // Set access to AVDD_VCL_CLK and VGH_VGL_CLK commands
+#define GC9107_SET_FUNCTION_CTL2 0xB2 // Set access to VGH, VGH control commands
+#define GC9107_SET_FUNCTION_CTL3 0xB3 // Set access to Gamma control commands
+#define GC9107_SET_DISPLAY_INVERSION 0xB4 // Set Display Inversion control
+#define GC9107_SET_FUNCTION_CTL6 0xB6 // Set access to commands SET_FRAME_RATE, SET_COMPLEMENT_RGB and SET_BLANK_PORCH
+#define GC9107_SET_CUSTOM_ID_INFO 0xD3 // Set customized display id information
+#define GC9107_AVDD_VCL_CLK 0xE3 // AVDD_CLK
+#define GC9107_SET_VGH 0xE8 // Set VGH
+#define GC9107_SET_VGL 0xE9 // Set VGL
+#define GC9107_SET_VGH_VGL_CLK 0xEA // Set VGH and VGL clock divisors
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// GC9107 Parameter constants
+
+// Parameter values for
+// GC9107_SET_PIXEL_FORMAT
+#define GC9107_PIXEL_FORMAT_12_BPP_IFPF (0b001 << 0) // 12 bits per pixel
+#define GC9107_PIXEL_FORMAT_16_BPP_IFPF (0b101 << 0) // 16 bits per pixel
+#define GC9107_PIXEL_FORMAT_18_BPP_IFPB (0b110 << 0) // 18 bits per pixel
+
+// Parameter values for
+// GC9107_SET_COMPLEMENT_RGB
+#define GC9107_COMPLEMENT_WITH_0 0x00 // R0 <- B0 <- 0, except if data is FFh
+#define GC9107_COMPLEMENT_WITH_1 0x40 // R0 <- B0 <- 1, except if data is 00h
+#define GC9107_COMPLEMENT_WITH_MSB 0x80 // R0 <- R5, B0 <- B5
+#define GC9107_COMPLEMENT_WITH_LSB 0xC0 // R0 <- B0 <- G0
+// Parameter masks for
+// GC9107_SET_FUNCTION_CTL1
+#define GC9107_ALLOW_AVDD_VCL_CLK 0b00001000 // Allow AVDD_VCL_CLK command
+// Parameter masks for
+// GC9107_SET_FUNCTION_CTL2
+#define GC9107_ALLOW_SET_VGH 0b00000001 // Allow GC9107_SET_VGH
+#define GC9107_ALLOW_SET_VGL 0b00000010 // Allow GC9107_SET_VGL
+#define GC9107_ALLOW_SET_VGH_VGL_CLK 0b00000100 // Allow GC9107_SET_VGH_VGL_CLK
+// Parameter masks for
+// GC9107_SET_FUNCTION_CTL3
+#define GC9107_ALLOW_SET_GAMMA1 0b00000001 // Allow GC9107_SET_GAMMA1
+#define GC9107_ALLOW_SET_GAMMA2 0b00000010 // Allow GC9107_SET_GAMMA2
+// Parameter mask for
+// GC9107_SET_FUNCTION_CTL6
+#define GC9107_ALLOW_SET_FRAMERATE 0b000000001 // Allow GC9107_SET_FRAME_RATE
+#define GC9107_ALLOW_SET_COMPLEMENT_RGB 0b000010000 // Allow GC9107_SET_COMPLEMENT_RGB
+#define GC9107_ALLOW_SET_BLANK_PORCH 0b000100000 // Allow GFC9107_SET_BLANK_PORCH
+// Parameter values for
+// AVDD_CLK_AD part (Most significant nibble)
+#define GC9107_AVDD_CLK_AD_2T 0x00
+#define GC9107_AVDD_CLK_AD_3T 0x10
+#define GC9107_AVDD_CLK_AD_4T 0x20
+#define GC9107_AVDD_CLK_AD_5T 0x30
+#define GC9107_AVDD_CLK_AD_6T 0x40
+#define GC9107_AVDD_CLK_AD_7T 0x50
+#define GC9107_AVDD_CLK_AD_8T 0x60
+#define GC9107_AVDD_CLK_AD_9T 0x70
+// Parameter values for
+// VCL_CLK_AD part (Least significant nibble)
+#define GC9107_VCL_CLK_AD_2T 0x00
+#define GC9107_VCL_CLK_AD_3T 0x01
+#define GC9107_VCL_CLK_AD_4T 0x02
+#define GC9107_VCL_CLK_AD_5T 0x03
+#define GC9107_VCL_CLK_AD_6T 0x04
+#define GC9107_VCL_CLK_AD_7T 0x05
+#define GC9107_VCL_CLK_AD_8T 0x06
+#define GC9107_VCL_CLK_AD_9T 0x07
+// Parameter values for
+// GC9107_SET_VGH
+#define GC9107_VGH_P100 0x20 // +10 V
+#define GC9107_VGH_P110 0x21 // +11 V
+#define GC9107_VGH_P120 0x22 // +12 V
+#define GC9107_VGH_P130 0x23 // +13 V
+#define GC9107_VGH_P140 0x24 // +14 V
+#define GC9107_VGH_P150 0x25 // +15 V
+// Parameter values for
+// GC9107_SET_VGL
+#define VGL_N_075 0x40 // -7.5 V
+#define VGL_N_085 0x41 // -8.5 V
+#define VGL_N_095 0x42 // -9.5 V
+#define VGL_N_100 0x43 // -10.0 V
+#define VGL_N_105 0x44 // -10.5 V
+#define VGL_N_110 0x45 // -11.0 V
+#define VGL_N_120 0x46 // -12.0 V
+#define VGL_N_130 0x47 // -13.0 V
+// Parameter masks for
+// GC9107_SET_VGH_VGL_CLK (VGH Divisor)
+#define GC9107_VGH_CLK_DIV_2 0x00 // Clock divisor = 2 -> 6.0 Mhz
+#define GC9107_VGH_CLK_DIV_3 0x10 // Clock divisor = 3 -> 4.0 Mhz
+#define GC9107_VGH_CLK_DIV_4 0x20 // Clock divisor = 4 -> 3.0 Mhz
+#define GC9107_VGH_CLK_DIV_5 0x30 // Clock divisor = 5 -> 2.4 Mhz
+#define GC9107_VGH_CLK_DIV_6 0x40 // Clock divisor = 6 -> 2.0 Mhz
+#define GC9107_VGH_CLK_DIV_7 0x50 // Clock divisor = 7 -> 1.7 Mhz
+#define GC9107_VGH_CLK_DIV_8 0x60 // Clock divisor = 8 -> 1.5 Mhz
+#define GC9107_VGH_CLK_DIV_9 0x70 // Clock divisor = 9 -> 1.3 Mhz
+#define GC9107_VGH_CLK_DIV_10 0x80 // Clock divisor = 10 -> 1.2 Mhz
+#define GC9107_VGH_CLK_DIV_12 0x90 // Clock divisor = 12 -> 1.0 Mhz
+#define GC9107_VGH_CLK_DIV_15 0xA0 // Clock divisor = 15 -> 0.8 Mhz
+#define GC9107_VGH_CLK_DIV_20 0xB0 // Clock divisor = 20 -> 0.6 Mhz
+#define GC9107_VGH_CLK_DIV_24 0xC0 // Clock divisor = 24 -> 0.5 Mhz
+#define GC9107_VGH_CLK_DIV_30 0xD0 // Clock divisor = 30 -> 0.4 Mhz
+#define GC9107_VGH_CLK_DIV_40 0xE0 // Clock divisor = 40 -> 0.3 Mhz
+#define GC9107_VGH_CLK_DIV_60 0xE0 // Clock divisor = 40 -> 0.2 Mhz
+// Parameter masks for
+// GC9107_SET_VGH_VGL_CLK (VGL Divisor)
+#define GC9107_VGL_CLK_DIV_2 0x00 // Clock divisor = 2 -> 6.0 Mhz
+#define GC9107_VGL_CLK_DIV_3 0x01 // Clock divisor = 3 -> 4.0 Mhz
+#define GC9107_VGL_CLK_DIV_4 0x02 // Clock divisor = 4 -> 3.0 Mhz
+#define GC9107_VGL_CLK_DIV_5 0x03 // Clock divisor = 5 -> 2.4 Mhz
+#define GC9107_VGL_CLK_DIV_6 0x04 // Clock divisor = 6 -> 2.0 Mhz
+#define GC9107_VGL_CLK_DIV_7 0x05 // Clock divisor = 7 -> 1.7 Mhz
+#define GC9107_VGL_CLK_DIV_8 0x06 // Clock divisor = 8 -> 1.5 Mhz
+#define GC9107_VGL_CLK_DIV_9 0x07 // Clock divisor = 9 -> 1.3 Mhz
+#define GC9107_VGL_CLK_DIV_10 0x08 // Clock divisor = 10 -> 1.2 Mhz
+#define GC9107_VGL_CLK_DIV_12 0x09 // Clock divisor = 12 -> 1.0 Mhz
+#define GC9107_VGL_CLK_DIV_15 0x0A // Clock divisor = 15 -> 0.8 Mhz
+#define GC9107_VGL_CLK_DIV_20 0x0B // Clock divisor = 20 -> 0.6 Mhz
+#define GC9107_VGL_CLK_DIV_24 0x0C // Clock divisor = 24 -> 0.5 Mhz
+#define GC9107_VGL_CLK_DIV_30 0x0D // Clock divisor = 30 -> 0.4 Mhz
+#define GC9107_VGL_CLK_DIV_40 0x0E // Clock divisor = 40 -> 0.3 Mhz
+#define GC9107_VGL_CLK_DIV_60 0x0E // Clock divisor = 40 -> 0.2 Mhz
diff --git a/drivers/painter/gc9a01/qp_gc9a01.c b/drivers/painter/gc9xxx/qp_gc9a01.c
similarity index 61%
rename from drivers/painter/gc9a01/qp_gc9a01.c
rename to drivers/painter/gc9xxx/qp_gc9a01.c
index fe6fa7a9d024..f037a4cc87b2 100644
--- a/drivers/painter/gc9a01/qp_gc9a01.c
+++ b/drivers/painter/gc9xxx/qp_gc9a01.c
@@ -5,6 +5,7 @@
#include "qp_internal.h"
#include "qp_comms.h"
#include "qp_gc9a01.h"
+#include "qp_gc9xxx_opcodes.h"
#include "qp_gc9a01_opcodes.h"
#include "qp_tft_panel.h"
@@ -20,71 +21,40 @@ tft_panel_dc_reset_painter_device_t gc9a01_drivers[GC9A01_NUM_DEVICES] = {0};
__attribute__((weak)) bool qp_gc9a01_init(painter_device_t device, painter_rotation_t rotation) {
// A lot of these "unknown" opcodes are sourced from other OSS projects and are seemingly required for this display to function.
// clang-format off
+
const uint8_t gc9a01_init_sequence[] = {
// Command, Delay, N, Data[N]
- GC9A01_SET_INTER_REG_ENABLE2, 0, 0,
- 0xEB, 0, 1, 0x14,
- GC9A01_SET_INTER_REG_ENABLE1, 0, 0,
- GC9A01_SET_INTER_REG_ENABLE2, 0, 0,
- 0xEB, 0, 1, 0x14,
+ GC9XXX_SET_INTER_REG_ENABLE1, 0, 0,
+ GC9XXX_SET_INTER_REG_ENABLE2, 0, 0,
0x84, 0, 1, 0x40,
- 0x85, 0, 1, 0xFF,
- 0x86, 0, 1, 0xFF,
- 0x87, 0, 1, 0xFF,
- 0x88, 0, 1, 0x0A,
- 0x89, 0, 1, 0x21,
- 0x8a, 0, 1, 0x00,
- 0x8b, 0, 1, 0x80,
- 0x8c, 0, 1, 0x01,
- 0x8d, 0, 1, 0x01,
- 0x8e, 0, 1, 0xFF,
- 0x8f, 0, 1, 0xFF,
- GC9A01_SET_FUNCTION_CTL, 0, 2, 0x00, 0x20,
- GC9A01_SET_PIX_FMT, 0, 1, 0x55,
- 0x90, 0, 4, 0x08, 0x08, 0x08, 0x08,
- 0xBD, 0, 1, 0x06,
- 0xBC, 0, 1, 0x00,
- 0xFF, 0, 3, 0x60, 0x01, 0x04,
- GC9A01_SET_POWER_CTL_2, 0, 1, 0x13,
- GC9A01_SET_POWER_CTL_3, 0, 1, 0x13,
+ GC9A01_SET_FUNCTION_CTL, 0, 3, 0x00, GC9A01_SOURCE_OUTPUT_SCAN_DIRECTION_S360_TO_S1 | GC9A01_GATE_OUTPUT_SCAN_DIRECTION_G1_TO_G32, GC9A01_LCD_DRIVE_LINE_240, // Only works if the previous command is present (undocumented)
+ GC9A01_SET_POWER_CTL_2, 0, 1, 0x20,
+ GC9A01_SET_POWER_CTL_3, 0, 1, 0x20,
GC9A01_SET_POWER_CTL_4, 0, 1, 0x22,
- 0xBE, 0, 1, 0x11,
- 0xE1, 0, 2, 0x10, 0x0E,
- 0xDF, 0, 3, 0x21, 0x0C, 0x02,
- GC9A01_SET_GAMMA1, 0, 6, 0x45, 0x09, 0x08, 0x08, 0x26, 0x2A,
- GC9A01_SET_GAMMA2, 0, 6, 0x43, 0x70, 0x72, 0x36, 0x37, 0x6F,
+ GC9XXX_SET_GAMMA1, 0, 6, 0x45, 0x09, 0x08, 0x08, 0x26, 0x2A,
+ GC9XXX_SET_GAMMA2, 0, 6, 0x43, 0x70, 0x72, 0x36, 0x37, 0x6F,
GC9A01_SET_GAMMA3, 0, 6, 0x45, 0x09, 0x08, 0x08, 0x26, 0x2A,
GC9A01_SET_GAMMA4, 0, 6, 0x43, 0x70, 0x72, 0x36, 0x37, 0x6F,
- 0xED, 0, 2, 0x1B, 0x0B,
- 0xAE, 0, 1, 0x77,
- 0xCD, 0, 1, 0x63,
- 0x70, 0, 9, 0x07, 0x07, 0x04, 0x0E, 0x0F, 0x09, 0x07, 0x08, 0x03,
- GC9A01_SET_FRAME_RATE, 0, 1, 0x34,
- 0x62, 0, 12, 0x18, 0x0D, 0x71, 0xED, 0x70, 0x70, 0x18, 0x0F, 0x71, 0xEF, 0x70, 0x70,
- 0x63, 0, 12, 0x18, 0x11, 0x71, 0xF1, 0x70, 0x70, 0x18, 0x13, 0x71, 0xF3, 0x70, 0x70,
- 0x64, 0, 7, 0x28, 0x29, 0xF1, 0x01, 0xF1, 0x00, 0x07,
0x66, 0, 10, 0x3C, 0x00, 0xCD, 0x67, 0x45, 0x45, 0x10, 0x00, 0x00, 0x00,
0x67, 0, 10, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x01, 0x54, 0x10, 0x32, 0x98,
- 0x74, 0, 7, 0x10, 0x85, 0x80, 0x00, 0x00, 0x4E, 0x00,
- 0x98, 0, 2, 0x3E, 0x07,
- GC9A01_CMD_TEARING_OFF, 0, 0,
- GC9A01_CMD_INVERT_OFF, 0, 0,
- GC9A01_CMD_SLEEP_OFF, 120, 0,
- GC9A01_CMD_DISPLAY_ON, 20, 0
+ GC9XXX_CMD_TEARING_ON, 0, 0,
+ GC9XXX_SET_PIXEL_FORMAT, 0, 1, GC9A01_PIXEL_FORMAT_16_BPP_DBI,
+ GC9XXX_CMD_INVERT_ON, 0, 0,
+ GC9XXX_CMD_SLEEP_OFF, 120, 0,
+ GC9XXX_CMD_DISPLAY_ON, 20, 0
};
// clang-format on
- // clang-format on
qp_comms_bulk_command_sequence(device, gc9a01_init_sequence, sizeof(gc9a01_init_sequence));
// Configure the rotation (i.e. the ordering and direction of memory writes in GRAM)
const uint8_t madctl[] = {
- [QP_ROTATION_0] = GC9A01_MADCTL_BGR,
- [QP_ROTATION_90] = GC9A01_MADCTL_BGR | GC9A01_MADCTL_MX | GC9A01_MADCTL_MV,
- [QP_ROTATION_180] = GC9A01_MADCTL_BGR | GC9A01_MADCTL_MX | GC9A01_MADCTL_MY,
- [QP_ROTATION_270] = GC9A01_MADCTL_BGR | GC9A01_MADCTL_MV | GC9A01_MADCTL_MY,
+ [QP_ROTATION_0] = GC9XXX_MADCTL_BGR,
+ [QP_ROTATION_90] = GC9XXX_MADCTL_BGR | GC9XXX_MADCTL_MX | GC9XXX_MADCTL_MV,
+ [QP_ROTATION_180] = GC9XXX_MADCTL_BGR | GC9XXX_MADCTL_MX | GC9XXX_MADCTL_MY,
+ [QP_ROTATION_270] = GC9XXX_MADCTL_BGR | GC9XXX_MADCTL_MV | GC9XXX_MADCTL_MY,
};
- qp_comms_command_databyte(device, GC9A01_SET_MEM_ACS_CTL, madctl[rotation]);
+ qp_comms_command_databyte(device, GC9XXX_SET_MEM_ACS_CTL, madctl[rotation]);
return true;
}
@@ -110,11 +80,11 @@ const tft_panel_dc_reset_painter_driver_vtable_t gc9a01_driver_vtable = {
.swap_window_coords = false,
.opcodes =
{
- .display_on = GC9A01_CMD_DISPLAY_ON,
- .display_off = GC9A01_CMD_DISPLAY_OFF,
- .set_column_address = GC9A01_SET_COL_ADDR,
- .set_row_address = GC9A01_SET_PAGE_ADDR,
- .enable_writes = GC9A01_SET_MEM,
+ .display_on = GC9XXX_CMD_DISPLAY_ON,
+ .display_off = GC9XXX_CMD_DISPLAY_OFF,
+ .set_column_address = GC9XXX_SET_COL_ADDR,
+ .set_row_address = GC9XXX_SET_ROW_ADDR,
+ .enable_writes = GC9XXX_SET_MEM,
},
};
diff --git a/drivers/painter/gc9a01/qp_gc9a01.h b/drivers/painter/gc9xxx/qp_gc9a01.h
similarity index 100%
rename from drivers/painter/gc9a01/qp_gc9a01.h
rename to drivers/painter/gc9xxx/qp_gc9a01.h
diff --git a/drivers/painter/gc9xxx/qp_gc9a01_opcodes.h b/drivers/painter/gc9xxx/qp_gc9a01_opcodes.h
new file mode 100644
index 000000000000..5853902e6834
--- /dev/null
+++ b/drivers/painter/gc9xxx/qp_gc9a01_opcodes.h
@@ -0,0 +1,104 @@
+// Copyright 2021 Paul Cotter (@gr1mr3aver)
+// Copyright 2024 Fernando Birra
+// SPDX-License-Identifier: GPL-2.0-or-later
+#pragma once
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Quantum Painter GC9A01 command opcodes
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+#define GC9A01_SET_MEM_CONT 0x3C // Set memory continue
+#define GC9A01_SET_BRIGHTNESS 0x51 // Set brightness
+#define GC9A01_SET_DISPLAY_CTL 0x53 // Set display ctl
+
+#define GC9A01_SET_RGB_IF_SIG_CTL 0xB0 // RGB IF signal ctl
+#define GC9A01_SET_BLANKING_PORCH_CTL 0xB5 // Set blanking porch ctl
+#define GC9A01_SET_FUNCTION_CTL 0xB6 // Set function ctl
+#define GC9A01_SET_TEARING_EFFECT 0xBA // Set tering effect control
+#define GC9A01_SET_POWER_CTL_7 0xA7 // Set power ctl 7
+#define GC9A01_SET_POWER_CTL_1 0xC1 // Set power ctl 1
+#define GC9A01_SET_POWER_CTL_2 0xC3 // Set power ctl 2
+#define GC9A01_SET_POWER_CTL_3 0xC4 // Set power ctl 3
+#define GC9A01_SET_POWER_CTL_4 0xC9 // Set power ctl 4
+#define GC9A01_SET_FRAME_RATE 0xE8 // Set frame rate
+#define GC9A01_SET_SPI_2DATA 0xE9 // Set frame rate
+#define GC9A01_SET_GAMMA3 0xF2 // Set gamma 3
+#define GC9A01_SET_GAMMA4 0xF3 // Set gamma 4
+#define GC9A01_SET_IF_CTL 0xF6 // Set interface control
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// GC9A01 MADCTL Flags
+#define GC9A01_MADCTL_MH 0b00000100
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// GC9A01 Parameter constants
+
+// Parameter values for
+// GC9A01_SET_PIXEL_FORMAT
+#define GC9A01_PIXEL_FORMAT_12_BPP_DBI (0b011 << 0) // 12 bits/pixel MCU interface format
+#define GC9A01_PIXEL_FORMAT_16_BPP_DBI (0b101 << 0) // 16 bits/pixel MCU interface format
+#define GC9A01_PIXEL_FORMAT_18_BPP_DBI (0b110 << 0) // 18 bits/pixel MCU interface format
+#define GC9A01_PIXEL_FORMAT_16_BPP_DPI (0b101 << 4) // 16 bits/pixel RGB interface format
+#define GC9A01_PIXEL_FORMAT_18_BPP_DPI (0b110 << 4) // 18 bits/pixel RGB interface format
+
+// Parameter values for
+// GC9A01_SET_FUNCTION_CTL (2nd parameter)
+#define GC9A01_SOURCE_OUTPUT_SCAN_DIRECTION_S1_TO_S360 0b00000000
+#define GC9A01_SOURCE_OUTPUT_SCAN_DIRECTION_S360_TO_S1 0b00100000
+#define GC9A01_GATE_OUTPUT_SCAN_DIRECTION_G1_TO_G32 0b00000000
+#define GC9A01_GATE_OUTPUT_SCAN_DIRECTION_G32_TO_G1 0b01000000
+#define GC9A01_SCAN_MODE_INTER 0x10
+
+// Parameter values for
+// GC9A01_SET_FUNCTION_CTL (3rd parameter)
+#define GC9A01_LCD_DRIVE_LINE_16 0x01
+#define GC9A01_LCD_DRIVE_LINE_24 0x02
+#define GC9A01_LCD_DRIVE_LINE_32 0x03
+#define GC9A01_LCD_DRIVE_LINE_40 0x04
+#define GC9A01_LCD_DRIVE_LINE_48 0x05
+#define GC9A01_LCD_DRIVE_LINE_56 0x06
+#define GC9A01_LCD_DRIVE_LINE_64 0x07
+#define GC9A01_LCD_DRIVE_LINE_72 0x08
+#define GC9A01_LCD_DRIVE_LINE_80 0x09
+#define GC9A01_LCD_DRIVE_LINE_88 0x0A
+#define GC9A01_LCD_DRIVE_LINE_96 0x0B
+#define GC9A01_LCD_DRIVE_LINE_104 0x0C
+#define GC9A01_LCD_DRIVE_LINE_112 0x0D
+#define GC9A01_LCD_DRIVE_LINE_120 0x0E
+#define GC9A01_LCD_DRIVE_LINE_128 0x0F
+#define GC9A01_LCD_DRIVE_LINE_136 0x10
+#define GC9A01_LCD_DRIVE_LINE_144 0x11
+#define GC9A01_LCD_DRIVE_LINE_152 0x12
+#define GC9A01_LCD_DRIVE_LINE_160 0x13
+#define GC9A01_LCD_DRIVE_LINE_168 0x14
+#define GC9A01_LCD_DRIVE_LINE_176 0x15
+#define GC9A01_LCD_DRIVE_LINE_184 0x16
+#define GC9A01_LCD_DRIVE_LINE_192 0x17
+#define GC9A01_LCD_DRIVE_LINE_200 0x18
+#define GC9A01_LCD_DRIVE_LINE_208 0x19
+#define GC9A01_LCD_DRIVE_LINE_216 0x1A
+#define GC9A01_LCD_DRIVE_LINE_224 0x1B
+#define GC9A01_LCD_DRIVE_LINE_232 0x1C
+#define GC9A01_LCD_DRIVE_LINE_240 0x1D
+
+// Parameter values for
+// GC9A01_SET_DISPLAY_CTL
+#define GC9A01_BRIGHTNESS_CONTROL_ON 0b00100000
+#define GC9A01_DIMMING_ON 0b00001000
+#define GC9A01_BACKLIGHT_ON 0b00000100
+#define GC9A01_BRIGHTNESS_CONTROL_OFF 0b00000000
+#define GC9A01_DIMMING_OFF 0b00000000
+#define GC9A01_BACKLIGHT_OFF 0b00000000
+
+// Parameter values for
+// GC9A01_SET_IF_CTL
+#define GC9A01_DISPLAY_MODE_INTERNAL_CLOCK 0b00000000
+#define GC9A01_DISPLAY_MODE_RGB_INTERFACE 0b00000100
+#define GC9A01_DISPLAY_MODE_VSYNC_INTERFACE 0b00001000
+#define GC9A01_DSISPLAY_MODE_DISABLED 0b00001100
+
+#define GC0A01_GRAM_INTERFACE_VSYNC 0b00000000
+#define GC9A01_GRAM_INTERFACE_RGB 0b00000010
+
+#define GC9A01_RGB_INTERFACE_MODE_1_TRANSFER 0b00000000
+#define GC9A01_RGB_INTERFACE_MODE_3_TRANSFER 0b00000001
\ No newline at end of file
diff --git a/drivers/painter/gc9xxx/qp_gc9xxx_opcodes.h b/drivers/painter/gc9xxx/qp_gc9xxx_opcodes.h
new file mode 100644
index 000000000000..7e0fbf9110b2
--- /dev/null
+++ b/drivers/painter/gc9xxx/qp_gc9xxx_opcodes.h
@@ -0,0 +1,55 @@
+// Copyright 2021 Paul Cotter (@gr1mr3aver)
+// Copyright 2024 Fernando Birra
+// SPDX-License-Identifier: GPL-2.0-or-later
+#pragma once
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Quantum Painter GC9xxx command opcodes
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+#define GC9XXX_GET_ID_INFO 0x04 // Get ID information
+#define GC9XXX_GET_STATUS 0x09 // Get status
+
+#define GC9XXX_CMD_SLEEP_ON 0x10 // Enter sleep mode
+#define GC9XXX_CMD_SLEEP_OFF 0x11 // Exit sleep mode
+#define GC9XXX_CMD_PARTIAL_ON 0x12 // Enter partial mode
+#define GC9XXX_CMD_PARTIAL_OFF 0x13 // Exit partial mode
+
+#define GC9XXX_CMD_INVERT_OFF 0x20 // Exit inverted mode
+#define GC9XXX_CMD_INVERT_ON 0x21 // Enter inverted mode
+#define GC9XXX_CMD_DISPLAY_OFF 0x28 // Disable display
+#define GC9XXX_CMD_DISPLAY_ON 0x29 // Enable display
+#define GC9XXX_SET_COL_ADDR 0x2A // Set column address (MSB(StartCol),LSB(StartCol),MSB(EndCol),LSB(EndCol)
+#define GC9XXX_SET_ROW_ADDR 0x2B // Set row address (MSB(StartRow),LSB(StartRow),MSB(EndRow),LSB(EndRow)
+#define GC9XXX_SET_MEM 0x2C // Set (write) memory
+
+#define GC9XXX_SET_PARTIAL_AREA 0x30 // Set partial area (MSB(StartRow),LSB(StartRow),MSB(EndRow),LSB(EndRow)
+#define GC9XXX_SET_VSCROLL 0x33 // Set vertical scroll MSB(TFA),LSB(TFA),MSB(VSA),LSB(VSA)+ GC9107 extra param: MSB(BFA),LSB(BFA)
+#define GC9XXX_CMD_TEARING_OFF 0x34 // Tearing effect line OFF
+#define GC9XXX_CMD_TEARING_ON 0x35 // Tearing effect line ON
+#define GC9XXX_SET_MEM_ACS_CTL 0x36 // Set mem access ctl
+#define GC9XXX_SET_VSCROLL_ADDR 0x37 // Set vscroll start addr
+#define GC9XXX_CMD_IDLE_OFF 0x38 // Exit idle mode
+#define GC9XXX_CMD_IDLE_ON 0x39 // Enter idle mode
+#define GC9XXX_SET_PIXEL_FORMAT 0x3A // Set pixel format
+#define GC9XXX_SET_TEAR_SCANLINE 0x44 // Set tearing scanline (Scanline = LS bit of Param 1 (GC9A01) + Param 2(GC9XXX))
+#define GC9XXX_GET_TEAR_SCANLINE 0x45 // Get tearing scanline (Scanline = LS bit of Param 1 (GC9A01) + Param 2(GC9XXX))
+#define GC9XXX_GET_ID1 0xDA // Get ID1
+#define GC9XXX_GET_ID2 0xDB // Get ID2
+#define GC9XXX_GET_ID3 0xDC // Get ID3
+#define GC9XXX_SET_INTER_REG_ENABLE1 0xFE // Enable Inter Register 1
+#define GC9XXX_SET_INTER_REG_ENABLE2 0xEF // Enable Inter Register 2
+#define GC9XXX_SET_GAMMA1 0xF0 // Set gamma 1
+#define GC9XXX_SET_GAMMA2 0xF1 // Set gamma 2
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// MADCTL Flags
+#define GC9XXX_MADCTL_MY 0b10000000 // Mirror Y (row address order)
+#define GC9XXX_MADCTL_MX 0b01000000 // Mirror X (column address order)
+#define GC9XXX_MADCTL_MV 0b00100000 // Vertical Refresh Order (bottom to top)
+#define GC9XXX_MADCTL_ML 0b00010000
+#define GC9XXX_MADCTL_BGR 0b00001000
+#define GC9XXX_MADCTL_RGB 0b00000000
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// GC9XXX Parameter constants
diff --git a/drivers/painter/generic/qp_surface_rgb565.c b/drivers/painter/generic/qp_surface_rgb565.c
index 8883ed541d82..c5b351311a06 100644
--- a/drivers/painter/generic/qp_surface_rgb565.c
+++ b/drivers/painter/generic/qp_surface_rgb565.c
@@ -52,7 +52,7 @@ static bool qp_surface_pixdata_rgb565(painter_device_t device, const void *pixel
// Pixel colour conversion
static bool qp_surface_palette_convert_rgb565_swapped(painter_device_t device, int16_t palette_size, qp_pixel_t *palette) {
for (int16_t i = 0; i < palette_size; ++i) {
- RGB rgb = hsv_to_rgb_nocie((HSV){palette[i].hsv888.h, palette[i].hsv888.s, palette[i].hsv888.v});
+ rgb_t rgb = hsv_to_rgb_nocie((hsv_t){palette[i].hsv888.h, palette[i].hsv888.s, palette[i].hsv888.v});
uint16_t rgb565 = (((uint16_t)rgb.r) >> 3) << 11 | (((uint16_t)rgb.g) >> 2) << 5 | (((uint16_t)rgb.b) >> 3);
palette[i].rgb565 = __builtin_bswap16(rgb565);
}
diff --git a/drivers/painter/ld7032/qp_ld7032.c b/drivers/painter/ld7032/qp_ld7032.c
new file mode 100644
index 000000000000..f43ae8e60d7a
--- /dev/null
+++ b/drivers/painter/ld7032/qp_ld7032.c
@@ -0,0 +1,411 @@
+// Copyright 2023 Nick Brassel (@tzarc)
+// Copyright 2023 Dasky (@daskygit)
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include "qp_internal.h"
+#include "qp_comms.h"
+#include "qp_oled_panel.h"
+#include "qp_ld7032.h"
+#include "qp_ld7032_opcodes.h"
+#include "qp_surface.h"
+#include "qp_surface_internal.h"
+
+typedef void (*ld7032_driver_comms_send_command_and_data_func)(painter_device_t device, uint8_t cmd, uint8_t data);
+typedef uint32_t (*ld7032_driver_comms_send_command_and_databuf_func)(painter_device_t device, uint8_t cmd, const void *data, uint32_t byte_count);
+
+typedef struct ld7032_comms_with_command_vtable_t {
+ painter_comms_vtable_t base; // must be first, so this object can be cast from the painter_comms_vtable_t* type
+ painter_driver_comms_send_command_func send_command;
+ painter_driver_comms_bulk_command_sequence bulk_command_sequence;
+ ld7032_driver_comms_send_command_and_data_func send_command_data;
+ ld7032_driver_comms_send_command_and_databuf_func send_command_databuf;
+} ld7032_comms_with_command_vtable_t;
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// LD7032 Internal API
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void ld7032_comms_i2c_send_command_and_data(painter_device_t device, uint8_t cmd, uint8_t data) {
+ uint8_t buf[2] = {cmd, data};
+ qp_comms_i2c_send_data(device, buf, 2);
+}
+
+void ld7032_comms_i2c_bulk_command_sequence(painter_device_t device, const uint8_t *sequence, size_t sequence_len) {
+ uint8_t buf[32];
+ for (size_t i = 0; i < sequence_len;) {
+ uint8_t command = sequence[i];
+ uint8_t delay = sequence[i + 1];
+ uint8_t num_bytes = sequence[i + 2];
+ buf[0] = command;
+ memcpy(&buf[1], &sequence[i + 3], num_bytes);
+ qp_comms_i2c_send_data(device, buf, num_bytes + 1);
+ if (delay > 0) {
+ wait_ms(delay);
+ }
+ i += (3 + num_bytes);
+ }
+}
+
+uint32_t ld7032_comms_i2c_send_command_and_databuf(painter_device_t device, uint8_t cmd, const void *data, uint32_t byte_count) {
+ uint8_t buf[byte_count + 1];
+ memset(buf, 0, sizeof(buf));
+ buf[0] = cmd;
+ memcpy(&buf[1], data, byte_count);
+ return qp_comms_send(device, buf, byte_count + 1);
+}
+
+// Power control
+bool qp_ld7032_power(painter_device_t device, bool power_on) {
+ painter_driver_t * driver = (painter_driver_t *)device;
+ ld7032_comms_with_command_vtable_t *comms_vtable = (ld7032_comms_with_command_vtable_t *)driver->comms_vtable;
+
+ comms_vtable->send_command_data(device, LD7032_DISP_ON_OFF, power_on ? 0x01 : 0x00);
+
+ return true;
+}
+
+// Screen clear
+bool qp_ld7032_clear(painter_device_t device) {
+ qp_rect(device, 0, 0, 127, 127, 0, 0, 0, true); // clear memory
+ painter_driver_t *driver = (painter_driver_t *)device;
+ driver->driver_vtable->init(device, driver->rotation); // Re-init the display
+ return true;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Flush helpers
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void ld7032_flush_0(painter_device_t device, surface_dirty_data_t *dirty, const uint8_t *framebuffer, bool inverted) {
+ painter_driver_t * driver = (painter_driver_t *)device;
+ ld7032_comms_with_command_vtable_t *comms_vtable = (ld7032_comms_with_command_vtable_t *)driver->comms_vtable;
+
+ int x_start = dirty->l >> 3;
+ int x_end = dirty->r >> 3;
+ int y_start = dirty->t;
+ int y_end = dirty->b;
+ int x_length = (x_end - x_start) + 1;
+ uint8_t x_view_offset = driver->offset_x >> 3;
+ uint8_t y_view_offset = driver->offset_y;
+
+ for (int y_pos = y_start; y_pos <= y_end; y_pos++) {
+ int y_new_pos = y_pos;
+ if (inverted) {
+ y_new_pos = y_end - y_pos;
+ }
+ uint8_t packet[x_length];
+ memcpy(packet, &framebuffer[(y_pos * (driver->panel_width >> 3)) + x_start], x_length);
+ uint8_t x_write_start = MIN(x_start + x_view_offset, (128 >> 3));
+ uint8_t x_write_end = MIN(x_end + x_view_offset, (128 >> 3));
+ uint8_t y_write_start = MIN(y_new_pos + y_view_offset, 39);
+ uint8_t y_write_end = MIN(y_new_pos + y_view_offset, 39);
+
+ comms_vtable->send_command_data(device, LD7032_X_BOX_ADR_START, x_write_start);
+ comms_vtable->send_command_data(device, LD7032_X_BOX_ADR_END, x_write_end);
+ comms_vtable->send_command_data(device, LD7032_Y_BOX_ADR_START, y_write_start);
+ comms_vtable->send_command_data(device, LD7032_Y_BOX_ADR_END, y_write_end);
+ comms_vtable->send_command_databuf(device, LD7032_DATA_RW, packet, x_length);
+ }
+}
+
+void ld7032_flush_90(painter_device_t device, surface_dirty_data_t *dirty, const uint8_t *framebuffer, bool inverted) {
+ painter_driver_t * driver = (painter_driver_t *)device;
+ ld7032_comms_with_command_vtable_t *comms_vtable = (ld7032_comms_with_command_vtable_t *)driver->comms_vtable;
+
+ int x_start = dirty->t >> 3;
+ int x_end = dirty->b >> 3;
+ int y_start = dirty->l;
+ int y_end = dirty->r;
+ int x_length = (x_end - x_start) + 1;
+ uint8_t x_view_offset = driver->offset_x >> 3;
+ uint8_t y_view_offset = driver->offset_y;
+
+ for (int y_pos = y_start; y_pos <= y_end; y_pos++) {
+ int y_new_pos = y_pos;
+ if (inverted) {
+ y_new_pos = y_end - y_pos;
+ }
+ uint8_t packet[x_length];
+ memset(packet, 0, sizeof(packet));
+ int count = 0;
+ for (int x_pos = x_start; x_pos <= x_end; x_pos++) {
+ for (int x = 0; x < 8; ++x) {
+ uint32_t pixel_num = (((x_pos << 3) + x) * driver->panel_height) + y_pos;
+ uint32_t byte_offset = pixel_num / 8;
+ uint8_t bit_offset = pixel_num % 8;
+ packet[count] |= ((framebuffer[byte_offset] & (1 << bit_offset)) >> bit_offset) << x;
+ }
+ count++;
+ }
+ uint8_t x_width = (driver->panel_width >> 3) - 1;
+ uint8_t x_write_start = MAX((int)x_width - x_end - x_view_offset, 0);
+ uint8_t x_write_end = MAX((int)x_width - x_start - x_view_offset, 0);
+ uint8_t y_write_start = MIN(y_new_pos + y_view_offset, 39);
+ uint8_t y_write_end = MIN(y_new_pos + y_view_offset, 39);
+
+ comms_vtable->send_command_data(device, LD7032_X_BOX_ADR_START, x_write_start);
+ comms_vtable->send_command_data(device, LD7032_X_BOX_ADR_END, x_write_end);
+ comms_vtable->send_command_data(device, LD7032_Y_BOX_ADR_START, y_write_start);
+ comms_vtable->send_command_data(device, LD7032_Y_BOX_ADR_END, y_write_end);
+ comms_vtable->send_command_databuf(device, LD7032_DATA_RW, packet, x_length);
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Driver storage
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+typedef struct ld7032_device_t {
+ oled_panel_painter_device_t oled;
+
+ uint8_t framebuffer[SURFACE_REQUIRED_BUFFER_BYTE_SIZE(128, 40, 1)];
+} ld7032_device_t;
+
+static ld7032_device_t ld7032_drivers[LD7032_NUM_DEVICES] = {0};
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Quantum Painter API implementations
+
+// Initialisation
+__attribute__((weak)) bool qp_ld7032_init(painter_device_t device, painter_rotation_t rotation) {
+ ld7032_device_t *driver = (ld7032_device_t *)device;
+
+ // Change the surface geometry based on the panel rotation
+ if (rotation == QP_ROTATION_90 || rotation == QP_ROTATION_270) {
+ driver->oled.surface.base.panel_width = driver->oled.base.panel_height;
+ driver->oled.surface.base.panel_height = driver->oled.base.panel_width;
+ } else {
+ driver->oled.surface.base.panel_width = driver->oled.base.panel_width;
+ driver->oled.surface.base.panel_height = driver->oled.base.panel_height;
+ }
+
+ // Init the internal surface
+ if (!qp_init(&driver->oled.surface.base, QP_ROTATION_0)) {
+ qp_dprintf("Failed to init internal surface in qp_ld7032_init\n");
+ return false;
+ }
+
+ // clang-format off
+ const uint8_t ld7032_init_sequence[] = {
+ // Command, Delay, N, Data[N]
+ LD7032_DISP_STBY_ON_OFF, 0, 1, 0x00,
+ LD7032_DISP_ON_OFF, 0, 1, 0x00,
+ LD7032_DFRAME, 0, 1, 0x05,
+ //LD7032_WRITE_DIRECTION, 0, 1, 0b00001000, // 0 Right, 1 Up, 2 Vertical, 3 Bit Order, 4-7 Unused
+ LD7032_DISP_DIRECTION, 0, 1, 0x00,
+ LD7032_PEAK_WIDTH, 0, 1, 0x1F,
+ LD7032_PEAK_DELAY, 0, 1, 0x05,
+ LD7032_SCAN_MODE, 0, 1, 0x01,
+ LD7032_DOT_CURRENT, 0, 1, 0x1f,
+ LD7032_VDD_SEL, 0, 1, 0x01,
+ };
+ // clang-format on
+
+ qp_comms_bulk_command_sequence(device, ld7032_init_sequence, sizeof(ld7032_init_sequence));
+
+ uint8_t display_y_start = 40 - driver->oled.base.panel_height;
+ uint8_t display_x_start = (128 - driver->oled.base.panel_width) / 2;
+
+ // clang-format off
+ uint8_t ld7032_memory_setup[] = {
+ // Command, Delay, N, Data[N]
+ LD7032_DISP_SIZE_X, 0, 2, 0x00, 0x7F,
+ LD7032_DISP_SIZE_Y, 0, 2, 0x00, 0x27,
+ LD7032_X_DISP_START, 0, 1, 0x0,
+ LD7032_Y_DISP_START, 0, 1, 0x0,
+ };
+ // clang-format on
+
+ ld7032_memory_setup[3] = display_x_start;
+ ld7032_memory_setup[4] = display_x_start + driver->oled.base.panel_width - 1;
+ ld7032_memory_setup[8] = display_y_start;
+ ld7032_memory_setup[9] = display_y_start + driver->oled.base.panel_height - 1;
+ ld7032_memory_setup[13] = ld7032_memory_setup[4] + 1;
+ ld7032_memory_setup[17] = driver->oled.base.panel_height;
+
+ qp_comms_bulk_command_sequence(device, ld7032_memory_setup, sizeof(ld7032_memory_setup));
+
+ uint8_t write_direction = 0;
+ switch (rotation) {
+ default:
+ case QP_ROTATION_0:
+ write_direction = 0b00001000;
+ break;
+ case QP_ROTATION_90:
+ write_direction = 0b00000001;
+ break;
+ case QP_ROTATION_180:
+ write_direction = 0b00000001;
+ break;
+ case QP_ROTATION_270:
+ write_direction = 0b00001000;
+ break;
+ }
+
+ painter_driver_t * pdriver = (painter_driver_t *)device;
+ ld7032_comms_with_command_vtable_t *comms_vtable = (ld7032_comms_with_command_vtable_t *)pdriver->comms_vtable;
+
+ comms_vtable->send_command_data(device, LD7032_WRITE_DIRECTION, write_direction);
+
+ qp_ld7032_power(device, true);
+
+ return true;
+}
+
+// Screen flush
+bool qp_ld7032_flush(painter_device_t device) {
+ ld7032_device_t *driver = (ld7032_device_t *)device;
+
+ if (!driver->oled.surface.dirty.is_dirty) {
+ return true;
+ }
+
+ switch (driver->oled.base.rotation) {
+ default:
+ case QP_ROTATION_0:
+ ld7032_flush_0(device, &driver->oled.surface.dirty, driver->framebuffer, false);
+ break;
+ case QP_ROTATION_180:
+ ld7032_flush_0(device, &driver->oled.surface.dirty, driver->framebuffer, true);
+ break;
+ case QP_ROTATION_90:
+ ld7032_flush_90(device, &driver->oled.surface.dirty, driver->framebuffer, false);
+ break;
+ case QP_ROTATION_270:
+ ld7032_flush_90(device, &driver->oled.surface.dirty, driver->framebuffer, true);
+ break;
+ }
+
+ // Clear the dirty area
+ qp_flush(&driver->oled.surface);
+
+ return true;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Driver vtable
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+const painter_driver_vtable_t ld7032_driver_vtable = {
+ .init = qp_ld7032_init,
+ .power = qp_ld7032_power,
+ .clear = qp_ld7032_clear,
+ .flush = qp_ld7032_flush,
+ .pixdata = qp_oled_panel_passthru_pixdata,
+ .viewport = qp_oled_panel_passthru_viewport,
+ .palette_convert = qp_oled_panel_passthru_palette_convert,
+ .append_pixels = qp_oled_panel_passthru_append_pixels,
+ .append_pixdata = qp_oled_panel_passthru_append_pixdata,
+};
+
+#ifdef QUANTUM_PAINTER_LD7032_SPI_ENABLE
+
+const ld7032_comms_with_command_vtable_t ld7032_spi_comms_vtable = {
+ .base =
+ {
+ .comms_init = qp_comms_spi_dc_reset_init,
+ .comms_start = qp_comms_spi_start,
+ .comms_send = qp_comms_spi_dc_reset_send_data,
+ .comms_stop = qp_comms_spi_stop,
+ },
+ .send_command = qp_comms_spi_dc_reset_send_command,
+ .send_command_data = qp_comms_command_databyte,
+ .send_command_databuf = qp_comms_command_databuf,
+ .bulk_command_sequence = qp_comms_spi_dc_reset_bulk_command_sequence,
+};
+
+// Factory function for creating a handle to the LD7032 device
+painter_device_t qp_ld7032_make_spi_device(uint16_t panel_width, uint16_t panel_height, pin_t chip_select_pin, pin_t dc_pin, pin_t reset_pin, uint16_t spi_divisor, int spi_mode) {
+ for (uint32_t i = 0; i < LD7032_NUM_DEVICES; ++i) {
+ ld7032_device_t *driver = &ld7032_drivers[i];
+ if (!driver->oled.base.driver_vtable) {
+ painter_device_t surface = qp_make_mono1bpp_surface_advanced(&driver->oled.surface, 1, panel_width, panel_height, driver->framebuffer);
+ if (!surface) {
+ return NULL;
+ }
+
+ // Setup the OLED device
+ driver->oled.base.driver_vtable = (const painter_driver_vtable_t *)&ld7032_driver_vtable;
+ driver->oled.base.comms_vtable = (const painter_comms_vtable_t *)&ld7032_spi_comms_vtable;
+ driver->oled.base.native_bits_per_pixel = 1; // 1bpp mono
+ driver->oled.base.panel_width = panel_width;
+ driver->oled.base.panel_height = panel_height;
+ driver->oled.base.rotation = QP_ROTATION_0;
+ driver->oled.base.offset_x = 0;
+ driver->oled.base.offset_y = 0;
+
+ // SPI and other pin configuration
+ driver->oled.base.comms_config = &driver->oled.spi_dc_reset_config;
+ driver->oled.spi_dc_reset_config.spi_config.chip_select_pin = chip_select_pin;
+ driver->oled.spi_dc_reset_config.spi_config.divisor = spi_divisor;
+ driver->oled.spi_dc_reset_config.spi_config.lsb_first = false;
+ driver->oled.spi_dc_reset_config.spi_config.mode = spi_mode;
+ driver->oled.spi_dc_reset_config.dc_pin = dc_pin;
+ driver->oled.spi_dc_reset_config.reset_pin = reset_pin;
+ driver->oled.spi_dc_reset_config.command_params_uses_command_pin = true;
+
+ if (!qp_internal_register_device((painter_device_t)driver)) {
+ memset(driver, 0, sizeof(ld7032_device_t));
+ return NULL;
+ }
+
+ return (painter_device_t)driver;
+ }
+ }
+ return NULL;
+}
+
+#endif // QUANTUM_PAINTER_LD7032_SPI_ENABLE
+
+#ifdef QUANTUM_PAINTER_LD7032_I2C_ENABLE
+
+const ld7032_comms_with_command_vtable_t ld7032_i2c_comms_vtable = {
+ .base =
+ {
+ .comms_init = qp_comms_i2c_init,
+ .comms_start = qp_comms_i2c_start,
+ .comms_send = qp_comms_i2c_send_data,
+ .comms_stop = qp_comms_i2c_stop,
+ },
+ .send_command = NULL,
+ .send_command_data = ld7032_comms_i2c_send_command_and_data,
+ .send_command_databuf = ld7032_comms_i2c_send_command_and_databuf,
+ .bulk_command_sequence = ld7032_comms_i2c_bulk_command_sequence,
+};
+
+// Factory function for creating a handle to the LD7032 device
+painter_device_t qp_ld7032_make_i2c_device(uint16_t panel_width, uint16_t panel_height, uint8_t i2c_address) {
+ for (uint32_t i = 0; i < LD7032_NUM_DEVICES; ++i) {
+ ld7032_device_t *driver = &ld7032_drivers[i];
+ if (!driver->oled.base.driver_vtable) {
+ painter_device_t surface = qp_make_mono1bpp_surface_advanced(&driver->oled.surface, 1, panel_width, panel_height, driver->framebuffer);
+ if (!surface) {
+ return NULL;
+ }
+
+ // Setup the OLED device
+ driver->oled.base.driver_vtable = (const painter_driver_vtable_t *)&ld7032_driver_vtable;
+ driver->oled.base.comms_vtable = (const painter_comms_vtable_t *)&ld7032_i2c_comms_vtable;
+ driver->oled.base.native_bits_per_pixel = 1; // 1bpp mono
+ driver->oled.base.panel_width = panel_width;
+ driver->oled.base.panel_height = panel_height;
+ driver->oled.base.rotation = QP_ROTATION_0;
+ driver->oled.base.offset_x = 0;
+ driver->oled.base.offset_y = 0;
+
+ // I2C configuration
+ driver->oled.base.comms_config = &driver->oled.i2c_config;
+ driver->oled.i2c_config.chip_address = i2c_address;
+
+ if (!qp_internal_register_device((painter_device_t)driver)) {
+ memset(driver, 0, sizeof(ld7032_device_t));
+ return NULL;
+ }
+
+ return (painter_device_t)driver;
+ }
+ }
+ return NULL;
+}
+
+#endif // QUANTUM_PAINTER_LD7032_SPI_ENABLE
diff --git a/drivers/painter/ld7032/qp_ld7032.h b/drivers/painter/ld7032/qp_ld7032.h
new file mode 100644
index 000000000000..967eb7999cc0
--- /dev/null
+++ b/drivers/painter/ld7032/qp_ld7032.h
@@ -0,0 +1,66 @@
+// Copyright 2023 Nick Brassel (@tzarc)
+// SPDX-License-Identifier: GPL-2.0-or-later
+#pragma once
+
+#include "gpio.h"
+#include "qp_internal.h"
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Quantum Painter LD7032 configurables (add to your keyboard's config.h)
+
+#if defined(QUANTUM_PAINTER_LD7032_SPI_ENABLE) && !defined(LD7032_NUM_SPI_DEVICES)
+/**
+ * @def This controls the maximum number of SPI LD7032 devices that Quantum Painter can communicate with at any one time.
+ * Increasing this number allows for multiple displays to be used.
+ */
+# define LD7032_NUM_SPI_DEVICES 1
+#else
+# define LD7032_NUM_SPI_DEVICES 0
+#endif
+
+#if defined(QUANTUM_PAINTER_LD7032_I2C_ENABLE) && !defined(LD7032_NUM_I2C_DEVICES)
+/**
+ * @def This controls the maximum number of I2C LD7032 devices that Quantum Painter can communicate with at any one time.
+ * Increasing this number allows for multiple displays to be used.
+ */
+# define LD7032_NUM_I2C_DEVICES 1
+#else
+# define LD7032_NUM_I2C_DEVICES 0
+#endif
+
+#define LD7032_NUM_DEVICES ((LD7032_NUM_SPI_DEVICES) + (LD7032_NUM_I2C_DEVICES))
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Quantum Painter LD7032 device factories
+
+#ifdef QUANTUM_PAINTER_LD7032_SPI_ENABLE
+
+/**
+ * Factory method for an LD7032 SPI LCD device.
+ *
+ * @param panel_width[in] the width of the display in pixels (usually 128)
+ * @param panel_height[in] the height of the display in pixels (usually 64)
+ * @param chip_select_pin[in] the GPIO pin used for SPI chip select
+ * @param dc_pin[in] the GPIO pin used for D/C control
+ * @param reset_pin[in] the GPIO pin used for RST
+ * @param spi_divisor[in] the SPI divisor to use when communicating with the display
+ * @param spi_mode[in] the SPI mode to use when communicating with the display
+ * @return the device handle used with all drawing routines in Quantum Painter
+ */
+painter_device_t qp_ld7032_make_spi_device(uint16_t panel_width, uint16_t panel_height, pin_t chip_select_pin, pin_t dc_pin, pin_t reset_pin, uint16_t spi_divisor, int spi_mode);
+
+#endif // QUANTUM_PAINTER_LD7032_SPI_ENABLE
+
+#ifdef QUANTUM_PAINTER_LD7032_I2C_ENABLE
+
+/**
+ * Factory method for an LD7032 I2C LCD device.
+ *
+ * @param panel_width[in] the width of the display in pixels (usually 128)
+ * @param panel_height[in] the height of the display in pixels (usually 64)
+ * @param i2c_address[in] the I2C address to use
+ * @return the device handle used with all drawing routines in Quantum Painter
+ */
+painter_device_t qp_ld7032_make_i2c_device(uint16_t panel_width, uint16_t panel_height, uint8_t i2c_address);
+
+#endif // QUANTUM_PAINTER_LD7032_I2C_ENABLE
\ No newline at end of file
diff --git a/drivers/painter/ld7032/qp_ld7032_opcodes.h b/drivers/painter/ld7032/qp_ld7032_opcodes.h
new file mode 100644
index 000000000000..08ab77d6f862
--- /dev/null
+++ b/drivers/painter/ld7032/qp_ld7032_opcodes.h
@@ -0,0 +1,45 @@
+// Copyright 2023 Dasky (@daskygit)
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+typedef enum {
+ LD7032_SOFTRES = 0x01,
+ LD7032_DISP_ON_OFF = 0x02,
+ LD7032_DATA_RW = 0x08,
+ LD7032_DISP_DIRECTION = 0x09,
+ LD7032_IFMODE = 0x0D,
+ LD7032_PEAK_WIDTH = 0x10,
+ LD7032_DOT_CURRENT = 0x12,
+ LD7032_SCAN_MODE = 0x13,
+ LD7032_DISP_STBY_ON_OFF = 0x14,
+ LD7032_PEAK_DELAY = 0x16,
+ LD7032_ROW_SCAN = 0x17,
+ LD7032_PRE_C_WIDTH = 0x18,
+ LD7032_DFRAME = 0x1A,
+ LD7032_DATA_REVERSE = 0x1C,
+ LD7032_WRITE_DIRECTION = 0x1D,
+ LD7032_READREG = 0x20,
+ LD7032_DISP_SIZE_X = 0x30,
+ LD7032_DISP_SIZE_Y = 0x32,
+ LD7032_X_BOX_ADR_START = 0x34,
+ LD7032_X_BOX_ADR_END = 0x35,
+ LD7032_Y_BOX_ADR_START = 0x36,
+ LD7032_Y_BOX_ADR_END = 0x37,
+ LD7032_X_DISP_START = 0x38,
+ LD7032_Y_DISP_START = 0x39,
+ LD7032_XTALK_EN = 0x3A,
+ LD7032_XTALK_REF = 0x3B,
+ LD7032_AGING_EN = 0x3C,
+ LD7032_VDD_SEL = 0x3D,
+ LD7032_TESTCNT0 = 0x3E,
+ LD7032_VCC_R_SEL = 0x3F,
+ LD7032_PRE_C_SELECT = 0x44,
+ LD7032_ROW_OVERLAP = 0x48,
+ LD7032_S_SLEEP_TIMER = 0xC0,
+ LD7032_S_SLEEP_START = 0xC2,
+ LD7032_S_STEP_TIMER = 0xC3,
+ LD7032_S_STEP_UNIT = 0xC4,
+ LD7032_S_CONDITION = 0xCC,
+ LD7032_S_START_STOP = 0xCD,
+ LD7032_S_SELECT = 0xCE,
+ LD7032_TESTCNT1 = 0xF0, //-0xFF
+} ld7032_opcodes;
\ No newline at end of file
diff --git a/drivers/painter/tft_panel/qp_tft_panel.c b/drivers/painter/tft_panel/qp_tft_panel.c
index 16dba9d6a639..c8e33343d444 100644
--- a/drivers/painter/tft_panel/qp_tft_panel.c
+++ b/drivers/painter/tft_panel/qp_tft_panel.c
@@ -90,7 +90,7 @@ bool qp_tft_panel_pixdata(painter_device_t device, const void *pixel_data, uint3
bool qp_tft_panel_palette_convert_rgb565_swapped(painter_device_t device, int16_t palette_size, qp_pixel_t *palette) {
for (int16_t i = 0; i < palette_size; ++i) {
- RGB rgb = hsv_to_rgb_nocie((HSV){palette[i].hsv888.h, palette[i].hsv888.s, palette[i].hsv888.v});
+ rgb_t rgb = hsv_to_rgb_nocie((hsv_t){palette[i].hsv888.h, palette[i].hsv888.s, palette[i].hsv888.v});
uint16_t rgb565 = (((uint16_t)rgb.r) >> 3) << 11 | (((uint16_t)rgb.g) >> 2) << 5 | (((uint16_t)rgb.b) >> 3);
palette[i].rgb565 = __builtin_bswap16(rgb565);
}
@@ -99,7 +99,7 @@ bool qp_tft_panel_palette_convert_rgb565_swapped(painter_device_t device, int16_
bool qp_tft_panel_palette_convert_rgb888(painter_device_t device, int16_t palette_size, qp_pixel_t *palette) {
for (int16_t i = 0; i < palette_size; ++i) {
- RGB rgb = hsv_to_rgb_nocie((HSV){palette[i].hsv888.h, palette[i].hsv888.s, palette[i].hsv888.v});
+ rgb_t rgb = hsv_to_rgb_nocie((hsv_t){palette[i].hsv888.h, palette[i].hsv888.s, palette[i].hsv888.v});
palette[i].rgb888.r = rgb.r;
palette[i].rgb888.g = rgb.g;
palette[i].rgb888.b = rgb.b;
diff --git a/drivers/sensors/adns5050.c b/drivers/sensors/adns5050.c
index 97daa8db0996..1768c9f3b4a2 100644
--- a/drivers/sensors/adns5050.c
+++ b/drivers/sensors/adns5050.c
@@ -21,6 +21,7 @@
#include "wait.h"
#include "debug.h"
#include "gpio.h"
+#include "pointing_device_internal.h"
// Registers
// clang-format off
@@ -45,6 +46,15 @@
#define REG_MOTION_BURST 0x63
// clang-format on
+const pointing_device_driver_t adns5050_pointing_device_driver = {
+ .init = adns5050_init,
+ .get_report = adns5050_get_report,
+ .set_cpi = adns5050_set_cpi,
+ .get_cpi = adns5050_get_cpi,
+};
+
+static bool powered_down = false;
+
void adns5050_init(void) {
// Initialize the ADNS serial pins.
gpio_set_pin_output(ADNS5050_SCLK_PIN);
@@ -59,6 +69,8 @@ void adns5050_init(void) {
// this ensures that the adns is actuall ready after reset.
wait_ms(55);
+ powered_down = false;
+
// read a burst from the adns and then discard it.
// gets the adns ready for write commands
// (for example, setting the dpi).
@@ -163,6 +175,10 @@ report_adns5050_t adns5050_read_burst(void) {
data.dx = 0;
data.dy = 0;
+ if (powered_down) {
+ return data;
+ }
+
adns5050_serial_write(REG_MOTION_BURST);
// We don't need a minimum tSRAD here. That's because a 4ms wait time is
@@ -211,3 +227,22 @@ bool adns5050_check_signature(void) {
return (pid == 0x12 && rid == 0x01 && pid2 == 0x26);
}
+
+void adns5050_power_down(void) {
+ if (!powered_down) {
+ powered_down = true;
+ adns5050_write_reg(REG_MOUSE_CONTROL, 0b10);
+ }
+}
+
+report_mouse_t adns5050_get_report(report_mouse_t mouse_report) {
+ report_adns5050_t data = adns5050_read_burst();
+
+ if (data.dx != 0 || data.dy != 0) {
+ pd_dprintf("Raw ] X: %d, Y: %d\n", data.dx, data.dy);
+ mouse_report.x = (mouse_xy_report_t)data.dx;
+ mouse_report.y = (mouse_xy_report_t)data.dy;
+ }
+
+ return mouse_report;
+}
diff --git a/drivers/sensors/adns5050.h b/drivers/sensors/adns5050.h
index 8ef0f7cc7ce3..4dfcbc3c70d8 100644
--- a/drivers/sensors/adns5050.h
+++ b/drivers/sensors/adns5050.h
@@ -21,6 +21,7 @@
#include
#include
+#include "pointing_device.h"
// CPI values
// clang-format off
@@ -69,6 +70,8 @@ typedef struct {
int8_t dy;
} report_adns5050_t;
+const pointing_device_driver_t adns5050_pointing_device_driver;
+
// A bunch of functions to implement the ADNS5050-specific serial protocol.
// Note that the "serial.h" driver is insufficient, because it does not
// manually manipulate a serial clock signal.
@@ -83,3 +86,5 @@ void adns5050_set_cpi(uint16_t cpi);
uint16_t adns5050_get_cpi(void);
int8_t convert_twoscomp(uint8_t data);
bool adns5050_check_signature(void);
+void adns5050_power_down(void);
+report_mouse_t adns5050_get_report(report_mouse_t mouse_report);
diff --git a/drivers/sensors/adns9800.c b/drivers/sensors/adns9800.c
index f34529ee90dd..0dbc528351c2 100644
--- a/drivers/sensors/adns9800.c
+++ b/drivers/sensors/adns9800.c
@@ -15,7 +15,6 @@
*/
#include "spi_master.h"
-#include "adns9800_srom_A6.h"
#include "adns9800.h"
#include "wait.h"
@@ -67,16 +66,32 @@
#define REG_SROM_Load_Burst 0x62
#define REG_Pixel_Burst 0x64
-#define MIN_CPI 200
-#define MAX_CPI 8200
-#define CPI_STEP 200
-#define CLAMP_CPI(value) value MAX_CPI ? MAX_CPI : value
-#define US_BETWEEN_WRITES 120
-#define US_BETWEEN_READS 20
-#define US_BEFORE_MOTION 100
-#define MSB1 0x80
+#define MIN_CPI 200
+#define MAX_CPI 8200
+#define CPI_STEP 200
+#define CLAMP_CPI(value) value MAX_CPI ? MAX_CPI : value
+#define US_BETWEEN_WRITES 120
+#define US_BETWEEN_READS 20
+#define US_DELAY_AFTER_ADDR 100
+#define US_BEFORE_MOTION 100
+#define MSB1 0x80
// clang-format on
+const pointing_device_driver_t adns9800_pointing_device_driver = {
+ .init = adns9800_init,
+ .get_report = adns9800_get_report_driver,
+ .set_cpi = adns9800_set_cpi,
+ .get_cpi = adns9800_get_cpi,
+};
+
+uint16_t __attribute__((weak)) adns9800_srom_get_length(void) {
+ return 0;
+}
+
+uint8_t __attribute__((weak)) adns9800_srom_get_byte(uint16_t position) {
+ return 0;
+}
+
void adns9800_spi_start(void) {
spi_start(ADNS9800_CS_PIN, false, ADNS9800_SPI_MODE, ADNS9800_SPI_DIVISOR);
}
@@ -92,6 +107,7 @@ void adns9800_write(uint8_t reg_addr, uint8_t data) {
uint8_t adns9800_read(uint8_t reg_addr) {
adns9800_spi_start();
spi_write(reg_addr & 0x7f);
+ wait_us(US_DELAY_AFTER_ADDR);
uint8_t data = spi_read();
spi_stop();
wait_us(US_BETWEEN_READS);
@@ -115,36 +131,47 @@ void adns9800_init(void) {
adns9800_read(REG_Delta_Y_L);
adns9800_read(REG_Delta_Y_H);
- // upload firmware
+ if (adns9800_srom_get_length() != 0) {
+ // upload firmware
- // 3k firmware mode
- adns9800_write(REG_Configuration_IV, 0x02);
+ // 3k firmware mode
+ adns9800_write(REG_Configuration_IV, 0x02);
- // enable initialisation
- adns9800_write(REG_SROM_Enable, 0x1d);
+ // enable initialisation
+ adns9800_write(REG_SROM_Enable, 0x1d);
- // wait a frame
- wait_ms(10);
+ // wait a frame
+ wait_ms(10);
- // start SROM download
- adns9800_write(REG_SROM_Enable, 0x18);
+ // start SROM download
+ adns9800_write(REG_SROM_Enable, 0x18);
- // write the SROM file
+ // write the SROM file
- adns9800_spi_start();
-
- spi_write(REG_SROM_Load_Burst | 0x80);
- wait_us(15);
+ adns9800_spi_start();
- // send all bytes of the firmware
- for (uint16_t i = 0; i < FIRMWARE_LENGTH; i++) {
- spi_write(pgm_read_byte(firmware_data + i));
+ spi_write(REG_SROM_Load_Burst | 0x80);
wait_us(15);
- }
- spi_stop();
+ // send all bytes of the firmware
+ for (uint16_t i = 0; i < adns9800_srom_get_length(); i++) {
+ spi_write(adns9800_srom_get_byte(i));
+ wait_us(15);
+ }
- wait_ms(10);
+ spi_stop();
+
+ wait_ms(10);
+ } else {
+ // write reset value to REG_Configuration_IV
+ adns9800_write(REG_Configuration_IV, 0x0);
+
+ // write reset value to REG_SROM_Enable
+ adns9800_write(REG_SROM_Enable, 0x0);
+
+ // wait a frame
+ wait_ms(10);
+ }
// enable laser
uint8_t laser_ctrl0 = adns9800_read(REG_LASER_CTRL0);
@@ -216,3 +243,12 @@ report_adns9800_t adns9800_get_report(void) {
return report;
}
+
+report_mouse_t adns9800_get_report_driver(report_mouse_t mouse_report) {
+ report_adns9800_t sensor_report = adns9800_get_report();
+
+ mouse_report.x = CONSTRAIN_HID_XY(sensor_report.x);
+ mouse_report.y = CONSTRAIN_HID_XY(sensor_report.y);
+
+ return mouse_report;
+}
diff --git a/drivers/sensors/adns9800.h b/drivers/sensors/adns9800.h
index 3f1a005789f1..023f31b13235 100644
--- a/drivers/sensors/adns9800.h
+++ b/drivers/sensors/adns9800.h
@@ -17,6 +17,7 @@
#pragma once
#include
+#include "pointing_device.h"
#ifndef ADNS9800_CPI
# define ADNS9800_CPI 1600
@@ -60,6 +61,8 @@ typedef struct {
int16_t y;
} report_adns9800_t;
+const pointing_device_driver_t adns9800_pointing_device_driver;
+
void adns9800_init(void);
config_adns9800_t adns9800_get_config(void);
void adns9800_set_config(config_adns9800_t);
@@ -67,3 +70,4 @@ uint16_t adns9800_get_cpi(void);
void adns9800_set_cpi(uint16_t cpi);
/* Reads and clears the current delta values on the ADNS sensor */
report_adns9800_t adns9800_get_report(void);
+report_mouse_t adns9800_get_report_driver(report_mouse_t mouse_report);
diff --git a/drivers/sensors/adns9800_srom_A6.h b/drivers/sensors/adns9800_srom_A6.h
deleted file mode 100644
index e698a401b949..000000000000
--- a/drivers/sensors/adns9800_srom_A6.h
+++ /dev/null
@@ -1,202 +0,0 @@
-#pragma once
-
-#include "progmem.h"
-
-#define FIRMWARE_LENGTH 3070
-
-// clang-format off
-
-const uint8_t firmware_data[FIRMWARE_LENGTH] PROGMEM = {
- 0x03, 0xA6, 0x68, 0x1E, 0x7D, 0x10, 0x7E, 0x7E, 0x5F, 0x1C, 0xB8, 0xF2, 0x47, 0x0C, 0x7B, 0x74,
- 0x4B, 0x14, 0x8B, 0x75, 0x66, 0x51, 0x0B, 0x8C, 0x76, 0x74, 0x4B, 0x14, 0xAA, 0xD6, 0x0F, 0x9C,
- 0xBA, 0xF6, 0x6E, 0x3F, 0xDD, 0x38, 0xD5, 0x02, 0x80, 0x9B, 0x82, 0x6D, 0x58, 0x13, 0xA4, 0xAB,
- 0xB5, 0xC9, 0x10, 0xA2, 0xC6, 0x0A, 0x7F, 0x5D, 0x19, 0x91, 0xA0, 0xA3, 0xCE, 0xEB, 0x3E, 0xC9,
- 0xF1, 0x60, 0x42, 0xE7, 0x4C, 0xFB, 0x74, 0x6A, 0x56, 0x2E, 0xBF, 0xDD, 0x38, 0xD3, 0x05, 0x88,
- 0x92,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0xDA, 0xA2, 0xA1, 0xC9,
- 0x15, 0xD3, 0x73, 0x03, 0x0E, 0x43, 0xE9, 0x8E, 0x15, 0xF9, 0xBE, 0xC6, 0xC5, 0x8A, 0xE5, 0xC0,
- 0x1E, 0xC2, 0x37, 0x9E, 0x2A, 0x26, 0xA5, 0xA0, 0xBD, 0x24, 0x5F, 0xB9, 0xC1, 0xAB, 0x34, 0x48,
- 0xB9, 0x5D, 0x98, 0xB4, 0x65, 0x18, 0xF3, 0x63, 0x19, 0x44, 0x1B, 0x11, 0x16, 0xFF, 0xDC, 0xF1,
- 0x79, 0x08, 0x86, 0x0F, 0x52, 0x98, 0x73, 0xC4, 0x92, 0x90, 0x2B, 0x47, 0x09, 0xD0, 0x43, 0x6C,
- 0x2F, 0x20, 0xEB, 0xDC, 0xDA, 0xC5, 0x08, 0x7B, 0x94, 0x42, 0x30, 0x6A, 0xC7, 0xDA, 0x8C, 0xC3,
- 0x76, 0xA7, 0xA5, 0xCC, 0x62, 0x13, 0x00, 0x60, 0x31, 0x58, 0x44, 0x9B, 0xF5, 0x64, 0x14, 0xF5,
- 0x11, 0xC5, 0x54, 0x52, 0x83, 0xD4, 0x73, 0x01, 0x16, 0x0E, 0xB3, 0x7A, 0x29, 0x69, 0x35, 0x56,
- 0xD4, 0xEE, 0x8A, 0x17, 0xA2, 0x99, 0x24, 0x9C, 0xD7, 0x8F, 0xDB, 0x55, 0xB5, 0x3E
-};
diff --git a/drivers/sensors/analog_joystick.c b/drivers/sensors/analog_joystick.c
index 15b35a45f25a..93bbaa1b51bc 100644
--- a/drivers/sensors/analog_joystick.c
+++ b/drivers/sensors/analog_joystick.c
@@ -20,6 +20,14 @@
#include "wait.h"
#include "timer.h"
#include
+#include "pointing_device_internal.h"
+
+const pointing_device_driver_t analog_joystick_pointing_device_driver = {
+ .init = analog_joystick_init,
+ .get_report = analog_joystick_get_report,
+ .set_cpi = NULL,
+ .get_cpi = NULL,
+};
// Set Parameters
#ifndef ANALOG_JOYSTICK_AUTO_AXIS
@@ -145,3 +153,16 @@ void analog_joystick_init(void) {
maxAxisValues[1] = yOrigin + 100;
#endif
}
+
+report_mouse_t analog_joystick_get_report(report_mouse_t mouse_report) {
+ report_analog_joystick_t data = analog_joystick_read();
+
+ pd_dprintf("Raw ] X: %d, Y: %d\n", data.x, data.y);
+
+ mouse_report.x = data.x;
+ mouse_report.y = data.y;
+
+ mouse_report.buttons = pointing_device_handle_buttons(mouse_report.buttons, data.button, POINTING_DEVICE_BUTTON1);
+
+ return mouse_report;
+}
diff --git a/drivers/sensors/analog_joystick.h b/drivers/sensors/analog_joystick.h
index 6892a08817f2..c84da83db13b 100644
--- a/drivers/sensors/analog_joystick.h
+++ b/drivers/sensors/analog_joystick.h
@@ -18,6 +18,7 @@
#include
#include
+#include "pointing_device.h"
#ifndef ANALOG_JOYSTICK_X_AXIS_PIN
# error No pin specified for X Axis
@@ -42,6 +43,8 @@
# define ANALOG_JOYSTICK_SPEED_MAX 2
#endif
+const pointing_device_driver_t analog_joystick_pointing_device_driver;
+
typedef struct {
int8_t x;
int8_t y;
@@ -49,3 +52,4 @@ typedef struct {
} report_analog_joystick_t;
report_analog_joystick_t analog_joystick_read(void);
void analog_joystick_init(void);
+report_mouse_t analog_joystick_get_report(report_mouse_t mouse_report);
diff --git a/drivers/sensors/azoteq_iqs5xx.c b/drivers/sensors/azoteq_iqs5xx.c
index 367873eb0624..1bb64f198446 100644
--- a/drivers/sensors/azoteq_iqs5xx.c
+++ b/drivers/sensors/azoteq_iqs5xx.c
@@ -98,6 +98,13 @@
#define AZOTEQ_IQS5XX_INCH_TO_RESOLUTION_Y(inch) (DIVIDE_UNSIGNED_ROUND((inch) * (uint32_t)AZOTEQ_IQS5XX_HEIGHT_MM * 10, 254))
#define AZOTEQ_IQS5XX_RESOLUTION_Y_TO_INCH(px) (DIVIDE_UNSIGNED_ROUND((px) * (uint32_t)254, AZOTEQ_IQS5XX_HEIGHT_MM * 10))
+const pointing_device_driver_t azoteq_iqs5xx_pointing_device_driver = {
+ .init = azoteq_iqs5xx_init,
+ .get_report = azoteq_iqs5xx_get_report,
+ .set_cpi = azoteq_iqs5xx_set_cpi,
+ .get_cpi = azoteq_iqs5xx_get_cpi,
+};
+
static uint16_t azoteq_iqs5xx_product_number = AZOTEQ_IQS5XX_UNKNOWN;
static struct {
@@ -312,3 +319,105 @@ void azoteq_iqs5xx_setup_resolution(void) {
azoteq_iqs5xx_device_resolution_t.resolution_y = AZOTEQ_IQS5XX_RESOLUTION_Y;
#endif
}
+
+static i2c_status_t azoteq_iqs5xx_init_status = 1;
+
+void azoteq_iqs5xx_init(void) {
+ i2c_init();
+ azoteq_iqs5xx_wake();
+ azoteq_iqs5xx_reset_suspend(true, false, true);
+ wait_ms(100);
+ azoteq_iqs5xx_wake();
+ if (azoteq_iqs5xx_get_product() != AZOTEQ_IQS5XX_UNKNOWN) {
+ azoteq_iqs5xx_setup_resolution();
+ azoteq_iqs5xx_init_status = azoteq_iqs5xx_set_report_rate(AZOTEQ_IQS5XX_REPORT_RATE, AZOTEQ_IQS5XX_ACTIVE, false);
+ azoteq_iqs5xx_init_status |= azoteq_iqs5xx_set_event_mode(false, false);
+ azoteq_iqs5xx_init_status |= azoteq_iqs5xx_set_reati(true, false);
+#if defined(AZOTEQ_IQS5XX_ROTATION_90)
+ azoteq_iqs5xx_init_status |= azoteq_iqs5xx_set_xy_config(false, true, true, true, false);
+#elif defined(AZOTEQ_IQS5XX_ROTATION_180)
+ azoteq_iqs5xx_init_status |= azoteq_iqs5xx_set_xy_config(true, true, false, true, false);
+#elif defined(AZOTEQ_IQS5XX_ROTATION_270)
+ azoteq_iqs5xx_init_status |= azoteq_iqs5xx_set_xy_config(true, false, true, true, false);
+#else
+ azoteq_iqs5xx_init_status |= azoteq_iqs5xx_set_xy_config(false, false, false, true, false);
+#endif
+ azoteq_iqs5xx_init_status |= azoteq_iqs5xx_set_gesture_config(true);
+ wait_ms(AZOTEQ_IQS5XX_REPORT_RATE + 1);
+ }
+};
+
+report_mouse_t azoteq_iqs5xx_get_report(report_mouse_t mouse_report) {
+ report_mouse_t temp_report = {0};
+ static uint8_t previous_button_state = 0;
+ static uint8_t read_error_count = 0;
+
+ if (azoteq_iqs5xx_init_status == I2C_STATUS_SUCCESS) {
+ azoteq_iqs5xx_base_data_t base_data = {0};
+#if !defined(POINTING_DEVICE_MOTION_PIN)
+ azoteq_iqs5xx_wake();
+#endif
+ i2c_status_t status = azoteq_iqs5xx_get_base_data(&base_data);
+ bool ignore_movement = false;
+
+ if (status == I2C_STATUS_SUCCESS) {
+ // pd_dprintf("IQS5XX - previous cycle time: %d \n", base_data.previous_cycle_time);
+ read_error_count = 0;
+ if (base_data.gesture_events_0.single_tap || base_data.gesture_events_0.press_and_hold) {
+ pd_dprintf("IQS5XX - Single tap/hold.\n");
+ temp_report.buttons = pointing_device_handle_buttons(temp_report.buttons, true, POINTING_DEVICE_BUTTON1);
+ } else if (base_data.gesture_events_1.two_finger_tap) {
+ pd_dprintf("IQS5XX - Two finger tap.\n");
+ temp_report.buttons = pointing_device_handle_buttons(temp_report.buttons, true, POINTING_DEVICE_BUTTON2);
+ } else if (base_data.gesture_events_0.swipe_x_neg) {
+ pd_dprintf("IQS5XX - X-.\n");
+ temp_report.buttons = pointing_device_handle_buttons(temp_report.buttons, true, POINTING_DEVICE_BUTTON4);
+ ignore_movement = true;
+ } else if (base_data.gesture_events_0.swipe_x_pos) {
+ pd_dprintf("IQS5XX - X+.\n");
+ temp_report.buttons = pointing_device_handle_buttons(temp_report.buttons, true, POINTING_DEVICE_BUTTON5);
+ ignore_movement = true;
+ } else if (base_data.gesture_events_0.swipe_y_neg) {
+ pd_dprintf("IQS5XX - Y-.\n");
+ temp_report.buttons = pointing_device_handle_buttons(temp_report.buttons, true, POINTING_DEVICE_BUTTON6);
+ ignore_movement = true;
+ } else if (base_data.gesture_events_0.swipe_y_pos) {
+ pd_dprintf("IQS5XX - Y+.\n");
+ temp_report.buttons = pointing_device_handle_buttons(temp_report.buttons, true, POINTING_DEVICE_BUTTON3);
+ ignore_movement = true;
+ } else if (base_data.gesture_events_1.zoom) {
+ if (AZOTEQ_IQS5XX_COMBINE_H_L_BYTES(base_data.x.h, base_data.x.l) < 0) {
+ pd_dprintf("IQS5XX - Zoom out.\n");
+ temp_report.buttons = pointing_device_handle_buttons(temp_report.buttons, true, POINTING_DEVICE_BUTTON7);
+ } else if (AZOTEQ_IQS5XX_COMBINE_H_L_BYTES(base_data.x.h, base_data.x.l) > 0) {
+ pd_dprintf("IQS5XX - Zoom in.\n");
+ temp_report.buttons = pointing_device_handle_buttons(temp_report.buttons, true, POINTING_DEVICE_BUTTON8);
+ }
+ } else if (base_data.gesture_events_1.scroll) {
+ pd_dprintf("IQS5XX - Scroll.\n");
+ temp_report.h = CONSTRAIN_HID(AZOTEQ_IQS5XX_COMBINE_H_L_BYTES(base_data.x.h, base_data.x.l));
+ temp_report.v = CONSTRAIN_HID(AZOTEQ_IQS5XX_COMBINE_H_L_BYTES(base_data.y.h, base_data.y.l));
+ }
+ if (base_data.number_of_fingers == 1 && !ignore_movement) {
+ temp_report.x = CONSTRAIN_HID_XY(AZOTEQ_IQS5XX_COMBINE_H_L_BYTES(base_data.x.h, base_data.x.l));
+ temp_report.y = CONSTRAIN_HID_XY(AZOTEQ_IQS5XX_COMBINE_H_L_BYTES(base_data.y.h, base_data.y.l));
+ }
+
+ previous_button_state = temp_report.buttons;
+
+ } else {
+ if (read_error_count > 10) {
+ read_error_count = 0;
+ previous_button_state = 0;
+ } else {
+ read_error_count++;
+ }
+ temp_report.buttons = previous_button_state;
+ pd_dprintf("IQS5XX - get report failed: %d \n", status);
+ }
+ } else {
+ pd_dprintf("IQS5XX - Init failed: %d \n", azoteq_iqs5xx_init_status);
+ }
+
+ return temp_report;
+}
diff --git a/drivers/sensors/azoteq_iqs5xx.h b/drivers/sensors/azoteq_iqs5xx.h
index 704ec2bab3bd..4190fe470c77 100644
--- a/drivers/sensors/azoteq_iqs5xx.h
+++ b/drivers/sensors/azoteq_iqs5xx.h
@@ -176,6 +176,8 @@ typedef struct {
# define POINTING_DEVICE_TASK_THROTTLE_MS AZOTEQ_IQS5XX_REPORT_RATE
#endif
+const pointing_device_driver_t azoteq_iqs5xx_pointing_device_driver;
+
void azoteq_iqs5xx_init(void);
i2c_status_t azoteq_iqs5xx_wake(void);
report_mouse_t azoteq_iqs5xx_get_report(report_mouse_t mouse_report);
diff --git a/drivers/sensors/cirque_pinnacle.c b/drivers/sensors/cirque_pinnacle.c
index 9afc9df80444..893cb98bf058 100644
--- a/drivers/sensors/cirque_pinnacle.c
+++ b/drivers/sensors/cirque_pinnacle.c
@@ -4,6 +4,7 @@
// refer to documentation: Gen2 and Gen3 (Pinnacle ASIC) at https://www.cirque.com/documentation
#include "cirque_pinnacle.h"
+#include "cirque_pinnacle_gestures.h"
#include "wait.h"
#include "timer.h"
@@ -350,3 +351,144 @@ pinnacle_data_t cirque_pinnacle_read_data(void) {
result.valid = true;
return result;
}
+
+#ifdef POINTING_DEVICE_GESTURES_CURSOR_GLIDE_ENABLE
+static bool cursor_glide_enable = true;
+
+static cursor_glide_context_t glide = {.config = {
+ .coef = 102, /* Good default friction coef */
+ .interval = 10, /* 100sps */
+ .trigger_px = 10, /* Default threshold in case of hover, set to 0 if you'd like */
+ }};
+
+void cirque_pinnacle_enable_cursor_glide(bool enable) {
+ cursor_glide_enable = enable;
+}
+
+void cirque_pinnacle_configure_cursor_glide(float trigger_px) {
+ glide.config.trigger_px = trigger_px;
+}
+#endif
+
+#if CIRQUE_PINNACLE_POSITION_MODE
+
+# ifdef POINTING_DEVICE_AUTO_MOUSE_ENABLE
+static bool is_touch_down;
+
+bool auto_mouse_activation(report_mouse_t mouse_report) {
+ return is_touch_down || mouse_report.x != 0 || mouse_report.y != 0 || mouse_report.h != 0 || mouse_report.v != 0 || mouse_report.buttons;
+}
+# endif
+
+report_mouse_t cirque_pinnacle_get_report(report_mouse_t mouse_report) {
+ uint16_t scale = cirque_pinnacle_get_scale();
+ pinnacle_data_t touchData = cirque_pinnacle_read_data();
+ mouse_xy_report_t report_x = 0, report_y = 0;
+ static uint16_t x = 0, y = 0, last_scale = 0;
+
+# if defined(CIRQUE_PINNACLE_TAP_ENABLE)
+ mouse_report.buttons = pointing_device_handle_buttons(mouse_report.buttons, false, POINTING_DEVICE_BUTTON1);
+# endif
+# ifdef POINTING_DEVICE_GESTURES_CURSOR_GLIDE_ENABLE
+ cursor_glide_t glide_report = {0};
+
+ if (cursor_glide_enable) {
+ glide_report = cursor_glide_check(&glide);
+ }
+# endif
+
+ if (!touchData.valid) {
+# ifdef POINTING_DEVICE_GESTURES_CURSOR_GLIDE_ENABLE
+ if (cursor_glide_enable && glide_report.valid) {
+ report_x = glide_report.dx;
+ report_y = glide_report.dy;
+ goto mouse_report_update;
+ }
+# endif
+ return mouse_report;
+ }
+
+ if (touchData.touchDown) {
+ pd_dprintf("cirque_pinnacle touchData x=%4d y=%4d z=%2d\n", touchData.xValue, touchData.yValue, touchData.zValue);
+ }
+
+# ifdef POINTING_DEVICE_AUTO_MOUSE_ENABLE
+ is_touch_down = touchData.touchDown;
+# endif
+
+ // Scale coordinates to arbitrary X, Y resolution
+ cirque_pinnacle_scale_data(&touchData, scale, scale);
+
+ if (!cirque_pinnacle_gestures(&mouse_report, touchData)) {
+ if (last_scale && scale == last_scale && x && y && touchData.xValue && touchData.yValue) {
+ report_x = CONSTRAIN_HID_XY((int16_t)(touchData.xValue - x));
+ report_y = CONSTRAIN_HID_XY((int16_t)(touchData.yValue - y));
+ }
+ x = touchData.xValue;
+ y = touchData.yValue;
+ last_scale = scale;
+
+# ifdef POINTING_DEVICE_GESTURES_CURSOR_GLIDE_ENABLE
+ if (cursor_glide_enable) {
+ if (touchData.touchDown) {
+ cursor_glide_update(&glide, report_x, report_y, touchData.zValue);
+ } else if (!glide_report.valid) {
+ glide_report = cursor_glide_start(&glide);
+ if (glide_report.valid) {
+ report_x = glide_report.dx;
+ report_y = glide_report.dy;
+ }
+ }
+ }
+# endif
+ }
+
+# ifdef POINTING_DEVICE_GESTURES_CURSOR_GLIDE_ENABLE
+mouse_report_update:
+# endif
+ mouse_report.x = report_x;
+ mouse_report.y = report_y;
+
+ return mouse_report;
+}
+
+uint16_t cirque_pinnacle_get_cpi(void) {
+ return CIRQUE_PINNACLE_PX_TO_INCH(cirque_pinnacle_get_scale());
+}
+void cirque_pinnacle_set_cpi(uint16_t cpi) {
+ cirque_pinnacle_set_scale(CIRQUE_PINNACLE_INCH_TO_PX(cpi));
+}
+
+// clang-format off
+const pointing_device_driver_t cirque_pinnacle_pointing_device_driver = {
+ .init = cirque_pinnacle_init,
+ .get_report = cirque_pinnacle_get_report,
+ .set_cpi = cirque_pinnacle_set_cpi,
+ .get_cpi = cirque_pinnacle_get_cpi
+};
+// clang-format on
+#else
+report_mouse_t cirque_pinnacle_get_report(report_mouse_t mouse_report) {
+ pinnacle_data_t touchData = cirque_pinnacle_read_data();
+
+ // Scale coordinates to arbitrary X, Y resolution
+ cirque_pinnacle_scale_data(&touchData, cirque_pinnacle_get_scale(), cirque_pinnacle_get_scale());
+
+ if (touchData.valid) {
+ mouse_report.buttons = touchData.buttons;
+ mouse_report.x = CONSTRAIN_HID_XY(touchData.xDelta);
+ mouse_report.y = CONSTRAIN_HID_XY(touchData.yDelta);
+ mouse_report.v = touchData.wheelCount;
+ }
+ return mouse_report;
+}
+
+// clang-format off
+const pointing_device_driver_t cirque_pinnacle_pointing_device_driver = {
+ .init = cirque_pinnacle_init,
+ .get_report = cirque_pinnacle_get_report,
+ .set_cpi = cirque_pinnacle_set_scale,
+ .get_cpi = cirque_pinnacle_get_scale
+};
+// clang-format on
+#endif
diff --git a/drivers/sensors/cirque_pinnacle.h b/drivers/sensors/cirque_pinnacle.h
index 8717b3299111..1a17e539a402 100644
--- a/drivers/sensors/cirque_pinnacle.h
+++ b/drivers/sensors/cirque_pinnacle.h
@@ -6,6 +6,7 @@
#include
#include
#include "pointing_device_internal.h"
+#include "pointing_device.h"
#ifndef CIRQUE_PINNACLE_TIMEOUT
# define CIRQUE_PINNACLE_TIMEOUT 20 // I2C timeout in milliseconds
@@ -109,6 +110,10 @@ typedef struct {
#endif
} pinnacle_data_t;
+#define cirque_pinnacle_i2c_pointing_device_driver cirque_pinnacle_pointing_device_driver
+#define cirque_pinnacle_spi_pointing_device_driver cirque_pinnacle_pointing_device_driver
+const pointing_device_driver_t cirque_pinnacle_pointing_device_driver;
+
void cirque_pinnacle_init(void);
void cirque_pinnacle_calibrate(void);
void cirque_pinnacle_cursor_smoothing(bool enable);
@@ -116,3 +121,6 @@ pinnacle_data_t cirque_pinnacle_read_data(void);
void cirque_pinnacle_scale_data(pinnacle_data_t* coordinates, uint16_t xResolution, uint16_t yResolution);
uint16_t cirque_pinnacle_get_scale(void);
void cirque_pinnacle_set_scale(uint16_t scale);
+uint16_t cirque_pinnacle_get_cpi(void);
+void cirque_pinnacle_set_cpi(uint16_t cpi);
+report_mouse_t cirque_pinnacle_get_report(report_mouse_t mouse_report);
diff --git a/drivers/sensors/cirque_pinnacle_gestures.h b/drivers/sensors/cirque_pinnacle_gestures.h
index d2aa206b2be6..1412c86f7ebd 100644
--- a/drivers/sensors/cirque_pinnacle_gestures.h
+++ b/drivers/sensors/cirque_pinnacle_gestures.h
@@ -28,7 +28,7 @@ typedef struct {
# ifndef CIRQUE_PINNACLE_TAPPING_TERM
# include "action.h"
# include "action_tapping.h"
-# define CIRQUE_PINNACLE_TAPPING_TERM GET_TAPPING_TERM(KC_BTN1, &(keyrecord_t){})
+# define CIRQUE_PINNACLE_TAPPING_TERM GET_TAPPING_TERM(QK_MOUSE_BUTTON_1, &(keyrecord_t){})
# endif
# ifndef CIRQUE_PINNACLE_TOUCH_DEBOUNCE
# define CIRQUE_PINNACLE_TOUCH_DEBOUNCE (CIRQUE_PINNACLE_TAPPING_TERM * 8)
diff --git a/drivers/sensors/paw3204.c b/drivers/sensors/paw3204.c
index 28c47522ed55..475821f175c0 100644
--- a/drivers/sensors/paw3204.c
+++ b/drivers/sensors/paw3204.c
@@ -20,6 +20,7 @@
#include "wait.h"
#include "debug.h"
#include "gpio.h"
+#include "pointing_device_internal.h"
#define REG_PID1 0x00
#define REG_PID2 0x01
@@ -50,6 +51,13 @@ void paw3204_serial_write(uint8_t reg_addr);
uint8_t paw3204_read_reg(uint8_t reg_addr);
void paw3204_write_reg(uint8_t reg_addr, uint8_t data);
+const pointing_device_driver_t paw3204_pointing_device_driver = {
+ .init = paw3204_init,
+ .get_report = paw3204_get_report,
+ .set_cpi = paw3204_set_cpi,
+ .get_cpi = paw3204_get_cpi,
+};
+
void paw3204_init(void) {
gpio_set_pin_output(PAW3204_SCLK_PIN); // setclockpin to output
gpio_set_pin_input_high(PAW3204_SDIO_PIN); // set datapin input high
@@ -170,3 +178,15 @@ uint16_t paw3204_get_cpi(void) {
uint8_t read_pid_paw3204(void) {
return paw3204_read_reg(REG_PID1);
}
+
+report_mouse_t paw3204_get_report(report_mouse_t mouse_report) {
+ report_paw3204_t data = paw3204_read();
+ if (data.isMotion) {
+ pd_dprintf("Raw ] X: %d, Y: %d\n", data.x, data.y);
+
+ mouse_report.x = data.x;
+ mouse_report.y = data.y;
+ }
+
+ return mouse_report;
+}
diff --git a/drivers/sensors/paw3204.h b/drivers/sensors/paw3204.h
index 7f487d90dcea..a4bb8e16a676 100644
--- a/drivers/sensors/paw3204.h
+++ b/drivers/sensors/paw3204.h
@@ -18,6 +18,7 @@
#include
#include
+#include "pointing_device.h"
#ifndef PAW3204_SCLK_PIN
# ifdef POINTING_DEVICE_SCLK_PIN
@@ -40,6 +41,8 @@ typedef struct {
bool isMotion;
} report_paw3204_t;
+const pointing_device_driver_t paw3204_pointing_device_driver;
+
/**
* @brief Initializes the sensor so it is in a working state and ready to
* be polled for data.
@@ -74,3 +77,5 @@ void paw3204_set_cpi(uint16_t cpi);
* @return uint16_t Current CPI value of the sensor
*/
uint16_t paw3204_get_cpi(void);
+
+report_mouse_t paw3204_get_report(report_mouse_t mouse_report);
diff --git a/drivers/sensors/pimoroni_trackball.c b/drivers/sensors/pimoroni_trackball.c
index 9c6d26d73de7..afbe3d5b77fc 100644
--- a/drivers/sensors/pimoroni_trackball.c
+++ b/drivers/sensors/pimoroni_trackball.c
@@ -33,6 +33,13 @@
static uint16_t precision = 128;
+const pointing_device_driver_t pimoroni_trackball_pointing_device_driver = {
+ .init = pimoroni_trackball_device_init,
+ .get_report = pimoroni_trackball_get_report,
+ .set_cpi = pimoroni_trackball_set_cpi,
+ .get_cpi = pimoroni_trackball_get_cpi,
+};
+
uint16_t pimoroni_trackball_get_cpi(void) {
return (precision * 125);
}
@@ -61,8 +68,8 @@ void pimoroni_trackball_set_rgbw(uint8_t r, uint8_t g, uint8_t b, uint8_t w) {
pd_dprintf("Trackball RGBW i2c_status_t: %d\n", status);
}
-i2c_status_t read_pimoroni_trackball(pimoroni_data_t* data) {
- i2c_status_t status = i2c_read_register(PIMORONI_TRACKBALL_ADDRESS << 1, PIMORONI_TRACKBALL_REG_LEFT, (uint8_t*)data, sizeof(*data), PIMORONI_TRACKBALL_TIMEOUT);
+i2c_status_t read_pimoroni_trackball(pimoroni_data_t *data) {
+ i2c_status_t status = i2c_read_register(PIMORONI_TRACKBALL_ADDRESS << 1, PIMORONI_TRACKBALL_REG_LEFT, (uint8_t *)data, sizeof(*data), PIMORONI_TRACKBALL_TIMEOUT);
#ifdef POINTING_DEVICE_DEBUG
static uint16_t d_timer;
@@ -92,3 +99,50 @@ int16_t pimoroni_trackball_get_offsets(uint8_t negative_dir, uint8_t positive_di
uint16_t magnitude = (scale * offset * offset * precision) >> 7;
return isnegative ? -(int16_t)(magnitude) : (int16_t)(magnitude);
}
+
+mouse_xy_report_t pimoroni_trackball_adapt_values(xy_clamp_range_t *offset) {
+ if (*offset > XY_REPORT_MAX) {
+ *offset -= XY_REPORT_MAX;
+ return (mouse_xy_report_t)XY_REPORT_MAX;
+ } else if (*offset < XY_REPORT_MIN) {
+ *offset += XY_REPORT_MAX;
+ return (mouse_xy_report_t)XY_REPORT_MIN;
+ } else {
+ mouse_xy_report_t temp_return = *offset;
+ *offset = 0;
+ return temp_return;
+ }
+}
+
+report_mouse_t pimoroni_trackball_get_report(report_mouse_t mouse_report) {
+ static uint16_t debounce = 0;
+ static uint8_t error_count = 0;
+ pimoroni_data_t pimoroni_data = {0};
+ static xy_clamp_range_t x_offset = 0, y_offset = 0;
+
+ if (error_count < PIMORONI_TRACKBALL_ERROR_COUNT) {
+ i2c_status_t status = read_pimoroni_trackball(&pimoroni_data);
+
+ if (status == I2C_STATUS_SUCCESS) {
+ error_count = 0;
+
+ if (!(pimoroni_data.click & 128)) {
+ mouse_report.buttons = pointing_device_handle_buttons(mouse_report.buttons, false, POINTING_DEVICE_BUTTON1);
+ if (!debounce) {
+ x_offset += pimoroni_trackball_get_offsets(pimoroni_data.right, pimoroni_data.left, PIMORONI_TRACKBALL_SCALE);
+ y_offset += pimoroni_trackball_get_offsets(pimoroni_data.down, pimoroni_data.up, PIMORONI_TRACKBALL_SCALE);
+ mouse_report.x = pimoroni_trackball_adapt_values(&x_offset);
+ mouse_report.y = pimoroni_trackball_adapt_values(&y_offset);
+ } else {
+ debounce--;
+ }
+ } else {
+ mouse_report.buttons = pointing_device_handle_buttons(mouse_report.buttons, true, POINTING_DEVICE_BUTTON1);
+ debounce = PIMORONI_TRACKBALL_DEBOUNCE_CYCLES;
+ }
+ } else {
+ error_count++;
+ }
+ }
+ return mouse_report;
+}
diff --git a/drivers/sensors/pimoroni_trackball.h b/drivers/sensors/pimoroni_trackball.h
index 749f381bbd6c..1904214a74a7 100644
--- a/drivers/sensors/pimoroni_trackball.h
+++ b/drivers/sensors/pimoroni_trackball.h
@@ -19,6 +19,7 @@
#include
#include "report.h"
#include "i2c_master.h"
+#include "pointing_device.h"
#ifndef PIMORONI_TRACKBALL_ADDRESS
# define PIMORONI_TRACKBALL_ADDRESS 0x0A
@@ -49,9 +50,12 @@ typedef struct {
uint8_t click;
} pimoroni_data_t;
-void pimoroni_trackball_device_init(void);
-void pimoroni_trackball_set_rgbw(uint8_t red, uint8_t green, uint8_t blue, uint8_t white);
-int16_t pimoroni_trackball_get_offsets(uint8_t negative_dir, uint8_t positive_dir, uint8_t scale);
-uint16_t pimoroni_trackball_get_cpi(void);
-void pimoroni_trackball_set_cpi(uint16_t cpi);
-i2c_status_t read_pimoroni_trackball(pimoroni_data_t* data);
+const pointing_device_driver_t pimoroni_trackball_pointing_device_driver;
+
+void pimoroni_trackball_device_init(void);
+void pimoroni_trackball_set_rgbw(uint8_t red, uint8_t green, uint8_t blue, uint8_t white);
+int16_t pimoroni_trackball_get_offsets(uint8_t negative_dir, uint8_t positive_dir, uint8_t scale);
+uint16_t pimoroni_trackball_get_cpi(void);
+void pimoroni_trackball_set_cpi(uint16_t cpi);
+i2c_status_t read_pimoroni_trackball(pimoroni_data_t* data);
+report_mouse_t pimoroni_trackball_get_report(report_mouse_t mouse_report);
diff --git a/drivers/sensors/pmw3320.c b/drivers/sensors/pmw3320.c
index f19fbfd1ab44..74fefd4c53d0 100644
--- a/drivers/sensors/pmw3320.c
+++ b/drivers/sensors/pmw3320.c
@@ -21,6 +21,14 @@
#include "wait.h"
#include "debug.h"
#include "gpio.h"
+#include "pointing_device_internal.h"
+
+const pointing_device_driver_t pmw3320_pointing_device_drivera = {
+ .init = pmw3320_init,
+ .get_report = pmw3320_get_report,
+ .set_cpi = pmw3320_set_cpi,
+ .get_cpi = pmw3320_get_cpi,
+};
void pmw3320_init(void) {
// Initialize sensor serial pins.
@@ -190,3 +198,15 @@ bool pmw3320_check_signature(void) {
return (pid == 0x3b && pid2 == 0xc4);
}
+
+report_mouse_t pmw3320_get_report(report_mouse_t mouse_report) {
+ report_pmw3320_t data = pmw3320_read_burst();
+
+ if (data.dx != 0 || data.dy != 0) {
+ pd_dprintf("Raw ] X: %d, Y: %d\n", data.dx, data.dy);
+ mouse_report.x = (mouse_xy_report_t)data.dx;
+ mouse_report.y = (mouse_xy_report_t)data.dy;
+ }
+
+ return mouse_report;
+}
diff --git a/drivers/sensors/pmw3320.h b/drivers/sensors/pmw3320.h
index a1fd5469196a..cfff25bd8a60 100644
--- a/drivers/sensors/pmw3320.h
+++ b/drivers/sensors/pmw3320.h
@@ -21,6 +21,7 @@
#include
#include
+#include "pointing_device.h"
#define constrain(amt, low, high) ((amt) < (low) ? (low) : ((amt) > (high) ? (high) : (amt)))
@@ -54,6 +55,8 @@ typedef struct {
int8_t dy;
} report_pmw3320_t;
+const pointing_device_driver_t pmw3320_pointing_device_driver;
+
// A bunch of functions to implement the PMW3320-specific serial protocol.
// Mostly taken from ADNS5050 driver.
// Note that the "serial.h" driver is insufficient, because it does not
@@ -69,6 +72,7 @@ void pmw3320_set_cpi(uint16_t cpi);
uint16_t pmw3320_get_cpi(void);
int8_t convert_twoscomp(uint8_t data);
bool pmw3320_check_signature(void);
+report_mouse_t pmw3320_get_report(report_mouse_t mouse_report);
#if !defined(PMW3320_CPI)
# define PMW3320_CPI 1000
diff --git a/drivers/sensors/pmw3360.c b/drivers/sensors/pmw3360.c
index 8408daa9451b..fb710591d3ac 100644
--- a/drivers/sensors/pmw3360.c
+++ b/drivers/sensors/pmw3360.c
@@ -31,265 +31,4 @@ void pmw33xx_set_cpi(uint8_t sensor, uint16_t cpi) {
}
// PID, Inverse PID, SROM version
-const uint8_t pmw33xx_firmware_signature[3] PROGMEM = {0x42, 0xBD, 0x04};
-
-// Firmware Blob for PMW3360
-// clang-format off
-const uint8_t pmw33xx_firmware_data[PMW33XX_FIRMWARE_LENGTH] PROGMEM = {
- 0x01, 0x04, 0x8E, 0x96, 0x6E, 0x77, 0x3E, 0xFE, 0x7E, 0x5F, 0x1D, 0xB8, 0xF2, 0x66, 0x4E, 0xFF,
- 0x5D, 0x19, 0xB0, 0xC2, 0x04, 0x69, 0x54, 0x2A, 0xD6, 0x2E, 0xBF, 0xDD, 0x19, 0xB0, 0xC3, 0xE5,
- 0x29, 0xB1, 0xE0, 0x23, 0xA5, 0xA9, 0xB1, 0xC1, 0x00, 0x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, 0xE3, 0x25,
- 0xA9, 0xB1, 0xC1, 0xE1, 0x40, 0x02, 0x67, 0x4C, 0x1A, 0x97, 0x8D, 0x98, 0x93, 0xA4, 0xAB, 0xD4,
- 0x2A, 0xD6, 0x0F, 0x9C, 0x9B, 0xB4, 0xCB, 0x14, 0xAA, 0xB7, 0xCD, 0xF9, 0x51, 0x20, 0xA3, 0xC4,
- 0xEB, 0x35, 0xC9, 0xF1, 0x60, 0x42, 0x06, 0x8E, 0x7F, 0x7C, 0x7A, 0x76, 0x6E, 0x3F, 0xFC, 0x7A,
- 0x76, 0x6E, 0x5E, 0x3E, 0xFE, 0x7E, 0x5F, 0x3C, 0xDB, 0x15, 0x89, 0x71, 0x41, 0xE1, 0x21, 0xC0,
- 0xE3, 0x44, 0xEB, 0x54, 0x2A, 0xB7, 0xCD, 0xF9, 0x70, 0x62, 0x27, 0xAD, 0xD8, 0x32, 0xC7, 0x0C,
- 0x7B, 0x74, 0x4B, 0x14, 0xAA, 0xB7, 0xEC, 0x3B, 0xD5, 0x28, 0xD2, 0x07, 0x6D, 0x39, 0xD1, 0x20,
- 0xC2, 0xE7, 0x4C, 0x1A, 0x97, 0x8D, 0x98, 0xB2, 0xC7, 0x0C, 0x59, 0x28, 0xF3, 0x9B
-};
+const uint8_t pmw33xx_firmware_signature[2] PROGMEM = {0x42, 0xBD};
diff --git a/drivers/sensors/pmw3389.c b/drivers/sensors/pmw3389.c
index 10e578edac6a..85d2c8a42965 100644
--- a/drivers/sensors/pmw3389.c
+++ b/drivers/sensors/pmw3389.c
@@ -28,285 +28,5 @@ void pmw33xx_set_cpi(uint8_t sensor, uint16_t cpi) {
pmw33xx_write(sensor, REG_Resolution_L, cpival & 0xFF);
}
-// PID, Inverse PID, SROM version
-const uint8_t pmw33xx_firmware_signature[3] PROGMEM = {0x42, 0xBD, 0x04};
-
-// Firmware Blob for PMW3389
-// clang-format off
-const uint8_t pmw33xx_firmware_data[PMW33XX_FIRMWARE_LENGTH] PROGMEM = {
-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, 0x5b, 0x15, 0x89, 0x90, 0x83, 0x84, 0x6b, 0x54,
- 0x0b, 0x75, 0x68, 0x52, 0x07, 0x6d, 0x58, 0x32, 0xc7, 0xed, 0x58, 0x32, 0xc7, 0xed, 0x58,
- 0x32, 0xe6, 0x4e, 0xff, 0x7c, 0x7a, 0x76, 0x6e, 0x3f, 0xdd, 0x38, 0xd3, 0x05, 0x88, 0x92,
- 0xa6, 0xaf, 0xdc, 0x1b, 0xb4, 0xcb, 0xf5, 0x68, 0x52, 0x07, 0x8c, 0x7b, 0x55, 0x09, 0x90,
- 0x83, 0x84, 0x6b, 0x54, 0x2a, 0xb7, 0xec, 0x3b, 0xd5, 0x09, 0x90, 0xa2, 0xc6, 0x0e, 0x7f,
- 0x7c, 0x7a, 0x57, 0x0d, 0x98, 0xb2, 0xc7, 0xed, 0x58, 0x32, 0xc7, 0x0c, 0x7b, 0x74, 0x4b,
- 0x14, 0x8b, 0x94, 0xaa, 0xb7, 0xcd, 0x18, 0x93, 0xa4, 0xca, 0x16, 0xae, 0xbf, 0xdd, 0x19,
- 0xb0, 0xe2, 0x46, 0x0e, 0x7f, 0x5d, 0x19, 0x91, 0x81, 0x80, 0x63, 0x44, 0xeb, 0x35, 0xc9,
- 0x10, 0x83, 0x65, 0x48, 0x12, 0xa6, 0xce, 0x1e, 0x9f, 0xbc, 0xdb, 0x15, 0x89, 0x71, 0x60,
- 0x23, 0xc4, 0xeb, 0x54, 0x2a, 0xb7, 0xec, 0x5a, 0x36, 0xcf, 0x81, 0x10, 0xac, 0x74
-};
-
-// clang-format off
+// PID, Inverse PID
+const uint8_t pmw33xx_firmware_signature[2] PROGMEM = {0x42, 0xBD};
diff --git a/drivers/sensors/pmw3389.h b/drivers/sensors/pmw3389.h
index fafd1e204690..a7028f84b1aa 100644
--- a/drivers/sensors/pmw3389.h
+++ b/drivers/sensors/pmw3389.h
@@ -17,8 +17,6 @@
#define PMW33XX_CPI_MIN 50
#define PMW33XX_CPI_MAX 16000
-#define PMW33XX_FIRMWARE_LENGTH 4094
-
// PMW3389 register addresses
// clang-format off
#define REG_Product_ID 0x00
diff --git a/drivers/sensors/pmw33xx_common.c b/drivers/sensors/pmw33xx_common.c
index 82a7ec32973f..f3285ec49720 100644
--- a/drivers/sensors/pmw33xx_common.c
+++ b/drivers/sensors/pmw33xx_common.c
@@ -15,8 +15,7 @@
#include "spi_master.h"
#include "progmem.h"
-extern const uint8_t pmw33xx_firmware_data[PMW33XX_FIRMWARE_LENGTH] PROGMEM;
-extern const uint8_t pmw33xx_firmware_signature[3] PROGMEM;
+extern const uint8_t pmw33xx_firmware_signature[2] PROGMEM;
static const pin_t cs_pins_left[] = PMW33XX_CS_PINS;
static const pin_t cs_pins_right[] = PMW33XX_CS_PINS_RIGHT;
@@ -27,6 +26,21 @@ static bool in_burst_right[ARRAY_SIZE(cs_pins_right)] = {0};
bool __attribute__((cold)) pmw33xx_upload_firmware(uint8_t sensor);
bool __attribute__((cold)) pmw33xx_check_signature(uint8_t sensor);
+const pointing_device_driver_t pmw33xx_pointing_device_driver = {
+ .init = pmw33xx_init_wrapper,
+ .get_report = pmw33xx_get_report,
+ .set_cpi = pmw33xx_set_cpi_wrapper,
+ .get_cpi = pmw33xx_get_cpi_wrapper,
+};
+
+uint16_t __attribute__((weak)) pmw33xx_srom_get_length(void) {
+ return 0;
+}
+
+uint8_t __attribute__((weak)) pmw33xx_srom_get_byte(uint16_t position) {
+ return 0;
+}
+
void pmw33xx_set_cpi_all_sensors(uint16_t cpi) {
for (uint8_t sensor = 0; sensor < pmw33xx_number_of_sensors; sensor++) {
pmw33xx_set_cpi(sensor, cpi);
@@ -89,10 +103,9 @@ uint8_t pmw33xx_read(uint8_t sensor, uint8_t reg_addr) {
}
bool pmw33xx_check_signature(uint8_t sensor) {
- uint8_t signature_dump[3] = {
+ uint8_t signature_dump[2] = {
pmw33xx_read(sensor, REG_Product_ID),
pmw33xx_read(sensor, REG_Inverse_Product_ID),
- pmw33xx_read(sensor, REG_SROM_ID),
};
return memcmp(pmw33xx_firmware_signature, signature_dump, sizeof(signature_dump)) == 0;
@@ -115,10 +128,12 @@ bool pmw33xx_upload_firmware(uint8_t sensor) {
spi_write(REG_SROM_Load_Burst | 0x80);
wait_us(15);
- for (size_t i = 0; i < PMW33XX_FIRMWARE_LENGTH; i++) {
- spi_write(pgm_read_byte(pmw33xx_firmware_data + i));
+ for (size_t i = 0; i < pmw33xx_srom_get_length(); i++) {
+ spi_write(pmw33xx_srom_get_byte(i));
wait_us(15);
}
+
+ spi_stop();
wait_us(200);
pmw33xx_read(sensor, REG_SROM_ID);
@@ -154,9 +169,13 @@ bool pmw33xx_init(uint8_t sensor) {
pmw33xx_read(sensor, REG_Delta_Y_L);
pmw33xx_read(sensor, REG_Delta_Y_H);
- if (!pmw33xx_upload_firmware(sensor)) {
- pd_dprintf("PMW33XX (%d): firmware upload failed!\n", sensor);
- return false;
+ if (pmw33xx_srom_get_length() != 0) {
+ if (!pmw33xx_upload_firmware(sensor)) {
+ pd_dprintf("PMW33XX (%d): firmware upload failed!\n", sensor);
+ return false;
+ }
+ } else {
+ pd_dprintf("PMW33XX (%d): firmware upload skipped.\n", sensor);
}
spi_stop();
@@ -200,7 +219,7 @@ pmw33xx_report_t pmw33xx_read_burst(uint8_t sensor) {
spi_write(REG_Motion_Burst);
wait_us(35); // waits for tSRAD_MOTBR
- spi_receive((uint8_t*)&report, sizeof(report));
+ spi_receive((uint8_t *)&report, sizeof(report));
// panic recovery, sometimes burst mode works weird.
if (report.motion.w & 0b111) {
@@ -216,3 +235,38 @@ pmw33xx_report_t pmw33xx_read_burst(uint8_t sensor) {
return report;
}
+
+void pmw33xx_init_wrapper(void) {
+ pmw33xx_init(0);
+}
+
+void pmw33xx_set_cpi_wrapper(uint16_t cpi) {
+ pmw33xx_set_cpi(0, cpi);
+}
+
+uint16_t pmw33xx_get_cpi_wrapper(void) {
+ return pmw33xx_get_cpi(0);
+}
+
+report_mouse_t pmw33xx_get_report(report_mouse_t mouse_report) {
+ pmw33xx_report_t report = pmw33xx_read_burst(0);
+ static bool in_motion = false;
+
+ if (report.motion.b.is_lifted) {
+ return mouse_report;
+ }
+
+ if (!report.motion.b.is_motion) {
+ in_motion = false;
+ return mouse_report;
+ }
+
+ if (!in_motion) {
+ in_motion = true;
+ pd_dprintf("PWM3360 (0): starting motion\n");
+ }
+
+ mouse_report.x = CONSTRAIN_HID_XY(report.delta_x);
+ mouse_report.y = CONSTRAIN_HID_XY(report.delta_y);
+ return mouse_report;
+}
diff --git a/drivers/sensors/pmw33xx_common.h b/drivers/sensors/pmw33xx_common.h
index b30ee3d59667..22e35c332750 100644
--- a/drivers/sensors/pmw33xx_common.h
+++ b/drivers/sensors/pmw33xx_common.h
@@ -14,6 +14,7 @@
#include
#include "spi_master.h"
#include "util.h"
+#include "pointing_device.h"
#if defined(POINTING_DEVICE_DRIVER_pmw3360)
# include "pmw3360.h"
@@ -102,6 +103,10 @@ _Static_assert(sizeof((pmw33xx_report_t){0}.motion) == 1, "pmw33xx_report_t.moti
#define CONSTRAIN(amt, low, high) ((amt) < (low) ? (low) : ((amt) > (high) ? (high) : (amt)))
+#define pmw3360_pointing_device_driver pmw33xx_pointing_device_driver;
+#define pmw3389_pointing_device_driver pmw33xx_pointing_device_driver;
+const pointing_device_driver_t pmw33xx_pointing_device_driver;
+
/**
* @brief Initializes the given sensor so it is in a working state and ready to
* be polled for data.
@@ -170,3 +175,8 @@ uint8_t pmw33xx_read(uint8_t sensor, uint8_t reg_addr);
* @return false Write failed, do not proceed operation
*/
bool pmw33xx_write(uint8_t sensor, uint8_t reg_addr, uint8_t data);
+
+void pmw33xx_init_wrapper(void);
+void pmw33xx_set_cpi_wrapper(uint16_t cpi);
+uint16_t pmw33xx_get_cpi_wrapper(void);
+report_mouse_t pmw33xx_get_report(report_mouse_t mouse_report);
diff --git a/drivers/wear_leveling/wear_leveling_flash_spi.c b/drivers/wear_leveling/wear_leveling_flash_spi.c
index 6191f8bf0958..304aed1641fb 100644
--- a/drivers/wear_leveling/wear_leveling_flash_spi.c
+++ b/drivers/wear_leveling/wear_leveling_flash_spi.c
@@ -58,7 +58,7 @@ bool backing_store_read(uint32_t address, backing_store_int_t *value) {
bool backing_store_read_bulk(uint32_t address, backing_store_int_t *values, size_t item_count) {
bs_dprintf("Read ");
uint32_t offset = (WEAR_LEVELING_EXTERNAL_FLASH_BLOCK_OFFSET) * (EXTERNAL_FLASH_BLOCK_SIZE) + address;
- flash_status_t status = flash_read_block(offset, values, sizeof(backing_store_int_t) * item_count);
+ flash_status_t status = flash_read_range(offset, values, sizeof(backing_store_int_t) * item_count);
if (status == FLASH_STATUS_SUCCESS) {
for (size_t i = 0; i < item_count; ++i) {
values[i] = ~values[i];
@@ -88,7 +88,7 @@ bool backing_store_write_bulk(uint32_t address, backing_store_int_t *values, siz
}
// Write out the block
- if (flash_write_block(offset, temp, sizeof(backing_store_int_t) * this_loop) != FLASH_STATUS_SUCCESS) {
+ if (flash_write_range(offset, temp, sizeof(backing_store_int_t) * this_loop) != FLASH_STATUS_SUCCESS) {
return false;
}
diff --git a/drivers/ws2812.c b/drivers/ws2812.c
new file mode 100644
index 000000000000..bf234c6f7dc6
--- /dev/null
+++ b/drivers/ws2812.c
@@ -0,0 +1,15 @@
+// Copyright 2024 QMK
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include "ws2812.h"
+
+#if defined(WS2812_RGBW)
+void ws2812_rgb_to_rgbw(ws2812_led_t *led) {
+ // Determine lowest value in all three colors, put that into
+ // the white channel and then shift all colors by that amount
+ led->w = MIN(led->r, MIN(led->g, led->b));
+ led->r -= led->w;
+ led->g -= led->w;
+ led->b -= led->w;
+}
+#endif
diff --git a/drivers/ws2812.h b/drivers/ws2812.h
index 993cce8ce451..8013e5bd2dd4 100644
--- a/drivers/ws2812.h
+++ b/drivers/ws2812.h
@@ -15,7 +15,7 @@
#pragma once
-#include "quantum/color.h"
+#include "util.h"
/*
* The WS2812 datasheets define T1H 900ns, T0H 350ns, T1L 350ns, T0L 900ns. Hence, by default, these
@@ -62,17 +62,36 @@
# define WS2812_LED_COUNT RGB_MATRIX_LED_COUNT
#endif
+#define WS2812_BYTE_ORDER_RGB 0
+#define WS2812_BYTE_ORDER_GRB 1
+#define WS2812_BYTE_ORDER_BGR 2
+
+#ifndef WS2812_BYTE_ORDER
+# define WS2812_BYTE_ORDER WS2812_BYTE_ORDER_GRB
+#endif
+
+typedef struct PACKED ws2812_led_t {
+#if (WS2812_BYTE_ORDER == WS2812_BYTE_ORDER_GRB)
+ uint8_t g;
+ uint8_t r;
+ uint8_t b;
+#elif (WS2812_BYTE_ORDER == WS2812_BYTE_ORDER_RGB)
+ uint8_t r;
+ uint8_t g;
+ uint8_t b;
+#elif (WS2812_BYTE_ORDER == WS2812_BYTE_ORDER_BGR)
+ uint8_t b;
+ uint8_t g;
+ uint8_t r;
+#endif
+#ifdef WS2812_RGBW
+ uint8_t w;
+#endif
+} ws2812_led_t;
+
void ws2812_init(void);
+void ws2812_set_color(int index, uint8_t red, uint8_t green, uint8_t blue);
+void ws2812_set_color_all(uint8_t red, uint8_t green, uint8_t blue);
+void ws2812_flush(void);
-/* User Interface
- *
- * Input:
- * ledarray: An array of GRB data describing the LED colors
- * number_of_leds: The number of LEDs to write
- *
- * The functions will perform the following actions:
- * - Set the data-out pin as output
- * - Send out the LED data
- * - Wait 50us to reset the LEDs
- */
-void ws2812_setleds(rgb_led_t *ledarray, uint16_t number_of_leds);
+void ws2812_rgb_to_rgbw(ws2812_led_t *led);
diff --git a/keyboards/nuphy/air60_v2/ansi/ansi.h b/keyboards/nuphy/air60_v2/ansi/ansi.h
index a6d98b99752e..820086ed1167 100644
--- a/keyboards/nuphy/air60_v2/ansi/ansi.h
+++ b/keyboards/nuphy/air60_v2/ansi/ansi.h
@@ -175,3 +175,4 @@ typedef struct
uint8_t sleep_enable;
uint8_t retain2;
} user_config_t;
+
diff --git a/keyboards/nuphy/air60_v2/ansi/keyboard.json b/keyboards/nuphy/air60_v2/ansi/keyboard.json
index df68ff4e1078..c34ce5a83df1 100644
--- a/keyboards/nuphy/air60_v2/ansi/keyboard.json
+++ b/keyboards/nuphy/air60_v2/ansi/keyboard.json
@@ -107,18 +107,18 @@
{"matrix": [2, 13], "x": 135, "y": 10, "flags": 4},
{"matrix": [3, 0], "x": 0, "y": 20, "flags": 4},
- {"matrix": [3, 1], "x": 17.5, "y": 20, "flags": 4},
- {"matrix": [3, 2], "x": 27.5, "y": 20, "flags": 4},
- {"matrix": [3, 3], "x": 37.5, "y": 20, "flags": 4},
- {"matrix": [3, 4], "x": 47.5, "y": 20, "flags": 4},
- {"matrix": [3, 5], "x": 57.5, "y": 20, "flags": 4},
- {"matrix": [3, 6], "x": 67.5, "y": 20, "flags": 4},
- {"matrix": [3, 7], "x": 77.5, "y": 20, "flags": 4},
- {"matrix": [3, 8], "x": 87.5, "y": 20, "flags": 4},
- {"matrix": [3, 9], "x": 97.5, "y": 20, "flags": 4},
- {"matrix": [3, 10], "x": 107.5, "y": 20, "flags": 4},
- {"matrix": [3, 11], "x": 117.5, "y": 20, "flags": 4},
- {"matrix": [3, 13], "x": 127.5, "y": 20, "flags": 4},
+ {"matrix": [3, 1], "x": 17, "y": 20, "flags": 4},
+ {"matrix": [3, 2], "x": 27, "y": 20, "flags": 4},
+ {"matrix": [3, 3], "x": 37, "y": 20, "flags": 4},
+ {"matrix": [3, 4], "x": 47, "y": 20, "flags": 4},
+ {"matrix": [3, 5], "x": 57, "y": 20, "flags": 4},
+ {"matrix": [3, 6], "x": 67, "y": 20, "flags": 4},
+ {"matrix": [3, 7], "x": 77, "y": 20, "flags": 4},
+ {"matrix": [3, 8], "x": 87, "y": 20, "flags": 4},
+ {"matrix": [3, 9], "x": 97, "y": 20, "flags": 4},
+ {"matrix": [3, 10], "x": 107, "y": 20, "flags": 4},
+ {"matrix": [3, 11], "x": 117, "y": 20, "flags": 4},
+ {"matrix": [3, 13], "x": 127, "y": 20, "flags": 4},
{"matrix": [4, 0], "x": 0, "y": 30, "flags": 4},
{"matrix": [4, 2], "x": 20, "y": 30, "flags": 4},
@@ -136,9 +136,9 @@
{"matrix": [2, 14], "x": 140, "y": 30, "flags": 4},
{"matrix": [5, 0], "x": 0, "y": 40, "flags": 4},
- {"matrix": [5, 1], "x": 12.5, "y": 40, "flags": 4},
+ {"matrix": [5, 1], "x": 12, "y": 40, "flags": 4},
{"matrix": [5, 2], "x": 25, "y": 40, "flags": 4},
- {"matrix": [5, 6], "x": 65.5, "y": 40, "flags": 4},
+ {"matrix": [5, 6], "x": 65, "y": 40, "flags": 4},
{"matrix": [5, 9], "x": 100, "y": 40, "flags": 4},
{"matrix": [5, 10], "x": 110, "y": 40, "flags": 4},
{"matrix": [5, 14], "x": 120, "y": 40, "flags": 4},
diff --git a/keyboards/nuphy/air60_v2/ansi/rf.c b/keyboards/nuphy/air60_v2/ansi/rf.c
index ec109de1f798..af6e2aed3d63 100644
--- a/keyboards/nuphy/air60_v2/ansi/rf.c
+++ b/keyboards/nuphy/air60_v2/ansi/rf.c
@@ -18,6 +18,7 @@ along with this program. If not, see .
#include "ansi.h"
#include "uart.h" // qmk uart.h
#include "rf_driver.h"
+#include "usb_device_state.h"
USART_MGR_STRUCT Usart_Mgr;
#define RX_SBYTE Usart_Mgr.RXDBuf[0]
@@ -147,7 +148,7 @@ void uart_send_report_func(void)
static uint32_t interval_timer = 0;
if (dev_info.link_mode == LINK_USB) return;
- keyboard_protocol = 1;
+ usb_device_state_set_protocol(USB_PROTOCOL_REPORT);
if (timer_elapsed32(interval_timer) > 50) {
interval_timer = timer_read32();
@@ -223,7 +224,7 @@ void RF_Protocol_Receive(void) {
sync_lost = 0;
if (Usart_Mgr.RXDLen > 4) {
- if((Usart_Mgr.RXDLen - 5) != RX_LEN)
+ if((Usart_Mgr.RXDLen - 5) != RX_LEN)
return;
for (i = 0; i < RX_LEN; i++)
@@ -565,22 +566,22 @@ void UART_Send_Bytes(uint8_t *Buffer, uint32_t Length) {
{
writePinLow(NRF_WAKEUP_PIN);
wait_us(50);
-
+
uart_transmit(Buffer, Length);
-
+
wait_us(50 + Length * 32);
- writePinHigh(NRF_WAKEUP_PIN);
-
- wait_us(200);
- }
+ writePinHigh(NRF_WAKEUP_PIN);
+
+ wait_us(200);
+ }
} else {
writePinLow(NRF_WAKEUP_PIN);
wait_us(50);
-
+
uart_transmit(Buffer, Length);
-
+
wait_us(50 + Length * 32);
- writePinHigh(NRF_WAKEUP_PIN);
+ writePinHigh(NRF_WAKEUP_PIN);
}
}
diff --git a/keyboards/nuphy/air60_v2/ansi/rf_driver.c b/keyboards/nuphy/air60_v2/ansi/rf_driver.c
index 1c0876c00349..6eb4d09ec230 100644
--- a/keyboards/nuphy/air60_v2/ansi/rf_driver.c
+++ b/keyboards/nuphy/air60_v2/ansi/rf_driver.c
@@ -17,6 +17,7 @@ along with this program. If not, see .
#include "host_driver.h"
#include "rf_driver.h"
+#include "usb_device_state.h"
#include "host.h"
#include "ansi.h"
@@ -43,12 +44,12 @@ static uint8_t rf_keyboard_leds(void) {
}
static void rf_send_keyboard(report_keyboard_t *report) {
- keyboard_protocol = 1;
+ usb_device_state_set_protocol(USB_PROTOCOL_REPORT);
uart_send_report_keyboard(report);
}
static void rf_send_nkro(report_nkro_t *report) {
- keyboard_protocol = 1;
+ usb_device_state_set_protocol(USB_PROTOCOL_REPORT);
uart_send_report_nkro(report);
}
diff --git a/keyboards/nuphy/air75_v2/ansi/rf.c b/keyboards/nuphy/air75_v2/ansi/rf.c
index 64f19daa10b1..b28d7a57812a 100644
--- a/keyboards/nuphy/air75_v2/ansi/rf.c
+++ b/keyboards/nuphy/air75_v2/ansi/rf.c
@@ -18,6 +18,7 @@ along with this program. If not, see .
#include "ansi.h"
#include "uart.h" // qmk uart.h
#include "rf_driver.h"
+#include "usb_device_state.h"
USART_MGR_STRUCT Usart_Mgr;
#define RX_SBYTE Usart_Mgr.RXDBuf[0]
@@ -134,7 +135,7 @@ void uart_send_report_func(void)
static uint32_t interval_timer = 0;
if (dev_info.link_mode == LINK_USB) return;
- keyboard_protocol = 1;
+ usb_device_state_set_protocol(USB_PROTOCOL_REPORT);
if (timer_elapsed32(interval_timer) > 50) {
interval_timer = timer_read32();
@@ -210,7 +211,7 @@ void RF_Protocol_Receive(void) {
sync_lost = 0;
if (Usart_Mgr.RXDLen > 4) {
- if((Usart_Mgr.RXDLen - 5) != RX_LEN)
+ if((Usart_Mgr.RXDLen - 5) != RX_LEN)
return;
for (i = 0; i < RX_LEN; i++)
@@ -524,7 +525,7 @@ void dev_sts_sync(void) {
link_state_temp = RF_CONNECT;
rf_link_show_time = 0;
if (dev_info.link_mode == LINK_RF_24) {
- uart_send_cmd(CMD_SET_24G_NAME, 10, 30);
+ uart_send_cmd(CMD_SET_24G_NAME, 10, 30);
}
}
@@ -552,22 +553,22 @@ void UART_Send_Bytes(uint8_t *Buffer, uint32_t Length) {
{
writePinLow(NRF_WAKEUP_PIN);
wait_us(50);
-
+
uart_transmit(Buffer, Length);
-
+
wait_us(50 + Length * 32);
- writePinHigh(NRF_WAKEUP_PIN);
-
- wait_us(200);
- }
+ writePinHigh(NRF_WAKEUP_PIN);
+
+ wait_us(200);
+ }
} else {
writePinLow(NRF_WAKEUP_PIN);
wait_us(50);
-
+
uart_transmit(Buffer, Length);
-
+
wait_us(50 + Length * 32);
- writePinHigh(NRF_WAKEUP_PIN);
+ writePinHigh(NRF_WAKEUP_PIN);
}
}
diff --git a/keyboards/nuphy/air75_v2/ansi/rf_driver.c b/keyboards/nuphy/air75_v2/ansi/rf_driver.c
index 1c0876c00349..6eb4d09ec230 100644
--- a/keyboards/nuphy/air75_v2/ansi/rf_driver.c
+++ b/keyboards/nuphy/air75_v2/ansi/rf_driver.c
@@ -17,6 +17,7 @@ along with this program. If not, see .
#include "host_driver.h"
#include "rf_driver.h"
+#include "usb_device_state.h"
#include "host.h"
#include "ansi.h"
@@ -43,12 +44,12 @@ static uint8_t rf_keyboard_leds(void) {
}
static void rf_send_keyboard(report_keyboard_t *report) {
- keyboard_protocol = 1;
+ usb_device_state_set_protocol(USB_PROTOCOL_REPORT);
uart_send_report_keyboard(report);
}
static void rf_send_nkro(report_nkro_t *report) {
- keyboard_protocol = 1;
+ usb_device_state_set_protocol(USB_PROTOCOL_REPORT);
uart_send_report_nkro(report);
}
diff --git a/keyboards/nuphy/air96_v2/ansi/ansi.h b/keyboards/nuphy/air96_v2/ansi/ansi.h
index f9e9db2e25e0..f468ed4ec1d1 100644
--- a/keyboards/nuphy/air96_v2/ansi/ansi.h
+++ b/keyboards/nuphy/air96_v2/ansi/ansi.h
@@ -51,95 +51,95 @@ enum custom_keycodes {
typedef enum {
- RX_Idle,
- RX_Receiving,
- RX_Done,
- RX_Fail,
- RX_OV_ERR,
- RX_SUM_ERR,
- RX_CMD_ERR,
- RX_DATA_ERR,
- RX_DATA_OV,
- RX_FORMAT_ERR,
-
- TX_OK = 0XE0,
- TX_DONE,
- TX_BUSY,
- TX_TIMEOUT,
- TX_DATA_ERR,
+ RX_Idle,
+ RX_Receiving,
+ RX_Done,
+ RX_Fail,
+ RX_OV_ERR,
+ RX_SUM_ERR,
+ RX_CMD_ERR,
+ RX_DATA_ERR,
+ RX_DATA_OV,
+ RX_FORMAT_ERR,
+
+ TX_OK = 0XE0,
+ TX_DONE,
+ TX_BUSY,
+ TX_TIMEOUT,
+ TX_DATA_ERR,
} TYPE_RX_STATE;
#define FUNC_VALID_LEN 32
-#define RF_IDLE 0
-#define RF_PAIRING 1
-#define RF_LINKING 2
-#define RF_CONNECT 3
-#define RF_DISCONNECT 4
-#define RF_SLEEP 5
-#define RF_SNIF 6
-#define RF_INVALID 0XFE
-#define RF_ERR_STATE 0XFF
+#define RF_IDLE 0
+#define RF_PAIRING 1
+#define RF_LINKING 2
+#define RF_CONNECT 3
+#define RF_DISCONNECT 4
+#define RF_SLEEP 5
+#define RF_SNIF 6
+#define RF_INVALID 0XFE
+#define RF_ERR_STATE 0XFF
#define UART_HEAD 0x5A
-#define CMD_POWER_UP 0XF0
-#define CMD_SLEEP 0XF1
-#define CMD_HAND 0XF2
-#define CMD_SNIF 0XF3
-#define CMD_24G_SUSPEND 0XF4
-#define CMD_IDLE_EXIT 0XFE
-
-#define CMD_RPT_MS 0XE0
-#define CMD_RPT_BYTE_KB 0XE1
-#define CMD_RPT_BIT_KB 0XE2
-#define CMD_RPT_CONSUME 0XE3
-#define CMD_RPT_SYS 0XE4
-
-#define CMD_SET_LINK 0XC0
-#define CMD_SET_CONFIG 0XC1
-#define CMD_GET_CONFIG 0XC2
-#define CMD_SET_NAME 0XC3
-#define CMD_GET_NAME 0XC4
-#define CMD_CLR_DEVICE 0XC5
-#define CMD_NEW_ADV 0XC7
-#define CMD_RF_STS_SYSC 0XC9
-#define CMD_SET_24G_NAME 0XCA
-#define CMD_GO_TEST 0XCF
-
-#define CMD_RF_DFU 0XB1
-
-#define CMD_WRITE_DATA 0X80
-#define CMD_READ_DATA 0X81
-
-#define LINK_RF_24 0
-#define LINK_BT_1 1
-#define LINK_BT_2 2
-#define LINK_BT_3 3
-#define LINK_USB 4
+#define CMD_POWER_UP 0XF0
+#define CMD_SLEEP 0XF1
+#define CMD_HAND 0XF2
+#define CMD_SNIF 0XF3
+#define CMD_24G_SUSPEND 0XF4
+#define CMD_IDLE_EXIT 0XFE
+
+#define CMD_RPT_MS 0XE0
+#define CMD_RPT_BYTE_KB 0XE1
+#define CMD_RPT_BIT_KB 0XE2
+#define CMD_RPT_CONSUME 0XE3
+#define CMD_RPT_SYS 0XE4
+
+#define CMD_SET_LINK 0XC0
+#define CMD_SET_CONFIG 0XC1
+#define CMD_GET_CONFIG 0XC2
+#define CMD_SET_NAME 0XC3
+#define CMD_GET_NAME 0XC4
+#define CMD_CLR_DEVICE 0XC5
+#define CMD_NEW_ADV 0XC7
+#define CMD_RF_STS_SYSC 0XC9
+#define CMD_SET_24G_NAME 0XCA
+#define CMD_GO_TEST 0XCF
+
+#define CMD_RF_DFU 0XB1
+
+#define CMD_WRITE_DATA 0X80
+#define CMD_READ_DATA 0X81
+
+#define LINK_RF_24 0
+#define LINK_BT_1 1
+#define LINK_BT_2 2
+#define LINK_BT_3 3
+#define LINK_USB 4
#define UART_MAX_LEN 64
typedef struct
{
- uint8_t RXDState;
- uint8_t RXDLen;
- uint8_t RXDOverTime;
- uint8_t TXDLenBack;
- uint8_t TXDOffset;
- uint8_t TXDBuf[UART_MAX_LEN];
- uint8_t RXDBuf[UART_MAX_LEN];
+ uint8_t RXDState;
+ uint8_t RXDLen;
+ uint8_t RXDOverTime;
+ uint8_t TXDLenBack;
+ uint8_t TXDOffset;
+ uint8_t TXDBuf[UART_MAX_LEN];
+ uint8_t RXDBuf[UART_MAX_LEN];
} USART_MGR_STRUCT;
typedef struct
{
- uint8_t link_mode;
- uint8_t rf_channel;
- uint8_t ble_channel;
- uint8_t rf_state;
- uint8_t rf_charge;
- uint8_t rf_led;
- uint8_t rf_baterry;
- uint8_t sys_sw_state;
+ uint8_t link_mode;
+ uint8_t rf_channel;
+ uint8_t ble_channel;
+ uint8_t rf_state;
+ uint8_t rf_charge;
+ uint8_t rf_led;
+ uint8_t rf_baterry;
+ uint8_t sys_sw_state;
} DEV_INFO_STRUCT;
@@ -152,9 +152,9 @@ typedef struct
#define HOST_BLE_TYPE 1
#define HOST_RF_TYPE 2
-#define LINK_TIMEOUT (uint16_t)(100 * 120)
-#define SLEEP_TIME_DELAY (uint16_t)(100 * 360)
-#define POWER_DOWN_DELAY (uint16_t)(24)
+#define LINK_TIMEOUT (uint16_t)(100 * 120)
+#define SLEEP_TIME_DELAY (uint16_t)(100 * 360)
+#define POWER_DOWN_DELAY (uint16_t)(24)
typedef struct
{
diff --git a/keyboards/nuphy/air96_v2/ansi/rf.c b/keyboards/nuphy/air96_v2/ansi/rf.c
index b7a41dc6c1e6..8eb205304b41 100644
--- a/keyboards/nuphy/air96_v2/ansi/rf.c
+++ b/keyboards/nuphy/air96_v2/ansi/rf.c
@@ -3,6 +3,7 @@
#include "ansi.h"
#include "uart.h" // qmk uart.h
#include "rf_driver.h"
+#include "usb_device_state.h"
USART_MGR_STRUCT Usart_Mgr;
#define RX_SBYTE Usart_Mgr.RXDBuf[0]
@@ -119,7 +120,7 @@ void uart_send_report_func(void)
static uint32_t interval_timer = 0;
if (dev_info.link_mode == LINK_USB) return;
- keyboard_protocol = 1;
+ usb_device_state_set_protocol(USB_PROTOCOL_REPORT);
if (timer_elapsed32(interval_timer) > 50) {
interval_timer = timer_read32();
@@ -195,7 +196,7 @@ void RF_Protocol_Receive(void) {
sync_lost = 0;
if (Usart_Mgr.RXDLen > 4) {
- if((Usart_Mgr.RXDLen - 5) != RX_LEN)
+ if((Usart_Mgr.RXDLen - 5) != RX_LEN)
return;
for (i = 0; i < RX_LEN; i++)
@@ -537,22 +538,22 @@ void UART_Send_Bytes(uint8_t *Buffer, uint32_t Length) {
{
writePinLow(NRF_WAKEUP_PIN);
wait_us(50);
-
+
uart_transmit(Buffer, Length);
-
+
wait_us(50 + Length * 32);
- writePinHigh(NRF_WAKEUP_PIN);
-
- wait_us(200);
- }
+ writePinHigh(NRF_WAKEUP_PIN);
+
+ wait_us(200);
+ }
} else {
writePinLow(NRF_WAKEUP_PIN);
wait_us(50);
-
+
uart_transmit(Buffer, Length);
-
+
wait_us(50 + Length * 32);
- writePinHigh(NRF_WAKEUP_PIN);
+ writePinHigh(NRF_WAKEUP_PIN);
}
}
diff --git a/keyboards/nuphy/air96_v2/ansi/rf_driver.c b/keyboards/nuphy/air96_v2/ansi/rf_driver.c
index 1c0876c00349..6eb4d09ec230 100644
--- a/keyboards/nuphy/air96_v2/ansi/rf_driver.c
+++ b/keyboards/nuphy/air96_v2/ansi/rf_driver.c
@@ -17,6 +17,7 @@ along with this program. If not, see .
#include "host_driver.h"
#include "rf_driver.h"
+#include "usb_device_state.h"
#include "host.h"
#include "ansi.h"
@@ -43,12 +44,12 @@ static uint8_t rf_keyboard_leds(void) {
}
static void rf_send_keyboard(report_keyboard_t *report) {
- keyboard_protocol = 1;
+ usb_device_state_set_protocol(USB_PROTOCOL_REPORT);
uart_send_report_keyboard(report);
}
static void rf_send_nkro(report_nkro_t *report) {
- keyboard_protocol = 1;
+ usb_device_state_set_protocol(USB_PROTOCOL_REPORT);
uart_send_report_nkro(report);
}
diff --git a/keyboards/nuphy/gem80/ansi/ansi.h b/keyboards/nuphy/gem80/ansi/ansi.h
index bf6f832f2dc9..113c9f3f1e1b 100644
--- a/keyboards/nuphy/gem80/ansi/ansi.h
+++ b/keyboards/nuphy/gem80/ansi/ansi.h
@@ -96,12 +96,12 @@ enum custom_keycodes {
LNK_BLE2,
LNK_BLE3,
- MAC_TASK,
- MAC_SEARCH,
+ MAC_TASK,
+ MAC_SEARCH,
MAC_VOICE,
- MAC_CONSOLE,
+ MAC_CONSOLE,
MAC_DND,
-
+
WIN_LOCK,
DEV_RESET,
SLEEP_MODE,
diff --git a/keyboards/nuphy/gem80/ansi/rf.c b/keyboards/nuphy/gem80/ansi/rf.c
index ab6dd0ac6a92..db799b61226b 100644
--- a/keyboards/nuphy/gem80/ansi/rf.c
+++ b/keyboards/nuphy/gem80/ansi/rf.c
@@ -3,6 +3,7 @@
#include "ansi.h"
#include "uart.h" // qmk uart.h
#include "rf_driver.h"
+#include "usb_device_state.h"
USART_MGR_STRUCT Usart_Mgr;
#define RX_SBYTE Usart_Mgr.RXDBuf[0]
@@ -119,7 +120,7 @@ void uart_send_report_func(void)
static uint32_t interval_timer = 0;
if (dev_info.link_mode == LINK_USB) return;
- keyboard_protocol = 1;
+ usb_device_state_set_protocol(USB_PROTOCOL_REPORT);
if (timer_elapsed32(interval_timer) > 50) {
interval_timer = timer_read32();
@@ -195,7 +196,7 @@ void RF_Protocol_Receive(void) {
sync_lost = 0;
if (Usart_Mgr.RXDLen > 4) {
- if((Usart_Mgr.RXDLen - 5) != RX_LEN)
+ if((Usart_Mgr.RXDLen - 5) != RX_LEN)
return;
for (i = 0; i < RX_LEN; i++)
@@ -366,7 +367,7 @@ uint8_t uart_send_cmd(uint8_t cmd, uint8_t wait_ack, uint8_t delayms) {
}
case CMD_SET_NAME: {
Usart_Mgr.TXDBuf[3] = 14; // data len
- Usart_Mgr.TXDBuf[4] = 1; // type
+ Usart_Mgr.TXDBuf[4] = 1; // type
Usart_Mgr.TXDBuf[5] = 12; // data: ble name len
Usart_Mgr.TXDBuf[6] = 'N'; // data: ble name
Usart_Mgr.TXDBuf[7] = 'u'; // data: ble name
@@ -387,7 +388,7 @@ uint8_t uart_send_cmd(uint8_t cmd, uint8_t wait_ack, uint8_t delayms) {
case CMD_SET_24G_NAME: {
Usart_Mgr.TXDBuf[3] = 38; // uart data len
Usart_Mgr.TXDBuf[4] = 38; // name valid len
- Usart_Mgr.TXDBuf[5] = 3;
+ Usart_Mgr.TXDBuf[5] = 3;
Usart_Mgr.TXDBuf[6] = 'N';
Usart_Mgr.TXDBuf[8] = 'u';
Usart_Mgr.TXDBuf[10] = 'P';
@@ -529,22 +530,22 @@ void UART_Send_Bytes(uint8_t *Buffer, uint32_t Length) {
{
writePinLow(NRF_WAKEUP_PIN);
wait_us(50);
-
+
uart_transmit(Buffer, Length);
-
+
wait_us(50 + Length * 32);
- writePinHigh(NRF_WAKEUP_PIN);
-
- wait_us(200);
- }
+ writePinHigh(NRF_WAKEUP_PIN);
+
+ wait_us(200);
+ }
} else {
writePinLow(NRF_WAKEUP_PIN);
wait_us(50);
-
+
uart_transmit(Buffer, Length);
-
+
wait_us(50 + Length * 32);
- writePinHigh(NRF_WAKEUP_PIN);
+ writePinHigh(NRF_WAKEUP_PIN);
}
}
diff --git a/keyboards/nuphy/gem80/ansi/rf_driver.c b/keyboards/nuphy/gem80/ansi/rf_driver.c
index 1c0876c00349..6eb4d09ec230 100644
--- a/keyboards/nuphy/gem80/ansi/rf_driver.c
+++ b/keyboards/nuphy/gem80/ansi/rf_driver.c
@@ -17,6 +17,7 @@ along with this program. If not, see .
#include "host_driver.h"
#include "rf_driver.h"
+#include "usb_device_state.h"
#include "host.h"
#include "ansi.h"
@@ -43,12 +44,12 @@ static uint8_t rf_keyboard_leds(void) {
}
static void rf_send_keyboard(report_keyboard_t *report) {
- keyboard_protocol = 1;
+ usb_device_state_set_protocol(USB_PROTOCOL_REPORT);
uart_send_report_keyboard(report);
}
static void rf_send_nkro(report_nkro_t *report) {
- keyboard_protocol = 1;
+ usb_device_state_set_protocol(USB_PROTOCOL_REPORT);
uart_send_report_nkro(report);
}
diff --git a/keyboards/nuphy/halo75_v2/ansi/ansi.h b/keyboards/nuphy/halo75_v2/ansi/ansi.h
index 9a2c393bb521..0cbc005a5040 100644
--- a/keyboards/nuphy/halo75_v2/ansi/ansi.h
+++ b/keyboards/nuphy/halo75_v2/ansi/ansi.h
@@ -36,109 +36,109 @@ enum custom_keycodes {
extern uint8_t m_sleep_led;
typedef enum {
- RX_Idle,
- RX_Receiving,
- RX_Done,
- RX_Fail,
- RX_OV_ERR,
- RX_SUM_ERR,
- RX_CMD_ERR,
- RX_DATA_ERR,
- RX_DATA_OV,
- RX_FORMAT_ERR,
-
- TX_OK = 0XE0,
- TX_DONE,
- TX_BUSY,
- TX_TIMEOUT,
- TX_DATA_ERR,
+ RX_Idle,
+ RX_Receiving,
+ RX_Done,
+ RX_Fail,
+ RX_OV_ERR,
+ RX_SUM_ERR,
+ RX_CMD_ERR,
+ RX_DATA_ERR,
+ RX_DATA_OV,
+ RX_FORMAT_ERR,
+
+ TX_OK = 0XE0,
+ TX_DONE,
+ TX_BUSY,
+ TX_TIMEOUT,
+ TX_DATA_ERR,
} TYPE_RX_STATE;
#define FUNC_VALID_LEN 32
#define UART_HEAD 0x5A
-#define RF_IDLE 0
-#define RF_PAIRING 1
-#define RF_LINKING 2
-#define RF_CONNECT 3
-#define RF_DISCONNECT 4
-#define RF_SLEEP 5
-#define RF_SNIF 6
-#define RF_INVALID 0XFE
-#define RF_ERR_STATE 0XFF
+#define RF_IDLE 0
+#define RF_PAIRING 1
+#define RF_LINKING 2
+#define RF_CONNECT 3
+#define RF_DISCONNECT 4
+#define RF_SLEEP 5
+#define RF_SNIF 6
+#define RF_INVALID 0XFE
+#define RF_ERR_STATE 0XFF
#define RF_LONG_PRESS_DELAY 30
#define DEV_RESET_PRESS_DELAY 30
#define RGB_TEST_PRESS_DELAY 30
-#define CMD_POWER_UP 0XF0
-#define CMD_SLEEP 0XF1
-#define CMD_HAND 0XF2
-#define CMD_SNIF 0XF3
-#define CMD_24G_SUSPEND 0XF4
-#define CMD_IDLE_EXIT 0XFE
+#define CMD_POWER_UP 0XF0
+#define CMD_SLEEP 0XF1
+#define CMD_HAND 0XF2
+#define CMD_SNIF 0XF3
+#define CMD_24G_SUSPEND 0XF4
+#define CMD_IDLE_EXIT 0XFE
-#define CMD_RPT_MS 0XE0
+#define CMD_RPT_MS 0XE0
#define CMD_RPT_BYTE_KB 0XE1
#define CMD_RPT_BIT_KB 0XE2
-#define CMD_RPT_CONSUME 0XE3
-#define CMD_RPT_SYS 0XE4
-
-#define CMD_SET_LINK 0XC0
-#define CMD_SET_CONFIG 0XC1
-#define CMD_GET_CONFIG 0XC2
-#define CMD_SET_NAME 0XC3
-#define CMD_GET_NAME 0XC4
-#define CMD_CLR_DEVICE 0XC5
-#define CMD_NEW_ADV 0XC7
-#define CMD_RF_STS_SYSC 0XC9
-#define CMD_SET_24G_NAME 0XCA
-#define CMD_GO_TEST 0XCF
-
-#define CMD_RF_DFU 0XB1
-
-#define CMD_WRITE_DATA 0X80
-#define CMD_READ_DATA 0X81
-
-#define CMD_WBAT_CFG 0X82
-#define CMD_RBAT_CFG 0X83
-
-#define LINK_RF_24 0
-#define LINK_BT_1 1
-#define LINK_BT_2 2
-#define LINK_BT_3 3
-#define LINK_USB 4
+#define CMD_RPT_CONSUME 0XE3
+#define CMD_RPT_SYS 0XE4
+
+#define CMD_SET_LINK 0XC0
+#define CMD_SET_CONFIG 0XC1
+#define CMD_GET_CONFIG 0XC2
+#define CMD_SET_NAME 0XC3
+#define CMD_GET_NAME 0XC4
+#define CMD_CLR_DEVICE 0XC5
+#define CMD_NEW_ADV 0XC7
+#define CMD_RF_STS_SYSC 0XC9
+#define CMD_SET_24G_NAME 0XCA
+#define CMD_GO_TEST 0XCF
+
+#define CMD_RF_DFU 0XB1
+
+#define CMD_WRITE_DATA 0X80
+#define CMD_READ_DATA 0X81
+
+#define CMD_WBAT_CFG 0X82
+#define CMD_RBAT_CFG 0X83
+
+#define LINK_RF_24 0
+#define LINK_BT_1 1
+#define LINK_BT_2 2
+#define LINK_BT_3 3
+#define LINK_USB 4
#define UART_MAX_LEN 64
typedef struct
{
- uint8_t RXDState;
- uint8_t RXDLen;
- uint8_t RXDOverTime;
- uint8_t TXDLenBack;
+ uint8_t RXDState;
+ uint8_t RXDLen;
+ uint8_t RXDOverTime;
+ uint8_t TXDLenBack;
uint8_t TXDOffset;
- uint8_t TXDBuf[UART_MAX_LEN];
- uint8_t RXDBuf[UART_MAX_LEN];
+ uint8_t TXDBuf[UART_MAX_LEN];
+ uint8_t RXDBuf[UART_MAX_LEN];
} USART_MGR_STRUCT;
typedef struct
{
- uint8_t link_mode;
- uint8_t rf_channel;
- uint8_t ble_channel;
- uint8_t rf_state;
- uint8_t rf_charge;
- uint8_t rf_led;
- uint8_t rf_baterry;
- uint8_t sys_sw_state;
+ uint8_t link_mode;
+ uint8_t rf_channel;
+ uint8_t ble_channel;
+ uint8_t rf_state;
+ uint8_t rf_charge;
+ uint8_t rf_led;
+ uint8_t rf_baterry;
+ uint8_t sys_sw_state;
} DEV_INFO_STRUCT;
-#define DELAY_2MS 2
-#define DELAY_4MS 4
-#define DELAY_5MS 5
-#define DELAY_6MS 6
-#define DELAY_8MS 8
+#define DELAY_2MS 2
+#define DELAY_4MS 4
+#define DELAY_5MS 5
+#define DELAY_6MS 6
+#define DELAY_8MS 8
#define DELAY_10MS 10
#define DELAY_15MS 15
#define DELAY_20MS 20
@@ -203,4 +203,4 @@ typedef struct
} user_config_t;
extern user_config_t user_config;
-#define f_dev_sleep_enable user_config.ee_dev_config.bit0
\ No newline at end of file
+#define f_dev_sleep_enable user_config.ee_dev_config.bit0
diff --git a/keyboards/nuphy/halo75_v2/ansi/rf.c b/keyboards/nuphy/halo75_v2/ansi/rf.c
index 688d45a6295c..1044ef1b669d 100644
--- a/keyboards/nuphy/halo75_v2/ansi/rf.c
+++ b/keyboards/nuphy/halo75_v2/ansi/rf.c
@@ -17,6 +17,7 @@ along with this program. If not, see .
#include "ansi.h"
#include "uart.h" // qmk uart.h
#include "rf_driver.h"
+#include "usb_device_state.h"
USART_MGR_STRUCT Usart_Mgr;
#define RX_SBYTE Usart_Mgr.RXDBuf[0]
@@ -134,7 +135,7 @@ void uart_send_report_func(void)
static uint32_t interval_timer = 0;
if (dev_info.link_mode == LINK_USB) return;
- keyboard_protocol = 1;
+ usb_device_state_set_protocol(USB_PROTOCOL_REPORT);
if (timer_elapsed32(interval_timer) > 300) {
interval_timer = timer_read32();
@@ -210,7 +211,7 @@ void RF_Protocol_Receive(void) {
sync_lost = 0;
if (Usart_Mgr.RXDLen > 4) {
- if((Usart_Mgr.RXDLen - 5) != RX_LEN)
+ if((Usart_Mgr.RXDLen - 5) != RX_LEN)
return;
for (i = 0; i < RX_LEN; i++)
@@ -381,8 +382,8 @@ uint8_t uart_send_cmd(uint8_t cmd, uint8_t wait_ack, uint8_t delayms) {
}
case CMD_SET_NAME: {
Usart_Mgr.TXDBuf[3] = 18;
- Usart_Mgr.TXDBuf[4] = 1;
- Usart_Mgr.TXDBuf[5] = 16;
+ Usart_Mgr.TXDBuf[4] = 1;
+ Usart_Mgr.TXDBuf[5] = 16;
Usart_Mgr.TXDBuf[6] = 'N';
Usart_Mgr.TXDBuf[7] = 'u';
Usart_Mgr.TXDBuf[8] = 'P';
@@ -395,10 +396,10 @@ uint8_t uart_send_cmd(uint8_t cmd, uint8_t wait_ack, uint8_t delayms) {
Usart_Mgr.TXDBuf[15] = 'o';
Usart_Mgr.TXDBuf[16] = '7';
Usart_Mgr.TXDBuf[17] = '5';
- Usart_Mgr.TXDBuf[18] = ' ';
- Usart_Mgr.TXDBuf[19] = 'V';
- Usart_Mgr.TXDBuf[20] = '2';
- Usart_Mgr.TXDBuf[21] = '-';
+ Usart_Mgr.TXDBuf[18] = ' ';
+ Usart_Mgr.TXDBuf[19] = 'V';
+ Usart_Mgr.TXDBuf[20] = '2';
+ Usart_Mgr.TXDBuf[21] = '-';
Usart_Mgr.TXDBuf[22] = get_checksum(Usart_Mgr.TXDBuf + 4, Usart_Mgr.TXDBuf[3]); // sum
break;
}
@@ -406,7 +407,7 @@ uint8_t uart_send_cmd(uint8_t cmd, uint8_t wait_ack, uint8_t delayms) {
case CMD_SET_24G_NAME: {
Usart_Mgr.TXDBuf[3] = 46;
Usart_Mgr.TXDBuf[4] = 46;
- Usart_Mgr.TXDBuf[5] = 3;
+ Usart_Mgr.TXDBuf[5] = 3;
Usart_Mgr.TXDBuf[6] = 'N';
Usart_Mgr.TXDBuf[8] = 'u';
Usart_Mgr.TXDBuf[10] = 'P';
@@ -552,17 +553,17 @@ const uint8_t battery_acfg_tab[BAT_CFG_LEN] = {
0x69, 0x79, 0x8D, 0xA4, 0xB7, 0xC8, 0xA4, 0x16,
0x20, 0x00, 0xA7, 0x10, 0x00, 0xB1, 0x28, 0x00,
0x00, 0x00, 0x64, 0x43, 0xC0, 0x53, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81,
};
-void UART_Send_BatCfg(void)
+void UART_Send_BatCfg(void)
{
uint8_t buf[128] = {0};
- buf[0] = UART_HEAD;
- buf[1] = CMD_WBAT_CFG;
- buf[2] = 0x01;
- buf[3] = BAT_CFG_LEN;
+ buf[0] = UART_HEAD;
+ buf[1] = CMD_WBAT_CFG;
+ buf[2] = 0x01;
+ buf[3] = BAT_CFG_LEN;
memcpy(&buf[4], battery_acfg_tab, BAT_CFG_LEN);
buf[4 + BAT_CFG_LEN] = get_checksum(&buf[4], BAT_CFG_LEN);
UART_Send_Bytes(buf, BAT_CFG_LEN + 5);
@@ -580,22 +581,22 @@ void UART_Send_Bytes(uint8_t *Buffer, uint32_t Length) {
{
writePinLow(NRF_WAKEUP_PIN);
wait_us(50);
-
+
uart_transmit(Buffer, Length);
-
+
wait_us(50 + Length * 32);
- writePinHigh(NRF_WAKEUP_PIN);
-
- wait_us(200);
- }
+ writePinHigh(NRF_WAKEUP_PIN);
+
+ wait_us(200);
+ }
} else {
writePinLow(NRF_WAKEUP_PIN);
wait_us(50);
-
+
uart_transmit(Buffer, Length);
-
+
wait_us(50 + Length * 32);
- writePinHigh(NRF_WAKEUP_PIN);
+ writePinHigh(NRF_WAKEUP_PIN);
}
}
diff --git a/keyboards/nuphy/halo75_v2/ansi/rf_driver.c b/keyboards/nuphy/halo75_v2/ansi/rf_driver.c
index 1c0876c00349..6eb4d09ec230 100644
--- a/keyboards/nuphy/halo75_v2/ansi/rf_driver.c
+++ b/keyboards/nuphy/halo75_v2/ansi/rf_driver.c
@@ -17,6 +17,7 @@ along with this program. If not, see .
#include "host_driver.h"
#include "rf_driver.h"
+#include "usb_device_state.h"
#include "host.h"
#include "ansi.h"
@@ -43,12 +44,12 @@ static uint8_t rf_keyboard_leds(void) {
}
static void rf_send_keyboard(report_keyboard_t *report) {
- keyboard_protocol = 1;
+ usb_device_state_set_protocol(USB_PROTOCOL_REPORT);
uart_send_report_keyboard(report);
}
static void rf_send_nkro(report_nkro_t *report) {
- keyboard_protocol = 1;
+ usb_device_state_set_protocol(USB_PROTOCOL_REPORT);
uart_send_report_nkro(report);
}
diff --git a/keyboards/nuphy/halo96_v2/ansi/ansi.h b/keyboards/nuphy/halo96_v2/ansi/ansi.h
index 653fa7674790..331b6213fc19 100644
--- a/keyboards/nuphy/halo96_v2/ansi/ansi.h
+++ b/keyboards/nuphy/halo96_v2/ansi/ansi.h
@@ -51,124 +51,124 @@ enum custom_keycodes {
extern uint8_t m_sleep_led;
typedef enum {
- RX_Idle,
- RX_Receiving,
- RX_Done,
- RX_Fail,
- RX_OV_ERR,
- RX_SUM_ERR,
+ RX_Idle,
+ RX_Receiving,
+ RX_Done,
+ RX_Fail,
+ RX_OV_ERR,
+ RX_SUM_ERR,
RX_CMD_ERR,
- RX_DATA_ERR,
- RX_DATA_OV,
- RX_FORMAT_ERR,
- TX_OK = 0XE0,
- TX_DONE,
- TX_BUSY,
- TX_TIMEOUT,
- TX_DATA_ERR,
+ RX_DATA_ERR,
+ RX_DATA_OV,
+ RX_FORMAT_ERR,
+ TX_OK = 0XE0,
+ TX_DONE,
+ TX_BUSY,
+ TX_TIMEOUT,
+ TX_DATA_ERR,
} TYPE_RX_STATE;
#define FUNC_VALID_LEN 32
#define UART_HEAD 0x5A
-#define RF_IDLE 0
-#define RF_PAIRING 1
-#define RF_LINKING 2
-#define RF_CONNECT 3
-#define RF_DISCONNECT 4
-#define RF_SLEEP 5
-#define RF_SNIF 6
-#define RF_INVALID 0XFE
-#define RF_ERR_STATE 0XFF
+#define RF_IDLE 0
+#define RF_PAIRING 1
+#define RF_LINKING 2
+#define RF_CONNECT 3
+#define RF_DISCONNECT 4
+#define RF_SLEEP 5
+#define RF_SNIF 6
+#define RF_INVALID 0XFE
+#define RF_ERR_STATE 0XFF
#define RF_LONG_PRESS_DELAY 30
#define DEV_RESET_PRESS_DELAY 30
#define RGB_TEST_PRESS_DELAY 30
-#define CMD_POWER_UP 0XF0
-#define CMD_SLEEP 0XF1
-#define CMD_HAND 0XF2
-#define CMD_SNIF 0XF3
-#define CMD_24G_SUSPEND 0XF4
-#define CMD_IDLE_EXIT 0XFE
+#define CMD_POWER_UP 0XF0
+#define CMD_SLEEP 0XF1
+#define CMD_HAND 0XF2
+#define CMD_SNIF 0XF3
+#define CMD_24G_SUSPEND 0XF4
+#define CMD_IDLE_EXIT 0XFE
-#define CMD_RPT_MS 0XE0
-#define CMD_RPT_BYTE_KB 0XE1
-#define CMD_RPT_BIT_KB 0XE2
-#define CMD_RPT_CONSUME 0XE3
-#define CMD_RPT_SYS 0XE4
+#define CMD_RPT_MS 0XE0
+#define CMD_RPT_BYTE_KB 0XE1
+#define CMD_RPT_BIT_KB 0XE2
+#define CMD_RPT_CONSUME 0XE3
+#define CMD_RPT_SYS 0XE4
#define CMD_SET_LINK 0XC0
-#define CMD_SET_CONFIG 0XC1
-#define CMD_GET_CONFIG 0XC2
-#define CMD_SET_NAME 0XC3
-#define CMD_GET_NAME 0XC4
+#define CMD_SET_CONFIG 0XC1
+#define CMD_GET_CONFIG 0XC2
+#define CMD_SET_NAME 0XC3
+#define CMD_GET_NAME 0XC4
#define CMD_CLR_DEVICE 0XC5
-#define CMD_NEW_ADV 0XC7
-#define CMD_RF_STS_SYSC 0XC9
-#define CMD_SET_24G_NAME 0XCA
-#define CMD_GO_TEST 0XCF
+#define CMD_NEW_ADV 0XC7
+#define CMD_RF_STS_SYSC 0XC9
+#define CMD_SET_24G_NAME 0XCA
+#define CMD_GO_TEST 0XCF
-#define CMD_RF_DFU 0XB1
+#define CMD_RF_DFU 0XB1
-#define CMD_WRITE_DATA 0X80
-#define CMD_READ_DATA 0X81
+#define CMD_WRITE_DATA 0X80
+#define CMD_READ_DATA 0X81
-#define CMD_WBAT_CFG 0X82
-#define CMD_RBAT_CFG 0X83
+#define CMD_WBAT_CFG 0X82
+#define CMD_RBAT_CFG 0X83
-#define LINK_RF_24 0
-#define LINK_BT_1 1
-#define LINK_BT_2 2
-#define LINK_BT_3 3
-#define LINK_USB 4
+#define LINK_RF_24 0
+#define LINK_BT_1 1
+#define LINK_BT_2 2
+#define LINK_BT_3 3
+#define LINK_USB 4
#define UART_MAX_LEN 64
typedef struct
{
- uint8_t RXDState;
- uint8_t RXDLen;
- uint8_t RXDOverTime;
- uint8_t TXDLenBack;
- uint8_t TXDOffset;
+ uint8_t RXDState;
+ uint8_t RXDLen;
+ uint8_t RXDOverTime;
+ uint8_t TXDLenBack;
+ uint8_t TXDOffset;
uint8_t TXDBuf[UART_MAX_LEN];
uint8_t RXDBuf[UART_MAX_LEN];
} USART_MGR_STRUCT;
typedef struct
{
- uint8_t link_mode;
- uint8_t rf_channel;
- uint8_t ble_channel;
- uint8_t rf_state;
- uint8_t rf_charge;
- uint8_t rf_led;
- uint8_t rf_baterry;
- uint8_t sys_sw_state;
+ uint8_t link_mode;
+ uint8_t rf_channel;
+ uint8_t ble_channel;
+ uint8_t rf_state;
+ uint8_t rf_charge;
+ uint8_t rf_led;
+ uint8_t rf_baterry;
+ uint8_t sys_sw_state;
} DEV_INFO_STRUCT;
-#define DELAY_2MS 2
-#define DELAY_4MS 4
-#define DELAY_5MS 5
-#define DELAY_6MS 6
-#define DELAY_8MS 8
-#define DELAY_10MS 10
-#define DELAY_15MS 15
-#define DELAY_20MS 20
-#define DELAY_30MS 30
-#define DELAY_40MS 40
-#define DELAY_50MS 50
-#define DELAY_100MS 100
-#define DELAY_200MS 200
-#define DELAY_300MS 300
-#define DELAY_400MS 400
-#define DELAY_500MS 500
-#define DELAY_800MS 800
-#define DELAY_1SEC 1000
-#define DELAY_2SEC 2000
-#define DELAY_3SEC 3000
-#define DELAY_4SEC 4000
-#define DELAY_5SEC 5000
+#define DELAY_2MS 2
+#define DELAY_4MS 4
+#define DELAY_5MS 5
+#define DELAY_6MS 6
+#define DELAY_8MS 8
+#define DELAY_10MS 10
+#define DELAY_15MS 15
+#define DELAY_20MS 20
+#define DELAY_30MS 30
+#define DELAY_40MS 40
+#define DELAY_50MS 50
+#define DELAY_100MS 100
+#define DELAY_200MS 200
+#define DELAY_300MS 300
+#define DELAY_400MS 400
+#define DELAY_500MS 500
+#define DELAY_800MS 800
+#define DELAY_1SEC 1000
+#define DELAY_2SEC 2000
+#define DELAY_3SEC 3000
+#define DELAY_4SEC 4000
+#define DELAY_5SEC 5000
#define SYS_SW_WIN 0xa1
#define SYS_SW_MAC 0xa2
@@ -217,4 +217,4 @@ typedef struct
} user_config_t;
extern user_config_t user_config;
-#define f_dev_sleep_enable user_config.ee_dev_config.bit0
\ No newline at end of file
+#define f_dev_sleep_enable user_config.ee_dev_config.bit0
diff --git a/keyboards/nuphy/halo96_v2/ansi/rf.c b/keyboards/nuphy/halo96_v2/ansi/rf.c
index c0a9bf10ca04..a8f96fe7e527 100644
--- a/keyboards/nuphy/halo96_v2/ansi/rf.c
+++ b/keyboards/nuphy/halo96_v2/ansi/rf.c
@@ -16,8 +16,9 @@ along with this program. If not, see .
*/
#include "ansi.h"
-#include "uart.h"
+#include "uart.h"
#include "rf_driver.h"
+#include "usb_device_state.h"
USART_MGR_STRUCT Usart_Mgr;
#define RX_SBYTE Usart_Mgr.RXDBuf[0]
@@ -134,7 +135,7 @@ void uart_send_report_func(void)
static uint32_t interval_timer = 0;
if (dev_info.link_mode == LINK_USB) return;
- keyboard_protocol = 1;
+ usb_device_state_set_protocol(USB_PROTOCOL_REPORT);
if (timer_elapsed32(interval_timer) > 300) {
interval_timer = timer_read32();
@@ -210,7 +211,7 @@ void RF_Protocol_Receive(void) {
sync_lost = 0;
if (Usart_Mgr.RXDLen > 4) {
- if((Usart_Mgr.RXDLen - 5) != RX_LEN)
+ if((Usart_Mgr.RXDLen - 5) != RX_LEN)
return;
for (i = 0; i < RX_LEN; i++)
@@ -381,7 +382,7 @@ uint8_t uart_send_cmd(uint8_t cmd, uint8_t wait_ack, uint8_t delayms) {
}
case CMD_SET_NAME: {
Usart_Mgr.TXDBuf[3] = 18; // data len
- Usart_Mgr.TXDBuf[4] = 1; // type
+ Usart_Mgr.TXDBuf[4] = 1; // type
Usart_Mgr.TXDBuf[5] = 16; // data: ble name len
Usart_Mgr.TXDBuf[6] = 'N'; // data: ble name
Usart_Mgr.TXDBuf[7] = 'u'; // data: ble name
@@ -395,10 +396,10 @@ uint8_t uart_send_cmd(uint8_t cmd, uint8_t wait_ack, uint8_t delayms) {
Usart_Mgr.TXDBuf[15] = 'o'; // data: ble name
Usart_Mgr.TXDBuf[16] = '9'; // data: ble name
Usart_Mgr.TXDBuf[17] = '6'; // data: ble name
- Usart_Mgr.TXDBuf[18] = ' ';
- Usart_Mgr.TXDBuf[19] = 'V';
- Usart_Mgr.TXDBuf[20] = '2';
- Usart_Mgr.TXDBuf[21] = '-';
+ Usart_Mgr.TXDBuf[18] = ' ';
+ Usart_Mgr.TXDBuf[19] = 'V';
+ Usart_Mgr.TXDBuf[20] = '2';
+ Usart_Mgr.TXDBuf[21] = '-';
Usart_Mgr.TXDBuf[22] = get_checksum(Usart_Mgr.TXDBuf + 4, Usart_Mgr.TXDBuf[3]); // sum
break;
}
@@ -406,7 +407,7 @@ uint8_t uart_send_cmd(uint8_t cmd, uint8_t wait_ack, uint8_t delayms) {
case CMD_SET_24G_NAME: {
Usart_Mgr.TXDBuf[3] = 46; // uart data len
Usart_Mgr.TXDBuf[4] = 46; // name valid len
- Usart_Mgr.TXDBuf[5] = 3;
+ Usart_Mgr.TXDBuf[5] = 3;
Usart_Mgr.TXDBuf[6] = 'N';
Usart_Mgr.TXDBuf[8] = 'u';
Usart_Mgr.TXDBuf[10] = 'P';
@@ -552,17 +553,17 @@ const uint8_t battery_acfg_tab[BAT_CFG_LEN] = {
0x69, 0x79, 0x8D, 0xA4, 0xB7, 0xC8, 0xA4, 0x16,
0x20, 0x00, 0xA7, 0x10, 0x00, 0xB1, 0x28, 0x00,
0x00, 0x00, 0x64, 0x43, 0xC0, 0x53, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81,
};
-void UART_Send_BatCfg(void)
+void UART_Send_BatCfg(void)
{
uint8_t buf[128] = {0};
- buf[0] = UART_HEAD;
- buf[1] = CMD_WBAT_CFG;
- buf[2] = 0x01;
- buf[3] = BAT_CFG_LEN;
+ buf[0] = UART_HEAD;
+ buf[1] = CMD_WBAT_CFG;
+ buf[2] = 0x01;
+ buf[3] = BAT_CFG_LEN;
memcpy(&buf[4], battery_acfg_tab, BAT_CFG_LEN);
buf[4 + BAT_CFG_LEN] = get_checksum(&buf[4], BAT_CFG_LEN);
UART_Send_Bytes(buf, BAT_CFG_LEN + 5);
@@ -580,22 +581,22 @@ void UART_Send_Bytes(uint8_t *Buffer, uint32_t Length) {
{
writePinLow(NRF_WAKEUP_PIN);
wait_us(50);
-
+
uart_transmit(Buffer, Length);
-
+
wait_us(50 + Length * 32);
- writePinHigh(NRF_WAKEUP_PIN);
-
- wait_us(200);
- }
+ writePinHigh(NRF_WAKEUP_PIN);
+
+ wait_us(200);
+ }
} else {
writePinLow(NRF_WAKEUP_PIN);
wait_us(50);
-
+
uart_transmit(Buffer, Length);
-
+
wait_us(50 + Length * 32);
- writePinHigh(NRF_WAKEUP_PIN);
+ writePinHigh(NRF_WAKEUP_PIN);
}
}
diff --git a/keyboards/nuphy/halo96_v2/ansi/rf_driver.c b/keyboards/nuphy/halo96_v2/ansi/rf_driver.c
index 1c0876c00349..6eb4d09ec230 100644
--- a/keyboards/nuphy/halo96_v2/ansi/rf_driver.c
+++ b/keyboards/nuphy/halo96_v2/ansi/rf_driver.c
@@ -17,6 +17,7 @@ along with this program. If not, see .
#include "host_driver.h"
#include "rf_driver.h"
+#include "usb_device_state.h"
#include "host.h"
#include "ansi.h"
@@ -43,12 +44,12 @@ static uint8_t rf_keyboard_leds(void) {
}
static void rf_send_keyboard(report_keyboard_t *report) {
- keyboard_protocol = 1;
+ usb_device_state_set_protocol(USB_PROTOCOL_REPORT);
uart_send_report_keyboard(report);
}
static void rf_send_nkro(report_nkro_t *report) {
- keyboard_protocol = 1;
+ usb_device_state_set_protocol(USB_PROTOCOL_REPORT);
uart_send_report_nkro(report);
}
diff --git a/keyboards/readme.md b/keyboards/readme.md
deleted file mode 100644
index 95a68792a264..000000000000
--- a/keyboards/readme.md
+++ /dev/null
@@ -1,36 +0,0 @@
-# Included Keyboards
-
-QMK runs on a diverse range of keyboards. Some of these keyboards are well maintained and see constant community contributions, while others are part of the repository for historical reasons.
-
-## Official QMK Keyboards
-
-### Ortholinear Keyboards - Jack Humbert
-
-What makes OLKB keyboards shine is a combo of lean aesthetics, compact size, and killer tactile feel. These are available through [olkb.com](http://olkb.com) as well as through [Massdrop](http://massdrop.com) from time to time, as easy to assemble kits.
-
-* [Planck](/keyboards/planck/) — A 40% DIY powerhouse of customizability and modification capability. It's a lean, mean, typing machine.
-* [Preonic](/keyboards/preonic/) — Like the Planck, but bigger. 50%.
-* [Atomic](/keyboards/atomic/) — Imagine the size of the Planck. Now imagine the size of the Preonic. Now imagine _bigger_. That is the Atomic. A 60% keyboard.
-
-### Clueboard - Zach White
-
-Designed and built in Felton, CA, Clueboards keyboard emphasize quality and locally sourced components.
-
-* [Clueboard](/keyboards/clueboard/66/) — The 66% custom keyboard.
-* [Cluecard](/keyboards/clueboard/card/) — A small board to help you hack on QMK.
-* [Cluepad](/keyboards/clueboard/17/) — A mechanical numpad with QMK superpowers.
-
-### Moonlander, ErgoDox EZ and Planck EZ - ZSA Technology Labs
-
-[ZSA Technology Labs](https://zsa.io) maintains its own [fork of QMK](https://github.com/zsa/qmk_firmware) which feeds its [configurator](https://configure.zsa.io), for stability and legal purposes. The ZSA boards are:
-
-* [Moonlander Mark I](/keyboards/moonlander/) — A next-gen split, ergonomic keyboard with an active left side, USB type C, integrated wrist rest, and a thumb cluster that can move.
-* [ErgoDox EZ](/keyboards/ergodox_ez/) — A powerful split mechanical keyboard.
-* [Planck EZ](/keyboards/planck/ez) — A 40% DIY powerhouse of customizability and modification capability. It's a lean, mean, typing machine, which ships fully assembled with a two-year warranty.
-
-
-## Community-supported QMK Keyboards
-
-These keyboards are part of the QMK repository, but their manufacturers are not official maintainers of the repository.
-
-Since there are too many to list here and keep updated, please see the folder listing instead.
diff --git a/layouts/community/60_tsangan_hhkb/readme.md b/layouts/community/60_tsangan_hhkb/readme.md
deleted file mode 100644
index 78a0b82beeb9..000000000000
--- a/layouts/community/60_tsangan_hhkb/readme.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# 60_tsangan_hhkb
-
- LAYOUT_60_tsangan_hhkb
diff --git a/layouts/default/60_tsangan_hhkb/default_60_tsangan_hhkb/keymap.c b/layouts/default/60_ansi_tsangan_split_bs_rshift/default_60_ansi_tsangan_split_bs_rshift/keymap.c
similarity index 97%
rename from layouts/default/60_tsangan_hhkb/default_60_tsangan_hhkb/keymap.c
rename to layouts/default/60_ansi_tsangan_split_bs_rshift/default_60_ansi_tsangan_split_bs_rshift/keymap.c
index 132763959074..f6dac0999fbd 100644
--- a/layouts/default/60_tsangan_hhkb/default_60_tsangan_hhkb/keymap.c
+++ b/layouts/default/60_ansi_tsangan_split_bs_rshift/default_60_ansi_tsangan_split_bs_rshift/keymap.c
@@ -1,4 +1,4 @@
-// Copyright 2023 QMK
+// Copyright 2024 QMK
// SPDX-License-Identifier: GPL-2.0-or-later
#include QMK_KEYBOARD_H
@@ -17,7 +17,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* │Ctrl │GUI│ Alt │ │ Alt │GUI│ Ctrl│
* └─────┴───┴─────┴───────────────────────────┴─────┴───┴─────┘
*/
- [0] = LAYOUT_60_tsangan_hhkb(
+ [0] = LAYOUT_60_ansi_tsangan_split_bs_rshift(
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
diff --git a/layouts/default/60_tsangan_hhkb/info.json b/layouts/default/60_ansi_tsangan_split_bs_rshift/info.json
similarity index 93%
rename from layouts/default/60_tsangan_hhkb/info.json
rename to layouts/default/60_ansi_tsangan_split_bs_rshift/info.json
index 091456eb7016..94f91530d2a6 100644
--- a/layouts/default/60_tsangan_hhkb/info.json
+++ b/layouts/default/60_ansi_tsangan_split_bs_rshift/info.json
@@ -1,9 +1,9 @@
{
- "keyboard_name": "60% ANSI Tsangan HHKB layout",
+ "keyboard_name": "60% ANSI layout with split Backspace, split Right Shift, and Tsangan Bottom Row",
"url": "",
"maintainer": "qmk",
"layouts": {
- "LAYOUT_60_tsangan_hhkb": {
+ "LAYOUT_60_ansi_tsangan_split_bs_rshift": {
"layout": [
{"x":0, "y":0},
{"x":1, "y":0},
diff --git a/layouts/default/60_tsangan_hhkb/layout.json b/layouts/default/60_ansi_tsangan_split_bs_rshift/layout.json
similarity index 100%
rename from layouts/default/60_tsangan_hhkb/layout.json
rename to layouts/default/60_ansi_tsangan_split_bs_rshift/layout.json
diff --git a/layouts/default/60_ansi_tsangan_split_bs_rshift/readme.md b/layouts/default/60_ansi_tsangan_split_bs_rshift/readme.md
new file mode 100644
index 000000000000..f086e5d3d6aa
--- /dev/null
+++ b/layouts/default/60_ansi_tsangan_split_bs_rshift/readme.md
@@ -0,0 +1,3 @@
+# 60_ansi_tsangan_split_bs_rshift
+
+ LAYOUT_60_ansi_tsangan_split_bs_rshift
diff --git a/layouts/default/60_tsangan_hhkb/readme.md b/layouts/default/60_tsangan_hhkb/readme.md
deleted file mode 100644
index 78a0b82beeb9..000000000000
--- a/layouts/default/60_tsangan_hhkb/readme.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# 60_tsangan_hhkb
-
- LAYOUT_60_tsangan_hhkb
diff --git a/layouts/default/ortho_6x13/default_ortho_6x13/keymap.c b/layouts/default/ortho_6x13/default_ortho_6x13/keymap.c
index 527f87f84bca..2fa8f2acce1f 100644
--- a/layouts/default/ortho_6x13/default_ortho_6x13/keymap.c
+++ b/layouts/default/ortho_6x13/default_ortho_6x13/keymap.c
@@ -26,7 +26,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_NUHS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_SLSH,
KC_LCTL, KC_LGUI, TT(0), KC_LALT, TT(2), KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RSFT, KC_LEFT, KC_DOWN, KC_RGHT
- )
+ ),
[1] = LAYOUT_ortho_6x13(
KC_GRV , KC_MUTE, KC_VOLU, KC_VOLD, KC_MPRV, KC_MPLY, KC_MNXT, G(KC_P), KC_SLEP, KC_WAKE, KC_PSCR, _______, _______ ,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ,
diff --git a/layouts/default/readme.md b/layouts/default/readme.md
index 2460f64701ff..3c6da941fbbc 100644
--- a/layouts/default/readme.md
+++ b/layouts/default/readme.md
@@ -2,10 +2,14 @@
## Summary of Layouts
-### 60% Form Factor
+
+60% Form Factor
+
+### `LAYOUT_60_abnt2`
+
+60% ABNT2 layout
```
-LAYOUT_60_abnt2
┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │
├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
@@ -19,8 +23,11 @@ LAYOUT_60_abnt2
└────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
```
+### `LAYOUT_60_ansi`
+
+60% ANSI layout
+
```
-LAYOUT_60_ansi
┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │
├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
@@ -34,8 +41,11 @@ LAYOUT_60_ansi
└────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
```
+### `LAYOUT_60_ansi_arrow`
+
+60% ANSI layout with arrow cluster
+
```
-LAYOUT_60_ansi_arrow
┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │
├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
@@ -49,8 +59,11 @@ LAYOUT_60_ansi_arrow
└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘
```
+### `LAYOUT_60_ansi_arrow_split_bs`
+
+60% ANSI layout with arrow cluster and split backspace
+
```
-LAYOUT_60_ansi_arrow_split_bs
┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤
@@ -64,23 +77,11 @@ LAYOUT_60_ansi_arrow_split_bs
└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘
```
-```
-LAYOUT_60_ansi_arrow_split_bs_7u_spc
-┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
-│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
-├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤
-│ │ │ │ │ │ │ │ │ │ │ │ │ │ │
-├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤
-│ │ │ │ │ │ │ │ │ │ │ │ │ │
-├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤
-│ │ │ │ │ │ │ │ │ │ │ │ │ │
-├─────┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴──┬───┼───┼───┤
-│ │ │ │ │ │ │ │ │
-└─────┴───┴─────┴───────────────────────────┴───┴───┴───┴───┘
-```
+### `LAYOUT_60_ansi_split_bs_rshift`
+
+60% ANSI layout with split backspace and split right shift
```
-LAYOUT_60_ansi_split_bs_rshift
┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤
@@ -94,8 +95,11 @@ LAYOUT_60_ansi_split_bs_rshift
└────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
```
+### `LAYOUT_60_ansi_tsangan`
+
+60% ANSI layout with Tsangan bottom row
+
```
-LAYOUT_60_ansi_tsangan
┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │
├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
@@ -109,8 +113,29 @@ LAYOUT_60_ansi_tsangan
└─────┴───┴─────┴───────────────────────────┴─────┴───┴─────┘
```
+### `LAYOUT_60_ansi_tsangan_split_bs_rshift`
+
+60% ANSI layout with Tsangan bottom row, split backspace, and split right shift
+
+```
+┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
+│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
+├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤
+│ │ │ │ │ │ │ │ │ │ │ │ │ │ │
+├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤
+│ │ │ │ │ │ │ │ │ │ │ │ │ │
+├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤
+│ │ │ │ │ │ │ │ │ │ │ │ │ │
+├─────┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬───┬─┴───┤
+│ │ │ │ │ │ │ │
+└─────┴───┴─────┴───────────────────────────┴─────┴───┴─────┘
+```
+
+### `LAYOUT_60_ansi_wkl`
+
+60% ANSI layout with no Windows (GUI) keys
+
```
-LAYOUT_60_ansi_wkl
┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │
├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
@@ -124,8 +149,11 @@ LAYOUT_60_ansi_wkl
└─────┘ └─────┴───────────────────────────┴─────┘ └─────┘
```
+### `LAYOUT_60_ansi_wkl_split_bs_rshift`
+
+60% ANSI layout with no Windows (GUI) keys, split backspace, and split right shift
+
```
-LAYOUT_60_ansi_wkl_split_bs_rshift
┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤
@@ -139,8 +167,11 @@ LAYOUT_60_ansi_wkl_split_bs_rshift
└─────┘ └─────┴───────────────────────────┴─────┘ └─────┘
```
+### `LAYOUT_60_hhkb`
+
+60% ANSI layout with HHKB bottom row, split backspace, and split right shift
+
```
-LAYOUT_60_hhkb
┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤
@@ -154,8 +185,11 @@ LAYOUT_60_hhkb
└───┴─────┴───────────────────────────┴─────┴───┘
```
+### `LAYOUT_60_iso`
+
+60% ISO layout
+
```
-LAYOUT_60_iso
┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │
├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
@@ -169,8 +203,11 @@ LAYOUT_60_iso
└────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
```
+### `LAYOUT_60_iso_arrow`
+
+60% ISO layout with arrow cluster
+
```
-LAYOUT_60_iso_arrow
┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │
├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
@@ -184,8 +221,11 @@ LAYOUT_60_iso_arrow
└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘
```
+### `LAYOUT_60_iso_arrow_split_bs`
+
+60% ISO layout with arrow cluster and split backspace
+
```
-LAYOUT_60_iso_arrow_split_bs
┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤
@@ -199,8 +239,11 @@ LAYOUT_60_iso_arrow_split_bs
└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘
```
+### `LAYOUT_60_iso_split_bs_rshift`
+
+60% ISO layout with split backspace and split right shift
+
```
-LAYOUT_60_iso_split_bs_rshift
┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤
@@ -214,8 +257,11 @@ LAYOUT_60_iso_split_bs_rshift
└────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
```
+### `LAYOUT_60_iso_tsangan`
+
+60% ISO layout with Tsangan bottom row
+
```
-LAYOUT_60_iso_tsangan
┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │
├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
@@ -229,8 +275,11 @@ LAYOUT_60_iso_tsangan
└─────┴───┴─────┴───────────────────────────┴─────┴───┴─────┘
```
+### `LAYOUT_60_iso_tsangan_split_bs_rshift`
+
+60% ISO layout with Tsangan bottom row, split backspace, and split right shift
+
```
-LAYOUT_60_iso_tsangan_split_bs_rshift
┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤
@@ -244,8 +293,11 @@ LAYOUT_60_iso_tsangan_split_bs_rshift
└─────┴───┴─────┴───────────────────────────┴─────┴───┴─────┘
```
+### `LAYOUT_60_iso_wkl`
+
+60% ISO layout with no Windows (GUI) keys
+
```
-LAYOUT_60_iso_wkl
┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │
├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
@@ -259,8 +311,11 @@ LAYOUT_60_iso_wkl
└─────┘ └─────┴───────────────────────────┴─────┘ └─────┘
```
+### `LAYOUT_60_iso_wkl_split_bs_rshift`
+
+60% ISO layout with no Windows (GUI) keys, split backspace, and split right shift
+
```
-LAYOUT_60_iso_wkl_split_bs_rshift
┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤
@@ -274,8 +329,11 @@ LAYOUT_60_iso_wkl_split_bs_rshift
└─────┘ └─────┴───────────────────────────┴─────┘ └─────┘
```
+### `LAYOUT_60_jis`
+
+60% JIS layout
+
```
-LAYOUT_60_jis
┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤
@@ -289,23 +347,11 @@ LAYOUT_60_jis
└────┴────┴────┴────┴──────────────┴────┴────┴────┴────┴────┘
```
-```
-LAYOUT_60_tsangan_hhkb
-┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
-│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
-├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤
-│ │ │ │ │ │ │ │ │ │ │ │ │ │ │
-├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤
-│ │ │ │ │ │ │ │ │ │ │ │ │ │
-├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤
-│ │ │ │ │ │ │ │ │ │ │ │ │ │
-├─────┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬───┬─┴───┤
-│ │ │ │ │ │ │ │
-└─────┴───┴─────┴───────────────────────────┴─────┴───┴─────┘
-```
+### `LAYOUT_64_ansi`
+
+64% ANSI layout
```
-LAYOUT_64_ansi
┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │
├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
@@ -319,8 +365,11 @@ LAYOUT_64_ansi
└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘
```
+### `LAYOUT_64_iso`
+
+64% ISO layout
+
```
-LAYOUT_64_iso
┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │
├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
@@ -333,11 +382,16 @@ LAYOUT_64_iso
│ │ │ │ │ │ │ │ │ │
└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘
```
+
+
+
+65%+ Form Factor
-### 65%+ Form Factor
+### `LAYOUT_65_ansi`
+
+65% ANSI layout
```
-LAYOUT_65_ansi
┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤
@@ -351,8 +405,11 @@ LAYOUT_65_ansi
└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘
```
+### `LAYOUT_65_ansi_blocker`
+
+65% ANSI layout with blocker
+
```
-LAYOUT_65_ansi_blocker
┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤
@@ -366,8 +423,11 @@ LAYOUT_65_ansi_blocker
└────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘
```
+### `LAYOUT_65_ansi_blocker_split_bs`
+
+65% ANSI layout with blocker and split backspace
+
```
-LAYOUT_65_ansi_blocker_split_bs
┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤
@@ -381,8 +441,11 @@ LAYOUT_65_ansi_blocker_split_bs
└────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘
```
+### `LAYOUT_65_ansi_blocker_tsangan`
+
+65% ANSI layout with blocker and Tsangan bottom row
+
```
-LAYOUT_65_ansi_blocker_tsangan
┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤
@@ -396,8 +459,11 @@ LAYOUT_65_ansi_blocker_tsangan
└─────┴───┴─────┴───────────────────────────┴─────┘ └───┴───┴───┘
```
+### `LAYOUT_65_ansi_blocker_tsangan_split_bs`
+
+65% ANSI layout with blocker, Tsangan bottom row, and split backspace
+
```
-LAYOUT_65_ansi_blocker_tsangan_split_bs
┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤
@@ -411,8 +477,11 @@ LAYOUT_65_ansi_blocker_tsangan_split_bs
└─────┴───┴─────┴───────────────────────────┴─────┘ └───┴───┴───┘
```
+### `LAYOUT_65_ansi_split_bs`
+
+65% ANSI layout with split backspace
+
```
-LAYOUT_65_ansi_split_bs
┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤
@@ -426,8 +495,11 @@ LAYOUT_65_ansi_split_bs
└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘
```
+### `LAYOUT_65_iso`
+
+65% ISO layout
+
```
-LAYOUT_65_iso
┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤
@@ -441,8 +513,11 @@ LAYOUT_65_iso
└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘
```
+### `LAYOUT_65_iso_blocker`
+
+65% ISO layout with blocker
+
```
-LAYOUT_65_iso_blocker
┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤
@@ -456,8 +531,11 @@ LAYOUT_65_iso_blocker
└────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘
```
+### `LAYOUT_65_iso_blocker_split_bs`
+
+65% ISO layout with blocker and split backspace
+
```
-LAYOUT_65_iso_blocker_split_bs
┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤
@@ -471,8 +549,11 @@ LAYOUT_65_iso_blocker_split_bs
└────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘
```
+### `LAYOUT_65_iso_blocker_tsangan`
+
+65% ISO layout with blocker and Tsangan bottom row
+
```
-LAYOUT_65_iso_blocker_tsangan
┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤
@@ -486,8 +567,11 @@ LAYOUT_65_iso_blocker_tsangan
└─────┴───┴─────┴───────────────────────────┴─────┘ └───┴───┴───┘
```
+### `LAYOUT_65_iso_blocker_tsangan_split_bs`
+
+65% ISO layout with blocker, Tsangan bottom row, and split backspace
+
```
-LAYOUT_65_iso_blocker_tsangan_split_bs
┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤
@@ -501,8 +585,11 @@ LAYOUT_65_iso_blocker_tsangan_split_bs
└─────┴───┴─────┴───────────────────────────┴─────┘ └───┴───┴───┘
```
+### `LAYOUT_65_iso_split_bs`
+
+65% ISO layout with split backspace
+
```
-LAYOUT_65_iso_split_bs
┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤
@@ -516,8 +603,11 @@ LAYOUT_65_iso_split_bs
└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘
```
+### `LAYOUT_66_ansi`
+
+66% ANSI layout
+
```
-LAYOUT_66_ansi
┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┤
@@ -531,8 +621,11 @@ LAYOUT_66_ansi
└────┴───┴────┴────────────────────────┴────┴────┴────┴───┴───┴───┘
```
+### `LAYOUT_66_iso`
+
+66% ISO layout
+
```
-LAYOUT_66_iso
┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┤
@@ -546,8 +639,11 @@ LAYOUT_66_iso
└────┴───┴────┴────────────────────────┴────┴────┴────┴───┴───┴───┘
```
+### `LAYOUT_68_ansi`
+
+68% ANSI layout
+
```
-LAYOUT_68_ansi
┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐┌───┬───┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ ││ │ │
├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤├───┼───┤
@@ -561,8 +657,11 @@ LAYOUT_68_ansi
└────┴────┴────┴────────────────────────┴────┴────┴────┘ └───┴───┴───┘
```
+### `LAYOUT_68_iso`
+
+68% ISO layout
+
```
-LAYOUT_68_iso
┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐┌───┬───┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ ││ │ │
├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤├───┼───┤
@@ -575,11 +674,16 @@ LAYOUT_68_iso
│ │ │ │ │ │ │ │ │ │ │ │
└────┴────┴────┴────────────────────────┴────┴────┴────┘ └───┴───┴───┘
```
+
+
+
+75% Form Factor
-### 75% Form Factor
+### `LAYOUT_75_ansi`
+
+75% ANSI layout
```
-LAYOUT_75_ansi
┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┴───┼───┤
@@ -595,8 +699,11 @@ LAYOUT_75_ansi
└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘
```
+### `LAYOUT_75_iso`
+
+75% ISO layout
+
```
-LAYOUT_75_iso
┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┴───┼───┤
@@ -611,11 +718,16 @@ LAYOUT_75_iso
│ │ │ │ │ │ │ │ │ │ │
└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘
```
+
+
+
+Tenkeyless (TKL) Form Factor
-### Tenkeyless Layouts
+### `LAYOUT_tkl_ansi`
+
+TKL ANSI layout
```
-LAYOUT_tkl_ansi
┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
└───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
@@ -632,8 +744,11 @@ LAYOUT_tkl_ansi
└────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘
```
+### `LAYOUT_tkl_ansi_split_bs_rshift`
+
+TKL ANSI layout with split backspace and split right shift
+
```
-LAYOUT_tkl_ansi_split_bs_rshift
┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
└───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
@@ -650,8 +765,11 @@ LAYOUT_tkl_ansi_split_bs_rshift
└────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘
```
+### `LAYOUT_tkl_ansi_tsangan`
+
+TKL ANSI layout with Tsangan bottom row
+
```
-LAYOUT_tkl_ansi_tsangan
┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
└───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
@@ -668,8 +786,11 @@ LAYOUT_tkl_ansi_tsangan
└─────┴───┴─────┴───────────────────────────┴─────┴───┴─────┘ └───┴───┴───┘
```
+### `LAYOUT_tkl_ansi_tsangan_split_bs_rshift`
+
+TKL ANSI layout with Tsangan bottom row, split backspace, and split right shift
+
```
-LAYOUT_tkl_ansi_tsangan_split_bs_rshift
┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
└───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
@@ -686,8 +807,11 @@ LAYOUT_tkl_ansi_tsangan_split_bs_rshift
└─────┴───┴─────┴───────────────────────────┴─────┴───┴─────┘ └───┴───┴───┘
```
+### `LAYOUT_tkl_ansi_wkl`
+
+TKL ANSI layout with no Windows (GUI) keys
+
```
-LAYOUT_tkl_ansi_wkl
┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
└───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
@@ -704,8 +828,11 @@ LAYOUT_tkl_ansi_wkl
└─────┘ └─────┴───────────────────────────┴─────┘ └─────┘ └───┴───┴───┘
```
+### `LAYOUT_tkl_ansi_wkl_split_bs_rshift`
+
+TKL ANSI layout with no Windows (GUI) keys, split backspace, and split right shift
+
```
-LAYOUT_tkl_ansi_wkl_split_bs_rshift
┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
└───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
@@ -722,8 +849,11 @@ LAYOUT_tkl_ansi_wkl_split_bs_rshift
└─────┘ └─────┴───────────────────────────┴─────┘ └─────┘ └───┴───┴───┘
```
+### `LAYOUT_tkl_iso`
+
+TKL ISO layout
+
```
-LAYOUT_tkl_iso
┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
└───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
@@ -740,8 +870,11 @@ LAYOUT_tkl_iso
└────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘
```
+### `LAYOUT_tkl_iso_split_bs_rshift`
+
+TKL ISO layout with split backspace and split right shift
+
```
-LAYOUT_tkl_iso_split_bs_rshift
┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
└───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
@@ -758,8 +891,11 @@ LAYOUT_tkl_iso_split_bs_rshift
└────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘
```
+### `LAYOUT_tkl_iso_tsangan`
+
+TKL ISO layout with Tsangan bottom row
+
```
-LAYOUT_tkl_iso_tsangan
┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
└───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
@@ -776,8 +912,11 @@ LAYOUT_tkl_iso_tsangan
└─────┴───┴─────┴───────────────────────────┴─────┴───┴─────┘ └───┴───┴───┘
```
+### `LAYOUT_tkl_iso_tsangan_split_bs_rshift`
+
+TKL ISO layout with Tsangan bottom row, split backspace, and split right shift
+
```
-LAYOUT_tkl_iso_tsangan_split_bs_rshift
┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
└───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
@@ -794,8 +933,11 @@ LAYOUT_tkl_iso_tsangan_split_bs_rshift
└─────┴───┴─────┴───────────────────────────┴─────┴───┴─────┘ └───┴───┴───┘
```
+### `LAYOUT_tkl_iso_wkl`
+
+TKL ISO layout with no Windows (GUI) keys
+
```
-LAYOUT_tkl_iso_wkl
┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
└───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
@@ -812,8 +954,11 @@ LAYOUT_tkl_iso_wkl
└─────┘ └─────┴───────────────────────────┴─────┘ └─────┘ └───┴───┴───┘
```
+### `LAYOUT_tkl_iso_wkl_split_bs_rshift`
+
+TKL ISO layout with no Windows (GUI) keys, split backspace, and split right shift
+
```
-LAYOUT_tkl_iso_wkl_split_bs_rshift
┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
└───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
@@ -830,8 +975,11 @@ LAYOUT_tkl_iso_wkl_split_bs_rshift
└─────┘ └─────┴───────────────────────────┴─────┘ └─────┘ └───┴───┴───┘
```
+### `LAYOUT_tkl_jis`
+
+TKL JIS layout
+
```
-LAYOUT_tkl_jis
┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
└───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
@@ -848,8 +996,11 @@ LAYOUT_tkl_jis
└────┴────┴────┴────┴──────────────┴────┴────┴────┴────┴────┘ └───┴───┴───┘
```
+### `LAYOUT_tkl_f13_ansi`
+
+TKL ANSI layout with F13 key
+
```
-LAYOUT_tkl_f13_ansi
┌───┐┌───┬───┬───┬───┐┌───┬───┬───┬───┐┌───┬───┬───┬───┐┌───┐ ┌───┬───┬───┐
│ ││ │ │ │ ││ │ │ │ ││ │ │ │ ││ │ │ │ │ │
└───┘└───┴───┴───┴───┘└───┴───┴───┴───┘└───┴───┴───┴───┘└───┘ └───┴───┴───┘
@@ -866,8 +1017,11 @@ LAYOUT_tkl_f13_ansi
└────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘
```
+### `LAYOUT_tkl_f13_ansi_split_bs_rshift`
+
+TKL ANSI layout with F13 key, split backspace, and split right shift
+
```
-LAYOUT_tkl_f13_ansi_split_bs_rshift
┌───┐┌───┬───┬───┬───┐┌───┬───┬───┬───┐┌───┬───┬───┬───┐┌───┐ ┌───┬───┬───┐
│ ││ │ │ │ ││ │ │ │ ││ │ │ │ ││ │ │ │ │ │
└───┘└───┴───┴───┴───┘└───┴───┴───┴───┘└───┴───┴───┴───┘└───┘ └───┴───┴───┘
@@ -884,8 +1038,11 @@ LAYOUT_tkl_f13_ansi_split_bs_rshift
└────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘
```
+### `LAYOUT_tkl_f13_ansi_tsangan`
+
+TKL ANSI layout with F13 key and Tsangan bottom row
+
```
-LAYOUT_tkl_f13_ansi_tsangan
┌───┐┌───┬───┬───┬───┐┌───┬───┬───┬───┐┌───┬───┬───┬───┐┌───┐ ┌───┬───┬───┐
│ ││ │ │ │ ││ │ │ │ ││ │ │ │ ││ │ │ │ │ │
└───┘└───┴───┴───┴───┘└───┴───┴───┴───┘└───┴───┴───┴───┘└───┘ └───┴───┴───┘
@@ -902,8 +1059,11 @@ LAYOUT_tkl_f13_ansi_tsangan
└─────┴───┴─────┴───────────────────────────┴─────┴───┴─────┘ └───┴───┴───┘
```
+### `LAYOUT_tkl_f13_ansi_tsangan_split_bs_rshift`
+
+TKL ANSI layout with F13 key, Tsangan bottom row, split backspace, and split right shift
+
```
-LAYOUT_tkl_f13_ansi_tsangan_split_bs_rshift
┌───┐┌───┬───┬───┬───┐┌───┬───┬───┬───┐┌───┬───┬───┬───┐┌───┐ ┌───┬───┬───┐
│ ││ │ │ │ ││ │ │ │ ││ │ │ │ ││ │ │ │ │ │
└───┘└───┴───┴───┴───┘└───┴───┴───┴───┘└───┴───┴───┴───┘└───┘ └───┴───┴───┘
@@ -920,8 +1080,11 @@ LAYOUT_tkl_f13_ansi_tsangan_split_bs_rshift
└─────┴───┴─────┴───────────────────────────┴─────┴───┴─────┘ └───┴───┴───┘
```
+### `LAYOUT_tkl_f13_ansi_wkl`
+
+TKL ANSI layout with F13 key and no Windows (GUI) keys
+
```
-LAYOUT_tkl_f13_ansi_wkl
┌───┐┌───┬───┬───┬───┐┌───┬───┬───┬───┐┌───┬───┬───┬───┐┌───┐ ┌───┬───┬───┐
│ ││ │ │ │ ││ │ │ │ ││ │ │ │ ││ │ │ │ │ │
└───┘└───┴───┴───┴───┘└───┴───┴───┴───┘└───┴───┴───┴───┘└───┘ └───┴───┴───┘
@@ -938,8 +1101,11 @@ LAYOUT_tkl_f13_ansi_wkl
└─────┘ └─────┴───────────────────────────┴─────┘ └─────┘ └───┴───┴───┘
```
+### `LAYOUT_tkl_f13_ansi_wkl_split_bs_rshift`
+
+TKL ANSI layout with F13 key, no Windows (GUI) keys, split backspace, and split right shift
+
```
-LAYOUT_tkl_f13_ansi_wkl_split_bs_rshift
┌───┐┌───┬───┬───┬───┐┌───┬───┬───┬───┐┌───┬───┬───┬───┐┌───┐ ┌───┬───┬───┐
│ ││ │ │ │ ││ │ │ │ ││ │ │ │ ││ │ │ │ │ │
└───┘└───┴───┴───┴───┘└───┴───┴───┴───┘└───┴───┴───┴───┘└───┘ └───┴───┴───┘
@@ -956,8 +1122,11 @@ LAYOUT_tkl_f13_ansi_wkl_split_bs_rshift
└─────┘ └─────┴───────────────────────────┴─────┘ └─────┘ └───┴───┴───┘
```
+### `LAYOUT_tkl_f13_iso`
+
+TKL ISO layout with F13 key
+
```
-LAYOUT_tkl_f13_iso
┌───┐┌───┬───┬───┬───┐┌───┬───┬───┬───┐┌───┬───┬───┬───┐┌───┐ ┌───┬───┬───┐
│ ││ │ │ │ ││ │ │ │ ││ │ │ │ ││ │ │ │ │ │
└───┘└───┴───┴───┴───┘└───┴───┴───┴───┘└───┴───┴───┴───┘└───┘ └───┴───┴───┘
@@ -974,8 +1143,11 @@ LAYOUT_tkl_f13_iso
└────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘
```
+### `LAYOUT_tkl_f13_iso_split_bs_rshift`
+
+TKL ISO layout with F13 key, split backspace, and split right shift
+
```
-LAYOUT_tkl_f13_iso_split_bs_rshift
┌───┐┌───┬───┬───┬───┐┌───┬───┬───┬───┐┌───┬───┬───┬───┐┌───┐ ┌───┬───┬───┐
│ ││ │ │ │ ││ │ │ │ ││ │ │ │ ││ │ │ │ │ │
└───┘└───┴───┴───┴───┘└───┴───┴───┴───┘└───┴───┴───┴───┘└───┘ └───┴───┴───┘
@@ -992,8 +1164,11 @@ LAYOUT_tkl_f13_iso_split_bs_rshift
└────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘
```
+### `LAYOUT_tkl_f13_iso_tsangan`
+
+TKL ISO layout with F13 key and Tsangan bottom row
+
```
-LAYOUT_tkl_f13_iso_tsangan
┌───┐┌───┬───┬───┬───┐┌───┬───┬───┬───┐┌───┬───┬───┬───┐┌───┐ ┌───┬───┬───┐
│ ││ │ │ │ ││ │ │ │ ││ │ │ │ ││ │ │ │ │ │
└───┘└───┴───┴───┴───┘└───┴───┴───┴───┘└───┴───┴───┴───┘└───┘ └───┴───┴───┘
@@ -1010,8 +1185,11 @@ LAYOUT_tkl_f13_iso_tsangan
└─────┴───┴─────┴───────────────────────────┴─────┴───┴─────┘ └───┴───┴───┘
```
+### `LAYOUT_tkl_f13_iso_tsangan_split_bs_rshift`
+
+TKL ISO layout with F13 key, Tsangan bottom row, split backspace, and split right shift
+
```
-LAYOUT_tkl_f13_iso_tsangan_split_bs_rshift
┌───┐┌───┬───┬───┬───┐┌───┬───┬───┬───┐┌───┬───┬───┬───┐┌───┐ ┌───┬───┬───┐
│ ││ │ │ │ ││ │ │ │ ││ │ │ │ ││ │ │ │ │ │
└───┘└───┴───┴───┴───┘└───┴───┴───┴───┘└───┴───┴───┴───┘└───┘ └───┴───┴───┘
@@ -1028,8 +1206,11 @@ LAYOUT_tkl_f13_iso_tsangan_split_bs_rshift
└─────┴───┴─────┴───────────────────────────┴─────┴───┴─────┘ └───┴───┴───┘
```
+### `LAYOUT_tkl_f13_iso_wkl`
+
+TKL ISO layout with F13 key and no Windows (GUI) keys
+
```
-LAYOUT_tkl_f13_iso_wkl
┌───┐┌───┬───┬───┬───┐┌───┬───┬───┬───┐┌───┬───┬───┬───┐┌───┐ ┌───┬───┬───┐
│ ││ │ │ │ ││ │ │ │ ││ │ │ │ ││ │ │ │ │ │
└───┘└───┴───┴───┴───┘└───┴───┴───┴───┘└───┴───┴───┴───┘└───┘ └───┴───┴───┘
@@ -1046,8 +1227,11 @@ LAYOUT_tkl_f13_iso_wkl
└─────┘ └─────┴───────────────────────────┴─────┘ └─────┘ └───┴───┴───┘
```
+### `LAYOUT_tkl_f13_iso_wkl_split_bs_rshift`
+
+TKL ISO layout with F13 key, no Windows (GUI) keys, split backspace, and split right shift
+
```
-LAYOUT_tkl_f13_iso_wkl_split_bs_rshift
┌───┐┌───┬───┬───┬───┐┌───┬───┬───┬───┐┌───┬───┬───┬───┐┌───┐ ┌───┬───┬───┐
│ ││ │ │ │ ││ │ │ │ ││ │ │ │ ││ │ │ │ │ │
└───┘└───┴───┴───┴───┘└───┴───┴───┴───┘└───┴───┴───┴───┘└───┘ └───┴───┴───┘
@@ -1064,8 +1248,11 @@ LAYOUT_tkl_f13_iso_wkl_split_bs_rshift
└─────┘ └─────┴───────────────────────────┴─────┘ └─────┘ └───┴───┴───┘
```
+### `LAYOUT_tkl_f13_jis`
+
+TKL JIS layout with F13 key
+
```
-LAYOUT_tkl_f13_jis
┌───┐┌───┬───┬───┬───┐┌───┬───┬───┬───┐┌───┬───┬───┬───┐┌───┐ ┌───┬───┬───┐
│ ││ │ │ │ ││ │ │ │ ││ │ │ │ ││ │ │ │ │ │
└───┘└───┴───┴───┴───┘└───┴───┴───┴───┘└───┴───┴───┴───┘└───┘ └───┴───┴───┘
@@ -1082,8 +1269,11 @@ LAYOUT_tkl_f13_jis
└────┴────┴────┴────┴──────────────┴────┴────┴────┴────┴────┘ └───┴───┴───┘
```
+### `LAYOUT_tkl_nofrow_ansi`
+
+TKL ANSI layout with no function row
+
```
-LAYOUT_tkl_nofrow_ansi
┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤
@@ -1097,8 +1287,11 @@ LAYOUT_tkl_nofrow_ansi
└────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘
```
+### `LAYOUT_tkl_nofrow_iso`
+
+TKL ISO layout with no function row
+
```
-LAYOUT_tkl_nofrow_iso
┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤
@@ -1111,11 +1304,16 @@ LAYOUT_tkl_nofrow_iso
│ │ │ │ │ │ │ │ │ │ │ │ │
└────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘
```
+
+
+
+96% Form Factor
-### 96% Form Factor
+### `LAYOUT_96_ansi`
+
+96% ANSI layout
```
-LAYOUT_96_ansi
┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┴───┼───┼───┼───┼───┤
@@ -1131,8 +1329,11 @@ LAYOUT_96_ansi
└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┴───┴───┴───┘
```
+### `LAYOUT_96_iso`
+
+96% ISO layout
+
```
-LAYOUT_96_iso
┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┴───┼───┼───┼───┼───┤
@@ -1147,12 +1348,16 @@ LAYOUT_96_iso
│ │ │ │ │ │ │ │ │ │ │ │ │ │
└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┴───┴───┴───┘
```
+
+
+
+Fullsize (100%+) Form Factor
+### `LAYOUT_fullsize_ansi`
-### Fullsize Form Factor
+Fullsize ANSI layout
```
-LAYOUT_fullsize_ansi
┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
└───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
@@ -1169,8 +1374,11 @@ LAYOUT_fullsize_ansi
└────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘
```
+### `LAYOUT_fullsize_iso`
+
+Fullsize ISO layout
+
```
-LAYOUT_fullsize_iso
┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
└───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
@@ -1187,8 +1395,11 @@ LAYOUT_fullsize_iso
└────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘
```
+### `LAYOUT_fullsize_jis`
+
+Fullsize JIS layout
+
```
-LAYOUT_fullsize_jis
┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
└───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
@@ -1205,8 +1416,11 @@ LAYOUT_fullsize_jis
└────┴────┴────┴────┴────────────┴────┴────┴───┴───┴───┴────┘ └───┴───┴───┘ └───────┴───┴───┘
```
+### `LAYOUT_fullsize_extended_ansi`
+
+Fullsize ANSI layout with additional keys above numpad
+
```
-LAYOUT_fullsize_extended_ansi
┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
└───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ └───┴───┴───┴───┘
@@ -1223,8 +1437,11 @@ LAYOUT_fullsize_extended_ansi
└────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘
```
+### `LAYOUT_fullsize_extended_iso`
+
+Fullsize ISO layout with additional keys above numpad
+
```
-LAYOUT_fullsize_extended_iso
┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
└───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ └───┴───┴───┴───┘
@@ -1241,8 +1458,11 @@ LAYOUT_fullsize_extended_iso
└────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘
```
+### `LAYOUT_fullsize_extended_jis`
+
+Fullsize JIS layout with additional keys above numpad
+
```
-LAYOUT_fullsize_extended_jis
┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
└───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ └───┴───┴───┴───┘
@@ -1258,11 +1478,16 @@ LAYOUT_fullsize_extended_jis
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
└────┴────┴────┴────┴────────────┴────┴────┴───┴───┴───┴────┘ └───┴───┴───┘ └───────┴───┴───┘
```
+
+
+
+Split Layouts
-### Split Layouts
+### `LAYOUT_alice`
+
+Alice-style split layout
```
-LAYOUT_alice
┌───┐ ┌───┬───┬───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┬───┬───────┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
┌┴──┬┘ ┌┴───┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┘ ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┴┐
@@ -1276,8 +1501,11 @@ LAYOUT_alice
└─────┘ └─────┴───────┴─────┘ └──────────┴─────┘ └─────┘
```
+### `LAYOUT_alice_split_bs`
+
+Alice-style split layout with split backspace
+
```
-LAYOUT_alice_split_bs
┌───┐ ┌───┬───┬───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┬───┬───┬───┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
┌┴──┬┘ ┌┴───┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┘ ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┐
@@ -1291,8 +1519,11 @@ LAYOUT_alice_split_bs
└─────┘ └─────┴───────┴─────┘ └──────────┴─────┘ └─────┘
```
+### `LAYOUT_ergodox`
+
+Ergodox-style split layout
+
```
-LAYOUT_ergodox
┌─────┬───┬───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┬───┬─────┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
├─────┼───┼───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┼───┼─────┤
@@ -1311,8 +1542,11 @@ LAYOUT_ergodox
└───┴───┴───┘ └───┴───┴───┘
```
+### `LAYOUT_split_3x5_2`
+
+3x5 split layout with two thumb keys
+
```
-LAYOUT_split_3x5_2
┌───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┐
│ │ │ │ │ │ │ │ │ │ │ │
├───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┤
@@ -1325,8 +1559,11 @@ LAYOUT_split_3x5_2
└───┴───┘ └───┴───┘
```
+### `LAYOUT_split_3x5_3`
+
+3x5 split layout with three thumb keys
+
```
-LAYOUT_split_3x5_3
┌───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┐
│ │ │ │ │ │ │ │ │ │ │ │
├───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┤
@@ -1339,8 +1576,11 @@ LAYOUT_split_3x5_3
└───┴───┴───┘ └───┴───┴───┘
```
+### `LAYOUT_split_3x6_3`
+
+3x6 split layout with three thumb keys
+
```
-LAYOUT_split_3x6_3
┌───┬───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┬───┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │
├───┼───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┼───┤
@@ -1352,11 +1592,16 @@ LAYOUT_split_3x6_3
│ │ │ │ │ │ │ │
└───┴───┴───┘ └───┴───┴───┘
```
+
+
+
+Number Pads
-### Numpads
+### `LAYOUT_numpad_4x4`
+
+4x4 number pad
```
-LAYOUT_numpad_4x4
┌───┬───┬───┬───┐
│ │ │ │ │
├───┼───┼───┤ │
@@ -1368,8 +1613,11 @@ LAYOUT_numpad_4x4
└───────┴───┴───┘
```
+### `LAYOUT_numpad_5x4`
+
+5x4 number pad
+
```
-LAYOUT_numpad_5x4
┌───┬───┬───┬───┐
│ │ │ │ │
├───┼───┼───┼───┤
@@ -1383,8 +1631,11 @@ LAYOUT_numpad_5x4
└───────┴───┴───┘
```
+### `LAYOUT_numpad_5x6`
+
+5x6 number pad
+
```
-LAYOUT_numpad_5x6
┌───┬───┬───┬───┬───┬───┐
│ │ │ │ │ │ │
├───┼───┼───┼───┼───┼───┤
@@ -1398,8 +1649,11 @@ LAYOUT_numpad_5x6
└───┴───┴───────┴───┴───┘
```
+### `LAYOUT_numpad_6x4`
+
+6x4 number pad
+
```
-LAYOUT_numpad_6x4
┌───┬───┬───┬───┐
│ │ │ │ │
├───┼───┼───┼───┤
@@ -1415,8 +1669,11 @@ LAYOUT_numpad_6x4
└───────┴───┴───┘
```
+### `LAYOUT_numpad_6x5`
+
+6x5 number pad
+
```
-LAYOUT_numpad_6x5
┌───┬───┬───┬───┬───┐
│ │ │ │ │ │
├───┼───┼───┼───┼───┤
@@ -1431,18 +1688,26 @@ LAYOUT_numpad_6x5
│ │ │ │ │
└───┴───────┴───┴───┘
```
+
+
+
+Ortholinear Layouts
-### Ortholinear Layouts
+### `LAYOUT_ortho_1x1`
+
+1x1 ortholinear layout
```
-LAYOUT_ortho_1x1
┌───┐
│ │
└───┘
```
+### `LAYOUT_ortho_2x3`
+
+2x3 ortholinear layout
+
```
-LAYOUT_ortho_2x3
┌───┬───┬───┐
│ │ │ │
├───┼───┼───┤
@@ -1450,8 +1715,11 @@ LAYOUT_ortho_2x3
└───┴───┴───┘
```
+### `LAYOUT_ortho_2x6`
+
+2x6 ortholinear layout
+
```
-LAYOUT_ortho_2x6
┌───┬───┬───┬───┬───┬───┐
│ │ │ │ │ │ │
├───┼───┼───┼───┼───┼───┤
@@ -1459,8 +1727,11 @@ LAYOUT_ortho_2x6
└───┴───┴───┴───┴───┴───┘
```
+### `LAYOUT_ortho_3x3`
+
+3x3 ortholinear layout
+
```
-LAYOUT_ortho_3x3
┌───┬───┬───┐
│ │ │ │
├───┼───┼───┤
@@ -1470,8 +1741,11 @@ LAYOUT_ortho_3x3
└───┴───┴───┘
```
+### `LAYOUT_ortho_3x10`
+
+3x10 ortholinear layout
+
```
-LAYOUT_ortho_3x10
┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
│ │ │ │ │ │ │ │ │ │ │
├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
@@ -1481,8 +1755,11 @@ LAYOUT_ortho_3x10
└───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘
```
+### `LAYOUT_ortho_4x10`
+
+4x10 ortholinear layout
+
```
-LAYOUT_ortho_4x10
┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
│ │ │ │ │ │ │ │ │ │ │
├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
@@ -1494,8 +1771,11 @@ LAYOUT_ortho_4x10
└───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘
```
+### `LAYOUT_ortho_4x12`
+
+4x12 ortholinear layout
+
```
-LAYOUT_ortho_4x12
┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
│ │ │ │ │ │ │ │ │ │ │ │ │
├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
@@ -1507,8 +1787,11 @@ LAYOUT_ortho_4x12
└───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘
```
+### `LAYOUT_ortho_4x16`
+
+4x16 ortholinear layout
+
```
-LAYOUT_ortho_4x16
┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
@@ -1520,8 +1803,11 @@ LAYOUT_ortho_4x16
└───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘
```
+### `LAYOUT_ortho_4x4`
+
+4x4 ortholinear layout
+
```
-LAYOUT_ortho_4x4
┌───┬───┬───┬───┐
│ │ │ │ │
├───┼───┼───┼───┤
@@ -1533,8 +1819,11 @@ LAYOUT_ortho_4x4
└───┴───┴───┴───┘
```
+### `LAYOUT_ortho_4x6`
+
+4x6 ortholinear layout
+
```
-LAYOUT_ortho_4x6
┌───┬───┬───┬───┬───┬───┐
│ │ │ │ │ │ │
├───┼───┼───┼───┼───┼───┤
@@ -1546,8 +1835,11 @@ LAYOUT_ortho_4x6
└───┴───┴───┴───┴───┴───┘
```
+### `LAYOUT_ortho_5x5`
+
+5x5 ortholinear layout
+
```
-LAYOUT_ortho_5x5
┌───┬───┬───┬───┬───┐
│ │ │ │ │ │
├───┼───┼───┼───┼───┤
@@ -1561,8 +1853,11 @@ LAYOUT_ortho_5x5
└───┴───┴───┴───┴───┘
```
+### `LAYOUT_ortho_5x10`
+
+5x10 ortholinear layout
+
```
-LAYOUT_ortho_5x10
┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
│ │ │ │ │ │ │ │ │ │ │
├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
@@ -1576,8 +1871,11 @@ LAYOUT_ortho_5x10
└───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘
```
+### `LAYOUT_ortho_5x12`
+
+5x12 ortholinear layout
+
```
-LAYOUT_ortho_5x12
┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
│ │ │ │ │ │ │ │ │ │ │ │ │
├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
@@ -1591,8 +1889,11 @@ LAYOUT_ortho_5x12
└───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘
```
+### `LAYOUT_ortho_5x13`
+
+5x13 ortholinear layout
+
```
-LAYOUT_ortho_5x13
┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │
├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
@@ -1606,8 +1907,11 @@ LAYOUT_ortho_5x13
└───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘
```
+### `LAYOUT_ortho_5x14`
+
+5x14 ortholinear layout
+
```
-LAYOUT_ortho_5x14
┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │
├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
@@ -1621,8 +1925,11 @@ LAYOUT_ortho_5x14
└───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘
```
+### `LAYOUT_ortho_5x15`
+
+5x15 ortholinear layout
+
```
-LAYOUT_ortho_5x15
┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
@@ -1636,8 +1943,11 @@ LAYOUT_ortho_5x15
└───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘
```
+### `LAYOUT_ortho_5x4`
+
+5x4 ortholinear layout
+
```
-LAYOUT_ortho_5x4
┌───┬───┬───┬───┐
│ │ │ │ │
├───┼───┼───┼───┤
@@ -1651,8 +1961,11 @@ LAYOUT_ortho_5x4
└───┴───┴───┴───┘
```
+### `LAYOUT_ortho_6x4`
+
+6x4 ortholinear layout
+
```
-LAYOUT_ortho_6x4
┌───┬───┬───┬───┐
│ │ │ │ │
├───┼───┼───┼───┤
@@ -1668,8 +1981,11 @@ LAYOUT_ortho_6x4
└───┴───┴───┴───┘
```
+### `LAYOUT_ortho_6x13`
+
+6x13 ortholinear layout
+
```
-LAYOUT_ortho_6x13
┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │
├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
@@ -1685,8 +2001,11 @@ LAYOUT_ortho_6x13
└───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘
```
+### `LAYOUT_planck_mit`
+
+4x12 ortholinear layout with center 2u space
+
```
-LAYOUT_planck_mit
┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
│ │ │ │ │ │ │ │ │ │ │ │ │
├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
@@ -1697,3 +2016,4 @@ LAYOUT_planck_mit
│ │ │ │ │ │ │ │ │ │ │ │
└───┴───┴───┴───┴───┴───────┴───┴───┴───┴───┴───┘
```
+
diff --git a/lib/arm_atsam/packs/arm/cmsis/5.0.1/CMSIS/Include/arm_math.h b/lib/arm_atsam/packs/arm/cmsis/5.0.1/CMSIS/Include/arm_math.h
deleted file mode 100644
index 4be7e8c84889..000000000000
--- a/lib/arm_atsam/packs/arm/cmsis/5.0.1/CMSIS/Include/arm_math.h
+++ /dev/null
@@ -1,7226 +0,0 @@
-/* ----------------------------------------------------------------------
- * Project: CMSIS DSP Library
- * Title: arm_math.h
- * Description: Public header file for CMSIS DSP Library
- *
- * $Date: 27. January 2017
- * $Revision: V.1.5.1
- *
- * Target Processor: Cortex-M cores
- * -------------------------------------------------------------------- */
-/*
- * Copyright (C) 2010-2017 ARM Limited or its affiliates. All rights reserved.
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Licensed under the Apache License, Version 2.0 (the License); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- \mainpage CMSIS DSP Software Library
- *
- * Introduction
- * ------------
- *
- * This user manual describes the CMSIS DSP software library,
- * a suite of common signal processing functions for use on Cortex-M processor based devices.
- *
- * The library is divided into a number of functions each covering a specific category:
- * - Basic math functions
- * - Fast math functions
- * - Complex math functions
- * - Filters
- * - Matrix functions
- * - Transforms
- * - Motor control functions
- * - Statistical functions
- * - Support functions
- * - Interpolation functions
- *
- * The library has separate functions for operating on 8-bit integers, 16-bit integers,
- * 32-bit integer and 32-bit floating-point values.
- *
- * Using the Library
- * ------------
- *
- * The library installer contains prebuilt versions of the libraries in the Lib folder.
- * - arm_cortexM7lfdp_math.lib (Cortex-M7, Little endian, Double Precision Floating Point Unit)
- * - arm_cortexM7bfdp_math.lib (Cortex-M7, Big endian, Double Precision Floating Point Unit)
- * - arm_cortexM7lfsp_math.lib (Cortex-M7, Little endian, Single Precision Floating Point Unit)
- * - arm_cortexM7bfsp_math.lib (Cortex-M7, Big endian and Single Precision Floating Point Unit on)
- * - arm_cortexM7l_math.lib (Cortex-M7, Little endian)
- * - arm_cortexM7b_math.lib (Cortex-M7, Big endian)
- * - arm_cortexM4lf_math.lib (Cortex-M4, Little endian, Floating Point Unit)
- * - arm_cortexM4bf_math.lib (Cortex-M4, Big endian, Floating Point Unit)
- * - arm_cortexM4l_math.lib (Cortex-M4, Little endian)
- * - arm_cortexM4b_math.lib (Cortex-M4, Big endian)
- * - arm_cortexM3l_math.lib (Cortex-M3, Little endian)
- * - arm_cortexM3b_math.lib (Cortex-M3, Big endian)
- * - arm_cortexM0l_math.lib (Cortex-M0 / Cortex-M0+, Little endian)
- * - arm_cortexM0b_math.lib (Cortex-M0 / Cortex-M0+, Big endian)
- * - arm_ARMv8MBLl_math.lib (ARMv8M Baseline, Little endian)
- * - arm_ARMv8MMLl_math.lib (ARMv8M Mainline, Little endian)
- * - arm_ARMv8MMLlfsp_math.lib (ARMv8M Mainline, Little endian, Single Precision Floating Point Unit)
- * - arm_ARMv8MMLld_math.lib (ARMv8M Mainline, Little endian, DSP instructions)
- * - arm_ARMv8MMLldfsp_math.lib (ARMv8M Mainline, Little endian, DSP instructions, Single Precision Floating Point Unit)
- *
- * The library functions are declared in the public file arm_math.h which is placed in the Include folder.
- * Simply include this file and link the appropriate library in the application and begin calling the library functions. The Library supports single
- * public header file arm_math.h for Cortex-M cores with little endian and big endian. Same header file will be used for floating point unit(FPU) variants.
- * Define the appropriate pre processor MACRO ARM_MATH_CM7 or ARM_MATH_CM4 or ARM_MATH_CM3 or
- * ARM_MATH_CM0 or ARM_MATH_CM0PLUS depending on the target processor in the application.
- * For ARMv8M cores define pre processor MACRO ARM_MATH_ARMV8MBL or ARM_MATH_ARMV8MML.
- * Set Pre processor MACRO __DSP_PRESENT if ARMv8M Mainline core supports DSP instructions.
- *
- *
- * Examples
- * --------
- *
- * The library ships with a number of examples which demonstrate how to use the library functions.
- *
- * Toolchain Support
- * ------------
- *
- * The library has been developed and tested with MDK-ARM version 5.14.0.0
- * The library is being tested in GCC and IAR toolchains and updates on this activity will be made available shortly.
- *
- * Building the Library
- * ------------
- *
- * The library installer contains a project file to re build libraries on MDK-ARM Tool chain in the CMSIS\\DSP_Lib\\Source\\ARM folder.
- * - arm_cortexM_math.uvprojx
- *
- *
- * The libraries can be built by opening the arm_cortexM_math.uvprojx project in MDK-ARM, selecting a specific target, and defining the optional pre processor MACROs detailed above.
- *
- * Pre-processor Macros
- * ------------
- *
- * Each library project have differant pre-processor macros.
- *
- * - UNALIGNED_SUPPORT_DISABLE:
- *
- * Define macro UNALIGNED_SUPPORT_DISABLE, If the silicon does not support unaligned memory access
- *
- * - ARM_MATH_BIG_ENDIAN:
- *
- * Define macro ARM_MATH_BIG_ENDIAN to build the library for big endian targets. By default library builds for little endian targets.
- *
- * - ARM_MATH_MATRIX_CHECK:
- *
- * Define macro ARM_MATH_MATRIX_CHECK for checking on the input and output sizes of matrices
- *
- * - ARM_MATH_ROUNDING:
- *
- * Define macro ARM_MATH_ROUNDING for rounding on support functions
- *
- * - ARM_MATH_CMx:
- *
- * Define macro ARM_MATH_CM4 for building the library on Cortex-M4 target, ARM_MATH_CM3 for building library on Cortex-M3 target
- * and ARM_MATH_CM0 for building library on Cortex-M0 target, ARM_MATH_CM0PLUS for building library on Cortex-M0+ target, and
- * ARM_MATH_CM7 for building the library on cortex-M7.
- *
- * - ARM_MATH_ARMV8MxL:
- *
- * Define macro ARM_MATH_ARMV8MBL for building the library on ARMv8M Baseline target, ARM_MATH_ARMV8MBL for building library
- * on ARMv8M Mainline target.
- *
- * - __FPU_PRESENT:
- *
- * Initialize macro __FPU_PRESENT = 1 when building on FPU supported Targets. Enable this macro for floating point libraries.
- *
- * - __DSP_PRESENT:
- *
- * Initialize macro __DSP_PRESENT = 1 when ARMv8M Mainline core supports DSP instructions.
- *
- *
- * CMSIS-DSP in ARM::CMSIS Pack
- * -----------------------------
- *
- * The following files relevant to CMSIS-DSP are present in the ARM::CMSIS Pack directories:
- * |File/Folder |Content |
- * |------------------------------|------------------------------------------------------------------------|
- * |\b CMSIS\\Documentation\\DSP | This documentation |
- * |\b CMSIS\\DSP_Lib | Software license agreement (license.txt) |
- * |\b CMSIS\\DSP_Lib\\Examples | Example projects demonstrating the usage of the library functions |
- * |\b CMSIS\\DSP_Lib\\Source | Source files for rebuilding the library |
- *
- *
- * Revision History of CMSIS-DSP
- * ------------
- * Please refer to \ref ChangeLog_pg.
- *
- * Copyright Notice
- * ------------
- *
- * Copyright (C) 2010-2015 ARM Limited. All rights reserved.
- */
-
-
-/**
- * @defgroup groupMath Basic Math Functions
- */
-
-/**
- * @defgroup groupFastMath Fast Math Functions
- * This set of functions provides a fast approximation to sine, cosine, and square root.
- * As compared to most of the other functions in the CMSIS math library, the fast math functions
- * operate on individual values and not arrays.
- * There are separate functions for Q15, Q31, and floating-point data.
- *
- */
-
-/**
- * @defgroup groupCmplxMath Complex Math Functions
- * This set of functions operates on complex data vectors.
- * The data in the complex arrays is stored in an interleaved fashion
- * (real, imag, real, imag, ...).
- * In the API functions, the number of samples in a complex array refers
- * to the number of complex values; the array contains twice this number of
- * real values.
- */
-
-/**
- * @defgroup groupFilters Filtering Functions
- */
-
-/**
- * @defgroup groupMatrix Matrix Functions
- *
- * This set of functions provides basic matrix math operations.
- * The functions operate on matrix data structures. For example,
- * the type
- * definition for the floating-point matrix structure is shown
- * below:
- *
- * typedef struct
- * {
- * uint16_t numRows; // number of rows of the matrix.
- * uint16_t numCols; // number of columns of the matrix.
- * float32_t *pData; // points to the data of the matrix.
- * } arm_matrix_instance_f32;
- *
- * There are similar definitions for Q15 and Q31 data types.
- *
- * The structure specifies the size of the matrix and then points to
- * an array of data. The array is of size numRows X numCols
- * and the values are arranged in row order. That is, the
- * matrix element (i, j) is stored at:
- *
- * pData[i*numCols + j]
- *
- *
- * \par Init Functions
- * There is an associated initialization function for each type of matrix
- * data structure.
- * The initialization function sets the values of the internal structure fields.
- * Refer to the function arm_mat_init_f32(), arm_mat_init_q31()
- * and arm_mat_init_q15() for floating-point, Q31 and Q15 types, respectively.
- *
- * \par
- * Use of the initialization function is optional. However, if initialization function is used
- * then the instance structure cannot be placed into a const data section.
- * To place the instance structure in a const data
- * section, manually initialize the data structure. For example:
- *
- * arm_matrix_instance_f32 S = {nRows, nColumns, pData};
- * arm_matrix_instance_q31 S = {nRows, nColumns, pData};
- * arm_matrix_instance_q15 S = {nRows, nColumns, pData};
- *
- * where nRows specifies the number of rows, nColumns
- * specifies the number of columns, and pData points to the
- * data array.
- *
- * \par Size Checking
- * By default all of the matrix functions perform size checking on the input and
- * output matrices. For example, the matrix addition function verifies that the
- * two input matrices and the output matrix all have the same number of rows and
- * columns. If the size check fails the functions return:
- *
- * ARM_MATH_SIZE_MISMATCH
- *
- * Otherwise the functions return
- *
- * ARM_MATH_SUCCESS
- *
- * There is some overhead associated with this matrix size checking.
- * The matrix size checking is enabled via the \#define
- *
- * ARM_MATH_MATRIX_CHECK
- *
- * within the library project settings. By default this macro is defined
- * and size checking is enabled. By changing the project settings and
- * undefining this macro size checking is eliminated and the functions
- * run a bit faster. With size checking disabled the functions always
- * return ARM_MATH_SUCCESS.
- */
-
-/**
- * @defgroup groupTransforms Transform Functions
- */
-
-/**
- * @defgroup groupController Controller Functions
- */
-
-/**
- * @defgroup groupStats Statistics Functions
- */
-/**
- * @defgroup groupSupport Support Functions
- */
-
-/**
- * @defgroup groupInterpolation Interpolation Functions
- * These functions perform 1- and 2-dimensional interpolation of data.
- * Linear interpolation is used for 1-dimensional data and
- * bilinear interpolation is used for 2-dimensional data.
- */
-
-/**
- * @defgroup groupExamples Examples
- */
-#ifndef _ARM_MATH_H
-#define _ARM_MATH_H
-
-/* ignore some GCC warnings */
-#if defined ( __GNUC__ )
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wsign-conversion"
-#pragma GCC diagnostic ignored "-Wconversion"
-#pragma GCC diagnostic ignored "-Wunused-parameter"
-#endif
-
-#define __CMSIS_GENERIC /* disable NVIC and Systick functions */
-
-#if defined(ARM_MATH_CM7)
- #include "core_cm7.h"
- #define ARM_MATH_DSP
-#elif defined (ARM_MATH_CM4)
- #include "core_cm4.h"
- #define ARM_MATH_DSP
-#elif defined (ARM_MATH_CM3)
- #include "core_cm3.h"
-#elif defined (ARM_MATH_CM0)
- #include "core_cm0.h"
- #define ARM_MATH_CM0_FAMILY
-#elif defined (ARM_MATH_CM0PLUS)
- #include "core_cm0plus.h"
- #define ARM_MATH_CM0_FAMILY
-#elif defined (ARM_MATH_ARMV8MBL)
- #include "core_armv8mbl.h"
- #define ARM_MATH_CM0_FAMILY
-#elif defined (ARM_MATH_ARMV8MML)
- #include "core_armv8mml.h"
- #if (defined (__DSP_PRESENT) && (__DSP_PRESENT == 1))
- #define ARM_MATH_DSP
- #endif
-#else
- #error "Define according the used Cortex core ARM_MATH_CM7, ARM_MATH_CM4, ARM_MATH_CM3, ARM_MATH_CM0PLUS, ARM_MATH_CM0, ARM_MATH_ARMV8MBL, ARM_MATH_ARMV8MML"
-#endif
-
-#undef __CMSIS_GENERIC /* enable NVIC and Systick functions */
-#include "string.h"
-#include "math.h"
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-
- /**
- * @brief Macros required for reciprocal calculation in Normalized LMS
- */
-
-#define DELTA_Q31 (0x100)
-#define DELTA_Q15 0x5
-#define INDEX_MASK 0x0000003F
-#ifndef PI
- #define PI 3.14159265358979f
-#endif
-
- /**
- * @brief Macros required for SINE and COSINE Fast math approximations
- */
-
-#define FAST_MATH_TABLE_SIZE 512
-#define FAST_MATH_Q31_SHIFT (32 - 10)
-#define FAST_MATH_Q15_SHIFT (16 - 10)
-#define CONTROLLER_Q31_SHIFT (32 - 9)
-#define TABLE_SPACING_Q31 0x400000
-#define TABLE_SPACING_Q15 0x80
-
- /**
- * @brief Macros required for SINE and COSINE Controller functions
- */
- /* 1.31(q31) Fixed value of 2/360 */
- /* -1 to +1 is divided into 360 values so total spacing is (2/360) */
-#define INPUT_SPACING 0xB60B61
-
- /**
- * @brief Macro for Unaligned Support
- */
-#ifndef UNALIGNED_SUPPORT_DISABLE
- #define ALIGN4
-#else
- #if defined (__GNUC__)
- #define ALIGN4 __attribute__((aligned(4)))
- #else
- #define ALIGN4 __align(4)
- #endif
-#endif /* #ifndef UNALIGNED_SUPPORT_DISABLE */
-
- /**
- * @brief Error status returned by some functions in the library.
- */
-
- typedef enum
- {
- ARM_MATH_SUCCESS = 0, /**< No error */
- ARM_MATH_ARGUMENT_ERROR = -1, /**< One or more arguments are incorrect */
- ARM_MATH_LENGTH_ERROR = -2, /**< Length of data buffer is incorrect */
- ARM_MATH_SIZE_MISMATCH = -3, /**< Size of matrices is not compatible with the operation. */
- ARM_MATH_NANINF = -4, /**< Not-a-number (NaN) or infinity is generated */
- ARM_MATH_SINGULAR = -5, /**< Generated by matrix inversion if the input matrix is singular and cannot be inverted. */
- ARM_MATH_TEST_FAILURE = -6 /**< Test Failed */
- } arm_status;
-
- /**
- * @brief 8-bit fractional data type in 1.7 format.
- */
- typedef int8_t q7_t;
-
- /**
- * @brief 16-bit fractional data type in 1.15 format.
- */
- typedef int16_t q15_t;
-
- /**
- * @brief 32-bit fractional data type in 1.31 format.
- */
- typedef int32_t q31_t;
-
- /**
- * @brief 64-bit fractional data type in 1.63 format.
- */
- typedef int64_t q63_t;
-
- /**
- * @brief 32-bit floating-point type definition.
- */
- typedef float float32_t;
-
- /**
- * @brief 64-bit floating-point type definition.
- */
- typedef double float64_t;
-
- /**
- * @brief definition to read/write two 16 bit values.
- */
-#if defined ( __CC_ARM )
- #define __SIMD32_TYPE int32_t __packed
- #define CMSIS_UNUSED __attribute__((unused))
- #define CMSIS_INLINE __attribute__((always_inline))
-
-#elif defined ( __ARMCC_VERSION ) && ( __ARMCC_VERSION >= 6010050 )
- #define __SIMD32_TYPE int32_t
- #define CMSIS_UNUSED __attribute__((unused))
- #define CMSIS_INLINE __attribute__((always_inline))
-
-#elif defined ( __GNUC__ )
- #define __SIMD32_TYPE int32_t
- #define CMSIS_UNUSED __attribute__((unused))
- #define CMSIS_INLINE __attribute__((always_inline))
-
-#elif defined ( __ICCARM__ )
- #define __SIMD32_TYPE int32_t __packed
- #define CMSIS_UNUSED
- #define CMSIS_INLINE
-
-#elif defined ( __TI_ARM__ )
- #define __SIMD32_TYPE int32_t
- #define CMSIS_UNUSED __attribute__((unused))
- #define CMSIS_INLINE
-
-#elif defined ( __CSMC__ )
- #define __SIMD32_TYPE int32_t
- #define CMSIS_UNUSED
- #define CMSIS_INLINE
-
-#elif defined ( __TASKING__ )
- #define __SIMD32_TYPE __unaligned int32_t
- #define CMSIS_UNUSED
- #define CMSIS_INLINE
-
-#else
- #error Unknown compiler
-#endif
-
-#define __SIMD32(addr) (*(__SIMD32_TYPE **) & (addr))
-#define __SIMD32_CONST(addr) ((__SIMD32_TYPE *)(addr))
-#define _SIMD32_OFFSET(addr) (*(__SIMD32_TYPE *) (addr))
-#define __SIMD64(addr) (*(int64_t **) & (addr))
-
-/* #if defined (ARM_MATH_CM3) || defined (ARM_MATH_CM0_FAMILY) */
-#if !defined (ARM_MATH_DSP)
- /**
- * @brief definition to pack two 16 bit values.
- */
-#define __PKHBT(ARG1, ARG2, ARG3) ( (((int32_t)(ARG1) << 0) & (int32_t)0x0000FFFF) | \
- (((int32_t)(ARG2) << ARG3) & (int32_t)0xFFFF0000) )
-#define __PKHTB(ARG1, ARG2, ARG3) ( (((int32_t)(ARG1) << 0) & (int32_t)0xFFFF0000) | \
- (((int32_t)(ARG2) >> ARG3) & (int32_t)0x0000FFFF) )
-
-/* #endif // defined (ARM_MATH_CM3) || defined (ARM_MATH_CM0_FAMILY) */
-#endif /* !defined (ARM_MATH_DSP) */
-
- /**
- * @brief definition to pack four 8 bit values.
- */
-#ifndef ARM_MATH_BIG_ENDIAN
-
-#define __PACKq7(v0,v1,v2,v3) ( (((int32_t)(v0) << 0) & (int32_t)0x000000FF) | \
- (((int32_t)(v1) << 8) & (int32_t)0x0000FF00) | \
- (((int32_t)(v2) << 16) & (int32_t)0x00FF0000) | \
- (((int32_t)(v3) << 24) & (int32_t)0xFF000000) )
-#else
-
-#define __PACKq7(v0,v1,v2,v3) ( (((int32_t)(v3) << 0) & (int32_t)0x000000FF) | \
- (((int32_t)(v2) << 8) & (int32_t)0x0000FF00) | \
- (((int32_t)(v1) << 16) & (int32_t)0x00FF0000) | \
- (((int32_t)(v0) << 24) & (int32_t)0xFF000000) )
-
-#endif
-
-
- /**
- * @brief Clips Q63 to Q31 values.
- */
- CMSIS_INLINE __STATIC_INLINE q31_t clip_q63_to_q31(
- q63_t x)
- {
- return ((q31_t) (x >> 32) != ((q31_t) x >> 31)) ?
- ((0x7FFFFFFF ^ ((q31_t) (x >> 63)))) : (q31_t) x;
- }
-
- /**
- * @brief Clips Q63 to Q15 values.
- */
- CMSIS_INLINE __STATIC_INLINE q15_t clip_q63_to_q15(
- q63_t x)
- {
- return ((q31_t) (x >> 32) != ((q31_t) x >> 31)) ?
- ((0x7FFF ^ ((q15_t) (x >> 63)))) : (q15_t) (x >> 15);
- }
-
- /**
- * @brief Clips Q31 to Q7 values.
- */
- CMSIS_INLINE __STATIC_INLINE q7_t clip_q31_to_q7(
- q31_t x)
- {
- return ((q31_t) (x >> 24) != ((q31_t) x >> 23)) ?
- ((0x7F ^ ((q7_t) (x >> 31)))) : (q7_t) x;
- }
-
- /**
- * @brief Clips Q31 to Q15 values.
- */
- CMSIS_INLINE __STATIC_INLINE q15_t clip_q31_to_q15(
- q31_t x)
- {
- return ((q31_t) (x >> 16) != ((q31_t) x >> 15)) ?
- ((0x7FFF ^ ((q15_t) (x >> 31)))) : (q15_t) x;
- }
-
- /**
- * @brief Multiplies 32 X 64 and returns 32 bit result in 2.30 format.
- */
-
- CMSIS_INLINE __STATIC_INLINE q63_t mult32x64(
- q63_t x,
- q31_t y)
- {
- return ((((q63_t) (x & 0x00000000FFFFFFFF) * y) >> 32) +
- (((q63_t) (x >> 32) * y)));
- }
-
-/*
- #if defined (ARM_MATH_CM0_FAMILY) && defined ( __CC_ARM )
- #define __CLZ __clz
- #endif
- */
-/* note: function can be removed when all toolchain support __CLZ for Cortex-M0 */
-#if defined (ARM_MATH_CM0_FAMILY) && ((defined (__ICCARM__)) )
- CMSIS_INLINE __STATIC_INLINE uint32_t __CLZ(
- q31_t data);
-
- CMSIS_INLINE __STATIC_INLINE uint32_t __CLZ(
- q31_t data)
- {
- uint32_t count = 0;
- uint32_t mask = 0x80000000;
-
- while ((data & mask) == 0)
- {
- count += 1u;
- mask = mask >> 1u;
- }
-
- return (count);
- }
-#endif
-
- /**
- * @brief Function to Calculates 1/in (reciprocal) value of Q31 Data type.
- */
-
- CMSIS_INLINE __STATIC_INLINE uint32_t arm_recip_q31(
- q31_t in,
- q31_t * dst,
- q31_t * pRecipTable)
- {
- q31_t out;
- uint32_t tempVal;
- uint32_t index, i;
- uint32_t signBits;
-
- if (in > 0)
- {
- signBits = ((uint32_t) (__CLZ( in) - 1));
- }
- else
- {
- signBits = ((uint32_t) (__CLZ(-in) - 1));
- }
-
- /* Convert input sample to 1.31 format */
- in = (in << signBits);
-
- /* calculation of index for initial approximated Val */
- index = (uint32_t)(in >> 24);
- index = (index & INDEX_MASK);
-
- /* 1.31 with exp 1 */
- out = pRecipTable[index];
-
- /* calculation of reciprocal value */
- /* running approximation for two iterations */
- for (i = 0u; i < 2u; i++)
- {
- tempVal = (uint32_t) (((q63_t) in * out) >> 31);
- tempVal = 0x7FFFFFFFu - tempVal;
- /* 1.31 with exp 1 */
- /* out = (q31_t) (((q63_t) out * tempVal) >> 30); */
- out = clip_q63_to_q31(((q63_t) out * tempVal) >> 30);
- }
-
- /* write output */
- *dst = out;
-
- /* return num of signbits of out = 1/in value */
- return (signBits + 1u);
- }
-
-
- /**
- * @brief Function to Calculates 1/in (reciprocal) value of Q15 Data type.
- */
- CMSIS_INLINE __STATIC_INLINE uint32_t arm_recip_q15(
- q15_t in,
- q15_t * dst,
- q15_t * pRecipTable)
- {
- q15_t out = 0;
- uint32_t tempVal = 0;
- uint32_t index = 0, i = 0;
- uint32_t signBits = 0;
-
- if (in > 0)
- {
- signBits = ((uint32_t)(__CLZ( in) - 17));
- }
- else
- {
- signBits = ((uint32_t)(__CLZ(-in) - 17));
- }
-
- /* Convert input sample to 1.15 format */
- in = (in << signBits);
-
- /* calculation of index for initial approximated Val */
- index = (uint32_t)(in >> 8);
- index = (index & INDEX_MASK);
-
- /* 1.15 with exp 1 */
- out = pRecipTable[index];
-
- /* calculation of reciprocal value */
- /* running approximation for two iterations */
- for (i = 0u; i < 2u; i++)
- {
- tempVal = (uint32_t) (((q31_t) in * out) >> 15);
- tempVal = 0x7FFFu - tempVal;
- /* 1.15 with exp 1 */
- out = (q15_t) (((q31_t) out * tempVal) >> 14);
- /* out = clip_q31_to_q15(((q31_t) out * tempVal) >> 14); */
- }
-
- /* write output */
- *dst = out;
-
- /* return num of signbits of out = 1/in value */
- return (signBits + 1);
- }
-
-
- /*
- * @brief C custom defined intrinisic function for only M0 processors
- */
-#if defined(ARM_MATH_CM0_FAMILY)
- CMSIS_INLINE __STATIC_INLINE q31_t __SSAT(
- q31_t x,
- uint32_t y)
- {
- int32_t posMax, negMin;
- uint32_t i;
-
- posMax = 1;
- for (i = 0; i < (y - 1); i++)
- {
- posMax = posMax * 2;
- }
-
- if (x > 0)
- {
- posMax = (posMax - 1);
-
- if (x > posMax)
- {
- x = posMax;
- }
- }
- else
- {
- negMin = -posMax;
-
- if (x < negMin)
- {
- x = negMin;
- }
- }
- return (x);
- }
-#endif /* end of ARM_MATH_CM0_FAMILY */
-
-
- /*
- * @brief C custom defined intrinsic function for M3 and M0 processors
- */
-/* #if defined (ARM_MATH_CM3) || defined (ARM_MATH_CM0_FAMILY) */
-#if !defined (ARM_MATH_DSP)
-
- /*
- * @brief C custom defined QADD8 for M3 and M0 processors
- */
- CMSIS_INLINE __STATIC_INLINE uint32_t __QADD8(
- uint32_t x,
- uint32_t y)
- {
- q31_t r, s, t, u;
-
- r = __SSAT(((((q31_t)x << 24) >> 24) + (((q31_t)y << 24) >> 24)), 8) & (int32_t)0x000000FF;
- s = __SSAT(((((q31_t)x << 16) >> 24) + (((q31_t)y << 16) >> 24)), 8) & (int32_t)0x000000FF;
- t = __SSAT(((((q31_t)x << 8) >> 24) + (((q31_t)y << 8) >> 24)), 8) & (int32_t)0x000000FF;
- u = __SSAT(((((q31_t)x ) >> 24) + (((q31_t)y ) >> 24)), 8) & (int32_t)0x000000FF;
-
- return ((uint32_t)((u << 24) | (t << 16) | (s << 8) | (r )));
- }
-
-
- /*
- * @brief C custom defined QSUB8 for M3 and M0 processors
- */
- CMSIS_INLINE __STATIC_INLINE uint32_t __QSUB8(
- uint32_t x,
- uint32_t y)
- {
- q31_t r, s, t, u;
-
- r = __SSAT(((((q31_t)x << 24) >> 24) - (((q31_t)y << 24) >> 24)), 8) & (int32_t)0x000000FF;
- s = __SSAT(((((q31_t)x << 16) >> 24) - (((q31_t)y << 16) >> 24)), 8) & (int32_t)0x000000FF;
- t = __SSAT(((((q31_t)x << 8) >> 24) - (((q31_t)y << 8) >> 24)), 8) & (int32_t)0x000000FF;
- u = __SSAT(((((q31_t)x ) >> 24) - (((q31_t)y ) >> 24)), 8) & (int32_t)0x000000FF;
-
- return ((uint32_t)((u << 24) | (t << 16) | (s << 8) | (r )));
- }
-
-
- /*
- * @brief C custom defined QADD16 for M3 and M0 processors
- */
- CMSIS_INLINE __STATIC_INLINE uint32_t __QADD16(
- uint32_t x,
- uint32_t y)
- {
-/* q31_t r, s; without initialisation 'arm_offset_q15 test' fails but 'intrinsic' tests pass! for armCC */
- q31_t r = 0, s = 0;
-
- r = __SSAT(((((q31_t)x << 16) >> 16) + (((q31_t)y << 16) >> 16)), 16) & (int32_t)0x0000FFFF;
- s = __SSAT(((((q31_t)x ) >> 16) + (((q31_t)y ) >> 16)), 16) & (int32_t)0x0000FFFF;
-
- return ((uint32_t)((s << 16) | (r )));
- }
-
-
- /*
- * @brief C custom defined SHADD16 for M3 and M0 processors
- */
- CMSIS_INLINE __STATIC_INLINE uint32_t __SHADD16(
- uint32_t x,
- uint32_t y)
- {
- q31_t r, s;
-
- r = (((((q31_t)x << 16) >> 16) + (((q31_t)y << 16) >> 16)) >> 1) & (int32_t)0x0000FFFF;
- s = (((((q31_t)x ) >> 16) + (((q31_t)y ) >> 16)) >> 1) & (int32_t)0x0000FFFF;
-
- return ((uint32_t)((s << 16) | (r )));
- }
-
-
- /*
- * @brief C custom defined QSUB16 for M3 and M0 processors
- */
- CMSIS_INLINE __STATIC_INLINE uint32_t __QSUB16(
- uint32_t x,
- uint32_t y)
- {
- q31_t r, s;
-
- r = __SSAT(((((q31_t)x << 16) >> 16) - (((q31_t)y << 16) >> 16)), 16) & (int32_t)0x0000FFFF;
- s = __SSAT(((((q31_t)x ) >> 16) - (((q31_t)y ) >> 16)), 16) & (int32_t)0x0000FFFF;
-
- return ((uint32_t)((s << 16) | (r )));
- }
-
-
- /*
- * @brief C custom defined SHSUB16 for M3 and M0 processors
- */
- CMSIS_INLINE __STATIC_INLINE uint32_t __SHSUB16(
- uint32_t x,
- uint32_t y)
- {
- q31_t r, s;
-
- r = (((((q31_t)x << 16) >> 16) - (((q31_t)y << 16) >> 16)) >> 1) & (int32_t)0x0000FFFF;
- s = (((((q31_t)x ) >> 16) - (((q31_t)y ) >> 16)) >> 1) & (int32_t)0x0000FFFF;
-
- return ((uint32_t)((s << 16) | (r )));
- }
-
-
- /*
- * @brief C custom defined QASX for M3 and M0 processors
- */
- CMSIS_INLINE __STATIC_INLINE uint32_t __QASX(
- uint32_t x,
- uint32_t y)
- {
- q31_t r, s;
-
- r = __SSAT(((((q31_t)x << 16) >> 16) - (((q31_t)y ) >> 16)), 16) & (int32_t)0x0000FFFF;
- s = __SSAT(((((q31_t)x ) >> 16) + (((q31_t)y << 16) >> 16)), 16) & (int32_t)0x0000FFFF;
-
- return ((uint32_t)((s << 16) | (r )));
- }
-
-
- /*
- * @brief C custom defined SHASX for M3 and M0 processors
- */
- CMSIS_INLINE __STATIC_INLINE uint32_t __SHASX(
- uint32_t x,
- uint32_t y)
- {
- q31_t r, s;
-
- r = (((((q31_t)x << 16) >> 16) - (((q31_t)y ) >> 16)) >> 1) & (int32_t)0x0000FFFF;
- s = (((((q31_t)x ) >> 16) + (((q31_t)y << 16) >> 16)) >> 1) & (int32_t)0x0000FFFF;
-
- return ((uint32_t)((s << 16) | (r )));
- }
-
-
- /*
- * @brief C custom defined QSAX for M3 and M0 processors
- */
- CMSIS_INLINE __STATIC_INLINE uint32_t __QSAX(
- uint32_t x,
- uint32_t y)
- {
- q31_t r, s;
-
- r = __SSAT(((((q31_t)x << 16) >> 16) + (((q31_t)y ) >> 16)), 16) & (int32_t)0x0000FFFF;
- s = __SSAT(((((q31_t)x ) >> 16) - (((q31_t)y << 16) >> 16)), 16) & (int32_t)0x0000FFFF;
-
- return ((uint32_t)((s << 16) | (r )));
- }
-
-
- /*
- * @brief C custom defined SHSAX for M3 and M0 processors
- */
- CMSIS_INLINE __STATIC_INLINE uint32_t __SHSAX(
- uint32_t x,
- uint32_t y)
- {
- q31_t r, s;
-
- r = (((((q31_t)x << 16) >> 16) + (((q31_t)y ) >> 16)) >> 1) & (int32_t)0x0000FFFF;
- s = (((((q31_t)x ) >> 16) - (((q31_t)y << 16) >> 16)) >> 1) & (int32_t)0x0000FFFF;
-
- return ((uint32_t)((s << 16) | (r )));
- }
-
-
- /*
- * @brief C custom defined SMUSDX for M3 and M0 processors
- */
- CMSIS_INLINE __STATIC_INLINE uint32_t __SMUSDX(
- uint32_t x,
- uint32_t y)
- {
- return ((uint32_t)(((((q31_t)x << 16) >> 16) * (((q31_t)y ) >> 16)) -
- ((((q31_t)x ) >> 16) * (((q31_t)y << 16) >> 16)) ));
- }
-
- /*
- * @brief C custom defined SMUADX for M3 and M0 processors
- */
- CMSIS_INLINE __STATIC_INLINE uint32_t __SMUADX(
- uint32_t x,
- uint32_t y)
- {
- return ((uint32_t)(((((q31_t)x << 16) >> 16) * (((q31_t)y ) >> 16)) +
- ((((q31_t)x ) >> 16) * (((q31_t)y << 16) >> 16)) ));
- }
-
-
- /*
- * @brief C custom defined QADD for M3 and M0 processors
- */
- CMSIS_INLINE __STATIC_INLINE int32_t __QADD(
- int32_t x,
- int32_t y)
- {
- return ((int32_t)(clip_q63_to_q31((q63_t)x + (q31_t)y)));
- }
-
-
- /*
- * @brief C custom defined QSUB for M3 and M0 processors
- */
- CMSIS_INLINE __STATIC_INLINE int32_t __QSUB(
- int32_t x,
- int32_t y)
- {
- return ((int32_t)(clip_q63_to_q31((q63_t)x - (q31_t)y)));
- }
-
-
- /*
- * @brief C custom defined SMLAD for M3 and M0 processors
- */
- CMSIS_INLINE __STATIC_INLINE uint32_t __SMLAD(
- uint32_t x,
- uint32_t y,
- uint32_t sum)
- {
- return ((uint32_t)(((((q31_t)x << 16) >> 16) * (((q31_t)y << 16) >> 16)) +
- ((((q31_t)x ) >> 16) * (((q31_t)y ) >> 16)) +
- ( ((q31_t)sum ) ) ));
- }
-
-
- /*
- * @brief C custom defined SMLADX for M3 and M0 processors
- */
- CMSIS_INLINE __STATIC_INLINE uint32_t __SMLADX(
- uint32_t x,
- uint32_t y,
- uint32_t sum)
- {
- return ((uint32_t)(((((q31_t)x << 16) >> 16) * (((q31_t)y ) >> 16)) +
- ((((q31_t)x ) >> 16) * (((q31_t)y << 16) >> 16)) +
- ( ((q31_t)sum ) ) ));
- }
-
-
- /*
- * @brief C custom defined SMLSDX for M3 and M0 processors
- */
- CMSIS_INLINE __STATIC_INLINE uint32_t __SMLSDX(
- uint32_t x,
- uint32_t y,
- uint32_t sum)
- {
- return ((uint32_t)(((((q31_t)x << 16) >> 16) * (((q31_t)y ) >> 16)) -
- ((((q31_t)x ) >> 16) * (((q31_t)y << 16) >> 16)) +
- ( ((q31_t)sum ) ) ));
- }
-
-
- /*
- * @brief C custom defined SMLALD for M3 and M0 processors
- */
- CMSIS_INLINE __STATIC_INLINE uint64_t __SMLALD(
- uint32_t x,
- uint32_t y,
- uint64_t sum)
- {
-/* return (sum + ((q15_t) (x >> 16) * (q15_t) (y >> 16)) + ((q15_t) x * (q15_t) y)); */
- return ((uint64_t)(((((q31_t)x << 16) >> 16) * (((q31_t)y << 16) >> 16)) +
- ((((q31_t)x ) >> 16) * (((q31_t)y ) >> 16)) +
- ( ((q63_t)sum ) ) ));
- }
-
-
- /*
- * @brief C custom defined SMLALDX for M3 and M0 processors
- */
- CMSIS_INLINE __STATIC_INLINE uint64_t __SMLALDX(
- uint32_t x,
- uint32_t y,
- uint64_t sum)
- {
-/* return (sum + ((q15_t) (x >> 16) * (q15_t) y)) + ((q15_t) x * (q15_t) (y >> 16)); */
- return ((uint64_t)(((((q31_t)x << 16) >> 16) * (((q31_t)y ) >> 16)) +
- ((((q31_t)x ) >> 16) * (((q31_t)y << 16) >> 16)) +
- ( ((q63_t)sum ) ) ));
- }
-
-
- /*
- * @brief C custom defined SMUAD for M3 and M0 processors
- */
- CMSIS_INLINE __STATIC_INLINE uint32_t __SMUAD(
- uint32_t x,
- uint32_t y)
- {
- return ((uint32_t)(((((q31_t)x << 16) >> 16) * (((q31_t)y << 16) >> 16)) +
- ((((q31_t)x ) >> 16) * (((q31_t)y ) >> 16)) ));
- }
-
-
- /*
- * @brief C custom defined SMUSD for M3 and M0 processors
- */
- CMSIS_INLINE __STATIC_INLINE uint32_t __SMUSD(
- uint32_t x,
- uint32_t y)
- {
- return ((uint32_t)(((((q31_t)x << 16) >> 16) * (((q31_t)y << 16) >> 16)) -
- ((((q31_t)x ) >> 16) * (((q31_t)y ) >> 16)) ));
- }
-
-
- /*
- * @brief C custom defined SXTB16 for M3 and M0 processors
- */
- CMSIS_INLINE __STATIC_INLINE uint32_t __SXTB16(
- uint32_t x)
- {
- return ((uint32_t)(((((q31_t)x << 24) >> 24) & (q31_t)0x0000FFFF) |
- ((((q31_t)x << 8) >> 8) & (q31_t)0xFFFF0000) ));
- }
-
- /*
- * @brief C custom defined SMMLA for M3 and M0 processors
- */
- CMSIS_INLINE __STATIC_INLINE int32_t __SMMLA(
- int32_t x,
- int32_t y,
- int32_t sum)
- {
- return (sum + (int32_t) (((int64_t) x * y) >> 32));
- }
-
-#if 0
- /*
- * @brief C custom defined PKHBT for unavailable DSP extension
- */
- CMSIS_INLINE __STATIC_INLINE uint32_t __PKHBT(
- uint32_t x,
- uint32_t y,
- uint32_t leftshift)
- {
- return ( ((x ) & 0x0000FFFFUL) |
- ((y << leftshift) & 0xFFFF0000UL) );
- }
-
- /*
- * @brief C custom defined PKHTB for unavailable DSP extension
- */
- CMSIS_INLINE __STATIC_INLINE uint32_t __PKHTB(
- uint32_t x,
- uint32_t y,
- uint32_t rightshift)
- {
- return ( ((x ) & 0xFFFF0000UL) |
- ((y >> rightshift) & 0x0000FFFFUL) );
- }
-#endif
-
-/* #endif // defined (ARM_MATH_CM3) || defined (ARM_MATH_CM0_FAMILY) */
-#endif /* !defined (ARM_MATH_DSP) */
-
-
- /**
- * @brief Instance structure for the Q7 FIR filter.
- */
- typedef struct
- {
- uint16_t numTaps; /**< number of filter coefficients in the filter. */
- q7_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
- q7_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps.*/
- } arm_fir_instance_q7;
-
- /**
- * @brief Instance structure for the Q15 FIR filter.
- */
- typedef struct
- {
- uint16_t numTaps; /**< number of filter coefficients in the filter. */
- q15_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
- q15_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps.*/
- } arm_fir_instance_q15;
-
- /**
- * @brief Instance structure for the Q31 FIR filter.
- */
- typedef struct
- {
- uint16_t numTaps; /**< number of filter coefficients in the filter. */
- q31_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
- q31_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps. */
- } arm_fir_instance_q31;
-
- /**
- * @brief Instance structure for the floating-point FIR filter.
- */
- typedef struct
- {
- uint16_t numTaps; /**< number of filter coefficients in the filter. */
- float32_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
- float32_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps. */
- } arm_fir_instance_f32;
-
-
- /**
- * @brief Processing function for the Q7 FIR filter.
- * @param[in] S points to an instance of the Q7 FIR filter structure.
- * @param[in] pSrc points to the block of input data.
- * @param[out] pDst points to the block of output data.
- * @param[in] blockSize number of samples to process.
- */
- void arm_fir_q7(
- const arm_fir_instance_q7 * S,
- q7_t * pSrc,
- q7_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Initialization function for the Q7 FIR filter.
- * @param[in,out] S points to an instance of the Q7 FIR structure.
- * @param[in] numTaps Number of filter coefficients in the filter.
- * @param[in] pCoeffs points to the filter coefficients.
- * @param[in] pState points to the state buffer.
- * @param[in] blockSize number of samples that are processed.
- */
- void arm_fir_init_q7(
- arm_fir_instance_q7 * S,
- uint16_t numTaps,
- q7_t * pCoeffs,
- q7_t * pState,
- uint32_t blockSize);
-
-
- /**
- * @brief Processing function for the Q15 FIR filter.
- * @param[in] S points to an instance of the Q15 FIR structure.
- * @param[in] pSrc points to the block of input data.
- * @param[out] pDst points to the block of output data.
- * @param[in] blockSize number of samples to process.
- */
- void arm_fir_q15(
- const arm_fir_instance_q15 * S,
- q15_t * pSrc,
- q15_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Processing function for the fast Q15 FIR filter for Cortex-M3 and Cortex-M4.
- * @param[in] S points to an instance of the Q15 FIR filter structure.
- * @param[in] pSrc points to the block of input data.
- * @param[out] pDst points to the block of output data.
- * @param[in] blockSize number of samples to process.
- */
- void arm_fir_fast_q15(
- const arm_fir_instance_q15 * S,
- q15_t * pSrc,
- q15_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Initialization function for the Q15 FIR filter.
- * @param[in,out] S points to an instance of the Q15 FIR filter structure.
- * @param[in] numTaps Number of filter coefficients in the filter. Must be even and greater than or equal to 4.
- * @param[in] pCoeffs points to the filter coefficients.
- * @param[in] pState points to the state buffer.
- * @param[in] blockSize number of samples that are processed at a time.
- * @return The function returns ARM_MATH_SUCCESS if initialization was successful or ARM_MATH_ARGUMENT_ERROR if
- * numTaps is not a supported value.
- */
- arm_status arm_fir_init_q15(
- arm_fir_instance_q15 * S,
- uint16_t numTaps,
- q15_t * pCoeffs,
- q15_t * pState,
- uint32_t blockSize);
-
-
- /**
- * @brief Processing function for the Q31 FIR filter.
- * @param[in] S points to an instance of the Q31 FIR filter structure.
- * @param[in] pSrc points to the block of input data.
- * @param[out] pDst points to the block of output data.
- * @param[in] blockSize number of samples to process.
- */
- void arm_fir_q31(
- const arm_fir_instance_q31 * S,
- q31_t * pSrc,
- q31_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Processing function for the fast Q31 FIR filter for Cortex-M3 and Cortex-M4.
- * @param[in] S points to an instance of the Q31 FIR structure.
- * @param[in] pSrc points to the block of input data.
- * @param[out] pDst points to the block of output data.
- * @param[in] blockSize number of samples to process.
- */
- void arm_fir_fast_q31(
- const arm_fir_instance_q31 * S,
- q31_t * pSrc,
- q31_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Initialization function for the Q31 FIR filter.
- * @param[in,out] S points to an instance of the Q31 FIR structure.
- * @param[in] numTaps Number of filter coefficients in the filter.
- * @param[in] pCoeffs points to the filter coefficients.
- * @param[in] pState points to the state buffer.
- * @param[in] blockSize number of samples that are processed at a time.
- */
- void arm_fir_init_q31(
- arm_fir_instance_q31 * S,
- uint16_t numTaps,
- q31_t * pCoeffs,
- q31_t * pState,
- uint32_t blockSize);
-
-
- /**
- * @brief Processing function for the floating-point FIR filter.
- * @param[in] S points to an instance of the floating-point FIR structure.
- * @param[in] pSrc points to the block of input data.
- * @param[out] pDst points to the block of output data.
- * @param[in] blockSize number of samples to process.
- */
- void arm_fir_f32(
- const arm_fir_instance_f32 * S,
- float32_t * pSrc,
- float32_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Initialization function for the floating-point FIR filter.
- * @param[in,out] S points to an instance of the floating-point FIR filter structure.
- * @param[in] numTaps Number of filter coefficients in the filter.
- * @param[in] pCoeffs points to the filter coefficients.
- * @param[in] pState points to the state buffer.
- * @param[in] blockSize number of samples that are processed at a time.
- */
- void arm_fir_init_f32(
- arm_fir_instance_f32 * S,
- uint16_t numTaps,
- float32_t * pCoeffs,
- float32_t * pState,
- uint32_t blockSize);
-
-
- /**
- * @brief Instance structure for the Q15 Biquad cascade filter.
- */
- typedef struct
- {
- int8_t numStages; /**< number of 2nd order stages in the filter. Overall order is 2*numStages. */
- q15_t *pState; /**< Points to the array of state coefficients. The array is of length 4*numStages. */
- q15_t *pCoeffs; /**< Points to the array of coefficients. The array is of length 5*numStages. */
- int8_t postShift; /**< Additional shift, in bits, applied to each output sample. */
- } arm_biquad_casd_df1_inst_q15;
-
- /**
- * @brief Instance structure for the Q31 Biquad cascade filter.
- */
- typedef struct
- {
- uint32_t numStages; /**< number of 2nd order stages in the filter. Overall order is 2*numStages. */
- q31_t *pState; /**< Points to the array of state coefficients. The array is of length 4*numStages. */
- q31_t *pCoeffs; /**< Points to the array of coefficients. The array is of length 5*numStages. */
- uint8_t postShift; /**< Additional shift, in bits, applied to each output sample. */
- } arm_biquad_casd_df1_inst_q31;
-
- /**
- * @brief Instance structure for the floating-point Biquad cascade filter.
- */
- typedef struct
- {
- uint32_t numStages; /**< number of 2nd order stages in the filter. Overall order is 2*numStages. */
- float32_t *pState; /**< Points to the array of state coefficients. The array is of length 4*numStages. */
- float32_t *pCoeffs; /**< Points to the array of coefficients. The array is of length 5*numStages. */
- } arm_biquad_casd_df1_inst_f32;
-
-
- /**
- * @brief Processing function for the Q15 Biquad cascade filter.
- * @param[in] S points to an instance of the Q15 Biquad cascade structure.
- * @param[in] pSrc points to the block of input data.
- * @param[out] pDst points to the block of output data.
- * @param[in] blockSize number of samples to process.
- */
- void arm_biquad_cascade_df1_q15(
- const arm_biquad_casd_df1_inst_q15 * S,
- q15_t * pSrc,
- q15_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Initialization function for the Q15 Biquad cascade filter.
- * @param[in,out] S points to an instance of the Q15 Biquad cascade structure.
- * @param[in] numStages number of 2nd order stages in the filter.
- * @param[in] pCoeffs points to the filter coefficients.
- * @param[in] pState points to the state buffer.
- * @param[in] postShift Shift to be applied to the output. Varies according to the coefficients format
- */
- void arm_biquad_cascade_df1_init_q15(
- arm_biquad_casd_df1_inst_q15 * S,
- uint8_t numStages,
- q15_t * pCoeffs,
- q15_t * pState,
- int8_t postShift);
-
-
- /**
- * @brief Fast but less precise processing function for the Q15 Biquad cascade filter for Cortex-M3 and Cortex-M4.
- * @param[in] S points to an instance of the Q15 Biquad cascade structure.
- * @param[in] pSrc points to the block of input data.
- * @param[out] pDst points to the block of output data.
- * @param[in] blockSize number of samples to process.
- */
- void arm_biquad_cascade_df1_fast_q15(
- const arm_biquad_casd_df1_inst_q15 * S,
- q15_t * pSrc,
- q15_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Processing function for the Q31 Biquad cascade filter
- * @param[in] S points to an instance of the Q31 Biquad cascade structure.
- * @param[in] pSrc points to the block of input data.
- * @param[out] pDst points to the block of output data.
- * @param[in] blockSize number of samples to process.
- */
- void arm_biquad_cascade_df1_q31(
- const arm_biquad_casd_df1_inst_q31 * S,
- q31_t * pSrc,
- q31_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Fast but less precise processing function for the Q31 Biquad cascade filter for Cortex-M3 and Cortex-M4.
- * @param[in] S points to an instance of the Q31 Biquad cascade structure.
- * @param[in] pSrc points to the block of input data.
- * @param[out] pDst points to the block of output data.
- * @param[in] blockSize number of samples to process.
- */
- void arm_biquad_cascade_df1_fast_q31(
- const arm_biquad_casd_df1_inst_q31 * S,
- q31_t * pSrc,
- q31_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Initialization function for the Q31 Biquad cascade filter.
- * @param[in,out] S points to an instance of the Q31 Biquad cascade structure.
- * @param[in] numStages number of 2nd order stages in the filter.
- * @param[in] pCoeffs points to the filter coefficients.
- * @param[in] pState points to the state buffer.
- * @param[in] postShift Shift to be applied to the output. Varies according to the coefficients format
- */
- void arm_biquad_cascade_df1_init_q31(
- arm_biquad_casd_df1_inst_q31 * S,
- uint8_t numStages,
- q31_t * pCoeffs,
- q31_t * pState,
- int8_t postShift);
-
-
- /**
- * @brief Processing function for the floating-point Biquad cascade filter.
- * @param[in] S points to an instance of the floating-point Biquad cascade structure.
- * @param[in] pSrc points to the block of input data.
- * @param[out] pDst points to the block of output data.
- * @param[in] blockSize number of samples to process.
- */
- void arm_biquad_cascade_df1_f32(
- const arm_biquad_casd_df1_inst_f32 * S,
- float32_t * pSrc,
- float32_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Initialization function for the floating-point Biquad cascade filter.
- * @param[in,out] S points to an instance of the floating-point Biquad cascade structure.
- * @param[in] numStages number of 2nd order stages in the filter.
- * @param[in] pCoeffs points to the filter coefficients.
- * @param[in] pState points to the state buffer.
- */
- void arm_biquad_cascade_df1_init_f32(
- arm_biquad_casd_df1_inst_f32 * S,
- uint8_t numStages,
- float32_t * pCoeffs,
- float32_t * pState);
-
-
- /**
- * @brief Instance structure for the floating-point matrix structure.
- */
- typedef struct
- {
- uint16_t numRows; /**< number of rows of the matrix. */
- uint16_t numCols; /**< number of columns of the matrix. */
- float32_t *pData; /**< points to the data of the matrix. */
- } arm_matrix_instance_f32;
-
-
- /**
- * @brief Instance structure for the floating-point matrix structure.
- */
- typedef struct
- {
- uint16_t numRows; /**< number of rows of the matrix. */
- uint16_t numCols; /**< number of columns of the matrix. */
- float64_t *pData; /**< points to the data of the matrix. */
- } arm_matrix_instance_f64;
-
- /**
- * @brief Instance structure for the Q15 matrix structure.
- */
- typedef struct
- {
- uint16_t numRows; /**< number of rows of the matrix. */
- uint16_t numCols; /**< number of columns of the matrix. */
- q15_t *pData; /**< points to the data of the matrix. */
- } arm_matrix_instance_q15;
-
- /**
- * @brief Instance structure for the Q31 matrix structure.
- */
- typedef struct
- {
- uint16_t numRows; /**< number of rows of the matrix. */
- uint16_t numCols; /**< number of columns of the matrix. */
- q31_t *pData; /**< points to the data of the matrix. */
- } arm_matrix_instance_q31;
-
-
- /**
- * @brief Floating-point matrix addition.
- * @param[in] pSrcA points to the first input matrix structure
- * @param[in] pSrcB points to the second input matrix structure
- * @param[out] pDst points to output matrix structure
- * @return The function returns either
- * ARM_MATH_SIZE_MISMATCH or ARM_MATH_SUCCESS based on the outcome of size checking.
- */
- arm_status arm_mat_add_f32(
- const arm_matrix_instance_f32 * pSrcA,
- const arm_matrix_instance_f32 * pSrcB,
- arm_matrix_instance_f32 * pDst);
-
-
- /**
- * @brief Q15 matrix addition.
- * @param[in] pSrcA points to the first input matrix structure
- * @param[in] pSrcB points to the second input matrix structure
- * @param[out] pDst points to output matrix structure
- * @return The function returns either
- * ARM_MATH_SIZE_MISMATCH or ARM_MATH_SUCCESS based on the outcome of size checking.
- */
- arm_status arm_mat_add_q15(
- const arm_matrix_instance_q15 * pSrcA,
- const arm_matrix_instance_q15 * pSrcB,
- arm_matrix_instance_q15 * pDst);
-
-
- /**
- * @brief Q31 matrix addition.
- * @param[in] pSrcA points to the first input matrix structure
- * @param[in] pSrcB points to the second input matrix structure
- * @param[out] pDst points to output matrix structure
- * @return The function returns either
- * ARM_MATH_SIZE_MISMATCH or ARM_MATH_SUCCESS based on the outcome of size checking.
- */
- arm_status arm_mat_add_q31(
- const arm_matrix_instance_q31 * pSrcA,
- const arm_matrix_instance_q31 * pSrcB,
- arm_matrix_instance_q31 * pDst);
-
-
- /**
- * @brief Floating-point, complex, matrix multiplication.
- * @param[in] pSrcA points to the first input matrix structure
- * @param[in] pSrcB points to the second input matrix structure
- * @param[out] pDst points to output matrix structure
- * @return The function returns either
- * ARM_MATH_SIZE_MISMATCH or ARM_MATH_SUCCESS based on the outcome of size checking.
- */
- arm_status arm_mat_cmplx_mult_f32(
- const arm_matrix_instance_f32 * pSrcA,
- const arm_matrix_instance_f32 * pSrcB,
- arm_matrix_instance_f32 * pDst);
-
-
- /**
- * @brief Q15, complex, matrix multiplication.
- * @param[in] pSrcA points to the first input matrix structure
- * @param[in] pSrcB points to the second input matrix structure
- * @param[out] pDst points to output matrix structure
- * @return The function returns either
- * ARM_MATH_SIZE_MISMATCH or ARM_MATH_SUCCESS based on the outcome of size checking.
- */
- arm_status arm_mat_cmplx_mult_q15(
- const arm_matrix_instance_q15 * pSrcA,
- const arm_matrix_instance_q15 * pSrcB,
- arm_matrix_instance_q15 * pDst,
- q15_t * pScratch);
-
-
- /**
- * @brief Q31, complex, matrix multiplication.
- * @param[in] pSrcA points to the first input matrix structure
- * @param[in] pSrcB points to the second input matrix structure
- * @param[out] pDst points to output matrix structure
- * @return The function returns either
- * ARM_MATH_SIZE_MISMATCH or ARM_MATH_SUCCESS based on the outcome of size checking.
- */
- arm_status arm_mat_cmplx_mult_q31(
- const arm_matrix_instance_q31 * pSrcA,
- const arm_matrix_instance_q31 * pSrcB,
- arm_matrix_instance_q31 * pDst);
-
-
- /**
- * @brief Floating-point matrix transpose.
- * @param[in] pSrc points to the input matrix
- * @param[out] pDst points to the output matrix
- * @return The function returns either ARM_MATH_SIZE_MISMATCH
- * or ARM_MATH_SUCCESS based on the outcome of size checking.
- */
- arm_status arm_mat_trans_f32(
- const arm_matrix_instance_f32 * pSrc,
- arm_matrix_instance_f32 * pDst);
-
-
- /**
- * @brief Q15 matrix transpose.
- * @param[in] pSrc points to the input matrix
- * @param[out] pDst points to the output matrix
- * @return The function returns either ARM_MATH_SIZE_MISMATCH
- * or ARM_MATH_SUCCESS based on the outcome of size checking.
- */
- arm_status arm_mat_trans_q15(
- const arm_matrix_instance_q15 * pSrc,
- arm_matrix_instance_q15 * pDst);
-
-
- /**
- * @brief Q31 matrix transpose.
- * @param[in] pSrc points to the input matrix
- * @param[out] pDst points to the output matrix
- * @return The function returns either ARM_MATH_SIZE_MISMATCH
- * or ARM_MATH_SUCCESS based on the outcome of size checking.
- */
- arm_status arm_mat_trans_q31(
- const arm_matrix_instance_q31 * pSrc,
- arm_matrix_instance_q31 * pDst);
-
-
- /**
- * @brief Floating-point matrix multiplication
- * @param[in] pSrcA points to the first input matrix structure
- * @param[in] pSrcB points to the second input matrix structure
- * @param[out] pDst points to output matrix structure
- * @return The function returns either
- * ARM_MATH_SIZE_MISMATCH or ARM_MATH_SUCCESS based on the outcome of size checking.
- */
- arm_status arm_mat_mult_f32(
- const arm_matrix_instance_f32 * pSrcA,
- const arm_matrix_instance_f32 * pSrcB,
- arm_matrix_instance_f32 * pDst);
-
-
- /**
- * @brief Q15 matrix multiplication
- * @param[in] pSrcA points to the first input matrix structure
- * @param[in] pSrcB points to the second input matrix structure
- * @param[out] pDst points to output matrix structure
- * @param[in] pState points to the array for storing intermediate results
- * @return The function returns either
- * ARM_MATH_SIZE_MISMATCH or ARM_MATH_SUCCESS based on the outcome of size checking.
- */
- arm_status arm_mat_mult_q15(
- const arm_matrix_instance_q15 * pSrcA,
- const arm_matrix_instance_q15 * pSrcB,
- arm_matrix_instance_q15 * pDst,
- q15_t * pState);
-
-
- /**
- * @brief Q15 matrix multiplication (fast variant) for Cortex-M3 and Cortex-M4
- * @param[in] pSrcA points to the first input matrix structure
- * @param[in] pSrcB points to the second input matrix structure
- * @param[out] pDst points to output matrix structure
- * @param[in] pState points to the array for storing intermediate results
- * @return The function returns either
- * ARM_MATH_SIZE_MISMATCH or ARM_MATH_SUCCESS based on the outcome of size checking.
- */
- arm_status arm_mat_mult_fast_q15(
- const arm_matrix_instance_q15 * pSrcA,
- const arm_matrix_instance_q15 * pSrcB,
- arm_matrix_instance_q15 * pDst,
- q15_t * pState);
-
-
- /**
- * @brief Q31 matrix multiplication
- * @param[in] pSrcA points to the first input matrix structure
- * @param[in] pSrcB points to the second input matrix structure
- * @param[out] pDst points to output matrix structure
- * @return The function returns either
- * ARM_MATH_SIZE_MISMATCH or ARM_MATH_SUCCESS based on the outcome of size checking.
- */
- arm_status arm_mat_mult_q31(
- const arm_matrix_instance_q31 * pSrcA,
- const arm_matrix_instance_q31 * pSrcB,
- arm_matrix_instance_q31 * pDst);
-
-
- /**
- * @brief Q31 matrix multiplication (fast variant) for Cortex-M3 and Cortex-M4
- * @param[in] pSrcA points to the first input matrix structure
- * @param[in] pSrcB points to the second input matrix structure
- * @param[out] pDst points to output matrix structure
- * @return The function returns either
- * ARM_MATH_SIZE_MISMATCH or ARM_MATH_SUCCESS based on the outcome of size checking.
- */
- arm_status arm_mat_mult_fast_q31(
- const arm_matrix_instance_q31 * pSrcA,
- const arm_matrix_instance_q31 * pSrcB,
- arm_matrix_instance_q31 * pDst);
-
-
- /**
- * @brief Floating-point matrix subtraction
- * @param[in] pSrcA points to the first input matrix structure
- * @param[in] pSrcB points to the second input matrix structure
- * @param[out] pDst points to output matrix structure
- * @return The function returns either
- * ARM_MATH_SIZE_MISMATCH or ARM_MATH_SUCCESS based on the outcome of size checking.
- */
- arm_status arm_mat_sub_f32(
- const arm_matrix_instance_f32 * pSrcA,
- const arm_matrix_instance_f32 * pSrcB,
- arm_matrix_instance_f32 * pDst);
-
-
- /**
- * @brief Q15 matrix subtraction
- * @param[in] pSrcA points to the first input matrix structure
- * @param[in] pSrcB points to the second input matrix structure
- * @param[out] pDst points to output matrix structure
- * @return The function returns either
- * ARM_MATH_SIZE_MISMATCH or ARM_MATH_SUCCESS based on the outcome of size checking.
- */
- arm_status arm_mat_sub_q15(
- const arm_matrix_instance_q15 * pSrcA,
- const arm_matrix_instance_q15 * pSrcB,
- arm_matrix_instance_q15 * pDst);
-
-
- /**
- * @brief Q31 matrix subtraction
- * @param[in] pSrcA points to the first input matrix structure
- * @param[in] pSrcB points to the second input matrix structure
- * @param[out] pDst points to output matrix structure
- * @return The function returns either
- * ARM_MATH_SIZE_MISMATCH or ARM_MATH_SUCCESS based on the outcome of size checking.
- */
- arm_status arm_mat_sub_q31(
- const arm_matrix_instance_q31 * pSrcA,
- const arm_matrix_instance_q31 * pSrcB,
- arm_matrix_instance_q31 * pDst);
-
-
- /**
- * @brief Floating-point matrix scaling.
- * @param[in] pSrc points to the input matrix
- * @param[in] scale scale factor
- * @param[out] pDst points to the output matrix
- * @return The function returns either
- * ARM_MATH_SIZE_MISMATCH or ARM_MATH_SUCCESS based on the outcome of size checking.
- */
- arm_status arm_mat_scale_f32(
- const arm_matrix_instance_f32 * pSrc,
- float32_t scale,
- arm_matrix_instance_f32 * pDst);
-
-
- /**
- * @brief Q15 matrix scaling.
- * @param[in] pSrc points to input matrix
- * @param[in] scaleFract fractional portion of the scale factor
- * @param[in] shift number of bits to shift the result by
- * @param[out] pDst points to output matrix
- * @return The function returns either
- * ARM_MATH_SIZE_MISMATCH or ARM_MATH_SUCCESS based on the outcome of size checking.
- */
- arm_status arm_mat_scale_q15(
- const arm_matrix_instance_q15 * pSrc,
- q15_t scaleFract,
- int32_t shift,
- arm_matrix_instance_q15 * pDst);
-
-
- /**
- * @brief Q31 matrix scaling.
- * @param[in] pSrc points to input matrix
- * @param[in] scaleFract fractional portion of the scale factor
- * @param[in] shift number of bits to shift the result by
- * @param[out] pDst points to output matrix structure
- * @return The function returns either
- * ARM_MATH_SIZE_MISMATCH or ARM_MATH_SUCCESS based on the outcome of size checking.
- */
- arm_status arm_mat_scale_q31(
- const arm_matrix_instance_q31 * pSrc,
- q31_t scaleFract,
- int32_t shift,
- arm_matrix_instance_q31 * pDst);
-
-
- /**
- * @brief Q31 matrix initialization.
- * @param[in,out] S points to an instance of the floating-point matrix structure.
- * @param[in] nRows number of rows in the matrix.
- * @param[in] nColumns number of columns in the matrix.
- * @param[in] pData points to the matrix data array.
- */
- void arm_mat_init_q31(
- arm_matrix_instance_q31 * S,
- uint16_t nRows,
- uint16_t nColumns,
- q31_t * pData);
-
-
- /**
- * @brief Q15 matrix initialization.
- * @param[in,out] S points to an instance of the floating-point matrix structure.
- * @param[in] nRows number of rows in the matrix.
- * @param[in] nColumns number of columns in the matrix.
- * @param[in] pData points to the matrix data array.
- */
- void arm_mat_init_q15(
- arm_matrix_instance_q15 * S,
- uint16_t nRows,
- uint16_t nColumns,
- q15_t * pData);
-
-
- /**
- * @brief Floating-point matrix initialization.
- * @param[in,out] S points to an instance of the floating-point matrix structure.
- * @param[in] nRows number of rows in the matrix.
- * @param[in] nColumns number of columns in the matrix.
- * @param[in] pData points to the matrix data array.
- */
- void arm_mat_init_f32(
- arm_matrix_instance_f32 * S,
- uint16_t nRows,
- uint16_t nColumns,
- float32_t * pData);
-
-
-
- /**
- * @brief Instance structure for the Q15 PID Control.
- */
- typedef struct
- {
- q15_t A0; /**< The derived gain, A0 = Kp + Ki + Kd . */
-#if !defined (ARM_MATH_DSP)
- q15_t A1;
- q15_t A2;
-#else
- q31_t A1; /**< The derived gain A1 = -Kp - 2Kd | Kd.*/
-#endif
- q15_t state[3]; /**< The state array of length 3. */
- q15_t Kp; /**< The proportional gain. */
- q15_t Ki; /**< The integral gain. */
- q15_t Kd; /**< The derivative gain. */
- } arm_pid_instance_q15;
-
- /**
- * @brief Instance structure for the Q31 PID Control.
- */
- typedef struct
- {
- q31_t A0; /**< The derived gain, A0 = Kp + Ki + Kd . */
- q31_t A1; /**< The derived gain, A1 = -Kp - 2Kd. */
- q31_t A2; /**< The derived gain, A2 = Kd . */
- q31_t state[3]; /**< The state array of length 3. */
- q31_t Kp; /**< The proportional gain. */
- q31_t Ki; /**< The integral gain. */
- q31_t Kd; /**< The derivative gain. */
- } arm_pid_instance_q31;
-
- /**
- * @brief Instance structure for the floating-point PID Control.
- */
- typedef struct
- {
- float32_t A0; /**< The derived gain, A0 = Kp + Ki + Kd . */
- float32_t A1; /**< The derived gain, A1 = -Kp - 2Kd. */
- float32_t A2; /**< The derived gain, A2 = Kd . */
- float32_t state[3]; /**< The state array of length 3. */
- float32_t Kp; /**< The proportional gain. */
- float32_t Ki; /**< The integral gain. */
- float32_t Kd; /**< The derivative gain. */
- } arm_pid_instance_f32;
-
-
-
- /**
- * @brief Initialization function for the floating-point PID Control.
- * @param[in,out] S points to an instance of the PID structure.
- * @param[in] resetStateFlag flag to reset the state. 0 = no change in state 1 = reset the state.
- */
- void arm_pid_init_f32(
- arm_pid_instance_f32 * S,
- int32_t resetStateFlag);
-
-
- /**
- * @brief Reset function for the floating-point PID Control.
- * @param[in,out] S is an instance of the floating-point PID Control structure
- */
- void arm_pid_reset_f32(
- arm_pid_instance_f32 * S);
-
-
- /**
- * @brief Initialization function for the Q31 PID Control.
- * @param[in,out] S points to an instance of the Q15 PID structure.
- * @param[in] resetStateFlag flag to reset the state. 0 = no change in state 1 = reset the state.
- */
- void arm_pid_init_q31(
- arm_pid_instance_q31 * S,
- int32_t resetStateFlag);
-
-
- /**
- * @brief Reset function for the Q31 PID Control.
- * @param[in,out] S points to an instance of the Q31 PID Control structure
- */
-
- void arm_pid_reset_q31(
- arm_pid_instance_q31 * S);
-
-
- /**
- * @brief Initialization function for the Q15 PID Control.
- * @param[in,out] S points to an instance of the Q15 PID structure.
- * @param[in] resetStateFlag flag to reset the state. 0 = no change in state 1 = reset the state.
- */
- void arm_pid_init_q15(
- arm_pid_instance_q15 * S,
- int32_t resetStateFlag);
-
-
- /**
- * @brief Reset function for the Q15 PID Control.
- * @param[in,out] S points to an instance of the q15 PID Control structure
- */
- void arm_pid_reset_q15(
- arm_pid_instance_q15 * S);
-
-
- /**
- * @brief Instance structure for the floating-point Linear Interpolate function.
- */
- typedef struct
- {
- uint32_t nValues; /**< nValues */
- float32_t x1; /**< x1 */
- float32_t xSpacing; /**< xSpacing */
- float32_t *pYData; /**< pointer to the table of Y values */
- } arm_linear_interp_instance_f32;
-
- /**
- * @brief Instance structure for the floating-point bilinear interpolation function.
- */
- typedef struct
- {
- uint16_t numRows; /**< number of rows in the data table. */
- uint16_t numCols; /**< number of columns in the data table. */
- float32_t *pData; /**< points to the data table. */
- } arm_bilinear_interp_instance_f32;
-
- /**
- * @brief Instance structure for the Q31 bilinear interpolation function.
- */
- typedef struct
- {
- uint16_t numRows; /**< number of rows in the data table. */
- uint16_t numCols; /**< number of columns in the data table. */
- q31_t *pData; /**< points to the data table. */
- } arm_bilinear_interp_instance_q31;
-
- /**
- * @brief Instance structure for the Q15 bilinear interpolation function.
- */
- typedef struct
- {
- uint16_t numRows; /**< number of rows in the data table. */
- uint16_t numCols; /**< number of columns in the data table. */
- q15_t *pData; /**< points to the data table. */
- } arm_bilinear_interp_instance_q15;
-
- /**
- * @brief Instance structure for the Q15 bilinear interpolation function.
- */
- typedef struct
- {
- uint16_t numRows; /**< number of rows in the data table. */
- uint16_t numCols; /**< number of columns in the data table. */
- q7_t *pData; /**< points to the data table. */
- } arm_bilinear_interp_instance_q7;
-
-
- /**
- * @brief Q7 vector multiplication.
- * @param[in] pSrcA points to the first input vector
- * @param[in] pSrcB points to the second input vector
- * @param[out] pDst points to the output vector
- * @param[in] blockSize number of samples in each vector
- */
- void arm_mult_q7(
- q7_t * pSrcA,
- q7_t * pSrcB,
- q7_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Q15 vector multiplication.
- * @param[in] pSrcA points to the first input vector
- * @param[in] pSrcB points to the second input vector
- * @param[out] pDst points to the output vector
- * @param[in] blockSize number of samples in each vector
- */
- void arm_mult_q15(
- q15_t * pSrcA,
- q15_t * pSrcB,
- q15_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Q31 vector multiplication.
- * @param[in] pSrcA points to the first input vector
- * @param[in] pSrcB points to the second input vector
- * @param[out] pDst points to the output vector
- * @param[in] blockSize number of samples in each vector
- */
- void arm_mult_q31(
- q31_t * pSrcA,
- q31_t * pSrcB,
- q31_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Floating-point vector multiplication.
- * @param[in] pSrcA points to the first input vector
- * @param[in] pSrcB points to the second input vector
- * @param[out] pDst points to the output vector
- * @param[in] blockSize number of samples in each vector
- */
- void arm_mult_f32(
- float32_t * pSrcA,
- float32_t * pSrcB,
- float32_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Instance structure for the Q15 CFFT/CIFFT function.
- */
- typedef struct
- {
- uint16_t fftLen; /**< length of the FFT. */
- uint8_t ifftFlag; /**< flag that selects forward (ifftFlag=0) or inverse (ifftFlag=1) transform. */
- uint8_t bitReverseFlag; /**< flag that enables (bitReverseFlag=1) or disables (bitReverseFlag=0) bit reversal of output. */
- q15_t *pTwiddle; /**< points to the Sin twiddle factor table. */
- uint16_t *pBitRevTable; /**< points to the bit reversal table. */
- uint16_t twidCoefModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */
- uint16_t bitRevFactor; /**< bit reversal modifier that supports different size FFTs with the same bit reversal table. */
- } arm_cfft_radix2_instance_q15;
-
-/* Deprecated */
- arm_status arm_cfft_radix2_init_q15(
- arm_cfft_radix2_instance_q15 * S,
- uint16_t fftLen,
- uint8_t ifftFlag,
- uint8_t bitReverseFlag);
-
-/* Deprecated */
- void arm_cfft_radix2_q15(
- const arm_cfft_radix2_instance_q15 * S,
- q15_t * pSrc);
-
-
- /**
- * @brief Instance structure for the Q15 CFFT/CIFFT function.
- */
- typedef struct
- {
- uint16_t fftLen; /**< length of the FFT. */
- uint8_t ifftFlag; /**< flag that selects forward (ifftFlag=0) or inverse (ifftFlag=1) transform. */
- uint8_t bitReverseFlag; /**< flag that enables (bitReverseFlag=1) or disables (bitReverseFlag=0) bit reversal of output. */
- q15_t *pTwiddle; /**< points to the twiddle factor table. */
- uint16_t *pBitRevTable; /**< points to the bit reversal table. */
- uint16_t twidCoefModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */
- uint16_t bitRevFactor; /**< bit reversal modifier that supports different size FFTs with the same bit reversal table. */
- } arm_cfft_radix4_instance_q15;
-
-/* Deprecated */
- arm_status arm_cfft_radix4_init_q15(
- arm_cfft_radix4_instance_q15 * S,
- uint16_t fftLen,
- uint8_t ifftFlag,
- uint8_t bitReverseFlag);
-
-/* Deprecated */
- void arm_cfft_radix4_q15(
- const arm_cfft_radix4_instance_q15 * S,
- q15_t * pSrc);
-
- /**
- * @brief Instance structure for the Radix-2 Q31 CFFT/CIFFT function.
- */
- typedef struct
- {
- uint16_t fftLen; /**< length of the FFT. */
- uint8_t ifftFlag; /**< flag that selects forward (ifftFlag=0) or inverse (ifftFlag=1) transform. */
- uint8_t bitReverseFlag; /**< flag that enables (bitReverseFlag=1) or disables (bitReverseFlag=0) bit reversal of output. */
- q31_t *pTwiddle; /**< points to the Twiddle factor table. */
- uint16_t *pBitRevTable; /**< points to the bit reversal table. */
- uint16_t twidCoefModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */
- uint16_t bitRevFactor; /**< bit reversal modifier that supports different size FFTs with the same bit reversal table. */
- } arm_cfft_radix2_instance_q31;
-
-/* Deprecated */
- arm_status arm_cfft_radix2_init_q31(
- arm_cfft_radix2_instance_q31 * S,
- uint16_t fftLen,
- uint8_t ifftFlag,
- uint8_t bitReverseFlag);
-
-/* Deprecated */
- void arm_cfft_radix2_q31(
- const arm_cfft_radix2_instance_q31 * S,
- q31_t * pSrc);
-
- /**
- * @brief Instance structure for the Q31 CFFT/CIFFT function.
- */
- typedef struct
- {
- uint16_t fftLen; /**< length of the FFT. */
- uint8_t ifftFlag; /**< flag that selects forward (ifftFlag=0) or inverse (ifftFlag=1) transform. */
- uint8_t bitReverseFlag; /**< flag that enables (bitReverseFlag=1) or disables (bitReverseFlag=0) bit reversal of output. */
- q31_t *pTwiddle; /**< points to the twiddle factor table. */
- uint16_t *pBitRevTable; /**< points to the bit reversal table. */
- uint16_t twidCoefModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */
- uint16_t bitRevFactor; /**< bit reversal modifier that supports different size FFTs with the same bit reversal table. */
- } arm_cfft_radix4_instance_q31;
-
-/* Deprecated */
- void arm_cfft_radix4_q31(
- const arm_cfft_radix4_instance_q31 * S,
- q31_t * pSrc);
-
-/* Deprecated */
- arm_status arm_cfft_radix4_init_q31(
- arm_cfft_radix4_instance_q31 * S,
- uint16_t fftLen,
- uint8_t ifftFlag,
- uint8_t bitReverseFlag);
-
- /**
- * @brief Instance structure for the floating-point CFFT/CIFFT function.
- */
- typedef struct
- {
- uint16_t fftLen; /**< length of the FFT. */
- uint8_t ifftFlag; /**< flag that selects forward (ifftFlag=0) or inverse (ifftFlag=1) transform. */
- uint8_t bitReverseFlag; /**< flag that enables (bitReverseFlag=1) or disables (bitReverseFlag=0) bit reversal of output. */
- float32_t *pTwiddle; /**< points to the Twiddle factor table. */
- uint16_t *pBitRevTable; /**< points to the bit reversal table. */
- uint16_t twidCoefModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */
- uint16_t bitRevFactor; /**< bit reversal modifier that supports different size FFTs with the same bit reversal table. */
- float32_t onebyfftLen; /**< value of 1/fftLen. */
- } arm_cfft_radix2_instance_f32;
-
-/* Deprecated */
- arm_status arm_cfft_radix2_init_f32(
- arm_cfft_radix2_instance_f32 * S,
- uint16_t fftLen,
- uint8_t ifftFlag,
- uint8_t bitReverseFlag);
-
-/* Deprecated */
- void arm_cfft_radix2_f32(
- const arm_cfft_radix2_instance_f32 * S,
- float32_t * pSrc);
-
- /**
- * @brief Instance structure for the floating-point CFFT/CIFFT function.
- */
- typedef struct
- {
- uint16_t fftLen; /**< length of the FFT. */
- uint8_t ifftFlag; /**< flag that selects forward (ifftFlag=0) or inverse (ifftFlag=1) transform. */
- uint8_t bitReverseFlag; /**< flag that enables (bitReverseFlag=1) or disables (bitReverseFlag=0) bit reversal of output. */
- float32_t *pTwiddle; /**< points to the Twiddle factor table. */
- uint16_t *pBitRevTable; /**< points to the bit reversal table. */
- uint16_t twidCoefModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */
- uint16_t bitRevFactor; /**< bit reversal modifier that supports different size FFTs with the same bit reversal table. */
- float32_t onebyfftLen; /**< value of 1/fftLen. */
- } arm_cfft_radix4_instance_f32;
-
-/* Deprecated */
- arm_status arm_cfft_radix4_init_f32(
- arm_cfft_radix4_instance_f32 * S,
- uint16_t fftLen,
- uint8_t ifftFlag,
- uint8_t bitReverseFlag);
-
-/* Deprecated */
- void arm_cfft_radix4_f32(
- const arm_cfft_radix4_instance_f32 * S,
- float32_t * pSrc);
-
- /**
- * @brief Instance structure for the fixed-point CFFT/CIFFT function.
- */
- typedef struct
- {
- uint16_t fftLen; /**< length of the FFT. */
- const q15_t *pTwiddle; /**< points to the Twiddle factor table. */
- const uint16_t *pBitRevTable; /**< points to the bit reversal table. */
- uint16_t bitRevLength; /**< bit reversal table length. */
- } arm_cfft_instance_q15;
-
-void arm_cfft_q15(
- const arm_cfft_instance_q15 * S,
- q15_t * p1,
- uint8_t ifftFlag,
- uint8_t bitReverseFlag);
-
- /**
- * @brief Instance structure for the fixed-point CFFT/CIFFT function.
- */
- typedef struct
- {
- uint16_t fftLen; /**< length of the FFT. */
- const q31_t *pTwiddle; /**< points to the Twiddle factor table. */
- const uint16_t *pBitRevTable; /**< points to the bit reversal table. */
- uint16_t bitRevLength; /**< bit reversal table length. */
- } arm_cfft_instance_q31;
-
-void arm_cfft_q31(
- const arm_cfft_instance_q31 * S,
- q31_t * p1,
- uint8_t ifftFlag,
- uint8_t bitReverseFlag);
-
- /**
- * @brief Instance structure for the floating-point CFFT/CIFFT function.
- */
- typedef struct
- {
- uint16_t fftLen; /**< length of the FFT. */
- const float32_t *pTwiddle; /**< points to the Twiddle factor table. */
- const uint16_t *pBitRevTable; /**< points to the bit reversal table. */
- uint16_t bitRevLength; /**< bit reversal table length. */
- } arm_cfft_instance_f32;
-
- void arm_cfft_f32(
- const arm_cfft_instance_f32 * S,
- float32_t * p1,
- uint8_t ifftFlag,
- uint8_t bitReverseFlag);
-
- /**
- * @brief Instance structure for the Q15 RFFT/RIFFT function.
- */
- typedef struct
- {
- uint32_t fftLenReal; /**< length of the real FFT. */
- uint8_t ifftFlagR; /**< flag that selects forward (ifftFlagR=0) or inverse (ifftFlagR=1) transform. */
- uint8_t bitReverseFlagR; /**< flag that enables (bitReverseFlagR=1) or disables (bitReverseFlagR=0) bit reversal of output. */
- uint32_t twidCoefRModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */
- q15_t *pTwiddleAReal; /**< points to the real twiddle factor table. */
- q15_t *pTwiddleBReal; /**< points to the imag twiddle factor table. */
- const arm_cfft_instance_q15 *pCfft; /**< points to the complex FFT instance. */
- } arm_rfft_instance_q15;
-
- arm_status arm_rfft_init_q15(
- arm_rfft_instance_q15 * S,
- uint32_t fftLenReal,
- uint32_t ifftFlagR,
- uint32_t bitReverseFlag);
-
- void arm_rfft_q15(
- const arm_rfft_instance_q15 * S,
- q15_t * pSrc,
- q15_t * pDst);
-
- /**
- * @brief Instance structure for the Q31 RFFT/RIFFT function.
- */
- typedef struct
- {
- uint32_t fftLenReal; /**< length of the real FFT. */
- uint8_t ifftFlagR; /**< flag that selects forward (ifftFlagR=0) or inverse (ifftFlagR=1) transform. */
- uint8_t bitReverseFlagR; /**< flag that enables (bitReverseFlagR=1) or disables (bitReverseFlagR=0) bit reversal of output. */
- uint32_t twidCoefRModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */
- q31_t *pTwiddleAReal; /**< points to the real twiddle factor table. */
- q31_t *pTwiddleBReal; /**< points to the imag twiddle factor table. */
- const arm_cfft_instance_q31 *pCfft; /**< points to the complex FFT instance. */
- } arm_rfft_instance_q31;
-
- arm_status arm_rfft_init_q31(
- arm_rfft_instance_q31 * S,
- uint32_t fftLenReal,
- uint32_t ifftFlagR,
- uint32_t bitReverseFlag);
-
- void arm_rfft_q31(
- const arm_rfft_instance_q31 * S,
- q31_t * pSrc,
- q31_t * pDst);
-
- /**
- * @brief Instance structure for the floating-point RFFT/RIFFT function.
- */
- typedef struct
- {
- uint32_t fftLenReal; /**< length of the real FFT. */
- uint16_t fftLenBy2; /**< length of the complex FFT. */
- uint8_t ifftFlagR; /**< flag that selects forward (ifftFlagR=0) or inverse (ifftFlagR=1) transform. */
- uint8_t bitReverseFlagR; /**< flag that enables (bitReverseFlagR=1) or disables (bitReverseFlagR=0) bit reversal of output. */
- uint32_t twidCoefRModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */
- float32_t *pTwiddleAReal; /**< points to the real twiddle factor table. */
- float32_t *pTwiddleBReal; /**< points to the imag twiddle factor table. */
- arm_cfft_radix4_instance_f32 *pCfft; /**< points to the complex FFT instance. */
- } arm_rfft_instance_f32;
-
- arm_status arm_rfft_init_f32(
- arm_rfft_instance_f32 * S,
- arm_cfft_radix4_instance_f32 * S_CFFT,
- uint32_t fftLenReal,
- uint32_t ifftFlagR,
- uint32_t bitReverseFlag);
-
- void arm_rfft_f32(
- const arm_rfft_instance_f32 * S,
- float32_t * pSrc,
- float32_t * pDst);
-
- /**
- * @brief Instance structure for the floating-point RFFT/RIFFT function.
- */
-typedef struct
- {
- arm_cfft_instance_f32 Sint; /**< Internal CFFT structure. */
- uint16_t fftLenRFFT; /**< length of the real sequence */
- float32_t * pTwiddleRFFT; /**< Twiddle factors real stage */
- } arm_rfft_fast_instance_f32 ;
-
-arm_status arm_rfft_fast_init_f32 (
- arm_rfft_fast_instance_f32 * S,
- uint16_t fftLen);
-
-void arm_rfft_fast_f32(
- arm_rfft_fast_instance_f32 * S,
- float32_t * p, float32_t * pOut,
- uint8_t ifftFlag);
-
- /**
- * @brief Instance structure for the floating-point DCT4/IDCT4 function.
- */
- typedef struct
- {
- uint16_t N; /**< length of the DCT4. */
- uint16_t Nby2; /**< half of the length of the DCT4. */
- float32_t normalize; /**< normalizing factor. */
- float32_t *pTwiddle; /**< points to the twiddle factor table. */
- float32_t *pCosFactor; /**< points to the cosFactor table. */
- arm_rfft_instance_f32 *pRfft; /**< points to the real FFT instance. */
- arm_cfft_radix4_instance_f32 *pCfft; /**< points to the complex FFT instance. */
- } arm_dct4_instance_f32;
-
-
- /**
- * @brief Initialization function for the floating-point DCT4/IDCT4.
- * @param[in,out] S points to an instance of floating-point DCT4/IDCT4 structure.
- * @param[in] S_RFFT points to an instance of floating-point RFFT/RIFFT structure.
- * @param[in] S_CFFT points to an instance of floating-point CFFT/CIFFT structure.
- * @param[in] N length of the DCT4.
- * @param[in] Nby2 half of the length of the DCT4.
- * @param[in] normalize normalizing factor.
- * @return arm_status function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_ARGUMENT_ERROR if fftLenReal is not a supported transform length.
- */
- arm_status arm_dct4_init_f32(
- arm_dct4_instance_f32 * S,
- arm_rfft_instance_f32 * S_RFFT,
- arm_cfft_radix4_instance_f32 * S_CFFT,
- uint16_t N,
- uint16_t Nby2,
- float32_t normalize);
-
-
- /**
- * @brief Processing function for the floating-point DCT4/IDCT4.
- * @param[in] S points to an instance of the floating-point DCT4/IDCT4 structure.
- * @param[in] pState points to state buffer.
- * @param[in,out] pInlineBuffer points to the in-place input and output buffer.
- */
- void arm_dct4_f32(
- const arm_dct4_instance_f32 * S,
- float32_t * pState,
- float32_t * pInlineBuffer);
-
-
- /**
- * @brief Instance structure for the Q31 DCT4/IDCT4 function.
- */
- typedef struct
- {
- uint16_t N; /**< length of the DCT4. */
- uint16_t Nby2; /**< half of the length of the DCT4. */
- q31_t normalize; /**< normalizing factor. */
- q31_t *pTwiddle; /**< points to the twiddle factor table. */
- q31_t *pCosFactor; /**< points to the cosFactor table. */
- arm_rfft_instance_q31 *pRfft; /**< points to the real FFT instance. */
- arm_cfft_radix4_instance_q31 *pCfft; /**< points to the complex FFT instance. */
- } arm_dct4_instance_q31;
-
-
- /**
- * @brief Initialization function for the Q31 DCT4/IDCT4.
- * @param[in,out] S points to an instance of Q31 DCT4/IDCT4 structure.
- * @param[in] S_RFFT points to an instance of Q31 RFFT/RIFFT structure
- * @param[in] S_CFFT points to an instance of Q31 CFFT/CIFFT structure
- * @param[in] N length of the DCT4.
- * @param[in] Nby2 half of the length of the DCT4.
- * @param[in] normalize normalizing factor.
- * @return arm_status function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_ARGUMENT_ERROR if N is not a supported transform length.
- */
- arm_status arm_dct4_init_q31(
- arm_dct4_instance_q31 * S,
- arm_rfft_instance_q31 * S_RFFT,
- arm_cfft_radix4_instance_q31 * S_CFFT,
- uint16_t N,
- uint16_t Nby2,
- q31_t normalize);
-
-
- /**
- * @brief Processing function for the Q31 DCT4/IDCT4.
- * @param[in] S points to an instance of the Q31 DCT4 structure.
- * @param[in] pState points to state buffer.
- * @param[in,out] pInlineBuffer points to the in-place input and output buffer.
- */
- void arm_dct4_q31(
- const arm_dct4_instance_q31 * S,
- q31_t * pState,
- q31_t * pInlineBuffer);
-
-
- /**
- * @brief Instance structure for the Q15 DCT4/IDCT4 function.
- */
- typedef struct
- {
- uint16_t N; /**< length of the DCT4. */
- uint16_t Nby2; /**< half of the length of the DCT4. */
- q15_t normalize; /**< normalizing factor. */
- q15_t *pTwiddle; /**< points to the twiddle factor table. */
- q15_t *pCosFactor; /**< points to the cosFactor table. */
- arm_rfft_instance_q15 *pRfft; /**< points to the real FFT instance. */
- arm_cfft_radix4_instance_q15 *pCfft; /**< points to the complex FFT instance. */
- } arm_dct4_instance_q15;
-
-
- /**
- * @brief Initialization function for the Q15 DCT4/IDCT4.
- * @param[in,out] S points to an instance of Q15 DCT4/IDCT4 structure.
- * @param[in] S_RFFT points to an instance of Q15 RFFT/RIFFT structure.
- * @param[in] S_CFFT points to an instance of Q15 CFFT/CIFFT structure.
- * @param[in] N length of the DCT4.
- * @param[in] Nby2 half of the length of the DCT4.
- * @param[in] normalize normalizing factor.
- * @return arm_status function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_ARGUMENT_ERROR if N is not a supported transform length.
- */
- arm_status arm_dct4_init_q15(
- arm_dct4_instance_q15 * S,
- arm_rfft_instance_q15 * S_RFFT,
- arm_cfft_radix4_instance_q15 * S_CFFT,
- uint16_t N,
- uint16_t Nby2,
- q15_t normalize);
-
-
- /**
- * @brief Processing function for the Q15 DCT4/IDCT4.
- * @param[in] S points to an instance of the Q15 DCT4 structure.
- * @param[in] pState points to state buffer.
- * @param[in,out] pInlineBuffer points to the in-place input and output buffer.
- */
- void arm_dct4_q15(
- const arm_dct4_instance_q15 * S,
- q15_t * pState,
- q15_t * pInlineBuffer);
-
-
- /**
- * @brief Floating-point vector addition.
- * @param[in] pSrcA points to the first input vector
- * @param[in] pSrcB points to the second input vector
- * @param[out] pDst points to the output vector
- * @param[in] blockSize number of samples in each vector
- */
- void arm_add_f32(
- float32_t * pSrcA,
- float32_t * pSrcB,
- float32_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Q7 vector addition.
- * @param[in] pSrcA points to the first input vector
- * @param[in] pSrcB points to the second input vector
- * @param[out] pDst points to the output vector
- * @param[in] blockSize number of samples in each vector
- */
- void arm_add_q7(
- q7_t * pSrcA,
- q7_t * pSrcB,
- q7_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Q15 vector addition.
- * @param[in] pSrcA points to the first input vector
- * @param[in] pSrcB points to the second input vector
- * @param[out] pDst points to the output vector
- * @param[in] blockSize number of samples in each vector
- */
- void arm_add_q15(
- q15_t * pSrcA,
- q15_t * pSrcB,
- q15_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Q31 vector addition.
- * @param[in] pSrcA points to the first input vector
- * @param[in] pSrcB points to the second input vector
- * @param[out] pDst points to the output vector
- * @param[in] blockSize number of samples in each vector
- */
- void arm_add_q31(
- q31_t * pSrcA,
- q31_t * pSrcB,
- q31_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Floating-point vector subtraction.
- * @param[in] pSrcA points to the first input vector
- * @param[in] pSrcB points to the second input vector
- * @param[out] pDst points to the output vector
- * @param[in] blockSize number of samples in each vector
- */
- void arm_sub_f32(
- float32_t * pSrcA,
- float32_t * pSrcB,
- float32_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Q7 vector subtraction.
- * @param[in] pSrcA points to the first input vector
- * @param[in] pSrcB points to the second input vector
- * @param[out] pDst points to the output vector
- * @param[in] blockSize number of samples in each vector
- */
- void arm_sub_q7(
- q7_t * pSrcA,
- q7_t * pSrcB,
- q7_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Q15 vector subtraction.
- * @param[in] pSrcA points to the first input vector
- * @param[in] pSrcB points to the second input vector
- * @param[out] pDst points to the output vector
- * @param[in] blockSize number of samples in each vector
- */
- void arm_sub_q15(
- q15_t * pSrcA,
- q15_t * pSrcB,
- q15_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Q31 vector subtraction.
- * @param[in] pSrcA points to the first input vector
- * @param[in] pSrcB points to the second input vector
- * @param[out] pDst points to the output vector
- * @param[in] blockSize number of samples in each vector
- */
- void arm_sub_q31(
- q31_t * pSrcA,
- q31_t * pSrcB,
- q31_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Multiplies a floating-point vector by a scalar.
- * @param[in] pSrc points to the input vector
- * @param[in] scale scale factor to be applied
- * @param[out] pDst points to the output vector
- * @param[in] blockSize number of samples in the vector
- */
- void arm_scale_f32(
- float32_t * pSrc,
- float32_t scale,
- float32_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Multiplies a Q7 vector by a scalar.
- * @param[in] pSrc points to the input vector
- * @param[in] scaleFract fractional portion of the scale value
- * @param[in] shift number of bits to shift the result by
- * @param[out] pDst points to the output vector
- * @param[in] blockSize number of samples in the vector
- */
- void arm_scale_q7(
- q7_t * pSrc,
- q7_t scaleFract,
- int8_t shift,
- q7_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Multiplies a Q15 vector by a scalar.
- * @param[in] pSrc points to the input vector
- * @param[in] scaleFract fractional portion of the scale value
- * @param[in] shift number of bits to shift the result by
- * @param[out] pDst points to the output vector
- * @param[in] blockSize number of samples in the vector
- */
- void arm_scale_q15(
- q15_t * pSrc,
- q15_t scaleFract,
- int8_t shift,
- q15_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Multiplies a Q31 vector by a scalar.
- * @param[in] pSrc points to the input vector
- * @param[in] scaleFract fractional portion of the scale value
- * @param[in] shift number of bits to shift the result by
- * @param[out] pDst points to the output vector
- * @param[in] blockSize number of samples in the vector
- */
- void arm_scale_q31(
- q31_t * pSrc,
- q31_t scaleFract,
- int8_t shift,
- q31_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Q7 vector absolute value.
- * @param[in] pSrc points to the input buffer
- * @param[out] pDst points to the output buffer
- * @param[in] blockSize number of samples in each vector
- */
- void arm_abs_q7(
- q7_t * pSrc,
- q7_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Floating-point vector absolute value.
- * @param[in] pSrc points to the input buffer
- * @param[out] pDst points to the output buffer
- * @param[in] blockSize number of samples in each vector
- */
- void arm_abs_f32(
- float32_t * pSrc,
- float32_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Q15 vector absolute value.
- * @param[in] pSrc points to the input buffer
- * @param[out] pDst points to the output buffer
- * @param[in] blockSize number of samples in each vector
- */
- void arm_abs_q15(
- q15_t * pSrc,
- q15_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Q31 vector absolute value.
- * @param[in] pSrc points to the input buffer
- * @param[out] pDst points to the output buffer
- * @param[in] blockSize number of samples in each vector
- */
- void arm_abs_q31(
- q31_t * pSrc,
- q31_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Dot product of floating-point vectors.
- * @param[in] pSrcA points to the first input vector
- * @param[in] pSrcB points to the second input vector
- * @param[in] blockSize number of samples in each vector
- * @param[out] result output result returned here
- */
- void arm_dot_prod_f32(
- float32_t * pSrcA,
- float32_t * pSrcB,
- uint32_t blockSize,
- float32_t * result);
-
-
- /**
- * @brief Dot product of Q7 vectors.
- * @param[in] pSrcA points to the first input vector
- * @param[in] pSrcB points to the second input vector
- * @param[in] blockSize number of samples in each vector
- * @param[out] result output result returned here
- */
- void arm_dot_prod_q7(
- q7_t * pSrcA,
- q7_t * pSrcB,
- uint32_t blockSize,
- q31_t * result);
-
-
- /**
- * @brief Dot product of Q15 vectors.
- * @param[in] pSrcA points to the first input vector
- * @param[in] pSrcB points to the second input vector
- * @param[in] blockSize number of samples in each vector
- * @param[out] result output result returned here
- */
- void arm_dot_prod_q15(
- q15_t * pSrcA,
- q15_t * pSrcB,
- uint32_t blockSize,
- q63_t * result);
-
-
- /**
- * @brief Dot product of Q31 vectors.
- * @param[in] pSrcA points to the first input vector
- * @param[in] pSrcB points to the second input vector
- * @param[in] blockSize number of samples in each vector
- * @param[out] result output result returned here
- */
- void arm_dot_prod_q31(
- q31_t * pSrcA,
- q31_t * pSrcB,
- uint32_t blockSize,
- q63_t * result);
-
-
- /**
- * @brief Shifts the elements of a Q7 vector a specified number of bits.
- * @param[in] pSrc points to the input vector
- * @param[in] shiftBits number of bits to shift. A positive value shifts left; a negative value shifts right.
- * @param[out] pDst points to the output vector
- * @param[in] blockSize number of samples in the vector
- */
- void arm_shift_q7(
- q7_t * pSrc,
- int8_t shiftBits,
- q7_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Shifts the elements of a Q15 vector a specified number of bits.
- * @param[in] pSrc points to the input vector
- * @param[in] shiftBits number of bits to shift. A positive value shifts left; a negative value shifts right.
- * @param[out] pDst points to the output vector
- * @param[in] blockSize number of samples in the vector
- */
- void arm_shift_q15(
- q15_t * pSrc,
- int8_t shiftBits,
- q15_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Shifts the elements of a Q31 vector a specified number of bits.
- * @param[in] pSrc points to the input vector
- * @param[in] shiftBits number of bits to shift. A positive value shifts left; a negative value shifts right.
- * @param[out] pDst points to the output vector
- * @param[in] blockSize number of samples in the vector
- */
- void arm_shift_q31(
- q31_t * pSrc,
- int8_t shiftBits,
- q31_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Adds a constant offset to a floating-point vector.
- * @param[in] pSrc points to the input vector
- * @param[in] offset is the offset to be added
- * @param[out] pDst points to the output vector
- * @param[in] blockSize number of samples in the vector
- */
- void arm_offset_f32(
- float32_t * pSrc,
- float32_t offset,
- float32_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Adds a constant offset to a Q7 vector.
- * @param[in] pSrc points to the input vector
- * @param[in] offset is the offset to be added
- * @param[out] pDst points to the output vector
- * @param[in] blockSize number of samples in the vector
- */
- void arm_offset_q7(
- q7_t * pSrc,
- q7_t offset,
- q7_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Adds a constant offset to a Q15 vector.
- * @param[in] pSrc points to the input vector
- * @param[in] offset is the offset to be added
- * @param[out] pDst points to the output vector
- * @param[in] blockSize number of samples in the vector
- */
- void arm_offset_q15(
- q15_t * pSrc,
- q15_t offset,
- q15_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Adds a constant offset to a Q31 vector.
- * @param[in] pSrc points to the input vector
- * @param[in] offset is the offset to be added
- * @param[out] pDst points to the output vector
- * @param[in] blockSize number of samples in the vector
- */
- void arm_offset_q31(
- q31_t * pSrc,
- q31_t offset,
- q31_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Negates the elements of a floating-point vector.
- * @param[in] pSrc points to the input vector
- * @param[out] pDst points to the output vector
- * @param[in] blockSize number of samples in the vector
- */
- void arm_negate_f32(
- float32_t * pSrc,
- float32_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Negates the elements of a Q7 vector.
- * @param[in] pSrc points to the input vector
- * @param[out] pDst points to the output vector
- * @param[in] blockSize number of samples in the vector
- */
- void arm_negate_q7(
- q7_t * pSrc,
- q7_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Negates the elements of a Q15 vector.
- * @param[in] pSrc points to the input vector
- * @param[out] pDst points to the output vector
- * @param[in] blockSize number of samples in the vector
- */
- void arm_negate_q15(
- q15_t * pSrc,
- q15_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Negates the elements of a Q31 vector.
- * @param[in] pSrc points to the input vector
- * @param[out] pDst points to the output vector
- * @param[in] blockSize number of samples in the vector
- */
- void arm_negate_q31(
- q31_t * pSrc,
- q31_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Copies the elements of a floating-point vector.
- * @param[in] pSrc input pointer
- * @param[out] pDst output pointer
- * @param[in] blockSize number of samples to process
- */
- void arm_copy_f32(
- float32_t * pSrc,
- float32_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Copies the elements of a Q7 vector.
- * @param[in] pSrc input pointer
- * @param[out] pDst output pointer
- * @param[in] blockSize number of samples to process
- */
- void arm_copy_q7(
- q7_t * pSrc,
- q7_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Copies the elements of a Q15 vector.
- * @param[in] pSrc input pointer
- * @param[out] pDst output pointer
- * @param[in] blockSize number of samples to process
- */
- void arm_copy_q15(
- q15_t * pSrc,
- q15_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Copies the elements of a Q31 vector.
- * @param[in] pSrc input pointer
- * @param[out] pDst output pointer
- * @param[in] blockSize number of samples to process
- */
- void arm_copy_q31(
- q31_t * pSrc,
- q31_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Fills a constant value into a floating-point vector.
- * @param[in] value input value to be filled
- * @param[out] pDst output pointer
- * @param[in] blockSize number of samples to process
- */
- void arm_fill_f32(
- float32_t value,
- float32_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Fills a constant value into a Q7 vector.
- * @param[in] value input value to be filled
- * @param[out] pDst output pointer
- * @param[in] blockSize number of samples to process
- */
- void arm_fill_q7(
- q7_t value,
- q7_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Fills a constant value into a Q15 vector.
- * @param[in] value input value to be filled
- * @param[out] pDst output pointer
- * @param[in] blockSize number of samples to process
- */
- void arm_fill_q15(
- q15_t value,
- q15_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Fills a constant value into a Q31 vector.
- * @param[in] value input value to be filled
- * @param[out] pDst output pointer
- * @param[in] blockSize number of samples to process
- */
- void arm_fill_q31(
- q31_t value,
- q31_t * pDst,
- uint32_t blockSize);
-
-
-/**
- * @brief Convolution of floating-point sequences.
- * @param[in] pSrcA points to the first input sequence.
- * @param[in] srcALen length of the first input sequence.
- * @param[in] pSrcB points to the second input sequence.
- * @param[in] srcBLen length of the second input sequence.
- * @param[out] pDst points to the location where the output result is written. Length srcALen+srcBLen-1.
- */
- void arm_conv_f32(
- float32_t * pSrcA,
- uint32_t srcALen,
- float32_t * pSrcB,
- uint32_t srcBLen,
- float32_t * pDst);
-
-
- /**
- * @brief Convolution of Q15 sequences.
- * @param[in] pSrcA points to the first input sequence.
- * @param[in] srcALen length of the first input sequence.
- * @param[in] pSrcB points to the second input sequence.
- * @param[in] srcBLen length of the second input sequence.
- * @param[out] pDst points to the block of output data Length srcALen+srcBLen-1.
- * @param[in] pScratch1 points to scratch buffer of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2.
- * @param[in] pScratch2 points to scratch buffer of size min(srcALen, srcBLen).
- */
- void arm_conv_opt_q15(
- q15_t * pSrcA,
- uint32_t srcALen,
- q15_t * pSrcB,
- uint32_t srcBLen,
- q15_t * pDst,
- q15_t * pScratch1,
- q15_t * pScratch2);
-
-
-/**
- * @brief Convolution of Q15 sequences.
- * @param[in] pSrcA points to the first input sequence.
- * @param[in] srcALen length of the first input sequence.
- * @param[in] pSrcB points to the second input sequence.
- * @param[in] srcBLen length of the second input sequence.
- * @param[out] pDst points to the location where the output result is written. Length srcALen+srcBLen-1.
- */
- void arm_conv_q15(
- q15_t * pSrcA,
- uint32_t srcALen,
- q15_t * pSrcB,
- uint32_t srcBLen,
- q15_t * pDst);
-
-
- /**
- * @brief Convolution of Q15 sequences (fast version) for Cortex-M3 and Cortex-M4
- * @param[in] pSrcA points to the first input sequence.
- * @param[in] srcALen length of the first input sequence.
- * @param[in] pSrcB points to the second input sequence.
- * @param[in] srcBLen length of the second input sequence.
- * @param[out] pDst points to the block of output data Length srcALen+srcBLen-1.
- */
- void arm_conv_fast_q15(
- q15_t * pSrcA,
- uint32_t srcALen,
- q15_t * pSrcB,
- uint32_t srcBLen,
- q15_t * pDst);
-
-
- /**
- * @brief Convolution of Q15 sequences (fast version) for Cortex-M3 and Cortex-M4
- * @param[in] pSrcA points to the first input sequence.
- * @param[in] srcALen length of the first input sequence.
- * @param[in] pSrcB points to the second input sequence.
- * @param[in] srcBLen length of the second input sequence.
- * @param[out] pDst points to the block of output data Length srcALen+srcBLen-1.
- * @param[in] pScratch1 points to scratch buffer of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2.
- * @param[in] pScratch2 points to scratch buffer of size min(srcALen, srcBLen).
- */
- void arm_conv_fast_opt_q15(
- q15_t * pSrcA,
- uint32_t srcALen,
- q15_t * pSrcB,
- uint32_t srcBLen,
- q15_t * pDst,
- q15_t * pScratch1,
- q15_t * pScratch2);
-
-
- /**
- * @brief Convolution of Q31 sequences.
- * @param[in] pSrcA points to the first input sequence.
- * @param[in] srcALen length of the first input sequence.
- * @param[in] pSrcB points to the second input sequence.
- * @param[in] srcBLen length of the second input sequence.
- * @param[out] pDst points to the block of output data Length srcALen+srcBLen-1.
- */
- void arm_conv_q31(
- q31_t * pSrcA,
- uint32_t srcALen,
- q31_t * pSrcB,
- uint32_t srcBLen,
- q31_t * pDst);
-
-
- /**
- * @brief Convolution of Q31 sequences (fast version) for Cortex-M3 and Cortex-M4
- * @param[in] pSrcA points to the first input sequence.
- * @param[in] srcALen length of the first input sequence.
- * @param[in] pSrcB points to the second input sequence.
- * @param[in] srcBLen length of the second input sequence.
- * @param[out] pDst points to the block of output data Length srcALen+srcBLen-1.
- */
- void arm_conv_fast_q31(
- q31_t * pSrcA,
- uint32_t srcALen,
- q31_t * pSrcB,
- uint32_t srcBLen,
- q31_t * pDst);
-
-
- /**
- * @brief Convolution of Q7 sequences.
- * @param[in] pSrcA points to the first input sequence.
- * @param[in] srcALen length of the first input sequence.
- * @param[in] pSrcB points to the second input sequence.
- * @param[in] srcBLen length of the second input sequence.
- * @param[out] pDst points to the block of output data Length srcALen+srcBLen-1.
- * @param[in] pScratch1 points to scratch buffer(of type q15_t) of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2.
- * @param[in] pScratch2 points to scratch buffer (of type q15_t) of size min(srcALen, srcBLen).
- */
- void arm_conv_opt_q7(
- q7_t * pSrcA,
- uint32_t srcALen,
- q7_t * pSrcB,
- uint32_t srcBLen,
- q7_t * pDst,
- q15_t * pScratch1,
- q15_t * pScratch2);
-
-
- /**
- * @brief Convolution of Q7 sequences.
- * @param[in] pSrcA points to the first input sequence.
- * @param[in] srcALen length of the first input sequence.
- * @param[in] pSrcB points to the second input sequence.
- * @param[in] srcBLen length of the second input sequence.
- * @param[out] pDst points to the block of output data Length srcALen+srcBLen-1.
- */
- void arm_conv_q7(
- q7_t * pSrcA,
- uint32_t srcALen,
- q7_t * pSrcB,
- uint32_t srcBLen,
- q7_t * pDst);
-
-
- /**
- * @brief Partial convolution of floating-point sequences.
- * @param[in] pSrcA points to the first input sequence.
- * @param[in] srcALen length of the first input sequence.
- * @param[in] pSrcB points to the second input sequence.
- * @param[in] srcBLen length of the second input sequence.
- * @param[out] pDst points to the block of output data
- * @param[in] firstIndex is the first output sample to start with.
- * @param[in] numPoints is the number of output points to be computed.
- * @return Returns either ARM_MATH_SUCCESS if the function completed correctly or ARM_MATH_ARGUMENT_ERROR if the requested subset is not in the range [0 srcALen+srcBLen-2].
- */
- arm_status arm_conv_partial_f32(
- float32_t * pSrcA,
- uint32_t srcALen,
- float32_t * pSrcB,
- uint32_t srcBLen,
- float32_t * pDst,
- uint32_t firstIndex,
- uint32_t numPoints);
-
-
- /**
- * @brief Partial convolution of Q15 sequences.
- * @param[in] pSrcA points to the first input sequence.
- * @param[in] srcALen length of the first input sequence.
- * @param[in] pSrcB points to the second input sequence.
- * @param[in] srcBLen length of the second input sequence.
- * @param[out] pDst points to the block of output data
- * @param[in] firstIndex is the first output sample to start with.
- * @param[in] numPoints is the number of output points to be computed.
- * @param[in] pScratch1 points to scratch buffer of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2.
- * @param[in] pScratch2 points to scratch buffer of size min(srcALen, srcBLen).
- * @return Returns either ARM_MATH_SUCCESS if the function completed correctly or ARM_MATH_ARGUMENT_ERROR if the requested subset is not in the range [0 srcALen+srcBLen-2].
- */
- arm_status arm_conv_partial_opt_q15(
- q15_t * pSrcA,
- uint32_t srcALen,
- q15_t * pSrcB,
- uint32_t srcBLen,
- q15_t * pDst,
- uint32_t firstIndex,
- uint32_t numPoints,
- q15_t * pScratch1,
- q15_t * pScratch2);
-
-
- /**
- * @brief Partial convolution of Q15 sequences.
- * @param[in] pSrcA points to the first input sequence.
- * @param[in] srcALen length of the first input sequence.
- * @param[in] pSrcB points to the second input sequence.
- * @param[in] srcBLen length of the second input sequence.
- * @param[out] pDst points to the block of output data
- * @param[in] firstIndex is the first output sample to start with.
- * @param[in] numPoints is the number of output points to be computed.
- * @return Returns either ARM_MATH_SUCCESS if the function completed correctly or ARM_MATH_ARGUMENT_ERROR if the requested subset is not in the range [0 srcALen+srcBLen-2].
- */
- arm_status arm_conv_partial_q15(
- q15_t * pSrcA,
- uint32_t srcALen,
- q15_t * pSrcB,
- uint32_t srcBLen,
- q15_t * pDst,
- uint32_t firstIndex,
- uint32_t numPoints);
-
-
- /**
- * @brief Partial convolution of Q15 sequences (fast version) for Cortex-M3 and Cortex-M4
- * @param[in] pSrcA points to the first input sequence.
- * @param[in] srcALen length of the first input sequence.
- * @param[in] pSrcB points to the second input sequence.
- * @param[in] srcBLen length of the second input sequence.
- * @param[out] pDst points to the block of output data
- * @param[in] firstIndex is the first output sample to start with.
- * @param[in] numPoints is the number of output points to be computed.
- * @return Returns either ARM_MATH_SUCCESS if the function completed correctly or ARM_MATH_ARGUMENT_ERROR if the requested subset is not in the range [0 srcALen+srcBLen-2].
- */
- arm_status arm_conv_partial_fast_q15(
- q15_t * pSrcA,
- uint32_t srcALen,
- q15_t * pSrcB,
- uint32_t srcBLen,
- q15_t * pDst,
- uint32_t firstIndex,
- uint32_t numPoints);
-
-
- /**
- * @brief Partial convolution of Q15 sequences (fast version) for Cortex-M3 and Cortex-M4
- * @param[in] pSrcA points to the first input sequence.
- * @param[in] srcALen length of the first input sequence.
- * @param[in] pSrcB points to the second input sequence.
- * @param[in] srcBLen length of the second input sequence.
- * @param[out] pDst points to the block of output data
- * @param[in] firstIndex is the first output sample to start with.
- * @param[in] numPoints is the number of output points to be computed.
- * @param[in] pScratch1 points to scratch buffer of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2.
- * @param[in] pScratch2 points to scratch buffer of size min(srcALen, srcBLen).
- * @return Returns either ARM_MATH_SUCCESS if the function completed correctly or ARM_MATH_ARGUMENT_ERROR if the requested subset is not in the range [0 srcALen+srcBLen-2].
- */
- arm_status arm_conv_partial_fast_opt_q15(
- q15_t * pSrcA,
- uint32_t srcALen,
- q15_t * pSrcB,
- uint32_t srcBLen,
- q15_t * pDst,
- uint32_t firstIndex,
- uint32_t numPoints,
- q15_t * pScratch1,
- q15_t * pScratch2);
-
-
- /**
- * @brief Partial convolution of Q31 sequences.
- * @param[in] pSrcA points to the first input sequence.
- * @param[in] srcALen length of the first input sequence.
- * @param[in] pSrcB points to the second input sequence.
- * @param[in] srcBLen length of the second input sequence.
- * @param[out] pDst points to the block of output data
- * @param[in] firstIndex is the first output sample to start with.
- * @param[in] numPoints is the number of output points to be computed.
- * @return Returns either ARM_MATH_SUCCESS if the function completed correctly or ARM_MATH_ARGUMENT_ERROR if the requested subset is not in the range [0 srcALen+srcBLen-2].
- */
- arm_status arm_conv_partial_q31(
- q31_t * pSrcA,
- uint32_t srcALen,
- q31_t * pSrcB,
- uint32_t srcBLen,
- q31_t * pDst,
- uint32_t firstIndex,
- uint32_t numPoints);
-
-
- /**
- * @brief Partial convolution of Q31 sequences (fast version) for Cortex-M3 and Cortex-M4
- * @param[in] pSrcA points to the first input sequence.
- * @param[in] srcALen length of the first input sequence.
- * @param[in] pSrcB points to the second input sequence.
- * @param[in] srcBLen length of the second input sequence.
- * @param[out] pDst points to the block of output data
- * @param[in] firstIndex is the first output sample to start with.
- * @param[in] numPoints is the number of output points to be computed.
- * @return Returns either ARM_MATH_SUCCESS if the function completed correctly or ARM_MATH_ARGUMENT_ERROR if the requested subset is not in the range [0 srcALen+srcBLen-2].
- */
- arm_status arm_conv_partial_fast_q31(
- q31_t * pSrcA,
- uint32_t srcALen,
- q31_t * pSrcB,
- uint32_t srcBLen,
- q31_t * pDst,
- uint32_t firstIndex,
- uint32_t numPoints);
-
-
- /**
- * @brief Partial convolution of Q7 sequences
- * @param[in] pSrcA points to the first input sequence.
- * @param[in] srcALen length of the first input sequence.
- * @param[in] pSrcB points to the second input sequence.
- * @param[in] srcBLen length of the second input sequence.
- * @param[out] pDst points to the block of output data
- * @param[in] firstIndex is the first output sample to start with.
- * @param[in] numPoints is the number of output points to be computed.
- * @param[in] pScratch1 points to scratch buffer(of type q15_t) of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2.
- * @param[in] pScratch2 points to scratch buffer (of type q15_t) of size min(srcALen, srcBLen).
- * @return Returns either ARM_MATH_SUCCESS if the function completed correctly or ARM_MATH_ARGUMENT_ERROR if the requested subset is not in the range [0 srcALen+srcBLen-2].
- */
- arm_status arm_conv_partial_opt_q7(
- q7_t * pSrcA,
- uint32_t srcALen,
- q7_t * pSrcB,
- uint32_t srcBLen,
- q7_t * pDst,
- uint32_t firstIndex,
- uint32_t numPoints,
- q15_t * pScratch1,
- q15_t * pScratch2);
-
-
-/**
- * @brief Partial convolution of Q7 sequences.
- * @param[in] pSrcA points to the first input sequence.
- * @param[in] srcALen length of the first input sequence.
- * @param[in] pSrcB points to the second input sequence.
- * @param[in] srcBLen length of the second input sequence.
- * @param[out] pDst points to the block of output data
- * @param[in] firstIndex is the first output sample to start with.
- * @param[in] numPoints is the number of output points to be computed.
- * @return Returns either ARM_MATH_SUCCESS if the function completed correctly or ARM_MATH_ARGUMENT_ERROR if the requested subset is not in the range [0 srcALen+srcBLen-2].
- */
- arm_status arm_conv_partial_q7(
- q7_t * pSrcA,
- uint32_t srcALen,
- q7_t * pSrcB,
- uint32_t srcBLen,
- q7_t * pDst,
- uint32_t firstIndex,
- uint32_t numPoints);
-
-
- /**
- * @brief Instance structure for the Q15 FIR decimator.
- */
- typedef struct
- {
- uint8_t M; /**< decimation factor. */
- uint16_t numTaps; /**< number of coefficients in the filter. */
- q15_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps.*/
- q15_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
- } arm_fir_decimate_instance_q15;
-
- /**
- * @brief Instance structure for the Q31 FIR decimator.
- */
- typedef struct
- {
- uint8_t M; /**< decimation factor. */
- uint16_t numTaps; /**< number of coefficients in the filter. */
- q31_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps.*/
- q31_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
- } arm_fir_decimate_instance_q31;
-
- /**
- * @brief Instance structure for the floating-point FIR decimator.
- */
- typedef struct
- {
- uint8_t M; /**< decimation factor. */
- uint16_t numTaps; /**< number of coefficients in the filter. */
- float32_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps.*/
- float32_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
- } arm_fir_decimate_instance_f32;
-
-
- /**
- * @brief Processing function for the floating-point FIR decimator.
- * @param[in] S points to an instance of the floating-point FIR decimator structure.
- * @param[in] pSrc points to the block of input data.
- * @param[out] pDst points to the block of output data
- * @param[in] blockSize number of input samples to process per call.
- */
- void arm_fir_decimate_f32(
- const arm_fir_decimate_instance_f32 * S,
- float32_t * pSrc,
- float32_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Initialization function for the floating-point FIR decimator.
- * @param[in,out] S points to an instance of the floating-point FIR decimator structure.
- * @param[in] numTaps number of coefficients in the filter.
- * @param[in] M decimation factor.
- * @param[in] pCoeffs points to the filter coefficients.
- * @param[in] pState points to the state buffer.
- * @param[in] blockSize number of input samples to process per call.
- * @return The function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_LENGTH_ERROR if
- * blockSize is not a multiple of M.
- */
- arm_status arm_fir_decimate_init_f32(
- arm_fir_decimate_instance_f32 * S,
- uint16_t numTaps,
- uint8_t M,
- float32_t * pCoeffs,
- float32_t * pState,
- uint32_t blockSize);
-
-
- /**
- * @brief Processing function for the Q15 FIR decimator.
- * @param[in] S points to an instance of the Q15 FIR decimator structure.
- * @param[in] pSrc points to the block of input data.
- * @param[out] pDst points to the block of output data
- * @param[in] blockSize number of input samples to process per call.
- */
- void arm_fir_decimate_q15(
- const arm_fir_decimate_instance_q15 * S,
- q15_t * pSrc,
- q15_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Processing function for the Q15 FIR decimator (fast variant) for Cortex-M3 and Cortex-M4.
- * @param[in] S points to an instance of the Q15 FIR decimator structure.
- * @param[in] pSrc points to the block of input data.
- * @param[out] pDst points to the block of output data
- * @param[in] blockSize number of input samples to process per call.
- */
- void arm_fir_decimate_fast_q15(
- const arm_fir_decimate_instance_q15 * S,
- q15_t * pSrc,
- q15_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Initialization function for the Q15 FIR decimator.
- * @param[in,out] S points to an instance of the Q15 FIR decimator structure.
- * @param[in] numTaps number of coefficients in the filter.
- * @param[in] M decimation factor.
- * @param[in] pCoeffs points to the filter coefficients.
- * @param[in] pState points to the state buffer.
- * @param[in] blockSize number of input samples to process per call.
- * @return The function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_LENGTH_ERROR if
- * blockSize is not a multiple of M.
- */
- arm_status arm_fir_decimate_init_q15(
- arm_fir_decimate_instance_q15 * S,
- uint16_t numTaps,
- uint8_t M,
- q15_t * pCoeffs,
- q15_t * pState,
- uint32_t blockSize);
-
-
- /**
- * @brief Processing function for the Q31 FIR decimator.
- * @param[in] S points to an instance of the Q31 FIR decimator structure.
- * @param[in] pSrc points to the block of input data.
- * @param[out] pDst points to the block of output data
- * @param[in] blockSize number of input samples to process per call.
- */
- void arm_fir_decimate_q31(
- const arm_fir_decimate_instance_q31 * S,
- q31_t * pSrc,
- q31_t * pDst,
- uint32_t blockSize);
-
- /**
- * @brief Processing function for the Q31 FIR decimator (fast variant) for Cortex-M3 and Cortex-M4.
- * @param[in] S points to an instance of the Q31 FIR decimator structure.
- * @param[in] pSrc points to the block of input data.
- * @param[out] pDst points to the block of output data
- * @param[in] blockSize number of input samples to process per call.
- */
- void arm_fir_decimate_fast_q31(
- arm_fir_decimate_instance_q31 * S,
- q31_t * pSrc,
- q31_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Initialization function for the Q31 FIR decimator.
- * @param[in,out] S points to an instance of the Q31 FIR decimator structure.
- * @param[in] numTaps number of coefficients in the filter.
- * @param[in] M decimation factor.
- * @param[in] pCoeffs points to the filter coefficients.
- * @param[in] pState points to the state buffer.
- * @param[in] blockSize number of input samples to process per call.
- * @return The function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_LENGTH_ERROR if
- * blockSize is not a multiple of M.
- */
- arm_status arm_fir_decimate_init_q31(
- arm_fir_decimate_instance_q31 * S,
- uint16_t numTaps,
- uint8_t M,
- q31_t * pCoeffs,
- q31_t * pState,
- uint32_t blockSize);
-
-
- /**
- * @brief Instance structure for the Q15 FIR interpolator.
- */
- typedef struct
- {
- uint8_t L; /**< upsample factor. */
- uint16_t phaseLength; /**< length of each polyphase filter component. */
- q15_t *pCoeffs; /**< points to the coefficient array. The array is of length L*phaseLength. */
- q15_t *pState; /**< points to the state variable array. The array is of length blockSize+phaseLength-1. */
- } arm_fir_interpolate_instance_q15;
-
- /**
- * @brief Instance structure for the Q31 FIR interpolator.
- */
- typedef struct
- {
- uint8_t L; /**< upsample factor. */
- uint16_t phaseLength; /**< length of each polyphase filter component. */
- q31_t *pCoeffs; /**< points to the coefficient array. The array is of length L*phaseLength. */
- q31_t *pState; /**< points to the state variable array. The array is of length blockSize+phaseLength-1. */
- } arm_fir_interpolate_instance_q31;
-
- /**
- * @brief Instance structure for the floating-point FIR interpolator.
- */
- typedef struct
- {
- uint8_t L; /**< upsample factor. */
- uint16_t phaseLength; /**< length of each polyphase filter component. */
- float32_t *pCoeffs; /**< points to the coefficient array. The array is of length L*phaseLength. */
- float32_t *pState; /**< points to the state variable array. The array is of length phaseLength+numTaps-1. */
- } arm_fir_interpolate_instance_f32;
-
-
- /**
- * @brief Processing function for the Q15 FIR interpolator.
- * @param[in] S points to an instance of the Q15 FIR interpolator structure.
- * @param[in] pSrc points to the block of input data.
- * @param[out] pDst points to the block of output data.
- * @param[in] blockSize number of input samples to process per call.
- */
- void arm_fir_interpolate_q15(
- const arm_fir_interpolate_instance_q15 * S,
- q15_t * pSrc,
- q15_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Initialization function for the Q15 FIR interpolator.
- * @param[in,out] S points to an instance of the Q15 FIR interpolator structure.
- * @param[in] L upsample factor.
- * @param[in] numTaps number of filter coefficients in the filter.
- * @param[in] pCoeffs points to the filter coefficient buffer.
- * @param[in] pState points to the state buffer.
- * @param[in] blockSize number of input samples to process per call.
- * @return The function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_LENGTH_ERROR if
- * the filter length numTaps is not a multiple of the interpolation factor L.
- */
- arm_status arm_fir_interpolate_init_q15(
- arm_fir_interpolate_instance_q15 * S,
- uint8_t L,
- uint16_t numTaps,
- q15_t * pCoeffs,
- q15_t * pState,
- uint32_t blockSize);
-
-
- /**
- * @brief Processing function for the Q31 FIR interpolator.
- * @param[in] S points to an instance of the Q15 FIR interpolator structure.
- * @param[in] pSrc points to the block of input data.
- * @param[out] pDst points to the block of output data.
- * @param[in] blockSize number of input samples to process per call.
- */
- void arm_fir_interpolate_q31(
- const arm_fir_interpolate_instance_q31 * S,
- q31_t * pSrc,
- q31_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Initialization function for the Q31 FIR interpolator.
- * @param[in,out] S points to an instance of the Q31 FIR interpolator structure.
- * @param[in] L upsample factor.
- * @param[in] numTaps number of filter coefficients in the filter.
- * @param[in] pCoeffs points to the filter coefficient buffer.
- * @param[in] pState points to the state buffer.
- * @param[in] blockSize number of input samples to process per call.
- * @return The function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_LENGTH_ERROR if
- * the filter length numTaps is not a multiple of the interpolation factor L.
- */
- arm_status arm_fir_interpolate_init_q31(
- arm_fir_interpolate_instance_q31 * S,
- uint8_t L,
- uint16_t numTaps,
- q31_t * pCoeffs,
- q31_t * pState,
- uint32_t blockSize);
-
-
- /**
- * @brief Processing function for the floating-point FIR interpolator.
- * @param[in] S points to an instance of the floating-point FIR interpolator structure.
- * @param[in] pSrc points to the block of input data.
- * @param[out] pDst points to the block of output data.
- * @param[in] blockSize number of input samples to process per call.
- */
- void arm_fir_interpolate_f32(
- const arm_fir_interpolate_instance_f32 * S,
- float32_t * pSrc,
- float32_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Initialization function for the floating-point FIR interpolator.
- * @param[in,out] S points to an instance of the floating-point FIR interpolator structure.
- * @param[in] L upsample factor.
- * @param[in] numTaps number of filter coefficients in the filter.
- * @param[in] pCoeffs points to the filter coefficient buffer.
- * @param[in] pState points to the state buffer.
- * @param[in] blockSize number of input samples to process per call.
- * @return The function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_LENGTH_ERROR if
- * the filter length numTaps is not a multiple of the interpolation factor L.
- */
- arm_status arm_fir_interpolate_init_f32(
- arm_fir_interpolate_instance_f32 * S,
- uint8_t L,
- uint16_t numTaps,
- float32_t * pCoeffs,
- float32_t * pState,
- uint32_t blockSize);
-
-
- /**
- * @brief Instance structure for the high precision Q31 Biquad cascade filter.
- */
- typedef struct
- {
- uint8_t numStages; /**< number of 2nd order stages in the filter. Overall order is 2*numStages. */
- q63_t *pState; /**< points to the array of state coefficients. The array is of length 4*numStages. */
- q31_t *pCoeffs; /**< points to the array of coefficients. The array is of length 5*numStages. */
- uint8_t postShift; /**< additional shift, in bits, applied to each output sample. */
- } arm_biquad_cas_df1_32x64_ins_q31;
-
-
- /**
- * @param[in] S points to an instance of the high precision Q31 Biquad cascade filter structure.
- * @param[in] pSrc points to the block of input data.
- * @param[out] pDst points to the block of output data
- * @param[in] blockSize number of samples to process.
- */
- void arm_biquad_cas_df1_32x64_q31(
- const arm_biquad_cas_df1_32x64_ins_q31 * S,
- q31_t * pSrc,
- q31_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @param[in,out] S points to an instance of the high precision Q31 Biquad cascade filter structure.
- * @param[in] numStages number of 2nd order stages in the filter.
- * @param[in] pCoeffs points to the filter coefficients.
- * @param[in] pState points to the state buffer.
- * @param[in] postShift shift to be applied to the output. Varies according to the coefficients format
- */
- void arm_biquad_cas_df1_32x64_init_q31(
- arm_biquad_cas_df1_32x64_ins_q31 * S,
- uint8_t numStages,
- q31_t * pCoeffs,
- q63_t * pState,
- uint8_t postShift);
-
-
- /**
- * @brief Instance structure for the floating-point transposed direct form II Biquad cascade filter.
- */
- typedef struct
- {
- uint8_t numStages; /**< number of 2nd order stages in the filter. Overall order is 2*numStages. */
- float32_t *pState; /**< points to the array of state coefficients. The array is of length 2*numStages. */
- float32_t *pCoeffs; /**< points to the array of coefficients. The array is of length 5*numStages. */
- } arm_biquad_cascade_df2T_instance_f32;
-
- /**
- * @brief Instance structure for the floating-point transposed direct form II Biquad cascade filter.
- */
- typedef struct
- {
- uint8_t numStages; /**< number of 2nd order stages in the filter. Overall order is 2*numStages. */
- float32_t *pState; /**< points to the array of state coefficients. The array is of length 4*numStages. */
- float32_t *pCoeffs; /**< points to the array of coefficients. The array is of length 5*numStages. */
- } arm_biquad_cascade_stereo_df2T_instance_f32;
-
- /**
- * @brief Instance structure for the floating-point transposed direct form II Biquad cascade filter.
- */
- typedef struct
- {
- uint8_t numStages; /**< number of 2nd order stages in the filter. Overall order is 2*numStages. */
- float64_t *pState; /**< points to the array of state coefficients. The array is of length 2*numStages. */
- float64_t *pCoeffs; /**< points to the array of coefficients. The array is of length 5*numStages. */
- } arm_biquad_cascade_df2T_instance_f64;
-
-
- /**
- * @brief Processing function for the floating-point transposed direct form II Biquad cascade filter.
- * @param[in] S points to an instance of the filter data structure.
- * @param[in] pSrc points to the block of input data.
- * @param[out] pDst points to the block of output data
- * @param[in] blockSize number of samples to process.
- */
- void arm_biquad_cascade_df2T_f32(
- const arm_biquad_cascade_df2T_instance_f32 * S,
- float32_t * pSrc,
- float32_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Processing function for the floating-point transposed direct form II Biquad cascade filter. 2 channels
- * @param[in] S points to an instance of the filter data structure.
- * @param[in] pSrc points to the block of input data.
- * @param[out] pDst points to the block of output data
- * @param[in] blockSize number of samples to process.
- */
- void arm_biquad_cascade_stereo_df2T_f32(
- const arm_biquad_cascade_stereo_df2T_instance_f32 * S,
- float32_t * pSrc,
- float32_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Processing function for the floating-point transposed direct form II Biquad cascade filter.
- * @param[in] S points to an instance of the filter data structure.
- * @param[in] pSrc points to the block of input data.
- * @param[out] pDst points to the block of output data
- * @param[in] blockSize number of samples to process.
- */
- void arm_biquad_cascade_df2T_f64(
- const arm_biquad_cascade_df2T_instance_f64 * S,
- float64_t * pSrc,
- float64_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Initialization function for the floating-point transposed direct form II Biquad cascade filter.
- * @param[in,out] S points to an instance of the filter data structure.
- * @param[in] numStages number of 2nd order stages in the filter.
- * @param[in] pCoeffs points to the filter coefficients.
- * @param[in] pState points to the state buffer.
- */
- void arm_biquad_cascade_df2T_init_f32(
- arm_biquad_cascade_df2T_instance_f32 * S,
- uint8_t numStages,
- float32_t * pCoeffs,
- float32_t * pState);
-
-
- /**
- * @brief Initialization function for the floating-point transposed direct form II Biquad cascade filter.
- * @param[in,out] S points to an instance of the filter data structure.
- * @param[in] numStages number of 2nd order stages in the filter.
- * @param[in] pCoeffs points to the filter coefficients.
- * @param[in] pState points to the state buffer.
- */
- void arm_biquad_cascade_stereo_df2T_init_f32(
- arm_biquad_cascade_stereo_df2T_instance_f32 * S,
- uint8_t numStages,
- float32_t * pCoeffs,
- float32_t * pState);
-
-
- /**
- * @brief Initialization function for the floating-point transposed direct form II Biquad cascade filter.
- * @param[in,out] S points to an instance of the filter data structure.
- * @param[in] numStages number of 2nd order stages in the filter.
- * @param[in] pCoeffs points to the filter coefficients.
- * @param[in] pState points to the state buffer.
- */
- void arm_biquad_cascade_df2T_init_f64(
- arm_biquad_cascade_df2T_instance_f64 * S,
- uint8_t numStages,
- float64_t * pCoeffs,
- float64_t * pState);
-
-
- /**
- * @brief Instance structure for the Q15 FIR lattice filter.
- */
- typedef struct
- {
- uint16_t numStages; /**< number of filter stages. */
- q15_t *pState; /**< points to the state variable array. The array is of length numStages. */
- q15_t *pCoeffs; /**< points to the coefficient array. The array is of length numStages. */
- } arm_fir_lattice_instance_q15;
-
- /**
- * @brief Instance structure for the Q31 FIR lattice filter.
- */
- typedef struct
- {
- uint16_t numStages; /**< number of filter stages. */
- q31_t *pState; /**< points to the state variable array. The array is of length numStages. */
- q31_t *pCoeffs; /**< points to the coefficient array. The array is of length numStages. */
- } arm_fir_lattice_instance_q31;
-
- /**
- * @brief Instance structure for the floating-point FIR lattice filter.
- */
- typedef struct
- {
- uint16_t numStages; /**< number of filter stages. */
- float32_t *pState; /**< points to the state variable array. The array is of length numStages. */
- float32_t *pCoeffs; /**< points to the coefficient array. The array is of length numStages. */
- } arm_fir_lattice_instance_f32;
-
-
- /**
- * @brief Initialization function for the Q15 FIR lattice filter.
- * @param[in] S points to an instance of the Q15 FIR lattice structure.
- * @param[in] numStages number of filter stages.
- * @param[in] pCoeffs points to the coefficient buffer. The array is of length numStages.
- * @param[in] pState points to the state buffer. The array is of length numStages.
- */
- void arm_fir_lattice_init_q15(
- arm_fir_lattice_instance_q15 * S,
- uint16_t numStages,
- q15_t * pCoeffs,
- q15_t * pState);
-
-
- /**
- * @brief Processing function for the Q15 FIR lattice filter.
- * @param[in] S points to an instance of the Q15 FIR lattice structure.
- * @param[in] pSrc points to the block of input data.
- * @param[out] pDst points to the block of output data.
- * @param[in] blockSize number of samples to process.
- */
- void arm_fir_lattice_q15(
- const arm_fir_lattice_instance_q15 * S,
- q15_t * pSrc,
- q15_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Initialization function for the Q31 FIR lattice filter.
- * @param[in] S points to an instance of the Q31 FIR lattice structure.
- * @param[in] numStages number of filter stages.
- * @param[in] pCoeffs points to the coefficient buffer. The array is of length numStages.
- * @param[in] pState points to the state buffer. The array is of length numStages.
- */
- void arm_fir_lattice_init_q31(
- arm_fir_lattice_instance_q31 * S,
- uint16_t numStages,
- q31_t * pCoeffs,
- q31_t * pState);
-
-
- /**
- * @brief Processing function for the Q31 FIR lattice filter.
- * @param[in] S points to an instance of the Q31 FIR lattice structure.
- * @param[in] pSrc points to the block of input data.
- * @param[out] pDst points to the block of output data
- * @param[in] blockSize number of samples to process.
- */
- void arm_fir_lattice_q31(
- const arm_fir_lattice_instance_q31 * S,
- q31_t * pSrc,
- q31_t * pDst,
- uint32_t blockSize);
-
-
-/**
- * @brief Initialization function for the floating-point FIR lattice filter.
- * @param[in] S points to an instance of the floating-point FIR lattice structure.
- * @param[in] numStages number of filter stages.
- * @param[in] pCoeffs points to the coefficient buffer. The array is of length numStages.
- * @param[in] pState points to the state buffer. The array is of length numStages.
- */
- void arm_fir_lattice_init_f32(
- arm_fir_lattice_instance_f32 * S,
- uint16_t numStages,
- float32_t * pCoeffs,
- float32_t * pState);
-
-
- /**
- * @brief Processing function for the floating-point FIR lattice filter.
- * @param[in] S points to an instance of the floating-point FIR lattice structure.
- * @param[in] pSrc points to the block of input data.
- * @param[out] pDst points to the block of output data
- * @param[in] blockSize number of samples to process.
- */
- void arm_fir_lattice_f32(
- const arm_fir_lattice_instance_f32 * S,
- float32_t * pSrc,
- float32_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Instance structure for the Q15 IIR lattice filter.
- */
- typedef struct
- {
- uint16_t numStages; /**< number of stages in the filter. */
- q15_t *pState; /**< points to the state variable array. The array is of length numStages+blockSize. */
- q15_t *pkCoeffs; /**< points to the reflection coefficient array. The array is of length numStages. */
- q15_t *pvCoeffs; /**< points to the ladder coefficient array. The array is of length numStages+1. */
- } arm_iir_lattice_instance_q15;
-
- /**
- * @brief Instance structure for the Q31 IIR lattice filter.
- */
- typedef struct
- {
- uint16_t numStages; /**< number of stages in the filter. */
- q31_t *pState; /**< points to the state variable array. The array is of length numStages+blockSize. */
- q31_t *pkCoeffs; /**< points to the reflection coefficient array. The array is of length numStages. */
- q31_t *pvCoeffs; /**< points to the ladder coefficient array. The array is of length numStages+1. */
- } arm_iir_lattice_instance_q31;
-
- /**
- * @brief Instance structure for the floating-point IIR lattice filter.
- */
- typedef struct
- {
- uint16_t numStages; /**< number of stages in the filter. */
- float32_t *pState; /**< points to the state variable array. The array is of length numStages+blockSize. */
- float32_t *pkCoeffs; /**< points to the reflection coefficient array. The array is of length numStages. */
- float32_t *pvCoeffs; /**< points to the ladder coefficient array. The array is of length numStages+1. */
- } arm_iir_lattice_instance_f32;
-
-
- /**
- * @brief Processing function for the floating-point IIR lattice filter.
- * @param[in] S points to an instance of the floating-point IIR lattice structure.
- * @param[in] pSrc points to the block of input data.
- * @param[out] pDst points to the block of output data.
- * @param[in] blockSize number of samples to process.
- */
- void arm_iir_lattice_f32(
- const arm_iir_lattice_instance_f32 * S,
- float32_t * pSrc,
- float32_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Initialization function for the floating-point IIR lattice filter.
- * @param[in] S points to an instance of the floating-point IIR lattice structure.
- * @param[in] numStages number of stages in the filter.
- * @param[in] pkCoeffs points to the reflection coefficient buffer. The array is of length numStages.
- * @param[in] pvCoeffs points to the ladder coefficient buffer. The array is of length numStages+1.
- * @param[in] pState points to the state buffer. The array is of length numStages+blockSize-1.
- * @param[in] blockSize number of samples to process.
- */
- void arm_iir_lattice_init_f32(
- arm_iir_lattice_instance_f32 * S,
- uint16_t numStages,
- float32_t * pkCoeffs,
- float32_t * pvCoeffs,
- float32_t * pState,
- uint32_t blockSize);
-
-
- /**
- * @brief Processing function for the Q31 IIR lattice filter.
- * @param[in] S points to an instance of the Q31 IIR lattice structure.
- * @param[in] pSrc points to the block of input data.
- * @param[out] pDst points to the block of output data.
- * @param[in] blockSize number of samples to process.
- */
- void arm_iir_lattice_q31(
- const arm_iir_lattice_instance_q31 * S,
- q31_t * pSrc,
- q31_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Initialization function for the Q31 IIR lattice filter.
- * @param[in] S points to an instance of the Q31 IIR lattice structure.
- * @param[in] numStages number of stages in the filter.
- * @param[in] pkCoeffs points to the reflection coefficient buffer. The array is of length numStages.
- * @param[in] pvCoeffs points to the ladder coefficient buffer. The array is of length numStages+1.
- * @param[in] pState points to the state buffer. The array is of length numStages+blockSize.
- * @param[in] blockSize number of samples to process.
- */
- void arm_iir_lattice_init_q31(
- arm_iir_lattice_instance_q31 * S,
- uint16_t numStages,
- q31_t * pkCoeffs,
- q31_t * pvCoeffs,
- q31_t * pState,
- uint32_t blockSize);
-
-
- /**
- * @brief Processing function for the Q15 IIR lattice filter.
- * @param[in] S points to an instance of the Q15 IIR lattice structure.
- * @param[in] pSrc points to the block of input data.
- * @param[out] pDst points to the block of output data.
- * @param[in] blockSize number of samples to process.
- */
- void arm_iir_lattice_q15(
- const arm_iir_lattice_instance_q15 * S,
- q15_t * pSrc,
- q15_t * pDst,
- uint32_t blockSize);
-
-
-/**
- * @brief Initialization function for the Q15 IIR lattice filter.
- * @param[in] S points to an instance of the fixed-point Q15 IIR lattice structure.
- * @param[in] numStages number of stages in the filter.
- * @param[in] pkCoeffs points to reflection coefficient buffer. The array is of length numStages.
- * @param[in] pvCoeffs points to ladder coefficient buffer. The array is of length numStages+1.
- * @param[in] pState points to state buffer. The array is of length numStages+blockSize.
- * @param[in] blockSize number of samples to process per call.
- */
- void arm_iir_lattice_init_q15(
- arm_iir_lattice_instance_q15 * S,
- uint16_t numStages,
- q15_t * pkCoeffs,
- q15_t * pvCoeffs,
- q15_t * pState,
- uint32_t blockSize);
-
-
- /**
- * @brief Instance structure for the floating-point LMS filter.
- */
- typedef struct
- {
- uint16_t numTaps; /**< number of coefficients in the filter. */
- float32_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
- float32_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps. */
- float32_t mu; /**< step size that controls filter coefficient updates. */
- } arm_lms_instance_f32;
-
-
- /**
- * @brief Processing function for floating-point LMS filter.
- * @param[in] S points to an instance of the floating-point LMS filter structure.
- * @param[in] pSrc points to the block of input data.
- * @param[in] pRef points to the block of reference data.
- * @param[out] pOut points to the block of output data.
- * @param[out] pErr points to the block of error data.
- * @param[in] blockSize number of samples to process.
- */
- void arm_lms_f32(
- const arm_lms_instance_f32 * S,
- float32_t * pSrc,
- float32_t * pRef,
- float32_t * pOut,
- float32_t * pErr,
- uint32_t blockSize);
-
-
- /**
- * @brief Initialization function for floating-point LMS filter.
- * @param[in] S points to an instance of the floating-point LMS filter structure.
- * @param[in] numTaps number of filter coefficients.
- * @param[in] pCoeffs points to the coefficient buffer.
- * @param[in] pState points to state buffer.
- * @param[in] mu step size that controls filter coefficient updates.
- * @param[in] blockSize number of samples to process.
- */
- void arm_lms_init_f32(
- arm_lms_instance_f32 * S,
- uint16_t numTaps,
- float32_t * pCoeffs,
- float32_t * pState,
- float32_t mu,
- uint32_t blockSize);
-
-
- /**
- * @brief Instance structure for the Q15 LMS filter.
- */
- typedef struct
- {
- uint16_t numTaps; /**< number of coefficients in the filter. */
- q15_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
- q15_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps. */
- q15_t mu; /**< step size that controls filter coefficient updates. */
- uint32_t postShift; /**< bit shift applied to coefficients. */
- } arm_lms_instance_q15;
-
-
- /**
- * @brief Initialization function for the Q15 LMS filter.
- * @param[in] S points to an instance of the Q15 LMS filter structure.
- * @param[in] numTaps number of filter coefficients.
- * @param[in] pCoeffs points to the coefficient buffer.
- * @param[in] pState points to the state buffer.
- * @param[in] mu step size that controls filter coefficient updates.
- * @param[in] blockSize number of samples to process.
- * @param[in] postShift bit shift applied to coefficients.
- */
- void arm_lms_init_q15(
- arm_lms_instance_q15 * S,
- uint16_t numTaps,
- q15_t * pCoeffs,
- q15_t * pState,
- q15_t mu,
- uint32_t blockSize,
- uint32_t postShift);
-
-
- /**
- * @brief Processing function for Q15 LMS filter.
- * @param[in] S points to an instance of the Q15 LMS filter structure.
- * @param[in] pSrc points to the block of input data.
- * @param[in] pRef points to the block of reference data.
- * @param[out] pOut points to the block of output data.
- * @param[out] pErr points to the block of error data.
- * @param[in] blockSize number of samples to process.
- */
- void arm_lms_q15(
- const arm_lms_instance_q15 * S,
- q15_t * pSrc,
- q15_t * pRef,
- q15_t * pOut,
- q15_t * pErr,
- uint32_t blockSize);
-
-
- /**
- * @brief Instance structure for the Q31 LMS filter.
- */
- typedef struct
- {
- uint16_t numTaps; /**< number of coefficients in the filter. */
- q31_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
- q31_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps. */
- q31_t mu; /**< step size that controls filter coefficient updates. */
- uint32_t postShift; /**< bit shift applied to coefficients. */
- } arm_lms_instance_q31;
-
-
- /**
- * @brief Processing function for Q31 LMS filter.
- * @param[in] S points to an instance of the Q15 LMS filter structure.
- * @param[in] pSrc points to the block of input data.
- * @param[in] pRef points to the block of reference data.
- * @param[out] pOut points to the block of output data.
- * @param[out] pErr points to the block of error data.
- * @param[in] blockSize number of samples to process.
- */
- void arm_lms_q31(
- const arm_lms_instance_q31 * S,
- q31_t * pSrc,
- q31_t * pRef,
- q31_t * pOut,
- q31_t * pErr,
- uint32_t blockSize);
-
-
- /**
- * @brief Initialization function for Q31 LMS filter.
- * @param[in] S points to an instance of the Q31 LMS filter structure.
- * @param[in] numTaps number of filter coefficients.
- * @param[in] pCoeffs points to coefficient buffer.
- * @param[in] pState points to state buffer.
- * @param[in] mu step size that controls filter coefficient updates.
- * @param[in] blockSize number of samples to process.
- * @param[in] postShift bit shift applied to coefficients.
- */
- void arm_lms_init_q31(
- arm_lms_instance_q31 * S,
- uint16_t numTaps,
- q31_t * pCoeffs,
- q31_t * pState,
- q31_t mu,
- uint32_t blockSize,
- uint32_t postShift);
-
-
- /**
- * @brief Instance structure for the floating-point normalized LMS filter.
- */
- typedef struct
- {
- uint16_t numTaps; /**< number of coefficients in the filter. */
- float32_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
- float32_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps. */
- float32_t mu; /**< step size that control filter coefficient updates. */
- float32_t energy; /**< saves previous frame energy. */
- float32_t x0; /**< saves previous input sample. */
- } arm_lms_norm_instance_f32;
-
-
- /**
- * @brief Processing function for floating-point normalized LMS filter.
- * @param[in] S points to an instance of the floating-point normalized LMS filter structure.
- * @param[in] pSrc points to the block of input data.
- * @param[in] pRef points to the block of reference data.
- * @param[out] pOut points to the block of output data.
- * @param[out] pErr points to the block of error data.
- * @param[in] blockSize number of samples to process.
- */
- void arm_lms_norm_f32(
- arm_lms_norm_instance_f32 * S,
- float32_t * pSrc,
- float32_t * pRef,
- float32_t * pOut,
- float32_t * pErr,
- uint32_t blockSize);
-
-
- /**
- * @brief Initialization function for floating-point normalized LMS filter.
- * @param[in] S points to an instance of the floating-point LMS filter structure.
- * @param[in] numTaps number of filter coefficients.
- * @param[in] pCoeffs points to coefficient buffer.
- * @param[in] pState points to state buffer.
- * @param[in] mu step size that controls filter coefficient updates.
- * @param[in] blockSize number of samples to process.
- */
- void arm_lms_norm_init_f32(
- arm_lms_norm_instance_f32 * S,
- uint16_t numTaps,
- float32_t * pCoeffs,
- float32_t * pState,
- float32_t mu,
- uint32_t blockSize);
-
-
- /**
- * @brief Instance structure for the Q31 normalized LMS filter.
- */
- typedef struct
- {
- uint16_t numTaps; /**< number of coefficients in the filter. */
- q31_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
- q31_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps. */
- q31_t mu; /**< step size that controls filter coefficient updates. */
- uint8_t postShift; /**< bit shift applied to coefficients. */
- q31_t *recipTable; /**< points to the reciprocal initial value table. */
- q31_t energy; /**< saves previous frame energy. */
- q31_t x0; /**< saves previous input sample. */
- } arm_lms_norm_instance_q31;
-
-
- /**
- * @brief Processing function for Q31 normalized LMS filter.
- * @param[in] S points to an instance of the Q31 normalized LMS filter structure.
- * @param[in] pSrc points to the block of input data.
- * @param[in] pRef points to the block of reference data.
- * @param[out] pOut points to the block of output data.
- * @param[out] pErr points to the block of error data.
- * @param[in] blockSize number of samples to process.
- */
- void arm_lms_norm_q31(
- arm_lms_norm_instance_q31 * S,
- q31_t * pSrc,
- q31_t * pRef,
- q31_t * pOut,
- q31_t * pErr,
- uint32_t blockSize);
-
-
- /**
- * @brief Initialization function for Q31 normalized LMS filter.
- * @param[in] S points to an instance of the Q31 normalized LMS filter structure.
- * @param[in] numTaps number of filter coefficients.
- * @param[in] pCoeffs points to coefficient buffer.
- * @param[in] pState points to state buffer.
- * @param[in] mu step size that controls filter coefficient updates.
- * @param[in] blockSize number of samples to process.
- * @param[in] postShift bit shift applied to coefficients.
- */
- void arm_lms_norm_init_q31(
- arm_lms_norm_instance_q31 * S,
- uint16_t numTaps,
- q31_t * pCoeffs,
- q31_t * pState,
- q31_t mu,
- uint32_t blockSize,
- uint8_t postShift);
-
-
- /**
- * @brief Instance structure for the Q15 normalized LMS filter.
- */
- typedef struct
- {
- uint16_t numTaps; /**< Number of coefficients in the filter. */
- q15_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
- q15_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps. */
- q15_t mu; /**< step size that controls filter coefficient updates. */
- uint8_t postShift; /**< bit shift applied to coefficients. */
- q15_t *recipTable; /**< Points to the reciprocal initial value table. */
- q15_t energy; /**< saves previous frame energy. */
- q15_t x0; /**< saves previous input sample. */
- } arm_lms_norm_instance_q15;
-
-
- /**
- * @brief Processing function for Q15 normalized LMS filter.
- * @param[in] S points to an instance of the Q15 normalized LMS filter structure.
- * @param[in] pSrc points to the block of input data.
- * @param[in] pRef points to the block of reference data.
- * @param[out] pOut points to the block of output data.
- * @param[out] pErr points to the block of error data.
- * @param[in] blockSize number of samples to process.
- */
- void arm_lms_norm_q15(
- arm_lms_norm_instance_q15 * S,
- q15_t * pSrc,
- q15_t * pRef,
- q15_t * pOut,
- q15_t * pErr,
- uint32_t blockSize);
-
-
- /**
- * @brief Initialization function for Q15 normalized LMS filter.
- * @param[in] S points to an instance of the Q15 normalized LMS filter structure.
- * @param[in] numTaps number of filter coefficients.
- * @param[in] pCoeffs points to coefficient buffer.
- * @param[in] pState points to state buffer.
- * @param[in] mu step size that controls filter coefficient updates.
- * @param[in] blockSize number of samples to process.
- * @param[in] postShift bit shift applied to coefficients.
- */
- void arm_lms_norm_init_q15(
- arm_lms_norm_instance_q15 * S,
- uint16_t numTaps,
- q15_t * pCoeffs,
- q15_t * pState,
- q15_t mu,
- uint32_t blockSize,
- uint8_t postShift);
-
-
- /**
- * @brief Correlation of floating-point sequences.
- * @param[in] pSrcA points to the first input sequence.
- * @param[in] srcALen length of the first input sequence.
- * @param[in] pSrcB points to the second input sequence.
- * @param[in] srcBLen length of the second input sequence.
- * @param[out] pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1.
- */
- void arm_correlate_f32(
- float32_t * pSrcA,
- uint32_t srcALen,
- float32_t * pSrcB,
- uint32_t srcBLen,
- float32_t * pDst);
-
-
- /**
- * @brief Correlation of Q15 sequences
- * @param[in] pSrcA points to the first input sequence.
- * @param[in] srcALen length of the first input sequence.
- * @param[in] pSrcB points to the second input sequence.
- * @param[in] srcBLen length of the second input sequence.
- * @param[out] pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1.
- * @param[in] pScratch points to scratch buffer of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2.
- */
- void arm_correlate_opt_q15(
- q15_t * pSrcA,
- uint32_t srcALen,
- q15_t * pSrcB,
- uint32_t srcBLen,
- q15_t * pDst,
- q15_t * pScratch);
-
-
- /**
- * @brief Correlation of Q15 sequences.
- * @param[in] pSrcA points to the first input sequence.
- * @param[in] srcALen length of the first input sequence.
- * @param[in] pSrcB points to the second input sequence.
- * @param[in] srcBLen length of the second input sequence.
- * @param[out] pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1.
- */
-
- void arm_correlate_q15(
- q15_t * pSrcA,
- uint32_t srcALen,
- q15_t * pSrcB,
- uint32_t srcBLen,
- q15_t * pDst);
-
-
- /**
- * @brief Correlation of Q15 sequences (fast version) for Cortex-M3 and Cortex-M4.
- * @param[in] pSrcA points to the first input sequence.
- * @param[in] srcALen length of the first input sequence.
- * @param[in] pSrcB points to the second input sequence.
- * @param[in] srcBLen length of the second input sequence.
- * @param[out] pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1.
- */
-
- void arm_correlate_fast_q15(
- q15_t * pSrcA,
- uint32_t srcALen,
- q15_t * pSrcB,
- uint32_t srcBLen,
- q15_t * pDst);
-
-
- /**
- * @brief Correlation of Q15 sequences (fast version) for Cortex-M3 and Cortex-M4.
- * @param[in] pSrcA points to the first input sequence.
- * @param[in] srcALen length of the first input sequence.
- * @param[in] pSrcB points to the second input sequence.
- * @param[in] srcBLen length of the second input sequence.
- * @param[out] pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1.
- * @param[in] pScratch points to scratch buffer of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2.
- */
- void arm_correlate_fast_opt_q15(
- q15_t * pSrcA,
- uint32_t srcALen,
- q15_t * pSrcB,
- uint32_t srcBLen,
- q15_t * pDst,
- q15_t * pScratch);
-
-
- /**
- * @brief Correlation of Q31 sequences.
- * @param[in] pSrcA points to the first input sequence.
- * @param[in] srcALen length of the first input sequence.
- * @param[in] pSrcB points to the second input sequence.
- * @param[in] srcBLen length of the second input sequence.
- * @param[out] pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1.
- */
- void arm_correlate_q31(
- q31_t * pSrcA,
- uint32_t srcALen,
- q31_t * pSrcB,
- uint32_t srcBLen,
- q31_t * pDst);
-
-
- /**
- * @brief Correlation of Q31 sequences (fast version) for Cortex-M3 and Cortex-M4
- * @param[in] pSrcA points to the first input sequence.
- * @param[in] srcALen length of the first input sequence.
- * @param[in] pSrcB points to the second input sequence.
- * @param[in] srcBLen length of the second input sequence.
- * @param[out] pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1.
- */
- void arm_correlate_fast_q31(
- q31_t * pSrcA,
- uint32_t srcALen,
- q31_t * pSrcB,
- uint32_t srcBLen,
- q31_t * pDst);
-
-
- /**
- * @brief Correlation of Q7 sequences.
- * @param[in] pSrcA points to the first input sequence.
- * @param[in] srcALen length of the first input sequence.
- * @param[in] pSrcB points to the second input sequence.
- * @param[in] srcBLen length of the second input sequence.
- * @param[out] pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1.
- * @param[in] pScratch1 points to scratch buffer(of type q15_t) of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2.
- * @param[in] pScratch2 points to scratch buffer (of type q15_t) of size min(srcALen, srcBLen).
- */
- void arm_correlate_opt_q7(
- q7_t * pSrcA,
- uint32_t srcALen,
- q7_t * pSrcB,
- uint32_t srcBLen,
- q7_t * pDst,
- q15_t * pScratch1,
- q15_t * pScratch2);
-
-
- /**
- * @brief Correlation of Q7 sequences.
- * @param[in] pSrcA points to the first input sequence.
- * @param[in] srcALen length of the first input sequence.
- * @param[in] pSrcB points to the second input sequence.
- * @param[in] srcBLen length of the second input sequence.
- * @param[out] pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1.
- */
- void arm_correlate_q7(
- q7_t * pSrcA,
- uint32_t srcALen,
- q7_t * pSrcB,
- uint32_t srcBLen,
- q7_t * pDst);
-
-
- /**
- * @brief Instance structure for the floating-point sparse FIR filter.
- */
- typedef struct
- {
- uint16_t numTaps; /**< number of coefficients in the filter. */
- uint16_t stateIndex; /**< state buffer index. Points to the oldest sample in the state buffer. */
- float32_t *pState; /**< points to the state buffer array. The array is of length maxDelay+blockSize-1. */
- float32_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps.*/
- uint16_t maxDelay; /**< maximum offset specified by the pTapDelay array. */
- int32_t *pTapDelay; /**< points to the array of delay values. The array is of length numTaps. */
- } arm_fir_sparse_instance_f32;
-
- /**
- * @brief Instance structure for the Q31 sparse FIR filter.
- */
- typedef struct
- {
- uint16_t numTaps; /**< number of coefficients in the filter. */
- uint16_t stateIndex; /**< state buffer index. Points to the oldest sample in the state buffer. */
- q31_t *pState; /**< points to the state buffer array. The array is of length maxDelay+blockSize-1. */
- q31_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps.*/
- uint16_t maxDelay; /**< maximum offset specified by the pTapDelay array. */
- int32_t *pTapDelay; /**< points to the array of delay values. The array is of length numTaps. */
- } arm_fir_sparse_instance_q31;
-
- /**
- * @brief Instance structure for the Q15 sparse FIR filter.
- */
- typedef struct
- {
- uint16_t numTaps; /**< number of coefficients in the filter. */
- uint16_t stateIndex; /**< state buffer index. Points to the oldest sample in the state buffer. */
- q15_t *pState; /**< points to the state buffer array. The array is of length maxDelay+blockSize-1. */
- q15_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps.*/
- uint16_t maxDelay; /**< maximum offset specified by the pTapDelay array. */
- int32_t *pTapDelay; /**< points to the array of delay values. The array is of length numTaps. */
- } arm_fir_sparse_instance_q15;
-
- /**
- * @brief Instance structure for the Q7 sparse FIR filter.
- */
- typedef struct
- {
- uint16_t numTaps; /**< number of coefficients in the filter. */
- uint16_t stateIndex; /**< state buffer index. Points to the oldest sample in the state buffer. */
- q7_t *pState; /**< points to the state buffer array. The array is of length maxDelay+blockSize-1. */
- q7_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps.*/
- uint16_t maxDelay; /**< maximum offset specified by the pTapDelay array. */
- int32_t *pTapDelay; /**< points to the array of delay values. The array is of length numTaps. */
- } arm_fir_sparse_instance_q7;
-
-
- /**
- * @brief Processing function for the floating-point sparse FIR filter.
- * @param[in] S points to an instance of the floating-point sparse FIR structure.
- * @param[in] pSrc points to the block of input data.
- * @param[out] pDst points to the block of output data
- * @param[in] pScratchIn points to a temporary buffer of size blockSize.
- * @param[in] blockSize number of input samples to process per call.
- */
- void arm_fir_sparse_f32(
- arm_fir_sparse_instance_f32 * S,
- float32_t * pSrc,
- float32_t * pDst,
- float32_t * pScratchIn,
- uint32_t blockSize);
-
-
- /**
- * @brief Initialization function for the floating-point sparse FIR filter.
- * @param[in,out] S points to an instance of the floating-point sparse FIR structure.
- * @param[in] numTaps number of nonzero coefficients in the filter.
- * @param[in] pCoeffs points to the array of filter coefficients.
- * @param[in] pState points to the state buffer.
- * @param[in] pTapDelay points to the array of offset times.
- * @param[in] maxDelay maximum offset time supported.
- * @param[in] blockSize number of samples that will be processed per block.
- */
- void arm_fir_sparse_init_f32(
- arm_fir_sparse_instance_f32 * S,
- uint16_t numTaps,
- float32_t * pCoeffs,
- float32_t * pState,
- int32_t * pTapDelay,
- uint16_t maxDelay,
- uint32_t blockSize);
-
-
- /**
- * @brief Processing function for the Q31 sparse FIR filter.
- * @param[in] S points to an instance of the Q31 sparse FIR structure.
- * @param[in] pSrc points to the block of input data.
- * @param[out] pDst points to the block of output data
- * @param[in] pScratchIn points to a temporary buffer of size blockSize.
- * @param[in] blockSize number of input samples to process per call.
- */
- void arm_fir_sparse_q31(
- arm_fir_sparse_instance_q31 * S,
- q31_t * pSrc,
- q31_t * pDst,
- q31_t * pScratchIn,
- uint32_t blockSize);
-
-
- /**
- * @brief Initialization function for the Q31 sparse FIR filter.
- * @param[in,out] S points to an instance of the Q31 sparse FIR structure.
- * @param[in] numTaps number of nonzero coefficients in the filter.
- * @param[in] pCoeffs points to the array of filter coefficients.
- * @param[in] pState points to the state buffer.
- * @param[in] pTapDelay points to the array of offset times.
- * @param[in] maxDelay maximum offset time supported.
- * @param[in] blockSize number of samples that will be processed per block.
- */
- void arm_fir_sparse_init_q31(
- arm_fir_sparse_instance_q31 * S,
- uint16_t numTaps,
- q31_t * pCoeffs,
- q31_t * pState,
- int32_t * pTapDelay,
- uint16_t maxDelay,
- uint32_t blockSize);
-
-
- /**
- * @brief Processing function for the Q15 sparse FIR filter.
- * @param[in] S points to an instance of the Q15 sparse FIR structure.
- * @param[in] pSrc points to the block of input data.
- * @param[out] pDst points to the block of output data
- * @param[in] pScratchIn points to a temporary buffer of size blockSize.
- * @param[in] pScratchOut points to a temporary buffer of size blockSize.
- * @param[in] blockSize number of input samples to process per call.
- */
- void arm_fir_sparse_q15(
- arm_fir_sparse_instance_q15 * S,
- q15_t * pSrc,
- q15_t * pDst,
- q15_t * pScratchIn,
- q31_t * pScratchOut,
- uint32_t blockSize);
-
-
- /**
- * @brief Initialization function for the Q15 sparse FIR filter.
- * @param[in,out] S points to an instance of the Q15 sparse FIR structure.
- * @param[in] numTaps number of nonzero coefficients in the filter.
- * @param[in] pCoeffs points to the array of filter coefficients.
- * @param[in] pState points to the state buffer.
- * @param[in] pTapDelay points to the array of offset times.
- * @param[in] maxDelay maximum offset time supported.
- * @param[in] blockSize number of samples that will be processed per block.
- */
- void arm_fir_sparse_init_q15(
- arm_fir_sparse_instance_q15 * S,
- uint16_t numTaps,
- q15_t * pCoeffs,
- q15_t * pState,
- int32_t * pTapDelay,
- uint16_t maxDelay,
- uint32_t blockSize);
-
-
- /**
- * @brief Processing function for the Q7 sparse FIR filter.
- * @param[in] S points to an instance of the Q7 sparse FIR structure.
- * @param[in] pSrc points to the block of input data.
- * @param[out] pDst points to the block of output data
- * @param[in] pScratchIn points to a temporary buffer of size blockSize.
- * @param[in] pScratchOut points to a temporary buffer of size blockSize.
- * @param[in] blockSize number of input samples to process per call.
- */
- void arm_fir_sparse_q7(
- arm_fir_sparse_instance_q7 * S,
- q7_t * pSrc,
- q7_t * pDst,
- q7_t * pScratchIn,
- q31_t * pScratchOut,
- uint32_t blockSize);
-
-
- /**
- * @brief Initialization function for the Q7 sparse FIR filter.
- * @param[in,out] S points to an instance of the Q7 sparse FIR structure.
- * @param[in] numTaps number of nonzero coefficients in the filter.
- * @param[in] pCoeffs points to the array of filter coefficients.
- * @param[in] pState points to the state buffer.
- * @param[in] pTapDelay points to the array of offset times.
- * @param[in] maxDelay maximum offset time supported.
- * @param[in] blockSize number of samples that will be processed per block.
- */
- void arm_fir_sparse_init_q7(
- arm_fir_sparse_instance_q7 * S,
- uint16_t numTaps,
- q7_t * pCoeffs,
- q7_t * pState,
- int32_t * pTapDelay,
- uint16_t maxDelay,
- uint32_t blockSize);
-
-
- /**
- * @brief Floating-point sin_cos function.
- * @param[in] theta input value in degrees
- * @param[out] pSinVal points to the processed sine output.
- * @param[out] pCosVal points to the processed cos output.
- */
- void arm_sin_cos_f32(
- float32_t theta,
- float32_t * pSinVal,
- float32_t * pCosVal);
-
-
- /**
- * @brief Q31 sin_cos function.
- * @param[in] theta scaled input value in degrees
- * @param[out] pSinVal points to the processed sine output.
- * @param[out] pCosVal points to the processed cosine output.
- */
- void arm_sin_cos_q31(
- q31_t theta,
- q31_t * pSinVal,
- q31_t * pCosVal);
-
-
- /**
- * @brief Floating-point complex conjugate.
- * @param[in] pSrc points to the input vector
- * @param[out] pDst points to the output vector
- * @param[in] numSamples number of complex samples in each vector
- */
- void arm_cmplx_conj_f32(
- float32_t * pSrc,
- float32_t * pDst,
- uint32_t numSamples);
-
- /**
- * @brief Q31 complex conjugate.
- * @param[in] pSrc points to the input vector
- * @param[out] pDst points to the output vector
- * @param[in] numSamples number of complex samples in each vector
- */
- void arm_cmplx_conj_q31(
- q31_t * pSrc,
- q31_t * pDst,
- uint32_t numSamples);
-
-
- /**
- * @brief Q15 complex conjugate.
- * @param[in] pSrc points to the input vector
- * @param[out] pDst points to the output vector
- * @param[in] numSamples number of complex samples in each vector
- */
- void arm_cmplx_conj_q15(
- q15_t * pSrc,
- q15_t * pDst,
- uint32_t numSamples);
-
-
- /**
- * @brief Floating-point complex magnitude squared
- * @param[in] pSrc points to the complex input vector
- * @param[out] pDst points to the real output vector
- * @param[in] numSamples number of complex samples in the input vector
- */
- void arm_cmplx_mag_squared_f32(
- float32_t * pSrc,
- float32_t * pDst,
- uint32_t numSamples);
-
-
- /**
- * @brief Q31 complex magnitude squared
- * @param[in] pSrc points to the complex input vector
- * @param[out] pDst points to the real output vector
- * @param[in] numSamples number of complex samples in the input vector
- */
- void arm_cmplx_mag_squared_q31(
- q31_t * pSrc,
- q31_t * pDst,
- uint32_t numSamples);
-
-
- /**
- * @brief Q15 complex magnitude squared
- * @param[in] pSrc points to the complex input vector
- * @param[out] pDst points to the real output vector
- * @param[in] numSamples number of complex samples in the input vector
- */
- void arm_cmplx_mag_squared_q15(
- q15_t * pSrc,
- q15_t * pDst,
- uint32_t numSamples);
-
-
- /**
- * @ingroup groupController
- */
-
- /**
- * @defgroup PID PID Motor Control
- *
- * A Proportional Integral Derivative (PID) controller is a generic feedback control
- * loop mechanism widely used in industrial control systems.
- * A PID controller is the most commonly used type of feedback controller.
- *
- * This set of functions implements (PID) controllers
- * for Q15, Q31, and floating-point data types. The functions operate on a single sample
- * of data and each call to the function returns a single processed value.
- * S points to an instance of the PID control data structure. in
- * is the input sample value. The functions return the output value.
- *
- * \par Algorithm:
- *
- *
- * \par
- * where \c Kp is proportional constant, \c Ki is Integral constant and \c Kd is Derivative constant
- *
- * \par
- * \image html PID.gif "Proportional Integral Derivative Controller"
- *
- * \par
- * The PID controller calculates an "error" value as the difference between
- * the measured output and the reference input.
- * The controller attempts to minimize the error by adjusting the process control inputs.
- * The proportional value determines the reaction to the current error,
- * the integral value determines the reaction based on the sum of recent errors,
- * and the derivative value determines the reaction based on the rate at which the error has been changing.
- *
- * \par Instance Structure
- * The Gains A0, A1, A2 and state variables for a PID controller are stored together in an instance data structure.
- * A separate instance structure must be defined for each PID Controller.
- * There are separate instance structure declarations for each of the 3 supported data types.
- *
- * \par Reset Functions
- * There is also an associated reset function for each data type which clears the state array.
- *
- * \par Initialization Functions
- * There is also an associated initialization function for each data type.
- * The initialization function performs the following operations:
- * - Initializes the Gains A0, A1, A2 from Kp,Ki, Kd gains.
- * - Zeros out the values in the state buffer.
- *
- * \par
- * Instance structure cannot be placed into a const data section and it is recommended to use the initialization function.
- *
- * \par Fixed-Point Behavior
- * Care must be taken when using the fixed-point versions of the PID Controller functions.
- * In particular, the overflow and saturation behavior of the accumulator used in each function must be considered.
- * Refer to the function specific documentation below for usage guidelines.
- */
-
- /**
- * @addtogroup PID
- * @{
- */
-
- /**
- * @brief Process function for the floating-point PID Control.
- * @param[in,out] S is an instance of the floating-point PID Control structure
- * @param[in] in input sample to process
- * @return out processed output sample.
- */
- CMSIS_INLINE __STATIC_INLINE float32_t arm_pid_f32(
- arm_pid_instance_f32 * S,
- float32_t in)
- {
- float32_t out;
-
- /* y[n] = y[n-1] + A0 * x[n] + A1 * x[n-1] + A2 * x[n-2] */
- out = (S->A0 * in) +
- (S->A1 * S->state[0]) + (S->A2 * S->state[1]) + (S->state[2]);
-
- /* Update state */
- S->state[1] = S->state[0];
- S->state[0] = in;
- S->state[2] = out;
-
- /* return to application */
- return (out);
-
- }
-
- /**
- * @brief Process function for the Q31 PID Control.
- * @param[in,out] S points to an instance of the Q31 PID Control structure
- * @param[in] in input sample to process
- * @return out processed output sample.
- *
- * Scaling and Overflow Behavior:
- * \par
- * The function is implemented using an internal 64-bit accumulator.
- * The accumulator has a 2.62 format and maintains full precision of the intermediate multiplication results but provides only a single guard bit.
- * Thus, if the accumulator result overflows it wraps around rather than clip.
- * In order to avoid overflows completely the input signal must be scaled down by 2 bits as there are four additions.
- * After all multiply-accumulates are performed, the 2.62 accumulator is truncated to 1.32 format and then saturated to 1.31 format.
- */
- CMSIS_INLINE __STATIC_INLINE q31_t arm_pid_q31(
- arm_pid_instance_q31 * S,
- q31_t in)
- {
- q63_t acc;
- q31_t out;
-
- /* acc = A0 * x[n] */
- acc = (q63_t) S->A0 * in;
-
- /* acc += A1 * x[n-1] */
- acc += (q63_t) S->A1 * S->state[0];
-
- /* acc += A2 * x[n-2] */
- acc += (q63_t) S->A2 * S->state[1];
-
- /* convert output to 1.31 format to add y[n-1] */
- out = (q31_t) (acc >> 31u);
-
- /* out += y[n-1] */
- out += S->state[2];
-
- /* Update state */
- S->state[1] = S->state[0];
- S->state[0] = in;
- S->state[2] = out;
-
- /* return to application */
- return (out);
- }
-
-
- /**
- * @brief Process function for the Q15 PID Control.
- * @param[in,out] S points to an instance of the Q15 PID Control structure
- * @param[in] in input sample to process
- * @return out processed output sample.
- *
- * Scaling and Overflow Behavior:
- * \par
- * The function is implemented using a 64-bit internal accumulator.
- * Both Gains and state variables are represented in 1.15 format and multiplications yield a 2.30 result.
- * The 2.30 intermediate results are accumulated in a 64-bit accumulator in 34.30 format.
- * There is no risk of internal overflow with this approach and the full precision of intermediate multiplications is preserved.
- * After all additions have been performed, the accumulator is truncated to 34.15 format by discarding low 15 bits.
- * Lastly, the accumulator is saturated to yield a result in 1.15 format.
- */
- CMSIS_INLINE __STATIC_INLINE q15_t arm_pid_q15(
- arm_pid_instance_q15 * S,
- q15_t in)
- {
- q63_t acc;
- q15_t out;
-
-#if defined (ARM_MATH_DSP)
- __SIMD32_TYPE *vstate;
-
- /* Implementation of PID controller */
-
- /* acc = A0 * x[n] */
- acc = (q31_t) __SMUAD((uint32_t)S->A0, (uint32_t)in);
-
- /* acc += A1 * x[n-1] + A2 * x[n-2] */
- vstate = __SIMD32_CONST(S->state);
- acc = (q63_t)__SMLALD((uint32_t)S->A1, (uint32_t)*vstate, (uint64_t)acc);
-#else
- /* acc = A0 * x[n] */
- acc = ((q31_t) S->A0) * in;
-
- /* acc += A1 * x[n-1] + A2 * x[n-2] */
- acc += (q31_t) S->A1 * S->state[0];
- acc += (q31_t) S->A2 * S->state[1];
-#endif
-
- /* acc += y[n-1] */
- acc += (q31_t) S->state[2] << 15;
-
- /* saturate the output */
- out = (q15_t) (__SSAT((acc >> 15), 16));
-
- /* Update state */
- S->state[1] = S->state[0];
- S->state[0] = in;
- S->state[2] = out;
-
- /* return to application */
- return (out);
- }
-
- /**
- * @} end of PID group
- */
-
-
- /**
- * @brief Floating-point matrix inverse.
- * @param[in] src points to the instance of the input floating-point matrix structure.
- * @param[out] dst points to the instance of the output floating-point matrix structure.
- * @return The function returns ARM_MATH_SIZE_MISMATCH, if the dimensions do not match.
- * If the input matrix is singular (does not have an inverse), then the algorithm terminates and returns error status ARM_MATH_SINGULAR.
- */
- arm_status arm_mat_inverse_f32(
- const arm_matrix_instance_f32 * src,
- arm_matrix_instance_f32 * dst);
-
-
- /**
- * @brief Floating-point matrix inverse.
- * @param[in] src points to the instance of the input floating-point matrix structure.
- * @param[out] dst points to the instance of the output floating-point matrix structure.
- * @return The function returns ARM_MATH_SIZE_MISMATCH, if the dimensions do not match.
- * If the input matrix is singular (does not have an inverse), then the algorithm terminates and returns error status ARM_MATH_SINGULAR.
- */
- arm_status arm_mat_inverse_f64(
- const arm_matrix_instance_f64 * src,
- arm_matrix_instance_f64 * dst);
-
-
-
- /**
- * @ingroup groupController
- */
-
- /**
- * @defgroup clarke Vector Clarke Transform
- * Forward Clarke transform converts the instantaneous stator phases into a two-coordinate time invariant vector.
- * Generally the Clarke transform uses three-phase currents Ia, Ib and Ic to calculate currents
- * in the two-phase orthogonal stator axis Ialpha and Ibeta.
- * When Ialpha is superposed with Ia as shown in the figure below
- * \image html clarke.gif Stator current space vector and its components in (a,b).
- * and Ia + Ib + Ic = 0, in this condition Ialpha and Ibeta
- * can be calculated using only Ia and Ib.
- *
- * The function operates on a single sample of data and each call to the function returns the processed output.
- * The library provides separate functions for Q31 and floating-point data types.
- * \par Algorithm
- * \image html clarkeFormula.gif
- * where Ia and Ib are the instantaneous stator phases and
- * pIalpha and pIbeta are the two coordinates of time invariant vector.
- * \par Fixed-Point Behavior
- * Care must be taken when using the Q31 version of the Clarke transform.
- * In particular, the overflow and saturation behavior of the accumulator used must be considered.
- * Refer to the function specific documentation below for usage guidelines.
- */
-
- /**
- * @addtogroup clarke
- * @{
- */
-
- /**
- *
- * @brief Floating-point Clarke transform
- * @param[in] Ia input three-phase coordinate a
- * @param[in] Ib input three-phase coordinate b
- * @param[out] pIalpha points to output two-phase orthogonal vector axis alpha
- * @param[out] pIbeta points to output two-phase orthogonal vector axis beta
- */
- CMSIS_INLINE __STATIC_INLINE void arm_clarke_f32(
- float32_t Ia,
- float32_t Ib,
- float32_t * pIalpha,
- float32_t * pIbeta)
- {
- /* Calculate pIalpha using the equation, pIalpha = Ia */
- *pIalpha = Ia;
-
- /* Calculate pIbeta using the equation, pIbeta = (1/sqrt(3)) * Ia + (2/sqrt(3)) * Ib */
- *pIbeta = ((float32_t) 0.57735026919 * Ia + (float32_t) 1.15470053838 * Ib);
- }
-
-
- /**
- * @brief Clarke transform for Q31 version
- * @param[in] Ia input three-phase coordinate a
- * @param[in] Ib input three-phase coordinate b
- * @param[out] pIalpha points to output two-phase orthogonal vector axis alpha
- * @param[out] pIbeta points to output two-phase orthogonal vector axis beta
- *
- * Scaling and Overflow Behavior:
- * \par
- * The function is implemented using an internal 32-bit accumulator.
- * The accumulator maintains 1.31 format by truncating lower 31 bits of the intermediate multiplication in 2.62 format.
- * There is saturation on the addition, hence there is no risk of overflow.
- */
- CMSIS_INLINE __STATIC_INLINE void arm_clarke_q31(
- q31_t Ia,
- q31_t Ib,
- q31_t * pIalpha,
- q31_t * pIbeta)
- {
- q31_t product1, product2; /* Temporary variables used to store intermediate results */
-
- /* Calculating pIalpha from Ia by equation pIalpha = Ia */
- *pIalpha = Ia;
-
- /* Intermediate product is calculated by (1/(sqrt(3)) * Ia) */
- product1 = (q31_t) (((q63_t) Ia * 0x24F34E8B) >> 30);
-
- /* Intermediate product is calculated by (2/sqrt(3) * Ib) */
- product2 = (q31_t) (((q63_t) Ib * 0x49E69D16) >> 30);
-
- /* pIbeta is calculated by adding the intermediate products */
- *pIbeta = __QADD(product1, product2);
- }
-
- /**
- * @} end of clarke group
- */
-
- /**
- * @brief Converts the elements of the Q7 vector to Q31 vector.
- * @param[in] pSrc input pointer
- * @param[out] pDst output pointer
- * @param[in] blockSize number of samples to process
- */
- void arm_q7_to_q31(
- q7_t * pSrc,
- q31_t * pDst,
- uint32_t blockSize);
-
-
-
- /**
- * @ingroup groupController
- */
-
- /**
- * @defgroup inv_clarke Vector Inverse Clarke Transform
- * Inverse Clarke transform converts the two-coordinate time invariant vector into instantaneous stator phases.
- *
- * The function operates on a single sample of data and each call to the function returns the processed output.
- * The library provides separate functions for Q31 and floating-point data types.
- * \par Algorithm
- * \image html clarkeInvFormula.gif
- * where pIa and pIb are the instantaneous stator phases and
- * Ialpha and Ibeta are the two coordinates of time invariant vector.
- * \par Fixed-Point Behavior
- * Care must be taken when using the Q31 version of the Clarke transform.
- * In particular, the overflow and saturation behavior of the accumulator used must be considered.
- * Refer to the function specific documentation below for usage guidelines.
- */
-
- /**
- * @addtogroup inv_clarke
- * @{
- */
-
- /**
- * @brief Floating-point Inverse Clarke transform
- * @param[in] Ialpha input two-phase orthogonal vector axis alpha
- * @param[in] Ibeta input two-phase orthogonal vector axis beta
- * @param[out] pIa points to output three-phase coordinate a
- * @param[out] pIb points to output three-phase coordinate b
- */
- CMSIS_INLINE __STATIC_INLINE void arm_inv_clarke_f32(
- float32_t Ialpha,
- float32_t Ibeta,
- float32_t * pIa,
- float32_t * pIb)
- {
- /* Calculating pIa from Ialpha by equation pIa = Ialpha */
- *pIa = Ialpha;
-
- /* Calculating pIb from Ialpha and Ibeta by equation pIb = -(1/2) * Ialpha + (sqrt(3)/2) * Ibeta */
- *pIb = -0.5f * Ialpha + 0.8660254039f * Ibeta;
- }
-
-
- /**
- * @brief Inverse Clarke transform for Q31 version
- * @param[in] Ialpha input two-phase orthogonal vector axis alpha
- * @param[in] Ibeta input two-phase orthogonal vector axis beta
- * @param[out] pIa points to output three-phase coordinate a
- * @param[out] pIb points to output three-phase coordinate b
- *
- * Scaling and Overflow Behavior:
- * \par
- * The function is implemented using an internal 32-bit accumulator.
- * The accumulator maintains 1.31 format by truncating lower 31 bits of the intermediate multiplication in 2.62 format.
- * There is saturation on the subtraction, hence there is no risk of overflow.
- */
- CMSIS_INLINE __STATIC_INLINE void arm_inv_clarke_q31(
- q31_t Ialpha,
- q31_t Ibeta,
- q31_t * pIa,
- q31_t * pIb)
- {
- q31_t product1, product2; /* Temporary variables used to store intermediate results */
-
- /* Calculating pIa from Ialpha by equation pIa = Ialpha */
- *pIa = Ialpha;
-
- /* Intermediate product is calculated by (1/(2*sqrt(3)) * Ia) */
- product1 = (q31_t) (((q63_t) (Ialpha) * (0x40000000)) >> 31);
-
- /* Intermediate product is calculated by (1/sqrt(3) * pIb) */
- product2 = (q31_t) (((q63_t) (Ibeta) * (0x6ED9EBA1)) >> 31);
-
- /* pIb is calculated by subtracting the products */
- *pIb = __QSUB(product2, product1);
- }
-
- /**
- * @} end of inv_clarke group
- */
-
- /**
- * @brief Converts the elements of the Q7 vector to Q15 vector.
- * @param[in] pSrc input pointer
- * @param[out] pDst output pointer
- * @param[in] blockSize number of samples to process
- */
- void arm_q7_to_q15(
- q7_t * pSrc,
- q15_t * pDst,
- uint32_t blockSize);
-
-
-
- /**
- * @ingroup groupController
- */
-
- /**
- * @defgroup park Vector Park Transform
- *
- * Forward Park transform converts the input two-coordinate vector to flux and torque components.
- * The Park transform can be used to realize the transformation of the Ialpha and the Ibeta currents
- * from the stationary to the moving reference frame and control the spatial relationship between
- * the stator vector current and rotor flux vector.
- * If we consider the d axis aligned with the rotor flux, the diagram below shows the
- * current vector and the relationship from the two reference frames:
- * \image html park.gif "Stator current space vector and its component in (a,b) and in the d,q rotating reference frame"
- *
- * The function operates on a single sample of data and each call to the function returns the processed output.
- * The library provides separate functions for Q31 and floating-point data types.
- * \par Algorithm
- * \image html parkFormula.gif
- * where Ialpha and Ibeta are the stator vector components,
- * pId and pIq are rotor vector components and cosVal and sinVal are the
- * cosine and sine values of theta (rotor flux position).
- * \par Fixed-Point Behavior
- * Care must be taken when using the Q31 version of the Park transform.
- * In particular, the overflow and saturation behavior of the accumulator used must be considered.
- * Refer to the function specific documentation below for usage guidelines.
- */
-
- /**
- * @addtogroup park
- * @{
- */
-
- /**
- * @brief Floating-point Park transform
- * @param[in] Ialpha input two-phase vector coordinate alpha
- * @param[in] Ibeta input two-phase vector coordinate beta
- * @param[out] pId points to output rotor reference frame d
- * @param[out] pIq points to output rotor reference frame q
- * @param[in] sinVal sine value of rotation angle theta
- * @param[in] cosVal cosine value of rotation angle theta
- *
- * The function implements the forward Park transform.
- *
- */
- CMSIS_INLINE __STATIC_INLINE void arm_park_f32(
- float32_t Ialpha,
- float32_t Ibeta,
- float32_t * pId,
- float32_t * pIq,
- float32_t sinVal,
- float32_t cosVal)
- {
- /* Calculate pId using the equation, pId = Ialpha * cosVal + Ibeta * sinVal */
- *pId = Ialpha * cosVal + Ibeta * sinVal;
-
- /* Calculate pIq using the equation, pIq = - Ialpha * sinVal + Ibeta * cosVal */
- *pIq = -Ialpha * sinVal + Ibeta * cosVal;
- }
-
-
- /**
- * @brief Park transform for Q31 version
- * @param[in] Ialpha input two-phase vector coordinate alpha
- * @param[in] Ibeta input two-phase vector coordinate beta
- * @param[out] pId points to output rotor reference frame d
- * @param[out] pIq points to output rotor reference frame q
- * @param[in] sinVal sine value of rotation angle theta
- * @param[in] cosVal cosine value of rotation angle theta
- *
- * Scaling and Overflow Behavior:
- * \par
- * The function is implemented using an internal 32-bit accumulator.
- * The accumulator maintains 1.31 format by truncating lower 31 bits of the intermediate multiplication in 2.62 format.
- * There is saturation on the addition and subtraction, hence there is no risk of overflow.
- */
- CMSIS_INLINE __STATIC_INLINE void arm_park_q31(
- q31_t Ialpha,
- q31_t Ibeta,
- q31_t * pId,
- q31_t * pIq,
- q31_t sinVal,
- q31_t cosVal)
- {
- q31_t product1, product2; /* Temporary variables used to store intermediate results */
- q31_t product3, product4; /* Temporary variables used to store intermediate results */
-
- /* Intermediate product is calculated by (Ialpha * cosVal) */
- product1 = (q31_t) (((q63_t) (Ialpha) * (cosVal)) >> 31);
-
- /* Intermediate product is calculated by (Ibeta * sinVal) */
- product2 = (q31_t) (((q63_t) (Ibeta) * (sinVal)) >> 31);
-
-
- /* Intermediate product is calculated by (Ialpha * sinVal) */
- product3 = (q31_t) (((q63_t) (Ialpha) * (sinVal)) >> 31);
-
- /* Intermediate product is calculated by (Ibeta * cosVal) */
- product4 = (q31_t) (((q63_t) (Ibeta) * (cosVal)) >> 31);
-
- /* Calculate pId by adding the two intermediate products 1 and 2 */
- *pId = __QADD(product1, product2);
-
- /* Calculate pIq by subtracting the two intermediate products 3 from 4 */
- *pIq = __QSUB(product4, product3);
- }
-
- /**
- * @} end of park group
- */
-
- /**
- * @brief Converts the elements of the Q7 vector to floating-point vector.
- * @param[in] pSrc is input pointer
- * @param[out] pDst is output pointer
- * @param[in] blockSize is the number of samples to process
- */
- void arm_q7_to_float(
- q7_t * pSrc,
- float32_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @ingroup groupController
- */
-
- /**
- * @defgroup inv_park Vector Inverse Park transform
- * Inverse Park transform converts the input flux and torque components to two-coordinate vector.
- *
- * The function operates on a single sample of data and each call to the function returns the processed output.
- * The library provides separate functions for Q31 and floating-point data types.
- * \par Algorithm
- * \image html parkInvFormula.gif
- * where pIalpha and pIbeta are the stator vector components,
- * Id and Iq are rotor vector components and cosVal and sinVal are the
- * cosine and sine values of theta (rotor flux position).
- * \par Fixed-Point Behavior
- * Care must be taken when using the Q31 version of the Park transform.
- * In particular, the overflow and saturation behavior of the accumulator used must be considered.
- * Refer to the function specific documentation below for usage guidelines.
- */
-
- /**
- * @addtogroup inv_park
- * @{
- */
-
- /**
- * @brief Floating-point Inverse Park transform
- * @param[in] Id input coordinate of rotor reference frame d
- * @param[in] Iq input coordinate of rotor reference frame q
- * @param[out] pIalpha points to output two-phase orthogonal vector axis alpha
- * @param[out] pIbeta points to output two-phase orthogonal vector axis beta
- * @param[in] sinVal sine value of rotation angle theta
- * @param[in] cosVal cosine value of rotation angle theta
- */
- CMSIS_INLINE __STATIC_INLINE void arm_inv_park_f32(
- float32_t Id,
- float32_t Iq,
- float32_t * pIalpha,
- float32_t * pIbeta,
- float32_t sinVal,
- float32_t cosVal)
- {
- /* Calculate pIalpha using the equation, pIalpha = Id * cosVal - Iq * sinVal */
- *pIalpha = Id * cosVal - Iq * sinVal;
-
- /* Calculate pIbeta using the equation, pIbeta = Id * sinVal + Iq * cosVal */
- *pIbeta = Id * sinVal + Iq * cosVal;
- }
-
-
- /**
- * @brief Inverse Park transform for Q31 version
- * @param[in] Id input coordinate of rotor reference frame d
- * @param[in] Iq input coordinate of rotor reference frame q
- * @param[out] pIalpha points to output two-phase orthogonal vector axis alpha
- * @param[out] pIbeta points to output two-phase orthogonal vector axis beta
- * @param[in] sinVal sine value of rotation angle theta
- * @param[in] cosVal cosine value of rotation angle theta
- *
- * Scaling and Overflow Behavior:
- * \par
- * The function is implemented using an internal 32-bit accumulator.
- * The accumulator maintains 1.31 format by truncating lower 31 bits of the intermediate multiplication in 2.62 format.
- * There is saturation on the addition, hence there is no risk of overflow.
- */
- CMSIS_INLINE __STATIC_INLINE void arm_inv_park_q31(
- q31_t Id,
- q31_t Iq,
- q31_t * pIalpha,
- q31_t * pIbeta,
- q31_t sinVal,
- q31_t cosVal)
- {
- q31_t product1, product2; /* Temporary variables used to store intermediate results */
- q31_t product3, product4; /* Temporary variables used to store intermediate results */
-
- /* Intermediate product is calculated by (Id * cosVal) */
- product1 = (q31_t) (((q63_t) (Id) * (cosVal)) >> 31);
-
- /* Intermediate product is calculated by (Iq * sinVal) */
- product2 = (q31_t) (((q63_t) (Iq) * (sinVal)) >> 31);
-
-
- /* Intermediate product is calculated by (Id * sinVal) */
- product3 = (q31_t) (((q63_t) (Id) * (sinVal)) >> 31);
-
- /* Intermediate product is calculated by (Iq * cosVal) */
- product4 = (q31_t) (((q63_t) (Iq) * (cosVal)) >> 31);
-
- /* Calculate pIalpha by using the two intermediate products 1 and 2 */
- *pIalpha = __QSUB(product1, product2);
-
- /* Calculate pIbeta by using the two intermediate products 3 and 4 */
- *pIbeta = __QADD(product4, product3);
- }
-
- /**
- * @} end of Inverse park group
- */
-
-
- /**
- * @brief Converts the elements of the Q31 vector to floating-point vector.
- * @param[in] pSrc is input pointer
- * @param[out] pDst is output pointer
- * @param[in] blockSize is the number of samples to process
- */
- void arm_q31_to_float(
- q31_t * pSrc,
- float32_t * pDst,
- uint32_t blockSize);
-
- /**
- * @ingroup groupInterpolation
- */
-
- /**
- * @defgroup LinearInterpolate Linear Interpolation
- *
- * Linear interpolation is a method of curve fitting using linear polynomials.
- * Linear interpolation works by effectively drawing a straight line between two neighboring samples and returning the appropriate point along that line
- *
- * \par
- * \image html LinearInterp.gif "Linear interpolation"
- *
- * \par
- * A Linear Interpolate function calculates an output value(y), for the input(x)
- * using linear interpolation of the input values x0, x1( nearest input values) and the output values y0 and y1(nearest output values)
- *
- * \par Algorithm:
- *
- * y = y0 + (x - x0) * ((y1 - y0)/(x1-x0))
- * where x0, x1 are nearest values of input x
- * y0, y1 are nearest values to output y
- *
- *
- * \par
- * This set of functions implements Linear interpolation process
- * for Q7, Q15, Q31, and floating-point data types. The functions operate on a single
- * sample of data and each call to the function returns a single processed value.
- * S points to an instance of the Linear Interpolate function data structure.
- * x is the input sample value. The functions returns the output value.
- *
- * \par
- * if x is outside of the table boundary, Linear interpolation returns first value of the table
- * if x is below input range and returns last value of table if x is above range.
- */
-
- /**
- * @addtogroup LinearInterpolate
- * @{
- */
-
- /**
- * @brief Process function for the floating-point Linear Interpolation Function.
- * @param[in,out] S is an instance of the floating-point Linear Interpolation structure
- * @param[in] x input sample to process
- * @return y processed output sample.
- *
- */
- CMSIS_INLINE __STATIC_INLINE float32_t arm_linear_interp_f32(
- arm_linear_interp_instance_f32 * S,
- float32_t x)
- {
- float32_t y;
- float32_t x0, x1; /* Nearest input values */
- float32_t y0, y1; /* Nearest output values */
- float32_t xSpacing = S->xSpacing; /* spacing between input values */
- int32_t i; /* Index variable */
- float32_t *pYData = S->pYData; /* pointer to output table */
-
- /* Calculation of index */
- i = (int32_t) ((x - S->x1) / xSpacing);
-
- if (i < 0)
- {
- /* Iniatilize output for below specified range as least output value of table */
- y = pYData[0];
- }
- else if ((uint32_t)i >= S->nValues)
- {
- /* Iniatilize output for above specified range as last output value of table */
- y = pYData[S->nValues - 1];
- }
- else
- {
- /* Calculation of nearest input values */
- x0 = S->x1 + i * xSpacing;
- x1 = S->x1 + (i + 1) * xSpacing;
-
- /* Read of nearest output values */
- y0 = pYData[i];
- y1 = pYData[i + 1];
-
- /* Calculation of output */
- y = y0 + (x - x0) * ((y1 - y0) / (x1 - x0));
-
- }
-
- /* returns output value */
- return (y);
- }
-
-
- /**
- *
- * @brief Process function for the Q31 Linear Interpolation Function.
- * @param[in] pYData pointer to Q31 Linear Interpolation table
- * @param[in] x input sample to process
- * @param[in] nValues number of table values
- * @return y processed output sample.
- *
- * \par
- * Input sample x is in 12.20 format which contains 12 bits for table index and 20 bits for fractional part.
- * This function can support maximum of table size 2^12.
- *
- */
- CMSIS_INLINE __STATIC_INLINE q31_t arm_linear_interp_q31(
- q31_t * pYData,
- q31_t x,
- uint32_t nValues)
- {
- q31_t y; /* output */
- q31_t y0, y1; /* Nearest output values */
- q31_t fract; /* fractional part */
- int32_t index; /* Index to read nearest output values */
-
- /* Input is in 12.20 format */
- /* 12 bits for the table index */
- /* Index value calculation */
- index = ((x & (q31_t)0xFFF00000) >> 20);
-
- if (index >= (int32_t)(nValues - 1))
- {
- return (pYData[nValues - 1]);
- }
- else if (index < 0)
- {
- return (pYData[0]);
- }
- else
- {
- /* 20 bits for the fractional part */
- /* shift left by 11 to keep fract in 1.31 format */
- fract = (x & 0x000FFFFF) << 11;
-
- /* Read two nearest output values from the index in 1.31(q31) format */
- y0 = pYData[index];
- y1 = pYData[index + 1];
-
- /* Calculation of y0 * (1-fract) and y is in 2.30 format */
- y = ((q31_t) ((q63_t) y0 * (0x7FFFFFFF - fract) >> 32));
-
- /* Calculation of y0 * (1-fract) + y1 *fract and y is in 2.30 format */
- y += ((q31_t) (((q63_t) y1 * fract) >> 32));
-
- /* Convert y to 1.31 format */
- return (y << 1u);
- }
- }
-
-
- /**
- *
- * @brief Process function for the Q15 Linear Interpolation Function.
- * @param[in] pYData pointer to Q15 Linear Interpolation table
- * @param[in] x input sample to process
- * @param[in] nValues number of table values
- * @return y processed output sample.
- *
- * \par
- * Input sample x is in 12.20 format which contains 12 bits for table index and 20 bits for fractional part.
- * This function can support maximum of table size 2^12.
- *
- */
- CMSIS_INLINE __STATIC_INLINE q15_t arm_linear_interp_q15(
- q15_t * pYData,
- q31_t x,
- uint32_t nValues)
- {
- q63_t y; /* output */
- q15_t y0, y1; /* Nearest output values */
- q31_t fract; /* fractional part */
- int32_t index; /* Index to read nearest output values */
-
- /* Input is in 12.20 format */
- /* 12 bits for the table index */
- /* Index value calculation */
- index = ((x & (int32_t)0xFFF00000) >> 20);
-
- if (index >= (int32_t)(nValues - 1))
- {
- return (pYData[nValues - 1]);
- }
- else if (index < 0)
- {
- return (pYData[0]);
- }
- else
- {
- /* 20 bits for the fractional part */
- /* fract is in 12.20 format */
- fract = (x & 0x000FFFFF);
-
- /* Read two nearest output values from the index */
- y0 = pYData[index];
- y1 = pYData[index + 1];
-
- /* Calculation of y0 * (1-fract) and y is in 13.35 format */
- y = ((q63_t) y0 * (0xFFFFF - fract));
-
- /* Calculation of (y0 * (1-fract) + y1 * fract) and y is in 13.35 format */
- y += ((q63_t) y1 * (fract));
-
- /* convert y to 1.15 format */
- return (q15_t) (y >> 20);
- }
- }
-
-
- /**
- *
- * @brief Process function for the Q7 Linear Interpolation Function.
- * @param[in] pYData pointer to Q7 Linear Interpolation table
- * @param[in] x input sample to process
- * @param[in] nValues number of table values
- * @return y processed output sample.
- *
- * \par
- * Input sample x is in 12.20 format which contains 12 bits for table index and 20 bits for fractional part.
- * This function can support maximum of table size 2^12.
- */
- CMSIS_INLINE __STATIC_INLINE q7_t arm_linear_interp_q7(
- q7_t * pYData,
- q31_t x,
- uint32_t nValues)
- {
- q31_t y; /* output */
- q7_t y0, y1; /* Nearest output values */
- q31_t fract; /* fractional part */
- uint32_t index; /* Index to read nearest output values */
-
- /* Input is in 12.20 format */
- /* 12 bits for the table index */
- /* Index value calculation */
- if (x < 0)
- {
- return (pYData[0]);
- }
- index = (x >> 20) & 0xfff;
-
- if (index >= (nValues - 1))
- {
- return (pYData[nValues - 1]);
- }
- else
- {
- /* 20 bits for the fractional part */
- /* fract is in 12.20 format */
- fract = (x & 0x000FFFFF);
-
- /* Read two nearest output values from the index and are in 1.7(q7) format */
- y0 = pYData[index];
- y1 = pYData[index + 1];
-
- /* Calculation of y0 * (1-fract ) and y is in 13.27(q27) format */
- y = ((y0 * (0xFFFFF - fract)));
-
- /* Calculation of y1 * fract + y0 * (1-fract) and y is in 13.27(q27) format */
- y += (y1 * fract);
-
- /* convert y to 1.7(q7) format */
- return (q7_t) (y >> 20);
- }
- }
-
- /**
- * @} end of LinearInterpolate group
- */
-
- /**
- * @brief Fast approximation to the trigonometric sine function for floating-point data.
- * @param[in] x input value in radians.
- * @return sin(x).
- */
- float32_t arm_sin_f32(
- float32_t x);
-
-
- /**
- * @brief Fast approximation to the trigonometric sine function for Q31 data.
- * @param[in] x Scaled input value in radians.
- * @return sin(x).
- */
- q31_t arm_sin_q31(
- q31_t x);
-
-
- /**
- * @brief Fast approximation to the trigonometric sine function for Q15 data.
- * @param[in] x Scaled input value in radians.
- * @return sin(x).
- */
- q15_t arm_sin_q15(
- q15_t x);
-
-
- /**
- * @brief Fast approximation to the trigonometric cosine function for floating-point data.
- * @param[in] x input value in radians.
- * @return cos(x).
- */
- float32_t arm_cos_f32(
- float32_t x);
-
-
- /**
- * @brief Fast approximation to the trigonometric cosine function for Q31 data.
- * @param[in] x Scaled input value in radians.
- * @return cos(x).
- */
- q31_t arm_cos_q31(
- q31_t x);
-
-
- /**
- * @brief Fast approximation to the trigonometric cosine function for Q15 data.
- * @param[in] x Scaled input value in radians.
- * @return cos(x).
- */
- q15_t arm_cos_q15(
- q15_t x);
-
-
- /**
- * @ingroup groupFastMath
- */
-
-
- /**
- * @defgroup SQRT Square Root
- *
- * Computes the square root of a number.
- * There are separate functions for Q15, Q31, and floating-point data types.
- * The square root function is computed using the Newton-Raphson algorithm.
- * This is an iterative algorithm of the form:
- *
- * x1 = x0 - f(x0)/f'(x0)
- *
- * where x1 is the current estimate,
- * x0 is the previous estimate, and
- * f'(x0) is the derivative of f() evaluated at x0.
- * For the square root function, the algorithm reduces to:
- *
- */
-
-
- /**
- * @addtogroup SQRT
- * @{
- */
-
- /**
- * @brief Floating-point square root function.
- * @param[in] in input value.
- * @param[out] pOut square root of input value.
- * @return The function returns ARM_MATH_SUCCESS if input value is positive value or ARM_MATH_ARGUMENT_ERROR if
- * in is negative value and returns zero output for negative values.
- */
- CMSIS_INLINE __STATIC_INLINE arm_status arm_sqrt_f32(
- float32_t in,
- float32_t * pOut)
- {
- if (in >= 0.0f)
- {
-
-#if (__FPU_USED == 1) && defined ( __CC_ARM )
- *pOut = __sqrtf(in);
-#elif (__FPU_USED == 1) && (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
- *pOut = __builtin_sqrtf(in);
-#elif (__FPU_USED == 1) && defined(__GNUC__)
- *pOut = __builtin_sqrtf(in);
-#elif (__FPU_USED == 1) && defined ( __ICCARM__ ) && (__VER__ >= 6040000)
- __ASM("VSQRT.F32 %0,%1" : "=t"(*pOut) : "t"(in));
-#else
- *pOut = sqrtf(in);
-#endif
-
- return (ARM_MATH_SUCCESS);
- }
- else
- {
- *pOut = 0.0f;
- return (ARM_MATH_ARGUMENT_ERROR);
- }
- }
-
-
- /**
- * @brief Q31 square root function.
- * @param[in] in input value. The range of the input value is [0 +1) or 0x00000000 to 0x7FFFFFFF.
- * @param[out] pOut square root of input value.
- * @return The function returns ARM_MATH_SUCCESS if input value is positive value or ARM_MATH_ARGUMENT_ERROR if
- * in is negative value and returns zero output for negative values.
- */
- arm_status arm_sqrt_q31(
- q31_t in,
- q31_t * pOut);
-
-
- /**
- * @brief Q15 square root function.
- * @param[in] in input value. The range of the input value is [0 +1) or 0x0000 to 0x7FFF.
- * @param[out] pOut square root of input value.
- * @return The function returns ARM_MATH_SUCCESS if input value is positive value or ARM_MATH_ARGUMENT_ERROR if
- * in is negative value and returns zero output for negative values.
- */
- arm_status arm_sqrt_q15(
- q15_t in,
- q15_t * pOut);
-
- /**
- * @} end of SQRT group
- */
-
-
- /**
- * @brief floating-point Circular write function.
- */
- CMSIS_INLINE __STATIC_INLINE void arm_circularWrite_f32(
- int32_t * circBuffer,
- int32_t L,
- uint16_t * writeOffset,
- int32_t bufferInc,
- const int32_t * src,
- int32_t srcInc,
- uint32_t blockSize)
- {
- uint32_t i = 0u;
- int32_t wOffset;
-
- /* Copy the value of Index pointer that points
- * to the current location where the input samples to be copied */
- wOffset = *writeOffset;
-
- /* Loop over the blockSize */
- i = blockSize;
-
- while (i > 0u)
- {
- /* copy the input sample to the circular buffer */
- circBuffer[wOffset] = *src;
-
- /* Update the input pointer */
- src += srcInc;
-
- /* Circularly update wOffset. Watch out for positive and negative value */
- wOffset += bufferInc;
- if (wOffset >= L)
- wOffset -= L;
-
- /* Decrement the loop counter */
- i--;
- }
-
- /* Update the index pointer */
- *writeOffset = (uint16_t)wOffset;
- }
-
-
-
- /**
- * @brief floating-point Circular Read function.
- */
- CMSIS_INLINE __STATIC_INLINE void arm_circularRead_f32(
- int32_t * circBuffer,
- int32_t L,
- int32_t * readOffset,
- int32_t bufferInc,
- int32_t * dst,
- int32_t * dst_base,
- int32_t dst_length,
- int32_t dstInc,
- uint32_t blockSize)
- {
- uint32_t i = 0u;
- int32_t rOffset, dst_end;
-
- /* Copy the value of Index pointer that points
- * to the current location from where the input samples to be read */
- rOffset = *readOffset;
- dst_end = (int32_t) (dst_base + dst_length);
-
- /* Loop over the blockSize */
- i = blockSize;
-
- while (i > 0u)
- {
- /* copy the sample from the circular buffer to the destination buffer */
- *dst = circBuffer[rOffset];
-
- /* Update the input pointer */
- dst += dstInc;
-
- if (dst == (int32_t *) dst_end)
- {
- dst = dst_base;
- }
-
- /* Circularly update rOffset. Watch out for positive and negative value */
- rOffset += bufferInc;
-
- if (rOffset >= L)
- {
- rOffset -= L;
- }
-
- /* Decrement the loop counter */
- i--;
- }
-
- /* Update the index pointer */
- *readOffset = rOffset;
- }
-
-
- /**
- * @brief Q15 Circular write function.
- */
- CMSIS_INLINE __STATIC_INLINE void arm_circularWrite_q15(
- q15_t * circBuffer,
- int32_t L,
- uint16_t * writeOffset,
- int32_t bufferInc,
- const q15_t * src,
- int32_t srcInc,
- uint32_t blockSize)
- {
- uint32_t i = 0u;
- int32_t wOffset;
-
- /* Copy the value of Index pointer that points
- * to the current location where the input samples to be copied */
- wOffset = *writeOffset;
-
- /* Loop over the blockSize */
- i = blockSize;
-
- while (i > 0u)
- {
- /* copy the input sample to the circular buffer */
- circBuffer[wOffset] = *src;
-
- /* Update the input pointer */
- src += srcInc;
-
- /* Circularly update wOffset. Watch out for positive and negative value */
- wOffset += bufferInc;
- if (wOffset >= L)
- wOffset -= L;
-
- /* Decrement the loop counter */
- i--;
- }
-
- /* Update the index pointer */
- *writeOffset = (uint16_t)wOffset;
- }
-
-
- /**
- * @brief Q15 Circular Read function.
- */
- CMSIS_INLINE __STATIC_INLINE void arm_circularRead_q15(
- q15_t * circBuffer,
- int32_t L,
- int32_t * readOffset,
- int32_t bufferInc,
- q15_t * dst,
- q15_t * dst_base,
- int32_t dst_length,
- int32_t dstInc,
- uint32_t blockSize)
- {
- uint32_t i = 0;
- int32_t rOffset, dst_end;
-
- /* Copy the value of Index pointer that points
- * to the current location from where the input samples to be read */
- rOffset = *readOffset;
-
- dst_end = (int32_t) (dst_base + dst_length);
-
- /* Loop over the blockSize */
- i = blockSize;
-
- while (i > 0u)
- {
- /* copy the sample from the circular buffer to the destination buffer */
- *dst = circBuffer[rOffset];
-
- /* Update the input pointer */
- dst += dstInc;
-
- if (dst == (q15_t *) dst_end)
- {
- dst = dst_base;
- }
-
- /* Circularly update wOffset. Watch out for positive and negative value */
- rOffset += bufferInc;
-
- if (rOffset >= L)
- {
- rOffset -= L;
- }
-
- /* Decrement the loop counter */
- i--;
- }
-
- /* Update the index pointer */
- *readOffset = rOffset;
- }
-
-
- /**
- * @brief Q7 Circular write function.
- */
- CMSIS_INLINE __STATIC_INLINE void arm_circularWrite_q7(
- q7_t * circBuffer,
- int32_t L,
- uint16_t * writeOffset,
- int32_t bufferInc,
- const q7_t * src,
- int32_t srcInc,
- uint32_t blockSize)
- {
- uint32_t i = 0u;
- int32_t wOffset;
-
- /* Copy the value of Index pointer that points
- * to the current location where the input samples to be copied */
- wOffset = *writeOffset;
-
- /* Loop over the blockSize */
- i = blockSize;
-
- while (i > 0u)
- {
- /* copy the input sample to the circular buffer */
- circBuffer[wOffset] = *src;
-
- /* Update the input pointer */
- src += srcInc;
-
- /* Circularly update wOffset. Watch out for positive and negative value */
- wOffset += bufferInc;
- if (wOffset >= L)
- wOffset -= L;
-
- /* Decrement the loop counter */
- i--;
- }
-
- /* Update the index pointer */
- *writeOffset = (uint16_t)wOffset;
- }
-
-
- /**
- * @brief Q7 Circular Read function.
- */
- CMSIS_INLINE __STATIC_INLINE void arm_circularRead_q7(
- q7_t * circBuffer,
- int32_t L,
- int32_t * readOffset,
- int32_t bufferInc,
- q7_t * dst,
- q7_t * dst_base,
- int32_t dst_length,
- int32_t dstInc,
- uint32_t blockSize)
- {
- uint32_t i = 0;
- int32_t rOffset, dst_end;
-
- /* Copy the value of Index pointer that points
- * to the current location from where the input samples to be read */
- rOffset = *readOffset;
-
- dst_end = (int32_t) (dst_base + dst_length);
-
- /* Loop over the blockSize */
- i = blockSize;
-
- while (i > 0u)
- {
- /* copy the sample from the circular buffer to the destination buffer */
- *dst = circBuffer[rOffset];
-
- /* Update the input pointer */
- dst += dstInc;
-
- if (dst == (q7_t *) dst_end)
- {
- dst = dst_base;
- }
-
- /* Circularly update rOffset. Watch out for positive and negative value */
- rOffset += bufferInc;
-
- if (rOffset >= L)
- {
- rOffset -= L;
- }
-
- /* Decrement the loop counter */
- i--;
- }
-
- /* Update the index pointer */
- *readOffset = rOffset;
- }
-
-
- /**
- * @brief Sum of the squares of the elements of a Q31 vector.
- * @param[in] pSrc is input pointer
- * @param[in] blockSize is the number of samples to process
- * @param[out] pResult is output value.
- */
- void arm_power_q31(
- q31_t * pSrc,
- uint32_t blockSize,
- q63_t * pResult);
-
-
- /**
- * @brief Sum of the squares of the elements of a floating-point vector.
- * @param[in] pSrc is input pointer
- * @param[in] blockSize is the number of samples to process
- * @param[out] pResult is output value.
- */
- void arm_power_f32(
- float32_t * pSrc,
- uint32_t blockSize,
- float32_t * pResult);
-
-
- /**
- * @brief Sum of the squares of the elements of a Q15 vector.
- * @param[in] pSrc is input pointer
- * @param[in] blockSize is the number of samples to process
- * @param[out] pResult is output value.
- */
- void arm_power_q15(
- q15_t * pSrc,
- uint32_t blockSize,
- q63_t * pResult);
-
-
- /**
- * @brief Sum of the squares of the elements of a Q7 vector.
- * @param[in] pSrc is input pointer
- * @param[in] blockSize is the number of samples to process
- * @param[out] pResult is output value.
- */
- void arm_power_q7(
- q7_t * pSrc,
- uint32_t blockSize,
- q31_t * pResult);
-
-
- /**
- * @brief Mean value of a Q7 vector.
- * @param[in] pSrc is input pointer
- * @param[in] blockSize is the number of samples to process
- * @param[out] pResult is output value.
- */
- void arm_mean_q7(
- q7_t * pSrc,
- uint32_t blockSize,
- q7_t * pResult);
-
-
- /**
- * @brief Mean value of a Q15 vector.
- * @param[in] pSrc is input pointer
- * @param[in] blockSize is the number of samples to process
- * @param[out] pResult is output value.
- */
- void arm_mean_q15(
- q15_t * pSrc,
- uint32_t blockSize,
- q15_t * pResult);
-
-
- /**
- * @brief Mean value of a Q31 vector.
- * @param[in] pSrc is input pointer
- * @param[in] blockSize is the number of samples to process
- * @param[out] pResult is output value.
- */
- void arm_mean_q31(
- q31_t * pSrc,
- uint32_t blockSize,
- q31_t * pResult);
-
-
- /**
- * @brief Mean value of a floating-point vector.
- * @param[in] pSrc is input pointer
- * @param[in] blockSize is the number of samples to process
- * @param[out] pResult is output value.
- */
- void arm_mean_f32(
- float32_t * pSrc,
- uint32_t blockSize,
- float32_t * pResult);
-
-
- /**
- * @brief Variance of the elements of a floating-point vector.
- * @param[in] pSrc is input pointer
- * @param[in] blockSize is the number of samples to process
- * @param[out] pResult is output value.
- */
- void arm_var_f32(
- float32_t * pSrc,
- uint32_t blockSize,
- float32_t * pResult);
-
-
- /**
- * @brief Variance of the elements of a Q31 vector.
- * @param[in] pSrc is input pointer
- * @param[in] blockSize is the number of samples to process
- * @param[out] pResult is output value.
- */
- void arm_var_q31(
- q31_t * pSrc,
- uint32_t blockSize,
- q31_t * pResult);
-
-
- /**
- * @brief Variance of the elements of a Q15 vector.
- * @param[in] pSrc is input pointer
- * @param[in] blockSize is the number of samples to process
- * @param[out] pResult is output value.
- */
- void arm_var_q15(
- q15_t * pSrc,
- uint32_t blockSize,
- q15_t * pResult);
-
-
- /**
- * @brief Root Mean Square of the elements of a floating-point vector.
- * @param[in] pSrc is input pointer
- * @param[in] blockSize is the number of samples to process
- * @param[out] pResult is output value.
- */
- void arm_rms_f32(
- float32_t * pSrc,
- uint32_t blockSize,
- float32_t * pResult);
-
-
- /**
- * @brief Root Mean Square of the elements of a Q31 vector.
- * @param[in] pSrc is input pointer
- * @param[in] blockSize is the number of samples to process
- * @param[out] pResult is output value.
- */
- void arm_rms_q31(
- q31_t * pSrc,
- uint32_t blockSize,
- q31_t * pResult);
-
-
- /**
- * @brief Root Mean Square of the elements of a Q15 vector.
- * @param[in] pSrc is input pointer
- * @param[in] blockSize is the number of samples to process
- * @param[out] pResult is output value.
- */
- void arm_rms_q15(
- q15_t * pSrc,
- uint32_t blockSize,
- q15_t * pResult);
-
-
- /**
- * @brief Standard deviation of the elements of a floating-point vector.
- * @param[in] pSrc is input pointer
- * @param[in] blockSize is the number of samples to process
- * @param[out] pResult is output value.
- */
- void arm_std_f32(
- float32_t * pSrc,
- uint32_t blockSize,
- float32_t * pResult);
-
-
- /**
- * @brief Standard deviation of the elements of a Q31 vector.
- * @param[in] pSrc is input pointer
- * @param[in] blockSize is the number of samples to process
- * @param[out] pResult is output value.
- */
- void arm_std_q31(
- q31_t * pSrc,
- uint32_t blockSize,
- q31_t * pResult);
-
-
- /**
- * @brief Standard deviation of the elements of a Q15 vector.
- * @param[in] pSrc is input pointer
- * @param[in] blockSize is the number of samples to process
- * @param[out] pResult is output value.
- */
- void arm_std_q15(
- q15_t * pSrc,
- uint32_t blockSize,
- q15_t * pResult);
-
-
- /**
- * @brief Floating-point complex magnitude
- * @param[in] pSrc points to the complex input vector
- * @param[out] pDst points to the real output vector
- * @param[in] numSamples number of complex samples in the input vector
- */
- void arm_cmplx_mag_f32(
- float32_t * pSrc,
- float32_t * pDst,
- uint32_t numSamples);
-
-
- /**
- * @brief Q31 complex magnitude
- * @param[in] pSrc points to the complex input vector
- * @param[out] pDst points to the real output vector
- * @param[in] numSamples number of complex samples in the input vector
- */
- void arm_cmplx_mag_q31(
- q31_t * pSrc,
- q31_t * pDst,
- uint32_t numSamples);
-
-
- /**
- * @brief Q15 complex magnitude
- * @param[in] pSrc points to the complex input vector
- * @param[out] pDst points to the real output vector
- * @param[in] numSamples number of complex samples in the input vector
- */
- void arm_cmplx_mag_q15(
- q15_t * pSrc,
- q15_t * pDst,
- uint32_t numSamples);
-
-
- /**
- * @brief Q15 complex dot product
- * @param[in] pSrcA points to the first input vector
- * @param[in] pSrcB points to the second input vector
- * @param[in] numSamples number of complex samples in each vector
- * @param[out] realResult real part of the result returned here
- * @param[out] imagResult imaginary part of the result returned here
- */
- void arm_cmplx_dot_prod_q15(
- q15_t * pSrcA,
- q15_t * pSrcB,
- uint32_t numSamples,
- q31_t * realResult,
- q31_t * imagResult);
-
-
- /**
- * @brief Q31 complex dot product
- * @param[in] pSrcA points to the first input vector
- * @param[in] pSrcB points to the second input vector
- * @param[in] numSamples number of complex samples in each vector
- * @param[out] realResult real part of the result returned here
- * @param[out] imagResult imaginary part of the result returned here
- */
- void arm_cmplx_dot_prod_q31(
- q31_t * pSrcA,
- q31_t * pSrcB,
- uint32_t numSamples,
- q63_t * realResult,
- q63_t * imagResult);
-
-
- /**
- * @brief Floating-point complex dot product
- * @param[in] pSrcA points to the first input vector
- * @param[in] pSrcB points to the second input vector
- * @param[in] numSamples number of complex samples in each vector
- * @param[out] realResult real part of the result returned here
- * @param[out] imagResult imaginary part of the result returned here
- */
- void arm_cmplx_dot_prod_f32(
- float32_t * pSrcA,
- float32_t * pSrcB,
- uint32_t numSamples,
- float32_t * realResult,
- float32_t * imagResult);
-
-
- /**
- * @brief Q15 complex-by-real multiplication
- * @param[in] pSrcCmplx points to the complex input vector
- * @param[in] pSrcReal points to the real input vector
- * @param[out] pCmplxDst points to the complex output vector
- * @param[in] numSamples number of samples in each vector
- */
- void arm_cmplx_mult_real_q15(
- q15_t * pSrcCmplx,
- q15_t * pSrcReal,
- q15_t * pCmplxDst,
- uint32_t numSamples);
-
-
- /**
- * @brief Q31 complex-by-real multiplication
- * @param[in] pSrcCmplx points to the complex input vector
- * @param[in] pSrcReal points to the real input vector
- * @param[out] pCmplxDst points to the complex output vector
- * @param[in] numSamples number of samples in each vector
- */
- void arm_cmplx_mult_real_q31(
- q31_t * pSrcCmplx,
- q31_t * pSrcReal,
- q31_t * pCmplxDst,
- uint32_t numSamples);
-
-
- /**
- * @brief Floating-point complex-by-real multiplication
- * @param[in] pSrcCmplx points to the complex input vector
- * @param[in] pSrcReal points to the real input vector
- * @param[out] pCmplxDst points to the complex output vector
- * @param[in] numSamples number of samples in each vector
- */
- void arm_cmplx_mult_real_f32(
- float32_t * pSrcCmplx,
- float32_t * pSrcReal,
- float32_t * pCmplxDst,
- uint32_t numSamples);
-
-
- /**
- * @brief Minimum value of a Q7 vector.
- * @param[in] pSrc is input pointer
- * @param[in] blockSize is the number of samples to process
- * @param[out] result is output pointer
- * @param[in] index is the array index of the minimum value in the input buffer.
- */
- void arm_min_q7(
- q7_t * pSrc,
- uint32_t blockSize,
- q7_t * result,
- uint32_t * index);
-
-
- /**
- * @brief Minimum value of a Q15 vector.
- * @param[in] pSrc is input pointer
- * @param[in] blockSize is the number of samples to process
- * @param[out] pResult is output pointer
- * @param[in] pIndex is the array index of the minimum value in the input buffer.
- */
- void arm_min_q15(
- q15_t * pSrc,
- uint32_t blockSize,
- q15_t * pResult,
- uint32_t * pIndex);
-
-
- /**
- * @brief Minimum value of a Q31 vector.
- * @param[in] pSrc is input pointer
- * @param[in] blockSize is the number of samples to process
- * @param[out] pResult is output pointer
- * @param[out] pIndex is the array index of the minimum value in the input buffer.
- */
- void arm_min_q31(
- q31_t * pSrc,
- uint32_t blockSize,
- q31_t * pResult,
- uint32_t * pIndex);
-
-
- /**
- * @brief Minimum value of a floating-point vector.
- * @param[in] pSrc is input pointer
- * @param[in] blockSize is the number of samples to process
- * @param[out] pResult is output pointer
- * @param[out] pIndex is the array index of the minimum value in the input buffer.
- */
- void arm_min_f32(
- float32_t * pSrc,
- uint32_t blockSize,
- float32_t * pResult,
- uint32_t * pIndex);
-
-
-/**
- * @brief Maximum value of a Q7 vector.
- * @param[in] pSrc points to the input buffer
- * @param[in] blockSize length of the input vector
- * @param[out] pResult maximum value returned here
- * @param[out] pIndex index of maximum value returned here
- */
- void arm_max_q7(
- q7_t * pSrc,
- uint32_t blockSize,
- q7_t * pResult,
- uint32_t * pIndex);
-
-
-/**
- * @brief Maximum value of a Q15 vector.
- * @param[in] pSrc points to the input buffer
- * @param[in] blockSize length of the input vector
- * @param[out] pResult maximum value returned here
- * @param[out] pIndex index of maximum value returned here
- */
- void arm_max_q15(
- q15_t * pSrc,
- uint32_t blockSize,
- q15_t * pResult,
- uint32_t * pIndex);
-
-
-/**
- * @brief Maximum value of a Q31 vector.
- * @param[in] pSrc points to the input buffer
- * @param[in] blockSize length of the input vector
- * @param[out] pResult maximum value returned here
- * @param[out] pIndex index of maximum value returned here
- */
- void arm_max_q31(
- q31_t * pSrc,
- uint32_t blockSize,
- q31_t * pResult,
- uint32_t * pIndex);
-
-
-/**
- * @brief Maximum value of a floating-point vector.
- * @param[in] pSrc points to the input buffer
- * @param[in] blockSize length of the input vector
- * @param[out] pResult maximum value returned here
- * @param[out] pIndex index of maximum value returned here
- */
- void arm_max_f32(
- float32_t * pSrc,
- uint32_t blockSize,
- float32_t * pResult,
- uint32_t * pIndex);
-
-
- /**
- * @brief Q15 complex-by-complex multiplication
- * @param[in] pSrcA points to the first input vector
- * @param[in] pSrcB points to the second input vector
- * @param[out] pDst points to the output vector
- * @param[in] numSamples number of complex samples in each vector
- */
- void arm_cmplx_mult_cmplx_q15(
- q15_t * pSrcA,
- q15_t * pSrcB,
- q15_t * pDst,
- uint32_t numSamples);
-
-
- /**
- * @brief Q31 complex-by-complex multiplication
- * @param[in] pSrcA points to the first input vector
- * @param[in] pSrcB points to the second input vector
- * @param[out] pDst points to the output vector
- * @param[in] numSamples number of complex samples in each vector
- */
- void arm_cmplx_mult_cmplx_q31(
- q31_t * pSrcA,
- q31_t * pSrcB,
- q31_t * pDst,
- uint32_t numSamples);
-
-
- /**
- * @brief Floating-point complex-by-complex multiplication
- * @param[in] pSrcA points to the first input vector
- * @param[in] pSrcB points to the second input vector
- * @param[out] pDst points to the output vector
- * @param[in] numSamples number of complex samples in each vector
- */
- void arm_cmplx_mult_cmplx_f32(
- float32_t * pSrcA,
- float32_t * pSrcB,
- float32_t * pDst,
- uint32_t numSamples);
-
-
- /**
- * @brief Converts the elements of the floating-point vector to Q31 vector.
- * @param[in] pSrc points to the floating-point input vector
- * @param[out] pDst points to the Q31 output vector
- * @param[in] blockSize length of the input vector
- */
- void arm_float_to_q31(
- float32_t * pSrc,
- q31_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Converts the elements of the floating-point vector to Q15 vector.
- * @param[in] pSrc points to the floating-point input vector
- * @param[out] pDst points to the Q15 output vector
- * @param[in] blockSize length of the input vector
- */
- void arm_float_to_q15(
- float32_t * pSrc,
- q15_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Converts the elements of the floating-point vector to Q7 vector.
- * @param[in] pSrc points to the floating-point input vector
- * @param[out] pDst points to the Q7 output vector
- * @param[in] blockSize length of the input vector
- */
- void arm_float_to_q7(
- float32_t * pSrc,
- q7_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Converts the elements of the Q31 vector to Q15 vector.
- * @param[in] pSrc is input pointer
- * @param[out] pDst is output pointer
- * @param[in] blockSize is the number of samples to process
- */
- void arm_q31_to_q15(
- q31_t * pSrc,
- q15_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Converts the elements of the Q31 vector to Q7 vector.
- * @param[in] pSrc is input pointer
- * @param[out] pDst is output pointer
- * @param[in] blockSize is the number of samples to process
- */
- void arm_q31_to_q7(
- q31_t * pSrc,
- q7_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Converts the elements of the Q15 vector to floating-point vector.
- * @param[in] pSrc is input pointer
- * @param[out] pDst is output pointer
- * @param[in] blockSize is the number of samples to process
- */
- void arm_q15_to_float(
- q15_t * pSrc,
- float32_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Converts the elements of the Q15 vector to Q31 vector.
- * @param[in] pSrc is input pointer
- * @param[out] pDst is output pointer
- * @param[in] blockSize is the number of samples to process
- */
- void arm_q15_to_q31(
- q15_t * pSrc,
- q31_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @brief Converts the elements of the Q15 vector to Q7 vector.
- * @param[in] pSrc is input pointer
- * @param[out] pDst is output pointer
- * @param[in] blockSize is the number of samples to process
- */
- void arm_q15_to_q7(
- q15_t * pSrc,
- q7_t * pDst,
- uint32_t blockSize);
-
-
- /**
- * @ingroup groupInterpolation
- */
-
- /**
- * @defgroup BilinearInterpolate Bilinear Interpolation
- *
- * Bilinear interpolation is an extension of linear interpolation applied to a two dimensional grid.
- * The underlying function f(x, y) is sampled on a regular grid and the interpolation process
- * determines values between the grid points.
- * Bilinear interpolation is equivalent to two step linear interpolation, first in the x-dimension and then in the y-dimension.
- * Bilinear interpolation is often used in image processing to rescale images.
- * The CMSIS DSP library provides bilinear interpolation functions for Q7, Q15, Q31, and floating-point data types.
- *
- * Algorithm
- * \par
- * The instance structure used by the bilinear interpolation functions describes a two dimensional data table.
- * For floating-point, the instance structure is defined as:
- *
- *
- * \par
- * where numRows specifies the number of rows in the table;
- * numCols specifies the number of columns in the table;
- * and pData points to an array of size numRows*numCols values.
- * The data table pTable is organized in row order and the supplied data values fall on integer indexes.
- * That is, table element (x,y) is located at pTable[x + y*numCols] where x and y are integers.
- *
- * \par
- * Let (x, y) specify the desired interpolation point. Then define:
- *
- * XF = floor(x)
- * YF = floor(y)
- *
- * \par
- * The interpolated output point is computed as:
- *