mirror of
https://github.com/qmk/qmk_firmware.git
synced 2026-06-28 18:24:03 -04:00
Compare commits
101 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 88780bf710 | |||
| a4be9b0ccb | |||
| 7f413e9f01 | |||
| a4b36f0b4b | |||
| 9b41e8168d | |||
| e206a1684e | |||
| 62a90945c7 | |||
| 0b62a4ef72 | |||
| c55c7fed83 | |||
| 40380c2684 | |||
| a68b620112 | |||
| aa7628641c | |||
| ea4136bc2b | |||
| cdf640578b | |||
| 7138fa4582 | |||
| ccb37b155c | |||
| 64b84385cd | |||
| e90d9fcfff | |||
| d61a5f4343 | |||
| 713427c086 | |||
| e1afcda1c0 | |||
| ab4013a69e | |||
| 974c01b4f8 | |||
| 387b64a79b | |||
| 6d8a1aa676 | |||
| 952cdc7be5 | |||
| e0a09ff728 | |||
| 990ee8075e | |||
| 697f53a154 | |||
| cefef18ceb | |||
| 6e5ff018e3 | |||
| 75b7140cbd | |||
| 28c11ed348 | |||
| d732b0b849 | |||
| 6d965d486c | |||
| ce417226b2 | |||
| 0382a25e35 | |||
| 83dcbefeed | |||
| 18335ddda5 | |||
| 051485c579 | |||
| 5012dfd719 | |||
| 641698d356 | |||
| 75edefe541 | |||
| 7e6eba674a | |||
| 26b35a54cf | |||
| 38700f7e3f | |||
| ed72c423be | |||
| bc6db2823c | |||
| fb706f42a2 | |||
| 9132c64389 | |||
| 6e0acf0548 | |||
| 2c375e6478 | |||
| a5e68e5f74 | |||
| e9b36bebb2 | |||
| df7b56e0ea | |||
| 2e766a9c7a | |||
| 4ba3fdfad2 | |||
| 655c24d29d | |||
| eab2b8faa0 | |||
| d058091d0b | |||
| 596319c92f | |||
| 4d17fe2a99 | |||
| 1d045e854b | |||
| f7176f070f | |||
| 687883cf7d | |||
| f56cf93fa1 | |||
| 1fd30b3391 | |||
| 37f205ec1a | |||
| 26e0bfd494 | |||
| a434507ab4 | |||
| ee8c86702e | |||
| 246cf99b4b | |||
| eb52984a94 | |||
| a5272a1575 | |||
| d06ce0153b | |||
| c58610bea3 | |||
| 12de0297ed | |||
| 4992df56b8 | |||
| f3f0bf6dbe | |||
| 8a5e8ed88e | |||
| fb6557acf1 | |||
| 2d7240f730 | |||
| 1d1c407e4e | |||
| 9152928f02 | |||
| 15a106b1ef | |||
| ac9f9f9efb | |||
| ec83c0b185 | |||
| d300811009 | |||
| 27e6e27d3a | |||
| 5687fc7646 | |||
| ebe36ea83c | |||
| 6b205c3064 | |||
| b5d0c44690 | |||
| d0e0b9e583 | |||
| b0dc99fbd8 | |||
| 5b8dae0d61 | |||
| fd56a2a1dc | |||
| be9f6e679b | |||
| b53356f7ab | |||
| c402bac023 | |||
| a030e8094f |
@@ -31,7 +31,7 @@ jobs:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Bump version and push tag
|
||||
uses: anothrNick/github-tag-action@1.61.0
|
||||
uses: anothrNick/github-tag-action@1.62.0
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
DEFAULT_BUMP: 'patch'
|
||||
|
||||
@@ -4,22 +4,27 @@ permissions:
|
||||
contents: read
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master, develop]
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 0,12 * * *'
|
||||
inputs:
|
||||
branch:
|
||||
type: choice
|
||||
description: 'Branch to build'
|
||||
options: [master, develop]
|
||||
|
||||
concurrency: ci_build-${{ github.event.inputs.branch || github.ref_name }}
|
||||
|
||||
jobs:
|
||||
ci_builds:
|
||||
if: github.repository == 'qmk/qmk_firmware'
|
||||
name: "CI Build"
|
||||
runs-on: self-hosted
|
||||
timeout-minutes: 1380
|
||||
|
||||
if: github.repository == 'qmk/qmk_firmware'
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
branch: [master, develop]
|
||||
keymap: [default, via]
|
||||
|
||||
container: qmkfm/qmk_cli
|
||||
@@ -31,7 +36,7 @@ jobs:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
ref: ${{ matrix.branch }}
|
||||
ref: ${{ github.event.inputs.branch || github.ref }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: pip3 install -r requirements.txt
|
||||
@@ -51,10 +56,19 @@ jobs:
|
||||
uses: actions/upload-artifact@v3
|
||||
if: always()
|
||||
with:
|
||||
name: artifacts-${{ matrix.branch }}-${{ matrix.keymap }}
|
||||
name: artifacts-${{ github.event.inputs.branch || github.ref_name }}-${{ matrix.keymap }}
|
||||
if-no-files-found: ignore
|
||||
path: |
|
||||
*.bin
|
||||
*.hex
|
||||
*.uf2
|
||||
.build/failed.*
|
||||
|
||||
- name: 'CI Discord Notification'
|
||||
if: always()
|
||||
working-directory: util/ci/
|
||||
env:
|
||||
DISCORD_WEBHOOK: ${{ secrets.CI_DISCORD_WEBHOOK }}
|
||||
run: |
|
||||
python3 -m pip install -r requirements.txt
|
||||
python3 ./discord-results.py --branch ${{ github.event.inputs.branch || github.ref_name }} --keymap ${{ matrix.keymap }} --url ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
||||
|
||||
@@ -47,7 +47,7 @@ jobs:
|
||||
git config user.email 'hello@qmk.fm'
|
||||
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v4
|
||||
uses: peter-evans/create-pull-request@v5
|
||||
if: ${{ github.repository == 'qmk/qmk_firmware'}}
|
||||
with:
|
||||
token: ${{ secrets.QMK_BOT_TOKEN }}
|
||||
|
||||
@@ -34,7 +34,7 @@ jobs:
|
||||
git config user.email 'hello@qmk.fm'
|
||||
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v4
|
||||
uses: peter-evans/create-pull-request@v5
|
||||
if: ${{ github.repository == 'qmk/qmk_firmware'}}
|
||||
with:
|
||||
token: ${{ secrets.QMK_BOT_TOKEN }}
|
||||
|
||||
+4
-4
@@ -30,6 +30,9 @@ quantum/version.h
|
||||
*.qmk
|
||||
*.uf2
|
||||
|
||||
# DD config at wrong location
|
||||
/keyboards/**/keymaps/*/info.json
|
||||
|
||||
# Old-style QMK Makefiles
|
||||
/keyboards/**/Makefile
|
||||
|
||||
@@ -52,12 +55,9 @@ quantum/version.h
|
||||
.history/
|
||||
build/
|
||||
cmake-build-debug
|
||||
# CMakeLists.txt
|
||||
CMakeLists.txt
|
||||
*.pdf
|
||||
|
||||
# cmake toolchain downloads
|
||||
/toolchains
|
||||
|
||||
# Let these ones be user specific, since we have so many different configurations
|
||||
*.code-workspace
|
||||
.stfolder
|
||||
|
||||
Vendored
-9
@@ -1,9 +0,0 @@
|
||||
[
|
||||
{
|
||||
"name": "AVR GCC",
|
||||
"compilers": {
|
||||
"CC": "C:\\QMK_MSYS\\mingw64\\bin\\avr-gcc.exe",
|
||||
"CXX": "C:\\QMK_MSYS\\mingw64\\bin\\avr-g++.exe"
|
||||
}
|
||||
}
|
||||
]
|
||||
Vendored
+2
-2
@@ -5,8 +5,8 @@
|
||||
// Configure glob patterns for excluding files and folders.
|
||||
"files.exclude": {
|
||||
"**/.build": true,
|
||||
// "**/*.hex": true,
|
||||
// "**/*.bin": true,
|
||||
"**/*.hex": true,
|
||||
"**/*.bin": true,
|
||||
"**/*.uf2": true
|
||||
},
|
||||
"files.associations": {
|
||||
|
||||
Vendored
-114
@@ -1,114 +0,0 @@
|
||||
{
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "Load Keyboard",
|
||||
"dependsOrder": "sequence",
|
||||
"dependsOn":[
|
||||
"Only Load Keyboard",
|
||||
"Configure CMake"
|
||||
],
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "Only Load Keyboard",
|
||||
"type": "shell",
|
||||
"command": "cmake -D QMK_KEYBOARD_FOLDER=\"${input:all_keyboards}\" -D QMK_KEYMAP_FOLDER=\"${input:keyboard_keymap}\" -P ${workspaceFolder}/cmake/ConfigureKeyboard.cmake",
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "Configure CMake",
|
||||
"type": "cmake",
|
||||
"command": "configure"
|
||||
},
|
||||
{
|
||||
"label": "Build",
|
||||
"problemMatcher": [
|
||||
{
|
||||
"base": "$gcc",
|
||||
"fileLocation": ["relative", "${workspaceFolder}/build"]
|
||||
},
|
||||
],
|
||||
"options": {
|
||||
"environment": {
|
||||
"CLICOLOR_FORCE": "1"
|
||||
}
|
||||
},
|
||||
"type": "cmake",
|
||||
"command": "build",
|
||||
"targets":[
|
||||
"${input:keyboard_target}"
|
||||
],
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
},
|
||||
},
|
||||
// {
|
||||
// "label": "Rebuild",
|
||||
// "problemMatcher": [
|
||||
// {
|
||||
// "base": "$gcc",
|
||||
// "fileLocation": ["relative", "${workspaceFolder}/build"]
|
||||
// },
|
||||
// ],
|
||||
// "options": {
|
||||
// "environment": {
|
||||
// "CLICOLOR_FORCE": "1"
|
||||
// }
|
||||
// },
|
||||
// "type": "cmake",
|
||||
// "command": "cleanRebuild",
|
||||
// "targets":[
|
||||
// "${input:keyboard_target}"
|
||||
// ],
|
||||
// "group": {
|
||||
// "kind": "build",
|
||||
// "isDefault": true
|
||||
// },
|
||||
// }
|
||||
],
|
||||
"inputs": [
|
||||
{
|
||||
"id": "keyboard_target",
|
||||
"type": "command",
|
||||
"command": "shellCommand.execute",
|
||||
"args": {
|
||||
"command": "type build\\targets",
|
||||
"description": "Target:",
|
||||
"fieldSeparator": "|"
|
||||
},
|
||||
},
|
||||
{
|
||||
"id": "all_keyboards",
|
||||
"type": "command",
|
||||
"command": "shellCommand.execute",
|
||||
"args": {
|
||||
"command": "type build\\all_keyboards",
|
||||
"description": "Keyboard:",
|
||||
"default": ""
|
||||
},
|
||||
},
|
||||
{
|
||||
"id": "keymap",
|
||||
"description": "Keymap:",
|
||||
"type": "pickString",
|
||||
"options":[
|
||||
"default"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "keyboard_keymap",
|
||||
"type": "command",
|
||||
"command": "shellCommand.execute",
|
||||
"args": {
|
||||
"command": "cmake -D QMK_KEYBOARD_FOLDER=\"${input:all_keyboards}\" -P ${workspaceFolder}/cmake/GetKeymaps.cmake && type build\\keyboard_keymaps",
|
||||
"description": "Keymap:",
|
||||
"default": ""
|
||||
},
|
||||
},
|
||||
]
|
||||
}
|
||||
@@ -1,97 +0,0 @@
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE INTERNAL "")
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
|
||||
|
||||
include(UpdateSubmodule)
|
||||
include(ResolveKeyboard)
|
||||
include(ValidateJson)
|
||||
include(ProcessKeyboard)
|
||||
|
||||
set(QMK_KEYBOARDS_FOLDER "${CMAKE_SOURCE_DIR}/keyboards")
|
||||
|
||||
function(_get_all_cmake_targets out_var current_dir)
|
||||
get_property(targets DIRECTORY ${current_dir} PROPERTY BUILDSYSTEM_TARGETS)
|
||||
get_property(subdirs DIRECTORY ${current_dir} PROPERTY SUBDIRECTORIES)
|
||||
|
||||
foreach(subdir ${subdirs})
|
||||
_get_all_cmake_targets(subdir_targets ${subdir})
|
||||
list(APPEND targets ${subdir_targets})
|
||||
endforeach()
|
||||
|
||||
set(${out_var} ${targets} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
if(NOT DEFINED QMK_KEYBOARD)
|
||||
# configure step - populate targets
|
||||
project(qmk_firmware)
|
||||
|
||||
add_subdirectory(keyboards)
|
||||
|
||||
else()
|
||||
# build step
|
||||
if(NOT DEFINED QMK_KEYMAP_FOLDER)
|
||||
set(QMK_KEYMAP_FOLDER "default")
|
||||
endif()
|
||||
|
||||
resolve_keyboard(${QMK_KEYBOARD_FOLDER} QMK_KEYBOARD_FOLDER_ABS)
|
||||
cmake_path(IS_PREFIX QMK_KEYBOARDS_FOLDER "${QMK_KEYBOARD_FOLDER_ABS}" IS_KEYBOARDS_FOLDER)
|
||||
resolve_config_h(${QMK_KEYBOARD_FOLDER_ABS} QMK_KEYBOARD_CONFIG_H)
|
||||
process_keyboard()
|
||||
resolve_keyboard_h(${QMK_KEYBOARD_FOLDER_ABS} QMK_KEYBOARD_H)
|
||||
resolve_keymap_c(${QMK_KEYBOARD_FOLDER_ABS} ${QMK_KEYMAP_FOLDER} QMK_KEYMAP_C)
|
||||
|
||||
message(STATUS "config.h: ${QMK_KEYBOARD_CONFIG_H}")
|
||||
message(STATUS "keyboard.h: ${QMK_KEYBOARD_H}")
|
||||
message(STATUS "keymap.c: ${QMK_KEYMAP_C}")
|
||||
|
||||
|
||||
project(${QMK_KEYBOARD}
|
||||
LANGUAGES C CXX ASM
|
||||
HOMEPAGE_URL ${URL}
|
||||
VERSION ${DEVICE_VER})
|
||||
|
||||
# add_compile_options(
|
||||
# -include ${QMK_KEYBOARD_CONFIG_H}
|
||||
# )
|
||||
add_compile_definitions(
|
||||
QMK_KEYBOARD_H="${QMK_KEYBOARD_H}"
|
||||
KEYBOARD_${QMK_KEYBOARD}
|
||||
KEYMAP_C="${QMK_KEYMAP_C}"
|
||||
MATRIX_ROWS=8
|
||||
MATRIX_COLS=6
|
||||
)
|
||||
|
||||
if(DEFINED DIODE_DIRECTION)
|
||||
add_compile_definitions(DIODE_DIRECTION=${DIODE_DIRECTION})
|
||||
endif()
|
||||
|
||||
include_directories(${CMAKE_SOURCE_DIR})
|
||||
|
||||
# if(EXISTS ${QMK_KEYBOARD_FOLDER_ABS}/CMakeLists.txt)
|
||||
# add_subdirectory(${QMK_KEYBOARD_FOLDER_ABS})
|
||||
# else()
|
||||
file(GLOB KEYBOARD_SRC "${QMK_KEYBOARD_FOLDER_ABS}/*.c")
|
||||
list(REMOVE_ITEM KEYBOARD_SRC "${QMK_KEYMAP_C}")
|
||||
add_qmk_executable(${TARGET_NAME} ${KEYBOARD_SRC})
|
||||
|
||||
# endif()
|
||||
# add_library(qmk)
|
||||
|
||||
target_precompile_headers(qmk PUBLIC
|
||||
${QMK_KEYBOARD_CONFIG_H}
|
||||
)
|
||||
|
||||
resolve_keyboard_includes(${QMK_KEYBOARD_FOLDER_ABS})
|
||||
|
||||
add_subdirectory(quantum)
|
||||
add_subdirectory(platforms)
|
||||
add_subdirectory(tmk_core/protocol)
|
||||
|
||||
include(features/oled)
|
||||
include(features/backlight)
|
||||
include(features/eeprom)
|
||||
include(features/matrix)
|
||||
include(features/fnv)
|
||||
endif()
|
||||
@@ -1,41 +0,0 @@
|
||||
{
|
||||
"MKL26Z64" : {
|
||||
"MCU" : "cortex-m0plus",
|
||||
"ARMV": 6,
|
||||
"MCU_FAMILY": "KINETIS",
|
||||
"MCU_SERIES": "KL2x",
|
||||
"MCU_LDSCRIPT": "MKL26Z64",
|
||||
"MCU_STARTUP": "kl2x",
|
||||
"BOARD": "PJRC_TEENSY_LC"
|
||||
},
|
||||
"MK20DX128" : {
|
||||
"MCU" : "cortex-m4",
|
||||
"ARMV": 7,
|
||||
"MCU_FAMILY": "KINETIS",
|
||||
"MCU_SERIES": "K20x",
|
||||
"MCU_LDSCRIPT": "MK20DX128",
|
||||
"MCU_STARTUP": "k20x5",
|
||||
"BOARD": "PJRC_TEENSY_3"
|
||||
},
|
||||
"MK20DX256" : {
|
||||
"MCU" : "cortex-m4",
|
||||
"ARMV": 7,
|
||||
"MCU_FAMILY": "KINETIS",
|
||||
"MCU_SERIES": "K20x",
|
||||
"MCU_LDSCRIPT": "MK20DX256",
|
||||
"MCU_STARTUP": "k20x7",
|
||||
"BOARD": "PJRC_TEENSY_3_1"
|
||||
},
|
||||
"STM32F303" : {
|
||||
"MCU" : "cortex-m4",
|
||||
"ARMV": 7,
|
||||
"MCU_FAMILY": "STM32",
|
||||
"MCU_SERIES": "STM32F3xx",
|
||||
"MCU_LDSCRIPT": "STM32F303xC",
|
||||
"MCU_STARTUP": "stm32f3xx",
|
||||
"BOARD": "GENERIC_STM32_F303XC",
|
||||
"USE_FPU": true,
|
||||
"UF2_FAMILY": "STM32F3",
|
||||
"STM32_BOOTLOADER_ADDRESS": "0x1FFFD800"
|
||||
}
|
||||
}
|
||||
@@ -1,83 +0,0 @@
|
||||
include(ResolveKeyboard)
|
||||
include(ValidateJson)
|
||||
include(ResolveToolchain)
|
||||
|
||||
macro(add_keyboard KEYBOARD_FOLDER KEYMAP_FOLDER)
|
||||
# not entirely sure why this is necessary
|
||||
# set(TEMP_PATH ${KEYBOARD_FOLDER})
|
||||
# cmake_path(IS_RELATIVE TEMP_PATH IS_KEYBOARD_FOLDER_RELATIVE)
|
||||
# if(${IS_KEYBOARD_FOLDER_RELATIVE})
|
||||
# set(KEYBOARD_FOLDER_ABS ${CMAKE_SOURCE_DIR}/keyboards/${KEYBOARD_FOLDER})
|
||||
# if(NOT EXISTS ${KEYBOARD_FOLDER_ABS})
|
||||
# # message(FATAL_ERROR "Keyboard does not exist in QMK - try using an absolute path to the keyboard folder")
|
||||
# resolve_keyboard(${KEYBOARD_FOLDER} KEYBOARD_FOLDER_ABS)
|
||||
# endif()
|
||||
# else()
|
||||
# set(KEYBOARD_FOLDER_ABS ${KEYBOARD_FOLDER})
|
||||
# if(NOT EXISTS ${KEYBOARD_FOLDER_ABS})
|
||||
# message(FATAL_ERROR "Absolute path to keyboard does not exist")
|
||||
# endif()
|
||||
# endif()
|
||||
|
||||
resolve_keyboard(${KEYBOARD_FOLDER} KEYBOARD_FOLDER_ABS)
|
||||
|
||||
set(TEMP_PATH ${KEYBOARD_FOLDER})
|
||||
cmake_path(IS_RELATIVE TEMP_PATH IS_KEYBOARD_FOLDER_RELATIVE)
|
||||
|
||||
set(TEMP_PATH ${KEYMAP_FOLDER})
|
||||
cmake_path(IS_RELATIVE TEMP_PATH IS_KEYMAP_FOLDER_RELATIVE)
|
||||
if(${IS_KEYMAP_FOLDER_RELATIVE})
|
||||
set(KEYMAP_NAME ${KEYMAP_FOLDER})
|
||||
else()
|
||||
if(WIN32)
|
||||
set(KEYMAP_NAME $ENV{USERNAME})
|
||||
else()
|
||||
set(KEYMAP_NAME $ENV{USE})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# find the right toolchain
|
||||
|
||||
# not sure we need to validate here
|
||||
validate_json(${KEYBOARD_FOLDER_ABS}/info.json keyboard JSON_STRING)
|
||||
|
||||
string(JSON PROCESSOR GET ${JSON_STRING} processor)
|
||||
resolve_toolchain(${PROCESSOR} TOOLCHAIN)
|
||||
|
||||
string(JSON KEYBOARD_NAME GET ${JSON_STRING} keyboard_name)
|
||||
if(${IS_KEYBOARD_FOLDER_RELATIVE})
|
||||
string(MAKE_C_IDENTIFIER ${KEYBOARD_FOLDER} KEYBOARD_SLUG)
|
||||
else()
|
||||
string(MAKE_C_IDENTIFIER ${KEYBOARD_NAME} KEYBOARD_SLUG)
|
||||
endif()
|
||||
string(JSON MANUFACTURER GET ${JSON_STRING} manufacturer)
|
||||
set(TARGET_NAME "${KEYBOARD_SLUG}_${KEYMAP_NAME}")
|
||||
ExternalProject_Add(${TARGET_NAME}
|
||||
SOURCE_DIR ${CMAKE_SOURCE_DIR}
|
||||
# PREFIX ${CMAKE_SOURCE_DIR}/build/keyboards/${KEYBOARD_FOLDER}
|
||||
TMP_DIR ${CMAKE_SOURCE_DIR}/build/tmp
|
||||
DOWNLOAD_DIR ${CMAKE_SOURCE_DIR}/build/download
|
||||
BINARY_DIR ${CMAKE_SOURCE_DIR}/build/keyboards/${TARGET_NAME}
|
||||
STAMP_DIR ${CMAKE_SOURCE_DIR}/build/stamp
|
||||
LOG_DIR ${CMAKE_SOURCE_DIR}/build/log
|
||||
INSTALL_DIR ${CMAKE_SOURCE_DIR}/build/install
|
||||
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/build/${TARGET_NAME}${QMK_EXTENSION} ${CMAKE_SOURCE_DIR}/${TARGET_NAME}${QMK_EXTENSION}
|
||||
# this seems to work well for all systems so far - not sure if it'd be useful to customize
|
||||
CMAKE_GENERATOR "Unix Makefiles"
|
||||
CMAKE_ARGS
|
||||
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_SOURCE_DIR}/cmake/toolchains/${TOOLCHAIN}.cmake
|
||||
-DQMK_KEYBOARD=${KEYBOARD_SLUG}
|
||||
-DQMK_KEYBOARD_FOLDER=${KEYBOARD_FOLDER}
|
||||
-DQMK_KEYMAP_FOLDER=${KEYMAP_FOLDER}
|
||||
-DTARGET_NAME=${TARGET_NAME}
|
||||
)
|
||||
ExternalProject_Add_Step(${TARGET_NAME} copy_compile_commands
|
||||
DEPENDEES configure
|
||||
DEPENDERS build
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/build/keyboards/${TARGET_NAME}/compile_commands.json ${CMAKE_SOURCE_DIR}/compile_commands.json
|
||||
# BYPRODUCTS ${CMAKE_SOURCE_DIR}/compile_commands.json
|
||||
ALWAYS TRUE
|
||||
)
|
||||
|
||||
# file(APPEND "${CMAKE_SOURCE_DIR}/build/targets" "${TARGET_NAME}|${KEYBOARD_NAME} with ${KEYMAP_FOLDER}|${KEYBOARD_FOLDER}|Made by: ${MANUFACTURER}\n")
|
||||
endmacro(add_keyboard)
|
||||
@@ -1,44 +0,0 @@
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
|
||||
|
||||
include(ResolveKeyboard)
|
||||
include(ValidateJSON)
|
||||
|
||||
resolve_keyboard(${QMK_KEYBOARD_FOLDER} KEYBOARD_FOLDER_ABS)
|
||||
validate_json(${KEYBOARD_FOLDER_ABS}/info.json keyboard JSON_STRING)
|
||||
|
||||
if(NOT DEFINED QMK_KEYMAP_FOLDER)
|
||||
set(QMK_KEYMAP_FOLDER default)
|
||||
endif()
|
||||
|
||||
set(TEMP_PATH ${QMK_KEYBOARD_FOLDER})
|
||||
cmake_path(IS_RELATIVE TEMP_PATH IS_KEYBOARD_FOLDER_RELATIVE)
|
||||
|
||||
set(TEMP_PATH ${QMK_KEYMAP_FOLDER})
|
||||
cmake_path(IS_RELATIVE TEMP_PATH IS_KEYMAP_FOLDER_RELATIVE)
|
||||
|
||||
if(${IS_KEYMAP_FOLDER_RELATIVE})
|
||||
set(KEYMAP_NAME ${QMK_KEYMAP_FOLDER})
|
||||
else()
|
||||
if(WIN32)
|
||||
set(KEYMAP_NAME $ENV{USERNAME})
|
||||
else()
|
||||
set(KEYMAP_NAME $ENV{USE})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
string(JSON KEYBOARD_NAME GET ${JSON_STRING} keyboard_name)
|
||||
|
||||
if(${IS_KEYBOARD_FOLDER_RELATIVE})
|
||||
string(MAKE_C_IDENTIFIER ${QMK_KEYBOARD_FOLDER} KEYBOARD_SLUG)
|
||||
else()
|
||||
string(MAKE_C_IDENTIFIER ${KEYBOARD_NAME} KEYBOARD_SLUG)
|
||||
endif()
|
||||
|
||||
string(JSON MANUFACTURER GET ${JSON_STRING} manufacturer)
|
||||
|
||||
set(TARGET_NAME "${KEYBOARD_SLUG}_${KEYMAP_NAME}")
|
||||
file(APPEND "${CMAKE_SOURCE_DIR}/build/targets" "${TARGET_NAME}|${KEYBOARD_NAME} with ${QMK_KEYMAP_FOLDER}|${QMK_KEYBOARD_FOLDER}:${QMK_KEYMAP_FOLDER}|Made by: ${MANUFACTURER}\n")
|
||||
|
||||
message(STATUS "Added keyboard '${QMK_KEYBOARD_FOLDER}' with keymap '${QMK_KEYMAP_FOLDER}'")
|
||||
@@ -1,14 +0,0 @@
|
||||
macro(find_arm_toolchain)
|
||||
find_toolchain(arm-none-eabi TOOLCHAIN_ROOT)
|
||||
|
||||
if(NOT TOOLCHAIN_ROOT)
|
||||
include(GetARMToolchain)
|
||||
find_toolchain(arm-none-eabi TOOLCHAIN_ROOT)
|
||||
endif()
|
||||
|
||||
if(NOT TOOLCHAIN_ROOT)
|
||||
message(FATAL_ERROR "ARM Toolchain could not be found")
|
||||
endif()
|
||||
|
||||
message(STATUS "ARM toolchain found: ${TOOLCHAIN_ROOT}")
|
||||
endmacro()
|
||||
@@ -1,20 +0,0 @@
|
||||
macro(find_avr_toolchain)
|
||||
find_toolchain(avr TOOLCHAIN_ROOT)
|
||||
|
||||
if(NOT TOOLCHAIN_ROOT)
|
||||
include(GetAVRToolchain)
|
||||
find_toolchain(avr TOOLCHAIN_ROOT)
|
||||
endif()
|
||||
|
||||
find_program(DFU_PROGRAMMER NAMES dfu-programmer PATHS ${CMAKE_SOURCE_DIR}/toolchains/dfu-programmer/)
|
||||
if(${DFU_PROGRAMMER} STREQUAL "DFU_PROGRAMMER-NOTFOUND")
|
||||
include(GetDfuProgrammer)
|
||||
find_program(DFU_PROGRAMMER NAMES dfu-programmer PATHS ${CMAKE_SOURCE_DIR}/toolchains/dfu-programmer/)
|
||||
endif()
|
||||
|
||||
if(NOT TOOLCHAIN_ROOT)
|
||||
message(FATAL_ERROR "AVR Toolchain could not be found")
|
||||
endif()
|
||||
|
||||
message(STATUS "AVR toolchain found: ${TOOLCHAIN_ROOT}")
|
||||
endmacro()
|
||||
@@ -1,282 +0,0 @@
|
||||
include(ParseMakefile)
|
||||
|
||||
# STM32F303
|
||||
|
||||
set(MCU "cortex-m4")
|
||||
set(ARMV 7)
|
||||
set(MCU_FAMILY "STM32")
|
||||
set(MCU_SERIES "STM32F3xx")
|
||||
string(TOUPPER ${MCU_SERIES} MCU_SERIES_UPPER)
|
||||
set(MCU_LDSCRIPT "STM32F303xC")
|
||||
set(MCU_STARTUP "stm32f3xx")
|
||||
set(BOARD "GENERIC_STM32_F303XC")
|
||||
set(USE_FPU TRUE)
|
||||
set(UF2_FAMILY "STM32F3")
|
||||
set(STM32_BOOTLOADER_ADDRESS 0x1FFFD800)
|
||||
set(EEPROM_DRIVER "wear_leveling" FORCE)
|
||||
set(WEAR_LEVELING_DRIVER "embedded_flash" FORCE)
|
||||
|
||||
target_compile_definitions(qmk PUBLIC
|
||||
QMK_MCU_FAMILY_${MCU_FAMILY}
|
||||
QMK_MCU_SERIES_${MCU_SERIES_UPPER}
|
||||
)
|
||||
|
||||
target_compile_options(qmk PUBLIC
|
||||
-march=armv7-m
|
||||
)
|
||||
|
||||
target_compile_definitions(qmk PUBLIC
|
||||
MCU_${MCU_FAMILY}
|
||||
__ARM_ARCH_7M__
|
||||
)
|
||||
|
||||
# platforms/chibios/platform.mk
|
||||
|
||||
if(NOT DEFINED USE_PROCESS_STACKSIZE)
|
||||
set(USE_PROCESS_STACKSIZE 0x800)
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED USE_EXCEPTIONS_STACKSIZE)
|
||||
set(USE_EXCEPTIONS_STACKSIZE 0x400)
|
||||
endif()
|
||||
|
||||
target_link_options(qmk PUBLIC
|
||||
-Wl,--defsym=__process_stack_size__=${USE_PROCESS_STACKSIZE},--defsym=__main_stack_size__=${USE_EXCEPTIONS_STACKSIZE}
|
||||
)
|
||||
|
||||
if(NOT DEFINED MCU_PORT_NAME)
|
||||
set(MCU_PORT_NAME ${MCU_FAMILY})
|
||||
endif()
|
||||
set(MCU_ARCH ${MCU})
|
||||
if(NOT DEFINED CHIBIOS_PORT)
|
||||
set(CHIBIOS_PORT "ARMv${ARMV}-M")
|
||||
endif()
|
||||
if(NOT DEFINED PLATFORM_NAME)
|
||||
set(PLATFORM_NAME platform)
|
||||
endif()
|
||||
|
||||
set(CHIBIOS ${CMAKE_SOURCE_DIR}/lib/chibios)
|
||||
set(CHIBIOS_CONTRIB ${CMAKE_SOURCE_DIR}/lib/chibios-contrib)
|
||||
|
||||
# port*.mk
|
||||
include(chibios/ports/${CHIBIOS_PORT})
|
||||
|
||||
# platform.mk
|
||||
include(chibios/ports/${MCU_SERIES})
|
||||
|
||||
# startup_*.mk - might need to convert these
|
||||
find_file(STARTUP_MK startup_${MCU_STARTUP}.mk
|
||||
${CHIBIOS}/os/common/ports/ARMCMx/compilers/GCC/mk
|
||||
${CHIBIOS}/os/common/startup/ARMCMx/compilers/GCC/mk
|
||||
${CHIBIOS_CONTRIB}/os/common/startup/ARMCMx/compilers/GCC/mk
|
||||
)
|
||||
get_filename_component(STARTUP_DIR ${STARTUP_MK} DIRECTORY)
|
||||
ParseMakefile(${STARTUP_MK})
|
||||
target_sources(qmk PUBLIC ${STARTUPSRC})
|
||||
target_sources(qmk PUBLIC ${STARTUPASM})
|
||||
target_include_directories(qmk PUBLIC ${STARTUPINC})
|
||||
|
||||
# board paths - we should just standardize these
|
||||
find_path(BOARD_PATH
|
||||
NAMES
|
||||
boards/${BOARD}/board.mk
|
||||
board/board.mk
|
||||
PATHS
|
||||
${QMK_KEYBOARD_FOLDER}/boards/${BOARD}
|
||||
${CMAKE_SOURCE_DIR}/platforms/chibios/boards/${BOARD}
|
||||
${CHIBIOS}/os/hal/
|
||||
${CHIBIOS_CONTRIB}/os/hal/
|
||||
)
|
||||
# if(EXISTS ${BOARD_PATH}/rules.mk)
|
||||
# ParseMakefile(${BOARD_PATH}/rules.mk)
|
||||
# endif()
|
||||
|
||||
if(EXISTS ${BOARD_PATH}/configs/config.h)
|
||||
target_precompile_headers(qmk PUBLIC
|
||||
${BOARD_PATH}/configs/config.h
|
||||
)
|
||||
endif()
|
||||
|
||||
if(EXISTS ${BOARD_PATH}/configs/post_config.h)
|
||||
target_precompile_headers(qmk PUBLIC
|
||||
${BOARD_PATH}/configs/post_config.h
|
||||
)
|
||||
endif()
|
||||
|
||||
find_file(BOARD_MK board.mk
|
||||
${BOARD_PATH}/boards/${BOARD}
|
||||
${BOARD_PATH}/board
|
||||
)
|
||||
ParseMakefile(${BOARD_MK})
|
||||
|
||||
target_sources(qmk PUBLIC ${BOARDSRC})
|
||||
target_include_directories(qmk PUBLIC ${BOARDINC})
|
||||
|
||||
# allow board.c to be overriden
|
||||
file(RELATIVE_PATH INIT_HOOK_RELATIVE ${CMAKE_BINARY_DIR}
|
||||
"${CMAKE_SOURCE_DIR}/tmk_core/protocol/chibios/init_hooks.h")
|
||||
set_source_files_properties(${BOARDSRC} TARGET_DIRECTORY qmk PROPERTIES
|
||||
# COMPILE_OPTIONS "-include ../../../tmk_core/protocol/chibios/init_hooks.h"
|
||||
COMPILE_OPTIONS "-include ${INIT_HOOK_RELATIVE}"
|
||||
)
|
||||
|
||||
# bootloader
|
||||
if(DEFINED STM32_BOOTLOADER_ADDRESS)
|
||||
target_compile_definitions(qmk PUBLIC STM32_BOOTLOADER_ADDRESS=${STM32_BOOTLOADER_ADDRESS})
|
||||
endif()
|
||||
if(DEFINED WB32_BOOTLOADER_ADDRESS)
|
||||
target_compile_definitions(qmk PUBLIC WB32_BOOTLOADER_ADDRESS=${WB32_BOOTLOADER_ADDRESS})
|
||||
endif()
|
||||
|
||||
find_file(BOOTLOADER_DEFS_H bootloader_defs.h
|
||||
${QMK_KEYBOARD_FOLDER}
|
||||
${QMK_KEYBOARD_FOLDER}/boards/${BOARD}
|
||||
${BOARD_PATH}/configs
|
||||
)
|
||||
if(EXISTS ${BOOTLOADER_DEFS_H})
|
||||
target_compile_options(qmk PUBLIC -include ${BOOTLOADER_DEFS_H})
|
||||
endif()
|
||||
|
||||
# chconf directories
|
||||
find_path(CHCONFDIR chconf.h
|
||||
${QMK_KEYBOARD_FOLDER}
|
||||
${CMAKE_SOURCE_DIR}/platforms/chibios/boards/${BOARD}/configs
|
||||
${CMAKE_SOURCE_DIR}/platforms/chibios/boards/common/configs
|
||||
)
|
||||
target_include_directories(qmk PUBLIC ${CHCONFDIR})
|
||||
|
||||
# halconf directories
|
||||
find_path(HALCONFDIR halconf.h
|
||||
${QMK_KEYBOARD_FOLDER}
|
||||
${CMAKE_SOURCE_DIR}/platforms/chibios/boards/${BOARD}/configs
|
||||
${CMAKE_SOURCE_DIR}/platforms/chibios/boards/common/configs
|
||||
)
|
||||
target_include_directories(qmk PUBLIC ${HALCONFDIR})
|
||||
|
||||
# linker script
|
||||
find_file(LDSCRIPT ${MCU_LDSCRIPT}.ld
|
||||
${QMK_KEYBOARD_FOLDER}/ld
|
||||
${CMAKE_SOURCE_DIR}/platforms/chibios/boards/${BOARD}/ld
|
||||
${CMAKE_SOURCE_DIR}/platforms/chibios/boards/common/ld
|
||||
${STARTUPLD}
|
||||
${STARTUPLD_CONTRIB}
|
||||
)
|
||||
get_filename_component(LDSCRIPT_PATH ${LDSCRIPT} DIRECTORY)
|
||||
target_link_options(qmk PUBLIC
|
||||
-T ${LDSCRIPT}
|
||||
-L ${LDSCRIPT_PATH}
|
||||
)
|
||||
|
||||
# os/hal/hal.mk
|
||||
target_sources(qmk PUBLIC
|
||||
${CHIBIOS}/os/hal/src/hal.c
|
||||
${CHIBIOS}/os/hal/src/hal_st.c
|
||||
${CHIBIOS}/os/hal/src/hal_buffers.c
|
||||
${CHIBIOS}/os/hal/src/hal_queues.c
|
||||
${CHIBIOS}/os/hal/src/hal_flash.c
|
||||
${CHIBIOS}/os/hal/src/hal_mmcsd.c
|
||||
${CHIBIOS}/os/hal/src/hal_adc.c
|
||||
${CHIBIOS}/os/hal/src/hal_can.c
|
||||
${CHIBIOS}/os/hal/src/hal_crypto.c
|
||||
${CHIBIOS}/os/hal/src/hal_dac.c
|
||||
${CHIBIOS}/os/hal/src/hal_efl.c
|
||||
${CHIBIOS}/os/hal/src/hal_gpt.c
|
||||
${CHIBIOS}/os/hal/src/hal_i2c.c
|
||||
${CHIBIOS}/os/hal/src/hal_i2s.c
|
||||
${CHIBIOS}/os/hal/src/hal_icu.c
|
||||
${CHIBIOS}/os/hal/src/hal_mac.c
|
||||
${CHIBIOS}/os/hal/src/hal_mmc_spi.c
|
||||
${CHIBIOS}/os/hal/src/hal_pal.c
|
||||
${CHIBIOS}/os/hal/src/hal_pwm.c
|
||||
${CHIBIOS}/os/hal/src/hal_rtc.c
|
||||
${CHIBIOS}/os/hal/src/hal_sdc.c
|
||||
${CHIBIOS}/os/hal/src/hal_serial.c
|
||||
${CHIBIOS}/os/hal/src/hal_serial_usb.c
|
||||
${CHIBIOS}/os/hal/src/hal_sio.c
|
||||
${CHIBIOS}/os/hal/src/hal_spi.c
|
||||
${CHIBIOS}/os/hal/src/hal_trng.c
|
||||
${CHIBIOS}/os/hal/src/hal_uart.c
|
||||
${CHIBIOS}/os/hal/src/hal_usb.c
|
||||
${CHIBIOS}/os/hal/src/hal_wdg.c
|
||||
${CHIBIOS}/os/hal/src/hal_wspi.c
|
||||
)
|
||||
target_include_directories(qmk PUBLIC
|
||||
${CHIBIOS}/os/hal/include
|
||||
)
|
||||
|
||||
# os/hal/osal/rt-nil/osal.mk
|
||||
target_sources(qmk PUBLIC
|
||||
${CHIBIOS}/os/hal/osal/rt-nil/osal.c
|
||||
)
|
||||
target_include_directories(qmk PUBLIC
|
||||
${CHIBIOS}/os/hal/osal/rt-nil
|
||||
)
|
||||
|
||||
# os/rt/rt.mk
|
||||
target_sources(qmk PUBLIC
|
||||
${CHIBIOS}/os/rt/src/chsys.c
|
||||
${CHIBIOS}/os/rt/src/chrfcu.c
|
||||
${CHIBIOS}/os/rt/src/chdebug.c
|
||||
${CHIBIOS}/os/rt/src/chtrace.c
|
||||
${CHIBIOS}/os/rt/src/chvt.c
|
||||
${CHIBIOS}/os/rt/src/chschd.c
|
||||
${CHIBIOS}/os/rt/src/chinstances.c
|
||||
${CHIBIOS}/os/rt/src/chthreads.c
|
||||
${CHIBIOS}/os/rt/src/chsys.c
|
||||
${CHIBIOS}/os/rt/src/chrfcu.c
|
||||
${CHIBIOS}/os/rt/src/chdebug.c
|
||||
${CHIBIOS}/os/rt/src/chtrace.c
|
||||
${CHIBIOS}/os/rt/src/chvt.c
|
||||
${CHIBIOS}/os/rt/src/chschd.c
|
||||
${CHIBIOS}/os/rt/src/chinstances.c
|
||||
${CHIBIOS}/os/rt/src/chthreads.c
|
||||
${CHIBIOS}/os/rt/src/chtm.c
|
||||
${CHIBIOS}/os/rt/src/chstats.c
|
||||
${CHIBIOS}/os/rt/src/chregistry.c
|
||||
${CHIBIOS}/os/rt/src/chsem.c
|
||||
${CHIBIOS}/os/rt/src/chmtx.c
|
||||
${CHIBIOS}/os/rt/src/chcond.c
|
||||
${CHIBIOS}/os/rt/src/chevents.c
|
||||
${CHIBIOS}/os/rt/src/chmsg.c
|
||||
${CHIBIOS}/os/rt/src/chdynamic.c
|
||||
)
|
||||
target_include_directories(qmk PUBLIC
|
||||
${CHIBIOS}/os/rt/include
|
||||
)
|
||||
|
||||
# os/oslib/oslib.mk
|
||||
target_sources(qmk PUBLIC
|
||||
${CHIBIOS}/os/oslib/src/chmboxes.c
|
||||
${CHIBIOS}/os/oslib/src/chmemcore.c
|
||||
${CHIBIOS}/os/oslib/src/chmemheaps.c
|
||||
${CHIBIOS}/os/oslib/src/chmempools.c
|
||||
${CHIBIOS}/os/oslib/src/chpipes.c
|
||||
${CHIBIOS}/os/oslib/src/chobjcaches.c
|
||||
${CHIBIOS}/os/oslib/src/chdelegates.c
|
||||
${CHIBIOS}/os/oslib/src/chfactory.c
|
||||
)
|
||||
target_include_directories(qmk PUBLIC
|
||||
${CHIBIOS}/os/oslib/include
|
||||
)
|
||||
|
||||
# os/hal/lib/streams/streams.mk
|
||||
target_sources(qmk PUBLIC
|
||||
${CHIBIOS}/os/hal/lib/streams/chprintf.c
|
||||
${CHIBIOS}/os/hal/lib/streams/chscanf.c
|
||||
${CHIBIOS}/os/hal/lib/streams/memstreams.c
|
||||
${CHIBIOS}/os/hal/lib/streams/nullstreams.c
|
||||
${CHIBIOS}/os/hal/lib/streams/bufstreams.c
|
||||
)
|
||||
target_include_directories(qmk PUBLIC
|
||||
${CHIBIOS}/os/hal/lib/streams
|
||||
)
|
||||
|
||||
# resume platform.mk
|
||||
target_sources(qmk PUBLIC
|
||||
${CHIBIOS}/os/various/syscalls.c
|
||||
)
|
||||
target_include_directories(qmk PUBLIC
|
||||
${CHIBIOS}/os/license
|
||||
${CHIBIOS}/os/oslib/include
|
||||
${CHIBIOS}/os/various
|
||||
)
|
||||
@@ -1,27 +0,0 @@
|
||||
include(UpdateSubmodule)
|
||||
update_submodule(lib/lufa)
|
||||
set(LUFA_PATH ${CMAKE_SOURCE_DIR}/lib/lufa)
|
||||
set(LUFA_ROOT_PATH ${LUFA_PATH}/LUFA)
|
||||
target_sources(qmk PUBLIC
|
||||
${LUFA_ROOT_PATH}/Drivers/USB/Core/${ARCH}/USBController_${ARCH}.c
|
||||
${LUFA_ROOT_PATH}/Drivers/USB/Core/${ARCH}/USBInterrupt_${ARCH}.c
|
||||
${LUFA_ROOT_PATH}/Drivers/USB/Core/ConfigDescriptors.c
|
||||
${LUFA_ROOT_PATH}/Drivers/USB/Core/Events.c
|
||||
${LUFA_ROOT_PATH}/Drivers/USB/Core/USBTask.c
|
||||
${LUFA_ROOT_PATH}/Drivers/USB/Class/Common/HIDParser.c
|
||||
|
||||
${LUFA_ROOT_PATH}/Drivers/USB/Core/${ARCH}/Host_${ARCH}.c
|
||||
${LUFA_ROOT_PATH}/Drivers/USB/Core/${ARCH}/Pipe_${ARCH}.c
|
||||
${LUFA_ROOT_PATH}/Drivers/USB/Core/${ARCH}/PipeStream_${ARCH}.c
|
||||
${LUFA_ROOT_PATH}/Drivers/USB/Core/HostStandardReq.c
|
||||
|
||||
${LUFA_ROOT_PATH}/Drivers/USB/Core/${ARCH}/Device_${ARCH}.c
|
||||
${LUFA_ROOT_PATH}/Drivers/USB/Core/${ARCH}/Endpoint_${ARCH}.c
|
||||
${LUFA_ROOT_PATH}/Drivers/USB/Core/${ARCH}/EndpointStream_${ARCH}.c
|
||||
${LUFA_ROOT_PATH}/Drivers/USB/Core/DeviceStandardReq.c
|
||||
${LUFA_PATH}/LUFA/Drivers/USB/USB.h
|
||||
)
|
||||
target_include_directories(qmk PUBLIC ${LUFA_PATH})
|
||||
# target_link_libraries(lufa ${QMK_TARGET})
|
||||
# target_link_libraries(lufa tmk_core_protocol)
|
||||
# target_link_libraries(lufa tmk_core_protocol_lufa)
|
||||
@@ -1,24 +0,0 @@
|
||||
message("Downloading gcc-arm-none-eabi")
|
||||
if(WIN32)
|
||||
file(DOWNLOAD
|
||||
https://developer.arm.com/-/media/Files/downloads/gnu-rm/10.3-2021.10/gcc-arm-none-eabi-10.3-2021.10-win32.zip?rev=8f4a92e2ec2040f89912f372a55d8cf3&hash=8A9EAF77EF1957B779C59EADDBF2DAC118170BBF
|
||||
${CMAKE_SOURCE_DIR}/toolchains/downloads/gcc-arm-none-eabi-win32.zip
|
||||
EXPECTED_HASH MD5=2bc8f0c4c4659f8259c8176223eeafc1
|
||||
SHOW_PROGRESS
|
||||
)
|
||||
file(ARCHIVE_EXTRACT
|
||||
INPUT ${CMAKE_SOURCE_DIR}/toolchains/downloads/gcc-arm-none-eabi-win32.zip
|
||||
DESTINATION ${CMAKE_SOURCE_DIR}/toolchains/
|
||||
)
|
||||
elseif(UNIX)
|
||||
file(DOWNLOAD
|
||||
https://developer.arm.com/-/media/Files/downloads/gnu-rm/10.3-2021.10/gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2?rev=78196d3461ba4c9089a67b5f33edf82a&hash=D484B37FF37D6FC3597EBE2877FB666A41D5253B
|
||||
${CMAKE_SOURCE_DIR}/toolchains/downloads/gcc-arm-none-eabi-x86_64-linux.tar.bz2
|
||||
EXPECTED_HASH MD5=3fe3d8bb693bd0a6e4615b6569443d0d
|
||||
SHOW_PROGRESS
|
||||
)
|
||||
file(ARCHIVE_EXTRACT
|
||||
INPUT ${CMAKE_SOURCE_DIR}/toolchains/downloads/gcc-arm-none-eabi-x86_64-linux.tar.bz2
|
||||
DESTINATION ${CMAKE_SOURCE_DIR}/toolchains/
|
||||
)
|
||||
endif()
|
||||
@@ -1,24 +0,0 @@
|
||||
message("Downloading avr-gcc")
|
||||
if(WIN32)
|
||||
file(DOWNLOAD
|
||||
https://github.com/ZakKemble/avr-gcc-build/releases/download/v12.1.0-1/avr-gcc-12.1.0-x64-windows.zip
|
||||
${CMAKE_SOURCE_DIR}/toolchains/downloads/avr-gcc-x64-windows.zip
|
||||
EXPECTED_HASH SHA256=e921a964fdeaedbe963352d0f26c6520a0a3eb8effc6ff232f3824b06c4ea0e2
|
||||
SHOW_PROGRESS
|
||||
)
|
||||
file(ARCHIVE_EXTRACT
|
||||
INPUT ${CMAKE_SOURCE_DIR}/toolchains/downloads/avr-gcc-x64-windows.zip
|
||||
DESTINATION ${CMAKE_SOURCE_DIR}/toolchains/
|
||||
)
|
||||
elseif(UNIX)
|
||||
file(DOWNLOAD
|
||||
https://github.com/ZakKemble/avr-gcc-build/releases/download/v12.1.0-1/avr-gcc-12.1.0-x64-linux.tar.bz2
|
||||
${CMAKE_SOURCE_DIR}/toolchains/downloads/avr-gcc-x64-linux.tar.bz2
|
||||
EXPECTED_HASH SHA256=feb034f4b85237032da8bac1f03765af5ebc4a8939b69bed57ff31bc482ca1a6
|
||||
SHOW_PROGRESS
|
||||
)
|
||||
file(ARCHIVE_EXTRACT
|
||||
INPUT ${CMAKE_SOURCE_DIR}/toolchains/downloads/avr-gcc-x64-linux.tar.bz2
|
||||
DESTINATION ${CMAKE_SOURCE_DIR}/toolchains/
|
||||
)
|
||||
endif()
|
||||
@@ -1,22 +0,0 @@
|
||||
message("Downloading dfu-programmer")
|
||||
if(WIN32)
|
||||
file(DOWNLOAD
|
||||
https://github.com/dfu-programmer/dfu-programmer/releases/download/v1.0.0/dfu-programmer-x64-1.0.0.7z
|
||||
${CMAKE_SOURCE_DIR}/toolchains/downloads/dfu-programmer-x64-1.0.0.7z
|
||||
SHOW_PROGRESS
|
||||
)
|
||||
file(ARCHIVE_EXTRACT
|
||||
INPUT ${CMAKE_SOURCE_DIR}/toolchains/downloads/dfu-programmer-x64-1.0.0.7z
|
||||
DESTINATION ${CMAKE_SOURCE_DIR}/toolchains/dfu-programmer/
|
||||
)
|
||||
elseif(UNIX)
|
||||
file(DOWNLOAD
|
||||
https://github.com/dfu-programmer/dfu-programmer/releases/download/v1.0.0/dfu-programmer-linux-1.0.0.7z
|
||||
${CMAKE_SOURCE_DIR}/toolchains/downloads/dfu-programmer-linux-1.0.0.7z
|
||||
SHOW_PROGRESS
|
||||
)
|
||||
file(ARCHIVE_EXTRACT
|
||||
INPUT ${CMAKE_SOURCE_DIR}/toolchains/downloads/dfu-programmer-linux-1.0.0.7z
|
||||
DESTINATION ${CMAKE_SOURCE_DIR}/toolchains/dfu-programmer/
|
||||
)
|
||||
endif()
|
||||
@@ -1,51 +0,0 @@
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
|
||||
|
||||
include(ResolveKeyboard)
|
||||
include(ValidateJson)
|
||||
|
||||
set(QMK_KEYBOARDS_FOLDER "${CMAKE_SOURCE_DIR}/keyboards")
|
||||
set(CMAKE_MESSAGE_INDENT "")
|
||||
|
||||
resolve_keyboard(${QMK_KEYBOARD_FOLDER} KEYBOARD_FOLDER_ABS)
|
||||
validate_json(${KEYBOARD_FOLDER_ABS}/info.json keyboard JSON_STR)
|
||||
cmake_path(IS_PREFIX QMK_KEYBOARDS_FOLDER "${KEYBOARD_FOLDER_ABS}" IS_KEYBOARDS_FOLDER)
|
||||
|
||||
file(WRITE "${CMAKE_SOURCE_DIR}/build/keyboard_keymaps" "")
|
||||
if(${IS_KEYBOARDS_FOLDER})
|
||||
file(RELATIVE_PATH RELATIVE_KEYBOARD_FOLDER ${QMK_KEYBOARDS_FOLDER} ${KEYBOARD_FOLDER_ABS})
|
||||
while(NOT ${RELATIVE_KEYBOARD_FOLDER} STREQUAL "")
|
||||
file(GLOB KEYMAPS "${QMK_KEYBOARDS_FOLDER}/${RELATIVE_KEYBOARD_FOLDER}/keymaps/*/keymap.c")
|
||||
foreach(KEYMAP ${KEYMAPS})
|
||||
file(RELATIVE_PATH KEYMAP_C "${QMK_KEYBOARDS_FOLDER}/${RELATIVE_KEYBOARD_FOLDER}/keymaps" "${KEYMAP}")
|
||||
get_filename_component(KEYMAP_FOLDER ${KEYMAP_C} DIRECTORY)
|
||||
# message(STATUS "${KEYMAP_FOLDER}")
|
||||
file(APPEND "${CMAKE_SOURCE_DIR}/build/keyboard_keymaps" "${KEYMAP_FOLDER}\n")
|
||||
endforeach()
|
||||
get_filename_component(RELATIVE_KEYBOARD_FOLDER ${RELATIVE_KEYBOARD_FOLDER} DIRECTORY)
|
||||
endwhile()
|
||||
else()
|
||||
if(EXISTS "${KEYBOARD_FOLDER_ABS}/keymap.c")
|
||||
set(${KEYMAP_C_STR} "${KEYBOARD_FOLDER_ABS}/keymap.c" PARENT_SCOPE)
|
||||
elseif(EXISTS "${KEYBOARD_FOLDER_ABS}/keymaps/${KEYMAP_FOLDER}/keymap.c")
|
||||
set(${KEYMAP_C_STR} "${KEYBOARD_FOLDER_ABS}/keymaps/${KEYMAP_FOLDER}/keymap.c" PARENT_SCOPE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
string(JSON COMMUNITY_LAYOUTS ERROR_VARIABLE NO_COMMUNITY_LAYOUTS GET ${JSON_STR} community_layouts)
|
||||
|
||||
if(${NO_COMMUNITY_LAYOUTS} STREQUAL "NOTFOUND")
|
||||
string(JSON NUM_LAYOUTS LENGTH ${COMMUNITY_LAYOUTS})
|
||||
math(EXPR MAX "${NUM_LAYOUTS} - 1")
|
||||
foreach(IDX RANGE ${MAX})
|
||||
string(JSON LAYOUT GET ${COMMUNITY_LAYOUTS} ${IDX})
|
||||
file(GLOB KEYMAPS "${CMAKE_SOURCE_DIR}/layouts/community/${LAYOUT}/*/keymap.c")
|
||||
foreach(KEYMAP ${KEYMAPS})
|
||||
file(RELATIVE_PATH KEYMAP_C "${CMAKE_SOURCE_DIR}/layouts/community/${LAYOUT}" "${KEYMAP}")
|
||||
get_filename_component(KEYMAP_FOLDER ${KEYMAP_C} DIRECTORY)
|
||||
# message(STATUS "${KEYMAP_FOLDER}")
|
||||
file(APPEND "${CMAKE_SOURCE_DIR}/build/keyboard_keymaps" "${KEYMAP_FOLDER}\n")
|
||||
endforeach()
|
||||
endforeach()
|
||||
endif()
|
||||
@@ -1,64 +0,0 @@
|
||||
# Simple CMake utility to read variables from MK files
|
||||
# - Gets contents from given file (name or path)
|
||||
# - Parses the assignment statements
|
||||
# - Makes the same assignments in the PARENT_SCOPE
|
||||
|
||||
if(POLICY CMP0007)
|
||||
cmake_policy(SET CMP0007 NEW)
|
||||
endif()
|
||||
|
||||
function(ParseHeader HeaderFile Prefix)
|
||||
_ParseHeader(${HeaderFile} ${Prefix})
|
||||
endfunction()
|
||||
|
||||
macro(_ParseHeader HeaderFile Prefix)
|
||||
message(CHECK_START "Parsing Header")
|
||||
list(APPEND CMAKE_MESSAGE_INDENT " ")
|
||||
message(STATUS "Reading \"${HeaderFile}\"")
|
||||
|
||||
file(READ "${HeaderFile}" FileContents)
|
||||
string(REGEX REPLACE "/\\*.*\\*/" "" FileContents ${FileContents})
|
||||
# replace the \ newlines with spaces
|
||||
string(REGEX REPLACE "\\\\\r?\n *" " " FileContents ${FileContents})
|
||||
# turn each line into an item in a list
|
||||
string(REGEX REPLACE "\r?\n" ";" FileLines ${FileContents})
|
||||
list(REMOVE_ITEM FileLines "")
|
||||
|
||||
foreach(line ${FileLines})
|
||||
# remove comments from the ends of each line
|
||||
string(REGEX REPLACE "//.*" "" line ${line})
|
||||
|
||||
# remove now-empty lines
|
||||
if("${line}" STREQUAL "")
|
||||
continue()
|
||||
endif()
|
||||
|
||||
# try to process includes, if the file exists
|
||||
if(line MATCHES "^#include \"(.+)\"")
|
||||
set(INCLUDED_HEADER ${CMAKE_MATCH_1})
|
||||
if(EXISTS ${INCLUDED_HEADER})
|
||||
_ParseHeader("${INCLUDED_HEADER}" ${Prefix})
|
||||
else()
|
||||
message(STATUS "Could not read ${INCLUDED_HEADER}")
|
||||
endif()
|
||||
continue()
|
||||
endif()
|
||||
|
||||
# array
|
||||
if(line MATCHES "#define ([A-Za-z0-9_]+) {(.*)}")
|
||||
set(VARIABLE_NAME ${CMAKE_MATCH_1})
|
||||
set(VARIABLE_VALUE ${CMAKE_MATCH_2})
|
||||
set(${Prefix}${VARIABLE_NAME} ${VARIABLE_VALUE})
|
||||
endif()
|
||||
|
||||
# regular variable
|
||||
if(line MATCHES "#define ([A-Za-z0-9_]+) (.*)")
|
||||
set(VARIABLE_NAME ${CMAKE_MATCH_1})
|
||||
set(VARIABLE_VALUE ${CMAKE_MATCH_2})
|
||||
set(${Prefix}${VARIABLE_NAME} ${VARIABLE_VALUE})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
list(POP_BACK CMAKE_MESSAGE_INDENT)
|
||||
message(CHECK_PASS "Complete")
|
||||
endmacro()
|
||||
@@ -1,98 +0,0 @@
|
||||
# Simple CMake utility to read variables from MK files
|
||||
# - Gets contents from given file (name or path)
|
||||
# - Parses the assignment statements
|
||||
# - Makes the same assignments in the PARENT_SCOPE
|
||||
|
||||
if(POLICY CMP0007)
|
||||
cmake_policy(SET CMP0007 NEW)
|
||||
endif()
|
||||
|
||||
function(ParseMakefile MKFile)
|
||||
_ParseMakefile(${MKFile} ${ARGN})
|
||||
endfunction()
|
||||
|
||||
macro(_ParseMakefile MKFile)
|
||||
message(CHECK_START "Parsing Makefile")
|
||||
list(APPEND CMAKE_MESSAGE_INDENT " ")
|
||||
message(STATUS "Reading \"${MKFile}\"")
|
||||
|
||||
file(READ "${MKFile}" FileContents)
|
||||
# replace the \ newlines with spaces
|
||||
string(REGEX REPLACE "\\\\\r?\n *" " " FileContents ${FileContents})
|
||||
# turn each line into an item in a list
|
||||
string(REGEX REPLACE "\r?\n" ";" FileLines ${FileContents})
|
||||
list(REMOVE_ITEM FileLines "")
|
||||
|
||||
foreach(line ${FileLines})
|
||||
# remove comments from the ends of each line
|
||||
string(REGEX REPLACE "#.*" "" line ${line})
|
||||
|
||||
# remove now-empty lines
|
||||
if("${line}" STREQUAL "")
|
||||
continue()
|
||||
endif()
|
||||
|
||||
# try to process includes, if the file exists
|
||||
if(line MATCHES "^-?include (.+)$")
|
||||
set(MAKE_CHILD ${CMAKE_MATCH_1})
|
||||
if(EXISTS ${MAKE_CHILD})
|
||||
_ParseMakefile("${MAKE_CHILD}" ${ARGN})
|
||||
else()
|
||||
message(STATUS "Could not read ${MAKE_CHILD}")
|
||||
endif()
|
||||
continue()
|
||||
endif()
|
||||
|
||||
# turn the assignment into a list with the first item being the variable name
|
||||
string(REPLACE "=" ";" line_split ${line})
|
||||
list(LENGTH line_split count)
|
||||
|
||||
if(count LESS 2)
|
||||
message(STATUS "Skipping ${line}")
|
||||
continue()
|
||||
endif()
|
||||
|
||||
list(GET line_split -1 value)
|
||||
string(STRIP ${value} value)
|
||||
# separate_arguments(value)
|
||||
# string(REPLACE " " ";" value ${value})
|
||||
list(REMOVE_AT line_split -1)
|
||||
|
||||
foreach(var_name ${line_split})
|
||||
string(STRIP ${var_name} var_name)
|
||||
# replace $(?) with the variable ? from cmake
|
||||
if(value MATCHES "\\$\\(([^\\(\\)]+)\\)")
|
||||
set(MAKE_VARIABLE "${CMAKE_MATCH_1}")
|
||||
string(REPLACE "$(${MAKE_VARIABLE})" "${${MAKE_VARIABLE}}" value ${value})
|
||||
endif()
|
||||
|
||||
# look for +, assuming it used to be +=
|
||||
if(${var_name} MATCHES "([^ \\+]+) *\\+")
|
||||
message(STATUS "Appending \"${CMAKE_MATCH_1}\" with \"${value}\"")
|
||||
# read parent variable in local & append
|
||||
set(LOCAL_${CMAKE_MATCH_1} ${CMAKE_MATCH_1})
|
||||
# APPEND accepts spaces between values
|
||||
list(APPEND LOCAL_${CMAKE_MATCH_1} ${value})
|
||||
set(${CMAKE_MATCH_1} ${LOCAL_${CMAKE_MATCH_1}})
|
||||
set(${CMAKE_MATCH_1} ${LOCAL_${CMAKE_MATCH_1}} PARENT_SCOPE)
|
||||
else()
|
||||
# set needs ; between elements to be considered a list
|
||||
string(REGEX REPLACE " +" ";" value ${value})
|
||||
# try to find variable in cache and FORCE wtih INTERNAL if it exists
|
||||
if(DEFINED CACHE${${var_name}})
|
||||
message(STATUS "Caching \"${var_name}\" to \"${value}\"")
|
||||
# set locally so replacement still work
|
||||
set(${var_name} ${value})
|
||||
set(${var_name} ${value} CACHE INTERNAL "")
|
||||
else()
|
||||
message(STATUS "Setting \"${var_name}\" to \"${value}\"")
|
||||
set(${var_name} ${value})
|
||||
set(${var_name} ${value} PARENT_SCOPE)
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
endforeach()
|
||||
|
||||
list(POP_BACK CMAKE_MESSAGE_INDENT)
|
||||
message(CHECK_PASS "Complete")
|
||||
endmacro()
|
||||
@@ -1,78 +0,0 @@
|
||||
include(ParseMakefile)
|
||||
include(Utils)
|
||||
|
||||
macro(process_keyboard)
|
||||
message(CHECK_START "Processing keyboard")
|
||||
list(APPEND CMAKE_MESSAGE_INDENT " ")
|
||||
|
||||
validate_json(${QMK_KEYBOARD_FOLDER_ABS}/info.json keyboard QMK_KEYBOARD_INFO_JSON_STRING)
|
||||
|
||||
# process rules from info.json
|
||||
file(READ ${CMAKE_SOURCE_DIR}/data/mappings/info_rules.hjson JSON_STRING)
|
||||
string(JSON MAPPING_LENGTH LENGTH ${JSON_STRING})
|
||||
math(EXPR MAX "${MAPPING_LENGTH} - 1")
|
||||
foreach(IDX RANGE ${MAX})
|
||||
string(JSON RULE_KEY MEMBER ${JSON_STRING} ${IDX})
|
||||
# string(JSON INFO_KEY GET ${JSON_STRING} ${RULE_KEY} info_key)
|
||||
json_get_with_default(INFO_KEY ${JSON_STRING} _ ${RULE_KEY} info_key)
|
||||
string(REPLACE "." " " INFO_KEYS ${INFO_KEY})
|
||||
string(JSON RULE_VALUE ERROR_VARIABLE RULE_KEY_NOT_FOUND GET ${QMK_KEYBOARD_INFO_JSON_STRING} ${INFO_KEYS})
|
||||
if(${RULE_KEY_NOT_FOUND} STREQUAL "NOTFOUND")
|
||||
json_get_with_default(VALUE_TYPE ${JSON_STRING} raw ${RULE_KEY} value_type)
|
||||
if(${VALUE_TYPE} STREQUAL "list")
|
||||
string(JSON NUM_VALUES LENGTH ${RULE_VALUE})
|
||||
math(EXPR MAX "${NUM_VALUES} - 1")
|
||||
foreach(IDX RANGE ${MAX})
|
||||
string(JSON VALUE GET ${RULE_VALUE} ${IDX})
|
||||
list(APPEND ${RULE_KEY} ${VALUE})
|
||||
endforeach()
|
||||
message(STATUS "Found rule '${INFO_KEY}': '${${RULE_KEY}}' assigned to '${RULE_KEY}'")
|
||||
else()
|
||||
set(${RULE_KEY} ${RULE_VALUE})
|
||||
message(STATUS "Found rule '${INFO_KEY}': '${RULE_VALUE}' assigned to '${RULE_KEY}'")
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# process definitions from info.json
|
||||
file(READ ${CMAKE_SOURCE_DIR}/data/mappings/info_config.hjson JSON_STRING)
|
||||
string(JSON MAPPING_LENGTH LENGTH ${JSON_STRING})
|
||||
math(EXPR MAX "${MAPPING_LENGTH} - 1")
|
||||
foreach(IDX RANGE ${MAX})
|
||||
string(JSON CONFIG_KEY MEMBER ${JSON_STRING} ${IDX})
|
||||
json_get_with_default(INFO_KEY ${JSON_STRING} _ ${CONFIG_KEY} info_key)
|
||||
string(REPLACE "." ";" INFO_KEYS ${INFO_KEY})
|
||||
# string(JSON CONFIG_VALUE ERROR_VARIABLE CONFIG_KEY_NOT_FOUND GET ${QMK_KEYBOARD_INFO_JSON_STRING} ${INFO_KEYS})
|
||||
json_get_with_default(CONFIG_VALUE ${QMK_KEYBOARD_INFO_JSON_STRING} NOTFOUND ${INFO_KEYS})
|
||||
if(NOT CONFIG_VALUE STREQUAL "NOTFOUND")
|
||||
set(${CONFIG_KEY} ${CONFIG_VALUE})
|
||||
json_get_with_default(VALUE_TYPE ${JSON_STRING} raw ${CONFIG_KEY} value_type)
|
||||
if(${VALUE_TYPE} STREQUAL "str")
|
||||
add_compile_definitions(${CONFIG_KEY}="${CONFIG_VALUE}")
|
||||
message(STATUS "Found definition '${INFO_KEY}': '\"${CONFIG_VALUE}\"' assigned to '${CONFIG_KEY}'")
|
||||
elseif(${VALUE_TYPE} STREQUAL "bcd_version")
|
||||
string(REGEX MATCH "^([0-9]+)\\.([0-9]+)\\.([0-9]+)" VERSION_MATCH ${CONFIG_VALUE})
|
||||
set(VERSION_MAJOR ${CMAKE_MATCH_1})
|
||||
set(VERSION_MINOR ${CMAKE_MATCH_2})
|
||||
set(VERSION_PATCH ${CMAKE_MATCH_3})
|
||||
math(EXPR BCD_VERSION "${VERSION_MAJOR} * 10000 + ${VERSION_MINOR} * 100 + ${VERSION_PATCH}" OUTPUT_FORMAT HEXADECIMAL)
|
||||
add_compile_definitions(${CONFIG_KEY}=${BCD_VERSION})
|
||||
message(STATUS "Found definition '${INFO_KEY}': '${BCD_VERSION}' assigned to '${CONFIG_KEY}'")
|
||||
else()
|
||||
add_compile_definitions(${CONFIG_KEY}=${CONFIG_VALUE})
|
||||
message(STATUS "Found definition '${INFO_KEY}': '${CONFIG_VALUE}' assigned to '${CONFIG_KEY}'")
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
string(JSON KEYBOARD_NAME GET ${QMK_KEYBOARD_INFO_JSON_STRING} keyboard_name)
|
||||
string(JSON MANUFACTURER GET ${QMK_KEYBOARD_INFO_JSON_STRING} manufacturer)
|
||||
string(JSON URL GET ${QMK_KEYBOARD_INFO_JSON_STRING} url)
|
||||
string(JSON QMK_MCU GET ${QMK_KEYBOARD_INFO_JSON_STRING} processor)
|
||||
|
||||
list(POP_BACK CMAKE_MESSAGE_INDENT)
|
||||
message(CHECK_PASS "info.json validated and loaded")
|
||||
|
||||
|
||||
ParseMakefile(${QMK_KEYBOARD_FOLDER_ABS}/rules.mk)
|
||||
endmacro()
|
||||
@@ -1,146 +0,0 @@
|
||||
include(Utils)
|
||||
|
||||
function(resolve_keyboard KEYBOARD KEYBOAD_FOLDER_ABS_STR)
|
||||
message(VERBOSE "Resolving ${KEYBOARD}")
|
||||
if(EXISTS "${CMAKE_SOURCE_DIR}/keyboards/${KEYBOARD}")
|
||||
message(VERBOSE "Found in repo: ${KEYBOARD}")
|
||||
set(${KEYBOAD_FOLDER_ABS_STR} "${CMAKE_SOURCE_DIR}/keyboards/${KEYBOARD}" PARENT_SCOPE)
|
||||
return()
|
||||
endif()
|
||||
if(EXISTS "${CMAKE_SOURCE_DIR}/build/keyboard_repository/${KEYBOARD}")
|
||||
message(VERBOSE "Already checked out: ${KEYBOARD}")
|
||||
set(${KEYBOAD_FOLDER_ABS_STR} "${CMAKE_SOURCE_DIR}/build/keyboard_repository/${KEYBOARD}" PARENT_SCOPE)
|
||||
return()
|
||||
endif()
|
||||
file(READ ${CMAKE_SOURCE_DIR}/data/keyboards.json KEYBOARDS_JSON)
|
||||
string(JSON KEYBOARD_SLUG ERROR_VARIABLE JSON_ERROR GET ${KEYBOARDS_JSON} ${KEYBOARD})
|
||||
if(${JSON_ERROR} STREQUAL "NOTFOUND")
|
||||
message(VERBOSE "Found ${KEYBOARD_SLUG}")
|
||||
if(${KEYBOARD_SLUG} MATCHES "^@([0-9a-zA-Z_]+/[0-9a-zA-Z_]+)")
|
||||
# keyboard slug is mapped to a github repo
|
||||
set(GIT_SLUG ${CMAKE_MATCH_1})
|
||||
# string(MAKE_C_IDENTIFIER ${KEYBOARD} KEYBOARD_NAME)
|
||||
message(VERBOSE "Cloning ${GIT_SLUG}")
|
||||
find_package(Git QUIET)
|
||||
if(GIT_FOUND)
|
||||
file(MAKE_DIRECTORY "${CMAKE_SOURCE_DIR}/build/keyboard_repository/${KEYBOARD}")
|
||||
execute_process(COMMAND ${GIT_EXECUTABLE} clone "https://github.com/${GIT_SLUG}.git" .
|
||||
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/build/keyboard_repository/${KEYBOARD}"
|
||||
RESULT_VARIABLE GIT_SUBMOD_RESULT)
|
||||
if(NOT GIT_SUBMOD_RESULT EQUAL "0")
|
||||
message(FATAL_ERROR "git clone failed with ${GIT_SUBMOD_RESULT}")
|
||||
endif()
|
||||
else()
|
||||
message("Git not found - skipping submodule update")
|
||||
endif()
|
||||
set(${KEYBOAD_FOLDER_ABS_STR} "${CMAKE_SOURCE_DIR}/build/keyboard_repository/${KEYBOARD}" PARENT_SCOPE)
|
||||
else()
|
||||
message(FATAL_ERROR "Didn't match")
|
||||
endif()
|
||||
else()
|
||||
message(FATAL_ERROR "Couldn't find")
|
||||
# set(${RESULT_STR} "NOTFOUND" PARENT_SCOPE)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(resolve_config_h KEYBOARD_FOLDER_ABS CONFIG_H_STR)
|
||||
set(${CONFIG_H_STR} PARENT_SCOPE)
|
||||
if(${IS_KEYBOARDS_FOLDER})
|
||||
file(RELATIVE_PATH RELATIVE_KEYBOARD_FOLDER ${QMK_KEYBOARDS_FOLDER} ${KEYBOARD_FOLDER_ABS})
|
||||
# get the deepest config.h
|
||||
while(NOT ${RELATIVE_KEYBOARD_FOLDER} STREQUAL "")
|
||||
if(EXISTS "${QMK_KEYBOARDS_FOLDER}/${RELATIVE_KEYBOARD_FOLDER}/config.h")
|
||||
parent_list(PREPEND ${CONFIG_H_STR} "${QMK_KEYBOARDS_FOLDER}/${RELATIVE_KEYBOARD_FOLDER}/config.h")
|
||||
# set(${CONFIG_H_STR} "${QMK_KEYBOARDS_FOLDER}/${RELATIVE_KEYBOARD_FOLDER}/config.h" PARENT_SCOPE)
|
||||
# return()
|
||||
endif()
|
||||
get_filename_component(RELATIVE_KEYBOARD_FOLDER ${RELATIVE_KEYBOARD_FOLDER} DIRECTORY)
|
||||
endwhile()
|
||||
# message(FATAL_ERROR "Could not find config.h in ${KEYBOARD_FOLDER_ABS}")
|
||||
else()
|
||||
if(EXISTS "${KEYBOARD_FOLDER_ABS}/config.h")
|
||||
set(${CONFIG_H_STR} "${KEYBOARD_FOLDER_ABS}/config.h" PARENT_SCOPE)
|
||||
else()
|
||||
message(FATAL_ERROR "Could not find config.h in ${KEYBOARD_FOLDER_ABS}")
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(resolve_keyboard_h KEYBOARD_FOLDER_ABS KEYBOARD_H_STR)
|
||||
if(${IS_KEYBOARDS_FOLDER})
|
||||
file(RELATIVE_PATH RELATIVE_KEYBOARD_FOLDER ${QMK_KEYBOARDS_FOLDER} ${KEYBOARD_FOLDER_ABS})
|
||||
# get the deepest header
|
||||
while(NOT ${RELATIVE_KEYBOARD_FOLDER} STREQUAL "")
|
||||
get_filename_component(LAST_PART ${RELATIVE_KEYBOARD_FOLDER} NAME)
|
||||
if(EXISTS "${QMK_KEYBOARDS_FOLDER}/${RELATIVE_KEYBOARD_FOLDER}/${LAST_PART}.h")
|
||||
set(${KEYBOARD_H_STR} "${QMK_KEYBOARDS_FOLDER}/${RELATIVE_KEYBOARD_FOLDER}/${LAST_PART}.h" PARENT_SCOPE)
|
||||
return()
|
||||
endif()
|
||||
get_filename_component(RELATIVE_KEYBOARD_FOLDER ${RELATIVE_KEYBOARD_FOLDER} DIRECTORY)
|
||||
endwhile()
|
||||
message(FATAL_ERROR "Could not find *.h in ${KEYBOARD_FOLDER_ABS}")
|
||||
else()
|
||||
if(EXISTS "${KEYBOARD_FOLDER_ABS}/keyboard.h")
|
||||
set(${KEYBOARD_H_STR} "${KEYBOARD_FOLDER_ABS}/keyboard.h" PARENT_SCOPE)
|
||||
else()
|
||||
message(FATAL_ERROR "Could not find keyboard.h in ${KEYBOARD_FOLDER_ABS}")
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(resolve_keymap_c KEYBOARD_FOLDER_ABS KEYMAP_FOLDER KEYMAP_C_STR)
|
||||
if(IS_ABSOLUTE ${KEYMAP_FOLDER})
|
||||
if(EXISTS "${KEYMAP_FOLDER}/keymap.c")
|
||||
set(${KEYMAP_C_STR} "${KEYMAP_FOLDER}/keymap.c" PARENT_SCOPE)
|
||||
return()
|
||||
endif()
|
||||
else()
|
||||
if(${IS_KEYBOARDS_FOLDER})
|
||||
file(RELATIVE_PATH RELATIVE_KEYBOARD_FOLDER ${QMK_KEYBOARDS_FOLDER} ${KEYBOARD_FOLDER_ABS})
|
||||
# get the deepest keymap.c
|
||||
while(NOT ${RELATIVE_KEYBOARD_FOLDER} STREQUAL "")
|
||||
if(EXISTS "${QMK_KEYBOARDS_FOLDER}/${RELATIVE_KEYBOARD_FOLDER}/keymaps/${KEYMAP_FOLDER}/keymap.c")
|
||||
set(${KEYMAP_C_STR} "${QMK_KEYBOARDS_FOLDER}/${RELATIVE_KEYBOARD_FOLDER}/keymaps/${KEYMAP_FOLDER}/keymap.c" PARENT_SCOPE)
|
||||
return()
|
||||
endif()
|
||||
get_filename_component(RELATIVE_KEYBOARD_FOLDER ${RELATIVE_KEYBOARD_FOLDER} DIRECTORY)
|
||||
endwhile()
|
||||
else()
|
||||
if(EXISTS "${KEYBOARD_FOLDER_ABS}/keymap.c")
|
||||
set(${KEYMAP_C_STR} "${KEYBOARD_FOLDER_ABS}/keymap.c" PARENT_SCOPE)
|
||||
return()
|
||||
elseif(EXISTS "${KEYBOARD_FOLDER_ABS}/keymaps/${KEYMAP_FOLDER}/keymap.c")
|
||||
set(${KEYMAP_C_STR} "${KEYBOARD_FOLDER_ABS}/keymaps/${KEYMAP_FOLDER}/keymap.c" PARENT_SCOPE)
|
||||
return()
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# string(JSON COMMUNITY_LAYOUTS ERROR_VARIABLE NO_COMMUNITY_LAYOUTS GET ${QMK_KEYBOARD_INFO_JSON_STRING} community_layouts)
|
||||
|
||||
# if(${NO_COMMUNITY_LAYOUTS} STREQUAL "NOTFOUND")
|
||||
# string(JSON NUM_LAYOUTS LENGTH ${COMMUNITY_LAYOUTS})
|
||||
# math(EXPR MAX "${NUM_LAYOUTS} - 1")
|
||||
foreach(LAYOUT ${LAYOUTS})
|
||||
# foreach(IDX RANGE ${MAX})
|
||||
# string(JSON LAYOUT GET ${COMMUNITY_LAYOUTS} ${IDX})
|
||||
if(EXISTS "${CMAKE_SOURCE_DIR}/layouts/community/${LAYOUT}/${KEYMAP_FOLDER}/keymap.c")
|
||||
set(${KEYMAP_C_STR} "${CMAKE_SOURCE_DIR}/layouts/community/${LAYOUT}/${KEYMAP_FOLDER}/keymap.c" PARENT_SCOPE)
|
||||
return()
|
||||
endif()
|
||||
endforeach()
|
||||
# endif()
|
||||
message(FATAL_ERROR "Could not resolve keymap '${KEYMAP_FOLDER}'")
|
||||
endfunction()
|
||||
|
||||
function(resolve_keyboard_includes KEYBOARD_FOLDER_ABS)
|
||||
if(${IS_KEYBOARDS_FOLDER})
|
||||
file(RELATIVE_PATH RELATIVE_KEYBOARD_FOLDER ${QMK_KEYBOARDS_FOLDER} ${KEYBOARD_FOLDER_ABS})
|
||||
while(NOT ${RELATIVE_KEYBOARD_FOLDER} STREQUAL "")
|
||||
target_include_directories(qmk PUBLIC "${CMAKE_SOURCE_DIR}/keyboards/${RELATIVE_KEYBOARD_FOLDER}")
|
||||
get_filename_component(RELATIVE_KEYBOARD_FOLDER ${RELATIVE_KEYBOARD_FOLDER} DIRECTORY)
|
||||
endwhile()
|
||||
else()
|
||||
target_include_directories(qmk PUBLIC "${KEYBOARD_FOLDER_ABS}")
|
||||
endif()
|
||||
endfunction()
|
||||
@@ -1,60 +0,0 @@
|
||||
function(resolve_toolchain PROCESSOR TOOLCHAIN_STR)
|
||||
unset(${TOOLCHAIN_STR} PARENT_SCOPE)
|
||||
if(
|
||||
${PROCESSOR} MATCHES "^at.*"
|
||||
)
|
||||
set(${TOOLCHAIN_STR} "avr" PARENT_SCOPE)
|
||||
set(QMK_EXTENSION ".hex" PARENT_SCOPE)
|
||||
include(FindAVRToolchain)
|
||||
find_avr_toolchain()
|
||||
elseif(
|
||||
${PROCESSOR} MATCHES "^STM.*" OR
|
||||
${PROCESSOR} MATCHES "^WB32.*" OR
|
||||
${PROCESSOR} MATCHES "^MK.*" OR
|
||||
${PROCESSOR} MATCHES "RP2040" OR
|
||||
${PROCESSOR} MATCHES "^GD32.*"
|
||||
)
|
||||
set(${TOOLCHAIN_STR} "arm-none-eabi" PARENT_SCOPE)
|
||||
set(QMK_EXTENSION ".bin" PARENT_SCOPE)
|
||||
include(FindARMToolchain)
|
||||
find_arm_toolchain()
|
||||
elseif(
|
||||
${PROCESSOR} MATCHES "risc-v"
|
||||
)
|
||||
set(${TOOLCHAIN_STR} "riscv32-unknown-elf" PARENT_SCOPE)
|
||||
set(QMK_EXTENSION ".bin" PARENT_SCOPE)
|
||||
else()
|
||||
message(FATAL_ERROR "Could not find toolchain for ${PROCESSOR}")
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(find_toolchain TOOLCHAIN TOOLCHAIN_ROOT_STR)
|
||||
unset(${TOOLCHAIN_STR} PARENT_SCOPE)
|
||||
if(UNIX)
|
||||
set(OS_SUFFIX "")
|
||||
find_path(TOOLCHAIN_ROOT
|
||||
NAMES
|
||||
${TOOLCHAIN}-gcc${OS_SUFFIX}
|
||||
PATHS
|
||||
"${CMAKE_SOURCE_DIR}/toolchains/avr-gcc/avr-gcc-12.1.0-x64-linux/bin/"
|
||||
"${CMAKE_SOURCE_DIR}/toolchains/gcc-arm-none-eabi-10.3-2021.10/bin/"
|
||||
/usr/bin/
|
||||
/usr/local/bin
|
||||
/bin/
|
||||
$ENV{AVR_ROOT}
|
||||
)
|
||||
elseif(WIN32)
|
||||
set(OS_SUFFIX ".exe")
|
||||
find_path(TOOLCHAIN_ROOT
|
||||
NAMES
|
||||
${TOOLCHAIN}-gcc${OS_SUFFIX}
|
||||
PATHS
|
||||
"${CMAKE_SOURCE_DIR}/toolchains/avr-gcc-12.1.0-x64-windows/bin"
|
||||
"${CMAKE_SOURCE_DIR}/toolchains/gcc-arm-none-eabi-10.3-2021.10/bin/"
|
||||
$ENV{AVR_ROOT}
|
||||
)
|
||||
else()
|
||||
message(FATAL_ERROR "Unsure how to handle this OS")
|
||||
endif(UNIX)
|
||||
set(${TOOLCHAIN_ROOT_STR} ${TOOLCHAIN_ROOT} PARENT_SCOPE)
|
||||
endfunction(find_toolchain)
|
||||
@@ -1,22 +0,0 @@
|
||||
# can be passed a relative path (to CMAKE_SOURCE_DIR) to update/checkout that submodule
|
||||
macro(update_submodule SUBMODULE)
|
||||
find_package(Git QUIET)
|
||||
if(GIT_FOUND AND EXISTS "${CMAKE_SOURCE_DIR}/.git")
|
||||
option(GIT_SUBMODULE "Check submodules during build" ON)
|
||||
if(GIT_SUBMODULE)
|
||||
message(STATUS "Updating submoudle ${SUBMODULE}")
|
||||
execute_process(COMMAND ${GIT_EXECUTABLE} submodule update ${SUBMODULE}
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
RESULT_VARIABLE GIT_SUBMOD_RESULT)
|
||||
if(NOT GIT_SUBMOD_RESULT EQUAL "0")
|
||||
message(FATAL_ERROR "git submodule update ${SUBMODULE} failed with ${GIT_SUBMOD_RESULT}, please checkout submodules")
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
message("Git not found - skipping submodule update")
|
||||
endif()
|
||||
|
||||
if(NOT EXISTS "${CMAKE_SOURCE_DIR}/${SUBMODULE}/.git")
|
||||
message(FATAL_ERROR "The submodule was not downloaded! GIT_SUBMODULE was turned off or failed. Please update submodules and try again.")
|
||||
endif()
|
||||
endmacro()
|
||||
@@ -1,25 +0,0 @@
|
||||
macro(json_get_with_default KEY_STR JSON_STR DEFAULT)
|
||||
# message(STATUS "Getting ${ARGN} for ${KEY_STR}")
|
||||
string(JSON ${KEY_STR} ERROR_VARIABLE JSON_ERROR GET ${JSON_STR} ${ARGN})
|
||||
if(NOT ${JSON_ERROR} STREQUAL "NOTFOUND")
|
||||
set(${KEY_STR} ${DEFAULT})
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro(json_get KEY_STR JSON_STR)
|
||||
# message(STATUS "Getting ${ARGN} for ${KEY_STR}")
|
||||
string(JSON ${KEY_STR} ERROR_VARIABLE JSON_ERROR GET ${JSON_STR} ${ARGN})
|
||||
if(NOT ${JSON_ERROR} STREQUAL "NOTFOUND")
|
||||
unset(${KEY_STR})
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro(parent_list ACTION LIST_STR)
|
||||
set(ARGS ${ARGN})
|
||||
string(REPLACE ";" " " ARGS ${ARGS})
|
||||
set(LOCAL_LIST ${${LIST_STR}})
|
||||
list(${ACTION} LOCAL_LIST ${ARGS})
|
||||
# set in current scope too
|
||||
set(${LIST_STR} ${LOCAL_LIST})
|
||||
set(${LIST_STR} ${LOCAL_LIST} PARENT_SCOPE)
|
||||
endmacro()
|
||||
@@ -1,199 +0,0 @@
|
||||
function(validate_json JSON_FILE SCHEMA_NAME JSON_STRING_STR)
|
||||
unset(${JSON_STRING_STR} PARENT_SCOPE)
|
||||
message(VERBOSE "Validating ${JSON_FILE} with '${SCHEMA_NAME}' schema")
|
||||
file(READ ${JSON_FILE} JSON_STRING)
|
||||
file(READ ${CMAKE_SOURCE_DIR}/data/schemas/${SCHEMA_NAME}.jsonschema SCHEMA_STRING)
|
||||
string(JSON SCHEMA_ID GET ${SCHEMA_STRING} $id)
|
||||
|
||||
set(DEFINITIONS "{}")
|
||||
file(READ ${CMAKE_SOURCE_DIR}/data/schemas/definitions.jsonschema DEFINITIONS_STRING)
|
||||
string(JSON DEFINITION_ID GET ${DEFINITIONS_STRING} $id)
|
||||
string(JSON DEFINITIONS SET ${DEFINITIONS} "${DEFINITION_ID}#" ${DEFINITIONS_STRING})
|
||||
|
||||
string(JSON SCHEMA_DEFINITIONS ERROR_VARIABLE JSON_ERROR GET ${SCHEMA_STRING} definitions)
|
||||
if(${JSON_ERROR} STREQUAL "NOTFOUND")
|
||||
string(JSON DEFINITIONS SET ${DEFINITIONS} "#" "{}")
|
||||
string(JSON DEFINITIONS SET ${DEFINITIONS} "#" definitions ${SCHEMA_DEFINITIONS})
|
||||
# string(JSON DEFINITIONS_LENGTH LENGTH ${SCHEMA_DEFINITIONS})
|
||||
# math(EXPR MAX "${DEFINITIONS_LENGTH} - 1")
|
||||
# foreach(IDX RANGE ${MAX})
|
||||
# string(JSON DEFINITION_NAME MEMBER ${SCHEMA_DEFINITIONS} ${IDX})
|
||||
# string(JSON DEFINITION GET ${SCHEMA_DEFINITIONS} ${DEFINITION_NAME})
|
||||
# message(VERBOSE "Loading local definition '${DEFINITION_NAME}'")
|
||||
# string(JSON DEFINITIONS_STRING SET ${DEFINITIONS_STRING} ${DEFINITION_NAME} ${DEFINITION})
|
||||
# endforeach()
|
||||
endif()
|
||||
|
||||
validate_object(${JSON_STRING} ${SCHEMA_STRING} OBJECT_ERROR)
|
||||
if(DEFINED OBJECT_ERROR)
|
||||
message(FATAL_ERROR ${OBJECT_ERROR})
|
||||
else()
|
||||
set(${JSON_STRING_STR} ${JSON_STRING} PARENT_SCOPE)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(validate_object JSON_STRING SCHEMA_STRING OBJECT_ERROR_STR)
|
||||
unset(${OBJECT_ERROR_STR} PARENT_SCOPE)
|
||||
set(OBJECT_ERROR)
|
||||
string(JSON PROPERTY_NAME_SCHEMA ERROR_VARIABLE PROPERTY_NAMES_ERROR GET ${SCHEMA_STRING} propertyNames)
|
||||
string(JSON REQUIRED_PROPERTIES ERROR_VARIABLE REQUIRED_PROPERTIES_ERROR GET ${SCHEMA_STRING} required)
|
||||
set(REQUIRED_LIST)
|
||||
if(${REQUIRED_PROPERTIES_ERROR} STREQUAL "NOTFOUND")
|
||||
string(JSON REQUIRED_LENGTH LENGTH ${REQUIRED_PROPERTIES})
|
||||
math(EXPR MAX "${REQUIRED_LENGTH} - 1")
|
||||
foreach(IDX RANGE ${MAX})
|
||||
string(JSON REQUIRED GET ${REQUIRED_PROPERTIES} ${IDX})
|
||||
list(APPEND REQUIRED_LIST ${REQUIRED})
|
||||
endforeach()
|
||||
endif()
|
||||
string(JSON NUM_PROPERTIES LENGTH ${JSON_STRING})
|
||||
math(EXPR MAX "${NUM_PROPERTIES} - 1")
|
||||
foreach(IDX RANGE ${MAX})
|
||||
string(JSON PROPERTY_NAME MEMBER ${JSON_STRING} ${IDX})
|
||||
list(REMOVE_ITEM REQUIRED_LIST ${PROPERTY_NAME})
|
||||
message(VERBOSE "Validating property '${PROPERTY_NAME}'")
|
||||
if(${PROPERTY_NAMES_ERROR} STREQUAL "NOTFOUND")
|
||||
validate_property(${PROPERTY_NAME} ${PROPERTY_NAME_SCHEMA} PROPERTY_NAME_ERROR)
|
||||
if(DEFINED PROPERTY_NAME_ERROR)
|
||||
list(APPEND OBJECT_ERROR "${PROPERTY_NAME_ERROR}")
|
||||
endif()
|
||||
endif()
|
||||
string(JSON PROPERTY GET ${JSON_STRING} ${PROPERTY_NAME})
|
||||
string(JSON SCHEMA_PROPERTIES ERROR_VARIABLE PROPERTIES_ERROR GET ${SCHEMA_STRING} properties ${PROPERTY_NAME})
|
||||
if(${PROPERTIES_ERROR} STREQUAL "NOTFOUND")
|
||||
string(JSON PROPERTY_SCHEMA GET ${SCHEMA_STRING} properties ${PROPERTY_NAME})
|
||||
else()
|
||||
string(JSON PROPERTY_SCHEMA ERROR_VARIABLE ADDITIONAL_PROPERTIES_ERROR GET ${SCHEMA_STRING} additionalProperties)
|
||||
if(NOT ${ADDITIONAL_PROPERTIES_ERROR} STREQUAL "NOTFOUND" OR "${PROPERTY_SCHEMA}" STREQUAL "OFF")
|
||||
list(APPEND OBJECT_ERROR "Additional properties like '${PROPERTY_NAME}' not permitted in '${JSON_STRING}'")
|
||||
endif()
|
||||
endif()
|
||||
validate_property(${PROPERTY} ${PROPERTY_SCHEMA} PROPERTY_ERROR)
|
||||
if(DEFINED PROPERTY_ERROR)
|
||||
list(APPEND OBJECT_ERROR "${PROPERTY_ERROR}")
|
||||
endif()
|
||||
endforeach()
|
||||
list(LENGTH REQUIRED_LIST REQUIRED_REMAINING_LENGTH)
|
||||
if(${REQUIRED_REMAINING_LENGTH} GREATER 0)
|
||||
list(APPEND OBJECT_ERROR "Required properties not found: ${REQUIRED_LIST}")
|
||||
endif()
|
||||
set(${OBJECT_ERROR_STR} ${OBJECT_ERROR} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(validate_property PROPERTY PROPERTY_SCHEMA PROPERTY_ERROR_STR)
|
||||
unset(${PROPERTY_ERROR_STR} PARENT_SCOPE)
|
||||
set(PROPERTY_ERROR)
|
||||
string(JSON PROPERTY_REF ERROR_VARIABLE JSON_ERROR GET ${PROPERTY_SCHEMA} $ref)
|
||||
if(${JSON_ERROR} STREQUAL "NOTFOUND")
|
||||
string(REPLACE "/" ";" REF_COMPONENTS "${PROPERTY_REF}")
|
||||
string(JSON PROPERTY_SCHEMA GET ${DEFINITIONS} ${REF_COMPONENTS})
|
||||
endif()
|
||||
string(JSON PROPERTY_TYPE ERROR_VARIABLE JSON_ERROR GET ${PROPERTY_SCHEMA} type)
|
||||
if(${JSON_ERROR} STREQUAL "NOTFOUND")
|
||||
message(VERBOSE "Validating property type '${PROPERTY_TYPE}'")
|
||||
if(${PROPERTY_TYPE} STREQUAL "object")
|
||||
validate_object(${PROPERTY} ${PROPERTY_SCHEMA} OBJECT_ERROR)
|
||||
if(DEFINED OBJECT_ERROR)
|
||||
list(APPEND PROPERTY_ERROR ${OBJECT_ERROR})
|
||||
endif()
|
||||
elseif(${PROPERTY_TYPE} STREQUAL "array")
|
||||
string(JSON ARRAY_LENGTH LENGTH ${PROPERTY})
|
||||
string(JSON MAX_ITEMS ERROR_VARIABLE JSON_ERROR GET ${PROPERTY_SCHEMA} maxItems)
|
||||
if(${JSON_ERROR} STREQUAL "NOTFOUND" AND ${ARRAY_LENGTH} GREATER ${MAX_ITEMS})
|
||||
list(APPEND PROPERTY_ERROR "Number of items in '${PROPERTY}' exceeds maximum ${MAX_ITEMS}")
|
||||
endif()
|
||||
string(JSON MIN_ITEMS ERROR_VARIABLE JSON_ERROR GET ${PROPERTY_SCHEMA} minItems)
|
||||
if(${JSON_ERROR} STREQUAL "NOTFOUND" AND ${ARRAY_LENGTH} LESS ${MIN_ITEMS})
|
||||
list(APPEND PROPERTY_ERROR "Number of items in '${PROPERTY}' is less than ${MIN_ITEMS}")
|
||||
endif()
|
||||
string(JSON ITEM_SCHEMA ERROR_VARIABLE JSON_ERROR GET ${PROPERTY_SCHEMA} items)
|
||||
if(${JSON_ERROR} STREQUAL "NOTFOUND")
|
||||
math(EXPR MAX "${ARRAY_LENGTH} - 1")
|
||||
foreach(IDX RANGE ${MAX})
|
||||
string(JSON ITEM GET ${PROPERTY} ${IDX})
|
||||
validate_property(${ITEM} ${ITEM_SCHEMA} ITEM_ERROR)
|
||||
if(DEFINED ITEM_ERROR)
|
||||
list(APPEND PROPERTY_ERROR ${ITEM_ERROR})
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
elseif(${PROPERTY_TYPE} STREQUAL "null")
|
||||
if(NOT "${PROPERTY}" STREQUAL "null")
|
||||
list(APPEND PROPERTY_ERROR "Property '${PROPERTY}' is not null'")
|
||||
endif()
|
||||
elseif(${PROPERTY_TYPE} STREQUAL "boolean")
|
||||
if(NOT "${PROPERTY}" STREQUAL "OFF" AND NOT "${PROPERTY}" STREQUAL "ON")
|
||||
list(APPEND PROPERTY_ERROR "Property '${PROPERTY}' is not a boolean'")
|
||||
endif()
|
||||
elseif(${PROPERTY_TYPE} STREQUAL "number")
|
||||
if(NOT "${PROPERTY}" MATCHES "-?[0-9]+\\.?[0-9]*")
|
||||
list(APPEND PROPERTY_ERROR "Property '${PROPERTY}' is not a number'")
|
||||
endif()
|
||||
elseif(${PROPERTY_TYPE} STREQUAL "integer")
|
||||
if(NOT "${PROPERTY}" MATCHES "-?[0-9]+")
|
||||
list(APPEND PROPERTY_ERROR "Property '${PROPERTY}' is not an integer'")
|
||||
endif()
|
||||
string(JSON MIN ERROR_VARIABLE JSON_ERROR GET ${PROPERTY_SCHEMA} minimum)
|
||||
if(${JSON_ERROR} STREQUAL "NOTFOUND" AND ${PROPERTY} LESS ${MIN})
|
||||
list(APPEND PROPERTY_ERROR "Property '${PROPERTY}' is less than the minimum of ${MIN}")
|
||||
endif()
|
||||
string(JSON MAX ERROR_VARIABLE JSON_ERROR GET ${PROPERTY_SCHEMA} maximum)
|
||||
if(${JSON_ERROR} STREQUAL "NOTFOUND" AND ${PROPERTY} GREATER ${MAX})
|
||||
list(APPEND PROPERTY_ERROR "Property '${PROPERTY}' is greater than the maximum of ${MAX}")
|
||||
endif()
|
||||
elseif(${PROPERTY_TYPE} STREQUAL "string")
|
||||
# cmake regex doesn't support {}, so other options might be needed here
|
||||
string(JSON PATTERN ERROR_VARIABLE JSON_ERROR GET ${PROPERTY_SCHEMA} pattern)
|
||||
if(${JSON_ERROR} STREQUAL "NOTFOUND" AND NOT "${PROPERTY}" MATCHES "${PATTERN}")
|
||||
list(APPEND PROPERTY_ERROR "Property '${PROPERTY}' does not match '${PATTERN}'")
|
||||
endif()
|
||||
string(LENGTH ${PROPERTY} STRING_LENGTH)
|
||||
string(JSON MIN_LENGTH ERROR_VARIABLE JSON_ERROR GET ${PROPERTY_SCHEMA} minLength)
|
||||
if(${JSON_ERROR} STREQUAL "NOTFOUND" AND ${STRING_LENGTH} LESS ${MIN_LENGTH})
|
||||
list(APPEND PROPERTY_ERROR "Length of property '${PROPERTY}' is less than the minimum of ${MIN_LENGTH}")
|
||||
endif()
|
||||
string(JSON MAX_LENGTH ERROR_VARIABLE JSON_ERROR GET ${PROPERTY_SCHEMA} maxLength)
|
||||
if(${JSON_ERROR} STREQUAL "NOTFOUND" AND ${STRING_LENGTH} GREATER ${MAX_LENGTH})
|
||||
list(APPEND PROPERTY_ERROR "Length of property '${PROPERTY}' is greater than the maximum of ${MAX_LENGTH}")
|
||||
endif()
|
||||
string(JSON ENUM_LIST ERROR_VARIABLE JSON_ERROR GET ${PROPERTY_SCHEMA} enum)
|
||||
if(${JSON_ERROR} STREQUAL "NOTFOUND")
|
||||
set(FOUND_IN_ENUM_LIST FALSE)
|
||||
string(JSON ENUM_LENGTH LENGTH ${ENUM_LIST})
|
||||
math(EXPR MAX "${ENUM_LENGTH} - 1")
|
||||
foreach(IDX RANGE ${MAX})
|
||||
string(JSON ENUM GET ${PROPERTY_SCHEMA} enum ${IDX})
|
||||
if(${ENUM} STREQUAL ${PROPERTY})
|
||||
set(FOUND_IN_ENUM_LIST TRUE)
|
||||
endif()
|
||||
endforeach()
|
||||
if(NOT ${FOUND_IN_ENUM_LIST})
|
||||
list(APPEND PROPERTY_ERROR "Property '${PROPERTY}' is not defined in the schema's enum: ${ENUM_LIST}")
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
message(VERBOSE "Unknown type '${PROPERTY_TYPE}'")
|
||||
endif()
|
||||
else()
|
||||
string(JSON PROPERTY_ONEOF ERROR_VARIABLE JSON_ERROR GET ${PROPERTY_SCHEMA} oneOf)
|
||||
if(${JSON_ERROR} STREQUAL "NOTFOUND")
|
||||
set(TYPE_SUCCESS FALSE)
|
||||
string(JSON NUM_ONEOF LENGTH ${PROPERTY_ONEOF})
|
||||
math(EXPR MAX "${NUM_ONEOF} - 1")
|
||||
set(ONEOF_ERRORS)
|
||||
foreach(IDX RANGE ${MAX})
|
||||
string(JSON PROPERTY_SCHEMA GET ${PROPERTY_ONEOF} ${IDX})
|
||||
validate_property(${PROPERTY} ${PROPERTY_SCHEMA} ONEOF_ERROR)
|
||||
if(NOT DEFINED ONEOF_ERROR)
|
||||
set(TYPE_SUCCESS TRUE)
|
||||
else()
|
||||
list(APPEND ONEOF_ERRORS "${ONEOF_ERROR}\n")
|
||||
endif()
|
||||
endforeach()
|
||||
if(NOT TYPE_SUCCESS)
|
||||
list(APPEND PROPERTY_ERROR "Could not validate oneOf type '${PROPERTY}' :\n${ONEOF_ERRORS}")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
set(${PROPERTY_ERROR_STR} ${PROPERTY_ERROR} PARENT_SCOPE)
|
||||
endfunction()
|
||||
@@ -1,2 +0,0 @@
|
||||
target_sources(qmk PUBLIC ${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/ADCv3/hal_adc_lld.c)
|
||||
target_include_directories(qmk PUBLIC ${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/ADCv3)
|
||||
@@ -1,2 +0,0 @@
|
||||
target_sources(qmk PUBLIC ${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/CANv1/hal_can_lld.c)
|
||||
target_include_directories(qmk PUBLIC ${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/CANv1)
|
||||
@@ -1,2 +0,0 @@
|
||||
target_sources(qmk PUBLIC ${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/DACv1/hal_dac_lld.c)
|
||||
target_include_directories(qmk PUBLIC ${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/DACv1)
|
||||
@@ -1,2 +0,0 @@
|
||||
target_sources(qmk PUBLIC ${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/DMAv1/stm32_dma.c)
|
||||
target_include_directories(qmk PUBLIC ${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/DMAv1)
|
||||
@@ -1,2 +0,0 @@
|
||||
target_sources(qmk PUBLIC ${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/EXTIv1/stm32_exti.c)
|
||||
target_include_directories(qmk PUBLIC ${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/EXTIv1)
|
||||
@@ -1,2 +0,0 @@
|
||||
target_sources(qmk PUBLIC ${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/GPIOv2/hal_pal_lld.c)
|
||||
target_include_directories(qmk PUBLIC ${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/GPIOv2)
|
||||
@@ -1,7 +0,0 @@
|
||||
if(${USE_HAL_I2C_FALLBACK})
|
||||
target_sources(qmk PUBLIC ${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/I2C/hal_i2c_lld.c)
|
||||
target_include_directories(qmk PUBLIC ${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/I2C)
|
||||
else()
|
||||
target_sources(qmk PUBLIC ${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/I2Cv2/hal_i2c_lld.c)
|
||||
target_include_directories(qmk PUBLIC ${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/I2Cv2)
|
||||
endif()
|
||||
@@ -1,2 +0,0 @@
|
||||
target_sources(qmk PUBLIC ${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/RTCv2/hal_rtc_lld.c)
|
||||
target_include_directories(qmk PUBLIC ${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/RTCv2)
|
||||
@@ -1,5 +0,0 @@
|
||||
target_sources(qmk PUBLIC
|
||||
${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/SPIv2/hal_i2s_lld.c
|
||||
${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/SPIv2/hal_spi_v2_lld.c
|
||||
)
|
||||
target_include_directories(qmk PUBLIC ${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/SPIv2)
|
||||
@@ -1,2 +0,0 @@
|
||||
target_sources(qmk PUBLIC ${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/SYSTICKv1/hal_st_lld.c)
|
||||
target_include_directories(qmk PUBLIC ${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/SYSTICKv1)
|
||||
@@ -1,6 +0,0 @@
|
||||
target_sources(qmk PUBLIC
|
||||
${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/TIMv1/hal_gpt_lld.c
|
||||
${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/TIMv1/hal_icu_lld.c
|
||||
${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/TIMv1/hal_pwm_lld.c
|
||||
)
|
||||
target_include_directories(qmk PUBLIC ${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/TIMv1)
|
||||
@@ -1,9 +0,0 @@
|
||||
target_sources(qmk PUBLIC
|
||||
${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/USARTv2/hal_serial_lld.c
|
||||
${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/USARTv2/hal_sio_lld.c
|
||||
${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/USARTv2/hal_uart_lld.c
|
||||
)
|
||||
target_include_directories(qmk PUBLIC
|
||||
${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/USART
|
||||
${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/USARTv2
|
||||
)
|
||||
@@ -1,6 +0,0 @@
|
||||
target_sources(qmk PUBLIC
|
||||
${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/USBv1/hal_usb_lld.c
|
||||
)
|
||||
target_include_directories(qmk PUBLIC
|
||||
${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/USBv1
|
||||
)
|
||||
@@ -1,6 +0,0 @@
|
||||
target_sources(qmk PUBLIC
|
||||
${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/xWDGv1/hal_wdg_lld.c
|
||||
)
|
||||
target_include_directories(qmk PUBLIC
|
||||
${CHIBIOS}/os/hal/ports/${MCU_PORT_NAME}/LLD/xWDGv1
|
||||
)
|
||||
@@ -1,10 +0,0 @@
|
||||
# os/common/ports/ARMv7/compilers/GCC/mk/port.mk
|
||||
target_sources(qmk PUBLIC
|
||||
${CHIBIOS}/os/common/ports/ARMv7-M/chcore.c
|
||||
${CHIBIOS}/os/common/ports/ARMv7-M/compilers/GCC/chcoreasm.S
|
||||
)
|
||||
target_include_directories(qmk PUBLIC
|
||||
${CHIBIOS}/os/common/portability/GCC
|
||||
${CHIBIOS}/os/common/ports/ARM-common
|
||||
${CHIBIOS}/os/common/ports/ARMv7-M
|
||||
)
|
||||
@@ -1,25 +0,0 @@
|
||||
# os/hal/ports/STM32/STM32F3xx/platform.mk
|
||||
target_sources(qmk PUBLIC
|
||||
${CHIBIOS}/os/hal/ports/common/ARMCMx/nvic.c
|
||||
${CHIBIOS}/os/hal/ports/STM32/STM32F3xx/stm32_isr.c
|
||||
${CHIBIOS}/os/hal/ports/STM32/STM32F3xx/hal_lld.c
|
||||
${CHIBIOS}/os/hal/ports/STM32/STM32F3xx/hal_efl_lld.c
|
||||
)
|
||||
target_include_directories(qmk PUBLIC
|
||||
${CHIBIOS}/os/hal/ports/common/ARMCMx
|
||||
${CHIBIOS}/os/hal/ports/STM32/STM32F3xx
|
||||
)
|
||||
include(chibios/LLD/ADCv3)
|
||||
include(chibios/LLD/CANv1)
|
||||
include(chibios/LLD/DACv1)
|
||||
include(chibios/LLD/DMAv1)
|
||||
include(chibios/LLD/EXTIv1)
|
||||
include(chibios/LLD/GPIOv2)
|
||||
include(chibios/LLD/I2Cv2)
|
||||
include(chibios/LLD/RTCv2)
|
||||
include(chibios/LLD/SPIv2)
|
||||
include(chibios/LLD/SYSTICKv1)
|
||||
include(chibios/LLD/TIMv1)
|
||||
include(chibios/LLD/USARTv2)
|
||||
include(chibios/LLD/USBv1)
|
||||
include(chibios/LLD/xWDGv1)
|
||||
@@ -1,32 +0,0 @@
|
||||
option(BACKLIGHT_ENABLE "" TRUE)
|
||||
set(BACKLIGHT_DRIVER "pwm" CACHE STRING "Backlight driver")
|
||||
set_property(CACHE BACKLIGHT_DRIVER PROPERTY STRINGS pwm timer software custom)
|
||||
|
||||
string(JSON BACKLIGHT_PIN ERROR_VARIABLE NO_BACKLIGHT_PIN GET ${QMK_KEYBOARD_INFO_JSON_STRING} backlight pin)
|
||||
if(${BACKLIGHT_ENABLE} AND NOT ${BACKLIGHT_PIN} STREQUAL "backlight-NOTFOUND")
|
||||
target_sources(qmk PUBLIC
|
||||
quantum/backlight/backlight.c
|
||||
quantum/process_keycode/process_backlight.c
|
||||
)
|
||||
target_compile_definitions(qmk PUBLIC
|
||||
BACKLIGHT_ENABLE
|
||||
BACKLIGHT_PIN=${BACKLIGHT_PIN}
|
||||
)
|
||||
if(${BACKLIGHT_DRIVER} STREQUAL "custom")
|
||||
target_compile_definitions(qmk PUBLIC BACKLIGHT_CUSTOM_DRIVER)
|
||||
else()
|
||||
target_sources(qmk PUBLIC quantum/backlight/backlight_driver_common.c)
|
||||
if(${BACKLIGHT_DRIVER} STREQUAL "pwm")
|
||||
target_sources(qmk PUBLIC quantum/backlight/backlight_${QMK_PLATFORM}.c)
|
||||
else()
|
||||
target_sources(qmk PUBLIC quantum/backlight/backlight_${BACKLIGHT_DRIVER}.c)
|
||||
endif()
|
||||
endif()
|
||||
target_include_directories(qmk PUBLIC quantum/backlight)
|
||||
target_include_directories(qmk PUBLIC drivers/oled)
|
||||
# target_link_libraries(backlight qmk)
|
||||
# target_include_directories(backlight PUBLIC quantum/backlight)
|
||||
# target_include_directories(quantum PUBLIC quantum/backlight)
|
||||
# target_link_libraries(backlight ${QMK_TARGET})
|
||||
# target_link_libraries(backlight quantum)
|
||||
endif()
|
||||
@@ -1,70 +0,0 @@
|
||||
set(EEPROM_DRIVER "vendor" CACHE STRING "EEPROM driver")
|
||||
set_property(CACHE EEPROM_DRIVER PROPERTY STRINGS vendor custom transient i2c spi wear_leveling legacy_stm32_flash)
|
||||
set(WEAR_LEVELING_DRIVER "none" CACHE STRING "EEPROM wear-leveling driver")
|
||||
set_property(CACHE WEAR_LEVELING_DRIVER PROPERTY STRINGS custom embedded_flash spi_flash rp2040_flash legacy)
|
||||
|
||||
target_compile_definitions(qmk PUBLIC
|
||||
EEPROM_ENABLE
|
||||
)
|
||||
target_include_directories(qmk PUBLIC
|
||||
platforms/${QMK_PLATFORM}/drivers/eeprom
|
||||
drivers/eeprom
|
||||
platforms/common
|
||||
)
|
||||
|
||||
if(${EEPROM_DRIVER} STREQUAL "wear_leveling")
|
||||
target_compile_definitions(qmk PUBLIC
|
||||
EEPROM_DRIVER
|
||||
EEPROM_WEAR_LEVELING
|
||||
)
|
||||
target_sources(qmk PUBLIC
|
||||
drivers/eeprom/eeprom_driver.c
|
||||
drivers/eeprom/eeprom_wear_leveling.c
|
||||
)
|
||||
elseif(${EEPROM_DRIVER} STREQUAL "vendor")
|
||||
target_compile_definitions(qmk PUBLIC
|
||||
EEPROM_VENDOR
|
||||
)
|
||||
if(${QMK_PLATFORM} STREQUAL "chibios")
|
||||
if(${QMK_MCU} MATCHES "STM32F[1-9].*" OR ${QMK_MCU} MATCHES "WB32.*" OR ${QMK_MCU} MATCHES "GD32.*")
|
||||
target_compile_definitions(qmk PUBLIC
|
||||
EEPROM_DRIVER
|
||||
EEPROM_WEAR_LEVELING
|
||||
)
|
||||
target_sources(qmk PUBLIC
|
||||
drivers/eeprom/eeprom_driver.c
|
||||
drivers/eeprom/eeprom_wear_leveling.c
|
||||
)
|
||||
set(WEAR_LEVELING_DRIVER "embedded_flash")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT ${WEAR_LEVELING_DRIVER} STREQUAL "none")
|
||||
set(FNV_ENABLE TRUE)
|
||||
target_compile_definitions(qmk PUBLIC
|
||||
WEAR_LEVELING_ENABLE
|
||||
)
|
||||
target_include_directories(qmk PUBLIC
|
||||
platforms/${QMK_PLATFORM}/drivers/wear_leveling
|
||||
drivers/wear_leveling
|
||||
quantum/wear_leveling
|
||||
)
|
||||
target_sources(qmk PUBLIC quantum/wear_leveling/wear_leveling.c)
|
||||
|
||||
if(${WEAR_LEVELING_DRIVER} STREQUAL "embedded_flash")
|
||||
target_compile_definitions(qmk PUBLIC
|
||||
HAL_USE_EFL
|
||||
WEAR_LEVELING_EMBEDDED_FLASH
|
||||
)
|
||||
target_sources(qmk PUBLIC
|
||||
platforms/${QMK_PLATFORM}/drivers/wear_leveling/wear_leveling_efl.c
|
||||
)
|
||||
# target_compile_options(qmk PUBLIC
|
||||
# -include ${CMAKE_SOURCE_DIR}/platforms/${QMK_PLATFORM}/drivers/wear_leveling/wear_leveling_efl_config.h
|
||||
# )
|
||||
target_precompile_headers(qmk PUBLIC
|
||||
${CMAKE_SOURCE_DIR}/platforms/${QMK_PLATFORM}/drivers/wear_leveling/wear_leveling_efl_config.h
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
@@ -1,9 +0,0 @@
|
||||
if(${FNV_ENABLE})
|
||||
target_compile_definitions(qmk PUBLIC FNV_ENABLE)
|
||||
target_include_directories(qmk PUBLIC lib/fnv)
|
||||
target_sources(qmk PUBLIC
|
||||
lib/fnv/qmk_fnv_type_validation.c
|
||||
lib/fnv/hash_32a.c
|
||||
lib/fnv/hash_64a.c
|
||||
)
|
||||
endif()
|
||||
@@ -1,9 +0,0 @@
|
||||
message(STATUS "Custom Matrix: ${CUSTOM_MATRIX}")
|
||||
set(CUSTOM_MATRIX "no" CACHE STRING "Custom matrix-scanning")
|
||||
set_property(CACHE CUSTOM_MATRIX PROPERTY STRINGS yes lite no)
|
||||
if(NOT ${CUSTOM_MATRIX} STREQUAL yes)
|
||||
target_sources(qmk PUBLIC quantum/matrix_common.c)
|
||||
if(NOT ${CUSTOM_MATRIX} STREQUAL lite)
|
||||
target_sources(qmk PUBLIC quantum/matrix.c)
|
||||
endif()
|
||||
endif()
|
||||
@@ -1,10 +0,0 @@
|
||||
option(OLED_ENABLE "" OFF)
|
||||
if(${OLED_ENABLE})
|
||||
target_sources(qmk PUBLIC
|
||||
drivers/oled/ssd1306_sh1106.c
|
||||
platforms/${QMK_PLATFORM}/drivers/i2c_master.c)
|
||||
target_compile_definitions(qmk PUBLIC OLED_ENABLE)
|
||||
target_include_directories(qmk PUBLIC drivers)
|
||||
target_include_directories(qmk PUBLIC drivers/oled)
|
||||
target_include_directories(qmk PUBLIC platforms/${QMK_PLATFORM}/drivers)
|
||||
endif()
|
||||
@@ -1,144 +0,0 @@
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS on)
|
||||
|
||||
include(ResolveToolchain)
|
||||
|
||||
set(QMK_TOOLCHAIN "arm-none-eabi")
|
||||
set(QMK_PLATFORM "chibios")
|
||||
set(QMK_PROTOCOL "chibios")
|
||||
set(QMK_EXTENSION ".bin")
|
||||
|
||||
if(UNIX)
|
||||
set(OS_SUFFIX "")
|
||||
elseif(WIN32)
|
||||
set(OS_SUFFIX ".exe")
|
||||
endif()
|
||||
|
||||
find_toolchain(arm-none-eabi TOOLCHAIN_ROOT)
|
||||
|
||||
set(CMAKE_SYSTEM_NAME Generic)
|
||||
set(CMAKE_SYSTEM_PROCESSOR arm)
|
||||
set(CMAKE_CROSS_COMPILING 1)
|
||||
|
||||
set(CMAKE_C_COMPILER "${TOOLCHAIN_ROOT}/${QMK_TOOLCHAIN}-gcc${OS_SUFFIX}" CACHE PATH "gcc" FORCE)
|
||||
set(CMAKE_CXX_COMPILER "${TOOLCHAIN_ROOT}/${QMK_TOOLCHAIN}-g++${OS_SUFFIX}" CACHE PATH "g++" FORCE)
|
||||
set(CMAKE_AR "${TOOLCHAIN_ROOT}/${QMK_TOOLCHAIN}-ar${OS_SUFFIX}" CACHE PATH "ar" FORCE)
|
||||
set(CMAKE_AS "${TOOLCHAIN_ROOT}/${QMK_TOOLCHAIN}-as${OS_SUFFIX}" CACHE PATH "as" FORCE)
|
||||
set(CMAKE_LINKER "${TOOLCHAIN_ROOT}/${QMK_TOOLCHAIN}-ld${OS_SUFFIX}" CACHE PATH "linker" FORCE)
|
||||
set(CMAKE_NM "${TOOLCHAIN_ROOT}/${QMK_TOOLCHAIN}-nm${OS_SUFFIX}" CACHE PATH "nm" FORCE)
|
||||
set(CMAKE_OBJCOPY "${TOOLCHAIN_ROOT}/${QMK_TOOLCHAIN}-objcopy${OS_SUFFIX}" CACHE PATH "objcopy" FORCE)
|
||||
set(CMAKE_OBJDUMP "${TOOLCHAIN_ROOT}/${QMK_TOOLCHAIN}-objdump${OS_SUFFIX}" CACHE PATH "objdump" FORCE)
|
||||
set(CMAKE_STRIP "${TOOLCHAIN_ROOT}/${QMK_TOOLCHAIN}-strip${OS_SUFFIX}" CACHE PATH "strip" FORCE)
|
||||
set(CMAKE_RANLIB "${TOOLCHAIN_ROOT}/${QMK_TOOLCHAIN}-ranlib${OS_SUFFIX}" CACHE PATH "ranlib" FORCE)
|
||||
set(CMAKE_SIZE "${TOOLCHAIN_ROOT}/${QMK_TOOLCHAIN}-size${OS_SUFFIX}" CACHE PATH "size" FORCE)
|
||||
|
||||
find_program(CMAKE_MAKE_PROGRAM NAME make
|
||||
PATHS
|
||||
"${CMAKE_SOURCE_DIR}/toolchains/avr-gcc-12.1.0-x64-windows/bin/"
|
||||
"${CMAKE_SOURCE_DIR}/toolchains/avr-gcc-12.1.0-x64-linux/bin/"
|
||||
/usr/bin/
|
||||
/usr/local/bin
|
||||
/bin/
|
||||
)
|
||||
|
||||
add_compile_options(
|
||||
$<$<COMPILE_LANGUAGE:C>:-std=gnu11>
|
||||
$<$<COMPILE_LANGUAGE:CXX>:-std=gnu++14>
|
||||
$<$<COMPILE_LANGUAGE:CXX>:-fno-rtti>
|
||||
# -flto
|
||||
-Os
|
||||
-Wall
|
||||
-Wstrict-prototypes
|
||||
# -fcommon
|
||||
# -g
|
||||
|
||||
-fomit-frame-pointer
|
||||
-ffunction-sections
|
||||
-fdata-sections
|
||||
-fno-common
|
||||
-fshort-wchar
|
||||
-fno-builtin-printf
|
||||
# -funsigned-char
|
||||
# -funsigned-bitfields
|
||||
# -ffunction-sections
|
||||
# -fdata-sections
|
||||
# -fpack-struct
|
||||
# -fshort-enums
|
||||
# -fno-builtin-printf
|
||||
# $<$<COMPILE_LANGUAGE:C>:-fno-inline-small-functions>
|
||||
# $<$<COMPILE_LANGUAGE:C>:-fno-strict-aliasing>
|
||||
# $<$<COMPILE_LANGUAGE:CXX>:-fno-exceptions>
|
||||
)
|
||||
|
||||
add_link_options(
|
||||
-Wl,--gc-sections
|
||||
-nostartfiles
|
||||
-Wl,--no-wchar-size-warning
|
||||
--specs=nano.specs
|
||||
-lm
|
||||
)
|
||||
|
||||
macro(add_qmk_executable target_name)
|
||||
|
||||
set(elf_file ${target_name}.elf)
|
||||
set(map_file ${target_name}.map)
|
||||
set(bin_file ${target_name}.bin)
|
||||
set(lst_file ${target_name}.lst)
|
||||
|
||||
add_link_options(
|
||||
-Wl,-Map=${map_file},--cref
|
||||
)
|
||||
|
||||
# create elf file
|
||||
add_executable(qmk ${ARGN})
|
||||
# add_executable(${elf_file} ${ARGN})
|
||||
# target_link_libraries(${elf_file} qmk)
|
||||
|
||||
set_target_properties(qmk
|
||||
PROPERTIES
|
||||
OUTPUT_NAME ${elf_file}
|
||||
)
|
||||
|
||||
# generate the lst file
|
||||
add_custom_command(
|
||||
OUTPUT ${lst_file}
|
||||
COMMAND ${CMAKE_OBJDUMP} -h -S ${elf_file} > ${lst_file}
|
||||
DEPENDS qmk
|
||||
)
|
||||
|
||||
# add_custom_command(
|
||||
# OUTPUT "print-size-${elf_file}"
|
||||
|
||||
# COMMAND
|
||||
# ${CMAKE_SIZE} ${elf_file}
|
||||
|
||||
# DEPENDS ${elf_file}
|
||||
# )
|
||||
|
||||
# add_custom_command(
|
||||
# OUTPUT "print-size-${bin_file}"
|
||||
|
||||
# COMMAND
|
||||
# ${CMAKE_SIZE} ${bin_file} sizeafter
|
||||
|
||||
# DEPENDS ${bin_file}
|
||||
# )
|
||||
|
||||
add_custom_command(
|
||||
TARGET qmk
|
||||
POST_BUILD
|
||||
COMMAND ${CMAKE_OBJCOPY} -O binary ${elf_file} ${CMAKE_SOURCE_DIR}/build/${bin_file}
|
||||
# COMMAND ${CMAKE_COMMAND} -E copy ${elf_file} ${CMAKE_SOURCE_DIR}/build/${elf_file}
|
||||
# COMMAND ${CMAKE_COMMAND} -E copy ${lst_file} ${CMAKE_SOURCE_DIR}/build/${lst_file}
|
||||
# COMMAND ${CMAKE_COMMAND} -E copy ${map_file} ${CMAKE_SOURCE_DIR}/build/${map_file}
|
||||
)
|
||||
|
||||
# build the intel hex file for the device
|
||||
add_custom_target(${target_name} ALL
|
||||
DEPENDS ${elf_file} ${lst_file}
|
||||
)
|
||||
|
||||
set_target_properties(${target_name}
|
||||
PROPERTIES
|
||||
OUTPUT_NAME ${bin_file}
|
||||
)
|
||||
endmacro(add_qmk_executable)
|
||||
@@ -1,182 +0,0 @@
|
||||
#
|
||||
# AVR GCC Toolchain file
|
||||
#
|
||||
# @author Natesh Narain
|
||||
# @since Feb 06 2016
|
||||
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS on)
|
||||
|
||||
include(ResolveToolchain)
|
||||
|
||||
set(QMK_TOOLCHAIN "avr")
|
||||
set(QMK_PLATFORM "avr")
|
||||
set(QMK_PROTOCOL "lufa")
|
||||
set(QMK_EXTENSION ".hex")
|
||||
|
||||
if(UNIX)
|
||||
set(OS_SUFFIX "")
|
||||
elseif(WIN32)
|
||||
set(OS_SUFFIX ".exe")
|
||||
endif()
|
||||
|
||||
find_toolchain(avr TOOLCHAIN_ROOT)
|
||||
|
||||
# setup the AVR compiler variables
|
||||
|
||||
set(CMAKE_SYSTEM_NAME Generic)
|
||||
set(CMAKE_SYSTEM_PROCESSOR avr)
|
||||
set(CMAKE_CROSS_COMPILING 1)
|
||||
|
||||
set(CMAKE_C_COMPILER "${TOOLCHAIN_ROOT}/${QMK_TOOLCHAIN}-gcc${OS_SUFFIX}" CACHE PATH "gcc" FORCE)
|
||||
set(CMAKE_CXX_COMPILER "${TOOLCHAIN_ROOT}/${QMK_TOOLCHAIN}-g++${OS_SUFFIX}" CACHE PATH "g++" FORCE)
|
||||
set(CMAKE_AR "${TOOLCHAIN_ROOT}/${QMK_TOOLCHAIN}-ar${OS_SUFFIX}" CACHE PATH "ar" FORCE)
|
||||
set(CMAKE_AS "${TOOLCHAIN_ROOT}/${QMK_TOOLCHAIN}-as${OS_SUFFIX}" CACHE PATH "as" FORCE)
|
||||
set(CMAKE_LINKER "${TOOLCHAIN_ROOT}/${QMK_TOOLCHAIN}-ld${OS_SUFFIX}" CACHE PATH "linker" FORCE)
|
||||
set(CMAKE_NM "${TOOLCHAIN_ROOT}/${QMK_TOOLCHAIN}-nm${OS_SUFFIX}" CACHE PATH "nm" FORCE)
|
||||
set(CMAKE_OBJCOPY "${TOOLCHAIN_ROOT}/${QMK_TOOLCHAIN}-objcopy${OS_SUFFIX}" CACHE PATH "objcopy" FORCE)
|
||||
set(CMAKE_OBJDUMP "${TOOLCHAIN_ROOT}/${QMK_TOOLCHAIN}-objdump${OS_SUFFIX}" CACHE PATH "objdump" FORCE)
|
||||
set(CMAKE_STRIP "${TOOLCHAIN_ROOT}/${QMK_TOOLCHAIN}-strip${OS_SUFFIX}" CACHE PATH "strip" FORCE)
|
||||
set(CMAKE_RANLIB "${TOOLCHAIN_ROOT}/${QMK_TOOLCHAIN}-ranlib${OS_SUFFIX}" CACHE PATH "ranlib" FORCE)
|
||||
set(AVR_SIZE "${TOOLCHAIN_ROOT}/${QMK_TOOLCHAIN}-size${OS_SUFFIX}" CACHE PATH "size" FORCE)
|
||||
|
||||
# set(CMAKE_EXE_LINKER_FLAGS "-L /usr/lib/gcc/avr/4.8.2")
|
||||
|
||||
# avr uploader config
|
||||
find_program(AVR_UPLOAD
|
||||
NAME
|
||||
avrdude
|
||||
PATHS
|
||||
/usr/bin/
|
||||
$ENV{AVR_ROOT}
|
||||
)
|
||||
|
||||
find_program(CMAKE_MAKE_PROGRAM NAME make
|
||||
PATHS
|
||||
"${CMAKE_SOURCE_DIR}/toolchains/avr-gcc-12.1.0-x64-windows/bin/"
|
||||
"${CMAKE_SOURCE_DIR}/toolchains/avr-gcc-12.1.0-x64-linux/bin/"
|
||||
/usr/bin/
|
||||
/usr/local/bin
|
||||
/bin/
|
||||
)
|
||||
|
||||
# setup the avr exectable macro
|
||||
|
||||
# set(AVR_LINKER_LIBS "-lc -lm -lgcc -Wl,-lprintf_flt -Wl,-u,vfprintf")
|
||||
|
||||
add_compile_options(
|
||||
$<$<COMPILE_LANGUAGE:C>:-std=gnu11>
|
||||
$<$<COMPILE_LANGUAGE:CXX>:-std=gnu++14>
|
||||
-flto
|
||||
# -mrelax
|
||||
-Os
|
||||
-Wall
|
||||
-Wstrict-prototypes
|
||||
-fcommon
|
||||
# -g
|
||||
$<$<BOOL:${WIN32}>:--param=min-pagesize=0>
|
||||
-funsigned-char
|
||||
-funsigned-bitfields
|
||||
-ffunction-sections
|
||||
-fdata-sections
|
||||
-fpack-struct
|
||||
-fshort-enums
|
||||
-mcall-prologues
|
||||
-fno-builtin-printf
|
||||
$<$<COMPILE_LANGUAGE:C>:-fno-inline-small-functions>
|
||||
$<$<COMPILE_LANGUAGE:C>:-fno-strict-aliasing>
|
||||
$<$<COMPILE_LANGUAGE:CXX>:-fno-exceptions>
|
||||
)
|
||||
|
||||
add_compile_definitions(
|
||||
F_CPU=16000000
|
||||
F_USB=16000000UL
|
||||
__AVR_ATmega32U4__
|
||||
LTO_ENABLE
|
||||
)
|
||||
|
||||
add_link_options(
|
||||
-Wl,--gc-sections
|
||||
)
|
||||
|
||||
macro(add_qmk_executable target_name)
|
||||
|
||||
set(elf_file ${target_name}.elf)
|
||||
set(map_file ${target_name}.map)
|
||||
set(hex_file ${target_name}.hex)
|
||||
set(lst_file ${target_name}.lst)
|
||||
|
||||
add_compile_options(
|
||||
-mmcu=${QMK_MCU}
|
||||
)
|
||||
|
||||
add_link_options(
|
||||
-mmcu=${QMK_MCU}
|
||||
-Wl,-Map=${map_file}
|
||||
)
|
||||
|
||||
# create elf file
|
||||
# add_executable(${elf_file} ${ARGN})
|
||||
# target_link_libraries(${elf_file} qmk)
|
||||
|
||||
add_executable(qmk ${ARGN})
|
||||
set_target_properties(qmk
|
||||
PROPERTIES
|
||||
OUTPUT_NAME ${elf_file}
|
||||
)
|
||||
|
||||
|
||||
# set_target_properties(${elf_file}
|
||||
# PROPERTIES
|
||||
# COMPILE_FLAGS "-mmcu=${QMK_MCU} ${COMPILE_OPTIONS}"
|
||||
# LINK_FLAGS "-mmcu=${QMK_MCU} ${LINK_OPTIONS}"
|
||||
# )
|
||||
|
||||
# add_custom_target(compileOptions
|
||||
# COMMAND cmake -P ${CMAKE_SOURCE_DIR}/cmake/WriteCompileOptions.cmake
|
||||
# COMMENT "Writing compile_flags.txt"
|
||||
# )
|
||||
|
||||
# generate the lst file
|
||||
add_custom_command(
|
||||
OUTPUT ${lst_file}
|
||||
COMMAND ${CMAKE_OBJDUMP} -h -S ${elf_file} > ${lst_file}
|
||||
DEPENDS ${elf_file}
|
||||
)
|
||||
|
||||
# create hex file
|
||||
add_custom_command(
|
||||
OUTPUT ${hex_file}
|
||||
# COMMAND ${CMAKE_OBJCOPY} -j .text -j .data -O ihex ${elf_file} ${hex_file}
|
||||
COMMAND ${CMAKE_OBJCOPY} -O ihex -R .eeprom -R .fuse -R .lock -R .signature ${elf_file} ${hex_file}
|
||||
DEPENDS ${elf_file}
|
||||
)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT "print-size-${elf_file}"
|
||||
COMMAND ${AVR_SIZE} ${elf_file}
|
||||
DEPENDS ${elf_file}
|
||||
)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT "print-size-${hex_file}"
|
||||
COMMAND ${AVR_SIZE} ${hex_file}
|
||||
DEPENDS ${hex_file}
|
||||
)
|
||||
|
||||
add_custom_target(copy_hex
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${hex_file} ${CMAKE_SOURCE_DIR}/build/${hex_file}
|
||||
DEPENDS ${hex_file}
|
||||
)
|
||||
|
||||
# build the intel hex file for the device
|
||||
add_custom_target(${target_name} ALL
|
||||
DEPENDS ${hex_file} ${lst_file} "print-size-${elf_file}" "print-size-${hex_file}" copy_hex
|
||||
)
|
||||
|
||||
set_target_properties(${target_name}
|
||||
PROPERTIES
|
||||
OUTPUT_NAME ${hex_file}
|
||||
)
|
||||
|
||||
|
||||
endmacro(add_qmk_executable)
|
||||
@@ -1,16 +0,0 @@
|
||||
if(${USE_PICOLIBC})
|
||||
add_compile_options(
|
||||
--specs=picolibc.specs
|
||||
)
|
||||
add_compile_definitions(USE_PICOLIBC)
|
||||
add_link_options(
|
||||
-Wl,--defsym=__heap_start=__heap_base__,--defsym=__heap_end=__heap_end__
|
||||
)
|
||||
endif()
|
||||
|
||||
add_compile_options(
|
||||
-march=${MCU_ARCH}
|
||||
-mabi=${MCU_ABI}
|
||||
-mcmodel=${MCU_CMODEL}
|
||||
-mstrict-align
|
||||
)
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"olkb/planck/rev3": "@jackhumbert/test_keyboard",
|
||||
"olkb/planck/rev6": "planck/rev6"
|
||||
}
|
||||
@@ -129,7 +129,7 @@
|
||||
"TAPPING_FORCE_HOLD": {"info_key": "tapping.force_hold", "value_type": "bool", "deprecated": true},
|
||||
"TAPPING_FORCE_HOLD_PER_KEY": {"info_key": "tapping.force_hold_per_key", "value_type": "bool", "deprecated": true},
|
||||
"IGNORE_MOD_TAP_INTERRUPT": {"info_key": "_deprecated.ignore_mod_tap_interrupt", "value_type": "bool", "deprecated": true},
|
||||
"IGNORE_MOD_TAP_INTERRUPT_PER_KEY": {"info_key": "_invalid.ignore_mod_tap_interrupt_per_key", "invalid": true},
|
||||
"IGNORE_MOD_TAP_INTERRUPT_PER_KEY": {"info_key": "_invalid.ignore_mod_tap_interrupt_per_key", "invalid": true}
|
||||
|
||||
// USB params, need to mark as failure when specified in config.h, rather than deprecated
|
||||
"PRODUCT_ID": {"info_key": "usb.pid", "value_type": "hex", "deprecated": true, "replace_with": "`usb.pid` in info.json"},
|
||||
|
||||
@@ -14,15 +14,15 @@
|
||||
},
|
||||
"hex_number_2d": {
|
||||
"type": "string",
|
||||
"pattern": "^0x[0-9A-F][0-9A-F]$"
|
||||
"pattern": "^0x[0-9A-F]{2}$"
|
||||
},
|
||||
"hex_number_4d": {
|
||||
"type": "string",
|
||||
"pattern": "^0x[0-9A-F][0-9A-F][0-9A-F][0-9A-F]$"
|
||||
"pattern": "^0x[0-9A-F]{4}$"
|
||||
},
|
||||
"bcd_version": {
|
||||
"type": "string",
|
||||
"pattern": "^[0-9][0-9]?\\.[0-9]\\.[0-9]$"
|
||||
"pattern": "^[0-9]{1,2}\\.[0-9]\\.[0-9]$"
|
||||
},
|
||||
"text_identifier": {
|
||||
"type": "string",
|
||||
@@ -83,15 +83,15 @@
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"pattern": "^[A-K]\\d\\d?$"
|
||||
"pattern": "^[A-K]\\d{1,2}$"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"pattern": "^LINE_PIN\\d\\d?$"
|
||||
"pattern": "^LINE_PIN\\d{1,2}$"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"pattern": "^GP\\d\\d?$"
|
||||
"pattern": "^GP\\d{1,2}$"
|
||||
},
|
||||
{
|
||||
"type": "integer"
|
||||
|
||||
@@ -37,9 +37,9 @@ For more information on bitwise operators in C, click [here](https://en.wikipedi
|
||||
|
||||
In practice, this means that you can check whether a given modifier is active with `get_mods() & MOD_BIT(KC_<modifier>)` (see the [list of modifier keycodes](keycodes_basic.md#modifiers)) or with `get_mods() & MOD_MASK_<modifier>` if the difference between left and right hand modifiers is not important and you want to match both. Same thing can be done for one-shot modifiers if you replace `get_mods()` with `get_oneshot_mods()`.
|
||||
|
||||
To check that *only* a specific set of mods is active at a time, AND the modifier state and your desired mod mask as explained above and compare the result to the mod mask itself: `get_mods() & <mod mask> == <mod mask>`.
|
||||
To check that *only* a specific set of mods is active at a time, use a simple equality operator: `get_mods() == <mod mask>`.
|
||||
|
||||
For example, let's say you want to trigger a piece of custom code if one-shot left control and one-shot left shift are on but every other one-shot mods are off. To do so, you can compose the desired mod mask by combining the mod bits for left control and shift with `(MOD_BIT(KC_LCTL) | MOD_BIT(KC_LSFT))` and then plug it in: `get_oneshot_mods() & (MOD_BIT(KC_LCTL) | MOD_BIT(KC_LSFT)) == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_LSFT))`. Using `MOD_MASK_CS` instead for the mod bitmask would have forced you to press four modifier keys (both versions of control and shift) to fulfill the condition.
|
||||
For example, let's say you want to trigger a piece of custom code if one-shot left control and one-shot left shift are on but every other one-shot mods are off. To do so, you can compose the desired mod mask by combining the mod bits for left control and shift with `(MOD_BIT(KC_LCTL) | MOD_BIT(KC_LSFT))` and then plug it in: `get_oneshot_mods() == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_LSFT))`. Using `MOD_MASK_CS` instead for the mod bitmask would have forced you to press four modifier keys (both versions of control and shift) to fulfill the condition.
|
||||
|
||||
The full list of mod masks is as follows:
|
||||
|
||||
@@ -91,7 +91,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
|
||||
case KC_ESC:
|
||||
// Detect the activation of only Left Alt
|
||||
if ((get_mods() & MOD_BIT(KC_LALT)) == MOD_BIT(KC_LALT)) {
|
||||
if (get_mods() == MOD_BIT(KC_LALT)) {
|
||||
if (record->event.pressed) {
|
||||
// No need to register KC_LALT because it's already active.
|
||||
// The Alt modifier will apply on this KC_TAB.
|
||||
@@ -184,4 +184,4 @@ This page used to encompass a large set of features. We have moved many sections
|
||||
|
||||
## Key Overrides :id=key-overrides
|
||||
|
||||
* [Key Overrides](feature_key_overrides.md)
|
||||
* [Key Overrides](feature_key_overrides.md)
|
||||
|
||||
@@ -58,7 +58,7 @@ const uint16_t PROGMEM jk_combo[] = {KC_J, KC_K, COMBO_END};
|
||||
const uint16_t PROGMEM qw_combo[] = {KC_Q, KC_W, COMBO_END};
|
||||
const uint16_t PROGMEM sd_combo[] = {KC_S, KC_D, COMBO_END};
|
||||
|
||||
combo_t key_combos[COMBO_COUNT] = {
|
||||
combo_t key_combos[] = {
|
||||
[AB_ESC] = COMBO(ab_combo, KC_ESC),
|
||||
[JK_TAB] = COMBO(jk_combo, KC_TAB),
|
||||
[QW_SFT] = COMBO(qw_combo, KC_LSFT),
|
||||
|
||||
@@ -17,7 +17,6 @@ Currently the following converters are available:
|
||||
| `promicro` | `bit_c_pro` |
|
||||
| `promicro` | `stemcell` |
|
||||
| `promicro` | `bonsai_c4` |
|
||||
| `promicro` | `elite_pi` |
|
||||
| `promicro` | `rp2040_ce` |
|
||||
| `promicro` | `elite_pi` |
|
||||
| `promicro` | `helios` |
|
||||
|
||||
@@ -57,78 +57,78 @@ susceptible to noise, you must choose a debounce method that will also mitigate
|
||||
if the scanning is slow, and you are using a timestamp-based algorithm, you might end up making a debouncing decision based on only two
|
||||
sampled values, which will limit the noise-resistance of the algorithm.
|
||||
* Currently all built-in debounce algorithms support timestamp-based debouncing only. In the future we might
|
||||
implement cycles-based debouncing, and it will be selectable via a ```config.h``` macro.
|
||||
implement cycles-based debouncing, and it will be selectable via a `config.h` macro.
|
||||
|
||||
2) Symmetric vs Asymmetric
|
||||
* Symmetric - apply the same debouncing algorithm, to both key-up and key-down events.
|
||||
* Recommended naming convention: ```sym_*```
|
||||
* Recommended naming convention: `sym_*`
|
||||
* Asymmetric - apply different debouncing algorithms to key-down and key-up events. E.g. Eager key-down, Defer key-up.
|
||||
* Recommended naming convention: ```asym_*``` followed by details of the type of algorithm in use, in order, for key-down and then key-up
|
||||
* Recommended naming convention: `asym_*` followed by details of the type of algorithm in use, in order, for key-down and then key-up
|
||||
|
||||
3) Eager vs Defer
|
||||
* Eager - any key change is reported immediately. All further inputs for DEBOUNCE ms are ignored.
|
||||
* Eager algorithms are not noise-resistant.
|
||||
* Recommended naming conventions:
|
||||
* ```sym_eager_*```
|
||||
* ```asym_eager_*_*```: key-down is using eager algorithm
|
||||
* ```asym_*_eager_*```: key-up is using eager algorithm
|
||||
* `sym_eager_*`
|
||||
* `asym_eager_*_*`: key-down is using eager algorithm
|
||||
* `asym_*_eager_*`: key-up is using eager algorithm
|
||||
* Defer - wait for no changes for DEBOUNCE ms before reporting change.
|
||||
* Defer algorithms are noise-resistant
|
||||
* Recommended naming conventions:
|
||||
* ```sym_defer_*```
|
||||
* ```asym_defer_*_*```: key-down is using defer algorithm
|
||||
* ```asym_*_defer_*```: key-up is using defer algorithm
|
||||
* `sym_defer_*`
|
||||
* `asym_defer_*_*`: key-down is using defer algorithm
|
||||
* `asym_*_defer_*`: key-up is using defer algorithm
|
||||
|
||||
4) Global vs Per-Key vs Per-Row
|
||||
* Global - one timer for all keys. Any key change state affects global timer
|
||||
* Recommended naming convention: ```*_g```
|
||||
* Recommended naming convention: `*_g`
|
||||
* Per-key - one timer per key
|
||||
* Recommended naming convention: ```*_pk```
|
||||
* Recommended naming convention: `*_pk`
|
||||
* Per-row - one timer per row
|
||||
* Recommended naming convention: ```*_pr```
|
||||
* Recommended naming convention: `*_pr`
|
||||
* Per-key and per-row algorithms consume more resources (in terms of performance,
|
||||
and ram usage), but fast typists might prefer them over global.
|
||||
|
||||
## Debounce algorithms supported by QMK
|
||||
## Supported Debounce Algorithms
|
||||
|
||||
QMK supports multiple debounce algorithms through its debounce API.
|
||||
QMK supports multiple algorithms through its debounce API.
|
||||
|
||||
### Debounce selection
|
||||
### Debounce Time
|
||||
|
||||
| DEBOUNCE_TYPE | Description | What else is needed |
|
||||
| ------------- | --------------------------------------------------- | ----------------------------- |
|
||||
| Not defined | Use the default algorithm, currently sym_defer_g | Nothing |
|
||||
| custom | Use your own debounce code | ```SRC += debounce.c``` add your own debounce.c and implement necessary functions |
|
||||
| Anything Else | Use another algorithm from quantum/debounce/* | Nothing |
|
||||
Default debounce time is 5 milliseconds and it can be changed with the following line in `config.h`:
|
||||
```
|
||||
#define DEBOUNCE 10
|
||||
```
|
||||
?> Setting `DEBOUNCE` to `0` will disable this feature.
|
||||
|
||||
**Regarding split keyboards**:
|
||||
The debounce code is compatible with split keyboards.
|
||||
### Debounce Method
|
||||
|
||||
### Selecting an included debouncing method
|
||||
Keyboards may select one of the already implemented debounce methods, by adding to ```rules.mk``` the following line:
|
||||
Keyboards may select one of the core debounce methods by adding the following line into `rules.mk`:
|
||||
```
|
||||
DEBOUNCE_TYPE = <name of algorithm>
|
||||
```
|
||||
Where name of algorithm is one of:
|
||||
* ```sym_defer_g``` - debouncing per keyboard. On any state change, a global timer is set. When ```DEBOUNCE``` milliseconds of no changes has occurred, all input changes are pushed.
|
||||
* This is the current default algorithm. This is the highest performance algorithm with lowest memory usage, and it's also noise-resistant.
|
||||
* ```sym_eager_pr``` - debouncing per row. On any state change, response is immediate, followed by locking the row ```DEBOUNCE``` milliseconds of no further input for that row.
|
||||
For use in keyboards where refreshing ```NUM_KEYS``` 8-bit counters is computationally expensive / low scan rate, and fingers usually only hit one row at a time. This could be
|
||||
appropriate for the ErgoDox models; the matrix is rotated 90°, and hence its "rows" are really columns, and each finger only hits a single "row" at a time in normal use.
|
||||
* ```sym_eager_pk``` - debouncing per key. On any state change, response is immediate, followed by ```DEBOUNCE``` milliseconds of no further input for that key
|
||||
* ```sym_defer_pr``` - debouncing per row. On any state change, a per-row timer is set. When ```DEBOUNCE``` milliseconds of no changes have occurred on that row, the entire row is pushed. Can improve responsiveness over `sym_defer_g` while being less susceptible than per-key debouncers to noise.
|
||||
* ```sym_defer_pk``` - debouncing per key. On any state change, a per-key timer is set. When ```DEBOUNCE``` milliseconds of no changes have occurred on that key, the key status change is pushed.
|
||||
* ```asym_eager_defer_pk``` - debouncing per key. On a key-down state change, response is immediate, followed by ```DEBOUNCE``` milliseconds of no further input for that key. On a key-up state change, a per-key timer is set. When ```DEBOUNCE``` milliseconds of no changes have occurred on that key, the key-up status change is pushed.
|
||||
Name of algorithm is one of:
|
||||
|
||||
### A couple algorithms that could be implemented in the future:
|
||||
* ```sym_defer_pr```
|
||||
* ```sym_eager_g```
|
||||
| Algorithm | Description |
|
||||
| --------------------- | ----------- |
|
||||
| `sym_defer_g` | Debouncing per keyboard. On any state change, a global timer is set. When `DEBOUNCE` milliseconds of no changes has occurred, all input changes are pushed. This is the highest performance algorithm with lowest memory usage and is noise-resistant. |
|
||||
| `sym_defer_pr` | Debouncing per row. On any state change, a per-row timer is set. When `DEBOUNCE` milliseconds of no changes have occurred on that row, the entire row is pushed. This can improve responsiveness over `sym_defer_g` while being less susceptible to noise than per-key algorithm. |
|
||||
| `sym_defer_pk` | Debouncing per key. On any state change, a per-key timer is set. When `DEBOUNCE` milliseconds of no changes have occurred on that key, the key status change is pushed. |
|
||||
| `sym_eager_pr` | Debouncing per row. On any state change, response is immediate, followed by `DEBOUNCE` milliseconds of no further input for that row. |
|
||||
| `sym_eager_pk` | Debouncing per key. On any state change, response is immediate, followed by `DEBOUNCE` milliseconds of no further input for that key. |
|
||||
| `asym_eager_defer_pk` | Debouncing per key. On a key-down state change, response is immediate, followed by `DEBOUNCE` milliseconds of no further input for that key. On a key-up state change, a per-key timer is set. When `DEBOUNCE` milliseconds of no changes have occurred on that key, the key-up status change is pushed. |
|
||||
|
||||
### Use your own debouncing code
|
||||
You have the option to implement you own debouncing algorithm. To do this:
|
||||
* Set ```DEBOUNCE_TYPE = custom``` in ```rules.mk```.
|
||||
* Add ```SRC += debounce.c``` in ```rules.mk```
|
||||
* Add your own ```debounce.c```. Look at current implementations in ```quantum/debounce``` for examples.
|
||||
?> `sym_defer_g` is the default if `DEBOUNCE_TYPE` is undefined.
|
||||
|
||||
?> `sym_eager_pr` is suitable for use in keyboards where refreshing `NUM_KEYS` 8-bit counters is computationally expensive or has low scan rate while fingers usually hit one row at a time. This could be appropriate for the ErgoDox models where the matrix is rotated 90°. Hence its "rows" are really columns and each finger only hits a single "row" at a time with normal usage.
|
||||
|
||||
### Implementing your own debouncing code
|
||||
|
||||
You have the option to implement you own debouncing algorithm with the following steps:
|
||||
|
||||
* Set `DEBOUNCE_TYPE = custom` in `rules.mk`.
|
||||
* Add `SRC += debounce.c` in `rules.mk`
|
||||
* Implement your own `debounce.c`. See `quantum/debounce` for examples.
|
||||
* Debouncing occurs after every raw matrix scan.
|
||||
* Use num_rows rather than MATRIX_ROWS, so that split keyboards are supported correctly.
|
||||
* If the algorithm might be applicable to other keyboards, please consider adding it to ```quantum/debounce```
|
||||
* Use num_rows instead of MATRIX_ROWS to support split keyboards correctly.
|
||||
* If your custom algorithm is applicable to other keyboards, please consider making a pull request.
|
||||
|
||||
@@ -434,6 +434,75 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
|
||||
This allows you to toggle between scrolling and cursor movement by pressing the DRAG_SCROLL key.
|
||||
|
||||
### Advanced Drag Scroll
|
||||
|
||||
Sometimes, like with the Cirque trackpad, you will run into issues where the scrolling may be too fast.
|
||||
|
||||
Here is a slightly more advanced example of drag scrolling. You will be able to change the scroll speed based on the values in set in `SCROLL_DIVISOR_H` and `SCROLL_DIVISOR_V`. This bit of code is also set up so that instead of toggling the scrolling state with set_scrolling = !set_scrolling, the set_scrolling variable is set directly to record->event.pressed. This way, the drag scrolling will only be active while the DRAG_SCROLL button is held down.
|
||||
|
||||
```c
|
||||
enum custom_keycodes {
|
||||
DRAG_SCROLL = SAFE_RANGE,
|
||||
};
|
||||
|
||||
bool set_scrolling = false;
|
||||
|
||||
// Modify these values to adjust the scrolling speed
|
||||
#define SCROLL_DIVISOR_H 8.0
|
||||
#define SCROLL_DIVISOR_V 8.0
|
||||
|
||||
// Variables to store accumulated scroll values
|
||||
float scroll_accumulated_h = 0;
|
||||
float scroll_accumulated_v = 0;
|
||||
|
||||
// Function to handle mouse reports and perform drag scrolling
|
||||
report_mouse_t pointing_device_task_user(report_mouse_t mouse_report) {
|
||||
// Check if drag scrolling is active
|
||||
if (set_scrolling) {
|
||||
// Calculate and accumulate scroll values based on mouse movement and divisors
|
||||
scroll_accumulated_h += (float)mouse_report.x / SCROLL_DIVISOR_H;
|
||||
scroll_accumulated_v += (float)mouse_report.y / SCROLL_DIVISOR_V;
|
||||
|
||||
// Assign integer parts of accumulated scroll values to the mouse report
|
||||
mouse_report.h = (int8_t)scroll_accumulated_h;
|
||||
mouse_report.v = (int8_t)scroll_accumulated_v;
|
||||
|
||||
// Update accumulated scroll values by subtracting the integer parts
|
||||
scroll_accumulated_h -= (int8_t)scroll_accumulated_h;
|
||||
scroll_accumulated_v -= (int8_t)scroll_accumulated_v;
|
||||
|
||||
// Clear the X and Y values of the mouse report
|
||||
mouse_report.x = 0;
|
||||
mouse_report.y = 0;
|
||||
}
|
||||
return mouse_report;
|
||||
}
|
||||
|
||||
// Function to handle key events and enable/disable drag scrolling
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case DRAG_SCROLL:
|
||||
// Toggle set_scrolling when DRAG_SCROLL key is pressed or released
|
||||
set_scrolling = record->event.pressed;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// Function to handle layer changes and disable drag scrolling when not in AUTO_MOUSE_DEFAULT_LAYER
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
// Disable set_scrolling if the current layer is not the AUTO_MOUSE_DEFAULT_LAYER
|
||||
if (get_highest_layer(state) != AUTO_MOUSE_DEFAULT_LAYER) {
|
||||
set_scrolling = false;
|
||||
}
|
||||
return state;
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
|
||||
## Split Examples
|
||||
|
||||
The following examples make use the `SPLIT_POINTING_ENABLE` functionality and show how to manipulate the mouse report for a scrolling mode.
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
# Word Per Minute (WPM) Calculcation
|
||||
# Word Per Minute (WPM) Calculation
|
||||
|
||||
The WPM feature uses time between keystrokes to compute a rolling average words per minute rate and makes this available for various uses.
|
||||
|
||||
|
||||
@@ -35,6 +35,40 @@ To use a 5V/16MHz Pro Micro as an ISP flashing tool, you will first need to load
|
||||
|
||||
!> Note that the `10` pin on the Pro Micro should be wired to the `RESET` pin on the keyboard's controller. ***DO NOT*** connect the `RESET` pin on the Pro Micro to the `RESET` on the keyboard.
|
||||
|
||||
|
||||
### Arduino Uno / Micro as ISP
|
||||
|
||||
[Arduino Uno](https://store.arduino.cc/products/arduino-uno-rev3)
|
||||
[Arduino Micro](https://store.arduino.cc/products/arduino-micro)
|
||||
|
||||
A standard Uno or Micro can be used as an ISP flashing tool using the [example "ArduinoISP" sketch](https://docs.arduino.cc/built-in-examples/arduino-isp/ArduinoISP#load-the-sketch) to emulate an STK500 ISP. Also works with Sparkfun Pro Micros and clones.
|
||||
|
||||
**AVRDUDE Programmer**: `stk500v1`
|
||||
**AVRDUDE Port**: Serial
|
||||
|
||||
#### Wiring
|
||||
|
||||
|Uno |Keyboard|
|
||||
|-----------|--------|
|
||||
|`5V` |`VCC` |
|
||||
|`GND` |`GND` |
|
||||
|`10` (`B2`)|`RESET` |
|
||||
|`13` (`B5`)|`SCLK` |
|
||||
|`11` (`B3`)|`MOSI` |
|
||||
|`12` (`B4`)|`MISO` |
|
||||
|
||||
|Micro |Keyboard|
|
||||
|-----------|--------|
|
||||
|`5V` |`VCC` |
|
||||
|`GND` |`GND` |
|
||||
|`10` (`B6`)|`RESET` |
|
||||
|`15` (`B1`)|`SCLK` |
|
||||
|`16` (`B2`)|`MOSI` |
|
||||
|`14` (`B3`)|`MISO` |
|
||||
|
||||
!> Note that the `10` pin on the Uno/Micro should be wired to the `RESET` pin on the keyboard's controller. ***DO NOT*** connect the `RESET` pin on the Uno/Micro to the `RESET` on the keyboard.
|
||||
|
||||
|
||||
### Teensy 2.0 as ISP
|
||||
|
||||
[PJRC Teensy 2.0](https://www.pjrc.com/store/teensy.html)
|
||||
@@ -57,6 +91,7 @@ To use a Teensy 2.0 as an ISP flashing tool, you will first need to load a [spec
|
||||
|
||||
!> Note that the `B0` pin on the Teensy should be wired to the `RESET` pin on the keyboard's controller. ***DO NOT*** connect the `RESET` pin on the Teensy to the `RESET` on the keyboard.
|
||||
|
||||
|
||||
### SparkFun PocketAVR / USBtinyISP
|
||||
|
||||
[SparkFun PocketAVR](https://www.sparkfun.com/products/9825)
|
||||
|
||||
@@ -172,6 +172,8 @@ For example, to build a firmware for a Clueboard 66% you would use:
|
||||
|
||||
qmk compile -kb clueboard/66/rev3 -km default
|
||||
|
||||
?> The keyboard option is the path relative to the keyboard directory, the above example would be found in `qmk_firmware/keyboards/clueboard/66/rev3`. If you're unsure you can view a full list of supported keyboards with `qmk list-keyboards`.
|
||||
|
||||
When it is done you should have a lot of output that ends similar to this:
|
||||
|
||||
```
|
||||
|
||||
+43
-10
@@ -46,16 +46,7 @@ Before starting, you will want to make sure that you have all of the build tools
|
||||
|
||||
This part is super simple. However, there is some configuration that we need to do to ensure things are configured correctly.
|
||||
|
||||
### Configuring VS Code
|
||||
|
||||
First, we need to set up IntelliSense. This isn't strictly required, but it will make your life a LOT easier. To do this, we need to create the `.vscode/c_cpp_properties.json` file in the QMK Firmware folder, You can do this all manually, but I've done most of the work already.
|
||||
|
||||
Grab [this file](https://gist.github.com/drashna/48e2c49ce877be592a1650f91f8473e8) and save it. You may need to edit this file, if you didn't install MSYS2 to the default location, or are using WSL/LxSS.
|
||||
|
||||
Once you have saved this file, you will need to reload VS Code, if it was already running.
|
||||
|
||||
?> You should see an `extensions.json` and `settings.json` file in the `.vscode` folder, as well.
|
||||
|
||||
#### MSYS2 Setup
|
||||
|
||||
Now, we will set up the MSYS2 window to show up in VSCode as the integrated terminal. This has a number of advantages. Mostly, you can control+click on errors and jump to those files. This makes debugging much easier. It's also nice, in that you don't have to jump to another window.
|
||||
|
||||
@@ -110,8 +101,50 @@ This installs a bunch of Git related tools that may make using Git with QMK Firm
|
||||
Restart once you've installed any extensions
|
||||
|
||||
# Configure VS Code for QMK
|
||||
|
||||
1. Click <kbd><kbd>File</kbd> > <kbd>Open Folder</kbd></kbd>
|
||||
2. Open the QMK Firmware folder that you cloned from GitHub.
|
||||
3. Click <kbd><kbd>File</kbd> > <kbd>Save Workspace As...</kbd></kbd>
|
||||
|
||||
## Configuring VS Code
|
||||
|
||||
Using the [standard `compile_commands.json` database](https://clang.llvm.org/docs/JSONCompilationDatabase.html), we can get VS code C/C++ extension to use the exact same includes and defines used for your keyboard and keymap.
|
||||
|
||||
1. Run `qmk generate-compilation-database -kb <keyboard> -km <keymap>` to generate the `compile_commands.json`.
|
||||
1. Create `.vscode/c_cpp_properties.json` with the following content:
|
||||
```
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "qmk",
|
||||
"compilerArgs": ["-mmcu=atmega32u4"],
|
||||
"compilerPath": "/usr/bin/avr-gcc",
|
||||
"cStandard": "gnu11",
|
||||
"cppStandard": "gnu++14",
|
||||
"compileCommands": "${workspaceFolder}/compile_commands.json",
|
||||
"intelliSenseMode": "linux-gcc-arm",
|
||||
"browse": {
|
||||
"path": [
|
||||
"${workspaceFolder}"
|
||||
],
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"version": 4
|
||||
}
|
||||
```
|
||||
|
||||
Change values in `.vscode/c_cpp_properties.json` for your environment:
|
||||
|
||||
1. Copy the `-mmcu` argument from `compile_commands.json` into your `compilerArgs`. This is to work around a [bug in vscode c/c++ extension](https://github.com/microsoft/vscode-cpptools/issues/6478).
|
||||
1. Use the `compilerPath` from `compile_commands.json`.
|
||||
1. Modify `cStandard`, `cppStandard` and `intelliSenseMode` values to the correct values for your platform. See [this section](https://code.visualstudio.com/docs/cpp/c-cpp-properties-schema-reference#_configuration-properties) for reference. For WSL, it should still be gcc-x64.
|
||||
|
||||
And now you're ready to code QMK Firmware in VS Code
|
||||
|
||||
|
||||
## Troubleshooting VSCode C/C++ extension
|
||||
|
||||
If the defines are not matching what you expect, open the source code and run action `C/C++: Log Diagnostics`. This will list the exact list of defines and include paths defined in `compile_commands.json`, and if it's not part of your compilation database, it will tell you so.
|
||||
@@ -53,6 +53,7 @@ https://github.com/qmk/qmk_firmware/pulls?q=is%3Apr+is%3Aclosed+label%3Akeyboard
|
||||
|
||||
- keyboard moves within the repository *must* go through the `develop` branch instead of `master`, so as to ensure compatibility for users
|
||||
- `data/mappings/keyboard_aliases.hjson` must be updated to reflect the move, so users with pre-created configurator keymap.json files continue to detect the correct keyboard
|
||||
- keyboard updates and refactors (eg. to data driven) *must* go through `develop` to reduce `master` -> `develop` merge conflicts
|
||||
- PR submissions from a `kbfirmware` export (or equivalent) will not be accepted unless converted to new QMK standards -- try `qmk import-kbfirmware` first
|
||||
- `info.json`
|
||||
- With the move to [data driven](https://docs.qmk.fm/#/data_driven_config) keyboard configuration, we encourage contributors to utilise as many features as possible of the info.json [schema](https://github.com/qmk/qmk_firmware/blob/master/data/schemas/keyboard.jsonschema).
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
// Copyright 2023 ziptyze
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#define OLED_DISPLAY_128X32
|
||||
#define I2C1_SCL_PIN GP11
|
||||
#define I2C1_SDA_PIN GP10
|
||||
#define I2C_DRIVER I2CD1
|
||||
#define OLED_BRIGHTNESS 128
|
||||
#define OLED_FONT_H "keyboards/1upkeyboards/pi50/lib/glcdfont.c"
|
||||
|
||||
#define RGB_DI_PIN GP0
|
||||
# define RGB_MATRIX_KEYPRESSES // reacts to keypresses
|
||||
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
|
||||
# define RGBLIGHT_LIMIT_VAL 150
|
||||
# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
|
||||
# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150
|
||||
// RGB Matrix Animation modes. Explicitly enabled
|
||||
// For full list of effects, see:
|
||||
// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects
|
||||
# define ENABLE_RGB_MATRIX_ALPHAS_MODS
|
||||
# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
|
||||
# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
|
||||
# define ENABLE_RGB_MATRIX_BREATHING
|
||||
# define ENABLE_RGB_MATRIX_BAND_SAT
|
||||
# define ENABLE_RGB_MATRIX_BAND_VAL
|
||||
# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
|
||||
# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
|
||||
# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT
|
||||
# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL
|
||||
# define ENABLE_RGB_MATRIX_CYCLE_ALL
|
||||
# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
|
||||
# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
|
||||
# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
|
||||
# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN
|
||||
# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
|
||||
# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL
|
||||
# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL
|
||||
# define ENABLE_RGB_MATRIX_DUAL_BEACON
|
||||
# define ENABLE_RGB_MATRIX_RAINBOW_BEACON
|
||||
# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS
|
||||
# define ENABLE_RGB_MATRIX_RAINDROPS
|
||||
# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
|
||||
# define ENABLE_RGB_MATRIX_HUE_BREATHING
|
||||
# define ENABLE_RGB_MATRIX_HUE_PENDULUM
|
||||
# define ENABLE_RGB_MATRIX_HUE_WAVE
|
||||
# define ENABLE_RGB_MATRIX_PIXEL_RAIN
|
||||
# define ENABLE_RGB_MATRIX_PIXEL_FLOW
|
||||
# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL
|
||||
// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined
|
||||
# define ENABLE_RGB_MATRIX_TYPING_HEATMAP
|
||||
# define ENABLE_RGB_MATRIX_DIGITAL_RAIN
|
||||
// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined
|
||||
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
|
||||
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE
|
||||
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
|
||||
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
|
||||
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
|
||||
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
|
||||
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
|
||||
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
|
||||
# define ENABLE_RGB_MATRIX_SPLASH
|
||||
# define ENABLE_RGB_MATRIX_MULTISPLASH
|
||||
# define ENABLE_RGB_MATRIX_SOLID_SPLASH
|
||||
# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
|
||||
|
||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||
#define LOCKING_SUPPORT_ENABLE
|
||||
/* Locking resynchronize hack */
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
@@ -0,0 +1,4 @@
|
||||
// Copyright 2023 ziptyze (@ziptyze)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#define RGB_MATRIX_LED_COUNT 60
|
||||
@@ -0,0 +1,142 @@
|
||||
{
|
||||
"rgb_matrix": {
|
||||
"layout": [
|
||||
{ "flags": 1, "matrix": [0, 0], "x": 10, "y": 7 },
|
||||
{ "flags": 4, "matrix": [1, 0], "x": 28, "y": 7 },
|
||||
{ "flags": 4, "matrix": [0, 1], "x": 46, "y": 7 },
|
||||
{ "flags": 4, "matrix": [1, 1], "x": 65, "y": 7 },
|
||||
{ "flags": 4, "matrix": [0, 2], "x": 84, "y": 7 },
|
||||
{ "flags": 4, "matrix": [1, 2], "x": 102, "y": 7 },
|
||||
{ "flags": 4, "matrix": [0, 3], "x": 121, "y": 7 },
|
||||
{ "flags": 4, "matrix": [1, 3], "x": 140, "y": 7 },
|
||||
{ "flags": 4, "matrix": [0, 4], "x": 159, "y": 7 },
|
||||
{ "flags": 4, "matrix": [1, 4], "x": 177, "y": 7 },
|
||||
{ "flags": 4, "matrix": [0, 5], "x": 196, "y": 7 },
|
||||
{ "flags": 1, "matrix": [1, 5], "x": 215, "y": 7 },
|
||||
|
||||
{ "flags": 1, "matrix": [3, 5], "x": 215, "y": 19 },
|
||||
{ "flags": 4, "matrix": [2, 5], "x": 196, "y": 19 },
|
||||
{ "flags": 4, "matrix": [3, 4], "x": 177, "y": 19 },
|
||||
{ "flags": 4, "matrix": [2, 4], "x": 159, "y": 19 },
|
||||
{ "flags": 4, "matrix": [3, 3], "x": 140, "y": 19 },
|
||||
{ "flags": 4, "matrix": [2, 3], "x": 121, "y": 19 },
|
||||
{ "flags": 4, "matrix": [3, 2], "x": 102, "y": 19 },
|
||||
{ "flags": 4, "matrix": [2, 2], "x": 84, "y": 19 },
|
||||
{ "flags": 4, "matrix": [3, 1], "x": 65, "y": 19 },
|
||||
{ "flags": 4, "matrix": [2, 1], "x": 46, "y": 19 },
|
||||
{ "flags": 4, "matrix": [3, 0], "x": 28, "y": 19 },
|
||||
{ "flags": 1, "matrix": [2, 0], "x": 9, "y": 19 },
|
||||
|
||||
{ "flags": 1, "matrix": [4, 0], "x": 9, "y": 32 },
|
||||
{ "flags": 4, "matrix": [5, 0], "x": 28, "y": 32 },
|
||||
{ "flags": 4, "matrix": [4, 1], "x": 46, "y": 32 },
|
||||
{ "flags": 4, "matrix": [5, 1], "x": 65, "y": 32 },
|
||||
{ "flags": 4, "matrix": [4, 2], "x": 84, "y": 32 },
|
||||
{ "flags": 4, "matrix": [5, 2], "x": 102, "y": 32 },
|
||||
{ "flags": 4, "matrix": [4, 3], "x": 121, "y": 32 },
|
||||
{ "flags": 4, "matrix": [5, 3], "x": 140, "y": 32 },
|
||||
{ "flags": 4, "matrix": [4, 4], "x": 159, "y": 32 },
|
||||
{ "flags": 4, "matrix": [5, 4], "x": 177, "y": 32 },
|
||||
{ "flags": 4, "matrix": [4, 5], "x": 196, "y": 32 },
|
||||
{ "flags": 1, "matrix": [5, 5], "x": 215, "y": 32 },
|
||||
|
||||
{ "flags": 1, "matrix": [7, 5], "x": 215, "y": 45 },
|
||||
{ "flags": 4, "matrix": [6, 5], "x": 196, "y": 45 },
|
||||
{ "flags": 4, "matrix": [7, 4], "x": 177, "y": 45 },
|
||||
{ "flags": 4, "matrix": [6, 4], "x": 159, "y": 45 },
|
||||
{ "flags": 4, "matrix": [7, 3], "x": 140, "y": 45 },
|
||||
{ "flags": 4, "matrix": [6, 3], "x": 121, "y": 45 },
|
||||
{ "flags": 4, "matrix": [7, 2], "x": 102, "y": 45 },
|
||||
{ "flags": 4, "matrix": [6, 2], "x": 84, "y": 45 },
|
||||
{ "flags": 4, "matrix": [7, 1], "x": 65, "y": 45 },
|
||||
{ "flags": 4, "matrix": [6, 1], "x": 46, "y": 45 },
|
||||
{ "flags": 4, "matrix": [7, 0], "x": 28, "y": 45 },
|
||||
{ "flags": 1, "matrix": [6, 0], "x": 9, "y": 45 },
|
||||
|
||||
{ "flags": 1, "matrix": [8, 0], "x": 9, "y": 57 },
|
||||
{ "flags": 1, "matrix": [9, 0], "x": 28, "y": 57 },
|
||||
{ "flags": 1, "matrix": [8, 1], "x": 46, "y": 57 },
|
||||
{ "flags": 1, "matrix": [9, 1], "x": 65, "y": 57 },
|
||||
{ "flags": 1, "matrix": [8, 2], "x": 84, "y": 57 },
|
||||
{ "flags": 1, "matrix": [9, 2], "x": 102, "y": 57 },
|
||||
{ "flags": 1, "matrix": [9, 3], "x": 140, "y": 57 },
|
||||
{ "flags": 1, "matrix": [8, 4], "x": 159, "y": 57 },
|
||||
{ "flags": 1, "matrix": [9, 4], "x": 177, "y": 57 },
|
||||
{ "flags": 1, "matrix": [8, 5], "x": 196, "y": 57 },
|
||||
{ "flags": 1, "matrix": [9, 5], "x": 215, "y": 57 },
|
||||
{ "flags": 1, "matrix": [8, 3], "x": 121, "y": 57 }
|
||||
]
|
||||
},
|
||||
"layouts": {
|
||||
"LAYOUT_ortho_5x12": {
|
||||
"layout": [
|
||||
{ "matrix": [0, 6], "x": 11, "y": 0 },
|
||||
|
||||
{ "matrix": [0, 0], "x": 0, "y": 1 },
|
||||
{ "matrix": [1, 0], "x": 1, "y": 1 },
|
||||
{ "matrix": [0, 1], "x": 2, "y": 1 },
|
||||
{ "matrix": [1, 1], "x": 3, "y": 1 },
|
||||
{ "matrix": [0, 2], "x": 4, "y": 1 },
|
||||
{ "matrix": [1, 2], "x": 5, "y": 1 },
|
||||
{ "matrix": [0, 3], "x": 6, "y": 1 },
|
||||
{ "matrix": [1, 3], "x": 7, "y": 1 },
|
||||
{ "matrix": [0, 4], "x": 8, "y": 1 },
|
||||
{ "matrix": [1, 4], "x": 9, "y": 1 },
|
||||
{ "matrix": [0, 5], "x": 10, "y": 1 },
|
||||
{ "matrix": [1, 5], "x": 11, "y": 1 },
|
||||
|
||||
{ "matrix": [2, 0], "x": 0, "y": 2 },
|
||||
{ "matrix": [3, 0], "x": 1, "y": 2 },
|
||||
{ "matrix": [2, 1], "x": 2, "y": 2 },
|
||||
{ "matrix": [3, 1], "x": 3, "y": 2 },
|
||||
{ "matrix": [2, 2], "x": 4, "y": 2 },
|
||||
{ "matrix": [3, 2], "x": 5, "y": 2 },
|
||||
{ "matrix": [2, 3], "x": 6, "y": 2 },
|
||||
{ "matrix": [3, 3], "x": 7, "y": 2 },
|
||||
{ "matrix": [2, 4], "x": 8, "y": 2 },
|
||||
{ "matrix": [3, 4], "x": 9, "y": 2 },
|
||||
{ "matrix": [2, 5], "x": 10, "y": 2 },
|
||||
{ "matrix": [3, 5], "x": 11, "y": 2 },
|
||||
|
||||
{ "matrix": [4, 0], "x": 0, "y": 3 },
|
||||
{ "matrix": [5, 0], "x": 1, "y": 3 },
|
||||
{ "matrix": [4, 1], "x": 2, "y": 3 },
|
||||
{ "matrix": [5, 1], "x": 3, "y": 3 },
|
||||
{ "matrix": [4, 2], "x": 4, "y": 3 },
|
||||
{ "matrix": [5, 2], "x": 5, "y": 3 },
|
||||
{ "matrix": [4, 3], "x": 6, "y": 3 },
|
||||
{ "matrix": [5, 3], "x": 7, "y": 3 },
|
||||
{ "matrix": [4, 4], "x": 8, "y": 3 },
|
||||
{ "matrix": [5, 4], "x": 9, "y": 3 },
|
||||
{ "matrix": [4, 5], "x": 10, "y": 3 },
|
||||
{ "matrix": [5, 5], "x": 11, "y": 3 },
|
||||
|
||||
{ "matrix": [6, 0], "x": 0, "y": 4 },
|
||||
{ "matrix": [7, 0], "x": 1, "y": 4 },
|
||||
{ "matrix": [6, 1], "x": 2, "y": 4 },
|
||||
{ "matrix": [7, 1], "x": 3, "y": 4 },
|
||||
{ "matrix": [6, 2], "x": 4, "y": 4 },
|
||||
{ "matrix": [7, 2], "x": 5, "y": 4 },
|
||||
{ "matrix": [6, 3], "x": 6, "y": 4 },
|
||||
{ "matrix": [7, 3], "x": 7, "y": 4 },
|
||||
{ "matrix": [6, 4], "x": 8, "y": 4 },
|
||||
{ "matrix": [7, 4], "x": 9, "y": 4 },
|
||||
{ "matrix": [6, 5], "x": 10, "y": 4 },
|
||||
{ "matrix": [7, 5], "x": 11, "y": 4 },
|
||||
|
||||
{ "matrix": [8, 0], "x": 0, "y": 5 },
|
||||
{ "matrix": [9, 0], "x": 1, "y": 5 },
|
||||
{ "matrix": [8, 1], "x": 2, "y": 5 },
|
||||
{ "matrix": [9, 1], "x": 3, "y": 5 },
|
||||
{ "matrix": [8, 2], "x": 4, "y": 5 },
|
||||
{ "matrix": [9, 2], "x": 5, "y": 5 },
|
||||
{ "matrix": [8, 3], "x": 6, "y": 5 },
|
||||
{ "matrix": [9, 3], "x": 7, "y": 5 },
|
||||
{ "matrix": [8, 4], "x": 8, "y": 5 },
|
||||
{ "matrix": [9, 4], "x": 9, "y": 5 },
|
||||
{ "matrix": [8, 5], "x": 10, "y": 5 },
|
||||
{ "matrix": [9, 5], "x": 11, "y": 5 }
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// Copyright 2023 ziptyze
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
#pragma once
|
||||
|
||||
#define HAL_USE_I2C TRUE
|
||||
|
||||
#include_next <halconf.h>
|
||||
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"keyboard_name": "pi50",
|
||||
"manufacturer": "1upkeyboards",
|
||||
"maintainer": "ziptyze",
|
||||
"processor": "RP2040",
|
||||
"bootloader": "rp2040",
|
||||
"board": "GENERIC_RP_RP2040",
|
||||
"usb": {
|
||||
"vid": "0x6F75",
|
||||
"pid": "0x5606",
|
||||
"device_version": "1.0.0"
|
||||
},
|
||||
"diode_direction": "COL2ROW",
|
||||
"dynamic_keymap": {
|
||||
"layer_count": 10
|
||||
},
|
||||
"features": {
|
||||
"audio": false,
|
||||
"backlight": false,
|
||||
"bootmagic": true,
|
||||
"command": false,
|
||||
"console": false,
|
||||
"extrakey": true,
|
||||
"mousekey": true,
|
||||
"nkro": false,
|
||||
"rgb_matrix": true,
|
||||
"rgblight": false
|
||||
},
|
||||
"matrix_pins": {
|
||||
"rows": ["GP20", "GP15", "GP19", "GP14", "GP18", "GP13", "GP17", "GP12", "GP16", "GP21"],
|
||||
"cols": ["GP1", "GP2", "GP3", "GP4", "GP5", "GP6", "GP9"]
|
||||
},
|
||||
"encoder": {
|
||||
"enabled": true,
|
||||
"rotary": [
|
||||
{"pin_a": "GP8", "pin_b": "GP7"}
|
||||
]
|
||||
},
|
||||
"rgb_matrix": {
|
||||
"driver": "WS2812"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,136 @@
|
||||
/* Copyright 2023 ziptyze
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
enum layer_names {
|
||||
_ONE = 0,
|
||||
_TWO,
|
||||
_THREE,
|
||||
_FOUR
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
* ╱⎺⎺⎺⎺╲
|
||||
* |RGBTOG|
|
||||
* ╲⎽⎽⎽⎽╱
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Esc | A | S | D | F | G | H | J | K | L | ; | " |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* |Adjust| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_ONE] = LAYOUT_ortho_5x12 (
|
||||
RGB_TOG,
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, 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_DEL,
|
||||
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT ,
|
||||
MO(3), KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||
),
|
||||
|
||||
/* Lower
|
||||
* ╱⎺⎺⎺⎺╲
|
||||
* | MUTE |
|
||||
* ╲⎽⎽⎽⎽╱
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_TWO] = LAYOUT_ortho_5x12 (
|
||||
KC_MUTE,
|
||||
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
|
||||
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL,
|
||||
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
|
||||
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),KC_HOME, KC_END, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
|
||||
),
|
||||
|
||||
/* Raise
|
||||
* ╱⎺⎺⎺⎺╲
|
||||
* | MUTE |
|
||||
* ╲⎽⎽⎽⎽╱
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | Pg Up| Pg Dn| |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_THREE] = LAYOUT_ortho_5x12 (
|
||||
KC_MUTE,
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
|
||||
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
|
||||
),
|
||||
|
||||
/* Adjust (Lower + Raise)
|
||||
* ╱⎺⎺⎺⎺╲
|
||||
* | MUTE |
|
||||
* v-----------------------RGB CONTROL------------------v ╲⎽⎽⎽⎽╱
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | Reset| Debug| | | | | | | | | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | |Aud cy|Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_FOUR] = LAYOUT_ortho_5x12 (
|
||||
KC_MUTE,
|
||||
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
|
||||
_______, QK_BOOT, DB_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL,
|
||||
_______, _______, MU_NEXT, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______,
|
||||
_______, AU_PREV, AU_NEXT, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
)
|
||||
};
|
||||
|
||||
#if defined(ENCODER_MAP_ENABLE)
|
||||
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
|
||||
[_ONE] = { ENCODER_CCW_CW(RGB_RMOD, RGB_MOD) },
|
||||
[_TWO] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
|
||||
[_THREE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
|
||||
[_FOUR] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }
|
||||
};
|
||||
#endif
|
||||
@@ -0,0 +1 @@
|
||||
ENCODER_MAP_ENABLE = yes
|
||||
@@ -0,0 +1,286 @@
|
||||
/* Copyright 2023 ziptyze
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
enum layer_names {
|
||||
_ONE = 0,
|
||||
_TWO,
|
||||
_THREE,
|
||||
_FOUR,
|
||||
_FIVE,
|
||||
_SIX,
|
||||
_SEVEN,
|
||||
_EIGHT,
|
||||
_NINE,
|
||||
_TEN
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
* ╱⎺⎺⎺⎺╲
|
||||
* |RGBTOG|
|
||||
* ╲⎽⎽⎽⎽╱
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Esc | A | S | D | F | G | H | J | K | L | ; | " |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* |Adjust| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_ONE] = LAYOUT_ortho_5x12 (
|
||||
RGB_TOG,
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, 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_DEL,
|
||||
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT ,
|
||||
MO(3), KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||
),
|
||||
|
||||
/* Lower
|
||||
* ╱⎺⎺⎺⎺╲
|
||||
* | MUTE |
|
||||
* ╲⎽⎽⎽⎽╱
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_TWO] = LAYOUT_ortho_5x12 (
|
||||
KC_MUTE,
|
||||
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
|
||||
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL,
|
||||
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
|
||||
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),KC_HOME, KC_END, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
|
||||
),
|
||||
|
||||
/* Raise
|
||||
* ╱⎺⎺⎺⎺╲
|
||||
* | MUTE |
|
||||
* ╲⎽⎽⎽⎽╱
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | Pg Up| Pg Dn| |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_THREE] = LAYOUT_ortho_5x12 (
|
||||
KC_MUTE,
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
|
||||
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
|
||||
),
|
||||
|
||||
/* Adjust (Lower + Raise)
|
||||
* ╱⎺⎺⎺⎺╲
|
||||
* | MUTE |
|
||||
* v-----------------------RGB CONTROL------------------v ╲⎽⎽⎽⎽╱
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | Reset| Debug| | | | | | | | | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | |Aud cy|Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_FOUR] = LAYOUT_ortho_5x12 (
|
||||
KC_MUTE,
|
||||
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
|
||||
_______, QK_BOOT, DB_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL,
|
||||
_______, _______, MU_NEXT, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______,
|
||||
_______, AU_PREV, AU_NEXT, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
/* Placeholder
|
||||
* ╱⎺⎺⎺⎺╲
|
||||
* | |
|
||||
* ╲⎽⎽⎽⎽╱
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_FIVE] = LAYOUT_ortho_5x12 (
|
||||
_______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
/* Placeholder
|
||||
* ╱⎺⎺⎺⎺╲
|
||||
* | |
|
||||
* ╲⎽⎽⎽⎽╱
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_SIX] = LAYOUT_ortho_5x12 (
|
||||
_______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
/* Placeholder
|
||||
* ╱⎺⎺⎺⎺╲
|
||||
* | |
|
||||
* ╲⎽⎽⎽⎽╱
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_SEVEN] = LAYOUT_ortho_5x12 (
|
||||
_______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
/* Placeholder
|
||||
* ╱⎺⎺⎺⎺╲
|
||||
* | |
|
||||
* ╲⎽⎽⎽⎽╱
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_EIGHT] = LAYOUT_ortho_5x12 (
|
||||
_______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
/* Placeholder
|
||||
* ╱⎺⎺⎺⎺╲
|
||||
* | |
|
||||
* ╲⎽⎽⎽⎽╱
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_NINE] = LAYOUT_ortho_5x12 (
|
||||
_______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
/* Placeholder
|
||||
* ╱⎺⎺⎺⎺╲
|
||||
* | |
|
||||
* ╲⎽⎽⎽⎽╱
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_TEN] = LAYOUT_ortho_5x12 (
|
||||
_______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
)
|
||||
};
|
||||
|
||||
#if defined(ENCODER_MAP_ENABLE)
|
||||
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
|
||||
[_ONE] = { ENCODER_CCW_CW(RGB_RMOD, RGB_MOD) },
|
||||
[_TWO] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
|
||||
[_THREE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
|
||||
[_FOUR] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
|
||||
[_FIVE] = { ENCODER_CCW_CW(_______, _______) },
|
||||
[_SIX] = { ENCODER_CCW_CW(_______, _______) },
|
||||
[_SEVEN] = { ENCODER_CCW_CW(_______, _______) },
|
||||
[_EIGHT] = { ENCODER_CCW_CW(_______, _______) },
|
||||
[_NINE] = { ENCODER_CCW_CW(_______, _______) },
|
||||
[_TEN] = { ENCODER_CCW_CW(_______, _______) },
|
||||
};
|
||||
#endif
|
||||
@@ -0,0 +1,4 @@
|
||||
VIA_ENABLE = yes
|
||||
LTO_ENABLE = yes
|
||||
|
||||
ENCODER_MAP_ENABLE = yes
|
||||
@@ -0,0 +1,231 @@
|
||||
// Copyright 2022 @filterpaper
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
|
||||
#include "progmem.h"
|
||||
|
||||
static const unsigned char PROGMEM font[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00,
|
||||
0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00,
|
||||
0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00,
|
||||
0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00,
|
||||
0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00,
|
||||
0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00,
|
||||
0x00, 0x18, 0x3C, 0x18, 0x00, 0x00,
|
||||
0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00,
|
||||
0x00, 0x18, 0x24, 0x18, 0x00, 0x00,
|
||||
0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00,
|
||||
0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00,
|
||||
0x26, 0x29, 0x79, 0x29, 0x26, 0x00,
|
||||
0x40, 0x7F, 0x05, 0x05, 0x07, 0x00,
|
||||
0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00,
|
||||
0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00,
|
||||
0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00,
|
||||
0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00,
|
||||
0x14, 0x22, 0x7F, 0x22, 0x14, 0x00,
|
||||
0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00,
|
||||
0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00,
|
||||
0x00, 0x66, 0x89, 0x95, 0x6A, 0x00,
|
||||
0x60, 0x60, 0x60, 0x60, 0x60, 0x00,
|
||||
0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00,
|
||||
0x08, 0x04, 0x7E, 0x04, 0x08, 0x00,
|
||||
0x10, 0x20, 0x7E, 0x20, 0x10, 0x00,
|
||||
0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00,
|
||||
0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00,
|
||||
0x1E, 0x10, 0x10, 0x10, 0x10, 0x00,
|
||||
0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00,
|
||||
0x30, 0x38, 0x3E, 0x38, 0x30, 0x00,
|
||||
0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x5F, 0x00, 0x00, 0x00,
|
||||
0x00, 0x07, 0x00, 0x07, 0x00, 0x00,
|
||||
0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00,
|
||||
0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00,
|
||||
0x23, 0x13, 0x08, 0x64, 0x62, 0x00,
|
||||
0x36, 0x49, 0x56, 0x20, 0x50, 0x00,
|
||||
0x00, 0x08, 0x07, 0x03, 0x00, 0x00,
|
||||
0x00, 0x1C, 0x22, 0x41, 0x00, 0x00,
|
||||
0x00, 0x41, 0x22, 0x1C, 0x00, 0x00,
|
||||
0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00,
|
||||
0x08, 0x08, 0x3E, 0x08, 0x08, 0x00,
|
||||
0x00, 0x80, 0x70, 0x30, 0x00, 0x00,
|
||||
0x08, 0x08, 0x08, 0x08, 0x08, 0x00,
|
||||
0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
|
||||
0x20, 0x10, 0x08, 0x04, 0x02, 0x00,
|
||||
0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00,
|
||||
0x00, 0x42, 0x7F, 0x40, 0x00, 0x00,
|
||||
0x72, 0x49, 0x49, 0x49, 0x46, 0x00,
|
||||
0x21, 0x41, 0x49, 0x4D, 0x33, 0x00,
|
||||
0x18, 0x14, 0x12, 0x7F, 0x10, 0x00,
|
||||
0x27, 0x45, 0x45, 0x45, 0x39, 0x00,
|
||||
0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00,
|
||||
0x41, 0x21, 0x11, 0x09, 0x07, 0x00,
|
||||
0x36, 0x49, 0x49, 0x49, 0x36, 0x00,
|
||||
0x46, 0x49, 0x49, 0x29, 0x1E, 0x00,
|
||||
0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
|
||||
0x00, 0x40, 0x34, 0x00, 0x00, 0x00,
|
||||
0x00, 0x08, 0x14, 0x22, 0x41, 0x00,
|
||||
0x14, 0x14, 0x14, 0x14, 0x14, 0x00,
|
||||
0x00, 0x41, 0x22, 0x14, 0x08, 0x00,
|
||||
0x02, 0x01, 0x59, 0x09, 0x06, 0x00,
|
||||
0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00,
|
||||
0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00,
|
||||
0x7F, 0x49, 0x49, 0x49, 0x36, 0x00,
|
||||
0x3E, 0x41, 0x41, 0x41, 0x22, 0x00,
|
||||
0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00,
|
||||
0x7F, 0x49, 0x49, 0x49, 0x41, 0x00,
|
||||
0x7F, 0x09, 0x09, 0x09, 0x01, 0x00,
|
||||
0x3E, 0x41, 0x41, 0x51, 0x73, 0x00,
|
||||
0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00,
|
||||
0x00, 0x41, 0x7F, 0x41, 0x00, 0x00,
|
||||
0x20, 0x40, 0x41, 0x3F, 0x01, 0x00,
|
||||
0x7F, 0x08, 0x14, 0x22, 0x41, 0x00,
|
||||
0x7F, 0x40, 0x40, 0x40, 0x40, 0x00,
|
||||
0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00,
|
||||
0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00,
|
||||
0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00,
|
||||
0x7F, 0x09, 0x09, 0x09, 0x06, 0x00,
|
||||
0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00,
|
||||
0x7F, 0x09, 0x19, 0x29, 0x46, 0x00,
|
||||
0x26, 0x49, 0x49, 0x49, 0x32, 0x00,
|
||||
0x03, 0x01, 0x7F, 0x01, 0x03, 0x00,
|
||||
0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00,
|
||||
0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00,
|
||||
0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00,
|
||||
0x63, 0x14, 0x08, 0x14, 0x63, 0x00,
|
||||
0x03, 0x04, 0x78, 0x04, 0x03, 0x00,
|
||||
0x61, 0x59, 0x49, 0x4D, 0x43, 0x00,
|
||||
0x00, 0x7F, 0x41, 0x41, 0x41, 0x00,
|
||||
0x02, 0x04, 0x08, 0x10, 0x20, 0x00,
|
||||
0x00, 0x41, 0x41, 0x41, 0x7F, 0x00,
|
||||
0x04, 0x02, 0x01, 0x02, 0x04, 0x00,
|
||||
0x40, 0x40, 0x40, 0x40, 0x40, 0x00,
|
||||
0x00, 0x03, 0x07, 0x08, 0x00, 0x00,
|
||||
0x20, 0x54, 0x54, 0x78, 0x40, 0x00,
|
||||
0x7F, 0x28, 0x44, 0x44, 0x38, 0x00,
|
||||
0x38, 0x44, 0x44, 0x44, 0x28, 0x00,
|
||||
0x38, 0x44, 0x44, 0x28, 0x7F, 0x00,
|
||||
0x38, 0x54, 0x54, 0x54, 0x18, 0x00,
|
||||
0x00, 0x08, 0x7E, 0x09, 0x02, 0x00,
|
||||
0x18, 0x24, 0x24, 0x1C, 0x78, 0x00,
|
||||
0x7F, 0x08, 0x04, 0x04, 0x78, 0x00,
|
||||
0x00, 0x44, 0x7D, 0x40, 0x00, 0x00,
|
||||
0x20, 0x40, 0x40, 0x3D, 0x00, 0x00,
|
||||
0x7F, 0x10, 0x28, 0x44, 0x00, 0x00,
|
||||
0x00, 0x41, 0x7F, 0x40, 0x00, 0x00,
|
||||
0x7C, 0x04, 0x78, 0x04, 0x78, 0x00,
|
||||
0x7C, 0x08, 0x04, 0x04, 0x78, 0x00,
|
||||
0x38, 0x44, 0x44, 0x44, 0x38, 0x00,
|
||||
0x7C, 0x18, 0x24, 0x24, 0x18, 0x00,
|
||||
0x18, 0x24, 0x24, 0x18, 0x7C, 0x00,
|
||||
0x7C, 0x08, 0x04, 0x04, 0x08, 0x00,
|
||||
0x48, 0x54, 0x54, 0x54, 0x24, 0x00,
|
||||
0x04, 0x04, 0x3F, 0x44, 0x24, 0x00,
|
||||
0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00,
|
||||
0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00,
|
||||
0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00,
|
||||
0x44, 0x28, 0x10, 0x28, 0x44, 0x00,
|
||||
0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00,
|
||||
0x44, 0x64, 0x54, 0x4C, 0x44, 0x00,
|
||||
0x00, 0x08, 0x36, 0x41, 0x00, 0x00,
|
||||
0x00, 0x00, 0x77, 0x00, 0x00, 0x00,
|
||||
0x00, 0x41, 0x36, 0x08, 0x00, 0x00,
|
||||
0x02, 0x01, 0x02, 0x04, 0x02, 0x00,
|
||||
0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0xE0, 0x18, 0x02,
|
||||
0x00, 0x3C, 0x1E, 0x06, 0x0E, 0x0A,
|
||||
0x1A, 0x0E, 0x26, 0xFF, 0xBF, 0x0D,
|
||||
0x00, 0x80, 0x80, 0x81, 0xFF, 0xFE,
|
||||
0xF8, 0x01, 0x01, 0x03, 0x03, 0x03,
|
||||
0x03, 0x05, 0x05, 0x02, 0x02, 0x0A,
|
||||
0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A,
|
||||
0x0C, 0x04, 0x10, 0x18, 0x20, 0xC0,
|
||||
0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0xD0, 0x58, 0x78,
|
||||
0x68, 0x2C, 0x24, 0x34, 0xF4, 0xF4,
|
||||
0x3C, 0x3C, 0xFC, 0xF8, 0xF8, 0x70,
|
||||
0xF0, 0xE0, 0xE0, 0xC0, 0xC0, 0x80,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0xC0, 0x7C, 0x07, 0x80, 0xE0,
|
||||
0x60, 0x64, 0xE2, 0x60, 0x10, 0x10,
|
||||
0x20, 0x22, 0x12, 0x17, 0x3F, 0x0B,
|
||||
0x01, 0x01, 0x01, 0x01, 0x01, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x21,
|
||||
0x6F, 0xFC, 0xE0, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
|
||||
0x60, 0x60, 0x70, 0x70, 0xF0, 0xF0,
|
||||
0xD0, 0xD0, 0xD0, 0xD0, 0x50, 0x50,
|
||||
0x50, 0x70, 0x78, 0x78, 0x78, 0x7C,
|
||||
0x7F, 0x7D, 0x7C, 0x5E, 0x4F, 0x44,
|
||||
0x40, 0x40, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x38, 0x30, 0x30, 0x30, 0x30,
|
||||
0x30, 0x30, 0x58, 0x46, 0x47, 0x41,
|
||||
0x41, 0x01, 0x01, 0x03, 0x03, 0x42,
|
||||
0x42, 0x42, 0x46, 0x46, 0x46, 0x46,
|
||||
0x42, 0x43, 0x43, 0x73, 0x77, 0x72,
|
||||
0x70, 0x60, 0x60, 0x60, 0x60, 0x60,
|
||||
0x60, 0x61, 0x67, 0x6F, 0x7E, 0x78,
|
||||
0x78, 0x70, 0x70, 0x70, 0x70, 0x70,
|
||||
0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
|
||||
0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
|
||||
0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
|
||||
0x40, 0x40, 0x40, 0x48, 0x58, 0x58,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
@@ -0,0 +1,10 @@
|
||||
// Copyright 2023 ziptyze
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
#pragma once
|
||||
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#undef RP_I2C_USE_I2C0
|
||||
#undef RP_I2C_USE_I2C1
|
||||
#define RP_I2C_USE_I2C0 FALSE
|
||||
#define RP_I2C_USE_I2C1 TRUE
|
||||
@@ -0,0 +1,4 @@
|
||||
// Copyright 2023 ziptyze (@ziptyze)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#define RGB_MATRIX_LED_COUNT 59
|
||||
@@ -0,0 +1,141 @@
|
||||
{
|
||||
"rgb_matrix": {
|
||||
"layout": [
|
||||
{ "flags": 1, "matrix": [0, 0], "x": 10, "y": 7 },
|
||||
{ "flags": 4, "matrix": [1, 0], "x": 28, "y": 7 },
|
||||
{ "flags": 4, "matrix": [0, 1], "x": 46, "y": 7 },
|
||||
{ "flags": 4, "matrix": [1, 1], "x": 65, "y": 7 },
|
||||
{ "flags": 4, "matrix": [0, 2], "x": 84, "y": 7 },
|
||||
{ "flags": 4, "matrix": [1, 2], "x": 102, "y": 7 },
|
||||
{ "flags": 4, "matrix": [0, 3], "x": 121, "y": 7 },
|
||||
{ "flags": 4, "matrix": [1, 3], "x": 140, "y": 7 },
|
||||
{ "flags": 4, "matrix": [0, 4], "x": 159, "y": 7 },
|
||||
{ "flags": 4, "matrix": [1, 4], "x": 177, "y": 7 },
|
||||
{ "flags": 4, "matrix": [0, 5], "x": 196, "y": 7 },
|
||||
{ "flags": 1, "matrix": [1, 5], "x": 215, "y": 7 },
|
||||
|
||||
{ "flags": 1, "matrix": [3, 5], "x": 215, "y": 19 },
|
||||
{ "flags": 4, "matrix": [2, 5], "x": 196, "y": 19 },
|
||||
{ "flags": 4, "matrix": [3, 4], "x": 177, "y": 19 },
|
||||
{ "flags": 4, "matrix": [2, 4], "x": 159, "y": 19 },
|
||||
{ "flags": 4, "matrix": [3, 3], "x": 140, "y": 19 },
|
||||
{ "flags": 4, "matrix": [2, 3], "x": 121, "y": 19 },
|
||||
{ "flags": 4, "matrix": [3, 2], "x": 102, "y": 19 },
|
||||
{ "flags": 4, "matrix": [2, 2], "x": 84, "y": 19 },
|
||||
{ "flags": 4, "matrix": [3, 1], "x": 65, "y": 19 },
|
||||
{ "flags": 4, "matrix": [2, 1], "x": 46, "y": 19 },
|
||||
{ "flags": 4, "matrix": [3, 0], "x": 28, "y": 19 },
|
||||
{ "flags": 1, "matrix": [2, 0], "x": 9, "y": 19 },
|
||||
|
||||
{ "flags": 1, "matrix": [4, 0], "x": 9, "y": 32 },
|
||||
{ "flags": 4, "matrix": [5, 0], "x": 28, "y": 32 },
|
||||
{ "flags": 4, "matrix": [4, 1], "x": 46, "y": 32 },
|
||||
{ "flags": 4, "matrix": [5, 1], "x": 65, "y": 32 },
|
||||
{ "flags": 4, "matrix": [4, 2], "x": 84, "y": 32 },
|
||||
{ "flags": 4, "matrix": [5, 2], "x": 102, "y": 32 },
|
||||
{ "flags": 4, "matrix": [4, 3], "x": 121, "y": 32 },
|
||||
{ "flags": 4, "matrix": [5, 3], "x": 140, "y": 32 },
|
||||
{ "flags": 4, "matrix": [4, 4], "x": 159, "y": 32 },
|
||||
{ "flags": 4, "matrix": [5, 4], "x": 177, "y": 32 },
|
||||
{ "flags": 4, "matrix": [4, 5], "x": 196, "y": 32 },
|
||||
{ "flags": 1, "matrix": [5, 5], "x": 215, "y": 32 },
|
||||
|
||||
{ "flags": 1, "matrix": [7, 5], "x": 215, "y": 45 },
|
||||
{ "flags": 4, "matrix": [6, 5], "x": 196, "y": 45 },
|
||||
{ "flags": 4, "matrix": [7, 4], "x": 177, "y": 45 },
|
||||
{ "flags": 4, "matrix": [6, 4], "x": 159, "y": 45 },
|
||||
{ "flags": 4, "matrix": [7, 3], "x": 140, "y": 45 },
|
||||
{ "flags": 4, "matrix": [6, 3], "x": 121, "y": 45 },
|
||||
{ "flags": 4, "matrix": [7, 2], "x": 102, "y": 45 },
|
||||
{ "flags": 4, "matrix": [6, 2], "x": 84, "y": 45 },
|
||||
{ "flags": 4, "matrix": [7, 1], "x": 65, "y": 45 },
|
||||
{ "flags": 4, "matrix": [6, 1], "x": 46, "y": 45 },
|
||||
{ "flags": 4, "matrix": [7, 0], "x": 28, "y": 45 },
|
||||
{ "flags": 4, "matrix": [6, 0], "x": 9, "y": 45 },
|
||||
|
||||
{ "flags": 1, "matrix": [8, 0], "x": 9, "y": 57 },
|
||||
{ "flags": 1, "matrix": [9, 0], "x": 28, "y": 57 },
|
||||
{ "flags": 1, "matrix": [8, 1], "x": 46, "y": 57 },
|
||||
{ "flags": 1, "matrix": [9, 1], "x": 65, "y": 57 },
|
||||
{ "flags": 1, "matrix": [8, 2], "x": 84, "y": 57 },
|
||||
{ "flags": 1, "matrix": [9, 2], "x": 112, "y": 57 },
|
||||
{ "flags": 1, "matrix": [9, 3], "x": 140, "y": 57 },
|
||||
{ "flags": 1, "matrix": [8, 4], "x": 159, "y": 57 },
|
||||
{ "flags": 1, "matrix": [9, 4], "x": 177, "y": 57 },
|
||||
{ "flags": 1, "matrix": [8, 5], "x": 196, "y": 57 },
|
||||
{ "flags": 1, "matrix": [9, 5], "x": 215, "y": 57 }
|
||||
]
|
||||
},
|
||||
"layouts": {
|
||||
"LAYOUT_ortho_5x12": {
|
||||
"layout": [
|
||||
{ "matrix": [0, 6], "x": 11, "y": 0 },
|
||||
|
||||
{ "matrix": [0, 0], "x": 0, "y": 1 },
|
||||
{ "matrix": [1, 0], "x": 1, "y": 1 },
|
||||
{ "matrix": [0, 1], "x": 2, "y": 1 },
|
||||
{ "matrix": [1, 1], "x": 3, "y": 1 },
|
||||
{ "matrix": [0, 2], "x": 4, "y": 1 },
|
||||
{ "matrix": [1, 2], "x": 5, "y": 1 },
|
||||
{ "matrix": [0, 3], "x": 6, "y": 1 },
|
||||
{ "matrix": [1, 3], "x": 7, "y": 1 },
|
||||
{ "matrix": [0, 4], "x": 8, "y": 1 },
|
||||
{ "matrix": [1, 4], "x": 9, "y": 1 },
|
||||
{ "matrix": [0, 5], "x": 10, "y": 1 },
|
||||
{ "matrix": [1, 5], "x": 11, "y": 1 },
|
||||
|
||||
{ "matrix": [2, 0], "x": 0, "y": 2 },
|
||||
{ "matrix": [3, 0], "x": 1, "y": 2 },
|
||||
{ "matrix": [2, 1], "x": 2, "y": 2 },
|
||||
{ "matrix": [3, 1], "x": 3, "y": 2 },
|
||||
{ "matrix": [2, 2], "x": 4, "y": 2 },
|
||||
{ "matrix": [3, 2], "x": 5, "y": 2 },
|
||||
{ "matrix": [2, 3], "x": 6, "y": 2 },
|
||||
{ "matrix": [3, 3], "x": 7, "y": 2 },
|
||||
{ "matrix": [2, 4], "x": 8, "y": 2 },
|
||||
{ "matrix": [3, 4], "x": 9, "y": 2 },
|
||||
{ "matrix": [2, 5], "x": 10, "y": 2 },
|
||||
{ "matrix": [3, 5], "x": 11, "y": 2 },
|
||||
|
||||
{ "matrix": [4, 0], "x": 0, "y": 3 },
|
||||
{ "matrix": [5, 0], "x": 1, "y": 3 },
|
||||
{ "matrix": [4, 1], "x": 2, "y": 3 },
|
||||
{ "matrix": [5, 1], "x": 3, "y": 3 },
|
||||
{ "matrix": [4, 2], "x": 4, "y": 3 },
|
||||
{ "matrix": [5, 2], "x": 5, "y": 3 },
|
||||
{ "matrix": [4, 3], "x": 6, "y": 3 },
|
||||
{ "matrix": [5, 3], "x": 7, "y": 3 },
|
||||
{ "matrix": [4, 4], "x": 8, "y": 3 },
|
||||
{ "matrix": [5, 4], "x": 9, "y": 3 },
|
||||
{ "matrix": [4, 5], "x": 10, "y": 3 },
|
||||
{ "matrix": [5, 5], "x": 11, "y": 3 },
|
||||
|
||||
{ "matrix": [6, 0], "x": 0, "y": 4 },
|
||||
{ "matrix": [7, 0], "x": 1, "y": 4 },
|
||||
{ "matrix": [6, 1], "x": 2, "y": 4 },
|
||||
{ "matrix": [7, 1], "x": 3, "y": 4 },
|
||||
{ "matrix": [6, 2], "x": 4, "y": 4 },
|
||||
{ "matrix": [7, 2], "x": 5, "y": 4 },
|
||||
{ "matrix": [6, 3], "x": 6, "y": 4 },
|
||||
{ "matrix": [7, 3], "x": 7, "y": 4 },
|
||||
{ "matrix": [6, 4], "x": 8, "y": 4 },
|
||||
{ "matrix": [7, 4], "x": 9, "y": 4 },
|
||||
{ "matrix": [6, 5], "x": 10, "y": 4 },
|
||||
{ "matrix": [7, 5], "x": 11, "y": 4 },
|
||||
|
||||
{ "matrix": [8, 0], "x": 0, "y": 5 },
|
||||
{ "matrix": [9, 0], "x": 1, "y": 5 },
|
||||
{ "matrix": [8, 1], "x": 2, "y": 5 },
|
||||
{ "matrix": [9, 1], "x": 3, "y": 5 },
|
||||
{ "matrix": [8, 2], "x": 4, "y": 5 },
|
||||
{ "matrix": [9, 2], "x": 5, "y": 5 },
|
||||
{ "matrix": [8, 3], "x": 6, "y": 5 },
|
||||
{ "matrix": [9, 3], "x": 7, "y": 5 },
|
||||
{ "matrix": [8, 4], "x": 8, "y": 5 },
|
||||
{ "matrix": [9, 4], "x": 9, "y": 5 },
|
||||
{ "matrix": [8, 5], "x": 10, "y": 5 },
|
||||
{ "matrix": [9, 5], "x": 11, "y": 5 }
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,242 @@
|
||||
/* Copyright 2023 ziptyze
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "quantum.h"
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#if defined(RGB_MATRIX_EFFECT)
|
||||
# undef RGB_MATRIX_EFFECT
|
||||
#endif // defined(RGB_MATRIX_EFFECT)
|
||||
|
||||
#define RGB_MATRIX_EFFECT(x) RGB_MATRIX_EFFECT_##x,
|
||||
enum {
|
||||
RGB_MATRIX_EFFECT_NONE,
|
||||
#include "rgb_matrix_effects.inc"
|
||||
#undef RGB_MATRIX_EFFECT
|
||||
#ifdef RGB_MATRIX_CUSTOM_KB
|
||||
# include "rgb_matrix_kb.inc"
|
||||
#endif
|
||||
#ifdef RGB_MATRIX_CUSTOM_USER
|
||||
# include "rgb_matrix_user.inc"
|
||||
#endif
|
||||
};
|
||||
|
||||
#define RGB_MATRIX_EFFECT(x) \
|
||||
case RGB_MATRIX_EFFECT_##x: \
|
||||
return #x;
|
||||
const char* rgb_matrix_name(uint8_t effect) {
|
||||
switch (effect) {
|
||||
case RGB_MATRIX_EFFECT_NONE:
|
||||
return "NONE";
|
||||
#include "rgb_matrix_effects.inc"
|
||||
#undef RGB_MATRIX_EFFECT
|
||||
#ifdef RGB_MATRIX_CUSTOM_KB
|
||||
# include "rgb_matrix_kb.inc"
|
||||
#endif
|
||||
#ifdef RGB_MATRIX_CUSTOM_USER
|
||||
# include "rgb_matrix_user.inc"
|
||||
#endif
|
||||
default:
|
||||
return "UNKNOWN";
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef OLED_ENABLE
|
||||
|
||||
static uint32_t oled_logo_timer = 0;
|
||||
static bool clear_logo = true;
|
||||
static const char PROGMEM my_logo[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f,
|
||||
0xff, 0xff, 0xff, 0xff, 0x0f, 0x0f, 0x0f, 0x0f, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x0f, 0x0f, 0x0f,
|
||||
0x0f, 0x0f, 0x0f, 0x1f, 0xff, 0xff, 0xff, 0x1f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f,
|
||||
0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
|
||||
0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0,
|
||||
0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x0f, 0x0f, 0x0f, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xfb,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xff,
|
||||
0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef OLED_ENABLE
|
||||
|
||||
void init_timer(void){
|
||||
oled_logo_timer = timer_read32();
|
||||
};
|
||||
|
||||
void user_oled_magic(void) {
|
||||
// Host Keyboard Layer Status
|
||||
oled_write_P(PSTR("Layer: "), false);
|
||||
|
||||
switch (get_highest_layer(layer_state)) {
|
||||
case 0:
|
||||
oled_write_P(PSTR("One\n"), false);
|
||||
break;
|
||||
case 1:
|
||||
oled_write_P(PSTR("Two\n"), false);
|
||||
break;
|
||||
case 2:
|
||||
oled_write_P(PSTR("Three\n"), false);
|
||||
break;
|
||||
case 3:
|
||||
oled_write_P(PSTR("Four\n"), false);
|
||||
break;
|
||||
case 4:
|
||||
oled_write_P(PSTR("Five\n"), false);
|
||||
break;
|
||||
case 5:
|
||||
oled_write_P(PSTR("Six\n"), false);
|
||||
break;
|
||||
case 6:
|
||||
oled_write_P(PSTR("Seven\n"), false);
|
||||
break;
|
||||
case 7:
|
||||
oled_write_P(PSTR("Eight\n"), false);
|
||||
break;
|
||||
case 8:
|
||||
oled_write_P(PSTR("Nine\n"), false);
|
||||
break;
|
||||
case 9:
|
||||
oled_write_P(PSTR("Ten\n"), false);
|
||||
break;
|
||||
default:
|
||||
// Or use the write_ln shortcut over adding '\n' to the end of your string
|
||||
oled_write_ln_P(PSTR("Undefined"), false);
|
||||
}
|
||||
|
||||
// Host Keyboard LED Status
|
||||
led_t led_state = host_keyboard_led_state();
|
||||
oled_write_P(led_state.caps_lock ? PSTR("Cap(x) ") : PSTR("Cap( ) "), false);
|
||||
oled_write_P(led_state.num_lock ? PSTR("Num(x) ") : PSTR("Num( ) "), false);
|
||||
oled_write_P(led_state.scroll_lock ? PSTR("Scrl(x)") : PSTR("Scrl( )"), false);
|
||||
|
||||
char *mode_name = strdup(rgb_matrix_name(rgb_matrix_get_mode()));
|
||||
if (mode_name != NULL) {
|
||||
int len = strlen(mode_name);
|
||||
bool capitalize_next = true;
|
||||
for (int i = 0; i < len; i++) {
|
||||
if (i == 21 && mode_name[i] == '_') {
|
||||
continue; // Skip the underscore if it's the 22nd character
|
||||
}
|
||||
if (mode_name[i] == '_') {
|
||||
mode_name[i] = ' ';
|
||||
capitalize_next = true;
|
||||
} else if (capitalize_next) {
|
||||
mode_name[i] = mode_name[i] >= 'a' && mode_name[i] <= 'z' ? mode_name[i] - 'a' + 'A' : mode_name[i];
|
||||
capitalize_next = false;
|
||||
} else {
|
||||
mode_name[i] = mode_name[i] >= 'A' && mode_name[i] <= 'Z' ? mode_name[i] - 'A' + 'a' : mode_name[i];
|
||||
}
|
||||
}
|
||||
|
||||
// Add line break and spaces if necessary
|
||||
if (len < 19) {
|
||||
strcat(mode_name, "\n");
|
||||
for (int i = 0; i < 21; i++) {
|
||||
strcat(mode_name, " ");
|
||||
}
|
||||
} else {
|
||||
// Find the most recent ' ' before the 21st character and replace it with a line break
|
||||
int break_pos = -1;
|
||||
for (int i = 18; i >= 0; i--) {
|
||||
if (mode_name[i] == ' ') {
|
||||
break_pos = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (break_pos >= 0) {
|
||||
mode_name[break_pos] = '\n';
|
||||
for (int i = 0; i < (21 - (len - break_pos - 1)); i++) {
|
||||
strcat(mode_name, " ");
|
||||
}
|
||||
} else {
|
||||
// No '_' found, just add spaces
|
||||
for (int i = 0; i < (21 - len); i++) {
|
||||
strcat(mode_name, " ");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
oled_write_P(PSTR(mode_name), false);
|
||||
free(mode_name);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
void render_logo(void) {
|
||||
oled_write_raw_P(my_logo, sizeof(my_logo));
|
||||
}
|
||||
|
||||
void clear_screen(void) {
|
||||
if (clear_logo){
|
||||
for (uint8_t i = 0; i < OLED_DISPLAY_HEIGHT; ++i) {
|
||||
for (uint8_t j = 0; j < OLED_DISPLAY_WIDTH; ++j) {
|
||||
oled_write_raw_byte(0x0, i*OLED_DISPLAY_WIDTH + j);
|
||||
}
|
||||
}
|
||||
clear_logo = false;
|
||||
}
|
||||
}
|
||||
|
||||
oled_rotation_t oled_init_kb(oled_rotation_t rotation) {
|
||||
return OLED_ROTATION_180;
|
||||
}
|
||||
|
||||
void keyboard_post_init_kb(void) {
|
||||
init_timer();
|
||||
|
||||
keyboard_post_init_user();
|
||||
}
|
||||
|
||||
# define SHOW_LOGO 5000
|
||||
bool oled_task_kb(void) {
|
||||
if (!oled_task_user()) { return false; }
|
||||
if ((timer_elapsed32(oled_logo_timer) < SHOW_LOGO)){
|
||||
render_logo();
|
||||
}else{
|
||||
clear_screen();
|
||||
user_oled_magic();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,36 @@
|
||||
# pi50
|
||||
|
||||
The pi40 is a 5x12 ortholinear keyboard with options for a 1u or 2u spacebar using a Raspberry Pi Pico for the controller.
|
||||
|
||||
It includes options for a rotary encoder, SSD1306 oled, and per-key in-switch RGB LEDs.
|
||||
|
||||
All unused GPIO pins are broken out on the main pcb, as well as the available voltage pins.
|
||||
|
||||
This firmware also includes the option for VIA which includes configuration options for the rotary encoder, matrix lighting, and up to 10 layers.
|
||||
|
||||
Default oled configuration displays:
|
||||
- current layer
|
||||
- caps lock status
|
||||
- num lock status
|
||||
- scroll lock status
|
||||
- current RGB lighting mode
|
||||
|
||||
* Keyboard Maintainer: [ziptyze](https://github.com/ziptyze)
|
||||
* Hardware Availability: (https://1upkeyboards.com/shop/keyboard-kits/diy-40-kits/pi50-keyboard-kit/#pcb-color)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make 1upkeyboards/pi50:default
|
||||
|
||||
Flashing example for this keyboard:
|
||||
|
||||
make 1upkeyboards/pi50:default:flash
|
||||
|
||||
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||
|
||||
## Bootloader
|
||||
|
||||
Enter the bootloader in 2 ways:
|
||||
|
||||
* **Bootmagic reset**: Hold down the key at (0,0) in the matrix, the top left key, and plug in the keyboard
|
||||
* **BOOTSEL button**: Hold down the BOOTSEL button on the pico, and plug in the keyboard
|
||||
@@ -0,0 +1,5 @@
|
||||
WS2812_DRIVER = vendor
|
||||
|
||||
OLED_ENABLE = yes
|
||||
|
||||
DEFAULT_FOLDER = 1upkeyboards/pi50/grid
|
||||
@@ -0,0 +1,22 @@
|
||||
# Gherkin
|
||||
|
||||

|
||||

|
||||
|
||||
===
|
||||
|
||||
A 30 key keyboard with Adafruit's KB2040 as microcontroller.
|
||||
|
||||
* [The original TMK firmware](https://github.com/di0ib/tmk_keyboard/tree/master/keyboard/gherkin)
|
||||
|
||||
Keyboard Maintainer: QMK Community
|
||||
Hardware Supported: Gherkin PCB & Adafruit KB2040
|
||||
Hardware Availability: [Gherkin project on 40% Keyboards](http://www.40percent.club/2016/11/gherkin.html) and [Adafruit KB2040](https://www.adafruit.com/product/5302)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make 40percentclub/gherkin/kb2040:default
|
||||
|
||||
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||
|
||||
Use the KB2040 microcontroller as a drop-in replacement for the Pro Micro in this cute 30% keyboard.
|
||||
@@ -0,0 +1 @@
|
||||
CONVERT_TO = kb2040
|
||||
@@ -1,6 +1,6 @@
|
||||
# Gherkin
|
||||
|
||||

|
||||

|
||||
===
|
||||
|
||||
A 30 key keyboard.
|
||||
|
||||
@@ -0,0 +1,155 @@
|
||||
{
|
||||
"manufacturer": "4pplet",
|
||||
"url": "",
|
||||
"maintainer": "4pplet",
|
||||
"usb": {
|
||||
"vid": "0x4444"
|
||||
},
|
||||
"community_layouts": [
|
||||
"60_iso_tsangan"
|
||||
],
|
||||
"layouts": {
|
||||
"LAYOUT_all": {
|
||||
"layout": [
|
||||
{"label": "Esc", "matrix": [0, 0], "x": 0, "y": 0, "w": 1.25},
|
||||
{"label": "1", "matrix": [0, 1], "x": 1.25, "y": 0},
|
||||
{"label": "2", "matrix": [0, 2], "x": 2.25, "y": 0},
|
||||
{"label": "3", "matrix": [0, 3], "x": 3.25, "y": 0},
|
||||
{"label": "4", "matrix": [0, 4], "x": 4.25, "y": 0},
|
||||
{"label": "5", "matrix": [0, 5], "x": 5.25, "y": 0},
|
||||
{"label": "6", "matrix": [0, 6], "x": 6.25, "y": 0},
|
||||
{"label": "7", "matrix": [0, 7], "x": 7.25, "y": 0},
|
||||
{"label": "8", "matrix": [0, 8], "x": 8.25, "y": 0},
|
||||
{"label": "9", "matrix": [0, 9], "x": 9.25, "y": 0},
|
||||
{"label": "0", "matrix": [0, 10], "x": 10.25, "y": 0},
|
||||
{"label": "-", "matrix": [0, 11], "x": 11.25, "y": 0},
|
||||
{"label": "=", "matrix": [0, 12], "x": 12.25, "y": 0},
|
||||
{"label": "Backspace", "matrix": [0, 13], "x": 13.25, "y": 0, "w": 1.75},
|
||||
|
||||
{"label": "Tab", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.75},
|
||||
{"label": "Q", "matrix": [1, 1], "x": 1.75, "y": 1},
|
||||
{"label": "W", "matrix": [1, 2], "x": 2.75, "y": 1},
|
||||
{"label": "E", "matrix": [1, 3], "x": 3.75, "y": 1},
|
||||
{"label": "R", "matrix": [1, 4], "x": 4.75, "y": 1},
|
||||
{"label": "T", "matrix": [1, 5], "x": 5.75, "y": 1},
|
||||
{"label": "Y", "matrix": [1, 6], "x": 6.75, "y": 1},
|
||||
{"label": "U", "matrix": [1, 7], "x": 7.75, "y": 1},
|
||||
{"label": "I", "matrix": [1, 8], "x": 8.75, "y": 1},
|
||||
{"label": "O", "matrix": [1, 9], "x": 9.75, "y": 1},
|
||||
{"label": "P", "matrix": [1, 10], "x": 10.75, "y": 1},
|
||||
{"label": "[", "matrix": [1, 11], "x": 11.75, "y": 1},
|
||||
{"label": "]", "matrix": [1, 12], "x": 12.75, "y": 1},
|
||||
|
||||
{"label": "Ctrl", "matrix": [2, 0], "x": 0, "y": 2, "w": 2},
|
||||
{"label": "A", "matrix": [2, 1], "x": 2, "y": 2},
|
||||
{"label": "S", "matrix": [2, 2], "x": 3, "y": 2},
|
||||
{"label": "D", "matrix": [2, 3], "x": 4, "y": 2},
|
||||
{"label": "F", "matrix": [2, 4], "x": 5, "y": 2},
|
||||
{"label": "G", "matrix": [2, 5], "x": 6, "y": 2},
|
||||
{"label": "H", "matrix": [2, 6], "x": 7, "y": 2},
|
||||
{"label": "J", "matrix": [2, 7], "x": 8, "y": 2},
|
||||
{"label": "K", "matrix": [2, 8], "x": 9, "y": 2},
|
||||
{"label": "L", "matrix": [2, 9], "x": 10, "y": 2},
|
||||
{"label": ";", "matrix": [2, 10], "x": 11, "y": 2},
|
||||
{"label": "'", "matrix": [2, 11], "x": 12, "y": 2},
|
||||
{"label": "#", "matrix": [2, 12], "x": 13, "y": 2},
|
||||
{"label": "Enter", "matrix": [1, 13], "x": 14, "y": 1, "h": 2},
|
||||
|
||||
{"label": "Shift", "matrix": [3, 0], "x": 0, "y": 3, "w": 1.5},
|
||||
{"label": "\\", "matrix": [3, 1], "x": 1.5, "y": 3},
|
||||
{"label": "Z", "matrix": [3, 2], "x": 2.5, "y": 3},
|
||||
{"label": "X", "matrix": [3, 3], "x": 3.5, "y": 3},
|
||||
{"label": "C", "matrix": [3, 4], "x": 4.5, "y": 3},
|
||||
{"label": "V", "matrix": [3, 5], "x": 5.5, "y": 3},
|
||||
{"label": "B", "matrix": [3, 6], "x": 6.5, "y": 3},
|
||||
{"label": "N", "matrix": [3, 7], "x": 7.5, "y": 3},
|
||||
{"label": "M", "matrix": [3, 8], "x": 8.5, "y": 3},
|
||||
{"label": ",", "matrix": [3, 9], "x": 9.5, "y": 3},
|
||||
{"label": ".", "matrix": [3, 10], "x": 10.5, "y": 3},
|
||||
{"label": "/", "matrix": [3, 11], "x": 11.5, "y": 3},
|
||||
{"label": "Shift", "matrix": [3, 12], "x": 12.5, "y": 3, "w": 1.5},
|
||||
{"label": "Fn", "matrix": [3, 13], "x": 14, "y": 3},
|
||||
|
||||
{"label": "Ctrl", "matrix": [4, 0], "x": 0, "y": 4, "w": 1.5},
|
||||
{"label": "GUI", "matrix": [4, 1], "x": 1.5, "y": 4, "w": 1.25},
|
||||
{"label": "Alt", "matrix": [4, 3], "x": 2.75, "y": 4, "w": 1.5},
|
||||
{"label": "\u25bd", "matrix": [4, 4], "x": 4.25, "y": 4, "w": 2.75},
|
||||
{"label": "Space", "matrix": [4, 5], "x": 7, "y": 4},
|
||||
{"label": "\u25bd", "matrix": [4, 6], "x": 8, "y": 4, "w": 2.75},
|
||||
{"label": "Alt", "matrix": [4, 8], "x": 10.75, "y": 4, "w": 1.5},
|
||||
{"label": "GUI", "matrix": [4, 10], "x": 12.25, "y": 4, "w": 1.25},
|
||||
{"label": "Ctrl", "matrix": [4, 11], "x": 13.5, "y": 4, "w": 1.5}
|
||||
]
|
||||
},
|
||||
|
||||
"LAYOUT_60_iso_tsangan": {
|
||||
"layout": [
|
||||
{"label": "Esc", "matrix": [0, 0], "x": 0, "y": 0, "w": 1.25},
|
||||
{"label": "1", "matrix": [0, 1], "x": 1.25, "y": 0},
|
||||
{"label": "2", "matrix": [0, 2], "x": 2.25, "y": 0},
|
||||
{"label": "3", "matrix": [0, 3], "x": 3.25, "y": 0},
|
||||
{"label": "4", "matrix": [0, 4], "x": 4.25, "y": 0},
|
||||
{"label": "5", "matrix": [0, 5], "x": 5.25, "y": 0},
|
||||
{"label": "6", "matrix": [0, 6], "x": 6.25, "y": 0},
|
||||
{"label": "7", "matrix": [0, 7], "x": 7.25, "y": 0},
|
||||
{"label": "8", "matrix": [0, 8], "x": 8.25, "y": 0},
|
||||
{"label": "9", "matrix": [0, 9], "x": 9.25, "y": 0},
|
||||
{"label": "0", "matrix": [0, 10], "x": 10.25, "y": 0},
|
||||
{"label": "-", "matrix": [0, 11], "x": 11.25, "y": 0},
|
||||
{"label": "=", "matrix": [0, 12], "x": 12.25, "y": 0},
|
||||
{"label": "Backspace", "matrix": [0, 13], "x": 13.25, "y": 0, "w": 1.75},
|
||||
|
||||
{"label": "Tab", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.75},
|
||||
{"label": "Q", "matrix": [1, 1], "x": 1.75, "y": 1},
|
||||
{"label": "W", "matrix": [1, 2], "x": 2.75, "y": 1},
|
||||
{"label": "E", "matrix": [1, 3], "x": 3.75, "y": 1},
|
||||
{"label": "R", "matrix": [1, 4], "x": 4.75, "y": 1},
|
||||
{"label": "T", "matrix": [1, 5], "x": 5.75, "y": 1},
|
||||
{"label": "Y", "matrix": [1, 6], "x": 6.75, "y": 1},
|
||||
{"label": "U", "matrix": [1, 7], "x": 7.75, "y": 1},
|
||||
{"label": "I", "matrix": [1, 8], "x": 8.75, "y": 1},
|
||||
{"label": "O", "matrix": [1, 9], "x": 9.75, "y": 1},
|
||||
{"label": "P", "matrix": [1, 10], "x": 10.75, "y": 1},
|
||||
{"label": "[", "matrix": [1, 11], "x": 11.75, "y": 1},
|
||||
{"label": "]", "matrix": [1, 12], "x": 12.75, "y": 1},
|
||||
|
||||
{"label": "Ctrl", "matrix": [2, 0], "x": 0, "y": 2, "w": 2},
|
||||
{"label": "A", "matrix": [2, 1], "x": 2, "y": 2},
|
||||
{"label": "S", "matrix": [2, 2], "x": 3, "y": 2},
|
||||
{"label": "D", "matrix": [2, 3], "x": 4, "y": 2},
|
||||
{"label": "F", "matrix": [2, 4], "x": 5, "y": 2},
|
||||
{"label": "G", "matrix": [2, 5], "x": 6, "y": 2},
|
||||
{"label": "H", "matrix": [2, 6], "x": 7, "y": 2},
|
||||
{"label": "J", "matrix": [2, 7], "x": 8, "y": 2},
|
||||
{"label": "K", "matrix": [2, 8], "x": 9, "y": 2},
|
||||
{"label": "L", "matrix": [2, 9], "x": 10, "y": 2},
|
||||
{"label": ";", "matrix": [2, 10], "x": 11, "y": 2},
|
||||
{"label": "'", "matrix": [2, 11], "x": 12, "y": 2},
|
||||
{"label": "#", "matrix": [2, 12], "x": 13, "y": 2},
|
||||
{"label": "Enter", "matrix": [1, 13], "x": 14, "y": 1, "h": 2},
|
||||
|
||||
{"label": "Shift", "matrix": [3, 0], "x": 0, "y": 3, "w": 1.5},
|
||||
{"label": "\\", "matrix": [3, 1], "x": 1.5, "y": 3},
|
||||
{"label": "Z", "matrix": [3, 2], "x": 2.5, "y": 3},
|
||||
{"label": "X", "matrix": [3, 3], "x": 3.5, "y": 3},
|
||||
{"label": "C", "matrix": [3, 4], "x": 4.5, "y": 3},
|
||||
{"label": "V", "matrix": [3, 5], "x": 5.5, "y": 3},
|
||||
{"label": "B", "matrix": [3, 6], "x": 6.5, "y": 3},
|
||||
{"label": "N", "matrix": [3, 7], "x": 7.5, "y": 3},
|
||||
{"label": "M", "matrix": [3, 8], "x": 8.5, "y": 3},
|
||||
{"label": ",", "matrix": [3, 9], "x": 9.5, "y": 3},
|
||||
{"label": ".", "matrix": [3, 10], "x": 10.5, "y": 3},
|
||||
{"label": "/", "matrix": [3, 11], "x": 11.5, "y": 3},
|
||||
{"label": "Shift", "matrix": [3, 12], "x": 12.5, "y": 3, "w": 2.5},
|
||||
|
||||
{"label": "Ctrl", "matrix": [4, 0], "x": 0, "y": 4, "w": 1.5},
|
||||
{"label": "GUI", "matrix": [4, 1], "x": 1.5, "y": 4, "w": 1.25},
|
||||
{"label": "Alt", "matrix": [4, 3], "x": 2.75, "y": 4, "w": 1.5},
|
||||
{"label": "Space", "matrix": [4, 5], "x": 4.25, "y": 4, "w": 6.5},
|
||||
{"label": "Alt", "matrix": [4, 8], "x": 10.75, "y": 4, "w": 1.5},
|
||||
{"label": "GUI", "matrix": [4, 10], "x": 12.25, "y": 4, "w": 1.25},
|
||||
{"label": "Ctrl", "matrix": [4, 11], "x": 13.5, "y": 4, "w": 1.5}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
# Matrix Diagram for 4pplet AEKISO60 (Revs. A and B)
|
||||
|
||||
```
|
||||
┌────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬──────┐
|
||||
│00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0a │0b │0c │0d │
|
||||
├────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬────┤
|
||||
│10 │11 │12 │13 │14 │15 │16 │17 │18 │19 │1a │1b │1c │ │
|
||||
├──────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐1d │
|
||||
│20 │21 │22 │23 │24 │25 │26 │27 │28 │29 │2a │2b │2c │ │
|
||||
├─────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ ┌─────────┐
|
||||
│30 │31 │32 │33 │34 │35 │36 │37 │38 │39 │3a │3b │3c │3d │ │3c │ 2.75u RShift
|
||||
├─────┼───┴┬──┴──┬┴───┴───┴─┬─┴─┬─┴───┴───┴┬──┴──┬┴───┬─┴───┤ └─────────┘
|
||||
│40 │41 │43 │44 │45 │46 │48 │4a │4b │
|
||||
└─────┴────┴─────┴──────────┴───┴──────────┴─────┴────┴─────┘
|
||||
┌─────┬────┬─────┬─────────────────────────┬─────┬────┬─────┐ ─┐
|
||||
│40 │41 │43 │45 │48 │4a │4b │ ├─ Tsangan
|
||||
└─────┴────┴─────┴─────────────────────────┴─────┴────┴─────┘ │
|
||||
┌─────┬───┬─────┬───────────────────────────┬─────┬───┬─────┐ │
|
||||
│40 │41 │43 │45 │48 │4a │4b │ │
|
||||
└─────┴───┴─────┴───────────────────────────┴─────┴───┴─────┘ ─┘
|
||||
┌─────┬───┬─────┬───────────────────────────┬─────┬───┬─────┐
|
||||
│40 │ │43 │45 │48 │ │4b │ WKL
|
||||
└─────┘ └─────┴───────────────────────────┴─────┘ └─────┘
|
||||
┌─────┬────┬─────┬─────────┬─────┬─────────┬─────┬────┬─────┐ ─┐
|
||||
│40 │41 │43 │44 │45 │46 │48 │4a │4b │ ├─ same matrix as LAYOUT_all
|
||||
└─────┴────┴─────┴─────────┴─────┴─────────┴─────┴────┴─────┘ │
|
||||
┌─────┬────┬─────┬────────┬─────┬──────────┬─────┬────┬─────┐ │
|
||||
│40 │41 │43 │44 │45 │46 │48 │4a │4b │ │
|
||||
└─────┴────┴─────┴────────┴─────┴──────────┴─────┴────┴─────┘ │
|
||||
┌─────┬────┬─────┬─────────┬────┬──────────┬─────┬────┬─────┐ │
|
||||
│40 │41 │43 │44 │45 │46 │48 │4a │4b │ │
|
||||
└─────┴────┴─────┴─────────┴────┴──────────┴─────┴────┴─────┘ ─┘
|
||||
```
|
||||
@@ -1,10 +1,6 @@
|
||||
{
|
||||
"keyboard_name": "AEKISO60 Rev A",
|
||||
"manufacturer": "4pplet",
|
||||
"url": "",
|
||||
"maintainer": "4pplet",
|
||||
"usb": {
|
||||
"vid": "0x4444",
|
||||
"pid": "0x0001",
|
||||
"device_version": "0.0.1"
|
||||
},
|
||||
@@ -13,79 +9,5 @@
|
||||
"esc_output": "C4"
|
||||
},
|
||||
"processor": "atmega32u2",
|
||||
"bootloader": "atmel-dfu",
|
||||
"layouts": {
|
||||
"LAYOUT_all": {
|
||||
"layout": [
|
||||
{"x":0, "y":0, "w":1.25},
|
||||
{"x":1.25, "y":0},
|
||||
{"x":2.25, "y":0},
|
||||
{"x":3.25, "y":0},
|
||||
{"x":4.25, "y":0},
|
||||
{"x":5.25, "y":0},
|
||||
{"x":6.25, "y":0},
|
||||
{"x":7.25, "y":0},
|
||||
{"x":8.25, "y":0},
|
||||
{"x":9.25, "y":0},
|
||||
{"x":10.25, "y":0},
|
||||
{"x":11.25, "y":0},
|
||||
{"x":12.25, "y":0},
|
||||
{"x":13.25, "y":0, "w":1.75},
|
||||
|
||||
{"x":0, "y":1, "w":1.75},
|
||||
{"x":1.75, "y":1},
|
||||
{"x":2.75, "y":1},
|
||||
{"x":3.75, "y":1},
|
||||
{"x":4.75, "y":1},
|
||||
{"x":5.75, "y":1},
|
||||
{"x":6.75, "y":1},
|
||||
{"x":7.75, "y":1},
|
||||
{"x":8.75, "y":1},
|
||||
{"x":9.75, "y":1},
|
||||
{"x":10.75, "y":1},
|
||||
{"x":11.75, "y":1},
|
||||
{"x":12.75, "y":1},
|
||||
|
||||
{"x":0, "y":2, "w":2},
|
||||
{"x":2, "y":2},
|
||||
{"x":3, "y":2},
|
||||
{"x":4, "y":2},
|
||||
{"x":5, "y":2},
|
||||
{"x":6, "y":2},
|
||||
{"x":7, "y":2},
|
||||
{"x":8, "y":2},
|
||||
{"x":9, "y":2},
|
||||
{"x":10, "y":2},
|
||||
{"x":11, "y":2},
|
||||
{"x":12, "y":2},
|
||||
{"x":13, "y":2},
|
||||
{"x":14, "y":1, "h":2},
|
||||
|
||||
{"x":0, "y":3, "w":1.5},
|
||||
{"x":1.5, "y":3},
|
||||
{"x":2.5, "y":3},
|
||||
{"x":3.5, "y":3},
|
||||
{"x":4.5, "y":3},
|
||||
{"x":5.5, "y":3},
|
||||
{"x":6.5, "y":3},
|
||||
{"x":7.5, "y":3},
|
||||
{"x":8.5, "y":3},
|
||||
{"x":9.5, "y":3},
|
||||
{"x":10.5, "y":3},
|
||||
{"x":11.5, "y":3},
|
||||
{"x":12.5, "y":3, "w":1.5},
|
||||
{"x":14, "y":3},
|
||||
|
||||
{"x":0, "y":4, "w":1.5},
|
||||
{"x":1.5, "y":4, "w":1.25},
|
||||
{"x":2.75, "y":4, "w":1.5},
|
||||
{"x":4.25, "y":4, "w":2.75},
|
||||
{"x":7, "y":4},
|
||||
{"x":8, "y":4, "w":2.75},
|
||||
{"x":10.75, "y":4, "w":1.5},
|
||||
{"x":12.25, "y":4, "w":1.25},
|
||||
{"x":13.5, "y":4, "w":1.5}
|
||||
]
|
||||
}
|
||||
}
|
||||
"bootloader": "atmel-dfu"
|
||||
}
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
#include "rev_a.h"
|
||||
@@ -1,31 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
/* LAYOUT_all
|
||||
* ┌────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬──────┐
|
||||
* │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0a │0b │0c │0d │
|
||||
* ├────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬────┤
|
||||
* │10 │11 │12 │13 │14 │15 │16 │17 │18 │19 │1a │1b │1c │ │
|
||||
* ├──────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐1d │
|
||||
* │20 │21 │22 │23 │24 │25 │26 │27 │28 │29 │2a │2b │2c │ │
|
||||
* ├─────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤
|
||||
* │30 │31 │32 │33 │34 │35 │36 │37 │38 │39 │3a │3b │3c │3d │
|
||||
* ├─────┼───┴┬──┴──┬┴───┴───┴─┬─┴─┬─┴───┴───┴┬──┴──┬┴───┬─┴───┤
|
||||
* │40 │41 │43 │44 │45 │46 │48 │4a │4b │
|
||||
* └─────┴────┴─────┴──────────┴───┴──────────┴─────┴────┴─────┘
|
||||
*/
|
||||
#define LAYOUT_all( \
|
||||
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, \
|
||||
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \
|
||||
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k1d, \
|
||||
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \
|
||||
k40, k41, k43, k44, k45, k46, k48, k4a, k4b \
|
||||
) \
|
||||
{ \
|
||||
{k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d}, \
|
||||
{k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d}, \
|
||||
{k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, KC_NO},\
|
||||
{k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d}, \
|
||||
{k40, k41, KC_NO, k43, k44, k45, k46, KC_NO, k48, KC_NO, k4a, k4b, KC_NO, KC_NO} \
|
||||
}
|
||||
@@ -1,10 +1,6 @@
|
||||
{
|
||||
"keyboard_name": "AEKISO60 Rev B",
|
||||
"manufacturer": "4pplet",
|
||||
"url": "",
|
||||
"maintainer": "4pplet",
|
||||
"usb": {
|
||||
"vid": "0x4444",
|
||||
"pid": "0x0011",
|
||||
"device_version": "0.0.2"
|
||||
},
|
||||
@@ -12,79 +8,5 @@
|
||||
"caps_lock": "A10"
|
||||
},
|
||||
"processor": "STM32F072",
|
||||
"bootloader": "stm32-dfu",
|
||||
"layouts": {
|
||||
"LAYOUT_all": {
|
||||
"layout": [
|
||||
{"x":0, "y":0, "w":1.25},
|
||||
{"x":1.25, "y":0},
|
||||
{"x":2.25, "y":0},
|
||||
{"x":3.25, "y":0},
|
||||
{"x":4.25, "y":0},
|
||||
{"x":5.25, "y":0},
|
||||
{"x":6.25, "y":0},
|
||||
{"x":7.25, "y":0},
|
||||
{"x":8.25, "y":0},
|
||||
{"x":9.25, "y":0},
|
||||
{"x":10.25, "y":0},
|
||||
{"x":11.25, "y":0},
|
||||
{"x":12.25, "y":0},
|
||||
{"x":13.25, "y":0, "w":1.75},
|
||||
|
||||
{"x":0, "y":1, "w":1.75},
|
||||
{"x":1.75, "y":1},
|
||||
{"x":2.75, "y":1},
|
||||
{"x":3.75, "y":1},
|
||||
{"x":4.75, "y":1},
|
||||
{"x":5.75, "y":1},
|
||||
{"x":6.75, "y":1},
|
||||
{"x":7.75, "y":1},
|
||||
{"x":8.75, "y":1},
|
||||
{"x":9.75, "y":1},
|
||||
{"x":10.75, "y":1},
|
||||
{"x":11.75, "y":1},
|
||||
{"x":12.75, "y":1},
|
||||
|
||||
{"x":0, "y":2, "w":2},
|
||||
{"x":2, "y":2},
|
||||
{"x":3, "y":2},
|
||||
{"x":4, "y":2},
|
||||
{"x":5, "y":2},
|
||||
{"x":6, "y":2},
|
||||
{"x":7, "y":2},
|
||||
{"x":8, "y":2},
|
||||
{"x":9, "y":2},
|
||||
{"x":10, "y":2},
|
||||
{"x":11, "y":2},
|
||||
{"x":12, "y":2},
|
||||
{"x":13, "y":2},
|
||||
{"x":14, "y":1, "h":2},
|
||||
|
||||
{"x":0, "y":3, "w":1.5},
|
||||
{"x":1.5, "y":3},
|
||||
{"x":2.5, "y":3},
|
||||
{"x":3.5, "y":3},
|
||||
{"x":4.5, "y":3},
|
||||
{"x":5.5, "y":3},
|
||||
{"x":6.5, "y":3},
|
||||
{"x":7.5, "y":3},
|
||||
{"x":8.5, "y":3},
|
||||
{"x":9.5, "y":3},
|
||||
{"x":10.5, "y":3},
|
||||
{"x":11.5, "y":3},
|
||||
{"x":12.5, "y":3, "w":1.5},
|
||||
{"x":14, "y":3},
|
||||
|
||||
{"x":0, "y":4, "w":1.5},
|
||||
{"x":1.5, "y":4, "w":1.25},
|
||||
{"x":2.75, "y":4, "w":1.5},
|
||||
{"x":4.25, "y":4, "w":2.75},
|
||||
{"x":7, "y":4},
|
||||
{"x":8, "y":4, "w":2.75},
|
||||
{"x":10.75, "y":4, "w":1.5},
|
||||
{"x":12.25, "y":4, "w":1.25},
|
||||
{"x":13.5, "y":4, "w":1.5}
|
||||
]
|
||||
}
|
||||
}
|
||||
"bootloader": "stm32-dfu"
|
||||
}
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
/*
|
||||
Copyright 2022 Stefan Sundin "4pplet" <4pplet@protonmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
/* LAYOUT_all
|
||||
* ┌────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬──────┐
|
||||
* │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0a │0b │0c │0d │
|
||||
* ├────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬────┤
|
||||
* │10 │11 │12 │13 │14 │15 │16 │17 │18 │19 │1a │1b │1c │ │
|
||||
* ├──────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐1d │
|
||||
* │20 │21 │22 │23 │24 │25 │26 │27 │28 │29 │2a │2b │2c │ │
|
||||
* ├─────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤
|
||||
* │30 │31 │32 │33 │34 │35 │36 │37 │38 │39 │3a │3b │3c │3d │
|
||||
* ├─────┼───┴┬──┴──┬┴───┴───┴─┬─┴─┬─┴───┴───┴┬──┴──┬┴───┬─┴───┤
|
||||
* │40 │41 │43 │44 │45 │46 │48 │4a │4b │
|
||||
* └─────┴────┴─────┴──────────┴───┴──────────┴─────┴────┴─────┘
|
||||
*/
|
||||
#define LAYOUT_all( \
|
||||
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, \
|
||||
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \
|
||||
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k1d, \
|
||||
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \
|
||||
k40, k41, k43, k44, k45, k46, k48, k4a, k4b \
|
||||
) \
|
||||
{ \
|
||||
{k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d}, \
|
||||
{k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d}, \
|
||||
{k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, KC_NO},\
|
||||
{k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d}, \
|
||||
{k40, k41, KC_NO, k43, k44, k45, k46, KC_NO, k48, KC_NO, k4a, k4b, KC_NO, KC_NO} \
|
||||
}
|
||||
@@ -17,72 +17,148 @@
|
||||
"layouts": {
|
||||
"LAYOUT_all": {
|
||||
"layout": [
|
||||
{ "label": "Esc", "x": 0, "y": 0 },
|
||||
{ "label": "!", "x": 1, "y": 0 },
|
||||
{ "label": "@", "x": 2, "y": 0 },
|
||||
{ "label": "#", "x": 3, "y": 0 },
|
||||
{ "label": "$", "x": 4, "y": 0 },
|
||||
{ "label": "%", "x": 5, "y": 0 },
|
||||
{ "label": "^", "x": 6, "y": 0 },
|
||||
{ "label": "&", "x": 7, "y": 0 },
|
||||
{ "label": "*", "x": 8, "y": 0 },
|
||||
{ "label": "(", "x": 9, "y": 0 },
|
||||
{ "label": ")", "x": 10, "y": 0 },
|
||||
{ "label": "_", "x": 11, "y": 0 },
|
||||
{ "label": "+", "x": 12, "y": 0 },
|
||||
{ "label": "|", "x": 13, "y": 0 },
|
||||
{ "label": "~", "x": 14, "y": 0 },
|
||||
{ "label": "Tab", "x": 0, "y": 1, "w": 1.5 },
|
||||
{ "label": "Q", "x": 1.5, "y": 1 },
|
||||
{ "label": "W", "x": 2.5, "y": 1 },
|
||||
{ "label": "E", "x": 3.5, "y": 1 },
|
||||
{ "label": "R", "x": 4.5, "y": 1 },
|
||||
{ "label": "T", "x": 5.5, "y": 1 },
|
||||
{ "label": "Y", "x": 6.5, "y": 1 },
|
||||
{ "label": "U", "x": 7.5, "y": 1 },
|
||||
{ "label": "I", "x": 8.5, "y": 1 },
|
||||
{ "label": "O", "x": 9.5, "y": 1 },
|
||||
{ "label": "P", "x": 10.5, "y": 1 },
|
||||
{ "label": "{", "x": 11.5, "y": 1 },
|
||||
{ "label": "}", "x": 12.5, "y": 1 },
|
||||
{ "label": "Backsp.", "x": 13.5, "y": 1, "w": 1.5 },
|
||||
{ "label": "Caps Lock", "x": 0, "y": 2, "w": 1.75 },
|
||||
{ "label": "A", "x": 1.75, "y": 2 },
|
||||
{ "label": "S", "x": 2.75, "y": 2 },
|
||||
{ "label": "D", "x": 3.75, "y": 2 },
|
||||
{ "label": "F", "x": 4.75, "y": 2 },
|
||||
{ "label": "G", "x": 5.75, "y": 2 },
|
||||
{ "label": "H", "x": 6.75, "y": 2 },
|
||||
{ "label": "J", "x": 7.75, "y": 2 },
|
||||
{ "label": "K", "x": 8.75, "y": 2 },
|
||||
{ "label": "L", "x": 9.75, "y": 2 },
|
||||
{ "label": ":", "x": 10.75, "y": 2 },
|
||||
{ "label": "\"", "x": 11.75, "y": 2 },
|
||||
{ "label": "Enter", "x": 12.75, "y": 2, "w": 2.25 },
|
||||
{ "label": "Shift", "x": 0, "y": 3, "w": 1.25 },
|
||||
{ "label": "|", "x": 1.25, "y": 3 },
|
||||
{ "label": "Z", "x": 2.25, "y": 3 },
|
||||
{ "label": "X", "x": 3.25, "y": 3 },
|
||||
{ "label": "C", "x": 4.25, "y": 3 },
|
||||
{ "label": "V", "x": 5.25, "y": 3 },
|
||||
{ "label": "B", "x": 6.25, "y": 3 },
|
||||
{ "label": "N", "x": 7.25, "y": 3 },
|
||||
{ "label": "M", "x": 8.25, "y": 3 },
|
||||
{ "label": "<", "x": 9.25, "y": 3 },
|
||||
{ "label": ">", "x": 10.25, "y": 3 },
|
||||
{ "label": "?", "x": 11.25, "y": 3 },
|
||||
{ "label": "Shift", "x": 12.25, "y": 3, "w": 1.75 },
|
||||
{ "label": "Fn", "x": 14, "y": 3, "w": 1 },
|
||||
{ "label": "Ctrl", "x": 0, "y": 4, "w": 1.25 },
|
||||
{ "label": "Win", "x": 1.25, "y": 4, "w": 1.25 },
|
||||
{ "label": "Alt", "x": 2.5, "y": 4, "w": 1.25 },
|
||||
{ "label": "Space1", "x": 3.75, "y": 4, "w": 2.25 },
|
||||
{ "label": "Space2", "x": 6, "y": 4, "w": 1.25 },
|
||||
{ "label": "Space3", "x": 7.25, "y": 4, "w": 2.75 },
|
||||
{ "label": "Alt", "x": 10, "y": 4, "w": 1.25 },
|
||||
{ "label": "Menu", "x": 11.25, "y": 4, "w": 1.25 },
|
||||
{ "label": "Win", "x": 12.5, "y": 4, "w": 1.25 },
|
||||
{ "label": "Ctrl", "x": 13.75, "y": 4, "w": 1.25 }
|
||||
{"label": "Esc", "matrix": [0, 0], "x": 0, "y": 0},
|
||||
{"label": "!", "matrix": [0, 1], "x": 1, "y": 0},
|
||||
{"label": "@", "matrix": [0, 2], "x": 2, "y": 0},
|
||||
{"label": "#", "matrix": [0, 3], "x": 3, "y": 0},
|
||||
{"label": "$", "matrix": [0, 4], "x": 4, "y": 0},
|
||||
{"label": "%", "matrix": [0, 5], "x": 5, "y": 0},
|
||||
{"label": "^", "matrix": [0, 6], "x": 6, "y": 0},
|
||||
{"label": "&", "matrix": [0, 7], "x": 7, "y": 0},
|
||||
{"label": "*", "matrix": [0, 8], "x": 8, "y": 0},
|
||||
{"label": "(", "matrix": [0, 9], "x": 9, "y": 0},
|
||||
{"label": ")", "matrix": [0, 10], "x": 10, "y": 0},
|
||||
{"label": "_", "matrix": [0, 11], "x": 11, "y": 0},
|
||||
{"label": "+", "matrix": [0, 12], "x": 12, "y": 0},
|
||||
{"label": "|", "matrix": [0, 13], "x": 13, "y": 0},
|
||||
{"label": "~", "matrix": [0, 14], "x": 14, "y": 0},
|
||||
|
||||
{"label": "Tab", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.5},
|
||||
{"label": "Q", "matrix": [1, 1], "x": 1.5, "y": 1},
|
||||
{"label": "W", "matrix": [1, 2], "x": 2.5, "y": 1},
|
||||
{"label": "E", "matrix": [1, 3], "x": 3.5, "y": 1},
|
||||
{"label": "R", "matrix": [1, 4], "x": 4.5, "y": 1},
|
||||
{"label": "T", "matrix": [1, 5], "x": 5.5, "y": 1},
|
||||
{"label": "Y", "matrix": [1, 6], "x": 6.5, "y": 1},
|
||||
{"label": "U", "matrix": [1, 7], "x": 7.5, "y": 1},
|
||||
{"label": "I", "matrix": [1, 8], "x": 8.5, "y": 1},
|
||||
{"label": "O", "matrix": [1, 9], "x": 9.5, "y": 1},
|
||||
{"label": "P", "matrix": [1, 10], "x": 10.5, "y": 1},
|
||||
{"label": "{", "matrix": [1, 11], "x": 11.5, "y": 1},
|
||||
{"label": "}", "matrix": [1, 12], "x": 12.5, "y": 1},
|
||||
{"label": "Backsp.", "matrix": [1, 13], "x": 13.5, "y": 1, "w": 1.5},
|
||||
|
||||
{"label": "Caps Lock", "matrix": [2, 0], "x": 0, "y": 2, "w": 1.75},
|
||||
{"label": "A", "matrix": [2, 1], "x": 1.75, "y": 2},
|
||||
{"label": "S", "matrix": [2, 2], "x": 2.75, "y": 2},
|
||||
{"label": "D", "matrix": [2, 3], "x": 3.75, "y": 2},
|
||||
{"label": "F", "matrix": [2, 4], "x": 4.75, "y": 2},
|
||||
{"label": "G", "matrix": [2, 5], "x": 5.75, "y": 2},
|
||||
{"label": "H", "matrix": [2, 6], "x": 6.75, "y": 2},
|
||||
{"label": "J", "matrix": [2, 7], "x": 7.75, "y": 2},
|
||||
{"label": "K", "matrix": [2, 8], "x": 8.75, "y": 2},
|
||||
{"label": "L", "matrix": [2, 9], "x": 9.75, "y": 2},
|
||||
{"label": ":", "matrix": [2, 10], "x": 10.75, "y": 2},
|
||||
{"label": "\"", "matrix": [2, 11], "x": 11.75, "y": 2},
|
||||
{"label": "Enter", "matrix": [2, 12], "x": 12.75, "y": 2, "w": 2.25},
|
||||
|
||||
{"label": "Shift", "matrix": [3, 0], "x": 0, "y": 3, "w": 1.25},
|
||||
{"label": "|", "matrix": [3, 1], "x": 1.25, "y": 3},
|
||||
{"label": "Z", "matrix": [3, 2], "x": 2.25, "y": 3},
|
||||
{"label": "X", "matrix": [3, 3], "x": 3.25, "y": 3},
|
||||
{"label": "C", "matrix": [3, 4], "x": 4.25, "y": 3},
|
||||
{"label": "V", "matrix": [3, 5], "x": 5.25, "y": 3},
|
||||
{"label": "B", "matrix": [3, 6], "x": 6.25, "y": 3},
|
||||
{"label": "N", "matrix": [3, 7], "x": 7.25, "y": 3},
|
||||
{"label": "M", "matrix": [3, 8], "x": 8.25, "y": 3},
|
||||
{"label": "<", "matrix": [3, 9], "x": 9.25, "y": 3},
|
||||
{"label": ">", "matrix": [3, 10], "x": 10.25, "y": 3},
|
||||
{"label": "?", "matrix": [3, 11], "x": 11.25, "y": 3},
|
||||
{"label": "Shift", "matrix": [3, 12], "x": 12.25, "y": 3, "w": 1.75},
|
||||
{"label": "Fn", "matrix": [3, 13], "x": 14, "y": 3},
|
||||
|
||||
{"label": "Ctrl", "matrix": [4, 0], "x": 0, "y": 4, "w": 1.25},
|
||||
{"label": "Win", "matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.25},
|
||||
{"label": "Alt", "matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.25},
|
||||
{"label": "Space1", "matrix": [4, 3], "x": 3.75, "y": 4, "w": 2.25},
|
||||
{"label": "Space2", "matrix": [4, 4], "x": 6, "y": 4, "w": 1.25},
|
||||
{"label": "Space3", "matrix": [4, 5], "x": 7.25, "y": 4, "w": 2.75},
|
||||
{"label": "Alt", "matrix": [4, 6], "x": 10, "y": 4, "w": 1.25},
|
||||
{"label": "Menu", "matrix": [4, 7], "x": 11.25, "y": 4, "w": 1.25},
|
||||
{"label": "Win", "matrix": [4, 8], "x": 12.5, "y": 4, "w": 1.25},
|
||||
{"label": "Ctrl", "matrix": [4, 9], "x": 13.75, "y": 4, "w": 1.25}
|
||||
]
|
||||
},
|
||||
|
||||
"LAYOUT_60_ansi_split_bs_rshift": {
|
||||
"layout": [
|
||||
{"label": "Esc", "matrix": [0, 0], "x": 0, "y": 0},
|
||||
{"label": "!", "matrix": [0, 1], "x": 1, "y": 0},
|
||||
{"label": "@", "matrix": [0, 2], "x": 2, "y": 0},
|
||||
{"label": "#", "matrix": [0, 3], "x": 3, "y": 0},
|
||||
{"label": "$", "matrix": [0, 4], "x": 4, "y": 0},
|
||||
{"label": "%", "matrix": [0, 5], "x": 5, "y": 0},
|
||||
{"label": "^", "matrix": [0, 6], "x": 6, "y": 0},
|
||||
{"label": "&", "matrix": [0, 7], "x": 7, "y": 0},
|
||||
{"label": "*", "matrix": [0, 8], "x": 8, "y": 0},
|
||||
{"label": "(", "matrix": [0, 9], "x": 9, "y": 0},
|
||||
{"label": ")", "matrix": [0, 10], "x": 10, "y": 0},
|
||||
{"label": "_", "matrix": [0, 11], "x": 11, "y": 0},
|
||||
{"label": "+", "matrix": [0, 12], "x": 12, "y": 0},
|
||||
{"label": "|", "matrix": [0, 13], "x": 13, "y": 0},
|
||||
{"label": "~", "matrix": [0, 14], "x": 14, "y": 0},
|
||||
|
||||
{"label": "Tab", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.5},
|
||||
{"label": "Q", "matrix": [1, 1], "x": 1.5, "y": 1},
|
||||
{"label": "W", "matrix": [1, 2], "x": 2.5, "y": 1},
|
||||
{"label": "E", "matrix": [1, 3], "x": 3.5, "y": 1},
|
||||
{"label": "R", "matrix": [1, 4], "x": 4.5, "y": 1},
|
||||
{"label": "T", "matrix": [1, 5], "x": 5.5, "y": 1},
|
||||
{"label": "Y", "matrix": [1, 6], "x": 6.5, "y": 1},
|
||||
{"label": "U", "matrix": [1, 7], "x": 7.5, "y": 1},
|
||||
{"label": "I", "matrix": [1, 8], "x": 8.5, "y": 1},
|
||||
{"label": "O", "matrix": [1, 9], "x": 9.5, "y": 1},
|
||||
{"label": "P", "matrix": [1, 10], "x": 10.5, "y": 1},
|
||||
{"label": "{", "matrix": [1, 11], "x": 11.5, "y": 1},
|
||||
{"label": "}", "matrix": [1, 12], "x": 12.5, "y": 1},
|
||||
{"label": "Backsp.", "matrix": [1, 13], "x": 13.5, "y": 1, "w": 1.5},
|
||||
|
||||
{"label": "Caps Lock", "matrix": [2, 0], "x": 0, "y": 2, "w": 1.75},
|
||||
{"label": "A", "matrix": [2, 1], "x": 1.75, "y": 2},
|
||||
{"label": "S", "matrix": [2, 2], "x": 2.75, "y": 2},
|
||||
{"label": "D", "matrix": [2, 3], "x": 3.75, "y": 2},
|
||||
{"label": "F", "matrix": [2, 4], "x": 4.75, "y": 2},
|
||||
{"label": "G", "matrix": [2, 5], "x": 5.75, "y": 2},
|
||||
{"label": "H", "matrix": [2, 6], "x": 6.75, "y": 2},
|
||||
{"label": "J", "matrix": [2, 7], "x": 7.75, "y": 2},
|
||||
{"label": "K", "matrix": [2, 8], "x": 8.75, "y": 2},
|
||||
{"label": "L", "matrix": [2, 9], "x": 9.75, "y": 2},
|
||||
{"label": ":", "matrix": [2, 10], "x": 10.75, "y": 2},
|
||||
{"label": "\"", "matrix": [2, 11], "x": 11.75, "y": 2},
|
||||
{"label": "Enter", "matrix": [2, 12], "x": 12.75, "y": 2, "w": 2.25},
|
||||
|
||||
{"label": "Shift", "matrix": [3, 0], "x": 0, "y": 3, "w": 2.25},
|
||||
{"label": "Z", "matrix": [3, 2], "x": 2.25, "y": 3},
|
||||
{"label": "X", "matrix": [3, 3], "x": 3.25, "y": 3},
|
||||
{"label": "C", "matrix": [3, 4], "x": 4.25, "y": 3},
|
||||
{"label": "V", "matrix": [3, 5], "x": 5.25, "y": 3},
|
||||
{"label": "B", "matrix": [3, 6], "x": 6.25, "y": 3},
|
||||
{"label": "N", "matrix": [3, 7], "x": 7.25, "y": 3},
|
||||
{"label": "M", "matrix": [3, 8], "x": 8.25, "y": 3},
|
||||
{"label": "<", "matrix": [3, 9], "x": 9.25, "y": 3},
|
||||
{"label": ">", "matrix": [3, 10], "x": 10.25, "y": 3},
|
||||
{"label": "?", "matrix": [3, 11], "x": 11.25, "y": 3},
|
||||
{"label": "Shift", "matrix": [3, 12], "x": 12.25, "y": 3, "w": 1.75},
|
||||
{"label": "Fn", "matrix": [3, 13], "x": 14, "y": 3},
|
||||
|
||||
{"label": "Ctrl", "matrix": [4, 0], "x": 0, "y": 4, "w": 1.25},
|
||||
{"label": "Win", "matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.25},
|
||||
{"label": "Alt", "matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.25},
|
||||
{"label": "Space2", "matrix": [4, 4], "x": 3.75, "y": 4, "w": 6.25},
|
||||
{"label": "Alt", "matrix": [4, 6], "x": 10, "y": 4, "w": 1.25},
|
||||
{"label": "Menu", "matrix": [4, 7], "x": 11.25, "y": 4, "w": 1.25},
|
||||
{"label": "Win", "matrix": [4, 8], "x": 12.5, "y": 4, "w": 1.25},
|
||||
{"label": "Ctrl", "matrix": [4, 9], "x": 13.75, "y": 4, "w": 1.25}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
/*
|
||||
Copyright 2020 Stefan Sundin "4pplet" <4pplet@protonmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#define LAYOUT_all( \
|
||||
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \
|
||||
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1d, k1e, \
|
||||
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, \
|
||||
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, k3e, \
|
||||
k40, k41, k43, k45, k47, k48, k4a, k4b, k4d, k4e \
|
||||
) \
|
||||
{ \
|
||||
{k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e}, \
|
||||
{k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1d, k1e}, \
|
||||
{k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d}, \
|
||||
{k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, k3e}, \
|
||||
{k40, k41, k43, k45, k47, k48, k4a, k4b, k4d, k4e } \
|
||||
}
|
||||
@@ -18,71 +18,287 @@
|
||||
"layouts": {
|
||||
"LAYOUT_all": {
|
||||
"layout": [
|
||||
{ "label": "Esc", "x": 0, "y": 0 },
|
||||
{ "label": "!", "x": 1, "y": 0 },
|
||||
{ "label": "@", "x": 2, "y": 0 },
|
||||
{ "label": "#", "x": 3, "y": 0 },
|
||||
{ "label": "$", "x": 4, "y": 0 },
|
||||
{ "label": "%", "x": 5, "y": 0 },
|
||||
{ "label": "^", "x": 6, "y": 0 },
|
||||
{ "label": "&", "x": 7, "y": 0 },
|
||||
{ "label": "*", "x": 8, "y": 0 },
|
||||
{ "label": "(", "x": 9, "y": 0 },
|
||||
{ "label": ")", "x": 10, "y": 0 },
|
||||
{ "label": "_", "x": 11, "y": 0 },
|
||||
{ "label": "+", "x": 12, "y": 0 },
|
||||
{ "label": "|", "x": 13, "y": 0 },
|
||||
{ "label": "~", "x": 14, "y": 0 },
|
||||
{ "label": "Tab", "x": 0, "y": 1, "w": 1.5 },
|
||||
{ "label": "Q", "x": 1.5, "y": 1 },
|
||||
{ "label": "W", "x": 2.5, "y": 1 },
|
||||
{ "label": "E", "x": 3.5, "y": 1 },
|
||||
{ "label": "R", "x": 4.5, "y": 1 },
|
||||
{ "label": "T", "x": 5.5, "y": 1 },
|
||||
{ "label": "Y", "x": 6.5, "y": 1 },
|
||||
{ "label": "U", "x": 7.5, "y": 1 },
|
||||
{ "label": "I", "x": 8.5, "y": 1 },
|
||||
{ "label": "O", "x": 9.5, "y": 1 },
|
||||
{ "label": "P", "x": 10.5, "y": 1 },
|
||||
{ "label": "{", "x": 11.5, "y": 1 },
|
||||
{ "label": "}", "x": 12.5, "y": 1 },
|
||||
{ "label": "Backsp.", "x": 13.5, "y": 1, "w": 1.5 },
|
||||
{ "label": "Caps Lock", "x": 0, "y": 2, "w": 1.75 },
|
||||
{ "label": "A", "x": 1.75, "y": 2 },
|
||||
{ "label": "S", "x": 2.75, "y": 2 },
|
||||
{ "label": "D", "x": 3.75, "y": 2 },
|
||||
{ "label": "F", "x": 4.75, "y": 2 },
|
||||
{ "label": "G", "x": 5.75, "y": 2 },
|
||||
{ "label": "H", "x": 6.75, "y": 2 },
|
||||
{ "label": "J", "x": 7.75, "y": 2 },
|
||||
{ "label": "K", "x": 8.75, "y": 2 },
|
||||
{ "label": "L", "x": 9.75, "y": 2 },
|
||||
{ "label": ":", "x": 10.75, "y": 2 },
|
||||
{ "label": "\"", "x": 11.75, "y": 2 },
|
||||
{ "label": "~", "x": 12.75, "y": 2},
|
||||
{ "label": "Enter", "x": 13.75, "y": 2, "w": 1.25 },
|
||||
{ "label": "Shift", "x": 0, "y": 3, "w": 1.25 },
|
||||
{ "label": "|", "x": 1.25, "y": 3 },
|
||||
{ "label": "Z", "x": 2.25, "y": 3 },
|
||||
{ "label": "X", "x": 3.25, "y": 3 },
|
||||
{ "label": "C", "x": 4.25, "y": 3 },
|
||||
{ "label": "V", "x": 5.25, "y": 3 },
|
||||
{ "label": "B", "x": 6.25, "y": 3 },
|
||||
{ "label": "N", "x": 7.25, "y": 3 },
|
||||
{ "label": "M", "x": 8.25, "y": 3 },
|
||||
{ "label": "<", "x": 9.25, "y": 3 },
|
||||
{ "label": ">", "x": 10.25, "y": 3 },
|
||||
{ "label": "?", "x": 11.25, "y": 3 },
|
||||
{ "label": "Shift", "x": 12.25, "y": 3, "w": 1.75 },
|
||||
{ "label": "Fn", "x": 14, "y": 3, "w": 1 },
|
||||
{ "label": "Ctrl", "x": 0, "y": 4, "w": 1.25 },
|
||||
{ "label": "Win", "x": 1.25, "y": 4, "w": 1.25 },
|
||||
{ "label": "Alt", "x": 2.5, "y": 4, "w": 1.25 },
|
||||
{ "label": "Space", "x": 3.75, "y": 4, "w": 6.25 },
|
||||
{ "label": "Alt", "x": 10, "y": 4, "w": 1.25 },
|
||||
{ "label": "Menu", "x": 11.25, "y": 4, "w": 1.25 },
|
||||
{ "label": "Win", "x": 12.5, "y": 4, "w": 1.25 },
|
||||
{ "label": "Ctrl", "x": 13.75, "y": 4, "w": 1.25 }
|
||||
{"label": "Esc", "matrix": [0, 0], "x": 0, "y": 0},
|
||||
{"label": "!", "matrix": [1, 0], "x": 1, "y": 0},
|
||||
{"label": "@", "matrix": [0, 1], "x": 2, "y": 0},
|
||||
{"label": "#", "matrix": [1, 1], "x": 3, "y": 0},
|
||||
{"label": "$", "matrix": [0, 2], "x": 4, "y": 0},
|
||||
{"label": "%", "matrix": [1, 2], "x": 5, "y": 0},
|
||||
{"label": "^", "matrix": [0, 3], "x": 6, "y": 0},
|
||||
{"label": "&", "matrix": [1, 3], "x": 7, "y": 0},
|
||||
{"label": "*", "matrix": [0, 4], "x": 8, "y": 0},
|
||||
{"label": "(", "matrix": [1, 4], "x": 9, "y": 0},
|
||||
{"label": ")", "matrix": [0, 5], "x": 10, "y": 0},
|
||||
{"label": "_", "matrix": [1, 5], "x": 11, "y": 0},
|
||||
{"label": "+", "matrix": [0, 6], "x": 12, "y": 0},
|
||||
{"label": "|", "matrix": [1, 6], "x": 13, "y": 0},
|
||||
{"label": "~", "matrix": [3, 6], "x": 14, "y": 0},
|
||||
|
||||
{"label": "Tab", "matrix": [2, 0], "x": 0, "y": 1, "w": 1.5},
|
||||
{"label": "Q", "matrix": [3, 0], "x": 1.5, "y": 1},
|
||||
{"label": "W", "matrix": [2, 1], "x": 2.5, "y": 1},
|
||||
{"label": "E", "matrix": [3, 1], "x": 3.5, "y": 1},
|
||||
{"label": "R", "matrix": [2, 2], "x": 4.5, "y": 1},
|
||||
{"label": "T", "matrix": [3, 2], "x": 5.5, "y": 1},
|
||||
{"label": "Y", "matrix": [2, 3], "x": 6.5, "y": 1},
|
||||
{"label": "U", "matrix": [3, 3], "x": 7.5, "y": 1},
|
||||
{"label": "I", "matrix": [2, 4], "x": 8.5, "y": 1},
|
||||
{"label": "O", "matrix": [3, 4], "x": 9.5, "y": 1},
|
||||
{"label": "P", "matrix": [2, 5], "x": 10.5, "y": 1},
|
||||
{"label": "{", "matrix": [3, 5], "x": 11.5, "y": 1},
|
||||
{"label": "}", "matrix": [2, 6], "x": 12.5, "y": 1},
|
||||
{"label": "Backsp.", "matrix": [5, 6], "x": 13.5, "y": 1, "w": 1.5},
|
||||
|
||||
{"label": "Caps Lock", "matrix": [4, 0], "x": 0, "y": 2, "w": 1.75},
|
||||
{"label": "A", "matrix": [5, 0], "x": 1.75, "y": 2},
|
||||
{"label": "S", "matrix": [4, 1], "x": 2.75, "y": 2},
|
||||
{"label": "D", "matrix": [5, 1], "x": 3.75, "y": 2},
|
||||
{"label": "F", "matrix": [4, 2], "x": 4.75, "y": 2},
|
||||
{"label": "G", "matrix": [5, 2], "x": 5.75, "y": 2},
|
||||
{"label": "H", "matrix": [4, 3], "x": 6.75, "y": 2},
|
||||
{"label": "J", "matrix": [5, 3], "x": 7.75, "y": 2},
|
||||
{"label": "K", "matrix": [4, 4], "x": 8.75, "y": 2},
|
||||
{"label": "L", "matrix": [5, 4], "x": 9.75, "y": 2},
|
||||
{"label": ":", "matrix": [4, 5], "x": 10.75, "y": 2},
|
||||
{"label": "\"", "matrix": [5, 5], "x": 11.75, "y": 2},
|
||||
{"label": "~", "matrix": [4, 6], "x": 12.75, "y": 2},
|
||||
{"label": "Enter", "matrix": [7, 6], "x": 13.75, "y": 2, "w": 1.25},
|
||||
|
||||
{"label": "Shift", "matrix": [6, 0], "x": 0, "y": 3, "w": 1.25},
|
||||
{"label": "|", "matrix": [7, 0], "x": 1.25, "y": 3},
|
||||
{"label": "Z", "matrix": [6, 1], "x": 2.25, "y": 3},
|
||||
{"label": "X", "matrix": [7, 1], "x": 3.25, "y": 3},
|
||||
{"label": "C", "matrix": [6, 2], "x": 4.25, "y": 3},
|
||||
{"label": "V", "matrix": [7, 2], "x": 5.25, "y": 3},
|
||||
{"label": "B", "matrix": [6, 3], "x": 6.25, "y": 3},
|
||||
{"label": "N", "matrix": [7, 3], "x": 7.25, "y": 3},
|
||||
{"label": "M", "matrix": [6, 4], "x": 8.25, "y": 3},
|
||||
{"label": "<", "matrix": [7, 4], "x": 9.25, "y": 3},
|
||||
{"label": ">", "matrix": [6, 5], "x": 10.25, "y": 3},
|
||||
{"label": "?", "matrix": [7, 5], "x": 11.25, "y": 3},
|
||||
{"label": "Shift", "matrix": [6, 6], "x": 12.25, "y": 3, "w": 1.75},
|
||||
{"label": "Fn", "matrix": [9, 6], "x": 14, "y": 3},
|
||||
|
||||
{"label": "Ctrl", "matrix": [8, 0], "x": 0, "y": 4, "w": 1.25},
|
||||
{"label": "Win", "matrix": [9, 0], "x": 1.25, "y": 4, "w": 1.25},
|
||||
{"label": "Alt", "matrix": [9, 1], "x": 2.5, "y": 4, "w": 1.25},
|
||||
{"label": "Space", "matrix": [9, 3], "x": 3.75, "y": 4, "w": 6.25},
|
||||
{"label": "Alt", "matrix": [9, 4], "x": 10, "y": 4, "w": 1.25},
|
||||
{"label": "Menu", "matrix": [8, 5], "x": 11.25, "y": 4, "w": 1.25},
|
||||
{"label": "Win", "matrix": [9, 5], "x": 12.5, "y": 4, "w": 1.25},
|
||||
{"label": "Ctrl", "matrix": [8, 6], "x": 13.75, "y": 4, "w": 1.25}
|
||||
]
|
||||
},
|
||||
|
||||
"LAYOUT_60_ansi_split_bs_rshift": {
|
||||
"layout": [
|
||||
{"label": "Esc", "matrix": [0, 0], "x": 0, "y": 0},
|
||||
{"label": "!", "matrix": [1, 0], "x": 1, "y": 0},
|
||||
{"label": "@", "matrix": [0, 1], "x": 2, "y": 0},
|
||||
{"label": "#", "matrix": [1, 1], "x": 3, "y": 0},
|
||||
{"label": "$", "matrix": [0, 2], "x": 4, "y": 0},
|
||||
{"label": "%", "matrix": [1, 2], "x": 5, "y": 0},
|
||||
{"label": "^", "matrix": [0, 3], "x": 6, "y": 0},
|
||||
{"label": "&", "matrix": [1, 3], "x": 7, "y": 0},
|
||||
{"label": "*", "matrix": [0, 4], "x": 8, "y": 0},
|
||||
{"label": "(", "matrix": [1, 4], "x": 9, "y": 0},
|
||||
{"label": ")", "matrix": [0, 5], "x": 10, "y": 0},
|
||||
{"label": "_", "matrix": [1, 5], "x": 11, "y": 0},
|
||||
{"label": "+", "matrix": [0, 6], "x": 12, "y": 0},
|
||||
{"label": "|", "matrix": [1, 6], "x": 13, "y": 0},
|
||||
{"label": "~", "matrix": [3, 6], "x": 14, "y": 0},
|
||||
|
||||
{"label": "Tab", "matrix": [2, 0], "x": 0, "y": 1, "w": 1.5},
|
||||
{"label": "Q", "matrix": [3, 0], "x": 1.5, "y": 1},
|
||||
{"label": "W", "matrix": [2, 1], "x": 2.5, "y": 1},
|
||||
{"label": "E", "matrix": [3, 1], "x": 3.5, "y": 1},
|
||||
{"label": "R", "matrix": [2, 2], "x": 4.5, "y": 1},
|
||||
{"label": "T", "matrix": [3, 2], "x": 5.5, "y": 1},
|
||||
{"label": "Y", "matrix": [2, 3], "x": 6.5, "y": 1},
|
||||
{"label": "U", "matrix": [3, 3], "x": 7.5, "y": 1},
|
||||
{"label": "I", "matrix": [2, 4], "x": 8.5, "y": 1},
|
||||
{"label": "O", "matrix": [3, 4], "x": 9.5, "y": 1},
|
||||
{"label": "P", "matrix": [2, 5], "x": 10.5, "y": 1},
|
||||
{"label": "{", "matrix": [3, 5], "x": 11.5, "y": 1},
|
||||
{"label": "}", "matrix": [2, 6], "x": 12.5, "y": 1},
|
||||
{"label": "Backsp.", "matrix": [5, 6], "x": 13.5, "y": 1, "w": 1.5},
|
||||
|
||||
{"label": "Caps Lock", "matrix": [4, 0], "x": 0, "y": 2, "w": 1.75},
|
||||
{"label": "A", "matrix": [5, 0], "x": 1.75, "y": 2},
|
||||
{"label": "S", "matrix": [4, 1], "x": 2.75, "y": 2},
|
||||
{"label": "D", "matrix": [5, 1], "x": 3.75, "y": 2},
|
||||
{"label": "F", "matrix": [4, 2], "x": 4.75, "y": 2},
|
||||
{"label": "G", "matrix": [5, 2], "x": 5.75, "y": 2},
|
||||
{"label": "H", "matrix": [4, 3], "x": 6.75, "y": 2},
|
||||
{"label": "J", "matrix": [5, 3], "x": 7.75, "y": 2},
|
||||
{"label": "K", "matrix": [4, 4], "x": 8.75, "y": 2},
|
||||
{"label": "L", "matrix": [5, 4], "x": 9.75, "y": 2},
|
||||
{"label": ":", "matrix": [4, 5], "x": 10.75, "y": 2},
|
||||
{"label": "\"", "matrix": [5, 5], "x": 11.75, "y": 2},
|
||||
{"label": "Enter", "matrix": [7, 6], "x": 12.75, "y": 2, "w": 2.25},
|
||||
|
||||
{"label": "Shift", "matrix": [6, 0], "x": 0, "y": 3, "w": 2.25},
|
||||
{"label": "Z", "matrix": [6, 1], "x": 2.25, "y": 3},
|
||||
{"label": "X", "matrix": [7, 1], "x": 3.25, "y": 3},
|
||||
{"label": "C", "matrix": [6, 2], "x": 4.25, "y": 3},
|
||||
{"label": "V", "matrix": [7, 2], "x": 5.25, "y": 3},
|
||||
{"label": "B", "matrix": [6, 3], "x": 6.25, "y": 3},
|
||||
{"label": "N", "matrix": [7, 3], "x": 7.25, "y": 3},
|
||||
{"label": "M", "matrix": [6, 4], "x": 8.25, "y": 3},
|
||||
{"label": "<", "matrix": [7, 4], "x": 9.25, "y": 3},
|
||||
{"label": ">", "matrix": [6, 5], "x": 10.25, "y": 3},
|
||||
{"label": "?", "matrix": [7, 5], "x": 11.25, "y": 3},
|
||||
{"label": "Shift", "matrix": [6, 6], "x": 12.25, "y": 3, "w": 1.75},
|
||||
{"label": "Fn", "matrix": [9, 6], "x": 14, "y": 3},
|
||||
|
||||
{"label": "Ctrl", "matrix": [8, 0], "x": 0, "y": 4, "w": 1.25},
|
||||
{"label": "Win", "matrix": [9, 0], "x": 1.25, "y": 4, "w": 1.25},
|
||||
{"label": "Alt", "matrix": [9, 1], "x": 2.5, "y": 4, "w": 1.25},
|
||||
{"label": "Space", "matrix": [9, 3], "x": 3.75, "y": 4, "w": 6.25},
|
||||
{"label": "Alt", "matrix": [9, 4], "x": 10, "y": 4, "w": 1.25},
|
||||
{"label": "Menu", "matrix": [8, 5], "x": 11.25, "y": 4, "w": 1.25},
|
||||
{"label": "Win", "matrix": [9, 5], "x": 12.5, "y": 4, "w": 1.25},
|
||||
{"label": "Ctrl", "matrix": [8, 6], "x": 13.75, "y": 4, "w": 1.25}
|
||||
]
|
||||
},
|
||||
|
||||
"LAYOUT_60_tsangan_hhkb": {
|
||||
"layout": [
|
||||
{"label": "Esc", "matrix": [0, 0], "x": 0, "y": 0},
|
||||
{"label": "!", "matrix": [1, 0], "x": 1, "y": 0},
|
||||
{"label": "@", "matrix": [0, 1], "x": 2, "y": 0},
|
||||
{"label": "#", "matrix": [1, 1], "x": 3, "y": 0},
|
||||
{"label": "$", "matrix": [0, 2], "x": 4, "y": 0},
|
||||
{"label": "%", "matrix": [1, 2], "x": 5, "y": 0},
|
||||
{"label": "^", "matrix": [0, 3], "x": 6, "y": 0},
|
||||
{"label": "&", "matrix": [1, 3], "x": 7, "y": 0},
|
||||
{"label": "*", "matrix": [0, 4], "x": 8, "y": 0},
|
||||
{"label": "(", "matrix": [1, 4], "x": 9, "y": 0},
|
||||
{"label": ")", "matrix": [0, 5], "x": 10, "y": 0},
|
||||
{"label": "_", "matrix": [1, 5], "x": 11, "y": 0},
|
||||
{"label": "+", "matrix": [0, 6], "x": 12, "y": 0},
|
||||
{"label": "|", "matrix": [1, 6], "x": 13, "y": 0},
|
||||
{"label": "~", "matrix": [3, 6], "x": 14, "y": 0},
|
||||
|
||||
{"label": "Tab", "matrix": [2, 0], "x": 0, "y": 1, "w": 1.5},
|
||||
{"label": "Q", "matrix": [3, 0], "x": 1.5, "y": 1},
|
||||
{"label": "W", "matrix": [2, 1], "x": 2.5, "y": 1},
|
||||
{"label": "E", "matrix": [3, 1], "x": 3.5, "y": 1},
|
||||
{"label": "R", "matrix": [2, 2], "x": 4.5, "y": 1},
|
||||
{"label": "T", "matrix": [3, 2], "x": 5.5, "y": 1},
|
||||
{"label": "Y", "matrix": [2, 3], "x": 6.5, "y": 1},
|
||||
{"label": "U", "matrix": [3, 3], "x": 7.5, "y": 1},
|
||||
{"label": "I", "matrix": [2, 4], "x": 8.5, "y": 1},
|
||||
{"label": "O", "matrix": [3, 4], "x": 9.5, "y": 1},
|
||||
{"label": "P", "matrix": [2, 5], "x": 10.5, "y": 1},
|
||||
{"label": "{", "matrix": [3, 5], "x": 11.5, "y": 1},
|
||||
{"label": "}", "matrix": [2, 6], "x": 12.5, "y": 1},
|
||||
{"label": "Backsp.", "matrix": [5, 6], "x": 13.5, "y": 1, "w": 1.5},
|
||||
|
||||
{"label": "Caps Lock", "matrix": [4, 0], "x": 0, "y": 2, "w": 1.75},
|
||||
{"label": "A", "matrix": [5, 0], "x": 1.75, "y": 2},
|
||||
{"label": "S", "matrix": [4, 1], "x": 2.75, "y": 2},
|
||||
{"label": "D", "matrix": [5, 1], "x": 3.75, "y": 2},
|
||||
{"label": "F", "matrix": [4, 2], "x": 4.75, "y": 2},
|
||||
{"label": "G", "matrix": [5, 2], "x": 5.75, "y": 2},
|
||||
{"label": "H", "matrix": [4, 3], "x": 6.75, "y": 2},
|
||||
{"label": "J", "matrix": [5, 3], "x": 7.75, "y": 2},
|
||||
{"label": "K", "matrix": [4, 4], "x": 8.75, "y": 2},
|
||||
{"label": "L", "matrix": [5, 4], "x": 9.75, "y": 2},
|
||||
{"label": ":", "matrix": [4, 5], "x": 10.75, "y": 2},
|
||||
{"label": "\"", "matrix": [5, 5], "x": 11.75, "y": 2},
|
||||
{"label": "Enter", "matrix": [7, 6], "x": 12.75, "y": 2, "w": 2.25},
|
||||
|
||||
{"label": "Shift", "matrix": [6, 0], "x": 0, "y": 3, "w": 2.25},
|
||||
{"label": "Z", "matrix": [6, 1], "x": 2.25, "y": 3},
|
||||
{"label": "X", "matrix": [7, 1], "x": 3.25, "y": 3},
|
||||
{"label": "C", "matrix": [6, 2], "x": 4.25, "y": 3},
|
||||
{"label": "V", "matrix": [7, 2], "x": 5.25, "y": 3},
|
||||
{"label": "B", "matrix": [6, 3], "x": 6.25, "y": 3},
|
||||
{"label": "N", "matrix": [7, 3], "x": 7.25, "y": 3},
|
||||
{"label": "M", "matrix": [6, 4], "x": 8.25, "y": 3},
|
||||
{"label": "<", "matrix": [7, 4], "x": 9.25, "y": 3},
|
||||
{"label": ">", "matrix": [6, 5], "x": 10.25, "y": 3},
|
||||
{"label": "?", "matrix": [7, 5], "x": 11.25, "y": 3},
|
||||
{"label": "Shift", "matrix": [6, 6], "x": 12.25, "y": 3, "w": 1.75},
|
||||
{"label": "Fn", "matrix": [9, 6], "x": 14, "y": 3},
|
||||
|
||||
{"label": "Ctrl", "matrix": [8, 0], "x": 0, "y": 4, "w": 1.5},
|
||||
{"label": "Win", "matrix": [9, 0], "x": 1.5, "y": 4},
|
||||
{"label": "Alt", "matrix": [9, 1], "x": 2.5, "y": 4, "w": 1.5},
|
||||
{"label": "Space", "matrix": [9, 3], "x": 4, "y": 4, "w": 7},
|
||||
{"label": "Alt", "matrix": [8, 5], "x": 11, "y": 4, "w": 1.5},
|
||||
{"label": "Win", "matrix": [9, 5], "x": 12.5, "y": 4},
|
||||
{"label": "Ctrl", "matrix": [8, 6], "x": 13.5, "y": 4, "w": 1.5}
|
||||
]
|
||||
},
|
||||
|
||||
"LAYOUT_60_hhkb": {
|
||||
"layout": [
|
||||
{"label": "Esc", "matrix": [0, 0], "x": 0, "y": 0},
|
||||
{"label": "!", "matrix": [1, 0], "x": 1, "y": 0},
|
||||
{"label": "@", "matrix": [0, 1], "x": 2, "y": 0},
|
||||
{"label": "#", "matrix": [1, 1], "x": 3, "y": 0},
|
||||
{"label": "$", "matrix": [0, 2], "x": 4, "y": 0},
|
||||
{"label": "%", "matrix": [1, 2], "x": 5, "y": 0},
|
||||
{"label": "^", "matrix": [0, 3], "x": 6, "y": 0},
|
||||
{"label": "&", "matrix": [1, 3], "x": 7, "y": 0},
|
||||
{"label": "*", "matrix": [0, 4], "x": 8, "y": 0},
|
||||
{"label": "(", "matrix": [1, 4], "x": 9, "y": 0},
|
||||
{"label": ")", "matrix": [0, 5], "x": 10, "y": 0},
|
||||
{"label": "_", "matrix": [1, 5], "x": 11, "y": 0},
|
||||
{"label": "+", "matrix": [0, 6], "x": 12, "y": 0},
|
||||
{"label": "|", "matrix": [1, 6], "x": 13, "y": 0},
|
||||
{"label": "~", "matrix": [3, 6], "x": 14, "y": 0},
|
||||
|
||||
{"label": "Tab", "matrix": [2, 0], "x": 0, "y": 1, "w": 1.5},
|
||||
{"label": "Q", "matrix": [3, 0], "x": 1.5, "y": 1},
|
||||
{"label": "W", "matrix": [2, 1], "x": 2.5, "y": 1},
|
||||
{"label": "E", "matrix": [3, 1], "x": 3.5, "y": 1},
|
||||
{"label": "R", "matrix": [2, 2], "x": 4.5, "y": 1},
|
||||
{"label": "T", "matrix": [3, 2], "x": 5.5, "y": 1},
|
||||
{"label": "Y", "matrix": [2, 3], "x": 6.5, "y": 1},
|
||||
{"label": "U", "matrix": [3, 3], "x": 7.5, "y": 1},
|
||||
{"label": "I", "matrix": [2, 4], "x": 8.5, "y": 1},
|
||||
{"label": "O", "matrix": [3, 4], "x": 9.5, "y": 1},
|
||||
{"label": "P", "matrix": [2, 5], "x": 10.5, "y": 1},
|
||||
{"label": "{", "matrix": [3, 5], "x": 11.5, "y": 1},
|
||||
{"label": "}", "matrix": [2, 6], "x": 12.5, "y": 1},
|
||||
{"label": "Backsp.", "matrix": [5, 6], "x": 13.5, "y": 1, "w": 1.5},
|
||||
|
||||
{"label": "Caps Lock", "matrix": [4, 0], "x": 0, "y": 2, "w": 1.75},
|
||||
{"label": "A", "matrix": [5, 0], "x": 1.75, "y": 2},
|
||||
{"label": "S", "matrix": [4, 1], "x": 2.75, "y": 2},
|
||||
{"label": "D", "matrix": [5, 1], "x": 3.75, "y": 2},
|
||||
{"label": "F", "matrix": [4, 2], "x": 4.75, "y": 2},
|
||||
{"label": "G", "matrix": [5, 2], "x": 5.75, "y": 2},
|
||||
{"label": "H", "matrix": [4, 3], "x": 6.75, "y": 2},
|
||||
{"label": "J", "matrix": [5, 3], "x": 7.75, "y": 2},
|
||||
{"label": "K", "matrix": [4, 4], "x": 8.75, "y": 2},
|
||||
{"label": "L", "matrix": [5, 4], "x": 9.75, "y": 2},
|
||||
{"label": ":", "matrix": [4, 5], "x": 10.75, "y": 2},
|
||||
{"label": "\"", "matrix": [5, 5], "x": 11.75, "y": 2},
|
||||
{"label": "Enter", "matrix": [7, 6], "x": 12.75, "y": 2, "w": 2.25},
|
||||
|
||||
{"label": "Shift", "matrix": [6, 0], "x": 0, "y": 3, "w": 2.25},
|
||||
{"label": "Z", "matrix": [6, 1], "x": 2.25, "y": 3},
|
||||
{"label": "X", "matrix": [7, 1], "x": 3.25, "y": 3},
|
||||
{"label": "C", "matrix": [6, 2], "x": 4.25, "y": 3},
|
||||
{"label": "V", "matrix": [7, 2], "x": 5.25, "y": 3},
|
||||
{"label": "B", "matrix": [6, 3], "x": 6.25, "y": 3},
|
||||
{"label": "N", "matrix": [7, 3], "x": 7.25, "y": 3},
|
||||
{"label": "M", "matrix": [6, 4], "x": 8.25, "y": 3},
|
||||
{"label": "<", "matrix": [7, 4], "x": 9.25, "y": 3},
|
||||
{"label": ">", "matrix": [6, 5], "x": 10.25, "y": 3},
|
||||
{"label": "?", "matrix": [7, 5], "x": 11.25, "y": 3},
|
||||
{"label": "Shift", "matrix": [6, 6], "x": 12.25, "y": 3, "w": 1.75},
|
||||
{"label": "Fn", "matrix": [9, 6], "x": 14, "y": 3},
|
||||
|
||||
{"label": "Alt", "matrix": [9, 0], "x": 1.5, "y": 4},
|
||||
{"label": "GUI", "matrix": [9, 1], "x": 2.5, "y": 4, "w": 1.5},
|
||||
{"label": "Space", "matrix": [9, 3], "x": 4, "y": 4, "w": 7},
|
||||
{"label": "GUI", "matrix": [8, 5], "x": 11, "y": 4, "w": 1.5},
|
||||
{"label": "Alt", "matrix": [9, 5], "x": 12.5, "y": 4}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
# Matrix Diagram for 4pplet Eagle Viper REP Rev A
|
||||
|
||||
```
|
||||
┌───────┐
|
||||
2u Backspace │36? │
|
||||
└───────┘
|
||||
┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
|
||||
│00 │10 │01 │11 │02 │12 │03 │13 │04 │14 │05 │15 │06 │16 │36 │
|
||||
├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ ┌─────┐
|
||||
│20 │30 │21 │31 │22 │32 │23 │33 │24 │34 │25 │35 │26 │56 │ │ │
|
||||
├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ ┌──┴┐76 │ ISO Enter
|
||||
│40 │50 │41 │51 │42 │52 │43 │53 │44 │54 │45 │55 │76 │ │46 │ │
|
||||
├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ └───┴────┘
|
||||
│60 │70 │61 │71 │62 │72 │63 │73 │64 │74 │65 │75 │66 │96 │
|
||||
├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬┴───┤
|
||||
│80 │90 │91 │93 │94 │85 │95 │86 │
|
||||
└────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
|
||||
┌────────┐ ┌──────────┐
|
||||
│60 │ 2.25u LShift 2.75u RShift │66 │
|
||||
└────────┘ └──────────┘
|
||||
┌─────┬───┬─────┬───────────────────────────┬─────┬───┬─────┐
|
||||
│80 │90 │91 │93 │85 │95 │86 │ Tsangan/WKL/HHKB
|
||||
└─────┴───┴─────┴───────────────────────────┴─────┴───┴─────┘
|
||||
```
|
||||
@@ -19,23 +19,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include "quantum.h"
|
||||
|
||||
void setLayerLed(layer_state_t state);
|
||||
|
||||
#define LAYOUT_all( \
|
||||
k00, k10, k01, k11, k02, k12, k03, k13, k04, k14, k05, k15, k06, k16, k36, \
|
||||
k20, k30, k21, k31, k22, k32, k23, k33, k24, k34, k25, k35, k26, k56,\
|
||||
k40, k50, k41, k51, k42, k52, k43, k53, k44, k54, k45, k55, k46, k76,\
|
||||
k60, k70, k61, k71, k62, k72, k63, k73, k64, k74, k65, k75, k66, k96,\
|
||||
k80, k90, k91, k93, k94, k85, k95, k86 \
|
||||
) \
|
||||
{ \
|
||||
{k00, k01, k02, k03, k04, k05, k06}, \
|
||||
{k10, k11, k12, k13, k14, k15, k16}, \
|
||||
{k20, k21, k22, k23, k24, k25, k26}, \
|
||||
{k30, k31, k32, k33, k34, k35, k36}, \
|
||||
{k40, k41, k42, k43, k44, k45, k46}, \
|
||||
{k50, k51, k52, k53, k54, k55, k56}, \
|
||||
{k60, k61, k62, k63, k64, k65, k66}, \
|
||||
{k70, k71, k72, k73, k74, k75, k76}, \
|
||||
{k80, KC_NO, KC_NO, KC_NO, KC_NO, k85, k86}, \
|
||||
{k90, k91, KC_NO, k93, k94, k95, k96} \
|
||||
}
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
Copyright 2023 Stefan Sundin "4pplet" <4pplet@protonmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
// main layer
|
||||
[0] = LAYOUT_all(
|
||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_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_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT,
|
||||
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,
|
||||
MO(1), KC_LALT, KC_LGUI, KC_GRV, KC_SPC, KC_BSLS, KC_LEFT, KC_RIGHT,KC_DOWN, KC_UP),
|
||||
// basic function layer
|
||||
[1] = LAYOUT_all(
|
||||
QK_BOOT, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_CAPS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
|
||||
};
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user